@ikas/storefront-providers 5.0.40 → 5.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as 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
|
|
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.recommendedProductData=null,this.pageType=t,this.productListPropValue=e,this.pageSpecificData=i,this.relatedProductData=null,this.viewedTogetherProductData=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,n;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.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])),n={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,excludedFields:this.productListPropValue.excludedFields,isFacetListNotSent:this.productListPropValue.isFacetListNotSent,filters:null,infiniteScrollPage:null},[4,d(n)];case 1:return e.sent(),n.pageSpecificData=null,[2,n]}}))}))},s}();export{s as IkasProductListPropValueProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-providers",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.42",
|
|
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": "^5.0.
|
|
21
|
-
"@ikas/storefront-config": "^5.0.
|
|
22
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
23
|
-
"@ikas/storefront-models": "^5.0.
|
|
20
|
+
"@ikas/storefront-api": "^5.0.42",
|
|
21
|
+
"@ikas/storefront-config": "^5.0.42",
|
|
22
|
+
"@ikas/storefront-model-functions": "^5.0.42",
|
|
23
|
+
"@ikas/storefront-models": "^5.0.42",
|
|
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": "^5.0.
|
|
42
|
-
"@ikas/storefront-config": "^5.0.
|
|
43
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
44
|
-
"@ikas/storefront-models": "^5.0.
|
|
41
|
+
"@ikas/storefront-api": "^5.0.42",
|
|
42
|
+
"@ikas/storefront-config": "^5.0.42",
|
|
43
|
+
"@ikas/storefront-model-functions": "^5.0.42",
|
|
44
|
+
"@ikas/storefront-models": "^5.0.42",
|
|
45
45
|
"lodash": "^4.17.21"
|
|
46
46
|
}
|
|
47
47
|
}
|