@ikas/storefront 5.0.55 → 5.0.57

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.
Files changed (31) hide show
  1. package/build/components/checkout/components/cart-summary/index.js +1 -1
  2. package/build/components/checkout/components/offer-product/index.js +1 -1
  3. package/build/components/checkout/components/offer-product/style.module.scss.js +1 -1
  4. package/build/components/checkout/index.js +1 -1
  5. package/build/components/checkout/model.d.ts +3 -0
  6. package/build/components/checkout/model.js +1 -1
  7. package/build/components/page/head.js +1 -1
  8. package/build/components/page/index.d.ts +1 -1
  9. package/build/components/page/index.js +1 -1
  10. package/build/components/page/widgets/common.d.ts +2 -0
  11. package/build/components/page/widgets/common.js +1 -0
  12. package/build/components/page/widgets/loyaltyWidget.d.ts +8 -0
  13. package/build/components/page/widgets/loyaltyWidget.js +1 -0
  14. package/build/components/page/widgets/popupWidget.d.ts +13 -0
  15. package/build/components/page/widgets/popupWidget.js +1 -0
  16. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +1 -1
  17. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -1
  18. package/build/ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +1 -1
  19. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +1 -1
  20. package/build/models/data/order/index.d.ts +1 -0
  21. package/build/models/data/order/index.js +1 -1
  22. package/build/models/ui/product-list/index.js +1 -1
  23. package/build/store/customer/api.d.ts +2 -2
  24. package/build/store/product/index.d.ts +1 -1
  25. package/build/store/product/index.js +1 -1
  26. package/package.json +14 -12
  27. package/build/components/popup/index.js +0 -1
  28. package/build/components/popup/renderer/index.js +0 -1
  29. package/build/components/popup/renderer/model.js +0 -1
  30. package/build/components/popup/utils/index.js +0 -1
  31. package/build/store/storefront-popup/index.js +0 -1
