@gem-sdk/components 2.0.0-staging.1007 → 2.0.0-staging.1009

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.
Files changed (30) hide show
  1. package/dist/cjs/button/common/styles.js +1 -1
  2. package/dist/cjs/coupon/settings/configs/ui-v2.js +1 -1
  3. package/dist/cjs/header/settings/configs/settings.js +2 -2
  4. package/dist/cjs/hero-banner/common/helpers.js +1 -1
  5. package/dist/cjs/link/components/CustomLink.js +1 -1
  6. package/dist/cjs/link/components/Link.js +1 -1
  7. package/dist/cjs/post-purchase/button/settings/configs/settings.js +1 -1
  8. package/dist/cjs/post-purchase/image/settings/Image.js +1 -1
  9. package/dist/cjs/product/components/product-button/common/styles.js +1 -1
  10. package/dist/cjs/product/components/product-properties/property-choice/common/getProductPropertiesChoiceInlineCss.js +3 -3
  11. package/dist/cjs/product/settings/product-button/configs/settings.js +1 -1
  12. package/dist/cjs/third-party/settings/FeraReviews/uiV2.js +1 -1
  13. package/dist/cjs/third-party/settings/LaiProductReviews/index.js +1 -1
  14. package/dist/cjs/third-party/settings/LaiProductReviews/uiV2.js +1 -1
  15. package/dist/esm/button/common/styles.js +1 -1
  16. package/dist/esm/coupon/settings/configs/ui-v2.js +1 -1
  17. package/dist/esm/header/settings/configs/settings.js +2 -2
  18. package/dist/esm/hero-banner/common/helpers.js +1 -1
  19. package/dist/esm/link/components/CustomLink.js +1 -1
  20. package/dist/esm/link/components/Link.js +1 -1
  21. package/dist/esm/post-purchase/button/settings/configs/settings.js +1 -1
  22. package/dist/esm/post-purchase/image/settings/Image.js +1 -1
  23. package/dist/esm/product/components/product-button/common/styles.js +1 -1
  24. package/dist/esm/product/components/product-properties/property-choice/common/getProductPropertiesChoiceInlineCss.js +3 -3
  25. package/dist/esm/product/settings/product-button/configs/settings.js +1 -1
  26. package/dist/esm/third-party/settings/FeraReviews/uiV2.js +1 -1
  27. package/dist/esm/third-party/settings/LaiProductReviews/index.js +1 -1
  28. package/dist/esm/third-party/settings/LaiProductReviews/uiV2.js +1 -1
  29. package/dist/types/index.d.ts +1 -0
  30. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";var core=require("@gem-sdk/core");const getButtonWrapperStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:core.filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...core.getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return core.composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?core.makeStyleResponsive("mr",o):core.makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=core.makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=core.composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":core.getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...core.getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},s=o?.[t],a=r?.[t];if(!s&&!a)return"";let l=`url(${s?.image?.src})`,n=a?`, ${a}`:"";return a?.includes(core.GRADIENT_BGR_KEY)&&s?.image?.src?`${l}${n}`:a?.includes(core.GRADIENT_BGR_KEY)&&!s?.image?.src?a:s?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return core.makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},s={...t,hover:t?.hover||t?.normal};return{...core.getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:s}),...core.getGlobalColorStateStyle("bg",s)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:s,roundedBtnV2:a}=e??{},l=ignoreStateNoneValue(s||{},'value?.borderType !== "none"'),n=ignoreStateNoneValue(a||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:n,builderAttrs:o,enableHoverEffect:r});return`
1
+ "use strict";var core=require("@gem-sdk/core");const getButtonWrapperStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:core.filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal","active"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.type !== undefined ");return{...core.getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return core.composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?core.makeStyleResponsive("mr",o):core.makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=core.makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=core.composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":core.getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...core.getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},s=o?.[t],a=r?.[t];if(!s&&!a)return"";let l=`url(${s?.image?.src})`,n=a?`, ${a}`:"";return a?.includes?.(core.GRADIENT_BGR_KEY)&&s?.image?.src?`${l}${n}`:a?.includes?.(core.GRADIENT_BGR_KEY)&&!s?.image?.src?a:s?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return core.makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover?.image?o?.hover:o?.normal},s={...t,hover:t?.hover||t?.normal};return{...core.getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:s}),...core.getGlobalColorStateStyle("bg",s)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:s,roundedBtnV2:a}=e??{},l=ignoreStateNoneValue(s||{},'value?.border !== "none"'),n=ignoreStateNoneValue(a||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:n,builderAttrs:o,enableHoverEffect:r});return`
2
2
  ${g.normalStyles}
3
3
  ${g.hoverStyles}
4
4
  `.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:s})=>{let a=r?.["data-component-tag"],l=({styleObj:e,state:t})=>{if(e)return e?.[t]},n=l({styleObj:t,state:"normal"}),g=l({styleObj:s?t:void 0,state:"hover"}),d=l({styleObj:o,state:"normal"}),i=l({styleObj:o,state:"hover"}),u=`
