All files / src/app/pages/product/product-images product-images.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 542x                                                                                                          
@if (product$ | async) {
  <div class="row">
    <div class="col-lg-3 d-none d-lg-block">
      <div class="product-img-thumbs">
        @for (imageView of getImageViewIDs$('S') | async; track imageView; let i = $index) {
          <div
            class="product-thumb-set"
            tabindex="0"
            [ngClass]="{ active: isActiveSlide(i) }"
            (click)="setActiveSlide(i)"
            (keydown.enter)="setActiveSlide(i)"
          >
            <ish-product-image imageType="S" [imageView]="imageView" />
          </div>
        }
      </div>
    </div>
    @if (getImageViewIDs$('L') | async; as largeImages) {
      <div class="col-12 col-lg-9 product-detail-img clearfix">
        <div class="product-image-container">
          <swiper #carousel [navigation]="true">
            @for (imageView of largeImages; track imageView; let i = $index) {
              <ng-template swiperSlide>
                <div tabindex="0" (click)="openZoomModal(i)" (keydown.enter)="openZoomModal(i)">
                  <ish-product-image
                    imageType="L"
                    [imageView]="imageView"
                    [loading]="i === 0 ? 'eager' : 'lazy'"
                    [ngClass]="{ 'product-image-zoom': zoomImageIds$ | async }"
                  />
                </div>
              </ng-template>
            }
          </swiper>
          <ish-product-label />
        </div>
      </div>
    }
  </div>
}
@if (zoomImageIds$ | async; as zoomImages) {
  <ish-modal-dialog
    #zoomDialog
    [options]="{
      scrollable: true,
      modalDialogClass: 'modal-fullscreen',
    }"
  >
    @for (imageView of zoomImages; track imageView; let i = $index) {
      <ish-product-image imageType="ZOOM" [id]="getZoomImageAnchorId(i)" [imageView]="imageView" />
    }
  </ish-modal-dialog>
}