@ikas/storefront-providers 4.0.0-beta.2 → 4.0.0-beta.20

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{__awaiter as e,__generator as t,__assign as r}from'./../../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as i,IkasCategoryProductsOrderType as n}from"@ikas/storefront-models";import{IkasProductListType as o,IkasProductSearchShowStockOption as a,IkasProductListSortType as u}from"./index.js";import{IkasProductFilterFunctions as d}from"@ikas/storefront-model-functions";import{searchProducts as s,getRelatedProducts as l,getProductFilterData as c,SortByDirectionEnum as f,SortByTypeEnum as v}from"@ikas/storefront-api";import{IkasStorefrontConfig as p}from"@ikas/storefront-config";import"../blog-category-list/index.js";import"../blog-list/index.js";import"../brand-list/index.js";import"../category-list/index.js";function I(i,a){var s,l,c,f;return e(this,void 0,void 0,(function(){var e,v,p,I,T,y,g;return t(this,(function(t){switch(t.label){case 0:!function(e){var t;if((null===(t=e.pageSpecificData)||void 0===t?void 0:t.orderType)&&[o.ALL].includes(e.type))switch(e.pageSpecificData.orderType){case n.HIGHEST_DISCOUNT_RATIO:e.sort=u.DECRASING_DISCOUNT;break;case n.LOWEST_DISCOUNT_RATIO:e.sort=u.INCREASING_DISCOUNT;break;case n.HIGHEST_PRICE:e.sort=u.DECREASING_PRICE;break;case n.LOWEST_PRICE:e.sort=u.INCREASING_PRICE;break;case n.NEWEST:e.sort=u.LAST_ADDED;break;case n.OLDEST:e.sort=u.FIRST_ADDED;break;case n.MANUALLY:e.sort=u.FEATURED}}(i),i.isLoading=!0,e=Date.now(),i.fetchRequestTime=e,t.label=1;case 1:return t.trys.push([1,5,,6]),v=a?i.page:1,p=i.limit,!function(e){return e.type===o.ALL||e.type===o.CATEGORY}(i)||i.filters?[3,3]:[4,D(i)];case 2:t.sent(),t.label=3;case 3:if(S(i))return i.data=[],i.page=1,i.minPage=1,i.count=0,i.initialized=!0,[2,!0];if(void 0,C(i))v=void 0,p=200;else if(function(e){return e.type===o.DISCOUNTED}(i))v=1,p=10;else if(function(e){return e.type===o.RECOMMENDED}(i))v=1,p=10;else if(E(i))return[2];return[4,A(i,v||1,p||10,undefined)];case 4:return(I=t.sent())&&i.fetchRequestTime===e?(T=[],E(i)?[2]:(C(i)?(y=i.productListPropValue.productIds||[],T=(null==y?void 0:y.map((function(e){var t,i,n=null===(i=null===(t=I.data)||void 0===t?void 0:t.data)||void 0===i?void 0:i.find((function(t){return t.id===e.productId})),o=null==n?void 0:n.variants.find((function(t){return t.id===e.variantId}));if((null==o?void 0:o.isActive)||(o=null==n?void 0:n.variants.find((function(e){return e.isActive}))),n&&o)return r(r({},n),{selectedVariantValues:o.variantValues})})).filter((function(e){return!!e})))||[]):T=(null===(l=null===(s=I.data)||void 0===s?void 0:s.data)||void 0===l?void 0:l.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return r(r({},e),{selectedVariantValues:(t||e.variants[0]).variantValues})})))||[],function(e,t){var r,i,n=d.isCustomValueFilter;null===(r=e.filters)||void 0===r||r.forEach((function(e){var r,i,o,a=null==t?void 0:t.find((function(t){return t.id===e.id}));a?null===(r=e.values)||void 0===r||r.forEach((function(t){var r=a.values.find((function(e){return e.id===t.id}));r?t.resultCount=r.count:n(e)?t.resultCount=null:t.resultCount=0})):n(e)?null===(i=e.values)||void 0===i||i.forEach((function(e){return e.resultCount=null})):null===(o=e.values)||void 0===o||o.forEach((function(e){return e.resultCount=0}))}));var o=null==t?void 0:t.find((function(e){return"category"===e.id}));o&&(null===(i=e.filterCategories)||void 0===i||i.forEach((function(e){var t=o.values.find((function(t){return t.id===e.id}));e.resultCount=t?t.count:0})))}(i,null===(c=I.data)||void 0===c?void 0:c.facets),i.data=T,i.count=(null===(f=I.data)||void 0===f?void 0:f.count)||0,i.initialized=!0,i.page=v||1,i.minPage=i.page,[2,!0])):[2];case 5:return g=t.sent(),console.error(g),[3,6];case 6:return[2]}}))}))}function C(e){return e.type===o.STATIC}function E(e){return e.type===o.LAST_VIEWED}function S(e){return e.type===o.SEARCH}function A(r,n,c,I){var E,A,D;return e(this,void 0,void 0,(function(){var e,T,y,g,R;return t(this,(function(t){switch(t.label){case 0:return e=[],T=[],y=d.getValueList,null===(E=r.filters)||void 0===E||E.forEach((function(t){var r=y(t);r.length&&e.push({id:t.id,type:t.type,displayType:t.displayType,valueList:r}),t.isFacetFilter&&T.push({id:t.id,type:t.type,displayType:t.displayType})})),g=null===(A=r.filterCategories)||void 0===A?void 0:A.filter((function(e){return e.isSelected})).map((function(e){return e.id})),R=function(e){var t,r;switch(e.sort){case u.INCREASING_PRICE:t=f.ASC,r=v.PRICE;break;case u.DECREASING_PRICE:t=f.DESC,r=v.PRICE;break;case u.FIRST_ADDED:t=f.ASC,r=v.CREATED_AT;break;case u.LAST_ADDED:t=f.DESC,r=v.CREATED_AT;break;case u.INCREASING_DISCOUNT:t=f.ASC,r=v.DISCOUNT_RATIO;break;case u.DECRASING_DISCOUNT:t=f.DESC,r=v.DISCOUNT_RATIO;break;case u.FEATURED:if(S(e))return;t=f.ASC,r=v.MANUAL_SORT;break;case u.DEFAULT:t=void 0,r=void 0}if(t&&r)return{direction:t,type:r}}(r),function(e){return e.type===o.RELATED_PRODUCTS}(r)&&r.relatedProductData?[4,l({priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),productId:r.relatedProductData.productId,brandIds:r.relatedProductData.brandIds,categoryIds:r.relatedProductData.categoryIds})]:[3,2];case 1:case 3:return[2,t.sent()];case 2:return[4,s({input:{page:n,perPage:c,productIdList:C(r)?null===(D=r.productListPropValue.productIds)||void 0===D?void 0:D.map((function(e){return e.productId})):I,filterList:e,facetList:T,brandId:r.pageType===i.BRAND&&r.type!==o.SEARCH?r.filterBrandId:void 0,categoryIdList:g&&g.length?g:r.filterCategoryId?[r.filterCategoryId]:void 0,priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),query:r.searchKeyword,order:r.type===o.SEARCH?[]:R?[R]:[],locale:p.getCurrentLocale(),showStockOption:p.getStockPreference()||a.SHOW_ALL}})]}}))}))}function D(r){var n,o,a;return e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return[4,c({categoryId:r.filterCategoryId?r.filterCategoryId:void 0})];case 1:return e=t.sent(),r.filters=(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.filters)||null,r.filterCategories=(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.categories)||null,r.pageType!==i.CATEGORY&&r.filterCategoryId&&(u=null===(a=r.filterCategories)||void 0===a?void 0:a.find((function(e){return e.id===r.filterCategoryId})))&&(u.isSelected=!0),r.filters&&r.filters.sort((function(e,t){return e.order>t.order?1:-1})),[2]}}))}))}export{I as getInitial};
1
+ import{__awaiter as e,__generator as t,__assign as r}from'./../../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as i,IkasCategoryProductsOrderType as n}from"@ikas/storefront-models";import{IkasProductListType as o,IkasProductSearchShowStockOption as a,IkasProductListSortType as u}from"./index.js";import{IkasProductFilterFunctions as d}from"@ikas/storefront-model-functions";import{searchProducts as l,getRelatedProducts as s,getProductFilterData as c,SortByDirectionEnum as f,SortByTypeEnum as v}from"@ikas/storefront-api";import{IkasStorefrontConfig as p}from"@ikas/storefront-config";import"../blog-category-list/index.js";import"../blog-list/index.js";import"../brand-list/index.js";import"../category-list/index.js";function I(i,a){var l,s,c,f;return e(this,void 0,void 0,(function(){var e,v,p,I,T,g,y;return t(this,(function(t){switch(t.label){case 0:!function(e){var t;if((null===(t=e.pageSpecificData)||void 0===t?void 0:t.orderType)&&[o.ALL].includes(e.type))switch(e.pageSpecificData.orderType){case n.HIGHEST_DISCOUNT_RATIO:e.sort=u.DECRASING_DISCOUNT;break;case n.LOWEST_DISCOUNT_RATIO:e.sort=u.INCREASING_DISCOUNT;break;case n.HIGHEST_PRICE:e.sort=u.DECREASING_PRICE;break;case n.LOWEST_PRICE:e.sort=u.INCREASING_PRICE;break;case n.NEWEST:e.sort=u.LAST_ADDED;break;case n.OLDEST:e.sort=u.FIRST_ADDED;break;case n.MANUALLY:e.sort=u.FEATURED}}(i),i.isLoading=!0,e=Date.now(),i.fetchRequestTime=e,t.label=1;case 1:return t.trys.push([1,5,,6]),v=a?i.page:1,p=i.limit,!function(e){return e.type===o.ALL||e.type===o.CATEGORY}(i)||i.filters?[3,3]:[4,D(i)];case 2:t.sent(),t.label=3;case 3:if(S(i))return i.data=[],i.page=1,i.minPage=1,i.count=0,i.initialized=!0,[2,!0];if(void 0,C(i))v=void 0,p=200;else if(function(e){return e.type===o.DISCOUNTED}(i))v=1,p=10;else if(function(e){return e.type===o.RECOMMENDED}(i))v=1,p=10;else if(E(i))return[2];return[4,A(i,v||1,p||10,undefined)];case 4:return(I=t.sent())&&i.fetchRequestTime===e?(T=[],E(i)?[2]:(C(i)?(g=i.productListPropValue.productIds||[],T=(null==g?void 0:g.map((function(e){var t,i,n=null===(i=null===(t=I.data)||void 0===t?void 0:t.data)||void 0===i?void 0:i.find((function(t){return t.id===e.productId})),o=null==n?void 0:n.variants.find((function(t){return t.id===e.variantId}));if((null==o?void 0:o.isActive)||(o=null==n?void 0:n.variants.find((function(e){return e.isActive}))),n&&o)return r(r({},n),{selectedVariantValues:o.variantValues})})).filter((function(e){return!!e})))||[]):T=(null===(s=null===(l=I.data)||void 0===l?void 0:l.data)||void 0===s?void 0:s.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return r(r({},e),{selectedVariantValues:(t||e.variants[0]).variantValues})})))||[],function(e,t){var r,i,n=d.isCustomValueFilter;null===(r=e.filters)||void 0===r||r.forEach((function(e){var r,i,o,a=null==t?void 0:t.find((function(t){return t.id===e.id}));a?null===(r=e.values)||void 0===r||r.forEach((function(t){var r=a.values.find((function(e){return e.id===t.id}));r?t.resultCount=r.count:n(e)?t.resultCount=null:t.resultCount=0})):n(e)?null===(i=e.values)||void 0===i||i.forEach((function(e){return e.resultCount=null})):null===(o=e.values)||void 0===o||o.forEach((function(e){return e.resultCount=0}))}));var o=null==t?void 0:t.find((function(e){return"category"===e.id}));o&&(null===(i=e.filterCategories)||void 0===i||i.forEach((function(e){var t=o.values.find((function(t){return t.id===e.id}));e.resultCount=t?t.count:0})))}(i,null===(c=I.data)||void 0===c?void 0:c.facets),i.data=T,i.count=(null===(f=I.data)||void 0===f?void 0:f.count)||0,i.initialized=!0,i.page=v||1,i.minPage=i.page,[2,!0])):[2];case 5:return y=t.sent(),console.error(y),[3,6];case 6:return[2]}}))}))}function C(e){return e.type===o.STATIC}function E(e){return e.type===o.LAST_VIEWED}function S(e){return e.type===o.SEARCH}function A(r,n,c,I){var E,A,D;return e(this,void 0,void 0,(function(){var e,T,g,y,R;return t(this,(function(t){switch(t.label){case 0:return e=[],T=[],g=d.getValueList,null===(E=r.filters)||void 0===E||E.forEach((function(t){var r=g(t);r.length&&e.push({id:t.id,type:t.type,displayType:t.displayType,valueList:r}),t.isFacetFilter&&T.push({id:t.id,type:t.type,displayType:t.displayType})})),y=null===(A=r.filterCategories)||void 0===A?void 0:A.filter((function(e){return e.isSelected})).map((function(e){return e.id})),R=function(e){var t,r;switch(e.sort){case u.INCREASING_PRICE:t=f.ASC,r=v.PRICE;break;case u.DECREASING_PRICE:t=f.DESC,r=v.PRICE;break;case u.FIRST_ADDED:t=f.ASC,r=v.CREATED_AT;break;case u.LAST_ADDED:t=f.DESC,r=v.CREATED_AT;break;case u.INCREASING_DISCOUNT:t=f.ASC,r=v.DISCOUNT_RATIO;break;case u.DECRASING_DISCOUNT:t=f.DESC,r=v.DISCOUNT_RATIO;break;case u.FEATURED:if(S(e))return;t=f.ASC,r=v.MANUAL_SORT;break;case u.DEFAULT:t=void 0,r=void 0}if(t&&r)return{direction:t,type:r}}(r),function(e){return e.type===o.RELATED_PRODUCTS}(r)&&r.relatedProductData?[4,s({priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),productId:r.relatedProductData.productId,brandIds:r.relatedProductData.brandIds,categoryIds:r.relatedProductData.categoryIds,locale:p.getCurrentLocale()})]:[3,2];case 1:case 3:return[2,t.sent()];case 2:return[4,l({input:{page:n,perPage:c,productIdList:C(r)?null===(D=r.productListPropValue.productIds)||void 0===D?void 0:D.map((function(e){return e.productId})):I,filterList:e,facetList:T,brandId:r.pageType===i.BRAND&&r.type!==o.SEARCH?r.filterBrandId:void 0,categoryIdList:y&&y.length?y:r.filterCategoryId?[r.filterCategoryId]:void 0,priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),query:r.searchKeyword,order:r.type===o.SEARCH?[]:R?[R]:[],locale:p.getCurrentLocale(),showStockOption:p.getStockPreference()||a.SHOW_ALL}})]}}))}))}function D(r){var n,o,a;return e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return[4,c({categoryId:r.filterCategoryId?r.filterCategoryId:void 0,locale:p.getCurrentLocale()})];case 1:return e=t.sent(),r.filters=(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.filters)||null,r.filterCategories=(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.categories)||null,r.pageType!==i.CATEGORY&&r.filterCategoryId&&(u=null===(a=r.filterCategories)||void 0===a?void 0:a.find((function(e){return e.id===r.filterCategoryId})))&&(u.isSelected=!0),r.filters&&r.filters.sort((function(e,t){return e.order>t.order?1:-1})),[2]}}))}))}export{I as getInitial};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listStorefrontRaffle as t}from"@ikas/storefront-api";import{populateRaffleProducts as n}from"../../../providers/helpers/raffle.js";function a(t){var n,a;return e(this,void 0,void 0,(function(){var e,o;return i(this,(function(i){switch(i.label){case 0:if(t.isLoading)return[2];t.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r(t,t.page,t.limit)];case 2:return e=i.sent(),t.data=(null===(n=e.data)||void 0===n?void 0:n.data)||[],t.count=(null===(a=e.data)||void 0===a?void 0:a.count)||0,t.initialized=!0,t.minPage=t.page,[3,5];case 3:return o=i.sent(),console.log(o),[3,5];case 4:return t.isLoading=!1,[7];case 5:return[2]}}))}))}function r(a,r,o){var s;return e(this,void 0,void 0,(function(){var e;return i(this,(function(i){switch(i.label){case 0:return[4,t({start:a.start?{eq:a.start}:void 0,end:a.end?{eq:a.end}:void 0,includeDeleted:a.includeDeleted||!1,name:a.name?{eq:a.name}:void 0,id:a.id?{eq:a.id}:void 0,search:a.search||void 0,pagination:{limit:o,page:r}})];case 1:return e=i.sent(),[4,n((null===(s=e.data)||void 0===s?void 0:s.data)||[])];case 2:return i.sent(),[2,e]}}))}))}export{a as getInitial};
1
+ import{__awaiter as e,__generator as t}from'./../../../ext/tslib/tslib.es6.js';import{listStorefrontRaffle as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as r}from"@ikas/storefront-config";import{initIkasRaffle as n}from"@ikas/storefront-models";import{populateRaffleProducts as o}from"../../../providers/helpers/raffle.js";function a(i){var r,n;return e(this,void 0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:if(i.isLoading)return[2];i.isLoading=!0,t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,s(i,i.page,i.limit)];case 2:return e=t.sent(),i.data=(null===(r=e.data)||void 0===r?void 0:r.data)||[],i.count=(null===(n=e.data)||void 0===n?void 0:n.count)||0,i.initialized=!0,i.minPage=i.page,[3,5];case 3:return o=t.sent(),console.log(o),[3,5];case 4:return i.isLoading=!1,[7];case 5:return[2]}}))}))}function s(a,s,d){var u;return e(this,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return[4,i({start:a.start?{eq:a.start}:void 0,end:a.end?{eq:a.end}:void 0,includeDeleted:a.includeDeleted||!1,name:a.name?{eq:a.name}:void 0,id:a.id?{eq:a.id}:void 0,search:a.search||void 0,pagination:{limit:d,page:s}})];case 1:return e=t.sent(),l=null===(u=e.data)||void 0===u?void 0:u.data,[4,o(l||[])];case 2:return t.sent(),null==l||l.forEach((function(e){return n(e,r.getCurrentLocale())})),[2,e]}}))}))}export{a as getInitial};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as n}from'./../../ext/tslib/tslib.es6.js';import{listProductOptionSet as r,searchProducts as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";var o=function(o){return t(void 0,void 0,void 0,(function(){var t,d,a,e,c,f,s,l,p,v,h;return n(this,(function(n){switch(n.label){case 0:for(t=[],d=0,a=o;d<a.length;d++)e=a[d],null===(v=e.variants)||void 0===v||v.forEach((function(n){t.find((function(t){return t===n.productId}))||t.push(n.productId)}));return[4,i({input:{productIdList:t,locale:u.getCurrentLocale()}})];case 1:return(c=n.sent()).isSuccess&&(f=(null===(h=c.data)||void 0===h?void 0:h.data)||[]).length?(s=f.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:s}})]):[3,3];case 2:l=n.sent(),p=l.data,o.forEach((function(t){var n;null===(n=t.variants)||void 0===n||n.forEach((function(n){var r=f.find((function(t){return n.productId===t.id}));if(r){r.productOptionSet=null==p?void 0:p.find((function(t){return t.id===r.productOptionSetId}));var i=r.variants.find((function(t){return t.isActive&&n.variantId===t.id}))||r.variants[0];t.products.find((function(t){return t.id===r.id}))||(r.selectedVariantValues=i.variantValues,r.variants=r.variants.filter((function(n){var r;return null===(r=t.variants)||void 0===r?void 0:r.find((function(t){return t.variantId===n.id}))})),t.products.push(r))}}))})),n.label=3;case 3:return[2]}}))}))},d=function(u){return t(void 0,void 0,void 0,(function(){var t,o,d,a,e,c,f;return n(this,(function(n){switch(n.label){case 0:return(t=u.filter((function(t){return!!t.appliedProduct.productId})).map((function(t){return t.appliedProduct.productId})))&&t.length?[4,i({input:{productIdList:t}})]:[3,3];case 1:return(o=n.sent())&&((d=null===(f=o.data)||void 0===f?void 0:f.data)&&d&&d.length)?(a=d.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:a}})]):[3,3];case 2:e=n.sent(),c=e.data,u.forEach((function(t){var n=d.find((function(n){return n.id===t.appliedProduct.productId})),r=(null==n?void 0:n.variants.find((function(n){return n.isActive&&t.appliedProduct.variantId===n.id})))||(null==n?void 0:n.variants[0]);n&&r&&(n.productOptionSet=null==c?void 0:c.find((function(t){return t.id===n.productOptionSetId})),product.selectedVariantValues=r.variantValues,t.raffle&&(t.raffle.products?t.raffle.products.push(n):t.raffle.products=[n]))})),n.label=3;case 3:return[2]}}))}))};export{d as populateRaffleParticipantProducts,o as populateRaffleProducts};
1
+ import{__awaiter as t,__generator as n}from'./../../ext/tslib/tslib.es6.js';import{listProductOptionSet as r,searchProducts as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";var o=function(o){return t(void 0,void 0,void 0,(function(){var t,d,a,e,c,f,s,l,p,v,h;return n(this,(function(n){switch(n.label){case 0:for(t=[],d=0,a=o;d<a.length;d++)e=a[d],null===(v=e.variants)||void 0===v||v.forEach((function(n){t.find((function(t){return t===n.productId}))||t.push(n.productId)}));return[4,i({input:{productIdList:t,locale:u.getCurrentLocale()}})];case 1:return(c=n.sent()).isSuccess&&(f=(null===(h=c.data)||void 0===h?void 0:h.data)||[]).length?(s=f.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:s}})]):[3,3];case 2:l=n.sent(),p=l.data,o.forEach((function(t){var n;null===(n=t.variants)||void 0===n||n.forEach((function(n){var r,i=f.find((function(t){return n.productId===t.id}));if(i){i.productOptionSet=null==p?void 0:p.find((function(t){return t.id===i.productOptionSetId}));var u=i.variants.find((function(t){return t.isActive&&n.variantId===t.id}))||i.variants[0];(null===(r=t.products)||void 0===r?void 0:r.find((function(t){return t.id===i.id})))||(i.selectedVariantValues=u.variantValues,i.variants=i.variants.filter((function(n){var r;return null===(r=t.variants)||void 0===r?void 0:r.find((function(t){return t.variantId===n.id}))})),t.products||(t.products=[]),t.products.push(i))}}))})),n.label=3;case 3:return[2]}}))}))},d=function(u){return t(void 0,void 0,void 0,(function(){var t,o,d,a,e,c,f;return n(this,(function(n){switch(n.label){case 0:return(t=u.filter((function(t){return!!t.appliedProduct.productId})).map((function(t){return t.appliedProduct.productId})))&&t.length?[4,i({input:{productIdList:t}})]:[3,3];case 1:return(o=n.sent())&&((d=null===(f=o.data)||void 0===f?void 0:f.data)&&d&&d.length)?(a=d.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:a}})]):[3,3];case 2:e=n.sent(),c=e.data,u.forEach((function(t){var n=d.find((function(n){return n.id===t.appliedProduct.productId})),r=(null==n?void 0:n.variants.find((function(n){return n.isActive&&t.appliedProduct.variantId===n.id})))||(null==n?void 0:n.variants[0]);n&&r&&(n.productOptionSet=null==c?void 0:c.find((function(t){return t.id===n.productOptionSetId})),n.selectedVariantValues=r.variantValues,t.raffle&&(t.raffle.products?t.raffle.products.push(n):t.raffle.products=[n]))})),n.label=3;case 3:return[2]}}))}))};export{d as populateRaffleParticipantProducts,o as populateRaffleProducts};
@@ -28,4 +28,5 @@ export declare class IkasPageDataProvider {
28
28
  private setPageMetaData;
29
29
  setLinkSlugs(): Promise<[void, void, void]>;
30
30
  private getLinkSlugs;
31
+ private getFlatCustomData;
31
32
  }
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t,__assign as r}from'./../ext/tslib/tslib.es6.js';import a from"lodash/uniq";import{makeAutoObservable as n}from"mobx";import{IkasThemeJsonPageType as i,IkasRaffleMetadataTargetType as s,IkasBlogMetaDataTargetType as o,IkasHTMLMetaDataTargetType as u,IkasThemeJsonComponentPropType as c}from"@ikas/storefront-models";import{IkasStorefrontConfig as p}from"@ikas/storefront-config";import{IkasProductFunctions as l}from"@ikas/storefront-model-functions";import{IkasProductListPropValueProvider as d}from"./prop-value/product-list.js";import{IkasProductPropValueProvider as g}from"./prop-value/product-detail.js";import{IkasBrandListPropValueProvider as h}from"./prop-value/brand-list.js";import{IkasBrandPropValueProvider as f}from"./prop-value/brand.js";import{IkasLinkPropValueProvider as v}from"./prop-value/link.js";import{IkasImageListPropValueProvider as m}from"./prop-value/image-list.js";import{IkasTextPropValueProvider as T}from"./prop-value/text.js";import{IkasColorPropValueProvider as S}from"./prop-value/color.js";import{IkasBooleanPropValueProvider as y}from"./prop-value/boolean.js";import{IkasImagePropValueProvider as L}from"./prop-value/image.js";import{IkasCategoryPropValueProvider as O}from"./prop-value/category.js";import{IkasCategoryListPropValueProvider as P}from"./prop-value/category-list.js";import{IkasCustomPropValueProvider as D}from"./prop-value/custom.js";import{IkasSliderPropValueProvider as b}from"./prop-value/slider.js";import{IkasRichTextPropValueProvider as I}from"./prop-value/rich-text.js";import{IkasBlogPropValueProvider as w}from"./prop-value/blog.js";import{IkasBlogListPropValueProvider as C}from"./prop-value/blog-list.js";import{IkasAttributePropValueProvider as R}from"./prop-value/attribute.js";import{IkasAttributeListPropValueProvider as E}from"./prop-value/attribute-list.js";import{IkasBlogCategoryPropValueProvider as A}from"./prop-value/blog-category.js";import{IkasBlogCategoryListPropValueProvider as V}from"./prop-value/blog-category-list.js";import{IkasRafflePropValueProvider as j}from"./prop-value/raffle.js";import{IkasRaffleListPropValueProvider as G}from"./prop-value/raffle-list.js";import{listMerchantSettings as _,listCustomerReviewSummary as F,listProductOptionSet as B,searchProducts as M,listProductBrand as k,listCategory as U,listBlog as N,listBlogCategory as q,listStorefrontRaffle as Y,listHTMLMetaData as x,listRaffleMetaData as J,listBlogMetaData as K}from"@ikas/storefront-api";import{populateRaffleProducts as X}from"./helpers/raffle.js";var H=function(){function H(e,t,r){this.pageType=null,this.pageParams={},this.pageComponentPropValues=[],this.pageSpecificData=null,this.merchantSettings=null,this.possiblePageTypes=[],this.linkMetaDataTargetIds=[],this.productReviewSummary=null,this.theme=e,this.pageParams=t||{},this.pageType=r,n(this)}return Object.defineProperty(H.prototype,"page",{get:function(){var e=this;if(this.pageType===i.CUSTOM){var t=this.pageParams.slug;return this.theme.pages.find((function(e){return e.type===i.CUSTOM&&e.slug===t}))}return this.theme.pages.find((function(t){return t.type===e.pageType}))},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"nextPageData",{get:function(){var e,t,a,n,s,o=[],u=[];return this.pageComponentPropValues.forEach((function(e){if(u.push({pageComponent:{id:e.pageComponent.id,componentId:e.pageComponent.componentId},propValues:e.propValues}),!o.find((function(t){return t.id===e.component.id}))){var t=r({},e.component);t.props.forEach((function(e){delete e.description,delete e.displayName,delete e.translations,delete e.groupId})),delete t.translations,delete t.defaultPropValues,delete t.displayName,delete t.description,delete t.dir,o.push(t)}})),{props:JSON.parse(JSON.stringify({propValues:u,themeJsonComponents:o,pageSpecificData:this.pageSpecificData||null,pageType:(null===(e=this.page)||void 0===e?void 0:e.type)||i.CUSTOM,pageTitle:(null===(t=this.page)||void 0===t?void 0:t.pageTitle)||null,pageDescription:(null===(a=this.page)||void 0===a?void 0:a.description)||null,canonicals:(null===(n=this.page)||void 0===n?void 0:n.canonicals)||null,disableIndex:(null===(s=this.page)||void 0===s?void 0:s.disableIndex)||null,themeSettings:this.theme.settings||{},productReviewSummary:this.productReviewSummary,configJson:p.toJSON()}))}},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"specification",{get:function(){var e,t,r=this,a=this.page;return(null==a?void 0:a.type)===i.PRODUCT?null===(e=a.specifications)||void 0===e?void 0:e.find((function(e){var t;return e.id===(null===(t=r.pageSpecificData)||void 0===t?void 0:t.id)})):null===(t=null==a?void 0:a.specifications)||void 0===t?void 0:t.find((function(e){var t;return e.id===(null===(t=r.pageSpecificData)||void 0===t?void 0:t.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"pageComponents",{get:function(){var e;return this.specification?this.specification.components:(null===(e=this.page)||void 0===e?void 0:e.components)||[]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"$pageComponentPropValues",{get:function(){return this.pageComponentPropValues},enumerable:!1,configurable:!0}),H.prototype.getMerchantSettings=function(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,_({})];case 1:return(e=t.sent()).isSuccess&&e.data&&(this.merchantSettings=e.data),[2]}}))}))},H.prototype.getPageData=function(){return e(this,void 0,void 0,(function(){var e,r=this;return t(this,(function(t){switch(t.label){case 0:return this.pageSpecificData?[3,2]:[4,this.getPageSpecificData()];case 1:t.sent(),t.label=2;case 2:return this.page?[4,this.getMerchantSettings()]:[2];case 3:return t.sent(),e=this,[4,Promise.all(this.pageComponents.map((function(e){return r.getPageComponentPropValues(e)})))];case 4:return e.pageComponentPropValues=t.sent(),[4,this.setLinkSlugs()];case 5:return t.sent(),[4,this.getProductReviewSummary()];case 6:return t.sent(),[2]}}))}))},H.prototype.getProductReviewSummary=function(){var r,a,n;return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return this.pageType!==i.PRODUCT?[3,2]:[4,F({productId:{eq:null===(r=this.pageSpecificData)||void 0===r?void 0:r.id}})];case 1:(e=t.sent()).isSuccess&&(null===(n=null===(a=e.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length)&&(this.productReviewSummary=e.data.data[0]),t.label=2;case 2:return[2]}}))}))},H.prototype.getPageSpecificData=function(){var r,a,n,c;return e(this,void 0,void 0,(function(){var d,g,h,f,v,m,T,S,y,L,O=this;return t(this,(function(P){switch(P.label){case 0:return this.pageType&&![i.BRAND,i.PRODUCT,i.CATEGORY,i.BLOG,i.BLOG_CATEGORY,i.RAFFLE_DETAIL].includes(this.pageType)?[2]:(d=this.pageParams.slug)?(g=[],(null===(r=this.possiblePageTypes)||void 0===r?void 0:r.includes(i.BLOG))||(null===(a=this.possiblePageTypes)||void 0===a?void 0:a.includes(i.BLOG_CATEGORY))?[4,K({slug:{eq:d}})]:[3,2]):[2];case 1:return h=P.sent(),(g=(null===(n=h.data)||void 0===n?void 0:n.data)||[]).length?[3,6]:[2];case 2:return(null===(c=this.possiblePageTypes)||void 0===c?void 0:c.includes(i.RAFFLE_DETAIL))?[4,J({slug:{eq:d}})]:[3,4];case 3:return h=P.sent(),(g=h.data||[]).length?[3,6]:[2];case 4:return[4,x({slug:{eq:d}})];case 5:if(h=P.sent(),!(g=h.data||[])||!g.length)return[2];P.label=6;case 6:if(!(f=g[0]).targetId)return[2];switch(v=function(){return e(O,void 0,void 0,(function(){var e,r,a,n,s,o,u,c,d,g,h;return t(this,(function(t){switch(t.label){case 0:return[4,M({input:{productIdList:[f.targetId],priceListId:p.getPriceListId(),salesChannelId:p.getSalesChannelId(),locale:p.getCurrentLocale()}})];case 1:return e=t.sent(),(null===(g=null===(d=null==e?void 0:e.data)||void 0===d?void 0:d.data)||void 0===g?void 0:g.length)?(r=e.data.data[0]).productOptionSetId?[4,B({id:{eq:r.productOptionSetId}})]:[3,3]:[2];case 2:(a=t.sent()).isSuccess&&(null===(h=null==a?void 0:a.data)||void 0===h?void 0:h.length)&&(r.productOptionSet=a.data[0]),t.label=3;case 3:return(n=r.variants.find((function(e){return e.isActive})))?(r.selectedVariantValues=n.variantValues,s=l.getDisplayedVariantTypes,this.pageSpecificData=r,(o=s(this.pageSpecificData,r.selectedVariantValues)).length&&(u=o[0]).displayedVariantValues.length&&(c=u.displayedVariantValues.find((function(e){return e.hasStock})))&&(this.pageSpecificData.selectedVariantValues=c.variant.variantValues),this.pageType=i.PRODUCT,this.setPageMetaData(f),[2]):[2]}}))}))},m=function(){return e(O,void 0,void 0,(function(){var e,r,a,n;return t(this,(function(t){switch(t.label){case 0:return[4,k({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(a=e.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length)?(r=e.data.data[0],this.pageSpecificData=r,this.pageType=i.BRAND,this.setPageMetaData(f),[2]):[2]}}))}))},T=function(){return e(O,void 0,void 0,(function(){var e,r,a,n;return t(this,(function(t){switch(t.label){case 0:return[4,U({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(a=e.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length)?(r=e.data.data[0],this.pageSpecificData=r,this.pageType=i.CATEGORY,this.setPageMetaData(f),[2]):[2]}}))}))},S=function(){return e(O,void 0,void 0,(function(){var e,r,a,n;return t(this,(function(t){switch(t.label){case 0:return[4,N({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(a=e.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length)?(r=e.data.data[0],this.pageSpecificData=r,this.pageType=i.BLOG,this.setPageMetaData(f),[2]):[2]}}))}))},y=function(){return e(O,void 0,void 0,(function(){var e,r,a,n;return t(this,(function(t){switch(t.label){case 0:return[4,q({id:{eq:f.targetId},pagination:{page:1,limit:1}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(a=e.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length)?(r=e.data.data[0],this.pageSpecificData=r,this.pageType=i.BLOG_CATEGORY,this.setPageMetaData(f),[2]):[2]}}))}))},L=function(){return e(O,void 0,void 0,(function(){var e,r,a,n;return t(this,(function(t){switch(t.label){case 0:return[4,Y({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(a=e.data)||void 0===a?void 0:a.data)||void 0===n?void 0:n.length)?(r=e.data.data[0],[4,X([r])]):[2];case 2:return t.sent(),this.pageSpecificData=r,this.pageType=i.RAFFLE_DETAIL,this.setPageMetaData(f),[2]}}))}))},f.targetType){case u.BRAND:return[3,7];case u.CATEGORY:return[3,9];case u.PRODUCT:return[3,11];case o.BLOG:return[3,13];case o.BLOG_CATEGORY:return[3,15];case s.RAFFLE:return[3,17]}return[3,19];case 7:return[4,m()];case 8:return[2,P.sent()];case 9:return[4,T()];case 10:return[2,P.sent()];case 11:return[4,v()];case 12:return[2,P.sent()];case 13:return[4,S()];case 14:return[2,P.sent()];case 15:return[4,y()];case 16:return[2,P.sent()];case 17:return[4,L()];case 18:return[2,P.sent()];case 19:return[3,20];case 20:return[2]}}))}))},H.prototype.getPageComponentPropValues=function(r){return e(this,void 0,void 0,(function(){var a,n,i,s=this;return t(this,(function(o){switch(o.label){case 0:return a=this.theme.components.find((function(e){return e.id===r.componentId})),n={pageComponent:r,component:a,propValues:{}},i=function(a){return e(s,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return e=n.propValues,i=a.name,[4,this.getPageComponentPropValue(r,a)];case 1:return e[i]=t.sent(),[2]}}))}))},[4,Promise.all(a.props.map(i))];case 1:return o.sent(),[2,n]}}))}))},H.prototype.getPageComponentPropValue=function(r,a){return e(this,void 0,void 0,(function(){var e,n,i,s,o,u=this;return t(this,(function(t){switch(t.label){case 0:if(n=r.propValues[a.name],i=[c.RAFFLE_LIST],null==n&&!i.includes(a.type))return[2,null];switch(a.type){case c.TEXT:return[3,1];case c.RICH_TEXT:return[3,2];case c.BOOLEAN:return[3,3];case c.IMAGE:return[3,4];case c.IMAGE_LIST:return[3,5];case c.BRAND:return[3,6];case c.BRAND_LIST:return[3,7];case c.PRODUCT_LIST:return[3,8];case c.PRODUCT_DETAIL:return[3,9];case c.PRODUCT_ATTRIBUTE:return[3,10];case c.PRODUCT_ATTRIBUTE_LIST:return[3,11];case c.CATEGORY:return[3,12];case c.CATEGORY_LIST:return[3,13];case c.LINK:case c.LIST_OF_LINK:return[3,14];case c.COLOR:return[3,15];case c.CUSTOM:return[3,16];case c.COMPONENT:case c.COMPONENT_LIST:return[3,17];case c.BLOG:return[3,19];case c.BLOG_LIST:return[3,20];case c.BLOG_CATEGORY:return[3,21];case c.BLOG_CATEGORY_LIST:return[3,22];case c.RAFFLE:return[3,23];case c.RAFFLE_LIST:return[3,24];case c.SLIDER:return[3,25]}return[3,26];case 1:return e=new T(n),[3,27];case 2:return e=new I(n),[3,27];case 3:return e=new y(n),[3,27];case 4:return e=new L(n),[3,27];case 5:return e=new m(n),[3,27];case 6:return e=new f(n),[3,27];case 7:return e=new h(n),[3,27];case 8:return e=new d(this.pageType,n,this.pageSpecificData),[3,27];case 9:return e=new g(n),[3,27];case 10:return e=new R(n),[3,27];case 11:return e=new E(n),[3,27];case 12:return e=new O(n),[3,27];case 13:return e=new P(n),[3,27];case 14:return e=new v(n,this.theme,this.linkMetaDataTargetIds),[3,27];case 15:return e=new S(n),[3,27];case 16:return(s=this.theme.customData.find((function(e){return e.id===a.customDataId})))?(e=new D(n,s,this.theme,this.pageType,this,this.pageSpecificData,this.pageParams),[3,27]):[2];case 17:return o=n,[4,Promise.all(o.map((function(e){return u.getPageComponentPropValues(e)})))];case 18:case 28:return[2,t.sent()];case 19:return e=new w(n),[3,27];case 20:return e=new C(this.pageType,n,this.pageSpecificData),[3,27];case 21:return e=new A(n),[3,27];case 22:return e=new V(n),[3,27];case 23:return e=new j(n),[3,27];case 24:return e=new G,[3,27];case 25:return e=new b(n),[3,27];case 26:return[3,27];case 27:return[4,null==e?void 0:e.getValue()]}}))}))},H.prototype.setPageMetaData=function(e){this.page&&(this.page.pageTitle=e.pageTitle||null,this.page.description=e.description||null,this.page.canonicals=e.canonicals||null,this.page.disableIndex=e.disableIndex||null)},H.prototype.setLinkSlugs=function(){return e(this,void 0,void 0,(function(){var e,r,a;return t(this,(function(t){switch(t.label){case 0:return e=[],r=[],a=[],this.linkMetaDataTargetIds.forEach((function(t){switch(t.type){case"DEFAULT":e.push(t);break;case"BLOG":r.push(t);break;case"RAFFLE":a.push(t)}})),[4,Promise.all([this.getLinkSlugs(e,"DEFAULT"),this.getLinkSlugs(r,"BLOG"),this.getLinkSlugs(a,"RAFFLE")])];case 1:return[2,t.sent()]}}))}))},H.prototype.getLinkSlugs=function(r,n){return e(this,void 0,void 0,(function(){var i,s,o=this;return t(this,(function(u){switch(u.label){case 0:return i=a(r.map((function(e){return e.id}))),s=[],[4,function(){return e(o,void 0,void 0,(function(){var e,r,a,o,u;return t(this,(function(t){switch(t.label){case 0:switch(e=[],n){case"DEFAULT":return[3,1];case"BLOG":return[3,3];case"RAFFLE":return[3,5]}return[3,7];case 1:return[4,x({targetId:{in:i}})];case 2:return r=t.sent(),e=r.data||[],[3,8];case 3:return[4,K({targetId:{in:i}})];case 4:return a=t.sent(),e=(null===(u=a.data)||void 0===u?void 0:u.data)||[],[3,8];case 5:return[4,J({targetId:{in:i}})];case 6:return o=t.sent(),e=o.data||[],[3,8];case 7:return[3,8];case 8:return e.length&&(s=e),[2]}}))}))}()];case 1:return u.sent(),r.forEach((function(e){var t=s.find((function(t){return t.targetId===e.id}));t&&(e.navigationLink.href+=t.slug)})),[2]}}))}))},H}();export{H as IkasPageDataProvider};
1
+ import{__awaiter as e,__generator as t,__assign as a}from'./../ext/tslib/tslib.es6.js';import r from"lodash/uniq";import n from"lodash/flatten";import{makeAutoObservable as i}from"mobx";import{IkasThemeJsonPageType as s,IkasRaffleMetadataTargetType as o,IkasBlogMetaDataTargetType as u,IkasHTMLMetaDataTargetType as c,IkasThemeJsonComponentPropType as p}from"@ikas/storefront-models";import{IkasStorefrontConfig as l}from"@ikas/storefront-config";import{IkasProductFunctions as d}from"@ikas/storefront-model-functions";import{IkasProductListPropValueProvider as h}from"./prop-value/product-list.js";import{IkasProductPropValueProvider as g}from"./prop-value/product-detail.js";import{IkasBrandListPropValueProvider as f}from"./prop-value/brand-list.js";import{IkasBrandPropValueProvider as v}from"./prop-value/brand.js";import{IkasLinkPropValueProvider as m}from"./prop-value/link.js";import{IkasImageListPropValueProvider as T}from"./prop-value/image-list.js";import{IkasTextPropValueProvider as S}from"./prop-value/text.js";import{IkasColorPropValueProvider as y}from"./prop-value/color.js";import{IkasBooleanPropValueProvider as D}from"./prop-value/boolean.js";import{IkasImagePropValueProvider as L}from"./prop-value/image.js";import{IkasCategoryPropValueProvider as O}from"./prop-value/category.js";import{IkasCategoryListPropValueProvider as P}from"./prop-value/category-list.js";import{IkasCustomPropValueProvider as b}from"./prop-value/custom.js";import{IkasSliderPropValueProvider as I}from"./prop-value/slider.js";import{IkasRichTextPropValueProvider as C}from"./prop-value/rich-text.js";import{IkasBlogPropValueProvider as w}from"./prop-value/blog.js";import{IkasBlogListPropValueProvider as R}from"./prop-value/blog-list.js";import{IkasAttributePropValueProvider as E}from"./prop-value/attribute.js";import{IkasAttributeListPropValueProvider as A}from"./prop-value/attribute-list.js";import{IkasBlogCategoryPropValueProvider as V}from"./prop-value/blog-category.js";import{IkasBlogCategoryListPropValueProvider as j}from"./prop-value/blog-category-list.js";import{IkasRafflePropValueProvider as G}from"./prop-value/raffle.js";import{IkasRaffleListPropValueProvider as F}from"./prop-value/raffle-list.js";import{listMerchantSettings as _,listCustomerReviewSummary as B,listProductOptionSet as M,searchProducts as k,listProductBrand as U,listCategory as N,listBlog as q,listBlogCategory as Y,listStorefrontRaffle as x,listHTMLMetaData as J,listRaffleMetaData as K,listBlogMetaData as X}from"@ikas/storefront-api";import{populateRaffleProducts as H}from"./helpers/raffle.js";var $=function(){function $(e,t,a){this.pageType=null,this.pageParams={},this.pageComponentPropValues=[],this.pageSpecificData=null,this.merchantSettings=null,this.possiblePageTypes=[],this.linkMetaDataTargetIds=[],this.productReviewSummary=null,this.theme=e,this.pageParams=t||{},this.pageType=a,i(this)}return Object.defineProperty($.prototype,"page",{get:function(){var e=this;if(this.pageType===s.CUSTOM){var t=this.pageParams.slug;return this.theme.pages.find((function(e){return e.type===s.CUSTOM&&e.slug===t}))}return this.theme.pages.find((function(t){return t.type===e.pageType}))},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"nextPageData",{get:function(){var e,t,r,n,i,o=[],u=[];return this.pageComponentPropValues.forEach((function(e){if(u.push({pageComponent:{id:e.pageComponent.id,componentId:e.pageComponent.componentId},propValues:e.propValues}),!o.find((function(t){return t.id===e.component.id}))){var t=a({},e.component);t.props.forEach((function(e){delete e.description,delete e.displayName,delete e.translations,delete e.groupId})),delete t.translations,delete t.defaultPropValues,delete t.displayName,delete t.description,delete t.dir,o.push(t)}})),{props:JSON.parse(JSON.stringify({propValues:u,themeJsonComponents:o,customDataList:this.theme.customData,pageSpecificData:this.pageSpecificData||null,pageType:(null===(e=this.page)||void 0===e?void 0:e.type)||s.CUSTOM,pageTitle:(null===(t=this.page)||void 0===t?void 0:t.pageTitle)||null,pageDescription:(null===(r=this.page)||void 0===r?void 0:r.description)||null,canonicals:(null===(n=this.page)||void 0===n?void 0:n.canonicals)||null,disableIndex:(null===(i=this.page)||void 0===i?void 0:i.disableIndex)||null,themeSettings:this.theme.settings||{},productReviewSummary:this.productReviewSummary,configJson:l.toJSON()}))}},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"specification",{get:function(){var e,t,a=this,r=this.page;return(null==r?void 0:r.type)===s.PRODUCT?null===(e=r.specifications)||void 0===e?void 0:e.find((function(e){var t;return e.id===(null===(t=a.pageSpecificData)||void 0===t?void 0:t.id)})):null===(t=null==r?void 0:r.specifications)||void 0===t?void 0:t.find((function(e){var t;return e.id===(null===(t=a.pageSpecificData)||void 0===t?void 0:t.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"pageComponents",{get:function(){var e;return this.specification?this.specification.components:(null===(e=this.page)||void 0===e?void 0:e.components)||[]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"$pageComponentPropValues",{get:function(){return this.pageComponentPropValues},enumerable:!1,configurable:!0}),$.prototype.getMerchantSettings=function(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,_({})];case 1:return(e=t.sent()).isSuccess&&e.data&&(this.merchantSettings=e.data),[2]}}))}))},$.prototype.getPageData=function(){return e(this,void 0,void 0,(function(){var e,a=this;return t(this,(function(t){switch(t.label){case 0:return this.pageSpecificData?[3,2]:[4,this.getPageSpecificData()];case 1:t.sent(),t.label=2;case 2:return this.page?[4,this.getMerchantSettings()]:[2];case 3:return t.sent(),e=this,[4,Promise.all(this.pageComponents.map((function(e){return a.getPageComponentPropValues(e)})))];case 4:return e.pageComponentPropValues=t.sent(),[4,this.setLinkSlugs()];case 5:return t.sent(),[4,this.getProductReviewSummary()];case 6:return t.sent(),[2]}}))}))},$.prototype.getProductReviewSummary=function(){var a,r,n;return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return this.pageType!==s.PRODUCT?[3,2]:[4,B({productId:{eq:null===(a=this.pageSpecificData)||void 0===a?void 0:a.id}})];case 1:(e=t.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)&&(this.productReviewSummary=e.data.data[0]),t.label=2;case 2:return[2]}}))}))},$.prototype.getPageSpecificData=function(){var a,r,n,i;return e(this,void 0,void 0,(function(){var p,h,g,f,v,m,T,S,y,D,L=this;return t(this,(function(O){switch(O.label){case 0:return this.pageType&&![s.BRAND,s.PRODUCT,s.CATEGORY,s.BLOG,s.BLOG_CATEGORY,s.RAFFLE_DETAIL].includes(this.pageType)?[2]:(p=this.pageParams.slug)?(h=[],(null===(a=this.possiblePageTypes)||void 0===a?void 0:a.includes(s.BLOG))||(null===(r=this.possiblePageTypes)||void 0===r?void 0:r.includes(s.BLOG_CATEGORY))?[4,X({slug:{eq:p}})]:[3,2]):[2];case 1:return g=O.sent(),(h=(null===(n=g.data)||void 0===n?void 0:n.data)||[]).length?[3,6]:[2];case 2:return(null===(i=this.possiblePageTypes)||void 0===i?void 0:i.includes(s.RAFFLE_DETAIL))?[4,K({slug:{eq:p}})]:[3,4];case 3:return g=O.sent(),(h=g.data||[]).length?[3,6]:[2];case 4:return[4,J({slug:{eq:p}})];case 5:if(g=O.sent(),!(h=g.data||[])||!h.length)return[2];O.label=6;case 6:if(!(f=h[0]).targetId)return[2];switch(v=function(){return e(L,void 0,void 0,(function(){var e,a,r,n,i,o,u,c,p,h,g;return t(this,(function(t){switch(t.label){case 0:return[4,k({input:{productIdList:[f.targetId],priceListId:l.getPriceListId(),salesChannelId:l.getSalesChannelId(),locale:l.getCurrentLocale()}})];case 1:return e=t.sent(),(null===(h=null===(p=null==e?void 0:e.data)||void 0===p?void 0:p.data)||void 0===h?void 0:h.length)?(a=e.data.data[0]).productOptionSetId?[4,M({id:{eq:a.productOptionSetId}})]:[3,3]:[2];case 2:(r=t.sent()).isSuccess&&(null===(g=null==r?void 0:r.data)||void 0===g?void 0:g.length)&&(a.productOptionSet=r.data[0]),t.label=3;case 3:return(n=a.variants.find((function(e){return e.isActive})))?(a.selectedVariantValues=n.variantValues,i=d.getDisplayedVariantTypes,this.pageSpecificData=a,(o=i(this.pageSpecificData,a.selectedVariantValues)).length&&(u=o[0]).displayedVariantValues.length&&(c=u.displayedVariantValues.find((function(e){return e.hasStock})))&&(this.pageSpecificData.selectedVariantValues=c.variant.variantValues),this.pageType=s.PRODUCT,this.setPageMetaData(f),[2]):[2]}}))}))},m=function(){return e(L,void 0,void 0,(function(){var e,a,r,n;return t(this,(function(t){switch(t.label){case 0:return[4,U({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(a=e.data.data[0],this.pageSpecificData=a,this.pageType=s.BRAND,this.setPageMetaData(f),[2]):[2]}}))}))},T=function(){return e(L,void 0,void 0,(function(){var e,a,r,n;return t(this,(function(t){switch(t.label){case 0:return[4,N({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(a=e.data.data[0],this.pageSpecificData=a,this.pageType=s.CATEGORY,this.setPageMetaData(f),[2]):[2]}}))}))},S=function(){return e(L,void 0,void 0,(function(){var e,a,r,n;return t(this,(function(t){switch(t.label){case 0:return[4,q({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(a=e.data.data[0],this.pageSpecificData=a,this.pageType=s.BLOG,this.setPageMetaData(f),[2]):[2]}}))}))},y=function(){return e(L,void 0,void 0,(function(){var e,a,r,n;return t(this,(function(t){switch(t.label){case 0:return[4,Y({id:{eq:f.targetId},pagination:{page:1,limit:1}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(a=e.data.data[0],this.pageSpecificData=a,this.pageType=s.BLOG_CATEGORY,this.setPageMetaData(f),[2]):[2]}}))}))},D=function(){return e(L,void 0,void 0,(function(){var e,a,r,n;return t(this,(function(t){switch(t.label){case 0:return[4,x({id:{eq:f.targetId}})];case 1:return(e=t.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(a=e.data.data[0],[4,H([a])]):[2];case 2:return t.sent(),this.pageSpecificData=a,this.pageType=s.RAFFLE_DETAIL,this.setPageMetaData(f),[2]}}))}))},f.targetType){case c.BRAND:return[3,7];case c.CATEGORY:return[3,9];case c.PRODUCT:return[3,11];case u.BLOG:return[3,13];case u.BLOG_CATEGORY:return[3,15];case o.RAFFLE:return[3,17]}return[3,19];case 7:return[4,m()];case 8:return[2,O.sent()];case 9:return[4,T()];case 10:return[2,O.sent()];case 11:return[4,v()];case 12:return[2,O.sent()];case 13:return[4,S()];case 14:return[2,O.sent()];case 15:return[4,y()];case 16:return[2,O.sent()];case 17:return[4,D()];case 18:return[2,O.sent()];case 19:return[3,20];case 20:return[2]}}))}))},$.prototype.getPageComponentPropValues=function(a){return e(this,void 0,void 0,(function(){var r,n,i,s=this;return t(this,(function(o){switch(o.label){case 0:return r=this.theme.components.find((function(e){return e.id===a.componentId})),n={pageComponent:a,component:r,propValues:{}},i=function(r){return e(s,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return e=n.propValues,i=r.name,[4,this.getPageComponentPropValue(a,r)];case 1:return e[i]=t.sent(),[2]}}))}))},[4,Promise.all(r.props.map(i))];case 1:return o.sent(),[2,n]}}))}))},$.prototype.getPageComponentPropValue=function(a,r){return e(this,void 0,void 0,(function(){var e,n,i,s,o,u=this;return t(this,(function(t){switch(t.label){case 0:if(n=a.propValues[r.name],i=[p.RAFFLE_LIST],null==n&&!i.includes(r.type))return[2,null];switch(r.type){case p.TEXT:return[3,1];case p.RICH_TEXT:return[3,2];case p.BOOLEAN:return[3,3];case p.IMAGE:return[3,4];case p.IMAGE_LIST:return[3,5];case p.BRAND:return[3,6];case p.BRAND_LIST:return[3,7];case p.PRODUCT_LIST:return[3,8];case p.PRODUCT_DETAIL:return[3,9];case p.PRODUCT_ATTRIBUTE:return[3,10];case p.PRODUCT_ATTRIBUTE_LIST:return[3,11];case p.CATEGORY:return[3,12];case p.CATEGORY_LIST:return[3,13];case p.LINK:case p.LIST_OF_LINK:return[3,14];case p.COLOR:return[3,15];case p.CUSTOM:return[3,16];case p.COMPONENT:case p.COMPONENT_LIST:return[3,17];case p.BLOG:return[3,19];case p.BLOG_LIST:return[3,20];case p.BLOG_CATEGORY:return[3,21];case p.BLOG_CATEGORY_LIST:return[3,22];case p.RAFFLE:return[3,23];case p.RAFFLE_LIST:return[3,24];case p.SLIDER:return[3,25]}return[3,26];case 1:return e=new S(n),[3,27];case 2:return e=new C(n),[3,27];case 3:return e=new D(n),[3,27];case 4:return e=new L(n),[3,27];case 5:return e=new T(n),[3,27];case 6:return e=new v(n),[3,27];case 7:return e=new f(n),[3,27];case 8:return e=new h(this.pageType,n,this.pageSpecificData),[3,27];case 9:return e=new g(n),[3,27];case 10:return e=new E(n),[3,27];case 11:return e=new A(n),[3,27];case 12:return e=new O(n),[3,27];case 13:return e=new P(n),[3,27];case 14:return e=new m(n,this.theme,this.linkMetaDataTargetIds),[3,27];case 15:return e=new y(n),[3,27];case 16:return(s=this.theme.customData.find((function(e){return e.id===r.customDataId})))?(e=new b(n,s,this.theme,this.pageType,this,this.pageSpecificData,this.pageParams),[3,27]):[2];case 17:return o=n,[4,Promise.all(o.map((function(e){return u.getPageComponentPropValues(e)})))];case 18:case 28:return[2,t.sent()];case 19:return e=new w(n),[3,27];case 20:return e=new R(this.pageType,n,this.pageSpecificData),[3,27];case 21:return e=new V(n),[3,27];case 22:return e=new j(n),[3,27];case 23:return e=new G(n),[3,27];case 24:return e=new F,[3,27];case 25:return e=new I(n),[3,27];case 26:return[3,27];case 27:return[4,null==e?void 0:e.getValue()]}}))}))},$.prototype.setPageMetaData=function(e){this.page&&(this.page.pageTitle=e.pageTitle||null,this.page.description=e.description||null,this.page.canonicals=e.canonicals||null,this.page.disableIndex=e.disableIndex||null)},$.prototype.setLinkSlugs=function(){return e(this,void 0,void 0,(function(){var e,a,r;return t(this,(function(t){switch(t.label){case 0:return e=[],a=[],r=[],this.linkMetaDataTargetIds.forEach((function(t){switch(t.type){case"DEFAULT":e.push(t);break;case"BLOG":a.push(t);break;case"RAFFLE":r.push(t)}})),[4,Promise.all([this.getLinkSlugs(e,"DEFAULT"),this.getLinkSlugs(a,"BLOG"),this.getLinkSlugs(r,"RAFFLE")])];case 1:return[2,t.sent()]}}))}))},$.prototype.getLinkSlugs=function(a,n){return e(this,void 0,void 0,(function(){var i,s,o=this;return t(this,(function(u){switch(u.label){case 0:return i=r(a.map((function(e){return e.id}))),s=[],i.length?[4,function(){return e(o,void 0,void 0,(function(){var e,a,r,o,u;return t(this,(function(t){switch(t.label){case 0:switch(e=[],n){case"DEFAULT":return[3,1];case"BLOG":return[3,3];case"RAFFLE":return[3,5]}return[3,7];case 1:return[4,J({targetId:{in:i}})];case 2:return a=t.sent(),e=a.data||[],[3,8];case 3:return[4,X({targetId:{in:i}})];case 4:return r=t.sent(),e=(null===(u=r.data)||void 0===u?void 0:u.data)||[],[3,8];case 5:return[4,K({targetId:{in:i}})];case 6:return o=t.sent(),e=o.data||[],[3,8];case 7:return[3,8];case 8:return e.length&&(s=e),[2]}}))}))}()]:[2];case 1:return u.sent(),a.forEach((function(e){var t=s.find((function(t){return t.targetId===e.id}));t&&(e.navigationLink.href+=t.slug)})),[2]}}))}))},$.prototype.getFlatCustomData=function(e){var t=this;if(!e.nestedData||!e.nestedData.length)return[e];var a=n(e.nestedData.map((function(e){return t.getFlatCustomData(e)}))),r=[];return r.push(e),r=r.concat(a)},$}();export{$ as IkasPageDataProvider};
@@ -1 +1 @@
1
- import{IkasProductType as t,IkasRaffleVerificationType as e}from"@ikas/storefront-models";function a(){return{id:"",name:"",type:t.PHYSICAL,description:"",shortDescription:"",metaData:null,brand:null,categories:[],tags:[],variants:[],attributes:[],variantTypes:[],productOptionSetId:null,baseUnit:null}}function n(){return{categoryPath:[],description:null,imageId:null,name:"",parentId:null,metaData:null,categoryPathItems:[],orderType:null,id:"",createdAt:0,updatedAt:0}}function d(){return{description:null,imageId:null,metaData:null,orderType:null,name:"",id:"",createdAt:0,updatedAt:0}}function r(){return{createdAt:0,id:"",updatedAt:0,blogContent:{content:"",createdAt:0,id:"",updatedAt:0},categoryId:"",imageId:"",isPublished:!1,locale:null,metadata:{canonicals:[],description:"",disableIndex:!1,pageTitle:null,slug:"",targetId:null,targetType:null,createdAt:0,id:"",updatedAt:0},publishedAt:null,shortDescription:"",storefrontId:"",tagIds:[],tags:[],title:"",writer:{firstName:"",lastName:""},category:l()}}function l(){return{createdAt:0,id:"",updatedAt:0,imageId:"",metadata:{canonicals:[],description:"",disableIndex:!1,pageTitle:null,slug:"",targetId:null,targetType:null,createdAt:0,id:"",updatedAt:0},name:""}}function i(){return{createdAt:0,id:"",updatedAt:0,deleted:!1,dateRange:null,metadata:null,name:"",requiredCustomerAccount:!1,status:!1,variants:[],products:[],verificationType:e.EMAIL}}export{r as getPlaceholderBlog,l as getPlaceholderBlogCategory,d as getPlaceholderBrand,n as getPlaceholderCategory,a as getPlaceholderProduct,i as getPlaceholderRaffle};
1
+ import{IkasProductType as t,IkasRaffleVerificationType as e}from"@ikas/storefront-models";function a(){return{id:"",name:"",type:t.PHYSICAL,description:"",shortDescription:"",metaData:null,brand:null,categories:[],tags:[],variants:[],attributes:[],variantTypes:[],productOptionSetId:null,baseUnit:null,averageRating:null,reviewCount:null}}function n(){return{categoryPath:[],description:null,imageId:null,name:"",parentId:null,metaData:null,categoryPathItems:[],orderType:null,id:"",createdAt:0,updatedAt:0}}function d(){return{description:null,imageId:null,metaData:null,orderType:null,name:"",id:"",createdAt:0,updatedAt:0}}function l(){return{createdAt:0,id:"",updatedAt:0,blogContent:{content:"",createdAt:0,id:"",updatedAt:0},categoryId:"",imageId:"",isPublished:!1,locale:null,metadata:{canonicals:[],description:"",disableIndex:!1,pageTitle:null,slug:"",targetId:null,targetType:null,createdAt:0,id:"",updatedAt:0},publishedAt:null,shortDescription:"",storefrontId:"",tagIds:[],tags:[],title:"",writer:{firstName:"",lastName:""},category:r()}}function r(){return{createdAt:0,id:"",updatedAt:0,imageId:"",metadata:{canonicals:[],description:"",disableIndex:!1,pageTitle:null,slug:"",targetId:null,targetType:null,createdAt:0,id:"",updatedAt:0},name:""}}function i(){return{createdAt:0,id:"",updatedAt:0,deleted:!1,dateRange:null,metadata:null,name:"",requiredCustomerAccount:!1,status:!1,variants:[],products:[],verificationType:e.EMAIL}}export{l as getPlaceholderBlog,r as getPlaceholderBlogCategory,d as getPlaceholderBrand,n as getPlaceholderCategory,a as getPlaceholderProduct,i as getPlaceholderRaffle};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import a from"lodash/cloneDeep";import{IkasBrandListPropValueProvider as s}from"./brand-list.js";import{IkasBrandPropValueProvider as u}from"./brand.js";import{IkasCategoryListPropValueProvider as n}from"./category-list.js";import{IkasCategoryPropValueProvider as i}from"./category.js";import{IkasColorPropValueProvider as o}from"./color.js";import{IkasBooleanPropValueProvider as c}from"./boolean.js";import{IkasTextPropValueProvider as l}from"./text.js";import{IkasImageListPropValueProvider as h}from"./image-list.js";import{IkasImagePropValueProvider as p}from"./image.js";import{IkasLinkPropValueProvider as m}from"./link.js";import{IkasProductPropValueProvider as f}from"./product-detail.js";import{IkasProductListPropValueProvider as g}from"./product-list.js";import{IkasRichTextPropValueProvider as v}from"./rich-text.js";import{IkasBlogPropValueProvider as d}from"./blog.js";import{IkasBlogListPropValueProvider as D}from"./blog-list.js";import{IkasAttributePropValueProvider as V}from"./attribute.js";import{IkasAttributeListPropValueProvider as w}from"./attribute-list.js";import{IkasBlogCategoryPropValueProvider as y}from"./blog-category.js";import{IkasBlogCategoryListPropValueProvider as T}from"./blog-category-list.js";import{IkasRaffleListPropValueProvider as L}from"./raffle-list.js";import{IkasRafflePropValueProvider as P}from"./raffle.js";import{IkasSliderPropValueProvider as b}from"./slider.js";import{IkasThemeJsonComponentPropType as R}from"@ikas/storefront-models";var I=function(){function I(t,e,r,a,s,u,n){this.value=t,this.customData=e,this.theme=r,this.pageType=a,this.pageDataProvider=s,this.pageSpecificData=u,this.pageParams=n}return I.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if((void 0===this.value||null===this.value)&&this.customData.type!==R.RAFFLE_LIST)return[2,{value:null,customData:this.customData}];e.label=1;case 1:switch(e.trys.push([1,58,,59]),this.customData.type){case R.TEXT:return[3,2];case R.RICH_TEXT:return[3,4];case R.BOOLEAN:return[3,6];case R.BRAND_LIST:return[3,8];case R.BRAND:return[3,10];case R.CATEGORY_LIST:return[3,12];case R.CATEGORY:return[3,14];case R.COLOR:return[3,16];case R.IMAGE_LIST:return[3,18];case R.IMAGE:return[3,20];case R.LINK:case R.LIST_OF_LINK:return[3,22];case R.PRODUCT_DETAIL:return[3,24];case R.PRODUCT_LIST:return[3,26];case R.PRODUCT_ATTRIBUTE:return[3,28];case R.PRODUCT_ATTRIBUTE_LIST:return[3,30];case R.OBJECT:return[3,32];case R.DYNAMIC_LIST:case R.STATIC_LIST:return[3,34];case R.ENUM:return[3,36];case R.CUSTOM:return[3,38];case R.COMPONENT:case R.COMPONENT_LIST:return[3,40];case R.BLOG:return[3,42];case R.BLOG_LIST:return[3,44];case R.BLOG_CATEGORY:return[3,46];case R.BLOG_CATEGORY_LIST:return[3,48];case R.RAFFLE:return[3,50];case R.RAFFLE_LIST:return[3,52];case R.SLIDER:return[3,54]}return[3,56];case 2:return[4,this.getTextValue()];case 3:return t=e.sent(),[3,57];case 4:return[4,this.getRichTextPropValue()];case 5:return t=e.sent(),[3,57];case 6:return[4,this.getBooleanValue()];case 7:return t=e.sent(),[3,57];case 8:return[4,this.getBrandListPropValue()];case 9:return t=e.sent(),[3,57];case 10:return[4,this.getBrandPropValue()];case 11:return t=e.sent(),[3,57];case 12:return[4,this.getCategoryListPropValue()];case 13:return t=e.sent(),[3,57];case 14:return[4,this.getCategoryPropValue()];case 15:return t=e.sent(),[3,57];case 16:return[4,this.getColorPropValue()];case 17:return t=e.sent(),[3,57];case 18:return[4,this.getImageListPropValue()];case 19:return t=e.sent(),[3,57];case 20:return[4,this.getImagePropValue()];case 21:return t=e.sent(),[3,57];case 22:return[4,this.getLinkPropValue()];case 23:return t=e.sent(),[3,57];case 24:return[4,this.getProductDetailPropValue()];case 25:return t=e.sent(),[3,57];case 26:return[4,this.getProductListPropValue()];case 27:return t=e.sent(),[3,57];case 28:return[4,this.getProductAttributePropValue()];case 29:return t=e.sent(),[3,57];case 30:return[4,this.getProductAttributeListPropValue()];case 31:return t=e.sent(),[3,57];case 32:return[4,this.getObjectValue()];case 33:return t=e.sent(),[3,57];case 34:return[4,this.getArrayValue()];case 35:return t=e.sent(),[3,57];case 36:return[4,this.getEnumValue()];case 37:return t=e.sent(),[3,57];case 38:return[4,this.getCustomDataValue()];case 39:return t=e.sent(),[3,57];case 40:return[4,this.getComponentListValue()];case 41:return t=e.sent(),[3,57];case 42:return[4,this.getBlogValue()];case 43:return t=e.sent(),[3,57];case 44:return[4,this.getBlogListValue()];case 45:return t=e.sent(),[3,57];case 46:return[4,this.getBlogCategoryValue()];case 47:return t=e.sent(),[3,57];case 48:return[4,this.getBlogCategoryListValue()];case 49:return t=e.sent(),[3,57];case 50:return[4,this.getRaffleValue()];case 51:return t=e.sent(),[3,57];case 52:return[4,this.getRaffleListValue()];case 53:return t=e.sent(),[3,57];case 54:return[4,this.getSliderValue()];case 55:return t=e.sent(),[3,57];case 56:return[3,57];case 57:return[3,59];case 58:return e.sent(),[2];case 59:return!this.customData.isRequired||void 0!==(null==t?void 0:t.value)&&null!==(null==t?void 0:t.value)?[2,t]:[2]}}))}))},I.prototype.getBooleanValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new c(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getBrandListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new s(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getBrandPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new u(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getCategoryListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new n(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getCategoryPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new i(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getColorPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new o(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getRichTextPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new v(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getImageListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new h(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getImagePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new p(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getLinkPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new m(this.value,this.theme,this.pageDataProvider.linkMetaDataTargetIds).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getProductDetailPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new f(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getProductListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new g(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getProductAttributePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new V(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getProductAttributeListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new w(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getTextValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new l(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getObjectValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,s,u,n;return e(this,(function(e){switch(e.label){case 0:t={},r=0,a=this.customData.nestedData||[],e.label=1;case 1:if(!(r<a.length))return[3,4];if(!(s=a[r]).key)return[3,3];if(u=this.value[s.key],s.isRequired&&s.type!==R.RAFFLE_LIST&&null==u)throw new Error("Required data is missing");return[4,new I(u,s,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(n=e.sent(),s.isRequired&&null==n)throw new Error("Required data is missing");t[s.key]=n,e.label=3;case 3:return r++,[3,1];case 4:return[2,{value:t,customData:this.customData}]}}))}))},I.prototype.getArrayValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,s,u,n;return e(this,(function(e){switch(e.label){case 0:if(!this.value||!Array.isArray(this.value))throw new Error("Incorrect data!");t=[],r=this.customData.nestedData[0],a=0,s=this.value,e.label=1;case 1:if(!(a<s.length))return[3,4];if(u=s[a],r.isRequired&&r.type!==R.RAFFLE_LIST&&null==u)throw new Error("Required data is missing");return[4,new I(u,r,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(n=e.sent(),r.isRequired&&null==n)throw new Error("Required data is missing");t.push(n),e.label=3;case 3:return a++,[3,1];case 4:return[2,{value:t,customData:this.customData}]}}))}))},I.prototype.getEnumValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,{value:this.value,customData:this.customData}]}))}))},I.prototype.getCustomDataValue=function(){return t(this,void 0,void 0,(function(){var t,r=this;return e(this,(function(e){switch(e.label){case 0:return(t=this.theme.customData.find((function(t){return t.id===r.customData.customDataId})))?((t=a(t)).isRequired=this.customData.isRequired,[4,new I(this.value,t,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()]):[2,{value:null,customData:this.customData}];case 1:return[2,e.sent()]}}))}))},I.prototype.getComponentListValue=function(){return t(this,void 0,void 0,(function(){var t,a,s=this;return e(this,(function(e){switch(e.label){case 0:return t=this.value?this.value.map((function(t){return r({},t)})):[],a={},[4,Promise.all(t.map((function(t){return s.pageDataProvider.getPageComponentPropValues(t)})))];case 1:return[2,(a.value=e.sent(),a.customData=this.customData,a)]}}))}))},I.prototype.getBlogValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new d(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getBlogListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new D(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getBlogCategoryValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new y(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getBlogCategoryListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new T(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getRaffleValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new P(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getRaffleListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,(new L).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I.prototype.getSliderValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new b(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},I}();export{I as IkasCustomPropValueProvider};
1
+ import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import a from"lodash/cloneDeep";import{IkasBrandListPropValueProvider as s}from"./brand-list.js";import{IkasBrandPropValueProvider as u}from"./brand.js";import{IkasCategoryListPropValueProvider as i}from"./category-list.js";import{IkasCategoryPropValueProvider as n}from"./category.js";import{IkasColorPropValueProvider as o}from"./color.js";import{IkasBooleanPropValueProvider as c}from"./boolean.js";import{IkasTextPropValueProvider as l}from"./text.js";import{IkasImageListPropValueProvider as h}from"./image-list.js";import{IkasImagePropValueProvider as d}from"./image.js";import{IkasLinkPropValueProvider as p}from"./link.js";import{IkasProductPropValueProvider as m}from"./product-detail.js";import{IkasProductListPropValueProvider as f}from"./product-list.js";import{IkasRichTextPropValueProvider as g}from"./rich-text.js";import{IkasBlogPropValueProvider as v}from"./blog.js";import{IkasBlogListPropValueProvider as D}from"./blog-list.js";import{IkasAttributePropValueProvider as V}from"./attribute.js";import{IkasAttributeListPropValueProvider as w}from"./attribute-list.js";import{IkasBlogCategoryPropValueProvider as I}from"./blog-category.js";import{IkasBlogCategoryListPropValueProvider as y}from"./blog-category-list.js";import{IkasRaffleListPropValueProvider as T}from"./raffle-list.js";import{IkasRafflePropValueProvider as L}from"./raffle.js";import{IkasSliderPropValueProvider as P}from"./slider.js";import{IkasThemeJsonComponentPropType as b}from"@ikas/storefront-models";var R=function(){function R(t,e,r,a,s,u,i){this.value=t,this.customData=e,this.theme=r,this.pageType=a,this.pageDataProvider=s,this.pageSpecificData=u,this.pageParams=i}return R.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if((void 0===this.value||null===this.value)&&this.customData.type!==b.RAFFLE_LIST)return[2,{value:null,customDataId:this.customData.id}];e.label=1;case 1:switch(e.trys.push([1,58,,59]),this.customData.type){case b.TEXT:return[3,2];case b.RICH_TEXT:return[3,4];case b.BOOLEAN:return[3,6];case b.BRAND_LIST:return[3,8];case b.BRAND:return[3,10];case b.CATEGORY_LIST:return[3,12];case b.CATEGORY:return[3,14];case b.COLOR:return[3,16];case b.IMAGE_LIST:return[3,18];case b.IMAGE:return[3,20];case b.LINK:case b.LIST_OF_LINK:return[3,22];case b.PRODUCT_DETAIL:return[3,24];case b.PRODUCT_LIST:return[3,26];case b.PRODUCT_ATTRIBUTE:return[3,28];case b.PRODUCT_ATTRIBUTE_LIST:return[3,30];case b.OBJECT:return[3,32];case b.DYNAMIC_LIST:case b.STATIC_LIST:return[3,34];case b.ENUM:return[3,36];case b.CUSTOM:return[3,38];case b.COMPONENT:case b.COMPONENT_LIST:return[3,40];case b.BLOG:return[3,42];case b.BLOG_LIST:return[3,44];case b.BLOG_CATEGORY:return[3,46];case b.BLOG_CATEGORY_LIST:return[3,48];case b.RAFFLE:return[3,50];case b.RAFFLE_LIST:return[3,52];case b.SLIDER:return[3,54]}return[3,56];case 2:return[4,this.getTextValue()];case 3:return t=e.sent(),[3,57];case 4:return[4,this.getRichTextPropValue()];case 5:return t=e.sent(),[3,57];case 6:return[4,this.getBooleanValue()];case 7:return t=e.sent(),[3,57];case 8:return[4,this.getBrandListPropValue()];case 9:return t=e.sent(),[3,57];case 10:return[4,this.getBrandPropValue()];case 11:return t=e.sent(),[3,57];case 12:return[4,this.getCategoryListPropValue()];case 13:return t=e.sent(),[3,57];case 14:return[4,this.getCategoryPropValue()];case 15:return t=e.sent(),[3,57];case 16:return[4,this.getColorPropValue()];case 17:return t=e.sent(),[3,57];case 18:return[4,this.getImageListPropValue()];case 19:return t=e.sent(),[3,57];case 20:return[4,this.getImagePropValue()];case 21:return t=e.sent(),[3,57];case 22:return[4,this.getLinkPropValue()];case 23:return t=e.sent(),[3,57];case 24:return[4,this.getProductDetailPropValue()];case 25:return t=e.sent(),[3,57];case 26:return[4,this.getProductListPropValue()];case 27:return t=e.sent(),[3,57];case 28:return[4,this.getProductAttributePropValue()];case 29:return t=e.sent(),[3,57];case 30:return[4,this.getProductAttributeListPropValue()];case 31:return t=e.sent(),[3,57];case 32:return[4,this.getObjectValue()];case 33:return t=e.sent(),[3,57];case 34:return[4,this.getArrayValue()];case 35:return t=e.sent(),[3,57];case 36:return[4,this.getEnumValue()];case 37:return t=e.sent(),[3,57];case 38:return[4,this.getCustomDataValue()];case 39:return t=e.sent(),[3,57];case 40:return[4,this.getComponentListValue()];case 41:return t=e.sent(),[3,57];case 42:return[4,this.getBlogValue()];case 43:return t=e.sent(),[3,57];case 44:return[4,this.getBlogListValue()];case 45:return t=e.sent(),[3,57];case 46:return[4,this.getBlogCategoryValue()];case 47:return t=e.sent(),[3,57];case 48:return[4,this.getBlogCategoryListValue()];case 49:return t=e.sent(),[3,57];case 50:return[4,this.getRaffleValue()];case 51:return t=e.sent(),[3,57];case 52:return[4,this.getRaffleListValue()];case 53:return t=e.sent(),[3,57];case 54:return[4,this.getSliderValue()];case 55:return t=e.sent(),[3,57];case 56:return[3,57];case 57:return[3,59];case 58:return e.sent(),[2];case 59:return!this.customData.isRequired||void 0!==(null==t?void 0:t.value)&&null!==(null==t?void 0:t.value)?[2,t]:[2]}}))}))},R.prototype.getBooleanValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new c(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getBrandListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new s(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getBrandPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new u(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getCategoryListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new i(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getCategoryPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new n(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getColorPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new o(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getRichTextPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new g(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getImageListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new h(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getImagePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new d(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getLinkPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new p(this.value,this.theme,this.pageDataProvider.linkMetaDataTargetIds).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getProductDetailPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new m(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getProductListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new f(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getProductAttributePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new V(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getProductAttributeListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new w(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getTextValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new l(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getObjectValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,s,u,i;return e(this,(function(e){switch(e.label){case 0:t={},r=0,a=this.customData.nestedData||[],e.label=1;case 1:if(!(r<a.length))return[3,4];if(!(s=a[r]).key)return[3,3];if(u=this.value[s.key],s.isRequired&&s.type!==b.RAFFLE_LIST&&null==u)throw new Error("Required data is missing");return[4,new R(u,s,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(i=e.sent(),s.isRequired&&null==i)throw new Error("Required data is missing");t[s.key]=i,e.label=3;case 3:return r++,[3,1];case 4:return[2,{value:t,customDataId:this.customData.id}]}}))}))},R.prototype.getArrayValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,s,u,i;return e(this,(function(e){switch(e.label){case 0:if(!this.value||!Array.isArray(this.value))throw new Error("Incorrect data!");t=[],r=this.customData.nestedData[0],a=0,s=this.value,e.label=1;case 1:if(!(a<s.length))return[3,4];if(u=s[a],r.isRequired&&r.type!==b.RAFFLE_LIST&&null==u)throw new Error("Required data is missing");return[4,new R(u,r,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(i=e.sent(),r.isRequired&&null==i)throw new Error("Required data is missing");t.push(i),e.label=3;case 3:return a++,[3,1];case 4:return[2,{value:t,customDataId:this.customData.id}]}}))}))},R.prototype.getEnumValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,{value:this.value,customDataId:this.customData.id}]}))}))},R.prototype.getCustomDataValue=function(){return t(this,void 0,void 0,(function(){var t,r=this;return e(this,(function(e){switch(e.label){case 0:return(t=this.theme.customData.find((function(t){return t.id===r.customData.customDataId})))?((t=a(t)).isRequired=this.customData.isRequired,[4,new R(this.value,t,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()]):[2,{value:null,customDataId:this.customData.id}];case 1:return[2,e.sent()]}}))}))},R.prototype.getComponentListValue=function(){return t(this,void 0,void 0,(function(){var t,a,s=this;return e(this,(function(e){switch(e.label){case 0:return t=this.value?this.value.map((function(t){return r({},t)})):[],a={},[4,Promise.all(t.map((function(t){return s.pageDataProvider.getPageComponentPropValues(t)})))];case 1:return[2,(a.value=e.sent(),a.customDataId=this.customData.id,a)]}}))}))},R.prototype.getBlogValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new v(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getBlogListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new D(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getBlogCategoryValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new I(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getBlogCategoryListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new y(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getRaffleValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new L(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getRaffleListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,(new T).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R.prototype.getSliderValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new P(this.value).getValue()];case 1:return[2,{value:t.sent(),customDataId:this.customData.id}]}}))}))},R}();export{R as IkasCustomPropValueProvider};
@@ -1,4 +1,4 @@
1
- import { IkasBlog, IkasBlogCategory, IkasBrand, IkasCategory, IkasProduct, IkasProductOptionSet, IkasRaffle, IkasThemeJsonComponent, IkasThemeJsonCustomData, IkasThemeJsonPageComponent, IkasVariantValue } from "@ikas/storefront-models";
1
+ import { IkasBlog, IkasBlogCategory, IkasBrand, IkasCategory, IkasProduct, IkasProductOptionSet, IkasRaffle, IkasThemeJsonComponent, IkasThemeJsonPageComponent, IkasVariantValue } from "@ikas/storefront-models";
2
2
  import { IkasAttributeListPropValue } from "../models/prop-value/attribute-list";
