@ikas/storefront 6.1.0-beta.340 → 6.1.0-beta.341

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.
@@ -15,7 +15,7 @@ export declare class Analytics {
15
15
  isEmailVerified: boolean | null;
16
16
  isPhoneVerified: boolean | null;
17
17
  orderCount: number | null;
18
- subscriptionStatus: import("@ikas/storefront-models/src/models/customer").IkasCustomerEmailSubscriptionStatus | null;
18
+ subscriptionStatus: import("@ikas/storefront-models/build-cjs/models/customer").IkasCustomerEmailSubscriptionStatus | null;
19
19
  } | null>;
20
20
  static pageView(pageType: IkasThemeJsonPageType): Promise<void>;
21
21
  static productView(productDetail: IkasProduct): Promise<void>;
@@ -101,7 +101,7 @@ export default class MasterPassModel {
101
101
  paymentGatewayId: string;
102
102
  operationType: MasterPassOperationTypeEnum;
103
103
  phoneNumber: string;
104
- }) => Promise<import("@ikas/storefront-api/src/__api/types").MasterPassTokenResponse | undefined>;
104
+ }) => Promise<import("@ikas/storefront-api/build/__api/types").MasterPassTokenResponse | undefined>;
105
105
  phoneNumber: ({ store, checkout, withPlus, }: {
106
106
  store: IkasBaseStore;
107
107
  checkout: IkasCheckout;
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as n}from'./../../../ext/tslib/tslib.es6.js';import*as r from"react";import{reaction as o}from"mobx";import{listStorefrontPopup as i,SortByDirectionEnum as a}from"@ikas/storefront-api";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";import{Analytics as s}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasBaseStore as c}from"../../../store/base.js";import"../../../store/customer/index.js";import"../../../store/cart/index.js";import d from"../../../store/product/index.js";import{POPUP_CONTEXT_UPDATE_EVENT as l}from'./../../../ext/@ikas/popup-script-injector/dist/popup-script-injector.es.js';import{resolveStoreUrl as p,resolveCartUrl as f}from"./common.js";var m=function(n){return t(void 0,void 0,void 0,(function(){var r,o,i,a,l,m,I,w,S,P,y,C,k,b,j,L;return e(this,(function(E){switch(E.label){case 0:return r={popups:n,cartUrl:""},[4,function(){return new Promise((function(t){var e=setInterval((function(){var n=u.getSessionId();n&&(clearInterval(e),t(n))}),100)}))}()];case 1:return E.sent(),(o=u.getSessionId())&&(r.sessionId=o),(i=u.getCdnUrl())&&(r.cdnUrl=i),(a=null===(b=u.getMerchantSettings())||void 0===b?void 0:b.merchantId)&&(r.merchantId=a),(l=p())&&(r.storeUrl=l),(m=f())&&(r.cartUrl=m),(I=u.getCustomerToken())&&(r.customerToken=I),(w=u.getCurrentLocale())&&(r.locale=w),(S=null===(L=null===(j=u.getCurrentRouting())||void 0===j?void 0:j.countryCodes)||void 0===L?void 0:L[0])&&(r.countryCode=S),(P=u.getPriceListId())&&(r.priceListId=P),(y=u.getSalesChannelId())&&(r.salesChannelId=y),T=c.getInstance().customerStore.customer,(C=T?g(T):null)&&(r.customer=C),D=c.getInstance().cartStore.cart,(k=D?h(D):null)&&(r.cart=k),r.services=function(){var n=this,r=c.getInstance();return{searchProducts:function(r){return t(n,void 0,void 0,(function(){var t,n,o;return e(this,(function(e){switch(e.label){case 0:return[4,d.searchProducts(v(r))];case 1:return(null==(t=e.sent())?void 0:t.isSuccess)&&(null===(o=null===(n=t.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.length)?[2,t.data.data]:[2,[]]}}))}))},addItemToCart:function(o){var i=o.product,a=o.variant,u=o.quantity;return t(n,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,r.cartStore.addItem(a,i,null!=u?u:1)];case 1:return[2,{success:!!(null==(t=e.sent())?void 0:t.success)}]}}))}))},saveCustomerFormData:function(o){return t(n,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,r.customerStore.saveCustomerFormData({email:o.email,firstName:o.firstName,lastName:o.lastName,birthDate:o.birthDate||null,phone:o.phone||"",storefrontPopupId:o.popupId,subscriptions:o.subscriptions})];case 1:return t.sent(),[2]}}))}))},getLastViewedProducts:function(){return t(n,void 0,void 0,(function(){var t;return e(this,(function(e){return"function"==typeof(t=r.customerStore).getLastViewedProducts?[2,t.getLastViewedProducts()]:[2,[]]}))}))},formatVariantSellPrice:function(t){return t.formattedSellPrice||""},formatVariantDiscountPrice:function(t){return t.formattedDiscountPrice||null},hasVariantDiscount:function(t){return!!t.hasDiscount},getVariantDiscountPercentage:function(t){var e=t.discountPercentage;return null==e?null:"number"==typeof e?e.toString():e},redirectToProduct:function(t){return!!t.url&&(window.location.href=t.url,!0)},viewPopup:function(t){s.viewStorefrontPopup(t)}}}(),[2,r]}var D,T}))}))};function v(t){var e,n,r,o,i,s=null===(e=t.order)||void 0===e?void 0:e.map((function(t){return{direction:"ASC"===t.direction?a.ASC:a.DESC,type:t.type}}));return{input:{page:null!==(n=t.page)&&void 0!==n?n:1,perPage:null!==(r=t.perPage)&&void 0!==r?r:10,order:s,productIdList:t.productIdList,categoryIdList:t.categoryIdList,priceListId:null!==(o=t.priceListId)&&void 0!==o?o:u.getPriceListId(),salesChannelId:null!==(i=t.salesChannelId)&&void 0!==i?i:u.getSalesChannelId()}}}function g(t){return{email:t.email,firstName:t.firstName,lastName:t.lastName,birthDate:t.birthDate,phone:t.phone,gender:t.gender?String(t.gender):null,customerGroupIds:t.customerGroupIds||[],customerSegmentIds:t.customerSegmentIds||[],subscriptionStatus:t.subscriptionStatus?String(t.subscriptionStatus):null}}function h(t){var e,n,r=[],o=new Set,i=new Set,a=new Set,u=new Set,s=new Set,c=new Set;return t.items.forEach((function(t){var e,n,s,d=t.variant,l=(null==d?void 0:d.productId)||null,p=(null==d?void 0:d.id)||null,f=(null===(e=null==d?void 0:d.brand)||void 0===e?void 0:e.id)||null,m=(null===(n=null==d?void 0:d.categories)||void 0===n?void 0:n.map((function(t){return t.id})).filter(Boolean))||[];r.push({productId:l,variantId:p,brandId:f,categoryIds:m,quantity:t.quantity,finalPrice:t.finalPrice}),l&&o.add(l),p&&i.add(p),f&&a.add(f),m.forEach((function(t){return t&&u.add(t)})),(null===(s=t.discount)||void 0===s?void 0:s.campaignOfferId)&&c.add(t.discount.campaignOfferId)})),null===(e=t.campaignOffers)||void 0===e||e.forEach((function(t){t.campaignOfferId&&c.add(t.campaignOfferId)})),null===(n=t.orderAdjustments)||void 0===n||n.forEach((function(t){t.campaignId&&s.add(t.campaignId)})),{totalPrice:t.totalPrice,totalFinalPrice:t.totalFinalPrice,itemCount:t.itemCount,itemQuantity:t.itemQuantity,currencyCode:t.currencyCode||null,lines:r,productIds:Array.from(o),variantIds:Array.from(i),brandIds:Array.from(a),categoryIds:Array.from(u),appliedCampaignIds:Array.from(s),appliedCampaignOfferIds:Array.from(c),couponCode:t.couponCode||null}}function I(t){"undefined"!=typeof window&&(window.ikasPopupConfig&&(void 0!==t.customer&&(window.ikasPopupConfig.customer=t.customer),void 0!==t.cart&&(window.ikasPopupConfig.cart=t.cart),void 0!==t.customerToken&&(window.ikasPopupConfig.customerToken=t.customerToken||void 0)),"function"!=typeof window.updateIkasPopupContext?window.dispatchEvent(new CustomEvent(l,{detail:t})):window.updateIkasPopupContext(t))}function w(a){var s=this;a.router;var d=a.pageSpecificDataId,l=a.pageType;r.useEffect((function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var r,a=!1,d=[],l=function(t,e){if(function(t){t.setAttribute("data-ikas-popup-widget","true"),!t.dataset.ikasPopupWidgetUrl&&t.src&&(t.dataset.ikasPopupWidgetUrl=t.src)}(t),"true"===t.dataset.ikasPopupWidgetLoaded)return e(),function(){};var n=function(){t.dataset.ikasPopupWidgetLoaded="true",e()},r=function(e){console.error("[@ikas/storefront] Failed to load popup widget script",t.src,e)};return t.addEventListener("load",n,{once:!0}),t.addEventListener("error",r,{once:!0}),function(){t.removeEventListener("load",n),t.removeEventListener("error",r)}},p=function(t){var e=window.location.href.includes("http://localhost:3333/")?"http://localhost:9000/popup-script-injector.iife.js":"/sf/assets/popup/popup-script-injector.iife.js";if(e){var n=function(){a||function(t){if("function"==typeof window.startIkasPopupWidget)try{window.startIkasPopupWidget(t)}catch(t){console.error("[@ikas/storefront] Failed to start popup widget",t)}}(t)},o=document.querySelector('script[data-ikas-popup-widget="true"]');if(o)r=l(o,n);else{var i=document.createElement("script");i.src=e,i.defer=!0,r=l(i,n),document.body.appendChild(i)}}},f=function(t){var e=window.location.href.includes("http://localhost:3333/")?"http://localhost:9000/style.css":"/sf/assets/popup/style.css";if(e&&!document.querySelector('link[href="'.concat(e,'"]'))){var n=document.createElement("link");n.rel="stylesheet",n.href=e,n.setAttribute("data-ikas-popup-widget","true");n.addEventListener("error",(function(t){console.error("[@ikas/storefront] Failed to load popup widget CSS",e,t)}),{once:!0}),document.head.appendChild(n)}};return t(s,void 0,void 0,(function(){var r,l,v;return e(this,(function(w){switch(w.label){case 0:return r=u.getStorefrontPopups()||[],[4,(C=r,t(s,void 0,void 0,(function(){var t,r,o,a,u;return e(this,(function(e){switch(e.label){case 0:if(!(t=C.map((function(t){return t.id})).filter(Boolean)).length)return[2,C];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i({idList:t})];case 2:return(null==(r=e.sent())?void 0:r.isSuccess)&&(null===(u=r.data)||void 0===u?void 0:u.length)?(o=r.data,[2,C.map((function(t){var e=o.find((function(e){return e.id===t.id}));return e?n(n({},e),{isFilteredOnServerSide:t.isFilteredOnServerSide}):t}))]):[3,4];case 3:return a=e.sent(),console.error("[@ikas/storefront] Failed to fetch popup details",a),[3,4];case 4:return[2,C]}}))})))];case 1:return l=w.sent(),a?[2]:[4,m(l)];case 2:return v=w.sent(),window.ikasPopupConfig=v,p(v),f(),S=c.getInstance(),P=o((function(){var t=S.customerStore.customer;return t?{email:t.email,gender:t.gender,groupIds:(t.customerGroupIds||[]).join(","),segmentIds:(t.customerSegmentIds||[]).join(","),subscriptionStatus:t.subscriptionStatus}:null}),(function(){var t=S.customerStore.customer;I({customer:t?g(t):null,customerToken:u.getCustomerToken()||null})})),y=o((function(){var t=S.cartStore.cart;return t?{total:t.totalFinalPrice,itemCount:t.itemCount,quantity:t.itemQuantity,productSignature:t.items.map((function(t){var e,n;return"".concat((null===(e=t.variant)||void 0===e?void 0:e.productId)||"",":").concat((null===(n=t.variant)||void 0===n?void 0:n.id)||"",":").concat(t.quantity)})).join("|"),campaignSignature:(t.orderAdjustments||[]).map((function(t){return t.campaignId||""})).join("|"),couponCode:t.couponCode}:null}),(function(){var t=S.cartStore.cart;I({cart:t?h(t):null})})),d.push(P,y),[2]}var S,P,y,C}))})),function(){a=!0,null==r||r(),d.forEach((function(t){return t()})),d=[],"function"==typeof window.destroyIkasPopupWidget&&window.destroyIkasPopupWidget()}}}),[d,l])}export{w as usePopupWidget};
1
+ import{__awaiter as t,__generator as e,__assign as n}from'./../../../ext/tslib/tslib.es6.js';import*as o from"react";import{reaction as r}from"mobx";import{listStorefrontPopup as i,SortByDirectionEnum as a}from"@ikas/storefront-api";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";import{Analytics as s}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasBaseStore as c}from"../../../store/base.js";import"../../../store/customer/index.js";import"../../../store/cart/index.js";import d from"../../../store/product/index.js";import{POPUP_CONTEXT_UPDATE_EVENT as l}from'./../../../ext/@ikas/popup-script-injector/dist/popup-script-injector.es.js';import{resolveStoreUrl as p,resolveCartUrl as f}from"./common.js";var m=["scroll","keydown","pointerdown","touchstart","mousemove"],v=function(n){return t(void 0,void 0,void 0,(function(){var o,r,i,a,l,m,v,I,S,y,P,C,k,b,E,L;return e(this,(function(j){switch(j.label){case 0:return o={popups:n,cartUrl:""},[4,function(){return new Promise((function(t){var e=setInterval((function(){var n=u.getSessionId();n&&(clearInterval(e),t(n))}),100)}))}()];case 1:return j.sent(),(r=u.getSessionId())&&(o.sessionId=r),(i=u.getCdnUrl())&&(o.cdnUrl=i),(a=null===(b=u.getMerchantSettings())||void 0===b?void 0:b.merchantId)&&(o.merchantId=a),(l=p())&&(o.storeUrl=l),(m=f())&&(o.cartUrl=m),(v=u.getCustomerToken())&&(o.customerToken=v),(I=u.getCurrentLocale())&&(o.locale=I),(S=null===(L=null===(E=u.getCurrentRouting())||void 0===E?void 0:E.countryCodes)||void 0===L?void 0:L[0])&&(o.countryCode=S),(y=u.getPriceListId())&&(o.priceListId=y),(P=u.getSalesChannelId())&&(o.salesChannelId=P),D=c.getInstance().customerStore.customer,(C=D?h(D):null)&&(o.customer=C),T=c.getInstance().cartStore.cart,(k=T?w(T):null)&&(o.cart=k),o.services=function(){var n=this,o=c.getInstance();return{searchProducts:function(o){return t(n,void 0,void 0,(function(){var t,n,r;return e(this,(function(e){switch(e.label){case 0:return[4,d.searchProducts(g(o))];case 1:return(null==(t=e.sent())?void 0:t.isSuccess)&&(null===(r=null===(n=t.data)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)?[2,t.data.data]:[2,[]]}}))}))},addItemToCart:function(r){var i=r.product,a=r.variant,u=r.quantity;return t(n,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o.cartStore.addItem(a,i,null!=u?u:1)];case 1:return[2,{success:!!(null==(t=e.sent())?void 0:t.success)}]}}))}))},saveCustomerFormData:function(r){return t(n,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,o.customerStore.saveCustomerFormData({email:r.email,firstName:r.firstName,lastName:r.lastName,birthDate:r.birthDate||null,phone:r.phone||"",storefrontPopupId:r.popupId,subscriptions:r.subscriptions})];case 1:return t.sent(),[2]}}))}))},getLastViewedProducts:function(){return t(n,void 0,void 0,(function(){var t;return e(this,(function(e){return"function"==typeof(t=o.customerStore).getLastViewedProducts?[2,t.getLastViewedProducts()]:[2,[]]}))}))},formatVariantSellPrice:function(t){return t.formattedSellPrice||""},formatVariantDiscountPrice:function(t){return t.formattedDiscountPrice||null},hasVariantDiscount:function(t){return!!t.hasDiscount},getVariantDiscountPercentage:function(t){var e=t.discountPercentage;return null==e?null:"number"==typeof e?e.toString():e},redirectToProduct:function(t){return!!t.url&&(window.location.href=t.url,!0)},viewPopup:function(t){s.viewStorefrontPopup(t)}}}(),[2,o]}var T,D}))}))};function g(t){var e,n,o,r,i,s=null===(e=t.order)||void 0===e?void 0:e.map((function(t){return{direction:"ASC"===t.direction?a.ASC:a.DESC,type:t.type}}));return{input:{page:null!==(n=t.page)&&void 0!==n?n:1,perPage:null!==(o=t.perPage)&&void 0!==o?o:10,order:s,productIdList:t.productIdList,categoryIdList:t.categoryIdList,priceListId:null!==(r=t.priceListId)&&void 0!==r?r:u.getPriceListId(),salesChannelId:null!==(i=t.salesChannelId)&&void 0!==i?i:u.getSalesChannelId()}}}function h(t){return{email:t.email,firstName:t.firstName,lastName:t.lastName,birthDate:t.birthDate,phone:t.phone,gender:t.gender?String(t.gender):null,customerGroupIds:t.customerGroupIds||[],customerSegmentIds:t.customerSegmentIds||[],subscriptionStatus:t.subscriptionStatus?String(t.subscriptionStatus):null}}function w(t){var e,n,o=[],r=new Set,i=new Set,a=new Set,u=new Set,s=new Set,c=new Set;return t.items.forEach((function(t){var e,n,s,d=t.variant,l=(null==d?void 0:d.productId)||null,p=(null==d?void 0:d.id)||null,f=(null===(e=null==d?void 0:d.brand)||void 0===e?void 0:e.id)||null,m=(null===(n=null==d?void 0:d.categories)||void 0===n?void 0:n.map((function(t){return t.id})).filter(Boolean))||[];o.push({productId:l,variantId:p,brandId:f,categoryIds:m,quantity:t.quantity,finalPrice:t.finalPrice}),l&&r.add(l),p&&i.add(p),f&&a.add(f),m.forEach((function(t){return t&&u.add(t)})),(null===(s=t.discount)||void 0===s?void 0:s.campaignOfferId)&&c.add(t.discount.campaignOfferId)})),null===(e=t.campaignOffers)||void 0===e||e.forEach((function(t){t.campaignOfferId&&c.add(t.campaignOfferId)})),null===(n=t.orderAdjustments)||void 0===n||n.forEach((function(t){t.campaignId&&s.add(t.campaignId)})),{totalPrice:t.totalPrice,totalFinalPrice:t.totalFinalPrice,itemCount:t.itemCount,itemQuantity:t.itemQuantity,currencyCode:t.currencyCode||null,lines:o,productIds:Array.from(r),variantIds:Array.from(i),brandIds:Array.from(a),categoryIds:Array.from(u),appliedCampaignIds:Array.from(s),appliedCampaignOfferIds:Array.from(c),couponCode:t.couponCode||null}}function I(t){"undefined"!=typeof window&&(window.ikasPopupConfig&&(void 0!==t.customer&&(window.ikasPopupConfig.customer=t.customer),void 0!==t.cart&&(window.ikasPopupConfig.cart=t.cart),void 0!==t.customerToken&&(window.ikasPopupConfig.customerToken=t.customerToken||void 0)),"function"!=typeof window.updateIkasPopupContext?window.dispatchEvent(new CustomEvent(l,{detail:t})):window.updateIkasPopupContext(t))}function S(a){var s=this;a.router;var d=a.pageSpecificDataId,l=a.pageType;o.useEffect((function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var o,a,d=!1,l=[],p=function(t,e){if(function(t){t.setAttribute("data-ikas-popup-widget","true"),!t.dataset.ikasPopupWidgetUrl&&t.src&&(t.dataset.ikasPopupWidgetUrl=t.src)}(t),"true"===t.dataset.ikasPopupWidgetLoaded)return e(),function(){};var n=function(){t.dataset.ikasPopupWidgetLoaded="true",e()},o=function(e){console.error("[@ikas/storefront] Failed to load popup widget script",t.src,e)};return t.addEventListener("load",n,{once:!0}),t.addEventListener("error",o,{once:!0}),function(){t.removeEventListener("load",n),t.removeEventListener("error",o)}},f=function(t){var e=window.location.href.includes("http://localhost:3333/")?"http://localhost:9000/popup-script-injector.iife.js":"/sf/assets/popup/popup-script-injector.iife.js";if(e){var n=function(){d||function(t){if("function"==typeof window.startIkasPopupWidget)try{window.startIkasPopupWidget(t)}catch(t){console.error("[@ikas/storefront] Failed to start popup widget",t)}}(t)},r=document.querySelector('script[data-ikas-popup-widget="true"]');if(r)o=p(r,n);else{var i=document.createElement("script");i.src=e,i.defer=!0,o=p(i,n),document.body.appendChild(i)}}},g=function(t){var e=window.location.href.includes("http://localhost:3333/")?"http://localhost:9000/style.css":"/sf/assets/popup/style.css";if(e&&!document.querySelector('link[href="'.concat(e,'"]'))){var n=document.createElement("link");n.rel="stylesheet",n.href=e,n.setAttribute("data-ikas-popup-widget","true");n.addEventListener("error",(function(t){console.error("[@ikas/storefront] Failed to load popup widget CSS",e,t)}),{once:!0}),document.head.appendChild(n)}};return t(s,void 0,void 0,(function(){var o,p,S;return e(this,(function(y){switch(y.label){case 0:return(o=u.getStorefrontPopups()||[]).length?[4,(F=o,t(s,void 0,void 0,(function(){var t,o,r,a,u;return e(this,(function(e){switch(e.label){case 0:if(!(t=F.map((function(t){return t.id})).filter(Boolean)).length)return[2,F];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i({idList:t})];case 2:return(null==(o=e.sent())?void 0:o.isSuccess)&&(null===(u=o.data)||void 0===u?void 0:u.length)?(r=o.data,[2,F.map((function(t){var e=r.find((function(e){return e.id===t.id}));return e?n(n({},e),{isFilteredOnServerSide:t.isFilteredOnServerSide}):t}))]):[3,4];case 3:return a=e.sent(),console.error("[@ikas/storefront] Failed to fetch popup details",a),[3,4];case 4:return[2,F]}}))})))]:[2];case 1:return p=y.sent(),d?[2]:[4,v(p)];case 2:return S=y.sent(),window.ikasPopupConfig=S,b=function(){d||(f(S),g())},j=window,T=!1,D=function(){m.forEach((function(t){return window.removeEventListener(t,A)})),void 0!==E&&"function"==typeof j.cancelIdleCallback&&j.cancelIdleCallback(E),void 0!==L&&window.clearTimeout(L)},A=function(){T||(T=!0,D(),b())},m.forEach((function(t){return window.addEventListener(t,A,{once:!0,passive:!0})})),"function"==typeof j.requestIdleCallback?E=j.requestIdleCallback(A,{timeout:3e3}):L=window.setTimeout(A,1500),a=D,P=c.getInstance(),C=r((function(){var t=P.customerStore.customer;return t?{email:t.email,gender:t.gender,groupIds:(t.customerGroupIds||[]).join(","),segmentIds:(t.customerSegmentIds||[]).join(","),subscriptionStatus:t.subscriptionStatus}:null}),(function(){var t=P.customerStore.customer;I({customer:t?h(t):null,customerToken:u.getCustomerToken()||null})})),k=r((function(){var t=P.cartStore.cart;return t?{total:t.totalFinalPrice,itemCount:t.itemCount,quantity:t.itemQuantity,productSignature:t.items.map((function(t){var e,n;return"".concat((null===(e=t.variant)||void 0===e?void 0:e.productId)||"",":").concat((null===(n=t.variant)||void 0===n?void 0:n.id)||"",":").concat(t.quantity)})).join("|"),campaignSignature:(t.orderAdjustments||[]).map((function(t){return t.campaignId||""})).join("|"),couponCode:t.couponCode}:null}),(function(){var t=P.cartStore.cart;I({cart:t?w(t):null})})),l.push(C,k),[2]}var P,C,k,b,E,L,j,T,D,A,F}))})),function(){d=!0,null==o||o(),null==a||a(),l.forEach((function(t){return t()})),l=[],"function"==typeof window.destroyIkasPopupWidget&&window.destroyIkasPopupWidget()}}}),[d,l])}export{S as usePopupWidget};
@@ -10,5 +10,5 @@ export default class CartStoreAPI {
10
10
  static addItemToCart: (params: AddItemToCartQueryParams) => Promise<APIResponse<IkasCart | null>>;
11
11
  static updateCartCampaignOffer: (params: UpdateCartCampaignOfferQueryParams) => Promise<APIResponse<IkasCart | null>>;
12
12
  static createCart: (params: CreateCartQueryParams) => Promise<APIResponse<IkasCart | null>>;
13
- static createPayWithIkasSessionUrl: (params: CreatePayWithIkasSessionUrlQueryParams) => Promise<APIResponse<import("@ikas/storefront-api/src/__api/types").CreatePayWithIkasSessionUrlResponse | null>>;
13
+ static createPayWithIkasSessionUrl: (params: CreatePayWithIkasSessionUrlQueryParams) => Promise<APIResponse<import("@ikas/storefront-api/build/__api/types").CreatePayWithIkasSessionUrlResponse | null>>;
14
14
  }
@@ -9,8 +9,8 @@ export default class CheckoutStore {
9
9
  static getDigitalProductFileDownloadUrl(params: GetDigitalProductFileDownloadUrlQueryParams): Promise<APIResponse<string>>;
10
10
  static getOrderInvoicePdfUrl(params: GetOrderInvoicePdfUrlQueryParams): Promise<APIResponse<string>>;
11
11
  static retrieveInstallmentInfo(params: RetrieveInstallmentInfoQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api").RetrieveInstallmentInfoResponse>>;
12
- static checkStocks(params: CheckStocksQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/src/__api/types").CheckStocksResponse>>;
13
- static checkCartStocks(params: CheckCartStocksQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/src/__api/types").CheckStocksResponse>>;
12
+ static checkStocks(params: CheckStocksQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").CheckStocksResponse>>;
13
+ static checkCartStocks(params: CheckCartStocksQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").CheckStocksResponse>>;
14
14
  static listCheckoutSettings(params: ListCheckoutSettingsQueryParams): Promise<APIResponse<IkasCheckoutSettings[]>>;
15
15
  static getAvailableShippingCountries(params: GetAvailableShippingCountriesQueryParams): Promise<APIResponse<undefined> | APIResponse<string[]>>;
16
16
  static listStockLocation(params: ListStockLocationQueryParams): Promise<APIResponse<IkasStockLocation[]>>;
@@ -23,6 +23,6 @@ export default class CheckoutStore {
23
23
  static updatePaypalOrder(params: UpdatePayPalOrderParams): Promise<APIResponse<boolean>>;
24
24
  static hepsipayFrameInit(params: HepsipayFrameInitParams): Promise<APIResponse<import("@ikas/storefront-api").HepsipayFrameInitResponse>>;
25
25
  static createIyzicoCheckoutForm(params: CreateIyzicoCheckoutFormParams): Promise<APIResponse<import("@ikas/storefront-api").CreateIyzicoCheckoutFormResponse>>;
26
- static createStripeExpressCheckoutSession(params: CreateStripeExpressCheckoutSessionParams): Promise<APIResponse<import("@ikas/storefront-api/src/__api/types").CreateStripeExpressCheckoutSessionResponse>>;
27
- static updateStripeExpressCheckoutSession(params: UpdateStripeExpressCheckoutSessionParams): Promise<APIResponse<import("@ikas/storefront-api/src/__api/types").StripeExpressCheckoutSessionContextResponse>>;
26
+ static createStripeExpressCheckoutSession(params: CreateStripeExpressCheckoutSessionParams): Promise<APIResponse<import("@ikas/storefront-api/build/__api/types").CreateStripeExpressCheckoutSessionResponse>>;
27
+ static updateStripeExpressCheckoutSession(params: UpdateStripeExpressCheckoutSessionParams): Promise<APIResponse<import("@ikas/storefront-api/build/__api/types").StripeExpressCheckoutSessionContextResponse>>;
28
28
  }
@@ -23,10 +23,10 @@ export default class CustomerStoreAPI {
23
23
  token: string;
24
24
  tokenExpiry: number;
25
25
  } | null>>;
26
- static refreshToken(params: CustomerRefreshTokenQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/src/__api/types").CustomerRefreshTokenResponse>>;
26
+ static refreshToken(params: CustomerRefreshTokenQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").CustomerRefreshTokenResponse>>;
27
27
  static forgotPassword(params: CustomerForgotPasswordQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
28
28
  static recoverPassword(params: CustomerRecoverPasswordQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
29
- static checkEmail(params: CheckCustomerEmailQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/src/__api/types").CustomerCheckResponse>>;
29
+ static checkEmail(params: CheckCustomerEmailQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").CustomerCheckResponse>>;
30
30
  static getCustomer(): Promise<APIResponse<IkasCustomer | null>>;
31
31
  static saveCustomer(params: SaveMyCustomerQueryParams): Promise<APIResponse<IkasCustomer | null>>;
32
32
  static getOrders(params: GetCustomerOrdersQueryParams): Promise<APIResponse<IkasOrder[]>>;
@@ -36,7 +36,7 @@ export default class CustomerStoreAPI {
36
36
  static createOrderRefundRequest(params: CreateOrderRefundRequestQueryParams): Promise<APIResponse<IkasOrder | null>>;
37
37
  static subscribeToMarketingNotifications(params: SubscribeToMarketingNotificationsQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
38
38
  static getLastViewedProducts(params: GetLastViewedProductsQueryParams): Promise<APIResponse<IkasLastViewedProduct[]>>;
39
- static saveLastViewedProducts(params: SaveLastViewedProductsQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/src/__api/types").ProductLastViewed>>;
39
+ static saveLastViewedProducts(params: SaveLastViewedProductsQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").ProductLastViewed>>;
40
40
  static listOrderRefundSettings(params: ListOrderRefundSettingsQueryParams): Promise<APIResponse<IkasOrderRefundSettings[]>>;
41
41
  static sendContactFormToMerchant(params: SendContactFormToMerchantQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
42
42
  static listFavoriteProducts(): Promise<APIResponse<IkasFavoriteProduct[]>>;
@@ -8,16 +8,16 @@ import { IkasFilterCategory } from "../../models/data/filter-category";
8
8
  import { IkasProductStockLocations } from "../../models/data/product/stock-location";
9
9
  import { IkasCampaignOffer } from "../../models";
10
10
  export default class ProductStore {
11
- static listProductBackInStockRemind(params: ListProductBackInStockRemindQueryParams): Promise<APIResponse<import("@ikas/storefront-api/src/__api/types").ProductBackInStockRemind[]> | APIResponse<undefined>>;
12
- static saveProductBackInStockRemind(params: SaveProductBackInStockRemindQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/src/__api/types").ProductBackInStockRemind>>;
11
+ static listProductBackInStockRemind(params: ListProductBackInStockRemindQueryParams): Promise<APIResponse<import("@ikas/storefront-api/build/__api/types").ProductBackInStockRemind[]> | APIResponse<undefined>>;
12
+ static saveProductBackInStockRemind(params: SaveProductBackInStockRemindQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").ProductBackInStockRemind>>;
13
13
  static searchProducts(params: SearchProductsQueryParams, excludedFields?: string[] | null): Promise<APIResponse<{
14
14
  data: IkasProduct[] | undefined;
15
15
  count?: number | undefined;
16
- facets?: import("@ikas/storefront-api/src/__api/types").ProductFacetCount[] | null | undefined;
16
+ facets?: import("@ikas/storefront-api/build/__api/types").ProductFacetCount[] | null | undefined;
17
17
  limit?: number | undefined;
18
18
  page?: number | undefined;
19
- results?: import("@ikas/storefront-api/src/__api/types").SearchProduct[] | undefined;
20
- suggestions?: import("@ikas/storefront-api/src/__api/types").SearchSuggestion[] | null | undefined;
19
+ results?: import("@ikas/storefront-api/build/__api/types").SearchProduct[] | undefined;
20
+ suggestions?: import("@ikas/storefront-api/build/__api/types").SearchSuggestion[] | null | undefined;
21
21
  totalCount?: number | undefined;
22
22
  locale: string;
23
23
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "6.1.0-beta.340",
3
+ "version": "6.1.0-beta.341",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -23,11 +23,11 @@
23
23
  "swiper": "11.0.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@ikas/storefront-api": "^6.1.0-beta.340",
27
- "@ikas/storefront-config": "^6.1.0-beta.340",
28
- "@ikas/storefront-model-functions": "^6.1.0-beta.340",
29
- "@ikas/storefront-models": "^6.1.0-beta.340",
30
- "@ikas/storefront-providers": "^6.1.0-beta.340",
26
+ "@ikas/storefront-api": "^6.1.0-beta.341",
27
+ "@ikas/storefront-config": "^6.1.0-beta.341",
28
+ "@ikas/storefront-model-functions": "^6.1.0-beta.341",
29
+ "@ikas/storefront-models": "^6.1.0-beta.341",
30
+ "@ikas/storefront-providers": "^6.1.0-beta.341",
31
31
  "@ikas/localized-address": "1.0.0-beta.6",
32
32
  "@adyen/adyen-web": "^5.57.0",
33
33
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -62,11 +62,11 @@
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@ikas/localized-address": "1.0.0-beta.6",
65
- "@ikas/storefront-api": "^6.1.0-beta.340",
66
- "@ikas/storefront-config": "^6.1.0-beta.340",
67
- "@ikas/storefront-model-functions": "^6.1.0-beta.340",
68
- "@ikas/storefront-models": "^6.1.0-beta.340",
69
- "@ikas/storefront-providers": "^6.1.0-beta.340",
65
+ "@ikas/storefront-api": "^6.1.0-beta.341",
66
+ "@ikas/storefront-config": "^6.1.0-beta.341",
67
+ "@ikas/storefront-model-functions": "^6.1.0-beta.341",
68
+ "@ikas/storefront-models": "^6.1.0-beta.341",
69
+ "@ikas/storefront-providers": "^6.1.0-beta.341",
70
70
  "mobx": "^6.1.3",
71
71
  "mobx-react-lite": "^3.1.5",
72
72
  "next": "12.2.0",