@gem-sdk/components 26.0.0 → 26.1.0
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/srcset.js +1 -1
- package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/dist/esm/image/common/srcset.js +1 -1
- package/dist/esm/product/components/product-button/common/helpers.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core"),t=require("./helpers.js");const r={mobile:768,tablet:1024,desktop:1440},i={Image:{desktop:1024,tablet:1024,mobile:480},HeroBanner:{desktop:1920,tablet:1280,mobile:768},ImageComparison:{desktop:1024,tablet:768,mobile:576},ProductFeatureImage:{desktop:1024,tablet:1024,mobile:576},GalleryList:{desktop:256,tablet:256,mobile:
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core"),t=require("./helpers.js");const r={mobile:768,tablet:1024,desktop:1440},i={Image:{desktop:1024,tablet:1024,mobile:480},HeroBanner:{desktop:1920,tablet:1280,mobile:768},ImageComparison:{desktop:1024,tablet:768,mobile:576},ProductFeatureImage:{desktop:1024,tablet:1024,mobile:576},GalleryList:{desktop:256,tablet:256,mobile:256},ArticleImage:{desktop:1024,tablet:768,mobile:480}},s="high",o={high:100,medium:70},a="original",l=/\s*%\s*$/,n=e=>{if("number"==typeof e)return e;let t=Number.parseFloat(String(e??"").replace(l,""));return Number.isFinite(t)?t:100},p=/^\{\{\s*([\s\S]*?)\s*\}\}$/,u=/\{\{|\{%/,d=e=>!!e&&e.includes("cdn.shopify")&&!t.isCannotResizeImageByQuery(e),m=({qualityType:t,qualityPercent:r})=>{if(!t&&!r)return;let i={};for(let l of e.DEVICES){let p=e.getResponsiveValueByScreen(t,l,s)??s;if("finest"===p){i[l]=a;continue}let u="custom"===p?n(e.getResponsiveValueByScreen(r,l,100)):o[p]??100;i[l]=(u>0?u:100)/100}return i},c=(e,t)=>{let r=e.match(p);return r?`{{ ${r[1]} | append: '?width=${t}' | replace: '?', '&' | replace_first: '&', '?' }}`:`${e}${e.includes("?")?"&":"?"}width=${t}`},g=({sizeTarget:t="Image",qualityType:s,qualityPercent:o})=>{let l=m({qualityType:s,qualityPercent:o}),n=i[t]??i.Image,p=t=>{let r=e.getResponsiveValueByScreen(l,t,1)??1;return r===a?a:Math.round(n[t]*r)};return e.DEVICES.map(e=>({device:e,width:p(e),descriptor:r[e]})).sort((e,t)=>e.descriptor-t.descriptor)},b=e=>e.every(e=>e.width===a);exports.ORIGINAL_QUALITY=a,exports.SRCSET_DEVICE_DESCRIPTORS=r,exports.SRCSET_TARGET_WIDTHS=i,exports.appendWidthParam=c,exports.canResizeByShopifyCdn=d,exports.getImageSrcset=({src:t,resolvedSrc:r,sizeTarget:i,qualityType:s,qualityPercent:o})=>{if(!t)return;let l=p.test(t);if(!l&&u.test(t))return;let n=l?e.hasTranslatedLiquid(t)?r:void 0:t;if(!d(n))return;let m=g({sizeTarget:i,qualityType:s,qualityPercent:o});if(!b(m))return m.map(({width:e,descriptor:r})=>{let i=e===a?t:c(t,e);return`${i} ${r}w`}).join(", ")},exports.getQualityMultiplier=m,exports.getSrcsetCandidates=g,exports.isEveryCandidateOriginal=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./constants.js");const t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape
|
|
1
|
+
"use strict";var e=require("./constants.js");const t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/," | escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);exports.checkIconVisibility=e=>e?.enableIcon===!0,exports.escapeSingleQuoteForAttr=o,exports.getGPProductButtonState=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",inStock:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),exports.getRenderComparePriceSettings=e=>({lineThrough:!0,typo:a(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),exports.getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:a(e?.priceTypo)}),exports.renderSeparator=t=>({dot:e.SEPARATOR.DOT,"vertical-line":e.SEPARATOR.VERTICAL_LINE,"horizontal-line":e.SEPARATOR.HORIZONTAL_LINE})[t??"horizontal-line"]??e.SEPARATOR.HORIZONTAL_LINE;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("@gem-sdk/system"),t=require("../../../../../carousel-v3/components/item/CarouselItem.liquid.js"),o=require("../../../../../carousel-v3/components/root/Carousel.liquid.js"),r=require("../../../../../image/common/liquidSrcset.js"),s=require("../../../../../image/components/NextImage.liquid.js"),a=require("../../../../helpers/function.js"),l=require("../../common/common.js"),d=require("../../common/productGallery.js"),p=require("../../composables/getProductImagesAttr.js"),g=require("../../composables/getProductImagesClassName.js"),u=require("../../composables/getProductImagesStyles.js");exports.default=({builderPropUID:m,children:n,pageContext:c,...C})=>{let{featuredImageGalleryClasses:y,galleryItemClasses:h}=g.getProductImagesClassName(C),{galleryCarouselSettingAttrs:v}=p.getProductImagesAttr(C),{galleryCarouselStyle:L,galleryCarouselItemStyle:f}=u.getProductImagesStyles(C),q=d.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=r.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:C.qualityType,qualityPercent:C.qualityPercent}),I=(i,t)=>e.template`${s.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:b,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:t,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,w=e=>`
|
|
2
|
+
${i.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${i.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${i.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${t.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
|
-
${I({aspectRatio:
|
|
9
|
+
${I({aspectRatio:l.getAspectRatio(q),layout:C?.layout,qualityPercent:C?.qualityPercent,qualityType:C?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${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" >
|
|
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
|
+
${i.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(d.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
|
-
`})}`,F=
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,F=i.LiquidIf("product.media.size > 1",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 = '' %}")}
|
|
44
|
+
${i.LiquidIf("media.id == product.featured_media.id ",w(C?.borderActive?.border!=="none"?"active":""),w())}`));return e.template`
|
|
45
|
+
${o.default({builderProps:{uid:m},rootId:`${m}-{{product.id}}`,rootClass:`${y}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=d.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:d.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=d.checkDisplayGalleryByWidth({shapeByLayout:q}),o={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 l.getDisplayStyle(e=>!o[e],"flex")})()},styles:L,disableMarginAuto:!0,children:F,shouldInitByLayout:l.getGalleryCarouselShouldInitByLayout(C.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasTranslatedLiquid as e,DEVICES as t,getResponsiveValueByScreen as r}from"@gem-sdk/core";import{isCannotResizeImageByQuery as i}from"./helpers.js";let l={mobile:768,tablet:1024,desktop:1440},
|
|
1
|
+
import{hasTranslatedLiquid as e,DEVICES as t,getResponsiveValueByScreen as r}from"@gem-sdk/core";import{isCannotResizeImageByQuery as i}from"./helpers.js";let l={mobile:768,tablet:1024,desktop:1440},o={Image:{desktop:1024,tablet:1024,mobile:480},HeroBanner:{desktop:1920,tablet:1280,mobile:768},ImageComparison:{desktop:1024,tablet:768,mobile:576},ProductFeatureImage:{desktop:1024,tablet:1024,mobile:576},GalleryList:{desktop:256,tablet:256,mobile:256},ArticleImage:{desktop:1024,tablet:768,mobile:480}},a="high",s={high:100,medium:70},n="original",d=/\s*%\s*$/,m=e=>{if("number"==typeof e)return e;let t=Number.parseFloat(String(e??"").replace(d,""));return Number.isFinite(t)?t:100},p=/^\{\{\s*([\s\S]*?)\s*\}\}$/,u=/\{\{|\{%/,c=e=>!!e&&e.includes("cdn.shopify")&&!i(e),b=({qualityType:e,qualityPercent:i})=>{if(!e&&!i)return;let l={};for(let o of t){let t=r(e,o,a)??a;if("finest"===t){l[o]=n;continue}let d="custom"===t?m(r(i,o,100)):s[t]??100;l[o]=(d>0?d:100)/100}return l},f=(e,t)=>{let r=e.match(p);return r?`{{ ${r[1]} | append: '?width=${t}' | replace: '?', '&' | replace_first: '&', '?' }}`:`${e}${e.includes("?")?"&":"?"}width=${t}`},g=({sizeTarget:e="Image",qualityType:i,qualityPercent:a})=>{let s=b({qualityType:i,qualityPercent:a}),d=o[e]??o.Image,m=e=>{let t=r(s,e,1)??1;return t===n?n:Math.round(d[e]*t)};return t.map(e=>({device:e,width:m(e),descriptor:l[e]})).sort((e,t)=>e.descriptor-t.descriptor)},h=e=>e.every(e=>e.width===n),I=({src:t,resolvedSrc:r,sizeTarget:i,qualityType:l,qualityPercent:o})=>{if(!t)return;let a=p.test(t);if(!a&&u.test(t))return;let s=a?e(t)?r:void 0:t;if(!c(s))return;let d=g({sizeTarget:i,qualityType:l,qualityPercent:o});if(!h(d))return d.map(({width:e,descriptor:r})=>{let i=e===n?t:f(t,e);return`${i} ${r}w`}).join(", ")};export{n as ORIGINAL_QUALITY,l as SRCSET_DEVICE_DESCRIPTORS,o as SRCSET_TARGET_WIDTHS,f as appendWidthParam,c as canResizeByShopifyCdn,I as getImageSrcset,b as getQualityMultiplier,g as getSrcsetCandidates,h as isEveryCandidateOriginal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape
|
|
1
|
+
import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/," | escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",inStock:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),n=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,s=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{a as checkIconVisibility,o as escapeSingleQuoteForAttr,c as getGPProductButtonState,i as getRenderComparePriceSettings,l as getRenderRegularPriceSettings,n as renderSeparator};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
1
|
+
import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{LiquidIf as i,LiquidFor as o}from"@gem-sdk/system";import r from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";import s from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import{getLiquidImageSrcset as a}from"../../../../../image/common/liquidSrcset.js";import p from"../../../../../image/components/NextImage.liquid.js";import{getStyleOfObject as l}from"../../../../helpers/function.js";import{getGalleryCarouselShouldInitByLayout as d,getAspectRatio as m,getDisplayStyle as g}from"../../common/common.js";import{getShapeByLayout as n,getMinHeightByPosition as c,getZoomDisplay as u,checkDisplayGalleryByWidth as C,getCarouselVerticalConfigByPosition as h}from"../../common/productGallery.js";import{getProductImagesAttr as y}from"../../composables/getProductImagesAttr.js";import{getProductImagesClassName as v}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as f}from"../../composables/getProductImagesStyles.js";let b=({builderPropUID:b,children:w,pageContext:L,...F})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:$}=v(F),{galleryCarouselSettingAttrs:I}=y(F),{galleryCarouselStyle:_,galleryCarouselItemStyle:q}=f(F),j=n({shape:F.shape,shapeForBottom:F.shapeForBottom,shapeFor1Col:F.shapeFor1Col,shapeFor2Col:F.shapeFor2Col,shapeForFtOnly:F.shapeForFtOnly,shapeForInsideBottom:F.shapeForInsideBottom,shapeForInside:F.shapeForInside},F.position),k=a({liquidSrc:"media.preview_image",sizeTarget:"GalleryList",qualityType:F.qualityType,qualityPercent:F.qualityPercent}),V=(t,i)=>e`${p({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:k,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer"})}`,M=e=>`
|
|
2
|
+
${i("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${i("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${i("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${r({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
|
>
|
|
9
|
-
${V({aspectRatio:
|
|
9
|
+
${V({aspectRatio:m(j),layout:F?.layout,qualityPercent:F?.qualityPercent,qualityType:F?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${i("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
|
+
${i("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 @@ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{
|
|
|
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="${l(u(F?.clickOpenLightBox))}"
|
|
26
26
|
>
|
|
27
27
|
<svg
|
|
28
28
|
height="100%"
|
|
@@ -40,7 +40,7 @@ import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import{
|
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
|
-
`})}`,P=
|
|
44
|
-
${
|
|
45
|
-
${
|
|
43
|
+
`})}`,P=i("product.media.size > 1",o("media in product.media",`${i("media.media_type == 'image'",o("image in product.images",i("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${i("media.id == product.featured_media.id ",M(F?.borderActive?.border!=="none"?"active":""),M())}`));return e`
|
|
45
|
+
${s({builderProps:{uid:b},rootId:`${b}-{{product.id}}`,rootClass:`${x}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=h(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:c(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=C({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 g(e=>!o[e],"flex")})()},styles:_,disableMarginAuto:!0,children:P,shouldInitByLayout:d(F.position),carouselType:"feature_image_thumbs"})}
|
|
46
46
|
`};export{b as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"post:publish": "node ./scripts/convert-publish.js",
|
|
20
20
|
"pre:publish": "node ./scripts/convert-publish.js -p",
|
|
21
21
|
"relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/element-relationship/index.js",
|
|
22
|
-
"test": "jest -c ./../../helpers/jest.config.ts && yarn test:data",
|
|
22
|
+
"test": "jest -c ./../../helpers/jest.config.ts --testPathIgnorePatterns data.liquid.test && yarn test:data",
|
|
23
23
|
"test:data": "NODE_OPTIONS=--experimental-vm-modules GP_BASE_ASSET_URL=https://assets.gemcommerce.xyz jest -c ./../../helpers/jest.config.ts --testPathPatterns data.liquid.test",
|
|
24
24
|
"test:data:update": "yarn test:data -u",
|
|
25
25
|
"test:watch": "jest -c ./../../helpers/jest.config.ts --watch",
|