@gem-sdk/components 4.0.0-staging.1169 → 4.0.0-staging.1172

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.
@@ -1 +1 @@
1
- "use strict";var helpers=require("../../common/helpers.js");const EstimateDateSettings=[{id:"setting",controls:[{id:"enableCustomText",label:"",type:"toggle",default:!0},{id:"customTextContainer",type:"group",controls:[{id:"customText",type:"input",default:"Estimate delivery between"}]},{id:"estimateDays",type:"group",controls:[{id:"typeEstimate",type:"group",controls:[{id:"typeEstimate",label:"Type",type:"option:value",default:helpers.ESTIMATE_DAYS.RANGE,options:[{label:"Specific",value:helpers.ESTIMATE_DAYS.SPECIFIC},{label:"Range",value:helpers.ESTIMATE_DAYS.RANGE}]},{id:"minEstimate",label:"Min estimate",type:"input:unit",default:2,emptyOnClear:!1,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,min:1,max:99969999,fallbackValue:2},{id:"maxEstimate",label:"Max estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:1,max:99969999,fallbackValue:5},{id:"estimateTime",label:"Estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:0,max:99969999,fallbackValue:5}]}]},{id:"dateFormat",type:"group",controls:[{id:"typeFormat",label:"Type",type:"select",default:helpers.listFormatDate().FORMAT_1.value,options:[{label:helpers.listFormatDate().FORMAT_1.Label,value:helpers.listFormatDate().FORMAT_1.value},{label:helpers.listFormatDate().FORMAT_2.Label,value:helpers.listFormatDate().FORMAT_2.value},{label:helpers.listFormatDate().FORMAT_3.Label,value:helpers.listFormatDate().FORMAT_3.value},{label:helpers.listFormatDate().FORMAT_4.Label,value:helpers.listFormatDate().FORMAT_4.value},{label:helpers.listFormatDate().FORMAT_5.Label,value:helpers.listFormatDate().FORMAT_5.value},{label:helpers.listFormatDate().FORMAT_6.Label,value:helpers.listFormatDate().FORMAT_6.Label}]},{id:"customFormat",label:"Custom format",type:"input",default:"",placeholder:"Eg: %d, %b, %y"},{id:"moreFormat",type:"group"}]},{id:"visibilityContainer",type:"group",controls:[{id:"visibility",type:"childrens"},{id:"ifOutOfStock",label:"If out of stock",type:"option:value",default:helpers.OUT_OF_STOCK.HIDE,options:[{label:"Show",value:helpers.OUT_OF_STOCK.SHOW},{label:"Hide",value:helpers.OUT_OF_STOCK.HIDE}]}]},{id:"translate",type:"input",default:"customText"},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%"}}},settingConfig:{width:{displayOptions:["full","auto"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}}},hiddenSettings:["shape","gap","height"]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1}}}}]},{id:"style",controls:[{id:"typoCustom",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typoDate",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];exports.EstimateDateSettings=EstimateDateSettings;
1
+ "use strict";var helpers=require("../../common/helpers.js");const EstimateDateSettings=[{id:"setting",controls:[{id:"enableCustomText",label:"",type:"toggle",default:!0},{id:"customTextContainer",type:"group",controls:[{id:"customText",type:"input",default:"Estimate delivery between"}]},{id:"estimateDays",type:"group",controls:[{id:"typeEstimate",type:"group",controls:[{id:"typeEstimate",label:"Type",type:"option:value",default:helpers.ESTIMATE_DAYS.RANGE,options:[{label:"Specific",value:helpers.ESTIMATE_DAYS.SPECIFIC},{label:"Range",value:helpers.ESTIMATE_DAYS.RANGE}]},{id:"minEstimate",label:"Min estimate",type:"input:unit",default:2,emptyOnClear:!1,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,min:1,max:99969999,fallbackValue:2},{id:"maxEstimate",label:"Max estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:1,max:99969999,fallbackValue:5},{id:"estimateTime",label:"Estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:0,max:99969999,fallbackValue:5}]}]},{id:"dateFormat",type:"group",controls:[{id:"typeFormat",label:"Type",type:"select",default:helpers.listFormatDate().FORMAT_1.value,options:[{label:helpers.listFormatDate().FORMAT_1.Label,value:helpers.listFormatDate().FORMAT_1.value},{label:helpers.listFormatDate().FORMAT_2.Label,value:helpers.listFormatDate().FORMAT_2.value},{label:helpers.listFormatDate().FORMAT_3.Label,value:helpers.listFormatDate().FORMAT_3.value},{label:helpers.listFormatDate().FORMAT_4.Label,value:helpers.listFormatDate().FORMAT_4.value},{label:helpers.listFormatDate().FORMAT_5.Label,value:helpers.listFormatDate().FORMAT_5.value},{label:helpers.listFormatDate().FORMAT_6.Label,value:helpers.listFormatDate().FORMAT_6.Label}]},{id:"customFormat",label:"Custom format",type:"input",default:"",placeholder:"Eg: %d, %b, %y"},{id:"moreFormat",type:"group"}]},{id:"visibilityContainer",type:"group",controls:[{id:"visibility",type:"childrens"},{id:"ifOutOfStock",label:"If out of stock",type:"option:value",default:helpers.OUT_OF_STOCK.SHOW,options:[{label:"Show",value:helpers.OUT_OF_STOCK.SHOW},{label:"Hide",value:helpers.OUT_OF_STOCK.HIDE}]}]},{id:"translate",type:"input",default:"customText"},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%"}}},settingConfig:{width:{displayOptions:["full","auto"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}}},hiddenSettings:["shape","gap","height"]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1}}}}]},{id:"style",controls:[{id:"typoCustom",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typoDate",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];exports.EstimateDateSettings=EstimateDateSettings;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),ProductGalleryGrid=require("../child/ProductGalleryGrid.js");const GalleryGrid=e=>{let{setting:r,styles:t,gallery:l,builderProps:i,noDataChildren:d,onHandleClickImage:u,children:n}=e,o={...r,...t};return(console.log("setting",r),l?.[0]?.id==="noImageError")?jsxRuntime.jsx(jsxRuntime.Fragment,{children:d}):jsxRuntime.jsx(ProductGalleryGrid.default,{productImages:l,enableHoverAction:!0,...o,builderPropUID:i?.uid,onHandleClick:(e,r)=>u(e||"",r),children:n})};exports.default=GalleryGrid;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),ProductGalleryGrid=require("../child/ProductGalleryGrid.js");const GalleryGrid=e=>{let{setting:r,styles:t,gallery:i,builderProps:l,noDataChildren:d,onHandleClickImage:u,children:n}=e,a={...r,...t};return i?.[0]?.id==="noImageError"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:d}):jsxRuntime.jsx(ProductGalleryGrid.default,{productImages:i,enableHoverAction:!0,...a,builderPropUID:l?.uid,onHandleClick:(e,r)=>u(e||"",r),children:n})};exports.default=GalleryGrid;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),Modal3d_liquid=require("../../../../../image/components/Modal3d.liquid.js"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),Video_liquid=require("../../../../../image/components/Video.liquid.js"),HTML5Embed_liquid=require("../../../../../video/components/HTML5Embed.liquid.js"),_function=require("../../../../helpers/function.js"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),productGallery=require("../../common/productGallery.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js");const ProductGalleryGrid=({builderPropUID:e,wrapperStyle:i,children:t,enableLazyLoadImage:a,...s})=>{let{galleryItemClasses:o,galleryGridWrapperClasses:d}=getProductImagesClassName.getProductImagesClassName(s),{galleryGridStyles:r,galleryGridItemStyles:l}=getProductImagesStyles.getProductImagesStyles(s),m=productGallery.getShapeByLayout({shape:s.shape,shapeForBottom:s.shapeForBottom,shapeFor1Col:s.shapeFor1Col,shapeFor2Col:s.shapeFor2Col,shapeForFtOnly:s.shapeForFtOnly,shapeForInsideBottom:s.shapeForInsideBottom,shapeForInside:s.shapeForInside},s.position),c=()=>{let e=["desktop","mobile","tablet"],i={desktop:"none",tablet:"none",mobile:"none"};return e.forEach(e=>{let t=core.getResponsiveValueByScreen(s?.position,e);i={...i,[e]:"one-col"===t||"two-col"==t?"block":"none"}}),core.makeStyleResponsive("d",i)},u=(e,i)=>core.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),Modal3d_liquid=require("../../../../../image/components/Modal3d.liquid.js"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),Video_liquid=require("../../../../../image/components/Video.liquid.js"),HTML5Embed_liquid=require("../../../../../video/components/HTML5Embed.liquid.js"),_function=require("../../../../helpers/function.js"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),productGallery=require("../../common/productGallery.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js");const ProductGalleryGrid=({builderPropUID:e,wrapperStyle:i,children:t,enableLazyLoadImage:a,...s})=>{let{galleryItemClasses:o,galleryGridWrapperClasses:d}=getProductImagesClassName.getProductImagesClassName(s),{galleryGridStyles:r,galleryGridItemStyles:l}=getProductImagesStyles.getProductImagesStyles(s),m=productGallery.getShapeByLayout({shape:s.shape,shapeForBottom:s.shapeForBottom,shapeFor1Col:s.shapeFor1Col,shapeFor2Col:s.shapeFor2Col,shapeForFtOnly:s.shapeForFtOnly,shapeForInsideBottom:s.shapeForInsideBottom,shapeForInside:s.shapeForInside},s.position),c=(e=!1)=>{let i=["desktop","mobile","tablet"],t={desktop:"none",tablet:"none",mobile:"none"};return i.forEach(i=>{let a=core.getResponsiveValueByScreen(s?.position,i)||"",o="one-col"===a||"two-col"===a,d=e?!o:o;t[i]=d?"block":"none"}),core.makeStyleResponsive("d",t)},u=()=>c(),g=()=>c(!0),p=(e,i)=>core.template`
2
2
  ${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:i,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:a})}
3
3
  ${system.If(s?.galleryHoverEffect!=="none",`<div class="${core.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",productFeaturedImage.getZoomImageClass())}">