@@ -1 +1 @@
1
- "use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];exports.SettingUIV2=SettingUIV2;
1
+ "use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}},{label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"hover"},conditionDisplay:"false"}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}},{label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"active"},conditionDisplay:"false"}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];exports.SettingUIV2=SettingUIV2;
@@ -1,4 +1,4 @@
1
- "use strict";const HeaderSettings=[{id:"setting",controls:[{id:"breakpoint",label:"Breakpoint",type:"select",hideOnMode:{mobileOnly:!0},options:[{label:"From desktop and smaller",subTitle:"Display menu icon for desktop, tablet and mobile",value:"desktop"},{label:"From tablet and smaller",subTitle:"Display menu icon for tablet and mobile",value:"tablet"},{label:"Only mobile",subTitle:"Display menu icon for only mobile",value:"mobile"}],default:"mobile"},{id:"itemEnableHoverEffect",type:"toggle",default:!0},{id:"enableDropdownHoverEffect",type:"toggle",default:!0},{id:"cardEnableHoverEffect",type:"toggle",default:!0},{id:"menu",label:"Menu",type:"menu",default:{ROOT:{id:"ROOT",title:"Root",childrens:["1","2","3"]},1:{id:"1",title:"Menu 1",link:"",childrens:["13","14"]},2:{id:"2",title:"Menu 2",link:"",childrens:["6","7","8"]},6:{id:"6",title:"Sub Menu 2.1",childrens:[]},7:{id:"7",title:"Sub Menu 2.2",childrens:["10","11"]},8:{id:"8",title:"Sub Menu 2.3",childrens:["12"]},9:{id:"9",title:"Sub Menu 2.4",childrens:[]},10:{id:"10",title:"Sub Menu 2.2.1",childrens:[]},11:{id:"11",title:"Sub Menu 2.2.2",childrens:[]},12:{id:"12",title:"Sub Menu 2.3.1",childrens:[]},3:{id:"3",title:"Menu 3",link:"",childrens:[]},13:{id:"13",title:"Sub Menu 1.1",link:"",childrens:[]},14:{id:"14",title:"Sub Menu 1.2",link:"",childrens:[]}}},{type:"group",label:"Logo",id:"logo-group",controls:[{id:"logo",label:"Logo",type:"image-select",devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:800,height:533}}}},{id:"logoAspectRatio",type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"1:1",value:"1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"auto"}}},{id:"customAspectRadio",type:"ratio",min:1,devices:{desktop:{default:{width:"1",height:"1"}}},hide:!0},{id:"layout",type:"select",label:"Object Fit",options:[{label:"Fill",value:"fill"},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"None",value:"none"},{label:"Scale down",value:"scale-down"}],devices:{desktop:{default:"contain"}}},{id:"logoWidth",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"80px"}}}]},{id:"arrow",label:"Arrow Icon",type:"icon",default:`<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ "use strict";const HeaderSettings=[{id:"setting",controls:[{id:"breakpoint",label:"Breakpoint",type:"select",hideOnMode:{mobileOnly:!0},options:[{label:"From desktop and smaller",subTitle:"Display menu icon for desktop, tablet and mobile",value:"desktop"},{label:"From tablet and smaller",subTitle:"Display menu icon for tablet and mobile",value:"tablet"},{label:"Only mobile",subTitle:"Display menu icon for only mobile",value:"mobile"}],default:"mobile"},{id:"itemEnableHoverEffect",type:"toggle",default:!1},{id:"enableDropdownHoverEffect",type:"toggle",default:!1},{id:"cardEnableHoverEffect",type:"toggle",default:!1},{id:"menu",label:"Menu",type:"menu",default:{ROOT:{id:"ROOT",title:"Root",childrens:["1","2","3"]},1:{id:"1",title:"Menu 1",link:"",childrens:["13","14"]},2:{id:"2",title:"Menu 2",link:"",childrens:["6","7","8"]},6:{id:"6",title:"Sub Menu 2.1",childrens:[]},7:{id:"7",title:"Sub Menu 2.2",childrens:["10","11"]},8:{id:"8",title:"Sub Menu 2.3",childrens:["12"]},9:{id:"9",title:"Sub Menu 2.4",childrens:[]},10:{id:"10",title:"Sub Menu 2.2.1",childrens:[]},11:{id:"11",title:"Sub Menu 2.2.2",childrens:[]},12:{id:"12",title:"Sub Menu 2.3.1",childrens:[]},3:{id:"3",title:"Menu 3",link:"",childrens:[]},13:{id:"13",title:"Sub Menu 1.1",link:"",childrens:[]},14:{id:"14",title:"Sub Menu 1.2",link:"",childrens:[]}}},{type:"group",label:"Logo",id:"logo-group",controls:[{id:"logo",label:"Logo",type:"image-select",devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:800,height:533}}}},{id:"logoAspectRatio",type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"1:1",value:"1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"auto"}}},{id:"customAspectRadio",type:"ratio",min:1,devices:{desktop:{default:{width:"1",height:"1"}}},hide:!0},{id:"layout",type:"select",label:"Object Fit",options:[{label:"Fill",value:"fill"},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"None",value:"none"},{label:"Scale down",value:"scale-down"}],devices:{desktop:{default:"contain"}}},{id:"logoWidth",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"80px"}}}]},{id:"arrow",label:"Arrow Icon",type:"icon",default:`<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="currentColor"/>
3
3
  </svg>
4
- `},{id:"cart-setting",type:"group",label:"Cart Setting",controls:[{id:"cartIcon",label:"Cart Icon",type:"icon",default:'<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>'}]}]},{id:"style",controls:[{id:"height",label:"Height",type:"input:unit",units:["px"],devices:{desktop:{default:"60px"}}},{id:"typography",label:"Typography",type:"typography",default:{type:"paragraph-1"}},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"background-group",label:"Background",type:"group",controls:[{id:"headerBg",type:"color-picker-v2",label:"Header",devices:{desktop:{default:"#FFFFFF"}}},{id:"menuBg",type:"color-picker-v2",label:"Menu",info:"Dropdown and collapse menu background color",compoDefaultValue:{desktop:{default:"#FFFFFF"}},devices:{desktop:{default:"#FFFFFF"}}}]},{id:"color-state",type:"behavior-state",controls:[{id:"textColor",label:"Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}},{id:"menuTextColor",label:"Menu Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},compoDefaultValue:{normal:"text-1",hover:"text-2"},default:{normal:"text-1"}},{id:"cartIconColor",type:"color-picker-v2",label:"Cart Icon Color",state:{normal:!0,hover:!0},default:{normal:"text-1"}}]}]}];exports.HeaderSettings=HeaderSettings;
4
+ `},{id:"cart-setting",type:"group",label:"Cart Setting",controls:[{id:"cartIcon",label:"Cart Icon",type:"icon",default:'<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>'}]}]},{id:"style",controls:[{id:"height",label:"Height",type:"input:unit",units:["px"],devices:{desktop:{default:"60px"}}},{id:"typography",label:"Typography",type:"typography",default:{type:"paragraph-1"}},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"background-group",label:"Background",type:"group",controls:[{id:"headerBg",type:"color-picker-v2",label:"Header",devices:{desktop:{default:"#FFFFFF"}}},{id:"menuBg",type:"color-picker-v2",label:"Menu",info:"Dropdown and collapse menu background color",compoDefaultValue:{desktop:{default:"#FFFFFF"}},devices:{desktop:{default:"#FFFFFF"}}}]},{id:"color-state",type:"behavior-state",controls:[{id:"textColor",label:"Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}},{id:"menuTextColor",label:"Menu Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},compoDefaultValue:{normal:"text-1",hover:"text-2"},default:{normal:"text-1"}},{id:"cartIconColor",type:"color-picker-v2",label:"Cart Icon Color",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}}]}]}];exports.HeaderSettings=HeaderSettings;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core"),helpers=require("../../image/common/helpers.js"),constant=require("../../constant.js");const getContentPosition=(e,t,o)=>{let l={};return core.DEVICES.map(i=>{let n=core.getResponsiveValueByScreen(e,i),a=core.getResponsiveValueByScreen(t,i),s=core.getResponsiveValueByScreen(o,i);l={...l,[i]:1>=(n?.cols?.length||1)?a:s}}),l},getAspectRatioSettings=(e,t)=>{let o={desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width},l={desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height},i={desktop:t?.desktop==="custom"?`${core.getResponsiveValueByScreen(o,"desktop")}/${core.getResponsiveValueByScreen(l,"desktop")}`:t?.desktop==="cover"?"unset":t?.desktop,tablet:t?.tablet==="custom"?`${core.getResponsiveValueByScreen(o,"tablet")}/${core.getResponsiveValueByScreen(l,"tablet")}`:t?.tablet==="cover"?"unset":t?.tablet,mobile:t?.mobile==="custom"?`${core.getResponsiveValueByScreen(o,"mobile")}/${core.getResponsiveValueByScreen(l,"mobile")}`:t?.mobile==="cover"?"unset":t?.mobile};return i},getEnableBgImageByDevice=(e,t)=>{if(!core.getResponsiveValueByScreen(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:helpers.createBlurDataURL(t?.desktop?.width??0,t?.desktop?.height??0),tablet:helpers.createBlurDataURL(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:helpers.createBlurDataURL(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,l)=>{if(!e)return"";let i=getBgImage(e),n=core.getResponsiveValueByScreen(e,t),a=o?`url(${imagePlaceholder(e)[t]})`:`url(${helpers.getImageSrc(core.getResponsiveValueByScreen(i,t),t,l)})`,s=n?.color?`, ${n.color}`:"";return n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type==="image"?`${a}${s}`:n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type!=="image"?`${n.color}`:n?.type==="image"?a:"url()"},getBackgroundImageHeroBanner=(e,t=!1,o=!1)=>{if(!e)return;let l={};return core.DEVICES.forEach(i=>{l={...l,[i]:getBgImageByScreen(e,i,t,o)}}),core.makeStyleResponsive("bgi",l)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(e,t,o)=>{let l=core.getAspectRatioGlobalSize(t),i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=core.getResponsiveValueByScreen(t,i),a=!!getDataVideoHeroBannerResponsive(i,e),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r,p=g&&a;p&&(l={...l,[i]:"16/9"}),o&&o[i]&&getDataVideoHeroBannerResponsive(i,e)?.data?.videoType==="html5"&&(l={...l,[i]:o[i]})}),core.makeStyleResponsive("aspect",l)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),a=i?.shape,s=i?.height,r="original"===a&&"fit-content"!==s&&!n;o={...o,[l]:r?"block":"none"}}),core.makeStyleResponsive("d",o)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:t?"150%":i?"100vh":"100%"}}),core.makeStyleResponsive("h",o)},getWidthHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:i?"100vw":"100%"}}),core.makeStyleResponsive("w",o)},getTopHeroBanner=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),core.makeStyleResponsive("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:s,bbrr:r,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),c=calcRounderClipPath(parseInt(s??"0"),o,l),b=calcRounderClipPath(parseInt(r??"0"),l,i),m=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${c}px ${b}px ${m}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,s=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,r=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===s,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o);t={...t,[o]:l}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),a=i?.shape,s=i?.height,r="original"===a&&"fit-content"!==s;o={...o,[l]:r&&!n}}),core.cls(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>core.DEVICES.some(t=>{let o=core.getValueByDevice(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}const fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:constant.HREF_TO_SALES_PAGE,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};exports.debounce=debounce,exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=formatHoverScale,exports.getAspectRatioSettings=getAspectRatioSettings,exports.getAttachmentDevice=getAttachmentDevice,exports.getBackgroundImageHeroBanner=getBackgroundImageHeroBanner,exports.getBannerLink=getBannerLink,exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getClassSpaceBetweenLeftRight=getClassSpaceBetweenLeftRight,exports.getClipPath=getClipPath,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getEnableBgImageByDevice=getEnableBgImageByDevice,exports.getPercentageVisible=getPercentageVisible,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatioHeroBannerCustom=getStyleAspectRatioHeroBannerCustom,exports.getStyleHeroBannerBg=getStyleHeroBannerBg,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.horizontalAlign=horizontalAlign,exports.imagePlaceholder=imagePlaceholder,exports.isScaleImage=isScaleImage,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal,exports.opacityEnabledData=opacityEnabledData,exports.scrollToContentBanner=scrollToContentBanner,exports.showVideoType=showVideoType;
1
+ "use strict";var core=require("@gem-sdk/core"),helpers=require("../../image/common/helpers.js"),constant=require("../../constant.js");const getContentPosition=(e,t,o)=>{let l={};return core.DEVICES.map(i=>{let n=core.getResponsiveValueByScreen(e,i),a=core.getResponsiveValueByScreen(t,i),s=core.getResponsiveValueByScreen(o,i);l={...l,[i]:1>=(n?.cols?.length||1)?a:s}}),l},getAspectRatioSettings=(e,t)=>{let o={desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width},l={desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height},i={desktop:t?.desktop==="custom"?`${core.getResponsiveValueByScreen(o,"desktop")}/${core.getResponsiveValueByScreen(l,"desktop")}`:t?.desktop==="cover"?"unset":t?.desktop,tablet:t?.tablet==="custom"?`${core.getResponsiveValueByScreen(o,"tablet")}/${core.getResponsiveValueByScreen(l,"tablet")}`:t?.tablet==="cover"?"unset":t?.tablet,mobile:t?.mobile==="custom"?`${core.getResponsiveValueByScreen(o,"mobile")}/${core.getResponsiveValueByScreen(l,"mobile")}`:t?.mobile==="cover"?"unset":t?.mobile};return i},getEnableBgImageByDevice=(e,t)=>{if(!core.getResponsiveValueByScreen(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:helpers.createBlurDataURL(t?.desktop?.width??0,t?.desktop?.height??0),tablet:helpers.createBlurDataURL(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:helpers.createBlurDataURL(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,l)=>{if(!e)return"";let i=getBgImage(e),n=core.getResponsiveValueByScreen(e,t),a=o?`url(${imagePlaceholder(e)[t]})`:`url(${helpers.getImageSrc(core.getResponsiveValueByScreen(i,t),t,l)})`,s=n?.color?`, ${n.color}`:"";return n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type==="image"?`${a}${s}`:n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type!=="image"?`${n.color}`:n?.type==="image"?a:"url()"},getBackgroundImageHeroBanner=(e,t=!1,o=!1)=>{if(!e)return;let l={};return core.DEVICES.forEach(i=>{l={...l,[i]:getBgImageByScreen(e,i,t,o)}}),core.makeStyleResponsive("bgi",l)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(e,t,o)=>{let l=core.getAspectRatioGlobalSize(t),i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=core.getResponsiveValueByScreen(t,i),a=!!getDataVideoHeroBannerResponsive(i,e),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r,p=g&&a;p&&(l={...l,[i]:"16/9"}),o&&o[i]&&getDataVideoHeroBannerResponsive(i,e)?.data?.videoType==="html5"&&(l={...l,[i]:o[i]})}),core.makeStyleResponsive("aspect",l)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),a=i?.shape,s=i?.height,r="original"===a&&"fit-content"!==s&&!n;o={...o,[l]:r?"block":"none"}}),core.makeStyleResponsive("d",o)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:t?"150%":i?"100vh":"100%"}}),core.makeStyleResponsive("h",o)},getWidthHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:i?"100vw":"100%"}}),core.makeStyleResponsive("w",o)},getTopHeroBanner=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),core.makeStyleResponsive("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:s,bbrr:r,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),c=calcRounderClipPath(parseInt(s??"0"),o,l),b=calcRounderClipPath(parseInt(r??"0"),l,i),m=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${c}px ${b}px ${m}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,s=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,r=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute":l.tablet?.cols?.length===1&&"space-between"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===s,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o);t={...t,[o]:l}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),a=i?.shape,s=i?.height,r="original"===a&&"fit-content"!==s;o={...o,[l]:r&&!n}}),core.cls(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>core.DEVICES.some(t=>{let o=core.getValueByDevice(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}const fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:constant.HREF_TO_SALES_PAGE,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};exports.debounce=debounce,exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=formatHoverScale,exports.getAspectRatioSettings=getAspectRatioSettings,exports.getAttachmentDevice=getAttachmentDevice,exports.getBackgroundImageHeroBanner=getBackgroundImageHeroBanner,exports.getBannerLink=getBannerLink,exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getClassSpaceBetweenLeftRight=getClassSpaceBetweenLeftRight,exports.getClipPath=getClipPath,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getEnableBgImageByDevice=getEnableBgImageByDevice,exports.getPercentageVisible=getPercentageVisible,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatioHeroBannerCustom=getStyleAspectRatioHeroBannerCustom,exports.getStyleHeroBannerBg=getStyleHeroBannerBg,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.horizontalAlign=horizontalAlign,exports.imagePlaceholder=imagePlaceholder,exports.isScaleImage=isScaleImage,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal,exports.opacityEnabledData=opacityEnabledData,exports.scrollToContentBanner=scrollToContentBanner,exports.showVideoType=showVideoType;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Link=require("next/link");const CustomLink=({children:e,...t})=>jsxRuntime.jsx(Link,{title:t?.title,...t,children:e});exports.default=CustomLink;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Link=require("next/link");const CustomLink=({children:e,...t})=>jsxRuntime.jsx(Link,{title:t?.title,"data-id":t?.dataId,...t,children:e});exports.default=CustomLink;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),CustomLink=require("./CustomLink.js"),ProductLink=require("./ProductLink.js");const Link=({setting:e,className:t,style:r,children:u,title:i})=>{let o=React.useMemo(()=>e?.type==="product"?ProductLink.default:CustomLink.default,[e?.type]),l={};return o==CustomLink.default&&(l.title=i),jsxRuntime.jsx(o,{...l,target:e?.target,rel:e?.noFollow?"nofollow":void 0,"aria-label":e?.label,href:e?.href,className:t,style:r,children:u})};exports.default=Link;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),CustomLink=require("./CustomLink.js"),ProductLink=require("./ProductLink.js");const Link=({setting:e,className:t,style:r,children:u,title:i,dataId:o})=>{let a=React.useMemo(()=>e?.type==="product"?ProductLink.default:CustomLink.default,[e?.type]),l={};return a==CustomLink.default&&(l.title=i,l.dataId=o),jsxRuntime.jsx(a,{...l,target:e?.target,rel:e?.noFollow?"nofollow":void 0,"aria-label":e?.label,href:e?.href,className:t,style:r,children:u})};exports.default=Link;
@@ -1 +1 @@
1
- "use strict";const DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",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:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];exports.DeclineButtonSettings=DeclineButtonSettings;
1
+ "use strict";const DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",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:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];exports.DeclineButtonSettings=DeclineButtonSettings;
@@ -8,4 +8,4 @@
8
8
  <circle cx="37" cy="17" r="3" fill="#D6D6D6"/>
9
9
  <path d="M32.42 30.9518L37.1407 25.1338C37.3005 24.9364 37.498 24.7768 37.7203 24.6653C37.9427 24.5538 38.1848 24.4929 38.431 24.4866C38.6772 24.4803 38.9218 24.5287 39.149 24.6287C39.3762 24.7288 39.5809 24.8781 39.7496 25.0671L41.957 27.5361L50.5857 16.6629C50.7546 16.4499 50.967 16.2797 51.2069 16.165C51.4469 16.0503 51.7083 15.9941 51.9718 16.0005C52.2352 16.0069 52.4939 16.0758 52.7285 16.202C52.9632 16.3283 53.1679 16.5086 53.3273 16.7297L63.6435 31.0236C63.8408 31.2976 63.9615 31.6242 63.9922 31.9666C64.0229 32.3089 63.9623 32.6535 63.8173 32.9616C63.6723 33.2697 63.4485 33.529 63.1712 33.7105C62.8939 33.8919 62.5741 33.9883 62.2476 33.9887L33.7537 34C33.4185 33.9999 33.0904 33.8986 32.8082 33.7082C32.526 33.5177 32.3014 33.2461 32.1611 32.9255C32.0208 32.6048 31.9706 32.2485 32.0165 31.8988C32.0624 31.549 32.2024 31.2204 32.42 30.9518Z" fill="#D6D6D6"/>
10
10
  </svg>
11
- `},components:[{tag:"PostPurchaseImage",advanced:{blockPadding:"none",inlinePadding:"none"}}],rootOverride:{styles:{width:{desktop:"500px"}}}}]};exports.default=config;
11
+ `},components:[{tag:"PostPurchaseImage",advanced:{blockPadding:"none",inlinePadding:"none"}}],rootOverride:{styles:{width:{desktop:"500px"},align:"center"}}}]};exports.default=config;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const getButtonStyle=(t,e)=>({...t,...core.makeStyleResponsive("ta",e?.align)}),getButtonBaseStyles=()=>({size:{desktop:"1em",tablet:"1em",mobile:"1em"}}),getAddToCartButtonStyles=t=>({...t,...getButtonBaseStyles(),enableTextStyle:!0}),getSoldOutButtonStyles=t=>{let{isCustomOutOfStock:e,oosBorder:o,oosShadow:l,oosRounded:r,oosBorderV2:a,oosShadowV2:n,oosTextColor:S,oosRoundedV2:s,oosBackground:y,oosTextColorV2:p,oosBackgroundV2:B,oosEnableShadow:g,...u}=t??{},d=JSON.parse(JSON.stringify(u));e&&Object.assign(d,{backgroundColor:{normal:y},textColor:{normal:S},borderBtn:o,hasBoxShadowBtn:{normal:g},boxShadowBtn:{normal:l},roundedBtn:{normal:r}});let m=(t,e,o)=>{o&&(t[e]={normal:o?.normal,hover:t[e]?.hover})};return m(d,"backgroundColorV2",B),m(d,"boxShadowBtn",{normal:l}),m(d,"hasBoxShadowBtn",{normal:g}),m(d,"roundedBtnV2",s),m(d,"borderBtnV2",a),p?.normal&&(d.typo=d.typo??{},d.typo.attrs=d.typo.attrs??{},d.typo.attrs.color=p.normal),{...getButtonBaseStyles(),...d}},getSplitStyle=t=>{let[e,o]=core.splitStyle(["pos","top","left","bottom","right","z"],t);return{wrapStyle:e,restStyle:o}},getSeparatorStyle=()=>({...core.makeStyle({mr:"8px",ml:"8px"})}),getBlankSpaceStyle=()=>({"--mr":"2px","--ml":"2px",display:"block !important"});exports.getAddToCartButtonStyles=getAddToCartButtonStyles,exports.getBlankSpaceStyle=getBlankSpaceStyle,exports.getButtonBaseStyles=getButtonBaseStyles,exports.getButtonStyle=getButtonStyle,exports.getSeparatorStyle=getSeparatorStyle,exports.getSoldOutButtonStyles=getSoldOutButtonStyles,exports.getSplitStyle=getSplitStyle;
1
+ "use strict";var core=require("@gem-sdk/core");const getButtonStyle=(t,e)=>({...t,...core.makeStyleResponsive("ta",e?.align)}),getButtonBaseStyles=()=>({size:{desktop:"1em",tablet:"1em",mobile:"1em"}}),getAddToCartButtonStyles=t=>({...t,...getButtonBaseStyles(),enableTextStyle:!0}),getSoldOutButtonStyles=t=>{let{isCustomOutOfStock:e,oosBorder:o,oosShadow:l,oosRounded:r,oosBorderV2:S,oosShadowV2:a,oosTextColor:s,oosRoundedV2:n,oosBackground:y,oosTextColorV2:p,oosBackgroundV2:g,oosEnableShadow:B,...u}=t??{},d=JSON.parse(JSON.stringify(u));return Object.assign(d,{textColor:{normal:p},hasBoxShadowBtn:{normal:B},boxShadowBtn:{normal:l},roundedBtnV2:n,borderBtnV2:S,backgroundColorV2:g}),p?.normal&&(d.typo={...d.typo,attrs:{...d.typo?.attrs,color:p.normal}}),{...getButtonBaseStyles(),...d}},getSplitStyle=t=>{let[e,o]=core.splitStyle(["pos","top","left","bottom","right","z"],t);return{wrapStyle:e,restStyle:o}},getSeparatorStyle=()=>({...core.makeStyle({mr:"8px",ml:"8px"})}),getBlankSpaceStyle=()=>({"--mr":"2px","--ml":"2px",display:"block !important"});exports.getAddToCartButtonStyles=getAddToCartButtonStyles,exports.getBlankSpaceStyle=getBlankSpaceStyle,exports.getButtonBaseStyles=getButtonBaseStyles,exports.getButtonStyle=getButtonStyle,exports.getSeparatorStyle=getSeparatorStyle,exports.getSoldOutButtonStyles=getSoldOutButtonStyles,exports.getSplitStyle=getSplitStyle;
@@ -1,6 +1,6 @@
1
- "use strict";var core=require("@gem-sdk/core");const getPPCInlineStyleChoice=(e,t)=>t?.active&&e?`
1
+ "use strict";var core=require("@gem-sdk/core");const getPPCInlineStyleChoice=(e,t)=>{let r=t?.active||t?.normal;return r&&e?`
2
2
  .${e} {
3
3
  input:checked + label {
4
- color: ${core.getSingleColorVariable(t.active)} !important;
4
+ color: ${core.getSingleColorVariable(r)} !important;
5
5
  }
6
- }`:"";exports.getPPCInlineStyleChoice=getPPCInlineStyleChoice;
6
+ }`:""};exports.getPPCInlineStyleChoice=getPPCInlineStyleChoice;
@@ -1,3 +1,3 @@
1
1
  "use strict";const ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:1,default:"cart-icon",options:[{value:"cart-full",iconName:"gp-product-button-cart-full-layout"},{value:"cart-price",iconName:"gp-product-button-cart-price-layout"},{value:"cart-only",iconName:"gp-product-button-cart-only-layout"},{value:"cart-price-icon",iconName:"gp-product-button-price-icon-layout"},{value:"cart-icon",iconName:"gp-product-button-cart-item-layout"}]},{id:"priceTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{color:!0,textAlign:!0},ignoreReRender:!0},{id:"compareAtPriceTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{color:!0,textAlign:!0},ignoreReRender:!0},{id:"opacityPrice",type:"input:slider",step:1,min:0,max:100,ignoreMax:!0,default:50}]},{id:"priceLayout",type:"option:illustration",enableTooltip:!1,label:"Layout",options:[{value:"price-only",type:"image",svgName:"gp-product-button-price-only-layout"},{value:"price-before",type:"image",svgName:"gp-product-button-price-before-layout"},{value:"price-after",type:"image",svgName:"gp-product-button-price-after-layout"}],default:"price-only"},{id:"button-text-group",type:"group",label:"Product Button",controls:[{id:"label",type:"input",label:"Button Text",default:"Add to cart"},{id:"translate",type:"input",default:"label,outOfStockLabel,unavailableLabel,variantSelectionRequiredMessage"},{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",clearButton:!1,default:"Out of stock"},{id:"unavailableLabel",type:"input",label:"Unavailable",default:"Unavailable"},{id:"actionEffect",label:"After Add To Cart Action",type:"select",options:[{title:"Keep shopping",value:"continue-shopping"},{title:"Go to checkout",value:"buy-now"},{title:"Open cart",value:"open-cart-drawer"},{title:"Open page",value:"go-to-url"}],default:"open-cart-drawer"},{id:"customURL",label:"Custom URL",type:"pick-link",default:{link:"/cart",target:"_self"},isHiddenOpenLinkSelect:!0,hide:!0},{id:"enableMessage",type:"toggle",default:!0},{id:"successMessage",type:"textarea",label:"Success",minHeight:58,default:"Add product to cart successfully",autoHeight:!0},{id:"errorMessage",type:"textarea",label:"Error",minHeight:58,default:"Cannot add product to cart",autoHeight:!0},{id:"variantSelectionRequiredMessage",type:"textarea",label:"Error Message",minHeight:78,default:"Please select a variant to add product to cart",autoHeight:!0}]},{id:"group-icon",type:"group",label:"Icon",controls:[{id:"iconSvg",label:"SVG icon",type:"icon",hide:!0,default:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
2
2
  <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`,compoDefaultValue:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
