@gem-sdk/components 19.0.0-staging.4 → 19.0.0-staging.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/builder.js +1 -1
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +1 -1
- package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel-v3/index.js +1 -1
- package/dist/cjs/carousel-v3/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/code/common/helpers.js +1 -0
- package/dist/cjs/code/hooks/useCSSCode.js +4 -10
- package/dist/cjs/estimate-delivery/common/helpers.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
- 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 +2 -2
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +7 -7
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +1 -1
- package/dist/cjs/post-purchase/link/components/PostPurchaseLink.js +1 -1
- package/dist/cjs/post-purchase/link/settings/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/link/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-variant/components/variants/DropdownOption.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +12 -12
- package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +7 -5
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +11 -8
- package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +2 -3
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- 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 +5 -5
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.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 -2
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +29 -29
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +8 -8
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- 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/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +6 -6
- package/dist/cjs/product/components/product-list-v3/common/classes.js +1 -1
- package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +12 -9
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/cjs/third-party/components/EcomsendBackInStockAlert.js +1 -1
- package/dist/cjs/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/cjs/third-party/configs/EcomsendBackInStockAlert.js +1 -1
- package/dist/cjs/third-party/index.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/cjs/third-party/settings/EcomsendBackInStockAlert/index.js +4 -4
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +13 -13
- 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/builder.js +1 -1
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +4 -4
- package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel-v3/index.js +1 -1
- package/dist/esm/carousel-v3/settings/configs/ui-v2.js +1 -1
- package/dist/esm/code/common/helpers.js +1 -0
- package/dist/esm/code/hooks/useCSSCode.js +4 -10
- package/dist/esm/estimate-delivery/common/helpers.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +11 -11
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
- package/dist/esm/image/components/Image.liquid.js +10 -10
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +7 -7
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/post-purchase/link/components/PostPurchaseLink.js +1 -1
- package/dist/esm/post-purchase/link/settings/configs/settings.js +1 -1
- package/dist/esm/post-purchase/link/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/esm/post-purchase/product/components/product-variant/components/variants/DropdownOption.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
- package/dist/esm/product/components/product-badge/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +11 -8
- package/dist/esm/product/components/product-button/common/helpers.js +1 -1
- package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +3 -4
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- 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 +5 -5
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/esm/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.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 -2
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +45 -45
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +14 -14
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +11 -11
- 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/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +9 -9
- package/dist/esm/product/components/product-list-v3/common/classes.js +1 -1
- package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/esm/product/components/product-wrap/Product.liquid.js +16 -13
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/esm/third-party/components/EcomsendBackInStockAlert.js +1 -1
- package/dist/esm/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/esm/third-party/configs/EcomsendBackInStockAlert.js +1 -1
- package/dist/esm/third-party/index.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/esm/third-party/settings/EcomsendBackInStockAlert/index.js +4 -4
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +14 -14
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +10 -10
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +44 -14
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),r=require("./components/feature-gallery/FeatureImageWithGallery.liquid.js"),i=require("./components/gallery-carousel/GalleryCarousel.liquid.js"),s=require("./components/gallery-grid/GalleryGrid.liquid.js"),a=require("../../../helpers.js"),o=require("./common/productGallery.js"),l=require("./composables/getProductImagesClassName.js"),d=require("./composables/getProductImagesStyles.js"),u=require("@gem-sdk/system"),p=require("./common/getBorderActiveCss.js"),n=require("../../helpers/function.js");exports.default=c=>{let g=t.setDefaultWhenUndefineSetting(c),{setting:m,styles:f,builderProps:y,style:$}=g,{rawChildren:S,pageContext:I}=c,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),r=require("./components/feature-gallery/FeatureImageWithGallery.liquid.js"),i=require("./components/gallery-carousel/GalleryCarousel.liquid.js"),s=require("./components/gallery-grid/GalleryGrid.liquid.js"),a=require("../../../helpers.js"),o=require("./common/productGallery.js"),l=require("./composables/getProductImagesClassName.js"),d=require("./composables/getProductImagesStyles.js"),u=require("@gem-sdk/system"),p=require("./common/getBorderActiveCss.js"),n=require("../../helpers/function.js");exports.default=c=>{let g=t.setDefaultWhenUndefineSetting(c),{setting:m,styles:f,builderProps:y,style:$}=g,{rawChildren:S,pageContext:I}=c,h={...m,...f},q=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(y?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(a.filterPageContext(I))},
|
|
@@ -9,33 +9,33 @@
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
10
|
"collection": {{ collection | json | escape}}
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,v=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:j,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(h?.position,m?.type),F=C?{}:u.createAttr({"data-only-image":u.LiquidIf("product.media.size > 1","false","true")}),{wrapperClasses:L,productImagesGalleryClasses:P}=l.getProductImagesClassName(c),O=u.createClass({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),D=u.createClass({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:b,wrapContainerStyleOnlyOneImage:G,galleryImageStyle:z}=d.getProductImagesStyles(h),A=o.getShapeByLayout({shape:h.shape,shapeForBottom:h.shapeForBottom,shapeFor1Col:h.shapeFor1Col,shapeFor2Col:h.shapeFor2Col,shapeForFtOnly:h.shapeForFtOnly,shapeForInsideBottom:h.shapeForInsideBottom??o.sizeSettingDefaultForNewLayout,shapeForInside:h.shapeForInside??o.sizeSettingDefaultForNewLayout},h.position),N=t.getStyleInsideLayout(h.position,A,h?.spacing),_=()=>e.template`
|
|
13
13
|
${e.WrapRenderChildren({uid:y?.uid||"",customProps:S?.[0].customProps},S?.map(t=>{if(t)return e.template`${e.RenderChildren({...t,isInsideProductImage:!0,imageData:{imageShape:f?.ftShape,imageAlign:f?.align,imageLayout:f?.position},dotData:{dotSize:m?.ftDotSize,dotGapToCarousel:m?.ftDotGapToCarousel,dotStyle:m?.ftDotStyle}})}`}))}
|
|
14
14
|
`;return e.template`
|
|
15
|
-
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:h,uid:y?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${u.Liquid(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${u.LiquidIf("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
19
|
`)}
|
|
20
20
|
<gp-product-images-v3
|
|
21
|
-
gp-data='${
|
|
22
|
-
${{...
|
|
21
|
+
gp-data='${q}'
|
|
22
|
+
${{...v}}
|
|
23
23
|
style="${{...$}}"
|
|
24
|
-
class="${
|
|
24
|
+
class="${L}"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
class="${u.LiquidIf("product.media.size > 1",`${
|
|
28
|
-
style="${u.LiquidIf("product.media.size > 1",n.getStyleOfObject(
|
|
27
|
+
class="${u.LiquidIf("product.media.size > 1",`${O}`,`${D}`)}"
|
|
28
|
+
style="${u.LiquidIf("product.media.size > 1",n.getStyleOfObject(b),n.getStyleOfObject(G))}"
|
|
29
29
|
>
|
|
30
|
-
${r.default({builderPropUID:`gp-carousel-${y?.uid}`,...
|
|
31
|
-
${u.If(!
|
|
30
|
+
${r.default({builderPropUID:`gp-carousel-${y?.uid}`,...h,children:_(),pageContext:I})}
|
|
31
|
+
${u.If(!j,e.template`
|
|
32
32
|
<div
|
|
33
|
-
class="${
|
|
34
|
-
style="${n.getStyleOfObject(
|
|
35
|
-
${{...
|
|
33
|
+
class="${P}"
|
|
34
|
+
style="${n.getStyleOfObject(z)}"
|
|
35
|
+
${{...F}}
|
|
36
36
|
>
|
|
37
|
-
${u.LiquidIf("product.media.size > 1",i.default({builderPropUID:`gp-gallery-${y?.uid}`,...
|
|
38
|
-
${u.If(
|
|
37
|
+
${u.LiquidIf("product.media.size > 1",i.default({builderPropUID:`gp-gallery-${y?.uid}`,...h,pageContext:I}))}
|
|
38
|
+
${u.If(C,s.default({builderPropUID:y?.uid,wrapperStyle:{...N},children:_(),...h,pageContext:I}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),r=require("./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js"),i=require("./components/gallery-carousel/GalleryCarouselEmbla.liquid.js"),s=require("./components/gallery-grid/GalleryGrid.liquid.js"),a=require("../../../helpers.js"),o=require("./common/productGallery.js"),l=require("./composables/getProductImagesClassName.js"),d=require("./composables/getProductImagesStyles.js"),u=require("@gem-sdk/system"),p=require("./common/getBorderActiveCss.js"),n=require("../../helpers/function.js");exports.default=c=>{let g=t.setDefaultWhenUndefineSetting(c),{setting:m,styles:f,builderProps:y,style:$}=g,{rawChildren:S,pageContext:I}=c,h={...m,...f},q=`
|
|
2
|
+
{
|
|
3
|
+
"id":${JSON.stringify(y?.uid)},
|
|
4
|
+
"pageContext": ${JSON.stringify(a.filterPageContext(I))},
|
|
5
|
+
"setting":${JSON.stringify(m)},
|
|
6
|
+
"styles":${JSON.stringify(f)},
|
|
7
|
+
"productUrl":{{product.url | json | escape}},
|
|
8
|
+
"product":{{product | json | escape}},
|
|
9
|
+
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
|
+
"collection": {{ collection | json | escape}}
|
|
11
|
+
}
|
|
12
|
+
`,v=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:j,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(h?.position,m?.type),F=C?{}:u.createAttr({"data-only-image":u.LiquidIf("product.media.size > 1","false","true")}),{wrapperClasses:L,productImagesGalleryClasses:P}=l.getProductImagesClassName(c),b=u.createClass({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),O=u.createClass({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:D,wrapContainerStyleOnlyOneImage:G,galleryImageStyle:z}=d.getProductImagesStyles(h),A=o.getShapeByLayout({shape:h.shape,shapeForBottom:h.shapeForBottom,shapeFor1Col:h.shapeFor1Col,shapeFor2Col:h.shapeFor2Col,shapeForFtOnly:h.shapeForFtOnly,shapeForInsideBottom:h.shapeForInsideBottom??o.sizeSettingDefaultForNewLayout,shapeForInside:h.shapeForInside??o.sizeSettingDefaultForNewLayout},h.position),N=t.getStyleInsideLayout(h.position,A,h?.spacing),_=()=>e.template`
|
|
13
|
+
${e.WrapRenderChildren({uid:y?.uid||"",customProps:S?.[0].customProps},S?.map(t=>{if(t)return e.template`${e.RenderChildren({...t,isInsideProductImage:!0,imageData:{imageShape:f?.ftShape,imageAlign:f?.align,imageLayout:f?.position},dotData:{dotSize:m?.ftDotSize,dotGapToCarousel:m?.ftDotGapToCarousel,dotStyle:m?.ftDotStyle}})}`}))}
|
|
14
|
+
`;return e.template`
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:h,uid:y?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${u.Liquid(`
|
|
17
|
+
{% assign featured_image = product.featured_image %}
|
|
18
|
+
${u.LiquidIf("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
|
+
`)}
|
|
20
|
+
<gp-product-images-v3
|
|
21
|
+
gp-data='${q}'
|
|
22
|
+
${{...v}}
|
|
23
|
+
style="${{...$}}"
|
|
24
|
+
class="${L}"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
class="${u.LiquidIf("product.media.size > 1",`${b}`,`${O}`)}"
|
|
28
|
+
style="${u.LiquidIf("product.media.size > 1",n.getStyleOfObject(D),n.getStyleOfObject(G))}"
|
|
29
|
+
>
|
|
30
|
+
${r.default({builderPropUID:`gp-carousel-${y?.uid}`,...h,children:_(),pageContext:I})}
|
|
31
|
+
${u.If(!j,e.template`
|
|
32
|
+
<div
|
|
33
|
+
class="${P}"
|
|
34
|
+
style="${n.getStyleOfObject(z)}"
|
|
35
|
+
${{...F}}
|
|
36
|
+
>
|
|
37
|
+
${u.LiquidIf("product.media.size > 1",i.default({builderPropUID:`gp-gallery-${y?.uid}`,...h,pageContext:I}))}
|
|
38
|
+
${u.If(C,s.default({builderPropUID:y?.uid,wrapperStyle:{...N},children:_(),...h,pageContext:I}))}
|
|
39
|
+
</div>
|
|
40
|
+
`)}
|
|
41
|
+
</div>
|
|
42
|
+
</gp-product-images-v3>
|
|
43
|
+
${u.If(e.isLocalEnv,`<script ${a.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${a.getSettingPreloadData('class="gps-link" delay',"src")}="${e.baseAssetURL}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
|
+
`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core");function
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core");function t(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}exports.FEATURE_MEDIA_CENTER_CLASSES="gp-flex gp-items-center gp-justify-center",exports.getFeaturedCarouselItemClasses=({extraClass:e})=>{let r="gp-group gp-z-0 gp-flex !gp-min-w-full !gp-max-w-full gp-w-full gp-relative gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 gp-image-item gp-ft-image-item data-[outline=active]:gp-outline";return e&&(r+=` ${e}`),t(r)},exports.getFeaturedImageCarouselClasses=({extraClass:e})=>{let r="`gp-flex-1 gp-w-full gp-feature-image-carousel";return e&&(r+=` ${e}`),t(r)},exports.getFeaturedImageClasses=({setting:r,extraClass:l})=>{let p=l??"";return e.DEVICES.forEach(t=>{let l=e.getResponsiveValueByScreen(r?.ftNavigationPosition,t),g="desktop"!==t?`${t}:`:"";"outside"===l?p+=` ${g}gp-px-[16px]`:p+=` ${g}gp-px-0`}),t(p)},exports.getFeaturedImageGalleryClasses=({settings:r,extraClass:l})=>{let p=l??"gp-flex-1 gp-w-full carousel-gallery";return e.DEVICES.forEach(t=>{let l=e.getResponsiveValueByScreen(r?.navigationPosition,t),g=e.getResponsiveValueByScreen(r?.type,t),s=e.getResponsiveValueByScreen(r?.position,t),a="desktop"!==t?`${t}:`:"";"outside"===l&&"slider"===g&&["bottom-center"].includes(s||"")?p+=` ${a}gp-px-[16px]`:p+=` ${a}gp-px-0`}),t(p)},exports.getFtImageWithGalleryClasses=({extraClass:e})=>{let r="gp-flex !gp-h-fit gp-relative gp-overflow-hidden";return e&&(r+=` ${e}`),t(r)},exports.getGalleryGridWrapperClasses=({extraClass:e})=>{let r="product-feature-image grid-gallery gp-flex !gp-h-fit gp-w-full gp-flex-wrap scrollbar-track:gp-rounded-2xl scrollbar-thumb:gp-rounded-2xl scrollbar-thumb:gp-bg-gray-400 gp-z-1";return e&&(r+=` ${e}`),t(r)},exports.getGalleryItemClasses=({extraClass:e})=>{let r="gp-image-item gp-flex gp-items-center gp-justify-center gp-group gp-relative gp-overflow-hidden gp-cursor-pointer";return e&&(r+=` ${e}`),t(r)},exports.getGalleryWrapperClasses=({extraClass:e})=>{let r="gallery-wrapper gp-product-images-gallery gp-flex gp-overflow-hidden gp-max-w-full gp-max-h-full data-[only-image=true]:gp-hidden";return e&&(r+=` ${e}`),t(r)},exports.getImageGalleryWrapperClasses=({extraClass:e})=>{let r="gp-flex gp-h-fit gp-max-w-full gp-overflow-hidden";return e&&(r+=` ${e}`),t(r)},exports.getWrapperClasses=({extraClass:e,isAddOverFlowClass:r=!1})=>{let l="gp-relative gp-w-full";return e&&(l+=` ${e}`),r&&(l+=" gp-overflow-hidden"),t(l)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core");const t=(e,t)=>{if(!e)return t;if("number"==typeof e)return e;let o=e.replaceAll("px","").replaceAll("%","").replaceAll("rem","").replaceAll("em","");return isNaN(Number(o))?t:Number(o)},o=t=>{let o={};return["desktop","mobile","tablet"].forEach(r=>{let
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core");const t=(e,t)=>{if(!e)return t;if("number"==typeof e)return e;let o=e.replaceAll("px","").replaceAll("%","").replaceAll("rem","").replaceAll("em","");return isNaN(Number(o))?t:Number(o)},o=t=>{let o={};return["desktop","mobile","tablet"].forEach(r=>{let l=e.getResponsiveValueByScreen(t,r)?.shapeValue;if(l)o={...o,[r]:l};else{let l=e.getResponsiveValueByScreen(t,r)?.shape;switch(l){case"square":o={...o,[r]:"1/1"};break;case"vertical":o={...o,[r]:"3/4"};break;case"horizontal":o={...o,[r]:"4/3"};break;case"original":o={...o,[r]:""}}}}),e.makeAspectRatio(o)},r=e=>{let t=parseInt(e)?`${2*parseInt(e)}px`:`${e} * 2`;return t},l=e=>{let t=e.match(/\d+/g);return t?t[0]:e},i=["only-feature","one-col","two-col"];exports.checkAddOverFlowClass=e=>{let t=e?.["--radius"],o=e?.["--bblr"]||"0px",r=e?.["--bbrr"]||"0px",l=e?.["--btlr"]||"0px",i=e?.["--btrr"]||"0px";return t&&!t.toString().includes("none")&&"0"!==t.toString()||"0px"!==o||"0px"!==r||"0px"!==l||"0px"!==i},exports.convertSpacing=e=>{if(!e)return{desktop:5};let o=t(e.desktop,5),r=t(e.tablet,o),l=t(e.mobile,r);return{desktop:o,tablet:r,mobile:l}},exports.convertSpacingForIndisdeLayout=r,exports.convertUnitToNumber=t,exports.getAspectRatio=o,exports.getConditionRenderGalleryImages=(t,o)=>{let r=!0,l=!1;return["desktop","mobile","tablet"].forEach(i=>{let s=e.getResponsiveValueByScreen(t,i),n=e.getResponsiveValueByScreen(o,i);s&&"only-feature"!==s&&(r=!1),(["two-col","one-col"].includes(s)||"images"===n)&&(l=!0)}),{isOnlyFeatureAllDevices:r,isRenderGalleryGrid:l}},exports.getDisplayStyle=(e,t)=>{let o={};return["desktop","mobile","tablet"].forEach(r=>{o={...o,[`--d${"desktop"===r?"":`-${r}`}`]:`${e(r)?"none":t}`}}),o},exports.getFeatureGalleryComponentKey=(e,t,o)=>[JSON.stringify(e?.position),t,o].join("|"),exports.getGalleryCarouselShouldInitByLayout=t=>{let o={};return e.DEVICES.forEach(r=>{let l=e.getResponsiveValueByScreen(t,r);o[r]=null==l||!i.includes(l)}),o},exports.getPaddingBottomByShapeSetting=t=>{let r=o(t),i={desktop:"auto",mobile:"auto",tablet:"auto"};return["desktop","mobile","tablet"].forEach(o=>{let s=e.getResponsiveValueByScreen(t,o),n=s?.height,a=s?.width||"",p=l(n||""),u=a.toString().match(/px/g)?l(a):a;if(n&&a&&!isNaN(Number(p))&&!isNaN(Number(u))){i={...i,[o]:`${Number(p)/Number(u)*100}%`};return}if(n&&!isNaN(Number(p))){i={...i,[o]:n};return}let d=r?.[o]!=="auto"&&r?.[o]?r?.[o]?.split("/").reverse().join("/"):"{%if largestRatio == 0%} 100 / 100 {%else%} {{largestRatio}} {%endif%}";i={...i,[o]:`calc((${d})*100%)`}}),i},exports.getSrcImage=e=>`{{${e} | image_url: width: 480}} 480w, {{${e} | image_url: width: 768}} 768w, {{${e} | image_url: width: 1024}} 1024w, {{${e} | image_url: width: 1440}} 1440w`,exports.getStyleGridLayout=t=>{let o={"--gtc":"minmax(0, 12fr)","--gtc-tablet":"minmax(0, 12fr)","--gtc-mobile":"minmax(0, 12fr)"};if(!t.isHiddenGalleryImages){let r=!1;e.DEVICES.forEach(l=>{let i=e.getResponsiveValueByScreen(t.position,l),s=e.getResponsiveValueByScreen(t.ratioLayout,l),n=e.getResponsiveValueByScreen(t.ratioLayoutRight,l),a="desktop"===l?"--gtc":`--gtc-${l}`,p="desktop"===l?"--gtr":`--gtr-${l}`,u="left"===i?s:n,d=["left","right"].includes(i||"");d&&u?(r=!0,Object.assign(o={...o,[a]:`minmax(0, ${u[0]}fr) minmax(0, ${u[1]}fr)`},{[p]:"fit-content(0)"})):r&&Object.assign(o,{[p]:"unset"})})}return o},exports.getStyleGridOrderForFeature=t=>{let o={"--o":"0","--o-tablet":"0","--o-mobile":"0"};return["desktop","mobile","tablet"].forEach(r=>{let l=e.getResponsiveValueByScreen(t.position,r),i="desktop"===r?"--o":`--o-${r}`;o={...o,[i]:"left"===l?"1":"0"}}),o},exports.getStyleGridOrderForGallery=t=>{let o={"--o":"1","--o-tablet":"1","--o-mobile":"1"};return["desktop","mobile","tablet"].forEach(r=>{let l=e.getResponsiveValueByScreen(t.position,r),i="desktop"===r?"--o":`--o-${r}`;o={...o,[i]:"left"===l?"0":"1"}}),o},exports.getStyleInsideLayout=(t,o,l)=>{let i={},s={},n={},a={},p={},u={};return["desktop","mobile","tablet"].forEach(d=>{let c=e.getResponsiveValueByScreen(t,d),m=e.getResponsiveValueByScreen(o,d)?.width,g=e.getResponsiveValueByScreen(l,d);if(i={...i,[d]:["inside-bottom","inside-left","inside-right"].includes(c)?"absolute":"static"},["inside-bottom"].includes(c)){let e=r(g);m=`calc(100% - ${e})`}["bottom-center","two-col","one-col"].includes(c)&&(m="100%"),n={...n,[d]:"inside-bottom"===c?`${g}`:"auto"},a={...a,[d]:["inside-left","inside-right"].includes(c)?`${g}`:"auto"},u={...u,[d]:["inside-bottom","inside-left"].includes(c)?`${g}`:"auto"},p={...p,[d]:"inside-right"===c?`${g}`:"auto"},s={...s,[d]:m}}),{...e.makeStyleResponsive("pos",i),...e.makeStyleResponsive("w",e.removeNullUndefined(s)),...e.makeStyleResponsive("bottom",e.removeNullUndefined(n)),...e.makeStyleResponsive("top",e.removeNullUndefined(a)),...e.makeStyleResponsive("left",e.removeNullUndefined(u)),...e.makeStyleResponsive("right",e.removeNullUndefined(p))}},exports.getTypeWidthDevice=e=>{let t=e?.desktop,o=e?.tablet===void 0?t:e?.tablet,r=e?.mobile===void 0?o:e?.mobile;return{desktop:t,tablet:o,mobile:r}},exports.setDefaultWhenUndefineSetting=e=>({...e,setting:{...e.setting}});
|
package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("@gem-sdk/core"),require("next/link");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("@gem-sdk/core"),require("next/link");var s=require("../../../../../video/components/Video.js"),l=require("../../common/classes.js"),t=r.memo(t=>{let{url:u,aspectRatio:o,thumbnail:i}=t,c=r.useMemo(()=>u.includes("youtu.be")?"youtube":u.includes("vimeo")?"vimeo":"html5",[u]);return e.jsx("div",{className:`gp-w-full gp-h-full ${l.FEATURE_MEDIA_CENTER_CLASSES}`,children:e.jsx(s.default,{setting:{type:c,html5Url:u,youtubeUrl:u,vimeoUrl:u,preload:!0,controls:!0,aspectRatio:o,poster:i?{src:i}:void 0},className:"gp-w-full"})})});exports.default=t;
|
package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.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("@gem-sdk/core"),r=require("react"),o=require("../../../../../image/components/NextImage.js"),s=require("./MediaIcon.js"),a=require("../../common/productFeaturedImage.js"),i=require("./ProductFeatureVideo.js");const c={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var n=r.memo(({image:n,imageShowWhenHover:l,setting:u,aspectRatio:h})=>{var d;let f=t.useProduct(),p=t.useCurrentDevice(),g=t.useShopStore(e=>e.storefrontUrl),{isEditMode:m,isPreviewSharePageMode:y}=t.useRenderMode(),v=r.useMemo(()=>"none"!==t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p),[p,u.ftClickOpenLightBox]),x=r.useMemo(()=>!m&&["VIDEO","EXTERNAL_VIDEO"].includes(n?.contentType||"")&&!v,[m,n?.contentType,v]),j=r.useMemo(()=>n?{...n,src:x?n.src:a.isFeatureMedia(n?.contentType)?n?.previewImage:n.src}:c,[n,x]),E=r.useMemo(()=>{if(y)return"javascript:void(0)";if(!g)return"#";let e=new URL(g);return f?`${e.protocol}//${e.host}/products/${f.handle}`:"#"},[g,f,y]),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("react"),o=require("../../../../../image/components/NextImage.js"),s=require("./MediaIcon.js"),a=require("../../common/productFeaturedImage.js"),i=require("./ProductFeatureVideo.js");const c={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var n=r.memo(({image:n,imageShowWhenHover:l,setting:u,aspectRatio:h})=>{var d;let f=t.useProduct(),p=t.useCurrentDevice(),g=t.useShopStore(e=>e.storefrontUrl),{isEditMode:m,isPreviewSharePageMode:y}=t.useRenderMode(),v=r.useMemo(()=>"none"!==t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p),[p,u.ftClickOpenLightBox]),x=r.useMemo(()=>!m&&["VIDEO","EXTERNAL_VIDEO"].includes(n?.contentType||"")&&!v,[m,n?.contentType,v]),j=r.useMemo(()=>n?{...n,src:x?n.src:a.isFeatureMedia(n?.contentType)?n?.previewImage:n.src}:c,[n,x]),E=r.useMemo(()=>{if(y)return"javascript:void(0)";if(!g)return"#";let e=new URL(g);return f?`${e.protocol}//${e.host}/products/${f.handle}`:"#"},[g,f,y]),b=r.useMemo(()=>u?.hoverEffect!=="none"&&!a.isFeatureMedia(j?.contentType),[j?.contentType,u?.hoverEffect]),M=r.useMemo(()=>u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!a.isFeatureMedia(j?.contentType),[j?.contentType,u?.hoverEffect,u?.zoomType]),T=r.useCallback(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),w=r.useMemo(()=>l?"other"!==u.hoverEffect?T(j):T(l):c.src,[l,j,u.hoverEffect,T]);return e.jsx(e.Fragment,{children:(d=e.jsx(e.Fragment,{children:x?e.jsx(i.default,{type:j?.contentType,url:j.src??"",thumbnail:j?.previewImage,aspectRatio:h}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{draggable:"false",src:j.src,width:j?.width,height:j?.height,alt:j?.alt,setting:{aspectRatio:h,layout:u?.ftLayout},priority:u?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e.jsx(s.default,{contentType:j?.contentType??""}),b&&e.jsx(o.default,{draggable:"false",src:w,width:u?.hoverEffect==="other"?l?.width:j.width,height:u?.hoverEffect==="other"?l?.height:j.height,alt:u?.hoverEffect==="other"?l?.alt:j.alt,setting:{layout:u.ftLayout,aspectRatio:h},style:{width:"100%",height:"100%"},className:t.cls("hover-image featured-image-only !gp-max-w-none",a.getZoomImageClass()),priority:u?.preload}),M&&e.jsx("div",{className:t.cls(a.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${j?.src}")`})}})]})}),"product-link"===t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p)?e.jsx("a",{title:f?.title,href:E,className:"gp-w-full",children:d}):d)})});exports.default=n;
|
package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("react"),s=require("../../common/common.js"),
|
|
2
|
-
${n&&I?"gem-slider-item-active":""}`),onClick:()=>y(o?.id||"",M),style:C,onMouseMove:e=>c.handleMouseMove(e,{hoverEffect:j.galleryHoverEffect,zoom:j.galleryZoom,zoomType:j.galleryZoomType}),onMouseOut:e=>c.handleMouseOut(e),"data-border":n&&j?.borderActive?"active":"deactive",children:[e.jsx(a.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s.getAspectRatio(f),layout:j?.layout},style:{width:"100%",height:"100%"}},o?.id),e.jsx(i.default,{contentType:o?.contentType||""}),j?.galleryHoverEffect!=="none"&&!l.isFeatureMedia(o?.contentType)&&e.jsx(a.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:j.layout,aspectRatio:s.getAspectRatio(f)},className:t.cls("hover-image !gp-max-w-none",l.getZoomImageClass())}),j?.galleryHoverEffect=="zoom"&&j?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(t.getResponsiveValueByScreen(j.position,T)||"")&&!l.isFeatureMedia(o?.contentType)&&e.jsx("div",{className:t.cls(l.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${o?.src}")`})}}),t.getResponsiveValueByScreen(j?.clickOpenLightBox,T)&&e.jsx(r.default,{})]},o?.id)}),p]})})});exports.default=m;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("react"),s=require("../../common/common.js"),r=require("../../../../../image/components/NextImage.js"),a=require("../lightbox/ButtonOpenLightBox.js"),i=require("./MediaIcon.js"),l=require("./ProductFeatureVideo.js"),c=require("../../common/productFeaturedImage.js"),n=require("../../common/hoverAction.js"),u=require("../../composables/getProductImagesClassName.js"),d=require("../../composables/getProductImagesStyles.js"),m=require("../../hooks/useProductGalleryGrid.js"),g=o.memo(o=>{let{builderPropUID:g,productImages:p,onHandleClick:y,activeIndexFromFeatureImage:h,children:v,isHiddenInteraction:j,...x}=o,{isDisplay:f,shapeByLayout:q,imageActiveIndex:I,enableOpenLightBox:M,isEnableBorderActive:R,filteredProductImages:T}=m.useProductGalleryGrid(o),w=t.useCurrentDevice(),{isEditMode:b}=t.useRenderMode(),E=t.getResponsiveValueByScreen(x.position,w)||"",N=["one-col","two-col"].includes(E),P="bottom-center"===E,{galleryGridWrapperClasses:F,galleryItemClasses:O}=u.getProductImagesClassName(x),{galleryGridStyles:A,galleryGridItemStyles:B}=d.getProductImagesStyles(x),C=P?"none":x.galleryHoverEffect;return e.jsx(e.Fragment,{children:f&&e.jsxs("div",{"data-slot":"children","data-id":g,className:F,style:A,"gp-data-hidden":`${j}`,children:[T?.map((o,u)=>{let d=u===I,m=c.isFeatureMedia(o.contentType)?o.previewImage:o.src,p=!b&&N&&!M&&["VIDEO","EXTERNAL_VIDEO"].includes(o?.contentType||"");return e.jsxs("div",{"aria-hidden":!0,className:O(`gp-gallery-image-item gem-slider-item-${g} ${d&&R?"gem-slider-item-active":""}`),onClick:()=>y(o?.id||"",M),style:B,onMouseMove:e=>n.handleMouseMove(e,{hoverEffect:C,zoom:x.galleryZoom,zoomType:x.galleryZoomType}),onMouseOut:e=>n.handleMouseOut(e),"data-border":d&&x?.borderActive?"active":"deactive",children:[p?e.jsx(l.default,{type:o?.contentType,url:o?.src??"",thumbnail:o?.previewImage,aspectRatio:s.getAspectRatio(q)}):e.jsxs(e.Fragment,{children:[e.jsx(r.default,{src:m,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s.getAspectRatio(q),layout:x?.layout},style:{width:"100%",height:"100%"}},o?.id),e.jsx(i.default,{contentType:o?.contentType||""})]}),x?.galleryHoverEffect!=="none"&&!c.isFeatureMedia(o?.contentType)&&e.jsx(r.default,{src:m,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:x.layout,aspectRatio:s.getAspectRatio(q)},className:t.cls("hover-image !gp-max-w-none",c.getZoomImageClass())}),x?.galleryHoverEffect=="zoom"&&x?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(t.getResponsiveValueByScreen(x.position,w)||"")&&!c.isFeatureMedia(o?.contentType)&&e.jsx("div",{className:t.cls(c.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${o?.src}")`})}}),t.getResponsiveValueByScreen(x?.clickOpenLightBox,w)&&e.jsx(a.default,{})]},o?.id)}),v]})})});exports.default=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("react"),t=require("../gallery-carousel/GalleryCarousel.js"),a=require("../child/ProductGalleryGrid.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("react"),t=require("../gallery-carousel/GalleryCarousel.js"),a=require("../child/ProductGalleryGrid.js"),u=require("../child/ProductFeaturedImageCarousel.js"),l=require("../../composables/getProductImagesStyles.js"),i=require("../../composables/getProductImagesClassName.js"),d=require("../../hooks/useFeatureImageWithGallery.js"),o=require("../../common/common.js");exports.default=c=>{let{setting:n,styles:m,builderProps:g,gallery:p,onHandleClickImage:I,priorityFeatureImage:h,children:j,noDataChildren:y,isFilterByVariantEnabled:b}=c,{isEditMode:x}=r.useRenderMode(),C=s.useRef(null),f=r.useCurrentDevice(),P=s.useCallback(e=>{if(!C.current)return;let r=C.current.getSwiper();r&&r.thumbs&&r.thumbs.swiper&&r.thumbs.swiper?.realIndex===void 0&&e&&(r.thumbs.swiper=e,r.thumbs.init(),r.thumbs.update(!0),r.update())},[]),v={...n,...m},{isShowCarousel:F,featureImageHeight:q,featureWrapperImage:k,onClickFeatureArrow:w,activeIndexFromFeatureImage:G,setOnClickFeatureArrow:H,onHandleLoadedFeatureImage:N,setActiveIndexFromFeatureImage:D}=d.useFeatureImageWithGallery(c);if(p?.[0]?.id==="noImageError"&&x)return e.jsx(e.Fragment,{children:y});let{ftImageGalleryClasses:R,imageGalleryWrapperClasses:S}=i.getProductImagesClassName(c),{wrapperFeaturedImageStyle:U,featureImageStyle:A,galleryImageStyle:M}=l.getProductImagesStyles(v,{gallery:p,featureImageHeight:q}),W=o.getFeatureGalleryComponentKey(v,f,F);return e.jsxs("div",{className:r.cls("gp-grid gp-w-full gp-relative"),style:U,children:[e.jsxs("div",{className:R,style:A,children:[j,e.jsx(u.default,{ref:C,imgRef:k,productImages:p,...v,onHandleClick:(e,r)=>I(e||"",r),onHandleLoaded:N,onHandleUpdateActiveIndex:D,onClickArrow:e=>H(e),builderPropUID:g?.uid,builderPropsClass:`gp-product-images-feature-${g?.uid}`})]}),p.length>(b?0:1)&&e.jsx("div",{className:S,style:M,children:F?e.jsx(t.default,{productImages:p,position:v?.position,...v,builderPropUID:g?.uid,onHandleClick:(e,r)=>I(e||"",r),onSwiperReady:P,activeIndexFormFeatureImage:G,priorityFeatureImage:h,onClickFeatureArrow:w,builderPropsClass:`gp-product-images-gallery-${g?.uid}`}):e.jsx(a.default,{productImages:p,...v,builderPropUID:g?.uid,onHandleClick:(e,r)=>I(e||"",r),activeIndexFromFeatureImage:G,isHiddenInteraction:!0})})]},W)};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/common.js"),a=require("../../common/productFeaturedImage.js"),t=require("../../../../../video/components/HTML5Embed.liquid.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/common.js"),a=require("../../common/productFeaturedImage.js"),t=require("../../common/classes.js"),r=require("../../../../../video/components/HTML5Embed.liquid.js"),d=require("../../../../../image/components/Modal3d.liquid.js"),s=require("../../../../../image/components/NextImage.liquid.js"),u=require("../../../../../image/components/Video.liquid.js"),o=require("../../../../helpers/function.js"),l=require("../../composables/getProductImagesStyles.js"),g=require("../../composables/getProductImagesClassName.js"),m=require("../../composables/getProductImagesAttr.js"),p=require("@gem-sdk/system"),c=require("../../../../../carousel-v3/components/root/Carousel.liquid.js"),n=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js");exports.default=({builderPropUID:f,children:h,pageContext:y,...I})=>{let{featuredImageCarouselClasses:q,galleryItemClasses:_,featuredCarouselItemClasses:M}=g.getProductImagesClassName({...I,builderProps:{uid:f}}),{featuredImageCarouselStyle:v,featureImageStyle:b,featureImageCarouselOnlyOneImageStyle:w,featureImageOnlyOneImageStyle:$,featureImageCarouselItemStyle:L}=l.getProductImagesStyles(I),{featuredImageCarouselSettingAttrs:S}=m.getProductImagesAttr(I),x=i.getAspectRatio(I.ftShape),j=p.If("other"==I.hoverEffect,p.LiquidIf("product.media.size > 1","group-hover:gp-opacity-0")),R=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
|
-
${
|
|
4
|
+
${C()}
|
|
5
5
|
{% when 'external_video' %}
|
|
6
6
|
{% assign mediaSourceVideo = featureMedia | external_video_url %}
|
|
7
7
|
${z()}
|
|
@@ -11,26 +11,26 @@
|
|
|
11
11
|
{% when 'model' %}
|
|
12
12
|
${O()}
|
|
13
13
|
{% else %}
|
|
14
|
-
${
|
|
14
|
+
${E()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,O=()=>
|
|
17
|
-
${
|
|
18
|
-
${p.If(
|
|
19
|
-
${
|
|
16
|
+
`,O=()=>d.default({src:p.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}),z=()=>u.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:x}),P=()=>{let i=p.createStyle({...a.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape}),...e.makeStyleResponsive("objf",I?.ftLayout)}),t=p.createStyle({...a.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape})});return r.default({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,wrapperStyles:t,poster:{altText:"{{featureMedia.alt | escape}}"},style:{width:"100%","max-height":"100%",...i},className:"gp-invisible",pageContext:y})},C=()=>e.template`
|
|
17
|
+
${T(e.cls("gp-w-full gp-transition-opacity",j,"{{shouldHidden}}"))}
|
|
18
|
+
${p.If(I?.hoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none",a.getZoomImageClass())}">
|
|
19
|
+
${T("image-zoom",!0)}
|
|
20
20
|
</div>`," ")}
|
|
21
|
-
${p.If(
|
|
22
|
-
`,
|
|
21
|
+
${p.If(I?.hoverEffect=="zoom"&&I?.zoomType=="glasses",`<div class="${e.cls("zoom-lens-element",a.getZoomLenClass())}" style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`," ")}
|
|
22
|
+
`,T=(a,t)=>e.template`
|
|
23
23
|
{% assign src = featureMedia.src %}
|
|
24
|
-
${p.If(t&&"other"==
|
|
25
|
-
{% assign other_image_index = ${
|
|
24
|
+
${p.If(t&&"other"==I.hoverEffect,`{% assign media_length = product.media | size %}
|
|
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
|
${p.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${
|
|
33
|
-
${
|
|
32
|
+
${s.default({srcIsLiquidCode:!0,src:p.LiquidIf("src != null",i.getSrcImage("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:p.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${i.getSrcImage("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",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??""}`,pageContext:y})}`,E=()=>e.template`
|
|
33
|
+
${s.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: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",pageContext:y})}`,k=i.getPaddingBottomByShapeSetting(I.ftShape),A=a.checkRenderFeaturedCarousel(I),N="gp-featured-image-wrapper",W=p.LiquidIf("product.media.size > 0",`{% assign largestRatio = 0 %}
|
|
34
34
|
${p.LiquidFor("featureMedia in product.media",`
|
|
35
35
|
${p.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 %}
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
{% else %}
|
|
48
48
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
49
49
|
{% endcase %}`)}
|
|
50
|
-
${n.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${
|
|
50
|
+
${n.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${_("gp-ft-image-item !gp-min-w-full !gp-max-w-full ")}`,parentId:`ft-${f}-{{section.id}}-{{product.id}}`,style:L,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
51
51
|
<div
|
|
52
|
-
class="gp-w-full gp-relative ${p.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
53
|
-
style="${
|
|
52
|
+
class="gp-w-full gp-relative ${p.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")} ${p.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'",`{{ '${t.FEATURE_MEDIA_CENTER_CLASSES}' }}`)}"
|
|
53
|
+
style="${o.getStyleOfObject(e.makeStyleResponsive("pb",k))}"
|
|
54
54
|
>
|
|
55
|
-
${
|
|
55
|
+
${R()}
|
|
56
56
|
</div>
|
|
57
57
|
`})}`)}
|
|
58
|
-
`,
|
|
58
|
+
`,s.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",customLazyload:!0,pageContext:y}));return p.Liquid(`
|
|
59
59
|
{% capture featureImageOnlyOne %}
|
|
60
60
|
${p.Liquid(`
|
|
61
61
|
{% assign featureMedia = variant.featured_media %}
|
|
62
62
|
{% unless featureMedia %}
|
|
63
63
|
{% assign featureMedia = product.featured_media %}
|
|
64
64
|
{% endunless %}
|
|
65
|
-
${p.LiquidIf("product.media.size > 1",(()=>{switch(
|
|
65
|
+
${p.LiquidIf("product.media.size > 1",(()=>{switch(I?.preDisplay){case"1st-images":return`
|
|
66
66
|
{% assign featureMedia = product.media.first %}
|
|
67
67
|
`;case"1st-3d-mode":return p.LiquidFor("media in product.media",p.LiquidIf("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return p.LiquidFor("media in product.media",p.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
68
68
|
{% assign featureMedia = variant.featured_media %}
|
|
@@ -85,25 +85,25 @@
|
|
|
85
85
|
${p.LiquidIf("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
86
86
|
<div
|
|
87
87
|
class='gp-feature-image-carousel gp-feature-image-only'
|
|
88
|
-
style="${
|
|
88
|
+
style="${o.getStyleOfObject(b)}"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
91
91
|
class="gp-relative"
|
|
92
|
-
style="${
|
|
92
|
+
style="${o.getStyleOfObject($)}"
|
|
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="${M(N)}"
|
|
100
|
+
style="${o.getStyleOfObject(w)}"
|
|
101
101
|
>
|
|
102
102
|
<div
|
|
103
103
|
class="gp-w-full gp-relative ${p.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
104
|
-
style="${
|
|
104
|
+
style="${o.getStyleOfObject(e.makeStyleResponsive("pb",k))} ${p.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>
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
`)}
|
|
112
112
|
{% endcapture %}
|
|
113
113
|
${p.LiquidIf("product.media.size > 1",`
|
|
114
|
-
${p.If(
|
|
115
|
-
${
|
|
114
|
+
${p.If(A,`
|
|
115
|
+
${c.default({builderProps:{uid:f},rootId:`ft-${f}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:N,rootClass:`${q}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:S,rootStyles:b,styles:v,style:{playSpeed:600},disableMarginAuto:!0,children:W,productBadgeLiquid:h||"",carouselType:"feature_image"})}
|
|
116
116
|
`," ")}
|
|
117
|
-
${p.If(!
|
|
117
|
+
${p.If(!A,"{{ featureImageOnlyOne }}"," ")}
|
|
118
118
|
`,"{{ featureImageOnlyOne }}")}
|
|
119
119
|
`)};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/common.js"),a=require("../../common/productFeaturedImage.js"),t=require("../../common/classes.js"),r=require("../../../../../video/components/HTML5Embed.liquid.js"),d=require("../../../../../image/components/Modal3d.liquid.js"),s=require("../../../../../image/components/NextImage.liquid.js"),u=require("../../../../../image/components/Video.liquid.js"),o=require("../../../../helpers/function.js"),l=require("../../composables/getProductImagesStyles.js"),g=require("../../composables/getProductImagesClassName.js"),m=require("../../composables/getProductImagesAttr.js"),p=require("@gem-sdk/system"),c=require("../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js"),n=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js");exports.default=({builderPropUID:f,children:h,pageContext:y,...I})=>{let{featuredImageCarouselClasses:q,galleryItemClasses:_,featuredCarouselItemClasses:M}=g.getProductImagesClassName({...I,builderProps:{uid:f}}),{featuredImageCarouselStyle:b,featureImageStyle:v,featureImageCarouselOnlyOneImageStyle:w,featureImageOnlyOneImageStyle:$,featureImageCarouselItemStyle:L}=l.getProductImagesStyles(I),{featuredImageCarouselSettingAttrs:S}=m.getProductImagesAttr(I),x=i.getAspectRatio(I.ftShape),j=p.If("other"==I.hoverEffect,p.LiquidIf("product.media.size > 1","group-hover:gp-opacity-0")),R=()=>`
|
|
2
|
+
{% case featureMedia.media_type %}
|
|
3
|
+
{% when 'image' %}
|
|
4
|
+
${C()}
|
|
5
|
+
{% when 'external_video' %}
|
|
6
|
+
{% assign mediaSourceVideo = featureMedia | external_video_url %}
|
|
7
|
+
${z()}
|
|
8
|
+
{% when 'video' %}
|
|
9
|
+
{% assign mediaSourceVideo = featureMedia.sources.last.url %}
|
|
10
|
+
${P()}
|
|
11
|
+
{% when 'model' %}
|
|
12
|
+
${O()}
|
|
13
|
+
{% else %}
|
|
14
|
+
${T()}
|
|
15
|
+
{% endcase %}
|
|
16
|
+
`,O=()=>d.default({src:p.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}),z=()=>u.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:x}),P=()=>{let i=p.createStyle({...a.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape}),...e.makeStyleResponsive("objf",I?.ftLayout)}),t=p.createStyle({...a.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape})});return r.default({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,wrapperStyles:t,poster:{altText:"{{featureMedia.alt | escape}}"},style:{width:"100%","max-height":"100%",...i},className:"gp-invisible"})},C=()=>e.template`
|
|
17
|
+
${E(e.cls("gp-w-full gp-transition-opacity",j,"{{shouldHidden}}"))}
|
|
18
|
+
${p.If(I?.hoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none",a.getZoomImageClass())}">
|
|
19
|
+
${E("image-zoom",!0)}
|
|
20
|
+
</div>`," ")}
|
|
21
|
+
${p.If(I?.hoverEffect=="zoom"&&I?.zoomType=="glasses",`<div class="${e.cls("zoom-lens-element",a.getZoomLenClass())}" style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`," ")}
|
|
22
|
+
`,E=(a,t)=>e.template`
|
|
23
|
+
{% assign src = featureMedia.src %}
|
|
24
|
+
${p.If(t&&"other"==I.hoverEffect,`{% assign media_length = product.media | size %}
|
|
25
|
+
{% assign other_image_index = ${I.otherImage} | plus: 0 %}
|
|
26
|
+
{% if other_image_index >= media_length %}
|
|
27
|
+
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% assign otherImage = product.media[other_image_index] %}
|
|
30
|
+
${p.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
|
+
`)}
|
|
32
|
+
${s.default({srcIsLiquidCode:!0,src:p.LiquidIf("src != null",i.getSrcImage("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:p.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${i.getSrcImage("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",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??""}`,pageContext:y})}`,T=()=>e.template`
|
|
33
|
+
${s.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: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",pageContext:y})}`,k=i.getPaddingBottomByShapeSetting(I.ftShape),A=a.checkRenderFeaturedCarousel(I),N="gp-featured-image-wrapper",W=p.LiquidIf("product.media.size > 0",`{% assign largestRatio = 0 %}
|
|
34
|
+
${p.LiquidFor("featureMedia in product.media",`
|
|
35
|
+
${p.LiquidIf("featureMedia.media_type == 'video' and featureMedia.preview_image",`{% assign height = featureMedia.preview_image.height | times: 1.0 %}
|
|
36
|
+
{% assign width = featureMedia.preview_image.width | times: 1.0 %}`,`{% assign height = featureMedia.height | times: 1.0 %}
|
|
37
|
+
{% assign width = featureMedia.width | times: 1.0 %}`)}
|
|
38
|
+
{% assign ratio = height | divided_by: width %}
|
|
39
|
+
${p.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
40
|
+
`)}
|
|
41
|
+
${p.LiquidFor("featureMedia in product.media",`${p.LiquidIf("featureMedia.media_type == 'image'",`${p.LiquidFor("image in product.images",p.LiquidIf("image.src == featureMedia.src","{% assign imageID = image.id %}{% break %}"))}`,"{% assign imageID = '' %}")}
|
|
42
|
+
|
|
43
|
+
${p.Liquid(`{% assign productImageWidth = 0 %}
|
|
44
|
+
{% case featureMedia.media_type %}
|
|
45
|
+
{% when 'image' %}
|
|
46
|
+
{% assign productImageWidth = featureMedia.width %}
|
|
47
|
+
{% else %}
|
|
48
|
+
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
49
|
+
{% endcase %}`)}
|
|
50
|
+
${n.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${_("gp-ft-image-item !gp-min-w-full !gp-max-w-full ")}`,parentId:`ft-${f}-{{section.id}}-{{product.id}}`,style:L,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
51
|
+
<div
|
|
52
|
+
class="gp-w-full gp-relative ${p.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")} ${p.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'",`{{ '${t.FEATURE_MEDIA_CENTER_CLASSES}' }}`)}"
|
|
53
|
+
style="${o.getStyleOfObject(e.makeStyleResponsive("pb",k))}"
|
|
54
|
+
>
|
|
55
|
+
${R()}
|
|
56
|
+
</div>
|
|
57
|
+
`})}`)}
|
|
58
|
+
`,s.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",customLazyload:!0,pageContext:y}));return p.Liquid(`
|
|
59
|
+
{% capture featureImageOnlyOne %}
|
|
60
|
+
${p.Liquid(`
|
|
61
|
+
{% assign featureMedia = variant.featured_media %}
|
|
62
|
+
{% unless featureMedia %}
|
|
63
|
+
{% assign featureMedia = product.featured_media %}
|
|
64
|
+
{% endunless %}
|
|
65
|
+
${p.LiquidIf("product.media.size > 1",(()=>{switch(I?.preDisplay){case"1st-images":return`
|
|
66
|
+
{% assign featureMedia = product.media.first %}
|
|
67
|
+
`;case"1st-3d-mode":return p.LiquidFor("media in product.media",p.LiquidIf("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return p.LiquidFor("media in product.media",p.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
68
|
+
{% assign featureMedia = variant.featured_media %}
|
|
69
|
+
{% unless featureMedia %}
|
|
70
|
+
{% assign featureMedia = product.featured_media %}
|
|
71
|
+
{% endunless %}
|
|
72
|
+
`}})())}
|
|
73
|
+
{% assign largestRatio = 0 %}
|
|
74
|
+
{% assign height = featureMedia.height | times: 1.0 %}
|
|
75
|
+
{% assign width = featureMedia.width | times: 1.0 %}
|
|
76
|
+
{% assign ratio = height | divided_by: width %}
|
|
77
|
+
${p.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
78
|
+
{% assign productImageWidth = 0 %}
|
|
79
|
+
{% case featureMedia.media_type %}
|
|
80
|
+
{% when 'image' %}
|
|
81
|
+
{% assign productImageWidth = featureMedia.width %}
|
|
82
|
+
{% else %}
|
|
83
|
+
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
84
|
+
{% endcase %}
|
|
85
|
+
${p.LiquidIf("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
86
|
+
<div
|
|
87
|
+
class='gp-feature-image-carousel gp-feature-image-only'
|
|
88
|
+
style="${o.getStyleOfObject(v)}"
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
class="gp-relative"
|
|
92
|
+
style="${o.getStyleOfObject($)}"
|
|
93
|
+
>
|
|
94
|
+
${h}
|
|
95
|
+
<div
|
|
96
|
+
type="gp-feature-image-only"
|
|
97
|
+
product-id="{{product.id}}"
|
|
98
|
+
product-media="{{product.media.size}}"
|
|
99
|
+
class="${M(N)}"
|
|
100
|
+
style="${o.getStyleOfObject(w)}"
|
|
101
|
+
>
|
|
102
|
+
<div
|
|
103
|
+
class="gp-w-full gp-relative ${p.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
104
|
+
style="${o.getStyleOfObject(e.makeStyleResponsive("pb",k))} ${p.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
105
|
+
>
|
|
106
|
+
${R()}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
`)}
|
|
112
|
+
{% endcapture %}
|
|
113
|
+
${p.LiquidIf("product.media.size > 1",`
|
|
114
|
+
${p.If(A,`
|
|
115
|
+
${c.default({builderProps:{uid:f},rootId:`ft-${f}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:N,rootClass:`${q}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:S,rootStyles:v,styles:b,style:{playSpeed:600},disableMarginAuto:!0,children:W,productBadgeLiquid:h||"",carouselType:"feature_image"})}
|
|
116
|
+
`," ")}
|
|
117
|
+
${p.If(!A,"{{ featureImageOnlyOne }}"," ")}
|
|
118
|
+
`,"{{ featureImageOnlyOne }}")}
|
|
119
|
+
`)};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../../../../image/components/NextImage.liquid.js"),t=require("../../common/common.js"),o=require("../../common/productGallery.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../../../../image/components/NextImage.liquid.js"),t=require("../../common/common.js"),o=require("../../common/productGallery.js"),s=require("../../../../helpers/function.js"),r=require("../../composables/getProductImagesStyles.js"),a=require("../../composables/getProductImagesClassName.js"),l=require("../../composables/getProductImagesAttr.js"),d=require("@gem-sdk/system"),p=require("../../../../../carousel-v3/components/root/Carousel.liquid.js"),g=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js");exports.default=({builderPropUID:u,children:m,pageContext:n,...c})=>{let{featuredImageGalleryClasses:C,galleryItemClasses:h}=a.getProductImagesClassName(c),{galleryCarouselSettingAttrs:y}=l.getProductImagesAttr(c),{galleryCarouselStyle:v,galleryCarouselItemStyle:f}=r.getProductImagesStyles(c),L=o.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=(o,s)=>e.template`${i.default({srcIsLiquidCode:!0,src:`${t.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:o,baseSrc:"{{media.preview_image | image_url}}",style:s,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer",pageContext:n})}`,I=e=>`
|
|
2
2
|
${d.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
3
|
${d.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
4
|
${d.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
-
${g.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${
|
|
5
|
+
${g.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${u}-{{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
|
+
${b({aspectRatio:t.getAspectRatio(L),layout:c?.layout,qualityPercent:c?.qualityPercent,qualityType:c?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
11
|
${d.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">
|
|
@@ -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="${s.getStyleOfObject(o.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
|
-
${d.LiquidIf("media.id == product.featured_media.id ",
|
|
45
|
-
${p.default({builderProps:{uid:
|
|
43
|
+
`})}`,q=d.LiquidIf("product.media.size > 1",d.LiquidFor("media in product.media",`${d.LiquidIf("media.media_type == 'image'",d.LiquidFor("image in product.images",d.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${d.LiquidIf("media.id == product.featured_media.id ",I(c?.borderActive?.border!=="none"?"active":""),I())}`));return e.template`
|
|
45
|
+
${p.default({builderProps:{uid:u},rootId:`${u}-{{product.id}}`,rootClass:`${C}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=o.getCarouselVerticalConfigByPosition(c.position),i=[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` ${i.join(" ")}`})(),slidesClass:o.getMinHeightByPosition(c.position,c.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:y,rootStyles:{...(()=>{let i=(i,t,o)=>{let s=e.getResponsiveValueByScreen(t,o),r=e.getResponsiveValueByScreen(i,o),a="slider"===r&&("bottom-center"===s||"inside-bottom"===s),l=["left","right","inside-left","inside-right"].includes(s??"");return l||a},s=o.checkDisplayGalleryByWidth({shapeByLayout:L}),r={desktop:s.desktop&&i(c.type,c.position,"desktop"),tablet:s.tablet&&i(c.type,c.position,"tablet"),mobile:s.mobile&&i(c.type,c.position,"mobile")};return t.getDisplayStyle(e=>!r[e],"flex")})()},styles:v,disableMarginAuto:!0,children:q,shouldInitByLayout:t.getGalleryCarouselShouldInitByLayout(c.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};
|