@ikas/storefront-providers 5.0.0-beta.23 → 5.0.0-beta.25
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.
- package/build/models/ui/blog-category-list/init.js +1 -1
- package/build/models/ui/blog-list/init.js +1 -1
- package/build/models/ui/brand-list/init.js +1 -1
- package/build/models/ui/category-list/init.js +1 -1
- package/build/models/ui/product-list/init.js +1 -1
- package/build/models/ui/raffle-list/init.js +1 -1
- package/build/providers/helpers/raffle.js +1 -1
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/placeholders.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category-list.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog-list.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/boolean.js +1 -1
- package/build/providers/prop-value/brand-list.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category-list.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/color.js +1 -1
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/image-list.js +1 -1
- package/build/providers/prop-value/image.js +1 -1
- package/build/providers/prop-value/link.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/product-list.js +1 -1
- package/build/providers/prop-value/raffle-list.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/providers/prop-value/rich-text.js +1 -1
- package/build/providers/prop-value/slider.js +1 -1
- package/build/providers/prop-value/text.js +1 -1
- package/package.json +12 -26
- package/build/ext/tslib/tslib.es6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o}from
|
|
1
|
+
import{__awaiter as t,__generator as o}from"../../../node_modules/tslib/tslib.es6.js";import{listBlogCategory as i}from"@ikas/storefront-api";import{IkasBlogCategoryListType as r}from"./index.js";function n(i){var r,n,u,l;return t(this,void 0,void 0,(function(){var t,d;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,a(i,e(i)?1:i.page,e(i)?(null===(r=i.blogCategoryListPropValue.blogCategoryIds)||void 0===r?void 0:r.length)||10:i.limit)];case 1:return t=o.sent(),e(i)?i.data=(null===(n=i.blogCategoryListPropValue.blogCategoryIds)||void 0===n?void 0:n.map((function(o){var i,r;return null===(r=null===(i=t.data)||void 0===i?void 0:i.data)||void 0===r?void 0:r.find((function(t){return t.id===o}))})).filter((function(t){return!!t})))||[]:i.data=(null===(u=t.data)||void 0===u?void 0:u.data)||[],i.count=(null===(l=t.data)||void 0===l?void 0:l.count)||0,i.initialized=!0,i.minPage=i.page,[3,3];case 2:return d=o.sent(),console.error(d),[3,3];case 3:return[2]}}))}))}function e(t){return t.type===r.STATIC}function a(r,n,a){return t(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,i({id:e(r)&&r.blogCategoryListPropValue.blogCategoryIds?{in:r.blogCategoryListPropValue.blogCategoryIds}:void 0,pagination:{page:n,limit:a}})];case 1:return[2,t.sent()]}}))}))}export{n as getInitial};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../../node_modules/tslib/tslib.es6.js";import{listBlog as o}from"@ikas/storefront-api";import{IkasBlogListType as n}from"./index.js";function r(o){var n,r,d,u;return t(this,void 0,void 0,(function(){var t,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,a(o,e(o)?1:o.page,e(o)?(null===(n=o.blogListPropValue.blogIds)||void 0===n?void 0:n.length)||10:o.limit)];case 1:return t=i.sent(),e(o)?o.data=(null===(r=o.blogListPropValue.blogIds)||void 0===r?void 0:r.map((function(i){var o,n;return null===(n=null===(o=t.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:o.data=(null===(d=t.data)||void 0===d?void 0:d.data)||[],o.count=(null===(u=t.data)||void 0===u?void 0:u.count)||0,o.initialized=!0,o.minPage=o.page,[3,3];case 2:return l=i.sent(),console.error(l),[3,3];case 3:return[2]}}))}))}function e(t){return t.type===n.STATIC}function a(n,r,a){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o({id:e(n)?{in:n.blogListPropValue.blogIds}:void 0,pagination:{page:r,limit:a},categoryId:n.filterCategoryId?{eq:n.filterCategoryId}:void 0})];case 1:return[2,t.sent()]}}))}))}export{r as getInitial};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as n,__generator as i}from
|
|
1
|
+
import{__awaiter as n,__generator as i}from"../../../node_modules/tslib/tslib.es6.js";import{listProductBrand as t}from"@ikas/storefront-api";import{IkasBrandListType as r,IkasBrandListSortType as o}from"./index.js";function a(o){var a,d,u;return n(this,void 0,void 0,(function(){var n,s,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n=function(n){return n.type===r.STATIC}(o),[4,t({id:n&&o.brandListPropValue.brandIds?{in:o.brandListPropValue.brandIds}:void 0,pagination:{page:n?void 0:o.page,limit:n?void 0:o.limit},sort:e(o)})];case 1:return s=i.sent(),o.data=n?(null===(a=o.brandListPropValue.brandIds)||void 0===a?void 0:a.map((function(n){var i,t;return null===(t=null===(i=s.data)||void 0===i?void 0:i.data)||void 0===t?void 0:t.find((function(i){return i.id===n}))})).filter((function(n){return!!n})))||[]:(null===(d=s.data)||void 0===d?void 0:d.data)||[],o.count=(null===(u=s.data)||void 0===u?void 0:u.count)||0,o.initialized=!0,o.minPage=o.page,[3,3];case 2:return l=i.sent(),console.error(l),[3,3];case 3:return[2]}}))}))}function e(n){return n.sort===o.A_Z?"name":"-name"}export{a as getInitial};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../../node_modules/tslib/tslib.es6.js";import{listCategory as o}from"@ikas/storefront-api";import{IkasCategoryListType as r,IkasCategoryListSortType as n}from"./index.js";function e(r){var n,e,u;return t(this,void 0,void 0,(function(){var t,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,o({id:a(r)&&r.categoryListPropValue.categoryIds?{in:r.categoryListPropValue.categoryIds}:void 0,pagination:{page:a(r)?void 0:r.page,limit:a(r)?void 0:r.limit},sort:d(r)})];case 1:return t=i.sent(),a(r)?r.data=(null===(n=r.categoryListPropValue.categoryIds)||void 0===n?void 0:n.map((function(i){var o,r;return null===(r=null===(o=t.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:r.data=(null===(e=t.data)||void 0===e?void 0:e.data)||[],r.count=(null===(u=t.data)||void 0===u?void 0:u.count)||0,r.initialized=!0,r.minPage=r.page,[3,3];case 2:return s=i.sent(),console.error(s),[3,3];case 3:return[2]}}))}))}function a(t){return t.type===r.STATIC}function d(t){return t.sort===n.A_Z?"name":"-name"}export{e as getInitial};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__assign as r}from
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as r}from"../../../node_modules/tslib/tslib.es6.js";import{IkasCategoryProductsOrderType as i,IkasThemeJsonPageType as n}from"@ikas/storefront-models";import{IkasProductListType as a,IkasProductListSortType as o,IkasProductSearchShowStockOption as u}from"./index.js";import{IkasProductFilterFunctions as d}from"@ikas/storefront-model-functions";import{searchProducts as s,getSuggestedProducts as l,GetSuggestedProductsMethodEnum as c,getProductFilterData as f,SortByDirectionEnum as v,SortByTypeEnum as p}from"@ikas/storefront-api";import{IkasStorefrontConfig as I}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 C(n,u){var s,l,c,f;return e(this,void 0,void 0,(function(){var e,v,p,I,C,A,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)&&[a.ALL].includes(e.type))switch(e.pageSpecificData.orderType){case i.HIGHEST_DISCOUNT_RATIO:e.sort=o.DECRASING_DISCOUNT;break;case i.LOWEST_DISCOUNT_RATIO:e.sort=o.INCREASING_DISCOUNT;break;case i.HIGHEST_PRICE:e.sort=o.DECREASING_PRICE;break;case i.LOWEST_PRICE:e.sort=o.INCREASING_PRICE;break;case i.NEWEST:e.sort=o.LAST_ADDED;break;case i.OLDEST:e.sort=o.FIRST_ADDED;break;case i.MANUALLY:e.sort=o.FEATURED}}(n),n.isLoading=!0,e=Date.now(),n.fetchRequestTime=e,t.label=1;case 1:return t.trys.push([1,5,,6]),v=u?n.page:1,p=n.limit,!function(e){return e.type===a.ALL||e.type===a.CATEGORY}(n)||n.filters?[3,3]:[4,g(n)];case 2:t.sent(),t.label=3;case 3:if(D(n))return n.data=[],n.page=1,n.minPage=1,n.count=0,n.initialized=!0,[2,!0];if(void 0,E(n))v=void 0,p=200;else if(function(e){return e.type===a.DISCOUNTED}(n))v=1,p=10;else if(function(e){return e.type===a.RECOMMENDED}(n))v=1,p=10;else if(T(n))return[2];return[4,S(n,v||1,p||10,undefined)];case 4:return(I=t.sent())&&n.fetchRequestTime===e?(C=[],T(n)?[2]:(E(n)?(A=n.productListPropValue.productIds||[],C=(null==A?void 0:A.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})),a=null==n?void 0:n.variants.find((function(t){return t.id===e.variantId}));if((null==a?void 0:a.isActive)||(a=null==n?void 0:n.variants.find((function(e){return e.isActive}))),n&&a)return r(r({},n),{selectedVariantValues:a.variantValues})})).filter((function(e){return!!e})))||[]):C=(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,a,o=null==t?void 0:t.find((function(t){return t.id===e.id}));o?null===(r=e.values)||void 0===r||r.forEach((function(t){var r=o.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===(a=e.values)||void 0===a||a.forEach((function(e){return e.resultCount=0}))}));var a=null==t?void 0:t.find((function(e){return"category"===e.id}));a&&(null===(i=e.filterCategories)||void 0===i||i.forEach((function(e){var t=a.values.find((function(t){return t.id===e.id}));e.resultCount=t?t.count:0})))}(n,null===(c=I.data)||void 0===c?void 0:c.facets),n.data=C,n.count=(null===(f=I.data)||void 0===f?void 0:f.count)||0,n.initialized=!0,n.page=v||1,n.minPage=n.page,[2,!0])):[2];case 5:return y=t.sent(),console.error(y),[3,6];case 6:return[2]}}))}))}function E(e){return e.type===a.STATIC}function T(e){return e.type===a.LAST_VIEWED}function D(e){return e.type===a.SEARCH}function S(r,i,f,C){var T,S,g;return e(this,void 0,void 0,(function(){var e,A,y,R,h;return t(this,(function(t){switch(t.label){case 0:return e=[],A=[],y=d.getValueList,null===(T=r.filters)||void 0===T||T.forEach((function(t){var r=y(t);r.length&&e.push({id:t.id,type:t.type,displayType:t.displayType,valueList:r}),t.isFacetFilter&&A.push({id:t.id,type:t.type,displayType:t.displayType})})),R=null===(S=r.filterCategories)||void 0===S?void 0:S.filter((function(e){return e.isSelected})).map((function(e){return e.id})),h=function(e){var t,r;switch(e.sort){case o.INCREASING_PRICE:t=v.ASC,r=p.PRICE;break;case o.DECREASING_PRICE:t=v.DESC,r=p.PRICE;break;case o.FIRST_ADDED:t=v.ASC,r=p.CREATED_AT;break;case o.LAST_ADDED:t=v.DESC,r=p.CREATED_AT;break;case o.INCREASING_DISCOUNT:t=v.ASC,r=p.DISCOUNT_RATIO;break;case o.DECRASING_DISCOUNT:t=v.DESC,r=p.DISCOUNT_RATIO;break;case o.FEATURED:if(D(e))return;t=v.ASC,r=p.MANUAL_SORT;break;case o.DEFAULT:t=void 0,r=void 0}if(t&&r)return{direction:t,type:r}}(r),function(e){return e.type===a.RELATED_PRODUCTS}(r)&&r.relatedProductData?[4,l({priceListId:I.getPriceListId(),salesChannelId:I.getSalesChannelId(),productId:r.relatedProductData.productId,brandIds:r.relatedProductData.brandIds,categoryIds:r.relatedProductData.categoryIds,locale:I.getCurrentLocale()})]:[3,2];case 1:case 3:case 5:return[2,t.sent()];case 2:return function(e){return e.type===a.VIEWED_TOGETHER}(r)&&r.viewedTogetherProductData?[4,l({priceListId:I.getPriceListId(),salesChannelId:I.getSalesChannelId(),method:c.VIEWED_TOGETHER,productIds:r.viewedTogetherProductData.productIds,locale:I.getCurrentLocale()})]:[3,4];case 4:return[4,s({input:{page:i,perPage:f,productIdList:E(r)?null===(g=r.productListPropValue.productIds)||void 0===g?void 0:g.map((function(e){return e.productId})):C,filterList:e,facetList:A,brandId:r.pageType===n.BRAND&&r.type!==a.SEARCH?r.filterBrandId:void 0,categoryIdList:R&&R.length?R:r.filterCategoryId?[r.filterCategoryId]:void 0,priceListId:I.getPriceListId(),salesChannelId:I.getSalesChannelId(),query:r.searchKeyword,order:r.type===a.SEARCH?[]:h?[h]:[],showStockOption:I.getStockPreference()||u.SHOW_ALL}})]}}))}))}function g(r){var i,a,o;return e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return[4,f({categoryId:r.filterCategoryId?r.filterCategoryId:void 0,locale:I.getCurrentLocale()})];case 1:return e=t.sent(),r.filters=(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.filters)||null,r.filterCategories=(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.categories)||null,r.pageType!==n.CATEGORY&&r.filterCategoryId&&(u=null===(o=r.filterCategories)||void 0===o?void 0:o.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{C as getInitial};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../node_modules/tslib/tslib.es6.js";import{listStorefrontRaffle as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as n}from"@ikas/storefront-config";import{IkasRaffleFunctions as r}from"@ikas/storefront-model-functions";import{populateRaffleProducts as o}from"../../../providers/helpers/raffle.js";function a(i){var n,r;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===(n=e.data)||void 0===n?void 0:n.data)||[],i.count=(null===(r=e.data)||void 0===r?void 0:r.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 r.initRaffle(e,n.getCurrentLocale())})),[2,e]}}))}))}export{a as getInitial};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from
|
|
1
|
+
import{__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.js";import{listProductOptionSet as r,searchProducts as i}from"@ikas/storefront-api";var u=function(u){return t(void 0,void 0,void 0,(function(){var t,d,o,a,e,c,f,s,l,p,v;return n(this,(function(n){switch(n.label){case 0:for(t=[],d=0,o=u;d<o.length;d++)a=o[d],null===(p=a.variants)||void 0===p||p.forEach((function(n){t.find((function(t){return t===n.productId}))||t.push(n.productId)}));return[4,i({input:{productIdList:t}})];case 1:return(e=n.sent()).isSuccess&&(c=(null===(v=e.data)||void 0===v?void 0:v.data)||[]).length?(f=c.map((function(t){return t.productOptionSetId})).filter((function(t){return!!t})),[4,r({id:{in:f}})]):[3,3];case 2:s=n.sent(),l=s.data,u.forEach((function(t){var n;null===(n=t.variants)||void 0===n||n.forEach((function(n){var r,i=c.find((function(t){return n.productId===t.id}));if(i){i.productOptionSet=null==l?void 0:l.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,d,o,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(d=n.sent())&&((o=null===(f=d.data)||void 0===f?void 0:f.data)&&o&&o.length)?(a=o.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=o.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,u as populateRaffleProducts};
|
|
@@ -1 +1 @@
|
|
|
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 w}from"./prop-value/rich-text.js";import{IkasBlogPropValueProvider as C}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 j}from"./prop-value/blog-category.js";import{IkasBlogCategoryListPropValueProvider as V}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,settings:this.theme.settings||{},productReviewSummary:this.productReviewSummary,configJson:l.toJSON(),merchantSettings:this.getMerchantSettings()}))}},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()}})];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)).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 w(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 C(n),[3,27];case 20:return e=new R(this.pageType,n,this.pageSpecificData),[3,27];case 21:return e=new j(n),[3,27];case 22:return e=new V(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
|
+
import{__awaiter as e,__assign as t,__generator as a}from"../node_modules/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 w}from"./prop-value/rich-text.js";import{IkasBlogPropValueProvider as C}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 j}from"./prop-value/blog-category.js";import{IkasBlogCategoryListPropValueProvider as V}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,a,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 a=t({},e.component);a.props.forEach((function(e){delete e.description,delete e.displayName,delete e.translations,delete e.groupId})),delete a.translations,delete a.defaultPropValues,delete a.displayName,delete a.description,delete a.dir,o.push(a)}})),{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===(a=this.page)||void 0===a?void 0:a.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,settings:this.theme.settings||{},productReviewSummary:this.productReviewSummary,configJson:l.toJSON(),merchantSettings:this.getMerchantSettings()}))}},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 a(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,t=this;return a(this,(function(a){switch(a.label){case 0:return this.pageSpecificData?[3,2]:[4,this.getPageSpecificData()];case 1:a.sent(),a.label=2;case 2:return this.page?[4,this.getMerchantSettings()]:[2];case 3:return a.sent(),e=this,[4,Promise.all(this.pageComponents.map((function(e){return t.getPageComponentPropValues(e)})))];case 4:return e.pageComponentPropValues=a.sent(),[4,this.setLinkSlugs()];case 5:return a.sent(),[4,this.getProductReviewSummary()];case 6:return a.sent(),[2]}}))}))},$.prototype.getProductReviewSummary=function(){var t,r,n;return e(this,void 0,void 0,(function(){var e;return a(this,(function(a){switch(a.label){case 0:return this.pageType!==s.PRODUCT?[3,2]:[4,B({productId:{eq:null===(t=this.pageSpecificData)||void 0===t?void 0:t.id}})];case 1:(e=a.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]),a.label=2;case 2:return[2]}}))}))},$.prototype.getPageSpecificData=function(){var t,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 a(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===(t=this.possiblePageTypes)||void 0===t?void 0:t.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,t,r,n,i,o,u,c,p,h,g;return a(this,(function(a){switch(a.label){case 0:return[4,k({input:{productIdList:[f.targetId],priceListId:l.getPriceListId(),salesChannelId:l.getSalesChannelId()}})];case 1:return e=a.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)?(t=e.data.data[0]).productOptionSetId?[4,M({id:{eq:t.productOptionSetId}})]:[3,3]:[2];case 2:(r=a.sent()).isSuccess&&(null===(g=null==r?void 0:r.data)||void 0===g?void 0:g.length)&&(t.productOptionSet=r.data[0]),a.label=3;case 3:return(n=t.variants.find((function(e){return e.isActive})))?(t.selectedVariantValues=n.variantValues,i=d.getDisplayedVariantTypes,this.pageSpecificData=t,(o=i(this.pageSpecificData)).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,t,r,n;return a(this,(function(a){switch(a.label){case 0:return[4,U({id:{eq:f.targetId}})];case 1:return(e=a.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(t=e.data.data[0],this.pageSpecificData=t,this.pageType=s.BRAND,this.setPageMetaData(f),[2]):[2]}}))}))},T=function(){return e(L,void 0,void 0,(function(){var e,t,r,n;return a(this,(function(a){switch(a.label){case 0:return[4,N({id:{eq:f.targetId}})];case 1:return(e=a.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(t=e.data.data[0],this.pageSpecificData=t,this.pageType=s.CATEGORY,this.setPageMetaData(f),[2]):[2]}}))}))},S=function(){return e(L,void 0,void 0,(function(){var e,t,r,n;return a(this,(function(a){switch(a.label){case 0:return[4,q({id:{eq:f.targetId}})];case 1:return(e=a.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(t=e.data.data[0],this.pageSpecificData=t,this.pageType=s.BLOG,this.setPageMetaData(f),[2]):[2]}}))}))},y=function(){return e(L,void 0,void 0,(function(){var e,t,r,n;return a(this,(function(a){switch(a.label){case 0:return[4,Y({id:{eq:f.targetId},pagination:{page:1,limit:1}})];case 1:return(e=a.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(t=e.data.data[0],this.pageSpecificData=t,this.pageType=s.BLOG_CATEGORY,this.setPageMetaData(f),[2]):[2]}}))}))},D=function(){return e(L,void 0,void 0,(function(){var e,t,r,n;return a(this,(function(a){switch(a.label){case 0:return[4,x({id:{eq:f.targetId}})];case 1:return(e=a.sent()).isSuccess&&(null===(n=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.length)?(t=e.data.data[0],[4,H([t])]):[2];case 2:return a.sent(),this.pageSpecificData=t,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(t){return e(this,void 0,void 0,(function(){var r,n,i,s=this;return a(this,(function(o){switch(o.label){case 0:return r=this.theme.components.find((function(e){return e.id===t.componentId})),n={pageComponent:t,component:r,propValues:{}},i=function(r){return e(s,void 0,void 0,(function(){var e,i;return a(this,(function(a){switch(a.label){case 0:return e=n.propValues,i=r.name,[4,this.getPageComponentPropValue(t,r)];case 1:return e[i]=a.sent(),[2]}}))}))},[4,Promise.all(r.props.map(i))];case 1:return o.sent(),[2,n]}}))}))},$.prototype.getPageComponentPropValue=function(t,r){return e(this,void 0,void 0,(function(){var e,n,i,s,o,u=this;return a(this,(function(a){switch(a.label){case 0:if(n=t.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 w(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,a.sent()];case 19:return e=new C(n),[3,27];case 20:return e=new R(this.pageType,n,this.pageSpecificData),[3,27];case 21:return e=new j(n),[3,27];case 22:return e=new V(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,t,r;return a(this,(function(a){switch(a.label){case 0:return e=[],t=[],r=[],this.linkMetaDataTargetIds.forEach((function(a){switch(a.type){case"DEFAULT":e.push(a);break;case"BLOG":t.push(a);break;case"RAFFLE":r.push(a)}})),[4,Promise.all([this.getLinkSlugs(e,"DEFAULT"),this.getLinkSlugs(t,"BLOG"),this.getLinkSlugs(r,"RAFFLE")])];case 1:return[2,a.sent()]}}))}))},$.prototype.getLinkSlugs=function(t,n){return e(this,void 0,void 0,(function(){var i,s,o=this;return a(this,(function(u){switch(u.label){case 0:return i=r(t.map((function(e){return e.id}))),s=[],i.length?[4,function(){return e(o,void 0,void 0,(function(){var e,t,r,o,u;return a(this,(function(a){switch(a.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 t=a.sent(),e=t.data||[],[3,8];case 3:return[4,X({targetId:{in:i}})];case 4:return r=a.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=a.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(),t.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,averageRating:null,reviewCount:null,stars:null,groupVariantsByVariantTypeId:null,deleted:!1}}function n(){return{categoryPath:[],description:null,imageId:null,name:"",parentId:null,metaData:null,categoryPathItems:[],orderType:null,id:"",createdAt:0,updatedAt:0}}function l(){return{description:null,imageId:null,metaData:null,orderType:null,name:"",id:"",createdAt:0,updatedAt:0}}function d(){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{d as getPlaceholderBlog,r as getPlaceholderBlogCategory,l 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,stars:null,groupVariantsByVariantTypeId:null,deleted:!1,selectedVariantValues:[],isFiltered:!1,isStatic:!1}}function n(){return{categoryPath:[],description:null,imageId:null,name:"",parentId:null,metaData:null,categoryPathItems:[],orderType:null,id:"",createdAt:0,updatedAt:0}}function l(){return{description:null,imageId:null,metaData:null,orderType:null,name:"",id:"",createdAt:0,updatedAt:0}}function d(){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{d as getPlaceholderBlog,r as getPlaceholderBlogCategory,l as getPlaceholderBrand,n as getPlaceholderCategory,a as getPlaceholderProduct,i as getPlaceholderRaffle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../node_modules/tslib/tslib.es6.js";import{searchProducts as a}from"@ikas/storefront-api";import{IkasStorefrontConfig as e}from"@ikas/storefront-config";import{IkasProductFunctions as r}from"@ikas/storefront-model-functions";var s=function(){function s(t){this.attributeListPropValue=t}return s.prototype.getValue=function(){var s,u;return t(this,void 0,void 0,(function(){var t,n,o,l,d,p,c,V=this;return i(this,(function(i){switch(i.label){case 0:return!(null===(s=this.attributeListPropValue.attributeIds)||void 0===s?void 0:s.length)||this.attributeListPropValue.usePageData||!this.attributeListPropValue.usePageData&&!this.attributeListPropValue.variantId?[2,{productDetail:null,attributeListPropValue:this.attributeListPropValue}]:[4,a({input:{productIdList:[this.attributeListPropValue.productId],priceListId:e.getPriceListId(),salesChannelId:e.getSalesChannelId()}})];case 1:return(n=i.sent()).isSuccess&&(null===(u=n.data)||void 0===u?void 0:u.data)&&(o=n.data.data,l=r.hasVariant,o.length&&((d=o[0])&&l(d)?(p=d.variants.find((function(t){return t.id===V.attributeListPropValue.variantId})))&&(d.selectedVariantValues=p.variantValues,t=d):(c=d.variants.find((function(t){return t.isActive})),d.selectedVariantValues=(c||d.variants[0]).variantValues,t=d))),[2,{productDetail:t||null,attributeListPropValue:this.attributeListPropValue}]}}))}))},s}();export{s as IkasAttributeListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as a}from
|
|
1
|
+
import{__awaiter as t,__generator as a}from"../../node_modules/tslib/tslib.es6.js";import{searchProducts as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as e}from"@ikas/storefront-config";import{IkasProductFunctions as r}from"@ikas/storefront-model-functions";var u=function(){function u(t){this.attributePropValue=t}return u.prototype.getValue=function(){var u,n;return t(this,void 0,void 0,(function(){var t,o,s,l,d,p,c,V=this;return a(this,(function(a){switch(a.label){case 0:return!this.attributePropValue.attributeId||(null===(u=this.attributePropValue)||void 0===u?void 0:u.usePageData)||!this.attributePropValue.usePageData&&!this.attributePropValue.variantId?[2,{productDetail:null,attributePropValue:this.attributePropValue}]:[4,i({input:{productIdList:[this.attributePropValue.productId],priceListId:e.getPriceListId(),salesChannelId:e.getSalesChannelId()}})];case 1:return(o=a.sent()).isSuccess&&(null===(n=o.data)||void 0===n?void 0:n.data)&&(s=o.data.data).length&&(l=s[0],d=r.hasVariant,l&&d(l)?(p=l.variants.find((function(t){return t.id===V.attributePropValue.variantId})))&&(l.selectedVariantValues=p.variantValues,t=l):(c=l.variants.find((function(t){return t.isActive})),l.selectedVariantValues=(c||l.variants[0]).variantValues,t=l)),[2,{productDetail:t||null,attributePropValue:this.attributePropValue}]}}))}))},u}();export{u as IkasAttributePropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o}from
|
|
1
|
+
import{__awaiter as t,__generator as o}from"../../node_modules/tslib/tslib.es6.js";import{getInitial as e}from"../../models/ui/blog-category-list/init.js";var i=function(){function i(t){this.blogCategoryListPropValue=t}return i.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return t={data:[],count:0,page:1,limit:10,blogCategoryListPropValue:this.blogCategoryListPropValue,type:this.blogCategoryListPropValue.blogCategoryListType},[4,e(t)];case 1:return o.sent(),[2,t]}}))}))},i}();export{i as IkasBlogCategoryListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as o,__generator as t}from
|
|
1
|
+
import{__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.js";import{listBlogCategory as a}from"@ikas/storefront-api";import{getPlaceholderBlogCategory as e}from"../placeholders.js";var r=function(){function r(o){this.blogCategoryPropValue=o}return r.prototype.getValue=function(){var r,l;return o(this,void 0,void 0,(function(){var o;return t(this,(function(t){switch(t.label){case 0:return(null===(r=this.blogCategoryPropValue)||void 0===r?void 0:r.usePageData)?[2,{blogCategory:null,blogCategoryPropValue:this.blogCategoryPropValue}]:this.blogCategoryPropValue.blogCategoryId?[4,a({id:{eq:this.blogCategoryPropValue.blogCategoryId},pagination:{page:1,limit:1}})]:[2,null];case 1:return(o=t.sent()).isSuccess&&(null===(l=o.data)||void 0===l?void 0:l.data)?[2,{blogCategory:o.data.data[0]||e(),blogCategoryPropValue:this.blogCategoryPropValue}]:[2,{blogCategory:e(),blogCategoryPropValue:this.blogCategoryPropValue}]}}))}))},r}();export{r as IkasBlogCategoryPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as i,__generator as t}from
|
|
1
|
+
import{__awaiter as i,__generator as t}from"../../node_modules/tslib/tslib.es6.js";import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import"../../models/ui/blog-category-list/index.js";import{IkasBlogListType as e}from"../../models/ui/blog-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import{getInitial as s}from"../../models/ui/blog-list/init.js";var l=function(){function l(i,t,o){this.pageType=i,this.blogListPropValue=t,this.pageSpecificData=o}return l.prototype.getValue=function(){return i(this,void 0,void 0,(function(){var i,l,r;return t(this,(function(t){switch(t.label){case 0:return i=null,this.blogListPropValue.blogListType===e.ALL&&this.blogListPropValue.usePageFilter&&this.pageType===o.BLOG_CATEGORY&&this.pageSpecificData&&(l=this.pageSpecificData,i=l.id),this.blogListPropValue.blogListType===e.CATEGORY&&this.blogListPropValue.categoryId&&(i=this.blogListPropValue.categoryId),r={data:[],count:0,type:this.blogListPropValue.blogListType,page:1,limit:this.blogListPropValue.initialLimit||10,blogListPropValue:this.blogListPropValue,filterCategoryId:i},[4,s(r)];case 1:return t.sent(),[2,r]}}))}))},l}();export{l as IkasBlogListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as o,__generator as l}from
|
|
1
|
+
import{__awaiter as o,__generator as l}from"../../node_modules/tslib/tslib.es6.js";import{listBlog as t}from"@ikas/storefront-api";import{getPlaceholderBlog as e}from"../placeholders.js";var r=function(){function r(o){this.blogPropValue=o}return r.prototype.getValue=function(){var r,i,a;return o(this,void 0,void 0,(function(){var o;return l(this,(function(l){switch(l.label){case 0:return(null===(r=this.blogPropValue)||void 0===r?void 0:r.usePageData)?[2,{blog:null,blogPropValue:this.blogPropValue}]:this.blogPropValue.blogId?[4,t({id:{eq:this.blogPropValue.blogId}})]:[2,null];case 1:return(o=l.sent()).isSuccess&&(null===(a=null===(i=o.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.length)?[2,{blog:o.data.data[0]||e(),blogPropValue:this.blogPropValue}]:[2,{blog:e(),blogPropValue:this.blogPropValue}]}}))}))},r}();export{r as IkasBlogPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o}from
|
|
1
|
+
import{__awaiter as t,__generator as o}from"../../node_modules/tslib/tslib.es6.js";var n=function(){function n(t){this.bool=t}return n.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.bool||!1]}))}))},n}();export{n as IkasBooleanPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as i,__generator as t}from
|
|
1
|
+
import{__awaiter as i,__generator as t}from"../../node_modules/tslib/tslib.es6.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/blog-list/index.js";import{IkasBrandListSortType as r}from"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import{getInitial as o}from"../../models/ui/brand-list/init.js";var s=function(){function s(i){this.brandListPropValue=i}return s.prototype.getValue=function(){return i(this,void 0,void 0,(function(){var i;return t(this,(function(t){switch(t.label){case 0:return i={data:[],count:0,type:this.brandListPropValue.brandListType,sort:this.brandListPropValue.initialSort||r.A_Z,page:1,limit:this.brandListPropValue.initialLimit||10,brandListPropValue:this.brandListPropValue},[4,o(i)];case 1:return t.sent(),[2,i]}}))}))},s}();export{s as IkasBrandListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as a}from
|
|
1
|
+
import{__awaiter as r,__generator as a}from"../../node_modules/tslib/tslib.es6.js";import{listProductBrand as t}from"@ikas/storefront-api";import{getPlaceholderBrand as e}from"../placeholders.js";var n=function(){function n(r){this.brandPropValue=r}return n.prototype.getValue=function(){var n;return r(this,void 0,void 0,(function(){var r,o;return a(this,(function(a){switch(a.label){case 0:if(this.brandPropValue.usePageData)return[2,{brand:null,brandPropValue:this.brandPropValue}];if(!this.brandPropValue.brandId)return[2,null];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,t({id:{eq:this.brandPropValue.brandId}})];case 2:return(r=a.sent()).isSuccess&&(null===(n=r.data)||void 0===n?void 0:n.data)?[2,{brand:r.data.data.length?r.data.data[0]:e(),brandPropValue:this.brandPropValue}]:[3,4];case 3:return o=a.sent(),console.log(o),[3,4];case 4:return[2,null]}}))}))},n}();export{n as IkasBrandPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../node_modules/tslib/tslib.es6.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/brand-list/index.js";import{IkasCategoryListSortType as o}from"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import{getInitial as e}from"../../models/ui/category-list/init.js";var r=function(){function r(t){this.categoryListPropValue=t}return r.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){switch(i.label){case 0:return t={data:[],count:0,type:this.categoryListPropValue.categoryListType,sort:this.categoryListPropValue.initialSort||o.A_Z,page:1,limit:this.categoryListPropValue.initialLimit||10,categoryListPropValue:this.categoryListPropValue},[4,e(t)];case 1:return i.sent(),[2,t]}}))}))},r}();export{r as IkasCategoryListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from
|
|
1
|
+
import{__awaiter as t,__generator as e}from"../../node_modules/tslib/tslib.es6.js";import{listCategory as r}from"@ikas/storefront-api";import{getPlaceholderCategory as o}from"../placeholders.js";var a=function(){function a(t){this.categoryPropValue=t}return a.prototype.getValue=function(){var a,l;return t(this,void 0,void 0,(function(){var t,u;return e(this,(function(e){switch(e.label){case 0:if(this.categoryPropValue.usePageData)return[2,{category:null,categoryPropValue:this.categoryPropValue}];if(!this.categoryPropValue.categoryId)return[2,null];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,r({id:{eq:this.categoryPropValue.categoryId}})];case 2:return t=e.sent(),[2,{category:(null===(l=null===(a=t.data)||void 0===a?void 0:a.data)||void 0===l?void 0:l.length)?t.data.data[0]:o(),categoryPropValue:this.categoryPropValue}];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2,null]}}))}))},a}();export{a as IkasCategoryPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o}from
|
|
1
|
+
import{__awaiter as t,__generator as o}from"../../node_modules/tslib/tslib.es6.js";var n=function(){function n(t){this.color=t}return n.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.color]}))}))},n}();export{n as IkasColorPropValueProvider};
|
|
@@ -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 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
|
+
import{__awaiter as t,__generator as e,__assign as r}from"../../node_modules/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 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from
|
|
1
|
+
import{__awaiter as t,__generator as e}from"../../node_modules/tslib/tslib.es6.js";var i=function(){function i(t){this.imageListPropValue=t}return i.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,this.imageListPropValue.map((function(t){return{id:"object"==typeof t?t.id:t,isVideo:!1,altText:"object"==typeof t?t.altText:null}}))]}))}))},i}();export{i as IkasImageListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from
|
|
1
|
+
import{__awaiter as t,__generator as e}from"../../node_modules/tslib/tslib.es6.js";var i=function(){function i(t){this.isObject="object"==typeof t,this.isObject,this.imagePropValue=t}return i.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,{id:"object"==typeof this.imagePropValue?this.imagePropValue.id:this.imagePropValue,isVideo:!1,altText:"object"==typeof this.imagePropValue?this.imagePropValue.altText:null}]}))}))},i}();export{i as IkasImagePropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as n}from
|
|
1
|
+
import{__awaiter as e,__generator as n}from"../../node_modules/tslib/tslib.es6.js";import{IkasThemeJsonPageType as i}from"@ikas/storefront-models";import{IkasLinkType as a}from"../../models/prop-value/link.js";var t=function(){function t(e,n,i){this.linkPropValue=e,this.theme=n,this.linkMetaDataTargetIds=i}return t.prototype.getNavigationLink=function(t){var s,r;return e(this,void 0,void 0,(function(){var e,o,u,p,b,h,f,c,d=this;return n(this,(function(n){switch(n.label){case 0:return t.linkType===a.PAGE?t.pageType===i.INDEX?e=new l({href:"/",label:t.label||"",subLinks:[]}):t.pageType===i.ACCOUNT?e=new l({href:"/account",label:t.label||"",subLinks:[]}):t.pageType===i.ADDRESSES?e=new l({href:"/account/addresses",label:t.label||"",subLinks:[]}):t.pageType===i.ORDERS?e=new l({href:"/account/orders",label:t.label||"",subLinks:[]}):t.pageType===i.FAVORITE_PRODUCTS?e=new l({href:"/account/favorite-products",label:t.label||"",subLinks:[]}):t.pageType===i.LOGIN?e=new l({href:"/account/login",label:t.label||"",subLinks:[]}):t.pageType===i.REGISTER?e=new l({href:"/account/register",label:t.label||"",subLinks:[]}):t.pageType===i.FORGOT_PASSWORD?e=new l({href:"/account/forgot-password",label:t.label||"",subLinks:[]}):t.pageType===i.ACTIVATE_CUSTOMER?e=new l({href:"/account/activate",label:t.label||"",subLinks:[]}):t.pageType===i.RECOVER_PASSWORD?e=new l({href:"/account/recover-password",label:t.label||"",subLinks:[]}):t.pageType===i.BLOG_INDEX?e=new l({href:"/blog",label:t.label||"",subLinks:[]}):t.pageType===i.CART?e=new l({href:"/cart",label:t.label||"",subLinks:[]}):t.pageType===i.SEARCH?e=new l({href:"/search",label:t.label||"",subLinks:[]}):t.pageType===i.CUSTOM?(o=this.theme.pages.find((function(e){return e.id===t.pageId})))&&(e=new l({href:"/pages/"+o.slug,label:t.label||"",subLinks:[]})):[i.PRODUCT,i.BRAND,i.CATEGORY].includes(t.pageType)?t.itemId&&(e=new l({href:"/",label:t.label||"",subLinks:[]}),this.linkMetaDataTargetIds.push({type:"DEFAULT",id:t.itemId,navigationLink:e})):[i.BLOG,i.BLOG_CATEGORY].includes(t.pageType)?t.itemId&&(e=new l({href:"/blog/",label:t.label||"",subLinks:[]}),this.linkMetaDataTargetIds.push({type:"BLOG",id:t.itemId,navigationLink:e})):t.pageType===i.RAFFLE?e=new l({href:"/raffle/",label:t.label||"",subLinks:[]}):t.pageType===i.RAFFLE_DETAIL?t.itemId&&(e=new l({href:"/raffle/",label:t.label||"",subLinks:[]}),this.linkMetaDataTargetIds.push({type:"RAFFLE",id:t.itemId,navigationLink:e})):t.pageType===i.RAFFLE_ACCOUNT&&(e=new l({href:"/account/raffles",label:t.label||"",subLinks:[]})):t.linkType===a.EXTERNAL&&(e=new l({href:t.externalLink||"",label:t.label||"",subLinks:[],isExternal:!0})),e?(u=e,[4,Promise.all(t.subLinks.map((function(e){return d.getNavigationLink(e)})))]):[3,2];case 1:return u.subLinks=n.sent(),t.pageComponentId&&t.pageId&&(p=this.theme.pages.find((function(e){return e.id===t.pageId})),b=null===(s=this.theme.components.find((function(e){return e.isHeader})))||void 0===s?void 0:s.id,h=null===(r=this.theme.components.find((function(e){return e.isFooter})))||void 0===r?void 0:r.id,f=(null==p?void 0:p.components.filter((function(e){return e.componentId!==b&&e.componentId!==h})))||[],-1!==(c=f.findIndex((function(e){return e.id===t.pageComponentId})))&&(e.href+="#"+c)),[2,e];case 2:return[2,new l({href:"",label:"",subLinks:[]})]}}))}))},t.prototype.getValue=function(){return e(this,void 0,void 0,(function(){var e=this;return n(this,(function(n){switch(n.label){case 0:return Array.isArray(this.linkPropValue)?[4,Promise.all(this.linkPropValue.map((function(n){return e.getNavigationLink(n)})))]:[3,2];case 1:case 3:return[2,n.sent()];case 2:return[4,this.getNavigationLink(this.linkPropValue)]}}))}))},t}(),l=function(e){this.href=e.href,this.label=e.label,this.subLinks=e.subLinks,this.isExternal=e.isExternal,this.itemId=e.itemId};export{t as IkasLinkPropValueProvider,l as NavigationLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from
|
|
1
|
+
import{__awaiter as t,__generator as e}from"../../node_modules/tslib/tslib.es6.js";import{listProductOptionSet as a,searchProducts as r}from"@ikas/storefront-api";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{IkasProductFunctions as o}from"@ikas/storefront-model-functions";import{getPlaceholderProduct as u}from"../placeholders.js";var l=function(){function l(t){this.productDetailPropValue=t}return l.prototype.getValue=function(){var l,n,d;return t(this,void 0,void 0,(function(){var t,s,p,c,V,f,v,h=this;return e(this,(function(e){switch(e.label){case 0:return(null===(l=this.productDetailPropValue)||void 0===l?void 0:l.usePageData)?[2,{productDetailPropValue:this.productDetailPropValue,productDetail:null}]:this.productDetailPropValue.productId?[4,r({input:{productIdList:[this.productDetailPropValue.productId],priceListId:i.getPriceListId(),salesChannelId:i.getSalesChannelId()}})]:[2,null];case 1:return(t=e.sent()).isSuccess&&(null===(n=t.data)||void 0===n?void 0:n.data)?(s=t.data.data).length?(p=s[0]).productOptionSetId?[4,a({id:{eq:p.productOptionSetId}})]:[3,3]:[3,4]:[3,5];case 2:(c=e.sent()).isSuccess&&(null===(d=c.data)||void 0===d?void 0:d.length)&&(p.productOptionSet=c.data[0]),e.label=3;case 3:return V=o.hasVariant,p&&V(p)?(f=p.variants.find((function(t){return t.id===h.productDetailPropValue.variantId})))?(p.selectedVariantValues=null==f?void 0:f.variantValues,[2,{productDetailPropValue:this.productDetailPropValue,productDetail:p}]):[2,null]:(v=p.variants.find((function(t){return t.isActive})),p.selectedVariantValues=(v||p.variants[0]).variantValues,[2,{productDetailPropValue:this.productDetailPropValue,productDetail:p}]);case 4:return[2,{productDetailPropValue:this.productDetailPropValue,productDetail:u()}];case 5:return[2,null]}}))}))},l}();export{l as IkasProductPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../node_modules/tslib/tslib.es6.js";import{IkasThemeJsonPageType as e}from"@ikas/storefront-models";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import{IkasProductListType as r,IkasRelatedProductsType as a,IkasProductListSortType as o}from"../../models/ui/product-list/index.js";import{getInitial as s}from"../../models/ui/product-list/init.js";var d=function(){function d(t,i,e){this.relatedProductData=null,this.viewedTogetherProductData=null,this.pageType=t,this.productListPropValue=i,this.pageSpecificData=e,this.relatedProductData=null,this.viewedTogetherProductData=null}return d.prototype.getValue=function(){var d,p;return t(this,void 0,void 0,(function(){var t,u,c,l,h;return i(this,(function(i){switch(i.label){case 0:return this.productListPropValue.productListType===r.ALL&&this.productListPropValue.usePageFilter&&(this.pageType===e.CATEGORY?(c=this.pageSpecificData,u=c.id):this.pageType===e.BRAND&&(l=this.pageSpecificData,t=l.id)),this.productListPropValue.productListType===r.CATEGORY&&this.productListPropValue.category&&(u=this.productListPropValue.category),this.pageType===e.PRODUCT&&this.productListPropValue.productListType===r.RELATED_PRODUCTS&&this.productListPropValue.relatedProductsType&&this.pageSpecificData&&(this.relatedProductData={brandIds:null,categoryIds:null,productId:""},this.productListPropValue.relatedProductsType===a.CATEGORY?this.relatedProductData.categoryIds=this.pageSpecificData.categories.map((function(t){return t.id})):this.relatedProductData.brandIds=[null===(p=null===(d=this.pageSpecificData)||void 0===d?void 0:d.brand)||void 0===p?void 0:p.id],this.relatedProductData.productId=this.pageSpecificData.id),this.pageType===e.PRODUCT&&this.productListPropValue.productListType===r.VIEWED_TOGETHER&&this.pageSpecificData&&(this.viewedTogetherProductData={productIds:[]},this.viewedTogetherProductData.productIds=[this.pageSpecificData.id]),h={data:[],count:0,page:1,limit:this.productListPropValue.initialLimit||10,type:this.productListPropValue.productListType||r.ALL,sort:this.productListPropValue.initialSort||o.LAST_ADDED,productListPropValue:this.productListPropValue,filterBrandId:t,filterCategoryId:u,pageType:this.pageType,pageSpecificData:[e.CATEGORY,e.BRAND].includes(this.pageType)?this.pageSpecificData:void 0,relatedProductData:this.relatedProductData,viewedTogetherProductData:this.viewedTogetherProductData,filters:null,infiniteScrollPage:null},[4,s(h)];case 1:return i.sent(),[2,h]}}))}))},d}();export{d as IkasProductListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../node_modules/tslib/tslib.es6.js";import{getInitial as e}from"../../models/ui/raffle-list/init.js";var n=function(){function n(){}return n.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){switch(i.label){case 0:return[4,e(t={data:[],count:0,page:1,limit:20})];case 1:return i.sent(),[2,t]}}))}))},n}();export{n as IkasRaffleListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as r}from
|
|
1
|
+
import{__awaiter as e,__generator as r}from"../../node_modules/tslib/tslib.es6.js";import{listStorefrontRaffle as a}from"@ikas/storefront-api";import{populateRaffleProducts as l}from"../helpers/raffle.js";import{getPlaceholderRaffle as t}from"../placeholders.js";var o=function(){function o(e){this.rafflePropValue=e}return o.prototype.getValue=function(){var o,f,i;return e(this,void 0,void 0,(function(){var e,s;return r(this,(function(r){switch(r.label){case 0:return(null===(o=this.rafflePropValue)||void 0===o?void 0:o.usePageData)?[2,{raffle:null,rafflePropValue:this.rafflePropValue}]:this.rafflePropValue.raffleId?[4,a({id:{eq:this.rafflePropValue.raffleId}})]:[2,null];case 1:return(e=r.sent()).isSuccess&&(null===(i=null===(f=e.data)||void 0===f?void 0:f.data)||void 0===i?void 0:i.length)?(s=e.data.data[0],[4,l([s])]):[2,null];case 2:return r.sent(),[2,{raffle:s||t(),rafflePropValue:this.rafflePropValue}]}}))}))},o}();export{o as IkasRafflePropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from
|
|
1
|
+
import{__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.js";var i=function(){function i(t){this.text=t}return i.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,this.text]}))}))},i}();export{i as IkasRichTextPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from
|
|
1
|
+
import{__awaiter as t,__generator as i}from"../../node_modules/tslib/tslib.es6.js";var n=function(){function n(t){this.sliderData=t}return n.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return i(this,(function(t){return[2,{value:this.sliderData.value,unit:this.sliderData.unit}]}))}))},n}();export{n as IkasSliderPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from
|
|
1
|
+
import{__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.js";var i=function(){function i(t){this.text=t}return i.prototype.getValue=function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,this.text]}))}))},i}();export{i as IkasTextPropValueProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-providers",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.25",
|
|
4
4
|
"description": "Data providers for ikas storefront theme components.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -9,39 +9,25 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"build"
|
|
11
11
|
],
|
|
12
|
+
"sideEffects": false,
|
|
12
13
|
"type": "module",
|
|
13
14
|
"scripts": {
|
|
14
15
|
"pack": "npm pack",
|
|
15
16
|
"release": "npm publish",
|
|
16
17
|
"build": "rm -rf build && rollup -c"
|
|
17
18
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"@ikas/storefront-api": "^5.0.0-beta.23",
|
|
21
|
-
"@ikas/storefront-config": "^5.0.0-beta.23",
|
|
22
|
-
"@ikas/storefront-model-functions": "^5.0.0-beta.23",
|
|
23
|
-
"@ikas/storefront-models": "^5.0.0-beta.23",
|
|
24
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
25
|
-
"rollup-plugin-rename-node-modules": "^1.2.0",
|
|
26
|
-
"@types/lodash": "^4.14.168",
|
|
27
|
-
"@types/react": "^16.9.55",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"next": "12.2.0",
|
|
28
21
|
"mobx": "^6.1.3",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
34
|
-
"typescript": "^4.7.2",
|
|
35
|
-
"ttypescript": "^1.5.12",
|
|
36
|
-
"typescript-transform-paths": "^2.2.2",
|
|
22
|
+
"@ikas/storefront-api": "^5.0.0-beta.25",
|
|
23
|
+
"@ikas/storefront-config": "^5.0.0-beta.25",
|
|
24
|
+
"@ikas/storefront-model-functions": "^5.0.0-beta.25",
|
|
25
|
+
"@ikas/storefront-models": "^5.0.0-beta.25",
|
|
37
26
|
"lodash": "^4.17.21"
|
|
38
27
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@ikas/storefront-model-functions": "^5.0.0-beta.23",
|
|
44
|
-
"@ikas/storefront-models": "^5.0.0-beta.23",
|
|
45
|
-
"lodash": "^4.17.21"
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "^4.7.2",
|
|
30
|
+
"@types/lodash": "^4.14.168",
|
|
31
|
+
"@types/react": "^16.9.55"
|
|
46
32
|
}
|
|
47
33
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=function(){return n=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},n.apply(this,arguments)};function t(n,t,e,r){return new(e||(e=Promise))((function(o,a){function u(n){try{c(r.next(n))}catch(n){a(n)}}function l(n){try{c(r.throw(n))}catch(n){a(n)}}function c(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(u,l)}c((r=r.apply(n,t||[])).next())}))}function e(n,t){var e,r,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(n,u)}catch(n){a=[6,n],r=0}finally{e=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}export{n as __assign,t as __awaiter,e as __generator};
|