4
4
  ${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:i,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:a})}
@@ -6,7 +6,7 @@
6
6
  ${system.If(s?.galleryHoverEffect=="zoom"&&s?.galleryZoomType=="glasses",`<div class="${core.cls("zoom-lens-element",productFeaturedImage.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
7
7
  </div>
8
8
  `," ")}
9
- `,g=()=>Modal3d_liquid.default({src:system.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:common.getAspectRatio(m)}),p=()=>Video_liquid.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),n=()=>HTML5Embed_liquid.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),y=()=>core.template`
9
+ `,n=()=>Modal3d_liquid.default({src:system.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:common.getAspectRatio(m)}),y=()=>Video_liquid.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),f=()=>HTML5Embed_liquid.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),h=()=>core.template`
10
10
  ${system.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,7 +19,7 @@
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
- ${u({aspectRatio:common.getAspectRatio(m),layout:s?.layout,qualityType:s?.qualityType,qualityPercent:s?.qualityPercent},{width:"100%",height:"100%"})}
22
+ ${p({aspectRatio:common.getAspectRatio(m),layout:s?.layout,qualityType:s?.qualityType,qualityPercent:s?.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
25
  style="${_function.getStyleOfObject(productGallery.getZoomDisplay(s?.clickOpenLightBox))}" >
@@ -39,7 +39,7 @@
39
39
  />
40
40
  </svg>
41
41
  </div>
42
- `,f=i=>`
42
+ `,C=i=>`
43
43
  ${system.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
44
44
  ${system.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
45
45
  ${system.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
@@ -56,34 +56,38 @@
56
56
  class="${o(`gem-slider-item-${e}-{{product.id}} gp-gallery-image-item ${i}`)}"
57
57
  style="${_function.getStyleOfObject(l)}"
58
58
  >
59
- <div class="gp-h-full gp-w-full" style="${system.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")}">
60
- ${system.LiquidIf("media != null",y(),h())}
59
+ ${system.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
60
+
61
+ ${system.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
62
+
63
+ <div class="gp-h-full gp-w-full" style="${system.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${system.LiquidIf("isVideo == true",_function.getStyleOfObject({...g()}))}">
64
+ ${system.LiquidIf("media != null",h(),v())}
61
65
  </div>
62
66
 
63
- {% assign isMedia= false %}
64
- ${system.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
65
67
  <div class="${system.LiquidIf("isMedia","gp-flex gp-justify-center gp-items-center")}"
66
- style="${system.LiquidIf("isMedia",_function.getStyleOfObject({...core.makeStyleResponsive("aspect",common.getAspectRatio(m))}))} ${_function.getStyleOfObject({...c()})}"
68
+ style="${system.LiquidIf("isMedia",_function.getStyleOfObject({...core.makeStyleResponsive("aspect",common.getAspectRatio(m))}))} ${_function.getStyleOfObject({...u()})}"
67
69
  >
68
70
  {% case media.media_type %}
69
71
  {% when 'external_video' %}
70
72
  {% assign mediaSourceVideo = media | external_video_url %}
71
- ${p()}
73
+ ${y()}
72
74
  {% when 'video' %}
73
75
  {% assign mediaSourceVideo = media.sources.last.url %}
74
- ${n()}
76
+ ${f()}
75
77
  {% when 'model' %}
76
- ${g()}
78
+ ${n()}
77
79
  {% endcase %}
78
80
  </div>
79
- </div>`,h=()=>core.template`
81
+ {% assign isVideo= false %}
82
+ {% assign isMedia= false %}
83
+ </div>`,v=()=>core.template`
80
84
  ${NextImage_liquid.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:common.getAspectRatio(m),layout:s?.layout,qualityType:s?.qualityType,qualityPercent:s?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:a})}`;return system.Liquid(`
81
85
  <div type="grid-gallery"
82
86
  class="${d}"
83
87
  style="${_function.getStyleOfObject(r)}}"
84
88
  >
85
89
  ${system.LiquidFor("media in product.media",`${system.LiquidIf("media.media_type == 'image'",system.LiquidFor("image in product.images",system.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
86
- ${system.LiquidIf("media.id == product.featured_media.id ",f(s?.borderActive?.border!=="none"?"active":""),f())}`)}
90
+ ${system.LiquidIf("media.id == product.featured_media.id ",C(s?.borderActive?.border!=="none"?"active":""),C())}`)}
87
91
  ${system.LiquidIf("product.media.size > 0",t)}
88
- ${system.LiquidIf("product.media.size < 1",f())}
92
+ ${system.LiquidIf("product.media.size < 1",C())}
89
93
  </div>`)};exports.default=ProductGalleryGrid;
@@ -1 +1 @@
1
- import{ESTIMATE_DAYS as e,listFormatDate as t,OUT_OF_STOCK as a}from"../../common/helpers.js";let EstimateDateSettings=[{id:"setting",controls:[{id:"enableCustomText",label:"",type:"toggle",default:!0},{id:"customTextContainer",type:"group",controls:[{id:"customText",type:"input",default:"Estimate delivery between"}]},{id:"estimateDays",type:"group",controls:[{id:"typeEstimate",type:"group",controls:[{id:"typeEstimate",label:"Type",type:"option:value",default:e.RANGE,options:[{label:"Specific",value:e.SPECIFIC},{label:"Range",value:e.RANGE}]},{id:"minEstimate",label:"Min estimate",type:"input:unit",default:2,emptyOnClear:!1,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,min:1,max:99969999,fallbackValue:2},{id:"maxEstimate",label:"Max estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:1,max:99969999,fallbackValue:5},{id:"estimateTime",label:"Estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:0,max:99969999,fallbackValue:5}]}]},{id:"dateFormat",type:"group",controls:[{id:"typeFormat",label:"Type",type:"select",default:t().FORMAT_1.value,options:[{label:t().FORMAT_1.Label,value:t().FORMAT_1.value},{label:t().FORMAT_2.Label,value:t().FORMAT_2.value},{label:t().FORMAT_3.Label,value:t().FORMAT_3.value},{label:t().FORMAT_4.Label,value:t().FORMAT_4.value},{label:t().FORMAT_5.Label,value:t().FORMAT_5.value},{label:t().FORMAT_6.Label,value:t().FORMAT_6.Label}]},{id:"customFormat",label:"Custom format",type:"input",default:"",placeholder:"Eg: %d, %b, %y"},{id:"moreFormat",type:"group"}]},{id:"visibilityContainer",type:"group",controls:[{id:"visibility",type:"childrens"},{id:"ifOutOfStock",label:"If out of stock",type:"option:value",default:a.HIDE,options:[{label:"Show",value:a.SHOW},{label:"Hide",value:a.HIDE}]}]},{id:"translate",type:"input",default:"customText"},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%"}}},settingConfig:{width:{displayOptions:["full","auto"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}}},hiddenSettings:["shape","gap","height"]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1}}}}]},{id:"style",controls:[{id:"typoCustom",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typoDate",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];export{EstimateDateSettings};
1
+ import{ESTIMATE_DAYS as e,listFormatDate as t,OUT_OF_STOCK as a}from"../../common/helpers.js";let EstimateDateSettings=[{id:"setting",controls:[{id:"enableCustomText",label:"",type:"toggle",default:!0},{id:"customTextContainer",type:"group",controls:[{id:"customText",type:"input",default:"Estimate delivery between"}]},{id:"estimateDays",type:"group",controls:[{id:"typeEstimate",type:"group",controls:[{id:"typeEstimate",label:"Type",type:"option:value",default:e.RANGE,options:[{label:"Specific",value:e.SPECIFIC},{label:"Range",value:e.RANGE}]},{id:"minEstimate",label:"Min estimate",type:"input:unit",default:2,emptyOnClear:!1,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,min:1,max:99969999,fallbackValue:2},{id:"maxEstimate",label:"Max estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:1,max:99969999,fallbackValue:5},{id:"estimateTime",label:"Estimate",type:"input:unit",default:5,units:["days"],isNumber:!0,showDefaultUnit:!0,hasSpaceBeforeUnit:!0,emptyOnClear:!1,min:0,max:99969999,fallbackValue:5}]}]},{id:"dateFormat",type:"group",controls:[{id:"typeFormat",label:"Type",type:"select",default:t().FORMAT_1.value,options:[{label:t().FORMAT_1.Label,value:t().FORMAT_1.value},{label:t().FORMAT_2.Label,value:t().FORMAT_2.value},{label:t().FORMAT_3.Label,value:t().FORMAT_3.value},{label:t().FORMAT_4.Label,value:t().FORMAT_4.value},{label:t().FORMAT_5.Label,value:t().FORMAT_5.value},{label:t().FORMAT_6.Label,value:t().FORMAT_6.Label}]},{id:"customFormat",label:"Custom format",type:"input",default:"",placeholder:"Eg: %d, %b, %y"},{id:"moreFormat",type:"group"}]},{id:"visibilityContainer",type:"group",controls:[{id:"visibility",type:"childrens"},{id:"ifOutOfStock",label:"If out of stock",type:"option:value",default:a.SHOW,options:[{label:"Show",value:a.SHOW},{label:"Hide",value:a.HIDE}]}]},{id:"translate",type:"input",default:"customText"},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%"}}},settingConfig:{width:{displayOptions:["full","auto"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}}},hiddenSettings:["shape","gap","height"]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1}}}}]},{id:"style",controls:[{id:"typoCustom",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typoDate",type:"typography-v2",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];export{EstimateDateSettings};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as r,Fragment as e}from"react/jsx-runtime";import l from"../child/ProductGalleryGrid.js";let GalleryGrid=o=>{let{setting:i,styles:t,gallery:d,builderProps:n,noDataChildren:a,onHandleClickImage:c,children:m}=o,u={...i,...t};return(console.log("setting",i),d?.[0]?.id==="noImageError")?r(e,{children:a}):r(l,{productImages:d,enableHoverAction:!0,...u,builderPropUID:n?.uid,onHandleClick:(r,e)=>c(r||"",e),children:m})};export{GalleryGrid as default};
2
+ import{jsx as r,Fragment as e}from"react/jsx-runtime";import l from"../child/ProductGalleryGrid.js";let GalleryGrid=i=>{let{setting:d,styles:o,gallery:t,builderProps:a,noDataChildren:n,onHandleClickImage:c,children:m}=i,u={...d,...o};return t?.[0]?.id==="noImageError"?r(e,{children:n}):r(l,{productImages:t,enableHoverAction:!0,...u,builderPropUID:a?.uid,onHandleClick:(r,e)=>c(r||"",e),children:m})};export{GalleryGrid as default};
@@ -1,12 +1,12 @@
1
- import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import c from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getAspectRatio as n,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let ProductGalleryGrid=({builderPropUID:_,wrapperStyle:$,children:b,enableLazyLoadImage:L,...x})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=f(x),{galleryGridStyles:q,galleryGridItemStyles:I}=w(x),M=C({shape:x.shape,shapeForBottom:x.shapeForBottom,shapeFor1Col:x.shapeFor1Col,shapeFor2Col:x.shapeFor2Col,shapeForFtOnly:x.shapeForFtOnly,shapeForInsideBottom:x.shapeForInsideBottom,shapeForInside:x.shapeForInside},x.position),j=()=>{let i=["desktop","mobile","tablet"],t={desktop:"none",tablet:"none",mobile:"none"};return i.forEach(e=>{let i=a(x?.position,e);t={...t,[e]:"one-col"===i||"two-col"==i?"block":"none"}}),e("d",t)},k=(e,a)=>i`
2
- ${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:L})}
3
- ${r(x?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
4
- ${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:L})}
1
+ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getAspectRatio as n,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let ProductGalleryGrid=({builderPropUID:_,wrapperStyle:$,children:b,enableLazyLoadImage:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=f(L),{galleryGridStyles:q,galleryGridItemStyles:I}=w(L),M=C({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t=["desktop","mobile","tablet"],o={desktop:"none",tablet:"none",mobile:"none"};return t.forEach(e=>{let t=a(L?.position,e)||"",s="one-col"===t||"two-col"===t,d=i?!s:s;o[e]=d?"block":"none"}),e("d",o)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
2
+ ${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}
3
+ ${r(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
4
+ ${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:x})}
5
5
  </div>`," ")}
6
- ${r(x?.galleryHoverEffect=="zoom"&&x?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
6
+ ${r(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
7
7
  </div>
8
8
  `," ")}
9
- `,S=()=>l({src:d("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:n(M)}),Z=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),z=()=>c({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),B=()=>i`
9
+ `,z=()=>l({src:d("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:n(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>g({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),P=()=>i`
10
10
  ${d("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 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
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
- ${k({aspectRatio:n(M),layout:x?.layout,qualityType:x?.qualityType,qualityPercent:x?.qualityPercent},{width:"100%",height:"100%"})}
22
+ ${Z({aspectRatio:n(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.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="${g(v(x?.clickOpenLightBox))}" >
25
+ style="${c(v(L?.clickOpenLightBox))}" >
26
26
  <svg
27
27
  height="100%"
28
28
  width="100%"
@@ -39,7 +39,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
39
39
  />
40
40
  </svg>
41
41
  </div>
42
- `,H=i=>`
42
+ `,N=i=>`
43
43
  ${d("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
44
44
  ${d("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
45
45
  ${d("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
@@ -54,36 +54,40 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
54
54
  grid-index="{{forloop.index}}"
55
55
  data-outline="${i?"active":"deactive"}"
56
56
  class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i}`)}"
57
- style="${g(I)}"
57
+ style="${c(I)}"
58
58
  >
59
- <div class="gp-h-full gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")}">
60
- ${d("media != null",B(),P())}
59
+ ${d("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
60
+
61
+ ${d("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
62
+
63
+ <div class="gp-h-full gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")} ${d("isVideo == true",c({...S()}))}">
64
+ ${d("media != null",P(),T())}
61
65
  </div>
62
66
 
63
- {% assign isMedia= false %}
64
- ${d("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
65
67
  <div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")}"
66
- style="${d("isMedia",g({...e("aspect",n(M))}))} ${g({...j()})}"
68
+ style="${d("isMedia",c({...e("aspect",n(M))}))} ${c({...k()})}"
67
69
  >
68
70
  {% case media.media_type %}
69
71
  {% when 'external_video' %}
70
72
  {% assign mediaSourceVideo = media | external_video_url %}
71
- ${Z()}
73
+ ${B()}
72
74
  {% when 'video' %}
73
75
  {% assign mediaSourceVideo = media.sources.last.url %}
74
- ${z()}
76
+ ${H()}
75
77
  {% when 'model' %}
76
- ${S()}
78
+ ${z()}
77
79
  {% endcase %}
78
80
  </div>
79
- </div>`,P=()=>i`
80
- ${m({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:n(M),layout:x?.layout,qualityType:x?.qualityType,qualityPercent:x?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:L})}`;return o(`
81
+ {% assign isVideo= false %}
82
+ {% assign isMedia= false %}
83
+ </div>`,T=()=>i`
84
+ ${m({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:n(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}`;return o(`
81
85
  <div type="grid-gallery"
82
86
  class="${V}"
83
- style="${g(q)}}"
87
+ style="${c(q)}}"
84
88
  >
85
89
  ${s("media in product.media",`${d("media.media_type == 'image'",s("image in product.images",d("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
86
- ${d("media.id == product.featured_media.id ",H(x?.borderActive?.border!=="none"?"active":""),H())}`)}
90
+ ${d("media.id == product.featured_media.id ",N(L?.borderActive?.border!=="none"?"active":""),N())}`)}
87
91
  ${d("product.media.size > 0",b)}
88
- ${d("product.media.size < 1",H())}
92
+ ${d("product.media.size < 1",N())}
89
93
  </div>`)};export{ProductGalleryGrid as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "4.0.0-staging.1169",
3
+ "version": "4.0.0-staging.1172",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",