@ikas/storefront 6.1.0-beta.367 → 6.1.0-beta.368
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.
- package/build/analytics/facebookPixel.js +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasStorefrontConfig as n}from"@ikas/storefront-config";import{CheckoutStep as r}from"../components/checkout/model.js";var o="undefined"==typeof window,i=function(){function i(){e(this)}return Object.defineProperty(i,"fbpId",{get:function(){return n.getFbpId()},enumerable:!1,configurable:!0}),i.pageView=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","PageView",{},{eventID:e}))}catch(t){console.error(t)}},i.productView=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","ViewContent",(n=t,{content_name:n.name,content_category:n.categories.length>0?n.categories[0].path.map((function(t){return t.name})).join(" > "):"",content_ids:[n.selectedVariant.id],content_type:"product",value:n.selectedVariant.price.finalPrice,currency:""===n.selectedVariant.price.currency?"TRY":n.selectedVariant.price.currency}),{eventID:e}))}catch(t){console.error(t)}var n},i.addToCart=function(t,e,n){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","AddToCart",function(t,e){var n,r,o=[];(null===(n=t.variant.categories)||void 0===n?void 0:n.length)&&(null===(r=t.variant.categories[0].categoryPath)||void 0===r||r.map((function(t){return o.push(t.name)}))),t.variant.categories&&t.variant.categories.length>0&&o.push(t.variant.categories[0].name);var i=o.length>0?o.join(" > "):"";return{content_name:t.variant.name,content_category:i,content_ids:[t.variant.id],content_type:"product",value:t.finalPrice,currency:t.currencyCode}}(t),{eventID:n}))}catch(t){console.error(t)}},i.beginCheckout=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","InitiateCheckout",c(t),{eventID:e}))}catch(t){console.error(t)}},i.purchase=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","Purchase",c(t),{eventID:e}))}catch(t){console.error(t)}},i.checkoutStep=function(e,n,i){
|
|
1
|
+
import{__assign as t}from'./../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasStorefrontConfig as n}from"@ikas/storefront-config";import{CheckoutStep as r}from"../components/checkout/model.js";var o="undefined"==typeof window,i=function(){function i(){e(this)}return Object.defineProperty(i,"fbpId",{get:function(){return n.getFbpId()},enumerable:!1,configurable:!0}),i.pageView=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","PageView",{},{eventID:e}))}catch(t){console.error(t)}},i.productView=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","ViewContent",(n=t,{content_name:n.name,content_category:n.categories.length>0?n.categories[0].path.map((function(t){return t.name})).join(" > "):"",content_ids:[n.selectedVariant.id],content_type:"product",value:n.selectedVariant.price.finalPrice,currency:""===n.selectedVariant.price.currency?"TRY":n.selectedVariant.price.currency}),{eventID:e}))}catch(t){console.error(t)}var n},i.addToCart=function(t,e,n){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","AddToCart",function(t,e){var n,r,o=[];(null===(n=t.variant.categories)||void 0===n?void 0:n.length)&&(null===(r=t.variant.categories[0].categoryPath)||void 0===r||r.map((function(t){return o.push(t.name)}))),t.variant.categories&&t.variant.categories.length>0&&o.push(t.variant.categories[0].name);var i=o.length>0?o.join(" > "):"";return{content_name:t.variant.name,content_category:i,content_ids:[t.variant.id],content_type:"product",value:t.finalPrice,currency:t.currencyCode}}(t),{eventID:n}))}catch(t){console.error(t)}},i.beginCheckout=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","InitiateCheckout",c(t),{eventID:e}))}catch(t){console.error(t)}},i.purchase=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","Purchase",c(t),{eventID:e}))}catch(t){console.error(t)}},i.checkoutStep=function(e,n,i){if(n===r.PAYMENT)try{!o&&this.fbpId&&window.fbq&&window.fbq("track","AddPaymentInfo",t(t({},c(e)),{shipping_tier:"Ground",coupon:e.couponCode}),{eventID:i})}catch(t){console.error(t)}},i.addToWishlist=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","AddToWishlist",{content_ids:[t]},{eventID:e}))}catch(t){console.error(t)}},i.search=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","Search",{search_string:t},{eventID:e}))}catch(t){console.error(t)}},i.completeRegistration=function(t){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","CompleteRegistration",{status:!0,value:0,currency:"TRY"},{eventID:t}))}catch(t){console.error(t)}},i.viewCart=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","ViewCart",function(t){var e=[],n=[];return t.items.map((function(t){e.push(t.variant.id||""),n.push({id:t.variant.id,quantity:t.quantity})})),{contents:n,content_type:"product",content_ids:e,currency:t.items[0].currencyCode,value:t.totalPrice,num_items:t.items.length}}(t),{eventID:e}))}catch(t){console.error(t)}},i.viewCategory=function(t,e){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","ViewCategory",{content_name:t},{eventID:e}))}catch(t){console.error(t)}},i.contactForm=function(t){try{return void(!o&&this.fbpId&&window.fbq&&window.fbq("track","ContactForm",{},{eventID:t}))}catch(t){console.error(t)}},i.initAdvancedMatching=function(t){try{if(o||!this.fbpId||!window.fbq)return;var e={};t.em&&(e.em=t.em.toLowerCase().trim()),t.fn&&(e.fn=t.fn.toLowerCase().trim()),t.ln&&(e.ln=t.ln.toLowerCase().trim()),t.ph&&(e.ph=t.ph.replace(/\D/g,"")),t.external_id&&(e.external_id=t.external_id),t.ct&&(e.ct=t.ct.toLowerCase().replace(/\s/g,"")),t.st&&(e.st=t.st.toLowerCase().trim()),t.zp&&(e.zp=t.zp.trim()),t.country&&(e.country=t.country.toLowerCase().trim()),Object.keys(e).length>0&&window.fbq("init",this.fbpId,e)}catch(t){console.error(t)}},i}();function c(t){var e=[],n=[];return t.items.map((function(t){e.push(t.variant.id||""),n.push({id:t.variant.id,quantity:t.quantity})})),{contents:n,content_category:"",content_type:"product",content_ids:e,currency:t.items[0].currencyCode,value:t.totalFinalPrice,num_items:t.items.length}}export{i as FacebookPixel};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.368",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"swiper": "11.0.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
27
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
28
|
-
"@ikas/storefront-model-functions": "^6.1.0-beta.
|
|
29
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
30
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
26
|
+
"@ikas/storefront-api": "^6.1.0-beta.368",
|
|
27
|
+
"@ikas/storefront-config": "^6.1.0-beta.368",
|
|
28
|
+
"@ikas/storefront-model-functions": "^6.1.0-beta.368",
|
|
29
|
+
"@ikas/storefront-models": "^6.1.0-beta.368",
|
|
30
|
+
"@ikas/storefront-providers": "^6.1.0-beta.368",
|
|
31
31
|
"@ikas/localized-address": "1.0.0-beta.6",
|
|
32
32
|
"@adyen/adyen-web": "^5.57.0",
|
|
33
33
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@ikas/localized-address": "1.0.0-beta.6",
|
|
65
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
66
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
67
|
-
"@ikas/storefront-model-functions": "^6.1.0-beta.
|
|
68
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
69
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
65
|
+
"@ikas/storefront-api": "^6.1.0-beta.368",
|
|
66
|
+
"@ikas/storefront-config": "^6.1.0-beta.368",
|
|
67
|
+
"@ikas/storefront-model-functions": "^6.1.0-beta.368",
|
|
68
|
+
"@ikas/storefront-models": "^6.1.0-beta.368",
|
|
69
|
+
"@ikas/storefront-providers": "^6.1.0-beta.368",
|
|
70
70
|
"mobx": "^6.1.3",
|
|
71
71
|
"mobx-react-lite": "^3.1.5",
|
|
72
72
|
"next": "12.2.0",
|