@gem-sdk/components 2.0.0-dev.844 → 2.0.0-dev.845
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/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +1 -1
- package/dist/cjs/product/setting/product-image-v2/ProductImages.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +26 -26
- package/dist/esm/product/setting/product-image-v2/ProductImages.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const isFeatureMedia=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),getZoomLenClass=()=>"!gp-flex gp-absolute gp-opacity-0 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white gp-pointer-events-none",getZoomImageClass=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white gp-pointer-events-none";exports.getZoomImageClass=getZoomImageClass,exports.getZoomLenClass=getZoomLenClass,exports.isFeatureMedia=isFeatureMedia;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const devices=["desktop","tablet","mobile"],isFeatureMedia=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),getZoomLenClass=()=>"!gp-flex gp-absolute gp-opacity-0 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white gp-pointer-events-none",getZoomImageClass=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white gp-pointer-events-none",getDotStyleForOnlyFeaturedImage=e=>{let t={};return devices.map(o=>{let g=core.getResponsiveValueByScreen(e.position,o),s=core.getResponsiveValueByScreen(e.dotStyle,o);t={...t,[o]:"only-feature"===g?s:"none"}}),t},getDotSettingByLayout=(e,t)=>"only-feature"===e?t:void 0;exports.getDotSettingByLayout=getDotSettingByLayout,exports.getDotStyleForOnlyFeaturedImage=getDotStyleForOnlyFeaturedImage,exports.getZoomImageClass=getZoomImageClass,exports.getZoomLenClass=getZoomLenClass,exports.isFeatureMedia=isFeatureMedia;
|
package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),hoverAction=require("../../common/hoverAction.js"),MediaIcon=require("./MediaIcon.js"),NextImage=require("../../../../../image/components/NextImage.js"),react=require("react"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductFeaturedImageCarousel=({productImages:e,imgRef:t,onHandleClick:o,onClickArrow:r,onHandleLoaded:a,onHandleUpdateActiveIndex:i,builderPropUID:s,builderPropsClass:l,...
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Carousel=require("../../../../../carousel/components/Carousel.js"),CarouselItem=require("../../../../../carousel/components/CarouselItem.js"),core=require("@gem-sdk/core"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),hoverAction=require("../../common/hoverAction.js"),MediaIcon=require("./MediaIcon.js"),NextImage=require("../../../../../image/components/NextImage.js"),react=require("react"),getSrcSet=require("../../../../../image/helpers/getSrcSet.js");const ProductFeaturedImageCarousel=({productImages:e,imgRef:t,onHandleClick:o,onClickArrow:r,onHandleLoaded:a,onHandleUpdateActiveIndex:i,builderPropUID:s,builderPropsClass:l,...u})=>{let n;let c=core.useFeaturedImageGlobal(),d=core.useCurrentDevice(),g=core.useEditorMode(),m=core.useProduct(),p=core.useShopStore(e=>e.storefrontUrl),h=react.useMemo(()=>{let t=e?.findIndex(e=>e.id===c?.id);return t&&t>0?t:0},[e,c]),f=react.useCallback(()=>{getSrcSet.handleSetSrcForFeatureProductImage({builderPropUID:s,ftShape:u.ftShape,qualityType:u.qualityType,qualityPercent:u.qualityPercent})},[u.ftShape,u.qualityPercent,u.qualityType,s]),y=react.useMemo(()=>core.getResponsiveValueByScreen(u?.position,d),[d,u?.position]);react.useEffect(()=>{if("edit"===g)return;let e=document?.querySelector(`.gem-slider-item-${s} .featured-image-only`);if(!e)return;f();let t=new ResizeObserver(()=>{f()});return t?.observe(e,{}),()=>{t?.disconnect()}},[f,s,g]);let S=react.useMemo(()=>({desktop:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"desktop"),tablet:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"tablet"),mobile:"inside"===core.getResponsiveValueByScreen(u.ftNavigationPosition,"mobile")}),[u.ftNavigationPosition]),v=react.useMemo(()=>"popup"===core.getResponsiveValueByScreen(u.ftClickOpenLightBox,d),[u.ftClickOpenLightBox,d]),w=react.useMemo(()=>{if(!p)return"#";let e=new URL(p);return m?`${e.protocol}//${e.host}/products/${m.handle}`:"#"},[p,m]),C=react.useMemo(()=>{let e={},t=["desktop","mobile","tablet"];return t.forEach(t=>{let o=core.getResponsiveValueByScreen(u.ftShape,t),r=o?.width;e={...e,[t]:r||"100%"}}),e},[u.ftShape]),x=react.useMemo(()=>core.getHeightByShapeGlobalSize(u.ftShape),[u.ftShape]),I=react.useMemo(()=>u?.hoverEffect==="other"?e?.[u?.otherImage?u.otherImage:0]:e?.find(e=>e.id===c?.id)||e?.[0],[c,e,u?.hoverEffect,u?.otherImage]),b=function(){return Math.random().toString(36).substr(2,5)},k=e=>{n&&clearTimeout(n),n=setTimeout(()=>i&&i(e),500)},j=e=>"product-link"===core.getResponsiveValueByScreen(u.ftClickOpenLightBox,d)?jsxRuntime.jsx("a",{title:m?.title,href:w,className:"gp-w-full",children:e}):e,R=()=>{let t="1/1",o=0;return e?.forEach(e=>{if(e.width&&e.height){let r=e.height/e.width;r>o&&(o=r,t=`${e.width}/${e.height}`)}}),t},B=()=>{let e=common.getAspectRatio(u.ftShape),t=R();return{desktop:e.desktop||t,tablet:e.tablet||t,mobile:e.mobile||t}};return jsxRuntime.jsx(Carousel.default,{parentClass:l,elmRef:t,setting:{loop:u?.ftLoop,dotStyle:productFeaturedImage.getDotSettingByLayout(y,u.ftDotStyle),dotSize:productFeaturedImage.getDotSettingByLayout(y,u.ftDotSize),dotGapToCarousel:productFeaturedImage.getDotSettingByLayout(y,u.ftDotGapToCarousel),dotColor:productFeaturedImage.getDotSettingByLayout(y,u.ftDotColor),dotActiveColor:productFeaturedImage.getDotSettingByLayout(y,u.ftDotActiveColor),itemNumber:{desktop:1},slidesToShow:{desktop:1},defaultCurrentSlider:h,controlOverContent:S,enableDrag:{desktop:u?.ftDragToScroll,tablet:u?.ftDragToScroll,mobile:u?.ftDragToScroll},arrowCustom:u?.ftArrowIcon,arrowCustomColor:u?.ftArrowIconColor,arrowBackgroundColor:u?.ftArrowNavColor,arrowBorder:{desktop:u?.ftArrowNavBorder},roundedArrow:{desktop:u?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:u?.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},styles:{sizeSetting:{desktop:{width:C?.desktop||"100%",height:"auto"},tablet:{width:C?.tablet||"100%",height:"auto"},mobile:{width:C?.mobile||"100%",height:"auto"}},align:{desktop:core.getResponsiveValueByScreen(u?.align,"desktop"),tablet:core.getResponsiveValueByScreen(u?.align,"tablet"),mobile:core.getResponsiveValueByScreen(u?.align,"mobile")}},builderProps:{uid:s},isHiddenArrowWhenDisabled:!0,onLoaded:e=>a&&a(e),onChangeActive:e=>k(e),onClickArrow:()=>r&&r(b()),moveToIdx:h,disableMarginAuto:!0,children:e?.map(e=>jsxRuntime.jsx(CarouselItem.default,{contentType:"productImage",className:core.cls(`gem-slider-item !gp-min-w-full !gp-max-w-full gem-slider-item-${s} gp-ft-image-item gp-group gp-relative gp-flex gp-w-full gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1`),onClick:()=>{o(e?.id||"",v)},style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...core.composeRadius({normal:u.ftCorner}),...core.makeStyleResponsive("h",core.makeHeight(x))},onMouseMove:e=>hoverAction.handleMouseMove(e,u),onMouseOut:e=>hoverAction.handleMouseOut(e),children:j(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NextImage.default,{src:e.src,width:e?.width,height:e?.height,alt:e?.alt,setting:{aspectRatio:B(),layout:u?.ftLayout},className:"featured-image-only",priority:u?.preload,style:{width:"100%",height:"100%",cursor:"pointer"}}),jsxRuntime.jsx(MediaIcon.default,{contentType:e?.contentType||""}),u?.hoverEffect!=="none"&&!productFeaturedImage.isFeatureMedia(e?.contentType)&&jsxRuntime.jsx(NextImage.default,{src:u?.hoverEffect==="other"?I?.src:e.src,width:u?.hoverEffect==="other"?I?.width:e.width,height:u?.hoverEffect==="other"?I?.height:e.height,alt:u?.hoverEffect==="other"?I?.alt:e.alt,setting:{aspectRatio:B(),layout:u?.ftLayout},style:{width:"100%",height:"100%"},className:core.cls("hover-image featured-image-only !gp-max-w-none",productFeaturedImage.getZoomImageClass()),priority:u?.preload}),u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!productFeaturedImage.isFeatureMedia(e?.contentType)&&jsxRuntime.jsx("div",{className:core.cls(productFeaturedImage.getZoomLenClass(),"room-len"),style:{...core.makeStyle({bgi:`url("${e?.src}")`})}})]}))},e?.id))})};var ProductFeaturedImageCarousel$1=react.memo(ProductFeaturedImageCarousel);exports.default=ProductFeaturedImageCarousel$1;
|
package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
${Carousel_liquid.default({builderProps:{uid:e},rootId:`ft-${e}-{{section.id}}-{{product.id}}`,rootClass:`
|
|
54
54
|
${core.cls("outside"===core.getResponsiveValueByScreen(t?.ftNavigationPosition,"desktop")?"gp-px-[16px]":"gp-px-0","outside"===core.getResponsiveValueByScreen(t?.ftNavigationPosition,"tablet")?"tablet:gp-px-[16px]":"tablet:gp-px-0","outside"===core.getResponsiveValueByScreen(t?.ftNavigationPosition,"mobile")?"mobile:gp-px-[16px]":"mobile:gp-px-0")}
|
|
55
55
|
gp-flex-1 gp-w-full gp-feature-image-carousel
|
|
56
|
-
`,rootAttr:'type="gp-feature-image-carousel"',isHiddenArrowWhenDisabled:!0,setting:{loop:t?.ftLoop,slidesToShow:{desktop:1},dotStyle:t.ftDotStyle,dotSize:t.ftDotSize,dotGapToCarousel:t.ftDotGapToCarousel,dotColor:t.ftDotColor,dotActiveColor:t.ftDotActiveColor,controlOverContent:a,enableDrag:{desktop:t?.ftDragToScroll,tablet:t?.ftDragToScroll,mobile:t?.ftDragToScroll},arrowCustom:t?.ftArrowIcon,arrowCustomColor:t?.ftArrowIconColor,arrowBackgroundColor:t?.ftArrowNavColor,arrowBorder:{desktop:t?.ftArrowNavBorder},roundedArrow:{desktop:t?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:t.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootStyles:{...h,...o(),...core.makeStyleResponsive("jc",t?.align)},styles:{sizeSetting:{desktop:{width:r().desktop||"100%",height:"auto"},tablet:{width:r().tablet||"100%",height:"auto"},mobile:{width:r().mobile||"100%",height:"auto"}},align:{desktop:core.getResponsiveValueByScreen(t?.align,"desktop"),tablet:core.getResponsiveValueByScreen(t?.align,"tablet"),mobile:core.getResponsiveValueByScreen(t?.align,"mobile")}},disableMarginAuto:!0,children:`
|
|
56
|
+
`,rootAttr:'type="gp-feature-image-carousel"',isHiddenArrowWhenDisabled:!0,setting:{loop:t?.ftLoop,slidesToShow:{desktop:1},dotStyle:productFeaturedImage.getDotStyleForOnlyFeaturedImage({position:t.position,dotStyle:t.ftDotStyle}),dotSize:t.ftDotSize,dotGapToCarousel:t.ftDotGapToCarousel,dotColor:t.ftDotColor,dotActiveColor:t.ftDotActiveColor,controlOverContent:a,enableDrag:{desktop:t?.ftDragToScroll,tablet:t?.ftDragToScroll,mobile:t?.ftDragToScroll},arrowCustom:t?.ftArrowIcon,arrowCustomColor:t?.ftArrowIconColor,arrowBackgroundColor:t?.ftArrowNavColor,arrowBorder:{desktop:t?.ftArrowNavBorder},roundedArrow:{desktop:t?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:t.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootStyles:{...h,...o(),...core.makeStyleResponsive("jc",t?.align)},styles:{sizeSetting:{desktop:{width:r().desktop||"100%",height:"auto"},tablet:{width:r().tablet||"100%",height:"auto"},mobile:{width:r().mobile||"100%",height:"auto"}},align:{desktop:core.getResponsiveValueByScreen(t?.align,"desktop"),tablet:core.getResponsiveValueByScreen(t?.align,"tablet"),mobile:core.getResponsiveValueByScreen(t?.align,"mobile")}},disableMarginAuto:!0,children:`
|
|
57
57
|
{%- if product.media.size > 0 -%}
|
|
58
58
|
{% assign largestRatio = 0 %}
|
|
59
59
|
{% for featureMedia in product.media %}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M13.3337 14.6666C13.3337 16.1333 12.1337 17.3333 10.667 17.3333C9.20033 17.3333 8.00033 16.1333 8.00033 14.6666C8.00033 13.2 9.20033 12 10.667 12C12.1337 12 13.3337 13.2 13.3337 14.6666ZM27.3741 14.8404C26.9836 14.4499 26.3504 14.4499 25.9599 14.8404L16.667 24.1333L14.0346 21.6062C13.6442 21.2314 13.0267 21.2352 12.6409 21.6145L5.33366 28.8V9.33329H34.667V22.1333L27.3741 14.8404ZM34.667 30.6666H23.2003L18.5337 26L26.667 17.8666L34.667 25.8666V30.6666ZM7.33366 30.6666L13.467 24.6666L19.467 30.6666H7.33366ZM3.66699 6.66663C3.11471 6.66663 2.66699 7.11434 2.66699 7.66663V31.4666V32.3333C2.66699 32.8856 3.11471 33.3333 3.66699 33.3333H25.867H36.3337C36.8859 33.3333 37.3337 32.8856 37.3337 32.3333V30.6666V28.5333V24.8V7.66662C37.3337 7.11434 36.8859 6.66663 36.3337 6.66663H3.66699Z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:ProductFeatureImage.productSelectDisplaySetting},{id:"featured-image",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageSetting},{id:"gallery-images",type:"group",label:"Gallery Images",controls:ProductGalleryImage.productGalleryImageSetting},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}
|
|
5
|
+
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:ProductFeatureImage.productSelectDisplaySetting},{id:"featured-image",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageSetting},{id:"gallery-images",type:"group",label:"Gallery Images",controls:ProductGalleryImage.productGalleryImageSetting},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:number",min:1,devices:{desktop:{default:12}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:unit",useOnlyUnitInit:!0,units:["px"],min:0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"colorpicker",devices:{desktop:{default:"bg-1"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"colorpicker",devices:{desktop:{default:"line-3"}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-segment",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",options:[{label:"Bottom",value:"bottom-center",type:"p-image-layout"},{label:"Left",value:"left",type:"p-image-layout"},{label:"Right",value:"right",type:"p-image-layout"},{label:"Only Feature Image",value:"only-feature",type:"p-image-layout"},{label:"2 Col",value:"two-col",type:"p-image-layout"},{label:"1 Col",value:"one-col",type:"p-image-layout"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"var(--g-s-s)"},mobile:{default:"var(--g-s-s)"}}},{id:"ratioLayout",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageStyle},{id:"galleryStyles",type:"group",label:"Gallery",controls:ProductGalleryImage.productGalleryImageStyle},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:getDefaultResponsive("flex-start")}]}],ui:[{type:"group",label:{en:"Layout"},controls:[{type:"control",layout:"vertical",setting:{id:"position"}},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayout"},layout:"vertical",condition:'position == "left"'},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayoutRight"},layout:"vertical",condition:'position == "right"'},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"},isMoreSetting:!0,condition:'["bottom-center", "left", "right"].includes(position)'},{type:"control",label:{en:"Spacing"},setting:{id:"itemSpacing"},isMoreSetting:!0,condition:'["one-col", "two-col"].includes(position)'}]},{type:"group",label:{en:"Select images to display"},controls:ProductFeatureImage.productSelectImage,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Featured image"},controls:ProductFeatureImage.productFeatureImageUI,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)',hiddenDivice:!0},{type:"group",label:{en:""},controls:ProductFeatureImage.productFeatureImageNavigationUI,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Dots"},controls:[{type:"control",setting:{id:"ftDotStyle"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Inactive dot color"},setting:{id:"ftDotColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Active dot color"},setting:{id:"ftDotActiveColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Dots size"},setting:{id:"ftDotSize"},isMoreSetting:!0},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Gap to carousel"},setting:{id:"ftDotGapToCarousel"},isMoreSetting:!0}],condition:'position === "only-feature"'},{type:"group",label:{en:"Image list"},controls:ProductGalleryImage.productGalleryImageUI,condition:'position !== "only-feature"',hiddenDivice:!0},{type:"group",label:{en:""},controls:ProductGalleryImage.productGalleryImageNavigationUI,condition:'position !== "only-feature"'},{type:"group",controls:[{type:"control",label:{en:"Quality"},options:{label:"large"},setting:{id:"qualityType"}},{type:"control",layout:"horizontal",label:{en:" "},condition:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{type:"control",label:{en:"Align"},setting:{id:"align"}}],editorConfigs:{placeholder:{flowTag:["Product"]}},presets:[{id:"product-image-v2",name:{en:"Product Images"},icon:{desktop:`
|
|
6
6
|
<svg width="70" height="48" viewBox="0 0 70 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<rect x="10" width="10" height="10" rx="3" transform="rotate(90 10 0)" fill="#494949"/>
|
|
8
8
|
<rect x="10" y="12" width="10" height="10" rx="3" transform="rotate(90 10 12)" fill="#494949"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let isFeatureMedia=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),getZoomLenClass=()=>"!gp-flex gp-absolute gp-opacity-0 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white gp-pointer-events-none",getZoomImageClass=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white gp-pointer-events-none";export{getZoomImageClass,getZoomLenClass,isFeatureMedia};
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";let devices=["desktop","tablet","mobile"],isFeatureMedia=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),getZoomLenClass=()=>"!gp-flex gp-absolute gp-opacity-0 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white gp-pointer-events-none",getZoomImageClass=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white gp-pointer-events-none",getDotStyleForOnlyFeaturedImage=t=>{let o={};return devices.map(g=>{let p=e(t.position,g),a=e(t.dotStyle,g);o={...o,[g]:"only-feature"===p?a:"none"}}),o},getDotSettingByLayout=(e,t)=>"only-feature"===e?t:void 0;export{getDotSettingByLayout,getDotStyleForOnlyFeaturedImage,getZoomImageClass,getZoomLenClass,isFeatureMedia};
|
package/dist/esm/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import r from"../../../../../carousel/components/Carousel.js";import i from"../../../../../carousel/components/CarouselItem.js";import{useFeaturedImageGlobal as a,useCurrentDevice as l,useEditorMode as n,useProduct as s,useShopStore as d,getResponsiveValueByScreen as m,getHeightByShapeGlobalSize as p,cls as h,composeRadius as f,makeStyleResponsive as c,makeHeight as u,makeStyle as g}from"@gem-sdk/core";import{getAspectRatio as w}from"../../common/common.js";import{
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import r from"../../../../../carousel/components/Carousel.js";import i from"../../../../../carousel/components/CarouselItem.js";import{useFeaturedImageGlobal as a,useCurrentDevice as l,useEditorMode as n,useProduct as s,useShopStore as d,getResponsiveValueByScreen as m,getHeightByShapeGlobalSize as p,cls as h,composeRadius as f,makeStyleResponsive as c,makeHeight as u,makeStyle as g}from"@gem-sdk/core";import{getAspectRatio as w}from"../../common/common.js";import{getDotSettingByLayout as y,isFeatureMedia as v,getZoomImageClass as b,getZoomLenClass as C}from"../../common/productFeaturedImage.js";import{handleMouseMove as k,handleMouseOut as S}from"../../common/hoverAction.js";import T from"./MediaIcon.js";import I from"../../../../../image/components/NextImage.js";import{memo as N,useMemo as x,useCallback as P,useEffect as A}from"react";import{handleSetSrcForFeatureProductImage as E}from"../../../../../image/helpers/getSrcSet.js";let ProductFeaturedImageCarousel=({productImages:N,imgRef:j,onHandleClick:D,onClickArrow:$,onHandleLoaded:L,onHandleUpdateActiveIndex:q,builderPropUID:z,builderPropsClass:B,...M})=>{let O;let R=a(),F=l(),G=n(),U=s(),W=d(e=>e.storefrontUrl),H=x(()=>{let e=N?.findIndex(e=>e.id===R?.id);return e&&e>0?e:0},[N,R]),J=P(()=>{E({builderPropUID:z,ftShape:M.ftShape,qualityType:M.qualityType,qualityPercent:M.qualityPercent})},[M.ftShape,M.qualityPercent,M.qualityType,z]),K=x(()=>m(M?.position,F),[F,M?.position]);A(()=>{if("edit"===G)return;let e=document?.querySelector(`.gem-slider-item-${z} .featured-image-only`);if(!e)return;J();let t=new ResizeObserver(()=>{J()});return t?.observe(e,{}),()=>{t?.disconnect()}},[J,z,G]);let Q=x(()=>({desktop:"inside"===m(M.ftNavigationPosition,"desktop"),tablet:"inside"===m(M.ftNavigationPosition,"tablet"),mobile:"inside"===m(M.ftNavigationPosition,"mobile")}),[M.ftNavigationPosition]),V=x(()=>"popup"===m(M.ftClickOpenLightBox,F),[M.ftClickOpenLightBox,F]),X=x(()=>{if(!W)return"#";let e=new URL(W);return U?`${e.protocol}//${e.host}/products/${U.handle}`:"#"},[W,U]),Y=x(()=>{let e={},t=["desktop","mobile","tablet"];return t.forEach(t=>{let o=m(M.ftShape,t),r=o?.width;e={...e,[t]:r||"100%"}}),e},[M.ftShape]),Z=x(()=>p(M.ftShape),[M.ftShape]),_=x(()=>M?.hoverEffect==="other"?N?.[M?.otherImage?M.otherImage:0]:N?.find(e=>e.id===R?.id)||N?.[0],[R,N,M?.hoverEffect,M?.otherImage]),ee=function(){return Math.random().toString(36).substr(2,5)},et=e=>{O&&clearTimeout(O),O=setTimeout(()=>q&&q(e),500)},eo=t=>"product-link"===m(M.ftClickOpenLightBox,F)?e("a",{title:U?.title,href:X,className:"gp-w-full",children:t}):t,er=()=>{let e="1/1",t=0;return N?.forEach(o=>{if(o.width&&o.height){let r=o.height/o.width;r>t&&(t=r,e=`${o.width}/${o.height}`)}}),e},ei=()=>{let e=w(M.ftShape),t=er();return{desktop:e.desktop||t,tablet:e.tablet||t,mobile:e.mobile||t}};return e(r,{parentClass:B,elmRef:j,setting:{loop:M?.ftLoop,dotStyle:y(K,M.ftDotStyle),dotSize:y(K,M.ftDotSize),dotGapToCarousel:y(K,M.ftDotGapToCarousel),dotColor:y(K,M.ftDotColor),dotActiveColor:y(K,M.ftDotActiveColor),itemNumber:{desktop:1},slidesToShow:{desktop:1},defaultCurrentSlider:H,controlOverContent:Q,enableDrag:{desktop:M?.ftDragToScroll,tablet:M?.ftDragToScroll,mobile:M?.ftDragToScroll},arrowCustom:M?.ftArrowIcon,arrowCustomColor:M?.ftArrowIconColor,arrowBackgroundColor:M?.ftArrowNavColor,arrowBorder:{desktop:M?.ftArrowNavBorder},roundedArrow:{desktop:M?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:M?.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},styles:{sizeSetting:{desktop:{width:Y?.desktop||"100%",height:"auto"},tablet:{width:Y?.tablet||"100%",height:"auto"},mobile:{width:Y?.mobile||"100%",height:"auto"}},align:{desktop:m(M?.align,"desktop"),tablet:m(M?.align,"tablet"),mobile:m(M?.align,"mobile")}},builderProps:{uid:z},isHiddenArrowWhenDisabled:!0,onLoaded:e=>L&&L(e),onChangeActive:e=>et(e),onClickArrow:()=>$&&$(ee()),moveToIdx:H,disableMarginAuto:!0,children:N?.map(r=>e(i,{contentType:"productImage",className:h(`gem-slider-item !gp-min-w-full !gp-max-w-full gem-slider-item-${z} gp-ft-image-item gp-group gp-relative gp-flex gp-w-full gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1`),onClick:()=>{D(r?.id||"",V)},style:{maxWidth:"100%",outlineColor:"var(--g-c-brand, brand)",...f({normal:M.ftCorner}),...c("h",u(Z))},onMouseMove:e=>k(e,M),onMouseOut:e=>S(e),children:eo(t(o,{children:[e(I,{src:r.src,width:r?.width,height:r?.height,alt:r?.alt,setting:{aspectRatio:ei(),layout:M?.ftLayout},className:"featured-image-only",priority:M?.preload,style:{width:"100%",height:"100%",cursor:"pointer"}}),e(T,{contentType:r?.contentType||""}),M?.hoverEffect!=="none"&&!v(r?.contentType)&&e(I,{src:M?.hoverEffect==="other"?_?.src:r.src,width:M?.hoverEffect==="other"?_?.width:r.width,height:M?.hoverEffect==="other"?_?.height:r.height,alt:M?.hoverEffect==="other"?_?.alt:r.alt,setting:{aspectRatio:ei(),layout:M?.ftLayout},style:{width:"100%",height:"100%"},className:h("hover-image featured-image-only !gp-max-w-none",b()),priority:M?.preload}),M?.hoverEffect=="zoom"&&M?.zoomType=="glasses"&&!v(r?.contentType)&&e("div",{className:h(C(),"room-len"),style:{...g({bgi:`url("${r?.src}")`})}})]}))},r?.id))})};var ProductFeaturedImageCarousel$1=N(ProductFeaturedImageCarousel);export{ProductFeaturedImageCarousel$1 as default};
|
package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e,template as t,cls as i,makeStyleResponsive as o,composeRadius as a,makeHeight as r,getHeightByShapeGlobalSize as s}from"@gem-sdk/core";import{getAspectRatio as l,getStyleGridOrderForFeature as d,getDisplayStyle as n,getSrcImage as
|
|
1
|
+
import{getResponsiveValueByScreen as e,template as t,cls as i,makeStyleResponsive as o,composeRadius as a,makeHeight as r,getHeightByShapeGlobalSize as s}from"@gem-sdk/core";import{getAspectRatio as l,getStyleGridOrderForFeature as d,getDisplayStyle as n,getSrcImage as p}from"../common/common.js";import{getDotStyleForOnlyFeaturedImage as u,getZoomImageClass as g,getZoomLenClass as f}from"../common/productFeaturedImage.js";import m from"../../../../carousel/components/Carousel.liquid.js";import c from"../../../../carousel/components/CarouselItem.liquid.js";import h from"../../../../video/components/HTML5Embed.liquid.js";import b from"../../../../image/components/Modal3d.liquid.js";import y from"../../../../image/components/NextImage.liquid.js";import w from"../../../../image/components/Video.liquid.js";import{getStyleOfObject as v}from"../../../helpers/function.js";let ProductFeaturedImageCarousel=({builderPropUID:M,...$})=>{let x=l($.ftShape),S=()=>n(t=>!["bottom-center","left","right","only-feature"].includes(e($?.position,t)||""),"flex"),N={desktop:"inside"===e($.ftNavigationPosition,"desktop"),tablet:"inside"===e($.ftNavigationPosition,"tablet"),mobile:"inside"===e($.ftNavigationPosition,"mobile")},I=()=>{let t={},i=["desktop","mobile","tablet"];return i.forEach(i=>{t={...t,[i]:e($.ftShape,i)?.width||"100%"}}),t},k=()=>s($.ftShape),_=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
|
-
${
|
|
4
|
+
${T()}
|
|
5
5
|
{% when 'external_video' %}
|
|
6
6
|
{% assign mediaSourceVideo = featureMedia | external_video_url %}
|
|
7
|
-
${
|
|
7
|
+
${q()}
|
|
8
8
|
{% when 'video' %}
|
|
9
9
|
{% assign mediaSourceVideo = featureMedia.sources.last.url %}
|
|
10
|
-
${
|
|
10
|
+
${P()}
|
|
11
11
|
{% when 'model' %}
|
|
12
|
-
${
|
|
12
|
+
${C()}
|
|
13
13
|
{% else %}
|
|
14
14
|
{{ featureMedia | media_tag }}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
${
|
|
16
|
+
`,C=()=>b({src:"{% if featureMedia.sources.first.url contains '.glb' %}{{ featureMedia.sources.first.url }}{% else %}{{featureMedia.sources.last.url}}{% endif %}",alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:x}),q=()=>w({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:x}),P=()=>h({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),T=()=>t`
|
|
17
|
+
${j(i("gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==$.hoverEffect},"{{shouldHidden}}"))}
|
|
18
|
+
${$?.hoverEffect!=="none"?`<div class="${i("zoom-element !gp-max-w-none",g())}">
|
|
19
|
+
${j("image-zoom",!0)}
|
|
20
20
|
</div>`:""}
|
|
21
|
-
${
|
|
22
|
-
<div class="${i("zoom-lens-element",
|
|
21
|
+
${$?.hoverEffect=="zoom"&&$?.zoomType=="glasses"?`
|
|
22
|
+
<div class="${i("zoom-lens-element",f())}"
|
|
23
23
|
style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`:""}
|
|
24
|
-
`,
|
|
24
|
+
`,j=(e,i)=>t`
|
|
25
25
|
{% assign src = featureMedia.src %}
|
|
26
|
-
${i&&"other"
|
|
27
|
-
{% assign otherImage = product.media[${
|
|
26
|
+
${i&&"other"==$.hoverEffect?`
|
|
27
|
+
{% assign otherImage = product.media[${$.otherImage}] %}
|
|
28
28
|
{% assign src = otherImage.src %}
|
|
29
29
|
{% if otherImage.media_type != 'image' %}
|
|
30
30
|
{% assign src = otherImage.preview_image.src %}
|
|
31
31
|
{%- endif -%}
|
|
32
32
|
`:""}
|
|
33
|
-
${
|
|
34
|
-
${
|
|
33
|
+
${y({srcIsLiquidCode:!0,src:`{%- if src != null -%}
|
|
34
|
+
${p("src")}
|
|
35
35
|
{%- else -%}
|
|
36
36
|
{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}
|
|
37
37
|
{%- endif -%}`,id:`{%- if featureMedia != null -%}
|
|
38
38
|
{{featureMedia.id}}
|
|
39
|
-
{%- endif -%}`,width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt}}",baseSrc:"{{src | img_url}}",setting:{layout
|
|
39
|
+
{%- endif -%}`,width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt}}",baseSrc:"{{src | img_url}}",setting:{layout:$?.ftLayout,aspectRatio:x,qualityType:$?.qualityType,qualityPercent:$?.qualityPercent},priority:$?.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}`})}`,D=e=>{let t=e.match(/\d+/g);return t?t[0]:e},A=()=>{let t=l($.ftShape),i={desktop:"auto",mobile:"auto",tablet:"auto"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let a=e($.ftShape,o),r=a?.height,s=a?.width,l=D(r||""),d=D(s||"");if(r&&s&&!isNaN(Number(l))&&!isNaN(Number(d))){i={...i,[o]:`${Number(l)/Number(d)*100}%`};return}if(r&&!isNaN(Number(l))){i={...i,[o]:r};return}let n=t?.[o]!=="auto"&&t?.[o]?t?.[o]?.split("/").reverse().join("/"):"{%if largestRatio == 0%} 100 / 100 {%else%} {{largestRatio}} {%endif%}";i={...i,[o]:`calc((${n})*100%)`}}),i},z=e=>`
|
|
40
40
|
{% assign productImageWidth = 0 %}
|
|
41
41
|
{% case featureMedia.media_type %}
|
|
42
42
|
{% when 'image' %}
|
|
@@ -44,16 +44,16 @@ import{getResponsiveValueByScreen as e,template as t,cls as i,makeStyleResponsiv
|
|
|
44
44
|
{% else %}
|
|
45
45
|
{% assign productImageWidth = featureMedia.preview_image.width %}
|
|
46
46
|
{% endcase %}
|
|
47
|
-
${
|
|
48
|
-
<div class="gp-w-full {% if featureMedia.media_type == 'image' %} {{ 'gp-h-0' }} {% else %} {{ 'gp-h-full !gp-pb-0' }} {% endif %} gp-relative" style="${
|
|
47
|
+
${c({id:"{{section.id}}-{{imageID}}",contentType:"productImage",className:`gp-group gp-flex !gp-min-w-full !gp-max-w-full gp-w-full gp-relative gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 gp-image-item gp-ft-image-item data-[outline=active]:gp-outline ${e}`,parentId:`${M}-{{section.id}}-{{product.id}}`,style:{"outline-color":"var(--g-c-brand, brand)",...a({normal:$.ftCorner}),...o("h",r(k()))},customStyle:{width:"{{productImageWidth}}px"},children:`
|
|
48
|
+
<div class="gp-w-full {% if featureMedia.media_type == 'image' %} {{ 'gp-h-0' }} {% else %} {{ 'gp-h-full !gp-pb-0' }} {% endif %} gp-relative" style="${v(o("pb",A()))} {% if featureMedia.media_type == 'video' or featureMedia.media_type == 'external_video' %} {{ 'display: flex; align-items: center; justify-content: center' }} {% endif %}"
|
|
49
49
|
>
|
|
50
|
-
${
|
|
50
|
+
${_()}
|
|
51
51
|
</div>
|
|
52
|
-
`})}`,
|
|
53
|
-
${
|
|
54
|
-
${i("outside"===e(
|
|
52
|
+
`})}`,R=d({position:$.position});return t`
|
|
53
|
+
${m({builderProps:{uid:M},rootId:`ft-${M}-{{section.id}}-{{product.id}}`,rootClass:`
|
|
54
|
+
${i("outside"===e($?.ftNavigationPosition,"desktop")?"gp-px-[16px]":"gp-px-0","outside"===e($?.ftNavigationPosition,"tablet")?"tablet:gp-px-[16px]":"tablet:gp-px-0","outside"===e($?.ftNavigationPosition,"mobile")?"mobile:gp-px-[16px]":"mobile:gp-px-0")}
|
|
55
55
|
gp-flex-1 gp-w-full gp-feature-image-carousel
|
|
56
|
-
`,rootAttr:'type="gp-feature-image-carousel"',isHiddenArrowWhenDisabled:!0,setting:{loop
|
|
56
|
+
`,rootAttr:'type="gp-feature-image-carousel"',isHiddenArrowWhenDisabled:!0,setting:{loop:$?.ftLoop,slidesToShow:{desktop:1},dotStyle:u({position:$.position,dotStyle:$.ftDotStyle}),dotSize:$.ftDotSize,dotGapToCarousel:$.ftDotGapToCarousel,dotColor:$.ftDotColor,dotActiveColor:$.ftDotActiveColor,controlOverContent:N,enableDrag:{desktop:$?.ftDragToScroll,tablet:$?.ftDragToScroll,mobile:$?.ftDragToScroll},arrowCustom:$?.ftArrowIcon,arrowCustomColor:$?.ftArrowIconColor,arrowBackgroundColor:$?.ftArrowNavColor,arrowBorder:{desktop:$?.ftArrowNavBorder},roundedArrow:{desktop:$?.ftArrowNavRadius},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:$.ftNavigationPosition,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootStyles:{...R,...S(),...o("jc",$?.align)},styles:{sizeSetting:{desktop:{width:I().desktop||"100%",height:"auto"},tablet:{width:I().tablet||"100%",height:"auto"},mobile:{width:I().mobile||"100%",height:"auto"}},align:{desktop:e($?.align,"desktop"),tablet:e($?.align,"tablet"),mobile:e($?.align,"mobile")}},disableMarginAuto:!0,children:`
|
|
57
57
|
{%- if product.media.size > 0 -%}
|
|
58
58
|
{% assign largestRatio = 0 %}
|
|
59
59
|
{% for featureMedia in product.media %}
|
|
@@ -71,10 +71,10 @@ import{getResponsiveValueByScreen as e,template as t,cls as i,makeStyleResponsiv
|
|
|
71
71
|
{% break %}
|
|
72
72
|
{% endif%}
|
|
73
73
|
{% endfor %}
|
|
74
|
-
${
|
|
74
|
+
${z()}
|
|
75
75
|
{% endfor %}
|
|
76
76
|
{%- else -%}
|
|
77
|
-
${
|
|
77
|
+
${y({src:"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}",id:"noImageError",width:"480",height:"480",alt:"no image",priority:$?.preload,setting:{layout:$?.ftLayout,aspectRatio:x,qualityType:$?.qualityType,qualityPercent:$?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none"})}
|
|
78
78
|
{%- endif -%}
|
|
79
79
|
`})}
|
|
80
80
|
`};export{ProductFeaturedImageCarousel as default};
|
|
@@ -2,7 +2,7 @@ import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productF
|
|
|
2
2
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M13.3337 14.6666C13.3337 16.1333 12.1337 17.3333 10.667 17.3333C9.20033 17.3333 8.00033 16.1333 8.00033 14.6666C8.00033 13.2 9.20033 12 10.667 12C12.1337 12 13.3337 13.2 13.3337 14.6666ZM27.3741 14.8404C26.9836 14.4499 26.3504 14.4499 25.9599 14.8404L16.667 24.1333L14.0346 21.6062C13.6442 21.2314 13.0267 21.2352 12.6409 21.6145L5.33366 28.8V9.33329H34.667V22.1333L27.3741 14.8404ZM34.667 30.6666H23.2003L18.5337 26L26.667 17.8666L34.667 25.8666V30.6666ZM7.33366 30.6666L13.467 24.6666L19.467 30.6666H7.33366ZM3.66699 6.66663C3.11471 6.66663 2.66699 7.11434 2.66699 7.66663V31.4666V32.3333C2.66699 32.8856 3.11471 33.3333 3.66699 33.3333H25.867H36.3337C36.8859 33.3333 37.3337 32.8856 37.3337 32.3333V30.6666V28.5333V24.8V7.66662C37.3337 7.11434 36.8859 6.66663 36.3337 6.66663H3.66699Z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}
|
|
5
|
+
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:number",min:1,devices:{desktop:{default:12}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:unit",useOnlyUnitInit:!0,units:["px"],min:0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"colorpicker",devices:{desktop:{default:"bg-1"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"colorpicker",devices:{desktop:{default:"line-3"}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-segment",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",options:[{label:"Bottom",value:"bottom-center",type:"p-image-layout"},{label:"Left",value:"left",type:"p-image-layout"},{label:"Right",value:"right",type:"p-image-layout"},{label:"Only Feature Image",value:"only-feature",type:"p-image-layout"},{label:"2 Col",value:"two-col",type:"p-image-layout"},{label:"1 Col",value:"one-col",type:"p-image-layout"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"var(--g-s-s)"},mobile:{default:"var(--g-s-s)"}}},{id:"ratioLayout",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:o},{id:"galleryStyles",type:"group",label:"Gallery",controls:s},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:getDefaultResponsive("flex-start")}]}],ui:[{type:"group",label:{en:"Layout"},controls:[{type:"control",layout:"vertical",setting:{id:"position"}},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayout"},layout:"vertical",condition:'position == "left"'},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayoutRight"},layout:"vertical",condition:'position == "right"'},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"},isMoreSetting:!0,condition:'["bottom-center", "left", "right"].includes(position)'},{type:"control",label:{en:"Spacing"},setting:{id:"itemSpacing"},isMoreSetting:!0,condition:'["one-col", "two-col"].includes(position)'}]},{type:"group",label:{en:"Select images to display"},controls:l,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Featured image"},controls:i,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)',hiddenDivice:!0},{type:"group",label:{en:""},controls:n,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Dots"},controls:[{type:"control",setting:{id:"ftDotStyle"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Inactive dot color"},setting:{id:"ftDotColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Active dot color"},setting:{id:"ftDotActiveColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Dots size"},setting:{id:"ftDotSize"},isMoreSetting:!0},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Gap to carousel"},setting:{id:"ftDotGapToCarousel"},isMoreSetting:!0}],condition:'position === "only-feature"'},{type:"group",label:{en:"Image list"},controls:r,condition:'position !== "only-feature"',hiddenDivice:!0},{type:"group",label:{en:""},controls:d,condition:'position !== "only-feature"'},{type:"group",controls:[{type:"control",label:{en:"Quality"},options:{label:"large"},setting:{id:"qualityType"}},{type:"control",layout:"horizontal",label:{en:" "},condition:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{type:"control",label:{en:"Align"},setting:{id:"align"}}],editorConfigs:{placeholder:{flowTag:["Product"]}},presets:[{id:"product-image-v2",name:{en:"Product Images"},icon:{desktop:`
|
|
6
6
|
<svg width="70" height="48" viewBox="0 0 70 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<rect x="10" width="10" height="10" rx="3" transform="rotate(90 10 0)" fill="#494949"/>
|
|
8
8
|
<rect x="10" y="12" width="10" height="10" rx="3" transform="rotate(90 10 12)" fill="#494949"/>
|