@perevorot/shop 2.0.150 → 2.0.152

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.
Files changed (33) hide show
  1. package/dist/components/account/OrderItem.js +1 -1
  2. package/dist/components/account/OrderItem.js.map +1 -1
  3. package/dist/components/account/User.js +1 -1
  4. package/dist/components/account/User.js.map +1 -1
  5. package/dist/components/auth/Forget.js +1 -1
  6. package/dist/components/auth/Forget.js.map +1 -1
  7. package/dist/components/auth/Login.js +1 -1
  8. package/dist/components/auth/Login.js.map +1 -1
  9. package/dist/components/auth/Registration.js +1 -1
  10. package/dist/components/auth/Registration.js.map +1 -1
  11. package/dist/components/auth/Reset.js +1 -1
  12. package/dist/components/auth/Reset.js.map +1 -1
  13. package/dist/components/shop/PromoProducts.js +1 -1
  14. package/dist/components/shop/PromoProducts.js.map +1 -1
  15. package/dist/components/shop/Search.js +1 -1
  16. package/dist/components/shop/Search.js.map +1 -1
  17. package/dist/components/shop/cart/Cart.js +1 -1
  18. package/dist/components/shop/cart/Cart.js.map +1 -1
  19. package/dist/components/shop/cart/CartItem.js +1 -1
  20. package/dist/components/shop/cart/CartItem.js.map +1 -1
  21. package/dist/components/shop/filters/Price.js +1 -1
  22. package/dist/components/shop/filters/Price.js.map +1 -1
  23. package/dist/components/shop/order/Checkout.js +1 -1
  24. package/dist/components/shop/order/Checkout.js.map +1 -1
  25. package/dist/components/shop/order/CheckoutItem.js +1 -1
  26. package/dist/components/shop/order/CheckoutItem.js.map +1 -1
  27. package/dist/components/shop/order/OneClick.js +1 -1
  28. package/dist/components/shop/order/OneClick.js.map +1 -1
  29. package/dist/components/shop/reviews/Question.js +1 -1
  30. package/dist/components/shop/reviews/Question.js.map +1 -1
  31. package/dist/components/shop/reviews/Review.js +1 -1
  32. package/dist/components/shop/reviews/Review.js.map +1 -1
  33. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Cart.js","sources":["../../../../src/components/shop/cart/Cart.vue","../../../../src/components/shop/cart/Cart.vue?vue&type=template&id=603b9bfa&lang.js"],"sourcesContent":["<template>\n <div class=\"cart\" v-bind:class=\"{ 'is-open': modal }\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\" v-bind:class=\"{ 'is-disabled': isLoading }\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">{{ __('shop.cart.open') }}</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">{{ __('shop.cart.empty') }}</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <slot name=\"cart-title\" :quantity=\"quantity\">\n <div class=\"cart-title\">\n {{ __('shop.cart.title') }}\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n </slot>\n <slot name=\"clear\" :clear=\"clear\" :quantity=\"quantity\"></slot>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\"></slot>\n </template>\n </cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n {{ __('shop.cart.total') }}\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"loyalty\" :pluralize=\"pluralize\" :items=\"items\"></slot>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">{{ __('shop.cart.go_checkout') }}</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">{{ __('shop.cart.cross') }}</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">{{ __('shop.cart.bundle') }}</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"__('shop.cart.bundle_amount') + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{ __('shop.cart.no_search') }}\n </div>\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent, provide } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n//import cart from '../../../api/modules/cart';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\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 cartStorage = props.cartStorage;\n\n provide('cartStorage', cartStorage);\n\n const items = computed(() => store.getters[cartStorage + '/items']);\n const modal = computed(() => store.getters[cartStorage + '/modal']);\n const total = computed(() => store.getters[cartStorage + '/total']);\n const quantity = computed(() => store.getters[cartStorage + '/quantity']);\n\n const open = () => {\n store.commit(cartStorage + '/modal', modal.value ? null : 'cart');\n };\n\n const close = () => {\n store.commit(cartStorage + '/modal', null);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/clear', {\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch(cartStorage + '/get', {\n cart: cartStorage,\n finally: () => { }\n });\n\n document.body.addEventListener('click', (event) => {\n if (modal.value && !event.target.closest('.cart')) {\n close();\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (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 let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters[cartStorage + '/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 1,\n slidesPerGroup: 1,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n slidesPerGroup: 2\n }\n },\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters[cartStorage + '/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\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 const isLoading = ref(false);\n\n const checkout = () => {\n isLoading.value = true;\n window.location.href = $ziggy('shop.checkout');\n };\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout,\n isLoading,\n };\n }\n});\n</script>","<template>\n <div class=\"cart\" v-bind:class=\"{ 'is-open': modal }\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\" v-bind:class=\"{ 'is-disabled': isLoading }\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">{{ __('shop.cart.open') }}</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">{{ __('shop.cart.empty') }}</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <slot name=\"cart-title\" :quantity=\"quantity\">\n <div class=\"cart-title\">\n {{ __('shop.cart.title') }}\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n </slot>\n <slot name=\"clear\" :clear=\"clear\" :quantity=\"quantity\"></slot>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\"></slot>\n </template>\n </cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n {{ __('shop.cart.total') }}\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"loyalty\" :pluralize=\"pluralize\" :items=\"items\"></slot>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">{{ __('shop.cart.go_checkout') }}</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">{{ __('shop.cart.cross') }}</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">{{ __('shop.cart.bundle') }}</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"__('shop.cart.bundle_amount') + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{ __('shop.cart.no_search') }}\n </div>\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent, provide } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n//import cart from '../../../api/modules/cart';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\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 cartStorage = props.cartStorage;\n\n provide('cartStorage', cartStorage);\n\n const items = computed(() => store.getters[cartStorage + '/items']);\n const modal = computed(() => store.getters[cartStorage + '/modal']);\n const total = computed(() => store.getters[cartStorage + '/total']);\n const quantity = computed(() => store.getters[cartStorage + '/quantity']);\n\n const open = () => {\n store.commit(cartStorage + '/modal', modal.value ? null : 'cart');\n };\n\n const close = () => {\n store.commit(cartStorage + '/modal', null);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/clear', {\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch(cartStorage + '/get', {\n cart: cartStorage,\n finally: () => { }\n });\n\n document.body.addEventListener('click', (event) => {\n if (modal.value && !event.target.closest('.cart')) {\n close();\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (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 let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters[cartStorage + '/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 1,\n slidesPerGroup: 1,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n slidesPerGroup: 2\n }\n },\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters[cartStorage + '/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\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 const isLoading = ref(false);\n\n const checkout = () => {\n isLoading.value = true;\n window.location.href = $ziggy('shop.checkout');\n };\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout,\n isLoading,\n };\n }\n});\n</script>"],"names":["defineComponent","name","props","isModal","type","Boolean","cartStorage","String","setup","store","useStore","loading","ref","provide","items","computed","getters","modal","total","quantity","close","commit","dispatch","cart","document","body","addEventListener","event","value","target","closest","window","e","key","crossSwiper","bundlesSwiper","crossSlider","crossSliderNext","crossSliderPrev","cross","destroy","length","Swiper","slidesPerView","slidesPerGroup","breakpoints","spaceBetween","allowTouchMove","modules","Navigation","mousewheel","forceToAxis","navigation","nextEl","prevEl","bundlesSlider","bundlesSliderNext","bundlesSliderPrev","bundles","isLoading","open","clear","pluralize","href","location","checkout","$ziggy","_createElementVNode","role","_createElementBlock","_ctx","_hoisted_1","_hoisted_2","_renderSlot","onClick","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","innerHTML","price","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_19","_hoisted_20","_toDisplayString","_hoisted_22","_hoisted_23","item","_createBlock","id","_","slotProps","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","image","src","_hoisted_42","code","_hoisted_44","_hoisted_46","_hoisted_47","_hoisted_48","priceOld","_hoisted_51","_createVNode","_hoisted_52","_hoisted_53","_hoisted_56","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","third","_hoisted_63","_hoisted_69","_hoisted_70","_hoisted_71","_hoisted_73","_hoisted_74","_hoisted_76","_hoisted_77","second","_hoisted_83","_hoisted_84","_hoisted_85","_hoisted_87","_hoisted_88","_hoisted_90","_hoisted_93","_hoisted_99","_hoisted_100","_hoisted_101","_hoisted_103","_hoisted_104","_hoisted_106","_hoisted_107","bundle","amount","_hoisted_110","_hoisted_111","_hoisted_113","_hoisted_116","_hoisted_119","_hoisted_120","_hoisted_121","locale","url","_hoisted_123","_hoisted_124","slider"],"mappings":"uMAuQ6BA,kBAAgB,CACzCC,KAAM,OACNC,MAAO,CACHC,QAAS,CACLC,KAAMC,iBACG,GAEbC,YAAa,CACTF,KAAMG,eACG,SAGjBC,eAAMN,OACIO,EAAQC,aACRC,EAAUC,OAAI,GACdN,EAAcJ,E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S6C,QAAQ"}