3
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",hide:!0,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"errorType",type:"option:value",options:[{value:"built-in",label:"Shopify",tooltip:"Show default error message from Shopify"},{value:"custom",label:"Custom",tooltip:"Customize error message"}],default:"built-in"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"separator",label:"Separator",type:"option:value",options:[{value:"horizontal-line",iconName:"gp-product-button-horizontal-line-separator"},{value:"dot",iconName:"gp-product-button-dot-separator"},{value:"vertical-line",iconName:"gp-product-button-vertical-line-separator"}],default:"horizontal-line"},{id:"enableHoverEffect",label:"",type:"toggle",default:!0}]},{id:"style",controls:[{id:"iconSpacing",type:"input:slider",units:["px"],step:1,min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"textColor",type:"color-picker-v2",default:{normal:"text-3"},state:{hover:!0,normal:!0},enableGradient:!1},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0}}]},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"boxShadowBtn",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"roundedBtnV2",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"}}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"oosBackgroundV2",type:"color-picker-v2",default:{normal:"#B7B7B7",hover:"highlight"},compoDefaultValue:{normal:"#B7B7B7",hover:"highlight"},enableGradient:!0},{id:"oosTextColorV2",type:"color-picker-v2",default:{normal:"text-3"},compoDefaultValue:{normal:"text-3"}},{id:"oosBorderV2",type:"border-v2"},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"shadow-v2",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"enableIcon",type:"toggle",default:!0},{id:"enablePrice",type:"toggle",default:!1},{id:"enableSeparator",type:"toggle",default:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",title:"None"},{value:"capitalize",title:"Capitalize"},{value:"uppercase",title:"Uppercase"},{value:"lowercase",title:"Lowercase"}],default:"default"},{id:"button-dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",emptyOnClear:!0,min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}}]},{id:"icon-dimensions",type:"group",label:"Icon Dimension",hide:!0,controls:[{id:"iconSizeAuto",type:"toggle",label:"Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{title:"Large",value:"1.2em"},{title:"medium",value:"1em"},{title:"Small",value:"0.8em"}],devices:{desktop:{default:"1em"}}},{id:"iconDimension",type:"input:slider",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}}]},{id:"success-group",type:"group",label:"Success Message",controls:[{id:"successTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"success"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"successColor",type:"colorpicker",label:"Text Color",default:"success"}]},{id:"error-group",type:"group",label:"Error Message",controls:[{id:"errorTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"error"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"errorColor",type:"colorpicker",label:"Text Color",default:"error"}]},{id:"outofstock-group",type:"group",label:"Out of Stock",controls:[{id:"isCustomOutOfStock",label:"Custom Style",type:"toggle",default:!1},{id:"oosBackground",type:"colorpicker",label:"Background Color",default:"brand",hide:!0},{id:"oosTextColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosIconColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosBorder",type:"border",label:"Border Style",default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"}},hide:!0},{id:"oosRounded",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},hide:!0}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["shape","gap"]}]}];exports.ProductButtonSettings=ProductButtonSettings;
3
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",hide:!0,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"errorType",type:"option:value",options:[{value:"built-in",label:"Shopify",tooltip:"Show default error message from Shopify"},{value:"custom",label:"Custom",tooltip:"Customize error message"}],default:"built-in"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"separator",label:"Separator",type:"option:value",options:[{value:"horizontal-line",iconName:"gp-product-button-horizontal-line-separator"},{value:"dot",iconName:"gp-product-button-dot-separator"},{value:"vertical-line",iconName:"gp-product-button-vertical-line-separator"}],default:"horizontal-line"},{id:"enableHoverEffect",label:"",type:"toggle",default:!0}]},{id:"style",controls:[{id:"iconSpacing",type:"input:slider",units:["px"],step:1,min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"textColor",type:"color-picker-v2",default:{normal:"text-3"},state:{hover:!0,normal:!0},enableGradient:!1},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0}}]},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"boxShadowBtn",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"roundedBtnV2",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"}}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"oosBackgroundV2",type:"color-picker-v2",default:{normal:"#B7B7B7"},compoDefaultValue:{normal:"#B7B7B7"},enableGradient:!0},{id:"oosTextColorV2",type:"color-picker-v2",default:{normal:"text-3"},compoDefaultValue:{normal:"text-3"}},{id:"oosBorderV2",type:"border-v2"},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"shadow-v2",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"enableIcon",type:"toggle",default:!0},{id:"enablePrice",type:"toggle",default:!1},{id:"enableSeparator",type:"toggle",default:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",title:"None"},{value:"capitalize",title:"Capitalize"},{value:"uppercase",title:"Uppercase"},{value:"lowercase",title:"Lowercase"}],default:"default"},{id:"button-dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",emptyOnClear:!0,min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}}]},{id:"icon-dimensions",type:"group",label:"Icon Dimension",hide:!0,controls:[{id:"iconSizeAuto",type:"toggle",label:"Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{title:"Large",value:"1.2em"},{title:"medium",value:"1em"},{title:"Small",value:"0.8em"}],devices:{desktop:{default:"1em"}}},{id:"iconDimension",type:"input:slider",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}}]},{id:"success-group",type:"group",label:"Success Message",controls:[{id:"successTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"success"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"successColor",type:"colorpicker",label:"Text Color",default:"success"}]},{id:"error-group",type:"group",label:"Error Message",controls:[{id:"errorTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"error"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"errorColor",type:"colorpicker",label:"Text Color",default:"error"}]},{id:"outofstock-group",type:"group",label:"Out of Stock",controls:[{id:"isCustomOutOfStock",label:"Custom Style",type:"toggle",default:!1},{id:"oosBackground",type:"colorpicker",label:"Background Color",default:"brand",hide:!0},{id:"oosTextColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosIconColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosBorder",type:"border",label:"Border Style",default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"}},hide:!0},{id:"oosRounded",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},hide:!0}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["shape","gap"]}]}];exports.ProductButtonSettings=ProductButtonSettings;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Fera Version"},setting:{id:"feraVersion"}}]},{conditionDisplay:"feraVersion == 'V2'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"feraVersion == 'V3'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetTypeV3"}}]},{conditionDisplay:"widgetType == 'allReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"allReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"allReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'productReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'testimonialCarousel' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"testimonialCarouselCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"testimonialCarouselCode"}}]}]},{conditionDisplay:"widgetType == 'averageStoreRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageStoreRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageStoreRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'inStoreMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"inStoreMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"inStoreMediaCode"}}]}]},{conditionDisplay:"widgetType == 'averageRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'productPageMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productPageMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productPageMediaCode"}}]}]},{conditionDisplay:"widgetTypeV3 == 'otherWidget' && feraVersion == 'V3'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"otherWidgetCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"otherWidgetCode"}}]}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];exports.default=SettingUIV2;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{layout:"vertical",setting:{id:"install"}}]},{controls:[{label:{en:"Fera Version"},setting:{id:"feraVersion"}}]},{conditionDisplay:"feraVersion == 'V2'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"feraVersion == 'V3'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetTypeV3"}}]},{conditionDisplay:"widgetType == 'allReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"allReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"allReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'productReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'testimonialCarousel' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"testimonialCarouselCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"testimonialCarouselCode"}}]}]},{conditionDisplay:"widgetType == 'averageStoreRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageStoreRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageStoreRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'inStoreMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"inStoreMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"inStoreMediaCode"}}]}]},{conditionDisplay:"widgetType == 'averageRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'productPageMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productPageMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productPageMediaCode"}}]}]},{conditionDisplay:"widgetTypeV3 == 'otherWidget' && feraVersion == 'V3'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"otherWidgetCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"otherWidgetCode"}}]}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];exports.default=SettingUIV2;
@@ -3,4 +3,4 @@
3
3
  <img class="w-24 border border-dark-200 rounded-medium" src="${LaiProductReviews.default.logoUrl}?width=22&height=22">
