@ikas/storefront 6.1.0-beta.64 → 6.1.0-beta.65

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 +1 @@
1
- import{makeAutoObservable as e}from"mobx";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/order-transaction-with-prices/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import{IkasProduct as t}from"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{CheckoutStep as i}from"../components/checkout/model.js";var o="undefined"==typeof window,r=function(){function r(){e(this)}return r.productView=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_item",{currency:""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency,value:e.selectedVariant.price.finalPrice,items:[a(e)]}))}catch(e){console.error(e)}},r.addToCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","add_to_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.finalPrice*i:e.finalPrice?e.finalPrice*i:null,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.removeFromCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","remove_from_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.price.finalPrice:e.finalPrice,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.viewCart=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_cart",{currency:e.currencyCode,value:e.totalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.beginCheckout=function(e){try{return void(!o&&window.gtag&&window.gtag("event","begin_checkout",{currency:e.currencyCode,value:e.totalFinalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.purchase=function(e,t){try{return void(!o&&window.gtag&&window.gtag("event","purchase",{transaction_id:t,affiliation:window.location.hostname,value:e.totalFinalPrice,tax:e.totalTax,shipping:e.shippingTotal,currency:e.currencyCode,coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.checkoutStep=function(e,t){var r,a;if(t===i.SHIPPING||1===(null===(r=e.availableShippingMethods)||void 0===r?void 0:r.length)&&t===i.PAYMENT)try{return void(!o&&window.gtag&&window.gtag("event","add_shipping_info",{currency:e.currencyCode,value:e.totalFinalPrice,shipping_tier:"Ground",coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}if(t===i.PAYMENT)try{return void(!o&&window.gtag&&window.gtag("event","add_payment_info",{currency:e.currencyCode,value:e.totalFinalPrice,coupon:e.couponCode,payment_type:null===(a=e.selectedPaymentGateway)||void 0===a?void 0:a.paymentMethodType,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.search=function(e){try{return void(!o&&window.gtag&&window.gtag("event","search",{search_term:e}))}catch(e){console.error(e)}},r}();function a(e,t){var i;void 0===t&&(t=1);var o=[],r=e.categories;return r&&r.length&&(r[0].categoryPath&&r[0].categoryPath.map((function(e){return o.push(e)})),o.push(r[0].name)),{item_name:e.name,item_id:e.selectedVariant.id,price:e.selectedVariant.price.finalPrice,item_brand:(null===(i=e.brand)||void 0===i?void 0:i.name)||"",item_category:o.length?o[0]:"",item_category2:o.length>1?o[1]:"",item_category3:o.length>2?o[2]:"",item_category4:o.length>3?o.slice(3,o.length).join(" > "):"",item_variant:e.selectedVariant.variantValues.map((function(e){return e.name})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}function d(e,t){var i,o;void 0===t&&(t=1);var r=[],a=e.variant.categories;return a&&a.length&&(a[0].categoryPath&&a[0].categoryPath.map((function(e){return r.push(e.name)})),r.push(a[0].name)),{item_name:e.variant.name,item_id:e.variant.id,price:e.finalPrice||"",item_brand:(null===(i=e.variant.brand)||void 0===i?void 0:i.name)||"",item_category:r.length?r[0]:"",item_category2:r.length>1?r[1]:"",item_category3:r.length>2?r[2]:"",item_category4:r.length>3?r.slice(3,r.length).join(" > "):"",item_variant:null===(o=e.variant.variantValues)||void 0===o?void 0:o.map((function(e){return e.variantValueName})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}export{r as GoogleAnalytics};
1
+ import{makeAutoObservable as e}from"mobx";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"@ikas/storefront-models";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/order-transaction-with-prices/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import{IkasProduct as t}from"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{CheckoutStep as i}from"../components/checkout/model.js";var o="undefined"==typeof window,r=function(){function r(){e(this)}return r.productView=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_item",{currency:""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency,value:e.selectedVariant.price.finalPrice,items:[a(e)]}))}catch(e){console.error(e)}},r.addToCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","add_to_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.finalPrice*i:e.finalPrice?e.finalPrice*i:null,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.removeFromCart=function(e,i){try{return void(!o&&window.gtag&&window.gtag("event","remove_from_cart",{currency:e instanceof t?""===e.selectedVariant.price.currency?"TRY":e.selectedVariant.price.currency:e.currencyCode,value:e instanceof t?e.selectedVariant.price.finalPrice:e.finalPrice,items:[e instanceof t?a(e,i):d(e,i)]}))}catch(e){console.error(e)}},r.viewCart=function(e){try{return void(!o&&window.gtag&&window.gtag("event","view_cart",{currency:e.currencyCode,value:e.totalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.beginCheckout=function(e){try{return void(!o&&window.gtag&&window.gtag("event","begin_checkout",{currency:e.currencyCode,value:e.totalFinalPrice,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.purchase=function(e,t){try{return void(!o&&window.gtag&&window.gtag("event","purchase",{transaction_id:t,affiliation:window.location.hostname,value:e.totalFinalPrice,tax:e.totalTax,shipping:e.shippingTotal,currency:e.currencyCode,coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))}))}catch(e){console.error(e)}},r.checkoutStep=function(e,t){var r,a;if(t===i.SHIPPING||1===(null===(r=e.availableShippingMethods)||void 0===r?void 0:r.length)&&t===i.PAYMENT)try{!o&&window.gtag&&window.gtag("event","add_shipping_info",{currency:e.currencyCode,value:e.totalFinalPrice,shipping_tier:"Ground",coupon:e.couponCode,items:e.items.map((function(e){return d(e,e.quantity)}))})}catch(e){console.error(e)}if(t===i.PAYMENT)try{!o&&window.gtag&&window.gtag("event","add_payment_info",{currency:e.currencyCode,value:e.totalFinalPrice,coupon:e.couponCode,payment_type:null===(a=e.selectedPaymentGateway)||void 0===a?void 0:a.paymentMethodType,items:e.items.map((function(e){return d(e,e.quantity)}))})}catch(e){console.error(e)}},r.search=function(e){try{return void(!o&&window.gtag&&window.gtag("event","search",{search_term:e}))}catch(e){console.error(e)}},r}();function a(e,t){var i;void 0===t&&(t=1);var o=[],r=e.categories;return r&&r.length&&(r[0].categoryPath&&r[0].categoryPath.map((function(e){return o.push(e)})),o.push(r[0].name)),{item_name:e.name,item_id:e.selectedVariant.id,price:e.selectedVariant.price.finalPrice,item_brand:(null===(i=e.brand)||void 0===i?void 0:i.name)||"",item_category:o.length?o[0]:"",item_category2:o.length>1?o[1]:"",item_category3:o.length>2?o[2]:"",item_category4:o.length>3?o.slice(3,o.length).join(" > "):"",item_variant:e.selectedVariant.variantValues.map((function(e){return e.name})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}function d(e,t){var i,o;void 0===t&&(t=1);var r=[],a=e.variant.categories;return a&&a.length&&(a[0].categoryPath&&a[0].categoryPath.map((function(e){return r.push(e.name)})),r.push(a[0].name)),{item_name:e.variant.name,item_id:e.variant.id,price:e.finalPrice||"",item_brand:(null===(i=e.variant.brand)||void 0===i?void 0:i.name)||"",item_category:r.length?r[0]:"",item_category2:r.length>1?r[1]:"",item_category3:r.length>2?r[2]:"",item_category4:r.length>3?r.slice(3,r.length).join(" > "):"",item_variant:null===(o=e.variant.variantValues)||void 0===o?void 0:o.map((function(e){return e.variantValueName})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}export{r as GoogleAnalytics};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "6.1.0-beta.64",
3
+ "version": "6.1.0-beta.65",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -21,11 +21,11 @@
21
21
  "swiper": "11.0.6"
22
22
  },
23
23
  "devDependencies": {
24
- "@ikas/storefront-api": "^6.1.0-beta.64",
25
- "@ikas/storefront-config": "^6.1.0-beta.64",
26
- "@ikas/storefront-model-functions": "^6.1.0-beta.64",
27
- "@ikas/storefront-models": "^6.1.0-beta.64",
28
- "@ikas/storefront-providers": "^6.1.0-beta.64",
24
+ "@ikas/storefront-api": "^6.1.0-beta.65",
25
+ "@ikas/storefront-config": "^6.1.0-beta.65",
26
+ "@ikas/storefront-model-functions": "^6.1.0-beta.65",
27
+ "@ikas/storefront-models": "^6.1.0-beta.65",
28
+ "@ikas/storefront-providers": "^6.1.0-beta.65",
29
29
  "@ikas/localized-address": "1.0.0-beta.6",
30
30
  "@adyen/adyen-web": "^5.57.0",
31
31
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -60,11 +60,11 @@
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@ikas/localized-address": "1.0.0-beta.6",
63
- "@ikas/storefront-api": "^6.1.0-beta.64",
64
- "@ikas/storefront-config": "^6.1.0-beta.64",
65
- "@ikas/storefront-model-functions": "^6.1.0-beta.64",
66
- "@ikas/storefront-models": "^6.1.0-beta.64",
67
- "@ikas/storefront-providers": "^6.1.0-beta.64",
63
+ "@ikas/storefront-api": "^6.1.0-beta.65",
64
+ "@ikas/storefront-config": "^6.1.0-beta.65",
65
+ "@ikas/storefront-model-functions": "^6.1.0-beta.65",
66
+ "@ikas/storefront-models": "^6.1.0-beta.65",
67
+ "@ikas/storefront-providers": "^6.1.0-beta.65",
68
68
  "mobx": "^6.1.3",
69
69
  "mobx-react-lite": "^3.1.5",
70
70
  "next": "12.2.0",