3
3
  import { IkasAttributePropValue } from "../models/prop-value/attribute";
4
4
  import { IkasBlogCategoryPropValue } from "../models/prop-value/blog-category";
@@ -46,7 +46,7 @@ export declare type IkasCategoryPropValueData = {
46
46
  };
47
47
  export declare type IkasCustomDataPropValueData = {
48
48
  value: any;
49
- customData: IkasThemeJsonCustomData;
49
+ customDataId: string;
50
50
  };
51
51
  export declare type IkasProductPropValueProduct = {
52
52
  productOptionSet?: IkasProductOptionSet | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-providers",
3
- "version": "4.0.0-beta.2",
3
+ "version": "4.0.0-beta.20",
4
4
  "description": "Data providers for ikas storefront theme components.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rollup/plugin-commonjs": "^22.0.0",
20
- "@ikas/storefront-api": "^4.0.0-beta.2",
21
- "@ikas/storefront-config": "^4.0.0-beta.2",
22
- "@ikas/storefront-model-functions": "^4.0.0-beta.2",
23
- "@ikas/storefront-models": "^4.0.0-beta.2",
20
+ "@ikas/storefront-api": "^4.0.0-beta.20",
21
+ "@ikas/storefront-config": "^4.0.0-beta.20",
22
+ "@ikas/storefront-model-functions": "^4.0.0-beta.20",
23
+ "@ikas/storefront-models": "^4.0.0-beta.20",
24
24
  "@rollup/plugin-node-resolve": "^13.3.0",
25
25
  "rollup-plugin-rename-node-modules": "^1.2.0",
26
26
  "@types/lodash": "^4.14.168",
@@ -34,14 +34,14 @@
34
34
  "typescript": "^4.7.2",
35
35
  "ttypescript": "^1.5.12",
36
36
  "typescript-transform-paths": "^2.2.2",
37
- "lodash": "^4.17.20"
37
+ "lodash": "^4.17.21"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "mobx": "^6.1.3",
41
- "@ikas/storefront-api": "^4.0.0-beta.2",
42
- "@ikas/storefront-config": "^4.0.0-beta.2",
43
- "@ikas/storefront-model-functions": "^4.0.0-beta.2",
44
- "@ikas/storefront-models": "^4.0.0-beta.2",
45
- "lodash": "^4.17.20"
41
+ "@ikas/storefront-api": "^4.0.0-beta.20",
42
+ "@ikas/storefront-config": "^4.0.0-beta.20",
43
+ "@ikas/storefront-model-functions": "^4.0.0-beta.20",
44
+ "@ikas/storefront-models": "^4.0.0-beta.20",
45
+ "lodash": "^4.17.21"
46
46
  }
47
47
  }