4
4
  <span class="preset-item-title">${LaiProductReviews.default.label}</span>
5
5
  </div>
6
- `},components:[{tag:LaiProductReviews.default.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/lai-reviews?utm_source=gempages",appName:LaiProductReviews.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/smart-aliexpress-reviews",appName:LaiProductReviews.default.label},{id:"widgetType",label:"Choose widget",type:"select",default:"star_ratings",options:[{label:"Star Ratings",value:"star_ratings",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Product Review Sections",value:"reviews_widget",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Advanced Widget",value:"advanced_widget"},{label:"Hom Page Reviews",value:"homepage_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Happy Customer Reviews",value:"happy_customer_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Star Ratings in the List",value:"star_ratings_in_list",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]}]},{id:"advancedWidgetType",label:"Choose widget",type:"select",default:"mediaGallery",options:[{label:"Media Gallery",value:"mediaGallery"},{label:"Testimonial Garousel",value:"testimonialCarousel"},{label:"Card Carousel",value:"cardCarousel"},{label:"Card Grid",value:"cardGrid"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:uiV1.default,uiV2:uiV2.default};exports.default=config;
6
+ `},components:[{tag:LaiProductReviews.default.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/lai-reviews?utm_source=gempages",appName:LaiProductReviews.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/smart-aliexpress-reviews",appName:LaiProductReviews.default.label},{id:"widgetType",label:"Choose widget",type:"select",default:"advanced_widget",options:[{label:"Star Ratings",value:"star_ratings",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Product Review Sections",value:"reviews_widget",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Advanced Widget",value:"advanced_widget"},{label:"Hom Page Reviews",value:"homepage_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Happy Customer Reviews",value:"happy_customer_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Star Ratings in the List",value:"star_ratings_in_list",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]}]},{id:"advancedWidgetType",label:"Choose widget",type:"select",default:"mediaGallery",options:[{label:"Media Gallery",value:"mediaGallery"},{label:"Testimonial Garousel",value:"testimonialCarousel"},{label:"Card Carousel",value:"cardCarousel"},{label:"Card Grid",value:"cardGrid"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:uiV1.default,uiV2:uiV2.default};exports.default=config;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"widgetType === 'advanced_widget'",controls:[{label:{en:"Widget Type"},setting:{id:"advancedWidgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];exports.default=SettingUIV2;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{label:{en:"Widget Type"},setting:{id:"advancedWidgetType"},conditionDisplay:'widgetType === "advanced_widget"'}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];exports.default=SettingUIV2;
@@ -1,4 +1,4 @@
1
- import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,makeStyleState,composeBorderCss,composeCornerCss,GRADIENT_BGR_KEY}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},a=o?.[t],n=r?.[t];if(!a&&!n)return"";let l=`url(${a?.image?.src})`,s=n?`, ${n}`:"";return n?.includes(GRADIENT_BGR_KEY)&&a?.image?.src?`${l}${s}`:n?.includes(GRADIENT_BGR_KEY)&&!a?.image?.src?n:a?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},a={...t,hover:t?.hover||t?.normal};return{...getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:a}),...getGlobalColorStateStyle("bg",a)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:a,roundedBtnV2:n}=e??{},l=ignoreStateNoneValue(a||{},'value?.borderType !== "none"'),s=ignoreStateNoneValue(n||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:s,builderAttrs:o,enableHoverEffect:r});return`
1
+ import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,makeStyleState,composeBorderCss,composeCornerCss,GRADIENT_BGR_KEY}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal","active"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.type !== undefined ");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},a=o?.[t],n=r?.[t];if(!a&&!n)return"";let l=`url(${a?.image?.src})`,s=n?`, ${n}`:"";return n?.includes?.(GRADIENT_BGR_KEY)&&a?.image?.src?`${l}${s}`:n?.includes?.(GRADIENT_BGR_KEY)&&!a?.image?.src?n:a?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover?.image?o?.hover:o?.normal},a={...t,hover:t?.hover||t?.normal};return{...getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:a}),...getGlobalColorStateStyle("bg",a)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:a,roundedBtnV2:n}=e??{},l=ignoreStateNoneValue(a||{},'value?.border !== "none"'),s=ignoreStateNoneValue(n||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:s,builderAttrs:o,enableHoverEffect:r});return`
2
2
  ${g.normalStyles}