@@ -1 +0,0 @@
1
- import{__spreadArray as e,__awaiter as r,__generator as o,__assign as t}from'./../../../ext/tslib/tslib.es6.js';import{IkasStorefrontConfig as n}from"@ikas/storefront-config";import d from"lodash/throttle";import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/components/index.js';import{getPopupDynamicData as s}from'./../../../ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/settings/index.js';import"mobx";import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-condition/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/teaser/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/index.js';import{PopupElementTypeEnum as i}from'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/base/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/checkbox/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-attribute/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-gender/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js';import{ProductListTypeEnum as p,PopupProduct as u,MAX_PRODUCT_COUNT as a}from'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/space/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js';import{SortByDirectionEnum as l}from"@ikas/storefront-api";import m from"../../../store/product/index.js";import{IkasBaseStore as c}from"../../../store/base.js";import"../../../store/customer/index.js";import"../../../store/cart/index.js";var f="ikas-storefront-popups",v=function(){var e=localStorage.getItem("ikas-storefront-popups");return e?JSON.parse(e):null},g=function(r){var o=v()||{},t=n.getSessionId();if(t){var d=o[t]?o[t]:[],s=r;o[t]=e(e([],d,!0),[s],!1),localStorage.setItem("ikas-storefront-popups",JSON.stringify(o))}},b=function(){var e=n.getSessionId(),r=v();r&&e&&!Object.keys(r).includes(e)&&localStorage.removeItem("ikas-storefront-popups")},k=function(e){var r=v();if(!r)return!1;var o=!1;return Object.keys(r).forEach((function(t){r[t].includes(e)&&(o=!0)})),o};function h(e,d,f,v){var g,b,k,h;return r(this,void 0,void 0,(function(){var r,v,x,I,_,j,E,P;return o(this,(function(y){switch(y.label){case 0:r={},v=[],x=[],e.modal.steps.forEach((function(e){e.elements.forEach((function(e){e.type===i.PRODUCT_LIST&&x.push(e)}))})),I=s(e),_=function(s){var i,x,_,j,E,P,y,S,T,L,C,D;return o(this,(function(o){switch(o.label){case 0:switch(i={input:{}},x=s.sortType.includes("ASC")?l.ASC:l.DESC,_=s.sortType.replace("ASC_","").replace("DESC_",""),j={direction:x,type:_},E=[],s.listType){case p.ALL:case p.LAST_VIEWED:return[3,1];case p.SPECIFIC:return[3,4];case p.CATEGORY:return[3,5]}return[3,6];case 1:return P=[],s.listType!==p.LAST_VIEWED?[3,3]:[4,c.getInstance().customerStore.getLastViewedProducts()];case 2:E=o.sent(),P=E.map((function(e){return e.productId})),o.label=3;case 3:return i.input={page:1,perPage:a,order:j?[j]:void 0,productIdList:P},[3,6];case 4:return(y=s.variantPairs||[]).length&&(S=y.map((function(e){return e.productId})),i.input={productIdList:S,page:1,perPage:a,order:j?[j]:void 0}),[3,6];case 5:return T=s.categoryId,i.input={categoryIdList:T?[T]:void 0,page:1,perPage:a,order:j?[j]:void 0},[3,6];case 6:return s.listType!==p.CATEGORY||(null===(g=i.input.categoryIdList)||void 0===g?void 0:g.length)?[4,m.searchProducts({input:t(t({},i.input),{priceListId:n.getPriceListId(),salesChannelId:n.getSalesChannelId()})})]:[2,"continue"];case 7:return(L=o.sent())&&L.isSuccess&&(null===(k=null===(b=L.data)||void 0===b?void 0:b.data)||void 0===k?void 0:k.length)&&(null==(C=null===(h=L.data)||void 0===h?void 0:h.data)?void 0:C.length)&&(D=[],C.forEach((function(r){var o,t,n;if(s.listType===p.SPECIFIC){var i=I.variantPairs.filter((function(e){return e.productListElementId===s.id}));(c=r.variants.find((function(e){return i.some((function(o){return o.productId===r.id&&o.variantId===e.id}))})))&&(n=[c])}else if(s.listType===p.LAST_VIEWED&&E.length){var a=E.find((function(e){return e.productId===r.id}));if(a)(c=r.variants.find((function(e){return e.id===a.variantId})))&&(n=[c])}else n=(null==r?void 0:r.variants[0])?[r.variants[0]]:[];for(var l=0,m=n||[];l<m.length;l++){var c;if((c=m[l])&&r){var g=(null===(o=c.images)||void 0===o?void 0:o.length)?c.images[0]:null;D.push(new u({productId:r.id,variantId:c.id,name:r.name,price:c.formattedSellPrice,discountPrice:c.hasDiscount?c.formattedDiscountPrice:null,discountRatio:c.discountPercentage?c.discountPercentage:null,imageURL:g?"".concat(d,"images/").concat(f,"/").concat(g.imageId):null,url:"".concat(e.storeUrl,"/").concat(null===(t=r.metaData)||void 0===t?void 0:t.slug)})),v.find((function(e){return e.id===r.id}))||v.push(r)}}})),r[s.id]=D),[2]}}))},j=0,E=x,y.label=1;case 1:return j<E.length?(P=E[j],[5,_(P)]):[3,4];case 2:y.sent(),y.label=3;case 3:return j++,[3,1];case 4:return[2,{totalProducts:r,ikasProducts:v}]}}))}))}var x=function(e){var r,o,n,s,i,p;return void 0===e&&(e={}),n=t(t({},{threshold:20,maxDisplays:1,eventThrottle:200,onExitIntent:function(){}}),e),s=new Map,i=0,p=function(){s.forEach((function(e,r,o){return function(e){var r=s.get(e),o=r.eventName,t=r.callback;document.removeEventListener(o,t),s.delete(e)}(r)}))},r="mousemove",o=d((function(e){e.clientY<=n.threshold&&i<n.maxDisplays&&(i++,1)&&(n.onExitIntent(),i>=n.maxDisplays&&p())}),n.eventThrottle),document.addEventListener(r,o,!1),s.set("document:".concat(r),{eventName:r,callback:o}),p};export{f as SESSION_POPUPS_KEY,g as addPopupToLocalStorage,k as checkIsPopupSavedToLocalStorage,b as checkSavedSessionForPopups,x as exitIntent,h as getPopupProducts,v as getPopupsFromLocalStorage};
@@ -1 +0,0 @@
1
- import{__awaiter as e,__generator as o,__assign as i}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as t}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{listStorefrontPopup as s}from"@ikas/storefront-api";import{IkasStorefrontPopup as n}from"../../models/data/storefront-popup/index.js";var a=function(){function a(){}return a.listStorefrontPopup=function(a){var r;return e(this,void 0,void 0,(function(){var e;return o(this,(function(o){switch(o.label){case 0:return[4,s(a)];case 1:return e=o.sent(),[2,new t(i(i({},e.data),{data:null===(r=e.data)||void 0===r?void 0:r.map((function(e){return new n(e)}))}))]}}))}))},a}();export{a as default};