@ikas/storefront 2.0.64 → 2.0.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 e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/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 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/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as r}from'../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import"../models/data/blog/index.js";import{IkasBrand as i}from"../models/data/brand/index.js";import{IkasCategory as s}from"../models/data/category/index.js";import{IkasCheckout as a}from"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import{IkasProductDetail as c}from"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{FacebookPixel as n}from"./facebookPixel.js";import{GoogleTagManager as d}from"./googleTagManager.js";import{IkasCart as u}from"../models/data/cart/index.js";import{IkasEventType as m}from"./events.js";import{IkasStorefrontConfig as l}from"../storefront/index.js";import p from'../ext/lodash/cloneDeep.js';import{tryForEach as b}from"../utils/helper.js";import"../utils/i18n.js";import f from"./ikas.js";import{GoogleAnalytics as h}from"./googleAnalytics.js";import{GoogleUniversal as g}from"./googleUniversal.js";import{TiktokPixel as v}from"./tiktokPixel.js";var j=function(){function j(){o(this)}return j.getCustomerInfo=function(){return t(this,void 0,void 0,(function(){var t,o;return e(this,(function(e){switch(e.label){case 0:return[4,(t=l.store).customerStore.waitUntilInitialized()];case 1:return e.sent(),(o=t.customerStore.customer)?[2,r(r({},o.basicInfo),{consentGranted:t.customerStore.customerConsentGranted})]:[2,null]}}))}))},j.pageView=function(r){return t(this,void 0,void 0,(function(){var t,o,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=window.location.href,[4,j.getCustomerInfo()];case 1:return o=e.sent(),d.pageView(t),g.pageView(window.location.pathname),f.pageView(r),b(j.subscribers,(function(e){e.callback({type:m.PAGE_VIEW,data:{url:t,pageType:r,customer:o}})})),[3,3];case 2:return i=e.sent(),console.error(i),[3,3];case 3:return[2]}}))}))},j.productView=function(t){try{if(n.productView(t),d.productView(t),f.productView(t),h.productView(t),g.productView(t),v.productView(t),j.subscribers.length){var e=p(t),r=new c(e.product,e.selectedVariantValues);b(j.subscribers,(function(t){t.callback({type:m.PRODUCT_VIEW,data:{productDetail:r}})}))}}catch(t){console.error(t)}},j.addToCart=function(t,e,r,o){try{if(n.addToCart(t,e,r),d.addToCart(t,e),f.addToCart(t,e,o),h.addToCart(t,e),g.addToCart(t,e),v.addToCart(t,e),j.subscribers.length){var i=p(t),s=new u(p(o));b(j.subscribers,(function(t){t.callback({type:m.ADD_TO_CART,data:{item:i,quantity:e,cart:s}})}))}}catch(t){console.error(t)}},j.removeFromCart=function(t,e,r){try{if(d.removeFromCart(t,e),h.removeFromCart(t,e),g.removeFromCart(t,e),j.subscribers.length){var o=p(t),i=new u(p(r));b(j.subscribers,(function(t){t.callback({type:m.REMOVE_FROM_CART,data:{item:o,quantity:e,cart:i}})}))}}catch(t){console.error(t)}},j.beginCheckout=function(t){try{var e=localStorage.getItem("gtmBeginCheckout");if(e&&t.id===e)return;if(localStorage.setItem("gtmBeginCheckout",t.id),n.beginCheckout(t),d.beginCheckout(t),f.beginCheckout(t),h.beginCheckout(t),v.beginCheckout(),j.subscribers.length){var r=new a(p(t));b(j.subscribers,(function(t){t.callback({type:m.BEGIN_CHECKOUT,data:{checkout:r}})}))}}catch(t){console.error(t)}},j.purchase=function(t,e){try{if(localStorage.removeItem("gtmBeginCheckout"),n.purchase(t,t.orderNumber||""),d.purchase(t,t.orderNumber||""),f.orderSuccess(t),h.purchase(t,t.orderNumber||""),g.purchase(t,t.orderNumber||""),v.purchase(t),j.subscribers.length){var r=new a(p(t)),o=p(e);b(j.subscribers,(function(t){t.callback({type:m.COMPLETE_CHECKOUT,data:{checkout:r,transaction:o}})}))}}catch(t){console.error(t)}},j.checkoutStep=function(t,e){try{if(d.checkoutStep(t,e),f.checkoutStep(t,e),h.checkoutStep(t,e),j.subscribers.length){var r=new a(p(t));b(j.subscribers,(function(t){t.callback({type:m.CHECKOUT_STEP,data:{checkout:r,step:e}})}))}}catch(t){console.error(t)}},j.disableHTML=function(){try{d.disableHTML()}catch(t){console.error(t)}},j.addToWishlist=function(t){try{n.addToWishlist(t),v.addToWishlist(t),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.ADD_TO_WISHLIST,data:{productId:t}})}))}catch(t){console.error(t)}},j.search=function(t){try{n.search(t),d.search(t),v.search(t),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.SEARCH,data:{searchKeyword:t}})}))}catch(t){console.error(t)}},j.completeRegistration=function(t){try{n.completeRegistration(),d.completeRegistration(),v.completeRegistration(),f.customerRegister(),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.CUSTOMER_REGISTER,data:{email:t.email,firstName:t.firstName,lastName:t.lastName}})}))}catch(t){console.error(t)}},j.createEmailSubscripition=function(t){try{j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.EMAIL_SUBSCRIPTION,data:{email:t}})}))}catch(t){console.error(t)}},j.customerLogin=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,j.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(d.customerLogin(t.email),f.customerLogin(),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.CUSTOMER_LOGIN,data:{customer:t}})})),[3,3]):[2];case 2:return r=e.sent(),console.error(r),[3,3];case 3:return[2]}}))}))},j.customerLogout=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){try{j.subscribers.length&&b(j.subscribers,(function(t){t.callback({type:m.CUSTOMER_LOGOUT,data:{}})}))}catch(t){console.error(t)}return[2]}))}))},j.customerVisit=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,j.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(d.customerVisit(t.email),f.customerVisit(),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.CUSTOMER_VISIT,data:{customer:t}})})),[3,3]):[2];case 2:return r=e.sent(),console.error(r),[3,3];case 3:return[2]}}))}))},j.viewCart=function(t){try{if(t&&(n.viewCart(t),f.viewCart(t),h.viewCart(t),j.subscribers.length)){var e=new u(p(t));b(j.subscribers,(function(t){t.callback({type:m.VIEW_CART,data:{cart:e}})}))}}catch(t){console.error(t)}},j.viewCategory=function(t,e){try{if(n.viewCategory(t),d.viewCategory(e,t),f.viewCategory(e),v.viewCategory(e),j.subscribers.length){var r=new s(p(e));b(j.subscribers,(function(e){e.callback({type:m.VIEW_CATEGORY,data:{categoryPath:t,category:r}})}))}}catch(t){console.error(t)}},j.viewBrand=function(t){try{if(f.viewBrand(t),j.subscribers.length){var e=new i(p(t));b(j.subscribers,(function(t){t.callback({type:m.VIEW_BRAND,data:{brand:e}})}))}}catch(t){console.error(t)}},j.viewSearchResults=function(t,e){try{if(j.subscribers.length){var r=p(e).map((function(t){return new c(t.product,t.selectedVariantValues)}));b(j.subscribers,(function(e){e.callback({type:m.VIEW_SEARCH_RESULTS,data:{searchKeyword:t,productDetails:r}})}))}}catch(t){console.error(t)}},j.viewListing=function(t){try{if(j.subscribers.length){var e=p(t).map((function(t){return new c(t.product,t.selectedVariantValues)}));b(j.subscribers,(function(t){t.callback({type:m.VIEW_LISTING,data:{productDetails:e}})}))}}catch(t){console.error(t)}},j.contactForm=function(t){try{if(n.contactForm(),v.contactForm(),j.subscribers.length){var e=p(t);b(j.subscribers,(function(t){t.callback({type:m.CONTACT_FORM,data:{form:e}})}))}}catch(t){console.error(t)}},j.subscribers=[],j}();export{j as Analytics};
1
+ import{__awaiter as t,__generator as e,__assign as r}from'../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import"../models/data/blog/index.js";import{IkasBrand as i}from"../models/data/brand/index.js";import{IkasCategory as s}from"../models/data/category/index.js";import{IkasCheckout as a}from"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import{IkasProductDetail as c}from"../models/ui/product-detail/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/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"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{FacebookPixel as n}from"./facebookPixel.js";import{GoogleTagManager as d}from"./googleTagManager.js";import{IkasCart as u}from"../models/data/cart/index.js";import{IkasEventType as m}from"./events.js";import{IkasStorefrontConfig as l}from"../storefront/index.js";import p from'../ext/lodash/cloneDeep.js';import{tryForEach as b}from"../utils/helper.js";import"../utils/i18n.js";import f from"./ikas.js";import{GoogleAnalytics as h}from"./googleAnalytics.js";import{GoogleUniversal as g}from"./googleUniversal.js";import{TiktokPixel as v}from"./tiktokPixel.js";var j=function(){function j(){o(this)}return j.getCustomerInfo=function(){return t(this,void 0,void 0,(function(){var t,o;return e(this,(function(e){switch(e.label){case 0:return[4,(t=l.store).customerStore.waitUntilInitialized()];case 1:return e.sent(),(o=t.customerStore.customer)?[2,r(r({},o.basicInfo),{consentGranted:t.customerStore.customerConsentGranted})]:[2,null]}}))}))},j.pageView=function(r){return t(this,void 0,void 0,(function(){var t,o,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=window.location.href,[4,j.getCustomerInfo()];case 1:return o=e.sent(),d.pageView(t),g.pageView(window.location.pathname),f.pageView(r),b(j.subscribers,(function(e){e.callback({type:m.PAGE_VIEW,data:{url:t,pageType:r,customer:o}})})),[3,3];case 2:return i=e.sent(),console.error(i),[3,3];case 3:return[2]}}))}))},j.productView=function(t){try{if(n.productView(t),d.productView(t),f.productView(t),h.productView(t),g.productView(t),v.productView(t),j.subscribers.length){var e=p(t),r=new c(e.product,e.selectedVariantValues);b(j.subscribers,(function(t){t.callback({type:m.PRODUCT_VIEW,data:{productDetail:r}})}))}}catch(t){console.error(t)}},j.addToCart=function(t,e,r,o){try{if(n.addToCart(t,e,r),d.addToCart(t,e),f.addToCart(t,e,o),h.addToCart(t,e),g.addToCart(t,e),v.addToCart(t,e),j.subscribers.length){var i=p(t),s=new u(p(o));b(j.subscribers,(function(t){t.callback({type:m.ADD_TO_CART,data:{item:i,quantity:e,cart:s}})}))}}catch(t){console.error(t)}},j.removeFromCart=function(t,e,r){try{if(d.removeFromCart(t,e),h.removeFromCart(t,e),g.removeFromCart(t,e),j.subscribers.length){var o=p(t),i=new u(p(r));b(j.subscribers,(function(t){t.callback({type:m.REMOVE_FROM_CART,data:{item:o,quantity:e,cart:i}})}))}}catch(t){console.error(t)}},j.beginCheckout=function(t){try{var e=localStorage.getItem("gtmBeginCheckout");if(e&&t.id===e)return;if(localStorage.setItem("gtmBeginCheckout",t.id),n.beginCheckout(t),d.beginCheckout(t),f.beginCheckout(t),h.beginCheckout(t),v.beginCheckout(),j.subscribers.length){var r=new a(p(t));b(j.subscribers,(function(t){t.callback({type:m.BEGIN_CHECKOUT,data:{checkout:r}})}))}}catch(t){console.error(t)}},j.purchase=function(t,e){try{if(localStorage.removeItem("gtmBeginCheckout"),n.purchase(t,e.id||""),d.purchase(t,t.orderNumber||""),f.orderSuccess(t),h.purchase(t,t.orderNumber||""),g.purchase(t,t.orderNumber||""),v.purchase(t),j.subscribers.length){var r=new a(p(t)),o=p(e);b(j.subscribers,(function(t){t.callback({type:m.COMPLETE_CHECKOUT,data:{checkout:r,transaction:o}})}))}}catch(t){console.error(t)}},j.checkoutStep=function(t,e){try{if(d.checkoutStep(t,e),f.checkoutStep(t,e),h.checkoutStep(t,e),j.subscribers.length){var r=new a(p(t));b(j.subscribers,(function(t){t.callback({type:m.CHECKOUT_STEP,data:{checkout:r,step:e}})}))}}catch(t){console.error(t)}},j.disableHTML=function(){try{d.disableHTML()}catch(t){console.error(t)}},j.addToWishlist=function(t){try{n.addToWishlist(t),v.addToWishlist(t),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.ADD_TO_WISHLIST,data:{productId:t}})}))}catch(t){console.error(t)}},j.search=function(t){try{n.search(t),d.search(t),v.search(t),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.SEARCH,data:{searchKeyword:t}})}))}catch(t){console.error(t)}},j.completeRegistration=function(t){try{n.completeRegistration(),d.completeRegistration(),v.completeRegistration(),f.customerRegister(),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.CUSTOMER_REGISTER,data:{email:t.email,firstName:t.firstName,lastName:t.lastName}})}))}catch(t){console.error(t)}},j.createEmailSubscripition=function(t){try{j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.EMAIL_SUBSCRIPTION,data:{email:t}})}))}catch(t){console.error(t)}},j.customerLogin=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,j.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(d.customerLogin(t.email),f.customerLogin(),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.CUSTOMER_LOGIN,data:{customer:t}})})),[3,3]):[2];case 2:return r=e.sent(),console.error(r),[3,3];case 3:return[2]}}))}))},j.customerLogout=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){try{j.subscribers.length&&b(j.subscribers,(function(t){t.callback({type:m.CUSTOMER_LOGOUT,data:{}})}))}catch(t){console.error(t)}return[2]}))}))},j.customerVisit=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,j.getCustomerInfo()];case 1:return(t=e.sent())&&t.email?(d.customerVisit(t.email),f.customerVisit(),j.subscribers.length&&b(j.subscribers,(function(e){e.callback({type:m.CUSTOMER_VISIT,data:{customer:t}})})),[3,3]):[2];case 2:return r=e.sent(),console.error(r),[3,3];case 3:return[2]}}))}))},j.viewCart=function(t){try{if(t&&(n.viewCart(t),f.viewCart(t),h.viewCart(t),j.subscribers.length)){var e=new u(p(t));b(j.subscribers,(function(t){t.callback({type:m.VIEW_CART,data:{cart:e}})}))}}catch(t){console.error(t)}},j.viewCategory=function(t,e){try{if(n.viewCategory(t),d.viewCategory(e,t),f.viewCategory(e),v.viewCategory(e),j.subscribers.length){var r=new s(p(e));b(j.subscribers,(function(e){e.callback({type:m.VIEW_CATEGORY,data:{categoryPath:t,category:r}})}))}}catch(t){console.error(t)}},j.viewBrand=function(t){try{if(f.viewBrand(t),j.subscribers.length){var e=new i(p(t));b(j.subscribers,(function(t){t.callback({type:m.VIEW_BRAND,data:{brand:e}})}))}}catch(t){console.error(t)}},j.viewSearchResults=function(t,e){try{if(j.subscribers.length){var r=p(e).map((function(t){return new c(t.product,t.selectedVariantValues)}));b(j.subscribers,(function(e){e.callback({type:m.VIEW_SEARCH_RESULTS,data:{searchKeyword:t,productDetails:r}})}))}}catch(t){console.error(t)}},j.viewListing=function(t){try{if(j.subscribers.length){var e=p(t).map((function(t){return new c(t.product,t.selectedVariantValues)}));b(j.subscribers,(function(t){t.callback({type:m.VIEW_LISTING,data:{productDetails:e}})}))}}catch(t){console.error(t)}},j.contactForm=function(t){try{if(n.contactForm(),v.contactForm(),j.subscribers.length){var e=p(t);b(j.subscribers,(function(t){t.callback({type:m.CONTACT_FORM,data:{form:e}})}))}}catch(t){console.error(t)}},j.subscribers=[],j}();export{j as Analytics};