@gem-sdk/components 2.0.0-staging.831 → 2.0.0-staging.834
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/marquee/settings/configs/presets.js +2 -2
- package/dist/cjs/marquee/settings/configs/settings-v2.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +6 -6
- package/dist/cjs/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +1 -1
- package/dist/cjs/stock-counter/common/helpers.js +6 -2
- package/dist/cjs/tab/common/styles.js +1 -1
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/marquee/settings/configs/presets.js +2 -2
- package/dist/esm/marquee/settings/configs/settings-v2.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +1 -1
- package/dist/esm/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +1 -1
- package/dist/esm/stock-counter/common/helpers.js +21 -17
- package/dist/esm/tab/common/styles.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),AdaptiveImage=require("./AdaptiveImage.js"),NextImage=require("./NextImage.js"),NoDataImage=require("./NoDataImage.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),attrs=require("../common/attrs.js"),helpers=require("../../helpers.js"),useCheckNoImage=require("../hooks/useCheckNoImage.js");const Image=({style:e,styles:s,setting:t,children:a,advanced:r,className:l,builderAttrs:m,builderProps:i,onLoad:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),AdaptiveImage=require("./AdaptiveImage.js"),NextImage=require("./NextImage.js"),NoDataImage=require("./NoDataImage.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),attrs=require("../common/attrs.js"),helpers=require("../../helpers.js"),useCheckNoImage=require("../hooks/useCheckNoImage.js");const Image=({style:e,styles:s,setting:t,children:a,advanced:r,className:l,builderAttrs:m,builderProps:i,onLoad:y,onClick:g})=>{let{imageLink:c,isAdaptive:u,enableImageLink:o}=t??{},{isShowNoDataState:n}=useCheckNoImage.useCheckNoImage(t),{Wrapper:I,urlData:j}=helpers.getLinkData({defaultWrap:"div",setting:c,enableImageLink:o}),p=system.createStyleReact(styles.getWrapperStyles(s)),d=system.createStyle(styles.getNoDataImageStyles(s)),x=system.createStyle(styles.getImageStyles(s,i)),N=system.createStyle(styles.getContainerStyles(e,s)),C=system.createClass(classes.getWrapperClasses()),h=system.createClass(classes.getImageClasses(l,s)),q=system.createClass(classes.getContainerClasses(i?.uid,r?.cssClass,s?.shape)),k=system.createAttr(attrs.getContainerAttrs(m,i?.uid)),A=attrs.getLinkWrapperAttrs({urlData:j,imageLink:c,title:t?.title}),f=attrs.getAdaptiveImageAttrs({styles:s,setting:t}),v=attrs.getNextImageAttrs({styles:s,setting:t}),S=()=>system.If(n,jsxRuntime.jsx(NoDataImage.default,{style:d}),system.If(u,jsxRuntime.jsx(AdaptiveImage.default,{...f,style:x,className:h}),jsxRuntime.jsx(NextImage.default,{...v,style:x,className:h,onLoad:y})));return jsxRuntime.jsxs("div",{role:"presentation",...k,style:N,className:q,onClick:g,children:[jsxRuntime.jsx(I,{...A,style:p,className:C,children:S()}),a]})};exports.default=Image;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</defs>
|
|
21
21
|
</svg>
|
|
22
22
|
|
|
23
|
-
`},components:[{tag:"Marquee",advanced:{"spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{desktop:"60px"},itemMaxWidth:{desktop:"300px"}},settings:{childItem:["Item 1","Item 2","Item 3","Item 4"],itemWidthType:{desktop:"FIT_CONTENT"}},childrens:[childTextTemplate.renderChildTextTemplate("FREE SHIPPING"),childTextTemplate.renderChildTextTemplate("30 DAYS MONEY BACK GUARANTEE"),childTextTemplate.renderChildTextTemplate("LIMITED TIME 50% OFF SALE"),childTextTemplate.renderChildTextTemplate("LIFE TIME WARRANTY")]}]},{id:"marquee-image",name:{en:"Marquee"},icon:{desktop:`
|
|
23
|
+
`},components:[{tag:"Marquee",advanced:{of:"hidden","spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{desktop:"60px"},itemMaxWidth:{desktop:"300px"}},settings:{childItem:["Item 1","Item 2","Item 3","Item 4"],itemWidthType:{desktop:"FIT_CONTENT"}},childrens:[childTextTemplate.renderChildTextTemplate("FREE SHIPPING"),childTextTemplate.renderChildTextTemplate("30 DAYS MONEY BACK GUARANTEE"),childTextTemplate.renderChildTextTemplate("LIMITED TIME 50% OFF SALE"),childTextTemplate.renderChildTextTemplate("LIFE TIME WARRANTY")]}]},{id:"marquee-image",name:{en:"Marquee"},icon:{desktop:`
|
|
24
24
|
<svg width="126" height="80" viewBox="0 0 126 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
25
|
<g clip-path="url(#clip0_10250_27631)">
|
|
26
26
|
<path d="M0 3C0 1.34315 1.34315 0 3 0H123C124.657 0 126 1.34315 126 3V77C126 78.6569 124.657 80 123 80H3C1.34315 80 0 78.6569 0 77V3Z" fill="#212121"></path>
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
</clipPath>
|
|
44
44
|
</defs>
|
|
45
45
|
</svg>
|
|
46
|
-
`},components:[{tag:"Marquee",advanced:{"spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{
|
|
46
|
+
`},components:[{tag:"Marquee",advanced:{of:"hidden","spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{desktop:"60px",mobile:"20px"},itemMaxWidth:{desktop:"300px",tablet:"300px",mobile:"150px"}},settings:{childItem:["Item 1","Item 2","Item 3","Item 4","Item 5"],itemWidthType:{desktop:"BASE_ON_NUMBER_OF_ITEMS",tablet:"BASE_ON_NUMBER_OF_ITEMS",mobile:"CUSTOM"}},childrens:[childImageTemplate.renderChildImageTemplate("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-fd204759-bd9d-4564-9e30-3ff2facb72de.png"),childImageTemplate.renderChildImageTemplate("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-83e1af8d-ad67-4b33-83ee-51f80fee6167.png"),childImageTemplate.renderChildImageTemplate("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-eee8f948-1544-47ee-acc0-8fe5b99f735a.png"),childImageTemplate.renderChildImageTemplate("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-2b1f58d6-457d-4734-a2f5-b5db983ef2fb.png"),childImageTemplate.renderChildImageTemplate("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-af77021a-12c9-40dd-8132-2c59edf287dc.png")]}]}];exports.MarqueePresets=MarqueePresets;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var childTemplate=require("./child-template.js");const MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"
|
|
2
|
-
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"
|
|
1
|
+
"use strict";var childTemplate=require("./child-template.js");const MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"FIT_CONTENT"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:childTemplate.ChildTemplate,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-outline-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477569896">
|
|
2
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%",height:"Auto"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"bg-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];exports.MarqueeSettingsV2=MarqueeSettingsV2;
|
package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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`
|
|
2
2
|
${NextImage_liquid.default({srcIsLiquidCode:!0,src:`${common.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:i,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:a})}
|
|
3
|
-
${system.If(s?.galleryHoverEffect!=="none",`<div class="${core.cls("zoom-element !gp-max-w-none",productFeaturedImage.getZoomImageClass())}">
|
|
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}}",setting:e,style:i,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:a})}
|
|
5
5
|
</div>`," ")}
|
|
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'}}')">
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
|
-
`,
|
|
42
|
+
`,f=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 %}")}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
style="${_function.getStyleOfObject(l)}"
|
|
58
58
|
>
|
|
59
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(),
|
|
60
|
+
${system.LiquidIf("media != null",y(),h())}
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
63
|
{% assign isMedia= false %}
|
|
@@ -76,14 +76,14 @@
|
|
|
76
76
|
${g()}
|
|
77
77
|
{% endcase %}
|
|
78
78
|
</div>
|
|
79
|
-
</div>`,
|
|
79
|
+
</div>`,h=()=>core.template`
|
|
80
80
|
${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
81
|
<div type="grid-gallery"
|
|
82
82
|
class="${d}"
|
|
83
83
|
style="${_function.getStyleOfObject(r)}}"
|
|
84
84
|
>
|
|
85
85
|
${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 ",
|
|
86
|
+
${system.LiquidIf("media.id == product.featured_media.id ",f(s?.borderActive?.border!=="none"?"active":""),f())}`)}
|
|
87
87
|
${system.LiquidIf("product.media.size > 0",t)}
|
|
88
|
-
${system.LiquidIf("product.media.size < 1",
|
|
88
|
+
${system.LiquidIf("product.media.size < 1",f())}
|
|
89
89
|
</div>`)};exports.default=ProductGalleryGrid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"Save 20%"},{message:"{amount_discount}",eg:"Save $20"},{message:"{min_price}",eg:"Start from $20"},{message:"{inventory_quantity}",eg:"Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto","default"]},height:{displayOptions:["auto","default"]}},hiddenSettings:["gap","proportion","padding"]},{id:"imageSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"20%",height:"auto",shapeLinked:!0,hiddenShape:!1,shape:"original",disableShapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["gap","padding","proportion"]},{id:"align",label:"Align",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:"shapeShadow",type:"boxShadow",hideOptions:["size"],label:"",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}},{id:"textBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"imageBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}}]}];exports.ProductBadgeSettings=ProductBadgeSettings;
|
|
1
|
+
"use strict";const triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"Save 20%"},{message:"{amount_discount}",eg:"Save $20"},{message:"{min_price}",eg:"Start from $20"},{message:"{inventory_quantity}",eg:"Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},enableGradient:!0,compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto","default"]},height:{displayOptions:["auto","default"]}},hiddenSettings:["gap","proportion","padding"]},{id:"imageSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"20%",height:"auto",shapeLinked:!0,hiddenShape:!1,shape:"original",disableShapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["gap","padding","proportion"]},{id:"align",label:"Align",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:"shapeShadow",type:"boxShadow",hideOptions:["size"],label:"",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}},{id:"textBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"imageBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}}]}];exports.ProductBadgeSettings=ProductBadgeSettings;
|
package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const getDefaultResponsive=e=>({desktop:{default:e}}),productGalleryImageSetting=[{id:"type",label:"Gallery Type",type:"segment",hide:!0,options:[{label:"Slide",value:"slider"},{label:"All",value:"images"}],devices:getDefaultResponsive("slider")},{id:"galleryHoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"None",value:"none"},{title:"Zoom",value:"zoom"}],default:"none"},{id:"galleryZoomType",type:"select",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{title:"Default",value:"default"},{title:"Glasses",value:"glasses"}]},{id:"galleryZoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],useOnlyUnitInit:!0,isNumber:!0},{id:"clickOpenLightBox",label:"Large view in pop-up",type:"select",options:[{label:"View in featured",value:!1},{label:"Open Gallery",value:!0}],devices:getDefaultResponsive(!1)},{id:"borderActive",label:"Active border",type:"border",default:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"navigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Display outside navigation",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Display inside navigation",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:getDefaultResponsive("inside")},{id:"loop",type:"toggle",devices:getDefaultResponsive(!0)},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"speed",type:"input:slider",label:"Speed (s)",hide:!0,min:0,max:60,step:1,default:1},{id:"arrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg data-name="arrow" width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
"use strict";const getDefaultResponsive=e=>({desktop:{default:e}}),productGalleryImageSetting=[{id:"type",label:"Gallery Type",type:"segment",hide:!0,options:[{label:"Slide",value:"slider"},{label:"All",value:"images"}],devices:getDefaultResponsive("slider")},{id:"galleryHoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"None",value:"none"},{title:"Zoom",value:"zoom"}],default:"none"},{id:"galleryZoomType",type:"select",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{title:"Default",value:"default"},{title:"Glasses",value:"glasses"}]},{id:"galleryZoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],useOnlyUnitInit:!0,isNumber:!0},{id:"clickOpenLightBox",label:"Large view in pop-up",type:"select",options:[{label:"View in featured",value:!1},{label:"Open Gallery",value:!0}],devices:getDefaultResponsive(!1)},{id:"borderActive",label:"Active border",type:"border",default:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"},compoDefaultValue:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"navigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Display outside navigation",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Display inside navigation",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:getDefaultResponsive("inside")},{id:"loop",type:"toggle",devices:getDefaultResponsive(!0)},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"speed",type:"input:slider",label:"Speed (s)",hide:!0,min:0,max:60,step:1,default:1},{id:"arrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg data-name="arrow" width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0ZM10.6828 8.13017C10.5266 7.95661 10.2734 7.95661 10.1172 8.13017C9.96095 8.30374 9.96095 8.58515 10.1172 8.75871L13.0343 12L10.1172 15.2413C9.96095 15.4149 9.96095 15.6963 10.1172 15.8698C10.2734 16.0434 10.5266 16.0434 10.6828 15.8698L13.8828 12.3143C14.0391 12.1407 14.0391 11.8593 13.8828 11.6857L10.6828 8.13017Z" fill="currentColor"/>
|
|
3
3
|
</svg>`},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#000000"},{id:"dragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"arrowNavColor",label:"Nav. color",type:"color-picker-v2"},{id:"arrowNavBorder",label:"Nav. border",type:"border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"arrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},{id:"arrowNavShadow",type:"shadow-v2",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}],productGalleryImageStyle=[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForFtOnly",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInsideBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInside",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor2Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"50%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor1Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"layout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:getDefaultResponsive("cover")},{id:"itemSpacing",label:"Gallery Item Spacing",type:"input:slider",units:["px"],devices:{desktop:{default:"8px"}}},{id:"corner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];exports.productGalleryImageSetting=productGalleryImageSetting,exports.productGalleryImageStyle=productGalleryImageStyle;
|
|
@@ -53,14 +53,18 @@
|
|
|
53
53
|
<div id="continue-selling">${n}</div>
|
|
54
54
|
<div id="unlimited-quantity-message">${r}</div>
|
|
55
55
|
</div>`},getInlineCss=(e,t)=>{let i=getBorderRadius(t);if(e)return`
|
|
56
|
-
|
|
56
|
+
[data-id="${e}"] {
|
|
57
57
|
.gp-sc-progress-bar{
|
|
58
58
|
${i}
|
|
59
59
|
}
|
|
60
60
|
.gp-sc-progress-bar:before{
|
|
61
61
|
${i}
|
|
62
62
|
}
|
|
63
|
-
}`},getBorderRadius=e=>`
|
|
63
|
+
}`},getBorderRadius=e=>`
|
|
64
|
+
border-top-left-radius: ${e?.bbrr??"0px"};
|
|
65
|
+
border-top-right-radius: ${e?.bblr??"0px"};
|
|
66
|
+
border-bottom-left-radius: ${e?.btrr??"0px"};
|
|
67
|
+
border-bottom-right-radius: ${e?.btlr??"0px"};`,transformHighlighTag=(e,t)=>{if(!e.includes(`<${DEFAULT_HIGHLIGHT_TAG}>`))return e;let i="gp-text-white gp-py-1 gp-px-2 gp-mr-1 gp-inline-block gp-my-[1px]",a=`<${DEFAULT_HIGHLIGHT_TAG}>`;return a=t.includes("#")?`
|
|
64
68
|
<${DEFAULT_HIGHLIGHT_TAG} class='${i}' style='background-color: ${t}'>
|
|
65
69
|
`:`
|
|
66
70
|
<${DEFAULT_HIGHLIGHT_TAG} class='${i} gp-bg-g-${t}'>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("./helpers.js");const getStyleWrapper=(e,t)=>{let{background:r,containWidth:l,align:o}=e??{},a={...t,...core.getStyleBackgroundByDevice(r),...core.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0}),...core.makeStyleResponsive("w",core.makeWidth(l)),...core.makeStyleResponsive("as",o)};return helpers.filterTruthyStyles(a)},getTabListStyle=e=>{let{panelAlign:t}=e??{},r={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("w",{desktop:"100%",tablet:"100%",mobile:"100%"})};return helpers.filterTruthyStyles(r)},getItemStyle=(e,t)=>{let{labelColor:r,labelBgColor:l,borderTab:o,labelAlign:a,enableActiveEffect:s,panelWidth:i,position:n,panelFullWidth:y,labelWidth:c}=e??{},S={};return S={...S=t&&
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("./helpers.js");const getStyleWrapper=(e,t)=>{let{background:r,containWidth:l,align:o}=e??{},a={...t,...core.getStyleBackgroundByDevice(r),...core.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0}),...core.makeStyleResponsive("w",core.makeWidth(l)),...core.makeStyleResponsive("as",o)};return helpers.filterTruthyStyles(a)},getTabListStyle=e=>{let{panelAlign:t}=e??{},r={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("w",{desktop:"100%",tablet:"100%",mobile:"100%"})};return helpers.filterTruthyStyles(r)},getItemStyle=(e,t)=>{let{labelColor:r,labelBgColor:l,borderTab:o,labelAlign:a,enableActiveEffect:s,panelWidth:i,position:n,panelFullWidth:y,labelWidth:c}=e??{},S={},p=!0===s||void 0===s;return S={...S=t&&p?{...core.makeStyleResponsive("jc",a),...core.makeStyle({c:core.getSingleColorVariable(r?.active??r?.normal),bgc:core.getSingleColorVariable(l?.active??l?.normal),bs:o?.active?.border??o?.normal?.border,bw:o?.active?.width??o?.normal?.width,bc:core.getSingleColorVariable(o?.active?.color??o?.normal?.color)})}:{...core.makeStyleResponsive("jc",a),...core.getGlobalColorStateStyle("c",r),...core.getGlobalColorStateStyle("bgc",l),...core.handleConvertBorderStyle(o),...core.handleConvertBorderWidth(o),...core.handleConvertBorderColor(o)},...core.makeStyleResponsive("w",helpers$1.getStyleWidthByPositionResponsive({position:n,panelFullWidth:y,panelWidth:i,labelWidth:c}))},e?.enableHoverEffect||(S=Object.fromEntries(Object.entries(S).filter(([e])=>!e.startsWith("--hvr")))),helpers.filterTruthyStyles(S)},getTabParentListStyle=e=>{let{panelAlign:t,panelAlignVertical:r}=e??{},l={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("ai",r)};return helpers.filterTruthyStyles(l)},getContainContentStyle=()=>{let e={};return core.makeStyle({w:"100%"})&&(e={...core.makeStyle({w:"100%"})}),helpers.filterTruthyStyles(e)},getTabItemStyle=e=>{let t={...e,...core.makeStyle({h:"100%"})};return helpers.filterTruthyStyles(t)};exports.getContainContentStyle=getContainContentStyle,exports.getItemStyle=getItemStyle,exports.getStyleWrapper=getStyleWrapper,exports.getTabItemStyle=getTabItemStyle,exports.getTabListStyle=getTabListStyle,exports.getTabParentListStyle=getTabParentListStyle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as s
|
|
2
|
+
import{jsxs as e,jsx as s}from"react/jsx-runtime";import{createStyleReact as m,createStyle as t,createClass as o,createAttr as r,If as a}from"@gem-sdk/system";import i from"./AdaptiveImage.js";import l from"./NextImage.js";import p from"./NoDataImage.js";import{getWrapperStyles as c,getNoDataImageStyles as f,getImageStyles as n,getContainerStyles as d}from"../common/styles.js";import{getWrapperClasses as j,getImageClasses as g,getContainerClasses as u}from"../common/classes.js";import{getContainerAttrs as y,getAdaptiveImageAttrs as N,getNextImageAttrs as h,getLinkWrapperAttrs as I}from"../common/attrs.js";import{getLinkData as k}from"../../helpers.js";import{useCheckNoImage as v}from"../hooks/useCheckNoImage.js";let Image=({style:x,styles:C,setting:W,children:A,advanced:D,className:L,builderAttrs:b,builderProps:q,onLoad:w,onClick:z})=>{let{imageLink:B,isAdaptive:E,enableImageLink:F}=W??{},{isShowNoDataState:G}=v(W),{Wrapper:H,urlData:J}=k({defaultWrap:"div",setting:B,enableImageLink:F}),K=m(c(C)),M=t(f(C)),O=t(n(C,q)),P=t(d(x,C)),Q=o(j()),R=o(g(L,C)),S=o(u(q?.uid,D?.cssClass,C?.shape)),T=r(y(b,q?.uid)),U=I({urlData:J,imageLink:B,title:W?.title}),V=N({styles:C,setting:W}),X=h({styles:C,setting:W}),Y=()=>a(G,s(p,{style:M}),a(E,s(i,{...V,style:O,className:R}),s(l,{...X,style:O,className:R,onLoad:w})));return e("div",{role:"presentation",...T,style:P,className:S,onClick:z,children:[s(H,{...U,style:K,className:Q,children:Y()}),A]})};export{Image as default};
|
|
@@ -20,7 +20,7 @@ import{renderChildImageTemplate as C}from"./child-image-template.js";import{rend
|
|
|
20
20
|
</defs>
|
|
21
21
|
</svg>
|
|
22
22
|
|
|
23
|
-
`},components:[{tag:"Marquee",advanced:{"spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{desktop:"60px"},itemMaxWidth:{desktop:"300px"}},settings:{childItem:["Item 1","Item 2","Item 3","Item 4"],itemWidthType:{desktop:"FIT_CONTENT"}},childrens:[e("FREE SHIPPING"),e("30 DAYS MONEY BACK GUARANTEE"),e("LIMITED TIME 50% OFF SALE"),e("LIFE TIME WARRANTY")]}]},{id:"marquee-image",name:{en:"Marquee"},icon:{desktop:`
|
|
23
|
+
`},components:[{tag:"Marquee",advanced:{of:"hidden","spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{desktop:"60px"},itemMaxWidth:{desktop:"300px"}},settings:{childItem:["Item 1","Item 2","Item 3","Item 4"],itemWidthType:{desktop:"FIT_CONTENT"}},childrens:[e("FREE SHIPPING"),e("30 DAYS MONEY BACK GUARANTEE"),e("LIMITED TIME 50% OFF SALE"),e("LIFE TIME WARRANTY")]}]},{id:"marquee-image",name:{en:"Marquee"},icon:{desktop:`
|
|
24
24
|
<svg width="126" height="80" viewBox="0 0 126 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
25
|
<g clip-path="url(#clip0_10250_27631)">
|
|
26
26
|
<path d="M0 3C0 1.34315 1.34315 0 3 0H123C124.657 0 126 1.34315 126 3V77C126 78.6569 124.657 80 123 80H3C1.34315 80 0 78.6569 0 77V3Z" fill="#212121"></path>
|
|
@@ -43,4 +43,4 @@ import{renderChildImageTemplate as C}from"./child-image-template.js";import{rend
|
|
|
43
43
|
</clipPath>
|
|
44
44
|
</defs>
|
|
45
45
|
</svg>
|
|
46
|
-
`},components:[{tag:"Marquee",advanced:{"spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{
|
|
46
|
+
`},components:[{tag:"Marquee",advanced:{of:"hidden","spacing-setting":{desktop:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}},styles:{itemSpacing:{desktop:"60px",mobile:"20px"},itemMaxWidth:{desktop:"300px",tablet:"300px",mobile:"150px"}},settings:{childItem:["Item 1","Item 2","Item 3","Item 4","Item 5"],itemWidthType:{desktop:"BASE_ON_NUMBER_OF_ITEMS",tablet:"BASE_ON_NUMBER_OF_ITEMS",mobile:"CUSTOM"}},childrens:[C("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-fd204759-bd9d-4564-9e30-3ff2facb72de.png"),C("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-83e1af8d-ad67-4b33-83ee-51f80fee6167.png"),C("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-eee8f948-1544-47ee-acc0-8fe5b99f735a.png"),C("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-2b1f58d6-457d-4734-a2f5-b5db983ef2fb.png"),C("https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-af77021a-12c9-40dd-8132-2c59edf287dc.png")]}]}];export{MarqueePresets};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChildTemplate as e}from"./child-template.js";let MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"
|
|
2
|
-
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"
|
|
1
|
+
import{ChildTemplate as e}from"./child-template.js";let MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"FIT_CONTENT"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:e,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-outline-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477569896">
|
|
2
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%",height:"Auto"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"bg-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];export{MarqueeSettingsV2};
|
package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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: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
2
|
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt}}",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",h())}">
|
|
3
|
+
${r(x?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
4
4
|
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:L})}
|
|
5
5
|
</div>`," ")}
|
|
6
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'}}')">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"Save 20%"},{message:"{amount_discount}",eg:"Save $20"},{message:"{min_price}",eg:"Start from $20"},{message:"{inventory_quantity}",eg:"Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto","default"]},height:{displayOptions:["auto","default"]}},hiddenSettings:["gap","proportion","padding"]},{id:"imageSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"20%",height:"auto",shapeLinked:!0,hiddenShape:!1,shape:"original",disableShapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["gap","padding","proportion"]},{id:"align",label:"Align",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:"shapeShadow",type:"boxShadow",hideOptions:["size"],label:"",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}},{id:"textBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"imageBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}}]}];export{ProductBadgeSettings};
|
|
1
|
+
let triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"Save 20%"},{message:"{amount_discount}",eg:"Save $20"},{message:"{min_price}",eg:"Start from $20"},{message:"{inventory_quantity}",eg:"Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},enableGradient:!0,compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto","default"]},height:{displayOptions:["auto","default"]}},hiddenSettings:["gap","proportion","padding"]},{id:"imageSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"20%",height:"auto",shapeLinked:!0,hiddenShape:!1,shape:"original",disableShapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["gap","padding","proportion"]},{id:"align",label:"Align",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:"shapeShadow",type:"boxShadow",hideOptions:["size"],label:"",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}},{id:"textBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"imageBadgeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}}]}];export{ProductBadgeSettings};
|
package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let getDefaultResponsive=e=>({desktop:{default:e}}),productGalleryImageSetting=[{id:"type",label:"Gallery Type",type:"segment",hide:!0,options:[{label:"Slide",value:"slider"},{label:"All",value:"images"}],devices:getDefaultResponsive("slider")},{id:"galleryHoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"None",value:"none"},{title:"Zoom",value:"zoom"}],default:"none"},{id:"galleryZoomType",type:"select",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{title:"Default",value:"default"},{title:"Glasses",value:"glasses"}]},{id:"galleryZoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],useOnlyUnitInit:!0,isNumber:!0},{id:"clickOpenLightBox",label:"Large view in pop-up",type:"select",options:[{label:"View in featured",value:!1},{label:"Open Gallery",value:!0}],devices:getDefaultResponsive(!1)},{id:"borderActive",label:"Active border",type:"border",default:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"navigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Display outside navigation",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Display inside navigation",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:getDefaultResponsive("inside")},{id:"loop",type:"toggle",devices:getDefaultResponsive(!0)},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"speed",type:"input:slider",label:"Speed (s)",hide:!0,min:0,max:60,step:1,default:1},{id:"arrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg data-name="arrow" width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
let getDefaultResponsive=e=>({desktop:{default:e}}),productGalleryImageSetting=[{id:"type",label:"Gallery Type",type:"segment",hide:!0,options:[{label:"Slide",value:"slider"},{label:"All",value:"images"}],devices:getDefaultResponsive("slider")},{id:"galleryHoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"None",value:"none"},{title:"Zoom",value:"zoom"}],default:"none"},{id:"galleryZoomType",type:"select",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{title:"Default",value:"default"},{title:"Glasses",value:"glasses"}]},{id:"galleryZoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],useOnlyUnitInit:!0,isNumber:!0},{id:"clickOpenLightBox",label:"Large view in pop-up",type:"select",options:[{label:"View in featured",value:!1},{label:"Open Gallery",value:!0}],devices:getDefaultResponsive(!1)},{id:"borderActive",label:"Active border",type:"border",default:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"},compoDefaultValue:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"navigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Display outside navigation",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Display inside navigation",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:getDefaultResponsive("inside")},{id:"loop",type:"toggle",devices:getDefaultResponsive(!0)},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"speed",type:"input:slider",label:"Speed (s)",hide:!0,min:0,max:60,step:1,default:1},{id:"arrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg data-name="arrow" width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0ZM10.6828 8.13017C10.5266 7.95661 10.2734 7.95661 10.1172 8.13017C9.96095 8.30374 9.96095 8.58515 10.1172 8.75871L13.0343 12L10.1172 15.2413C9.96095 15.4149 9.96095 15.6963 10.1172 15.8698C10.2734 16.0434 10.5266 16.0434 10.6828 15.8698L13.8828 12.3143C14.0391 12.1407 14.0391 11.8593 13.8828 11.6857L10.6828 8.13017Z" fill="currentColor"/>
|
|
3
3
|
</svg>`},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#000000"},{id:"dragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"arrowNavColor",label:"Nav. color",type:"color-picker-v2"},{id:"arrowNavBorder",label:"Nav. border",type:"border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"arrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},{id:"arrowNavShadow",type:"shadow-v2",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}],productGalleryImageStyle=[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForFtOnly",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInsideBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInside",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor2Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"50%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor1Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"layout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:getDefaultResponsive("cover")},{id:"itemSpacing",label:"Gallery Item Spacing",type:"input:slider",units:["px"],devices:{desktop:{default:"8px"}}},{id:"corner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{productGalleryImageSetting,productGalleryImageStyle};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
let QUANTITY_SOURCE={AUTO:"auto",MANUAL:"manual"},OUT_OF_STOCK={SHOW:"show",HIDE:"hide"},DEFAULT_QUANTITY_TEMPLATE="%number%",DEFAULT_HIGHLIGHT_TAG="mark",NO_PRODUCT_LEFT=0,DEFAULT_SCARCITY_THRESHOLD=12,DEFAULT_REMAINING_QUANTITY=12,DEFAULT_REMAINING_PERCENT=20,MIN_REMAINING_QUANTITY=0,MIN_REMAINING_PERCENT=10,MAX_REMAINING_PERCENT=100,DEFAULT_RANGE_STEP=10,DEFAULT_FONT_SIZE=20,DEFAULT_PROGRESS_BAR_HEIGHT=10,MIN_PROGRESS_BAR_HEIGHT=5,MAX_PROGRESS_BAR_HEIGHT=20,CONTINUE_SELLING_WHEN_OUT_OF_STOCK="CONTINUE",getLiquidTextContent=e=>{let{templateStringDisplay:t,outOfStockMessageDisplay:
|
|
1
|
+
let QUANTITY_SOURCE={AUTO:"auto",MANUAL:"manual"},OUT_OF_STOCK={SHOW:"show",HIDE:"hide"},DEFAULT_QUANTITY_TEMPLATE="%number%",DEFAULT_HIGHLIGHT_TAG="mark",NO_PRODUCT_LEFT=0,DEFAULT_SCARCITY_THRESHOLD=12,DEFAULT_REMAINING_QUANTITY=12,DEFAULT_REMAINING_PERCENT=20,MIN_REMAINING_QUANTITY=0,MIN_REMAINING_PERCENT=10,MAX_REMAINING_PERCENT=100,DEFAULT_RANGE_STEP=10,DEFAULT_FONT_SIZE=20,DEFAULT_PROGRESS_BAR_HEIGHT=10,MIN_PROGRESS_BAR_HEIGHT=5,MAX_PROGRESS_BAR_HEIGHT=20,CONTINUE_SELLING_WHEN_OUT_OF_STOCK="CONTINUE",getLiquidTextContent=e=>{let{templateStringDisplay:t,outOfStockMessageDisplay:a,continueSellingDisplay:i,unlimitedQuantityMessageDisplay:n}=e??{};return`{% if inventory_management == null and inventory_quantity <= 0 %}
|
|
2
2
|
${n}
|
|
3
3
|
{% elsif available == false %}
|
|
4
|
-
${i}
|
|
5
|
-
{% elsif available and inventory_policy == '${CONTINUE_SELLING_WHEN_OUT_OF_STOCK.toLowerCase()}' and inventory_quantity <= 0 %}
|
|
6
4
|
${a}
|
|
5
|
+
{% elsif available and inventory_policy == '${CONTINUE_SELLING_WHEN_OUT_OF_STOCK.toLowerCase()}' and inventory_quantity <= 0 %}
|
|
6
|
+
${i}
|
|
7
7
|
{% else %}
|
|
8
8
|
${t}
|
|
9
|
-
{% endif %}`},getLiquidInitData=(e,t)=>{let{scarcityThreshold:
|
|
9
|
+
{% endif %}`},getLiquidInitData=(e,t)=>{let{scarcityThreshold:a=0,hiddenCounterWhenOutOfStock:i,displayByDefault:n}=e??{},{displayProgressBar:_}=t??{},r=!!a&&a>0;return`{%- liquid
|
|
10
10
|
assign current_variant = variant
|
|
11
11
|
assign available = current_variant.available | default: false
|
|
12
12
|
assign inventory_management = current_variant.inventory_management | default: null
|
|
@@ -23,13 +23,13 @@ let QUANTITY_SOURCE={AUTO:"auto",MANUAL:"manual"},OUT_OF_STOCK={SHOW:"show",HIDE
|
|
|
23
23
|
|
|
24
24
|
if check_display == true
|
|
25
25
|
assign should_display = true
|
|
26
|
-
elsif ${r} and inventory_quantity >= 0 and inventory_quantity < ${
|
|
26
|
+
elsif ${r} and inventory_quantity >= 0 and inventory_quantity < ${a}
|
|
27
27
|
assign should_display = true
|
|
28
28
|
else
|
|
29
29
|
assign should_display = false
|
|
30
30
|
endif
|
|
31
31
|
|
|
32
|
-
if ${!0===
|
|
32
|
+
if ${!0===i} and available == false
|
|
33
33
|
assign should_display = false
|
|
34
34
|
endif
|
|
35
35
|
|
|
@@ -46,22 +46,26 @@ let QUANTITY_SOURCE={AUTO:"auto",MANUAL:"manual"},OUT_OF_STOCK={SHOW:"show",HIDE
|
|
|
46
46
|
"{{ variant.id }}_management":"{{ variant.inventory_management }}"{% if forloop.last == false %},{% endif %}
|
|
47
47
|
{% endfor %}
|
|
48
48
|
}
|
|
49
|
-
{% endcapture %}`},getTextDisplayData=(e,t)=>{let{templateStringDisplay:
|
|
49
|
+
{% endcapture %}`},getTextDisplayData=(e,t)=>{let{templateStringDisplay:a,outOfStockMessageDisplay:i,continueSellingDisplay:n,unlimitedQuantityMessageDisplay:_}=e??{},{textColor:r}=t??{},s=r||"brand";return`
|
|
50
50
|
<div class="gp-hidden gp-text-white gp-py-1 gp-px-2 gp-mr-1 gp-inline-block gp-my-[1px] gp-text-g-${s} gp-bg-g-${s}" >
|
|
51
|
-
<div id="template">${
|
|
52
|
-
<div id="out-of-stock-message">${
|
|
51
|
+
<div id="template">${a}</div>
|
|
52
|
+
<div id="out-of-stock-message">${i}</div>
|
|
53
53
|
<div id="continue-selling">${n}</div>
|
|
54
54
|
<div id="unlimited-quantity-message">${_}</div>
|
|
55
|
-
</div>`},getInlineCss=(e,t)=>{let
|
|
56
|
-
|
|
55
|
+
</div>`},getInlineCss=(e,t)=>{let a=getBorderRadius(t);if(e)return`
|
|
56
|
+
[data-id="${e}"] {
|
|
57
57
|
.gp-sc-progress-bar{
|
|
58
|
-
${
|
|
58
|
+
${a}
|
|
59
59
|
}
|
|
60
60
|
.gp-sc-progress-bar:before{
|
|
61
|
-
${
|
|
61
|
+
${a}
|
|
62
62
|
}
|
|
63
|
-
}`},getBorderRadius=e=>`
|
|
64
|
-
|
|
63
|
+
}`},getBorderRadius=e=>`
|
|
64
|
+
border-top-left-radius: ${e?.bbrr??"0px"};
|
|
65
|
+
border-top-right-radius: ${e?.bblr??"0px"};
|
|
66
|
+
border-bottom-left-radius: ${e?.btrr??"0px"};
|
|
67
|
+
border-bottom-right-radius: ${e?.btlr??"0px"};`,transformHighlighTag=(e,t)=>{if(!e.includes(`<${DEFAULT_HIGHLIGHT_TAG}>`))return e;let a="gp-text-white gp-py-1 gp-px-2 gp-mr-1 gp-inline-block gp-my-[1px]",i=`<${DEFAULT_HIGHLIGHT_TAG}>`;return i=t.includes("#")?`
|
|
68
|
+
<${DEFAULT_HIGHLIGHT_TAG} class='${a}' style='background-color: ${t}'>
|
|
65
69
|
`:`
|
|
66
|
-
<${DEFAULT_HIGHLIGHT_TAG} class='${
|
|
67
|
-
`,e.replaceAll(`<${DEFAULT_HIGHLIGHT_TAG}>`,
|
|
70
|
+
<${DEFAULT_HIGHLIGHT_TAG} class='${a} gp-bg-g-${t}'>
|
|
71
|
+
`,e.replaceAll(`<${DEFAULT_HIGHLIGHT_TAG}>`,i)},transformNumberTag=(e,t,a)=>{if(!e.includes(DEFAULT_QUANTITY_TEMPLATE))return e;let i="";return i=t.includes("#")?`<span style='--c: ${t}'><$quantity$></span>`:`<span class='gp-text-g-${t}'><$quantity$></span>`,a&&(i=i.replace("<$quantity$>",a.toString())),e.replaceAll(DEFAULT_QUANTITY_TEMPLATE,i)},convertSizeToWidth=e=>{let t={};return e["--size"]&&(t["--w"]=e["--size"]),e["--size-tablet"]&&(t["--w-tablet"]=e["--size-tablet"]),e["--size-mobile"]&&(t["--w-mobile"]=e["--size-mobile"]),t};export{CONTINUE_SELLING_WHEN_OUT_OF_STOCK,DEFAULT_FONT_SIZE,DEFAULT_HIGHLIGHT_TAG,DEFAULT_PROGRESS_BAR_HEIGHT,DEFAULT_QUANTITY_TEMPLATE,DEFAULT_RANGE_STEP,DEFAULT_REMAINING_PERCENT,DEFAULT_REMAINING_QUANTITY,DEFAULT_SCARCITY_THRESHOLD,MAX_PROGRESS_BAR_HEIGHT,MAX_REMAINING_PERCENT,MIN_PROGRESS_BAR_HEIGHT,MIN_REMAINING_PERCENT,MIN_REMAINING_QUANTITY,NO_PRODUCT_LEFT,OUT_OF_STOCK,QUANTITY_SOURCE,convertSizeToWidth,getInlineCss,getLiquidInitData,getLiquidTextContent,getTextDisplayData,transformHighlighTag,transformNumberTag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStyleBackgroundByDevice as t,getGradientBgrStyleByDevice as e,makeStyleResponsive as r,makeWidth as l,makeStyle as
|
|
1
|
+
import{getStyleBackgroundByDevice as t,getGradientBgrStyleByDevice as e,makeStyleResponsive as r,makeWidth as l,makeStyle as o,getSingleColorVariable as a,getGlobalColorStateStyle as i,handleConvertBorderStyle as n,handleConvertBorderWidth as b,handleConvertBorderColor as c}from"@gem-sdk/core";import{filterTruthyStyles as m}from"../../helpers.js";import{getStyleWidthByPositionResponsive as s}from"./helpers.js";let getStyleWrapper=(o,a)=>{let{background:i,containWidth:n,align:b}=o??{},c={...a,...t(i),...e(i,{desktop:!0,tablet:!0,mobile:!0}),...r("w",l(n)),...r("as",b)};return m(c)},getTabListStyle=t=>{let{panelAlign:e}=t??{},l={...r("jc",e),...r("w",{desktop:"100%",tablet:"100%",mobile:"100%"})};return m(l)},getItemStyle=(t,e)=>{let{labelColor:l,labelBgColor:g,borderTab:p,labelAlign:y,enableActiveEffect:S,panelWidth:d,position:h,panelFullWidth:j,labelWidth:v}=t??{},w={},f=!0===S||void 0===S;return w={...w=e&&f?{...r("jc",y),...o({c:a(l?.active??l?.normal),bgc:a(g?.active??g?.normal),bs:p?.active?.border??p?.normal?.border,bw:p?.active?.width??p?.normal?.width,bc:a(p?.active?.color??p?.normal?.color)})}:{...r("jc",y),...i("c",l),...i("bgc",g),...n(p),...b(p),...c(p)},...r("w",s({position:h,panelFullWidth:j,panelWidth:d,labelWidth:v}))},t?.enableHoverEffect||(w=Object.fromEntries(Object.entries(w).filter(([t])=>!t.startsWith("--hvr")))),m(w)},getTabParentListStyle=t=>{let{panelAlign:e,panelAlignVertical:l}=t??{},o={...r("jc",e),...r("ai",l)};return m(o)},getContainContentStyle=()=>{let t={};return o({w:"100%"})&&(t={...o({w:"100%"})}),m(t)},getTabItemStyle=t=>{let e={...t,...o({h:"100%"})};return m(e)};export{getContainContentStyle,getItemStyle,getStyleWrapper,getTabItemStyle,getTabListStyle,getTabParentListStyle};
|