@inappstory/slide-api 0.1.32 → 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
@@ -6187,6 +6187,10 @@ class Slider {
6187
6187
  createBulletPoints(count, getLayoutDirection, position) {
6188
6188
  const bullets = document.createElement("div");
6189
6189
  bullets.classList.add("cards-slider__navbar");
6190
+ // force hide bullets container for single slide
6191
+ if (count <= 1) {
6192
+ position = 0;
6193
+ }
6190
6194
  if (position === 0) {
6191
6195
  bullets.classList.add("cards-slider__navbar--position-none");
6192
6196
  }
@@ -6224,10 +6228,6 @@ class Slider {
6224
6228
  bullets.appendChild(bullet);
6225
6229
  }
6226
6230
  }
6227
- else {
6228
- // additionally hide bullets container for single slide
6229
- bullets.classList.add("hidden");
6230
- }
6231
6231
  // const onUpdateActiveIndex = (activeIndex: number) => {
6232
6232
  // if (activeIndex >= 0 && activeIndex < count) {
6233
6233
  // for (const bullet of bullets.querySelectorAll(".cards-slider__bullet--active")) {
@@ -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`]; }