@ikas/storefront-providers 6.1.0-beta.368 → 6.1.0-beta.369

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.
@@ -17,7 +17,7 @@ export declare type IkasViewedTogetherProductProps = {
17
17
  export declare type IkasPurchasedTogetherProductProps = {
18
18
  productIds: string[];
19
19
  };
20
- export declare class IkasProductListPropValueProvider implements IkasPropValueProvider<IkasProductList> {
20
+ export declare class IkasProductListPropValueProvider implements IkasPropValueProvider<IkasProductList | null> {
21
21
  private pageType;
22
22
  private productListPropValue;
23
23
  private pageSpecificData?;
@@ -26,5 +26,5 @@ export declare class IkasProductListPropValueProvider implements IkasPropValuePr
26
26
  private purchasedTogetherProductData?;
27
27
  private recommendedProductData?;
28
28
  constructor(pageType: IkasThemeJsonPageType, productListPropValue: IkasProductListPropValue, pageSpecificData?: any);
29
- getValue(): Promise<IkasProductList>;
29
+ getValue(): Promise<IkasProductList | null>;
30
30
  }
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as i}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 d}from"../../models/ui/product-list/init.js";var s=function(){function s(t,e,i){this.relatedProductData=null,this.viewedTogetherProductData=null,this.purchasedTogetherProductData=null,this.recommendedProductData=null,this.pageType=t,this.productListPropValue=e,this.pageSpecificData=i,this.relatedProductData=null,this.viewedTogetherProductData=null,this.purchasedTogetherProductData=null,this.recommendedProductData=null}return s.prototype.getValue=function(){var s,c;return t(this,void 0,void 0,(function(){var t,p,u,l,h;return e(this,(function(e){switch(e.label){case 0:return this.productListPropValue.productListType===r.ALL&&this.productListPropValue.usePageFilter&&(this.pageType===i.CATEGORY?(u=this.pageSpecificData,p=u.id):this.pageType===i.BRAND&&(l=this.pageSpecificData,t=l.id)),this.productListPropValue.productListType===r.CATEGORY&&this.productListPropValue.category&&(p=this.productListPropValue.category),this.pageType===i.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&&this.pageSpecificData.categories.length?[this.pageSpecificData.categories[0].id]:null:this.relatedProductData.brandIds=[null===(c=null===(s=this.pageSpecificData)||void 0===s?void 0:s.brand)||void 0===c?void 0:c.id],this.relatedProductData.productId=this.pageSpecificData.id),this.pageType===i.PRODUCT&&this.productListPropValue.productListType===r.VIEWED_TOGETHER&&this.pageSpecificData&&(this.viewedTogetherProductData={productIds:[]},this.viewedTogetherProductData.productIds=[this.pageSpecificData.id]),this.pageType===i.PRODUCT&&this.productListPropValue.productListType===r.PURCHASED_TOGETHER&&this.pageSpecificData&&(this.purchasedTogetherProductData={productIds:[]},this.purchasedTogetherProductData.productIds=[this.pageSpecificData.id]),this.productListPropValue.productListType===r.RECOMMENDED_PRODUCTS&&this.productListPropValue.recommendedProductsType&&(this.recommendedProductData={brandIds:null,categoryIds:null},this.productListPropValue.recommendedProductsType.category?this.recommendedProductData.categoryIds=[this.productListPropValue.recommendedProductsType.category]:this.productListPropValue.recommendedProductsType.brand&&(this.recommendedProductData.brandIds=[this.productListPropValue.recommendedProductsType.brand])),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:p,pageType:this.pageType,pageSpecificData:[i.CATEGORY,i.BRAND].includes(this.pageType)?this.pageSpecificData:null,relatedProductData:this.relatedProductData,recommendedProductData:this.recommendedProductData,viewedTogetherProductData:this.viewedTogetherProductData,purchasedTogetherProductData:this.purchasedTogetherProductData,excludedFields:this.productListPropValue.excludedFields,isFacetListNotSent:this.productListPropValue.isFacetListNotSent,filters:null,infiniteScrollPage:null},[4,d(h)];case 1:return e.sent(),h.pageSpecificData=null,[2,h]}}))}))},s}();export{s as IkasProductListPropValueProvider};
1
+ import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as i}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 d}from"../../models/ui/product-list/index.js";import{getInitial as o}from"../../models/ui/product-list/init.js";var s=function(){function s(t,e,i){this.relatedProductData=null,this.viewedTogetherProductData=null,this.purchasedTogetherProductData=null,this.recommendedProductData=null,this.pageType=t,this.productListPropValue=e,this.pageSpecificData=i,this.relatedProductData=null,this.viewedTogetherProductData=null,this.purchasedTogetherProductData=null,this.recommendedProductData=null}return s.prototype.getValue=function(){var s,c;return t(this,void 0,void 0,(function(){var t,u,p,l,h;return e(this,(function(e){switch(e.label){case 0:if(this.productListPropValue.productListType===r.ALL&&this.productListPropValue.usePageFilter)if(this.pageType===i.CATEGORY){if(!(null==(p=this.pageSpecificData)?void 0:p.id))return[2,null];u=p.id}else if(this.pageType===i.BRAND){if(!(null==(l=this.pageSpecificData)?void 0:l.id))return[2,null];t=l.id}return this.productListPropValue.productListType===r.CATEGORY&&this.productListPropValue.category&&(u=this.productListPropValue.category),this.pageType===i.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&&this.pageSpecificData.categories.length?[this.pageSpecificData.categories[0].id]:null:this.relatedProductData.brandIds=[null===(c=null===(s=this.pageSpecificData)||void 0===s?void 0:s.brand)||void 0===c?void 0:c.id],this.relatedProductData.productId=this.pageSpecificData.id),this.pageType===i.PRODUCT&&this.productListPropValue.productListType===r.VIEWED_TOGETHER&&this.pageSpecificData&&(this.viewedTogetherProductData={productIds:[]},this.viewedTogetherProductData.productIds=[this.pageSpecificData.id]),this.pageType===i.PRODUCT&&this.productListPropValue.productListType===r.PURCHASED_TOGETHER&&this.pageSpecificData&&(this.purchasedTogetherProductData={productIds:[]},this.purchasedTogetherProductData.productIds=[this.pageSpecificData.id]),this.productListPropValue.productListType===r.RECOMMENDED_PRODUCTS&&this.productListPropValue.recommendedProductsType&&(this.recommendedProductData={brandIds:null,categoryIds:null},this.productListPropValue.recommendedProductsType.category?this.recommendedProductData.categoryIds=[this.productListPropValue.recommendedProductsType.category]:this.productListPropValue.recommendedProductsType.brand&&(this.recommendedProductData.brandIds=[this.productListPropValue.recommendedProductsType.brand])),h={data:[],count:0,page:1,limit:this.productListPropValue.initialLimit||10,type:this.productListPropValue.productListType||r.ALL,sort:this.productListPropValue.initialSort||d.LAST_ADDED,productListPropValue:this.productListPropValue,filterBrandId:t,filterCategoryId:u,pageType:this.pageType,pageSpecificData:[i.CATEGORY,i.BRAND].includes(this.pageType)?this.pageSpecificData:null,relatedProductData:this.relatedProductData,recommendedProductData:this.recommendedProductData,viewedTogetherProductData:this.viewedTogetherProductData,purchasedTogetherProductData:this.purchasedTogetherProductData,excludedFields:this.productListPropValue.excludedFields,isFacetListNotSent:this.productListPropValue.isFacetListNotSent,filters:null,infiniteScrollPage:null},[4,o(h)];case 1:return e.sent(),h.pageSpecificData=null,[2,h]}}))}))},s}();export{s as IkasProductListPropValueProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-providers",
3
- "version": "6.1.0-beta.368",
3
+ "version": "6.1.0-beta.369",
4
4
  "description": "Data providers for ikas storefront theme components.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rollup/plugin-commonjs": "^22.0.0",
20
- "@ikas/storefront-api": "^6.1.0-beta.368",
21
- "@ikas/storefront-config": "^6.1.0-beta.368",
22
- "@ikas/storefront-model-functions": "^6.1.0-beta.368",
23
- "@ikas/storefront-models": "^6.1.0-beta.368",
20
+ "@ikas/storefront-api": "^6.1.0-beta.369",
21
+ "@ikas/storefront-config": "^6.1.0-beta.369",
22
+ "@ikas/storefront-model-functions": "^6.1.0-beta.369",
23
+ "@ikas/storefront-models": "^6.1.0-beta.369",
24
24
  "@rollup/plugin-node-resolve": "^13.3.0",
25
25
  "rollup-plugin-rename-node-modules": "^1.2.0",
26
26
  "@types/lodash": "^4.14.168",
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "peerDependencies": {
40
40
  "mobx": "^6.1.3",
41
- "@ikas/storefront-api": "^6.1.0-beta.368",
42
- "@ikas/storefront-config": "^6.1.0-beta.368",
43
- "@ikas/storefront-model-functions": "^6.1.0-beta.368",
44
- "@ikas/storefront-models": "^6.1.0-beta.368",
41
+ "@ikas/storefront-api": "^6.1.0-beta.369",
42
+ "@ikas/storefront-config": "^6.1.0-beta.369",
43
+ "@ikas/storefront-model-functions": "^6.1.0-beta.369",
44
+ "@ikas/storefront-models": "^6.1.0-beta.369",
45
45
  "lodash": "^4.17.21"
46
46
  }
47
47
  }