3
3
  ${g.hoverStyles}
4
4
  `.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:a})=>{let n=r?.["data-component-tag"],l=({styleObj:e,state:t})=>{if(e)return e?.[t]},s=l({styleObj:t,state:"normal"}),g=l({styleObj:a?t:void 0,state:"hover"}),d=l({styleObj:o,state:"normal"}),i=l({styleObj:o,state:"hover"}),u=`
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}},{label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"hover"},conditionDisplay:"false"}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}},{label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"active"},conditionDisplay:"false"}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
@@ -1,4 +1,4 @@
1
- let HeaderSettings=[{id:"setting",controls:[{id:"breakpoint",label:"Breakpoint",type:"select",hideOnMode:{mobileOnly:!0},options:[{label:"From desktop and smaller",subTitle:"Display menu icon for desktop, tablet and mobile",value:"desktop"},{label:"From tablet and smaller",subTitle:"Display menu icon for tablet and mobile",value:"tablet"},{label:"Only mobile",subTitle:"Display menu icon for only mobile",value:"mobile"}],default:"mobile"},{id:"itemEnableHoverEffect",type:"toggle",default:!0},{id:"enableDropdownHoverEffect",type:"toggle",default:!0},{id:"cardEnableHoverEffect",type:"toggle",default:!0},{id:"menu",label:"Menu",type:"menu",default:{ROOT:{id:"ROOT",title:"Root",childrens:["1","2","3"]},1:{id:"1",title:"Menu 1",link:"",childrens:["13","14"]},2:{id:"2",title:"Menu 2",link:"",childrens:["6","7","8"]},6:{id:"6",title:"Sub Menu 2.1",childrens:[]},7:{id:"7",title:"Sub Menu 2.2",childrens:["10","11"]},8:{id:"8",title:"Sub Menu 2.3",childrens:["12"]},9:{id:"9",title:"Sub Menu 2.4",childrens:[]},10:{id:"10",title:"Sub Menu 2.2.1",childrens:[]},11:{id:"11",title:"Sub Menu 2.2.2",childrens:[]},12:{id:"12",title:"Sub Menu 2.3.1",childrens:[]},3:{id:"3",title:"Menu 3",link:"",childrens:[]},13:{id:"13",title:"Sub Menu 1.1",link:"",childrens:[]},14:{id:"14",title:"Sub Menu 1.2",link:"",childrens:[]}}},{type:"group",label:"Logo",id:"logo-group",controls:[{id:"logo",label:"Logo",type:"image-select",devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:800,height:533}}}},{id:"logoAspectRatio",type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"1:1",value:"1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"auto"}}},{id:"customAspectRadio",type:"ratio",min:1,devices:{desktop:{default:{width:"1",height:"1"}}},hide:!0},{id:"layout",type:"select",label:"Object Fit",options:[{label:"Fill",value:"fill"},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"None",value:"none"},{label:"Scale down",value:"scale-down"}],devices:{desktop:{default:"contain"}}},{id:"logoWidth",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"80px"}}}]},{id:"arrow",label:"Arrow Icon",type:"icon",default:`<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ let HeaderSettings=[{id:"setting",controls:[{id:"breakpoint",label:"Breakpoint",type:"select",hideOnMode:{mobileOnly:!0},options:[{label:"From desktop and smaller",subTitle:"Display menu icon for desktop, tablet and mobile",value:"desktop"},{label:"From tablet and smaller",subTitle:"Display menu icon for tablet and mobile",value:"tablet"},{label:"Only mobile",subTitle:"Display menu icon for only mobile",value:"mobile"}],default:"mobile"},{id:"itemEnableHoverEffect",type:"toggle",default:!1},{id:"enableDropdownHoverEffect",type:"toggle",default:!1},{id:"cardEnableHoverEffect",type:"toggle",default:!1},{id:"menu",label:"Menu",type:"menu",default:{ROOT:{id:"ROOT",title:"Root",childrens:["1","2","3"]},1:{id:"1",title:"Menu 1",link:"",childrens:["13","14"]},2:{id:"2",title:"Menu 2",link:"",childrens:["6","7","8"]},6:{id:"6",title:"Sub Menu 2.1",childrens:[]},7:{id:"7",title:"Sub Menu 2.2",childrens:["10","11"]},8:{id:"8",title:"Sub Menu 2.3",childrens:["12"]},9:{id:"9",title:"Sub Menu 2.4",childrens:[]},10:{id:"10",title:"Sub Menu 2.2.1",childrens:[]},11:{id:"11",title:"Sub Menu 2.2.2",childrens:[]},12:{id:"12",title:"Sub Menu 2.3.1",childrens:[]},3:{id:"3",title:"Menu 3",link:"",childrens:[]},13:{id:"13",title:"Sub Menu 1.1",link:"",childrens:[]},14:{id:"14",title:"Sub Menu 1.2",link:"",childrens:[]}}},{type:"group",label:"Logo",id:"logo-group",controls:[{id:"logo",label:"Logo",type:"image-select",devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:800,height:533}}}},{id:"logoAspectRatio",type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"1:1",value:"1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"auto"}}},{id:"customAspectRadio",type:"ratio",min:1,devices:{desktop:{default:{width:"1",height:"1"}}},hide:!0},{id:"layout",type:"select",label:"Object Fit",options:[{label:"Fill",value:"fill"},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"None",value:"none"},{label:"Scale down",value:"scale-down"}],devices:{desktop:{default:"contain"}}},{id:"logoWidth",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"80px"}}}]},{id:"arrow",label:"Arrow Icon",type:"icon",default:`<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="currentColor"/>
3
3
  </svg>
4
- `},{id:"cart-setting",type:"group",label:"Cart Setting",controls:[{id:"cartIcon",label:"Cart Icon",type:"icon",default:'<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>'}]}]},{id:"style",controls:[{id:"height",label:"Height",type:"input:unit",units:["px"],devices:{desktop:{default:"60px"}}},{id:"typography",label:"Typography",type:"typography",default:{type:"paragraph-1"}},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"background-group",label:"Background",type:"group",controls:[{id:"headerBg",type:"color-picker-v2",label:"Header",devices:{desktop:{default:"#FFFFFF"}}},{id:"menuBg",type:"color-picker-v2",label:"Menu",info:"Dropdown and collapse menu background color",compoDefaultValue:{desktop:{default:"#FFFFFF"}},devices:{desktop:{default:"#FFFFFF"}}}]},{id:"color-state",type:"behavior-state",controls:[{id:"textColor",label:"Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}},{id:"menuTextColor",label:"Menu Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},compoDefaultValue:{normal:"text-1",hover:"text-2"},default:{normal:"text-1"}},{id:"cartIconColor",type:"color-picker-v2",label:"Cart Icon Color",state:{normal:!0,hover:!0},default:{normal:"text-1"}}]}]}];export{HeaderSettings};
4
+ `},{id:"cart-setting",type:"group",label:"Cart Setting",controls:[{id:"cartIcon",label:"Cart Icon",type:"icon",default:'<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>'}]}]},{id:"style",controls:[{id:"height",label:"Height",type:"input:unit",units:["px"],devices:{desktop:{default:"60px"}}},{id:"typography",label:"Typography",type:"typography",default:{type:"paragraph-1"}},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"background-group",label:"Background",type:"group",controls:[{id:"headerBg",type:"color-picker-v2",label:"Header",devices:{desktop:{default:"#FFFFFF"}}},{id:"menuBg",type:"color-picker-v2",label:"Menu",info:"Dropdown and collapse menu background color",compoDefaultValue:{desktop:{default:"#FFFFFF"}},devices:{desktop:{default:"#FFFFFF"}}}]},{id:"color-state",type:"behavior-state",controls:[{id:"textColor",label:"Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}},{id:"menuTextColor",label:"Menu Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},compoDefaultValue:{normal:"text-1",hover:"text-2"},default:{normal:"text-1"}},{id:"cartIconColor",type:"color-picker-v2",label:"Cart Icon Color",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}}]}]}];export{HeaderSettings};
@@ -1 +1 @@
1
- import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";let getContentPosition=(t,o,i)=>{let n={};return l.map(l=>{let a=e(t,l),r=e(o,l),s=e(i,l);n={...n,[l]:1>=(a?.cols?.length||1)?r:s}}),n},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(a,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(n)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(n)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(r??"0"),o,l),c=calcRounderClipPath(parseInt(s??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,r=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,s=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===r,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===s}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
1
+ import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";let getContentPosition=(t,o,i)=>{let n={};return l.map(l=>{let a=e(t,l),r=e(o,l),s=e(i,l);n={...n,[l]:1>=(a?.cols?.length||1)?r:s}}),n},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(a,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(n)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(n)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(r??"0"),o,l),c=calcRounderClipPath(parseInt(s??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,r=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,s=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute":l.tablet?.cols?.length===1&&"space-between"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===r,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute":l.mobile?.cols?.length===1&&"space-between"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===s}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as t}from"react/jsx-runtime";import e from"next/link";let CustomLink=({children:i,...r})=>t(e,{title:r?.title,...r,children:i});export{CustomLink as default};
2
+ import{jsx as t}from"react/jsx-runtime";import i from"next/link";let CustomLink=({children:e,...r})=>t(i,{title:r?.title,"data-id":r?.dataId,...r,children:e});export{CustomLink as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import e from"./CustomLink.js";import o from"./ProductLink.js";let Link=({setting:l,className:i,style:a,children:m,title:n})=>{let f=r(()=>l?.type==="product"?o:e,[l?.type]),p={};return f==e&&(p.title=n),t(f,{...p,target:l?.target,rel:l?.noFollow?"nofollow":void 0,"aria-label":l?.label,href:l?.href,className:i,style:a,children:m})};export{Link as default};
2
+ import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import e from"./CustomLink.js";import o from"./ProductLink.js";let Link=({setting:l,className:a,style:i,children:m,title:n,dataId:f})=>{let p=r(()=>l?.type==="product"?o:e,[l?.type]),s={};return p==e&&(s.title=n,s.dataId=f),t(p,{...s,target:l?.target,rel:l?.noFollow?"nofollow":void 0,"aria-label":l?.label,href:l?.href,className:a,style:i,children:m})};export{Link as default};
@@ -1 +1 @@
1
- let DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",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:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{DeclineButtonSettings};
1
+ let DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",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:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{DeclineButtonSettings};
@@ -8,4 +8,4 @@ import{SettingUIV2 as e}from"./configs/ui-v2.js";import{ImagePostPurchaseSetting
8
8
  <circle cx="37" cy="17" r="3" fill="#D6D6D6"/>
9
9
  <path d="M32.42 30.9518L37.1407 25.1338C37.3005 24.9364 37.498 24.7768 37.7203 24.6653C37.9427 24.5538 38.1848 24.4929 38.431 24.4866C38.6772 24.4803 38.9218 24.5287 39.149 24.6287C39.3762 24.7288 39.5809 24.8781 39.7496 25.0671L41.957 27.5361L50.5857 16.6629C50.7546 16.4499 50.967 16.2797 51.2069 16.165C51.4469 16.0503 51.7083 15.9941 51.9718 16.0005C52.2352 16.0069 52.4939 16.0758 52.7285 16.202C52.9632 16.3283 53.1679 16.5086 53.3273 16.7297L63.6435 31.0236C63.8408 31.2976 63.9615 31.6242 63.9922 31.9666C64.0229 32.3089 63.9623 32.6535 63.8173 32.9616C63.6723 33.2697 63.4485 33.529 63.1712 33.7105C62.8939 33.8919 62.5741 33.9883 62.2476 33.9887L33.7537 34C33.4185 33.9999 33.0904 33.8986 32.8082 33.7082C32.526 33.5177 32.3014 33.2461 32.1611 32.9255C32.0208 32.6048 31.9706 32.2485 32.0165 31.8988C32.0624 31.549 32.2024 31.2204 32.42 30.9518Z" fill="#D6D6D6"/>
10
10
  </svg>
11
- `},components:[{tag:"PostPurchaseImage",advanced:{blockPadding:"none",inlinePadding:"none"}}],rootOverride:{styles:{width:{desktop:"500px"}}}}]};export{config as default};
11
+ `},components:[{tag:"PostPurchaseImage",advanced:{blockPadding:"none",inlinePadding:"none"}}],rootOverride:{styles:{width:{desktop:"500px"},align:"center"}}}]};export{config as default};
@@ -1 +1 @@
1
- import{splitStyle as t,makeStyleResponsive as e,makeStyle as o}from"@gem-sdk/core";let getButtonStyle=(t,o)=>({...t,...e("ta",o?.align)}),getButtonBaseStyles=()=>({size:{desktop:"1em",tablet:"1em",mobile:"1em"}}),getAddToCartButtonStyles=t=>({...t,...getButtonBaseStyles(),enableTextStyle:!0}),getSoldOutButtonStyles=t=>{let{isCustomOutOfStock:e,oosBorder:o,oosShadow:l,oosRounded:r,oosBorderV2:a,oosShadowV2:n,oosTextColor:S,oosRoundedV2:s,oosBackground:B,oosTextColorV2:m,oosBackgroundV2:y,oosEnableShadow:g,...p}=t??{},d=JSON.parse(JSON.stringify(p));e&&Object.assign(d,{backgroundColor:{normal:B},textColor:{normal:S},borderBtn:o,hasBoxShadowBtn:{normal:g},boxShadowBtn:{normal:l},roundedBtn:{normal:r}});let u=(t,e,o)=>{o&&(t[e]={normal:o?.normal,hover:t[e]?.hover})};return u(d,"backgroundColorV2",y),u(d,"boxShadowBtn",{normal:l}),u(d,"hasBoxShadowBtn",{normal:g}),u(d,"roundedBtnV2",s),u(d,"borderBtnV2",a),m?.normal&&(d.typo=d.typo??{},d.typo.attrs=d.typo.attrs??{},d.typo.attrs.color=m.normal),{...getButtonBaseStyles(),...d}},getSplitStyle=e=>{let[o,l]=t(["pos","top","left","bottom","right","z"],e);return{wrapStyle:o,restStyle:l}},getSeparatorStyle=()=>({...o({mr:"8px",ml:"8px"})}),getBlankSpaceStyle=()=>({"--mr":"2px","--ml":"2px",display:"block !important"});export{getAddToCartButtonStyles,getBlankSpaceStyle,getButtonBaseStyles,getButtonStyle,getSeparatorStyle,getSoldOutButtonStyles,getSplitStyle};
1
+ import{splitStyle as t,makeStyleResponsive as e,makeStyle as o}from"@gem-sdk/core";let getButtonStyle=(t,o)=>({...t,...e("ta",o?.align)}),getButtonBaseStyles=()=>({size:{desktop:"1em",tablet:"1em",mobile:"1em"}}),getAddToCartButtonStyles=t=>({...t,...getButtonBaseStyles(),enableTextStyle:!0}),getSoldOutButtonStyles=t=>{let{isCustomOutOfStock:e,oosBorder:o,oosShadow:l,oosRounded:r,oosBorderV2:a,oosShadowV2:n,oosTextColor:S,oosRoundedV2:s,oosBackground:g,oosTextColorV2:y,oosBackgroundV2:p,oosEnableShadow:B,...m}=t??{},u=JSON.parse(JSON.stringify(m));return Object.assign(u,{textColor:{normal:y},hasBoxShadowBtn:{normal:B},boxShadowBtn:{normal:l},roundedBtnV2:s,borderBtnV2:a,backgroundColorV2:p}),y?.normal&&(u.typo={...u.typo,attrs:{...u.typo?.attrs,color:y.normal}}),{...getButtonBaseStyles(),...u}},getSplitStyle=e=>{let[o,l]=t(["pos","top","left","bottom","right","z"],e);return{wrapStyle:o,restStyle:l}},getSeparatorStyle=()=>({...o({mr:"8px",ml:"8px"})}),getBlankSpaceStyle=()=>({"--mr":"2px","--ml":"2px",display:"block !important"});export{getAddToCartButtonStyles,getBlankSpaceStyle,getButtonBaseStyles,getButtonStyle,getSeparatorStyle,getSoldOutButtonStyles,getSplitStyle};
@@ -1,6 +1,6 @@
1
- import{getSingleColorVariable as e}from"@gem-sdk/core";let getPPCInlineStyleChoice=(t,i)=>i?.active&&t?`
1
+ import{getSingleColorVariable as e}from"@gem-sdk/core";let getPPCInlineStyleChoice=(t,l)=>{let o=l?.active||l?.normal;return o&&t?`
2
2
  .${t} {
3
3
  input:checked + label {
4
- color: ${e(i.active)} !important;
4
+ color: ${e(o)} !important;
5
5
  }
6
- }`:"";export{getPPCInlineStyleChoice};
6
+ }`:""};export{getPPCInlineStyleChoice};
@@ -1,3 +1,3 @@
1
1
  let ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:1,default:"cart-icon",options:[{value:"cart-full",iconName:"gp-product-button-cart-full-layout"},{value:"cart-price",iconName:"gp-product-button-cart-price-layout"},{value:"cart-only",iconName:"gp-product-button-cart-only-layout"},{value:"cart-price-icon",iconName:"gp-product-button-price-icon-layout"},{value:"cart-icon",iconName:"gp-product-button-cart-item-layout"}]},{id:"priceTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{color:!0,textAlign:!0},ignoreReRender:!0},{id:"compareAtPriceTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{color:!0,textAlign:!0},ignoreReRender:!0},{id:"opacityPrice",type:"input:slider",step:1,min:0,max:100,ignoreMax:!0,default:50}]},{id:"priceLayout",type:"option:illustration",enableTooltip:!1,label:"Layout",options:[{value:"price-only",type:"image",svgName:"gp-product-button-price-only-layout"},{value:"price-before",type:"image",svgName:"gp-product-button-price-before-layout"},{value:"price-after",type:"image",svgName:"gp-product-button-price-after-layout"}],default:"price-only"},{id:"button-text-group",type:"group",label:"Product Button",controls:[{id:"label",type:"input",label:"Button Text",default:"Add to cart"},{id:"translate",type:"input",default:"label,outOfStockLabel,unavailableLabel,variantSelectionRequiredMessage"},{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",clearButton:!1,default:"Out of stock"},{id:"unavailableLabel",type:"input",label:"Unavailable",default:"Unavailable"},{id:"actionEffect",label:"After Add To Cart Action",type:"select",options:[{title:"Keep shopping",value:"continue-shopping"},{title:"Go to checkout",value:"buy-now"},{title:"Open cart",value:"open-cart-drawer"},{title:"Open page",value:"go-to-url"}],default:"open-cart-drawer"},{id:"customURL",label:"Custom URL",type:"pick-link",default:{link:"/cart",target:"_self"},isHiddenOpenLinkSelect:!0,hide:!0},{id:"enableMessage",type:"toggle",default:!0},{id:"successMessage",type:"textarea",label:"Success",minHeight:58,default:"Add product to cart successfully",autoHeight:!0},{id:"errorMessage",type:"textarea",label:"Error",minHeight:58,default:"Cannot add product to cart",autoHeight:!0},{id:"variantSelectionRequiredMessage",type:"textarea",label:"Error Message",minHeight:78,default:"Please select a variant to add product to cart",autoHeight:!0}]},{id:"group-icon",type:"group",label:"Icon",controls:[{id:"iconSvg",label:"SVG icon",type:"icon",hide:!0,default:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
2
2
  <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`,compoDefaultValue:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
