@gem-sdk/components 3.1.13 → 3.1.16
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/product/components/product-images/ProductFeaturedImage.liquid.js +1 -1
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images/ProductGalleryGrid.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +3 -3
- package/dist/esm/product/components/product-images/ProductFeaturedImage.liquid.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryGrid.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +8 -8
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +8 -8
- package/package.json +2 -2
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
{%- endif -%}`,alt:`{%- if variant.featured_image != null -%}
|
|
44
44
|
{{variant.featured_image.alt}}
|
|
45
45
|
{%- elsif variant.featured_image == null -%}
|
|
46
|
-
{{featureMedia.alt}}
|
|
46
|
+
{{featureMedia.alt | escape}}
|
|
47
47
|
{%- endif -%}`,setting:{layout:e?.ftLayout,aspectRatio:a},priority:!0,className:`gp-w-full featured-image-only ${i}`})}`;return core.template`<div
|
|
48
48
|
class="featured-image-root gp-product-images-ft gp-flex"
|
|
49
49
|
style="${{...productFeaturedImage.getStyleFeatureImageJustify(e.position),...r(),...productFeaturedImage.getStyleFeaturedImageWidth(e)}}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),NextImage_liquid=require("../../../image/components/NextImage.liquid.js"),helpers=require("./common/helpers.js"),productGallery=require("./common/productGallery.js"),_function=require("../../helpers/function.js"),productGallery$1=require("../product-images-v2/common/productGallery.js"),Carousel_liquid=require("../../../carousel/components/root/Carousel.liquid.js"),CarouselItem_liquid=require("../../../carousel/components/item/CarouselItem.liquid.js");const ProductGalleryCarousel=({builderPropUID:e,...i})=>{let t=productGallery.getGalleryImageAspectRatio(i?.customAspectRadio,i?.aspectRatio),o=()=>helpers.getDisplayStyle(e=>!("slider"===core.getResponsiveValueByScreen(i?.type,e)||["left","right"].includes(core.getResponsiveValueByScreen(i?.position,e)||"")),"flex"),r=(e,i)=>core.template`${NextImage_liquid.default({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",setting:e,style:i})}`,l=o=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),NextImage_liquid=require("../../../image/components/NextImage.liquid.js"),helpers=require("./common/helpers.js"),productGallery=require("./common/productGallery.js"),_function=require("../../helpers/function.js"),productGallery$1=require("../product-images-v2/common/productGallery.js"),Carousel_liquid=require("../../../carousel/components/root/Carousel.liquid.js"),CarouselItem_liquid=require("../../../carousel/components/item/CarouselItem.liquid.js");const ProductGalleryCarousel=({builderPropUID:e,...i})=>{let t=productGallery.getGalleryImageAspectRatio(i?.customAspectRadio,i?.aspectRatio),o=()=>helpers.getDisplayStyle(e=>!("slider"===core.getResponsiveValueByScreen(i?.type,e)||["left","right"].includes(core.getResponsiveValueByScreen(i?.position,e)||"")),"flex"),r=(e,i)=>core.template`${NextImage_liquid.default({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,style:i})}`,l=o=>`
|
|
2
2
|
{% if media.media_type == 'video' %}
|
|
3
3
|
{% assign mediaSourceUrl = media.sources.last.url %}
|
|
4
4
|
{% endif %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),productGallery=require("./common/productGallery.js"),_function=require("../../helpers/function.js"),NextImage_liquid=require("../../../image/components/NextImage.liquid.js"),helpers=require("./common/helpers.js");const ProductGalleryCarousel=({builderPropUID:e,...i})=>{let t=productGallery.getGalleryImageAspectRatio(i?.customAspectRadio,i?.aspectRatio),r=()=>helpers.getDisplayStyle(e=>"slider"===core.getResponsiveValueByScreen(i?.type,e)||["left","right"].includes(core.getResponsiveValueByScreen(i?.position,e)||""),"flex"),a=(e,i)=>core.template`${NextImage_liquid.default({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",setting:e,style:i})}`,o=e=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),productGallery=require("./common/productGallery.js"),_function=require("../../helpers/function.js"),NextImage_liquid=require("../../../image/components/NextImage.liquid.js"),helpers=require("./common/helpers.js");const ProductGalleryCarousel=({builderPropUID:e,...i})=>{let t=productGallery.getGalleryImageAspectRatio(i?.customAspectRadio,i?.aspectRatio),r=()=>helpers.getDisplayStyle(e=>"slider"===core.getResponsiveValueByScreen(i?.type,e)||["left","right"].includes(core.getResponsiveValueByScreen(i?.position,e)||""),"flex"),a=(e,i)=>core.template`${NextImage_liquid.default({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,style:i})}`,o=e=>`
|
|
2
2
|
{% if media.media_type == 'video' %}
|
|
3
3
|
{% assign mediaSourceUrl = media.sources.last.url %}
|
|
4
4
|
{% endif %}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{% else %}
|
|
14
14
|
${_()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,f=()=>Modal3d_liquid.default({src:system.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:n}),y=()=>Video_liquid.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:n}),h=()=>HTML5Embed_liquid.default({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible"}),I=()=>core.template`
|
|
16
|
+
`,f=()=>Modal3d_liquid.default({src:system.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:n}),y=()=>Video_liquid.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:n}),h=()=>HTML5Embed_liquid.default({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible"}),I=()=>core.template`
|
|
17
17
|
${q(core.cls("gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==a.hoverEffect},"{{shouldHidden}}"))}
|
|
18
18
|
${system.If(a?.hoverEffect!=="none",`<div class="${core.cls("zoom-element !gp-max-w-none",productFeaturedImage.getZoomImageClass())}">
|
|
19
19
|
${q("image-zoom",!0)}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
30
|
${system.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${NextImage_liquid.default({srcIsLiquidCode:!0,src:system.LiquidIf("src != null",common.getSrcImage("src"),"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}"),id:system.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt}}",srcset:`${common.getSrcImage("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:a?.ftLayout,aspectRatio:n,qualityType:a?.qualityType,qualityPercent:a?.qualityPercent},priority:a?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:i})}`,_=()=>core.template`
|
|
32
|
+
${NextImage_liquid.default({srcIsLiquidCode:!0,src:system.LiquidIf("src != null",common.getSrcImage("src"),"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}"),id:system.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${common.getSrcImage("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:a?.ftLayout,aspectRatio:n,qualityType:a?.qualityType,qualityPercent:a?.qualityPercent},priority:a?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:i})}`,_=()=>core.template`
|
|
33
33
|
${NextImage_liquid.default({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:a?.ftLayout,aspectRatio:n,qualityType:a?.qualityType,qualityPercent:a?.qualityPercent},priority:a?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",enableLazyLoadImage:i})}`,b=common.getPaddingBottomByShapeSetting(a.ftShape),M=t=>`
|
|
34
34
|
${system.Liquid(`{% assign productImageWidth = 0 %}
|
|
35
35
|
{% case featureMedia.media_type %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),common=require("../../common/common.js"),productGallery=require("../../common/productGallery.js"),_function=require("../../../../helpers/function.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesAttr=require("../../composables/getProductImagesAttr.js"),system=require("@gem-sdk/system"),Carousel_liquid=require("../../../../../carousel/components/root/Carousel.liquid.js"),CarouselItem_liquid=require("../../../../../carousel/components/item/CarouselItem.liquid.js");const ProductGalleryCarousel=({builderPropUID:e,children:t,enableLazyLoadImage:i,...o})=>{let{featuredImageGalleryClasses:s,galleryItemClasses:r}=getProductImagesClassName.getProductImagesClassName(o),{galleryCarouselSettingAttrs:a}=getProductImagesAttr.getProductImagesAttr(o),{galleryCarouselStyle:l,galleryCarouselItemStyle:d}=getProductImagesStyles.getProductImagesStyles(o),p=()=>{let e=(e,t,i)=>{let o=core.getResponsiveValueByScreen(t,i),s=core.getResponsiveValueByScreen(e,i),r="slider"===s&&("bottom-center"===o||"inside-bottom"===o),a=["left","right","inside-left","inside-right"].includes(o??"");return a||r},t=productGallery.checkDisplayGalleryByWidth({shapeByLayout:m}),i={desktop:t.desktop&&e(o.type,o.position,"desktop"),tablet:t.tablet&&e(o.type,o.position,"tablet"),mobile:t.mobile&&e(o.type,o.position,"mobile")};return common.getDisplayStyle(e=>!i[e],"flex")},m=productGallery.getShapeByLayout({shape:o.shape,shapeForBottom:o.shapeForBottom,shapeFor1Col:o.shapeFor1Col,shapeFor2Col:o.shapeFor2Col,shapeForFtOnly:o.shapeForFtOnly,shapeForInsideBottom:o.shapeForInsideBottom,shapeForInside:o.shapeForInside},o.position),g=(e,t)=>core.template`${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",setting:e,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:t,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",enableLazyLoadImage:i})}`,u=common.getPaddingBottomByShapeSetting(m),c=t=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),common=require("../../common/common.js"),productGallery=require("../../common/productGallery.js"),_function=require("../../../../helpers/function.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesAttr=require("../../composables/getProductImagesAttr.js"),system=require("@gem-sdk/system"),Carousel_liquid=require("../../../../../carousel/components/root/Carousel.liquid.js"),CarouselItem_liquid=require("../../../../../carousel/components/item/CarouselItem.liquid.js");const ProductGalleryCarousel=({builderPropUID:e,children:t,enableLazyLoadImage:i,...o})=>{let{featuredImageGalleryClasses:s,galleryItemClasses:r}=getProductImagesClassName.getProductImagesClassName(o),{galleryCarouselSettingAttrs:a}=getProductImagesAttr.getProductImagesAttr(o),{galleryCarouselStyle:l,galleryCarouselItemStyle:d}=getProductImagesStyles.getProductImagesStyles(o),p=()=>{let e=(e,t,i)=>{let o=core.getResponsiveValueByScreen(t,i),s=core.getResponsiveValueByScreen(e,i),r="slider"===s&&("bottom-center"===o||"inside-bottom"===o),a=["left","right","inside-left","inside-right"].includes(o??"");return a||r},t=productGallery.checkDisplayGalleryByWidth({shapeByLayout:m}),i={desktop:t.desktop&&e(o.type,o.position,"desktop"),tablet:t.tablet&&e(o.type,o.position,"tablet"),mobile:t.mobile&&e(o.type,o.position,"mobile")};return common.getDisplayStyle(e=>!i[e],"flex")},m=productGallery.getShapeByLayout({shape:o.shape,shapeForBottom:o.shapeForBottom,shapeFor1Col:o.shapeFor1Col,shapeFor2Col:o.shapeFor2Col,shapeForFtOnly:o.shapeForFtOnly,shapeForInsideBottom:o.shapeForInsideBottom,shapeForInside:o.shapeForInside},o.position),g=(e,t)=>core.template`${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:t,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",enableLazyLoadImage:i})}`,u=common.getPaddingBottomByShapeSetting(m),c=t=>`
|
|
2
2
|
${system.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
3
|
${system.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
4
|
${system.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),Modal3d_liquid=require("../../../../../image/components/Modal3d.liquid.js"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),Video_liquid=require("../../../../../image/components/Video.liquid.js"),HTML5Embed_liquid=require("../../../../../video/components/HTML5Embed.liquid.js"),_function=require("../../../../helpers/function.js"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),productGallery=require("../../common/productGallery.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js");const ProductGalleryGrid=({builderPropUID:e,wrapperStyle:i,children:t,enableLazyLoadImage:a,...s})=>{let{galleryItemClasses:o,galleryGridWrapperClasses:d}=getProductImagesClassName.getProductImagesClassName(s),{galleryGridStyles:r,galleryGridItemStyles:l}=getProductImagesStyles.getProductImagesStyles(s),m=productGallery.getShapeByLayout({shape:s.shape,shapeForBottom:s.shapeForBottom,shapeFor1Col:s.shapeFor1Col,shapeFor2Col:s.shapeFor2Col,shapeForFtOnly:s.shapeForFtOnly,shapeForInsideBottom:s.shapeForInsideBottom,shapeForInside:s.shapeForInside},s.position),c=()=>{let e=["desktop","mobile","tablet"],i={desktop:"none",tablet:"none",mobile:"none"};return e.forEach(e=>{let t=core.getResponsiveValueByScreen(s?.position,e);i={...i,[e]:"one-col"===t||"two-col"==t?"block":"none"}}),core.makeStyleResponsive("d",i)},u=(e,i)=>core.template`
|
|
2
|
-
${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:i,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:a})}
|
|
2
|
+
${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:i,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:a})}
|
|
3
3
|
${system.If(s?.galleryHoverEffect!=="none",`<div class="${core.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",productFeaturedImage.getZoomImageClass())}">
|
|
4
|
-
${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt}}",setting:e,style:i,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:a})}
|
|
4
|
+
${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:i,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:a})}
|
|
5
5
|
</div>`," ")}
|
|
6
6
|
${system.If(s?.galleryHoverEffect=="zoom"&&s?.galleryZoomType=="glasses",`<div class="${core.cls("zoom-lens-element",productFeaturedImage.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,g=()=>Modal3d_liquid.default({src:system.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:common.getAspectRatio(m)}),p=()=>Video_liquid.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),n=()=>HTML5Embed_liquid.default({src:"{{mediaSourceVideo}}",title:"{{media.alt}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),y=()=>core.template`
|
|
9
|
+
`,g=()=>Modal3d_liquid.default({src:system.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:common.getAspectRatio(m)}),p=()=>Video_liquid.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),n=()=>HTML5Embed_liquid.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),y=()=>core.template`
|
|
10
10
|
${system.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"/>
|
|
@@ -43,7 +43,7 @@ import{template as e,cls as i,makeStyleResponsive as a,getResponsiveValueByScree
|
|
|
43
43
|
{%- endif -%}`,alt:`{%- if variant.featured_image != null -%}
|
|
44
44
|
{{variant.featured_image.alt}}
|
|
45
45
|
{%- elsif variant.featured_image == null -%}
|
|
46
|
-
{{featureMedia.alt}}
|
|
46
|
+
{{featureMedia.alt | escape}}
|
|
47
47
|
{%- endif -%}`,setting:{layout:g?.ftLayout,aspectRatio:p},priority:!0,className:`gp-w-full featured-image-only ${i}`})}`;return e`<div
|
|
48
48
|
class="featured-image-root gp-product-images-ft gp-flex"
|
|
49
49
|
style="${{...s(g.position),..._(),...l(g)}}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,getResponsiveValueByScreen as i,makeStyleResponsive as t,makeWidth as o}from"@gem-sdk/core";import r from"../../../image/components/NextImage.liquid.js";import{convertSpacing as a,getDisplayStyle as l}from"./common/helpers.js";import{getGalleryImageAspectRatio as d,getSliderPerShowConfig as s,getAllowDotConfig as p,getCarouselVerticalConfigByPosition as g,getZoomDisplay as n}from"./common/productGallery.js";import{getStyleOfObject as m}from"../../helpers/function.js";import{getDotStyleConfig as c}from"../product-images-v2/common/productGallery.js";import u from"../../../carousel/components/root/Carousel.liquid.js";import C from"../../../carousel/components/item/CarouselItem.liquid.js";let ProductGalleryCarousel=({builderPropUID:f,...h})=>{let v=d(h?.customAspectRadio,h?.aspectRatio),w=()=>l(e=>!("slider"===i(h?.type,e)||["left","right"].includes(i(h?.position,e)||"")),"flex"),y=(i,t)=>e`${r({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",setting:i,style:t})}`,L=e=>`
|
|
1
|
+
import{template as e,getResponsiveValueByScreen as i,makeStyleResponsive as t,makeWidth as o}from"@gem-sdk/core";import r from"../../../image/components/NextImage.liquid.js";import{convertSpacing as a,getDisplayStyle as l}from"./common/helpers.js";import{getGalleryImageAspectRatio as d,getSliderPerShowConfig as s,getAllowDotConfig as p,getCarouselVerticalConfigByPosition as g,getZoomDisplay as n}from"./common/productGallery.js";import{getStyleOfObject as m}from"../../helpers/function.js";import{getDotStyleConfig as c}from"../product-images-v2/common/productGallery.js";import u from"../../../carousel/components/root/Carousel.liquid.js";import C from"../../../carousel/components/item/CarouselItem.liquid.js";let ProductGalleryCarousel=({builderPropUID:f,...h})=>{let v=d(h?.customAspectRadio,h?.aspectRatio),w=()=>l(e=>!("slider"===i(h?.type,e)||["left","right"].includes(i(h?.position,e)||"")),"flex"),y=(i,t)=>e`${r({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:t})}`,L=e=>`
|
|
2
2
|
{% if media.media_type == 'video' %}
|
|
3
3
|
{% assign mediaSourceUrl = media.sources.last.url %}
|
|
4
4
|
{% endif %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,cls as i,makeStyleResponsive as t,getResponsiveValueByScreen as a}from"@gem-sdk/core";import{getGalleryImageAspectRatio as r,getClassOverflowAndFlexWrapForGrid as o,getClassJustifyByPosition as d,getStyleWidthForGridItem as l,getZoomDisplay as p}from"./common/productGallery.js";import{getStyleOfObject as s}from"../../helpers/function.js";import g from"../../../image/components/NextImage.liquid.js";import{convertSpacingPx as m,getDisplayStyle as n}from"./common/helpers.js";let ProductGalleryCarousel=({builderPropUID:c,...u})=>{let C=r(u?.customAspectRadio,u?.aspectRatio),f=()=>n(e=>"slider"===a(u?.type,e)||["left","right"].includes(a(u?.position,e)||""),"flex"),h=(i,t)=>e`${g({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",setting:i,style:t})}`,v=e=>`
|
|
1
|
+
import{template as e,cls as i,makeStyleResponsive as t,getResponsiveValueByScreen as a}from"@gem-sdk/core";import{getGalleryImageAspectRatio as r,getClassOverflowAndFlexWrapForGrid as o,getClassJustifyByPosition as d,getStyleWidthForGridItem as l,getZoomDisplay as p}from"./common/productGallery.js";import{getStyleOfObject as s}from"../../helpers/function.js";import g from"../../../image/components/NextImage.liquid.js";import{convertSpacingPx as m,getDisplayStyle as n}from"./common/helpers.js";let ProductGalleryCarousel=({builderPropUID:c,...u})=>{let C=r(u?.customAspectRadio,u?.aspectRatio),f=()=>n(e=>"slider"===a(u?.type,e)||["left","right"].includes(a(u?.position,e)||""),"flex"),h=(i,t)=>e`${g({src:"{{media.preview_image | product_img_url: '1024x1024'}}",width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:t})}`,v=e=>`
|
|
2
2
|
{% if media.media_type == 'video' %}
|
|
3
3
|
{% assign mediaSourceUrl = media.sources.last.url %}
|
|
4
4
|
{% endif %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import m from"../../../../../video/components/HTML5Embed.liquid.js";import l from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import
|
|
1
|
+
import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import m from"../../../../../video/components/HTML5Embed.liquid.js";import l from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as n}from"../../../../helpers/function.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as M,Liquid as $,If as _}from"@gem-sdk/system";import b from"../../../../../carousel/components/root/Carousel.liquid.js";import w from"../../../../../carousel/components/item/CarouselItem.liquid.js";let FeatureImageWithGallery=({builderPropUID:v,children:I,enableLazyLoadImage:x,...q})=>{let{featuredImageCarouselClasses:z,galleryItemClasses:j,featuredCarouselItemClasses:S}=f(q),{featuredImageCarouselStyle:R,featureImageStyle:W,featureImageCarouselOnlyOneImageStyle:P,featureImageOnlyOneImageStyle:C,featureImageCarouselItemStyle:T}=c(q),{featuredImageCarouselSettingAttrs:L}=h(q),N=t(q.ftShape),k=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
4
|
${D()}
|
|
@@ -13,7 +13,7 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
13
13
|
{% else %}
|
|
14
14
|
${F()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,E=()=>l({src:y("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:N}),O=()=>
|
|
16
|
+
`,E=()=>l({src:y("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:N}),O=()=>p({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:N}),A=()=>m({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible"}),D=()=>a`
|
|
17
17
|
${V(i("gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==q.hoverEffect},"{{shouldHidden}}"))}
|
|
18
18
|
${_(q?.hoverEffect!=="none",`<div class="${i("zoom-element !gp-max-w-none",o())}">
|
|
19
19
|
${V("image-zoom",!0)}
|
|
@@ -29,7 +29,7 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
30
|
${y("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${g({srcIsLiquidCode:!0,src:y("src != null",s("src"),"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}"),id:y("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:x})}`,F=()=>a`
|
|
32
|
+
${g({srcIsLiquidCode:!0,src:y("src != null",s("src"),"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}"),id:y("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:x})}`,F=()=>a`
|
|
33
33
|
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",enableLazyLoadImage:x})}`,H=r(q.ftShape),G=a=>`
|
|
34
34
|
${$(`{% assign productImageWidth = 0 %}
|
|
35
35
|
{% case featureMedia.media_type %}
|
|
@@ -41,7 +41,7 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
41
41
|
${w({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${j(`gp-ft-image-item !gp-min-w-full !gp-max-w-full' ${a}`)}`,parentId:`${v}-{{section.id}}-{{product.id}}`,style:T,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
42
42
|
<div
|
|
43
43
|
class="gp-w-full gp-relative ${y("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
44
|
-
style="${
|
|
44
|
+
style="${n(e("pb",H))} ${y("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
45
45
|
>
|
|
46
46
|
${k()}
|
|
47
47
|
</div>
|
|
@@ -84,11 +84,11 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
84
84
|
${y("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
85
85
|
<div
|
|
86
86
|
class='gp-feature-image-carousel gp-feature-image-only'
|
|
87
|
-
style="${
|
|
87
|
+
style="${n(W)}"
|
|
88
88
|
>
|
|
89
89
|
<div
|
|
90
90
|
class="gp-relative"
|
|
91
|
-
style="${
|
|
91
|
+
style="${n(C)}"
|
|
92
92
|
>
|
|
93
93
|
${I}
|
|
94
94
|
<div
|
|
@@ -96,11 +96,11 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
96
96
|
product-id="{{product.id}}"
|
|
97
97
|
product-media="{{product.media.size}}"
|
|
98
98
|
class="${S(B)}"
|
|
99
|
-
style="${
|
|
99
|
+
style="${n(P)}"
|
|
100
100
|
>
|
|
101
101
|
<div
|
|
102
102
|
class="gp-w-full gp-relative ${y("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
103
|
-
style="${
|
|
103
|
+
style="${n(e("pb",H))} ${y("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
104
104
|
>
|
|
105
105
|
${k()}
|
|
106
106
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,makeStyleResponsive as t,getResponsiveValueByScreen as i}from"@gem-sdk/core";import o from"../../../../../image/components/NextImage.liquid.js";import{getPaddingBottomByShapeSetting as r,getDisplayStyle as s,getAspectRatio as a,getSrcImage as p}from"../../common/common.js";import{getShapeByLayout as l,getMinHeightByPosition as d,checkDisplayGalleryByWidth as m,getZoomDisplay as g,getCarouselVerticalConfigByPosition as n}from"../../common/productGallery.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as C}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as b}from"@gem-sdk/system";import v from"../../../../../carousel/components/root/Carousel.liquid.js";import f from"../../../../../carousel/components/item/CarouselItem.liquid.js";let ProductGalleryCarousel=({builderPropUID:w,children:L,enableLazyLoadImage:F,...$})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:I}=C($),{galleryCarouselSettingAttrs:_}=h($),{galleryCarouselStyle:k,galleryCarouselItemStyle:j}=u($),V=()=>{let e=(e,t,o)=>{let r=i(t,o),s=i(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},t=m({shapeByLayout:M}),o={desktop:t.desktop&&e($.type,$.position,"desktop"),tablet:t.tablet&&e($.type,$.position,"tablet"),mobile:t.mobile&&e($.type,$.position,"mobile")};return s(e=>!o[e],"flex")},M=l({shape:$.shape,shapeForBottom:$.shapeForBottom,shapeFor1Col:$.shapeFor1Col,shapeFor2Col:$.shapeFor2Col,shapeForFtOnly:$.shapeForFtOnly,shapeForInsideBottom:$.shapeForInsideBottom,shapeForInside:$.shapeForInside},$.position),P=(t,i)=>e`${o({srcIsLiquidCode:!0,src:`${p("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",enableLazyLoadImage:F})}`,Z=r(M),q=e=>`
|
|
1
|
+
import{template as e,makeStyleResponsive as t,getResponsiveValueByScreen as i}from"@gem-sdk/core";import o from"../../../../../image/components/NextImage.liquid.js";import{getPaddingBottomByShapeSetting as r,getDisplayStyle as s,getAspectRatio as a,getSrcImage as p}from"../../common/common.js";import{getShapeByLayout as l,getMinHeightByPosition as d,checkDisplayGalleryByWidth as m,getZoomDisplay as g,getCarouselVerticalConfigByPosition as n}from"../../common/productGallery.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as C}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as b}from"@gem-sdk/system";import v from"../../../../../carousel/components/root/Carousel.liquid.js";import f from"../../../../../carousel/components/item/CarouselItem.liquid.js";let ProductGalleryCarousel=({builderPropUID:w,children:L,enableLazyLoadImage:F,...$})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:I}=C($),{galleryCarouselSettingAttrs:_}=h($),{galleryCarouselStyle:k,galleryCarouselItemStyle:j}=u($),V=()=>{let e=(e,t,o)=>{let r=i(t,o),s=i(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},t=m({shapeByLayout:M}),o={desktop:t.desktop&&e($.type,$.position,"desktop"),tablet:t.tablet&&e($.type,$.position,"tablet"),mobile:t.mobile&&e($.type,$.position,"mobile")};return s(e=>!o[e],"flex")},M=l({shape:$.shape,shapeForBottom:$.shapeForBottom,shapeFor1Col:$.shapeFor1Col,shapeFor2Col:$.shapeFor2Col,shapeForFtOnly:$.shapeForFtOnly,shapeForInsideBottom:$.shapeForInsideBottom,shapeForInside:$.shapeForInside},$.position),P=(t,i)=>e`${o({srcIsLiquidCode:!0,src:`${p("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",enableLazyLoadImage:F})}`,Z=r(M),q=e=>`
|
|
2
2
|
${y("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
3
|
${y("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
4
|
${y("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
2
|
-
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:L})}
|
|
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 c from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getAspectRatio as n,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let ProductGalleryGrid=({builderPropUID:_,wrapperStyle:$,children:b,enableLazyLoadImage:L,...x})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=f(x),{galleryGridStyles:q,galleryGridItemStyles:I}=w(x),M=C({shape:x.shape,shapeForBottom:x.shapeForBottom,shapeFor1Col:x.shapeFor1Col,shapeFor2Col:x.shapeFor2Col,shapeForFtOnly:x.shapeForFtOnly,shapeForInsideBottom:x.shapeForInsideBottom,shapeForInside:x.shapeForInside},x.position),j=()=>{let i=["desktop","mobile","tablet"],t={desktop:"none",tablet:"none",mobile:"none"};return i.forEach(e=>{let i=a(x?.position,e);t={...t,[e]:"one-col"===i||"two-col"==i?"block":"none"}}),e("d",t)},k=(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:L})}
|
|
3
3
|
${r(x?.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}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:L})}
|
|
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:L})}
|
|
5
5
|
</div>`," ")}
|
|
6
6
|
${r(x?.galleryHoverEffect=="zoom"&&x?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,S=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:n(M)}),Z=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),z=()=>
|
|
9
|
+
`,S=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:n(M)}),Z=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),z=()=>c({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),B=()=>i`
|
|
10
10
|
${d("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -22,7 +22,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
22
22
|
${k({aspectRatio:n(M),layout:x?.layout,qualityType:x?.qualityType,qualityPercent:x?.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="${g(v(x?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -54,7 +54,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
55
|
data-outline="${i?"active":"deactive"}"
|
|
56
56
|
class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i}`)}"
|
|
57
|
-
style="${
|
|
57
|
+
style="${g(I)}"
|
|
58
58
|
>
|
|
59
59
|
<div class="gp-h-full gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")}">
|
|
60
60
|
${d("media != null",B(),P())}
|
|
@@ -63,7 +63,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
63
63
|
{% assign isMedia= false %}
|
|
64
64
|
${d("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
65
65
|
<div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
66
|
-
style="${d("isMedia",
|
|
66
|
+
style="${d("isMedia",g({...e("aspect",n(M))}))} ${g({...j()})}"
|
|
67
67
|
>
|
|
68
68
|
{% case media.media_type %}
|
|
69
69
|
{% when 'external_video' %}
|
|
@@ -80,7 +80,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
80
80
|
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:n(M),layout:x?.layout,qualityType:x?.qualityType,qualityPercent:x?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:L})}`;return o(`
|
|
81
81
|
<div type="grid-gallery"
|
|
82
82
|
class="${V}"
|
|
83
|
-
style="${
|
|
83
|
+
style="${g(q)}}"
|
|
84
84
|
>
|
|
85
85
|
${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 = '' %}")}
|
|
86
86
|
${d("media.id == product.featured_media.id ",H(x?.borderActive?.border!=="none"?"active":""),H())}`)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "3.1.
|
|
28
|
+
"@gem-sdk/core": "3.1.16",
|
|
29
29
|
"@gem-sdk/styles": "3.1.0",
|
|
30
30
|
"@gem-sdk/system": "3.1.0",
|
|
31
31
|
"tsup": "^8.5.0",
|