@gem-sdk/components 2.0.0-staging.1065 → 2.0.0-staging.1067
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/carousel/settings/configs/settings-v2.js +1 -1
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-bundle/common/styles.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-variants/common/dropdown/styles.js +1 -1
- package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.js +1 -1
- package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js +2 -2
- package/dist/cjs/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/cjs/product/settings/product-properties/configs/settings-v2.js +1 -1
- package/dist/cjs/sticky/settings/configs/settings.js +1 -1
- package/dist/esm/carousel/settings/configs/settings-v2.js +1 -1
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-bundle/common/styles.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-variants/common/dropdown/styles.js +1 -1
- package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.js +1 -1
- package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js +6 -6
- package/dist/esm/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/esm/product/settings/product-properties/configs/settings-v2.js +1 -1
- package/dist/esm/sticky/settings/configs/settings.js +1 -1
- package/package.json +4 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";var animation=require("../../plugins/animation.js");const CarouselSettingsV2Setting=[{id:"itemNumber",label:"",type:"carousel-layout-selector",devices:{desktop:{default:4}}},{id:"sneakPeak",label:"Sneak peek",type:"sneak-peak",devices:{desktop:{default:!1}}},{id:"sneakPeakType",label:"",type:"sneak-peak-type",itemPerRow:2,iconViewBox:"0 0 118 52",enableItemBackground:!0,enableTooltip:!0,options:[{value:"forward",type:"sneak-peak-offset"},{value:"center",type:"sneak-peak-offset"}],devices:{desktop:{default:"forward"}}},{id:"sneakPeakOffsetForward",label:"Ratio",type:"input:slider",min:1,max:100,showDefaultUnit:!0,isNumber:!0,units:["%"],devices:{desktop:{default:50}}},{id:"sneakPeakOffsetCenter",label:"Ratio",type:"input:slider",min:1,max:100,showDefaultUnit:!0,isNumber:!0,units:["%"],devices:{desktop:{default:50}}},{id:"childItem",label:"Item management",type:"child-item",default:["Item 1","Item 2","Item 3","Item 4","Item 5","Item 6"]},{id:"vertical",label:"Vertical layout",type:"toggle",devices:{desktop:{default:!1}}},{id:"controlOverContent",label:"Next & previous position",type:"segment",options:[{label:"Inside",value:!0},{label:"Outside",value:!1}],devices:{desktop:{default:!0}}},{id:"dot",label:"Dots",type:"toggle",devices:{desktop:{default:!0}}},{id:"dotStyle",label:"Dot style",type:"option:illustration",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"inside"}}},{id:"dotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:12}}},{id:"dotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:120,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"dotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"bg-1"}},compoDefaultValue:{desktop:{default:"bg-1"}}},{id:"dotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"line-3"}},compoDefaultValue:{desktop:{default:"line-3"}}},{id:"navigationEnable",type:"toggle",devices:{desktop:{default:!0}}},{id:"navigationStyle",type:"option:illustration",iconViewBox:"0 0 77 48",enableItemBackground:!0,label:"Navigation style",enableTooltip:!0,options:[{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:{desktop:{default:"inside"}}},{id:"arrowCustom",type:"icon",isHideClear:!0,default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
|
|
2
2
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path></svg>
|
|
3
|
-
`},{id:"arrowCustomColor",label:"Icon color",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowButtonSize",type:"size-setting",label:"",devices:{desktop:{default:{shapeValue:"1/1",shapeLinked:!0,width:void 0,height:void 0,padding:{linked:!0,type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},lockShapeValue:!0,hiddenShowMore:!0,hiddenSettings:["gap","proportion","padding"],settingConfig:{width:{name:"Width",units:["px"],displayOptions:["small","medium","large"],sizeConfig:{small:"24px",medium:"32px",large:"40px"}},height:{name:"Height",units:["px"],displayOptions:["small","medium","large","full-height"],sizeConfig:{small:"24px",medium:"32px",large:"40px",full:"100%"}},padding:{paddingConfig:{small:{vertical:"2px",horizontal:"2px"},medium:{vertical:"4px",horizontal:"4px"},large:{vertical:"8px",horizontal:"8px"}}}},sizePaddingInput:"small"},{id:"arrowBackgroundColor",label:"Background Color",type:"color-picker-v2",default:"transparent",compoDefaultValue:"bg-2"},{id:"arrowBorder",type:"border-v2",label:"Border",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!0}}},compoDefaultValue:{desktop:{default:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}}},{id:"arrowShadow",type:"shadow-v2",devices:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}},{id:"roundedArrow",type:"corner-v2",label:"Border Radius",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}}}},{id:"arrowGapToEachSide",label:"Gap to each side",type:"input:slider",min:0,max:120,ignoreMax:!0,default:"16"},{id:"showWhenHover",label:"Only show when hover",type:"toggle",default:!1},{id:"rtl",label:"Direction",type:"option:value",options:[{value:!1,iconName:"polaris-arrow-left",label:"Right to left"},{value:!0,label:"Left to right",iconName:"polaris-arrow-right"}],default:!1},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"autoplayTimeout",label:"Time out",type:"input:slider",min:1,max:4,step:.1,default:2,units:["s"],isNumber:!0,showDefaultUnit:!0,ignoreMax:!0},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",default:!0,hide:!0},{id:"runPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"enableDrag",label:"Drag to scroll",type:"toggle",devices:{desktop:{default:!0}}},{id:"loop",label:"Infinity loop",type:"toggle",devices:{desktop:{default:!0}}},{id:"animationMode",label:"Animation",type:"select",default:animation.CAROUSEL_ANIMATION.EASE_IN.value,options:[{label:"Ease in",value:animation.CAROUSEL_ANIMATION.EASE_IN.value},{label:"Ease out",value:animation.CAROUSEL_ANIMATION.EASE_OUT.value},{label:"Ease in & out",value:animation.CAROUSEL_ANIMATION.EASE_IN_OUT.value}]},{id:"background",type:"background-media-combo",devices:{desktop:{default:{type:"color",color:void 0,image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"bg-2",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"label",label:"Option Label",type:"toggle",default:!0}],CarouselSettingsV2Style=[{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0}}}}},{id:"playSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"default",height:"auto"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"300px",medium:"500px",large:"700px"}}},hiddenSettings:["padding","gap","shape"]},{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:"center"}}},{id:"borderContent",type:"border-v2",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",isCustom:!0},compoDefaultValue:{width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",border:"solid"}},{id:"roundedContent",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"carouselShadow",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}},{id:"spacing",label:"Items spacing",type:"input:slider",min:0,max:80,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"itemPadding",type:"size-setting",devices:{desktop:{default:{padding:{}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0}],CarouselSettingsV2=[{id:"setting",controls:CarouselSettingsV2Setting},{id:"style",controls:CarouselSettingsV2Style}];exports.CarouselSettingsV2=CarouselSettingsV2,exports.CarouselSettingsV2Setting=CarouselSettingsV2Setting,exports.CarouselSettingsV2Style=CarouselSettingsV2Style;
|
|
3
|
+
`},{id:"arrowCustomColor",label:"Icon color",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowButtonSize",type:"size-setting",label:"",devices:{desktop:{default:{shapeValue:"1/1",shapeLinked:!0,width:void 0,height:void 0,padding:{linked:!0,type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},lockShapeValue:!0,hiddenShowMore:!0,hiddenSettings:["gap","proportion","padding"],settingConfig:{width:{name:"Width",units:["px"],displayOptions:["small","medium","large"],sizeConfig:{small:"24px",medium:"32px",large:"40px"}},height:{name:"Height",units:["px"],displayOptions:["small","medium","large","full-height"],sizeConfig:{small:"24px",medium:"32px",large:"40px",full:"100%"}},padding:{paddingConfig:{small:{vertical:"2px",horizontal:"2px"},medium:{vertical:"4px",horizontal:"4px"},large:{vertical:"8px",horizontal:"8px"}}}},sizePaddingInput:"small"},{id:"arrowBackgroundColor",label:"Background Color",type:"color-picker-v2",default:"transparent",compoDefaultValue:"bg-2"},{id:"arrowBorder",type:"border-v2",label:"Border",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!0}}},compoDefaultValue:{desktop:{default:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}}},{id:"arrowShadow",type:"shadow-v2",devices:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}},{id:"roundedArrow",type:"corner-v2",label:"Border Radius",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}}}},{id:"arrowGapToEachSide",label:"Gap to each side",type:"input:slider",min:0,max:120,ignoreMax:!0,default:"16"},{id:"showWhenHover",label:"Only show when hover",type:"toggle",default:!1},{id:"rtl",label:"Direction",type:"option:value",options:[{value:!1,iconName:"polaris-arrow-left",label:"Right to left"},{value:!0,label:"Left to right",iconName:"polaris-arrow-right"}],default:!1},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"autoplayTimeout",label:"Time out",type:"input:slider",min:1,max:4,step:.1,default:2,units:["s"],isNumber:!0,showDefaultUnit:!0,ignoreMax:!0},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",default:!0,hide:!0},{id:"runPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"enableDrag",label:"Drag to scroll",type:"toggle",devices:{desktop:{default:!0}}},{id:"loop",label:"Infinity loop",type:"toggle",devices:{desktop:{default:!0}}},{id:"animationMode",label:"Animation",type:"select",default:animation.CAROUSEL_ANIMATION.EASE_IN.value,options:[{label:"Ease in",value:animation.CAROUSEL_ANIMATION.EASE_IN.value},{label:"Ease out",value:animation.CAROUSEL_ANIMATION.EASE_OUT.value},{label:"Ease in & out",value:animation.CAROUSEL_ANIMATION.EASE_IN_OUT.value}]},{id:"background",type:"background-media-combo",devices:{desktop:{default:{type:"color",color:void 0,image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"bg-2",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"label",label:"Option Label",type:"toggle",default:!0}],CarouselSettingsV2Style=[{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0}}}}},{id:"playSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"default",height:"auto"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"300px",medium:"500px",large:"700px"}}},hiddenSettings:["padding","gap","shape"]},{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:"center"}}},{id:"borderContent",type:"border-v2",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",isCustom:!0},compoDefaultValue:{width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",border:"solid"}},{id:"roundedContent",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"carouselShadow",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}},{id:"spacing",label:"Items spacing",type:"input:slider",fallbackValue:"0",min:0,max:80,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"itemPadding",type:"size-setting",devices:{desktop:{default:{padding:{}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0}],CarouselSettingsV2=[{id:"setting",controls:CarouselSettingsV2Setting},{id:"style",controls:CarouselSettingsV2Style}];exports.CarouselSettingsV2=CarouselSettingsV2,exports.CarouselSettingsV2Setting=CarouselSettingsV2Setting,exports.CarouselSettingsV2Style=CarouselSettingsV2Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getClasses=({setting:e,builderProps:s,advancedCssClass:t})=>{let o="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return t&&(o+=` ${t}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(o),...helpers.getClassAlignBanner(helpers.getResponsiveSetting(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getClasses=({setting:e,builderProps:s,advancedCssClass:t})=>{let o="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return t&&(o+=` ${t}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(o),...helpers.getClassAlignBanner(helpers.getResponsiveSetting(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...helpers.getClassContentPosition(helpers.getContentPosition(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),getOverlayClasses=e=>{let{overlayColor:s}=e??{},t="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-z-1 gp-transition-all gp-duration-300 ",{disableHoverOpacity:o,disableOpacity:l}=helpers.opacityEnabledData(e);return o||(t+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),core.getGlobalColorStateClass("bg",s,l,o)&&(t+=` ${core.getGlobalColorStateClass("bg",s,l,o)}`),composeClasses(t)},getRowClasses=(e,s)=>{let{sizeSetting:t,background:o}=e??{},{verticalAlign:l}=s??{},a=helpers.getClassForContentByFitContent(t,o),r=helpers.getClassForStretchContent(l),g=helpers.getClassSpaceBetween(s?.layout||{},e?.contentPosition1Col||{},e?.contentPosition2Col||{}),p=helpers.getClassSpaceBetweenLeftRight(s?.layout||{}),n=`gp-hero-banner-row ${a} ${r}`;return{...composeClasses(n),...g,...p}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full"),getBackgroundClasses=(e,s)=>{let t="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(t+=" gp_lazybg"),e&&(t+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(t)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e,s=!1)=>{let t="gp-relative",o=core.getValueByDevice(e,"tablet"),l=core.getValueByDevice(e,"mobile");return s&&(t+=" gp-hidden"),o&&(t+=" tablet:gp-h-full tablet:gp-object-cover"),l&&(t+=" mobile:gp-h-full mobile:gp-object-cover"),composeClasses(t)},getWrapperYoutubeClasses=()=>composeClasses("gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none"),getIframeYoutubeClasses=()=>composeClasses("!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]"),getLazyBackgroundClasses=e=>{let s="gp-absolute gp-top-0 gp-invisible gp-w-full gp_lazyload gp-h-full gp_lazyforbg";return"tablet"===e&&(s+=" gp_lazybg_tl"),"mobile"===e&&(s+=" gp_lazybg_mb"),composeClasses(s)};exports.getAdaptiveClasses=getAdaptiveClasses,exports.getAdaptivePictureClasses=getAdaptivePictureClasses,exports.getBackgroundClasses=getBackgroundClasses,exports.getClasses=getClasses,exports.getContainBackgroundClasses=getContainBackgroundClasses,exports.getContainerClasses=getContainerClasses,exports.getHtml5VideoClasses=getHtml5VideoClasses,exports.getIframeYoutubeClasses=getIframeYoutubeClasses,exports.getLazyBackgroundClasses=getLazyBackgroundClasses,exports.getLinkClasses=getLinkClasses,exports.getOverlayClasses=getOverlayClasses,exports.getRowClasses=getRowClasses,exports.getWrapperYoutubeClasses=getWrapperYoutubeClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getStyle=(e,t,r)=>{let{sizeSetting:l,background:o}=e??{},{ratioOptions:a,aspectRatio:i}=t??{},s={...r,...helpers.getVisibilityStyle(r),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(l,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...helpers.getStyleAspectRatioHeroBannerCustom(o,l,helpers.getAspectRatioSettings(a,i)),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(l))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:r,background:l,borderBg:o,cornerBg:a,shadowBg:i,hasActiveShadow:s}=e??{},{ratioOptions:y,aspectRatio:g}=t??{},S={...helpers.getStyleAspectRatioHeroBannerCustom(l,r,helpers.getAspectRatioSettings(y,g)),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color)}),...core.getRadiusStyleActiveState({...a,active:{...a||{},radiusType:"custom"}}),...l?{...core.getStyleBgColor(l)}:{},...core.getStyleShadow({value:i,styleAppliedFor:"box-shadow",isEnableShadow:s})};return filterTruthyStyles(S)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r}=e??{},l=core.makeStyleState("op",{...r,hover:r?.hover||r?.normal}),{disableOpacity:o,disableHoverOpacity:a}=helpers.opacityEnabledData(e),i=core.getGlobalColorStateStyle("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete i?.["--bgc"],delete l?.["--op"]),a&&(delete i?.["--hvr-bgc"],delete l?.["--hvr-op"]);let s={...i,...l,"--top":"0","--left":"0"};return filterTruthyStyles(s)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...core.getResponsiveStylePadding(t)};return filterTruthyStyles(r)},getAdaptiveStyle=e=>{let{sizeSetting:t,background:r}=e??{},l={...helpers.getDisplayStyleByFitContent(t,r),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t)),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(t,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(l)},getBackgroundStyle=(e,t,r)=>{let{hoverEffectScale:l,background:o,hoverEffectDuration:a}=e??{},i={...helpers.getStyleHeroBannerBg(helpers.getResponsiveSetting(o||{}),t),...core.getStyleBackgroundByDevice(o,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${parseInt(`${a}`)??0}s`,"--scale":helpers.formatHoverScale(l),...core.makeStyleResponsive("pos",helpers.getAttachmentDevice(o)),transform:r,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(i)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":helpers.getClipPath(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...core.makeStyleResponsive("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};exports.getAdaptiveStyle=getAdaptiveStyle,exports.getBackgroundStyle=getBackgroundStyle,exports.getContainBackgroundStyle=getContainBackgroundStyle,exports.getContainerStyle=getContainerStyle,exports.getHtml5VideoStyle=getHtml5VideoStyle,exports.getOverlayStyle=getOverlayStyle,exports.getRowStyle=getRowStyle,exports.getStyle=getStyle,exports.getYoutubeIframeStyle=getYoutubeIframeStyle;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getStyle=(e,t,r)=>{let{sizeSetting:l,background:o}=e??{},{ratioOptions:a,aspectRatio:i}=t??{},s={...r,...helpers.getVisibilityStyle(r),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(l,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...helpers.getStyleAspectRatioHeroBannerCustom(o,l,helpers.getAspectRatioSettings(a,i)),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(l))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:r,background:l,borderBg:o,cornerBg:a,shadowBg:i,hasActiveShadow:s}=e??{},{ratioOptions:y,aspectRatio:g}=t??{},S={...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(r)),...helpers.getStyleAspectRatioHeroBannerCustom(l,r,helpers.getAspectRatioSettings(y,g)),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color)}),...core.getRadiusStyleActiveState({...a,active:{...a||{},radiusType:"custom"}}),...l?{...core.getStyleBgColor(l)}:{},...core.getStyleShadow({value:i,styleAppliedFor:"box-shadow",isEnableShadow:s})};return filterTruthyStyles(S)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r}=e??{},l=core.makeStyleState("op",{...r,hover:r?.hover||r?.normal}),{disableOpacity:o,disableHoverOpacity:a}=helpers.opacityEnabledData(e),i=core.getGlobalColorStateStyle("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete i?.["--bgc"],delete l?.["--op"]),a&&(delete i?.["--hvr-bgc"],delete l?.["--hvr-op"]);let s={...i,...l,"--top":"0","--left":"0"};return filterTruthyStyles(s)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...core.getResponsiveStylePadding(t)};return filterTruthyStyles(r)},getAdaptiveStyle=e=>{let{sizeSetting:t,background:r}=e??{},l={...helpers.getDisplayStyleByFitContent(t,r),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t)),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(t,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(l)},getBackgroundStyle=(e,t,r)=>{let{hoverEffectScale:l,background:o,hoverEffectDuration:a}=e??{},i={...helpers.getStyleHeroBannerBg(helpers.getResponsiveSetting(o||{}),t),...core.getStyleBackgroundByDevice(o,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${parseInt(`${a}`)??0}s`,"--scale":helpers.formatHoverScale(l),...core.makeStyleResponsive("pos",helpers.getAttachmentDevice(o)),transform:r,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(i)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":helpers.getClipPath(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...core.makeStyleResponsive("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};exports.getAdaptiveStyle=getAdaptiveStyle,exports.getBackgroundStyle=getBackgroundStyle,exports.getContainBackgroundStyle=getContainBackgroundStyle,exports.getContainerStyle=getContainerStyle,exports.getHtml5VideoStyle=getHtml5VideoStyle,exports.getOverlayStyle=getOverlayStyle,exports.getRowStyle=getRowStyle,exports.getStyle=getStyle,exports.getYoutubeIframeStyle=getYoutubeIframeStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video" && background.videoType == "html5"',source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Image alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video" && background.videoType == "html5"',source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},controlChangeTrigger:{settings:[{condition:"overlayColor.hover == 'transparent'",source:["overlayColor","overlayOpacity"],action:{controlId:"overlayOpacity",groupType:"style",controlType:"style",state:"hover",newValue:"20%"}}],options:{noRecordHistory:!0}},compoDefaultValue:"#121212",label:{en:"Color"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Image alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getSizeSettings=e=>core.makeGlobalSize(e?.size),getItemWrapStyles=(e,
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getSizeSettings=e=>core.makeGlobalSize(e?.size),getItemWrapStyles=(e,t)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...t?core.makeStyleState("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.normal}):core.makeStyleState("bg",e?.backgroundColor),...core.makeStyle({bg:t?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...t?core.composeRadius({...e?.roundedBundle,hover:e?.roundedBundle?.active??e?.roundedBundle?.normal}):core.composeRadius(e?.roundedBundle),...t?core.getStyleShadow({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...core.getStyleShadowState({...e?.boxShadowBundle,active:{}},"box-shadow",{...e?.hasBoxShadowBundle,active:!1})},...t?core.getBorderStyle(e?.borderBundle?.active):{...core.handleConvertBorderWidth(e?.borderBundle),...core.handleConvertBorderStyle(e?.borderBundle),...core.handleConvertBorderColor(e?.borderBundle)},...t?core.getRadiusStyleActiveState({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?core.makeStyle({mr:e?.iconSpacing}):core.makeStyle({mb:e.iconSpacing}),...core.makeStyleResponsive("w",e?.iconSize,"px"),...core.makeStyleResponsive("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...core.getGlobalColorStateStyle("c",e?.iconColor),...core.makeStyle({c:e?.iconColor?.active})}),getSvgStyles=e=>({...core.getGlobalColorStateStyle("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let t=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...core.makeStyle({ai:t})}},getFlexChildren=core.composeClasses("gp-flex-1"),getContainerStyles=(e,t,o)=>({...e,...getAlignStyle(t),...o});exports.getAlignStyle=getAlignStyle,exports.getContainerStyles=getContainerStyles,exports.getFlexChildren=getFlexChildren,exports.getIconStyles=getIconStyles,exports.getItemWrapStyles=getItemWrapStyles,exports.getSizeSettings=getSizeSettings,exports.getSvgActiveStyles=getSvgActiveStyles,exports.getSvgStyles=getSvgStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),dynamic=require("next/dynamic"),Loading=require("../../../common/components/Loading.js"),React=require("react"),core=require("@gem-sdk/core"),SalePageProductListWarning=require("../SalePageProductListWarning.js"),Head=require("next/head"),ProductListGridLayout=require("./ProductListGridLayout.js"),ProductListCarouselLayout=require("./ProductListCarouselLayout.js"),styles=require("./common/styles.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),helpers=require("./common/helpers.js"),helpers$1=require("../../../dialog/common/helpers.js");const ProductNotFound=dynamic(()=>Promise.resolve().then(function(){return require("../ProductNotFound.js")}),{loading:Loading.default}),ProductList=e=>{let{children:t,styles:r,builderProps:o,setting:s,builderAttrs:d}=e,{isRelatedProduct:i,productSetting:a}=helpers.getData(e),l=a.relatedTag&&a.relatedTag[0],c=core.useEditorMode(),u=core.useCurrentDevice(),n=core.usePageType(),m=core.usePageStore(e=>e.dynamicProduct),g=core.usePageStore(e=>e.dynamicCollection),[h,P]=React.useState(1),[j,x]=React.useState(!0),[p,f]=React.useState(),[y,R]=React.useState(!1),v="GP_FUNNEL_PAGE"===n,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),dynamic=require("next/dynamic"),Loading=require("../../../common/components/Loading.js"),React=require("react"),core=require("@gem-sdk/core"),SalePageProductListWarning=require("../SalePageProductListWarning.js"),Head=require("next/head"),ProductListGridLayout=require("./ProductListGridLayout.js"),ProductListCarouselLayout=require("./ProductListCarouselLayout.js"),styles=require("./common/styles.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),helpers=require("./common/helpers.js"),helpers$1=require("../../../dialog/common/helpers.js");const ProductNotFound=dynamic(()=>Promise.resolve().then(function(){return require("../ProductNotFound.js")}),{loading:Loading.default}),ProductList=e=>{let{children:t,styles:r,builderProps:o,setting:s,builderAttrs:d}=e,{isRelatedProduct:i,productSetting:a}=helpers.getData(e),l=a.relatedTag&&a.relatedTag[0],c=core.useEditorMode(),u=core.useCurrentDevice(),n=core.usePageType(),m=core.usePageStore(e=>e.dynamicProduct),g=core.usePageStore(e=>e.dynamicCollection),[h,P]=React.useState(1),[j,x]=React.useState(!0),[p,f]=React.useState(),[y,R]=React.useState(!1),v="GP_FUNNEL_PAGE"===n,b="GP_COLLECTION"==n;b&&(a.productSrc="DynamicCollection",a.collectionId=g?.collectionId??"latest");let T=a?.productSrc??"Collection",I=m?.productId&&m?.productId!==a.relatedProductId?m?.productId:a.relatedProductId,{data:k}=core.useProductQuery(i&&I?I:void 0),L=a.relatedTag&&"tags"===a.relatedTag[0]&&(!k?.tags||k?.tags.length===0),S=a.relatedTag&&"collection"===a.relatedTag[0]&&(!k?.collections?.edges||k?.collections.edges.length===0),C=a.relatedTag&&"vendor"===a.relatedTag[0]&&!k?.vendor,E=L||S||C,O=core.useProductsQueryAll(p,{revalidateOnMount:"edit"===c}),N=core.useProductsQuery("PickProduct"===T?a?.productIds:void 0,{revalidateOnMount:"edit"===c},{defaultSelectedProductCount:a?.numOfSelectedProducts}),q=React.useMemo(()=>({id:a?.collectionId??"latest",numberOfProducts:s?.numberOfProducts??4,orderBy:s?.orderBy}),[a?.collectionId,Number(s?.numberOfProducts),s?.orderBy]),w=core.useCollectionQuery("PickProduct"!==T?q:void 0);React.useEffect(()=>{if(i&&k&&a.relatedTag&&"recommended-product"!==a.relatedType){let e;switch(R(!1),a.hasRelatedExclude&&(e=a?.relatedExclude&&a.relatedExclude.split(",").map(e=>e.trim())),a.relatedTag[0]){case"vendor":f({vendor:a.relatedTag&&"vendor"===a.relatedTag[0]?k?.vendor:"",limit:s?.numberOfProducts,idNEQ:k.id});break;case"collection":{let t;let r=k?.collections?.edges.map(e=>e.node?.id);if(!r||r?.length===0){R(!0);break}f(t=e&&e.length>0?{idNEQ:k.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:r},{titleNotIn:e}]}],limit:s?.numberOfProducts}:{idNEQ:k.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:r}]}],limit:s?.numberOfProducts});break}case"tags":{let t;if(!k.tags||0===k.tags.length){R(!0);break}f(t=e&&e.length>0?{idNEQ:k.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:k.tags},{nameNotIn:e}]}],limit:s?.numberOfProducts}:{idNEQ:k.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:k.tags}]}],limit:s?.numberOfProducts})}}}},[k,a.relatedType,a.relatedTag,s?.numberOfProducts,a.relatedExclude,a.hasRelatedExclude,i]);let M="PickProduct"===T?N.isValidating:w.isValidating,W="PickProduct"===T?N.isLoading:w.isLoading,G="PickProduct"===T?N.error:w.error,Q=w.data?.collections?.edges?.[0]?.node,B="PickProduct"===T?core.flattenConnection(N.data?.products):core.flattenConnection(Q?.products),F=O?.data?.products?core.flattenConnection(O?.data?.products):void 0,A=i&&F?F:"PickProduct"===T&&a?.productIds?.length?a?.productIds?.map(e=>B?.find(t=>t?.baseID===e)).filter(Boolean)??B:"PickProduct"!==T?B:B.filter((e,t)=>t<(a?.numOfSelectedProducts??4)),D=React.useMemo(()=>y&&i&&"edit"==c||!A.length&&!W&&j&&"edit"==c,[j,W,y,i,c,A.length]),H=React.useMemo(()=>!A||y&&i,[y,i,A]),$=React.useMemo(()=>{if(!s?.sameHeight)return[];let e=0,t=Math.ceil((A?.length??0)/+(s?.slidesToShow?.[u]??1));return Array.from(Array(A?.length??0)).map((o,d)=>(d>=+(s?.slidesToShow?.[u]??1)*(e+1)&&++e,{gridRow:`${1+h*e}/${h+1+h*e}`,marginBottom:e+1<t?helpers$1.getPropertyByDevice(r?.horizontalGutter,u):void 0}))},[s?.sameHeight,s?.slidesToShow,h,A?.length,u,r?.horizontalGutter]),_=React.useMemo(()=>M||W||G||!A||y&&i,[G,W,y,i,M,A]);React.useEffect(()=>{_||setTimeout(()=>{let{builderData:e}=o??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&P(r.childElementCount||1)},"edit"===c?0:500)},[o,_,c]);let z=React.useMemo(()=>({collection:Q,products:A,settings:{loop:s?.loop??{desktop:!1},scrollMode:s?.scrollMode??{desktop:"snap"},slidesToShow:s?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:r?.layout,dot:s?.dot,dotStyle:s?.dotStyle,arrow:s?.arrow,controlOverContent:s?.controlOverContent},styles:{horizontalGutter:r?.horizontalGutter,verticalGutter:r?.verticalGutter,fullWidth:r?.fullWidth,spacing:r?.spacing,width:r?.width,height:r?.height}}),[Q,A,s,r]);if(o?.isPreview&&v)return jsxRuntime.jsx(jsxRuntime.Fragment,{});if(D)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:system.If(j,jsxRuntime.jsx(ProductNotFound,{builderAttrs:d,collectionHandle:Q?.handle,productSrc:T,onClose:()=>x(!1),children:t,relatedTagString:l,assignProductNoTags:E,noAssignedProduct:!I}))});let{productListWrapStyle:V,productListContentStyle:U,productListWrapAlignStyle:J}=styles.getStyle(e),{productListWrapClass:K}=classes.getClass(e),X=()=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:system.If(r?.layout==="grid",jsxRuntime.jsx(ProductListGridLayout.default,{...e,productSortedById:A,generateGridRowArray:$}),jsxRuntime.jsx(ProductListCarouselLayout.default,{...e,productSortedById:A}))});return jsxRuntime.jsxs("div",{...d,className:K,style:V,children:[!!r?.preloadBgImage&&jsxRuntime.jsxs(Head,{children:[!!r.backgroundImage?.desktop?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:r.backgroundImage.desktop.image.src,as:"image"}),!!r.backgroundImage?.tablet?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:r.backgroundImage?.tablet?.image?.src,as:"image"}),!!r.backgroundImage?.mobile?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:r.backgroundImage?.mobile?.image?.src,as:"image"})]}),M||W?jsxRuntime.jsx(Loading.default,{}):G?jsxRuntime.jsxs("div",{children:["Error: ",G?.message]}):H?jsxRuntime.jsx("div",{children:"Products not found"}):jsxRuntime.jsx(core.ProductListProvider,{...z,children:jsxRuntime.jsx("div",{className:"gp-flex gp-w-full",style:J,children:jsxRuntime.jsxs("div",{style:U,children:[v&&jsxRuntime.jsx(SalePageProductListWarning.default,{}),X()]})})}),core.filterToolbarPreview(t,!0)]})};exports.default=ProductList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../../../../helpers.js");const getSelectStyle=({width:e,height:r,optionTypo:o,optionTypography:t,optionBgColor:c,optionTextColor:l,optionRounded:a,optionHasShadow:s,optionShadow:i,optionBorder:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../../../../helpers.js");const getSelectStyle=({width:e,height:r,optionTypo:o,optionTypography:t,optionBgColor:c,optionTextColor:l,optionRounded:a,optionHasShadow:s,optionShadow:i,optionBorder:n,optionTransform:d,isCombine:S})=>{let h=core.composeTypographyStyle(o,t),p=core.makeStyle({bg:core.getSingleColorVariable(c?.active),bs:n?.active?.border,bw:n?.active?.width,bc:n?.active?.color}),g=[S?"active":"normal","hover"].reduce((e,r)=>({...e,...core.getStyleShadow({value:i?.[r],state:r,styleAppliedFor:"box-shadow",isEnableShadow:s?.[r]})}),{});return helpers.filterTruthyObject({...core.makeStyleResponsive("w",core.makeWidth(e)),...core.makeStyle({h:r}),...g,...p,...core.makeStyle({tt:d}),...h,...core.getGlobalColorStateStyle("c",l),...core.getGlobalColorStateStyle("bg",c),...core.handleConvertBorderStyle(n),...core.handleConvertBorderWidth(n),...core.handleConvertBorderColor(n),...core.composeRadius(a),appearance:"none","background-image":"url(https://cdn.shopify.com/s/files/1/1827/4239/t/1/assets/ico-select.svg?v=155563818344741998551488860031)","background-repeat":"no-repeat","background-position":"right 16px center"})};exports.getSelectStyle=getSelectStyle;
|
package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),VariantOption=require("../dropdown-option/VariantOption.js"),DropdownOption=require("../dropdown-option/DropdownOption.js"),classes=require("../../common/dropdown/classes.js"),system=require("@gem-sdk/system"),styles=require("../../common/dropdown/styles.js"),attrs=require("../../common/dropdown/attrs.js"),useDropdownSwatches=require("./hooks/useDropdownSwatches.js");const DropdownVariant=e=>{let{option:t,optionPosition:o,optionNumber:s,variantGroup:n,variants:r,price:i,blankText:a,swatchHeight:d,optionTypography:p,optionTransform:l,initValue:u,hasPreSelected:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),VariantOption=require("../dropdown-option/VariantOption.js"),DropdownOption=require("../dropdown-option/DropdownOption.js"),classes=require("../../common/dropdown/classes.js"),system=require("@gem-sdk/system"),styles=require("../../common/dropdown/styles.js"),attrs=require("../../common/dropdown/attrs.js"),useDropdownSwatches=require("./hooks/useDropdownSwatches.js");const DropdownVariant=e=>{let{option:t,optionPosition:o,optionNumber:s,variantGroup:n,variants:r,price:i,blankText:a,swatchHeight:d,optionTypography:p,optionTransform:l,initValue:u,hasPreSelected:m,optionTypo:c,combineHeight:w,combineWidth:j,soldOutStyle:h}=e,{optionBgColor:y,optionTextColor:x,optionRounded:S,optionShadow:D,optionHasShadow:g,optionBorder:q}=e,{value:v,preset:O,handleOnChangeSelect:R,checkVariantInStock:b}=useDropdownSwatches.useDropdownSwatches(e),f="disable"===h;n||(y=O?.optionBgColor,x=O?.optionTextColor,q=O?.optionBorder,g=O?.optionHasShadow,D=O?.optionShadow,S=O?.optionRounded);let C=system.createClass(classes.getSelectClass({optionTypo:c,optionTypography:p,optionBgColor:y,optionBorder:q,optionTextColor:x})),V=system.createStyle(styles.getSelectStyle({width:n?j:O?.width,height:n?w:O?.height,optionTypo:c,optionTypography:p,optionBgColor:y,optionTextColor:x,optionRounded:S,optionShadow:D,optionHasShadow:g,optionBorder:q,optionTransform:l,swatchHeight:d,isCombine:n})),k=system.createAttr(attrs.getSelectAttr({optionName:t?.name,value:v??u,type:"React"})),N=()=>r?.map(e=>jsxRuntime.jsx(VariantOption.default,{disabled:!b(e)&&f,value:e?.id,variant:e,includePrice:i},e?.id)),P=()=>t?.values?.map(e=>jsxRuntime.jsx(DropdownOption.default,{value:e,optionName:t.name,optionPosition:o,optionNumber:s,isSoldOutMark:f},e?.id));return jsxRuntime.jsxs("select",{...k,className:C,style:V,onChange:e=>R(e),children:[system.If(!m,jsxRuntime.jsx("option",{value:"blank",children:a??"Please select an option"})," "),system.If(n,N(),P())]})};exports.default=DropdownVariant;
|
package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),classes=require("../../common/dropdown/classes.js"),styles=require("../../common/dropdown/styles.js"),attrs=require("../../common/dropdown/attrs.js"),index=require("../dropdown-option/render-liquid/index.js");const DropdownVariant=e=>{let{variantGroup:s,blankText:t,swatchAutoWidth:r,swatchHeight:o,optionTypography:d,optionBgColor:n,optionTextColor:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),classes=require("../../common/dropdown/classes.js"),styles=require("../../common/dropdown/styles.js"),attrs=require("../../common/dropdown/attrs.js"),index=require("../dropdown-option/render-liquid/index.js");const DropdownVariant=e=>{let{variantGroup:s,blankText:t,swatchAutoWidth:r,swatchHeight:o,optionTypography:d,optionBgColor:n,optionTextColor:i,optionRounded:l,optionShadow:a,optionHasShadow:c,optionBorder:m,optionTransform:p,hasPreSelected:y,optionTypo:u,combineHeight:q,combineWidth:w,soldOutStyle:g,children:x}=e,j="disable"===g,S=system.createClass(classes.getSelectClass({optionTypo:u,optionTypography:d,optionBgColor:n,optionBorder:m,optionTextColor:i})),$=system.createStyle(styles.getSelectStyle({width:s?w:r,height:s?q:o,optionTypo:u,optionTypography:d,optionBgColor:n,optionTextColor:i,optionRounded:l,optionHasShadow:c,optionShadow:a,optionBorder:m,optionTransform:p,isCombine:s})),f=system.createAttr(attrs.getSelectAttr({variantGroup:s,type:"Liquid"})),b=()=>x;return core.template`
|
|
2
2
|
<select
|
|
3
3
|
${f}
|
|
4
4
|
class="${S}"
|
|
5
5
|
style="${$}"
|
|
6
6
|
>
|
|
7
7
|
${system.If(!y,index.renderBlankOption(t))}
|
|
8
|
-
${system.If(s,
|
|
8
|
+
${system.If(s,b(),index.renderDropdownOptions(j,y))}
|
|
9
9
|
</select>`};exports.default=DropdownVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var settingsV2=require("../../../../carousel/settings/configs/settings-v2.js");const ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...settingsV2.CarouselSettingsV2Setting]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",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"}}},...settingsV2.CarouselSettingsV2Style]}];exports.ProductListSettingsV2=ProductListSettingsV2;
|
|
1
|
+
"use strict";var settingsV2=require("../../../../carousel/settings/configs/settings-v2.js");const ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...settingsV2.CarouselSettingsV2Setting]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",fallbackValue:!0,min:0,units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],fallbackValue:!0,min:0,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",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"}}},...settingsV2.CarouselSettingsV2Style]}];exports.ProductListSettingsV2=ProductListSettingsV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const ProductPropertiesSettingsV2=[{id:"setting",controls:[{id:"name",label:"Name (Unique)",type:"input",default:"",info:"Field name must be unique",placeholder:"E.g. Customer name",compoDefaultValue:"Customer Request"},{id:"valueHidden",label:"Content",type:"input",default:"",placeholder:"E.g. Potential Lead",compoDefaultValue:"Potential Lead"},{id:"type",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:{en:"Type"},options:[{label:"Text field",value:"text",type:"p-image-layout",iconName:"gp-input-text"},{label:"Text area",value:"textarea",type:"p-image-layout",iconName:"gp-input-text-area"},{label:"Email field",value:"email",type:"p-image-layout",iconName:"gp-input-email"},{label:"Checkbox",value:"checkbox",type:"p-image-layout",iconName:"gp-input-checkbox"},{label:"Radio button",value:"radio",type:"p-image-layout",iconName:"gp-input-radio-button"},{label:"Dropdown",value:"dropdown",type:"p-image-layout",iconName:"gp-input-dropdown"},{label:"Hidden field",value:"hidden",type:"p-image-layout",iconName:"gp-input-hidden-field"}],default:"text"},{id:"label",label:"Label",type:"input",default:"Label",placeholder:"E.g. Input your name below"},{id:"placeholder",label:"Placeholder",type:"input",default:"Enter your text"},{id:"required",label:"Required Field",type:"toggle",default:!1},{id:"numberOnly",label:"Number Only",type:"toggle",default:!1},{id:"minChar",label:"Min Character (s)",type:"input:slider",maxRelated:"maxChar",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxChar",label:"Max Character (s)",type:"input:slider",minRelated:"minChar",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"minNumber",label:"Min Number Value",type:"input:slider",maxRelated:"maxNumber",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxNumber",label:"Max Number Value",type:"input:slider",minRelated:"minNumber",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"childItem",type:"child-item",label:"",default:["Option 1","Option 2","Option 3"]},{id:"invalidNumberMessage",label:"",type:"textarea",default:"Please enter numbers only"},{id:"invalidEmailMessage",label:"",type:"textarea",default:"Please enter a valid email"},{id:"requiredMessage",label:"",type:"textarea",default:"Please enter or select a value"},{id:"invalidLengthMessage",label:"",type:"textarea",default:"Please enter a value with a valid length"},{id:"translate",type:"input",default:"label,placeholder,childItem,requiredMessage,invalidEmailMessage,invalidNumberMessage,invalidLengthMessage"}]},{id:"style",controls:[{id:"isDisplayLabel",label:"Label",type:"toggle",default:!1},{id:"labelTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"labelBgColor",type:"colorpicker",label:"Background Color"},{id:"valueTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-2"}},hiddenSetting:{color:!1,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"fullWidth",type:"toggle",label:"Full Width",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"100%"}},hide:!0},{id:"height",type:"input:unit",label:"Height",emptyOnClear:!0,units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"Auto"}}},{id:"spacing",type:"input:slider",min:0,max:40,units:["px"],default:"0px",ignoreMax:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"valueTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{normal:!0,hover:!0,focus:!0,active:!0}},{id:"borderInput",type:"border-v2",default:{normal:{border:"solid",borderWidth:"1px",width:"1px",color:"line-2"}},compoDefaultValue:{normal:{border:"solid",color:"line-2",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"valueBgColor",type:"color-picker-v2",label:"Background Color",devices:{desktop:{default:{normal:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{normal:"#FFFFFF",hover:"#DDDDDD",focus:"bg-2"}}},enableGradient:!0},{id:"hasShadowInput",type:"toggle",label:"Shadow Enable",default:{normal:!1},state:{normal:!0,hover:!0,focus:!0}},{id:"shadowInput",type:"shadow-v2",default:{normal:{enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"borderRadius",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}]}];exports.ProductPropertiesSettingsV2=ProductPropertiesSettingsV2;
|
|
1
|
+
"use strict";const ProductPropertiesSettingsV2=[{id:"setting",controls:[{id:"name",label:"Name (Unique)",type:"input",default:"",info:"Field name must be unique",placeholder:"E.g. Customer name",compoDefaultValue:"Customer Request"},{id:"valueHidden",label:"Content",type:"input",default:"",placeholder:"E.g. Potential Lead",compoDefaultValue:"Potential Lead"},{id:"type",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:{en:"Type"},options:[{label:"Text field",value:"text",type:"p-image-layout",iconName:"gp-input-text"},{label:"Text area",value:"textarea",type:"p-image-layout",iconName:"gp-input-text-area"},{label:"Email field",value:"email",type:"p-image-layout",iconName:"gp-input-email"},{label:"Checkbox",value:"checkbox",type:"p-image-layout",iconName:"gp-input-checkbox"},{label:"Radio button",value:"radio",type:"p-image-layout",iconName:"gp-input-radio-button"},{label:"Dropdown",value:"dropdown",type:"p-image-layout",iconName:"gp-input-dropdown"},{label:"Hidden field",value:"hidden",type:"p-image-layout",iconName:"gp-input-hidden-field"}],default:"text"},{id:"label",label:"Label",type:"input",default:"Label",placeholder:"E.g. Input your name below"},{id:"placeholder",label:"Placeholder",type:"input",default:"Enter your text"},{id:"required",label:"Required Field",type:"toggle",default:!1},{id:"numberOnly",label:"Number Only",type:"toggle",default:!1},{id:"minChar",label:"Min Character (s)",type:"input:slider",maxRelated:"maxChar",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxChar",label:"Max Character (s)",type:"input:slider",minRelated:"minChar",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"minNumber",label:"Min Number Value",type:"input:slider",maxRelated:"maxNumber",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxNumber",label:"Max Number Value",type:"input:slider",minRelated:"minNumber",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"childItem",type:"child-item",label:"",isEnableCountItem:!0,default:["Option 1","Option 2","Option 3"],childTemplate:{default:""}},{id:"invalidNumberMessage",label:"",type:"textarea",default:"Please enter numbers only"},{id:"invalidEmailMessage",label:"",type:"textarea",default:"Please enter a valid email"},{id:"requiredMessage",label:"",type:"textarea",default:"Please enter or select a value"},{id:"invalidLengthMessage",label:"",type:"textarea",default:"Please enter a value with a valid length"},{id:"translate",type:"input",default:"label,placeholder,childItem,requiredMessage,invalidEmailMessage,invalidNumberMessage,invalidLengthMessage"}]},{id:"style",controls:[{id:"isDisplayLabel",label:"Label",type:"toggle",default:!1},{id:"labelTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"labelBgColor",type:"colorpicker",label:"Background Color"},{id:"valueTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-2"}},hiddenSetting:{color:!1,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"fullWidth",type:"toggle",label:"Full Width",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"100%"}},hide:!0},{id:"height",type:"input:unit",label:"Height",emptyOnClear:!0,units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"Auto"}}},{id:"spacing",type:"input:slider",min:0,max:40,units:["px"],default:"0px",ignoreMax:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"valueTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{normal:!0,hover:!0,focus:!0,active:!0}},{id:"borderInput",type:"border-v2",default:{normal:{border:"solid",borderWidth:"1px",width:"1px",color:"line-2"}},compoDefaultValue:{normal:{border:"solid",color:"line-2",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"valueBgColor",type:"color-picker-v2",label:"Background Color",devices:{desktop:{default:{normal:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{normal:"#FFFFFF",hover:"#DDDDDD",focus:"bg-2"}}},enableGradient:!0},{id:"hasShadowInput",type:"toggle",label:"Shadow Enable",default:{normal:!1},state:{normal:!0,hover:!0,focus:!0}},{id:"shadowInput",type:"shadow-v2",default:{normal:{enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"borderRadius",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}]}];exports.ProductPropertiesSettingsV2=ProductPropertiesSettingsV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const StickySettings=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"
|
|
1
|
+
"use strict";const StickySettings=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"background",type:"background",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Position",type:"layout-segment",iconViewBox:"0 0 64 48",enableItemBackground:!0,options:[{label:"Bottom",value:"bottom",type:"sticky-position"},{label:"Top",value:"top",type:"sticky-position"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"sticky-display",devices:{desktop:{default:"always"}}},{id:"isScrollToTop",type:"toggle",default:!1}]}];exports.StickySettings=StickySettings;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{CAROUSEL_ANIMATION as e}from"../../plugins/animation.js";let CarouselSettingsV2Setting=[{id:"itemNumber",label:"",type:"carousel-layout-selector",devices:{desktop:{default:4}}},{id:"sneakPeak",label:"Sneak peek",type:"sneak-peak",devices:{desktop:{default:!1}}},{id:"sneakPeakType",label:"",type:"sneak-peak-type",itemPerRow:2,iconViewBox:"0 0 118 52",enableItemBackground:!0,enableTooltip:!0,options:[{value:"forward",type:"sneak-peak-offset"},{value:"center",type:"sneak-peak-offset"}],devices:{desktop:{default:"forward"}}},{id:"sneakPeakOffsetForward",label:"Ratio",type:"input:slider",min:1,max:100,showDefaultUnit:!0,isNumber:!0,units:["%"],devices:{desktop:{default:50}}},{id:"sneakPeakOffsetCenter",label:"Ratio",type:"input:slider",min:1,max:100,showDefaultUnit:!0,isNumber:!0,units:["%"],devices:{desktop:{default:50}}},{id:"childItem",label:"Item management",type:"child-item",default:["Item 1","Item 2","Item 3","Item 4","Item 5","Item 6"]},{id:"vertical",label:"Vertical layout",type:"toggle",devices:{desktop:{default:!1}}},{id:"controlOverContent",label:"Next & previous position",type:"segment",options:[{label:"Inside",value:!0},{label:"Outside",value:!1}],devices:{desktop:{default:!0}}},{id:"dot",label:"Dots",type:"toggle",devices:{desktop:{default:!0}}},{id:"dotStyle",label:"Dot style",type:"option:illustration",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"inside"}}},{id:"dotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:12}}},{id:"dotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:120,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"dotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"bg-1"}},compoDefaultValue:{desktop:{default:"bg-1"}}},{id:"dotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"line-3"}},compoDefaultValue:{desktop:{default:"line-3"}}},{id:"navigationEnable",type:"toggle",devices:{desktop:{default:!0}}},{id:"navigationStyle",type:"option:illustration",iconViewBox:"0 0 77 48",enableItemBackground:!0,label:"Navigation style",enableTooltip:!0,options:[{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:{desktop:{default:"inside"}}},{id:"arrowCustom",type:"icon",isHideClear:!0,default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
|
|
2
2
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path></svg>
|
|
3
|
-
`},{id:"arrowCustomColor",label:"Icon color",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowButtonSize",type:"size-setting",label:"",devices:{desktop:{default:{shapeValue:"1/1",shapeLinked:!0,width:void 0,height:void 0,padding:{linked:!0,type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},lockShapeValue:!0,hiddenShowMore:!0,hiddenSettings:["gap","proportion","padding"],settingConfig:{width:{name:"Width",units:["px"],displayOptions:["small","medium","large"],sizeConfig:{small:"24px",medium:"32px",large:"40px"}},height:{name:"Height",units:["px"],displayOptions:["small","medium","large","full-height"],sizeConfig:{small:"24px",medium:"32px",large:"40px",full:"100%"}},padding:{paddingConfig:{small:{vertical:"2px",horizontal:"2px"},medium:{vertical:"4px",horizontal:"4px"},large:{vertical:"8px",horizontal:"8px"}}}},sizePaddingInput:"small"},{id:"arrowBackgroundColor",label:"Background Color",type:"color-picker-v2",default:"transparent",compoDefaultValue:"bg-2"},{id:"arrowBorder",type:"border-v2",label:"Border",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!0}}},compoDefaultValue:{desktop:{default:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}}},{id:"arrowShadow",type:"shadow-v2",devices:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}},{id:"roundedArrow",type:"corner-v2",label:"Border Radius",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}}}},{id:"arrowGapToEachSide",label:"Gap to each side",type:"input:slider",min:0,max:120,ignoreMax:!0,default:"16"},{id:"showWhenHover",label:"Only show when hover",type:"toggle",default:!1},{id:"rtl",label:"Direction",type:"option:value",options:[{value:!1,iconName:"polaris-arrow-left",label:"Right to left"},{value:!0,label:"Left to right",iconName:"polaris-arrow-right"}],default:!1},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"autoplayTimeout",label:"Time out",type:"input:slider",min:1,max:4,step:.1,default:2,units:["s"],isNumber:!0,showDefaultUnit:!0,ignoreMax:!0},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",default:!0,hide:!0},{id:"runPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"enableDrag",label:"Drag to scroll",type:"toggle",devices:{desktop:{default:!0}}},{id:"loop",label:"Infinity loop",type:"toggle",devices:{desktop:{default:!0}}},{id:"animationMode",label:"Animation",type:"select",default:e.EASE_IN.value,options:[{label:"Ease in",value:e.EASE_IN.value},{label:"Ease out",value:e.EASE_OUT.value},{label:"Ease in & out",value:e.EASE_IN_OUT.value}]},{id:"background",type:"background-media-combo",devices:{desktop:{default:{type:"color",color:void 0,image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"bg-2",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"label",label:"Option Label",type:"toggle",default:!0}],CarouselSettingsV2Style=[{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0}}}}},{id:"playSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"default",height:"auto"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"300px",medium:"500px",large:"700px"}}},hiddenSettings:["padding","gap","shape"]},{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:"center"}}},{id:"borderContent",type:"border-v2",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",isCustom:!0},compoDefaultValue:{width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",border:"solid"}},{id:"roundedContent",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"carouselShadow",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}},{id:"spacing",label:"Items spacing",type:"input:slider",min:0,max:80,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"itemPadding",type:"size-setting",devices:{desktop:{default:{padding:{}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0}],CarouselSettingsV2=[{id:"setting",controls:CarouselSettingsV2Setting},{id:"style",controls:CarouselSettingsV2Style}];export{CarouselSettingsV2,CarouselSettingsV2Setting,CarouselSettingsV2Style};
|
|
3
|
+
`},{id:"arrowCustomColor",label:"Icon color",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowButtonSize",type:"size-setting",label:"",devices:{desktop:{default:{shapeValue:"1/1",shapeLinked:!0,width:void 0,height:void 0,padding:{linked:!0,type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},lockShapeValue:!0,hiddenShowMore:!0,hiddenSettings:["gap","proportion","padding"],settingConfig:{width:{name:"Width",units:["px"],displayOptions:["small","medium","large"],sizeConfig:{small:"24px",medium:"32px",large:"40px"}},height:{name:"Height",units:["px"],displayOptions:["small","medium","large","full-height"],sizeConfig:{small:"24px",medium:"32px",large:"40px",full:"100%"}},padding:{paddingConfig:{small:{vertical:"2px",horizontal:"2px"},medium:{vertical:"4px",horizontal:"4px"},large:{vertical:"8px",horizontal:"8px"}}}},sizePaddingInput:"small"},{id:"arrowBackgroundColor",label:"Background Color",type:"color-picker-v2",default:"transparent",compoDefaultValue:"bg-2"},{id:"arrowBorder",type:"border-v2",label:"Border",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!0}}},compoDefaultValue:{desktop:{default:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}}},{id:"arrowShadow",type:"shadow-v2",devices:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}},{id:"roundedArrow",type:"corner-v2",label:"Border Radius",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}}}},{id:"arrowGapToEachSide",label:"Gap to each side",type:"input:slider",min:0,max:120,ignoreMax:!0,default:"16"},{id:"showWhenHover",label:"Only show when hover",type:"toggle",default:!1},{id:"rtl",label:"Direction",type:"option:value",options:[{value:!1,iconName:"polaris-arrow-left",label:"Right to left"},{value:!0,label:"Left to right",iconName:"polaris-arrow-right"}],default:!1},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"autoplayTimeout",label:"Time out",type:"input:slider",min:1,max:4,step:.1,default:2,units:["s"],isNumber:!0,showDefaultUnit:!0,ignoreMax:!0},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",default:!0,hide:!0},{id:"runPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"enableDrag",label:"Drag to scroll",type:"toggle",devices:{desktop:{default:!0}}},{id:"loop",label:"Infinity loop",type:"toggle",devices:{desktop:{default:!0}}},{id:"animationMode",label:"Animation",type:"select",default:e.EASE_IN.value,options:[{label:"Ease in",value:e.EASE_IN.value},{label:"Ease out",value:e.EASE_OUT.value},{label:"Ease in & out",value:e.EASE_IN_OUT.value}]},{id:"background",type:"background-media-combo",devices:{desktop:{default:{type:"color",color:void 0,image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"bg-2",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"label",label:"Option Label",type:"toggle",default:!0}],CarouselSettingsV2Style=[{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0}}}}},{id:"playSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"default",height:"auto"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"300px",medium:"500px",large:"700px"}}},hiddenSettings:["padding","gap","shape"]},{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:"center"}}},{id:"borderContent",type:"border-v2",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",isCustom:!0},compoDefaultValue:{width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",border:"solid"}},{id:"roundedContent",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"carouselShadow",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}},{id:"spacing",label:"Items spacing",type:"input:slider",fallbackValue:"0",min:0,max:80,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"itemPadding",type:"size-setting",devices:{desktop:{default:{padding:{}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0}],CarouselSettingsV2=[{id:"setting",controls:CarouselSettingsV2Setting},{id:"style",controls:CarouselSettingsV2Style}];export{CarouselSettingsV2,CarouselSettingsV2Setting,CarouselSettingsV2Style};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getGlobalColorStateClass as e,getValueByDevice as s}from"@gem-sdk/core";import{getClassAlignBanner as o,getResponsiveSetting as l,getClassContentPosition as a,getContentPosition as t,getClassForContentByFitContent as g,getClassForStretchContent as p,opacityEnabledData as r,getClassSpaceBetween as n,getClassSpaceBetweenLeftRight as i}from"./helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({setting:e,builderProps:s,advancedCssClass:a})=>{let t="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return a&&(t+=` ${a}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(t),...o(l(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container
|
|
1
|
+
import{getGlobalColorStateClass as e,getValueByDevice as s}from"@gem-sdk/core";import{getClassAlignBanner as o,getResponsiveSetting as l,getClassContentPosition as a,getContentPosition as t,getClassForContentByFitContent as g,getClassForStretchContent as p,opacityEnabledData as r,getClassSpaceBetween as n,getClassSpaceBetweenLeftRight as i}from"./helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({setting:e,builderProps:s,advancedCssClass:a})=>{let t="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return a&&(t+=` ${a}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(t),...o(l(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...a(t(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),getOverlayClasses=s=>{let{overlayColor:o}=s??{},l="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-z-1 gp-transition-all gp-duration-300 ",{disableHoverOpacity:a,disableOpacity:t}=r(s);return a||(l+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),e("bg",o,t,a)&&(l+=` ${e("bg",o,t,a)}`),composeClasses(l)},getRowClasses=(e,s)=>{let{sizeSetting:o,background:l}=e??{},{verticalAlign:a}=s??{},t=g(o,l),r=p(a),u=n(s?.layout||{},e?.contentPosition1Col||{},e?.contentPosition2Col||{}),c=i(s?.layout||{}),C=`gp-hero-banner-row ${t} ${r}`;return{...composeClasses(C),...u,...c}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full"),getBackgroundClasses=(e,s)=>{let o="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(o+=" gp_lazybg"),e&&(o+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(o)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e,o=!1)=>{let l="gp-relative",a=s(e,"tablet"),t=s(e,"mobile");return o&&(l+=" gp-hidden"),a&&(l+=" tablet:gp-h-full tablet:gp-object-cover"),t&&(l+=" mobile:gp-h-full mobile:gp-object-cover"),composeClasses(l)},getWrapperYoutubeClasses=()=>composeClasses("gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none"),getIframeYoutubeClasses=()=>composeClasses("!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]"),getLazyBackgroundClasses=e=>{let s="gp-absolute gp-top-0 gp-invisible gp-w-full gp_lazyload gp-h-full gp_lazyforbg";return"tablet"===e&&(s+=" gp_lazybg_tl"),"mobile"===e&&(s+=" gp_lazybg_mb"),composeClasses(s)};export{getAdaptiveClasses,getAdaptivePictureClasses,getBackgroundClasses,getClasses,getContainBackgroundClasses,getContainerClasses,getHtml5VideoClasses,getIframeYoutubeClasses,getLazyBackgroundClasses,getLinkClasses,getOverlayClasses,getRowClasses,getWrapperYoutubeClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleWithDefault as e,getWidthByShapeGlobalSize as t,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as n,getStyleBgColor as y,getStyleShadow as g,makeStyleState as a,getGlobalColorStateStyle as u,getResponsiveStylePadding as s,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as S,getStyleAspectRatioHeroBannerCustom as
|
|
1
|
+
import{makeStyleWithDefault as e,getWidthByShapeGlobalSize as t,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as n,getStyleBgColor as y,getStyleShadow as g,makeStyleState as a,getGlobalColorStateStyle as u,getResponsiveStylePadding as s,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as S,getStyleAspectRatioHeroBannerCustom as h,getAspectRatioSettings as d,getDisplayStyleByFitContent as p,getStyleHeroBannerBg as b,formatHoverScale as f,getAttachmentDevice as m,getClipPath as w,opacityEnabledData as v,getResponsiveSetting as T}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(o,i,n)=>{let{sizeSetting:y,background:g}=o??{},{ratioOptions:a,aspectRatio:u}=i??{},s={...n,...S(n),...e("w",t(y,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...h(g,y,d(a,u)),...r("h",l(y))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:a,background:u,borderBg:s,cornerBg:c,shadowBg:S,hasActiveShadow:p}=e??{},{ratioOptions:b,aspectRatio:f}=t??{},m={...r("h",l(a)),...h(u,a,d(b,f)),...o({bs:s?.border??s?.border,bw:s?.width??s?.width,bc:i(s?.color)}),...n({...c,active:{...c||{},radiusType:"custom"}}),...u?{...y(u)}:{},...g({value:S,styleAppliedFor:"box-shadow",isEnableShadow:p})};return filterTruthyStyles(m)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r}=e??{},l=a("op",{...r,hover:r?.hover||r?.normal}),{disableOpacity:o,disableHoverOpacity:i}=v(e),n=u("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete n?.["--bgc"],delete l?.["--op"]),i&&(delete n?.["--hvr-bgc"],delete l?.["--hvr-op"]);let y={...n,...l,"--top":"0","--left":"0"};return filterTruthyStyles(y)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...s(t)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:i,background:n}=o??{},y={...p(i,n),...r("h",l(i)),...e("w",t(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(y)},getBackgroundStyle=(e,t,l)=>{let{hoverEffectScale:o,background:i,hoverEffectDuration:n}=e??{},y={...b(T(i||{}),t),...c(i,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${parseInt(`${n}`)??0}s`,"--scale":f(o),...r("pos",m(i)),transform:l,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(y)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":w(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...r("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...r("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video" && background.videoType == "html5"',source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Image alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|
|
1
|
+
let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video" && background.videoType == "html5"',source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},controlChangeTrigger:{settings:[{condition:"overlayColor.hover == 'transparent'",source:["overlayColor","overlayOpacity"],action:{controlId:"overlayOpacity",groupType:"style",controlType:"style",state:"hover",newValue:"20%"}}],options:{noRecordHistory:!0}},compoDefaultValue:"#121212",label:{en:"Color"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Image alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e,makeGlobalSize as o,makeStyle as t,makeStyleState as n,composeRadius as l,getStyleShadow as d,getStyleShadowState as r,getBorderStyle as i,handleConvertBorderWidth as a,handleConvertBorderStyle as g,handleConvertBorderColor as c,getRadiusStyleActiveState as u,makeStyleResponsive as S,getGlobalColorStateStyle as s}from"@gem-sdk/core";let getSizeSettings=e=>o(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?n("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.normal}):n("bg",e?.backgroundColor),...t({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...o?l({...e?.roundedBundle,hover:e?.roundedBundle?.active??e?.roundedBundle?.normal}):l(e?.roundedBundle),...o?d({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...r(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle)},...o?i(e?.borderBundle?.active):{...a(e?.borderBundle),...g(e?.borderBundle),...c(e?.borderBundle)},...o?u({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?t({mr:e?.iconSpacing}):t({mb:e.iconSpacing}),...S("w",e?.iconSize,"px"),...S("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...s("c",e?.iconColor),...t({c:e?.iconColor?.active})}),getSvgStyles=e=>({...s("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let o=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...t({ai:o})}},getFlexChildren=e("gp-flex-1"),getContainerStyles=(e,o,t)=>({...e,...getAlignStyle(o),...t});export{getAlignStyle,getContainerStyles,getFlexChildren,getIconStyles,getItemWrapStyles,getSizeSettings,getSvgActiveStyles,getSvgStyles};
|
|
1
|
+
import{composeClasses as e,makeGlobalSize as o,makeStyle as t,makeStyleState as n,composeRadius as l,getStyleShadow as d,getStyleShadowState as r,getBorderStyle as i,handleConvertBorderWidth as a,handleConvertBorderStyle as g,handleConvertBorderColor as c,getRadiusStyleActiveState as u,makeStyleResponsive as S,getGlobalColorStateStyle as s}from"@gem-sdk/core";let getSizeSettings=e=>o(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?n("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.normal}):n("bg",e?.backgroundColor),...t({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...o?l({...e?.roundedBundle,hover:e?.roundedBundle?.active??e?.roundedBundle?.normal}):l(e?.roundedBundle),...o?d({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...r({...e?.boxShadowBundle,active:{}},"box-shadow",{...e?.hasBoxShadowBundle,active:!1})},...o?i(e?.borderBundle?.active):{...a(e?.borderBundle),...g(e?.borderBundle),...c(e?.borderBundle)},...o?u({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?t({mr:e?.iconSpacing}):t({mb:e.iconSpacing}),...S("w",e?.iconSize,"px"),...S("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...s("c",e?.iconColor),...t({c:e?.iconColor?.active})}),getSvgStyles=e=>({...s("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let o=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...t({ai:o})}},getFlexChildren=e("gp-flex-1"),getContainerStyles=(e,o,t)=>({...e,...getAlignStyle(o),...t});export{getAlignStyle,getContainerStyles,getFlexChildren,getIconStyles,getItemWrapStyles,getSizeSettings,getSvgActiveStyles,getSvgStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as i,useMemo as l,useEffect as a}from"react";import{useEditorMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useProductQuery as m,useProductsQueryAll as g,useProductsQuery as h,useCollectionQuery as p,flattenConnection as P,ProductListProvider as f,filterToolbarPreview as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as i,useMemo as l,useEffect as a}from"react";import{useEditorMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useProductQuery as m,useProductsQueryAll as g,useProductsQuery as h,useCollectionQuery as p,flattenConnection as P,ProductListProvider as f,filterToolbarPreview as b}from"@gem-sdk/core";import k from"../SalePageProductListWarning.js";import T from"next/head";import I from"./ProductListGridLayout.js";import y from"./ProductListCarouselLayout.js";import{getStyle as v}from"./common/styles.js";import{If as N}from"@gem-sdk/system";import{getClass as O}from"./common/classes.js";import{getData as S}from"./common/helpers.js";import{getPropertyByDevice as C}from"../../../dialog/common/helpers.js";let ProductNotFound=r(()=>import("../ProductNotFound.js"),{loading:d}),ProductList=r=>{let{children:E,styles:w,builderProps:L,setting:W,builderAttrs:j}=r,{isRelatedProduct:x,productSetting:G}=S(r),B=G.relatedTag&&G.relatedTag[0],A=c(),M=s(),Q=n(),z=u(e=>e.dynamicProduct),F=u(e=>e.dynamicCollection),[H,R]=i(1),[$,_]=i(!0),[D,V]=i(),[q,U]=i(!1),J="GP_FUNNEL_PAGE"===Q,K="GP_COLLECTION"==Q;K&&(G.productSrc="DynamicCollection",G.collectionId=F?.collectionId??"latest");let X=G?.productSrc??"Collection",Y=z?.productId&&z?.productId!==G.relatedProductId?z?.productId:G.relatedProductId,{data:Z}=m(x&&Y?Y:void 0),ee=G.relatedTag&&"tags"===G.relatedTag[0]&&(!Z?.tags||Z?.tags.length===0),et=G.relatedTag&&"collection"===G.relatedTag[0]&&(!Z?.collections?.edges||Z?.collections.edges.length===0),eo=G.relatedTag&&"vendor"===G.relatedTag[0]&&!Z?.vendor,er=ee||et||eo,ed=g(D,{revalidateOnMount:"edit"===A}),ei=h("PickProduct"===X?G?.productIds:void 0,{revalidateOnMount:"edit"===A},{defaultSelectedProductCount:G?.numOfSelectedProducts}),el=l(()=>({id:G?.collectionId??"latest",numberOfProducts:W?.numberOfProducts??4,orderBy:W?.orderBy}),[G?.collectionId,Number(W?.numberOfProducts),W?.orderBy]),ea=p("PickProduct"!==X?el:void 0);a(()=>{if(x&&Z&&G.relatedTag&&"recommended-product"!==G.relatedType){let e;switch(U(!1),G.hasRelatedExclude&&(e=G?.relatedExclude&&G.relatedExclude.split(",").map(e=>e.trim())),G.relatedTag[0]){case"vendor":V({vendor:G.relatedTag&&"vendor"===G.relatedTag[0]?Z?.vendor:"",limit:W?.numberOfProducts,idNEQ:Z.id});break;case"collection":{let t;let o=Z?.collections?.edges.map(e=>e.node?.id);if(!o||o?.length===0){U(!0);break}V(t=e&&e.length>0?{idNEQ:Z.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o},{titleNotIn:e}]}],limit:W?.numberOfProducts}:{idNEQ:Z.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o}]}],limit:W?.numberOfProducts});break}case"tags":{let t;if(!Z.tags||0===Z.tags.length){U(!0);break}V(t=e&&e.length>0?{idNEQ:Z.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:Z.tags},{nameNotIn:e}]}],limit:W?.numberOfProducts}:{idNEQ:Z.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:Z.tags}]}],limit:W?.numberOfProducts})}}}},[Z,G.relatedType,G.relatedTag,W?.numberOfProducts,G.relatedExclude,G.hasRelatedExclude,x]);let ec="PickProduct"===X?ei.isValidating:ea.isValidating,es="PickProduct"===X?ei.isLoading:ea.isLoading,en="PickProduct"===X?ei.error:ea.error,eu=ea.data?.collections?.edges?.[0]?.node,em="PickProduct"===X?P(ei.data?.products):P(eu?.products),eg=ed?.data?.products?P(ed?.data?.products):void 0,eh=x&&eg?eg:"PickProduct"===X&&G?.productIds?.length?G?.productIds?.map(e=>em?.find(t=>t?.baseID===e)).filter(Boolean)??em:"PickProduct"!==X?em:em.filter((e,t)=>t<(G?.numOfSelectedProducts??4)),ep=l(()=>q&&x&&"edit"==A||!eh.length&&!es&&$&&"edit"==A,[$,es,q,x,A,eh.length]),eP=l(()=>!eh||q&&x,[q,x,eh]),ef=l(()=>{if(!W?.sameHeight)return[];let e=0,t=Math.ceil((eh?.length??0)/+(W?.slidesToShow?.[M]??1));return Array.from(Array(eh?.length??0)).map((o,r)=>(r>=+(W?.slidesToShow?.[M]??1)*(e+1)&&++e,{gridRow:`${1+H*e}/${H+1+H*e}`,marginBottom:e+1<t?C(w?.horizontalGutter,M):void 0}))},[W?.sameHeight,W?.slidesToShow,H,eh?.length,M,w?.horizontalGutter]),eb=l(()=>ec||es||en||!eh||q&&x,[en,es,q,x,ec,eh]);a(()=>{eb||setTimeout(()=>{let{builderData:e}=L??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&R(o.childElementCount||1)},"edit"===A?0:500)},[L,eb,A]);let ek=l(()=>({collection:eu,products:eh,settings:{loop:W?.loop??{desktop:!1},scrollMode:W?.scrollMode??{desktop:"snap"},slidesToShow:W?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:w?.layout,dot:W?.dot,dotStyle:W?.dotStyle,arrow:W?.arrow,controlOverContent:W?.controlOverContent},styles:{horizontalGutter:w?.horizontalGutter,verticalGutter:w?.verticalGutter,fullWidth:w?.fullWidth,spacing:w?.spacing,width:w?.width,height:w?.height}}),[eu,eh,W,w]);if(L?.isPreview&&J)return e(t,{});if(ep)return e(t,{children:N($,e(ProductNotFound,{builderAttrs:j,collectionHandle:eu?.handle,productSrc:X,onClose:()=>_(!1),children:E,relatedTagString:B,assignProductNoTags:er,noAssignedProduct:!Y}))});let{productListWrapStyle:eT,productListContentStyle:eI,productListWrapAlignStyle:ey}=v(r),{productListWrapClass:ev}=O(r),eN=()=>e(t,{children:N(w?.layout==="grid",e(I,{...r,productSortedById:eh,generateGridRowArray:ef}),e(y,{...r,productSortedById:eh}))});return o("div",{...j,className:ev,style:eT,children:[!!w?.preloadBgImage&&o(T,{children:[!!w.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:w.backgroundImage.desktop.image.src,as:"image"}),!!w.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:w.backgroundImage?.tablet?.image?.src,as:"image"}),!!w.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:w.backgroundImage?.mobile?.image?.src,as:"image"})]}),ec||es?e(d,{}):en?o("div",{children:["Error: ",en?.message]}):eP?e("div",{children:"Products not found"}):e(f,{...ek,children:e("div",{className:"gp-flex gp-w-full",style:ey,children:o("div",{style:eI,children:[J&&e(k,{}),eN()]})})}),b(E,!0)]})};export{ProductList as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyStyle as e,makeStyle as t,getSingleColorVariable as o,getStyleShadow as r,makeStyleResponsive as c,makeWidth as a,getGlobalColorStateStyle as i,handleConvertBorderStyle as s,handleConvertBorderWidth as l,handleConvertBorderColor as p,composeRadius as n}from"@gem-sdk/core";import{filterTruthyObject as b}from"../../../../../helpers.js";let getSelectStyle=({width:d,height:g,optionTypo:h,optionTypography:v,optionBgColor:m,optionTextColor:u,optionRounded:w,optionHasShadow:S,optionShadow:f,optionBorder:k,optionTransform:y})=>{let
|
|
1
|
+
import{composeTypographyStyle as e,makeStyle as t,getSingleColorVariable as o,getStyleShadow as r,makeStyleResponsive as c,makeWidth as a,getGlobalColorStateStyle as i,handleConvertBorderStyle as s,handleConvertBorderWidth as l,handleConvertBorderColor as p,composeRadius as n}from"@gem-sdk/core";import{filterTruthyObject as b}from"../../../../../helpers.js";let getSelectStyle=({width:d,height:g,optionTypo:h,optionTypography:v,optionBgColor:m,optionTextColor:u,optionRounded:w,optionHasShadow:S,optionShadow:f,optionBorder:k,optionTransform:y,isCombine:x})=>{let j=e(h,v),A=t({bg:o(m?.active),bs:k?.active?.border,bw:k?.active?.width,bc:k?.active?.color}),E=[x?"active":"normal","hover"].reduce((e,t)=>({...e,...r({value:f?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:S?.[t]})}),{});return b({...c("w",a(d)),...t({h:g}),...E,...A,...t({tt:y}),...j,...i("c",u),...i("bg",m),...s(k),...l(k),...p(k),...n(w),appearance:"none","background-image":"url(https://cdn.shopify.com/s/files/1/1827/4239/t/1/assets/ico-select.svg?v=155563818344741998551488860031)","background-repeat":"no-repeat","background-position":"right 16px center"})};export{getSelectStyle};
|
package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import e from"../dropdown-option/VariantOption.js";import i from"../dropdown-option/DropdownOption.js";import{getSelectClass as n}from"../../common/dropdown/classes.js";import{createClass as r,createStyle as a,createAttr as p,If as
|
|
2
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import e from"../dropdown-option/VariantOption.js";import i from"../dropdown-option/DropdownOption.js";import{getSelectClass as n}from"../../common/dropdown/classes.js";import{createClass as r,createStyle as a,createAttr as p,If as m}from"@gem-sdk/system";import{getSelectStyle as d}from"../../common/dropdown/styles.js";import{getSelectAttr as s}from"../../common/dropdown/attrs.js";import{useDropdownSwatches as l}from"./hooks/useDropdownSwatches.js";let DropdownVariant=c=>{let{option:w,optionPosition:h,optionNumber:u,variantGroup:f,variants:j,price:v,blankText:b,swatchHeight:g,optionTypography:k,optionTransform:y,initValue:C,hasPreSelected:D,optionTypo:N,combineHeight:S,combineWidth:x,soldOutStyle:O}=c,{optionBgColor:P,optionTextColor:V,optionRounded:B,optionShadow:R,optionHasShadow:H,optionBorder:M}=c,{value:T,preset:q,handleOnChangeSelect:z,checkVariantInStock:A}=l(c),E="disable"===O;f||(P=q?.optionBgColor,V=q?.optionTextColor,M=q?.optionBorder,H=q?.optionHasShadow,R=q?.optionShadow,B=q?.optionRounded);let F=r(n({optionTypo:N,optionTypography:k,optionBgColor:P,optionBorder:M,optionTextColor:V})),G=a(d({width:f?x:q?.width,height:f?S:q?.height,optionTypo:N,optionTypography:k,optionBgColor:P,optionTextColor:V,optionRounded:B,optionShadow:R,optionHasShadow:H,optionBorder:M,optionTransform:y,swatchHeight:g,isCombine:f})),I=p(s({optionName:w?.name,value:T??C,type:"React"})),J=()=>j?.map(o=>t(e,{disabled:!A(o)&&E,value:o?.id,variant:o,includePrice:v},o?.id)),K=()=>w?.values?.map(o=>t(i,{value:o,optionName:w.name,optionPosition:h,optionNumber:u,isSoldOutMark:E},o?.id));return o("select",{...I,className:F,style:G,onChange:o=>z(o),children:[m(!D,t("option",{value:"blank",children:b??"Please select an option"})," "),m(f,J(),K())]})};export{DropdownVariant as default};
|
package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{template as o}from"@gem-sdk/core";import{createClass as r,createStyle as t,createAttr as e,If as m}from"@gem-sdk/system";import{getSelectClass as s}from"../../common/dropdown/classes.js";import{getSelectStyle as d}from"../../common/dropdown/styles.js";import{getSelectAttr as i}from"../../common/dropdown/attrs.js";import{renderBlankOption as n,renderDropdownOptions as p}from"../dropdown-option/render-liquid/index.js";let DropdownVariant=l=>{let{variantGroup:a,blankText:c,swatchAutoWidth:f,swatchHeight:w,optionTypography:$,optionBgColor:j,optionTextColor:u,optionRounded:y,optionShadow:g,optionHasShadow:h,optionBorder:
|
|
1
|
+
import{template as o}from"@gem-sdk/core";import{createClass as r,createStyle as t,createAttr as e,If as m}from"@gem-sdk/system";import{getSelectClass as s}from"../../common/dropdown/classes.js";import{getSelectStyle as d}from"../../common/dropdown/styles.js";import{getSelectAttr as i}from"../../common/dropdown/attrs.js";import{renderBlankOption as n,renderDropdownOptions as p}from"../dropdown-option/render-liquid/index.js";let DropdownVariant=l=>{let{variantGroup:a,blankText:c,swatchAutoWidth:f,swatchHeight:w,optionTypography:$,optionBgColor:j,optionTextColor:u,optionRounded:y,optionShadow:g,optionHasShadow:h,optionBorder:b,optionTransform:k,hasPreSelected:q,optionTypo:x,combineHeight:D,combineWidth:V,soldOutStyle:C,children:L}=l,v="disable"===C,z=r(s({optionTypo:x,optionTypography:$,optionBgColor:j,optionBorder:b,optionTextColor:u})),A=t(d({width:a?V:f,height:a?D:w,optionTypo:x,optionTypography:$,optionBgColor:j,optionTextColor:u,optionRounded:y,optionHasShadow:h,optionShadow:g,optionBorder:b,optionTransform:k,isCombine:a})),B=e(i({variantGroup:a,type:"Liquid"})),E=()=>L;return o`
|
|
2
2
|
<select
|
|
3
|
-
${
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
3
|
+
${B}
|
|
4
|
+
class="${z}"
|
|
5
|
+
style="${A}"
|
|
6
6
|
>
|
|
7
|
-
${m(!
|
|
8
|
-
${m(a,E(),p(
|
|
7
|
+
${m(!q,n(c))}
|
|
8
|
+
${m(a,E(),p(v,q))}
|
|
9
9
|
</select>`};export{DropdownVariant as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CarouselSettingsV2Setting as e,CarouselSettingsV2Style as t}from"../../../../carousel/settings/configs/settings-v2.js";let ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...e]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",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"}}},...t]}];export{ProductListSettingsV2};
|
|
1
|
+
import{CarouselSettingsV2Setting as e,CarouselSettingsV2Style as t}from"../../../../carousel/settings/configs/settings-v2.js";let ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...e]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",fallbackValue:!0,min:0,units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],fallbackValue:!0,min:0,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",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"}}},...t]}];export{ProductListSettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let ProductPropertiesSettingsV2=[{id:"setting",controls:[{id:"name",label:"Name (Unique)",type:"input",default:"",info:"Field name must be unique",placeholder:"E.g. Customer name",compoDefaultValue:"Customer Request"},{id:"valueHidden",label:"Content",type:"input",default:"",placeholder:"E.g. Potential Lead",compoDefaultValue:"Potential Lead"},{id:"type",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:{en:"Type"},options:[{label:"Text field",value:"text",type:"p-image-layout",iconName:"gp-input-text"},{label:"Text area",value:"textarea",type:"p-image-layout",iconName:"gp-input-text-area"},{label:"Email field",value:"email",type:"p-image-layout",iconName:"gp-input-email"},{label:"Checkbox",value:"checkbox",type:"p-image-layout",iconName:"gp-input-checkbox"},{label:"Radio button",value:"radio",type:"p-image-layout",iconName:"gp-input-radio-button"},{label:"Dropdown",value:"dropdown",type:"p-image-layout",iconName:"gp-input-dropdown"},{label:"Hidden field",value:"hidden",type:"p-image-layout",iconName:"gp-input-hidden-field"}],default:"text"},{id:"label",label:"Label",type:"input",default:"Label",placeholder:"E.g. Input your name below"},{id:"placeholder",label:"Placeholder",type:"input",default:"Enter your text"},{id:"required",label:"Required Field",type:"toggle",default:!1},{id:"numberOnly",label:"Number Only",type:"toggle",default:!1},{id:"minChar",label:"Min Character (s)",type:"input:slider",maxRelated:"maxChar",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxChar",label:"Max Character (s)",type:"input:slider",minRelated:"minChar",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"minNumber",label:"Min Number Value",type:"input:slider",maxRelated:"maxNumber",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxNumber",label:"Max Number Value",type:"input:slider",minRelated:"minNumber",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"childItem",type:"child-item",label:"",default:["Option 1","Option 2","Option 3"]},{id:"invalidNumberMessage",label:"",type:"textarea",default:"Please enter numbers only"},{id:"invalidEmailMessage",label:"",type:"textarea",default:"Please enter a valid email"},{id:"requiredMessage",label:"",type:"textarea",default:"Please enter or select a value"},{id:"invalidLengthMessage",label:"",type:"textarea",default:"Please enter a value with a valid length"},{id:"translate",type:"input",default:"label,placeholder,childItem,requiredMessage,invalidEmailMessage,invalidNumberMessage,invalidLengthMessage"}]},{id:"style",controls:[{id:"isDisplayLabel",label:"Label",type:"toggle",default:!1},{id:"labelTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"labelBgColor",type:"colorpicker",label:"Background Color"},{id:"valueTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-2"}},hiddenSetting:{color:!1,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"fullWidth",type:"toggle",label:"Full Width",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"100%"}},hide:!0},{id:"height",type:"input:unit",label:"Height",emptyOnClear:!0,units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"Auto"}}},{id:"spacing",type:"input:slider",min:0,max:40,units:["px"],default:"0px",ignoreMax:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"valueTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{normal:!0,hover:!0,focus:!0,active:!0}},{id:"borderInput",type:"border-v2",default:{normal:{border:"solid",borderWidth:"1px",width:"1px",color:"line-2"}},compoDefaultValue:{normal:{border:"solid",color:"line-2",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"valueBgColor",type:"color-picker-v2",label:"Background Color",devices:{desktop:{default:{normal:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{normal:"#FFFFFF",hover:"#DDDDDD",focus:"bg-2"}}},enableGradient:!0},{id:"hasShadowInput",type:"toggle",label:"Shadow Enable",default:{normal:!1},state:{normal:!0,hover:!0,focus:!0}},{id:"shadowInput",type:"shadow-v2",default:{normal:{enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"borderRadius",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}]}];export{ProductPropertiesSettingsV2};
|
|
1
|
+
let ProductPropertiesSettingsV2=[{id:"setting",controls:[{id:"name",label:"Name (Unique)",type:"input",default:"",info:"Field name must be unique",placeholder:"E.g. Customer name",compoDefaultValue:"Customer Request"},{id:"valueHidden",label:"Content",type:"input",default:"",placeholder:"E.g. Potential Lead",compoDefaultValue:"Potential Lead"},{id:"type",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:{en:"Type"},options:[{label:"Text field",value:"text",type:"p-image-layout",iconName:"gp-input-text"},{label:"Text area",value:"textarea",type:"p-image-layout",iconName:"gp-input-text-area"},{label:"Email field",value:"email",type:"p-image-layout",iconName:"gp-input-email"},{label:"Checkbox",value:"checkbox",type:"p-image-layout",iconName:"gp-input-checkbox"},{label:"Radio button",value:"radio",type:"p-image-layout",iconName:"gp-input-radio-button"},{label:"Dropdown",value:"dropdown",type:"p-image-layout",iconName:"gp-input-dropdown"},{label:"Hidden field",value:"hidden",type:"p-image-layout",iconName:"gp-input-hidden-field"}],default:"text"},{id:"label",label:"Label",type:"input",default:"Label",placeholder:"E.g. Input your name below"},{id:"placeholder",label:"Placeholder",type:"input",default:"Enter your text"},{id:"required",label:"Required Field",type:"toggle",default:!1},{id:"numberOnly",label:"Number Only",type:"toggle",default:!1},{id:"minChar",label:"Min Character (s)",type:"input:slider",maxRelated:"maxChar",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxChar",label:"Max Character (s)",type:"input:slider",minRelated:"minChar",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"minNumber",label:"Min Number Value",type:"input:slider",maxRelated:"maxNumber",min:0,max:500,default:0,useOnlyUnitInit:!0,hideUnit:!0},{id:"maxNumber",label:"Max Number Value",type:"input:slider",minRelated:"minNumber",min:0,max:1e4,default:50,useOnlyUnitInit:!0,hideUnit:!0},{id:"childItem",type:"child-item",label:"",isEnableCountItem:!0,default:["Option 1","Option 2","Option 3"],childTemplate:{default:""}},{id:"invalidNumberMessage",label:"",type:"textarea",default:"Please enter numbers only"},{id:"invalidEmailMessage",label:"",type:"textarea",default:"Please enter a valid email"},{id:"requiredMessage",label:"",type:"textarea",default:"Please enter or select a value"},{id:"invalidLengthMessage",label:"",type:"textarea",default:"Please enter a value with a valid length"},{id:"translate",type:"input",default:"label,placeholder,childItem,requiredMessage,invalidEmailMessage,invalidNumberMessage,invalidLengthMessage"}]},{id:"style",controls:[{id:"isDisplayLabel",label:"Label",type:"toggle",default:!1},{id:"labelTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"labelBgColor",type:"colorpicker",label:"Background Color"},{id:"valueTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-2"}},hiddenSetting:{color:!1,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"fullWidth",type:"toggle",label:"Full Width",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"100%"}},hide:!0},{id:"height",type:"input:unit",label:"Height",emptyOnClear:!0,units:["px","%"],min:0,placeholder:"Auto",devices:{desktop:{default:"Auto"}}},{id:"spacing",type:"input:slider",min:0,max:40,units:["px"],default:"0px",ignoreMax:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"valueTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{normal:!0,hover:!0,focus:!0,active:!0}},{id:"borderInput",type:"border-v2",default:{normal:{border:"solid",borderWidth:"1px",width:"1px",color:"line-2"}},compoDefaultValue:{normal:{border:"solid",color:"line-2",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"valueBgColor",type:"color-picker-v2",label:"Background Color",devices:{desktop:{default:{normal:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{normal:"#FFFFFF",hover:"#DDDDDD",focus:"bg-2"}}},enableGradient:!0},{id:"hasShadowInput",type:"toggle",label:"Shadow Enable",default:{normal:!1},state:{normal:!0,hover:!0,focus:!0}},{id:"shadowInput",type:"shadow-v2",default:{normal:{enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"borderRadius",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}]}];export{ProductPropertiesSettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let StickySettings=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"
|
|
1
|
+
let StickySettings=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"background",type:"background",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Position",type:"layout-segment",iconViewBox:"0 0 64 48",enableItemBackground:!0,options:[{label:"Bottom",value:"bottom",type:"sticky-position"},{label:"Top",value:"top",type:"sticky-position"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"sticky-display",devices:{desktop:{default:"always"}}},{id:"isScrollToTop",type:"toggle",default:!1}]}];export{StickySettings};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-staging.
|
|
3
|
+
"version": "2.0.0-staging.1067",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "2.0.0-staging.
|
|
29
|
-
"@gem-sdk/styles": "2.0.0-staging.
|
|
30
|
-
"@gem-sdk/system": "2.0.0-staging.
|
|
28
|
+
"@gem-sdk/core": "2.0.0-staging.1067",
|
|
29
|
+
"@gem-sdk/styles": "2.0.0-staging.1067",
|
|
30
|
+
"@gem-sdk/system": "2.0.0-staging.1067",
|
|
31
31
|
"tsup": "^8.5.0",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"xlsx": "^0.18.5"
|