@inappstory/slide-api 0.1.33 → 0.1.34
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/dist/index.cjs +4 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20336,8 +20336,8 @@ class ProductOfferMapper {
|
|
|
20336
20336
|
available: offerDto.availability !== 0,
|
|
20337
20337
|
availability: offerDto.availability,
|
|
20338
20338
|
options: {
|
|
20339
|
-
color: offerDto.color ? { name: "color", value: offerDto.color } :
|
|
20340
|
-
size: offerDto.size ? { name: "size", value: offerDto.size } :
|
|
20339
|
+
color: offerDto.color ? { name: "color", value: offerDto.color } : null,
|
|
20340
|
+
size: offerDto.size ? { name: "size", value: offerDto.size } : null,
|
|
20341
20341
|
},
|
|
20342
20342
|
name: offerDto.name,
|
|
20343
20343
|
price: offerDto.price,
|
|
@@ -20429,7 +20429,7 @@ class ProductDetailsBottomSheet extends RenderableComponent {
|
|
|
20429
20429
|
const cartOffer = ProductOfferMapper.fromOfferDtoToProductCartOffer(offerDto, quantity);
|
|
20430
20430
|
const delay = async () => new Promise(resolve => setTimeout(resolve, 300));
|
|
20431
20431
|
const [productCart] = await Promise.all([
|
|
20432
|
-
|
|
20432
|
+
this.widgetDeps.slideApiDeps.productCartUpdate({
|
|
20433
20433
|
offer: cartOffer,
|
|
20434
20434
|
}),
|
|
20435
20435
|
delay(),
|
|
@@ -20439,11 +20439,7 @@ class ProductDetailsBottomSheet extends RenderableComponent {
|
|
|
20439
20439
|
getProductAndRelatedProducts(offerDto) {
|
|
20440
20440
|
return {
|
|
20441
20441
|
product: ProductOfferMapper.fromOfferDtoToProductOffer(offerDto),
|
|
20442
|
-
relatedProducts: offerDto.subOffersApi
|
|
20443
|
-
? offerDto.subOffersApi
|
|
20444
|
-
.filter(subOffer => subOffer.size != null && subOffer.color != null)
|
|
20445
|
-
.map(subOffer => ProductOfferMapper.fromOfferDtoToProductOffer(subOffer))
|
|
20446
|
-
: [],
|
|
20442
|
+
relatedProducts: offerDto.subOffersApi ? offerDto.subOffersApi.map(subOffer => ProductOfferMapper.fromOfferDtoToProductOffer(subOffer)) : [],
|
|
20447
20443
|
};
|
|
20448
20444
|
}
|
|
20449
20445
|
static get [Symbol.for("___CTOR_ARGS___")]() { return [`WidgetDeps`, `ProductDetailsBottomSheetProps`]; }
|