@gem-sdk/components 4.0.0-staging.1204 → 4.0.0-staging.1206
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/cjs/builder.js +1 -1
- package/dist/cjs/carousel/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel/components/arrow/common/helpers.js +1 -1
- package/dist/cjs/carousel/components/arrow/common/styles.js +11 -11
- package/dist/cjs/carousel/components/dot/common/helpers.js +1 -1
- package/dist/cjs/carousel/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel/components/item/common/styles.js +1 -1
- package/dist/cjs/carousel/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +6 -8
- package/dist/cjs/carousel/components/root/common/attrs.js +1 -1
- package/dist/cjs/carousel/components/root/common/classes.js +1 -1
- package/dist/cjs/carousel/components/root/common/styles.js +1 -1
- package/dist/cjs/carousel/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel/hooks/useDotsSetting.js +1 -1
- package/dist/cjs/carousel/index.js +1 -1
- package/dist/cjs/carousel/plugins/animation.js +1 -1
- package/dist/cjs/carousel/plugins/auto-play.js +1 -0
- package/dist/cjs/carousel/plugins/fix-slider-move-backward.js +1 -0
- package/dist/cjs/carousel/plugins/mutation.js +1 -0
- package/dist/cjs/carousel/settings/configs/presets.js +4 -4
- package/dist/cjs/carousel/settings/configs/settings-v2.js +1 -1
- package/dist/cjs/carousel-v3/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.js +10 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +26 -0
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/common/styles.js +33 -0
- package/dist/cjs/carousel-v3/components/dot/Dots.js +2 -0
- package/dist/cjs/carousel-v3/components/dot/Dots.liquid.js +7 -0
- package/dist/cjs/carousel-v3/components/dot/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/dot/common/styles.js +1 -0
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +2 -0
- package/dist/cjs/carousel-v3/components/item/CarouselItem.liquid.js +22 -0
- package/dist/cjs/carousel-v3/components/item/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/item/common/styles.js +1 -0
- package/dist/cjs/carousel-v3/components/root/Carousel.js +2 -0
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +23 -0
- package/dist/cjs/carousel-v3/components/root/common/attrs.js +1 -0
- package/dist/cjs/carousel-v3/components/root/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/root/common/styles.js +1 -0
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useCarouseItem.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useDotsSetting.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useTrackPreviewPause.js +1 -0
- package/dist/cjs/carousel-v3/index.js +1 -0
- package/dist/cjs/{carousel → carousel-v3}/next.js +1 -1
- package/dist/cjs/carousel-v3/plugins/animation.js +1 -0
- package/dist/cjs/carousel-v3/settings/Carousel.js +5 -0
- package/dist/cjs/carousel-v3/settings/CarouselItem.js +1 -0
- package/dist/cjs/carousel-v3/settings/configs/presets.js +114 -0
- package/dist/cjs/carousel-v3/settings/configs/settings-v2.js +3 -0
- package/dist/cjs/carousel-v3/settings/configs/ui-v1.js +1 -0
- package/dist/cjs/carousel-v3/settings/configs/ui-v2.js +1 -0
- package/dist/cjs/grid/components/row/common/helpers.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +1 -1
- package/dist/cjs/marquee/hooks/useMarqueeScrollToItem.js +1 -1
- package/dist/cjs/marquee/settings/Marquee.js +1 -1
- package/dist/cjs/next.js +1 -1
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +6 -6
- package/dist/cjs/product/components/product-images-v2/common/attrs.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/classes.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/getBorderActiveCss.js +1 -5
- package/dist/cjs/product/components/product-images-v2/common/productFeaturedImage.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/productGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/styles.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +7 -7
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +4 -4
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/hooks/useGalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/hooks/useProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImageV3.js +26 -0
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +44 -0
- package/dist/cjs/product/components/product-images-v3/common/attrs.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/getBorderActiveCss.js +20 -0
- package/dist/cjs/product/components/product-images-v3/common/hoverAction.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/productFeaturedImage.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/productGallery.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/styles.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/child/MediaIcon.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +118 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +46 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +93 -0
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ButtonOpenLightBox.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +2 -0
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesAttr.js +1 -0
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesClassName.js +1 -0
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useFeatureImageWithGallery.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useFilterImagesByVariant.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -0
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +4 -4
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +205 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +15 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +22 -0
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +19 -0
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +34 -0
- package/dist/cjs/product/components/product-list-v3/common/attrs.js +1 -0
- package/dist/cjs/product/components/product-list-v3/common/classes.js +1 -0
- package/dist/cjs/product/components/product-list-v3/common/helpers.js +1 -0
- package/dist/cjs/product/components/product-list-v3/common/styles.js +1 -0
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/product/settings/ProductListV3.js +8 -0
- package/dist/cjs/product/settings/product/configs/product-presets/product-1-col.js +2 -2
- package/dist/cjs/product/settings/product/configs/product-presets/product-2-col.js +2 -2
- package/dist/cjs/product/settings/product/configs/product-presets/product-default.js +2 -2
- package/dist/cjs/product/settings/product-image-v2/ProductImages.js +2 -2
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +3 -2
- package/dist/cjs/product/settings/product-image-v2/configs/ui/FeatureNavigation.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui/ImageListNavigation.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/ProductFeatureImage.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/ProductGalleryImage.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/ProductImages.js +21 -0
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductFeatureImage.js +2 -0
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -0
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui/FeatureDots.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui/FeatureNavigation.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui/ImageListNavigation.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v1.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -0
- package/dist/cjs/product/settings/product-list/configs/presets.js +2 -2
- package/dist/cjs/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/cjs/product/settings/product-list-v3/configs/presets.js +37 -0
- package/dist/cjs/product/settings/product-list-v3/configs/settings-v2.js +1 -0
- package/dist/cjs/product/settings/product-list-v3/configs/ui-v1.js +1 -0
- package/dist/cjs/product/settings/product-list-v3/configs/ui-v2.js +1 -0
- package/dist/cjs/setting.js +1 -1
- package/dist/cjs/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
- package/dist/esm/builder.js +1 -1
- package/dist/esm/carousel/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel/components/arrow/common/helpers.js +1 -1
- package/dist/esm/carousel/components/arrow/common/styles.js +8 -8
- package/dist/esm/carousel/components/dot/common/helpers.js +1 -1
- package/dist/esm/carousel/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel/components/item/common/styles.js +1 -1
- package/dist/esm/carousel/components/root/Carousel.js +1 -1
- package/dist/esm/carousel/components/root/Carousel.liquid.js +7 -9
- package/dist/esm/carousel/components/root/common/attrs.js +1 -1
- package/dist/esm/carousel/components/root/common/classes.js +1 -1
- package/dist/esm/carousel/components/root/common/styles.js +1 -1
- package/dist/esm/carousel/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel/hooks/useDotsSetting.js +1 -1
- package/dist/esm/carousel/index.js +1 -1
- package/dist/esm/carousel/plugins/animation.js +1 -1
- package/dist/esm/carousel/plugins/auto-play.js +1 -0
- package/dist/esm/carousel/plugins/fix-slider-move-backward.js +1 -0
- package/dist/esm/carousel/plugins/mutation.js +1 -0
- package/dist/esm/carousel/settings/configs/presets.js +4 -4
- package/dist/esm/carousel/settings/configs/settings-v2.js +1 -1
- package/dist/esm/carousel-v3/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.js +10 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +26 -0
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/common/styles.js +33 -0
- package/dist/esm/carousel-v3/components/dot/Dots.js +2 -0
- package/dist/esm/carousel-v3/components/dot/Dots.liquid.js +7 -0
- package/dist/esm/carousel-v3/components/dot/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/dot/common/styles.js +1 -0
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +2 -0
- package/dist/esm/carousel-v3/components/item/CarouselItem.liquid.js +22 -0
- package/dist/esm/carousel-v3/components/item/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/item/common/styles.js +1 -0
- package/dist/esm/carousel-v3/components/root/Carousel.js +2 -0
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +23 -0
- package/dist/esm/carousel-v3/components/root/common/attrs.js +1 -0
- package/dist/esm/carousel-v3/components/root/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/root/common/styles.js +1 -0
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -0
- package/dist/esm/carousel-v3/hooks/useCarouseItem.js +1 -0
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -0
- package/dist/esm/carousel-v3/hooks/useDotsSetting.js +1 -0
- package/dist/esm/carousel-v3/hooks/useTrackPreviewPause.js +1 -0
- package/dist/esm/carousel-v3/index.js +1 -0
- package/dist/esm/{carousel → carousel-v3}/next.js +1 -1
- package/dist/esm/carousel-v3/plugins/animation.js +1 -0
- package/dist/esm/carousel-v3/settings/Carousel.js +5 -0
- package/dist/esm/carousel-v3/settings/CarouselItem.js +1 -0
- package/dist/esm/carousel-v3/settings/configs/presets.js +114 -0
- package/dist/esm/carousel-v3/settings/configs/settings-v2.js +3 -0
- package/dist/esm/carousel-v3/settings/configs/ui-v1.js +1 -0
- package/dist/esm/carousel-v3/settings/configs/ui-v2.js +1 -0
- package/dist/esm/grid/components/row/common/helpers.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/marquee/hooks/useMarqueeScrollToItem.js +1 -1
- package/dist/esm/marquee/settings/Marquee.js +1 -1
- package/dist/esm/next.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +8 -8
- package/dist/esm/product/components/product-images-v2/common/attrs.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/classes.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/getBorderActiveCss.js +2 -6
- package/dist/esm/product/components/product-images-v2/common/productFeaturedImage.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/productGallery.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/styles.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +48 -48
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +14 -14
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +11 -11
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/hooks/useGalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/hooks/useProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImageV3.js +26 -0
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +44 -0
- package/dist/esm/product/components/product-images-v3/common/attrs.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/classes.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/getBorderActiveCss.js +20 -0
- package/dist/esm/product/components/product-images-v3/common/hoverAction.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/productFeaturedImage.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/productGallery.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/styles.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/MediaIcon.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +118 -0
- package/dist/esm/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +46 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +93 -0
- package/dist/esm/product/components/product-images-v3/components/lightbox/ButtonOpenLightBox.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +2 -0
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesAttr.js +1 -0
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesClassName.js +1 -0
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useFeatureImageWithGallery.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useFilterImagesByVariant.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -0
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +6 -6
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +205 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +15 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +22 -0
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +19 -0
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +34 -0
- package/dist/esm/product/components/product-list-v3/common/attrs.js +1 -0
- package/dist/esm/product/components/product-list-v3/common/classes.js +1 -0
- package/dist/esm/product/components/product-list-v3/common/helpers.js +1 -0
- package/dist/esm/product/components/product-list-v3/common/styles.js +1 -0
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/product/settings/ProductListV3.js +8 -0
- package/dist/esm/product/settings/product/configs/product-presets/product-1-col.js +2 -2
- package/dist/esm/product/settings/product/configs/product-presets/product-2-col.js +2 -2
- package/dist/esm/product/settings/product/configs/product-presets/product-default.js +2 -2
- package/dist/esm/product/settings/product-image-v2/ProductImages.js +2 -2
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +3 -2
- package/dist/esm/product/settings/product-image-v2/configs/ui/FeatureNavigation.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui/ImageListNavigation.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/ProductFeatureImage.js +1 -0
- package/dist/esm/product/settings/product-image-v3/ProductGalleryImage.js +1 -0
- package/dist/esm/product/settings/product-image-v3/ProductImages.js +21 -0
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductFeatureImage.js +2 -0
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -0
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui/FeatureDots.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui/FeatureNavigation.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui/ImageListNavigation.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui-v1.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -0
- package/dist/esm/product/settings/product-list/configs/presets.js +2 -2
- package/dist/esm/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/esm/product/settings/product-list-v3/configs/presets.js +37 -0
- package/dist/esm/product/settings/product-list-v3/configs/settings-v2.js +1 -0
- package/dist/esm/product/settings/product-list-v3/configs/ui-v1.js +1 -0
- package/dist/esm/product/settings/product-list-v3/configs/ui-v2.js +1 -0
- package/dist/esm/setting.js +1 -1
- package/dist/esm/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
- package/dist/types/index.d.ts +476 -74
- package/package.json +3 -3
- package/dist/cjs/carousel/components/swiper/Swiper.js +0 -1
- package/dist/esm/carousel/components/swiper/Swiper.js +0 -1
- /package/dist/cjs/{carousel → carousel-v3}/components/swiper/SwiperSlide.js +0 -0
- /package/dist/cjs/{carousel → carousel-v3}/components/swiper/common/styles.js +0 -0
- /package/dist/esm/{carousel → carousel-v3}/components/swiper/SwiperSlide.js +0 -0
- /package/dist/esm/{carousel → carousel-v3}/components/swiper/common/styles.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeHeight as t,getHeightByShapeGlobalSize as o,makeWidth as r,composeRadius as i,getResponsiveValueByScreen as a,makeStyleWithDefault as l,getWidthByShapeGlobalSize as s}from"@gem-sdk/core";import{getStyleGridLayout as n,getStyleGridOrderForFeature as p,getStyleGridOrderForGallery as h,getStyleInsideLayout as m,convertSpacing as g,getDisplayStyle as
|
|
1
|
+
import{makeStyleResponsive as e,makeHeight as t,getHeightByShapeGlobalSize as o,makeWidth as r,composeRadius as i,getResponsiveValueByScreen as a,makeStyleWithDefault as l,getWidthByShapeGlobalSize as s}from"@gem-sdk/core";import{getStyleGridLayout as n,getStyleGridOrderForFeature as p,getStyleGridOrderForGallery as h,getStyleInsideLayout as m,convertSpacing as g,getDisplayStyle as F,convertSpacingForIndisdeLayout as d}from"./common.js";import{getShapeByLayout as y,sizeSettingDefaultForNewLayout as u,getSettingWidthForGridItem as S,getSettingMinWidthForCarouselItem as c,getSettingWidthForCarouselItem as I,checkDisplayGalleryByWidth as b}from"./productGallery.js";let DEVICES=["desktop","mobile","tablet"];function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getWrapContainerStyle=(t,o)=>{let r=n({position:t.position,ratioLayout:t.ratioLayout,ratioLayoutRight:t.ratioLayoutRight,isHiddenGalleryImages:!!o}),i={"--gtc":"minmax(0, 12fr)"},a={...o?i:r,...e("gg",t?.spacing)};return filterTruthyStyles(a)},getFeatureImageStyle=(t,{enableOrder:o,enableDisplay:r})=>{let i=()=>F(e=>!["bottom-center","left","right","only-feature","inside-bottom","inside-left","inside-right"].includes(a(t?.position,e)||""),"flex"),l=p({position:t?.position}),s={...e("jc",t?.align),...o&&{...l},...r&&{...i()}};return filterTruthyStyles(s)},getGalleryImageStyle=(o,r)=>{let i=h({position:o.position}),l=()=>{let e={},t=r??0;return DEVICES.forEach(r=>{let i=a(o?.position,r),l=["left","right"].includes(i),s=a(o?.spacing,r),n=["inside-left","inside-right"].includes(i),p=d(s),h=`calc(${t}px - ${p})`;e={...e,[r]:l?t+"px":n?h:"auto"}}),e},s=y({shape:o.shape,shapeForBottom:o.shapeForBottom,shapeFor1Col:o.shapeFor1Col,shapeFor2Col:o.shapeFor2Col,shapeForFtOnly:o.shapeForFtOnly,shapeForInsideBottom:o.shapeForInsideBottom??u,shapeForInside:o.shapeForInside??u},o.position),n=m(o.position,s,o?.spacing),p={...e("h",t(l())),...e("jc",o?.align),...i,...n};return filterTruthyStyles(p)},getGalleryGridStyle=(t,o)=>{let r=y({shape:t.shape,shapeForBottom:t.shapeForBottom,shapeFor1Col:t.shapeFor1Col,shapeFor2Col:t.shapeFor2Col,shapeForFtOnly:t.shapeForFtOnly,shapeForInsideBottom:t.shapeForInsideBottom,shapeForInside:t.shapeForInside},t.position),i=()=>{let e=(e,t,o)=>{let r=a(t,o),i=a(e,o),l="slider"!==i&&("bottom-center"===r||"inside-bottom"===r),s=["one-col","two-col"].includes(r||"");return l||s},o=b({shapeByLayout:r}),i={desktop:o.desktop&&e(t.type,t.position,"desktop"),tablet:o.tablet&&e(t.type,t.position,"tablet"),mobile:o.mobile&&e(t.type,t.position,"mobile")};return F(e=>!i[e],"flex")},l={...i(),...e("cg",t?.itemSpacing),...e("rg",t?.itemSpacing),...e("jc",t?.align),...o};return filterTruthyStyles(l)},getGalleryGridItemStyle=a=>{let l=y({shape:a.shape,shapeForBottom:a.shapeForBottom,shapeFor1Col:a.shapeFor1Col,shapeFor2Col:a.shapeFor2Col,shapeForFtOnly:a.shapeForFtOnly,shapeForInsideBottom:a.shapeForInsideBottom,shapeForInside:a.shapeForInside},a.position),s=o(l),n=S({shapeByLayout:l,itemSpacing:a.itemSpacing}),p={"max-width":"100%","outline-color":"var(--g-c-brand, brand)",...e("h",t(s)),...e("w",r(n)),...i({normal:a.corner})};return filterTruthyStyles(p)},getFeatureImageCarouselItemStyle=r=>{let a=o(r.ftShape),l={"max-width":"100%","outline-color":"var(--g-c-brand, brand)",...i({normal:r?.ftCorner}),...e("h",t(a))};return filterTruthyStyles(l)},getGalleryCarouselStyle=e=>{let t=y({shape:e.shape,shapeForBottom:e.shapeForBottom,shapeFor1Col:e.shapeFor1Col,shapeFor2Col:e.shapeFor2Col,shapeForFtOnly:e.shapeForFtOnly,shapeForInsideBottom:e.shapeForInsideBottom,shapeForInside:e.shapeForInside},e.position),o=o=>{let r=a(e?.position,o),i="bottom-center"===r||"inside-bottom"===r,l="inside-left"===r||"inside-right"===r||"left"===r||"right"===r,s=a(t,o);return i||l||!s?.width?"100%":s.width},r={spacing:g(e?.itemSpacing),sizeSetting:{desktop:{width:o("desktop"),height:"100%"},tablet:{width:o("tablet"),height:"100%"},mobile:{width:o("mobile"),height:"100%"}}};return filterTruthyStyles(r)},getGalleryCarouselItemStyle=a=>{let l=y({shape:a.shape,shapeForBottom:a.shapeForBottom,shapeFor1Col:a.shapeFor1Col,shapeFor2Col:a.shapeFor2Col,shapeForFtOnly:a.shapeForFtOnly,shapeForInsideBottom:a.shapeForInsideBottom,shapeForInside:a.shapeForInside},a.position),s=e("minw",r(c({shapeByLayout:l,position:a.position,spacing:a.itemSpacing}))),n=e("maxw",r(c({shapeByLayout:l,position:a.position,spacing:a.itemSpacing}))),p=e("w",r(I({shapeByLayout:l,position:a.position}))),h=e("h",t(o(l))),m={"outline-color":"var(--g-c-brand, brand)",...s,...n,...p,...h,...i({normal:a.corner})};return filterTruthyStyles(m)},getFeaturedImageCarouselStyle=e=>{let t=t=>{let o=a(e.ftShape,t);return o?.width??"100%"},o={playSpeed:e?.ftAnimationSpeed,sizeSetting:{desktop:{width:t("desktop"),height:"auto"},tablet:{width:t("tablet"),height:"auto"},mobile:{width:t("mobile"),height:"auto"}},align:{desktop:a(e?.align,"desktop"),tablet:a(e?.align,"tablet"),mobile:a(e?.align,"mobile")}};return filterTruthyStyles(o)},getFeaturedImageOnlyOneImageStyle=({setting:r,options:a})=>{let n=o(r?.ftShape),p={...l("w",s(r?.ftShape,!1,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...a?.enableRadius&&i({normal:r?.ftCorner}),...a?.enableHeight&&e("h",t(n))};return filterTruthyStyles(p)};export{getFeatureImageCarouselItemStyle,getFeatureImageStyle,getFeaturedImageCarouselStyle,getFeaturedImageOnlyOneImageStyle,getGalleryCarouselItemStyle,getGalleryCarouselStyle,getGalleryGridItemStyle,getGalleryGridStyle,getGalleryImageStyle,getWrapContainerStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{memo as
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{memo as t}from"react";import{useCurrentDevice as r,getResponsiveValueByScreen as a,makeStyleResponsive as s}from"@gem-sdk/core";import{handleMouseMove as m,handleMouseOut as i}from"../../common/hoverAction.js";import{getProductImagesStyles as l}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as n}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as d}from"../../composables/getProductImagesAttr.js";import{createStyle as u}from"@gem-sdk/system";import{getFeaturedImageOnlyOneImageStyle as c}from"../../common/styles.js";import g from"../../../../../carousel/components/root/Carousel.js";import p from"../../../../../carousel/components/item/CarouselItem.js";import f from"./ProductFeaturedImageOnly.js";import{useProductFeaturedImageCarousel as h}from"../../hooks/useProductFeaturedImageCarousel.js";let ProductFeaturedImageCarousel=t=>{let{productImages:C,imgRef:I,onHandleClick:v,onClickArrow:j,onHandleLoaded:y,onHandleUpdateActiveIndex:P,builderPropUID:b,builderPropsClass:k,children:w,parentUid:M,...x}=t,{ref:A,imageActive:F,imageActiveIndex:H,imageShowWhenHover:N,enableOpenLightBox:O,filteredProductImages:R,isRenderFeatureCarousel:S,genRandomKey:B,getAspectRatioFinal:W,emitUpdateActiveIndex:L}=h(t),T=r(),{galleryItemClasses:$,featureImageOnlyOneImageClasses:D}=n(x),{featuredImageCarouselStyle:q,featureImageCarouselItemStyle:z}=l(x),E=u({...c({setting:x,options:{enableRadius:!0,enableHeight:!0}})}),{featuredImageCarouselSettingAttrs:G}=d(x);return e("div",{ref:A,"data-slot":"children",className:"product-feature-image",children:S?o(g,{parentClass:k,elmRef:I,setting:G,styles:q,builderProps:{uid:b},isHiddenArrowWhenDisabled:!0,onLoaded:e=>y&&y(e),onChangeActive:e=>L(e),onClickArrow:()=>j&&j(B()),moveToIdx:H,disableMarginAuto:!0,onHandleChangeSlideByInteraction:e=>{let o=R?.length??0,t=e>=o?0:e;v(R?.[t]?.id??"",O)},children:[w,R?.map(o=>e(p,{contentType:"productImage",className:$("gp-ft-image-item !gp-min-w-full !gp-max-w-full"),onClickItem:()=>{let e=a(x?.ftClickOpenLightBox,T);"none"!==e&&v(o?.id??"",O)},style:z,onMouseMove:e=>m(e,x),onMouseOut:e=>i(e),children:e(f,{image:o,imageShowWhenHover:N,setting:x,aspectRatio:W()})},o?.id))]}):e("div",{ref:I,className:"gp-flex gp-w-full",style:{...s("jc",x?.align)},"data-id":b,children:e("div",{"aria-hidden":"true",className:D,style:E,onMouseMove:e=>m(e,x),onMouseOut:e=>i(e),onBlur:()=>void 0,onClick:()=>{v(F?.id??"",O)},children:e(f,{image:F,imageShowWhenHover:N,setting:x,aspectRatio:W(F)})})})})};var ProductFeaturedImageCarousel$1=t(ProductFeaturedImageCarousel);export{ProductFeaturedImageCarousel$1 as default};
|
package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,cls as i,getResponsiveValueByScreen as a,makeStyle as l}from"@gem-sdk/core";import{memo as m}from"react";import{getAspectRatio as s}from"../../common/common.js";import c from"../../../../../image/components/NextImage.js";import d from"../lightbox/ButtonOpenLightBox.js";import n from"./MediaIcon.js";import{isFeatureMedia as
|
|
2
|
-
${m&&M?"gem-slider-item-active":""}`),onClick:()=>T(o?.id||"",E),style:A,onMouseMove:e=>
|
|
1
|
+
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,cls as i,getResponsiveValueByScreen as a,makeStyle as l}from"@gem-sdk/core";import{memo as m}from"react";import{getAspectRatio as s}from"../../common/common.js";import c from"../../../../../image/components/NextImage.js";import d from"../lightbox/ButtonOpenLightBox.js";import n from"./MediaIcon.js";import{isFeatureMedia as p,getZoomImageClass as g,getZoomLenClass as h}from"../../common/productFeaturedImage.js";import{handleMouseMove as y,handleMouseOut as u}from"../../common/hoverAction.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as v}from"../../composables/getProductImagesStyles.js";import{useProductGalleryGrid as j}from"../../hooks/useProductGalleryGrid.js";let ProductGalleryGrid=m=>{let{builderPropUID:G,productImages:w,onHandleClick:T,activeIndexFormFeatureImage:x,children:P,isHiddenInteraction:b,...I}=m,{isDisplay:N,shapeByLayout:$,imageActiveIndex:k,enableOpenLightBox:E,isEnableBorderActive:M,filteredProductImages:z}=j(m),B=r(),{galleryGridWrapperClasses:H,galleryItemClasses:O}=f(I),{galleryGridStyles:Z,galleryGridItemStyles:A}=v(I);return e(o,{children:N&&t("div",{"data-slot":"children","data-id":G,className:H,style:Z,"gp-data-hidden":`${b}`,children:[z?.map((o,r)=>{let m=r===k,f=p(o.contentType)?o.previewImage:o.src;return t("div",{"aria-hidden":!0,className:O(`gem-slider-item-${G}
|
|
2
|
+
${m&&M?"gem-slider-item-active":""}`),onClick:()=>T(o?.id||"",E),style:A,onMouseMove:e=>y(e,{hoverEffect:I.galleryHoverEffect,zoom:I.galleryZoom,zoomType:I.galleryZoomType}),onMouseOut:e=>u(e),"data-border":m&&I?.borderActive?"active":"deactive",children:[e(c,{src:f,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s($),layout:I?.layout},style:{width:"100%",height:"100%"}},o?.id),e(n,{contentType:o?.contentType||""}),I?.galleryHoverEffect!=="none"&&!p(o?.contentType)&&e(c,{src:f,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:I.layout,aspectRatio:s($)},className:i("hover-image !gp-max-w-none",g())}),I?.galleryHoverEffect=="zoom"&&I?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(a(I.position,B)||"")&&!p(o?.contentType)&&e("div",{className:i(h(),"room-len"),style:{...l({bgi:`url("${o?.src}")`})}}),a(I?.clickOpenLightBox,B)&&e(d,{})]},o?.id)}),P]})})};var ProductGalleryGrid$1=m(ProductGalleryGrid);export{ProductGalleryGrid$1 as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as r,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as r,jsxs as o}from"react/jsx-runtime";import{cls as a}from"@gem-sdk/core";import l from"../gallery-carousel/GalleryCarousel.js";import i from"../child/ProductGalleryGrid.js";import t from"../child/ProductFeaturedImageCarousel.js";import{getProductImagesStyles as d}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as s}from"../../composables/getProductImagesClassName.js";import{useFeatureImageWithGallery as m}from"../../hooks/useFeatureImageWithGallery.js";let FeatureImageWithGallery=u=>{let{setting:c,styles:n,builderProps:p,gallery:g,onHandleClickImage:I,priorityFeatureImage:f,children:h,noDataChildren:y}=u,C={...c,...n},{isShowCarousel:F,featureImageHeight:P,featureWrapperImage:b,onClickFeatureArrow:j,activeIndexFromFeatureImage:k,setOnClickFeatureArrow:v,onHandleLoadedFeatureImage:G,setActiveIndexFromFeatureImage:H}=m(u);if(g?.[0]?.id==="noImageError")return e(r,{children:y});let{ftImageGalleryClasses:x,imageGalleryWrapperClasses:N}=s(u),{wrapperFeaturedImageStyle:U,featureImageStyle:w,galleryImageStyle:A}=d(C,{gallery:g,featureImageHeight:P});return o("div",{className:a("gp-grid gp-w-full gp-relative"),style:U,children:[e("div",{className:x,style:w,children:e(t,{imgRef:b,productImages:g,...C,onHandleClick:(e,r)=>I(e||"",r),onHandleLoaded:G,onHandleUpdateActiveIndex:H,onClickArrow:e=>v(e),builderPropUID:p?.uid,builderPropsClass:`gp-product-images-feature-${p?.uid}`,children:h})}),g.length>1&&e("div",{className:N,style:A,children:F?e(l,{productImages:g,position:C?.position,...C,builderPropUID:p?.uid,onHandleClick:(e,r)=>I(e||"",r),activeIndexFormFeatureImage:k,priorityFeatureImage:f,onClickFeatureArrow:j,builderPropsClass:`gp-product-images-gallery-${p?.uid}`}):e(i,{productImages:g,...C,builderPropUID:p?.uid,onHandleClick:(e,r)=>I(e||"",r),activeIndexFormFeatureImage:k,isHiddenInteraction:!0})})]})};export{FeatureImageWithGallery as default};
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,
|
|
1
|
+
import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import m from"../../../../../video/components/HTML5Embed.liquid.js";import l from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as n}from"../../../../helpers/function.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as M,Liquid as $,If as _}from"@gem-sdk/system";import b from"../../../../../carousel/components/root/Carousel.liquid.js";import w from"../../../../../carousel/components/item/CarouselItem.liquid.js";let FeatureImageWithGallery=({builderPropUID:v,children:I,enableLazyLoadImage:x,...q})=>{let{featuredImageCarouselClasses:z,galleryItemClasses:j,featuredCarouselItemClasses:S}=f(q),{featuredImageCarouselStyle:R,featureImageStyle:W,featureImageCarouselOnlyOneImageStyle:P,featureImageOnlyOneImageStyle:C,featureImageCarouselItemStyle:T}=c(q),{featuredImageCarouselSettingAttrs:L}=h(q),N=t(q.ftShape),k=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
|
-
${
|
|
4
|
+
${D()}
|
|
5
5
|
{% when 'external_video' %}
|
|
6
6
|
{% assign mediaSourceVideo = featureMedia | external_video_url %}
|
|
7
|
-
${
|
|
7
|
+
${O()}
|
|
8
8
|
{% when 'video' %}
|
|
9
9
|
{% assign mediaSourceVideo = featureMedia.sources.last.url %}
|
|
10
|
-
${V()}
|
|
11
|
-
{% when 'model' %}
|
|
12
10
|
${A()}
|
|
11
|
+
{% when 'model' %}
|
|
12
|
+
${E()}
|
|
13
13
|
{% else %}
|
|
14
|
-
${
|
|
14
|
+
${F()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
${
|
|
16
|
+
`,E=()=>l({src:y("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:N}),O=()=>p({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:N}),A=()=>m({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible"}),D=()=>a`
|
|
17
|
+
${V(i("gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==q.hoverEffect},"{{shouldHidden}}"))}
|
|
18
|
+
${_(q?.hoverEffect!=="none",`<div class="${i("zoom-element !gp-max-w-none",o())}">
|
|
19
|
+
${V("image-zoom",!0)}
|
|
20
20
|
</div>`," ")}
|
|
21
|
-
${
|
|
22
|
-
`,
|
|
21
|
+
${_(q?.hoverEffect=="zoom"&&q?.zoomType=="glasses",`<div class="${i("zoom-lens-element",u())}" style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`," ")}
|
|
22
|
+
`,V=(e,i)=>a`
|
|
23
23
|
{% assign src = featureMedia.src %}
|
|
24
|
-
${
|
|
25
|
-
{% assign other_image_index = ${
|
|
24
|
+
${_(i&&"other"==q.hoverEffect,`{% assign media_length = product.media | size %}
|
|
25
|
+
{% assign other_image_index = ${q.otherImage} | plus: 0 %}
|
|
26
26
|
{% if other_image_index >= media_length %}
|
|
27
27
|
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
28
|
{% endif %}
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
|
-
${
|
|
30
|
+
${y("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
32
|
+
${g({srcIsLiquidCode:!0,src:y("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:y("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:x})}`,F=()=>a`
|
|
33
|
+
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",enableLazyLoadImage:x})}`,H=r(q.ftShape),G=a=>`
|
|
34
|
+
${$(`{% assign productImageWidth = 0 %}
|
|
35
35
|
{% case featureMedia.media_type %}
|
|
36
36
|
{% when 'image' %}
|
|
37
37
|
{% assign productImageWidth = featureMedia.width %}
|
|
38
38
|
{% else %}
|
|
39
39
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
40
40
|
{% endcase %}`)}
|
|
41
|
-
${
|
|
41
|
+
${w({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${j(`gp-ft-image-item !gp-min-w-full !gp-max-w-full' ${a}`)}`,parentId:`${v}-{{section.id}}-{{product.id}}`,style:T,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
42
42
|
<div
|
|
43
|
-
class="gp-w-full gp-relative ${
|
|
44
|
-
style="${
|
|
43
|
+
class="gp-w-full gp-relative ${y("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
44
|
+
style="${n(e("pb",H))} ${y("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
45
45
|
>
|
|
46
|
-
${
|
|
46
|
+
${k()}
|
|
47
47
|
</div>
|
|
48
|
-
`})}`,
|
|
49
|
-
${
|
|
48
|
+
`})}`,J=d(q),B="gp-featured-image-wrapper",K=y("product.media.size > 0",`${I||""} {% assign largestRatio = 0 %}
|
|
49
|
+
${M("featureMedia in product.media",`
|
|
50
50
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
51
51
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
52
52
|
{% assign ratio = height | divided_by: width %}
|
|
53
|
-
${
|
|
53
|
+
${y("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
54
54
|
`)}
|
|
55
|
-
${
|
|
56
|
-
${
|
|
57
|
-
`,
|
|
58
|
-
${
|
|
59
|
-
`,
|
|
55
|
+
${M("featureMedia in product.media",`${y("featureMedia.media_type == 'image'",`${M("image in product.images",y("image.src == featureMedia.src","{% assign imageID = image.id %}{% break %}"))}`,"{% assign imageID = '' %}")}
|
|
56
|
+
${G()}`)}
|
|
57
|
+
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:q?.preload,setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,enableLazyLoadImage:x})),Q=()=>`
|
|
58
|
+
${b({builderProps:{uid:v},rootId:`ft-${v}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:B,rootClass:`${z}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:L,rootStyles:W,styles:R,style:{playSpeed:600},disableMarginAuto:!0,children:K})}
|
|
59
|
+
`,U=()=>{switch(q?.preDisplay){case"1st-images":return`
|
|
60
60
|
{% assign featureMedia = product.media.first %}
|
|
61
|
-
`;case"1st-3d-mode":return
|
|
61
|
+
`;case"1st-3d-mode":return M("media in product.media",y("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return M("media in product.media",y("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
62
62
|
{% assign featureMedia = variant.featured_media %}
|
|
63
63
|
{% unless featureMedia %}
|
|
64
64
|
{% assign featureMedia = product.featured_media %}
|
|
65
65
|
{% endunless %}
|
|
66
|
-
`}},
|
|
66
|
+
`}},X=()=>$(`
|
|
67
67
|
{% assign featureMedia = variant.featured_media %}
|
|
68
68
|
{% unless featureMedia %}
|
|
69
69
|
{% assign featureMedia = product.featured_media %}
|
|
70
70
|
{% endunless %}
|
|
71
|
-
${
|
|
71
|
+
${y("product.media.size > 1",U())}
|
|
72
72
|
{% assign largestRatio = 0 %}
|
|
73
73
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
74
74
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
75
75
|
{% assign ratio = height | divided_by: width %}
|
|
76
|
-
${
|
|
76
|
+
${y("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
77
77
|
{% assign productImageWidth = 0 %}
|
|
78
78
|
{% case featureMedia.media_type %}
|
|
79
79
|
{% when 'image' %}
|
|
@@ -81,38 +81,38 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
81
81
|
{% else %}
|
|
82
82
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
83
83
|
{% endcase %}
|
|
84
|
-
${
|
|
84
|
+
${y("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
85
85
|
<div
|
|
86
86
|
class='gp-feature-image-carousel gp-feature-image-only'
|
|
87
|
-
style="${
|
|
87
|
+
style="${n(W)}"
|
|
88
88
|
>
|
|
89
89
|
<div
|
|
90
90
|
class="gp-relative"
|
|
91
|
-
style="${
|
|
91
|
+
style="${n(C)}"
|
|
92
92
|
>
|
|
93
|
-
${
|
|
93
|
+
${I}
|
|
94
94
|
<div
|
|
95
95
|
type="gp-feature-image-only"
|
|
96
96
|
product-id="{{product.id}}"
|
|
97
97
|
product-media="{{product.media.size}}"
|
|
98
|
-
class="${
|
|
99
|
-
style="${
|
|
98
|
+
class="${S(B)}"
|
|
99
|
+
style="${n(P)}"
|
|
100
100
|
>
|
|
101
101
|
<div
|
|
102
|
-
class="gp-w-full gp-relative ${
|
|
103
|
-
style="${
|
|
102
|
+
class="gp-w-full gp-relative ${y("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
103
|
+
style="${n(e("pb",H))} ${y("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
104
104
|
>
|
|
105
|
-
${
|
|
105
|
+
${k()}
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
110
|
-
`);return
|
|
110
|
+
`);return $(`
|
|
111
111
|
{% capture featureImageOnlyOne %}
|
|
112
|
-
${
|
|
112
|
+
${X()}
|
|
113
113
|
{% endcapture %}
|
|
114
|
-
${
|
|
115
|
-
${
|
|
116
|
-
${
|
|
114
|
+
${y("product.media.size > 1",`
|
|
115
|
+
${_(J,Q()," ")}
|
|
116
|
+
${_(!J,"{{ featureImageOnlyOne }}"," ")}
|
|
117
117
|
`,"{{ featureImageOnlyOne }}")}
|
|
118
118
|
`)};export{FeatureImageWithGallery as default};
|
package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r}from"@gem-sdk/core";import{getAspectRatio as s}from"../../common/common.js";import{getEditorMinHeightClass as m}from"../../common/productGallery.js";import{getProductImagesClassName as
|
|
1
|
+
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r}from"@gem-sdk/core";import{getAspectRatio as s}from"../../common/common.js";import{getEditorMinHeightClass as m}from"../../common/productGallery.js";import{getProductImagesClassName as i}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as a}from"../../composables/getProductImagesStyles.js";import{getProductImagesAttr as l}from"../../composables/getProductImagesAttr.js";import{isFeatureMedia as c}from"../../common/productFeaturedImage.js";import n from"../child/MediaIcon.js";import p from"../lightbox/ButtonOpenLightBox.js";import d from"../../../../../image/components/NextImage.js";import u from"../../../../../carousel/components/root/Carousel.js";import g from"../../../../../carousel/components/item/CarouselItem.js";import{useGalleryCarousel as y}from"../../hooks/useGalleryCarousel.js";import{If as f}from"@gem-sdk/system";let ProductGalleryCarousel=h=>{let{builderPropUID:j,productImages:C,activeIndexFormFeatureImage:I,onClickFeatureArrow:P,builderPropsClass:b,arrow:T,priorityFeatureImage:w,...x}=h,k=r(),{galleryItemClasses:q}=i(x),{galleryCarouselSettingAttrs:G}=l(x),{galleryCarouselStyle:N,galleryCarouselItemStyle:A}=a(x),{isDisplay:v,shapeByLayout:B,isShowButtonLightbox:M,filteredProductImages:$,handleClickCarouselItem:D}=y(h);return e(o,{children:v&&e(u,{parentClass:b,rootClass:b,setting:G,styles:N,slidesClass:m(k,x.position,x.navigationPosition),builderProps:{uid:`${j}-carousel`},isHiddenArrowWhenDisabled:!0,disableMarginAuto:!0,children:$?.map(o=>{let r=c(o.contentType)?o.previewImage:o.src;return t(g,{contentType:"productImage",className:q(`gp-gallery-image-item gem-slider-item-${j} `),onClickItem:()=>D(o?.id),style:A,"data-id":o?.id,children:[e(d,{draggable:"false",src:r,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s(B),layout:x?.layout,qualityPercent:x?.qualityPercent,qualityType:x?.qualityType},style:{width:"100%",height:"100%",cursor:"pointer"},className:"product-list-image"}),e(n,{contentType:o?.contentType||""}),f(M,e(p,{}))]},o?.id)})})})};export{ProductGalleryCarousel as default};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{template as e,getResponsiveValueByScreen as
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
6
|
-
<div class="gp-w-full gp-relative
|
|
7
|
-
|
|
1
|
+
import{template as e,makeStyleResponsive as t,getResponsiveValueByScreen as i}from"@gem-sdk/core";import o from"../../../../../image/components/NextImage.liquid.js";import{getPaddingBottomByShapeSetting as r,getDisplayStyle as s,getAspectRatio as a,getSrcImage as p}from"../../common/common.js";import{getShapeByLayout as l,getMinHeightByPosition as d,checkDisplayGalleryByWidth as m,getZoomDisplay as g,getCarouselVerticalConfigByPosition as n}from"../../common/productGallery.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as C}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as b}from"@gem-sdk/system";import v from"../../../../../carousel/components/root/Carousel.liquid.js";import f from"../../../../../carousel/components/item/CarouselItem.liquid.js";let ProductGalleryCarousel=({builderPropUID:w,children:L,enableLazyLoadImage:F,...$})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:I}=C($),{galleryCarouselSettingAttrs:_}=h($),{galleryCarouselStyle:k,galleryCarouselItemStyle:j}=u($),V=()=>{let e=(e,t,o)=>{let r=i(t,o),s=i(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},t=m({shapeByLayout:M}),o={desktop:t.desktop&&e($.type,$.position,"desktop"),tablet:t.tablet&&e($.type,$.position,"tablet"),mobile:t.mobile&&e($.type,$.position,"mobile")};return s(e=>!o[e],"flex")},M=l({shape:$.shape,shapeForBottom:$.shapeForBottom,shapeFor1Col:$.shapeFor1Col,shapeFor2Col:$.shapeFor2Col,shapeForFtOnly:$.shapeForFtOnly,shapeForInsideBottom:$.shapeForInsideBottom,shapeForInside:$.shapeForInside},$.position),P=(t,i)=>e`${o({srcIsLiquidCode:!0,src:`${p("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",enableLazyLoadImage:F})}`,Z=r(M),q=e=>`
|
|
2
|
+
${y("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${y("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${y("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${f({id:"{{imageID}}",contentType:"productImage",className:`${I(`gp-gallery-image-item ${e}`)}`,parentId:`${w}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:j,children:`
|
|
6
|
+
<div class="gp-w-full gp-relative"
|
|
7
|
+
style="${c(t("pb",Z))};"
|
|
8
8
|
>
|
|
9
|
-
${
|
|
9
|
+
${P({aspectRatio:a(M),layout:$?.layout,qualityPercent:$?.qualityPercent,qualityType:$?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${y("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
12
12
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
14
14
|
<path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
|
|
15
15
|
</svg>
|
|
16
16
|
</div>`)}
|
|
17
|
-
${
|
|
17
|
+
${y("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
18
18
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
20
20
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
@@ -22,7 +22,7 @@ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import
|
|
|
22
22
|
</div>`)}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${g(
|
|
25
|
+
style="${c(g($?.clickOpenLightBox))}"
|
|
26
26
|
>
|
|
27
27
|
<svg
|
|
28
28
|
height="100%"
|
|
@@ -40,7 +40,7 @@ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import
|
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
`})}`,
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,B=()=>{let e=n($.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`},A=y("product.media.size > 1",b("media in product.media",`${y("media.media_type == 'image'",b("image in product.images",y("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${y("media.id == product.featured_media.id ",q($?.borderActive?.border!=="none"?"active":""),q())}`));return e`
|
|
45
|
+
${v({builderProps:{uid:w},rootId:`${w}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:B(),slidesClass:d($.position,$.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:_,rootStyles:{...V()},styles:k,disableMarginAuto:!0,children:A})}
|
|
46
46
|
`};export{ProductGalleryCarousel as default};
|
package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as r,Fragment as e}from"react/jsx-runtime";import
|
|
2
|
+
import{jsx as r,Fragment as e}from"react/jsx-runtime";import l from"../child/ProductGalleryGrid.js";let GalleryGrid=i=>{let{setting:d,styles:o,gallery:t,builderProps:a,noDataChildren:n,onHandleClickImage:c,children:m}=i,u={...d,...o};return t?.[0]?.id==="noImageError"?r(e,{children:n}):r(l,{productImages:t,enableHoverAction:!0,...u,builderPropUID:a?.uid,onHandleClick:(r,e)=>c(r||"",e),children:m})};export{GalleryGrid as default};
|
package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import
|
|
1
|
+
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getAspectRatio as n,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let ProductGalleryGrid=({builderPropUID:_,wrapperStyle:$,children:b,enableLazyLoadImage:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=f(L),{galleryGridStyles:q,galleryGridItemStyles:I}=w(L),M=C({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t=["desktop","mobile","tablet"],o={desktop:"none",tablet:"none",mobile:"none"};return t.forEach(e=>{let t=a(L?.position,e)||"",s="one-col"===t||"two-col"===t,d=i?!s:s;o[e]=d?"block":"none"}),e("d",o)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
|
|
2
2
|
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}
|
|
3
3
|
${r(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
4
4
|
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:x})}
|
|
@@ -6,7 +6,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
6
6
|
${r(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:
|
|
9
|
+
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:n(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>g({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),P=()=>i`
|
|
10
10
|
${d("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -19,10 +19,10 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
19
19
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
20
20
|
</svg>
|
|
21
21
|
</div>`)}
|
|
22
|
-
${Z({aspectRatio:
|
|
22
|
+
${Z({aspectRatio:n(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},{width:"100%",height:"100%"})}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${c(v(L?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -52,20 +52,20 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
52
52
|
media-last-source-url="{{mediaSourceUrl}}"
|
|
53
53
|
external-id="{{media.external_id}}"
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
|
-
data-outline="
|
|
56
|
-
class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i}
|
|
57
|
-
style="${
|
|
55
|
+
data-outline="${i?"active":"deactive"}"
|
|
56
|
+
class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i}`)}"
|
|
57
|
+
style="${c(I)}"
|
|
58
58
|
>
|
|
59
59
|
${d("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
61
|
${d("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-h-full gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")} ${d("isVideo == true",
|
|
63
|
+
<div class="gp-h-full gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")} ${d("isVideo == true",c({...S()}))}">
|
|
64
64
|
${d("media != null",P(),T())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${d("isMedia",
|
|
68
|
+
style="${d("isMedia",c({...e("aspect",n(M))}))} ${c({...k()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
@@ -81,10 +81,10 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
83
|
</div>`,T=()=>i`
|
|
84
|
-
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:
|
|
84
|
+
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:n(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}`;return o(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${V}"
|
|
87
|
-
style="${
|
|
87
|
+
style="${c(q)}}"
|
|
88
88
|
>
|
|
89
89
|
${s("media in product.media",`${d("media.media_type == 'image'",s("image in product.images",d("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
90
|
${d("media.id == product.featured_media.id ",N(L?.borderActive?.border!=="none"?"active":""),N())}`)}
|
package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import r from"../../../../../carousel/components/root/Carousel.js";import d from"../../../../../carousel/components/item/CarouselItem.js";import n from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import m from"../../../../../modal/components/Modal.js";import{useMemo as p}from"react";import{isFeatureMedia as a}from"../../common/productFeaturedImage.js";import c from"../child/ProductFeatureVideo.js";import g from"../child/MediaIcon.js";let ProductImagesLightBox=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=i(),E=p(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j={desktop:!1,mobile:!1,tablet:!1},C=l(),x=e=>"edit"!==C&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(m,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(r,{setting:{loop:j,slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24}},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(d,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:x(i)?e(c,{type:i?.contentType,url:i.src??"",aspectRatio:f}):t(o,{children:[e(n,{src:a(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:f},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(g,{contentType:i?.contentType??""})]})},i?.id))})})};export{ProductImagesLightBox as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCurrentDevice as e,useFeaturedImageGlobal as r,useEditorMode as
|
|
1
|
+
import{useCurrentDevice as e,useFeaturedImageGlobal as r,useEditorMode as o,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{useState as i,useRef as a,useEffect as s,useMemo as l,useCallback as n}from"react";import{useFilterImagesByVariant as p}from"./useFilterImagesByVariant.js";import{handleSetSrcForProductImageList as m}from"../../../../image/common/helpers.js";import{getShapeByLayout as d,checkDisplayGalleryByWidth as c}from"../common/productGallery.js";let useGalleryCarousel=u=>{let{builderPropUID:h,productImages:F,onHandleClick:y,activeIndexFormFeatureImage:B,onClickFeatureArrow:f,builderPropsClass:I,arrow:C,priorityFeatureImage:g,...q}=u,b=e(),v=r(),[O,x]=i(f||""),T=o(),[j,k]=i(0),G=a(),{filteredProductImages:P}=p({productImages:F,displayByVariant:q?.displayByVariant,variantSelect:q?.variantSelect});s(()=>{x(f||"")},[f]),s(()=>{G.current&&clearTimeout(G.current),O&&(G.current=setTimeout(()=>{k(B||0),x("")}))},[B]),s(()=>{if(g){let e=P?.findIndex(e=>e.id===g.id)||0;k(e),x("")}},[g,P]),s(()=>{let e=P?.findIndex(e=>e.id===v?.id);k(e||0),x("")},[v,P]);let S=l(()=>d({shape:q.shape,shapeForBottom:q.shapeForBottom,shapeFor1Col:q.shapeFor1Col,shapeFor2Col:q.shapeFor2Col,shapeForFtOnly:q.shapeForFtOnly,shapeForInsideBottom:q.shapeForInsideBottom,shapeForInside:q.shapeForInside},q.position),[q.shape,q.shapeForBottom,q.shapeFor1Col,q.shapeFor2Col,q.shapeForFtOnly,q.position,q.shapeForInsideBottom,q.shapeForInside]),V=n(()=>{m({builderPropUID:h,shapeByLayout:S,qualityType:q.qualityType,qualityPercent:q.qualityPercent})},[S,q.qualityPercent,q.qualityType,h]);s(()=>{if("edit"===T)return;let e=document?.querySelector(`.gem-slider-item-${h} .product-list-image`);if(!e)return;V();let r=new ResizeObserver(()=>{V()});return r?.observe(e,{}),()=>{r?.disconnect()}},[V,h,T]);let A=t(q.clickOpenLightBox,b),L=l(()=>{let e=c({shapeByLayout:S});return t(e,b)},[S,b]),w=l(()=>q?.borderActive?.border!=="none",[q?.borderActive?.border]),z=t(q?.clickOpenLightBox,b),R=e=>{y&&y(e||"",A)};return{moveToIdx:j,isDisplay:L,shapeByLayout:S,isEnableBorderActive:w,isShowButtonLightbox:z,filteredProductImages:P,handleClickCarouselItem:R}};export{useGalleryCarousel};
|
package/dist/esm/product/components/product-images-v2/hooks/useProductFeaturedImageCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFeaturedImageGlobal as e,useCurrentDevice as t,useInteraction as r,useEditorMode as i,getResponsiveValueByScreen as o}from"@gem-sdk/core";import{createRef as n,useMemo as a,useCallback as l,useEffect as u}from"react";import{getAspectRatio as m}from"../common/common.js";import{checkRenderFeaturedCarousel as c}from"../common/productFeaturedImage.js";import{useFilterImagesByVariant as d}from"./useFilterImagesByVariant.js";import{handleSetSrcForFeatureProductImage as h}from"../../../../image/common/helpers.js";let useProductFeaturedImageCarousel=g=>{let p;let{productImages:s,imgRef:f,onHandleClick:y,onClickArrow:S,onHandleLoaded:I,onHandleUpdateActiveIndex:v,builderPropUID:q,builderPropsClass:k,children:b,parentUid:w,...x}=g,T=e(),$=t(),B=n(),{onListener:P,ref:j}=r(),C=i(),{filteredProductImages:F}=d({productImages:s,displayByVariant:x?.displayByVariant,variantSelect:x?.variantSelect}),E=a(()=>{let e=F?.findIndex(e=>e.id===T?.id);return e
|
|
1
|
+
import{useFeaturedImageGlobal as e,useCurrentDevice as t,useInteraction as r,useEditorMode as i,getResponsiveValueByScreen as o}from"@gem-sdk/core";import{createRef as n,useMemo as a,useCallback as l,useEffect as u}from"react";import{getAspectRatio as m}from"../common/common.js";import{checkRenderFeaturedCarousel as c}from"../common/productFeaturedImage.js";import{useFilterImagesByVariant as d}from"./useFilterImagesByVariant.js";import{handleSetSrcForFeatureProductImage as h}from"../../../../image/common/helpers.js";let useProductFeaturedImageCarousel=g=>{let p;let{productImages:s,imgRef:f,onHandleClick:y,onClickArrow:S,onHandleLoaded:I,onHandleUpdateActiveIndex:v,builderPropUID:q,builderPropsClass:k,children:b,parentUid:w,...x}=g,T=e(),$=t(),B=n(),{onListener:P,ref:j}=r(),C=i(),{filteredProductImages:F}=d({productImages:s,displayByVariant:x?.displayByVariant,variantSelect:x?.variantSelect}),E=a(()=>{let e=F?.findIndex(e=>e.id===T?.id);return e},[F,T]),O=a(()=>c(x),[x]),V=a(()=>{if(F?.length)return T||F?.[0]},[F,T]),L=a(()=>"popup"===o(x.ftClickOpenLightBox,$),[x.ftClickOpenLightBox,$]),z=a(()=>x?.otherImage?F&&x.otherImage>=F.length-1||F&&-1===x.otherImage?F.length-1:x.otherImage:0,[x?.otherImage,F]),M=a(()=>x?.hoverEffect==="other"?F?.[z]:F?.find(e=>e.id===T?.id)||F?.[0],[T?.id,z,F,x?.hoverEffect]),R=function(){return Math.random().toString(36).substr(2,5)},A=e=>{p&&clearTimeout(p),p=setTimeout(()=>v&&v(e),500)},D=e=>{let t="1/1",r=0;return e?e.width&&e.height&&(t=`${e.width}/${e.height}`):F?.forEach(e=>{if(e.width&&e.height){let i=e.height/e.width;i>r&&(r=i,t=`${e.width}/${e.height}`)}}),t},G=e=>{let t=m(x.ftShape),r=D(e);return{desktop:t.desktop??r,tablet:t.tablet??r,mobile:t.mobile??r}},H=l(()=>{h({builderPropUID:q,ftShape:x.ftShape,qualityType:x.qualityType,qualityPercent:x.qualityPercent})},[x.ftShape,x.qualityPercent,x.qualityType,q]),J=()=>{let e=`[data-id="${q}"]`;P({event:"gp:change-image-step",selector:e},t=>{let r=(j.current||document).querySelector(e),{data:i,isRollback:o,uniqueStorageKey:n}=t||{};B?.current?.moveToSlideInteraction({element:r,data:i,isRollback:o,key:n})}),P({event:"gp:change-next-slide",selector:e},t=>{let r=(j.current||document).querySelector(e),{data:i,isRollback:o,uniqueStorageKey:n}=t||{};B?.current?.nextSlideInteraction({element:r,data:i,isRollback:o,key:n})}),P({event:"gp:change-previous-slide",selector:e},t=>{let r=(j.current||document).querySelector(e),{data:i,isRollback:o,uniqueStorageKey:n}=t||{};B?.current?.previousSlideInteraction({element:r,data:i,isRollback:o,key:n})})};return u(()=>{if("edit"===C)return;let e=document?.querySelector(`.gem-slider-item-${q} .featured-image-only`);if(!e)return;H();let t=new ResizeObserver(()=>{H()});return t?.observe(e,{}),()=>{t?.disconnect()}},[H,q,C]),u(()=>{J()},[]),u(()=>{!O&&I&&I(!0,0)},[O,I]),{ref:j,imageActive:V,imageActiveIndex:E,imageShowWhenHover:M,enableOpenLightBox:L,filteredProductImages:F,isRenderFeatureCarousel:O,genRandomKey:R,getAspectRatioFinal:G,emitUpdateActiveIndex:A}};export{useProductFeaturedImageCarousel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCurrentDevice as e,useFeaturedImageGlobal as r,useEditorMode as o,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{useState as i,useCallback as a,useEffect as s}from"react";import{getShapeByLayout as l,checkDisplayGalleryByWidth as n}from"../common/productGallery.js";import{useFilterImagesByVariant as p}from"./useFilterImagesByVariant.js";import{handleSetSrcForProductImageList as d}from"../../../../image/common/helpers.js";let useProductGalleryGrid=m=>{let{builderPropUID:y,productImages:c,
|
|
1
|
+
import{useCurrentDevice as e,useFeaturedImageGlobal as r,useEditorMode as o,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{useState as i,useCallback as a,useEffect as s}from"react";import{getShapeByLayout as l,checkDisplayGalleryByWidth as n}from"../common/productGallery.js";import{useFilterImagesByVariant as p}from"./useFilterImagesByVariant.js";import{handleSetSrcForProductImageList as d}from"../../../../image/common/helpers.js";let useProductGalleryGrid=m=>{let{builderPropUID:y,productImages:c,activeIndexFormFeatureImage:u,children:h,isHiddenInteraction:F,...f}=m,B=e(),q=r(),[g,I]=i(0),v=o(),{filteredProductImages:G}=p({productImages:c,displayByVariant:f?.displayByVariant,variantSelect:f?.variantSelect}),P=l({shape:f.shape,shapeForBottom:f.shapeForBottom,shapeFor1Col:f.shapeFor1Col,shapeFor2Col:f.shapeFor2Col,shapeForFtOnly:f.shapeForFtOnly,shapeForInsideBottom:f.shapeForInsideBottom,shapeForInside:f.shapeForInside},f.position),b=t(f.clickOpenLightBox,B),C=n({shapeByLayout:P}),O=t(C,B),j=f?.borderActive?.border!=="none",x=a(()=>{d({builderPropUID:y,shapeByLayout:P,qualityType:f.qualityType,qualityPercent:f.qualityPercent})},[P,f.qualityPercent,f.qualityType,y]);return s(()=>{I(u||0)},[u]),s(()=>{let e=G?.findIndex(e=>e.id===q?.id);I(e&&e>0?e:0)},[q,G]),s(()=>{if("edit"===v)return;let e=document?.querySelector(".grid-gallery");if(!e)return;x();let r=new ResizeObserver(()=>{x()});return r?.observe(e,{}),()=>{r?.disconnect()}},[x,y,v]),{isDisplay:O,shapeByLayout:P,imageActiveIndex:g,enableOpenLightBox:b,isEnableBorderActive:j,filteredProductImages:G}};export{useProductGalleryGrid};
|