@gem-sdk/components 23.0.0-staging.3 → 23.0.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/article/components/ArticleImage.liquid.js +2 -2
- package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
- 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/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +12 -10
- 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 +5 -4
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image/settings/configs/settings.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.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/image-comparison/settings/configs/settings.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +16 -16
- package/dist/cjs/product/components/file-upload/common/classes.js +1 -1
- 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 +42 -42
- 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 +23 -23
- 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 +39 -39
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +38 -38
- 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 +23 -23
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- 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/article/settings/configs/article-image/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
- 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/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +13 -11
- 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 +6 -5
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image/settings/configs/settings.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +19 -19
- package/dist/esm/product/components/file-upload/common/classes.js +1 -1
- 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 +13 -13
- 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 +24 -24
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
- 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/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- 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 +9 -9
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +3 -16
- package/package.json +4 -4
- package/dist/cjs/image/common/liquidSrcset.js +0 -1
- package/dist/cjs/image/common/srcset.js +0 -1
- package/dist/esm/image/common/liquidSrcset.js +0 -1
- package/dist/esm/image/common/srcset.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Layout",controls:[{setting:{id:"direction"},layout:"vertical",options:{fullWidth:!0}}]},{label:"Image",controls:[{label:"1st image",setting:{id:"imageLeft"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altLeft"},{field:"imageTitle",settingId:"titleLeft"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altLeft",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleLeft",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"2nd image",setting:{id:"imageRight"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altRight"},{field:"imageTitle",settingId:"titleRight"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altRight",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleRight",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"imageScale"}}]},{label:"Slider",controls:[{label:"Behavior",setting:{id:"hoverToSlide"}},{label:"Default ratio",setting:{id:"defaultPercentage"}}]},{controls:[{label:"Badge",hiddenOnMobile:!0,setting:{id:"enableLabel"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:"1st",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"leftImageLabel"}},{label:"2nd",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"rightImageLabel"}},{conditionDisplay:"enableLabel === true",label:"Text style",hiddenOnMobile:!0,setting:{id:"typo"},options:{updateFields:[{field:"attrs.color",settingId:"labelTextColor"}]},controlChangeTrigger:{settings:[{action:{controlId:"labelTextColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Padding",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelPadding"}},{label:"Background",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelBackgroundColor"}},{label:"Border",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelBorder"}},{label:"Corner",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelRounded"}},{label:"Shadow",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelShadow"}},{label:"Position",hiddenOnMobile:!0,setting:{id:"labelPositionHoz"},conditionDisplay:"enableLabel === true && direction === 'horizontal'"},{label:"Position",hiddenOnMobile:!0,setting:{id:"labelPositionVer"},conditionDisplay:"enableLabel === true && direction === 'vertical'"}]},{label:"Size",hiddenOnMobile:!0,controls:[{label:"Frame",setting:{id:"aspectRatio"}},{label:"Ratio",conditionDisplay:"aspectRatio === 'custom'",setting:{id:"customAspectRadio"}},{label:"Width",setting:{id:"width"}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"preload"}},{label:"Quality",conditionEnable:"((imageLeft.src || imageRight.src) && (imageLeft.src.includes('cdn.shopify.com') || imageRight.src.includes('cdn.shopify.com')))",setting:{id:"qualityType"},options:{fullWidth:!0,disableMessage:"This setting only works with images uploaded to Shopify"}},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && ((imageLeft.src || imageRight.src) && (imageLeft.src.includes("cdn.shopify.com") || imageRight.src.includes("cdn.shopify.com"))) ',setting:{id:"qualityPercent"}}]},{label:"SEO",hiddenOnMobile:!0,controls:[{label:"1st image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",popoverLabel:"SEO",setting:{id:"enableSEOLeft"},controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altLeft"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleLeft"}}]},{label:"2nd image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",setting:{id:"enableSEORight"},popoverLabel:"SEO",controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altRight"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleRight"}}]}]},{controls:[{label:"Align",hiddenOnMobile:!0,conditionEnable:'!(width === "default" || (parseInt(width) >= 100 && width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Layout",controls:[{setting:{id:"direction"},layout:"vertical",options:{fullWidth:!0}}]},{label:"Image",controls:[{label:"1st image",setting:{id:"imageLeft"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altLeft"},{field:"imageTitle",settingId:"titleLeft"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altLeft",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleLeft",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"2nd image",setting:{id:"imageRight"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altRight"},{field:"imageTitle",settingId:"titleRight"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altRight",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleRight",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"imageScale"}}]},{label:"Slider",controls:[{label:"Behavior",setting:{id:"hoverToSlide"}},{label:"Default ratio",setting:{id:"defaultPercentage"}}]},{controls:[{label:"Badge",hiddenOnMobile:!0,setting:{id:"enableLabel"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:"1st",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"leftImageLabel"}},{label:"2nd",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"rightImageLabel"}},{conditionDisplay:"enableLabel === true",label:"Text style",hiddenOnMobile:!0,setting:{id:"typo"},options:{updateFields:[{field:"attrs.color",settingId:"labelTextColor"}]},controlChangeTrigger:{settings:[{action:{controlId:"labelTextColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Padding",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelPadding"}},{label:"Background",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelBackgroundColor"}},{label:"Border",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelBorder"}},{label:"Corner",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelRounded"}},{label:"Shadow",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelShadow"}},{label:"Position",hiddenOnMobile:!0,setting:{id:"labelPositionHoz"},conditionDisplay:"enableLabel === true && direction === 'horizontal'"},{label:"Position",hiddenOnMobile:!0,setting:{id:"labelPositionVer"},conditionDisplay:"enableLabel === true && direction === 'vertical'"}]},{label:"Size",hiddenOnMobile:!0,controls:[{label:"Frame",setting:{id:"aspectRatio"}},{label:"Ratio",conditionDisplay:"aspectRatio === 'custom'",setting:{id:"customAspectRadio"}},{label:"Width",setting:{id:"width"}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"preload"}},{label:"Quality",conditionEnable:"((imageLeft.src || imageRight.src) && (imageLeft.src.includes('cdn.shopify.com') || imageRight.src.includes('cdn.shopify.com')))",conditionDisplay:"preload === false",setting:{id:"qualityType"},options:{fullWidth:!0,disableMessage:"This setting only works with images uploaded to Shopify"}},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && preload === false && ((imageLeft.src || imageRight.src) && (imageLeft.src.includes("cdn.shopify.com") || imageRight.src.includes("cdn.shopify.com"))) ',setting:{id:"qualityPercent"}}]},{label:"SEO",hiddenOnMobile:!0,controls:[{label:"1st image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",popoverLabel:"SEO",setting:{id:"enableSEOLeft"},controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altLeft"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleLeft"}}]},{label:"2nd image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",setting:{id:"enableSEORight"},popoverLabel:"SEO",controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altRight"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleRight"}}]}]},{controls:[{label:"Align",hiddenOnMobile:!0,conditionEnable:'!(width === "default" || (parseInt(width) >= 100 && width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/classes.js"),s=require("./common/style.js"),t=require("@gem-sdk/system"),r=require("@gem-sdk/core"),a=require("./common/attr.js"),l=require("../../../helpers.js"),i=require("./common/helpers.js");exports.default=({setting:c,styles:o,builderProps:v,pageContext:n
|
|
2
|
-
<gp-file-upload ${
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
4
|
-
<div class="${
|
|
5
|
-
<input ${
|
|
6
|
-
<div class="${
|
|
7
|
-
<div class="${
|
|
8
|
-
<div class="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/classes.js"),s=require("./common/style.js"),t=require("@gem-sdk/system"),r=require("@gem-sdk/core"),a=require("./common/attr.js"),l=require("../../../helpers.js"),i=require("./common/helpers.js");exports.default=({setting:c,styles:o,builderProps:v,pageContext:n})=>{let d=t.createClass(e.createLayoutClasses(c,v?.uid)),y=t.createStyle({...i.removeHoverStyles(s.createLayoutStyles(c,o),o?.enableHoverEffect)}),p=t.createClass(e.createTypoClasses(o)),u=t.createStyle({...i.removeHoverStyles(s.createTypoStyles(o),o?.enableHoverEffect)}),C=t.createClass(e.createPreviewClasses()),f=t.createClass(e.createPreviewItemClasses()),S=t.createClass(e.createPreviewRemoveClasses()),$=t.createClass(e.createMessageClasses()),m=t.createStyle(s.createMessageStyles()),g=t.createClass(e.createContentWidthClasses()),H=t.createClass(e.createInputClasses()),b=t.createClass(e.composeClasses("gp-flex gp-items-center")),q=t.createAttr({...a.getInputAttr(c?.isRequired,c?.numberOfFiles)}),I=t.createAttr({...a.getWrapperAttr({uid:v?.uid})}),j=t.createStyle({...i.removeHoverStyles(s.createContainerStyles(o?.align,o?.textColor),o?.enableHoverEffect)}),E=t.createStyle({...i.removeHoverStyles(s.createWrapContentWidthStyles(c),o?.enableHoverEffect)}),P=t.createClass(e.createWrapContainerClasses(v?.uid)),h=t.createStyle({...i.removeHoverStyles(s.createContentWithStyles(c,o),o?.enableHoverEffect)}),w=t.createStyle({...i.removeHoverStyles(s.createIconContainerStyles(c),o?.enableHoverEffect)}),x=t.createClass(e.createIconContentClasses()),O=t.createStyle({...i.removeHoverStyles(s.createIconContentStyles(c,o),o?.enableHoverEffect)}),R=i.getDisplayText("Liquid",{uid:v?.uid,setting:c,styles:o,pageContext:n}),W=t.createStateOrContext({settings:{isShowPreviewImage:c?.isShowPreviewImage,numberOfFiles:c?.numberOfFiles,isRequired:c?.isRequired}});return r.template`
|
|
2
|
+
<gp-file-upload ${I}>
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(W)}</script>
|
|
4
|
+
<div class="${P}" style="${j}">
|
|
5
|
+
<input ${q} class="${H}">
|
|
6
|
+
<div class="${b}" style="${E}">
|
|
7
|
+
<div class="${g}" style="${h}">
|
|
8
|
+
<div class="${d}" style="${y}">
|
|
9
9
|
${t.If(!!(c?.iconSvg&&c?.iconVisible),r.template`
|
|
10
|
-
<div class='${
|
|
11
|
-
<div class="${
|
|
10
|
+
<div class='${b}' style="${w}">
|
|
11
|
+
<div class="${x}" style="${O}">
|
|
12
12
|
${c?.iconSvg}
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
`)}
|
|
16
|
-
<div class="${
|
|
17
|
-
${
|
|
16
|
+
<div class="${p}" style="${u}">
|
|
17
|
+
${R}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
|
-
<div class="${
|
|
24
|
-
<div class="${
|
|
25
|
-
<div class="${
|
|
23
|
+
<div class="${C}">
|
|
24
|
+
<div class="${f}">
|
|
25
|
+
<div class="${S}"></div>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<div class="${
|
|
28
|
+
<div class="${$}" style="${m}"></div>
|
|
29
29
|
</gp-file-upload>
|
|
30
30
|
|
|
31
31
|
${r.RenderIf(r.isLocalEnv,`<script ${l.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-file-upload-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l.getSettingPreloadData('class="gps-link" delay',"src")}="${r.baseAssetURL}/assets-v2/gp-file-upload-v7-5.js" defer="defer"></script>`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core");const p=p=>e.composeTypographyClassName(p?.typo),r=e=>e.trim().split(/\s+/).reduce((e,p)=>(e[p]=!0,e),{});exports.composeClasses=r,exports.createContentWidthClasses=()=>r("gp-flex gp-items-center gp-file-upload__content"),exports.createIconContentClasses=()=>r("group-hover:[color:var(--text-hover-color)] gp-file-upload__icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-full tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]"),exports.createInputClasses=()=>r("gp-input_picker gp-block gp-opacity-0 gp-w-0 gp-h-0 gp-top-2/4 gp-left-2/4 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-absolute gp-cursor-pointer gp-p-0"),exports.createLayoutClasses=(p,t)=>{let o=e.cls("gp-flex gp-items-center",t,{"gp-flex-col":p?.fileUploadLayout==="vertical"});return r(o)},exports.createMessageClasses=()=>r("gp-hidden error-message"),exports.createPreviewClasses=()=>r("gp-file_preview gp-flex gp-gap-2 gp-overflow-x-auto gp-whitespace-nowrap gp-mt-2"),exports.createPreviewItemClasses=()=>r("gp-group gp-file_preview_item gp-file_preview_item_0 gp-hidden gp-rounded-[2.62px] gp-min-h-[104px] gp-relative gp-flex-[0_0_calc((100%_/_4)_-_6px)] gp-min-w-[104px] gp-box-border"),exports.createPreviewRemoveClasses=()=>r("remove gp-hidden group-hover:!gp-flex"),exports.createTypoClasses=t=>r(e.cls(p(t),"gp-file-upload__text group-hover:[color:var(--text-hover-color)]")),exports.createWrapContainerClasses=
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core");const p=p=>e.composeTypographyClassName(p?.typo),r=e=>e.trim().split(/\s+/).reduce((e,p)=>(e[p]=!0,e),{});exports.composeClasses=r,exports.createContentWidthClasses=()=>r("gp-flex gp-items-center gp-file-upload__content"),exports.createIconContentClasses=()=>r("group-hover:[color:var(--text-hover-color)] gp-file-upload__icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-full tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]"),exports.createInputClasses=()=>r("gp-input_picker gp-block gp-opacity-0 gp-w-0 gp-h-0 gp-top-2/4 gp-left-2/4 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-absolute gp-cursor-pointer gp-p-0"),exports.createLayoutClasses=(p,t)=>{let o=e.cls("gp-flex gp-items-center",t,{"gp-flex-col":p?.fileUploadLayout==="vertical"});return r(o)},exports.createMessageClasses=()=>r("gp-hidden error-message"),exports.createPreviewClasses=()=>r("gp-file_preview gp-flex gp-gap-2 gp-overflow-x-auto gp-whitespace-nowrap gp-mt-2"),exports.createPreviewItemClasses=()=>r("gp-group gp-file_preview_item gp-file_preview_item_0 gp-hidden gp-rounded-[2.62px] gp-min-h-[104px] gp-relative gp-flex-[0_0_calc((100%_/_4)_-_6px)] gp-min-w-[104px] gp-box-border"),exports.createPreviewRemoveClasses=()=>r("remove gp-hidden group-hover:!gp-flex"),exports.createTypoClasses=t=>r(e.cls(p(t),"gp-file-upload__text group-hover:[color:var(--text-hover-color)]")),exports.createWrapContainerClasses=e=>r(`gp-group gp-cursor-pointer gp-relative gp-flex gp-items-center gp-file-upload_container ${e}`);
|
|
@@ -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 i=e.getResponsiveValueByScreen(t,r)?.shapeValue;if(i)o={...o,[r]:i};else{let i=e.getResponsiveValueByScreen(t,r)?.shape;switch(i){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},i=e=>{let t=e.match(/\d+/g);return t?t[0]:e};exports.checkAddOverFlowClass=e=>{let t=e?.["--radius"],o=e?.["--bblr"]||"0px",r=e?.["--bbrr"]||"0px",i=e?.["--btlr"]||"0px",l=e?.["--btrr"]||"0px";return t&&!t.toString().includes("none")&&"0"!==t.toString()||"0px"!==o||"0px"!==r||"0px"!==i||"0px"!==l},exports.convertSpacing=e=>e?{desktop:t(e.desktop,5),tablet:t(e.tablet,5),mobile:t(e.mobile,5)}:{desktop:5},exports.convertSpacingForIndisdeLayout=r,exports.convertUnitToNumber=t,exports.getAspectRatio=o,exports.getConditionRenderGalleryImages=(t,o)=>{let r=!0,i=!1;return["desktop","mobile","tablet"].forEach(l=>{let s=e.getResponsiveValueByScreen(t,l),n=e.getResponsiveValueByScreen(o,l);s&&"only-feature"!==s&&(r=!1),(["two-col","one-col"].includes(s)||"images"===n)&&(i=!0)}),{isOnlyFeatureAllDevices:r,isRenderGalleryGrid:i}},exports.getDisplayStyle=(e,t)=>{let o={};return["desktop","mobile","tablet"].forEach(r=>{o={...o,[`--d${"desktop"===r?"":`-${r}`}`]:`${e(r)?"none":t}`}}),o},exports.getPaddingBottomByShapeSetting=t=>{let r=o(t),l={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=i(n||""),u=a.toString().match(/px/g)?i(a):a;if(n&&a&&!isNaN(Number(p))&&!isNaN(Number(u))){l={...l,[o]:`${Number(p)/Number(u)*100}%`};return}if(n&&!isNaN(Number(p))){l={...l,[o]:n};return}let d=r?.[o]!=="auto"&&r?.[o]?r?.[o]?.split("/").reverse().join("/"):"{%if largestRatio == 0%} 100 / 100 {%else%} {{largestRatio}} {%endif%}";l={...l,[o]:`calc((${d})*100%)`}}),l},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(i=>{let l=e.getResponsiveValueByScreen(t.position,i),s=e.getResponsiveValueByScreen(t.ratioLayout,i),n=e.getResponsiveValueByScreen(t.ratioLayoutRight,i),a="desktop"===i?"--gtc":`--gtc-${i}`,p="desktop"===i?"--gtr":`--gtr-${i}`,u="left"===l?s:n,d=["left","right"].includes(l||"");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 i=e.getResponsiveValueByScreen(t.position,r),l="desktop"===r?"--o":`--o-${r}`;o={...o,[l]:"left"===i?"1":"0"}}),o},exports.getStyleGridOrderForGallery=t=>{let o={"--o":"1","--o-tablet":"1","--o-mobile":"1"};return["desktop","mobile","tablet"].forEach(r=>{let i=e.getResponsiveValueByScreen(t.position,r),l="desktop"===r?"--o":`--o-${r}`;o={...o,[l]:"left"===i?"0":"1"}}),o},exports.getStyleInsideLayout=(t,o,i)=>{let l={},s={},n={},a={},p={},u={};return["desktop","mobile","tablet"].forEach(d=>{let c=e.getResponsiveValueByScreen(t,d),m=e.getResponsiveValueByScreen(o,d)?.width,
|
|
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 i=e.getResponsiveValueByScreen(t,r)?.shapeValue;if(i)o={...o,[r]:i};else{let i=e.getResponsiveValueByScreen(t,r)?.shape;switch(i){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},i=e=>{let t=e.match(/\d+/g);return t?t[0]:e};exports.checkAddOverFlowClass=e=>{let t=e?.["--radius"],o=e?.["--bblr"]||"0px",r=e?.["--bbrr"]||"0px",i=e?.["--btlr"]||"0px",l=e?.["--btrr"]||"0px";return t&&!t.toString().includes("none")&&"0"!==t.toString()||"0px"!==o||"0px"!==r||"0px"!==i||"0px"!==l},exports.convertSpacing=e=>e?{desktop:t(e.desktop,5),tablet:t(e.tablet,5),mobile:t(e.mobile,5)}:{desktop:5},exports.convertSpacingForIndisdeLayout=r,exports.convertUnitToNumber=t,exports.getAspectRatio=o,exports.getConditionRenderGalleryImages=(t,o)=>{let r=!0,i=!1;return["desktop","mobile","tablet"].forEach(l=>{let s=e.getResponsiveValueByScreen(t,l),n=e.getResponsiveValueByScreen(o,l);s&&"only-feature"!==s&&(r=!1),(["two-col","one-col"].includes(s)||"images"===n)&&(i=!0)}),{isOnlyFeatureAllDevices:r,isRenderGalleryGrid:i}},exports.getDisplayStyle=(e,t)=>{let o={};return["desktop","mobile","tablet"].forEach(r=>{o={...o,[`--d${"desktop"===r?"":`-${r}`}`]:`${e(r)?"none":t}`}}),o},exports.getPaddingBottomByShapeSetting=t=>{let r=o(t),l={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=i(n||""),u=a.toString().match(/px/g)?i(a):a;if(n&&a&&!isNaN(Number(p))&&!isNaN(Number(u))){l={...l,[o]:`${Number(p)/Number(u)*100}%`};return}if(n&&!isNaN(Number(p))){l={...l,[o]:n};return}let d=r?.[o]!=="auto"&&r?.[o]?r?.[o]?.split("/").reverse().join("/"):"{%if largestRatio == 0%} 100 / 100 {%else%} {{largestRatio}} {%endif%}";l={...l,[o]:`calc((${d})*100%)`}}),l},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(i=>{let l=e.getResponsiveValueByScreen(t.position,i),s=e.getResponsiveValueByScreen(t.ratioLayout,i),n=e.getResponsiveValueByScreen(t.ratioLayoutRight,i),a="desktop"===i?"--gtc":`--gtc-${i}`,p="desktop"===i?"--gtr":`--gtr-${i}`,u="left"===l?s:n,d=["left","right"].includes(l||"");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 i=e.getResponsiveValueByScreen(t.position,r),l="desktop"===r?"--o":`--o-${r}`;o={...o,[l]:"left"===i?"1":"0"}}),o},exports.getStyleGridOrderForGallery=t=>{let o={"--o":"1","--o-tablet":"1","--o-mobile":"1"};return["desktop","mobile","tablet"].forEach(r=>{let i=e.getResponsiveValueByScreen(t.position,r),l="desktop"===r?"--o":`--o-${r}`;o={...o,[l]:"left"===i?"0":"1"}}),o},exports.getStyleInsideLayout=(t,o,i)=>{let l={},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(i,d);if(l={...l,[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",l),...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}});
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../common/productFeaturedImage.js"),i=require("../../common/common.js"),a=require("@gem-sdk/core"),t=require("../../composables/getProductImagesClassName.js"),r=require("../../../../../carousel/components/item/CarouselItem.liquid.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../common/productFeaturedImage.js"),i=require("../../common/common.js"),a=require("@gem-sdk/core"),t=require("../../composables/getProductImagesClassName.js"),r=require("../../../../../carousel/components/item/CarouselItem.liquid.js"),s=require("../../composables/getProductImagesStyles.js"),d=require("../../../../../carousel/components/root/Carousel.liquid.js"),u=require("../../composables/getProductImagesAttr.js"),o=require("../../../../../video/components/HTML5Embed.liquid.js"),l=require("../../../../../image/components/NextImage.liquid.js"),g=require("../../../../../image/components/Modal3d.liquid.js"),n=require("@gem-sdk/system"),c=require("../../../../../image/components/Video.liquid.js"),m=require("../../../../helpers/function.js");exports.default=({builderPropUID:p,children:f,pageContext:h,...y})=>{let{featuredImageCarouselClasses:I,galleryItemClasses:q,featuredCarouselItemClasses:b}=t.getProductImagesClassName(y),{featuredImageCarouselStyle:M,featureImageStyle:_,featureImageCarouselOnlyOneImageStyle:v,featureImageOnlyOneImageStyle:$,featureImageCarouselItemStyle:w}=s.getProductImagesStyles(y),{featuredImageCarouselSettingAttrs:L}=u.getProductImagesAttr(y),x=i.getAspectRatio(y.ftShape),S=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
|
-
${
|
|
4
|
+
${P()}
|
|
5
5
|
{% when 'external_video' %}
|
|
6
6
|
{% assign mediaSourceVideo = featureMedia | external_video_url %}
|
|
7
7
|
${O()}
|
|
8
8
|
{% when 'video' %}
|
|
9
9
|
{% assign mediaSourceVideo = featureMedia.sources.last.url %}
|
|
10
|
-
${
|
|
10
|
+
${z()}
|
|
11
11
|
{% when 'model' %}
|
|
12
|
-
${
|
|
12
|
+
${j()}
|
|
13
13
|
{% else %}
|
|
14
|
-
${
|
|
14
|
+
${C()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
${
|
|
16
|
+
`,j=()=>g.default({src:n.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}),O=()=>c.default({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:x}),z=()=>o.default({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible",pageContext:h}),P=()=>a.template`
|
|
17
|
+
${R(a.cls("gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==y.hoverEffect},"{{shouldHidden}}"))}
|
|
18
|
+
${n.If(y?.hoverEffect!=="none",`<div class="${a.cls("zoom-element !gp-max-w-none",e.getZoomImageClass())}">
|
|
19
|
+
${R("image-zoom",!0)}
|
|
20
20
|
</div>`," ")}
|
|
21
|
-
${
|
|
22
|
-
`,
|
|
21
|
+
${n.If(y?.hoverEffect=="zoom"&&y?.zoomType=="glasses",`<div class="${a.cls("zoom-lens-element",e.getZoomLenClass())}" style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`," ")}
|
|
22
|
+
`,R=(e,t)=>a.template`
|
|
23
23
|
{% assign src = featureMedia.src %}
|
|
24
|
-
${
|
|
25
|
-
{% assign other_image_index = ${
|
|
24
|
+
${n.If(t&&"other"==y.hoverEffect,`{% assign media_length = product.media | size %}
|
|
25
|
+
{% assign other_image_index = ${y.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
|
+
${n.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
32
|
+
${l.default({srcIsLiquidCode:!0,src:n.LiquidIf("src != null",i.getSrcImage("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:n.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:y?.ftLayout,aspectRatio:x,qualityType:y?.qualityType,qualityPercent:y?.qualityPercent},priority:y?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,pageContext:h})}`,C=()=>a.template`
|
|
33
|
+
${l.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:y?.ftLayout,aspectRatio:x,qualityType:y?.qualityType,qualityPercent:y?.qualityPercent},priority:y?.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:h})}`,k=i.getPaddingBottomByShapeSetting(y.ftShape),N=e.checkRenderFeaturedCarousel(y),T="gp-featured-image-wrapper",W=n.LiquidIf("product.media.size > 0",`${f||""} {% assign largestRatio = 0 %}
|
|
34
|
+
${n.LiquidFor("featureMedia in product.media",`
|
|
35
35
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
36
36
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
37
37
|
{% assign ratio = height | divided_by: width %}
|
|
38
|
-
${
|
|
38
|
+
${n.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
39
39
|
`)}
|
|
40
|
-
${
|
|
40
|
+
${n.LiquidFor("featureMedia in product.media",`${n.LiquidIf("featureMedia.media_type == 'image'",`${n.LiquidFor("image in product.images",n.LiquidIf("image.src == featureMedia.src","{% assign imageID = image.id %}{% break %}"))}`,"{% assign imageID = '' %}")}
|
|
41
41
|
|
|
42
|
-
${
|
|
42
|
+
${n.Liquid(`{% assign productImageWidth = 0 %}
|
|
43
43
|
{% case featureMedia.media_type %}
|
|
44
44
|
{% when 'image' %}
|
|
45
45
|
{% assign productImageWidth = featureMedia.width %}
|
|
46
46
|
{% else %}
|
|
47
47
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
48
48
|
{% endcase %}`)}
|
|
49
|
-
${r.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${
|
|
49
|
+
${r.default({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`${q("gp-ft-image-item !gp-min-w-full !gp-max-w-full' undefined")}`,parentId:`${p}-{{section.id}}-{{product.id}}`,style:w,customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
50
50
|
<div
|
|
51
|
-
class="gp-w-full gp-relative ${
|
|
52
|
-
style="${
|
|
51
|
+
class="gp-w-full gp-relative ${n.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
52
|
+
style="${m.getStyleOfObject(a.makeStyleResponsive("pb",k))} ${n.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
53
53
|
>
|
|
54
|
-
${
|
|
54
|
+
${S()}
|
|
55
55
|
</div>
|
|
56
56
|
`})}`)}
|
|
57
|
-
`,
|
|
57
|
+
`,l.default({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:y?.preload,setting:{layout:y?.ftLayout,aspectRatio:x,qualityType:y?.qualityType,qualityPercent:y?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,pageContext:h}));return n.Liquid(`
|
|
58
58
|
{% capture featureImageOnlyOne %}
|
|
59
|
-
${
|
|
59
|
+
${n.Liquid(`
|
|
60
60
|
{% assign featureMedia = variant.featured_media %}
|
|
61
61
|
{% unless featureMedia %}
|
|
62
62
|
{% assign featureMedia = product.featured_media %}
|
|
63
63
|
{% endunless %}
|
|
64
|
-
${
|
|
64
|
+
${n.LiquidIf("product.media.size > 1",(()=>{switch(y?.preDisplay){case"1st-images":return`
|
|
65
65
|
{% assign featureMedia = product.media.first %}
|
|
66
|
-
`;case"1st-3d-mode":return
|
|
66
|
+
`;case"1st-3d-mode":return n.LiquidFor("media in product.media",n.LiquidIf("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return n.LiquidFor("media in product.media",n.LiquidIf("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
67
67
|
{% assign featureMedia = variant.featured_media %}
|
|
68
68
|
{% unless featureMedia %}
|
|
69
69
|
{% assign featureMedia = product.featured_media %}
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
74
74
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
75
75
|
{% assign ratio = height | divided_by: width %}
|
|
76
|
-
${
|
|
76
|
+
${n.LiquidIf("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
77
77
|
{% assign productImageWidth = 0 %}
|
|
78
78
|
{% case featureMedia.media_type %}
|
|
79
79
|
{% when 'image' %}
|
|
@@ -81,38 +81,38 @@
|
|
|
81
81
|
{% else %}
|
|
82
82
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
83
83
|
{% endcase %}
|
|
84
|
-
${
|
|
84
|
+
${n.LiquidIf("featureMedia == null","{% assign productImageWidth = 1600 %}")}
|
|
85
85
|
<div
|
|
86
86
|
class='gp-feature-image-carousel gp-feature-image-only'
|
|
87
|
-
style="${
|
|
87
|
+
style="${m.getStyleOfObject(_)}"
|
|
88
88
|
>
|
|
89
89
|
<div
|
|
90
90
|
class="gp-relative"
|
|
91
|
-
style="${
|
|
91
|
+
style="${m.getStyleOfObject($)}"
|
|
92
92
|
>
|
|
93
|
-
${
|
|
93
|
+
${f}
|
|
94
94
|
<div
|
|
95
95
|
type="gp-feature-image-only"
|
|
96
96
|
product-id="{{product.id}}"
|
|
97
97
|
product-media="{{product.media.size}}"
|
|
98
|
-
class="${
|
|
99
|
-
style="${
|
|
98
|
+
class="${b(T)}"
|
|
99
|
+
style="${m.getStyleOfObject(v)}"
|
|
100
100
|
>
|
|
101
101
|
<div
|
|
102
|
-
class="gp-w-full gp-relative ${
|
|
103
|
-
style="${
|
|
102
|
+
class="gp-w-full gp-relative ${n.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
103
|
+
style="${m.getStyleOfObject(a.makeStyleResponsive("pb",k))} ${n.LiquidIf("featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video'","{{ 'display: flex; align-items: center; justify-content: center' }}")}"
|
|
104
104
|
>
|
|
105
|
-
${
|
|
105
|
+
${S()}
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
110
110
|
`)}
|
|
111
111
|
{% endcapture %}
|
|
112
|
-
${
|
|
113
|
-
${
|
|
114
|
-
${
|
|
112
|
+
${n.LiquidIf("product.media.size > 1",`
|
|
113
|
+
${n.If(N,`
|
|
114
|
+
${d.default({builderProps:{uid:p},rootId:`ft-${p}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:T,rootClass:`${I}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:L,rootStyles:_,styles:M,style:{playSpeed:600},disableMarginAuto:!0,children:W})}
|
|
115
115
|
`," ")}
|
|
116
|
-
${
|
|
116
|
+
${n.If(!N,"{{ featureImageOnlyOne }}"," ")}
|
|
117
117
|
`,"{{ featureImageOnlyOne }}")}
|
|
118
118
|
`)};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/productGallery.js"),t=require("../../common/common.js"),o=require("../../composables/getProductImagesClassName.js"),s=require("../../../../../carousel/components/item/CarouselItem.liquid.js"),
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${s.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${o}`)}`,parentId:`${m}-{{product.id}}`,builderAttrs:{"data-outline":o?"active":"deactive"},style:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../common/productGallery.js"),t=require("../../common/common.js"),o=require("../../composables/getProductImagesClassName.js"),s=require("../../../../../carousel/components/item/CarouselItem.liquid.js"),a=require("../../composables/getProductImagesStyles.js"),r=require("../../../../../carousel/components/root/Carousel.liquid.js"),l=require("../../composables/getProductImagesAttr.js"),d=require("../../../../../image/components/NextImage.liquid.js"),p=require("../../../../helpers/function.js"),g=require("@gem-sdk/system");exports.default=({builderPropUID:m,children:u,pageContext:n,...c})=>{let{featuredImageGalleryClasses:C,galleryItemClasses:h}=o.getProductImagesClassName(c),{galleryCarouselSettingAttrs:y}=l.getProductImagesAttr(c),{galleryCarouselStyle:v,galleryCarouselItemStyle:b}=a.getProductImagesStyles(c),f=i.getShapeByLayout({shape:c.shape,shapeForBottom:c.shapeForBottom,shapeFor1Col:c.shapeFor1Col,shapeFor2Col:c.shapeFor2Col,shapeForFtOnly:c.shapeForFtOnly,shapeForInsideBottom:c.shapeForInsideBottom,shapeForInside:c.shapeForInside},c.position),L=(i,o)=>e.template`${d.default({srcIsLiquidCode:!0,src:`${t.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:o,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",pageContext:n})}`,q=t.getPaddingBottomByShapeSetting(f),w=o=>`
|
|
2
|
+
${g.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
|
+
${g.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
|
+
${g.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
|
+
${s.default({id:"{{imageID}}",contentType:"productImage",className:`${h(`gp-gallery-image-item ${o}`)}`,parentId:`${m}-{{product.id}}`,builderAttrs:{"data-outline":o?"active":"deactive"},style:b,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative"
|
|
7
|
-
style="${
|
|
7
|
+
style="${p.getStyleOfObject(e.makeStyleResponsive("pb",q))};"
|
|
8
8
|
>
|
|
9
|
-
${
|
|
9
|
+
${L({aspectRatio:t.getAspectRatio(f),layout:c?.layout,qualityPercent:c?.qualityPercent,qualityType:c?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${g.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
|
+
${g.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="${p.getStyleOfObject(i.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
|
+
`})}`,I=g.LiquidIf("product.media.size > 1",g.LiquidFor("media in product.media",`${g.LiquidIf("media.media_type == 'image'",g.LiquidFor("image in product.images",g.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
44
|
+
${g.LiquidIf("media.id == product.featured_media.id ",w(c?.borderActive?.border!=="none"?"active":""),w())}`));return e.template`
|
|
45
|
+
${r.default({builderProps:{uid:m},rootId:`${m}-{{product.id}}`,rootClass:`${C}`,rootAttrs:{type:"grid-carousel","product-media":"{{product.media.size}}"},wrapperClass:(()=>{let e=i.getCarouselVerticalConfigByPosition(c.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:i.getMinHeightByPosition(c.position,c.navigationPosition),isHiddenArrowWhenDisabled:!0,setting:y,rootStyles:{...(()=>{let o=(i,t,o)=>{let s=e.getResponsiveValueByScreen(t,o),a=e.getResponsiveValueByScreen(i,o),r="slider"===a&&("bottom-center"===s||"inside-bottom"===s),l=["left","right","inside-left","inside-right"].includes(s??"");return l||r},s=i.checkDisplayGalleryByWidth({shapeByLayout:f}),a={desktop:s.desktop&&o(c.type,c.position,"desktop"),tablet:s.tablet&&o(c.type,c.position,"tablet"),mobile:s.mobile&&o(c.type,c.position,"mobile")};return t.getDisplayStyle(e=>!a[e],"flex")})()},styles:v,disableMarginAuto:!0,children:I})}
|
|
46
46
|
`};
|
package/dist/cjs/product/components/product-images-v2/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("../../composables/getProductImagesClassName.js"),
|
|
2
|
-
${
|
|
3
|
-
${m.If(
|
|
4
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../composables/getProductImagesClassName.js"),a=require("../../common/productFeaturedImage.js"),t=require("../../composables/getProductImagesStyles.js"),s=require("../../common/productGallery.js"),d=require("../../../../../video/components/HTML5Embed.liquid.js"),o=require("../../../../../image/components/NextImage.liquid.js"),r=require("../../../../../image/components/Modal3d.liquid.js"),l=require("../../common/common.js"),m=require("@gem-sdk/system"),g=require("../../../../../image/components/Video.liquid.js"),p=require("../../../../helpers/function.js");exports.default=({builderPropUID:u,wrapperStyle:c,children:n,pageContext:y,...h})=>{let{galleryItemClasses:f,galleryGridWrapperClasses:v}=i.getProductImagesClassName(h),{galleryGridStyles:C,galleryGridItemStyles:L}=t.getProductImagesStyles(h),w=s.getShapeByLayout({shape:h.shape,shapeForBottom:h.shapeForBottom,shapeFor1Col:h.shapeFor1Col,shapeFor2Col:h.shapeFor2Col,shapeForFtOnly:h.shapeForFtOnly,shapeForInsideBottom:h.shapeForInsideBottom,shapeForInside:h.shapeForInside},h.position),q=(i=!1)=>{let a={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(t=>{let s=e.getResponsiveValueByScreen(h?.position,t)||"",d="one-col"===s||"two-col"===s;a[t]=(i?!d:d)?"block":"none"}),e.makeStyleResponsive("d",a)},_=()=>q(),b=()=>q(!0),I=(i,t)=>e.template`
|
|
2
|
+
${o.default({srcIsLiquidCode:!0,src:`${l.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:i,style:t,className:"!gp-rounded-none",customLazyload:!1,pageContext:y})}
|
|
3
|
+
${m.If(h?.galleryHoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",a.getZoomImageClass())}">
|
|
4
|
+
${o.default({srcIsLiquidCode:!0,src:`${l.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:i,style:t,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,pageContext:y})}
|
|
5
5
|
</div>`," ")}
|
|
6
|
-
${m.If(
|
|
6
|
+
${m.If(h?.galleryHoverEffect=="zoom"&&h?.galleryZoomType=="glasses",`<div class="${e.cls("zoom-lens-element",a.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
|
|
9
|
+
`,$=()=>r.default({src:m.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)}),x=()=>g.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),S=()=>d.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"},pageContext:y}),F=()=>e.template`
|
|
10
10
|
${m.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
|
+
${I({aspectRatio:l.getAspectRatio(w),layout:h?.layout,qualityType:h?.qualityType,qualityPercent:h?.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="${p.getStyleOfObject(s.getZoomDisplay(h?.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
|
+
`,j=i=>`
|
|
43
43
|
${m.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
44
|
${m.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
45
|
${m.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="${i?"active":"deactive"}"
|
|
56
|
-
class="${
|
|
57
|
-
style="${
|
|
56
|
+
class="${f(`gem-slider-item-${u}-{{product.id}} gp-gallery-image-item ${i}`)}"
|
|
57
|
+
style="${p.getStyleOfObject(L)}"
|
|
58
58
|
>
|
|
59
59
|
${m.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
61
|
${m.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-h-full gp-w-full" style="${m.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${m.LiquidIf("isVideo == true",
|
|
64
|
-
${m.LiquidIf("media != null",
|
|
63
|
+
<div class="gp-h-full gp-w-full" style="${m.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${m.LiquidIf("isVideo == true",p.getStyleOfObject({...b()}))}">
|
|
64
|
+
${m.LiquidIf("media != null",F(),V())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="${m.LiquidIf("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${m.LiquidIf("isMedia",
|
|
68
|
+
style="${m.LiquidIf("isMedia",p.getStyleOfObject({...e.makeStyleResponsive("aspect",l.getAspectRatio(w))}))} ${p.getStyleOfObject({..._()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
72
72
|
{% assign mediaSourceVideo = media | external_video_url %}
|
|
73
|
-
${
|
|
73
|
+
${x()}
|
|
74
74
|
{% when 'video' %}
|
|
75
75
|
{% assign mediaSourceVideo = media.sources.last.url %}
|
|
76
|
-
${j()}
|
|
77
|
-
{% when 'model' %}
|
|
78
76
|
${S()}
|
|
77
|
+
{% when 'model' %}
|
|
78
|
+
${$()}
|
|
79
79
|
{% endcase %}
|
|
80
80
|
</div>
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
|
-
</div>`,
|
|
84
|
-
${
|
|
83
|
+
</div>`,V=()=>e.template`
|
|
84
|
+
${o.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:h?.layout,qualityType:h?.qualityType,qualityPercent:h?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,pageContext:y})}`;return m.Liquid(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${v}"
|
|
87
|
-
style="${
|
|
87
|
+
style="${p.getStyleOfObject(C)}}"
|
|
88
88
|
>
|
|
89
89
|
${m.LiquidFor("media in product.media",`${m.LiquidIf("media.media_type == 'image'",m.LiquidFor("image in product.images",m.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
|
-
${m.LiquidIf("media.id == product.featured_media.id ",
|
|
91
|
-
${m.LiquidIf("product.media.size > 0",
|
|
92
|
-
${m.LiquidIf("product.media.size < 1",
|
|
90
|
+
${m.LiquidIf("media.id == product.featured_media.id ",j(h?.borderActive?.border!=="none"?"active":""),j())}`)}
|
|
91
|
+
${m.LiquidIf("product.media.size > 0",n)}
|
|
92
|
+
${m.LiquidIf("product.media.size < 1",j())}
|
|
93
93
|
</div>`)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core"),t=require("../../../../carousel-v3/common/selectors.js");const o=({carouselInstanceUID:e,builderPropUID:t})=>`${e??t}-carousel`,r=(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)},l=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)},i=e=>{let t=parseInt(e)?`${2*parseInt(e)}px`:`${e} * 2`;return t},s=e=>{let t=e.match(/\d+/g);return t?t[0]:e},n=["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 t=r(e.desktop,5),o=r(e.tablet,t),l=r(e.mobile,o);return{desktop:t,tablet:o,mobile:l}},exports.convertSpacingForIndisdeLayout=i,exports.convertUnitToNumber=r,exports.getAspectRatio=l,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=(t,o,r)=>{let l=e.getResponsiveValueByScreen(t?.ftShape,o)?.shape==="original",i=l?e.getResponsiveValueByScreen(t?.ftNavigationPosition,o):"";return[JSON.stringify(t?.position),i,o,r].join("|")},exports.getGalleryCarouselRootId=o,exports.getGalleryCarouselSelector=e=>t.getCarouselElementSelector(o(e)),exports.getGalleryCarouselShouldInitByLayout=t=>{let o={};return e.DEVICES.forEach(r=>{let l=e.getResponsiveValueByScreen(t,r);o[r]=null==l||!n.includes(l)}),o},exports.getPaddingBottomByShapeSetting=t=>{let o=l(t),r={desktop:"auto",mobile:"auto",tablet:"auto"};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),n=i?.height,a=i?.width||"",
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core"),t=require("../../../../carousel-v3/common/selectors.js");const o=({carouselInstanceUID:e,builderPropUID:t})=>`${e??t}-carousel`,r=(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)},l=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)},i=e=>{let t=parseInt(e)?`${2*parseInt(e)}px`:`${e} * 2`;return t},s=e=>{let t=e.match(/\d+/g);return t?t[0]:e},n=["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 t=r(e.desktop,5),o=r(e.tablet,t),l=r(e.mobile,o);return{desktop:t,tablet:o,mobile:l}},exports.convertSpacingForIndisdeLayout=i,exports.convertUnitToNumber=r,exports.getAspectRatio=l,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=(t,o,r)=>{let l=e.getResponsiveValueByScreen(t?.ftShape,o)?.shape==="original",i=l?e.getResponsiveValueByScreen(t?.ftNavigationPosition,o):"";return[JSON.stringify(t?.position),i,o,r].join("|")},exports.getGalleryCarouselRootId=o,exports.getGalleryCarouselSelector=e=>t.getCarouselElementSelector(o(e)),exports.getGalleryCarouselShouldInitByLayout=t=>{let o={};return e.DEVICES.forEach(r=>{let l=e.getResponsiveValueByScreen(t,r);o[r]=null==l||!n.includes(l)}),o},exports.getPaddingBottomByShapeSetting=t=>{let o=l(t),r={desktop:"auto",mobile:"auto",tablet:"auto"};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),n=i?.height,a=i?.width||"",u=s(n||""),p=a.toString().match(/px/g)?s(a):a;if(n&&a&&!isNaN(Number(u))&&!isNaN(Number(p))){r={...r,[l]:`${Number(u)/Number(p)*100}%`};return}if(n&&!isNaN(Number(u))){r={...r,[l]:n};return}let c=o?.[l]!=="auto"&&o?.[l]?o?.[l]?.split("/").reverse().join("/"):"{%if largestRatio == 0%} 100 / 100 {%else%} {{largestRatio}} {%endif%}";r={...r,[l]:`calc((${c})*100%)`}}),r},exports.getProductImagesCarouselInstanceId=(e,t)=>{let o=e=>e.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,""),r=o(e||"product-images"),l=o(t);return[r||"product-images",l||"instance"].join("-")},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}`,u="desktop"===l?"--gtr":`--gtr-${l}`,p="left"===i?s:n,c=["left","right"].includes(i||"");c&&p?(r=!0,Object.assign(o={...o,[a]:`minmax(0, ${p[0]}fr) minmax(0, ${p[1]}fr)`},{[u]:"fit-content(0)"})):r&&Object.assign(o,{[u]:"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,r)=>{let l={},s={},n={},a={},u={},p={};return["desktop","mobile","tablet"].forEach(c=>{let d=e.getResponsiveValueByScreen(t,c),g=e.getResponsiveValueByScreen(o,c)?.width,m=e.getResponsiveValueByScreen(r,c);if(l={...l,[c]:["inside-bottom","inside-left","inside-right"].includes(d)?"absolute":"static"},["inside-bottom"].includes(d)){let e=i(m);g=`calc(100% - ${e})`}["bottom-center","two-col","one-col"].includes(d)&&(g="100%"),n={...n,[c]:"inside-bottom"===d?`${m}`:"auto"},a={...a,[c]:["inside-left","inside-right"].includes(d)?`${m}`:"auto"},p={...p,[c]:["inside-bottom","inside-left"].includes(d)?`${m}`:"auto"},u={...u,[c]:"inside-right"===d?`${m}`:"auto"},s={...s,[c]:g}}),{...e.makeStyleResponsive("pos",l),...e.makeStyleResponsive("w",e.removeNullUndefined(s)),...e.makeStyleResponsive("bottom",e.removeNullUndefined(n)),...e.makeStyleResponsive("top",e.removeNullUndefined(a)),...e.makeStyleResponsive("left",e.removeNullUndefined(p)),...e.makeStyleResponsive("right",e.removeNullUndefined(u))}},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}});
|