@gem-sdk/components 23.1.3 → 24.0.0-staging.2
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/article/components/ArticleImage.js +1 -1
- package/dist/cjs/article/components/ArticleImage.liquid.js +6 -6
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/index.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/collection/index.js +1 -1
- package/dist/cjs/common/components/Loading.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/common/helpers.js +1 -0
- package/dist/cjs/common/hooks/useElementWidth.js +1 -0
- package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -1
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/header/index.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/image/common/adaptiveSources.js +1 -0
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/common/classes.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/common/liquidSrcset.js +1 -0
- package/dist/cjs/image/common/listContext.js +1 -0
- package/dist/cjs/image/common/listImageContext.js +1 -0
- package/dist/cjs/image/common/sizes.js +1 -0
- package/dist/cjs/image/common/srcset.js +1 -0
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +4 -5
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image/index.js +1 -1
- package/dist/cjs/image/settings/configs/settings.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/common/attrs.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
- package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/cjs/image-comparison/index.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
- package/dist/cjs/product/components/product-bundle/common/classes.js +1 -1
- package/dist/cjs/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +42 -42
- 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 +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +39 -39
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +38 -38
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +9 -7
- package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/cjs/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/product/helpers/product-bundle.js +1 -1
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.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/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +7 -7
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/index.js +1 -1
- package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/collection/index.js +1 -1
- package/dist/esm/common/components/Loading.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/common/helpers.js +1 -0
- package/dist/esm/common/hooks/useElementWidth.js +1 -0
- package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -1
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/header/index.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/image/common/adaptiveSources.js +1 -0
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/common/classes.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/common/liquidSrcset.js +1 -0
- package/dist/esm/image/common/listContext.js +1 -0
- package/dist/esm/image/common/listImageContext.js +1 -0
- package/dist/esm/image/common/sizes.js +1 -0
- package/dist/esm/image/common/srcset.js +1 -0
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/image/components/Image.liquid.js +3 -3
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +5 -6
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image/index.js +1 -1
- package/dist/esm/image/settings/configs/settings.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/common/attrs.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/image-comparison/index.js +1 -1
- package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
- package/dist/esm/product/components/product-bundle/common/classes.js +1 -1
- package/dist/esm/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- 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 +13 -13
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-list/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/esm/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +12 -10
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/product/helpers/product-bundle.js +1 -1
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.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/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +24 -7
- package/package.json +11 -8
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../common/productFeaturedImage.js"),i=require("../../common/common.js"),a=require("../../common/classes.js"),t=require("@gem-sdk/core"),r=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),d=require("../../composables/getProductImagesClassName.js"),s=require("../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js"),u=require("../../composables/getProductImagesStyles.js"),o=require("@gem-sdk/system"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../common/productFeaturedImage.js"),i=require("../../common/common.js"),a=require("../../common/classes.js"),t=require("@gem-sdk/core"),r=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),d=require("../../composables/getProductImagesClassName.js"),s=require("../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js"),u=require("../../composables/getProductImagesStyles.js"),o=require("../../../../../image/common/liquidSrcset.js"),l=require("@gem-sdk/system"),g=require("../../composables/getProductImagesAttr.js"),m=require("../../../../../video/components/HTML5Embed.liquid.js"),c=require("../../../../../image/components/NextImage.liquid.js"),p=require("../../../../../image/components/Modal3d.liquid.js"),n=require("../../../../../image/components/Video.liquid.js"),f=require("../../../../helpers/function.js");exports.default=({builderPropUID:y,children:h,pageContext:q,...I})=>{let{featuredImageCarouselClasses:_,galleryItemClasses:M,featuredCarouselItemClasses:b}=d.getProductImagesClassName({...I,builderProps:{uid:y}}),{featuredImageCarouselStyle:v,featureImageStyle:$,featureImageCarouselOnlyOneImageStyle:w,featureImageOnlyOneImageStyle:L,featureImageCarouselItemStyle:S}=u.getProductImagesStyles(I),{featuredImageCarouselSettingAttrs:j}=g.getProductImagesAttr(I),x=i.getAspectRatio(I.ftShape),P=l.If("other"==I.hoverEffect,l.LiquidIf("product.media.size > 1","group-hover:gp-opacity-0")),R=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
|
-
${
|
|
4
|
+
${z()}
|
|
5
5
|
{% when 'external_video' %}
|
|
6
6
|
{% assign mediaSourceVideo = featureMedia | external_video_url %}
|
|
7
|
-
${
|
|
7
|
+
${T()}
|
|
8
8
|
{% when 'video' %}
|
|
9
9
|
{% assign mediaSourceVideo = featureMedia.sources.last.url %}
|
|
10
|
-
${
|
|
10
|
+
${C()}
|
|
11
11
|
{% when 'model' %}
|
|
12
12
|
${O()}
|
|
13
13
|
{% else %}
|
|
14
|
-
${
|
|
14
|
+
${k()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,O=()=>p.default({src:
|
|
17
|
-
${E(t.cls("gp-w-full gp-transition-opacity",
|
|
18
|
-
${
|
|
16
|
+
`,O=()=>p.default({src:l.LiquidIf("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:x}),T=()=>n.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:x}),C=()=>{let i=l.createStyle({...e.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape}),...t.makeStyleResponsive("objf",I?.ftLayout)}),a=l.createStyle({...e.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape})});return m.default({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,wrapperStyles:a,poster:{altText:"{{featureMedia.alt | escape}}"},style:{width:"100%","max-height":"100%",...i},className:"gp-invisible"})},z=()=>t.template`
|
|
17
|
+
${E(t.cls("gp-w-full gp-transition-opacity",P,"{{shouldHidden}}"))}
|
|
18
|
+
${l.If(I?.hoverEffect!=="none",`<div class="${t.cls("zoom-element !gp-max-w-none",e.getZoomImageClass())}">
|
|
19
19
|
${E("image-zoom",!0)}
|
|
20
20
|
</div>`," ")}
|
|
21
|
-
${
|
|
22
|
-
`,E=(e,a)
|
|
21
|
+
${l.If(I?.hoverEffect=="zoom"&&I?.zoomType=="glasses",`<div class="${t.cls("zoom-lens-element",e.getZoomLenClass())}" style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`," ")}
|
|
22
|
+
`,E=(e,i)=>{let a=o.getLiquidImageSrcset({liquidSrc:"src",sizeTarget:"ProductFeatureImage",qualityType:I.qualityType,qualityPercent:I.qualityPercent});return t.template`
|
|
23
23
|
{% assign src = featureMedia.src %}
|
|
24
|
-
${
|
|
24
|
+
${l.If(i&&"other"==I.hoverEffect,`{% assign media_length = product.media | size %}
|
|
25
25
|
{% assign other_image_index = ${I.otherImage} | plus: 0 %}
|
|
26
26
|
{% if other_image_index >= media_length %}
|
|
27
27
|
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
28
|
{% endif %}
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
|
-
${
|
|
30
|
+
${l.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
${
|
|
32
|
+
${c.default({srcIsLiquidCode:!0,src:l.LiquidIf("src != null","{{src | image_url}}","https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:l.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:a&&l.LiquidIf("src != null",a),setting:{layout:I?.ftLayout,aspectRatio:x,qualityType:I?.qualityType,qualityPercent:I?.qualityPercent},priority:I?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e??""}`})}`},k=()=>t.template`
|
|
33
|
+
${c.default({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",setting:{layout:I?.ftLayout,aspectRatio:x,qualityType:I?.qualityType,qualityPercent:I?.qualityPercent},priority:I?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none"})}`,A=i.getPaddingBottomByShapeSetting(I.ftShape),N=e.checkRenderFeaturedCarousel(I),F="gp-featured-image-wrapper",W=l.LiquidIf("product.media.size > 0",`{% assign largestRatio = 0 %}
|
|
34
|
+
${l.LiquidFor("featureMedia in product.media",`
|
|
35
|
+
${l.LiquidIf("featureMedia.media_type == 'video' and featureMedia.preview_image",`{% assign height = featureMedia.preview_image.height | times: 1.0 %}
|
|
36
36
|
{% assign width = featureMedia.preview_image.width | times: 1.0 %}`,`{% assign height = featureMedia.height | times: 1.0 %}
|
|
37
37
|
{% assign width = featureMedia.width | times: 1.0 %}`)}
|
|
38
38
|
{% assign ratio = height | divided_by: width %}
|
|
39
|
-
${
|
|
39
|
+
${l.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
40
40
|
`)}
|
|
41
|
-
${
|
|
41
|
+
${l.LiquidFor("featureMedia in product.media",`${l.LiquidIf("featureMedia.media_type == 'image'",`${l.LiquidFor("image in product.images",l.LiquidIf("image.src == featureMedia.src","{% assign imageID = image.id %}{% break %}"))}`,"{% assign imageID = '' %}")}
|
|
42
42
|
|
|
43
|
-
${
|
|
43
|
+
${l.Liquid(`{% assign productImageWidth = 0 %}
|
|
44
44
|
{% case featureMedia.media_type %}
|
|
45
45
|
{% when 'image' %}
|
|
46
46
|
{% assign productImageWidth = featureMedia.width %}
|
|
47
47
|
{% else %}
|
|
48
48
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
49
49
|
{% endcase %}`)}
|
|
50
|
-
${r.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${
|
|
50
|
+
${r.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${M("gp-ft-image-item !gp-min-w-full !gp-max-w-full ")}`,parentId:`ft-${y}-{{section.id}}-{{product.id}}`,style:S,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
51
51
|
<div
|
|
52
|
-
class="gp-w-full gp-relative ${
|
|
53
|
-
style="${
|
|
52
|
+
class="gp-w-full gp-relative ${l.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")} ${l.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'",`{{ '${a.FEATURE_MEDIA_CENTER_CLASSES}' }}`)}"
|
|
53
|
+
style="${f.getStyleOfObject(t.makeStyleResponsive("pb",A))}"
|
|
54
54
|
>
|
|
55
55
|
${R()}
|
|
56
56
|
</div>
|
|
57
57
|
`})}`)}
|
|
58
|
-
`,
|
|
58
|
+
`,c.default({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:I?.preload,setting:{layout:I?.ftLayout,aspectRatio:x,qualityType:I?.qualityType,qualityPercent:I?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none"}));return l.Liquid(`
|
|
59
59
|
{% capture featureImageOnlyOne %}
|
|
60
|
-
${
|
|
60
|
+
${l.Liquid(`
|
|
61
61
|
{% assign featureMedia = variant.featured_media %}
|
|
62
62
|
{% unless featureMedia %}
|
|
63
63
|
{% assign featureMedia = product.featured_media %}
|
|
64
64
|
{% endunless %}
|
|
65
|
-
${
|
|
65
|
+
${l.LiquidIf("product.media.size > 1",(()=>{switch(I?.preDisplay){case"1st-images":return`
|
|
66
66
|
{% assign featureMedia = product.media.first %}
|
|
67
|
-
`;case"1st-3d-mode":return
|
|
67
|
+
`;case"1st-3d-mode":return l.LiquidFor("media in product.media",l.LiquidIf("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return l.LiquidFor("media in product.media",l.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
68
68
|
{% assign featureMedia = variant.featured_media %}
|
|
69
69
|
{% unless featureMedia %}
|
|
70
70
|
{% assign featureMedia = product.featured_media %}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
75
75
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
76
76
|
{% assign ratio = height | divided_by: width %}
|
|
77
|
-
${
|
|
77
|
+
${l.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
78
78
|
{% assign productImageWidth = 0 %}
|
|
79
79
|
{% case featureMedia.media_type %}
|
|
80
80
|
{% when 'image' %}
|
|
@@ -82,26 +82,26 @@
|
|
|
82
82
|
{% else %}
|
|
83
83
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
84
84
|
{% endcase %}
|
|
85
|
-
${
|
|
85
|
+
${l.LiquidIf("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
86
86
|
<div
|
|
87
87
|
class='gp-feature-image-carousel gp-feature-image-only'
|
|
88
|
-
style="${
|
|
88
|
+
style="${f.getStyleOfObject($)}"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
91
91
|
class="gp-relative"
|
|
92
|
-
style="${
|
|
92
|
+
style="${f.getStyleOfObject(L)}"
|
|
93
93
|
>
|
|
94
94
|
${h}
|
|
95
95
|
<div
|
|
96
96
|
type="gp-feature-image-only"
|
|
97
97
|
product-id="{{product.id}}"
|
|
98
98
|
product-media="{{product.media.size}}"
|
|
99
|
-
class="${
|
|
100
|
-
style="${
|
|
99
|
+
class="${b(F)}"
|
|
100
|
+
style="${f.getStyleOfObject(w)}"
|
|
101
101
|
>
|
|
102
102
|
<div
|
|
103
|
-
class="gp-w-full gp-relative ${
|
|
104
|
-
style="${
|
|
103
|
+
class="gp-w-full gp-relative ${l.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
104
|
+
style="${f.getStyleOfObject(t.makeStyleResponsive("pb",A))} ${l.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
105
105
|
>
|
|
106
106
|
${R()}
|
|
107
107
|
</div>
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
</div>
|
|
111
111
|
`)}
|
|
112
112
|
{% endcapture %}
|
|
113
|
-
${
|
|
114
|
-
${
|
|
115
|
-
${s.default({builderProps:{uid:
|
|
113
|
+
${l.LiquidIf("product.media.size > 1",`
|
|
114
|
+
${l.If(N,`
|
|
115
|
+
${s.default({builderProps:{uid:y},rootId:`ft-${y}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:F,rootClass:`${_}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:j,rootStyles:$,styles:v,style:{playSpeed:600},disableMarginAuto:!0,children:W,productBadgeLiquid:h||"",carouselType:"feature_image"})}
|
|
116
116
|
`," ")}
|
|
117
|
-
${
|
|
117
|
+
${l.If(!N,"{{ featureImageOnlyOne }}"," ")}
|
|
118
118
|
`,"{{ featureImageOnlyOne }}")}
|
|
119
119
|
`)};
|
package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../carousel-v3/components/item/CarouselItem.js"),s=require("../../../../../carousel-v3/components/root/Carousel.js"),r=require("../../composables/getProductImagesClassName.js"),a=require("../../composables/getProductImagesStyles.js"),o=require("../../composables/getProductImagesAttr.js"),i=require("../../common/productGallery.js"),l=require("../../hooks/useGalleryCarousel.js"),u=require("../../common/productFeaturedImage.js"),d=require("../../../../../image/components/NextImage.js"),c=require("../lightbox/ButtonOpenLightBox.js"),n=require("../../common/common.js"),m=require("@gem-sdk/core"),g=require("../child/MediaIcon.js"),p=require("@gem-sdk/system");exports.default=y=>{let{builderPropUID:j,productImages:h,onSwiperReady:q,activeIndexFormFeatureImage:I,onClickFeatureArrow:C,builderPropsClass:x,carouselInstanceUID:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../carousel-v3/components/item/CarouselItem.js"),s=require("../../../../../carousel-v3/components/root/Carousel.js"),r=require("../../composables/getProductImagesClassName.js"),a=require("../../composables/getProductImagesStyles.js"),o=require("../../composables/getProductImagesAttr.js"),i=require("../../common/productGallery.js"),l=require("../../hooks/useGalleryCarousel.js"),u=require("../../common/productFeaturedImage.js"),d=require("../../../../../image/components/NextImage.js"),c=require("../lightbox/ButtonOpenLightBox.js"),n=require("../../common/common.js"),m=require("@gem-sdk/core"),g=require("../child/MediaIcon.js"),p=require("@gem-sdk/system");exports.default=y=>{let{builderPropUID:j,productImages:h,onSwiperReady:q,activeIndexFormFeatureImage:I,onClickFeatureArrow:C,builderPropsClass:x,carouselInstanceUID:P,arrow:b,priorityFeatureImage:v,...f}=y,T=m.useCurrentDevice(),{galleryItemClasses:w}=r.getProductImagesClassName(f),{galleryCarouselSettingAttrs:A}=o.getProductImagesAttr(f),{galleryCarouselStyle:k,galleryCarouselItemStyle:G}=a.getProductImagesStyles(f),{moveToIdx:M,isDisplay:N,shapeByLayout:R,isEnableBorderActive:S,isShowButtonLightbox:F,filteredProductImages:H,handleClickCarouselItem:L,safeMoveToIdx:$,setSliderReady:B}=l.useGalleryCarousel(y);return e.jsx(e.Fragment,{children:N&&e.jsx(s.default,{parentClass:x,rootClass:x,setting:A,styles:k,slidesClass:i.getEditorMinHeightClass(T,f.position,f.navigationPosition),builderProps:{uid:`${j}-carousel`},rootId:n.getGalleryCarouselRootId({carouselInstanceUID:P,builderPropUID:j}),moveToIdx:$,isHiddenArrowWhenDisabled:!0,disableMarginAuto:!0,isEnableCheckHasScrollableContent:!0,onLoaded:e=>{e&&B(!0)},onSwiperReady:q,children:H?.map((s,r)=>{let a=u.isFeatureMedia(s.contentType)?s.previewImage:s.src;return e.jsxs(t.default,{contentType:"productImage",className:w(`gp-gallery-image-item gem-slider-item-${j} ${r===M&&S?"gem-slider-item-active":""}`),onClickItem:()=>L(s?.id),style:G,"data-id":s?.id,children:[e.jsx(d.default,{sizeTarget:"GalleryList",listAware:!0,src:a,width:s?.width,height:s?.height,alt:s?.alt,setting:{aspectRatio:n.getAspectRatio(R),layout:f?.layout,qualityPercent:f?.qualityPercent,qualityType:f?.qualityType},style:{width:"100%",height:"100%",cursor:"pointer"},className:"product-list-image"}),e.jsx(g.default,{contentType:s?.contentType||""}),p.If(F,e.jsx(c.default,{}))]},s?.id)})})})};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/productGallery.js"),t=require("../../common/common.js"),o=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${o.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/productGallery.js"),t=require("../../common/common.js"),o=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),r=require("../../composables/getProductImagesClassName.js"),s=require("../../../../../carousel-v3/components/root/Carousel.liquid.js"),a=require("../../composables/getProductImagesStyles.js"),l=require("../../../../../image/common/liquidSrcset.js"),d=require("../../composables/getProductImagesAttr.js"),p=require("../../../../../image/components/NextImage.liquid.js"),g=require("../../../../helpers/function.js"),u=require("@gem-sdk/system");exports.default=({builderPropUID:m,children:n,pageContext:c,...C})=>{let{featuredImageGalleryClasses:y,galleryItemClasses:h}=r.getProductImagesClassName(C),{galleryCarouselSettingAttrs:v}=d.getProductImagesAttr(C),{galleryCarouselStyle:L,galleryCarouselItemStyle:f}=a.getProductImagesStyles(C),q=i.getShapeByLayout({shape:C.shape,shapeForBottom:C.shapeForBottom,shapeFor1Col:C.shapeFor1Col,shapeFor2Col:C.shapeFor2Col,shapeForFtOnly:C.shapeForFtOnly,shapeForInsideBottom:C.shapeForInsideBottom,shapeForInside:C.shapeForInside},C.position),b=l.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:C.qualityType,qualityPercent:C.qualityPercent}),I=(i,t)=>e.template`${p.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:b,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:t,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,w=e=>`
|
|
2
|
+
${u.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${u.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${u.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${o.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${m}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:f,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative gp-h-full"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${
|
|
9
|
+
${I({aspectRatio:t.getAspectRatio(q),layout:C?.layout,qualityPercent:C?.qualityPercent,qualityType:C?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${u.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
12
12
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
14
14
|
<path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
|
|
15
15
|
</svg>
|
|
16
16
|
</div>`)}
|
|
17
|
-
${
|
|
17
|
+
${u.LiquidIf("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
18
18
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
20
20
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>`)}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${g.getStyleOfObject(i.getZoomDisplay(C?.clickOpenLightBox))}"
|
|
26
26
|
>
|
|
27
27
|
<svg
|
|
28
28
|
height="100%"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
`})}`,
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,F=u.LiquidIf("product.media.size > 1",u.LiquidFor("media in product.media",`${u.LiquidIf("media.media_type == 'image'",u.LiquidFor("image in product.images",u.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${u.LiquidIf("media.id == product.featured_media.id ",w(C?.borderActive?.border!=="none"?"active":""),w())}`));return e.template`
|
|
45
|
+
${s.default({builderProps:{uid:m},rootId:`${m}-{{product.id}}`,rootClass:`${y}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=i.getCarouselVerticalConfigByPosition(C.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:i.getMinHeightByPosition(C.position,C.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:v,rootStyles:{...(()=>{let o=(i,t,o)=>{let r=e.getResponsiveValueByScreen(t,o),s=e.getResponsiveValueByScreen(i,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),l=["left","right","inside-left","inside-right"].includes(r??"");return l||a},r=i.checkDisplayGalleryByWidth({shapeByLayout:q}),s={desktop:r.desktop&&o(C.type,C.position,"desktop"),tablet:r.tablet&&o(C.type,C.position,"tablet"),mobile:r.mobile&&o(C.type,C.position,"mobile")};return t.getDisplayStyle(e=>!s[e],"flex")})()},styles:L,disableMarginAuto:!0,children:F,shouldInitByLayout:t.getGalleryCarouselShouldInitByLayout(C.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/productGallery.js"),t=require("../../common/common.js"),o=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${o.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/productGallery.js"),t=require("../../common/common.js"),o=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),r=require("../../composables/getProductImagesClassName.js"),s=require("../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js"),a=require("../../composables/getProductImagesStyles.js"),l=require("../../../../../image/common/liquidSrcset.js"),d=require("../../composables/getProductImagesAttr.js"),p=require("../../../../../image/components/NextImage.liquid.js"),g=require("../../../../helpers/function.js"),u=require("@gem-sdk/system");exports.default=({builderPropUID:m,children:n,pageContext:c,...C})=>{let{featuredImageGalleryClasses:y,galleryItemClasses:h}=r.getProductImagesClassName(C),{galleryCarouselSettingAttrs:v}=d.getProductImagesAttr(C),{galleryCarouselStyle:L,galleryCarouselItemStyle:f}=a.getProductImagesStyles(C),q=i.getShapeByLayout({shape:C.shape,shapeForBottom:C.shapeForBottom,shapeFor1Col:C.shapeFor1Col,shapeFor2Col:C.shapeFor2Col,shapeForFtOnly:C.shapeForFtOnly,shapeForInsideBottom:C.shapeForInsideBottom,shapeForInside:C.shapeForInside},C.position),b=l.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:C.qualityType,qualityPercent:C.qualityPercent}),I=(i,t)=>e.template`${p.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:b,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:t,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,w=e=>`
|
|
2
|
+
${u.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${u.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${u.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${o.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${m}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:f,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative gp-h-full"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${
|
|
9
|
+
${I({aspectRatio:t.getAspectRatio(q),layout:C?.layout,qualityPercent:C?.qualityPercent,qualityType:C?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${u.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
12
12
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
14
14
|
<path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
|
|
15
15
|
</svg>
|
|
16
16
|
</div>`)}
|
|
17
|
-
${
|
|
17
|
+
${u.LiquidIf("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
18
18
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
20
20
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>`)}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${g.getStyleOfObject(i.getZoomDisplay(C?.clickOpenLightBox))}"
|
|
26
26
|
>
|
|
27
27
|
<svg
|
|
28
28
|
height="100%"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
`})}`,
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,F=u.LiquidIf("product.media.size > 1",u.LiquidFor("media in product.media",`${u.LiquidIf("media.media_type == 'image'",u.LiquidFor("image in product.images",u.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${u.LiquidIf("media.id == product.featured_media.id ",w(C?.borderActive?.border!=="none"?"active":""),w())}`));return e.template`
|
|
45
|
+
${s.default({builderProps:{uid:m},rootId:`${m}-{{product.id}}`,rootClass:`${y}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=i.getCarouselVerticalConfigByPosition(C.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:i.getMinHeightByPosition(C.position,C.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:v,rootStyles:{...(()=>{let o=(i,t,o)=>{let r=e.getResponsiveValueByScreen(t,o),s=e.getResponsiveValueByScreen(i,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),l=["left","right","inside-left","inside-right"].includes(r??"");return l||a},r=i.checkDisplayGalleryByWidth({shapeByLayout:q}),s={desktop:r.desktop&&o(C.type,C.position,"desktop"),tablet:r.tablet&&o(C.type,C.position,"tablet"),mobile:r.mobile&&o(C.type,C.position,"mobile")};return t.getDisplayStyle(e=>!s[e],"flex")})()},styles:L,disableMarginAuto:!0,children:F,shouldInitByLayout:t.getGalleryCarouselShouldInitByLayout(C.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};
|
package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../composables/getProductImagesClassName.js"),
|
|
2
|
-
${
|
|
3
|
-
${m.If(
|
|
4
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../composables/getProductImagesClassName.js"),t=require("../../common/productFeaturedImage.js"),a=require("../../composables/getProductImagesStyles.js"),s=require("../../../../../image/common/liquidSrcset.js"),d=require("../../common/productGallery.js"),o=require("../../../../../video/components/HTML5Embed.liquid.js"),r=require("../../../../../image/components/NextImage.liquid.js"),l=require("../../../../../image/components/Modal3d.liquid.js"),m=require("@gem-sdk/system"),p=require("../../../../../image/components/Video.liquid.js"),u=require("../../../../helpers/function.js"),g=require("../../common/common.js");exports.default=({builderPropUID:c,wrapperStyle:n,children:y,pageContext:h,...f})=>{let{galleryItemClasses:C,galleryGridWrapperClasses:v}=i.getProductImagesClassName(f),{galleryGridStyles:q,galleryGridItemStyles:L}=a.getProductImagesStyles(f),w=d.getShapeByLayout({shape:f.shape,shapeForBottom:f.shapeForBottom,shapeFor1Col:f.shapeFor1Col,shapeFor2Col:f.shapeFor2Col,shapeForFtOnly:f.shapeForFtOnly,shapeForInsideBottom:f.shapeForInsideBottom,shapeForInside:f.shapeForInside},f.position),_=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(a=>{let s=e.getResponsiveValueByScreen(f?.position,a)||"",d="one-col"===s||"two-col"===s;t[a]=(i?!d:d)?"block":"none"}),e.makeStyleResponsive("d",t)},b=()=>_(),I=()=>_(!0),$=s.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"ProductFeatureImage",qualityType:f.qualityType,qualityPercent:f.qualityPercent}),x=(i,a)=>e.template`
|
|
2
|
+
${r.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:$,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:a,className:"!gp-rounded-none"})}
|
|
3
|
+
${m.If(f?.galleryHoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",t.getZoomImageClass())}">
|
|
4
|
+
${r.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:$,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:a,className:"!gp-rounded-none gp-w-full gp-h-full"})}
|
|
5
5
|
</div>`," ")}
|
|
6
|
-
${m.If(
|
|
6
|
+
${m.If(f?.galleryHoverEffect=="zoom"&&f?.galleryZoomType=="glasses",`<div class="${e.cls("zoom-lens-element",t.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
|
|
9
|
+
`,S=()=>l.default({src:m.LiquidIf("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:g.getAspectRatio(w)}),F=()=>p.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),j=()=>o.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),V=()=>e.template`
|
|
10
10
|
${m.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
20
20
|
</svg>
|
|
21
21
|
</div>`)}
|
|
22
|
-
${
|
|
22
|
+
${x({aspectRatio:g.getAspectRatio(w),layout:f?.layout,qualityType:f?.qualityType,qualityPercent:f?.qualityPercent},{width:"100%",height:"100%"})}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${u.getStyleOfObject(d.getZoomDisplay(f?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
|
-
`,
|
|
42
|
+
`,k=i=>`
|
|
43
43
|
${m.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
44
|
${m.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
45
|
${m.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
@@ -53,41 +53,41 @@
|
|
|
53
53
|
external-id="{{media.external_id}}"
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
55
|
data-outline="none"
|
|
56
|
-
class="${
|
|
57
|
-
style="${
|
|
56
|
+
class="${C(`gem-slider-item-${c}-{{product.id}} gp-gallery-image-item ${i??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
|
|
57
|
+
style="${u.getStyleOfObject(L)}"
|
|
58
58
|
>
|
|
59
59
|
${m.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
61
|
${m.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-w-full" style="${m.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${m.LiquidIf("isVideo == true",
|
|
64
|
-
${m.LiquidIf("media != null",
|
|
63
|
+
<div class="gp-w-full" style="${m.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${m.LiquidIf("isVideo == true",u.getStyleOfObject({...I()}))}">
|
|
64
|
+
${m.LiquidIf("media != null",V(),M())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="${m.LiquidIf("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${m.LiquidIf("isMedia",
|
|
68
|
+
style="${m.LiquidIf("isMedia",u.getStyleOfObject({...e.makeStyleResponsive("aspect",g.getAspectRatio(w))}))} ${u.getStyleOfObject({...b()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
72
72
|
{% assign mediaSourceVideo = media | external_video_url %}
|
|
73
|
-
${
|
|
73
|
+
${F()}
|
|
74
74
|
{% when 'video' %}
|
|
75
75
|
{% assign mediaSourceVideo = media.sources.last.url %}
|
|
76
|
-
${
|
|
76
|
+
${j()}
|
|
77
77
|
{% when 'model' %}
|
|
78
|
-
${
|
|
78
|
+
${S()}
|
|
79
79
|
{% endcase %}
|
|
80
80
|
</div>
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
|
-
</div>`,
|
|
84
|
-
${
|
|
83
|
+
</div>`,M=()=>e.template`
|
|
84
|
+
${r.default({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",setting:{aspectRatio:g.getAspectRatio(w),layout:f?.layout,qualityType:f?.qualityType,qualityPercent:f?.qualityPercent},className:"!gp-rounded-none"})}`;return m.Liquid(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${v}"
|
|
87
|
-
style="${
|
|
87
|
+
style="${u.getStyleOfObject(q)}}"
|
|
88
88
|
>
|
|
89
89
|
${m.LiquidFor("media in product.media",`${m.LiquidIf("media.media_type == 'image'",m.LiquidFor("image in product.images",m.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
|
-
${m.LiquidIf("media.id == product.featured_media.id ",
|
|
91
|
-
${m.LiquidIf("product.media.size > 0",
|
|
92
|
-
${m.LiquidIf("product.media.size < 1",
|
|
90
|
+
${m.LiquidIf("media.id == product.featured_media.id ",k(f?.borderActive?.border!=="none"?"active":""),k())}`)}
|
|
91
|
+
${m.LiquidIf("product.media.size > 0",y)}
|
|
92
|
+
${m.LiquidIf("product.media.size < 1",k())}
|
|
93
93
|
</div>`)};
|
package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../carousel-v3/components/item/CarouselItem.js"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("@gem-sdk/core"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../carousel-v3/components/item/CarouselItem.js"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("@gem-sdk/core"),s=require("../../common/productFeaturedImage.js"),l=require("../../../../../image/components/NextImage.js"),d=require("../child/ProductFeatureVideo.js");require("../../../../../modal/components/confirm.js");var r=require("../../../../../modal/components/Modal.js"),n=require("../child/MediaIcon.js"),a=require("react");const p={desktop:"finest"};exports.default=({builderPropUID:u,productImages:c,open:m,imageRatio:g,onHandleClose:h})=>{let b=i.useFeaturedImageGlobal(),j=a.useMemo(()=>{let e=c?.findIndex(e=>e.id===b?.id);return e&&e>0?e:0},[c,b]),f={desktop:c&&c.length>1,mobile:c&&c?.length>1,tablet:c&&c?.length>1},y=i.useEditorMode(),k=e=>"edit"!==y&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e.jsx(r.default,{setting:{open:m},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{h(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:j,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:f,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:j},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:j,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:c?.map(o=>e.jsx(t.default,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:k(o)?e.jsx(d.default,{type:o?.contentType,url:o.src??"",thumbnail:o?.previewImage,aspectRatio:g}):e.jsxs(e.Fragment,{children:[e.jsx(l.default,{src:s.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:g,qualityType:p},className:i.cls("gp-h-full gp-w-full gp-object-contain")},o?.id),e.jsx(n.default,{contentType:o?.contentType??""})]})},o?.id))})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../common/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../common/helpers.js"),r=require("../../../common/const.js"),o=require("@gem-sdk/core"),d=require("react"),a=require("../../../common/components/Loading.js"),l=require("next/dynamic"),s=require("./common/helpers.js"),i=require("../SalePageProductListWarning.js"),n=require("../../../dialog/common/helpers.js"),c=require("./ProductListCarouselLayout.js"),u=require("./ProductListGridLayout.js"),g=require("./common/classes.js"),m=require("./common/styles.js"),P=require("@gem-sdk/system"),h=require("next/head");const T=l(()=>Promise.resolve().then(function(){return require("../ProductNotFound.js")}),{loading:a.default});exports.default=l=>{let{children:C,styles:O,builderProps:S,setting:f,builderAttrs:p}=l,{isRelatedProduct:I,productSetting:y}=s.getData(l),R=y.relatedTag&&y.relatedTag[0],{isEditMode:_,isPreviewSharePageMode:b}=o.useRenderMode(),U=o.useCurrentDevice(),v=o.usePageType(),D=o.usePageStore(e=>e.dynamicProduct),j=o.usePageStore(e=>e.dynamicCollection),[E,L]=d.useState(1),[x,k]=d.useState(!0),[q,M]=d.useState(),[N,w]=d.useState(!1),[Q,W]=d.useState(),F="GP_FUNNEL_PAGE"===v;"GP_COLLECTION"!=v||[r.PRODUCT_LIST_PRODUCT_SOURCE.Collection,r.PRODUCT_LIST_PRODUCT_SOURCE.DynamicCollection].includes(y?.productSrc)||(y.productSrc=r.PRODUCT_LIST_PRODUCT_SOURCE.DynamicCollection);let G=y?.productSrc??r.PRODUCT_LIST_PRODUCT_SOURCE.Collection;G===r.PRODUCT_LIST_PRODUCT_SOURCE.DynamicCollection&&(y.collectionId=j?.collectionId||"latest");let A=D?.productId&&D?.productId!==y.relatedProductId?D?.productId:y.relatedProductId,B=o.useFetchHandle(),H=o.usePageStore(e=>e.publicStoreFrontData),z=d.useMemo(()=>o.hasPublicStoreFrontData(H)?o.createStoreFrontFetcher(H):B,[H]),{data:$,error:K,isLoading:V}=o.useProductQuery(I&&A?A:void 0,{revalidateOnMount:_||b},z),J=y.relatedTag&&"tags"===y.relatedTag[0]&&(!$?.tags||$?.tags.length===0),X=y.relatedTag&&"collection"===y.relatedTag[0]&&(!$?.collections?.edges||$?.collections.edges.length===0),Y=y.relatedTag&&"vendor"===y.relatedTag[0]&&!$?.vendor,Z=o.useProductsQueryAll(q,{revalidateOnMount:_||b},z),ee=_||b,et=o.useProductsQuery(G===r.PRODUCT_LIST_PRODUCT_SOURCE.PickProduct?y?.productIds:void 0,{revalidateOnMount:ee},{defaultSelectedProductCount:y?.numOfSelectedProducts,selectedStatus:ee&&y?.productIds?.length?o.PICKED_PRODUCT_STATUSES:void 0}),er=d.useMemo(()=>({id:y?.collectionId??"latest",numberOfProducts:f?.numberOfProducts??4,orderBy:f?.orderBy}),[y?.collectionId,Number(f?.numberOfProducts),f?.orderBy]),eo=o.useCollectionQuery(G!==r.PRODUCT_LIST_PRODUCT_SOURCE.PickProduct?er:void 0,{revalidateOnMount:ee});d.useEffect(()=>{if(I&&$&&y.relatedTag&&"recommended-product"!==y.relatedType){let e;switch(w(!1),y.hasRelatedExclude&&(e=y?.relatedExclude&&y.relatedExclude.split(",").map(e=>e.trim())),y.relatedTag[0]){case"vendor":M({first:f?.numberOfProducts,vendor:y.relatedTag&&"vendor"===y.relatedTag[0]?$?.vendor:"",idNEQ:$.id}),W($.id);break;case"collection":{let t=$?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){w(!0);break}M(e&&e.length>0?{first:f?.numberOfProducts,idNEQ:$.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:f?.numberOfProducts,idNEQ:$.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}),W($.id);break}case"tags":if(!$.tags||0===$.tags.length){w(!0);break}M(e&&e.length>0?{first:f?.numberOfProducts,idNEQ:$.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:$.tags},{nameNotIn:e}]}]}:{first:f?.numberOfProducts,idNEQ:$.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:$.tags}]}]}),W($.id)}}},[$,y.relatedType,y.relatedTag,f?.numberOfProducts,y.relatedExclude,y.hasRelatedExclude,I]);let ed=G===r.PRODUCT_LIST_PRODUCT_SOURCE.PickProduct,ea=ed?et:eo,el=ea.isValidating,es=ea.error,ei=t.isQueryLoading({hasQuery:ee&&(!ed||!!y?.productIds),data:ea.data,error:ea.error,isLoading:ea.isLoading}),en=s.isRelatedProductsLoading({isRelatedProduct:I,relatedType:y.relatedType,hasRelatedTag:s.hasQueryableRelatedTag({relatedTag:y.relatedTag}),relatedProductIdAssigned:A,canRevalidateOnMount:ee,mainProduct:{data:$,error:K,isLoading:V},relatedQuery:q,relatedQuerySource:Q,mainProductId:$?.id,isNotFoundRelatedProduct:N,relatedProducts:{data:Z.data,error:Z.error,isLoading:Z.isLoading}}),ec=ei||en,eu=eo.data?.collections?.edges?.[0]?.node,eg=G===r.PRODUCT_LIST_PRODUCT_SOURCE.PickProduct?o.flattenConnection(et.data?.products):o.flattenConnection(eu?.products),em=Z?.data?.products?o.flattenConnection(Z?.data?.products):void 0,eP=I&&em?em:G===r.PRODUCT_LIST_PRODUCT_SOURCE.PickProduct&&y?.productIds?.length?y?.productIds?.map(e=>eg?.find(t=>t?.baseID===e)).filter(Boolean)??eg:G!==r.PRODUCT_LIST_PRODUCT_SOURCE.PickProduct?eg:eg.filter((e,t)=>t<(y?.numOfSelectedProducts??4)),eh=d.useMemo(()=>N&&I&&_||!eP.length&&!ec&&x&&_,[x,ec,N,I,_,eP.length]),eT=d.useMemo(()=>!eP||N&&I,[N,I,eP]),eC=d.useMemo(()=>{if(!f?.sameHeight)return[];let e=0,t=Math.ceil((eP?.length??0)/+(f?.slidesToShow?.[U]??1));return Array.from(Array(eP?.length??0)).map((r,o)=>(o>=+(f?.slidesToShow?.[U]??1)*(e+1)&&++e,{gridRow:`${1+E*e}/${E+1+E*e}`,marginBottom:e+1<t?n.getPropertyByDevice(O?.horizontalGutter,U):void 0}))},[f?.sameHeight,f?.slidesToShow,E,eP?.length,U,O?.horizontalGutter]),eO=d.useMemo(()=>el||ec||es||!eP||N&&I,[es,ec,N,I,el,eP]);d.useEffect(()=>{eO||setTimeout(()=>{let{builderData:e}=S??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&L(r.childElementCount||1)},_?0:500)},[S,eO,_]);let eS=d.useMemo(()=>({collection:eu,products:eP,settings:{loop:f?.loop??{desktop:!1},scrollMode:f?.scrollMode??{desktop:"snap"},slidesToShow:f?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:O?.layout,dot:f?.dot,dotStyle:f?.dotStyle,arrow:f?.arrow,controlOverContent:f?.controlOverContent,sameHeight:f?.sameHeight},styles:{horizontalGutter:O?.horizontalGutter,verticalGutter:O?.verticalGutter,fullWidth:O?.fullWidth,spacing:O?.spacing,width:O?.width,height:O?.height}}),[eu,eP,f,O]);if(S?.isPreview&&F)return e.jsx(e.Fragment,{});if(eh)return e.jsx(e.Fragment,{children:P.If(x,e.jsx(T,{builderAttrs:p,collectionHandle:eu?.handle,productSrc:G,onClose:()=>k(!1),children:C,relatedTagString:R,assignProductNoTags:J||X||Y,noAssignedProduct:!A}))});let{productListWrapStyle:ef,productListContentStyle:ep,productListWrapAlignStyle:eI}=m.getStyle(l),{productListWrapClass:ey}=g.getClass(l);return e.jsxs("div",{...p,className:ey,style:ef,children:[!!O?.preloadBgImage&&e.jsxs(h,{children:[!!O.backgroundImage?.desktop?.image?.src&&e.jsx("link",{rel:"preload",href:O.backgroundImage.desktop.image.src,as:"image"}),!!O.backgroundImage?.tablet?.image?.src&&e.jsx("link",{rel:"preload",href:O.backgroundImage?.tablet?.image?.src,as:"image"}),!!O.backgroundImage?.mobile?.image?.src&&e.jsx("link",{rel:"preload",href:O.backgroundImage?.mobile?.image?.src,as:"image"})]}),el||ec?e.jsx(a.default,{label:t.getElementLabel({builderData:S?.builderData})}):es?e.jsxs("div",{children:["Error: ",es?.message]}):eT?e.jsx("div",{children:"Products not found"}):e.jsx(o.ProductListProvider,{...eS,children:e.jsx("div",{className:"gp-flex gp-w-full",style:eI,children:e.jsxs("div",{style:ep,children:[F&&e.jsx(i.default,{}),e.jsx(e.Fragment,{children:P.If(O?.layout==="grid",e.jsx(u.default,{...l,productSortedById:eP,generateGridRowArray:eC}),e.jsx(c.default,{...l,productSortedById:eP}))})]})})}),o.filterToolbarPreview(C,!0)]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),t=require("../../../carousel/components/item/CarouselItem.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),t=require("../../../image/common/listImageContext.js"),o=require("./common/imagePriorityHints.js"),i=require("./common/imagePriority.js"),l=require("../../../carousel/components/item/CarouselItem.js"),a=require("../../../carousel/components/root/Carousel.js"),d=require("./common/classes.js"),u=require("./common/helpers.js"),n=require("./common/styles.js"),m=require("./common/attrs.js");exports.default=c=>{let{children:j,builderProps:g,productSortedById:p,advanced:q,setting:x}=c,h=r.useEditorMode(),{carouselConfigSetting:y,carouselConfigStyle:C}=u.getData(c),{productListAttr:P,getAttrProductItemEditor:v}=m.getAttr(c),{carouselItemStyle:I}=n.getStyle(c),{carouselClass:S,productItemClass:b}=d.getClass(c);return e.jsx(a.default,{advanced:q,builderProps:{uid:g?.uid},rootAttrs:{...P},rootClass:S,setting:y,styles:C,children:p?.map((a,d)=>e.jsx(l.default,{style:I,children:e.jsx(r.ProductProvider,{product:a,readOnly:!0,children:e.jsx(t.ListImageContext.Provider,{value:o.getListImageHints({slidesToShow:x?.slidesToShow,rows:i.LIST_PRELOAD_ROWS.CAROUSEL,index:d+1}),children:e.jsx("div",{..."edit"===h?v(a?.baseID):{},className:b,children:r.isEmptyChildren(j)?e.jsx(s.default,{}):j})})})},a?.baseID))})};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../carousel/components/item/CarouselItem.liquid.js"),
|
|
2
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/imagePriority.js"),t=require("../../../carousel/components/item/CarouselItem.liquid.js"),r=require("../../../carousel/components/root/Carousel.liquid.js"),i=require("./ProductListCarouselItem.liquid.js"),o=require("../../../helpers.js"),s=require("./common/classes.js"),d=require("./common/helpers.js"),u=require("./common/styles.js"),l=require("@gem-sdk/core");exports.default=a=>{let{builderProps:c,advanced:n,productSrc:p,productListId:m}=a,{carouselConfigSetting:g,carouselConfigStyle:f}=d.getData(a),{carouselItemStyle:_}=u.getStyle(a),{carouselClass:q}=s.getClass(a),$=e.getListImagePriorityLiquid({slidesToShow:a.setting?.slidesToShow,rows:e.LIST_PRELOAD_ROWS.CAROUSEL});return l.template`
|
|
2
|
+
${r.default({advanced:n,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:q,setting:g,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
|
+
${$.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
9
|
-
${
|
|
10
|
-
${
|
|
9
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
10
|
+
${t.default({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,background:g?.background,children:`
|
|
11
|
+
${i.default({...a})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
${$.reset}
|
|
16
|
+
{%- if count == 0 and ${m.length} == 0 -%}
|
|
17
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
16
18
|
<div>${o.getStaticLocale("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
20
|
<div>${o.getStaticLocale("ProductList","no_products_found")}</div>
|