@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.js CHANGED
@@ -20334,8 +20334,8 @@ class ProductOfferMapper {
20334
20334
  available: offerDto.availability !== 0,
20335
20335
  availability: offerDto.availability,
20336
20336
  options: {
20337
- color: offerDto.color ? { name: "color", value: offerDto.color } : { name: "color", value: "Undefined" },
20338
- size: offerDto.size ? { name: "size", value: offerDto.size } : { name: "size", value: "Undefined" },
20337
+ color: offerDto.color ? { name: "color", value: offerDto.color } : null,
20338
+ size: offerDto.size ? { name: "size", value: offerDto.size } : null,
20339
20339
  },
20340
20340
  name: offerDto.name,
20341
20341
  price: offerDto.price,
@@ -20427,7 +20427,7 @@ class ProductDetailsBottomSheet extends RenderableComponent {
20427
20427
  const cartOffer = ProductOfferMapper.fromOfferDtoToProductCartOffer(offerDto, quantity);
20428
20428
  const delay = async () => new Promise(resolve => setTimeout(resolve, 300));
20429
20429
  const [productCart] = await Promise.all([
20430
- await await this.widgetDeps.slideApiDeps.productCartUpdate({
20430
+ this.widgetDeps.slideApiDeps.productCartUpdate({
20431
20431
  offer: cartOffer,
20432
20432
  }),
20433
20433
  delay(),
@@ -20437,11 +20437,7 @@ class ProductDetailsBottomSheet extends RenderableComponent {
20437
20437
  getProductAndRelatedProducts(offerDto) {
20438
20438
  return {
20439
20439
  product: ProductOfferMapper.fromOfferDtoToProductOffer(offerDto),
20440
- relatedProducts: offerDto.subOffersApi
20441
- ? offerDto.subOffersApi
20442
- .filter(subOffer => subOffer.size != null && subOffer.color != null)
20443
- .map(subOffer => ProductOfferMapper.fromOfferDtoToProductOffer(subOffer))
20444
- : [],
20440
+ relatedProducts: offerDto.subOffersApi ? offerDto.subOffersApi.map(subOffer => ProductOfferMapper.fromOfferDtoToProductOffer(subOffer)) : [],
20445
20441
  };
20446
20442
  }
20447
20443
  static get [Symbol.for("___CTOR_ARGS___")]() { return [`WidgetDeps`, `ProductDetailsBottomSheetProps`]; }