@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.cjs CHANGED
@@ -6189,6 +6189,10 @@ class Slider {
6189
6189
  createBulletPoints(count, getLayoutDirection, position) {
6190
6190
  const bullets = document.createElement("div");
6191
6191
  bullets.classList.add("cards-slider__navbar");
6192
+ // force hide bullets container for single slide
6193
+ if (count <= 1) {
6194
+ position = 0;
6195
+ }
6192
6196
  if (position === 0) {
6193
6197
  bullets.classList.add("cards-slider__navbar--position-none");
6194
6198
  }
@@ -6226,10 +6230,6 @@ class Slider {
6226
6230
  bullets.appendChild(bullet);
6227
6231
  }
6228
6232
  }
6229
- else {
6230
- // additionally hide bullets container for single slide
6231
- bullets.classList.add("hidden");
6232
- }
6233
6233
  // const onUpdateActiveIndex = (activeIndex: number) => {
6234
6234
  // if (activeIndex >= 0 && activeIndex < count) {
6235
6235
  // for (const bullet of bullets.querySelectorAll(".cards-slider__bullet--active")) {
@@ -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 } : { name: "color", value: "Undefined" },
20340
- size: offerDto.size ? { name: "size", value: offerDto.size } : { name: "size", value: "Undefined" },
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
- await await this.widgetDeps.slideApiDeps.productCartUpdate({
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`]; }