3
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",hide:!0,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"errorType",type:"option:value",options:[{value:"built-in",label:"Shopify",tooltip:"Show default error message from Shopify"},{value:"custom",label:"Custom",tooltip:"Customize error message"}],default:"built-in"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"separator",label:"Separator",type:"option:value",options:[{value:"horizontal-line",iconName:"gp-product-button-horizontal-line-separator"},{value:"dot",iconName:"gp-product-button-dot-separator"},{value:"vertical-line",iconName:"gp-product-button-vertical-line-separator"}],default:"horizontal-line"},{id:"enableHoverEffect",label:"",type:"toggle",default:!0}]},{id:"style",controls:[{id:"iconSpacing",type:"input:slider",units:["px"],step:1,min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"textColor",type:"color-picker-v2",default:{normal:"text-3"},state:{hover:!0,normal:!0},enableGradient:!1},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0}}]},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"boxShadowBtn",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"roundedBtnV2",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"}}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"oosBackgroundV2",type:"color-picker-v2",default:{normal:"#B7B7B7",hover:"highlight"},compoDefaultValue:{normal:"#B7B7B7",hover:"highlight"},enableGradient:!0},{id:"oosTextColorV2",type:"color-picker-v2",default:{normal:"text-3"},compoDefaultValue:{normal:"text-3"}},{id:"oosBorderV2",type:"border-v2"},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"shadow-v2",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"enableIcon",type:"toggle",default:!0},{id:"enablePrice",type:"toggle",default:!1},{id:"enableSeparator",type:"toggle",default:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",title:"None"},{value:"capitalize",title:"Capitalize"},{value:"uppercase",title:"Uppercase"},{value:"lowercase",title:"Lowercase"}],default:"default"},{id:"button-dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",emptyOnClear:!0,min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}}]},{id:"icon-dimensions",type:"group",label:"Icon Dimension",hide:!0,controls:[{id:"iconSizeAuto",type:"toggle",label:"Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{title:"Large",value:"1.2em"},{title:"medium",value:"1em"},{title:"Small",value:"0.8em"}],devices:{desktop:{default:"1em"}}},{id:"iconDimension",type:"input:slider",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}}]},{id:"success-group",type:"group",label:"Success Message",controls:[{id:"successTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"success"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"successColor",type:"colorpicker",label:"Text Color",default:"success"}]},{id:"error-group",type:"group",label:"Error Message",controls:[{id:"errorTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"error"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"errorColor",type:"colorpicker",label:"Text Color",default:"error"}]},{id:"outofstock-group",type:"group",label:"Out of Stock",controls:[{id:"isCustomOutOfStock",label:"Custom Style",type:"toggle",default:!1},{id:"oosBackground",type:"colorpicker",label:"Background Color",default:"brand",hide:!0},{id:"oosTextColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosIconColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosBorder",type:"border",label:"Border Style",default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"}},hide:!0},{id:"oosRounded",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},hide:!0}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["shape","gap"]}]}];export{ProductButtonSettings};
3
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",hide:!0,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"errorType",type:"option:value",options:[{value:"built-in",label:"Shopify",tooltip:"Show default error message from Shopify"},{value:"custom",label:"Custom",tooltip:"Customize error message"}],default:"built-in"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"separator",label:"Separator",type:"option:value",options:[{value:"horizontal-line",iconName:"gp-product-button-horizontal-line-separator"},{value:"dot",iconName:"gp-product-button-dot-separator"},{value:"vertical-line",iconName:"gp-product-button-vertical-line-separator"}],default:"horizontal-line"},{id:"enableHoverEffect",label:"",type:"toggle",default:!0}]},{id:"style",controls:[{id:"iconSpacing",type:"input:slider",units:["px"],step:1,min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"textColor",type:"color-picker-v2",default:{normal:"text-3"},state:{hover:!0,normal:!0},enableGradient:!1},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0}}]},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"boxShadowBtn",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"roundedBtnV2",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"}}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"oosBackgroundV2",type:"color-picker-v2",default:{normal:"#B7B7B7"},compoDefaultValue:{normal:"#B7B7B7"},enableGradient:!0},{id:"oosTextColorV2",type:"color-picker-v2",default:{normal:"text-3"},compoDefaultValue:{normal:"text-3"}},{id:"oosBorderV2",type:"border-v2"},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"shadow-v2",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"enableIcon",type:"toggle",default:!0},{id:"enablePrice",type:"toggle",default:!1},{id:"enableSeparator",type:"toggle",default:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",title:"None"},{value:"capitalize",title:"Capitalize"},{value:"uppercase",title:"Uppercase"},{value:"lowercase",title:"Lowercase"}],default:"default"},{id:"button-dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",emptyOnClear:!0,min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}}]},{id:"icon-dimensions",type:"group",label:"Icon Dimension",hide:!0,controls:[{id:"iconSizeAuto",type:"toggle",label:"Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{title:"Large",value:"1.2em"},{title:"medium",value:"1em"},{title:"Small",value:"0.8em"}],devices:{desktop:{default:"1em"}}},{id:"iconDimension",type:"input:slider",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}}]},{id:"success-group",type:"group",label:"Success Message",controls:[{id:"successTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"success"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"successColor",type:"colorpicker",label:"Text Color",default:"success"}]},{id:"error-group",type:"group",label:"Error Message",controls:[{id:"errorTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"error"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"errorColor",type:"colorpicker",label:"Text Color",default:"error"}]},{id:"outofstock-group",type:"group",label:"Out of Stock",controls:[{id:"isCustomOutOfStock",label:"Custom Style",type:"toggle",default:!1},{id:"oosBackground",type:"colorpicker",label:"Background Color",default:"brand",hide:!0},{id:"oosTextColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosIconColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosBorder",type:"border",label:"Border Style",default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"}},hide:!0},{id:"oosRounded",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},hide:!0}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["shape","gap"]}]}];export{ProductButtonSettings};
@@ -1 +1 @@
1
- let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Fera Version"},setting:{id:"feraVersion"}}]},{conditionDisplay:"feraVersion == 'V2'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"feraVersion == 'V3'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetTypeV3"}}]},{conditionDisplay:"widgetType == 'allReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"allReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"allReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'productReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'testimonialCarousel' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"testimonialCarouselCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"testimonialCarouselCode"}}]}]},{conditionDisplay:"widgetType == 'averageStoreRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageStoreRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageStoreRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'inStoreMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"inStoreMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"inStoreMediaCode"}}]}]},{conditionDisplay:"widgetType == 'averageRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'productPageMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productPageMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productPageMediaCode"}}]}]},{conditionDisplay:"widgetTypeV3 == 'otherWidget' && feraVersion == 'V3'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"otherWidgetCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"otherWidgetCode"}}]}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
1
+ let SettingUIV2=[{controls:[{layout:"vertical",setting:{id:"install"}}]},{controls:[{label:{en:"Fera Version"},setting:{id:"feraVersion"}}]},{conditionDisplay:"feraVersion == 'V2'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"feraVersion == 'V3'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetTypeV3"}}]},{conditionDisplay:"widgetType == 'allReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"allReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"allReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'productReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'testimonialCarousel' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"testimonialCarouselCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"testimonialCarouselCode"}}]}]},{conditionDisplay:"widgetType == 'averageStoreRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageStoreRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageStoreRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'inStoreMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"inStoreMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"inStoreMediaCode"}}]}]},{conditionDisplay:"widgetType == 'averageRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'productPageMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productPageMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productPageMediaCode"}}]}]},{conditionDisplay:"widgetTypeV3 == 'otherWidget' && feraVersion == 'V3'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"otherWidgetCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"otherWidgetCode"}}]}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
@@ -3,4 +3,4 @@ import e from"../../configs/LaiProductReviews.js";import a from"./uiV1.js";impor
3
3
  <img class="w-24 border border-dark-200 rounded-medium" src="${e.logoUrl}?width=22&height=22">
4
4
  <span class="preset-item-title">${e.label}</span>
5
5
  </div>
6
- `},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/lai-reviews?utm_source=gempages",appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/smart-aliexpress-reviews",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"star_ratings",options:[{label:"Star Ratings",value:"star_ratings",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Product Review Sections",value:"reviews_widget",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Advanced Widget",value:"advanced_widget"},{label:"Hom Page Reviews",value:"homepage_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Happy Customer Reviews",value:"happy_customer_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Star Ratings in the List",value:"star_ratings_in_list",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]}]},{id:"advancedWidgetType",label:"Choose widget",type:"select",default:"mediaGallery",options:[{label:"Media Gallery",value:"mediaGallery"},{label:"Testimonial Garousel",value:"testimonialCarousel"},{label:"Card Carousel",value:"cardCarousel"},{label:"Card Grid",value:"cardGrid"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:a,uiV2:l};export{config as default};
6
+ `},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/lai-reviews?utm_source=gempages",appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/smart-aliexpress-reviews",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"advanced_widget",options:[{label:"Star Ratings",value:"star_ratings",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Product Review Sections",value:"reviews_widget",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Advanced Widget",value:"advanced_widget"},{label:"Hom Page Reviews",value:"homepage_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Happy Customer Reviews",value:"happy_customer_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Star Ratings in the List",value:"star_ratings_in_list",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]}]},{id:"advancedWidgetType",label:"Choose widget",type:"select",default:"mediaGallery",options:[{label:"Media Gallery",value:"mediaGallery"},{label:"Testimonial Garousel",value:"testimonialCarousel"},{label:"Card Carousel",value:"cardCarousel"},{label:"Card Grid",value:"cardGrid"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:a,uiV2:l};export{config as default};
@@ -1 +1 @@
1
- let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"widgetType === 'advanced_widget'",controls:[{label:{en:"Widget Type"},setting:{id:"advancedWidgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
1
+ let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{label:{en:"Widget Type"},setting:{id:"advancedWidgetType"},conditionDisplay:'widgetType === "advanced_widget"'}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
@@ -2091,6 +2091,7 @@ type LinkProps = BaseProps<LinkSettingProps> & {
2091
2091
  style?: React.CSSProperties;
2092
2092
  children?: React.ReactNode;
2093
2093
  title?: string;
2094
+ dataId?: string;
2094
2095
  };
2095
2096
  type MixedNextProps = BaseProps<{
2096
2097
  type?: 'auto' | 'product' | 'collection' | 'custom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.1007",
3
+ "version": "2.0.0-staging.1009",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",