@ikas/bp-storefront 0.53.0 → 0.55.0

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"../packages/storefront-config/src/index.js";import'./../ext/mobx/dist/mobx.esm.js';import'./../ext/lodash/sortBy.js';import"../router/index.js";import"../stores/cart/index.js";import"../stores/customer/index.js";import"../packages/storefront-api-client/src/utils/api.js";import'./../ext/isomorphic-fetch/fetch-npm-node.js';import"../stores/base/index.js";import"../i18n/index.js";import'./../ext/animejs/lib/anime.esm.js';import"../packages/storefront-api/src/index.js";import"../theme/styles/index.js";import"../utils/fetch.js";import"../packages/storefront-models/src/models/merchant-settings/index.js";import'./../ext/uuid/dist/esm-browser/stringify.js';import'./../ext/uuid/dist/esm-browser/v3.js';import'./../ext/uuid/dist/esm-browser/native.js';import'./../ext/uuid/dist/esm-browser/v5.js';import"../functions/models/product-list/index.js";var s=function(){function s(){}return s.subscribers=[],s}();export{s as Analytics};
1
+ import"../packages/storefront-config/src/index.js";import'./../ext/mobx/dist/mobx.esm.js';import'./../ext/lodash/sortBy.js';import"../router/index.js";import"../stores/cart/index.js";import"../stores/customer/index.js";import"../packages/storefront-api-client/src/utils/api.js";import'./../ext/isomorphic-fetch/fetch-npm-node.js';import"../stores/base/index.js";import"../i18n/index.js";import'./../ext/animejs/lib/anime.esm.js';import"../packages/storefront-api/src/index.js";import"../theme/styles/index.js";import'./../ext/preact/dist/preact.mjs.js';import'./../ext/preact/hooks/dist/hooks.mjs.js';import"../utils/fetch.js";import"../packages/storefront-models/src/models/merchant-settings/index.js";import'./../ext/uuid/dist/esm-browser/stringify.js';import'./../ext/uuid/dist/esm-browser/v3.js';import'./../ext/uuid/dist/esm-browser/native.js';import'./../ext/uuid/dist/esm-browser/v5.js';import"../functions/models/product-list/index.js";var s=function(){function s(){}return s.subscribers=[],s}();export{s as Analytics};
@@ -1 +1 @@
1
- import{getProductHref as e}from"../../functions/models/product/index.js";import"../../packages/storefront-config/src/index.js";import'./../../ext/mobx/dist/mobx.esm.js';import"../../router/index.js";import"../../stores/cart/index.js";import"../../stores/customer/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../i18n/index.js";import"../../functions/models/product-list/index.js";import"../../stores/base/index.js";import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";import{extractProductData as s}from"../utils.js";import{dataLayer as o,formatGTMItem as i}from"./utils.js";function t(t){if(o())try{var r=s(t),m={event:"view_item-GTM",ecommerce:{items:[i(r)],extraParams:{parent_id:t.id,currency:r.currency,url:"https://".concat(window.location.hostname).concat(e(t)),item_image:r.image||"",barcode:r.barcode||"",sellPrice:r.sellPrice,discountPrice:r.discountPrice}}};return window.dataLayer.push(m),m}catch(e){console.error(e)}}export{t as gtm_productView};
1
+ import{getProductHref as s}from"../../functions/models/product/index.js";import"../../packages/storefront-config/src/index.js";import'./../../ext/mobx/dist/mobx.esm.js';import"../../router/index.js";import"../../stores/cart/index.js";import"../../stores/customer/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../i18n/index.js";import"../../functions/models/product-list/index.js";import"../../stores/base/index.js";import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import'./../../ext/preact/dist/preact.mjs.js';import'./../../ext/preact/hooks/dist/hooks.mjs.js';import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";import{extractProductData as e}from"../utils.js";import{dataLayer as o,formatGTMItem as t}from"./utils.js";function i(i){if(o())try{var r=e(i),m={event:"view_item-GTM",ecommerce:{items:[t(r)],extraParams:{parent_id:i.id,currency:r.currency,url:"https://".concat(window.location.hostname).concat(s(i)),item_image:r.image||"",barcode:r.barcode||"",sellPrice:r.sellPrice,discountPrice:r.discountPrice}}};return window.dataLayer.push(m),m}catch(s){console.error(s)}}export{i as gtm_productView};
@@ -1 +1 @@
1
- import"../../packages/storefront-config/src/index.js";import'./../../ext/lodash/sortBy.js';import"../../router/index.js";import"../../stores/cart/index.js";import"../../stores/customer/index.js";import'./../../ext/mobx/dist/mobx.esm.js';import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../stores/base/index.js";import"../../i18n/index.js";import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";import{getIkasCategoryHref as e}from"../../functions/models/category/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../functions/models/product-list/index.js";import{dataLayer as s}from"./utils.js";function o(o,t){if(s())try{var i={event:"view_category-GTM",ecommerce:{category:[{id:o.id,name:o.name,metaData:o.metaData,href:e(o),image:o.image,path:t}]}};return window.dataLayer.push(i),i}catch(e){console.error(e)}}export{o as gtm_viewCategory};
1
+ import"../../packages/storefront-config/src/index.js";import'./../../ext/lodash/sortBy.js';import"../../router/index.js";import"../../stores/cart/index.js";import"../../stores/customer/index.js";import'./../../ext/mobx/dist/mobx.esm.js';import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../stores/base/index.js";import"../../i18n/index.js";import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import'./../../ext/preact/dist/preact.mjs.js';import'./../../ext/preact/hooks/dist/hooks.mjs.js';import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";import{getIkasCategoryHref as s}from"../../functions/models/category/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../functions/models/product-list/index.js";import{dataLayer as e}from"./utils.js";function o(o,t){if(e())try{var i={event:"view_category-GTM",ecommerce:{category:[{id:o.id,name:o.name,metaData:o.metaData,href:s(o),image:o.image,path:t}]}};return window.dataLayer.push(i),i}catch(s){console.error(s)}}export{o as gtm_viewCategory};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as n}from'./../../ext/tslib/tslib.es6.mjs.js';import{IkasStorefrontConfig as r}from"../../packages/storefront-config/src/index.js";import{getSelectedProductVariant as i}from"../../functions/models/product/index.js";import{getCookieValue as s}from"../../utils/helper.js";import"../../router/index.js";import"../../stores/cart/index.js";import{getCategoryPath as o}from"../../functions/models/category/index.js";import{customerStore as c}from"../../stores/customer/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../i18n/index.js";import"../../functions/models/product-list/index.js";import{getProductVariantPrice as u,getProductVariantFinalPrice as a}from"../../functions/models/product/variant/index.js";import{baseStore as d}from"../../stores/base/index.js";import{waitForCustomerStoreInit as l}from"../../functions/stores/customer/index.js";import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";var E,O;!function(t){t[t.SESSION_START=1]="SESSION_START",t[t.PAGE_VIEW=2]="PAGE_VIEW",t[t.PRODUCT_VIEW=3]="PRODUCT_VIEW",t[t.ADD_TO_CART=4]="ADD_TO_CART",t[t.VIEW_CART=5]="VIEW_CART",t[t.ORDER_SUCCESS=6]="ORDER_SUCCESS",t[t.BEGIN_CHECKOUT=7]="BEGIN_CHECKOUT",t[t.CHECKOUT_STEP=8]="CHECKOUT_STEP",t[t.CUSTOMER_REGISTER=9]="CUSTOMER_REGISTER",t[t.CUSTOMER_VISIT=10]="CUSTOMER_VISIT",t[t.CUSTOMER_LOGIN=11]="CUSTOMER_LOGIN",t[t.BRAND_VIEW=12]="BRAND_VIEW",t[t.CATEGORY_VIEW=13]="CATEGORY_VIEW",t[t.POPUP_VIEW=14]="POPUP_VIEW",t[t.SEARCH=15]="SEARCH",t[t.FAVORITE_PRODUCT=16]="FAVORITE_PRODUCT",t[t.CONTACT_FORM=17]="CONTACT_FORM",t[t.CONTACT_FORM_BACKEND=205]="CONTACT_FORM_BACKEND"}(E||(E={})),function(t){t[t.INDEX=1]="INDEX",t[t.CATEGORY=2]="CATEGORY",t[t.BRAND=3]="BRAND",t[t.PRODUCT=4]="PRODUCT",t[t.CUSTOM=5]="CUSTOM",t[t.ACCOUNT=6]="ACCOUNT",t[t.ADDRESSES=7]="ADDRESSES",t[t.ORDERS=8]="ORDERS",t[t.ORDER_DETAIL=9]="ORDER_DETAIL",t[t.LOGIN=10]="LOGIN",t[t.REGISTER=11]="REGISTER",t[t.FORGOT_PASSWORD=12]="FORGOT_PASSWORD",t[t.RECOVER_PASSWORD=13]="RECOVER_PASSWORD",t[t.CART=14]="CART",t[t.FAVORITE_PRODUCTS=15]="FAVORITE_PRODUCTS",t[t.SEARCH=16]="SEARCH",t[t.NOT_FOUND=17]="NOT_FOUND",t[t.BLOG=18]="BLOG",t[t.BLOG_INDEX=19]="BLOG_INDEX",t[t.BLOG_CATEGORY=20]="BLOG_CATEGORY",t[t.CHECKOUT=21]="CHECKOUT"}(O||(O={}));var R=import.meta.env.VITE_PUBLIC_ANALYTICS_URL?"".concat(import.meta.env.VITE_PUBLIC_ANALYTICS_URL,"/sendEventV2"):"https://0.myikas.com/sendEventV2",f=function(){function t(){}return t.SESSION_ID_KEY="ikas_session_id",t.VISITOR_ID_KEY="ikas_visitor_id",t.JOURNEY_ID_KEY="ikas_journey_id",t.EXPIRY_LENGTH=18e5,t}();function _(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.PAGE_VIEW,ts:Date.now(),d:n(n({},F()),{pt:B(r)})}])];case 1:return t.sent(),[2]}})})}function T(r,s){return t(this,void 0,void 0,function(){var t,c,d;return e(this,function(e){switch(e.label){case 0:return t=r.categories&&r.categories.length>0?o(r.categories[0]).map(function(t){return t.name}):[],c=i(r),d=u(c),[4,M([{id:s,t:E.PRODUCT_VIEW,ts:Date.now(),d:n(n({},F()),{d:{pr:n({id:r.id,vid:c.id,cp:t,n:r.name,pr:a(c)},(null==d?void 0:d.currency)?{c:null==d?void 0:d.currency}:{})}})}])];case 1:return e.sent(),[2]}})})}function I(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:s,t:E.ADD_TO_CART,ts:Date.now(),d:n(n({},F()),{d:{crt:{id:i.id,c:i.currencyCode,pr:i.totalFinalPrice,il:K(i)},crtItm:H(r)}})}])];case 1:return t.sent(),[2]}})})}function C(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.VIEW_CART,ts:Date.now(),d:n(n({},F()),{d:{crt:{id:r.id,c:r.currencyCode,pr:r.totalFinalPrice,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function v(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.ORDER_SUCCESS,ts:Date.now(),d:n(n({},F()),{d:{chk:{id:r.id,s:"success",p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[4,y()];case 2:return t.sent(),[2]}})})}function S(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.BEGIN_CHECKOUT,ts:Date.now(),d:n(n({},F()),{d:{chk:{id:r.id,p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function m(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CHECKOUT_STEP,ts:Date.now(),d:n(n({},F()),{d:{chk:{id:r.id,s:i,p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function h(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:r,t:E.CUSTOMER_REGISTER,ts:Date.now(),d:n(n({},F()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function D(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CUSTOMER_LOGIN,ts:Date.now(),d:n(n({},F()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function p(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CUSTOMER_VISIT,ts:Date.now(),d:n(n({},F()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function A(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.BRAND_VIEW,ts:Date.now(),d:n(n({},F()),{d:{cst:W(),br:{id:r.id}}})}])];case 1:return t.sent(),[2]}})})}function N(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:s,t:E.CATEGORY_VIEW,ts:Date.now(),d:n(n({},F()),{d:{cst:W(),ctg:{id:r.id,cp:i}}})}])];case 1:return t.sent(),[2]}})})}function U(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.POPUP_VIEW,ts:Date.now(),d:n(n({},F()),{d:{cst:W()},m:{sfpid:r}})}])];case 1:return t.sent(),[2]}})})}function P(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.SEARCH,ts:Date.now(),d:n(n({},F()),{d:{src:n({s:r},s?{r:s}:{})}})}])];case 1:return t.sent(),[2]}})})}function w(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:r,t:E.CONTACT_FORM,ts:Date.now(),d:n({},F())}])];case 1:return t.sent(),[2]}})})}function x(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.FAVORITE_PRODUCT,ts:Date.now(),d:n(n({},F()),{d:{pr:{id:r}}})}])];case 1:return t.sent(),[2]}})})}function G(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return localStorage.removeItem(f.JOURNEY_ID_KEY),f.journeyId=void 0,[4,b()];case 1:return t.sent(),[2]}})})}function b(){return t(this,void 0,void 0,function(){var t,n;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(f.JOURNEY_ID_KEY))?(f.journeyId=t,[3,3]):[3,1];case 1:return[4,j()];case 2:e.sent(),e.label=3;case 3:return r.init({journeyId:f.journeyId||""}),[3,5];case 4:return n=e.sent(),console.error(n),[3,5];case 5:return[2]}})})}function V(){return t(this,void 0,void 0,function(){return e(this,function(t){return[2,"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})]})})}function y(){return t(this,void 0,void 0,function(){var t,n,r;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),r={},[4,V()];case 1:return r.id=e.sent(),r.expiry=Date.now()+f.EXPIRY_LENGTH,t=r,localStorage.setItem(f.SESSION_ID_KEY,JSON.stringify(t)),f.sessionId=t.id,[4,L()];case 2:return e.sent(),[3,4];case 3:return n=e.sent(),console.error(n),[3,4];case 4:return[2]}})})}function j(){return t(this,void 0,void 0,function(){var t;return e(this,function(e){switch(e.label){case 0:return[4,V()];case 1:return t=e.sent(),localStorage.setItem(f.JOURNEY_ID_KEY,t),f.journeyId=t,[2]}})})}function g(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,7,,8]),(t=localStorage.getItem(f.SESSION_ID_KEY))?(n=JSON.parse(t)).expiry<Date.now()||n.id.length<=13?[4,y()]:[3,2]:[3,4];case 1:return e.sent(),[3,3];case 2:f.sessionId=n.id,e.label=3;case 3:return[3,6];case 4:return[4,y()];case 5:e.sent(),e.label=6;case 6:return r.init({sessionId:f.sessionId||""}),[3,8];case 7:return i=e.sent(),console.error(i),[3,8];case 8:return[2]}})})}function L(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.SESSION_START,ts:Date.now(),d:n({},F())}])];case 1:return t.sent(),[2]}})})}function Y(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(f.VISITOR_ID_KEY))&&t.length>13?(f.visitorId=t,[3,3]):[3,1];case 1:return n=f,[4,V()];case 2:n.visitorId=e.sent(),localStorage.setItem(f.VISITOR_ID_KEY,f.visitorId),e.label=3;case 3:return r.init({visitorId:f.visitorId}),[3,5];case 4:return i=e.sent(),console.error(i),[3,5];case 5:return[2]}})})}function B(t){switch(t){case"INDEX":return O.INDEX;case"CATEGORY":return O.CATEGORY;case"BRAND":return O.BRAND;case"PRODUCT":return O.PRODUCT;case"CUSTOM":return O.CUSTOM;case"ACCOUNT":return O.ACCOUNT;case"ADDRESSES":return O.ADDRESSES;case"ORDERS":return O.ORDERS;case"ORDER_DETAIL":return O.ORDER_DETAIL;case"LOGIN":return O.LOGIN;case"REGISTER":return O.REGISTER;case"FORGOT_PASSWORD":return O.FORGOT_PASSWORD;case"RECOVER_PASSWORD":return O.RECOVER_PASSWORD;case"CART":return O.CART;case"FAVORITE_PRODUCTS":return O.FAVORITE_PRODUCTS;case"SEARCH":return O.SEARCH;case"NOT_FOUND":return O.NOT_FOUND;case"BLOG":return O.BLOG;case"BLOG_INDEX":return O.BLOG_INDEX;case"BLOG_CATEGORY":return O.BLOG_CATEGORY;case"CHECKOUT":return O.CHECKOUT}}function W(){var t=c.customer;return{id:(null==t?void 0:t.id)||void 0,e:(null==t?void 0:t.email)||void 0,c:c._customerConsentGranted}}function F(){return{u:window.location.href,r:document.referrer,pt:d.currentPageType?B(d.currentPageType):void 0,m:{fbp:s("_fbp"),fbc:s("_fbc")}}}function K(t){return t.orderLineItems.map(function(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})})}function H(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})}function M(i){return t(this,void 0,void 0,function(){var t,s,o,u,a,d,E,O,_,T,I;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,6,,7]),[4,l(c)];case 1:return e.sent(),[4,g()];case 2:return e.sent(),[4,Y()];case 3:return e.sent(),[4,b()];case 4:return e.sent(),t={e:i,scid:r.salesChannelId,sfid:r.storefrontId,sid:f.sessionId,jid:f.journeyId,vid:f.visitorId,sfrid:r.storefrontRoutingId||"",ud:n(n(n(n({id:null===(o=c.customer)||void 0===o?void 0:o.id},(null===(u=c.customer)||void 0===u?void 0:u.email)?{em:null===(a=c.customer)||void 0===a?void 0:a.email}:{}),(null===(d=c.customer)||void 0===d?void 0:d.phone)?{ph:null===(E=c.customer)||void 0===E?void 0:E.phone}:{}),(null===(O=c.customer)||void 0===O?void 0:O.lastName)?{ln:null===(_=c.customer)||void 0===_?void 0:_.lastName}:{}),(null===(T=c.customer)||void 0===T?void 0:T.firstName)?{fn:null===(I=c.customer)||void 0===I?void 0:I.firstName}:{}),v:3},[4,fetch(R,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","x-api-key":r.apiKey}})];case 5:return e.sent(),[3,7];case 6:return s=e.sent(),console.error(s),[3,7];case 7:return[2]}})})}export{f as default,I as iks_addToCart,x as iks_addToWishlist,S as iks_beginCheckout,b as iks_checkJourneyId,m as iks_checkoutStep,w as iks_contactForm,D as iks_customerLogin,h as iks_customerRegister,p as iks_customerVisit,_ as iks_pageView,T as iks_productView,v as iks_purchase,G as iks_refreshJourneyId,P as iks_search,A as iks_viewBrand,C as iks_viewCart,N as iks_viewCategory,U as iks_viewPopup};
1
+ import{__awaiter as t,__generator as e,__assign as n}from'./../../ext/tslib/tslib.es6.mjs.js';import{IkasStorefrontConfig as r}from"../../packages/storefront-config/src/index.js";import{getSelectedProductVariant as i}from"../../functions/models/product/index.js";import{getCookieValue as s}from"../../utils/helper.js";import"../../router/index.js";import"../../stores/cart/index.js";import{getCategoryPath as o}from"../../functions/models/category/index.js";import{customerStore as c}from"../../stores/customer/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../i18n/index.js";import"../../functions/models/product-list/index.js";import{getProductVariantPrice as u,getProductVariantFinalPrice as a}from"../../functions/models/product/variant/index.js";import{baseStore as d}from"../../stores/base/index.js";import{waitForCustomerStoreInit as l}from"../../functions/stores/customer/index.js";import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import'./../../ext/preact/dist/preact.mjs.js';import'./../../ext/preact/hooks/dist/hooks.mjs.js';import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";var E,O;!function(t){t[t.SESSION_START=1]="SESSION_START",t[t.PAGE_VIEW=2]="PAGE_VIEW",t[t.PRODUCT_VIEW=3]="PRODUCT_VIEW",t[t.ADD_TO_CART=4]="ADD_TO_CART",t[t.VIEW_CART=5]="VIEW_CART",t[t.ORDER_SUCCESS=6]="ORDER_SUCCESS",t[t.BEGIN_CHECKOUT=7]="BEGIN_CHECKOUT",t[t.CHECKOUT_STEP=8]="CHECKOUT_STEP",t[t.CUSTOMER_REGISTER=9]="CUSTOMER_REGISTER",t[t.CUSTOMER_VISIT=10]="CUSTOMER_VISIT",t[t.CUSTOMER_LOGIN=11]="CUSTOMER_LOGIN",t[t.BRAND_VIEW=12]="BRAND_VIEW",t[t.CATEGORY_VIEW=13]="CATEGORY_VIEW",t[t.POPUP_VIEW=14]="POPUP_VIEW",t[t.SEARCH=15]="SEARCH",t[t.FAVORITE_PRODUCT=16]="FAVORITE_PRODUCT",t[t.CONTACT_FORM=17]="CONTACT_FORM",t[t.CONTACT_FORM_BACKEND=205]="CONTACT_FORM_BACKEND"}(E||(E={})),function(t){t[t.INDEX=1]="INDEX",t[t.CATEGORY=2]="CATEGORY",t[t.BRAND=3]="BRAND",t[t.PRODUCT=4]="PRODUCT",t[t.CUSTOM=5]="CUSTOM",t[t.ACCOUNT=6]="ACCOUNT",t[t.ADDRESSES=7]="ADDRESSES",t[t.ORDERS=8]="ORDERS",t[t.ORDER_DETAIL=9]="ORDER_DETAIL",t[t.LOGIN=10]="LOGIN",t[t.REGISTER=11]="REGISTER",t[t.FORGOT_PASSWORD=12]="FORGOT_PASSWORD",t[t.RECOVER_PASSWORD=13]="RECOVER_PASSWORD",t[t.CART=14]="CART",t[t.FAVORITE_PRODUCTS=15]="FAVORITE_PRODUCTS",t[t.SEARCH=16]="SEARCH",t[t.NOT_FOUND=17]="NOT_FOUND",t[t.BLOG=18]="BLOG",t[t.BLOG_INDEX=19]="BLOG_INDEX",t[t.BLOG_CATEGORY=20]="BLOG_CATEGORY",t[t.CHECKOUT=21]="CHECKOUT"}(O||(O={}));var R=import.meta.env.VITE_PUBLIC_ANALYTICS_URL?"".concat(import.meta.env.VITE_PUBLIC_ANALYTICS_URL,"/sendEventV2"):"https://0.myikas.com/sendEventV2",f=function(){function t(){}return t.SESSION_ID_KEY="ikas_session_id",t.VISITOR_ID_KEY="ikas_visitor_id",t.JOURNEY_ID_KEY="ikas_journey_id",t.EXPIRY_LENGTH=18e5,t}();function _(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.PAGE_VIEW,ts:Date.now(),d:n(n({},F()),{pt:B(r)})}])];case 1:return t.sent(),[2]}})})}function T(r,s){return t(this,void 0,void 0,function(){var t,c,d;return e(this,function(e){switch(e.label){case 0:return t=r.categories&&r.categories.length>0?o(r.categories[0]).map(function(t){return t.name}):[],c=i(r),d=u(c),[4,M([{id:s,t:E.PRODUCT_VIEW,ts:Date.now(),d:n(n({},F()),{d:{pr:n({id:r.id,vid:c.id,cp:t,n:r.name,pr:a(c)},(null==d?void 0:d.currency)?{c:null==d?void 0:d.currency}:{})}})}])];case 1:return e.sent(),[2]}})})}function I(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:s,t:E.ADD_TO_CART,ts:Date.now(),d:n(n({},F()),{d:{crt:{id:i.id,c:i.currencyCode,pr:i.totalFinalPrice,il:K(i)},crtItm:H(r)}})}])];case 1:return t.sent(),[2]}})})}function C(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.VIEW_CART,ts:Date.now(),d:n(n({},F()),{d:{crt:{id:r.id,c:r.currencyCode,pr:r.totalFinalPrice,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function v(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.ORDER_SUCCESS,ts:Date.now(),d:n(n({},F()),{d:{chk:{id:r.id,s:"success",p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[4,V()];case 2:return t.sent(),[2]}})})}function S(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.BEGIN_CHECKOUT,ts:Date.now(),d:n(n({},F()),{d:{chk:{id:r.id,p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function m(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CHECKOUT_STEP,ts:Date.now(),d:n(n({},F()),{d:{chk:{id:r.id,s:i,p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function h(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:r,t:E.CUSTOMER_REGISTER,ts:Date.now(),d:n(n({},F()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function D(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CUSTOMER_LOGIN,ts:Date.now(),d:n(n({},F()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function p(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CUSTOMER_VISIT,ts:Date.now(),d:n(n({},F()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function A(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.BRAND_VIEW,ts:Date.now(),d:n(n({},F()),{d:{cst:W(),br:{id:r.id}}})}])];case 1:return t.sent(),[2]}})})}function N(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:s,t:E.CATEGORY_VIEW,ts:Date.now(),d:n(n({},F()),{d:{cst:W(),ctg:{id:r.id,cp:i}}})}])];case 1:return t.sent(),[2]}})})}function U(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.POPUP_VIEW,ts:Date.now(),d:n(n({},F()),{d:{cst:W()},m:{sfpid:r}})}])];case 1:return t.sent(),[2]}})})}function P(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.SEARCH,ts:Date.now(),d:n(n({},F()),{d:{src:n({s:r},s?{r:s}:{})}})}])];case 1:return t.sent(),[2]}})})}function w(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:r,t:E.CONTACT_FORM,ts:Date.now(),d:n({},F())}])];case 1:return t.sent(),[2]}})})}function x(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.FAVORITE_PRODUCT,ts:Date.now(),d:n(n({},F()),{d:{pr:{id:r}}})}])];case 1:return t.sent(),[2]}})})}function G(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return localStorage.removeItem(f.JOURNEY_ID_KEY),f.journeyId=void 0,[4,b()];case 1:return t.sent(),[2]}})})}function b(){return t(this,void 0,void 0,function(){var t,n;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(f.JOURNEY_ID_KEY))?(f.journeyId=t,[3,3]):[3,1];case 1:return[4,y()];case 2:e.sent(),e.label=3;case 3:return r.init({journeyId:f.journeyId||""}),[3,5];case 4:return n=e.sent(),console.error(n),[3,5];case 5:return[2]}})})}function j(){return t(this,void 0,void 0,function(){return e(this,function(t){return[2,"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})]})})}function V(){return t(this,void 0,void 0,function(){var t,n,r;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),r={},[4,j()];case 1:return r.id=e.sent(),r.expiry=Date.now()+f.EXPIRY_LENGTH,t=r,localStorage.setItem(f.SESSION_ID_KEY,JSON.stringify(t)),f.sessionId=t.id,[4,L()];case 2:return e.sent(),[3,4];case 3:return n=e.sent(),console.error(n),[3,4];case 4:return[2]}})})}function y(){return t(this,void 0,void 0,function(){var t;return e(this,function(e){switch(e.label){case 0:return[4,j()];case 1:return t=e.sent(),localStorage.setItem(f.JOURNEY_ID_KEY,t),f.journeyId=t,[2]}})})}function g(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,7,,8]),(t=localStorage.getItem(f.SESSION_ID_KEY))?(n=JSON.parse(t)).expiry<Date.now()||n.id.length<=13?[4,V()]:[3,2]:[3,4];case 1:return e.sent(),[3,3];case 2:f.sessionId=n.id,e.label=3;case 3:return[3,6];case 4:return[4,V()];case 5:e.sent(),e.label=6;case 6:return r.init({sessionId:f.sessionId||""}),[3,8];case 7:return i=e.sent(),console.error(i),[3,8];case 8:return[2]}})})}function L(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.SESSION_START,ts:Date.now(),d:n({},F())}])];case 1:return t.sent(),[2]}})})}function Y(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(f.VISITOR_ID_KEY))&&t.length>13?(f.visitorId=t,[3,3]):[3,1];case 1:return n=f,[4,j()];case 2:n.visitorId=e.sent(),localStorage.setItem(f.VISITOR_ID_KEY,f.visitorId),e.label=3;case 3:return r.init({visitorId:f.visitorId}),[3,5];case 4:return i=e.sent(),console.error(i),[3,5];case 5:return[2]}})})}function B(t){switch(t){case"INDEX":return O.INDEX;case"CATEGORY":return O.CATEGORY;case"BRAND":return O.BRAND;case"PRODUCT":return O.PRODUCT;case"CUSTOM":return O.CUSTOM;case"ACCOUNT":return O.ACCOUNT;case"ADDRESSES":return O.ADDRESSES;case"ORDERS":return O.ORDERS;case"ORDER_DETAIL":return O.ORDER_DETAIL;case"LOGIN":return O.LOGIN;case"REGISTER":return O.REGISTER;case"FORGOT_PASSWORD":return O.FORGOT_PASSWORD;case"RECOVER_PASSWORD":return O.RECOVER_PASSWORD;case"CART":return O.CART;case"FAVORITE_PRODUCTS":return O.FAVORITE_PRODUCTS;case"SEARCH":return O.SEARCH;case"NOT_FOUND":return O.NOT_FOUND;case"BLOG":return O.BLOG;case"BLOG_INDEX":return O.BLOG_INDEX;case"BLOG_CATEGORY":return O.BLOG_CATEGORY;case"CHECKOUT":return O.CHECKOUT}}function W(){var t=c.customer;return{id:(null==t?void 0:t.id)||void 0,e:(null==t?void 0:t.email)||void 0,c:c._customerConsentGranted}}function F(){return{u:window.location.href,r:document.referrer,pt:d.currentPageType?B(d.currentPageType):void 0,m:{fbp:s("_fbp"),fbc:s("_fbc")}}}function K(t){return t.orderLineItems.map(function(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})})}function H(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})}function M(i){return t(this,void 0,void 0,function(){var t,s,o,u,a,d,E,O,_,T,I;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,6,,7]),[4,l(c)];case 1:return e.sent(),[4,g()];case 2:return e.sent(),[4,Y()];case 3:return e.sent(),[4,b()];case 4:return e.sent(),t={e:i,scid:r.salesChannelId,sfid:r.storefrontId,sid:f.sessionId,jid:f.journeyId,vid:f.visitorId,sfrid:r.storefrontRoutingId||"",ud:n(n(n(n({id:null===(o=c.customer)||void 0===o?void 0:o.id},(null===(u=c.customer)||void 0===u?void 0:u.email)?{em:null===(a=c.customer)||void 0===a?void 0:a.email}:{}),(null===(d=c.customer)||void 0===d?void 0:d.phone)?{ph:null===(E=c.customer)||void 0===E?void 0:E.phone}:{}),(null===(O=c.customer)||void 0===O?void 0:O.lastName)?{ln:null===(_=c.customer)||void 0===_?void 0:_.lastName}:{}),(null===(T=c.customer)||void 0===T?void 0:T.firstName)?{fn:null===(I=c.customer)||void 0===I?void 0:I.firstName}:{}),v:3},[4,fetch(R,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","x-api-key":r.apiKey}})];case 5:return e.sent(),[3,7];case 6:return s=e.sent(),console.error(s),[3,7];case 7:return[2]}})})}export{f as default,I as iks_addToCart,x as iks_addToWishlist,S as iks_beginCheckout,b as iks_checkJourneyId,m as iks_checkoutStep,w as iks_contactForm,D as iks_customerLogin,h as iks_customerRegister,p as iks_customerVisit,_ as iks_pageView,T as iks_productView,v as iks_purchase,G as iks_refreshJourneyId,P as iks_search,A as iks_viewBrand,C as iks_viewCart,N as iks_viewCategory,U as iks_viewPopup};
@@ -1 +1 @@
1
- import{IkasStorefrontConfig as i}from"../packages/storefront-config/src/index.js";import{getSelectedProductVariant as r}from"../functions/models/product/index.js";import{isServer as e}from"../utils/helper.js";import"../router/index.js";import"../stores/cart/index.js";import{getCategoryPath as n}from"../functions/models/category/index.js";import"../stores/customer/index.js";import'./../ext/uuid/dist/esm-browser/stringify.js';import'./../ext/uuid/dist/esm-browser/v3.js';import'./../ext/uuid/dist/esm-browser/native.js';import'./../ext/uuid/dist/esm-browser/v5.js';import"../i18n/index.js";import{getDefaultSrc as t}from"../functions/models/image/index.js";import"../functions/models/product-list/index.js";import{getProductVariantMainImage as o,getProductVariantPrice as a,getProductVariantFinalPrice as s,getProductVariantSellPrice as d,getProductVariantDiscountPrice as u}from"../functions/models/product/variant/index.js";import"../stores/base/index.js";import"../packages/storefront-api-client/src/utils/api.js";import'./../ext/isomorphic-fetch/fetch-npm-node.js';import'./../ext/mobx/dist/mobx.esm.js';import"./analytics.js";import'./../ext/animejs/lib/anime.esm.js';import"../packages/storefront-api/src/index.js";import"../theme/styles/index.js";import"../utils/fetch.js";import"../packages/storefront-models/src/models/merchant-settings/index.js";var m=function(){return!e()&&!i.isEditor},c=function(){return m()&&!!i.fbpId&&!!window.fbq},l=function(){return m()&&!!window.gtag},p=function(){return m()&&!!window.dataLayer},v=function(){return m()&&!!i.tiktokPixelId&&!!window.ttq};function f(i,e){var m,c,l,p,v=r(i),f=i.categories.length>0?n(i.categories[0]).map(function(i){return i.name}):[],g=null===(m=o(v))||void 0===m?void 0:m.image,j=a(v);return{id:i.id,variantId:v.id,name:i.name,price:null!==(c=s(v))&&void 0!==c?c:0,currency:(null==j?void 0:j.currency)||"TRY",categoryPath:f,categoryString:f.join(" > "),brand:(null===(l=i.brand)||void 0===l?void 0:l.name)||"",variant:v.variantValues.map(function(i){return i.name}).join(" / "),barcode:null===(p=v.barcodeList)||void 0===p?void 0:p[0],image:g?t(g):"",sellPrice:d(v)||void 0,discountPrice:u(v)}}function g(i,r,e){var n,t,o,a,s,d=[];if(null===(n=null==e?void 0:e.categories)||void 0===n?void 0:n.length)(u=e.categories[0]).categoryPath&&u.categoryPath.forEach(function(i){return d.push(i)}),d.push(u.name);else if(null===(t=i.variant.categories)||void 0===t?void 0:t.length){var u;(u=i.variant.categories[0]).categoryPath&&u.categoryPath.forEach(function(i){return d.push(i.name)}),d.push(u.name)}return{id:i.variant.productId||"",variantId:i.variant.id||"",name:i.variant.name,price:i.finalPrice||0,quantity:null!=r?r:i.quantity,currency:i.currencyCode||"",categoryPath:d,categoryString:d.join(" > "),brand:(null===(o=null==e?void 0:e.brand)||void 0===o?void 0:o.name)||(null===(a=i.variant.brand)||void 0===a?void 0:a.name)||"",variant:(null===(s=i.variant.variantValues)||void 0===s?void 0:s.map(function(i){return i.variantValueName}).join(" / "))||""}}function j(i){var r;return{items:i.orderLineItems.map(function(i){return g(i)}),totalPrice:"totalFinalPrice"in i?i.totalFinalPrice:i.totalPrice,currency:i.currencyCode||(null===(r=i.orderLineItems[0])||void 0===r?void 0:r.currencyCode)||"TRY",itemCount:i.orderLineItems.length}}export{m as canTrack,j as extractCartData,g as extractCartItemData,f as extractProductData,c as hasFacebookPixel,l as hasGoogleAnalytics,p as hasGoogleTagManager,v as hasTiktokPixel};
1
+ import{IkasStorefrontConfig as i}from"../packages/storefront-config/src/index.js";import{getSelectedProductVariant as e}from"../functions/models/product/index.js";import{isServer as r}from"../utils/helper.js";import"../router/index.js";import"../stores/cart/index.js";import{getCategoryPath as t}from"../functions/models/category/index.js";import"../stores/customer/index.js";import'./../ext/uuid/dist/esm-browser/stringify.js';import'./../ext/uuid/dist/esm-browser/v3.js';import'./../ext/uuid/dist/esm-browser/native.js';import'./../ext/uuid/dist/esm-browser/v5.js';import"../i18n/index.js";import{getDefaultSrc as o}from"../functions/models/image/index.js";import"../functions/models/product-list/index.js";import{getProductVariantMainImage as n,getProductVariantPrice as a,getProductVariantFinalPrice as s,getProductVariantSellPrice as d,getProductVariantDiscountPrice as m}from"../functions/models/product/variant/index.js";import"../stores/base/index.js";import"../packages/storefront-api-client/src/utils/api.js";import'./../ext/isomorphic-fetch/fetch-npm-node.js';import'./../ext/mobx/dist/mobx.esm.js';import"./analytics.js";import'./../ext/animejs/lib/anime.esm.js';import"../packages/storefront-api/src/index.js";import"../theme/styles/index.js";import'./../ext/preact/dist/preact.mjs.js';import'./../ext/preact/hooks/dist/hooks.mjs.js';import"../utils/fetch.js";import"../packages/storefront-models/src/models/merchant-settings/index.js";var u=function(){return!r()&&!i.isEditor},c=function(){return u()&&!!i.fbpId&&!!window.fbq},l=function(){return u()&&!!window.gtag},p=function(){return u()&&!!window.dataLayer},v=function(){return u()&&!!i.tiktokPixelId&&!!window.ttq};function f(i,r){var u,c,l,p,v=e(i),f=i.categories.length>0?t(i.categories[0]).map(function(i){return i.name}):[],j=null===(u=n(v))||void 0===u?void 0:u.image,g=a(v);return{id:i.id,variantId:v.id,name:i.name,price:null!==(c=s(v))&&void 0!==c?c:0,currency:(null==g?void 0:g.currency)||"TRY",categoryPath:f,categoryString:f.join(" > "),brand:(null===(l=i.brand)||void 0===l?void 0:l.name)||"",variant:v.variantValues.map(function(i){return i.name}).join(" / "),barcode:null===(p=v.barcodeList)||void 0===p?void 0:p[0],image:j?o(j):"",sellPrice:d(v)||void 0,discountPrice:m(v)}}function j(i,e,r){var t,o,n,a,s,d=[];if(null===(t=null==r?void 0:r.categories)||void 0===t?void 0:t.length)(m=r.categories[0]).categoryPath&&m.categoryPath.forEach(function(i){return d.push(i)}),d.push(m.name);else if(null===(o=i.variant.categories)||void 0===o?void 0:o.length){var m;(m=i.variant.categories[0]).categoryPath&&m.categoryPath.forEach(function(i){return d.push(i.name)}),d.push(m.name)}return{id:i.variant.productId||"",variantId:i.variant.id||"",name:i.variant.name,price:i.finalPrice||0,quantity:null!=e?e:i.quantity,currency:i.currencyCode||"",categoryPath:d,categoryString:d.join(" > "),brand:(null===(n=null==r?void 0:r.brand)||void 0===n?void 0:n.name)||(null===(a=i.variant.brand)||void 0===a?void 0:a.name)||"",variant:(null===(s=i.variant.variantValues)||void 0===s?void 0:s.map(function(i){return i.variantValueName}).join(" / "))||""}}function g(i){var e;return{items:i.orderLineItems.map(function(i){return j(i)}),totalPrice:"totalFinalPrice"in i?i.totalFinalPrice:i.totalPrice,currency:i.currencyCode||(null===(e=i.orderLineItems[0])||void 0===e?void 0:e.currencyCode)||"TRY",itemCount:i.orderLineItems.length}}export{u as canTrack,g as extractCartData,j as extractCartItemData,f as extractProductData,c as hasFacebookPixel,l as hasGoogleAnalytics,p as hasGoogleTagManager,v as hasTiktokPixel};
@@ -0,0 +1 @@
1
+ var e,t,r;function n(t,r,n){var l,_,u,i={};for(u in r)"key"==u?l=r[u]:"ref"==u?_=r[u]:i[u]=r[u];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===i[u]&&(i[u]=t.defaultProps[u]);return o(t,i,l,_,null)}function o(e,n,o,l,_){var u={type:e,props:n,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==_?++r:_,__i:-1,__u:0};return null==_&&null!=t.vnode&&t.vnode(u),u}e=[].slice,t={__e:function(e,t,r,n){for(var o,l,_;t=t.__;)if((o=t.__c)&&!o.__)try{if((l=o.constructor)&&null!=l.getDerivedStateFromError&&(o.setState(l.getDerivedStateFromError(e)),_=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,n||{}),_=o.__d),_)return o.__E=o}catch(t){e=t}throw e}},r=0,"function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout;export{n as createElement,n as h,t as options};
@@ -0,0 +1 @@
1
+ import{options as _}from"../../dist/preact.mjs.js";var n,t,o,r,u=0,c=[],e=_,i=e.__b,f=e.__r,a=e.diffed,h=e.__c,m=e.unmount,s=e.__;function v(_,n){e.__h&&e.__h(t,_,u||n),u=0;var o=t.__H||(t.__H={__:[],__h:[]});return _>=o.__.length&&o.__.push({}),o.__[_]}function H(_){return u=5,l(function(){return{current:_}},[])}function l(_,t){var o=v(n++,7);return function(_,n){return!_||_.length!==n.length||n.some(function(n,t){return n!==_[t]})}(o.__H,t)&&(o.__=_(),o.__H=t,o.__h=_),o.__}function d(_,n){return u=8,l(function(){return _},n)}function p(){for(var _;_=c.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(A),_.__H.__h.forEach(F),_.__H.__h=[]}catch(n){_.__H.__h=[],e.__e(n,_.__v)}}e.__b=function(_){t=null,i&&i(_)},e.__=function(_,n){_&&n.__k&&n.__k.__m&&(_.__m=n.__k.__m),s&&s(_,n)},e.__r=function(_){f&&f(_),n=0;var r=(t=_.__c).__H;r&&(o===t?(r.__h=[],t.__h=[],r.__.forEach(function(_){_.__N&&(_.__=_.__N),_.u=_.__N=void 0})):(r.__h.forEach(A),r.__h.forEach(F),r.__h=[],n=0)),o=t},e.diffed=function(_){a&&a(_);var n=_.__c;n&&n.__H&&(n.__H.__h.length&&(1!==c.push(n)&&r===e.requestAnimationFrame||((r=e.requestAnimationFrame)||y)(p)),n.__H.__.forEach(function(_){_.u&&(_.__H=_.u),_.u=void 0})),o=t=null},e.__c=function(_,n){n.some(function(_){try{_.__h.forEach(A),_.__h=_.__h.filter(function(_){return!_.__||F(_)})}catch(t){n.some(function(_){_.__h&&(_.__h=[])}),n=[],e.__e(t,_.__v)}}),h&&h(_,n)},e.unmount=function(_){m&&m(_);var n,t=_.__c;t&&t.__H&&(t.__H.__.forEach(function(_){try{A(_)}catch(_){n=_}}),t.__H=void 0,n&&e.__e(n,t.__v))};var E="function"==typeof requestAnimationFrame;function y(_){var n,t=function(){clearTimeout(o),E&&cancelAnimationFrame(n),setTimeout(_)},o=setTimeout(t,35);E&&(n=requestAnimationFrame(t))}function A(_){var n=t,o=_.__c;"function"==typeof o&&(_.__c=void 0,o()),t=n}function F(_){var n=t;_.__c=_.__(),t=n}export{d as useCallback,l as useMemo,H as useRef};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as r,__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import{APIResponse as s}from"../../../packages/storefront-api-client/src/utils/api.js";import'./../../../ext/isomorphic-fetch/fetch-npm-node.js';import{IkasStorefrontConfig as i}from"../../../packages/storefront-config/src/index.js";import"../../../analytics/analytics.js";import'./../../../ext/mobx/dist/mobx.esm.js';import'./../../../ext/animejs/lib/anime.esm.js';import"../../../packages/storefront-api/src/index.js";import{initIkasCampaignOffer as n}from"../../models/product/campaign-offer/init.js";import"../../../stores/customer/index.js";import"../../../i18n/index.js";import'./../../../ext/lodash/sortBy.js';import"../../../router/index.js";import"../../../stores/cart/index.js";import"../../../stores/base/index.js";import'./../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../ext/uuid/dist/esm-browser/native.js';import'./../../../ext/uuid/dist/esm-browser/v5.js';import{initIkasOrder as d}from"../../models/order/index.js";import"../../models/product-list/index.js";import"../../../theme/styles/index.js";import"../../../utils/fetch.js";import"../../../packages/storefront-models/src/models/merchant-settings/index.js";function a(e){return t(t({},d(e)),{cancelReason:null})}function o(t){return e(this,void 0,void 0,function(){var e,d,o;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/queries/getCartById.js")];case 1:return[4,(0,r.sent().getCartById)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),d=e.data?a(e.data):null,null===(o=null==d?void 0:d.campaignOffers)||void 0===o||o.forEach(function(e){e.campaignOffer&&n(e.campaignOffer,i.getCurrentLocale())}),[2,new s(d||null,e.graphQLErrors,e.errorCodes)]}})})}function p(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/saveCart.js")];case 1:return[4,(0,r.sent().saveCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function u(t){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/createPayWithIkasSessionUrl.js")];case 1:return[4,(0,r.sent().createPayWithIkasSessionUrl)(t)];case 2:return e=r.sent(),[2,new s(e.data,e.graphQLErrors)]}})})}function c(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/saveCartCouponCode.js")];case 1:return[4,(0,r.sent().saveCartCouponCode)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function l(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/addItemToCart.js")];case 1:return[4,(0,r.sent().addItemToCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function g(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/updateCartCampaignOffer.js")];case 1:return[4,(0,r.sent().updateCartCampaignOffer)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}export{l as apiAddItemToCart,u as apiCreatePayWithIkasSessionUrl,o as apiGetCartById,p as apiSaveCart,c as apiSaveCartCouponCode,g as apiUpdateCartCampaignOffer};
1
+ import{__awaiter as e,__generator as r,__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import{APIResponse as s}from"../../../packages/storefront-api-client/src/utils/api.js";import'./../../../ext/isomorphic-fetch/fetch-npm-node.js';import{IkasStorefrontConfig as i}from"../../../packages/storefront-config/src/index.js";import"../../../analytics/analytics.js";import'./../../../ext/mobx/dist/mobx.esm.js';import'./../../../ext/animejs/lib/anime.esm.js';import"../../../packages/storefront-api/src/index.js";import{initIkasCampaignOffer as n}from"../../models/product/campaign-offer/init.js";import"../../../stores/customer/index.js";import"../../../i18n/index.js";import'./../../../ext/lodash/sortBy.js';import"../../../router/index.js";import"../../../stores/cart/index.js";import"../../../stores/base/index.js";import'./../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../ext/uuid/dist/esm-browser/native.js';import'./../../../ext/uuid/dist/esm-browser/v5.js';import{initIkasOrder as d}from"../../models/order/index.js";import"../../models/product-list/index.js";import"../../../theme/styles/index.js";import'./../../../ext/preact/dist/preact.mjs.js';import'./../../../ext/preact/hooks/dist/hooks.mjs.js';import"../../../utils/fetch.js";import"../../../packages/storefront-models/src/models/merchant-settings/index.js";function o(e){return t(t({},d(e)),{cancelReason:null})}function a(t){return e(this,void 0,void 0,function(){var e,d,a;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/queries/getCartById.js")];case 1:return[4,(0,r.sent().getCartById)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),d=e.data?o(e.data):null,null===(a=null==d?void 0:d.campaignOffers)||void 0===a||a.forEach(function(e){e.campaignOffer&&n(e.campaignOffer,i.getCurrentLocale())}),[2,new s(d||null,e.graphQLErrors,e.errorCodes)]}})})}function p(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/saveCart.js")];case 1:return[4,(0,r.sent().saveCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?o(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function c(t){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/createPayWithIkasSessionUrl.js")];case 1:return[4,(0,r.sent().createPayWithIkasSessionUrl)(t)];case 2:return e=r.sent(),[2,new s(e.data,e.graphQLErrors)]}})})}function u(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/saveCartCouponCode.js")];case 1:return[4,(0,r.sent().saveCartCouponCode)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?o(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function l(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/addItemToCart.js")];case 1:return[4,(0,r.sent().addItemToCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?o(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function m(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/updateCartCampaignOffer.js")];case 1:return[4,(0,r.sent().updateCartCampaignOffer)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?o(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}export{l as apiAddItemToCart,c as apiCreatePayWithIkasSessionUrl,a as apiGetCartById,p as apiSaveCart,u as apiSaveCartCouponCode,m as apiUpdateCartCampaignOffer};
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as s,__generator as o}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{I18n as i}from"../../../../i18n/index.js";import{cartStore as t}from"../../../../stores/cart/index.js";import"../../../../stores/base/index.js";import{saveCouponCode as r}from"../../../stores/cart/index.js";import"../../../../packages/storefront-api-client/src/utils/api.js";import'./../../../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../../../packages/storefront-config/src/index.js";import'./../../../../ext/mobx/dist/mobx.esm.js';import"../../../../router/index.js";import'./../../../../ext/lodash/sortBy.js';import"../../../../stores/customer/index.js";import{FORM_ITEM_DEFAULT_VALUE as n,validateValue as u}from"../index.js";import'./../../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../../ext/uuid/dist/esm-browser/native.js';import'./../../../../ext/uuid/dist/esm-browser/v5.js';import"../../product-list/index.js";import"../../../../analytics/analytics.js";import'./../../../../ext/animejs/lib/anime.esm.js';import"../../../../packages/storefront-api/src/index.js";import"../../../../theme/styles/index.js";import"../../../../utils/fetch.js";import"../../../../packages/storefront-models/src/models/merchant-settings/index.js";function c(s){s.couponCode=e(e({},n),{label:i.translate("label.coupon_code"),placeholder:i.translate("placeholder.coupon_code")}),s.isSubmitted=!1,s.isSubmitting=!1,s.isSuccess=void 0,s.isFailure=void 0,s.responseMessage=void 0}function a(e,s){e.couponCode.value=s,e.isSubmitted&&l(e)}function d(e){return s(this,void 0,void 0,function(){var s,n,u,c,a,d;return o(this,function(o){switch(o.label){case 0:return t.cart?(e.isSubmitted=!0,e.isSuccess=void 0,e.isFailure=void 0,e.responseMessage=void 0,l(e)?[2,!1]:(e.isSubmitting=!0,[4,r(t.cart,e.couponCode.value)])):[2,!1];case 1:return s=o.sent(),n=s.success,u=s.response,e.isSubmitting=!1,n?(e.isSuccess=!0,e.responseMessage=i.translate("notification.success.coupon_code_form"),[2,!0]):(e.isFailure=!0,c=function(e){switch(e){case"COUPON_CODE_NOT_EXIST":return i.translate("notification.failure.coupon_code_not_exist");case"COUPON_CODE_USAGE_LIMIT_ERROR":return i.translate("notification.failure.coupon_code_usage_limit_error");case"COUPON_CODE_CANNOT_USE_THIS_CART":return i.translate("notification.failure.coupon_code_cannot_use_this_cart");default:return i.translate("notification.failure.coupon_code_form")}}(null!==(d=null===(a=null==u?void 0:u.errorCodes)||void 0===a?void 0:a[0])&&void 0!==d?d:""),e.responseMessage=c,[2,!1])}})})}function m(e){return s(this,void 0,void 0,function(){var s;return o(this,function(o){switch(o.label){case 0:return t.cart?(e.isSubmitted=!0,e.isSuccess=void 0,e.isFailure=void 0,e.responseMessage=void 0,e.isSubmitting=!0,[4,r(t.cart,null)]):[2,!1];case 1:return s=o.sent().success,e.isSubmitting=!1,s?(e.isSuccess=!0,e.responseMessage=i.translate("notification.success.coupon_code_form_remove"),[2,!0]):(e.isFailure=!0,e.responseMessage=i.translate("notification.failure.coupon_code_form_remove"),[2,!1])}})})}function l(e){var s=u(e.couponCode.value,{required:!0});return s.hasError?(e.couponCode.hasError=!0,e.couponCode.message=s.message):(e.couponCode.hasError=!1,e.couponCode.message=void 0),s.hasError}export{c as initCouponCodeForm,m as removeCouponCodeForm,a as setCouponCodeFormCouponCode,d as submitCouponCodeForm};
1
+ import{__assign as s,__awaiter as e,__generator as o}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{I18n as i}from"../../../../i18n/index.js";import{cartStore as t}from"../../../../stores/cart/index.js";import"../../../../stores/base/index.js";import{saveCouponCode as r}from"../../../stores/cart/index.js";import"../../../../packages/storefront-api-client/src/utils/api.js";import'./../../../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../../../packages/storefront-config/src/index.js";import'./../../../../ext/mobx/dist/mobx.esm.js';import"../../../../router/index.js";import'./../../../../ext/lodash/sortBy.js';import"../../../../stores/customer/index.js";import{FORM_ITEM_DEFAULT_VALUE as n,validateValue as c}from"../index.js";import'./../../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../../ext/uuid/dist/esm-browser/native.js';import'./../../../../ext/uuid/dist/esm-browser/v5.js';import"../../product-list/index.js";import"../../../../analytics/analytics.js";import'./../../../../ext/animejs/lib/anime.esm.js';import"../../../../packages/storefront-api/src/index.js";import"../../../../theme/styles/index.js";import'./../../../../ext/preact/dist/preact.mjs.js';import'./../../../../ext/preact/hooks/dist/hooks.mjs.js';import"../../../../utils/fetch.js";import"../../../../packages/storefront-models/src/models/merchant-settings/index.js";function u(e){e.couponCode=s(s({},n),{label:i.translate("label.coupon_code"),placeholder:i.translate("placeholder.coupon_code")}),e.isSubmitted=!1,e.isSubmitting=!1,e.isSuccess=void 0,e.isFailure=void 0,e.responseMessage=void 0}function a(s,e){s.couponCode.value=e,s.isSubmitted&&l(s)}function d(s){return e(this,void 0,void 0,function(){var e,n,c,u,a,d;return o(this,function(o){switch(o.label){case 0:return t.cart?(s.isSubmitted=!0,s.isSuccess=void 0,s.isFailure=void 0,s.responseMessage=void 0,l(s)?[2,!1]:(s.isSubmitting=!0,[4,r(t.cart,s.couponCode.value)])):[2,!1];case 1:return e=o.sent(),n=e.success,c=e.response,s.isSubmitting=!1,n?(s.isSuccess=!0,s.responseMessage=i.translate("notification.success.coupon_code_form"),[2,!0]):(s.isFailure=!0,u=function(s){switch(s){case"COUPON_CODE_NOT_EXIST":return i.translate("notification.failure.coupon_code_not_exist");case"COUPON_CODE_USAGE_LIMIT_ERROR":return i.translate("notification.failure.coupon_code_usage_limit_error");case"COUPON_CODE_CANNOT_USE_THIS_CART":return i.translate("notification.failure.coupon_code_cannot_use_this_cart");default:return i.translate("notification.failure.coupon_code_form")}}(null!==(d=null===(a=null==c?void 0:c.errorCodes)||void 0===a?void 0:a[0])&&void 0!==d?d:""),s.responseMessage=u,[2,!1])}})})}function m(s){return e(this,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return t.cart?(s.isSubmitted=!0,s.isSuccess=void 0,s.isFailure=void 0,s.responseMessage=void 0,s.isSubmitting=!0,[4,r(t.cart,null)]):[2,!1];case 1:return e=o.sent().success,s.isSubmitting=!1,e?(s.isSuccess=!0,s.responseMessage=i.translate("notification.success.coupon_code_form_remove"),[2,!0]):(s.isFailure=!0,s.responseMessage=i.translate("notification.failure.coupon_code_form_remove"),[2,!1])}})})}function l(s){var e=c(s.couponCode.value,{required:!0});return e.hasError?(s.couponCode.hasError=!0,s.couponCode.message=e.message):(s.couponCode.hasError=!1,s.couponCode.message=void 0),e.hasError}export{u as initCouponCodeForm,m as removeCouponCodeForm,a as setCouponCodeFormCouponCode,d as submitCouponCodeForm};
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as s,__generator as r}from'./../../../../ext/tslib/tslib.es6.mjs.js';import"../../../../analytics/analytics.js";import"../../../../packages/storefront-config/src/index.js";import'./../../../../ext/mobx/dist/mobx.esm.js';import'./../../../../ext/animejs/lib/anime.esm.js';import"../../../../packages/storefront-api-client/src/utils/api.js";import'./../../../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../../../packages/storefront-api/src/index.js";import{customerStore as t}from"../../../../stores/customer/index.js";import{I18n as i}from"../../../../i18n/index.js";import{FORM_ITEM_DEFAULT_VALUE as a,validateValue as o}from"../index.js";import'./../../../../ext/lodash/sortBy.js';import"../../../../router/index.js";import"../../../../stores/cart/index.js";import{getCustomerAttributes as n,register as l}from"../../../stores/customer/index.js";import"../../../../stores/base/index.js";import'./../../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../../ext/uuid/dist/esm-browser/native.js';import'./../../../../ext/uuid/dist/esm-browser/v5.js';import{getCustomerAttributeRegisterPageRequirement as u}from"../../customer/attribute/index.js";import"../../product-list/index.js";import"../../../../theme/styles/index.js";import"../../../../utils/fetch.js";import"../../../../packages/storefront-models/src/models/merchant-settings/index.js";function d(o){o.firstName=e(e({},a),{isRequired:!0,label:i.translate("label.first_name"),placeholder:i.translate("placeholder.first_name")}),o.lastName=e(e({},a),{isRequired:!0,label:i.translate("label.last_name"),placeholder:i.translate("placeholder.last_name")}),o.email=e(e({},a),{isRequired:!0,label:i.translate("label.email"),placeholder:i.translate("placeholder.email")}),o.password=e(e({},a),{isRequired:!0,label:i.translate("label.password"),placeholder:i.translate("placeholder.password")}),o.phone=e(e({},a),{label:i.translate("label.phone"),placeholder:i.translate("placeholder.phone")}),o.isMarketingAccepted=T,o.isMembershipAgreementAccepted=e(e({},T),{isRequired:!0}),function(i){s(this,void 0,void 0,function(){var s;return r(this,function(r){switch(r.label){case 0:return i.attributes=[],i.isInitialized=!1,[4,n(t)];case 1:return s=r.sent(),i.isInitialized=!0,s.length?(i.attributes=s.filter(function(e){return"INVISIBLE"!==u(e)}).map(function(s){var r;return e(e({},a),{id:s.id,label:s.name,placeholder:s.description||"",isRequired:"MANDATORY"===u(s),type:s.type,options:"CHOICE"===s.type||"MULTIPLE_CHOICE"===s.type?(null===(r=s.options)||void 0===r?void 0:r.map(function(e){return{value:e.id,label:e.name}}))||[]:void 0,isChecked:void 0,value:void 0,selectedIdList:void 0})}),[2]):[2]}})})}(o),o.isSubmitted=!1,o.isSubmitting=!1,o.isSuccess=void 0,o.isFailure=void 0,o.responseMessage=void 0}function m(e,s,r){"string"!=typeof r&&"TEXT"!==s.type||(s.value=r)}function p(e,s,r){"string"!=typeof r&&"DATETIME"!==s.type||(s.value=r)}function c(e,s,r){"string"!=typeof r&&"DATE"!==s.type||(s.value=r)}function v(e,s,r){"string"!=typeof r&&"CHOICE"!==s.type||(s.value=r)}function h(e,s,r){"string"!=typeof r&&"NUMERIC"!==s.type||(Number.isInteger(Number(r))?s.value=r:s.value=r.slice(0,-1))}function f(e,s,r){"boolean"!=typeof r&&"CHOICE"!==s.type||(s.isChecked=r)}function g(e,s,r){"object"!=typeof r&&"MULTIPLE_CHOICE"!==s.type||(s.selectedIdList=r)}function E(e,s){e.firstName.value=s,e.isSubmitted&&N(e)}function b(e,s){e.lastName.value=s,e.isSubmitted&&N(e)}function y(e,s){e.email.value=s,e.isSubmitted&&N(e)}function I(e,s){e.password.value=s,e.isSubmitted&&N(e)}function A(e,s){e.phone.value=s,e.isSubmitted&&N(e)}function j(e,s){e.isMarketingAccepted.value=s,e.isSubmitted&&N(e)}function C(e,s){e.isMembershipAgreementAccepted.value=s,e.isSubmitted&&N(e)}function M(e){return s(this,void 0,void 0,function(){var s,a;return r(this,function(r){switch(r.label){case 0:return e.isSubmitted=!0,e.isSuccess=void 0,e.isFailure=void 0,e.responseMessage=void 0,N(e)?[2,!1]:(s=function(e){for(var s=[],r=0,t=e.attributes;r<t.length;r++){var i=t[r];if(!i.hasError)if(i.selectedIdList&&"MULTIPLE_CHOICE"===i.type)for(var a=0,o=i.selectedIdList;a<o.length;a++){var n=o[a];s.push({customerAttributeId:i.id,customerAttributeOptionId:n})}else"BOOLEAN"!==i.type?!i.value||"TEXT"!==i.type&&"NUMERIC"!==i.type?i.value&&"CHOICE"===i.type?s.push({customerAttributeId:i.id,customerAttributeOptionId:i.value}):!i.value||"DATE"!==i.type&&"DATETIME"!==i.type||s.push({customerAttributeId:i.id,value:new Date(i.value).getTime().toString()}):s.push({customerAttributeId:i.id,value:i.value}):s.push({customerAttributeId:i.id,value:i.isChecked?i.isChecked.toString():"false"})}return s}(e),e.isSubmitting=!0,[4,l(t,e.firstName.value,e.lastName.value,e.email.value,e.password.value,e.isMarketingAccepted.value,s,e.phone.value)]);case 1:return a=r.sent(),e.isSubmitting=!1,a.isSuccess?(e.isSuccess=!0,e.responseMessage=i.translate("notification.success.register"),[2,!0]):(e.isFailure=!0,e.responseMessage=i.translate("notification.failure.register"),[2,!1])}})})}function N(e){var s=o(e.firstName.value,{required:!0});s.hasError?(e.firstName.hasError=!0,e.firstName.message=s.message):(e.firstName.hasError=!1,e.firstName.message=void 0);var r=o(e.lastName.value,{required:!0});r.hasError?(e.lastName.hasError=!0,e.lastName.message=r.message):(e.lastName.hasError=!1,e.lastName.message=void 0);var t=o(e.email.value,{required:!0,email:!0});t.hasError?(e.email.hasError=!0,e.email.message=t.message):(e.email.hasError=!1,e.email.message=void 0);var i=o(e.password.value,{required:!0,min:6});i.hasError?(e.password.hasError=!0,e.password.message=i.message):(e.password.hasError=!1,e.password.message=void 0);var a=o(e.isMembershipAgreementAccepted.value,{required:!0});a.hasError?(e.isMembershipAgreementAccepted.hasError=!0,e.isMembershipAgreementAccepted.message=a.message):(e.isMembershipAgreementAccepted.hasError=!1,e.isMembershipAgreementAccepted.message=void 0);for(var n=0,l=e.attributes;n<l.length;n++){var u=l[n];if("BOOLEAN"!==u.type){if(u.isRequired){if("TEXT"===u.type||"DATETIME"===u.type||"DATE"===u.type||"CHOICE"===u.type||"NUMERIC"===u.type){(d=o(u.value||"",{required:!0})).hasError?(u.hasError=!0,u.message=d.message):(u.hasError=!1,u.message=void 0);continue}if("MULTIPLE_CHOICE"===u.type){var d;(d=o(u.selectedIdList||[],{required:!0})).hasError?(u.hasError=!0,u.message=d.message):(u.hasError=!1,u.message=void 0);continue}}u.hasError=!1,u.message=void 0}else void 0===u.isChecked&&(u.isChecked=!1),u.hasError=!1,u.message=void 0}return s.hasError||r.hasError||t.hasError||i.hasError||a.hasError||!1}var T={value:!1,hasError:!1,message:void 0};export{d as initRegisterForm,f as setRegisterFormBooleanAttribute,v as setRegisterFormChoiceAttribute,c as setRegisterFormDateAttribute,p as setRegisterFormDateTimeAttribute,y as setRegisterFormEmail,E as setRegisterFormFirstName,j as setRegisterFormIsMarketingAccepted,C as setRegisterFormIsMembershipAgreementAccepted,b as setRegisterFormLastName,g as setRegisterFormMultipleChoiceAttribute,h as setRegisterFormNumericAttribute,I as setRegisterFormPassword,A as setRegisterFormPhone,m as setRegisterFormTextAttribute,M as submitRegisterForm};
1
+ import{__assign as e,__awaiter as s,__generator as r}from'./../../../../ext/tslib/tslib.es6.mjs.js';import"../../../../analytics/analytics.js";import"../../../../packages/storefront-config/src/index.js";import'./../../../../ext/mobx/dist/mobx.esm.js';import'./../../../../ext/animejs/lib/anime.esm.js';import"../../../../packages/storefront-api-client/src/utils/api.js";import'./../../../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../../../packages/storefront-api/src/index.js";import{customerStore as t}from"../../../../stores/customer/index.js";import{I18n as i}from"../../../../i18n/index.js";import{FORM_ITEM_DEFAULT_VALUE as a,validateValue as o}from"../index.js";import'./../../../../ext/lodash/sortBy.js';import"../../../../router/index.js";import"../../../../stores/cart/index.js";import{getCustomerAttributes as n,register as l}from"../../../stores/customer/index.js";import"../../../../stores/base/index.js";import'./../../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../../ext/uuid/dist/esm-browser/native.js';import'./../../../../ext/uuid/dist/esm-browser/v5.js';import{getCustomerAttributeRegisterPageRequirement as d}from"../../customer/attribute/index.js";import"../../product-list/index.js";import"../../../../theme/styles/index.js";import'./../../../../ext/preact/dist/preact.mjs.js';import'./../../../../ext/preact/hooks/dist/hooks.mjs.js';import"../../../../utils/fetch.js";import"../../../../packages/storefront-models/src/models/merchant-settings/index.js";function u(o){o.firstName=e(e({},a),{isRequired:!0,label:i.translate("label.first_name"),placeholder:i.translate("placeholder.first_name")}),o.lastName=e(e({},a),{isRequired:!0,label:i.translate("label.last_name"),placeholder:i.translate("placeholder.last_name")}),o.email=e(e({},a),{isRequired:!0,label:i.translate("label.email"),placeholder:i.translate("placeholder.email")}),o.password=e(e({},a),{isRequired:!0,label:i.translate("label.password"),placeholder:i.translate("placeholder.password")}),o.phone=e(e({},a),{label:i.translate("label.phone"),placeholder:i.translate("placeholder.phone")}),o.isMarketingAccepted=T,o.isMembershipAgreementAccepted=e(e({},T),{isRequired:!0}),function(i){s(this,void 0,void 0,function(){var s;return r(this,function(r){switch(r.label){case 0:return i.attributes=[],i.isInitialized=!1,[4,n(t)];case 1:return s=r.sent(),i.isInitialized=!0,s.length?(i.attributes=s.filter(function(e){return"INVISIBLE"!==d(e)}).map(function(s){var r;return e(e({},a),{id:s.id,label:s.name,placeholder:s.description||"",isRequired:"MANDATORY"===d(s),type:s.type,options:"CHOICE"===s.type||"MULTIPLE_CHOICE"===s.type?(null===(r=s.options)||void 0===r?void 0:r.map(function(e){return{value:e.id,label:e.name}}))||[]:void 0,isChecked:void 0,value:void 0,selectedIdList:void 0})}),[2]):[2]}})})}(o),o.isSubmitted=!1,o.isSubmitting=!1,o.isSuccess=void 0,o.isFailure=void 0,o.responseMessage=void 0}function m(e,s,r){"string"!=typeof r&&"TEXT"!==s.type||(s.value=r)}function p(e,s,r){"string"!=typeof r&&"DATETIME"!==s.type||(s.value=r)}function c(e,s,r){"string"!=typeof r&&"DATE"!==s.type||(s.value=r)}function h(e,s,r){"string"!=typeof r&&"CHOICE"!==s.type||(s.value=r)}function v(e,s,r){"string"!=typeof r&&"NUMERIC"!==s.type||(Number.isInteger(Number(r))?s.value=r:s.value=r.slice(0,-1))}function f(e,s,r){"boolean"!=typeof r&&"CHOICE"!==s.type||(s.isChecked=r)}function g(e,s,r){"object"!=typeof r&&"MULTIPLE_CHOICE"!==s.type||(s.selectedIdList=r)}function E(e,s){e.firstName.value=s,e.isSubmitted&&N(e)}function b(e,s){e.lastName.value=s,e.isSubmitted&&N(e)}function y(e,s){e.email.value=s,e.isSubmitted&&N(e)}function I(e,s){e.password.value=s,e.isSubmitted&&N(e)}function A(e,s){e.phone.value=s,e.isSubmitted&&N(e)}function j(e,s){e.isMarketingAccepted.value=s,e.isSubmitted&&N(e)}function C(e,s){e.isMembershipAgreementAccepted.value=s,e.isSubmitted&&N(e)}function M(e){return s(this,void 0,void 0,function(){var s,a;return r(this,function(r){switch(r.label){case 0:return e.isSubmitted=!0,e.isSuccess=void 0,e.isFailure=void 0,e.responseMessage=void 0,N(e)?[2,!1]:(s=function(e){for(var s=[],r=0,t=e.attributes;r<t.length;r++){var i=t[r];if(!i.hasError)if(i.selectedIdList&&"MULTIPLE_CHOICE"===i.type)for(var a=0,o=i.selectedIdList;a<o.length;a++){var n=o[a];s.push({customerAttributeId:i.id,customerAttributeOptionId:n})}else"BOOLEAN"!==i.type?!i.value||"TEXT"!==i.type&&"NUMERIC"!==i.type?i.value&&"CHOICE"===i.type?s.push({customerAttributeId:i.id,customerAttributeOptionId:i.value}):!i.value||"DATE"!==i.type&&"DATETIME"!==i.type||s.push({customerAttributeId:i.id,value:new Date(i.value).getTime().toString()}):s.push({customerAttributeId:i.id,value:i.value}):s.push({customerAttributeId:i.id,value:i.isChecked?i.isChecked.toString():"false"})}return s}(e),e.isSubmitting=!0,[4,l(t,e.firstName.value,e.lastName.value,e.email.value,e.password.value,e.isMarketingAccepted.value,s,e.phone.value)]);case 1:return a=r.sent(),e.isSubmitting=!1,a.isSuccess?(e.isSuccess=!0,e.responseMessage=i.translate("notification.success.register"),[2,!0]):(e.isFailure=!0,e.responseMessage=i.translate("notification.failure.register"),[2,!1])}})})}function N(e){var s=o(e.firstName.value,{required:!0});s.hasError?(e.firstName.hasError=!0,e.firstName.message=s.message):(e.firstName.hasError=!1,e.firstName.message=void 0);var r=o(e.lastName.value,{required:!0});r.hasError?(e.lastName.hasError=!0,e.lastName.message=r.message):(e.lastName.hasError=!1,e.lastName.message=void 0);var t=o(e.email.value,{required:!0,email:!0});t.hasError?(e.email.hasError=!0,e.email.message=t.message):(e.email.hasError=!1,e.email.message=void 0);var i=o(e.password.value,{required:!0,min:6});i.hasError?(e.password.hasError=!0,e.password.message=i.message):(e.password.hasError=!1,e.password.message=void 0);var a=o(e.isMembershipAgreementAccepted.value,{required:!0});a.hasError?(e.isMembershipAgreementAccepted.hasError=!0,e.isMembershipAgreementAccepted.message=a.message):(e.isMembershipAgreementAccepted.hasError=!1,e.isMembershipAgreementAccepted.message=void 0);for(var n=0,l=e.attributes;n<l.length;n++){var d=l[n];if("BOOLEAN"!==d.type){if(d.isRequired){if("TEXT"===d.type||"DATETIME"===d.type||"DATE"===d.type||"CHOICE"===d.type||"NUMERIC"===d.type){(u=o(d.value||"",{required:!0})).hasError?(d.hasError=!0,d.message=u.message):(d.hasError=!1,d.message=void 0);continue}if("MULTIPLE_CHOICE"===d.type){var u;(u=o(d.selectedIdList||[],{required:!0})).hasError?(d.hasError=!0,d.message=u.message):(d.hasError=!1,d.message=void 0);continue}}d.hasError=!1,d.message=void 0}else void 0===d.isChecked&&(d.isChecked=!1),d.hasError=!1,d.message=void 0}return s.hasError||r.hasError||t.hasError||i.hasError||a.hasError||!1}var T={value:!1,hasError:!1,message:void 0};export{u as initRegisterForm,f as setRegisterFormBooleanAttribute,h as setRegisterFormChoiceAttribute,c as setRegisterFormDateAttribute,p as setRegisterFormDateTimeAttribute,y as setRegisterFormEmail,E as setRegisterFormFirstName,j as setRegisterFormIsMarketingAccepted,C as setRegisterFormIsMembershipAgreementAccepted,b as setRegisterFormLastName,g as setRegisterFormMultipleChoiceAttribute,v as setRegisterFormNumericAttribute,I as setRegisterFormPassword,A as setRegisterFormPhone,m as setRegisterFormTextAttribute,M as submitRegisterForm};
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from "./theme/overlay";
19
19
  export * from "./theme/slider";
20
20
  export * from "./theme/styles";
21
21
  export * from "./utils/blueprint";
22
+ export * from "./utils/component-renderer";
22
23
  export * from "./utils/fetch";
23
24
  export * from "./utils/object-wrapper";
24
25
  export type { APIErrorCode, APIResponse } from "./storefront-api/src";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{Analytics}from"./analytics/analytics.js";export{initIkasEvents}from"./analytics/events.js";export{EMPTY_STRING,NULL,UNDEFINED}from"./externals/index.js";export{apiListProductBrand}from"./functions/api/brand/index.js";export{apiListCategory}from"./functions/api/category/index.js";export{apiGetLoyaltyCustomerInfo,apiGetStorefrontWidgetSettings,apiListEarningMethods,apiListLoyaltyProgramPointHistory,apiListLoyaltyProgramTiers,apiListSpendingMethodsByCartId,apiRemoveLoyaltyPointsFromCart,apiUseLoyaltyPoints}from"./functions/api/loyalty/index.js";export{apiListStorefrontPopup}from"./functions/api/popup/index.js";export{apiSearchProducts}from"./functions/api/product/index.js";export{getAttributeDetailValues}from"./functions/models/attribute-detail/index.js";export{getAttributeListValues}from"./functions/models/attribute-list/index.js";export{createIkasBaseModel}from"./functions/models/base/index.js";export{getIkasBlogFormattedDate,getIkasBlogHref}from"./functions/models/blog/index.js";export{createIkasBlogCategory,getIkasBlogCategoryHref}from"./functions/models/blog/category/index.js";export{initIkasBlogCategory}from"./functions/models/blog/category/init.js";export{initIkasBlog}from"./functions/models/blog/init.js";export{getBlogCategoryListInitialData,getBlogCategoryListNextPage,getBlogCategoryListPage,getBlogCategoryListPageCount,getBlogCategoryListPrevPage,hasBlogCategoryListNextPage,hasBlogCategoryListPrevPage,isBlogCategoryListStatic}from"./functions/models/blog-category-list/index.js";export{initBlogCategoryList}from"./functions/models/blog-category-list/init.js";export{getBlogListInitialData,getBlogListNextPage,getBlogListPage,getBlogListPageCount,getBlogListPrevPage,hasBlogListNextPage,hasBlogListPrevPage,isBlogListStatic}from"./functions/models/blog-list/index.js";export{initBlogList}from"./functions/models/blog-list/init.js";export{getIkasBrandHref}from"./functions/models/brand/index.js";export{initIkasBrand}from"./functions/models/brand/init.js";export{getBrandListInitialData,getBrandListNextPage,getBrandListPage,getBrandListPageCount,getBrandListPrevPage,hasBrandListNextPage,hasBrandListPrevPage,isBrandListStatic}from"./functions/models/brand-list/index.js";export{initBrandList}from"./functions/models/brand-list/init.js";export{acceptProductOffer,isAcceptedProductOffer,rejectProductOffer}from"./functions/models/campaign-offer/index.js";export{getCategoryPath,getIkasCategoryHref}from"./functions/models/category/index.js";export{initIkasCategory}from"./functions/models/category/init.js";export{getCategoryListInitialData,getCategoryListNextPage,getCategoryListPage,getCategoryListPageCount,getCategoryListPrevPage,hasCategoryListNextPage,hasCategoryListPrevPage,isCategoryListStatic}from"./functions/models/category-list/index.js";export{initCategoryList}from"./functions/models/category-list/init.js";export{getIkasCategoryPathItemHref,getIkasCategoryPathItemSlug}from"./functions/models/category/path-item/index.js";export{initIkasCategoryPathItem}from"./functions/models/category/path-item/init.js";export{getCheckoutTotalFinalPrice,isCheckoutComplete}from"./functions/models/checkout/index.js";export{initIkasCountry}from"./functions/models/country/init.js";export{getCustomerBasicInfo,isCustomerSubscribed}from"./functions/models/customer/index.js";export{clearIkasCustomerAddressForm,getCustomerAddressText,getCustomerAddressValidationResult,getIkasCustomerAddressForm,isValidCustomerAddress}from"./functions/models/customer/address/index.js";export{getCustomerAttributeAccountPagePermission,getCustomerAttributeRegisterPageRequirement}from"./functions/models/customer/attribute/index.js";export{initIkasCustomerAttribute}from"./functions/models/customer/attribute/init.js";export{getIkasCustomerReviewFormattedDate}from"./functions/models/customer/review/index.js";export{initIkasCustomerReview}from"./functions/models/customer/review/init.js";export{getCustomerReviewListInitialData,getCustomerReviewListNextPage,getCustomerReviewListPage,getCustomerReviewListPageCount,getCustomerReviewListPrev,getProductCustomerReviews,hasCustomerReviewListNextPage,hasCustomerReviewListPrevPage}from"./functions/models/customer-review-list/index.js";export{initCustomerReviewList}from"./functions/models/customer-review-list/init.js";export{getCustomerReviewSummaryListInitialData,getCustomerReviewSummaryListNextPage,getCustomerReviewSummaryListPage,getCustomerReviewSummaryListPrev,hasCustomerReviewSummaryListNextPage,hasCustomerReviewSummaryListPrevPage}from"./functions/models/customer-review-summary-list/index.js";export{initCustomerReviewSummaryList}from"./functions/models/customer-review-summary-list/init.js";export{getIkasFilterCategoryHref,getIkasFilterCategorySlug}from"./functions/models/filter-category/index.js";export{initIkasHTMLMetaData,setHTMLMetaDataTranslations}from"./functions/models/html-meta-data/init.js";export{initThemeDatePicker,themeDatePickerGetDate,themeDatePickerGetDaysOfMonth,themeDatePickerGetDaysOfWeekShort,themeDatePickerGetFullYear,themeDatePickerGetHours,themeDatePickerGetMinutes,themeDatePickerGetMonth,themeDatePickerGetMonthList,themeDatePickerGetMonthName,themeDatePickerGetViewFullYear,themeDatePickerGetViewMonth,themeDatePickerGetWeekFirstDay,themeDatePickerOnChange,themeDatePickerOnDayChange,themeDatePickerOnHoursChange,themeDatePickerOnMinutesChange,themeDatePickerOnViewFullYearChange,themeDatePickerOnViewMonthChange,themeDatePickerSetViewNextMonth,themeDatePickerSetViewPrevMonth}from"./functions/models/ikas-theme/date-picker.js";export{createMediaSrcset,getDefaultSrc,getSrc,getThumbnailSrc}from"./functions/models/image/index.js";export{initIkasMerchantSettings}from"./functions/models/merchant-settings/init.js";export{getIkasOrderCouponAdjustment,getIkasOrderCustomerFullName,getIkasOrderDisplayedAdjustments,getIkasOrderDisplayedPackages,getIkasOrderDistinctItemCount,getIkasOrderFormattedDate,getIkasOrderFormattedOrderedAt,getIkasOrderFormattedShippingTotal,getIkasOrderFormattedTotalFinalPrice,getIkasOrderFormattedTotalPrice,getIkasOrderFormattedTotalTax,getIkasOrderHref,getIkasOrderNonCouponAdjustments,getIkasOrderPackageStatusTranslation,getIkasOrderProductFiles,getIkasOrderRefundableItems,getIkasOrderRefundedItems,getIkasOrderShippingTotal,getIkasOrderTotalItemCount,getIkasOrderTotalTax,getIkasOrderUnfullfilledItems,getIkasOrderVariantNames,hasIkasOrderCustomer,hasValidIkasOrderCustomerEmail,initIkasOrder,isIkasOrderRefundable}from"./functions/models/order/index.js";export{createOrderAddress,getOrderAddressText,getOrderAddressValidationResult,isValidOrderAddress}from"./functions/models/order/address/index.js";export{getOrderAdjustmentDisplayName,getOrderAdjustmentFormattedAmount,getOrderAdjustmentIsDecrement}from"./functions/models/order/adjustment/index.js";export{getOrderGiftPackageLineFormattedPrice}from"./functions/models/order/gift-package/index.js";export{editOrderLineItem,getOrderLineItemFinalPriceWithQuantity,getOrderLineItemFormattedDiscountPrice,getOrderLineItemFormattedFinalPrice,getOrderLineItemFormattedFinalPriceWithQuantity,getOrderLineItemFormattedFinalUnitPrice,getOrderLineItemFormattedOverridenPriceWithQuantity,getOrderLineItemFormattedPrice,getOrderLineItemFormattedPriceWithQuantity,getOrderLineItemFormattedTax,getOrderLineItemFormattedUnitPrice,getOrderLineItemOverridenPriceWithQuantity,getOrderLineItemPriceWithQuantity,getOrderLineItemRefundQuantity,getOrderLineItemTax,getOrderLineItemUnitPriceText,hasOrderLineItemDiscount,setOrderLineItemRefundQuantity}from"./functions/models/order/line-item/index.js";export{getIkasOrderLineVariantHref,getIkasOrderLineVariantMainImage}from"./functions/models/order/line-item/variant/index.js";export{getIkasOrderLineBundleVariantMainImage}from"./functions/models/order/line-item/variant/bundle-product/bundle-variant/index.js";export{getIkasOrderLineVariantNameSlug,getIkasOrderLineVariantTypeSlug}from"./functions/models/order/line-item/variant/value/index.js";export{getOrderTransactionFormattedAmount,getOrderTransactionPaymentMethodTranslation}from"./functions/models/order/transaction/index.js";export{getPaymentGatewayCalculatedAdditionalPrices}from"./functions/models/payment-gateway/index.js";export{initIkasPaymentGateway}from"./functions/models/payment-gateway/init.js";export{addIkasProductToFavorites,clearIkasProductCustomerReviewForm,getBundleProductFinalPrice,getBundleProductFinalPriceWithQuantity,getBundleProductFormattedFinalPrice,getBundleProductFormattedFinalPriceWithQuantity,getBundleProductFormattedSellPrice,getBundleProductFormattedSellPriceWithQuantity,getBundleProductSellPrice,getBundleProductSellPriceWithQuantity,getBundleProductsOfVariant,getDisplayedProductGroups,getDisplayedProductVariantTypes,getGroupedAttributeValues,getIkasProductCustomerReviewForm,getMainProductVariantType,getMainProductVariantValue,getProductAvailableStockLocations,getProductCampaigns,getProductCategoryPath,getProductFirstCategory,getProductHref,getProductOptionSet,getSelectedProductVariant,getSelectedProductVariantHref,hasProductStock,hasProductValidOptionValues,hasProductVariant,initBundleProducts,initProductOnBrowser,isAddToCartEnabled,isBundleProductQuantityEditable,isCustomerReviewEnabled,isCustomerReviewLoginRequired,isFavoriteIkasProduct,removeIkasProductFromFavorites,selectVariantValue,setBundleProductQuantity,setOptionRealPrices,setProductOfBundleProduct,shouldDisplayBundleProductPrice}from"./functions/models/product/index.js";export{getProductFromStore,initIkasProduct,initIkasProductExtraFields,productVariantStore}from"./functions/models/product/init.js";export{clearProductListFilter,clearProductListFilters,enableProductListSuggestions,getProductListCurrencyCode,getProductListCurrencySymbol,getProductListFilterCategories,getProductListInitialData,getProductListNextPage,getProductListPage,getProductListPrevPage,getProductListSortOptions,getProductListSortTypeTranslation,getProductListSuggestionHref,getSelectedFilterValues,handleFilterValueClick,handleNumberRangeOptionClick,hasProductListAppliedFilters,hasProductListFeaturedSortEnabled,hasProductListNextPage,hasProductListPrevPage,initProductList,initProductListOnBrowser,isProductListDiscounted,isProductListFilterable,isProductListFiltered,isProductListLastViewed,isProductListPurchasedTogether,isProductListRecommended,isProductListRelatedProducts,isProductListSearch,isProductListStatic,isProductListViewedTogether,onFilterCategoryClick,productListToggleFilterCollapsed,searchProductList,setProductListIsFilteredForProducts,setProductListIsStaticForProducts,setProductListVisiblePage,setSortType,translateProductListSortType}from"./functions/models/product-list/index.js";export{getIkasProductAttributeProducts,getIkasProductAttributeTableValue,getIkasProductAttrributeProductIds}from"./functions/models/product/attribute-value/index.js";export{initIkasProductAttributeValue}from"./functions/models/product/attribute-value/init.js";export{applyQueryParamForFilter,clearFilter,filterParseRangeStr,filterRangeToId,filterToInput,getFilterDisplayedValues,getFilterKeyList,getFilterValueList,getIkasFilterHref,getIkasFilterThumbnailImage,initIkasProductFilter,isBoxFilter,isCustomValueFilter,isListFilter,isStockFilter,isSwatchFilter,onNumberRangeFilterChange,onNumberRangeFilterOptionClick,selectFilterValue}from"./functions/models/product/filter/index.js";export{getDisplayedOptions,hasValidProductOptionSetValues,initOptionValues,initProductOptionSetValues,setChildOptions}from"./functions/models/product/option-set/index.js";export{initIkasProductOptionSet}from"./functions/models/product/option-set/init.js";export{clearValues,getDisplayedChildOptions,getProductOptionFormattedLabel,getProductOptionFormattedPrice,getTextValue,hasError,hasValidProductOptionValues,initIkasProductOptionValues,isCheckboxOption,isChecked,isChoiceOption,isChoiceOptionBoxType,isChoiceOptionSelectType,isChoiceOptionSwatchType,isColorPickerOption,isDatePickerOption,isFileOption,isImageOption,isProductOptionSelectValueSelected,isTextAreaOption,isTextOption,productOptionFileUpload,selectValue,setCheckboxValue,setTextValue,setValues}from"./functions/models/product/option-set/option/index.js";export{initIkasProductOption}from"./functions/models/product/option-set/option/init.js";export{clearProductVariantBackInStockForm,getGroupedAttributeValuesForVariant,getProductVariantAppliedCampaignAmount,getProductVariantB2bPriceRule,getProductVariantBackInStockForm,getProductVariantBundlePrice,getProductVariantCampaignOffersDiscountPercentage,getProductVariantCampaignPrice,getProductVariantDiscountAmount,getProductVariantDiscountPercentage,getProductVariantDiscountPrice,getProductVariantFinalPrice,getProductVariantFinalPriceWithCampaignOffers,getProductVariantFormattedBuyPrice,getProductVariantFormattedCampaignPrice,getProductVariantFormattedDiscountAmount,getProductVariantFormattedDiscountPrice,getProductVariantFormattedFinalPrice,getProductVariantFormattedFinalPriceWithCampaignOffers,getProductVariantFormattedSellPrice,getProductVariantFormattedSellPriceWithCampaignOffers,getProductVariantIsBackInStockCustomerLoginRequired,getProductVariantIsBackInStockEnabled,getProductVariantMainImage,getProductVariantPrice,getProductVariantSellPrice,getProductVariantSellPriceWithCampaignOffers,getProductVariantUnitPriceText,hasBundleSettings,hasProductVariantDiscount,hasProductVariantStock,saveProductVariantBackInStockReminder}from"./functions/models/product/variant/index.js";export{initIkasProductVariant}from"./functions/models/product/variant/init.js";export{getIkasProductDiscountPercentage,getIkasProductPriceDiscountAmount,getIkasProductPriceFinalPrice,hasIkasProductPriceDiscount}from"./functions/models/product/variant/price/index.js";export{isRaffleAvailable}from"./functions/models/raffle/index.js";export{initIkasRaffle}from"./functions/models/raffle/init.js";export{initIkasState}from"./functions/models/state/init.js";export{getIkasVariantTypeSlug,isIkasVariantTypeColorSelection}from"./functions/models/variant-type/index.js";export{initIkasVariantType}from"./functions/models/variant-type/init.js";export{getIkasVariantValueSlug,getIkasVariantValueThumbnailImage,isColorVariantValue,isImageVariantValue,isTextVariantValue}from"./functions/models/variant-type/variant-value/index.js";export{FORM_ITEM_DEFAULT_VALUE,validateValue}from"./functions/models/validator/index.js";export{initAccountInfoForm,setAccountInfoFormFirstName,setAccountInfoFormLastName,setAccountInfoFormPhone,submitAccountInfoForm}from"./functions/models/validator/account-info/index.js";export{initAddressForm,setAddressFormAddressLine1,setAddressFormAddressLine2,setAddressFormCity,setAddressFormCompany,setAddressFormCountry,setAddressFormDistrict,setAddressFormFirstName,setAddressFormIdentityNumber,setAddressFormLastName,setAddressFormPhone,setAddressFormPostalCode,setAddressFormRegion,setAddressFormState,setAddressFormTaxNumber,setAddressFormTaxOffice,setAddressFormTitle,submitAddressForm}from"./functions/models/validator/address/index.js";export{initBackInStockNotificationForm,setBackInStockNotificationFormEmail,submitBackInStockNotificationForm}from"./functions/models/validator/back-in-stock-notification/index.js";export{initContactForm,setContactFormEmail,setContactFormFirstName,setContactFormLastName,setContactFormMessage,setContactFormPhone,submitContactForm}from"./functions/models/validator/contact-form/index.js";export{initCouponCodeForm,removeCouponCodeForm,setCouponCodeFormCouponCode,submitCouponCodeForm}from"./functions/models/validator/coupon-code-form/index.js";export{initCustomerReviewForm,setCustomerReviewFormComment,setCustomerReviewFormStar,setCustomerReviewFormTitle,submitCustomerReviewForm}from"./functions/models/validator/customer-review/index.js";export{initForgotPasswordForm,setForgotPasswordFormEmail,submitForgotPasswordForm}from"./functions/models/validator/forgot-password/index.js";export{initLoginForm,setLoginFormEmail,setLoginFormPassword,submitLoginForm}from"./functions/models/validator/login/index.js";export{initNewsletterSubscriptionForm,setNewsletterSubscriptionFormEmail,setNewsletterSubscriptionFormIsMarketingAccepted,submitNewsletterSubscriptionForm}from"./functions/models/validator/newsletter-subscription/index.js";export{initOrderTrackingForm,setOrderTrackingFormEmail,setOrderTrackingFormOrderNumber,submitOrderTrackingForm}from"./functions/models/validator/order-tracking/index.js";export{initRecoverPasswordForm,setRecoverPasswordFormPassword,setRecoverPasswordFormPasswordAgain,submitRecoverPasswordForm}from"./functions/models/validator/recover-password/index.js";export{initRegisterForm,setRegisterFormBooleanAttribute,setRegisterFormChoiceAttribute,setRegisterFormDateAttribute,setRegisterFormDateTimeAttribute,setRegisterFormEmail,setRegisterFormFirstName,setRegisterFormIsMarketingAccepted,setRegisterFormIsMembershipAgreementAccepted,setRegisterFormLastName,setRegisterFormMultipleChoiceAttribute,setRegisterFormNumericAttribute,setRegisterFormPassword,setRegisterFormPhone,setRegisterFormTextAttribute,submitRegisterForm}from"./functions/models/validator/register/index.js";export{initSmsLoginForm,resendSmsLoginFormCode,setSmsLoginFormCode,setSmsLoginFormEmail,setSmsLoginFormFirstName,setSmsLoginFormIsMarketingAccepted,setSmsLoginFormIsMembershipAgreementAccepted,setSmsLoginFormLastName,setSmsLoginFormPhone,submitSmsLoginForm}from"./functions/models/validator/sms-login/index.js";export{initVerifyPhoneNumberForm,resendVerifyPhoneNumberFormCode,setVerifyPhoneNumberFormCode,submitVerifyPhoneNumberForm}from"./functions/models/validator/verify-phone-number/index.js";export{collectionToArray}from"./functions/others/index.js";export{bs_searchProductById,bs_searchProductsById,initBaseStore}from"./functions/stores/base/index.js";export{addItemToCart,addSelectedtedVariantToCart,changeCartItemQuantity,changeItemQuantity,createPayWithIkasSession,findExistingCartItem,findExistingCartItemWithProduct,getAcceptedOffers,getCart,getCheckoutUrlFromCartStore,hasCart,isOrderLineItemAutoCreated,removeCart,removeCouponCode,removeItem,saveCouponCode,setCart,waitForCartStoreInit,windowAddToCart}from"./functions/stores/cart/index.js";export{activateCustomer,addProductToFavorites,canCustomerCreateEmailSubscription,checkEmail,clearAccountInfoForm,clearContactForm,clearCouponCodeForm,clearForgotPasswordForm,clearLoginForm,clearNewsletterSubscriptionForm,clearOrderTrackingForm,clearRecoverPasswordForm,clearRegisterForm,closeIkasStorefrontWidget,createEmailSubscription,cs_getLoyaltyCustomerInfo,cs_listEarningMethods,cs_listLoyaltyProgramPointHistory,cs_listLoyaltyProgramTiers,cs_listSpendingMethodsByCartId,cs_removeLoyaltyPointsFromCart,cs_useLoyaltyPoints,customerLogin,customerStore_onProductView,customerToAnalyticsCustomer,deactivateCustomer,deleteCustomerAddress,exportCustomerPersonalData,forgotPassword,getAccountInfoForm,getContactForm,getCouponCodeForm,getCustomerAttributes,getCustomerConsentGranted,getDigitalProductFileDownloadUrl,getEmptyAddressForm,getFavoriteProducts,getFavoriteProductsIds,getForgotPasswordForm,getLastViewedProducts,getLoginForm,getNewsletterSubscriptionForm,getOrder,getOrderByEmail,getOrderDetailsOfPage,getOrderProductFiles,getOrderRefundSettings,getOrderTrackingForm,getOrderTransactions,getOrders,getRecoverPasswordForm,getRegisterForm,getSmsLoginForm,getVerifyPhoneNumberForm,handleCustomerConsentGrant,handleSocialLogin,hasCustomer,initCustomerStore,isFavoriteProduct,logout,openIkasStorefrontWidget,recoverPassword,refundOrder,register,removeCustomerConsent,removeProductFromFavorites,resendCustomerActivationMail,resendCustomerPhoneVerificationCode,saveContactForm,saveCustomer,saveCustomerFormData,sendReview,setCaptchaToken,setSavedLastViewedProductsResponse,socialLogin,socialLoginToken,validateCustomerPhoneVerificationCode,validateOTPCode,waitForCaptchaTokenInit,waitForCustomerStoreInit}from"./functions/stores/customer/index.js";export{I18n,i18n}from"./i18n/index.js";export{Router,router,withRoutePrefix}from"./router/index.js";export{baseStore}from"./stores/base/index.js";export{CART_LS_KEY,cartStore}from"./stores/cart/index.js";export{customerStore}from"./stores/customer/index.js";export{DYNAMIC_STYLE_PROPERTIES,SIZE_PROPERTIES,getFormattedBorder,getFormattedBorderRadiusBottomLeftSize,getFormattedBorderRadiusBottomRightSize,getFormattedBorderRadiusSize,getFormattedBorderRadiusTopLeftSize,getFormattedBorderRadiusTopRightSize,getFormattedBorderWidthSizeSize,getFormattedBottomSize,getFormattedFontSize,getFormattedGapSize,getFormattedGridTemplateColumns,getFormattedHeightSize,getFormattedLeftSize,getFormattedLetterSpacingSize,getFormattedLineHeightSize,getFormattedMarginBottomSize,getFormattedMarginLeftSize,getFormattedMarginRightSize,getFormattedMarginTopSize,getFormattedMaxHeightSize,getFormattedMaxWidthSize,getFormattedMinHeightSize,getFormattedMinWidthSize,getFormattedPaddingBottomSize,getFormattedPaddingLeftSize,getFormattedPaddingMarginSize,getFormattedPaddingRightSize,getFormattedPaddingSize,getFormattedPaddingTopSize,getFormattedRightSize,getFormattedShadow,getFormattedSize,getFormattedStyleVariable,getFormattedTopSize,getFormattedWidthSize}from"./theme/styles/index.js";export{isBrowser,isDefined,isEmpty,isNotEmpty}from"./utils/blueprint.js";export{HttpMethod,get,httpRequest,post}from"./utils/fetch.js";export{JsObject}from"./utils/object-wrapper.js";export{setAPIClientConfig}from"./packages/storefront-api/src/index.js";export{IkasStorefrontConfig,escapeForJSON,unescapeFromJSON}from"./packages/storefront-config/src/index.js";import"./packages/storefront-models/src/models/merchant-settings/index.js";export{default as IkasAPIClientConfig}from"./packages/storefront-api-client/src/config/index.js";export{anl_addToCart}from"./analytics/analytics-functions/addToCart.js";export{anl_addToWishlist}from"./analytics/analytics-functions/addToWishlist.js";export{anl_completeRegistration}from"./analytics/analytics-functions/completeRegistration.js";export{anl_contactForm}from"./analytics/analytics-functions/contactForm.js";export{anl_createEmailSubscription}from"./analytics/analytics-functions/createEmailSubscription.js";export{anl_customerLogin}from"./analytics/analytics-functions/customerLogin.js";export{anl_customerLogout}from"./analytics/analytics-functions/customerLogout.js";export{anl_customerVisit}from"./analytics/analytics-functions/customerVisit.js";export{anl_pageView}from"./analytics/analytics-functions/pageView.js";export{anl_productView}from"./analytics/analytics-functions/productView.js";export{anl_removeFromCart}from"./analytics/analytics-functions/removeFromCart.js";export{anl_search}from"./analytics/analytics-functions/search.js";export{anl_viewBrand}from"./analytics/analytics-functions/viewBrand.js";export{anl_viewCart}from"./analytics/analytics-functions/viewCart.js";export{anl_viewCategory}from"./analytics/analytics-functions/viewCategory.js";export{anl_viewListing}from"./analytics/analytics-functions/viewListing.js";export{anl_viewSearchResults}from"./analytics/analytics-functions/viewSearchResults.js";export{anl_viewStorefrontPopup}from"./analytics/analytics-functions/viewStorefrontPopup.js";import*as t from'./ext/animejs/lib/anime.esm.js';export{t as AnimeJS};export{cloneDeep,reaction}from"./utils/helper.js";export{APIErrorCode,APIResponse}from"./packages/storefront-api-client/src/utils/api.js";
1
+ export{Analytics}from"./analytics/analytics.js";export{initIkasEvents}from"./analytics/events.js";export{EMPTY_STRING,NULL,UNDEFINED}from"./externals/index.js";export{apiListProductBrand}from"./functions/api/brand/index.js";export{apiListCategory}from"./functions/api/category/index.js";export{apiGetLoyaltyCustomerInfo,apiGetStorefrontWidgetSettings,apiListEarningMethods,apiListLoyaltyProgramPointHistory,apiListLoyaltyProgramTiers,apiListSpendingMethodsByCartId,apiRemoveLoyaltyPointsFromCart,apiUseLoyaltyPoints}from"./functions/api/loyalty/index.js";export{apiListStorefrontPopup}from"./functions/api/popup/index.js";export{apiSearchProducts}from"./functions/api/product/index.js";export{getAttributeDetailValues}from"./functions/models/attribute-detail/index.js";export{getAttributeListValues}from"./functions/models/attribute-list/index.js";export{createIkasBaseModel}from"./functions/models/base/index.js";export{getIkasBlogFormattedDate,getIkasBlogHref}from"./functions/models/blog/index.js";export{createIkasBlogCategory,getIkasBlogCategoryHref}from"./functions/models/blog/category/index.js";export{initIkasBlogCategory}from"./functions/models/blog/category/init.js";export{initIkasBlog}from"./functions/models/blog/init.js";export{getBlogCategoryListInitialData,getBlogCategoryListNextPage,getBlogCategoryListPage,getBlogCategoryListPageCount,getBlogCategoryListPrevPage,hasBlogCategoryListNextPage,hasBlogCategoryListPrevPage,isBlogCategoryListStatic}from"./functions/models/blog-category-list/index.js";export{initBlogCategoryList}from"./functions/models/blog-category-list/init.js";export{getBlogListInitialData,getBlogListNextPage,getBlogListPage,getBlogListPageCount,getBlogListPrevPage,hasBlogListNextPage,hasBlogListPrevPage,isBlogListStatic}from"./functions/models/blog-list/index.js";export{initBlogList}from"./functions/models/blog-list/init.js";export{getIkasBrandHref}from"./functions/models/brand/index.js";export{initIkasBrand}from"./functions/models/brand/init.js";export{getBrandListInitialData,getBrandListNextPage,getBrandListPage,getBrandListPageCount,getBrandListPrevPage,hasBrandListNextPage,hasBrandListPrevPage,isBrandListStatic}from"./functions/models/brand-list/index.js";export{initBrandList}from"./functions/models/brand-list/init.js";export{acceptProductOffer,isAcceptedProductOffer,rejectProductOffer}from"./functions/models/campaign-offer/index.js";export{getCategoryPath,getIkasCategoryHref}from"./functions/models/category/index.js";export{initIkasCategory}from"./functions/models/category/init.js";export{getCategoryListInitialData,getCategoryListNextPage,getCategoryListPage,getCategoryListPageCount,getCategoryListPrevPage,hasCategoryListNextPage,hasCategoryListPrevPage,isCategoryListStatic}from"./functions/models/category-list/index.js";export{initCategoryList}from"./functions/models/category-list/init.js";export{getIkasCategoryPathItemHref,getIkasCategoryPathItemSlug}from"./functions/models/category/path-item/index.js";export{initIkasCategoryPathItem}from"./functions/models/category/path-item/init.js";export{getCheckoutTotalFinalPrice,isCheckoutComplete}from"./functions/models/checkout/index.js";export{initIkasCountry}from"./functions/models/country/init.js";export{getCustomerBasicInfo,isCustomerSubscribed}from"./functions/models/customer/index.js";export{clearIkasCustomerAddressForm,getCustomerAddressText,getCustomerAddressValidationResult,getIkasCustomerAddressForm,isValidCustomerAddress}from"./functions/models/customer/address/index.js";export{getCustomerAttributeAccountPagePermission,getCustomerAttributeRegisterPageRequirement}from"./functions/models/customer/attribute/index.js";export{initIkasCustomerAttribute}from"./functions/models/customer/attribute/init.js";export{getIkasCustomerReviewFormattedDate}from"./functions/models/customer/review/index.js";export{initIkasCustomerReview}from"./functions/models/customer/review/init.js";export{getCustomerReviewListInitialData,getCustomerReviewListNextPage,getCustomerReviewListPage,getCustomerReviewListPageCount,getCustomerReviewListPrev,getProductCustomerReviews,hasCustomerReviewListNextPage,hasCustomerReviewListPrevPage}from"./functions/models/customer-review-list/index.js";export{initCustomerReviewList}from"./functions/models/customer-review-list/init.js";export{getCustomerReviewSummaryListInitialData,getCustomerReviewSummaryListNextPage,getCustomerReviewSummaryListPage,getCustomerReviewSummaryListPrev,hasCustomerReviewSummaryListNextPage,hasCustomerReviewSummaryListPrevPage}from"./functions/models/customer-review-summary-list/index.js";export{initCustomerReviewSummaryList}from"./functions/models/customer-review-summary-list/init.js";export{getIkasFilterCategoryHref,getIkasFilterCategorySlug}from"./functions/models/filter-category/index.js";export{initIkasHTMLMetaData,setHTMLMetaDataTranslations}from"./functions/models/html-meta-data/init.js";export{initThemeDatePicker,themeDatePickerGetDate,themeDatePickerGetDaysOfMonth,themeDatePickerGetDaysOfWeekShort,themeDatePickerGetFullYear,themeDatePickerGetHours,themeDatePickerGetMinutes,themeDatePickerGetMonth,themeDatePickerGetMonthList,themeDatePickerGetMonthName,themeDatePickerGetViewFullYear,themeDatePickerGetViewMonth,themeDatePickerGetWeekFirstDay,themeDatePickerOnChange,themeDatePickerOnDayChange,themeDatePickerOnHoursChange,themeDatePickerOnMinutesChange,themeDatePickerOnViewFullYearChange,themeDatePickerOnViewMonthChange,themeDatePickerSetViewNextMonth,themeDatePickerSetViewPrevMonth}from"./functions/models/ikas-theme/date-picker.js";export{createMediaSrcset,getDefaultSrc,getSrc,getThumbnailSrc}from"./functions/models/image/index.js";export{initIkasMerchantSettings}from"./functions/models/merchant-settings/init.js";export{getIkasOrderCouponAdjustment,getIkasOrderCustomerFullName,getIkasOrderDisplayedAdjustments,getIkasOrderDisplayedPackages,getIkasOrderDistinctItemCount,getIkasOrderFormattedDate,getIkasOrderFormattedOrderedAt,getIkasOrderFormattedShippingTotal,getIkasOrderFormattedTotalFinalPrice,getIkasOrderFormattedTotalPrice,getIkasOrderFormattedTotalTax,getIkasOrderHref,getIkasOrderNonCouponAdjustments,getIkasOrderPackageStatusTranslation,getIkasOrderProductFiles,getIkasOrderRefundableItems,getIkasOrderRefundedItems,getIkasOrderShippingTotal,getIkasOrderTotalItemCount,getIkasOrderTotalTax,getIkasOrderUnfullfilledItems,getIkasOrderVariantNames,hasIkasOrderCustomer,hasValidIkasOrderCustomerEmail,initIkasOrder,isIkasOrderRefundable}from"./functions/models/order/index.js";export{createOrderAddress,getOrderAddressText,getOrderAddressValidationResult,isValidOrderAddress}from"./functions/models/order/address/index.js";export{getOrderAdjustmentDisplayName,getOrderAdjustmentFormattedAmount,getOrderAdjustmentIsDecrement}from"./functions/models/order/adjustment/index.js";export{getOrderGiftPackageLineFormattedPrice}from"./functions/models/order/gift-package/index.js";export{editOrderLineItem,getOrderLineItemFinalPriceWithQuantity,getOrderLineItemFormattedDiscountPrice,getOrderLineItemFormattedFinalPrice,getOrderLineItemFormattedFinalPriceWithQuantity,getOrderLineItemFormattedFinalUnitPrice,getOrderLineItemFormattedOverridenPriceWithQuantity,getOrderLineItemFormattedPrice,getOrderLineItemFormattedPriceWithQuantity,getOrderLineItemFormattedTax,getOrderLineItemFormattedUnitPrice,getOrderLineItemOverridenPriceWithQuantity,getOrderLineItemPriceWithQuantity,getOrderLineItemRefundQuantity,getOrderLineItemTax,getOrderLineItemUnitPriceText,hasOrderLineItemDiscount,setOrderLineItemRefundQuantity}from"./functions/models/order/line-item/index.js";export{getIkasOrderLineVariantHref,getIkasOrderLineVariantMainImage}from"./functions/models/order/line-item/variant/index.js";export{getIkasOrderLineBundleVariantMainImage}from"./functions/models/order/line-item/variant/bundle-product/bundle-variant/index.js";export{getIkasOrderLineVariantNameSlug,getIkasOrderLineVariantTypeSlug}from"./functions/models/order/line-item/variant/value/index.js";export{getOrderTransactionFormattedAmount,getOrderTransactionPaymentMethodTranslation}from"./functions/models/order/transaction/index.js";export{getPaymentGatewayCalculatedAdditionalPrices}from"./functions/models/payment-gateway/index.js";export{initIkasPaymentGateway}from"./functions/models/payment-gateway/init.js";export{addIkasProductToFavorites,clearIkasProductCustomerReviewForm,getBundleProductFinalPrice,getBundleProductFinalPriceWithQuantity,getBundleProductFormattedFinalPrice,getBundleProductFormattedFinalPriceWithQuantity,getBundleProductFormattedSellPrice,getBundleProductFormattedSellPriceWithQuantity,getBundleProductSellPrice,getBundleProductSellPriceWithQuantity,getBundleProductsOfVariant,getDisplayedProductGroups,getDisplayedProductVariantTypes,getGroupedAttributeValues,getIkasProductCustomerReviewForm,getMainProductVariantType,getMainProductVariantValue,getProductAvailableStockLocations,getProductCampaigns,getProductCategoryPath,getProductFirstCategory,getProductHref,getProductOptionSet,getSelectedProductVariant,getSelectedProductVariantHref,hasProductStock,hasProductValidOptionValues,hasProductVariant,initBundleProducts,initProductOnBrowser,isAddToCartEnabled,isBundleProductQuantityEditable,isCustomerReviewEnabled,isCustomerReviewLoginRequired,isFavoriteIkasProduct,removeIkasProductFromFavorites,selectVariantValue,setBundleProductQuantity,setOptionRealPrices,setProductOfBundleProduct,shouldDisplayBundleProductPrice}from"./functions/models/product/index.js";export{getProductFromStore,initIkasProduct,initIkasProductExtraFields,productVariantStore}from"./functions/models/product/init.js";export{clearProductListFilter,clearProductListFilters,enableProductListSuggestions,getProductListCurrencyCode,getProductListCurrencySymbol,getProductListFilterCategories,getProductListInitialData,getProductListNextPage,getProductListPage,getProductListPrevPage,getProductListSortOptions,getProductListSortTypeTranslation,getProductListSuggestionHref,getSelectedFilterValues,handleFilterValueClick,handleNumberRangeOptionClick,hasProductListAppliedFilters,hasProductListFeaturedSortEnabled,hasProductListNextPage,hasProductListPrevPage,initProductList,initProductListOnBrowser,isProductListDiscounted,isProductListFilterable,isProductListFiltered,isProductListLastViewed,isProductListPurchasedTogether,isProductListRecommended,isProductListRelatedProducts,isProductListSearch,isProductListStatic,isProductListViewedTogether,onFilterCategoryClick,productListToggleFilterCollapsed,searchProductList,setProductListIsFilteredForProducts,setProductListIsStaticForProducts,setProductListVisiblePage,setSortType,translateProductListSortType}from"./functions/models/product-list/index.js";export{getIkasProductAttributeProducts,getIkasProductAttributeTableValue,getIkasProductAttrributeProductIds}from"./functions/models/product/attribute-value/index.js";export{initIkasProductAttributeValue}from"./functions/models/product/attribute-value/init.js";export{applyQueryParamForFilter,clearFilter,filterParseRangeStr,filterRangeToId,filterToInput,getFilterDisplayedValues,getFilterKeyList,getFilterValueList,getIkasFilterHref,getIkasFilterThumbnailImage,initIkasProductFilter,isBoxFilter,isCustomValueFilter,isListFilter,isStockFilter,isSwatchFilter,onNumberRangeFilterChange,onNumberRangeFilterOptionClick,selectFilterValue}from"./functions/models/product/filter/index.js";export{getDisplayedOptions,hasValidProductOptionSetValues,initOptionValues,initProductOptionSetValues,setChildOptions}from"./functions/models/product/option-set/index.js";export{initIkasProductOptionSet}from"./functions/models/product/option-set/init.js";export{clearValues,getDisplayedChildOptions,getProductOptionFormattedLabel,getProductOptionFormattedPrice,getTextValue,hasError,hasValidProductOptionValues,initIkasProductOptionValues,isCheckboxOption,isChecked,isChoiceOption,isChoiceOptionBoxType,isChoiceOptionSelectType,isChoiceOptionSwatchType,isColorPickerOption,isDatePickerOption,isFileOption,isImageOption,isProductOptionSelectValueSelected,isTextAreaOption,isTextOption,productOptionFileUpload,selectValue,setCheckboxValue,setTextValue,setValues}from"./functions/models/product/option-set/option/index.js";export{initIkasProductOption}from"./functions/models/product/option-set/option/init.js";export{clearProductVariantBackInStockForm,getGroupedAttributeValuesForVariant,getProductVariantAppliedCampaignAmount,getProductVariantB2bPriceRule,getProductVariantBackInStockForm,getProductVariantBundlePrice,getProductVariantCampaignOffersDiscountPercentage,getProductVariantCampaignPrice,getProductVariantDiscountAmount,getProductVariantDiscountPercentage,getProductVariantDiscountPrice,getProductVariantFinalPrice,getProductVariantFinalPriceWithCampaignOffers,getProductVariantFormattedBuyPrice,getProductVariantFormattedCampaignPrice,getProductVariantFormattedDiscountAmount,getProductVariantFormattedDiscountPrice,getProductVariantFormattedFinalPrice,getProductVariantFormattedFinalPriceWithCampaignOffers,getProductVariantFormattedSellPrice,getProductVariantFormattedSellPriceWithCampaignOffers,getProductVariantIsBackInStockCustomerLoginRequired,getProductVariantIsBackInStockEnabled,getProductVariantMainImage,getProductVariantPrice,getProductVariantSellPrice,getProductVariantSellPriceWithCampaignOffers,getProductVariantUnitPriceText,hasBundleSettings,hasProductVariantDiscount,hasProductVariantStock,saveProductVariantBackInStockReminder}from"./functions/models/product/variant/index.js";export{initIkasProductVariant}from"./functions/models/product/variant/init.js";export{getIkasProductDiscountPercentage,getIkasProductPriceDiscountAmount,getIkasProductPriceFinalPrice,hasIkasProductPriceDiscount}from"./functions/models/product/variant/price/index.js";export{isRaffleAvailable}from"./functions/models/raffle/index.js";export{initIkasRaffle}from"./functions/models/raffle/init.js";export{initIkasState}from"./functions/models/state/init.js";export{getIkasVariantTypeSlug,isIkasVariantTypeColorSelection}from"./functions/models/variant-type/index.js";export{initIkasVariantType}from"./functions/models/variant-type/init.js";export{getIkasVariantValueSlug,getIkasVariantValueThumbnailImage,isColorVariantValue,isImageVariantValue,isTextVariantValue}from"./functions/models/variant-type/variant-value/index.js";export{FORM_ITEM_DEFAULT_VALUE,validateValue}from"./functions/models/validator/index.js";export{initAccountInfoForm,setAccountInfoFormFirstName,setAccountInfoFormLastName,setAccountInfoFormPhone,submitAccountInfoForm}from"./functions/models/validator/account-info/index.js";export{initAddressForm,setAddressFormAddressLine1,setAddressFormAddressLine2,setAddressFormCity,setAddressFormCompany,setAddressFormCountry,setAddressFormDistrict,setAddressFormFirstName,setAddressFormIdentityNumber,setAddressFormLastName,setAddressFormPhone,setAddressFormPostalCode,setAddressFormRegion,setAddressFormState,setAddressFormTaxNumber,setAddressFormTaxOffice,setAddressFormTitle,submitAddressForm}from"./functions/models/validator/address/index.js";export{initBackInStockNotificationForm,setBackInStockNotificationFormEmail,submitBackInStockNotificationForm}from"./functions/models/validator/back-in-stock-notification/index.js";export{initContactForm,setContactFormEmail,setContactFormFirstName,setContactFormLastName,setContactFormMessage,setContactFormPhone,submitContactForm}from"./functions/models/validator/contact-form/index.js";export{initCouponCodeForm,removeCouponCodeForm,setCouponCodeFormCouponCode,submitCouponCodeForm}from"./functions/models/validator/coupon-code-form/index.js";export{initCustomerReviewForm,setCustomerReviewFormComment,setCustomerReviewFormStar,setCustomerReviewFormTitle,submitCustomerReviewForm}from"./functions/models/validator/customer-review/index.js";export{initForgotPasswordForm,setForgotPasswordFormEmail,submitForgotPasswordForm}from"./functions/models/validator/forgot-password/index.js";export{initLoginForm,setLoginFormEmail,setLoginFormPassword,submitLoginForm}from"./functions/models/validator/login/index.js";export{initNewsletterSubscriptionForm,setNewsletterSubscriptionFormEmail,setNewsletterSubscriptionFormIsMarketingAccepted,submitNewsletterSubscriptionForm}from"./functions/models/validator/newsletter-subscription/index.js";export{initOrderTrackingForm,setOrderTrackingFormEmail,setOrderTrackingFormOrderNumber,submitOrderTrackingForm}from"./functions/models/validator/order-tracking/index.js";export{initRecoverPasswordForm,setRecoverPasswordFormPassword,setRecoverPasswordFormPasswordAgain,submitRecoverPasswordForm}from"./functions/models/validator/recover-password/index.js";export{initRegisterForm,setRegisterFormBooleanAttribute,setRegisterFormChoiceAttribute,setRegisterFormDateAttribute,setRegisterFormDateTimeAttribute,setRegisterFormEmail,setRegisterFormFirstName,setRegisterFormIsMarketingAccepted,setRegisterFormIsMembershipAgreementAccepted,setRegisterFormLastName,setRegisterFormMultipleChoiceAttribute,setRegisterFormNumericAttribute,setRegisterFormPassword,setRegisterFormPhone,setRegisterFormTextAttribute,submitRegisterForm}from"./functions/models/validator/register/index.js";export{initSmsLoginForm,resendSmsLoginFormCode,setSmsLoginFormCode,setSmsLoginFormEmail,setSmsLoginFormFirstName,setSmsLoginFormIsMarketingAccepted,setSmsLoginFormIsMembershipAgreementAccepted,setSmsLoginFormLastName,setSmsLoginFormPhone,submitSmsLoginForm}from"./functions/models/validator/sms-login/index.js";export{initVerifyPhoneNumberForm,resendVerifyPhoneNumberFormCode,setVerifyPhoneNumberFormCode,submitVerifyPhoneNumberForm}from"./functions/models/validator/verify-phone-number/index.js";export{collectionToArray}from"./functions/others/index.js";export{bs_searchProductById,bs_searchProductsById,initBaseStore}from"./functions/stores/base/index.js";export{addItemToCart,addSelectedtedVariantToCart,changeCartItemQuantity,changeItemQuantity,createPayWithIkasSession,findExistingCartItem,findExistingCartItemWithProduct,getAcceptedOffers,getCart,getCheckoutUrlFromCartStore,hasCart,isOrderLineItemAutoCreated,removeCart,removeCouponCode,removeItem,saveCouponCode,setCart,waitForCartStoreInit,windowAddToCart}from"./functions/stores/cart/index.js";export{activateCustomer,addProductToFavorites,canCustomerCreateEmailSubscription,checkEmail,clearAccountInfoForm,clearContactForm,clearCouponCodeForm,clearForgotPasswordForm,clearLoginForm,clearNewsletterSubscriptionForm,clearOrderTrackingForm,clearRecoverPasswordForm,clearRegisterForm,closeIkasStorefrontWidget,createEmailSubscription,cs_getLoyaltyCustomerInfo,cs_listEarningMethods,cs_listLoyaltyProgramPointHistory,cs_listLoyaltyProgramTiers,cs_listSpendingMethodsByCartId,cs_removeLoyaltyPointsFromCart,cs_useLoyaltyPoints,customerLogin,customerStore_onProductView,customerToAnalyticsCustomer,deactivateCustomer,deleteCustomerAddress,exportCustomerPersonalData,forgotPassword,getAccountInfoForm,getContactForm,getCouponCodeForm,getCustomerAttributes,getCustomerConsentGranted,getDigitalProductFileDownloadUrl,getEmptyAddressForm,getFavoriteProducts,getFavoriteProductsIds,getForgotPasswordForm,getLastViewedProducts,getLoginForm,getNewsletterSubscriptionForm,getOrder,getOrderByEmail,getOrderDetailsOfPage,getOrderProductFiles,getOrderRefundSettings,getOrderTrackingForm,getOrderTransactions,getOrders,getRecoverPasswordForm,getRegisterForm,getSmsLoginForm,getVerifyPhoneNumberForm,handleCustomerConsentGrant,handleSocialLogin,hasCustomer,initCustomerStore,isFavoriteProduct,logout,openIkasStorefrontWidget,recoverPassword,refundOrder,register,removeCustomerConsent,removeProductFromFavorites,resendCustomerActivationMail,resendCustomerPhoneVerificationCode,saveContactForm,saveCustomer,saveCustomerFormData,sendReview,setCaptchaToken,setSavedLastViewedProductsResponse,socialLogin,socialLoginToken,validateCustomerPhoneVerificationCode,validateOTPCode,waitForCaptchaTokenInit,waitForCustomerStoreInit}from"./functions/stores/customer/index.js";export{I18n,i18n}from"./i18n/index.js";export{Router,router,withRoutePrefix}from"./router/index.js";export{baseStore}from"./stores/base/index.js";export{CART_LS_KEY,cartStore}from"./stores/cart/index.js";export{customerStore}from"./stores/customer/index.js";export{DYNAMIC_STYLE_PROPERTIES,SIZE_PROPERTIES,getFormattedBorder,getFormattedBorderRadiusBottomLeftSize,getFormattedBorderRadiusBottomRightSize,getFormattedBorderRadiusSize,getFormattedBorderRadiusTopLeftSize,getFormattedBorderRadiusTopRightSize,getFormattedBorderWidthSizeSize,getFormattedBottomSize,getFormattedFontSize,getFormattedGapSize,getFormattedGridTemplateColumns,getFormattedHeightSize,getFormattedLeftSize,getFormattedLetterSpacingSize,getFormattedLineHeightSize,getFormattedMarginBottomSize,getFormattedMarginLeftSize,getFormattedMarginRightSize,getFormattedMarginTopSize,getFormattedMaxHeightSize,getFormattedMaxWidthSize,getFormattedMinHeightSize,getFormattedMinWidthSize,getFormattedPaddingBottomSize,getFormattedPaddingLeftSize,getFormattedPaddingMarginSize,getFormattedPaddingRightSize,getFormattedPaddingSize,getFormattedPaddingTopSize,getFormattedRightSize,getFormattedShadow,getFormattedSize,getFormattedStyleVariable,getFormattedTopSize,getFormattedWidthSize}from"./theme/styles/index.js";export{isBrowser,isDefined,isEmpty,isNotEmpty}from"./utils/blueprint.js";export{IkasComponentRenderer}from"./utils/component-renderer.js";export{HttpMethod,get,httpRequest,post}from"./utils/fetch.js";export{JsObject}from"./utils/object-wrapper.js";export{setAPIClientConfig}from"./packages/storefront-api/src/index.js";export{IkasStorefrontConfig,escapeForJSON,unescapeFromJSON}from"./packages/storefront-config/src/index.js";import"./packages/storefront-models/src/models/merchant-settings/index.js";export{default as IkasAPIClientConfig}from"./packages/storefront-api-client/src/config/index.js";export{anl_addToCart}from"./analytics/analytics-functions/addToCart.js";export{anl_addToWishlist}from"./analytics/analytics-functions/addToWishlist.js";export{anl_completeRegistration}from"./analytics/analytics-functions/completeRegistration.js";export{anl_contactForm}from"./analytics/analytics-functions/contactForm.js";export{anl_createEmailSubscription}from"./analytics/analytics-functions/createEmailSubscription.js";export{anl_customerLogin}from"./analytics/analytics-functions/customerLogin.js";export{anl_customerLogout}from"./analytics/analytics-functions/customerLogout.js";export{anl_customerVisit}from"./analytics/analytics-functions/customerVisit.js";export{anl_pageView}from"./analytics/analytics-functions/pageView.js";export{anl_productView}from"./analytics/analytics-functions/productView.js";export{anl_removeFromCart}from"./analytics/analytics-functions/removeFromCart.js";export{anl_search}from"./analytics/analytics-functions/search.js";export{anl_viewBrand}from"./analytics/analytics-functions/viewBrand.js";export{anl_viewCart}from"./analytics/analytics-functions/viewCart.js";export{anl_viewCategory}from"./analytics/analytics-functions/viewCategory.js";export{anl_viewListing}from"./analytics/analytics-functions/viewListing.js";export{anl_viewSearchResults}from"./analytics/analytics-functions/viewSearchResults.js";export{anl_viewStorefrontPopup}from"./analytics/analytics-functions/viewStorefrontPopup.js";import*as t from'./ext/animejs/lib/anime.esm.js';export{t as AnimeJS};export{cloneDeep,reaction}from"./utils/helper.js";export{APIErrorCode,APIResponse}from"./packages/storefront-api-client/src/utils/api.js";
@@ -0,0 +1,8 @@
1
+ interface IkasComponentRendererProps {
2
+ components?: any[];
3
+ parentProps?: Record<string, any>;
4
+ }
5
+ export declare function IkasComponentRenderer({ components, parentProps }: IkasComponentRendererProps): import("preact").VNode<import("preact").ClassAttributes<HTMLDivElement> & {
6
+ ref: (el: HTMLDivElement | null) => void;
7
+ }> | null;
8
+ export {};
@@ -0,0 +1 @@
1
+ import{createElement as r}from'./../ext/preact/dist/preact.mjs.js';import{useRef as n,useCallback as t}from'./../ext/preact/hooks/dist/hooks.mjs.js';function e(e){var o=e.components,a=e.parentProps,i=void 0===a?{}:a,c=n([]),s=t(function(r){if(r&&Array.isArray(o)){c.current.forEach(function(r){return r()}),c.current=[],r.innerHTML="";for(var n=0,t=o;n<t.length;n++){var e=t[n],a=document.createElement("div"),s="test-".concat(Math.random().toString(36).substring(2,15));if(a.innerHTML=e.r(i,{},{mainId:s}),r.appendChild(a),e.l){var d=e.l('[id="'.concat(s,'"]'),i,{},{mainId:'[id="'.concat(s,'"]')});"function"==typeof d&&c.current.push(d)}}}},[o,i]);return o&&0!==o.length?r("div",{ref:s}):null}export{e as IkasComponentRenderer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/bp-storefront",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
4
4
  "description": "A framework for the ikas blueprint storefronts.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -54,6 +54,7 @@
54
54
  "animejs": "^4.0.2",
55
55
  "lodash": "^4.17.21",
56
56
  "mobx": "^6.12.3",
57
+ "preact": "^10.19.3",
57
58
  "uuid": "^10.0.0"
58
59
  },
59
60
  "types": "./dist/index.d.ts"