@ikas/storefront 2.0.63-alpha.6 → 2.0.63-alpha.7

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 e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
1
+ import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
@@ -1 +1 @@
1
- import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
1
+ import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
@@ -1 +1 @@
1
- import{makeAutoObservable as t}from"mobx";var n="undefined"==typeof window,r=function(){function r(){t(this)}return r.productView=function(t){try{return void(!n&&window.ttq&&window.ttq.track("ViewContent",function(t,n){void 0===n&&(n=1);return{content_type:"product",quantity:n,content_id:t.selectedVariant.id,value:t.selectedVariant.price.finalPrice,currency:""===t.selectedVariant.price.currency?"TRY":t.selectedVariant.price.currency}}(t)))}catch(t){console.error(t)}},r.addToCart=function(t,r){try{return void(!n&&window.ttq&&window.ttq.track("AddToCart",function(t,n){void 0===n&&(n=1);return{content_id:t.variant.id,content_type:"product",content_name:t.variant.name,quantity:n,value:t.finalPrice,currency:t.currencyCode}}(t,r)))}catch(t){console.error(t)}},r.beginCheckout=function(){try{return void(!n&&window.ttq&&window.ttq.track("InitiateCheckout"))}catch(t){console.error(t)}},r.purchase=function(t){try{return void(!n&&window.ttq&&window.ttq.track("CompletePayment",function(t){var n,r,o,e=[];return null===(n=t.cart)||void 0===n||n.items.map((function(t){e.push({content_id:t.variant.id,content_type:"product",content_name:t.variant.name,price:t.finalPrice,quantity:t.quantity})})),{contents:e,content_type:"product_group",currency:null===(r=t.cart)||void 0===r?void 0:r.items[0].currencyCode,value:null===(o=t.cart)||void 0===o?void 0:o.totalPrice}}(t)))}catch(t){console.error(t)}},r.addToWishlist=function(t){try{return void(!n&&window.ttq&&window.ttq.track("AddToWishlist",{content_id:t}))}catch(t){console.error(t)}},r.search=function(t){try{return void(!n&&window.ttq&&window.ttq.track("Search",{query:t,content_id:"Search"}))}catch(t){console.error(t)}},r.completeRegistration=function(){try{return void(!n&&window.ttq&&window.ttq.track("CompleteRegistration"))}catch(t){console.error(t)}},r.viewCategory=function(t){try{return void(!n&&window.ttq&&window.ttq.track("ViewContent",{content_id:t.id,content_type:"product_group",content_category:t.name}))}catch(t){console.error(t)}},r.contactForm=function(){try{return void(!n&&window.ttq&&window.ttq.track("Contact"))}catch(t){console.error(t)}},r}();export{r as TiktokPixel};
1
+ import{makeAutoObservable as t}from"mobx";import{IkasStorefrontConfig as n}from"../storefront/index.js";var r="undefined"==typeof window,o=function(){function n(){t(this)}return n.productView=function(t){try{return e(),void(!r&&window.ttq&&window.ttq.track("ViewContent",function(t,n){void 0===n&&(n=1);return{content_type:"product",quantity:n,content_id:t.selectedVariant.id,value:t.selectedVariant.price.finalPrice,currency:""===t.selectedVariant.price.currency?"TRY":t.selectedVariant.price.currency}}(t)))}catch(t){console.error(t)}},n.addToCart=function(t,n){try{return e(),void(!r&&window.ttq&&window.ttq.track("AddToCart",function(t,n){void 0===n&&(n=1);return{content_id:t.variant.id,content_type:"product",content_name:t.variant.name,quantity:n,value:t.finalPrice,currency:t.currencyCode}}(t,n)))}catch(t){console.error(t)}},n.beginCheckout=function(){try{return e(),void(!r&&window.ttq&&window.ttq.track("InitiateCheckout"))}catch(t){console.error(t)}},n.purchase=function(t){try{return e(),void(!r&&window.ttq&&window.ttq.track("CompletePayment",function(t){var n,r,o,e=[];return null===(n=t.cart)||void 0===n||n.items.map((function(t){e.push({content_id:t.variant.id,content_type:"product",content_name:t.variant.name,price:t.finalPrice,quantity:t.quantity})})),{contents:e,content_type:"product_group",currency:null===(r=t.cart)||void 0===r?void 0:r.items[0].currencyCode,value:null===(o=t.cart)||void 0===o?void 0:o.totalPrice}}(t)))}catch(t){console.error(t)}},n.addToWishlist=function(t){try{return e(),void(!r&&window.ttq&&window.ttq.track("AddToWishlist",{content_id:t}))}catch(t){console.error(t)}},n.search=function(t){try{return e(),void(!r&&window.ttq&&window.ttq.track("Search",{query:t,content_id:"Search"}))}catch(t){console.error(t)}},n.completeRegistration=function(){try{return e(),void(!r&&window.ttq&&window.ttq.track("CompleteRegistration"))}catch(t){console.error(t)}},n.viewCategory=function(t){try{return e(),void(!r&&window.ttq&&window.ttq.track("ViewContent",{content_id:t.id,content_type:"product_group",content_category:t.name}))}catch(t){console.error(t)}},n.contactForm=function(){try{return e(),void(!r&&window.ttq&&window.ttq.track("Contact"))}catch(t){console.error(t)}},n}();function e(){try{var t=n.store.customerStore.customer;if(!t)return;return void(!r&&window.ttq&&window.ttq.identify({external_id:t.id,email:t.email,phone_number:t.phone||""}))}catch(t){console.error(t)}}export{o as TiktokPixel};