@gem-sdk/components 22.0.0-dev.56 → 22.0.0-dev.57
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/image/common/attrs.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +9 -9
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +34 -34
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +33 -33
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +4 -4
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +6 -6
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +14 -14
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +6 -6
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +20 -20
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +20 -20
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +2 -2
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +4 -4
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +7 -7
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{template as e,getResponsiveValueByScreen as
|
|
1
|
+
import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import i from"../../../../../image/components/NextImage.liquid.js";import{getLiquidImageSrcset as o}from"../../../../../image/common/liquidSrcset.js";import{getGalleryCarouselShouldInitByLayout as r,getAspectRatio as s,getDisplayStyle as a}from"../../common/common.js";import{getShapeByLayout as p,getMinHeightByPosition as l,getZoomDisplay as d,checkDisplayGalleryByWidth as m,getCarouselVerticalConfigByPosition as g}from"../../common/productGallery.js";import{getStyleOfObject as n}from"../../../../helpers/function.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as u}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as C}from"../../composables/getProductImagesAttr.js";import{LiquidIf as h,LiquidFor as y}from"@gem-sdk/system";import v from"../../../../../carousel-v3/components/root/CarouselEmbla.liquid.js";import f from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";let b=({builderPropUID:b,children:w,pageContext:L,...F})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:$}=u(F),{galleryCarouselSettingAttrs:I}=C(F),{galleryCarouselStyle:_,galleryCarouselItemStyle:q}=c(F),j=p({shape:F.shape,shapeForBottom:F.shapeForBottom,shapeFor1Col:F.shapeFor1Col,shapeFor2Col:F.shapeFor2Col,shapeForFtOnly:F.shapeForFtOnly,shapeForInsideBottom:F.shapeForInsideBottom,shapeForInside:F.shapeForInside},F.position),k=o({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:F.qualityType,qualityPercent:F.qualityPercent}),V=(t,o)=>e`${i({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:k,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,style:o,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,M=e=>`
|
|
2
2
|
${h("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
3
|
${h("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
4
|
${h("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
-
${
|
|
5
|
+
${f({id:"{{imageID}}",contentType:"productImage",className:`${$(`gp-gallery-image-item ${e??""}`)}`,parentId:`${b}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:q,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative gp-h-full"
|
|
7
7
|
|
|
8
8
|
>
|
|
@@ -42,5 +42,5 @@ import{template as e,getResponsiveValueByScreen as i}from"@gem-sdk/core";import
|
|
|
42
42
|
</div>
|
|
43
43
|
`})}`,P=h("product.media.size > 1",y("media in product.media",`${h("media.media_type == 'image'",y("image in product.images",h("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
44
|
${h("media.id == product.featured_media.id ",M(F?.borderActive?.border!=="none"?"active":""),M())}`));return e`
|
|
45
|
-
${v({builderProps:{uid:
|
|
46
|
-
`};export{
|
|
45
|
+
${v({builderProps:{uid:b},rootId:`${b}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=g(F.position),t=[e.desktop?"gp-px-0":"gp-py-0",e.tablet?"tablet:gp-px-0":"tablet:gp-py-0",e.mobile?"mobile:gp-px-0":"mobile:gp-py-0"];return` ${t.join(" ")}`})(),slidesClass:l(F.position,F.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:I,rootStyles:{...(()=>{let e=(e,i,o)=>{let r=t(i,o),s=t(e,o),a="slider"===s&&("bottom-center"===r||"inside-bottom"===r),p=["left","right","inside-left","inside-right"].includes(r??"");return p||a},i=m({shapeByLayout:j}),o={desktop:i.desktop&&e(F.type,F.position,"desktop"),tablet:i.tablet&&e(F.type,F.position,"tablet"),mobile:i.mobile&&e(F.type,F.position,"mobile")};return a(e=>!o[e],"flex")})()},styles:_,disableMarginAuto:!0,children:P,shouldInitByLayout:r(F.position),carouselType:"feature_image_thumbs"})}
|
|
46
|
+
`};export{b as default};
|
package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as r,If as d}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import{getLiquidImageSrcset as p}from"../../../../../image/common/liquidSrcset.js";import n from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getAspectRatio as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:b,
|
|
2
|
-
${m({srcIsLiquidCode:!0,src:P,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",
|
|
1
|
+
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as r,If as d}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import{getLiquidImageSrcset as p}from"../../../../../image/common/liquidSrcset.js";import n from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getAspectRatio as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,pageContext:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:q}=f(L),{galleryGridStyles:V,galleryGridItemStyles:I}=w(L),j=C({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),M=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},k=()=>M(),S=()=>M(!0),P=p({liquidSrc:"media.preview_image",sizeTarget:"ProductFeatureImage",qualityType:L.qualityType,qualityPercent:L.qualityPercent}),T=(e,a)=>i`
|
|
2
|
+
${m({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:P,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none"})}
|
|
3
3
|
${d(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
4
|
-
${m({srcIsLiquidCode:!0,src:
|
|
4
|
+
${m({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:P,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full"})}
|
|
5
5
|
</div>`," ")}
|
|
6
6
|
${d(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
@@ -60,12 +60,12 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
60
60
|
|
|
61
61
|
${r("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-w-full" style="${r("media == null or media.media_type == 'image'","display: block !important;")} ${r("isVideo == true",c({...
|
|
63
|
+
<div class="gp-w-full" style="${r("media == null or media.media_type == 'image'","display: block !important;")} ${r("isVideo == true",c({...S()}))}">
|
|
64
64
|
${r("media != null",z(),E())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="${r("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${r("isMedia",c({...e("aspect",u(j))}))} ${c({...
|
|
68
|
+
style="${r("isMedia",c({...e("aspect",u(j))}))} ${c({...k()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
@@ -81,13 +81,13 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
83
|
</div>`,E=()=>i`
|
|
84
|
-
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",
|
|
84
|
+
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",setting:{aspectRatio:u(j),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none"})}`;return o(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${q}"
|
|
87
87
|
style="${c(V)}}"
|
|
88
88
|
>
|
|
89
89
|
${s("media in product.media",`${r("media.media_type == 'image'",s("image in product.images",r("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
90
|
${r("media.id == product.featured_media.id ",N(L?.borderActive?.border!=="none"?"active":""),N())}`)}
|
|
91
|
-
${r("product.media.size > 0"
|
|
91
|
+
${r("product.media.size > 0",b)}
|
|
92
92
|
${r("product.media.size < 1",N())}
|
|
93
93
|
</div>`)};export{_ as default};
|