@ikas/storefront-providers 4.11.5 → 4.11.7
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{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
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/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,IkasProductVariantFunctions as u}from"@ikas/storefront-model-functions";import{getPlaceholderProduct as l}from"../placeholders.js";var n=function(){function n(t){this.productDetailPropValue=t}return n.prototype.getValue=function(){var n,s,d;return t(this,void 0,void 0,(function(){var t,p,c,V,f,h,v,D=this;return e(this,(function(e){switch(e.label){case 0:return(null===(n=this.productDetailPropValue)||void 0===n?void 0:n.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===(s=t.data)||void 0===s?void 0:s.data)?(p=t.data.data).length?(c=p[0]).productOptionSetId?[4,a({id:{eq:c.productOptionSetId}})]:[3,3]:[3,4]:[3,5];case 2:(V=e.sent()).isSuccess&&(null===(d=V.data)||void 0===d?void 0:d.length)&&(c.productOptionSet=V.data[0]),e.label=3;case 3:return f=o.hasVariant,c&&f(c)?(h=c.variants.find((function(t){return t.id===D.productDetailPropValue.variantId})))?(c.selectedVariantValues=null==h?void 0:h.variantValues,[2,{productDetailPropValue:this.productDetailPropValue,productDetail:c}]):[2,null]:(v=c.variants.find((function(t){return t.isActive&&u.hasStock(t)})),c.selectedVariantValues=(v||c.variants[0]).variantValues,[2,{productDetailPropValue:this.productDetailPropValue,productDetail:c}]);case 4:return[2,{productDetailPropValue:this.productDetailPropValue,productDetail:l()}];case 5:return[2,null]}}))}))},n}();export{n as IkasProductPropValueProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-providers",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.7",
|
|
4
4
|
"description": "Data providers for ikas storefront theme components.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
20
|
-
"@ikas/storefront-api": "^4.11.
|
|
21
|
-
"@ikas/storefront-config": "^4.11.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.11.
|
|
23
|
-
"@ikas/storefront-models": "^4.11.
|
|
20
|
+
"@ikas/storefront-api": "^4.11.7",
|
|
21
|
+
"@ikas/storefront-config": "^4.11.7",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.11.7",
|
|
23
|
+
"@ikas/storefront-models": "^4.11.7",
|
|
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": "^4.11.
|
|
42
|
-
"@ikas/storefront-config": "^4.11.
|
|
43
|
-
"@ikas/storefront-model-functions": "^4.11.
|
|
44
|
-
"@ikas/storefront-models": "^4.11.
|
|
41
|
+
"@ikas/storefront-api": "^4.11.7",
|
|
42
|
+
"@ikas/storefront-config": "^4.11.7",
|
|
43
|
+
"@ikas/storefront-model-functions": "^4.11.7",
|
|
44
|
+
"@ikas/storefront-models": "^4.11.7",
|
|
45
45
|
"lodash": "^4.17.21"
|
|
46
46
|
}
|
|
47
47
|
}
|