1
+ {"version":3,"file":"Cart.js","sources":["../../../../src/components/shop/cart/Cart.vue","../../../../src/components/shop/cart/Cart.vue?vue&type=template&id=603b9bfa&lang.js"],"sourcesContent":["<template>\n <div class=\"cart\" v-bind:class=\"{ 'is-open': modal }\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\" v-bind:class=\"{ 'is-disabled': isLoading }\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">{{ __('shop.cart.open') }}</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">{{ __('shop.cart.empty') }}</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <slot name=\"cart-title\" :quantity=\"quantity\">\n <div class=\"cart-title\">\n {{ __('shop.cart.title') }}\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n </slot>\n <slot name=\"clear\" :clear=\"clear\" :quantity=\"quantity\"></slot>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\"></slot>\n </template>\n </cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n {{ __('shop.cart.total') }}\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"loyalty\" :pluralize=\"pluralize\" :items=\"items\"></slot>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">{{ __('shop.cart.go_checkout') }}</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">{{ __('shop.cart.cross') }}</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">{{ __('shop.cart.bundle') }}</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"__('shop.cart.bundle_amount') + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{ __('shop.cart.no_search') }}\n </div>\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent, provide } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n//import cart from '../../../api/modules/cart';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\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 cartStorage = props.cartStorage;\n\n provide('cartStorage', cartStorage);\n\n const items = computed(() => store.getters[cartStorage + '/items']);\n const modal = computed(() => store.getters[cartStorage + '/modal']);\n const total = computed(() => store.getters[cartStorage + '/total']);\n const quantity = computed(() => store.getters[cartStorage + '/quantity']);\n\n const open = () => {\n store.commit(cartStorage + '/modal', modal.value ? null : 'cart');\n };\n\n const close = () => {\n store.commit(cartStorage + '/modal', null);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/clear', {\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch(cartStorage + '/get', {\n cart: cartStorage,\n finally: () => { }\n });\n\n document.body.addEventListener('click', (event) => {\n if (modal.value && !event.target.closest('.cart')) {\n close();\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (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 let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters[cartStorage + '/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 1,\n slidesPerGroup: 1,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n slidesPerGroup: 2\n }\n },\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters[cartStorage + '/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\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 const isLoading = ref(false);\n\n const checkout = () => {\n isLoading.value = true;\n window.location.href = $ziggy('shop.checkout');\n };\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout,\n isLoading,\n };\n }\n});\n</script>","<template>\n <div class=\"cart\" v-bind:class=\"{ 'is-open': modal }\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\" v-bind:class=\"{ 'is-disabled': isLoading }\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">{{ __('shop.cart.open') }}</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">{{ __('shop.cart.empty') }}</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <slot name=\"cart-title\" :quantity=\"quantity\">\n <div class=\"cart-title\">\n {{ __('shop.cart.title') }}\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n </slot>\n <slot name=\"clear\" :clear=\"clear\" :quantity=\"quantity\"></slot>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\">\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\"></slot>\n </template>\n </cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n {{ __('shop.cart.total') }}\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n <slot name=\"loyalty\" :pluralize=\"pluralize\" :items=\"items\"></slot>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">{{ __('shop.cart.go_checkout') }}</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">{{ __('shop.cart.cross') }}</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">{{ __('shop.cart.bundle') }}</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.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=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"__('shop.cart.bundle_amount') + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">{{ __('shop.cart.no_no') }}</div>\n <div class=\"message\">\n {{ __('shop.cart.no_prop') }}\n <a :href=\"$env.locale.url ? $env.locale.url : '/'\">{{ __('shop.cart.no_home') }}</a>, <br />{{ __('shop.cart.no_search') }}\n </div>\n <button class=\"button continue\" @click=\"close\">{{ __('shop.cart.continue') }}</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent, provide } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n//import cart from '../../../api/modules/cart';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\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 cartStorage = props.cartStorage;\n\n provide('cartStorage', cartStorage);\n\n const items = computed(() => store.getters[cartStorage + '/items']);\n const modal = computed(() => store.getters[cartStorage + '/modal']);\n const total = computed(() => store.getters[cartStorage + '/total']);\n const quantity = computed(() => store.getters[cartStorage + '/quantity']);\n\n const open = () => {\n store.commit(cartStorage + '/modal', modal.value ? null : 'cart');\n };\n\n const close = () => {\n store.commit(cartStorage + '/modal', null);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/clear', {\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch(cartStorage + '/get', {\n cart: cartStorage,\n finally: () => { }\n });\n\n document.body.addEventListener('click', (event) => {\n if (modal.value && !event.target.closest('.cart')) {\n close();\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (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 let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters[cartStorage + '/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 1,\n slidesPerGroup: 1,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n slidesPerGroup: 2\n }\n },\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters[cartStorage + '/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\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 const isLoading = ref(false);\n\n const checkout = () => {\n isLoading.value = true;\n window.location.href = $ziggy('shop.checkout');\n };\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout,\n isLoading,\n };\n }\n});\n</script>"],"names":["defineComponent","name","props","isModal","type","Boolean","cartStorage","String","setup","store","useStore","loading","ref","provide","items","computed","getters","modal","total","quantity","close","commit","dispatch","cart","document","body","addEventListener","event","value","target","closest","window","e","key","crossSwiper","bundlesSwiper","crossSlider","crossSliderNext","crossSliderPrev","cross","destroy","length","Swiper","slidesPerView","slidesPerGroup","breakpoints","spaceBetween","allowTouchMove","modules","Navigation","mousewheel","forceToAxis","navigation","nextEl","prevEl","bundlesSlider","bundlesSliderNext","bundlesSliderPrev","bundles","isLoading","open","clear","pluralize","href","location","checkout","$ziggy","_createElementVNode","role","_createElementBlock","_ctx","_hoisted_1","_hoisted_2","_renderSlot","onClick","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","innerHTML","price","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_19","_hoisted_20","_toDisplayString","_hoisted_22","_hoisted_23","item","_createBlock","id","_","slotProps","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","image","src","_hoisted_42","code","_hoisted_44","_hoisted_46","_hoisted_47","_hoisted_48","priceOld","_hoisted_51","_createVNode","_hoisted_52","_hoisted_53","_hoisted_56","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","third","_hoisted_63","_hoisted_69","_hoisted_70","_hoisted_71","_hoisted_73","_hoisted_74","_hoisted_76","_hoisted_77","second","_hoisted_83","_hoisted_84","_hoisted_85","_hoisted_87","_hoisted_88","_hoisted_90","_hoisted_93","_hoisted_99","_hoisted_100","_hoisted_101","_hoisted_103","_hoisted_104","_hoisted_106","_hoisted_107","bundle","amount","_hoisted_110","_hoisted_111","_hoisted_113","_hoisted_116","_hoisted_119","_hoisted_120","_hoisted_121","locale","url","_hoisted_124","_hoisted_125","slider"],"mappings":"uMAuQ6BA,kBAAgB,CACzCC,KAAM,OACNC,MAAO,CACHC,QAAS,CACLC,KAAMC,iBACG,GAEbC,YAAa,CACTF,KAAMG,e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H,qCAAc,kBAAmBO,sCAAOJ,yDAAUA,+BAClDH,2BAAAmG,IACI5C,kBAAS6C,QAAQ"}
@@ -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,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=e.createTextVNode("+"),I=["innerHTML"],A={key:0,class:"bundle columns"},G=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("div",{class:"cart-bundle-spacer"})],-1),J={class:"column is-narrow"},K=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),Q=["src"],R={key:1},W=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],X={class:"column"},Y={key:0,class:"code"},Z={class:"title"},ee={key:1,class:"bundle columns"},te=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("div",{class:"cart-bundle-spacer"})],-1),ie={class:"column is-narrow"},oe=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),ne=["src"],ae={key:1},re=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],ce={class:"column"},le={key:0,class:"code"},se={class:"title"};i.render=function(t,i,me,de,ue,pe){var be=e.resolveComponent("wishlist-add");return me.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===me.item.attributes.active,"is-bundle":me.item.attributes.bundle}]),"data-code":me.item.attributes.code,"shop-product":""},[me.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":me.item.attributes.bundle}])},[e.createElementVNode("div",c,[e.createElementVNode("div",l,[e.createElementVNode("button",{class:"remove",onClick:i[0]||(i[0]=function(){return de.remove&&de.remove.apply(de,arguments)}),disabled:de.loading},m,8,s),de.auth&&!me.item.attributes.bundle?(e.openBlock(),e.createBlock(be,{key:0,id:me.item.attributes.productId?me.item.attributes.productId:me.item.id,item:me.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 de.gotoProduct(me.item.attributes.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!me.item.attributes.image}])},[me.item.attributes.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:me.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:me.item,gotoProduct:de.gotoProduct},(function(){return[me.item.attributes.code?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(me.item.attributes.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",E,e.toDisplayString(me.item.attributes.categoryFull),1),e.createElementVNode("div",y,[!1===me.item.attributes.active?(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(me.item.name),1)):(e.openBlock(),e.createElementBlock("a",{key:1,onClick:i[2]||(i[2]=function(e){return de.gotoProduct(me.item.attributes.href)})},e.toDisplayString(me.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 de.decrease&&de.decrease.apply(de,arguments)}),disabled:de.loading||1==me.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 me.item.quantity=e}),disabled:""},null,512),[[e.vModelText,me.item.quantity]]),e.createElementVNode("button",{class:"button increase",onClick:i[5]||(i[5]=function(){return de.increase&&de.increase.apply(de,arguments)}),disabled:de.loading},_,8,C)]),me.item.quantity>1?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",{innerHTML:t.$filters.price(me.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:me.item,filters:t.$filters},(function(){return[e.createElementVNode("div",{class:e.normalizeClass(["price",{"bundle-price":me.item.attributes.bundle}])},[me.item.attributes.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(me.item.attributes.priceOld*me.item.quantity)},null,8,q)):e.createCommentVNode("v-if",!0),me.item.attributes.bundle&&me.item.attributes.amount?(e.openBlock(),e.createElementBlock("div",{key:1,class:"bundle-amount",innerHTML:t.__("shop.cart.bundle_amount")+(me.item.attributes.amount.percent?me.item.attributes.amount.percent+"%":t.$filters.price(me.item.attributes.amount.sum*me.item.quantity))},null,8,D)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{innerHTML:t.$filters.price(me.item.attributes.price*me.item.quantity),"shop-product-price":""},null,8,T)],2)]}))])]),me.item.options&&me.item.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["options",{"is-toggled":de.optionsToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:i[6]||(i[6]=function(e){return de.optionsToggled=!de.optionsToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.cart.additional"))+" "+e.toDisplayString(me.item.options.length),1),H]),e.withDirectives(e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.item.options,(function(o,n){return e.openBlock(),e.createElementBlock("div",{key:n,class:e.normalizeClass(["columns",{"is-checked":-1!==de.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 de.options=e}),value:o.id,id:"option-"+me.item.id+"-"+o.id},null,8,P),[[e.vModelCheckbox,de.options]])]),e.createElementVNode("div",z,[e.createElementVNode("label",{class:"option-title is-clickable",for:"option-"+me.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,[j,e.createElementVNode("span",{innerHTML:t.$filters.price(o.price)},null,8,I)])],2)})),128))],512),[[e.vShow,de.optionsToggled]])],2)):e.createCommentVNode("v-if",!0)])],2),me.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",A,[G,e.createElementVNode("div",J,[K,e.createElementVNode("a",{onClick:i[8]||(i[8]=function(e){return de.gotoProduct(me.item.attributes.second.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!me.item.attributes.second.image}])},[me.item.attributes.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:me.item.attributes.second.image},null,8,Q)):(e.openBlock(),e.createElementBlock("svg",R,W))],2)])]),e.createElementVNode("div",X,[me.item.attributes.second.code?(e.openBlock(),e.createElementBlock("div",Y,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(me.item.attributes.second.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Z,[e.createElementVNode("a",{onClick:i[9]||(i[9]=function(e){return de.gotoProduct(me.item.attributes.second.href)})},e.toDisplayString(me.item.attributes.second.name),1)])])])):e.createCommentVNode("v-if",!0),me.item.attributes.bundle&&me.item.attributes.third?(e.openBlock(),e.createElementBlock("div",ee,[te,e.createElementVNode("div",ie,[oe,e.createElementVNode("a",{onClick:i[10]||(i[10]=function(e){return de.gotoProduct(me.item.attributes.third.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!me.item.attributes.third.image}])},[me.item.attributes.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:me.item.attributes.third.image},null,8,ne)):(e.openBlock(),e.createElementBlock("svg",ae,re))],2)])]),e.createElementVNode("div",ce,[me.item.attributes.third.code?(e.openBlock(),e.createElementBlock("div",le,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(me.item.attributes.third.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",se,[e.createElementVNode("a",{onClick:i[11]||(i[11]=function(e){return de.gotoProduct(me.item.attributes.third.href)})},e.toDisplayString(me.item.attributes.third.name),1)])])])):e.createCommentVNode("v-if",!0)])],10,o))},module.exports=i;
2
2
  //# sourceMappingURL=CartItem.js.map