@gem-sdk/components 22.0.0-dev.55 → 22.0.0-dev.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/article/components/ArticleImage.liquid.js +2 -2
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/common/classes.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/common/liquidSrcset.js +1 -0
- package/dist/cjs/image/common/srcset.js +1 -0
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +9 -11
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +4 -5
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
- package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +41 -41
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +25 -25
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +38 -38
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +37 -37
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +24 -24
- package/dist/cjs/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +3 -3
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/common/classes.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/common/liquidSrcset.js +1 -0
- package/dist/esm/image/common/srcset.js +1 -0
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
- package/dist/esm/image/components/Image.liquid.js +3 -3
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +5 -6
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +16 -16
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +6 -6
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +18 -18
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +18 -18
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +6 -6
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
- package/dist/esm/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +8 -8
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +15 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
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"),
|
|
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/common/liquidSrcset.js"),o=require("../../../../../image/components/Video.liquid.js"),l=require("../../../../helpers/function.js"),g=require("../../composables/getProductImagesStyles.js"),m=require("../../composables/getProductImagesClassName.js"),p=require("../../composables/getProductImagesAttr.js"),c=require("@gem-sdk/system"),n=require("../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js"),f=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js");exports.default=({builderPropUID:h,children:y,pageContext:q,...I})=>{let{featuredImageCarouselClasses:_,galleryItemClasses:M,featuredCarouselItemClasses:b}=m.getProductImagesClassName({...I,builderProps:{uid:h}}),{featuredImageCarouselStyle:v,featureImageStyle:w,featureImageCarouselOnlyOneImageStyle:$,featureImageOnlyOneImageStyle:L,featureImageCarouselItemStyle:S}=g.getProductImagesStyles(I),{featuredImageCarouselSettingAttrs:x}=p.getProductImagesAttr(I),j=i.getAspectRatio(I.ftShape),P=c.If("other"==I.hoverEffect,c.LiquidIf("product.media.size > 1","group-hover:gp-opacity-0")),R=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
4
|
${C()}
|
|
@@ -7,64 +7,64 @@
|
|
|
7
7
|
${z()}
|
|
8
8
|
{% when 'video' %}
|
|
9
9
|
{% assign mediaSourceVideo = featureMedia.sources.last.url %}
|
|
10
|
-
${
|
|
10
|
+
${T()}
|
|
11
11
|
{% when 'model' %}
|
|
12
12
|
${O()}
|
|
13
13
|
{% else %}
|
|
14
|
-
${
|
|
14
|
+
${k()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,O=()=>d.default({src:
|
|
17
|
-
${E(e.cls("gp-w-full gp-transition-opacity",
|
|
18
|
-
${
|
|
16
|
+
`,O=()=>d.default({src:c.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:j}),z=()=>o.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:j}),T=()=>{let i=c.createStyle({...a.getVideoHeight({ftLayout:I?.ftLayout,ftShape:I?.ftShape}),...e.makeStyleResponsive("objf",I?.ftLayout)}),t=c.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",P,"{{shouldHidden}}"))}
|
|
18
|
+
${c.If(I?.hoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none",a.getZoomImageClass())}">
|
|
19
19
|
${E("image-zoom",!0)}
|
|
20
20
|
</div>`," ")}
|
|
21
|
-
${
|
|
22
|
-
`,E=(a,
|
|
21
|
+
${c.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=(i,a)=>{let t=u.getLiquidImageSrcset({liquidSrc:"src",sizeTarget:"ProductFeatureImage",qualityType:I.qualityType,qualityPercent:I.qualityPercent});return e.template`
|
|
23
23
|
{% assign src = featureMedia.src %}
|
|
24
|
-
${
|
|
24
|
+
${c.If(a&&"other"==I.hoverEffect,`{% assign media_length = product.media | size %}
|
|
25
25
|
{% assign other_image_index = ${I.otherImage} | plus: 0 %}
|
|
26
26
|
{% if other_image_index >= media_length %}
|
|
27
27
|
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
28
|
{% endif %}
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
|
-
${
|
|
30
|
+
${c.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${s.default({srcIsLiquidCode:!0,src:
|
|
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:
|
|
34
|
-
${
|
|
35
|
-
${
|
|
32
|
+
${s.default({srcIsLiquidCode:!0,src:c.LiquidIf("src != null",t,"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:c.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:t,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:I?.ftLayout,aspectRatio:j,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 ${i??""}`})}`},k=()=>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:j,qualityType:I?.qualityType,qualityPercent:I?.qualityPercent},priority:I?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none"})}`,A=i.getPaddingBottomByShapeSetting(I.ftShape),N=a.checkRenderFeaturedCarousel(I),F="gp-featured-image-wrapper",W=c.LiquidIf("product.media.size > 0",`{% assign largestRatio = 0 %}
|
|
34
|
+
${c.LiquidFor("featureMedia in product.media",`
|
|
35
|
+
${c.LiquidIf("featureMedia.media_type == 'video' and featureMedia.preview_image",`{% assign height = featureMedia.preview_image.height | times: 1.0 %}
|
|
36
36
|
{% assign width = featureMedia.preview_image.width | times: 1.0 %}`,`{% assign height = featureMedia.height | times: 1.0 %}
|
|
37
37
|
{% assign width = featureMedia.width | times: 1.0 %}`)}
|
|
38
38
|
{% assign ratio = height | divided_by: width %}
|
|
39
|
-
${
|
|
39
|
+
${c.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
40
40
|
`)}
|
|
41
|
-
${
|
|
41
|
+
${c.LiquidFor("featureMedia in product.media",`${c.LiquidIf("featureMedia.media_type == 'image'",`${c.LiquidFor("image in product.images",c.LiquidIf("image.src == featureMedia.src","{% assign imageID = image.id %}{% break %}"))}`,"{% assign imageID = '' %}")}
|
|
42
42
|
|
|
43
|
-
${
|
|
43
|
+
${c.Liquid(`{% assign productImageWidth = 0 %}
|
|
44
44
|
{% case featureMedia.media_type %}
|
|
45
45
|
{% when 'image' %}
|
|
46
46
|
{% assign productImageWidth = featureMedia.width %}
|
|
47
47
|
{% else %}
|
|
48
48
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
49
49
|
{% endcase %}`)}
|
|
50
|
-
${
|
|
50
|
+
${f.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${M("gp-ft-image-item !gp-min-w-full !gp-max-w-full ")}`,parentId:`ft-${h}-{{section.id}}-{{product.id}}`,style:S,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
51
51
|
<div
|
|
52
|
-
class="gp-w-full gp-relative ${
|
|
53
|
-
style="${
|
|
52
|
+
class="gp-w-full gp-relative ${c.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")} ${c.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'",`{{ '${t.FEATURE_MEDIA_CENTER_CLASSES}' }}`)}"
|
|
53
|
+
style="${l.getStyleOfObject(e.makeStyleResponsive("pb",A))}"
|
|
54
54
|
>
|
|
55
55
|
${R()}
|
|
56
56
|
</div>
|
|
57
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:
|
|
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:j,qualityType:I?.qualityType,qualityPercent:I?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none"}));return c.Liquid(`
|
|
59
59
|
{% capture featureImageOnlyOne %}
|
|
60
|
-
${
|
|
60
|
+
${c.Liquid(`
|
|
61
61
|
{% assign featureMedia = variant.featured_media %}
|
|
62
62
|
{% unless featureMedia %}
|
|
63
63
|
{% assign featureMedia = product.featured_media %}
|
|
64
64
|
{% endunless %}
|
|
65
|
-
${
|
|
65
|
+
${c.LiquidIf("product.media.size > 1",(()=>{switch(I?.preDisplay){case"1st-images":return`
|
|
66
66
|
{% assign featureMedia = product.media.first %}
|
|
67
|
-
`;case"1st-3d-mode":return
|
|
67
|
+
`;case"1st-3d-mode":return c.LiquidFor("media in product.media",c.LiquidIf("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return c.LiquidFor("media in product.media",c.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
68
68
|
{% assign featureMedia = variant.featured_media %}
|
|
69
69
|
{% unless featureMedia %}
|
|
70
70
|
{% assign featureMedia = product.featured_media %}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
75
75
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
76
76
|
{% assign ratio = height | divided_by: width %}
|
|
77
|
-
${
|
|
77
|
+
${c.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
78
78
|
{% assign productImageWidth = 0 %}
|
|
79
79
|
{% case featureMedia.media_type %}
|
|
80
80
|
{% when 'image' %}
|
|
@@ -82,26 +82,26 @@
|
|
|
82
82
|
{% else %}
|
|
83
83
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
84
84
|
{% endcase %}
|
|
85
|
-
${
|
|
85
|
+
${c.LiquidIf("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
86
86
|
<div
|
|
87
87
|
class='gp-feature-image-carousel gp-feature-image-only'
|
|
88
|
-
style="${
|
|
88
|
+
style="${l.getStyleOfObject(w)}"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
91
91
|
class="gp-relative"
|
|
92
|
-
style="${
|
|
92
|
+
style="${l.getStyleOfObject(L)}"
|
|
93
93
|
>
|
|
94
|
-
${
|
|
94
|
+
${y}
|
|
95
95
|
<div
|
|
96
96
|
type="gp-feature-image-only"
|
|
97
97
|
product-id="{{product.id}}"
|
|
98
98
|
product-media="{{product.media.size}}"
|
|
99
|
-
class="${
|
|
100
|
-
style="${
|
|
99
|
+
class="${b(F)}"
|
|
100
|
+
style="${l.getStyleOfObject($)}"
|
|
101
101
|
>
|
|
102
102
|
<div
|
|
103
|
-
class="gp-w-full gp-relative ${
|
|
104
|
-
style="${
|
|
103
|
+
class="gp-w-full gp-relative ${c.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
104
|
+
style="${l.getStyleOfObject(e.makeStyleResponsive("pb",A))} ${c.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
105
105
|
>
|
|
106
106
|
${R()}
|
|
107
107
|
</div>
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
</div>
|
|
111
111
|
`)}
|
|
112
112
|
{% endcapture %}
|
|
113
|
-
${
|
|
114
|
-
${
|
|
115
|
-
${
|
|
113
|
+
${c.LiquidIf("product.media.size > 1",`
|
|
114
|
+
${c.If(N,`
|
|
115
|
+
${n.default({builderProps:{uid:h},rootId:`ft-${h}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:F,rootClass:`${_}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:x,rootStyles:w,styles:v,style:{playSpeed:600},disableMarginAuto:!0,children:W,productBadgeLiquid:y||"",carouselType:"feature_image"})}
|
|
116
116
|
`," ")}
|
|
117
|
-
${
|
|
117
|
+
${c.If(!N,"{{ featureImageOnlyOne }}"," ")}
|
|
118
118
|
`,"{{ featureImageOnlyOne }}")}
|
|
119
119
|
`)};
|
|
@@ -1,20 +1,20 @@
|
|
|
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"),
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../../../../image/components/NextImage.liquid.js"),t=require("../../../../../image/common/liquidSrcset.js"),o=require("../../common/common.js"),r=require("../../common/productGallery.js"),s=require("../../../../helpers/function.js"),a=require("../../composables/getProductImagesStyles.js"),l=require("../../composables/getProductImagesClassName.js"),d=require("../../composables/getProductImagesAttr.js"),p=require("@gem-sdk/system"),g=require("../../../../../carousel-v3/components/root/Carousel.liquid.js"),u=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js");exports.default=({builderPropUID:m,children:n,pageContext:c,...C})=>{let{featuredImageGalleryClasses:y,galleryItemClasses:h}=l.getProductImagesClassName(C),{galleryCarouselSettingAttrs:v}=d.getProductImagesAttr(C),{galleryCarouselStyle:L,galleryCarouselItemStyle:f}=a.getProductImagesStyles(C),q=r.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=t.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:C.qualityType,qualityPercent:C.qualityPercent}),I=(t,o)=>e.template`${i.default({srcIsLiquidCode:!0,src:b,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",style:o,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,w=e=>`
|
|
2
|
+
${p.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${p.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${p.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${u.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${m}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:f,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative gp-h-full"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${
|
|
9
|
+
${I({aspectRatio:o.getAspectRatio(q),layout:C?.layout,qualityPercent:C?.qualityPercent,qualityType:C?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${p.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
12
12
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
14
14
|
<path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
|
|
15
15
|
</svg>
|
|
16
16
|
</div>`)}
|
|
17
|
-
${
|
|
17
|
+
${p.LiquidIf("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
18
18
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
20
20
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>`)}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${s.getStyleOfObject(
|
|
25
|
+
style="${s.getStyleOfObject(r.getZoomDisplay(C?.clickOpenLightBox))}"
|
|
26
26
|
>
|
|
27
27
|
<svg
|
|
28
28
|
height="100%"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
`})}`,
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,F=p.LiquidIf("product.media.size > 1",p.LiquidFor("media in product.media",`${p.LiquidIf("media.media_type == 'image'",p.LiquidFor("image in product.images",p.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${p.LiquidIf("media.id == product.featured_media.id ",w(C?.borderActive?.border!=="none"?"active":""),w())}`));return e.template`
|
|
45
|
+
${g.default({builderProps:{uid:m},rootId:`${m}-{{product.id}}`,rootClass:`${y}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=r.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:r.getMinHeightByPosition(C.position,C.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:v,rootStyles:{...(()=>{let i=(i,t,o)=>{let r=e.getResponsiveValueByScreen(t,o),s=e.getResponsiveValueByScreen(i,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),l=["left","right","inside-left","inside-right"].includes(r??"");return l||a},t=r.checkDisplayGalleryByWidth({shapeByLayout:q}),s={desktop:t.desktop&&i(C.type,C.position,"desktop"),tablet:t.tablet&&i(C.type,C.position,"tablet"),mobile:t.mobile&&i(C.type,C.position,"mobile")};return o.getDisplayStyle(e=>!s[e],"flex")})()},styles:L,disableMarginAuto:!0,children:F,shouldInitByLayout:o.getGalleryCarouselShouldInitByLayout(C.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../../../../image/components/NextImage.liquid.js"),t=require("../../common/common.js"),
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../../../../image/components/NextImage.liquid.js"),t=require("../../../../../image/common/liquidSrcset.js"),o=require("../../common/common.js"),r=require("../../common/productGallery.js"),a=require("../../../../helpers/function.js"),s=require("../../composables/getProductImagesStyles.js"),l=require("../../composables/getProductImagesClassName.js"),d=require("../../composables/getProductImagesAttr.js"),p=require("@gem-sdk/system"),g=require("../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js"),u=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js");exports.default=({builderPropUID:m,children:n,pageContext:c,...C})=>{let{featuredImageGalleryClasses:y,galleryItemClasses:h}=l.getProductImagesClassName(C),{galleryCarouselSettingAttrs:v}=d.getProductImagesAttr(C),{galleryCarouselStyle:L,galleryCarouselItemStyle:f}=s.getProductImagesStyles(C),b=r.getShapeByLayout({shape:C.shape,shapeForBottom:C.shapeForBottom,shapeFor1Col:C.shapeFor1Col,shapeFor2Col:C.shapeFor2Col,shapeForFtOnly:C.shapeForFtOnly,shapeForInsideBottom:C.shapeForInsideBottom,shapeForInside:C.shapeForInside},C.position),q=t.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:C.qualityType,qualityPercent:C.qualityPercent}),I=(t,o)=>e.template`${i.default({srcIsLiquidCode:!0,src:q,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",style:o,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,w=e=>`
|
|
2
|
+
${p.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${p.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${p.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${u.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${e??""}`)}`,parentId:`${m}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:f,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative gp-h-full"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${
|
|
9
|
+
${I({aspectRatio:o.getAspectRatio(b),layout:C?.layout,qualityPercent:C?.qualityPercent,qualityType:C?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${p.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
12
12
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
14
14
|
<path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
|
|
15
15
|
</svg>
|
|
16
16
|
</div>`)}
|
|
17
|
-
${
|
|
17
|
+
${p.LiquidIf("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
18
18
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
20
20
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>`)}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${a.getStyleOfObject(r.getZoomDisplay(C?.clickOpenLightBox))}"
|
|
26
26
|
>
|
|
27
27
|
<svg
|
|
28
28
|
height="100%"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
`})}`,
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,F=p.LiquidIf("product.media.size > 1",p.LiquidFor("media in product.media",`${p.LiquidIf("media.media_type == 'image'",p.LiquidFor("image in product.images",p.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${p.LiquidIf("media.id == product.featured_media.id ",w(C?.borderActive?.border!=="none"?"active":""),w())}`));return e.template`
|
|
45
|
+
${g.default({builderProps:{uid:m},rootId:`${m}-{{product.id}}`,rootClass:`${y}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=r.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:r.getMinHeightByPosition(C.position,C.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:v,rootStyles:{...(()=>{let i=(i,t,o)=>{let r=e.getResponsiveValueByScreen(t,o),a=e.getResponsiveValueByScreen(i,o),s="slider"===a&&("bottom-center"===r||"inside-bottom"===r),l=["left","right","inside-left","inside-right"].includes(r??"");return l||s},t=r.checkDisplayGalleryByWidth({shapeByLayout:b}),a={desktop:t.desktop&&i(C.type,C.position,"desktop"),tablet:t.tablet&&i(C.type,C.position,"tablet"),mobile:t.mobile&&i(C.type,C.position,"mobile")};return o.getDisplayStyle(e=>!a[e],"flex")})()},styles:L,disableMarginAuto:!0,children:F,shouldInitByLayout:o.getGalleryCarouselShouldInitByLayout(C.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};
|
package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("@gem-sdk/system"),
|
|
2
|
-
${
|
|
3
|
-
${i.If(
|
|
4
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("@gem-sdk/system"),t=require("../../../../../image/components/Modal3d.liquid.js"),a=require("../../../../../image/components/NextImage.liquid.js"),s=require("../../../../../image/common/liquidSrcset.js"),d=require("../../../../../image/components/Video.liquid.js"),o=require("../../../../../video/components/HTML5Embed.liquid.js"),r=require("../../../../helpers/function.js"),l=require("../../common/common.js"),m=require("../../common/productFeaturedImage.js"),p=require("../../common/productGallery.js"),u=require("../../composables/getProductImagesClassName.js"),g=require("../../composables/getProductImagesStyles.js");exports.default=({builderPropUID:c,wrapperStyle:n,children:y,pageContext:h,...f})=>{let{galleryItemClasses:v,galleryGridWrapperClasses:C}=u.getProductImagesClassName(f),{galleryGridStyles:q,galleryGridItemStyles:L}=g.getProductImagesStyles(f),w=p.getShapeByLayout({shape:f.shape,shapeForBottom:f.shapeForBottom,shapeFor1Col:f.shapeFor1Col,shapeFor2Col:f.shapeFor2Col,shapeForFtOnly:f.shapeForFtOnly,shapeForInsideBottom:f.shapeForInsideBottom,shapeForInside:f.shapeForInside},f.position),_=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(a=>{let s=e.getResponsiveValueByScreen(f?.position,a)||"",d="one-col"===s||"two-col"===s;t[a]=(i?!d:d)?"block":"none"}),e.makeStyleResponsive("d",t)},b=()=>_(),I=()=>_(!0),$=s.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"ProductFeatureImage",qualityType:f.qualityType,qualityPercent:f.qualityPercent}),x=(t,s)=>e.template`
|
|
2
|
+
${a.default({srcIsLiquidCode:!0,src:$,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:t,style:s,className:"!gp-rounded-none"})}
|
|
3
|
+
${i.If(f?.galleryHoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",m.getZoomImageClass())}">
|
|
4
|
+
${a.default({srcIsLiquidCode:!0,src:$,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:t,style:s,className:"!gp-rounded-none gp-w-full gp-h-full"})}
|
|
5
5
|
</div>`," ")}
|
|
6
|
-
${i.If(
|
|
6
|
+
${i.If(f?.galleryHoverEffect=="zoom"&&f?.galleryZoomType=="glasses",`<div class="${e.cls("zoom-lens-element",m.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
|
|
9
|
+
`,S=()=>t.default({src:i.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:l.getAspectRatio(w)}),F=()=>d.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),j=()=>o.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),V=()=>e.template`
|
|
10
10
|
${i.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
20
20
|
</svg>
|
|
21
21
|
</div>`)}
|
|
22
|
-
${
|
|
22
|
+
${x({aspectRatio:l.getAspectRatio(w),layout:f?.layout,qualityType:f?.qualityType,qualityPercent:f?.qualityPercent},{width:"100%",height:"100%"})}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${r.getStyleOfObject(p.getZoomDisplay(f?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
|
-
`,
|
|
42
|
+
`,k=t=>`
|
|
43
43
|
${i.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
44
|
${i.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
45
|
${i.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
@@ -53,41 +53,41 @@
|
|
|
53
53
|
external-id="{{media.external_id}}"
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
55
|
data-outline="none"
|
|
56
|
-
class="${
|
|
57
|
-
style="${
|
|
56
|
+
class="${v(`gem-slider-item-${c}-{{product.id}} gp-gallery-image-item ${t??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
|
|
57
|
+
style="${r.getStyleOfObject(L)}"
|
|
58
58
|
>
|
|
59
59
|
${i.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
61
|
${i.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-w-full" style="${i.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${i.LiquidIf("isVideo == true",
|
|
64
|
-
${i.LiquidIf("media != null",
|
|
63
|
+
<div class="gp-w-full" style="${i.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${i.LiquidIf("isVideo == true",r.getStyleOfObject({...I()}))}">
|
|
64
|
+
${i.LiquidIf("media != null",V(),M())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="${i.LiquidIf("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${i.LiquidIf("isMedia",
|
|
68
|
+
style="${i.LiquidIf("isMedia",r.getStyleOfObject({...e.makeStyleResponsive("aspect",l.getAspectRatio(w))}))} ${r.getStyleOfObject({...b()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
72
72
|
{% assign mediaSourceVideo = media | external_video_url %}
|
|
73
|
-
${
|
|
73
|
+
${F()}
|
|
74
74
|
{% when 'video' %}
|
|
75
75
|
{% assign mediaSourceVideo = media.sources.last.url %}
|
|
76
|
-
${
|
|
76
|
+
${j()}
|
|
77
77
|
{% when 'model' %}
|
|
78
|
-
${
|
|
78
|
+
${S()}
|
|
79
79
|
{% endcase %}
|
|
80
80
|
</div>
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
|
-
</div>`,
|
|
84
|
-
${
|
|
83
|
+
</div>`,M=()=>e.template`
|
|
84
|
+
${a.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:{aspectRatio:l.getAspectRatio(w),layout:f?.layout,qualityType:f?.qualityType,qualityPercent:f?.qualityPercent},className:"!gp-rounded-none"})}`;return i.Liquid(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
|
-
class="${
|
|
87
|
-
style="${
|
|
86
|
+
class="${C}"
|
|
87
|
+
style="${r.getStyleOfObject(q)}}"
|
|
88
88
|
>
|
|
89
89
|
${i.LiquidFor("media in product.media",`${i.LiquidIf("media.media_type == 'image'",i.LiquidFor("image in product.images",i.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
|
-
${i.LiquidIf("media.id == product.featured_media.id ",
|
|
91
|
-
${i.LiquidIf("product.media.size > 0",
|
|
92
|
-
${i.LiquidIf("product.media.size < 1",
|
|
90
|
+
${i.LiquidIf("media.id == product.featured_media.id ",k(f?.borderActive?.border!=="none"?"active":""),k())}`)}
|
|
91
|
+
${i.LiquidIf("product.media.size > 0",y)}
|
|
92
|
+
${i.LiquidIf("product.media.size < 1",k())}
|
|
93
93
|
</div>`)};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../image/components/NextImage.liquid.js"),s=require("../../helpers.js"),o=require("@gem-sdk/system"),a=require("../common/classes.js"),i=require("../common/styles.js"),r=require("../common/attrs.js");exports.default=l=>{let d=`gp-video-${l.uid}`,{thumbnail:n,muted:u,autoplay:c,loop:m,controls:v,src:p,style:g,title:y,className:f,lazy:$,poster:h,wrapperStyles:b
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../image/components/NextImage.liquid.js"),s=require("../../helpers.js"),o=require("@gem-sdk/system"),a=require("../common/classes.js"),i=require("../common/styles.js"),r=require("../common/attrs.js");exports.default=l=>{let d=`gp-video-${l.uid}`,{thumbnail:n,muted:u,autoplay:c,loop:m,controls:v,src:p,style:g,title:y,className:f,lazy:$,poster:h,wrapperStyles:b}=l,L=c&&u&&!!n,A=!$&&l.isVideoComponent,P=!n||c&&u,E=A?p:void 0,C=o.createAttr({...r.getHtml5Attr({videoId:d,title:y,autoplay:c,preloadThumbnail:L,offLazyLoad:A,src:p,thumbnail:n})}),S=o.createClass({...a.getWrapThumbnailClasses(P)}),T=o.createStyle({...i.getPreloadImageStyle()}),w=o.createClass({...a.getButtonThumbnailClasses()}),j=o.createClass({...a.getImageThumbnailClasses()}),q=o.createClass({...a.getVideoYoutubeClasses(f,A)});return e.template`
|
|
2
2
|
<gp-lite-html5-embed is-check-loaded="${l.isCheckLoaded??!1}" style="${b}">
|
|
3
|
-
${
|
|
3
|
+
${L?e.template`${t.default({src:n,alt:y,priority:h?.preload,style:T})}
|
|
4
4
|
${o.If(c,`<script>
|
|
5
5
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
6
6
|
const eventList = ["keydown", "mousemove", "wheel", "touchmove", "touchstart", "touchend"];
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
</script>`)}
|
|
37
37
|
`:""}
|
|
38
38
|
<video
|
|
39
|
-
${{...
|
|
39
|
+
${{...C}}
|
|
40
40
|
style="${g}"
|
|
41
|
-
class="${
|
|
41
|
+
class="${q}"
|
|
42
42
|
${v?"controls":void 0}
|
|
43
43
|
${m?"loop":void 0}
|
|
44
44
|
${u?"muted":void 0}
|
|
45
45
|
${c?"autoplay":void 0}
|
|
46
46
|
playsinline
|
|
47
|
-
${
|
|
47
|
+
${E?`src="${E}"`:""}
|
|
48
48
|
></video>
|
|
49
|
-
${o.If(!
|
|
49
|
+
${o.If(!P,e.template`
|
|
50
50
|
<div
|
|
51
51
|
role="presentation"
|
|
52
52
|
style="${g}"
|
|
53
|
-
class="${
|
|
53
|
+
class="${S}"
|
|
54
54
|
>
|
|
55
|
-
${t.default({id:"video-thumbnail",src:n??"",alt:h?.altText,title:h?.imageTitle,className:
|
|
56
|
-
<button type="button" class="${
|
|
55
|
+
${t.default({id:"video-thumbnail",src:n??"",alt:h?.altText,title:h?.imageTitle,className:j,isDisableAspectStyle:!0,priority:h?.preload})}
|
|
56
|
+
<button type="button" class="${w}" aria-label="Play">
|
|
57
57
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
58
58
|
<path
|
|
59
59
|
fill="currentColor"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../helpers.js"),s=require("@gem-sdk/system"),a=require("../common/classes.js"),l=require("../common/styles.js"),r=require("../common/helpers.js"),i=require("../../image/components/NextImage.liquid.js");exports.default=c=>{let{title:o,id:m,lazy:p,aspectRatio:d,autoplay:g,muted:n,thumbnailLink:u,poster:y,translatedVideoUrl:f
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../helpers.js"),s=require("@gem-sdk/system"),a=require("../common/classes.js"),l=require("../common/styles.js"),r=require("../common/helpers.js"),i=require("../../image/components/NextImage.liquid.js");exports.default=c=>{let{title:o,id:m,lazy:p,aspectRatio:d,autoplay:g,muted:n,thumbnailLink:u,poster:y,translatedVideoUrl:f}=c,{iframeSrc:$}=r.getVimeoParams(c),v=!p,S=c.thumbnail,b=s.createStateOrContext({id:m,thumbnail:u,lazy:p,iframeSrc:$,title:o,autoplay:g,muted:n,style:c?.vimeoStyleIframe||"",translatedVideoUrl:f}),h=s.createStyle({...l.getIframeVimeoStyle(d)}),C=s.createStyle({...l.getArticleVimeoStyle(d,"")}),j=s.createClass({...a.getArticleVimeoClasses(S,d)}),I=s.createClass({...a.getImageVimeoClasses(v)}),V=s.createClass({...a.getButtonVimeoClasses(v)}),q=s.createClass({...a.getIframeVimeoClasses()});return e.template`
|
|
2
2
|
<gp-lite-vimeo-embed>
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(b)}</script>
|
|
4
4
|
<article
|
|
5
5
|
aria-hidden
|
|
6
|
-
class="${
|
|
6
|
+
class="${j}"
|
|
7
7
|
data-title="${o}"
|
|
8
|
-
style="${
|
|
8
|
+
style="${C}"
|
|
9
9
|
>
|
|
10
|
-
${i.default({src:
|
|
11
|
-
${s.If(!
|
|
12
|
-
<button type="button" class="${
|
|
10
|
+
${i.default({src:S,alt:y?.altText,title:y?.imageTitle,className:I,isDisableAspectStyle:!0,priority:y?.preload,height:y?.height,width:y?.width})}
|
|
11
|
+
${s.If(!v,e.template`
|
|
12
|
+
<button type="button" class="${V}" aria-label="Play">
|
|
13
13
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
14
14
|
<path
|
|
15
15
|
fill="currentColor"
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
/>
|
|
18
18
|
</svg>
|
|
19
19
|
</button>`)}
|
|
20
|
-
${s.If(
|
|
20
|
+
${s.If(v,e.template`
|
|
21
21
|
<iframe
|
|
22
|
-
style="${
|
|
22
|
+
style="${h}"
|
|
23
23
|
title="${o}"
|
|
24
24
|
frameborder="0"
|
|
25
25
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
26
26
|
allowfullscreen
|
|
27
|
-
src="${
|
|
28
|
-
class="${
|
|
27
|
+
src="${$}"
|
|
28
|
+
class="${q}"
|
|
29
29
|
></iframe>`)}
|
|
30
30
|
</article>
|
|
31
31
|
</gp-lite-vimeo-embed>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../image/components/NextImage.liquid.js"),s=require("../../helpers.js"),a=require("@gem-sdk/system"),r=require("../common/classes.js"),l=require("../common/styles.js"),i=require("../common/helpers.js");exports.default=o=>{let{style:u,iframeClass:c,wrapperClass:p,title:d,poster:n,translatedVideoUrl:m,autoplay:g
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../image/components/NextImage.liquid.js"),s=require("../../helpers.js"),a=require("@gem-sdk/system"),r=require("../common/classes.js"),l=require("../common/styles.js"),i=require("../common/helpers.js");exports.default=o=>{let{style:u,iframeClass:c,wrapperClass:p,title:d,poster:n,translatedVideoUrl:m,autoplay:g}=o,y=`gp-video-${o.uid}`,{posterUrl:b,iframeSrc:f}=i.getYoutubeParams(o),$=!!o.thumbnail,C=n?.preload,S=a.createStateOrContext({lazy:o.lazy,hasThumbnail:$,style:u,title:d,iframeSrc:f,translatedVideoUrl:m,autoplay:g,isHeroBanner:o.isHeroBanner}),v=!o.lazy&&(!$||!!o.autoplay),h=a.createClass({...r.getButtonYoutubeClasses(v)}),j=a.createClass({...r.getImageYoutubeClasses()}),q=a.createClass({...r.getArticleYoutubeClasses(C||!1,p)}),Y=a.createClass({...r.getIframeYoutubeClasses(c)}),I=a.createStyle({...l.getIframeYoutubeStyle(u)}),x=a.createStyle({...l.getArticleYoutubeStyle(u,b)}),A=a.createClass({...r.getYoutubeContentClasses()});return e.template`
|
|
2
2
|
<gp-lite-youtube-embed>
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(S)}</script>
|
|
4
4
|
<article
|
|
5
5
|
aria-hidden
|
|
6
|
-
class="${
|
|
6
|
+
class="${q}"
|
|
7
7
|
data-title="${d}"
|
|
8
|
-
style="${
|
|
8
|
+
style="${x}"
|
|
9
9
|
>
|
|
10
|
-
${t.default({id:
|
|
11
|
-
<button type="button" aria-label="Play" class="${
|
|
10
|
+
${t.default({id:y,src:b,alt:n?.altText,title:n?.imageTitle,priority:n?.preload,className:j,isDisableAspectStyle:!0})}
|
|
11
|
+
<button type="button" aria-label="Play" class="${h}">
|
|
12
12
|
<svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%">
|
|
13
13
|
<path
|
|
14
14
|
d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z"
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
<path d="M 45,24 27,14 27,34" fill="#fff"></path>
|
|
18
18
|
</svg>
|
|
19
19
|
</button>
|
|
20
|
-
${a.If(
|
|
20
|
+
${a.If(v,(()=>{let t=e.template`
|
|
21
21
|
<iframe
|
|
22
22
|
id="player-wrapper-${o.uid}"
|
|
23
|
-
class="${
|
|
24
|
-
style="${
|
|
23
|
+
class="${Y}"
|
|
24
|
+
style="${I}"
|
|
25
25
|
title="${d}"
|
|
26
26
|
frameborder="0"
|
|
27
27
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
28
28
|
allowfullscreen
|
|
29
|
-
src="${
|
|
29
|
+
src="${f}"
|
|
30
30
|
></iframe>
|
|
31
31
|
`;return o.isHeroBanner?e.template`
|
|
32
|
-
<div class="${
|
|
32
|
+
<div class="${A}">${t}</div>
|
|
33
33
|
`:t})())}
|
|
34
34
|
</article>
|
|
35
35
|
</gp-lite-youtube-embed>
|