@gem-sdk/components 4.0.0-staging.1203 → 4.0.0-staging.1205
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/useProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImageV2.js +26 -0
- package/dist/cjs/product/components/product-images-v3/ProductImagesV2.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/components/BloyRewardsProgramLoyalty.js +2 -0
- package/dist/cjs/third-party/components/BloyRewardsProgramLoyalty.liquid.js +1 -0
- package/dist/cjs/third-party/components/UppromoteAffiliateMarketing.liquid.js +89 -1
- package/dist/cjs/third-party/configs/BloyRewardsProgramLoyalty.js +1 -0
- package/dist/cjs/third-party/index.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party/settings/BloyRewardsProgramLoyalty/index.js +4 -0
- package/dist/cjs/third-party/settings/BloyRewardsProgramLoyalty/uiV2.js +1 -0
- 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/useProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImageV2.js +26 -0
- package/dist/esm/product/components/product-images-v3/ProductImagesV2.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/components/BloyRewardsProgramLoyalty.js +2 -0
- package/dist/esm/third-party/components/BloyRewardsProgramLoyalty.liquid.js +1 -0
- package/dist/esm/third-party/components/UppromoteAffiliateMarketing.liquid.js +89 -1
- package/dist/esm/third-party/configs/BloyRewardsProgramLoyalty.js +1 -0
- package/dist/esm/third-party/index.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party/settings/BloyRewardsProgramLoyalty/index.js +4 -0
- package/dist/esm/third-party/settings/BloyRewardsProgramLoyalty/uiV2.js +1 -0
- package/dist/esm/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
- package/dist/types/index.d.ts +492 -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
package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
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 n from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getAspectRatio as c,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
|
+
${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
|
+
${r(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
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})}
|
|
5
|
+
</div>`," ")}
|
|
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
|
+
</div>
|
|
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:c(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>n({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),P=()=>i`
|
|
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
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
|
+
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
13
|
+
<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"/>
|
|
14
|
+
</svg>
|
|
15
|
+
</div>`)}
|
|
16
|
+
${d("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
17
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
+
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
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
|
+
</svg>
|
|
21
|
+
</div>`)}
|
|
22
|
+
${Z({aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},{width:"100%",height:"100%"})}
|
|
23
|
+
|
|
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(v(L?.clickOpenLightBox))}" >
|
|
26
|
+
<svg
|
|
27
|
+
height="100%"
|
|
28
|
+
width="100%"
|
|
29
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
+
class="gp-h-6 gp-w-6"
|
|
31
|
+
viewBox="0 0 512 512"
|
|
32
|
+
color="#fff"
|
|
33
|
+
>
|
|
34
|
+
<path
|
|
35
|
+
fill="currentColor"
|
|
36
|
+
stroke-linecap="round"
|
|
37
|
+
stroke-linejoin="round"
|
|
38
|
+
d="M62.2467 345.253C43.7072 326.714 29.1474 305.116 18.9714 281.057C8.42839 256.13 3.08301 229.671 3.08301 202.418C3.08301 175.165 8.43012 148.707 18.974 123.78C29.15 99.7213 43.7098 78.123 62.2485 59.5834C80.788 41.0439 102.386 26.4841 126.445 16.3081C151.372 5.76422 177.831 0.417969 205.084 0.417969C232.337 0.417969 258.794 5.76421 283.722 16.3064C307.78 26.4823 329.379 41.0422 347.918 59.5817C366.458 78.1212 381.017 99.7196 391.194 123.778C401.737 148.706 407.083 175.163 407.083 202.417C407.083 229.671 401.737 256.129 391.194 281.056C388.406 287.648 385.277 294.048 381.839 300.257L493.397 411.815C514.091 432.511 514.091 466.187 493.395 486.883L484.272 496.006C474.245 506.032 460.915 511.553 446.738 511.553C432.559 511.553 419.228 506.032 409.202 496.006L296.022 382.824C291.996 384.854 287.898 386.762 283.721 388.528C258.794 399.073 232.336 404.419 205.082 404.419C177.828 404.419 151.371 399.071 126.443 388.528C102.385 378.352 80.7863 363.793 62.2467 345.253ZM301.699 336.166C313.928 327.317 324.896 316.835 334.282 305.034C342.149 295.142 348.9 284.325 354.355 272.775C364.433 251.432 370.076 227.586 370.076 202.419C370.076 111.296 296.206 37.4253 205.083 37.4253C113.96 37.4253 40.0895 111.294 40.0895 202.418C40.0895 293.541 113.96 367.411 205.084 367.411C227.413 367.411 248.701 362.967 268.126 354.928C280.091 349.976 291.347 343.658 301.699 336.166ZM467.229 460.716C473.507 454.439 473.507 444.26 467.229 437.982L360.595 331.348C356.601 336.153 352.378 340.794 347.919 345.253C341.671 351.502 335.068 357.286 328.147 362.615L435.371 469.839C438.511 472.977 442.624 474.547 446.739 474.547C450.853 474.547 454.967 472.978 458.106 469.839L467.229 460.716ZM223.582 183.91H281.071C291.292 183.91 299.574 192.194 299.575 202.414C299.575 206.778 298.062 210.786 295.533 213.951C292.143 218.195 286.926 220.916 281.072 220.916H228.303H223.583V225.63V278.406C223.583 287.081 217.613 294.358 209.559 296.361C208.124 296.717 206.625 296.909 205.08 296.909C194.861 296.909 186.577 288.625 186.577 278.406V220.917H129.087C118.868 220.917 110.584 212.633 110.584 202.414C110.584 192.195 118.868 183.911 129.087 183.911H186.576V126.421C186.576 116.202 194.86 107.918 205.079 107.918C215.298 107.918 223.582 116.202 223.582 126.421V183.91Z"
|
|
39
|
+
/>
|
|
40
|
+
</svg>
|
|
41
|
+
</div>
|
|
42
|
+
`,N=i=>`
|
|
43
|
+
${d("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
|
+
${d("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
|
+
${d("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
46
|
+
<div
|
|
47
|
+
aria-hidden
|
|
48
|
+
id="{{imageID}}"
|
|
49
|
+
media-type="{{media.media_type}}"
|
|
50
|
+
media-poster="{{media.preview_image.src}}"
|
|
51
|
+
media-source-url="{{media.sources.first.url}}"
|
|
52
|
+
media-last-source-url="{{mediaSourceUrl}}"
|
|
53
|
+
external-id="{{media.external_id}}"
|
|
54
|
+
grid-index="{{forloop.index}}"
|
|
55
|
+
data-outline="none"
|
|
56
|
+
class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i} data-[outline=deactive]:after:!gp-border-transparent`)}"
|
|
57
|
+
style="${g(I)}"
|
|
58
|
+
>
|
|
59
|
+
${d("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
|
+
|
|
61
|
+
${d("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
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",g({...S()}))}">
|
|
64
|
+
${d("media != null",P(),T())}
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
+
style="${d("isMedia",g({...e("aspect",c(M))}))} ${g({...k()})}"
|
|
69
|
+
>
|
|
70
|
+
{% case media.media_type %}
|
|
71
|
+
{% when 'external_video' %}
|
|
72
|
+
{% assign mediaSourceVideo = media | external_video_url %}
|
|
73
|
+
${B()}
|
|
74
|
+
{% when 'video' %}
|
|
75
|
+
{% assign mediaSourceVideo = media.sources.last.url %}
|
|
76
|
+
${H()}
|
|
77
|
+
{% when 'model' %}
|
|
78
|
+
${z()}
|
|
79
|
+
{% endcase %}
|
|
80
|
+
</div>
|
|
81
|
+
{% assign isVideo= false %}
|
|
82
|
+
{% assign isMedia= false %}
|
|
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:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}`;return o(`
|
|
85
|
+
<div type="grid-gallery"
|
|
86
|
+
class="${V}"
|
|
87
|
+
style="${g(q)}}"
|
|
88
|
+
>
|
|
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
|
+
${d("media.id == product.featured_media.id ",N(L?.borderActive?.border!=="none"?"active":""),N())}`)}
|
|
91
|
+
${d("product.media.size > 0",b)}
|
|
92
|
+
${d("product.media.size < 1",N())}
|
|
93
|
+
</div>`)};export{ProductGalleryGrid as default};
|
package/dist/esm/product/components/product-images-v3/components/lightbox/ButtonOpenLightBox.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsx as C}from"react/jsx-runtime";let ButtonOpenLightBox=()=>C("div",{className:"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-all gp-duration-100 group-hover:gp-opacity-100",children:C("svg",{height:"100%",width:"100%",xmlns:"http://www.w3.org/2000/svg",className:"gp-h-6 gp-w-6",viewBox:"0 0 512 512",color:"#fff",children:C("path",{fill:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M62.2467 345.253C43.7072 326.714 29.1474 305.116 18.9714 281.057C8.42839 256.13 3.08301 229.671 3.08301 202.418C3.08301 175.165 8.43012 148.707 18.974 123.78C29.15 99.7213 43.7098 78.123 62.2485 59.5834C80.788 41.0439 102.386 26.4841 126.445 16.3081C151.372 5.76422 177.831 0.417969 205.084 0.417969C232.337 0.417969 258.794 5.76421 283.722 16.3064C307.78 26.4823 329.379 41.0422 347.918 59.5817C366.458 78.1212 381.017 99.7196 391.194 123.778C401.737 148.706 407.083 175.163 407.083 202.417C407.083 229.671 401.737 256.129 391.194 281.056C388.406 287.648 385.277 294.048 381.839 300.257L493.397 411.815C514.091 432.511 514.091 466.187 493.395 486.883L484.272 496.006C474.245 506.032 460.915 511.553 446.738 511.553C432.559 511.553 419.228 506.032 409.202 496.006L296.022 382.824C291.996 384.854 287.898 386.762 283.721 388.528C258.794 399.073 232.336 404.419 205.082 404.419C177.828 404.419 151.371 399.071 126.443 388.528C102.385 378.352 80.7863 363.793 62.2467 345.253ZM301.699 336.166C313.928 327.317 324.896 316.835 334.282 305.034C342.149 295.142 348.9 284.325 354.355 272.775C364.433 251.432 370.076 227.586 370.076 202.419C370.076 111.296 296.206 37.4253 205.083 37.4253C113.96 37.4253 40.0895 111.294 40.0895 202.418C40.0895 293.541 113.96 367.411 205.084 367.411C227.413 367.411 248.701 362.967 268.126 354.928C280.091 349.976 291.347 343.658 301.699 336.166ZM467.229 460.716C473.507 454.439 473.507 444.26 467.229 437.982L360.595 331.348C356.601 336.153 352.378 340.794 347.919 345.253C341.671 351.502 335.068 357.286 328.147 362.615L435.371 469.839C438.511 472.977 442.624 474.547 446.739 474.547C450.853 474.547 454.967 472.978 458.106 469.839L467.229 460.716ZM223.582 183.91H281.071C291.292 183.91 299.574 192.194 299.575 202.414C299.575 206.778 298.062 210.786 295.533 213.951C292.143 218.195 286.926 220.916 281.072 220.916H228.303H223.583V225.63V278.406C223.583 287.081 217.613 294.358 209.559 296.361C208.124 296.717 206.625 296.909 205.08 296.909C194.861 296.909 186.577 288.625 186.577 278.406V220.917H129.087C118.868 220.917 110.584 212.633 110.584 202.414C110.584 192.195 118.868 183.911 129.087 183.911H186.576V126.421C186.576 116.202 194.86 107.918 205.079 107.918C215.298 107.918 223.582 116.202 223.582 126.421V183.91Z"})})});export{ButtonOpenLightBox as default};
|
package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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 d from"../../../../../carousel-v3/components/root/Carousel.js";import n from"../../../../../carousel-v3/components/item/CarouselItem.js";import r from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import p from"../../../../../modal/components/Modal.js";import{useMemo as m}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=m(()=>{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(),v=e=>"edit"!==C&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(p,{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(d,{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},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(n,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:v(i)?e(c,{type:i?.contentType,url:i.src??"",aspectRatio:f}):t(o,{children:[e(r,{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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getGalleryCarouselSettingAttr as t,getFeaturedCarouselSettingAttr as r}from"../common/attrs.js";let getProductImagesAttr=e=>{let o=t(e),m=r(e);return{galleryCarouselSettingAttrs:o,featuredImageCarouselSettingAttrs:m}};export{getProductImagesAttr};
|
package/dist/esm/product/components/product-images-v3/composables/getProductImagesClassName.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createClass as s}from"@gem-sdk/system";import{getWrapperClasses as e,getGalleryWrapperClasses as a,getGalleryGridWrapperClasses as r,getFtImageWithGalleryClasses as t,getImageGalleryWrapperClasses as l,getFeaturedImageCarouselClasses as g,getFeaturedImageGalleryClasses as m,getFeaturedImageClasses as o,getGalleryItemClasses as p,getFeaturedCarouselItemClasses as i}from"../common/classes.js";import{checkAddOverFlowClass as d,setDefaultWhenUndefineSetting as u}from"../common/common.js";let getProductImagesClassName=c=>{let{setting:C,style:x}=c,f=u(c),{builderProps:n,advanced:$}=f,y=$?.cssClass,j=s(e({extraClass:`${n?.uid} ${y??""} `,isAddOverFlowClass:d(x)})),v=s(a({})),w=s(r({})),I=e=>s(p({extraClass:`${e??""}`})),N=s(t({extraClass:`gp-product-images-feature--${n?.uid}`})),P=s(l({extraClass:`gp-product-images-gallery-${n?.uid}`})),h=s(g({extraClass:`gp-product-images-gallery-${n?.uid}`})),k=s(m({settings:C})),A=s(o({setting:C,extraClass:`gp-flex gp-relative gp-product-images-gallery-${n?.uid} gp-overflow-hidden gp-flex gp-w-full gp-items-center gp-justify-center `})),F=e=>s(i({extraClass:`${e??""}`}));return{wrapperClasses:j,productImagesGalleryClasses:v,galleryGridWrapperClasses:w,galleryItemClasses:I,ftImageGalleryClasses:N,imageGalleryWrapperClasses:P,featuredImageCarouselClasses:h,featuredImageGalleryClasses:k,featureImageOnlyOneImageClasses:A,featuredCarouselItemClasses:F}};export{getProductImagesClassName};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createStyle as e}from"@gem-sdk/system";import{getWrapContainerStyle as t,getFeatureImageStyle as l,getFeaturedImageOnlyOneImageStyle as r,getGalleryImageStyle as s,getFeaturedImageCarouselStyle as a,getFeatureImageCarouselItemStyle as g,getGalleryGridStyle as m,getGalleryGridItemStyle as o,getGalleryCarouselStyle as i,getGalleryCarouselItemStyle as n}from"../common/styles.js";let getProductImagesStyles=(d,p)=>{let y=e(t(d)),u=e(t(d,!0)),h=e(t(d,p?.gallery&&p?.gallery?.length<2)),b=e(l(d,{enableOrder:!0,enableDisplay:!0})),c=e(r({setting:d,options:{enableRadius:!0,enableHeight:!0}})),I=e(s(d,p?.featureImageHeight)),f=e(a(d)),x=e({...g(d)}),H=e({...g(d),width:"{{productImageWidth}}px"}),P=e(m(d)),S=e(o(d)),j=e(i(d)),k=e(n(d));return{wrapContainerStyle:y,wrapContainerStyleOnlyOneImage:u,wrapperFeaturedImageStyle:h,featureImageStyle:b,featureImageOnlyOneImageStyle:c,galleryImageStyle:I,featuredImageCarouselStyle:f,featureImageCarouselItemStyle:x,featureImageCarouselOnlyOneImageStyle:H,galleryGridStyles:P,galleryGridItemStyles:S,galleryCarouselStyle:j,galleryCarouselItemStyle:k}};export{getProductImagesStyles};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCurrentDevice as e,getResponsiveValueByScreen as r}from"@gem-sdk/core";import{useRef as t,useState as i,useEffect as o}from"react";import{getTypeWidthDevice as n}from"../common/common.js";let useFeatureImageWithGallery=l=>{let{setting:u,styles:s}=l,m={...u,...s},c=e(),f=t(null),a=t(null),[g,d]=i(""),[h,p]=i(100),[y,b]=i(),v=r(m?.position,c),F="slider"===n(m?.type)[c]||["left","right","inside-left","inside-right"].includes(v),G=(e,r=200)=>{e&&(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>p(a?.current?.offsetHeight||200),r))};return o(()=>{let e=a?.current;if(!e)return;let r=new ResizeObserver(()=>{p(e.offsetHeight||200)});return r.observe(e),()=>{r.disconnect()}}),{isShowCarousel:F,featureImageHeight:h,featureWrapperImage:a,onClickFeatureArrow:g,activeIndexFromFeatureImage:y,setOnClickFeatureArrow:d,onHandleLoadedFeatureImage:G,setActiveIndexFromFeatureImage:b}};export{useFeatureImageWithGallery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCurrentVariant as e}from"@gem-sdk/core";import{useCallback as t,useMemo as r}from"react";let useFilterImagesByVariant=({productImages:l,displayByVariant:a,variantSelect:n})=>{let i=e(),s=t(()=>{let e=i?.selectedOptions??[],t=e.find(e=>e.name===n);return t?.value?.toLowerCase()??""},[i?.selectedOptions,n]),o=r(()=>{if(!a||!n||!l)return l;let e=s();if(!e)return l;let t=l.filter(t=>{let r=(t.alt||"").toLowerCase();return r.includes(e)});return t.length>0?t:l},[a,n,l,s]);return{filteredProductImages:o,selectedVariantValue:s()}};export{useFilterImagesByVariant};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCurrentDevice as e,useFeaturedImageGlobal as r,useEditorMode as t,getResponsiveValueByScreen as o}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 u,checkDisplayGalleryByWidth as d}from"../common/productGallery.js";let useGalleryCarousel=c=>{let{builderPropUID:h,productImages:F,onHandleClick:y,activeIndexFormFeatureImage:B,onClickFeatureArrow:f,builderPropsClass:I,arrow:g,priorityFeatureImage:C,...q}=c,T=e(),b=r(),[v,O]=i(f||""),x=t(),[j,k]=i(0),G=a(),[P,S]=i(j),[V,A]=i(!1),{filteredProductImages:L}=p({productImages:F,displayByVariant:q?.displayByVariant,variantSelect:q?.variantSelect});s(()=>{O(f||"")},[f]),s(()=>{G.current&&clearTimeout(G.current),v&&(G.current=setTimeout(()=>{k(B||0),O("")}))},[B]),s(()=>{if(C){let e=L?.findIndex(e=>e.id===C.id)||0;k(e),O("")}},[C,L]),s(()=>{let e=L?.findIndex(e=>e.id===b?.id);k(e||0),O("")},[b,L]);let w=l(()=>u({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]),z=n(()=>{m({builderPropUID:h,shapeByLayout:w,qualityType:q.qualityType,qualityPercent:q.qualityPercent})},[w,q.qualityPercent,q.qualityType,h]);s(()=>{if("edit"===x)return;let e=document?.querySelector(`.gem-slider-item-${h} .product-list-image`);if(!e)return;z();let r=new ResizeObserver(()=>{z()});return r?.observe(e,{}),()=>{r?.disconnect()}},[z,h,x]);let R=o(q.clickOpenLightBox,T),$=l(()=>{let e=d({shapeByLayout:w});return o(e,T)},[w,T]),D=l(()=>q?.borderActive?.border!=="none",[q?.borderActive?.border]),E=o(q?.clickOpenLightBox,T),H=e=>{y&&y(e||"",R)};return s(()=>{let e;return L&&L.length>0&&V&&(e=setTimeout(()=>{S(j)},80)),()=>{e&&clearTimeout(e)}},[j,L,V]),{moveToIdx:j,isDisplay:$,shapeByLayout:w,isEnableBorderActive:D,isShowButtonLightbox:E,filteredProductImages:L,handleClickCarouselItem:H,setSliderReady:A,safeMoveToIdx:P}};export{useGalleryCarousel};
|
package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js
ADDED
|
@@ -0,0 +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&&e>=0?e:0},[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};
|
|
@@ -0,0 +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,activeIndexFromFeatureImage: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};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{template as o}from"@gem-sdk/core";import t from"../../../carousel/components/item/CarouselItem.liquid.js";import r from"../../../carousel/components/root/Carousel.liquid.js";import{getData as e}from"./common/helpers.js";import{getClass as i}from"./common/classes.js";import{getStyle as s}from"./common/styles.js";import{getStaticLocale as d}from"../../../helpers.js";import u from"./ProductListCarouselItem.liquid.js";let ProductListCarouselLayout=
|
|
2
|
-
${r({advanced:
|
|
1
|
+
import{template as o}from"@gem-sdk/core";import t from"../../../carousel/components/item/CarouselItem.liquid.js";import r from"../../../carousel/components/root/Carousel.liquid.js";import{getData as e}from"./common/helpers.js";import{getClass as i}from"./common/classes.js";import{getStyle as s}from"./common/styles.js";import{getStaticLocale as d}from"../../../helpers.js";import u from"./ProductListCarouselItem.liquid.js";let ProductListCarouselLayout=l=>{let{builderProps:c,advanced:a,productSrc:n,productListId:p}=l,{carouselConfigSetting:m,carouselConfigStyle:f}=e(l),{carouselItemStyle:$}=s(l),{carouselClass:g}=i(l);return o`
|
|
2
|
+
${r({advanced:a,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:g,setting:m,styles:f,children:`
|
|
3
3
|
{%- assign count = 0 -%}
|
|
4
4
|
{%- for product in products limit: limit -%}
|
|
5
5
|
{%- if product.id != empty -%}
|
|
6
6
|
{%- assign count = count | plus: 1 -%}
|
|
7
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
9
|
-
${t({builderProps:{...
|
|
10
|
-
${u({...
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
+
${t({builderProps:{...c},style:$,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,background:m?.background,children:`
|
|
10
|
+
${u({...l})}
|
|
11
11
|
`})}
|
|
12
12
|
{%- endif -%}
|
|
13
13
|
{% endfor %}
|
|
14
14
|
{%- if count == 0 and ${p.length} == 0 -%}
|
|
15
|
-
{% if '${
|
|
15
|
+
{% if '${n}' == 'RelatedProduct' -%}
|
|
16
16
|
<div>${d("ProductList","no_related_products")}</div>
|
|
17
17
|
{% else %}
|
|
18
18
|
<div>${d("ProductList","no_products_found")}</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as n,usePageType as s,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as P,useProductsQuery as f,useCollectionQuery as b,flattenConnection as k,ProductListProvider as T,filterToolbarPreview as I}from"@gem-sdk/core";import v from"../SalePageProductListWarning.js";import y from"next/head";import O from"./ProductListGridLayout.js";import N from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let ProductNotFound=r(()=>import("../ProductNotFound.js"),{loading:d}),ProductList=r=>{let{children:W,styles:j,builderProps:x,setting:G,builderAttrs:M}=r,{isRelatedProduct:B,productSetting:A}=w(r),F=A.relatedTag&&A.relatedTag[0],{isEditMode:Q,isPreviewSharePageMode:z}=c(),D=n(),H=s(),R=u(e=>e.dynamicProduct),$=u(e=>e.dynamicCollection),[_,V]=l(1),[q,U]=l(!0),[J,K]=l(),[X,Y]=l(!1),Z="GP_FUNNEL_PAGE"===H,ee="GP_COLLECTION"==H;ee&&(A.productSrc="DynamicCollection",A.collectionId=$?.collectionId??"latest");let et=A?.productSrc??"Collection",eo=R?.productId&&R?.productId!==A.relatedProductId?R?.productId:A.relatedProductId,er=m(),ed=u(e=>e.publicStoreFrontData),el=i(()=>g(ed)?h(ed):er,[ed]),{data:ei}=p(B&&eo?eo:void 0,{revalidateOnMount:Q||z},el),ea=A.relatedTag&&"tags"===A.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),ec=A.relatedTag&&"collection"===A.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=A.relatedTag&&"vendor"===A.relatedTag[0]&&!ei?.vendor,es=ea||ec||en,eu=P(J,{revalidateOnMount:Q||z},el),em=Q||z,eg=f("PickProduct"===et?A?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:A?.numOfSelectedProducts}),eh=i(()=>({id:A?.collectionId??"latest",numberOfProducts:G?.numberOfProducts??4,orderBy:G?.orderBy}),[A?.collectionId,Number(G?.numberOfProducts),G?.orderBy]),ep=b("PickProduct"!==et?eh:void 0,{revalidateOnMount:em});a(()=>{if(B&&ei&&A.relatedTag&&"recommended-product"!==A.relatedType){let e;switch(Y(!1),A.hasRelatedExclude&&(e=A?.relatedExclude&&A.relatedExclude.split(",").map(e=>e.trim())),A.relatedTag[0]){case"vendor":K({vendor:A.relatedTag&&"vendor"===A.relatedTag[0]?ei?.vendor:"",limit:G?.numberOfProducts,idNEQ:ei.id});break;case"collection":{let t;let o=ei?.collections?.edges.map(e=>e.node?.id);if(!o||o?.length===0){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o},{titleNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o}]}],limit:G?.numberOfProducts});break}case"tags":{let t;if(!ei.tags||0===ei.tags.length){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}],limit:G?.numberOfProducts})}}}},[ei,A.relatedType,A.relatedTag,G?.numberOfProducts,A.relatedExclude,A.hasRelatedExclude,B]);let eP="PickProduct"===et?eg.isValidating:ep.isValidating,ef="PickProduct"===et?eg.isLoading:ep.isLoading,eb="PickProduct"===et?eg.error:ep.error,ek=ep.data?.collections?.edges?.[0]?.node,eT="PickProduct"===et?k(eg.data?.products):k(ek?.products),eI=eu?.data?.products?k(eu?.data?.products):void 0,ev=B&&eI?eI:"PickProduct"===et&&A?.productIds?.length?A?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:"PickProduct"!==et?eT:eT.filter((e,t)=>t<(A?.numOfSelectedProducts??4)),ey=i(()=>X&&B&&Q||!ev.length&&!ef&&q&&Q,[q,ef,X,B,Q,ev.length]),eO=i(()=>!ev||X&&B,[X,B,ev]),eN=i(()=>{if(!G?.sameHeight)return[];let e=0,t=Math.ceil((ev?.length??0)/+(G?.slidesToShow?.[D]??1));return Array.from(Array(ev?.length??0)).map((o,r)=>(r>=+(G?.slidesToShow?.[D]??1)*(e+1)&&++e,{gridRow:`${1+_*e}/${_+1+_*e}`,marginBottom:e+1<t?L(j?.horizontalGutter,D):void 0}))},[G?.sameHeight,G?.slidesToShow,_,ev?.length,D,j?.horizontalGutter]),eS=i(()=>eP||ef||eb||!ev||X&&B,[eb,ef,X,B,eP,ev]);a(()=>{eS||setTimeout(()=>{let{builderData:e}=x??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&V(o.childElementCount||1)},Q?0:500)},[x,eS,Q]);let eC=i(()=>({collection:ek,products:ev,settings:{loop:G?.loop??{desktop:!1},scrollMode:G?.scrollMode??{desktop:"snap"},slidesToShow:G?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:j?.layout,dot:G?.dot,dotStyle:G?.dotStyle,arrow:G?.arrow,controlOverContent:G?.controlOverContent},styles:{horizontalGutter:j?.horizontalGutter,verticalGutter:j?.verticalGutter,fullWidth:j?.fullWidth,spacing:j?.spacing,width:j?.width,height:j?.height}}),[ek,ev,G,j]);if(x?.isPreview&&Z)return e(t,{});if(ey)return e(t,{children:C(q,e(ProductNotFound,{builderAttrs:M,collectionHandle:ek?.handle,productSrc:et,onClose:()=>U(!1),children:W,relatedTagString:F,assignProductNoTags:es,noAssignedProduct:!eo}))});let{productListWrapStyle:eE,productListContentStyle:ew,productListWrapAlignStyle:eL}=S(r),{productListWrapClass:eW}=E(r),ej=()=>e(t,{children:C(j?.layout==="grid",e(O,{...r,productSortedById:ev,generateGridRowArray:eN}),e(N,{...r,productSortedById:ev}))});return o("div",{...M,className:eW,style:eE,children:[!!j?.preloadBgImage&&o(y,{children:[!!j.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage.desktop.image.src,as:"image"}),!!j.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.tablet?.image?.src,as:"image"}),!!j.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||ef?e(d,{}):eb?o("div",{children:["Error: ",eb?.message]}):eO?e("div",{children:"Products not found"}):e(T,{...eC,children:e("div",{className:"gp-flex gp-w-full",style:eL,children:o("div",{style:ew,children:[Z&&e(v,{}),ej()]})})}),I(W,!0)]})};export{ProductList as default};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let ProductList=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>e`
|
|
2
|
+
${s("RelatedProduct"===L,`
|
|
3
|
+
assign relatedTag = '${I}'
|
|
4
|
+
assign assignProduct = product
|
|
5
|
+
assign idAssignProduct = assignProduct.id
|
|
6
|
+
paginate collections.all.products by 10000
|
|
7
|
+
assign allProductsPaginated = collections.all.products
|
|
8
|
+
endpaginate
|
|
9
|
+
assign handleAssignProduct = assignProduct.handle
|
|
10
|
+
case relatedTag
|
|
11
|
+
when 'collection'
|
|
12
|
+
assign hasRelatedExclude = ${P}
|
|
13
|
+
if hasRelatedExclude
|
|
14
|
+
assign relatedExclude = '${h}'
|
|
15
|
+
else
|
|
16
|
+
assign relatedExclude = ''
|
|
17
|
+
endif
|
|
18
|
+
assign arrayRelatedExclude = relatedExclude | split: ","
|
|
19
|
+
assign idSelectedList = ''
|
|
20
|
+
assign relatedListProduct = null
|
|
21
|
+
for collection in collections
|
|
22
|
+
assign collectionId = collection.id
|
|
23
|
+
assign isInCollection = false
|
|
24
|
+
assign collectionsAssignProduct = assignProduct.collections
|
|
25
|
+
for item in collectionsAssignProduct
|
|
26
|
+
unless arrayRelatedExclude contains item.handle
|
|
27
|
+
if item.id == collectionId
|
|
28
|
+
for product in collection.products
|
|
29
|
+
assign product_ids_array = idSelectedList | split: ","
|
|
30
|
+
if product_ids_array contains product.id or product.id == idAssignProduct
|
|
31
|
+
elsif product_ids_array.size > limit
|
|
32
|
+
break
|
|
33
|
+
else
|
|
34
|
+
assign idSelectedList = idSelectedList | append: "," | append: product.id
|
|
35
|
+
assign productSelected = product | sort
|
|
36
|
+
assign relatedListProduct = relatedListProduct | concat: productSelected
|
|
37
|
+
endif
|
|
38
|
+
endfor
|
|
39
|
+
endif
|
|
40
|
+
endunless
|
|
41
|
+
endfor
|
|
42
|
+
endfor
|
|
43
|
+
assign products = relatedListProduct | uniq
|
|
44
|
+
when 'vendor'
|
|
45
|
+
assign vendorAssignProduct = assignProduct.vendor
|
|
46
|
+
assign productFilter = allProductsPaginated | where: 'vendor', vendorAssignProduct
|
|
47
|
+
for item in productFilter
|
|
48
|
+
assign itemHandle = item.handle
|
|
49
|
+
assign productF = item | sort
|
|
50
|
+
if itemHandle != handleAssignProduct
|
|
51
|
+
assign products = products | concat: productF
|
|
52
|
+
endif
|
|
53
|
+
endfor
|
|
54
|
+
when 'production-type'
|
|
55
|
+
assign typeAssignProduct = assignProduct.type
|
|
56
|
+
assign productFilter = allProductsPaginated | where: 'type', typeAssignProduct
|
|
57
|
+
for item in productFilter
|
|
58
|
+
assign itemHandle = item.handle
|
|
59
|
+
assign productF = item | sort
|
|
60
|
+
if itemHandle != handleAssignProduct
|
|
61
|
+
assign products = products | concat: productF
|
|
62
|
+
endif
|
|
63
|
+
endfor
|
|
64
|
+
when 'tags'
|
|
65
|
+
assign tagsAssignProduct = assignProduct.tags
|
|
66
|
+
assign hasRelatedExclude = ${P}
|
|
67
|
+
if hasRelatedExclude
|
|
68
|
+
assign relatedExclude = '${h}'
|
|
69
|
+
else
|
|
70
|
+
assign relatedExclude = ''
|
|
71
|
+
endif
|
|
72
|
+
assign arrayRelatedExclude = relatedExclude | split: ","
|
|
73
|
+
for item in allProductsPaginated
|
|
74
|
+
unless unique_products contains item.handle
|
|
75
|
+
assign isExcludedProduct = false
|
|
76
|
+
for tagExclude in arrayRelatedExclude
|
|
77
|
+
if item.tags contains tagExclude
|
|
78
|
+
assign isExcludedProduct = true
|
|
79
|
+
endif
|
|
80
|
+
endfor
|
|
81
|
+
unless isExcludedProduct
|
|
82
|
+
for tag in tagsAssignProduct
|
|
83
|
+
if item.tags contains tag and assignProduct.handle != item.handle
|
|
84
|
+
assign productF = item | sort
|
|
85
|
+
assign products = products | concat: productF
|
|
86
|
+
break
|
|
87
|
+
endif
|
|
88
|
+
endfor
|
|
89
|
+
endunless
|
|
90
|
+
endunless
|
|
91
|
+
endfor
|
|
92
|
+
assign products = products | uniq
|
|
93
|
+
endcase
|
|
94
|
+
paginate products by ${E||4}
|
|
95
|
+
assign products = products
|
|
96
|
+
endpaginate
|
|
97
|
+
`)}
|
|
98
|
+
`,w=()=>{let s=F?`
|
|
99
|
+
assign target_collection = collections['${F}']
|
|
100
|
+
if target_collection == empty
|
|
101
|
+
for collection in collections
|
|
102
|
+
if collection.id == ${_}
|
|
103
|
+
assign target_collection = collection
|
|
104
|
+
break
|
|
105
|
+
endif
|
|
106
|
+
endfor
|
|
107
|
+
endif
|
|
108
|
+
`:`
|
|
109
|
+
for collection in collections
|
|
110
|
+
if collection.id == ${_}
|
|
111
|
+
assign target_collection = collection
|
|
112
|
+
break
|
|
113
|
+
endif
|
|
114
|
+
endfor
|
|
115
|
+
`;return e`
|
|
116
|
+
{%- liquid
|
|
117
|
+
assign productHandles = '${x.toString()}'| split: ','
|
|
118
|
+
assign products = null
|
|
119
|
+
assign target_collection = null
|
|
120
|
+
assign productSrc = '${L}'
|
|
121
|
+
assign c = 0
|
|
122
|
+
assign limit = ${A??4}
|
|
123
|
+
|
|
124
|
+
if request.page_type == 'collection' or preview_page_type == 'collection'
|
|
125
|
+
assign target_collection = collection
|
|
126
|
+
if target_collection == empty or target_collection == null
|
|
127
|
+
if '${_.toLowerCase()}' == 'latest'
|
|
128
|
+
assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
|
|
129
|
+
else
|
|
130
|
+
${s}
|
|
131
|
+
endif
|
|
132
|
+
endif
|
|
133
|
+
paginate target_collection.products by ${E||4}
|
|
134
|
+
assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
|
|
135
|
+
endpaginate
|
|
136
|
+
else
|
|
137
|
+
if productSrc == 'RelatedProduct'
|
|
138
|
+
${j()}
|
|
139
|
+
elsif productSrc == 'PickProduct'
|
|
140
|
+
unless ${y}
|
|
141
|
+
assign products = null | sort
|
|
142
|
+
for handle in productHandles
|
|
143
|
+
assign productH = all_products[handle] | sort
|
|
144
|
+
assign products = products | concat: productH
|
|
145
|
+
endfor
|
|
146
|
+
assign limit = products.length
|
|
147
|
+
else
|
|
148
|
+
if ${k.length} == 0
|
|
149
|
+
paginate collections.all.products by 100000
|
|
150
|
+
assign products = collections.all.products | sort : "created_at" | reverse
|
|
151
|
+
endpaginate
|
|
152
|
+
endif
|
|
153
|
+
endunless
|
|
154
|
+
else
|
|
155
|
+
if '${_.toLowerCase()}' == 'latest'
|
|
156
|
+
assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
|
|
157
|
+
else
|
|
158
|
+
${s}
|
|
159
|
+
endif
|
|
160
|
+
paginate target_collection.products by ${E||4}
|
|
161
|
+
assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
|
|
162
|
+
endpaginate
|
|
163
|
+
endif
|
|
164
|
+
endif
|
|
165
|
+
-%}
|
|
166
|
+
`},{productListWrapStyle:H,productListContentStyle:q,productListWrapAlignStyle:G}=c(g),{productListWrapClass:B}=l(g),T=()=>e`
|
|
167
|
+
{%- if products == null -%}
|
|
168
|
+
{%- if count == 0 and ${k.length} == 0 -%}
|
|
169
|
+
{% if '${L}' == 'RelatedProduct' -%}
|
|
170
|
+
<div>${o("ProductList","no_related_products")}</div>
|
|
171
|
+
{% else %}
|
|
172
|
+
<div>${o("ProductList","no_products_found")}</div>
|
|
173
|
+
{%- endif -%}
|
|
174
|
+
{%- endif -%}
|
|
175
|
+
{%-else-%}
|
|
176
|
+
${r(v,e`${n({...g,productListId:k,productSrc:L})}`,e`${a({...g,productListId:k,productSrc:L})}`)}
|
|
177
|
+
{%- endif -%}
|
|
178
|
+
`;return e`
|
|
179
|
+
${s(t,`
|
|
180
|
+
<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>
|
|
181
|
+
${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height-v7-5.js' | asset_url }}" defer="defer"></script>`:""}
|
|
182
|
+
`,`
|
|
183
|
+
<script ${d('class="gps-link" delay',"src")}="${i}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
184
|
+
${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="${i}/assets-v2/gp-same-height-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`:""}
|
|
185
|
+
`)}
|
|
186
|
+
|
|
187
|
+
${s(!!f?.preloadBgImage,`${s(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
|
|
188
|
+
<div
|
|
189
|
+
class="${B}"
|
|
190
|
+
style="${H}"
|
|
191
|
+
>
|
|
192
|
+
<div class='gp-flex gp-w-full' style="${G}">
|
|
193
|
+
<div
|
|
194
|
+
style="${q}"
|
|
195
|
+
>
|
|
196
|
+
{%- assign gpBkProduct = product -%}
|
|
197
|
+
{%- assign gpBkProducts = products -%}
|
|
198
|
+
${w()}
|
|
199
|
+
${T()}
|
|
200
|
+
{%- assign product = gpBkProduct -%}
|
|
201
|
+
{%- assign products = gpBkProducts -%}
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
`};export{ProductList as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:o,children:a}=n,{productItemClass:r,gpProductClass:c}=e(n);return t`
|
|
2
|
+
<gp-product
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
|
|
4
|
+
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o)}}'
|
|
5
|
+
class="${c}"
|
|
6
|
+
|
|
7
|
+
>
|
|
8
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
|
+
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
|
+
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
|
+
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
|
+
${a}
|
|
13
|
+
{%- endform -%}
|
|
14
|
+
</gp-product>
|
|
15
|
+
`};export{ProductListItem as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as t,isEmptyChildren as e}from"@gem-sdk/core";import s from"../../../carousel-v3/components/root/Carousel.js";import m from"../../../carousel-v3/components/item/CarouselItem.js";import i from"../../../grid/components/ChildrenDroppable.js";import{getData as l}from"./common/helpers.js";import{getAttr as a}from"./common/attrs.js";import{getStyle as c}from"./common/styles.js";import{getClass as n}from"./common/classes.js";let ProductListCarouselLayout=d=>{let{children:p,builderProps:u,productSortedById:f,advanced:j}=d,h=r(),{carouselConfigSetting:y,carouselConfigStyle:C}=l(d),{productListAttr:b,getAttrProductItemEditor:v}=a(d),{carouselItemStyle:L}=c(d),{carouselClass:g,productItemClass:D}=n(d);return o(s,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...b},rootClass:g,setting:y,styles:C,children:f?.map(r=>o(m,{style:L,children:o(t,{product:r,readOnly:!0,children:o("div",{..."edit"===h?v(r?.baseID):{},className:D,children:e(p)?o(i,{}):p})})},r?.baseID))})};export{ProductListCarouselLayout as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{template as o}from"@gem-sdk/core";import t from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import r from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getData as e}from"./common/helpers.js";import{getClass as i}from"./common/classes.js";import{getStyle as s}from"./common/styles.js";import{getStaticLocale as d}from"../../../helpers.js";import u from"./ProductListCarouselItem.liquid.js";let ProductListCarouselLayout=c=>{let{builderProps:l,advanced:n,productSrc:a,productListId:p}=c,{carouselConfigSetting:m,carouselConfigStyle:f}=e(c),{carouselItemStyle:g}=s(c),{carouselClass:$}=i(c);return o`
|
|
2
|
+
${r({advanced:n,builderProps:{...l},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${l?.uid}`,rootClass:$,setting:m,styles:f,isProductList:!0,children:`
|
|
3
|
+
{%- assign count = 0 -%}
|
|
4
|
+
{%- for product in products limit: limit -%}
|
|
5
|
+
{%- if product.id != empty -%}
|
|
6
|
+
{%- assign count = count | plus: 1 -%}
|
|
7
|
+
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${l?.uid}" | append: product.id -%}
|
|
9
|
+
${t({builderProps:{...l},style:g,parentId:`product-list-carousel-${l?.uid} gp-child-item-${l?.uid}`,parentStyle:f,parentSettings:m,background:m?.background,children:`
|
|
10
|
+
${u({...c})}
|
|
11
|
+
`})}
|
|
12
|
+
{%- endif -%}
|
|
13
|
+
{% endfor %}
|
|
14
|
+
{%- if count == 0 and ${p.length} == 0 -%}
|
|
15
|
+
{% if '${a}' == 'RelatedProduct' -%}
|
|
16
|
+
<div>${d("ProductList","no_related_products")}</div>
|
|
17
|
+
{% else %}
|
|
18
|
+
<div>${d("ProductList","no_products_found")}</div>
|
|
19
|
+
{%- endif -%}
|
|
20
|
+
{%- endif -%}
|
|
21
|
+
`})}
|
|
22
|
+
`};export{ProductListCarouselLayout as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:c,gpProductClass:i}=n(o),d=()=>t`
|
|
2
|
+
${r?.map((n,o)=>{if(n)return t`
|
|
3
|
+
${e({...n,index:o})}
|
|
4
|
+
`}).join("")}
|
|
5
|
+
`;return t`
|
|
6
|
+
<gp-product
|
|
7
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
|
|
8
|
+
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}'
|
|
9
|
+
class="${i}"
|
|
10
|
+
|
|
11
|
+
>
|
|
12
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${c}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
13
|
+
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
14
|
+
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
15
|
+
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
16
|
+
${d()}
|
|
17
|
+
{%- endform -%}
|
|
18
|
+
</gp-product>
|
|
19
|
+
`};export{ProductListItem as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Children as o,isValidElement as t,createElement as e}from"react";import{useEditorMode as m,ProductProvider as i,isEmptyChildren as s}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getStyle as a}from"./common/styles.js";import{getClass as d}from"./common/classes.js";import{getAttr as c}from"./common/attrs.js";let ProductListGridLayout=p=>{let{children:n,productSortedById:u,generateGridRowArray:y,setting:f}=p,h=m(),{gridLayoutStyle:g}=a(p),{gridLayoutClass:j,productItemClass:b}=d(p),{productListAttr:L,getAttrProductItemEditor:k}=c(p);return r("div",{...L,style:g,className:j,children:u?.length?u?.map((m,a)=>r(i,{product:m,readOnly:!0,children:r("div",{..."edit"===h?k(m?.baseID):{},className:b,style:{"--grchild":f?.sameHeight?y?.[a]?.gridRow:void 0,"--mbchild":y?.[a]?.marginBottom},children:s(n)?r(l,{}):o.map(n,r=>t(r)?e(r.type,{...r.props,key:r.key}):null)})},m?.baseID)):null})};export{ProductListGridLayout as default};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{template as t,RenderIf as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as r}from"./common/classes.js";import{getAttr as s}from"./common/attrs.js";import d from"./ProductListGridItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";let ProductListGridLayout=a=>{let{setting:n,builderProps:c,styles:m,productListId:u,productSrc:p}=a,{gridLayoutStyle:l}=o(a),{gridLayoutClass:f}=r(a),{productListAttr:g}=s(a),$=i=>t`
|
|
2
|
+
<gp-same-height
|
|
3
|
+
class="gp-contents"
|
|
4
|
+
style="visibility: hidden"
|
|
5
|
+
gp-data='${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:m?.horizontalGutter})}'>
|
|
6
|
+
${i}
|
|
7
|
+
</gp-same-height>
|
|
8
|
+
`,h=()=>t`
|
|
9
|
+
{%- assign count = 0 -%}
|
|
10
|
+
{%- for product in products limit: limit -%}
|
|
11
|
+
{%- if product.id != empty -%}
|
|
12
|
+
{%- assign count = count | plus: 1 -%}
|
|
13
|
+
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
14
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
15
|
+
${d({...a})}
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
{% endfor %}
|
|
18
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
19
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
20
|
+
<div>${e("ProductList","no_related_products")}</div>
|
|
21
|
+
{% else %}
|
|
22
|
+
<div>${e("ProductList","no_products_found")}</div>
|
|
23
|
+
{%- endif -%}
|
|
24
|
+
{%- endif -%}
|
|
25
|
+
`;return t`
|
|
26
|
+
<div
|
|
27
|
+
${g}
|
|
28
|
+
style="${l}"
|
|
29
|
+
class="${f}"
|
|
30
|
+
>
|
|
31
|
+
${i(n?.sameHeight,$(`${h()}`))}
|
|
32
|
+
${i(!n?.sameHeight,t`${h()}`)}
|
|
33
|
+
</div>
|
|
34
|
+
`};export{ProductListGridLayout as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAttr as t}from"@gem-sdk/system";let getAttr=e=>{let{builderProps:o}=e,a=t({"items-repeat":!0,"data-id":o?.uid??""}),d=e=>t({"data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":e?.replace("gid://shopify/Product/","")??""});return{productListAttr:a,getAttrProductItemEditor:d}};export{getAttr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createClass as e}from"@gem-sdk/system";let getClass=g=>{let{setting:s,className:t,builderProps:i,advanced:p,styles:r}=g,l=e({...t&&{[t]:!0},...p?.cssClass&&{[p.cssClass]:!0},"!gp-m-auto gp-grid gp-w-full":!0,"gp-grid-flow-row":s?.sameHeight}),a=e({"gp-relative gp-flex":!0,[`${i?.builderData?.uid}`]:!0}),d=e({"gp-contents":s?.sameHeight&&r?.layout==="grid"}),o=e({"gp-justify-center":!0,"gp-overflow-hidden":!s?.sameHeight}),m=e({"gp-contents [&>*>div]:gp-contents [&>*]:gp-grid-rows-[subgrid] [&>*]:gp-gap-y-0":s?.sameHeight,[`gp-child-item-${i?.uid}`]:!0});return{gridLayoutClass:l,productItemClass:m,carouselClass:o,productListWrapClass:a,gpProductClass:d}};export{getClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";let getData=e=>{let{setting:d,styles:r}=e,c=d?.productSetting??{},l="RelatedProduct"===c.productSrc,i=o(d?.dot,d?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...d};delete a.childItem;let u={...r,sizeSetting:{...t({adaptiveHeight:r?.adaptiveHeight,height:r?.height,fullWidth:{desktop:!0}})},spacing:r?.spacing};return delete u.backgroundColor,delete u.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:u}},getDataLiquid=t=>{let{setting:o,styles:d}=t,r=o?.productSetting,c=r?.relatedTag,l=r?.hasRelatedExclude,i=(c&&"collection"===c[0]?r?.relatedCollectionExclude:r?.relatedTagsExclude)??"",a=i?.split(",").map(t=>t.trim()).toString(),u=r?.productSrc??"Collection",p=r?.collectionId?.replace(PREFIX_COLLECTION_ID,"")??"latest",n=r?.productSrc==="PickProduct"&&r?.productIds?.length===0,s=d?.layout==="grid",g=e(o?.numberOfProducts,4),I="PickProduct"===u&&r?.productIds?.length?r?.productIds.map(t=>t.replace(PREFIX_PRODUCT_ID,"")):[],m="PickProduct"===u&&r?.productHandles?.length?r?.productHandles:[],P=o?.orderBy&&o?.orderBy!=="none",h=(r?.productSrc==="Collection"||r?.productSrc==="DynamicCollection")&&P?o?.orderBy?.split("_"):"none",C=P&&h?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",D=h?.[h.length-1]==="DESC",E=()=>"PickProduct"===u?n?4:r?.numOfSelectedProducts??4:g;return{hasRelatedExclude:l,relatedExcludeTrim:a,collectionID:p,isLatestProducts:n,isGrid:s,numberOfProducts:g,productListId:I,productListHandles:m,sortedBy:C,isReverse:D,productSrc:u,productSetting:r,isSorted:P,relatedTag:c,productNumber:E(),collectionHandle:r?.collectionHandle}},PREFIX_COLLECTION_ID="gid://shopify/Collection/",PREFIX_PRODUCT_ID="gid://shopify/Product/";export{PREFIX_COLLECTION_ID,PREFIX_PRODUCT_ID,getData,getDataLiquid};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{splitStyle as o,makeGlobalSize as e,makeStyleResponsive as t,getBgByDevice as r,getResponsiveValueByScreen as s,makeStyle as d,getSingleColorVariable as m,getRadiusStyleActiveState as i,getStyleShadow as a,getStyleBackgroundByDevice as l,getGradientBgrStyleByDevice as n}from"@gem-sdk/core";import{createStyle as b}from"@gem-sdk/system";import{createStyleObject as c}from"../../../../grid/components/row/common/helpers.js";import{getInitialWidthForCarouselItem as p}from"../../../../carousel-v3/common/helpers.js";let getStyle=g=>{let{setting:h,styles:w,style:u}=g,{background:S}=h??{},[k,f]=o(["pos","top","left","bottom","right","z","mb","mt","mb","ml","mr","d"],u),T=e(w?.itemPadding),C=b({...k}),v=b({...t("jc",w?.align||{desktop:"center"})}),x=b({...f,...t("w",c(w?.width).content),...r({backgroundColor:w?.backgroundColor,backgroundImage:w?.backgroundImage})}),y=b({...!h?.sameHeight&&t("rg",w?.horizontalGutter),...t("cg",w?.verticalGutter),...t("gtc",{desktop:`repeat(${s(h?.slidesToShow,"desktop")}, minmax(0, 1fr))`,tablet:h?.slidesToShow?.tablet&&`repeat(${s(h?.slidesToShow,"tablet")}, minmax(0, 1fr))`,mobile:h?.slidesToShow?.mobile&&`repeat(${s(h?.slidesToShow,"mobile")}, minmax(0, 1fr))`})}),j=b({...p({spacing:w?.spacing,slidesToShow:h?.slidesToShow})}),$={...T&&T.padding,...d({bs:w?.borderContent?.border,bw:w?.borderContent?.width,bc:m(w?.borderContent?.color)}),...i({...w?.roundedContent,active:{...w?.roundedContent||{},radiusType:"custom"}}),...a({value:w?.carouselShadow,styleAppliedFor:"box-shadow",isEnableShadow:w?.hasActiveShadow}),...l(S),...n(S,{desktop:!0,tablet:!0,mobile:!0})},z=b({...$});return{gridLayoutStyle:y,carouselItemStyle:j,productListWrapStyle:C,productListContentStyle:x,productListWrapAlignStyle:v,productItemStyle:z}};export{getStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import
|
|
1
|
+
export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import c from"./settings/ProductImages.js";import m from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import d from"./settings/ProductDescription.js";import p from"./settings/ProductProperties.js";import u from"./settings/ProductTag.js";import a from"./settings/ProductListV3.js";import P from"./settings/ProductList.js";import g from"./settings/DynamicCheckout.js";import j from"./settings/Vendor.js";import f from"./settings/Sku.js";import l from"./components/product-bundle/setting/ProductBundleDiscount.js";import V from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import k from"./settings/ProductViewMore.js";import x from"./settings/ProductBadge.js";import b from"./components/file-upload/settings/index.js";let productSetting={Product:t,ProductQuantity:o,ProductTitle:r,ProductButton:s,ProductPrice:i,ProductVariants:e,ProductImages:c,ProductImagesV2:n,ProductImagesV3:m,ProductDescription:d,ProductProperties:p,ProductTag:u,ProductListV3:a,ProductList:P,DynamicCheckout:g,ProductVendor:j,ProductSku:f,ProductBundleDiscount:l,ProductBundleDiscountItem:V,ProductViewMore:k,ProductBadge:x,FileUpload:b};export{productSetting};
|
package/dist/esm/product/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let Product=o(()=>import("./components/product-wrap/Product.js"),{loading:t}),ProductTitle=o(()=>import("./components/product-title/ProductTitle.js"),{loading:t}),ProductQuantity=o(()=>import("./components/product-quantity/ProductQuantity.js"),{loading:t}),ProductDescription=o(()=>import("./components/product-description/ProductDescription.js"),{loading:t}),ProductPrice=o(()=>import("./components/product-price/ProductPrice.js"),{loading:t}),ProductButton=o(()=>import("./components/product-button/ProductButton.js"),{loading:t}),ProductVariants=o(()=>import("./components/product-variants/ProductVariants.js"),{loading:t}),ProductImages=o(()=>import("./components/ProductImages.js"),{loading:t}),ProductImagesV2=o(()=>import("./components/product-images-v2/ProductImageV2.js"),{loading:t}),ProductProperties=o(()=>import("./components/product-properties/ProductProperties.js"),{loading:t}),ProductQuickView=o(()=>import("./components/product-quick-view/QuickView.js"),{ssr:!1}),ProductTag=o(()=>import("./components/product-discount-tag/ProductDiscountTag.js"),{loading:t}),ProductList=o(()=>import("./components/product-list/ProductList.js"),{loading:t}),DynamicCheckout=o(()=>import("./components/dynamic-checkout/DynamicCheckout.js"),{loading:t}),ProductVendor=o(()=>import("./components/product-vendor/Vendor.js"),{loading:t}),ProductSku=o(()=>import("./components/product-sku/Sku.js"),{loading:t}),ProductViewMore=o(()=>import("./components/product-view-more/ProductViewMore.js"),{loading:t}),ProductBadge=o(()=>import("./components/product-badge/ProductBadge.js"),{loading:t}),ProductBundleDiscount=o(()=>import("./components/product-bundle/ProductBundleDiscount.js"),{loading:t}),ProductBundleDiscountItem=o(()=>import("./components/product-bundle/ProductBundleDiscountItem.js"),{loading:t}),FileUpload=o(()=>import("./components/file-upload/UploadFile.js"),{loading:t});var product={Product,ProductTitle,ProductQuantity,ProductPrice,ProductButton,ProductDescription,ProductVariants,ProductImages,ProductImagesV2,ProductProperties,ProductQuickView,ProductTag,ProductList,DynamicCheckout,ProductVendor,ProductViewMore,ProductBadge,ProductBundleDiscount,ProductBundleDiscountItem,ProductSku,FileUpload};export{product as default};
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let Product=o(()=>import("./components/product-wrap/Product.js"),{loading:t}),ProductTitle=o(()=>import("./components/product-title/ProductTitle.js"),{loading:t}),ProductQuantity=o(()=>import("./components/product-quantity/ProductQuantity.js"),{loading:t}),ProductDescription=o(()=>import("./components/product-description/ProductDescription.js"),{loading:t}),ProductPrice=o(()=>import("./components/product-price/ProductPrice.js"),{loading:t}),ProductButton=o(()=>import("./components/product-button/ProductButton.js"),{loading:t}),ProductVariants=o(()=>import("./components/product-variants/ProductVariants.js"),{loading:t}),ProductImages=o(()=>import("./components/ProductImages.js"),{loading:t}),ProductImagesV3=o(()=>import("./components/product-images-v3/ProductImageV2.js"),{loading:t}),ProductImagesV2=o(()=>import("./components/product-images-v2/ProductImageV2.js"),{loading:t}),ProductProperties=o(()=>import("./components/product-properties/ProductProperties.js"),{loading:t}),ProductQuickView=o(()=>import("./components/product-quick-view/QuickView.js"),{ssr:!1}),ProductTag=o(()=>import("./components/product-discount-tag/ProductDiscountTag.js"),{loading:t}),ProductListV3=o(()=>import("./components/product-list-v3/ProductList.js"),{loading:t}),ProductList=o(()=>import("./components/product-list/ProductList.js"),{loading:t}),DynamicCheckout=o(()=>import("./components/dynamic-checkout/DynamicCheckout.js"),{loading:t}),ProductVendor=o(()=>import("./components/product-vendor/Vendor.js"),{loading:t}),ProductSku=o(()=>import("./components/product-sku/Sku.js"),{loading:t}),ProductViewMore=o(()=>import("./components/product-view-more/ProductViewMore.js"),{loading:t}),ProductBadge=o(()=>import("./components/product-badge/ProductBadge.js"),{loading:t}),ProductBundleDiscount=o(()=>import("./components/product-bundle/ProductBundleDiscount.js"),{loading:t}),ProductBundleDiscountItem=o(()=>import("./components/product-bundle/ProductBundleDiscountItem.js"),{loading:t}),FileUpload=o(()=>import("./components/file-upload/UploadFile.js"),{loading:t});var product={Product,ProductTitle,ProductQuantity,ProductPrice,ProductButton,ProductDescription,ProductVariants,ProductImages,ProductImagesV3,ProductImagesV2,ProductProperties,ProductQuickView,ProductTag,ProductListV3,ProductList,DynamicCheckout,ProductVendor,ProductViewMore,ProductBadge,ProductBundleDiscount,ProductBundleDiscountItem,ProductSku,FileUpload};export{product as default};
|