@gem-sdk/components 2.0.0-staging.798 → 2.0.0-staging.800

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 (40) hide show
  1. package/dist/cjs/countdown-timer/components/Countdown.js +1 -1
  2. package/dist/cjs/form/settings/submit-button/configs/settings.js +2 -3
  3. package/dist/cjs/grid/settings/Row.js +1 -1
  4. package/dist/cjs/grid/settings/configs/row/presets.js +1 -1
  5. package/dist/cjs/grid/settings/configs/row/settings.js +1 -1
  6. package/dist/cjs/grid/settings/configs/section/ui-v2.js +1 -1
  7. package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
  8. package/dist/cjs/marquee/settings/configs/settings-v2.js +2 -2
  9. package/dist/cjs/product/components/product-variants/hooks/useGpVariants.js +1 -1
  10. package/dist/cjs/product/settings/product-quantity/configs/settings.js +3 -3
  11. package/dist/cjs/product/settings/product-vendor/configs/settings.js +1 -1
  12. package/dist/cjs/product/settings/product-view-more/configs/settings.js +8 -1
  13. package/dist/cjs/sticky/hooks/useSticky.js +1 -1
  14. package/dist/cjs/sticky/settings/configs/settings-v2.js +1 -1
  15. package/dist/cjs/sticky/settings/configs/ui-v2.js +1 -1
  16. package/dist/cjs/stock-counter/settings/configs/settings-v2.js +2 -1
  17. package/dist/cjs/text/common/classes.js +1 -1
  18. package/dist/cjs/text/components/Text.js +1 -1
  19. package/dist/cjs/text/settings/configs/settings.js +1 -1
  20. package/dist/esm/countdown-timer/components/Countdown.js +1 -1
  21. package/dist/esm/form/settings/submit-button/configs/settings.js +2 -3
  22. package/dist/esm/grid/settings/Row.js +2 -2
  23. package/dist/esm/grid/settings/configs/row/presets.js +1 -1
  24. package/dist/esm/grid/settings/configs/row/settings.js +1 -1
  25. package/dist/esm/grid/settings/configs/section/ui-v2.js +1 -1
  26. package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
  27. package/dist/esm/marquee/settings/configs/settings-v2.js +2 -2
  28. package/dist/esm/product/components/product-variants/hooks/useGpVariants.js +1 -1
  29. package/dist/esm/product/settings/product-quantity/configs/settings.js +3 -3
  30. package/dist/esm/product/settings/product-vendor/configs/settings.js +1 -1
  31. package/dist/esm/product/settings/product-view-more/configs/settings.js +8 -1
  32. package/dist/esm/sticky/hooks/useSticky.js +1 -1
  33. package/dist/esm/sticky/settings/configs/settings-v2.js +1 -1
  34. package/dist/esm/sticky/settings/configs/ui-v2.js +1 -1
  35. package/dist/esm/stock-counter/settings/configs/settings-v2.js +2 -1
  36. package/dist/esm/text/common/classes.js +1 -1
  37. package/dist/esm/text/components/Text.js +1 -1
  38. package/dist/esm/text/settings/configs/settings.js +1 -1
  39. package/dist/types/index.d.ts +14 -4
  40. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),helpers=require("../common/helpers.js"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useCountDownTimer=require("../hooks/useCountDownTimer.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:r}=e,{labelTypo:a,numTypo:i,labelTypography:m,numTypography:n,enableLabelTextStyle:y}=t??{},{weekLabel:c,dayLabel:o,hourLabel:u,minuteLabel:x,secondLabel:d,enableWeek:j,enableDay:C,enableHour:g,enableMinute:p,enableSecond:h,redirectUrl:f}=s??{},T=core.useEditorMode(),{week:S,day:k,hour:q,minute:R,second:v,timeLeft:w,ref:I}=useCountDownTimer.default(s,l),N=!!f?.link&&"edit"!==T,D=system.createClass({...classes.getTextExpireClasses()});if(s?.autoHideWhenTimeout&&w<=0)return"edit"!==T?null:jsxRuntime.jsx("div",{className:D,children:jsxRuntime.jsx("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let F=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),b=system.createStyle({...styles.getWrapperStyle(t)}),W=system.createClass({...classes.getWrapperClasses(r?.cssClass)}),A=system.createClass({...classes.getContentClasses()}),B=system.createStyle({...styles.getContainStyle(t)}),E=system.createStyle({...styles.getDateStyle(t)}),M=e=>system.createClass({...classes.getDateClasses(e)}),_=system.createClass({...classes.getTextFrontClasses(t)}),H=system.createStyle({...styles.getTextFrontStyle(t)}),L=system.createStyle({...styles.getTextBackStyle(t)}),O=e=>system.createClass({...classes.getTextBackClasses(t,e)}),P=system.createClass({...classes.getLinkClasses()}),z=(e,s)=>{let t=helpers.formatTime(e);return jsxRuntime.jsxs("div",{style:E,className:M(s),children:[jsxRuntime.jsx(Text.default,{styles:{typography:n,typo:i},setting:{htmlTag:"div",text:t,excludeFlex:!0},className:_,style:H}),system.If(!!y,jsxRuntime.jsx(Text.default,{styles:{typography:m,typo:a},setting:{text:s,htmlTag:"p",excludeFlex:!0},style:L,className:O(s)}))]})};return jsxRuntime.jsx("div",{ref:I,...F,className:W,style:b,children:jsxRuntime.jsxs("div",{className:A,style:B,children:[system.If(N,jsxRuntime.jsx("a",{href:f?.link,target:f?.target,"aria-label":"Countdown link",className:P,children:" "})),system.If(j,z(S,c)),system.If(C,z(k,o)),system.If(g,z(q,u)),system.If(p,z(R,x)),system.If(h,z(v,d))]})})};exports.default=Countdown;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),helpers=require("../common/helpers.js"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useCountDownTimer=require("../hooks/useCountDownTimer.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:a}=e,{labelTypo:r,numTypo:i,labelTypography:m,numTypography:n,enableLabelTextStyle:y}=t??{},{weekLabel:c,dayLabel:o,hourLabel:u,minuteLabel:d,secondLabel:x,enableWeek:j,enableDay:C,enableHour:g,enableMinute:p,enableSecond:h,redirectUrl:f}=s??{},T=core.useEditorMode(),{week:S,day:k,hour:q,minute:R,second:v,timeLeft:w,ref:I}=useCountDownTimer.default(s,l),N=!!f?.link&&"edit"!==T,b=system.createClass({...classes.getTextExpireClasses()});if(s?.autoHideWhenTimeout&&w<=0)return"edit"!==T?null:jsxRuntime.jsx("div",{className:b,children:jsxRuntime.jsx("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let D=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),E=system.createStyle({...styles.getWrapperStyle(t)}),F=system.createClass({...classes.getWrapperClasses(a?.cssClass)}),W=system.createClass({...classes.getContentClasses()}),A=system.createStyle({...styles.getContainStyle(t)}),B=system.createStyle({...styles.getDateStyle(t)}),M=e=>system.createClass({...classes.getDateClasses(e)}),_=system.createClass({...classes.getTextFrontClasses(t)}),H=system.createStyle({...styles.getTextFrontStyle(t)}),L=system.createStyle({...styles.getTextBackStyle(t)}),O=e=>system.createClass({...classes.getTextBackClasses(t,e)}),P=system.createClass({...classes.getLinkClasses()}),z=(e,s)=>{let t=helpers.formatTime(e);return jsxRuntime.jsxs("div",{style:B,className:M(s),children:[jsxRuntime.jsx(Text.default,{styles:{typography:n,typo:i},setting:{htmlTag:"div",text:t,excludeFlex:!0},className:_,style:H,disableEdit:!0}),system.If(!!y,jsxRuntime.jsx(Text.default,{styles:{typography:m,typo:r},setting:{text:s,htmlTag:"p",excludeFlex:!0},style:L,className:O(s),disableEdit:!0}))]})};return jsxRuntime.jsx("div",{ref:I,...D,className:F,style:E,children:jsxRuntime.jsxs("div",{className:W,style:A,children:[system.If(N,jsxRuntime.jsx("a",{href:f?.link,target:f?.target,"aria-label":"Countdown link",className:P,children:" "})),system.If(j,z(S,c)),system.If(C,z(k,o)),system.If(g,z(q,u)),system.If(p,z(R,d)),system.If(h,z(v,x))]})})};exports.default=Countdown;
@@ -1,4 +1,3 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SubmitButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"layout",type:"button-layout",default:"default",options:[{id:"default",value:"default",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"rounded",value:"rounded",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"bordered",value:"bordered",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1},{id:"underlined",value:"underlined",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1}]}]},{id:"label",label:"Text",type:"input",default:"<p>Submit</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
2
- <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z" />
3
- </svg>
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SubmitButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"layout",type:"button-layout",default:"default",options:[{id:"default",value:"default",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"rounded",value:"rounded",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"bordered",value:"bordered",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1},{id:"underlined",value:"underlined",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1}]}]},{id:"label",label:"Text",type:"input",default:"<p>Submit</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg height="20" width="20" data-name="paper-plane-tilt-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418468415996264">
2
+ <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z" /></svg>
4
3
  `,placeholder:'E.g. <svg fill="currentColor"...'},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"left"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{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:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{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:"boxShadowBtn",type:"shadow-v2",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0},hover:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"borderBtn",type:"border",emptyOnClear:!0,default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{isCustom:!1,borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{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",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}},{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"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:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}}]}];exports.default=SubmitButtonSettings;
@@ -2,4 +2,4 @@
2
2
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 3.00391C1.83579 3.00391 1.5 3.33969 1.5 3.75391C1.5 4.16812 1.83579 4.50391 2.25 4.50391L21.7514 4.50391C22.1656 4.50391 22.5014 4.16812 22.5014 3.75391C22.5014 3.33969 22.1656 3.00391 21.7514 3.00391H2.25ZM2.25 19.4988C1.83579 19.4988 1.5 19.8346 1.5 20.2488C1.5 20.663 1.83579 20.9988 2.25 20.9988H9.67911C10.0933 20.9988 10.4291 20.663 10.4291 20.2488C10.4291 19.8346 10.0933 19.4988 9.67911 19.4988H2.25ZM1.5 9.25207C1.5 8.83786 1.83579 8.50207 2.25 8.50207L9.67911 8.50207C10.0933 8.50207 10.4291 8.83786 10.4291 9.25207C10.4291 9.66628 10.0933 10.0021 9.67911 10.0021L2.25 10.0021C1.83579 10.0021 1.5 9.66628 1.5 9.25207ZM2.25 14.0012C1.83579 14.0012 1.5 14.337 1.5 14.7512C1.5 15.1654 1.83579 15.5012 2.25 15.5012L9.67911 15.5012C10.0933 15.5012 10.4291 15.1654 10.4291 14.7512C10.4291 14.337 10.0933 14.0012 9.67911 14.0012L2.25 14.0012ZM13.5725 9.25207C13.5725 8.83786 13.9083 8.50207 14.3225 8.50207H21.7516C22.1658 8.50207 22.5016 8.83786 22.5016 9.25207C22.5016 9.66628 22.1658 10.0021 21.7516 10.0021H14.3225C13.9083 10.0021 13.5725 9.66628 13.5725 9.25207ZM14.3225 14.0012C13.9083 14.0012 13.5725 14.337 13.5725 14.7512C13.5725 15.1654 13.9083 15.5012 14.3225 15.5012H21.7516C22.1658 15.5012 22.5016 15.1654 22.5016 14.7512C22.5016 14.337 22.1658 14.0012 21.7516 14.0012H14.3225Z" fill="white"/>
4
4
  </svg>
5
- `,settings:settings.RowSettings,ui:uiV1.SettingUIV1,uiV2:uiV2.SettingUIV2,presets:presets.RowPreset,editorConfigs:{placeholder:{notAppendLeftRight:!0},slots:{children:!0},toolbar:{parent:!0}},rootOverride:{"spacing-setting":{desktop:{margin:{bottom:0}}}}};exports.default=config;
5
+ `,settings:settings.RowSettings,ui:uiV1.SettingUIV1,uiV2:uiV2.SettingUIV2,presets:presets.RowPreset,editorConfigs:{placeholder:{notAppendLeftRight:!0},slots:{children:!0},toolbar:{parent:!0}},rootOverride:{"spacing-setting":{desktop:{margin:{bottom:0}}},styles:{width:{desktop:"default"}}}};exports.default=config;
@@ -2,7 +2,7 @@
2
2
  <svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect width="96" height="48" rx="4" fill="#5E5E5E"/>
4
4
  </svg>
5
- `},components:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},advanced:{"spacing-setting":{desktop:{padding:{top:"var(--g-s-l)",bottom:"var(--g-s-l)",left:"var(--g-s-l)",right:"var(--g-s-l)"}}}},childrens:[{tag:"Col",childrens:[]}]}],flowTagComponents:{Marquee:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fit"}}},styles:{width:{desktop:"100%",tablet:"100%",mobile:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"},link:!0},tablet:{link:!0},mobile:{link:!0}}},childrens:[{tag:"Col",childrens:[]}]}]}},{id:"layout-2-col",name:{en:"Row"},icon:{desktop:`
5
+ `},components:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},advanced:{"spacing-setting":{desktop:{padding:{top:"var(--g-s-l)",bottom:"var(--g-s-l)",left:"var(--g-s-l)",right:"var(--g-s-l)",linked:!1}}}},childrens:[{tag:"Col",childrens:[]}]}],flowTagComponents:{Marquee:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fit"}}},styles:{width:{desktop:"100%",tablet:"100%",mobile:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"},link:!0},tablet:{link:!0},mobile:{link:!0}}},childrens:[{tag:"Col",childrens:[]}]}]}},{id:"layout-2-col",name:{en:"Row"},icon:{desktop:`
6
6
  <svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <rect width="46" height="48" rx="3" fill="#5E5E5E"/>
8
8
  <rect x="50" width="46" height="48" rx="3" fill="#5E5E5E"/>
@@ -1 +1 @@
1
- "use strict";const RowSettings=[{id:"setting",controls:[{id:"layout",type:"layout",devices:{desktop:{default:{cols:[12],display:"fill",gap:"8px"}}}},{id:"horizontalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align horizontal center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align right",iconName:"gp-align-right"},{label:"Distribute",value:"space-between",tooltip:"Distribute horizontal spacing",iconName:"gp-align-space-between"}],devices:{desktop:{default:"start"}}},{id:"verticalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-top"},{label:"Center",value:"center",tooltip:"Align vertical center",iconName:"gp-align-center-vertical"},{label:"End",value:"end",tooltip:"Align bottom",iconName:"gp-align-bottom"},{label:"Between",value:"space-between",tooltip:"Distribute vertical spacing",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"start"}}},{id:"inlineAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align end",iconName:"gp-align-right"}],default:"start"},{id:"blockAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top"},{label:"Center",value:"center",tooltip:"Align center"},{label:"End",value:"end",tooltip:"Align bottom"}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,fallbackValueRule:"init-value",devices:{desktop:{default:"default"}},displayOptions:[{label:"Default",value:"default",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"height",type:"option:value",devices:{desktop:{default:"auto"}},options:[{label:"Full",value:"100%",tooltip:"Stretch to fill <br> vertical space"},{label:"Fit",value:"auto",tooltip:"Adjust size <br> based on content"}]},{id:"verticalGutter",type:"input:slider",units:["px"],min:0,max:120,fallbackValue:0,ignoreMax:!0,devices:{desktop:{default:"16px"}}},{id:"verticalGutterMobile",type:"input:slider",units:["px"],min:0,max:120,ignoreMax:!0,devices:{desktop:{default:"0px"}}},{id:"columnGap",type:"input:slider",min:0,max:120,step:1,ignoreMax:!0,units:["%"],showDefaultUnit:!0,devices:{desktop:{default:"1%"}}},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"border",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}}},{id:"rounded",type:"corner-v2",devices:{desktop:{default:{normal:void 0}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"boxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{}}}}}]}];exports.RowSettings=RowSettings;
1
+ "use strict";const RowSettings=[{id:"setting",controls:[{id:"layout",type:"layout",devices:{desktop:{default:{cols:[12],display:"fill",gap:"8px"}}}},{id:"horizontalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align horizontal center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align right",iconName:"gp-align-right"},{label:"Distribute",value:"space-between",tooltip:"Distribute horizontal spacing",iconName:"gp-align-space-between"}],devices:{desktop:{default:"start"}}},{id:"verticalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-top"},{label:"Center",value:"center",tooltip:"Align vertical center",iconName:"gp-align-center-vertical"},{label:"End",value:"end",tooltip:"Align bottom",iconName:"gp-align-bottom"},{label:"Between",value:"space-between",tooltip:"Distribute vertical spacing",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"start"}}},{id:"inlineAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align end",iconName:"gp-align-right"}],default:"start"},{id:"blockAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top"},{label:"Center",value:"center",tooltip:"Align center"},{label:"End",value:"end",tooltip:"Align bottom"}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,fallbackValueRule:"init-value",devices:{desktop:{default:"100%"}},displayOptions:[{label:"Default",value:"default",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"height",type:"option:value",devices:{desktop:{default:"auto"}},options:[{label:"Full",value:"100%",tooltip:"Stretch to fill <br> vertical space"},{label:"Fit",value:"auto",tooltip:"Adjust size <br> based on content"}]},{id:"verticalGutter",type:"input:slider",units:["px"],min:0,max:120,fallbackValue:0,ignoreMax:!0,devices:{desktop:{default:"16px"}}},{id:"verticalGutterMobile",type:"input:slider",units:["px"],min:0,max:120,ignoreMax:!0,devices:{desktop:{default:"0px"}}},{id:"columnGap",type:"input:slider",min:0,max:120,step:1,ignoreMax:!0,units:["%"],showDefaultUnit:!0,devices:{desktop:{default:"1%"}}},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"border",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}}},{id:"rounded",type:"corner-v2",devices:{desktop:{default:{normal:void 0}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"boxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{}}}}}]}];exports.RowSettings=RowSettings;
@@ -1 +1 @@
1
- "use strict";const SettingUIV2=[{controls:[{setting:{id:"layout"},layout:"vertical"},{label:{en:"Column gap"},setting:{id:"columnGap"},conditionDisplay:'pageType == "POST_PURCHASE"',conditionEnable:"!!layout.cols && layout.cols.length > 1"}]},{label:{en:"Column spacing"},conditionDisplay:'pageType !== "POST_PURCHASE" && childrens > 1',controls:[{setting:{id:"verticalGutter"},label:{en:"Gap"},conditionDisplay:"layout.cols.length > 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutterMobile",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{setting:{id:"verticalGutterMobile"},label:{en:"Gap"},conditionDisplay:"layout.cols.length === 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutter",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",setting:{id:"width"},label:{en:"Width"},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}},tablet:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)",left:"var(--g-s-l)",right:"var(--g-s-l)",linked:!1}}}}},{setting:{id:"enablePagePadding"},label:{en:"Page padding"},help:{content:"Page padding controls the <br> space between the browser <br> edge and sections. Adjust it in <br> Global Style > Page Padding."}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},controlConfig:{id:"boxShadow",type:"shadow-v2"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Align"},conditionDisplay:"pageType != \"POST_PURCHASE\" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))",controls:[{id:"verticalAlign",label:{en:"Vertical"},setting:{id:"verticalAlign"},conditionDisplay:"!!layout.cols && layout.cols.length > 1"},{id:"horizontalAlign",label:{en:"Horizontal"},setting:{id:"horizontalAlign"},conditionDisplay:"layout.display !== 'fill'",options:{disableMessage:'Horizontal Align is available when layout is "Fit to content"'}}]},{label:{en:"Align"},conditionDisplay:"pageType == \"POST_PURCHASE\" && layout.display !== 'fill'",controls:[{label:{en:"Horizontal"},setting:{id:"inlineAlignment"}}]}];exports.SettingUIV2=SettingUIV2;
1
+ "use strict";const SettingUIV2=[{controls:[{setting:{id:"layout"},layout:"vertical"},{label:{en:"Column gap"},setting:{id:"columnGap"},conditionDisplay:'pageType == "POST_PURCHASE"',conditionEnable:"!!layout.cols && layout.cols.length > 1"}]},{label:{en:"Column spacing"},conditionDisplay:'pageType !== "POST_PURCHASE" && childrens > 1',controls:[{setting:{id:"verticalGutter"},label:{en:"Gap"},conditionDisplay:"layout.cols.length > 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutterMobile",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{setting:{id:"verticalGutterMobile"},label:{en:"Gap"},conditionDisplay:"layout.cols.length === 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutter",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",setting:{id:"width"},label:{en:"Width"},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}},tablet:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)",left:"var(--g-s-l)",right:"var(--g-s-l)",linked:!1}}}}},{setting:{id:"enablePagePadding"},label:{en:"Page padding"},help:{content:"Page padding controls the <br> space between the browser <br> edge and sections. Adjust it in <br> Global Style > Page Padding."}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},controlConfig:{id:"boxShadow",type:"shadow-v2"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Align"},conditionDisplay:"pageType != \"POST_PURCHASE\" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))",controls:[{id:"verticalAlign",label:{en:"Vertical"},setting:{id:"verticalAlign"},conditionDisplay:"!!layout.cols && layout.cols.length > 1"},{id:"horizontalAlign",label:{en:"Horizontal"},setting:{id:"horizontalAlign"},conditionDisplay:"layout.display !== 'fill'",options:{disableMessage:'Horizontal Align is available when layout is "Fit to content"'}}]},{label:{en:"Align"},conditionDisplay:"pageType == \"POST_PURCHASE\" && layout.display !== 'fill'",controls:[{label:{en:"Horizontal"},setting:{id:"inlineAlignment"}}]}];exports.SettingUIV2=SettingUIV2;
@@ -1 +1 @@
1
- "use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
1
+ "use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:'hoverEffect == true && hoverEffectScale == "100%"',source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"hoverEffectScale != '100%' && overlayColor.hover && overlayColor.hover !== \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
@@ -1,2 +1,2 @@
1
- "use strict";var childTemplate=require("./child-template.js");const MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"CUSTOM"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:childTemplate.ChildTemplate,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477504360">
2
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,80a48,48,0,1,0,48,48A48,48,0,0,0,128,80Zm0,60a12,12,0,1,1,12-12A12,12,0,0,1,128,140Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"line-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];exports.MarqueeSettingsV2=MarqueeSettingsV2;
1
+ "use strict";var childTemplate=require("./child-template.js");const MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"CUSTOM"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:childTemplate.ChildTemplate,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-outline-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477569896">
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"line-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];exports.MarqueeSettingsV2=MarqueeSettingsV2;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core"),React=require("react"),useVariantInteraction=require("./useVariantInteraction.js"),common=require("../common/common.js"),product=require("../../../helpers/product.js"),mappingVariantStyles=require("../utils/mappingVariantStyles.js");const VARIANT_PARAM_PATH="variant";let isMounted=!1;const useGpVariants=(e,t)=>{let{builderProps:a,styles:r,setting:i}=e,{optionType:n,hasPreSelected:o}=i??{},{redirectProductShopifyLink:s}=core.useProductShopifyEditLink(),c=core.useProduct(),l=core.useIsSyncProduct(),d=React.useRef(null),{dispatchInteractionChangeOptions:u,dispatchInteractionChangeOptionsInit:p}=useVariantInteraction.useVariantInteraction({element:d,uid:a?.uid}),A=core.useEditorMode(),{selectedOptions:R,setSelectedOption:f,forceSelectedOption:m}=core.useSelectedOption(),{setHasPreSelected:w,hasPreSelected:P}=core.useHasPreSelected(),[S,V]=React.useState("");React.useEffect(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);void 0===P&&w(o||!!t)},[o,P,w]),React.useEffect(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);t&&V(t)},[]);let h=()=>{let e=new URL(window.location.href),a=e.searchParams.get(VARIANT_PARAM_PATH);return a?t.find(e=>e?.id===a):null},I=e=>{let a=core.getSelectedVariant(t,e);return core.checkInStock(a)};React.useEffect(()=>{let e=h();if(e){let t=e?.selectedOptions.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{})??{},a=I(t);p(t,a),m(t,c?.id,!0)}else if(i?.hasPreSelected){let e=I(R);p(R,e)}},[]);let g=c?.options;core.useInitialSwatchesOptions(g);let T=core.useSwatchesOptions(g),[_,v]=React.useState(!1),M=product.checkDefaultVariant(c),E=React.useMemo(()=>"groupOption"===n,[n]),L=React.useCallback(e=>{let t=e.detail,a=c?.id;v(!0),l&&t&&a==t.productId&&f(t.optionId,t.optionValue,a,!0)},[l,c?.id,f]),N=React.useCallback(e=>{let t=e.detail,a=c?.id;v(!0),l&&t&&a==t.productId&&m(t.selectedOption,a,!0)},[l,c?.id,m]),y=e=>{let t=new URL(window.location.href);e?t.searchParams.set(VARIANT_PARAM_PATH,e):t.searchParams.delete(VARIANT_PARAM_PATH),history.replaceState(null,"",t.toString())};React.useEffect(()=>(window.addEventListener("set-selected-option",L),window.addEventListener("force-selected-option",N),()=>{window.removeEventListener("set-selected-option",L),window.removeEventListener("force-selected-option",N)}),[N,L]),common.useTransition(e=>{if(!isMounted){isMounted=!0;return}let a=JSON.stringify(e),r=JSON.stringify(R);if(window.interactionLoaded){let e=I(R);u(R,e)}if(e&&a!==r){let e=core.getSelectedVariant(t,R);y(e?.id||"")}},[R]);let k=React.useCallback(e=>{let t=mappingVariantStyles.mappingVariantStyles(i?.variantPresets,r),a=t?.find(t=>t.optionName===e);return a||t?.find(e=>"base"===e.optionName)},[i,r]);return{mode:A,options:T,variants:t,variantId:S,elementRef:d,variantGroup:E,isChangeVariant:_,selectedOptions:R,isDefaultVariant:M,getVariantConfiguration:k,redirectProductShopifyLink:s}};exports.useGpVariants=useGpVariants;
1
+ "use strict";var core=require("@gem-sdk/core"),React=require("react"),useVariantInteraction=require("./useVariantInteraction.js"),common=require("../common/common.js"),product=require("../../../helpers/product.js"),mappingVariantStyles=require("../utils/mappingVariantStyles.js");const VARIANT_PARAM_PATH="variant";let isMounted=!1;const useGpVariants=(e,t)=>{let{builderProps:a,styles:i,setting:r}=e,{optionType:n,hasPreSelected:o}=r??{},{redirectProductShopifyLink:s}=core.useProductShopifyEditLink(),c=core.useProduct(),l=core.useIsSyncProduct(),d=React.useRef(null),{dispatchInteractionChangeOptions:u,dispatchInteractionChangeOptionsInit:p}=useVariantInteraction.useVariantInteraction({element:d,uid:a?.uid}),A=core.useEditorMode(),{selectedOptions:R,setSelectedOption:f,forceSelectedOption:m}=core.useSelectedOption(),{setHasPreSelected:w,hasPreSelected:P}=core.useHasPreSelected(),[S,V]=React.useState("");React.useEffect(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);void 0===P&&w(o||!!t)},[o,P,w]),React.useEffect(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);t&&V(t)},[]);let h=()=>{let e=new URL(window.location.href),a=e.searchParams.get(VARIANT_PARAM_PATH);return a?t.find(e=>e?.id===a):null},I=e=>{let a=core.getSelectedVariant(t,e);return core.checkInStock(a)};React.useEffect(()=>{let e=h();if(e){let t=e?.selectedOptions.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{})??{},a=I(t);p(t,a),m(t,c?.id,!0)}else if(r?.hasPreSelected){let e=I(R);p(R,e)}},[]);let g=c?.options;core.useInitialSwatchesOptions(g);let T=core.useSwatchesOptions(g),[_,v]=React.useState(!1),M=product.checkDefaultVariant(c),E=React.useMemo(()=>"groupOption"===n,[n]),L=React.useCallback(e=>{let t=e.detail,a=c?.id;v(!0),l&&t&&a==t.productId&&f(t.optionId,t.optionValue,a,!0)},[l,c?.id,f]),N=React.useCallback(e=>{let t=e.detail,a=c?.id;v(!0),(l&&t&&a==t.productId||"edit"===A)&&m(t.selectedOption,a,!0)},[l,c?.id,m,A]),y=e=>{let t=new URL(window.location.href);e?t.searchParams.set(VARIANT_PARAM_PATH,e):t.searchParams.delete(VARIANT_PARAM_PATH),history.replaceState(null,"",t.toString())};React.useEffect(()=>(window.addEventListener("set-selected-option",L),window.addEventListener("force-selected-option",N),()=>{window.removeEventListener("set-selected-option",L),window.removeEventListener("force-selected-option",N)}),[N,L]),common.useTransition(e=>{if(!isMounted){isMounted=!0;return}let a=JSON.stringify(e),i=JSON.stringify(R);if(window.interactionLoaded){let e=I(R);u(R,e)}if(e&&a!==i){let e=core.getSelectedVariant(t,R);y(e?.id||"")}},[R]);let k=React.useCallback(e=>{let t=mappingVariantStyles.mappingVariantStyles(r?.variantPresets,i),a=t?.find(t=>t.optionName===e);return a||t?.find(e=>"base"===e.optionName)},[r,i]);return{mode:A,options:T,variants:t,variantId:S,elementRef:d,variantGroup:E,isChangeVariant:_,selectedOptions:R,isDefaultVariant:M,getVariantConfiguration:k,redirectProductShopifyLink:s}};exports.useGpVariants=useGpVariants;
@@ -1,3 +1,3 @@
1
- "use strict";const ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"qtyStyle",type:"option:value",label:"Style",options:[{label:"Default",value:"standard"},{label:"Simple",value:"minimalist"}],default:"standard"},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817587901825384">
2
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817584339812712">
3
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"></path></svg>`}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"inputBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",devices:{desktop:{default:{normal:void 0}}},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Text",type:"input:stepper",min:0,devices:{desktop:{default:{normal:0,hover:0}}},state:{hover:!0,normal:!0}}]}];exports.ProductQuantitySettings=ProductQuantitySettings;
1
+ "use strict";const ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"qtyStyle",type:"option:value",label:"Style",options:[{label:"Default",value:"standard"},{label:"Simple",value:"minimalist"}],default:"standard"},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="plus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817698760687976">
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="minus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817690725712232">
3
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"inputBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",devices:{desktop:{default:{normal:void 0}}},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Text",type:"input:stepper",min:0,devices:{desktop:{default:{normal:0,hover:0}}},state:{hover:!0,normal:!0}}]}];exports.ProductQuantitySettings=ProductQuantitySettings;
@@ -1 +1 @@
1
- "use strict";const ProductVendorSettings=[{id:"setting",controls:[{id:"label",label:"Custom label",type:"textarea",placeholder:"E.g: Brand"},{id:"url",label:"Open collection URL",type:"toggle",default:!1},{id:"openIn",type:"option:value",options:[{label:"Yes",value:"new-tab"},{label:"No",value:"current"}],default:"current"},{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"h1",label:"H1"},{value:"h2",label:"H2"},{value:"h3",label:"H3"},{value:"h4",label:"H4"},{value:"h5",label:"H5"},{value:"h6",label:"H6"}],default:"h2"}]},{id:"style",controls:[{id:"color",label:"Text Color",type:"color-picker-v2",default:{normal:"text-2"},compoDefaultValue:{normal:"#303030"},state:{normal:!0,hover:!0}},{id:"underlineLink",type:"toggle",label:"Underline link",default:{hover:!1,normal:!1},state:{hover:!0,normal:!1}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{transform:"none"}},ignoreReRender:!0,hiddenSetting:{},compoDefaultValue:{custom:{textShadow:{angle:145,distance:"2px",blur:"20px",color:"rgba(18, 18, 18, 0.2)",type:"custom",enable:!0}}}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}}]}];exports.ProductVendorSettings=ProductVendorSettings;
1
+ "use strict";const ProductVendorSettings=[{id:"setting",controls:[{id:"label",label:"Custom label",type:"textarea",placeholder:"E.g: Brand"},{id:"url",label:"Open collection URL",type:"toggle",default:!1},{id:"openIn",type:"option:value",options:[{label:"Yes",value:"new-tab"},{label:"No",value:"current"}],default:"current"},{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"h1",label:"H1"},{value:"h2",label:"H2"},{value:"h3",label:"H3"},{value:"h4",label:"H4"},{value:"h5",label:"H5"},{value:"h6",label:"H6"}],default:"h2"}]},{id:"style",controls:[{id:"color",label:"Text Color",type:"color-picker-v2",default:{normal:"text-2"},compoDefaultValue:{normal:"highlight"},state:{normal:!0,hover:!0}},{id:"underlineLink",type:"toggle",label:"Underline link",default:{hover:!0,normal:!1},state:{hover:!0,normal:!1}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{transform:"none"}},ignoreReRender:!0,hiddenSetting:{},compoDefaultValue:{custom:{textShadow:{angle:145,distance:"2px",blur:"20px",color:"rgba(18, 18, 18, 0.2)",type:"custom",enable:!0}}}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}}]}];exports.ProductVendorSettings=ProductVendorSettings;
@@ -1 +1,8 @@
1
- "use strict";const ProductViewMoreSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"<p>View more</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:'<svg style="width: 100%; height: 100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M10.1149 4.21421C9.91455 4.02414 9.58977 4.02414 9.38946 4.21421C9.18915 4.40429 9.18915 4.71246 9.38946 4.90254L12.1268 7.5L2.35236 7.5C2.07622 7.5 1.85236 7.72385 1.85236 8C1.85236 8.27614 2.07622 8.5 2.35236 8.5L12.1269 8.5L9.38946 11.0975C9.18915 11.2876 9.18915 11.5957 9.38946 11.7858C9.58977 11.9759 9.91454 11.9759 10.1149 11.7858L13.7419 8.34418C13.9422 8.15411 13.9422 7.84593 13.7419 7.65585L10.1149 4.21421Z" fill="currentColor"/></svg>',placeholder:'E.g. <svg fill="currentColor"...'},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"right"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"redirectNewTab",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtn",type:"border",label:"Border",emptyOnClear:!0,default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{isCustom:!1,borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{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:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}}}},{id:"textColor",type:"colorpicker",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!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:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{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:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{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",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}},{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"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:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]}]}];exports.ProductViewMoreSettings=ProductViewMoreSettings;
1
+ "use strict";const ProductViewMoreSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"<p>View more</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg height="20px" width="20px" data-name="arrow-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418454422028648">
2
+ <path
3
+ fill="currentColor"
4
+ strokelinecap="round"
5
+ strokelinejoin="round"
6
+ d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"
7
+ ></path>
8
+ </svg>`,placeholder:'E.g. <svg fill="currentColor"...'},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"right"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"redirectNewTab",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtn",type:"border",label:"Border",emptyOnClear:!0,default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{isCustom:!1,borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{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:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}}}},{id:"textColor",type:"colorpicker",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!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:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{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:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{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",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}},{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"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:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]}]}];exports.ProductViewMoreSettings=ProductViewMoreSettings;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useSticky=e=>{let{width:t,position:o}=e??{},s=core.useStickyStore(e=>e.isStickyVisible),a=core.makeStyleResponsive("w",t),l=core.usePageStore(e=>"interaction"===e.sidebarMode),i=core.useCurrentDevice(),b=(e,t)=>({[`--left${t}`]:"top"==e?"0":"50%",[`--t${t}`]:"top"==e?"unset":"translateX(-50%)"}),r=React.useMemo(()=>({...b(o?.desktop,""),...b(o?.tablet??o?.desktop,"-tablet"),...b(o?.mobile??o?.tablet,"-mobile")}),[o?.desktop,o?.mobile,o?.tablet]),p=React.useMemo(()=>{if(l&&o?.[i]==="top")return"40px"},[i,l,o]),c=React.useMemo(()=>({"--d":e?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":e?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":e?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,e?.display?.desktop,e?.display?.mobile,e?.display?.tablet]),d=React.useMemo(()=>({"--top":p??"auto","--top-tablet":p??"auto","--top-mobile":p??"auto",[`--${o?.desktop}`]:p??"0px",[`--${o?.tablet??o?.desktop}-tablet`]:p??"0px",[`--${o?.mobile??o?.desktop}-mobile`]:p??"0px"}),[p,o?.desktop,o?.mobile,o?.tablet]),u=e=>"top"==e?"sticky":"fixed",k=React.useMemo(()=>({"--pos":u(o?.desktop),"--pos-tablet":u(o?.tablet??o?.desktop),"--pos-mobile":u(o?.mobile??o?.tablet)}),[o?.desktop,o?.mobile,o?.tablet]);return{w:a,displayStyle:d,positionStyle:k,getCSSAlign:r,makeDisplaySettingStyles:c}};exports.default=useSticky;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useSticky=e=>{let{width:t,position:o}=e??{},s=core.useStickyStore(e=>e.isStickyVisible),a=core.makeStyleResponsive("w",t),l=core.usePageStore(e=>"interaction"===e.sidebarMode),i=core.useCurrentDevice(),p=(e,t)=>({[`--left${t}`]:"top"==e?"0":"50%",[`--t${t}`]:"top"==e?"unset":"translateX(-50%)"}),b=React.useMemo(()=>({...p(o?.desktop,""),...p(o?.tablet??o?.desktop,"-tablet"),...p(o?.mobile??o?.tablet??o?.desktop,"-mobile")}),[o?.desktop,o?.mobile,o?.tablet]),r=React.useMemo(()=>{if(l&&o?.[i]==="top")return"40px"},[i,l,o]),d=React.useMemo(()=>({"--d":e?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":e?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":e?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,e?.display?.desktop,e?.display?.mobile,e?.display?.tablet]),c=React.useMemo(()=>({"--top":r??"auto","--top-tablet":r??"auto","--top-mobile":r??"auto",[`--${o?.desktop}`]:r??"0px",[`--${o?.tablet??o?.desktop}-tablet`]:r??"0px",[`--${o?.mobile??o?.desktop}-mobile`]:r??"0px"}),[r,o?.desktop,o?.mobile,o?.tablet]),u=e=>"top"==e?"sticky":"fixed",k=React.useMemo(()=>({"--pos":u(o?.desktop),"--pos-tablet":u(o?.tablet??o?.desktop),"--pos-mobile":u(o?.mobile??o?.tablet??o?.desktop)}),[o?.desktop,o?.mobile,o?.tablet]);return{w:a,displayStyle:c,positionStyle:k,getCSSAlign:b,makeDisplaySettingStyles:d}};exports.default=useSticky;
@@ -1 +1 @@
1
- "use strict";const StickySettingsV2=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"1200px",showValue:!0}]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 76 48",itemPerRow:2,itemSpacing:"large",enableItemBackground:!0,enableItemOpacity:!0,options:[{label:"Bottom",value:"bottom",iconName:"gp-sticky-position-bottom"},{label:"Top",value:"top",iconName:"gp-sticky-position-top"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"select",devices:{desktop:{default:"always"}},options:[{label:"Always show",value:"always"},{label:"After first cart button",value:"after-first-cart-button"}]},{id:"isScrollToTop",type:"toggle",default:!1}]}];exports.StickySettingsV2=StickySettingsV2;
1
+ "use strict";const StickySettingsV2=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"1200px",showValue:!0}]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#dddddd",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 76 48",itemPerRow:2,itemSpacing:"large",enableItemBackground:!0,enableItemOpacity:!0,options:[{label:"Bottom",value:"bottom",iconName:"gp-sticky-position-bottom"},{label:"Top",value:"top",iconName:"gp-sticky-position-top"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"select",devices:{desktop:{default:"always"}},options:[{label:"Always show",value:"always"},{label:"After first cart button",value:"after-first-cart-button"}]},{id:"isScrollToTop",type:"toggle",default:!1}]}];exports.StickySettingsV2=StickySettingsV2;
@@ -1 +1 @@
1
- "use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"position"},layout:"vertical"}]},{label:{en:"Size"},controls:[{setting:{id:"width"},label:{en:"Width"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Display option"},controls:[{label:{en:"Condition"},setting:{id:"display"}}]}];exports.SettingUIV2=SettingUIV2;
1
+ "use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"position"},layout:"vertical"}]},{label:{en:"Size"},controls:[{setting:{id:"width"},label:{en:"Width"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Display option"},controls:[{label:{en:"Condition"},setting:{id:"display"}}]}];exports.SettingUIV2=SettingUIV2;
@@ -1 +1,2 @@
1
- "use strict";var helpers=require("../../common/helpers.js");const StockCounterSettingsV2=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Type",enableItemOpacity:!0,options:[{label:"Full",value:"full",type:"p-image-layout",iconName:"gp-stock-counter-full"},{label:"Text & progress bar",value:"text-and-progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-text-and-progress-bar"},{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"},{label:"Progress bar only",value:"progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-progress-bar"}],default:"full"},{id:"displayCondition",label:"Display Condition",type:"group",controls:[{id:"displayByDefault",label:"Display By Default",type:"select",options:[{label:"Always show",value:!0},{label:"Show if under",value:!1}],default:!0},{id:"scarcityThreshold",label:"Scarcity Threshold",type:"input:stepper",default:helpers.DEFAULT_SCARCITY_THRESHOLD,info:"Only show if inventory quantity less than or equal to the above number."}]},{id:"oosIcon",label:"",type:"icon",default:'<svg data-name="boxes" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M7.75193 0.0658784C7.90565 -0.0219595 8.09435 -0.0219595 8.24807 0.0658784L11.9981 2.20874C12.1539 2.29776 12.25 2.46343 12.25 2.64286V6.63841L15.7481 8.63731C15.9039 8.72633 16 8.892 16 9.07143V13.3571C16 13.5366 15.9039 13.7022 15.7481 13.7913L11.9981 15.9341C11.8444 16.022 11.6556 16.022 11.5019 15.9341L8 13.933L4.49807 15.9341C4.34435 16.022 4.15565 16.022 4.00193 15.9341L0.25193 13.7913C0.096143 13.7022 0 13.5366 0 13.3571V9.07143C0 8.892 0.096143 8.72633 0.251931 8.63731L3.75 6.63841V2.64286C3.75 2.46343 3.84614 2.29776 4.00193 2.20874L7.75193 0.0658784ZM4.25 7.50445L1.50778 9.07143L4.25 10.6384L6.99222 9.07143L4.25 7.50445ZM7.5 9.93302L4.75 11.5044V14.6384L7.5 13.067V9.93302ZM8.5 13.067L11.25 14.6384V11.5044L8.5 9.93302V13.067ZM9.00778 9.07143L11.75 10.6384L14.4922 9.07143L11.75 7.50445L9.00778 9.07143ZM11.25 6.63841V3.50445L8.5 5.07588V8.20984L11.25 6.63841ZM7.5 8.20984V5.07588L4.75 3.50445V6.63841L7.5 8.20984ZM5.25778 2.64286L8 4.20984L10.7422 2.64286L8 1.07588L5.25778 2.64286ZM15 9.93302L12.25 11.5044V14.6384L15 13.067V9.93302ZM3.75 14.6384V11.5044L1 9.93302V13.067L3.75 14.6384Z" fill="currentColor"/> </svg>'},{id:"hiddenCounterWhenOutOfStock",type:"select",options:[{value:!1,label:"Show message"},{value:!0,label:"Hide counter"}],default:!1},{id:"message",label:"Message",type:"group",controls:[{id:"template",label:"Template",type:"textarea",autoHeight:!0,showPlusBtn:!0,default:`Only ${helpers.DEFAULT_QUANTITY_TEMPLATE} left`,info:`Use ${helpers.DEFAULT_QUANTITY_TEMPLATE} to represent remaining number`,minHeight:56,suggestContents:[{message:"%number%",eg:" Only 2 left"}]},{id:"outOfStockMessage",label:"Out Of Stock Message",type:"input",default:"OUT OF STOCK"},{id:"continueSelling",label:"Continue Selling When Out Of Stock Message",type:"textarea",autoHeight:!0,default:"Restock soon! PREORDER NOW",info:"Turn out-of-stock productions into pre-orders"},{id:"unlimitedQuantityMessage",label:"Unlimited Quantity Message",type:"textarea",autoHeight:!0,default:"Hurry! LET BUY NOW"},{id:"translate",type:"input",default:"template,outOfStockMessage,continueSelling,unlimitedQuantityMessage"}]},{id:"icon",label:"Icon",type:"group",controls:[{id:"showIcon",label:"Show Icon",type:"toggle",default:!0},{id:"icon",label:"",type:"icon",default:'<svg data-name="Lightning" style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M176.64 11.488A16 16 0 0 1 192 0h128a16 16 0 0 1 15.168 21.056L278.208 192H400a16 16 0 0 1 12.64 25.824l-224 288a16 16 0 0 1 -27.936 -14.528L218.336 304H112a16 16 0 0 1 -15.36 -20.512l80 -272z" /></svg>'}]},{id:"progressBarPosition",type:"option:value",options:[{value:"top",label:"Top"},{value:"bottom",label:"Bottom"}],default:"bottom"},{id:"iconPosition",type:"option:value",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],default:"left"},{id:"iconSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"remainingPercentage",label:"Remaining Percentage (%)",type:"input:slider",default:helpers.DEFAULT_REMAINING_PERCENT,min:helpers.MIN_REMAINING_PERCENT,max:helpers.MAX_REMAINING_PERCENT,step:helpers.DEFAULT_RANGE_STEP,units:["%"],showDefaultUnit:!0,isNumber:!0,useOnlyUnitInit:!0}]},{id:"style",controls:[{id:"dimension",label:"Dimension",type:"group",controls:[{id:"fullWidth",label:"Full width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"alignment",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:"display",label:"Display",type:"group",controls:[{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColor",label:"Text Color",type:"color-picker-v2",default:"text-1"},{id:"color",label:"Color",type:"color-picker-v2",default:"line-3"},{id:"iconColor",label:"Color",type:"color-picker-v2",default:"text-2"},{id:"oosIconColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"},{id:"oosTextColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"}]},{id:"progressBar",label:"Progress Bar",type:"group",controls:[{id:"displayProgressBar",label:"Display",type:"toggle",default:!0},{id:"progressBarHeight",type:"input:stepper",min:5,max:20,devices:{desktop:{default:10}}},{id:"roundedBorder",label:"Rounded Border",type:"toggle",default:!0},{id:"effect",label:"Effect",type:"toggle",default:!0}]},{id:"borderRadius",type:"corner-v2",devices:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}},compoDefaultValue:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}}}]}];exports.StockCounterSettingsV2=StockCounterSettingsV2;
1
+ "use strict";var helpers=require("../../common/helpers.js");const StockCounterSettingsV2=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Type",enableItemOpacity:!0,options:[{label:"Full",value:"full",type:"p-image-layout",iconName:"gp-stock-counter-full"},{label:"Text & progress bar",value:"text-and-progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-text-and-progress-bar"},{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"},{label:"Progress bar only",value:"progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-progress-bar"}],default:"full"},{id:"displayCondition",label:"Display Condition",type:"group",controls:[{id:"displayByDefault",label:"Display By Default",type:"select",options:[{label:"Always show",value:!0},{label:"Show if under",value:!1}],default:!0},{id:"scarcityThreshold",label:"Scarcity Threshold",type:"input:stepper",default:helpers.DEFAULT_SCARCITY_THRESHOLD,info:"Only show if inventory quantity less than or equal to the above number."}]},{id:"oosIcon",label:"",type:"icon",default:'<svg data-name="boxes" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M7.75193 0.0658784C7.90565 -0.0219595 8.09435 -0.0219595 8.24807 0.0658784L11.9981 2.20874C12.1539 2.29776 12.25 2.46343 12.25 2.64286V6.63841L15.7481 8.63731C15.9039 8.72633 16 8.892 16 9.07143V13.3571C16 13.5366 15.9039 13.7022 15.7481 13.7913L11.9981 15.9341C11.8444 16.022 11.6556 16.022 11.5019 15.9341L8 13.933L4.49807 15.9341C4.34435 16.022 4.15565 16.022 4.00193 15.9341L0.25193 13.7913C0.096143 13.7022 0 13.5366 0 13.3571V9.07143C0 8.892 0.096143 8.72633 0.251931 8.63731L3.75 6.63841V2.64286C3.75 2.46343 3.84614 2.29776 4.00193 2.20874L7.75193 0.0658784ZM4.25 7.50445L1.50778 9.07143L4.25 10.6384L6.99222 9.07143L4.25 7.50445ZM7.5 9.93302L4.75 11.5044V14.6384L7.5 13.067V9.93302ZM8.5 13.067L11.25 14.6384V11.5044L8.5 9.93302V13.067ZM9.00778 9.07143L11.75 10.6384L14.4922 9.07143L11.75 7.50445L9.00778 9.07143ZM11.25 6.63841V3.50445L8.5 5.07588V8.20984L11.25 6.63841ZM7.5 8.20984V5.07588L4.75 3.50445V6.63841L7.5 8.20984ZM5.25778 2.64286L8 4.20984L10.7422 2.64286L8 1.07588L5.25778 2.64286ZM15 9.93302L12.25 11.5044V14.6384L15 13.067V9.93302ZM3.75 14.6384V11.5044L1 9.93302V13.067L3.75 14.6384Z" fill="currentColor"/> </svg>'},{id:"hiddenCounterWhenOutOfStock",type:"select",options:[{value:!1,label:"Show message"},{value:!0,label:"Hide counter"}],default:!1},{id:"message",label:"Message",type:"group",controls:[{id:"template",label:"Template",type:"textarea",autoHeight:!0,showPlusBtn:!0,default:`Only ${helpers.DEFAULT_QUANTITY_TEMPLATE} left`,info:`Use ${helpers.DEFAULT_QUANTITY_TEMPLATE} to represent remaining number`,minHeight:56,suggestContents:[{message:"%number%",eg:" Only 2 left"}]},{id:"outOfStockMessage",label:"Out Of Stock Message",type:"input",default:"OUT OF STOCK"},{id:"continueSelling",label:"Continue Selling When Out Of Stock Message",type:"textarea",autoHeight:!0,default:"Restock soon! PREORDER NOW",info:"Turn out-of-stock productions into pre-orders"},{id:"unlimitedQuantityMessage",label:"Unlimited Quantity Message",type:"textarea",autoHeight:!0,default:"Hurry! LET BUY NOW"},{id:"translate",type:"input",default:"template,outOfStockMessage,continueSelling,unlimitedQuantityMessage"}]},{id:"icon",label:"Icon",type:"group",controls:[{id:"showIcon",label:"Show Icon",type:"toggle",default:!0},{id:"icon",label:"",type:"icon",default:`<svg height="20px" width="20px" data-name="lightning-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817742720598376">
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"></path></svg>`}]},{id:"progressBarPosition",type:"option:value",options:[{value:"top",label:"Top"},{value:"bottom",label:"Bottom"}],default:"bottom"},{id:"iconPosition",type:"option:value",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],default:"left"},{id:"iconSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"remainingPercentage",label:"Remaining Percentage (%)",type:"input:slider",default:helpers.DEFAULT_REMAINING_PERCENT,min:helpers.MIN_REMAINING_PERCENT,max:helpers.MAX_REMAINING_PERCENT,step:helpers.DEFAULT_RANGE_STEP,units:["%"],showDefaultUnit:!0,isNumber:!0,useOnlyUnitInit:!0}]},{id:"style",controls:[{id:"dimension",label:"Dimension",type:"group",controls:[{id:"fullWidth",label:"Full width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"alignment",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:"display",label:"Display",type:"group",controls:[{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColor",label:"Text Color",type:"color-picker-v2",default:"text-1"},{id:"color",label:"Color",type:"color-picker-v2",default:"line-3"},{id:"iconColor",label:"Color",type:"color-picker-v2",default:"text-2"},{id:"oosIconColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"},{id:"oosTextColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"}]},{id:"progressBar",label:"Progress Bar",type:"group",controls:[{id:"displayProgressBar",label:"Display",type:"toggle",default:!0},{id:"progressBarHeight",type:"input:stepper",min:5,max:20,devices:{desktop:{default:10}}},{id:"roundedBorder",label:"Rounded Border",type:"toggle",default:!0},{id:"effect",label:"Effect",type:"toggle",default:!0}]},{id:"borderRadius",type:"corner-v2",devices:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}},compoDefaultValue:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}}}]}];exports.StockCounterSettingsV2=StockCounterSettingsV2;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e,advanced:s,builderProps:t})=>({...t?.uid&&{[t.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...s?.cssClass&&{[s.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:s}=e??{},t="";return s||(t+=" gp-flex"),composeClasses(t)},getTextClasses=({styles:e,setting:s,className:t,mode:o})=>{let{text:r,options:l}=s??{},p="";r||(p+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.underlineLink&&(p+=` ${e.underlineLink.hover?"hover:gp-underline":"hover:!gp-no-underline"} ${e.underlineLink.normal?" gp-underline":""}`+(e.underlineLink.hover?"":" hover:!gp-no-underline")),"edit"===o?(p+=" gp-text gp-cursor-pointer !gp-cursor-default gp-p-[2px]",l?.useState&&(p+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(p+=" gp-text-instant",l?.disablePointerEvent&&(p+=" gp-pointer-events-none"));let a=p.trim().split(" ").reduce((e,s)=>(e[s]=!0,e),{});return{...t&&{[t]:!0},...globalTypoClasses(e),...a}};function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const globalTypoClasses=e=>{let s=core.composeTypographyClassName(e?.typo);return{...s&&{[s]:!0},...e?.textColor&&{[core.getGlobalColorClass("text",e?.textColor)]:!0},...!e?.textColor&&{[core.getGlobalColorStateClass("text",e?.color)]:!0}}};exports.composeClasses=composeClasses,exports.getClasses=getClasses,exports.getContainerClasses=getContainerClasses,exports.getTextClasses=getTextClasses,exports.globalTypoClasses=globalTypoClasses;
1
+ "use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e,advanced:s,builderProps:t})=>({...t?.uid&&{[t.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...s?.cssClass&&{[s.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:s}=e??{},t="";return s||(t+=" gp-flex"),composeClasses(t)},getTextClasses=({styles:e,setting:s,className:t,mode:o,disableEdit:r})=>{let{text:l,options:p}=s??{},a="";l||r||(a+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.underlineLink&&(a+=` ${e.underlineLink.hover?"hover:gp-underline":"hover:!gp-no-underline"} ${e.underlineLink.normal?" gp-underline":""}`+(e.underlineLink.hover?"":" hover:!gp-no-underline")),"edit"===o?(a+=" gp-text gp-cursor-pointer !gp-cursor-default",r||(a+=" gp-p-[2px]"),p?.useState&&(a+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(a+=" gp-text-instant",p?.disablePointerEvent&&(a+=" gp-pointer-events-none"));let n=a.trim().split(" ").reduce((e,s)=>(e[s]=!0,e),{});return{...t&&{[t]:!0},...globalTypoClasses(e),...n}};function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const globalTypoClasses=e=>{let s=core.composeTypographyClassName(e?.typo);return{...s&&{[s]:!0},...e?.textColor&&{[core.getGlobalColorClass("text",e?.textColor)]:!0},...!e?.textColor&&{[core.getGlobalColorStateClass("text",e?.color)]:!0}}};exports.composeClasses=composeClasses,exports.getClasses=getClasses,exports.getContainerClasses=getContainerClasses,exports.getTextClasses=getTextClasses,exports.globalTypoClasses=globalTypoClasses;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const Text=React.forwardRef(({styles:e,builderAttrs:s,style:t,setting:r,advanced:a,builderProps:l,className:c,children:y,...m},n)=>{let i=core.useEditorMode(),{htmlTag:o="div",options:u}=r??{},d=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),x=system.createAttr({...attrs.getTextAttr(u)}),g=system.createStyleReact({...styles.getStyle(e,t)}),j=system.createStyleReact({...styles.getContainerStyle(e,r)}),p=system.createStyleReact({...styles.getTextStyle(e,r)}),R=system.createClass({...classes.getClasses({setting:r,advanced:a,builderProps:l})}),C=system.createClass({...classes.getContainerClasses({setting:r})}),q=system.createClass({...classes.getTextClasses({styles:e,setting:r,className:c,mode:i})}),S=helpers.getDisplayText({type:"React",styles:e,setting:r,builderProps:l}),T=system.createContent(S);return jsxRuntime.jsxs("div",{...d,...m,...s,style:g,className:R,children:[jsxRuntime.jsx("div",{className:C,style:{...j},children:jsxRuntime.jsx(o,{ref:n,...x,className:q,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...p},dangerouslySetInnerHTML:{__html:T}})}),y]})});exports.default=Text;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const Text=React.forwardRef(({styles:e,builderAttrs:s,style:t,setting:r,advanced:a,builderProps:l,className:c,children:y,disableEdit:m,...n},i)=>{let o=core.useEditorMode(),{htmlTag:u="div",options:d}=r??{},x=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),g=system.createAttr({...attrs.getTextAttr(d)}),j=system.createStyleReact({...styles.getStyle(e,t)}),p=system.createStyleReact({...styles.getContainerStyle(e,r)}),R=system.createStyleReact({...styles.getTextStyle(e,r)}),C=system.createClass({...classes.getClasses({setting:r,advanced:a,builderProps:l})}),q=system.createClass({...classes.getContainerClasses({setting:r})}),S=system.createClass({...classes.getTextClasses({styles:e,setting:r,className:c,mode:o,disableEdit:m})}),T=helpers.getDisplayText({type:"React",styles:e,setting:r,builderProps:l}),f=system.createContent(T);return jsxRuntime.jsxs("div",{...x,...n,...s,style:j,className:C,children:[jsxRuntime.jsx("div",{className:q,style:{...p},children:jsxRuntime.jsx(u,{ref:i,...g,className:S,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...R},dangerouslySetInnerHTML:{__html:f}})}),y]})});exports.default=Text;
@@ -1 +1 @@
1
- "use strict";var background=require("../../../validates/background.js");const TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:background.BackgroundSettingValidate,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-2",transform:"none",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{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:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];exports.TextSettings=TextSettings;
1
+ "use strict";var background=require("../../../validates/background.js");const TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:background.BackgroundSettingValidate,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-2",transform:"none",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{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:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];exports.TextSettings=TextSettings;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{formatTime as s}from"../common/helpers.js";import o from"../../text/components/Text.js";import{useEditorMode as r}from"@gem-sdk/core";import{createClass as l,createAttr as m,createStyle as i,If as n}from"@gem-sdk/system";import{getAttr as a}from"../common/attrs.js";import{getTextExpireClasses as d,getWrapperClasses as c,getContentClasses as p,getTextFrontClasses as u,getLinkClasses as h,getDateClasses as y,getTextBackClasses as f}from"../common/classes.js";import{getWrapperStyle as g,getContainStyle as x,getDateStyle as j,getTextFrontStyle as N,getTextBackStyle as k}from"../common/styles.js";import v from"../hooks/useCountDownTimer.js";let Countdown=C=>{let{setting:w,styles:T,builderProps:b,advanced:F}=C,{labelTypo:D,numTypo:H,labelTypography:W,numTypography:q,enableLabelTextStyle:z}=T??{},{weekLabel:A,dayLabel:B,hourLabel:E,minuteLabel:G,secondLabel:I,enableWeek:J,enableDay:K,enableHour:L,enableMinute:M,enableSecond:O,redirectUrl:P}=w??{},Q=r(),{week:R,day:S,hour:U,minute:V,second:X,timeLeft:Y,ref:Z}=v(w,b),$=!!P?.link&&"edit"!==Q,_=l({...d()});if(w?.autoHideWhenTimeout&&Y<=0)return"edit"!==Q?null:e("div",{className:_,children:e("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let ee=m({...a({uid:b?.uid||""})}),et=i({...g(T)}),es=l({...c(F?.cssClass)}),eo=l({...p()}),er=i({...x(T)}),el=i({...j(T)}),em=e=>l({...y(e)}),ei=l({...u(T)}),en=i({...N(T)}),ea=i({...k(T)}),ed=e=>l({...f(T,e)}),ec=l({...h()}),ep=(r,l)=>{let m=s(r);return t("div",{style:el,className:em(l),children:[e(o,{styles:{typography:q,typo:H},setting:{htmlTag:"div",text:m,excludeFlex:!0},className:ei,style:en}),n(!!z,e(o,{styles:{typography:W,typo:D},setting:{text:l,htmlTag:"p",excludeFlex:!0},style:ea,className:ed(l)}))]})};return e("div",{ref:Z,...ee,className:es,style:et,children:t("div",{className:eo,style:er,children:[n($,e("a",{href:P?.link,target:P?.target,"aria-label":"Countdown link",className:ec,children:" "})),n(J,ep(R,A)),n(K,ep(S,B)),n(L,ep(U,E)),n(M,ep(V,G)),n(O,ep(X,I))]})})};export{Countdown as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{formatTime as s}from"../common/helpers.js";import o from"../../text/components/Text.js";import{useEditorMode as i}from"@gem-sdk/core";import{createClass as l,createAttr as r,createStyle as m,If as n}from"@gem-sdk/system";import{getAttr as a}from"../common/attrs.js";import{getTextExpireClasses as d,getWrapperClasses as c,getContentClasses as p,getTextFrontClasses as u,getLinkClasses as h,getDateClasses as y,getTextBackClasses as f}from"../common/classes.js";import{getWrapperStyle as g,getContainStyle as x,getDateStyle as j,getTextFrontStyle as N,getTextBackStyle as k}from"../common/styles.js";import v from"../hooks/useCountDownTimer.js";let Countdown=C=>{let{setting:w,styles:T,builderProps:b,advanced:E}=C,{labelTypo:F,numTypo:D,labelTypography:H,numTypography:W,enableLabelTextStyle:q}=T??{},{weekLabel:z,dayLabel:A,hourLabel:B,minuteLabel:G,secondLabel:I,enableWeek:J,enableDay:K,enableHour:L,enableMinute:M,enableSecond:O,redirectUrl:P}=w??{},Q=i(),{week:R,day:S,hour:U,minute:V,second:X,timeLeft:Y,ref:Z}=v(w,b),$=!!P?.link&&"edit"!==Q,_=l({...d()});if(w?.autoHideWhenTimeout&&Y<=0)return"edit"!==Q?null:e("div",{className:_,children:e("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let ee=r({...a({uid:b?.uid||""})}),et=m({...g(T)}),es=l({...c(E?.cssClass)}),eo=l({...p()}),ei=m({...x(T)}),el=m({...j(T)}),er=e=>l({...y(e)}),em=l({...u(T)}),en=m({...N(T)}),ea=m({...k(T)}),ed=e=>l({...f(T,e)}),ec=l({...h()}),ep=(i,l)=>{let r=s(i);return t("div",{style:el,className:er(l),children:[e(o,{styles:{typography:W,typo:D},setting:{htmlTag:"div",text:r,excludeFlex:!0},className:em,style:en,disableEdit:!0}),n(!!q,e(o,{styles:{typography:H,typo:F},setting:{text:l,htmlTag:"p",excludeFlex:!0},style:ea,className:ed(l),disableEdit:!0}))]})};return e("div",{ref:Z,...ee,className:es,style:et,children:t("div",{className:eo,style:ei,children:[n($,e("a",{href:P?.link,target:P?.target,"aria-label":"Countdown link",className:ec,children:" "})),n(J,ep(R,z)),n(K,ep(S,A)),n(L,ep(U,B)),n(M,ep(V,G)),n(O,ep(X,I))]})})};export{Countdown as default};
@@ -1,4 +1,3 @@
1
- let SubmitButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"layout",type:"button-layout",default:"default",options:[{id:"default",value:"default",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"rounded",value:"rounded",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"bordered",value:"bordered",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1},{id:"underlined",value:"underlined",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1}]}]},{id:"label",label:"Text",type:"input",default:"<p>Submit</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
2
- <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z" />
3
- </svg>
1
+ let SubmitButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"layout",type:"button-layout",default:"default",options:[{id:"default",value:"default",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"rounded",value:"rounded",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>',icon:!0},{id:"bordered",value:"bordered",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1},{id:"underlined",value:"underlined",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',icon:!1}]}]},{id:"label",label:"Text",type:"input",default:"<p>Submit</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg height="20" width="20" data-name="paper-plane-tilt-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418468415996264">
2
+ <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z" /></svg>
4
3
  `,placeholder:'E.g. <svg fill="currentColor"...'},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"left"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{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:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{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:"boxShadowBtn",type:"shadow-v2",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0},hover:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"borderBtn",type:"border",emptyOnClear:!0,default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{isCustom:!1,borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{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",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}},{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"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:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}}]}];export{SubmitButtonSettings as default};
@@ -1,5 +1,5 @@
1
- import{SettingUIV2 as o}from"./configs/row/ui-v2.js";import{SettingUIV1 as i}from"./configs/row/ui-v1.js";import{RowSettings as t}from"./configs/row/settings.js";import{RowPreset as e}from"./configs/row/presets.js";let config={tag:"Row",label:"Row",icon:`
1
+ import{SettingUIV2 as o}from"./configs/row/ui-v2.js";import{SettingUIV1 as t}from"./configs/row/ui-v1.js";import{RowSettings as e}from"./configs/row/settings.js";import{RowPreset as i}from"./configs/row/presets.js";let config={tag:"Row",label:"Row",icon:`
2
2
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 3.00391C1.83579 3.00391 1.5 3.33969 1.5 3.75391C1.5 4.16812 1.83579 4.50391 2.25 4.50391L21.7514 4.50391C22.1656 4.50391 22.5014 4.16812 22.5014 3.75391C22.5014 3.33969 22.1656 3.00391 21.7514 3.00391H2.25ZM2.25 19.4988C1.83579 19.4988 1.5 19.8346 1.5 20.2488C1.5 20.663 1.83579 20.9988 2.25 20.9988H9.67911C10.0933 20.9988 10.4291 20.663 10.4291 20.2488C10.4291 19.8346 10.0933 19.4988 9.67911 19.4988H2.25ZM1.5 9.25207C1.5 8.83786 1.83579 8.50207 2.25 8.50207L9.67911 8.50207C10.0933 8.50207 10.4291 8.83786 10.4291 9.25207C10.4291 9.66628 10.0933 10.0021 9.67911 10.0021L2.25 10.0021C1.83579 10.0021 1.5 9.66628 1.5 9.25207ZM2.25 14.0012C1.83579 14.0012 1.5 14.337 1.5 14.7512C1.5 15.1654 1.83579 15.5012 2.25 15.5012L9.67911 15.5012C10.0933 15.5012 10.4291 15.1654 10.4291 14.7512C10.4291 14.337 10.0933 14.0012 9.67911 14.0012L2.25 14.0012ZM13.5725 9.25207C13.5725 8.83786 13.9083 8.50207 14.3225 8.50207H21.7516C22.1658 8.50207 22.5016 8.83786 22.5016 9.25207C22.5016 9.66628 22.1658 10.0021 21.7516 10.0021H14.3225C13.9083 10.0021 13.5725 9.66628 13.5725 9.25207ZM14.3225 14.0012C13.9083 14.0012 13.5725 14.337 13.5725 14.7512C13.5725 15.1654 13.9083 15.5012 14.3225 15.5012H21.7516C22.1658 15.5012 22.5016 15.1654 22.5016 14.7512C22.5016 14.337 22.1658 14.0012 21.7516 14.0012H14.3225Z" fill="white"/>
4
4
  </svg>
5
- `,settings:t,ui:i,uiV2:o,presets:e,editorConfigs:{placeholder:{notAppendLeftRight:!0},slots:{children:!0},toolbar:{parent:!0}},rootOverride:{"spacing-setting":{desktop:{margin:{bottom:0}}}}};export{config as default};
5
+ `,settings:e,ui:t,uiV2:o,presets:i,editorConfigs:{placeholder:{notAppendLeftRight:!0},slots:{children:!0},toolbar:{parent:!0}},rootOverride:{"spacing-setting":{desktop:{margin:{bottom:0}}},styles:{width:{desktop:"default"}}}};export{config as default};
@@ -2,7 +2,7 @@ let RowPreset=[{id:"layout-1-col",name:{en:"Row"},icon:{desktop:`
2
2
  <svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect width="96" height="48" rx="4" fill="#5E5E5E"/>
4
4
  </svg>
5
- `},components:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},advanced:{"spacing-setting":{desktop:{padding:{top:"var(--g-s-l)",bottom:"var(--g-s-l)",left:"var(--g-s-l)",right:"var(--g-s-l)"}}}},childrens:[{tag:"Col",childrens:[]}]}],flowTagComponents:{Marquee:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fit"}}},styles:{width:{desktop:"100%",tablet:"100%",mobile:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"},link:!0},tablet:{link:!0},mobile:{link:!0}}},childrens:[{tag:"Col",childrens:[]}]}]}},{id:"layout-2-col",name:{en:"Row"},icon:{desktop:`
5
+ `},components:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fill"}}},advanced:{"spacing-setting":{desktop:{padding:{top:"var(--g-s-l)",bottom:"var(--g-s-l)",left:"var(--g-s-l)",right:"var(--g-s-l)",linked:!1}}}},childrens:[{tag:"Col",childrens:[]}]}],flowTagComponents:{Marquee:[{tag:"Row",settings:{layout:{desktop:{cols:[12],display:"fit"}}},styles:{width:{desktop:"100%",tablet:"100%",mobile:"100%"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"},link:!0},tablet:{link:!0},mobile:{link:!0}}},childrens:[{tag:"Col",childrens:[]}]}]}},{id:"layout-2-col",name:{en:"Row"},icon:{desktop:`
6
6
  <svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <rect width="46" height="48" rx="3" fill="#5E5E5E"/>
8
8
  <rect x="50" width="46" height="48" rx="3" fill="#5E5E5E"/>
@@ -1 +1 @@
1
- let RowSettings=[{id:"setting",controls:[{id:"layout",type:"layout",devices:{desktop:{default:{cols:[12],display:"fill",gap:"8px"}}}},{id:"horizontalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align horizontal center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align right",iconName:"gp-align-right"},{label:"Distribute",value:"space-between",tooltip:"Distribute horizontal spacing",iconName:"gp-align-space-between"}],devices:{desktop:{default:"start"}}},{id:"verticalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-top"},{label:"Center",value:"center",tooltip:"Align vertical center",iconName:"gp-align-center-vertical"},{label:"End",value:"end",tooltip:"Align bottom",iconName:"gp-align-bottom"},{label:"Between",value:"space-between",tooltip:"Distribute vertical spacing",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"start"}}},{id:"inlineAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align end",iconName:"gp-align-right"}],default:"start"},{id:"blockAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top"},{label:"Center",value:"center",tooltip:"Align center"},{label:"End",value:"end",tooltip:"Align bottom"}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,fallbackValueRule:"init-value",devices:{desktop:{default:"default"}},displayOptions:[{label:"Default",value:"default",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"height",type:"option:value",devices:{desktop:{default:"auto"}},options:[{label:"Full",value:"100%",tooltip:"Stretch to fill <br> vertical space"},{label:"Fit",value:"auto",tooltip:"Adjust size <br> based on content"}]},{id:"verticalGutter",type:"input:slider",units:["px"],min:0,max:120,fallbackValue:0,ignoreMax:!0,devices:{desktop:{default:"16px"}}},{id:"verticalGutterMobile",type:"input:slider",units:["px"],min:0,max:120,ignoreMax:!0,devices:{desktop:{default:"0px"}}},{id:"columnGap",type:"input:slider",min:0,max:120,step:1,ignoreMax:!0,units:["%"],showDefaultUnit:!0,devices:{desktop:{default:"1%"}}},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"border",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}}},{id:"rounded",type:"corner-v2",devices:{desktop:{default:{normal:void 0}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"boxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{}}}}}]}];export{RowSettings};
1
+ let RowSettings=[{id:"setting",controls:[{id:"layout",type:"layout",devices:{desktop:{default:{cols:[12],display:"fill",gap:"8px"}}}},{id:"horizontalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align horizontal center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align right",iconName:"gp-align-right"},{label:"Distribute",value:"space-between",tooltip:"Distribute horizontal spacing",iconName:"gp-align-space-between"}],devices:{desktop:{default:"start"}}},{id:"verticalAlign",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-top"},{label:"Center",value:"center",tooltip:"Align vertical center",iconName:"gp-align-center-vertical"},{label:"End",value:"end",tooltip:"Align bottom",iconName:"gp-align-bottom"},{label:"Between",value:"space-between",tooltip:"Distribute vertical spacing",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"start"}}},{id:"inlineAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top",iconName:"gp-align-left"},{label:"Center",value:"center",tooltip:"Align center",iconName:"gp-align-center"},{label:"End",value:"end",tooltip:"Align end",iconName:"gp-align-right"}],default:"start"},{id:"blockAlignment",type:"option:value",options:[{label:"Start",value:"start",tooltip:"Align top"},{label:"Center",value:"center",tooltip:"Align center"},{label:"End",value:"end",tooltip:"Align bottom"}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,fallbackValueRule:"init-value",devices:{desktop:{default:"100%"}},displayOptions:[{label:"Default",value:"default",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"height",type:"option:value",devices:{desktop:{default:"auto"}},options:[{label:"Full",value:"100%",tooltip:"Stretch to fill <br> vertical space"},{label:"Fit",value:"auto",tooltip:"Adjust size <br> based on content"}]},{id:"verticalGutter",type:"input:slider",units:["px"],min:0,max:120,fallbackValue:0,ignoreMax:!0,devices:{desktop:{default:"16px"}}},{id:"verticalGutterMobile",type:"input:slider",units:["px"],min:0,max:120,ignoreMax:!0,devices:{desktop:{default:"0px"}}},{id:"columnGap",type:"input:slider",min:0,max:120,step:1,ignoreMax:!0,units:["%"],showDefaultUnit:!0,devices:{desktop:{default:"1%"}}},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"border",type:"border-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}}},{id:"rounded",type:"corner-v2",devices:{desktop:{default:{normal:void 0}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"padding",type:"padding-v2",devices:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}},compoDefaultValue:{desktop:{default:{padding:{type:"small",top:"4px",left:"4px",bottom:"4px",right:"4px"}}}}},{id:"boxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{}}}}}]}];export{RowSettings};
@@ -1 +1 @@
1
- let SettingUIV2=[{controls:[{setting:{id:"layout"},layout:"vertical"},{label:{en:"Column gap"},setting:{id:"columnGap"},conditionDisplay:'pageType == "POST_PURCHASE"',conditionEnable:"!!layout.cols && layout.cols.length > 1"}]},{label:{en:"Column spacing"},conditionDisplay:'pageType !== "POST_PURCHASE" && childrens > 1',controls:[{setting:{id:"verticalGutter"},label:{en:"Gap"},conditionDisplay:"layout.cols.length > 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutterMobile",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{setting:{id:"verticalGutterMobile"},label:{en:"Gap"},conditionDisplay:"layout.cols.length === 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutter",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",setting:{id:"width"},label:{en:"Width"},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}},tablet:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)",left:"var(--g-s-l)",right:"var(--g-s-l)",linked:!1}}}}},{setting:{id:"enablePagePadding"},label:{en:"Page padding"},help:{content:"Page padding controls the <br> space between the browser <br> edge and sections. Adjust it in <br> Global Style > Page Padding."}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},controlConfig:{id:"boxShadow",type:"shadow-v2"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Align"},conditionDisplay:"pageType != \"POST_PURCHASE\" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))",controls:[{id:"verticalAlign",label:{en:"Vertical"},setting:{id:"verticalAlign"},conditionDisplay:"!!layout.cols && layout.cols.length > 1"},{id:"horizontalAlign",label:{en:"Horizontal"},setting:{id:"horizontalAlign"},conditionDisplay:"layout.display !== 'fill'",options:{disableMessage:'Horizontal Align is available when layout is "Fit to content"'}}]},{label:{en:"Align"},conditionDisplay:"pageType == \"POST_PURCHASE\" && layout.display !== 'fill'",controls:[{label:{en:"Horizontal"},setting:{id:"inlineAlignment"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{controls:[{setting:{id:"layout"},layout:"vertical"},{label:{en:"Column gap"},setting:{id:"columnGap"},conditionDisplay:'pageType == "POST_PURCHASE"',conditionEnable:"!!layout.cols && layout.cols.length > 1"}]},{label:{en:"Column spacing"},conditionDisplay:'pageType !== "POST_PURCHASE" && childrens > 1',controls:[{setting:{id:"verticalGutter"},label:{en:"Gap"},conditionDisplay:"layout.cols.length > 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutterMobile",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{setting:{id:"verticalGutterMobile"},label:{en:"Gap"},conditionDisplay:"layout.cols.length === 1",controlChangeTrigger:{settings:[{condition:"activeScreenId !== 'desktop'",action:{controlId:"verticalGutter",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",setting:{id:"width"},label:{en:"Width"},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}},tablet:{default:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)",left:"var(--g-s-l)",right:"var(--g-s-l)",linked:!1}}}}},{setting:{id:"enablePagePadding"},label:{en:"Page padding"},help:{content:"Page padding controls the <br> space between the browser <br> edge and sections. Adjust it in <br> Global Style > Page Padding."}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},controlConfig:{id:"boxShadow",type:"shadow-v2"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Align"},conditionDisplay:"pageType != \"POST_PURCHASE\" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))",controls:[{id:"verticalAlign",label:{en:"Vertical"},setting:{id:"verticalAlign"},conditionDisplay:"!!layout.cols && layout.cols.length > 1"},{id:"horizontalAlign",label:{en:"Horizontal"},setting:{id:"horizontalAlign"},conditionDisplay:"layout.display !== 'fill'",options:{disableMessage:'Horizontal Align is available when layout is "Fit to content"'}}]},{label:{en:"Align"},conditionDisplay:"pageType == \"POST_PURCHASE\" && layout.display !== 'fill'",controls:[{label:{en:"Horizontal"},setting:{id:"inlineAlignment"}}]}];export{SettingUIV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:'hoverEffect == true && hoverEffectScale == "100%"',source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"hoverEffectScale != '100%' && overlayColor.hover && overlayColor.hover !== \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
@@ -1,2 +1,2 @@
1
- import{ChildTemplate as e}from"./child-template.js";let MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"CUSTOM"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:e,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477504360">
2
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,80a48,48,0,1,0,48,48A48,48,0,0,0,128,80Zm0,60a12,12,0,1,1,12-12A12,12,0,0,1,128,140Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"line-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];export{MarqueeSettingsV2};
1
+ import{ChildTemplate as e}from"./child-template.js";let MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"CUSTOM"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:e,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-outline-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477569896">
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:.6},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"line-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];export{MarqueeSettingsV2};
@@ -1 +1 @@
1
- import{useProductShopifyEditLink as e,useProduct as t,useIsSyncProduct as i,useEditorMode as o,useSelectedOption as n,useHasPreSelected as r,useInitialSwatchesOptions as a,useSwatchesOptions as d,getSelectedVariant as s,checkInStock as l}from"@gem-sdk/core";import{useRef as c,useState as m,useEffect as A,useMemo as p,useCallback as u}from"react";import{useVariantInteraction as f}from"./useVariantInteraction.js";import{useTransition as w}from"../common/common.js";import{checkDefaultVariant as P}from"../../../helpers/product.js";import{mappingVariantStyles as R}from"../utils/mappingVariantStyles.js";let VARIANT_PARAM_PATH="variant",isMounted=!1,useGpVariants=(h,T)=>{let{builderProps:_,styles:V,setting:v}=h,{optionType:I,hasPreSelected:N}=v??{},{redirectProductShopifyLink:g}=e(),L=t(),M=i(),S=c(null),{dispatchInteractionChangeOptions:H,dispatchInteractionChangeOptionsInit:O}=f({element:S,uid:_?.uid}),j=o(),{selectedOptions:y,setSelectedOption:E,forceSelectedOption:U}=n(),{setHasPreSelected:G,hasPreSelected:J}=r(),[b,k]=m("");A(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);void 0===J&&G(N||!!t)},[N,J,G]),A(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);t&&k(t)},[]);let x=()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);return t?T.find(e=>e?.id===t):null},q=e=>{let t=s(T,e);return l(t)};A(()=>{let e=x();if(e){let t=e?.selectedOptions.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{})??{},i=q(t);O(t,i),U(t,L?.id,!0)}else if(v?.hasPreSelected){let e=q(y);O(y,e)}},[]);let z=L?.options;a(z);let B=d(z),[C,D]=m(!1),F=P(L),K=p(()=>"groupOption"===I,[I]),Q=u(e=>{let t=e.detail,i=L?.id;D(!0),M&&t&&i==t.productId&&E(t.optionId,t.optionValue,i,!0)},[M,L?.id,E]),W=u(e=>{let t=e.detail,i=L?.id;D(!0),M&&t&&i==t.productId&&U(t.selectedOption,i,!0)},[M,L?.id,U]),X=e=>{let t=new URL(window.location.href);e?t.searchParams.set(VARIANT_PARAM_PATH,e):t.searchParams.delete(VARIANT_PARAM_PATH),history.replaceState(null,"",t.toString())};A(()=>(window.addEventListener("set-selected-option",Q),window.addEventListener("force-selected-option",W),()=>{window.removeEventListener("set-selected-option",Q),window.removeEventListener("force-selected-option",W)}),[W,Q]),w(e=>{if(!isMounted){isMounted=!0;return}let t=JSON.stringify(e),i=JSON.stringify(y);if(window.interactionLoaded){let e=q(y);H(y,e)}if(e&&t!==i){let e=s(T,y);X(e?.id||"")}},[y]);let Y=u(e=>{let t=R(v?.variantPresets,V),i=t?.find(t=>t.optionName===e);return i||t?.find(e=>"base"===e.optionName)},[v,V]);return{mode:j,options:B,variants:T,variantId:b,elementRef:S,variantGroup:K,isChangeVariant:C,selectedOptions:y,isDefaultVariant:F,getVariantConfiguration:Y,redirectProductShopifyLink:g}};export{useGpVariants};
1
+ import{useProductShopifyEditLink as e,useProduct as t,useIsSyncProduct as i,useEditorMode as o,useSelectedOption as n,useHasPreSelected as r,useInitialSwatchesOptions as a,useSwatchesOptions as d,getSelectedVariant as s,checkInStock as l}from"@gem-sdk/core";import{useRef as c,useState as m,useEffect as A,useMemo as p,useCallback as u}from"react";import{useVariantInteraction as f}from"./useVariantInteraction.js";import{useTransition as w}from"../common/common.js";import{checkDefaultVariant as P}from"../../../helpers/product.js";import{mappingVariantStyles as R}from"../utils/mappingVariantStyles.js";let VARIANT_PARAM_PATH="variant",isMounted=!1,useGpVariants=(h,T)=>{let{builderProps:_,styles:V,setting:v}=h,{optionType:I,hasPreSelected:N}=v??{},{redirectProductShopifyLink:g}=e(),L=t(),M=i(),S=c(null),{dispatchInteractionChangeOptions:H,dispatchInteractionChangeOptionsInit:O}=f({element:S,uid:_?.uid}),j=o(),{selectedOptions:y,setSelectedOption:E,forceSelectedOption:U}=n(),{setHasPreSelected:G,hasPreSelected:J}=r(),[b,k]=m("");A(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);void 0===J&&G(N||!!t)},[N,J,G]),A(()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);t&&k(t)},[]);let x=()=>{let e=new URL(window.location.href),t=e.searchParams.get(VARIANT_PARAM_PATH);return t?T.find(e=>e?.id===t):null},q=e=>{let t=s(T,e);return l(t)};A(()=>{let e=x();if(e){let t=e?.selectedOptions.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{})??{},i=q(t);O(t,i),U(t,L?.id,!0)}else if(v?.hasPreSelected){let e=q(y);O(y,e)}},[]);let z=L?.options;a(z);let B=d(z),[C,D]=m(!1),F=P(L),K=p(()=>"groupOption"===I,[I]),Q=u(e=>{let t=e.detail,i=L?.id;D(!0),M&&t&&i==t.productId&&E(t.optionId,t.optionValue,i,!0)},[M,L?.id,E]),W=u(e=>{let t=e.detail,i=L?.id;D(!0),(M&&t&&i==t.productId||"edit"===j)&&U(t.selectedOption,i,!0)},[M,L?.id,U,j]),X=e=>{let t=new URL(window.location.href);e?t.searchParams.set(VARIANT_PARAM_PATH,e):t.searchParams.delete(VARIANT_PARAM_PATH),history.replaceState(null,"",t.toString())};A(()=>(window.addEventListener("set-selected-option",Q),window.addEventListener("force-selected-option",W),()=>{window.removeEventListener("set-selected-option",Q),window.removeEventListener("force-selected-option",W)}),[W,Q]),w(e=>{if(!isMounted){isMounted=!0;return}let t=JSON.stringify(e),i=JSON.stringify(y);if(window.interactionLoaded){let e=q(y);H(y,e)}if(e&&t!==i){let e=s(T,y);X(e?.id||"")}},[y]);let Y=u(e=>{let t=R(v?.variantPresets,V),i=t?.find(t=>t.optionName===e);return i||t?.find(e=>"base"===e.optionName)},[v,V]);return{mode:j,options:B,variants:T,variantId:b,elementRef:S,variantGroup:K,isChangeVariant:C,selectedOptions:y,isDefaultVariant:F,getVariantConfiguration:Y,redirectProductShopifyLink:g}};export{useGpVariants};
@@ -1,3 +1,3 @@
1
- let ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"qtyStyle",type:"option:value",label:"Style",options:[{label:"Default",value:"standard"},{label:"Simple",value:"minimalist"}],default:"standard"},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817587901825384">
2
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817584339812712">
3
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"></path></svg>`}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"inputBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",devices:{desktop:{default:{normal:void 0}}},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Text",type:"input:stepper",min:0,devices:{desktop:{default:{normal:0,hover:0}}},state:{hover:!0,normal:!0}}]}];export{ProductQuantitySettings};
1
+ let ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"qtyStyle",type:"option:value",label:"Style",options:[{label:"Default",value:"standard"},{label:"Simple",value:"minimalist"}],default:"standard"},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="plus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817698760687976">
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="minus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817690725712232">
3
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"inputBoxShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",devices:{desktop:{default:{normal:void 0}}},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Text",type:"input:stepper",min:0,devices:{desktop:{default:{normal:0,hover:0}}},state:{hover:!0,normal:!0}}]}];export{ProductQuantitySettings};
@@ -1 +1 @@
1
- let ProductVendorSettings=[{id:"setting",controls:[{id:"label",label:"Custom label",type:"textarea",placeholder:"E.g: Brand"},{id:"url",label:"Open collection URL",type:"toggle",default:!1},{id:"openIn",type:"option:value",options:[{label:"Yes",value:"new-tab"},{label:"No",value:"current"}],default:"current"},{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"h1",label:"H1"},{value:"h2",label:"H2"},{value:"h3",label:"H3"},{value:"h4",label:"H4"},{value:"h5",label:"H5"},{value:"h6",label:"H6"}],default:"h2"}]},{id:"style",controls:[{id:"color",label:"Text Color",type:"color-picker-v2",default:{normal:"text-2"},compoDefaultValue:{normal:"#303030"},state:{normal:!0,hover:!0}},{id:"underlineLink",type:"toggle",label:"Underline link",default:{hover:!1,normal:!1},state:{hover:!0,normal:!1}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{transform:"none"}},ignoreReRender:!0,hiddenSetting:{},compoDefaultValue:{custom:{textShadow:{angle:145,distance:"2px",blur:"20px",color:"rgba(18, 18, 18, 0.2)",type:"custom",enable:!0}}}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}}]}];export{ProductVendorSettings};
1
+ let ProductVendorSettings=[{id:"setting",controls:[{id:"label",label:"Custom label",type:"textarea",placeholder:"E.g: Brand"},{id:"url",label:"Open collection URL",type:"toggle",default:!1},{id:"openIn",type:"option:value",options:[{label:"Yes",value:"new-tab"},{label:"No",value:"current"}],default:"current"},{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"h1",label:"H1"},{value:"h2",label:"H2"},{value:"h3",label:"H3"},{value:"h4",label:"H4"},{value:"h5",label:"H5"},{value:"h6",label:"H6"}],default:"h2"}]},{id:"style",controls:[{id:"color",label:"Text Color",type:"color-picker-v2",default:{normal:"text-2"},compoDefaultValue:{normal:"highlight"},state:{normal:!0,hover:!0}},{id:"underlineLink",type:"toggle",label:"Underline link",default:{hover:!0,normal:!1},state:{hover:!0,normal:!1}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{transform:"none"}},ignoreReRender:!0,hiddenSetting:{},compoDefaultValue:{custom:{textShadow:{angle:145,distance:"2px",blur:"20px",color:"rgba(18, 18, 18, 0.2)",type:"custom",enable:!0}}}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}}]}];export{ProductVendorSettings};
@@ -1 +1,8 @@
1
- let ProductViewMoreSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"<p>View more</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:'<svg style="width: 100%; height: 100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M10.1149 4.21421C9.91455 4.02414 9.58977 4.02414 9.38946 4.21421C9.18915 4.40429 9.18915 4.71246 9.38946 4.90254L12.1268 7.5L2.35236 7.5C2.07622 7.5 1.85236 7.72385 1.85236 8C1.85236 8.27614 2.07622 8.5 2.35236 8.5L12.1269 8.5L9.38946 11.0975C9.18915 11.2876 9.18915 11.5957 9.38946 11.7858C9.58977 11.9759 9.91454 11.9759 10.1149 11.7858L13.7419 8.34418C13.9422 8.15411 13.9422 7.84593 13.7419 7.65585L10.1149 4.21421Z" fill="currentColor"/></svg>',placeholder:'E.g. <svg fill="currentColor"...'},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"right"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"redirectNewTab",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtn",type:"border",label:"Border",emptyOnClear:!0,default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{isCustom:!1,borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{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:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}}}},{id:"textColor",type:"colorpicker",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!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:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{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:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{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",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}},{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"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:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]}]}];export{ProductViewMoreSettings};
1
+ let ProductViewMoreSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"<p>View more</p>"},{id:"translate",type:"input",default:"label"},{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`<svg height="20px" width="20px" data-name="arrow-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418454422028648">
2
+ <path
3
+ fill="currentColor"
4
+ strokelinecap="round"
5
+ strokelinejoin="round"
6
+ d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"
7
+ ></path>
8
+ </svg>`,placeholder:'E.g. <svg fill="currentColor"...'},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"right"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"redirectNewTab",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtn",type:"border",label:"Border",emptyOnClear:!0,default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{isCustom:!1,borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{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:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480}}}},{id:"textColor",type:"colorpicker",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!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:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{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:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{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",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}},{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"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:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]}]}];export{ProductViewMoreSettings};
@@ -1 +1 @@
1
- import{useStickyStore as t,makeStyleResponsive as e,usePageStore as o,useCurrentDevice as l}from"@gem-sdk/core";import{useMemo as a}from"react";let useSticky=b=>{let{width:i,position:p}=b??{},s=t(t=>t.isStickyVisible),d=e("w",i),r=o(t=>"interaction"===t.sidebarMode),k=l(),m=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),n=a(()=>({...m(p?.desktop,""),...m(p?.tablet??p?.desktop,"-tablet"),...m(p?.mobile??p?.tablet,"-mobile")}),[p?.desktop,p?.mobile,p?.tablet]),c=a(()=>{if(r&&p?.[k]==="top")return"40px"},[k,r,p]),f=a(()=>({"--d":b?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":b?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":b?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,b?.display?.desktop,b?.display?.mobile,b?.display?.tablet]),u=a(()=>({"--top":c??"auto","--top-tablet":c??"auto","--top-mobile":c??"auto",[`--${p?.desktop}`]:c??"0px",[`--${p?.tablet??p?.desktop}-tablet`]:c??"0px",[`--${p?.mobile??p?.desktop}-mobile`]:c??"0px"}),[c,p?.desktop,p?.mobile,p?.tablet]),y=t=>"top"==t?"sticky":"fixed",x=a(()=>({"--pos":y(p?.desktop),"--pos-tablet":y(p?.tablet??p?.desktop),"--pos-mobile":y(p?.mobile??p?.tablet)}),[p?.desktop,p?.mobile,p?.tablet]);return{w:d,displayStyle:u,positionStyle:x,getCSSAlign:n,makeDisplaySettingStyles:f}};export{useSticky as default};
1
+ import{useStickyStore as t,makeStyleResponsive as e,usePageStore as o,useCurrentDevice as l}from"@gem-sdk/core";import{useMemo as a}from"react";let useSticky=p=>{let{width:b,position:i}=p??{},s=t(t=>t.isStickyVisible),d=e("w",b),r=o(t=>"interaction"===t.sidebarMode),k=l(),m=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),n=a(()=>({...m(i?.desktop,""),...m(i?.tablet??i?.desktop,"-tablet"),...m(i?.mobile??i?.tablet??i?.desktop,"-mobile")}),[i?.desktop,i?.mobile,i?.tablet]),c=a(()=>{if(r&&i?.[k]==="top")return"40px"},[k,r,i]),f=a(()=>({"--d":p?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":p?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":p?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,p?.display?.desktop,p?.display?.mobile,p?.display?.tablet]),u=a(()=>({"--top":c??"auto","--top-tablet":c??"auto","--top-mobile":c??"auto",[`--${i?.desktop}`]:c??"0px",[`--${i?.tablet??i?.desktop}-tablet`]:c??"0px",[`--${i?.mobile??i?.desktop}-mobile`]:c??"0px"}),[c,i?.desktop,i?.mobile,i?.tablet]),y=t=>"top"==t?"sticky":"fixed",x=a(()=>({"--pos":y(i?.desktop),"--pos-tablet":y(i?.tablet??i?.desktop),"--pos-mobile":y(i?.mobile??i?.tablet??i?.desktop)}),[i?.desktop,i?.mobile,i?.tablet]);return{w:d,displayStyle:u,positionStyle:x,getCSSAlign:n,makeDisplaySettingStyles:f}};export{useSticky as default};
@@ -1 +1 @@
1
- let StickySettingsV2=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"1200px",showValue:!0}]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 76 48",itemPerRow:2,itemSpacing:"large",enableItemBackground:!0,enableItemOpacity:!0,options:[{label:"Bottom",value:"bottom",iconName:"gp-sticky-position-bottom"},{label:"Top",value:"top",iconName:"gp-sticky-position-top"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"select",devices:{desktop:{default:"always"}},options:[{label:"Always show",value:"always"},{label:"After first cart button",value:"after-first-cart-button"}]},{id:"isScrollToTop",type:"toggle",default:!1}]}];export{StickySettingsV2};
1
+ let StickySettingsV2=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"1200px",showValue:!0}]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#dddddd",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 76 48",itemPerRow:2,itemSpacing:"large",enableItemBackground:!0,enableItemOpacity:!0,options:[{label:"Bottom",value:"bottom",iconName:"gp-sticky-position-bottom"},{label:"Top",value:"top",iconName:"gp-sticky-position-top"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"select",devices:{desktop:{default:"always"}},options:[{label:"Always show",value:"always"},{label:"After first cart button",value:"after-first-cart-button"}]},{id:"isScrollToTop",type:"toggle",default:!1}]}];export{StickySettingsV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"position"},layout:"vertical"}]},{label:{en:"Size"},controls:[{setting:{id:"width"},label:{en:"Width"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Display option"},controls:[{label:{en:"Condition"},setting:{id:"display"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"position"},layout:"vertical"}]},{label:{en:"Size"},controls:[{setting:{id:"width"},label:{en:"Width"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Display option"},controls:[{label:{en:"Condition"},setting:{id:"display"}}]}];export{SettingUIV2};
@@ -1 +1,2 @@
1
- import{DEFAULT_SCARCITY_THRESHOLD as e,DEFAULT_QUANTITY_TEMPLATE as t,DEFAULT_REMAINING_PERCENT as l,MIN_REMAINING_PERCENT as o,MAX_REMAINING_PERCENT as a,DEFAULT_RANGE_STEP as i}from"../../common/helpers.js";let StockCounterSettingsV2=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Type",enableItemOpacity:!0,options:[{label:"Full",value:"full",type:"p-image-layout",iconName:"gp-stock-counter-full"},{label:"Text & progress bar",value:"text-and-progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-text-and-progress-bar"},{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"},{label:"Progress bar only",value:"progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-progress-bar"}],default:"full"},{id:"displayCondition",label:"Display Condition",type:"group",controls:[{id:"displayByDefault",label:"Display By Default",type:"select",options:[{label:"Always show",value:!0},{label:"Show if under",value:!1}],default:!0},{id:"scarcityThreshold",label:"Scarcity Threshold",type:"input:stepper",default:e,info:"Only show if inventory quantity less than or equal to the above number."}]},{id:"oosIcon",label:"",type:"icon",default:'<svg data-name="boxes" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M7.75193 0.0658784C7.90565 -0.0219595 8.09435 -0.0219595 8.24807 0.0658784L11.9981 2.20874C12.1539 2.29776 12.25 2.46343 12.25 2.64286V6.63841L15.7481 8.63731C15.9039 8.72633 16 8.892 16 9.07143V13.3571C16 13.5366 15.9039 13.7022 15.7481 13.7913L11.9981 15.9341C11.8444 16.022 11.6556 16.022 11.5019 15.9341L8 13.933L4.49807 15.9341C4.34435 16.022 4.15565 16.022 4.00193 15.9341L0.25193 13.7913C0.096143 13.7022 0 13.5366 0 13.3571V9.07143C0 8.892 0.096143 8.72633 0.251931 8.63731L3.75 6.63841V2.64286C3.75 2.46343 3.84614 2.29776 4.00193 2.20874L7.75193 0.0658784ZM4.25 7.50445L1.50778 9.07143L4.25 10.6384L6.99222 9.07143L4.25 7.50445ZM7.5 9.93302L4.75 11.5044V14.6384L7.5 13.067V9.93302ZM8.5 13.067L11.25 14.6384V11.5044L8.5 9.93302V13.067ZM9.00778 9.07143L11.75 10.6384L14.4922 9.07143L11.75 7.50445L9.00778 9.07143ZM11.25 6.63841V3.50445L8.5 5.07588V8.20984L11.25 6.63841ZM7.5 8.20984V5.07588L4.75 3.50445V6.63841L7.5 8.20984ZM5.25778 2.64286L8 4.20984L10.7422 2.64286L8 1.07588L5.25778 2.64286ZM15 9.93302L12.25 11.5044V14.6384L15 13.067V9.93302ZM3.75 14.6384V11.5044L1 9.93302V13.067L3.75 14.6384Z" fill="currentColor"/> </svg>'},{id:"hiddenCounterWhenOutOfStock",type:"select",options:[{value:!1,label:"Show message"},{value:!0,label:"Hide counter"}],default:!1},{id:"message",label:"Message",type:"group",controls:[{id:"template",label:"Template",type:"textarea",autoHeight:!0,showPlusBtn:!0,default:`Only ${t} left`,info:`Use ${t} to represent remaining number`,minHeight:56,suggestContents:[{message:"%number%",eg:" Only 2 left"}]},{id:"outOfStockMessage",label:"Out Of Stock Message",type:"input",default:"OUT OF STOCK"},{id:"continueSelling",label:"Continue Selling When Out Of Stock Message",type:"textarea",autoHeight:!0,default:"Restock soon! PREORDER NOW",info:"Turn out-of-stock productions into pre-orders"},{id:"unlimitedQuantityMessage",label:"Unlimited Quantity Message",type:"textarea",autoHeight:!0,default:"Hurry! LET BUY NOW"},{id:"translate",type:"input",default:"template,outOfStockMessage,continueSelling,unlimitedQuantityMessage"}]},{id:"icon",label:"Icon",type:"group",controls:[{id:"showIcon",label:"Show Icon",type:"toggle",default:!0},{id:"icon",label:"",type:"icon",default:'<svg data-name="Lightning" style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M176.64 11.488A16 16 0 0 1 192 0h128a16 16 0 0 1 15.168 21.056L278.208 192H400a16 16 0 0 1 12.64 25.824l-224 288a16 16 0 0 1 -27.936 -14.528L218.336 304H112a16 16 0 0 1 -15.36 -20.512l80 -272z" /></svg>'}]},{id:"progressBarPosition",type:"option:value",options:[{value:"top",label:"Top"},{value:"bottom",label:"Bottom"}],default:"bottom"},{id:"iconPosition",type:"option:value",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],default:"left"},{id:"iconSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"remainingPercentage",label:"Remaining Percentage (%)",type:"input:slider",default:l,min:o,max:a,step:i,units:["%"],showDefaultUnit:!0,isNumber:!0,useOnlyUnitInit:!0}]},{id:"style",controls:[{id:"dimension",label:"Dimension",type:"group",controls:[{id:"fullWidth",label:"Full width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"alignment",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:"display",label:"Display",type:"group",controls:[{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColor",label:"Text Color",type:"color-picker-v2",default:"text-1"},{id:"color",label:"Color",type:"color-picker-v2",default:"line-3"},{id:"iconColor",label:"Color",type:"color-picker-v2",default:"text-2"},{id:"oosIconColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"},{id:"oosTextColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"}]},{id:"progressBar",label:"Progress Bar",type:"group",controls:[{id:"displayProgressBar",label:"Display",type:"toggle",default:!0},{id:"progressBarHeight",type:"input:stepper",min:5,max:20,devices:{desktop:{default:10}}},{id:"roundedBorder",label:"Rounded Border",type:"toggle",default:!0},{id:"effect",label:"Effect",type:"toggle",default:!0}]},{id:"borderRadius",type:"corner-v2",devices:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}},compoDefaultValue:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}}}]}];export{StockCounterSettingsV2};
1
+ import{DEFAULT_SCARCITY_THRESHOLD as e,DEFAULT_QUANTITY_TEMPLATE as t,DEFAULT_REMAINING_PERCENT as l,MIN_REMAINING_PERCENT as o,MAX_REMAINING_PERCENT as a,DEFAULT_RANGE_STEP as i}from"../../common/helpers.js";let StockCounterSettingsV2=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Type",enableItemOpacity:!0,options:[{label:"Full",value:"full",type:"p-image-layout",iconName:"gp-stock-counter-full"},{label:"Text & progress bar",value:"text-and-progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-text-and-progress-bar"},{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"},{label:"Progress bar only",value:"progress-bar",type:"p-image-layout",iconName:"gp-stock-counter-progress-bar"}],default:"full"},{id:"displayCondition",label:"Display Condition",type:"group",controls:[{id:"displayByDefault",label:"Display By Default",type:"select",options:[{label:"Always show",value:!0},{label:"Show if under",value:!1}],default:!0},{id:"scarcityThreshold",label:"Scarcity Threshold",type:"input:stepper",default:e,info:"Only show if inventory quantity less than or equal to the above number."}]},{id:"oosIcon",label:"",type:"icon",default:'<svg data-name="boxes" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M7.75193 0.0658784C7.90565 -0.0219595 8.09435 -0.0219595 8.24807 0.0658784L11.9981 2.20874C12.1539 2.29776 12.25 2.46343 12.25 2.64286V6.63841L15.7481 8.63731C15.9039 8.72633 16 8.892 16 9.07143V13.3571C16 13.5366 15.9039 13.7022 15.7481 13.7913L11.9981 15.9341C11.8444 16.022 11.6556 16.022 11.5019 15.9341L8 13.933L4.49807 15.9341C4.34435 16.022 4.15565 16.022 4.00193 15.9341L0.25193 13.7913C0.096143 13.7022 0 13.5366 0 13.3571V9.07143C0 8.892 0.096143 8.72633 0.251931 8.63731L3.75 6.63841V2.64286C3.75 2.46343 3.84614 2.29776 4.00193 2.20874L7.75193 0.0658784ZM4.25 7.50445L1.50778 9.07143L4.25 10.6384L6.99222 9.07143L4.25 7.50445ZM7.5 9.93302L4.75 11.5044V14.6384L7.5 13.067V9.93302ZM8.5 13.067L11.25 14.6384V11.5044L8.5 9.93302V13.067ZM9.00778 9.07143L11.75 10.6384L14.4922 9.07143L11.75 7.50445L9.00778 9.07143ZM11.25 6.63841V3.50445L8.5 5.07588V8.20984L11.25 6.63841ZM7.5 8.20984V5.07588L4.75 3.50445V6.63841L7.5 8.20984ZM5.25778 2.64286L8 4.20984L10.7422 2.64286L8 1.07588L5.25778 2.64286ZM15 9.93302L12.25 11.5044V14.6384L15 13.067V9.93302ZM3.75 14.6384V11.5044L1 9.93302V13.067L3.75 14.6384Z" fill="currentColor"/> </svg>'},{id:"hiddenCounterWhenOutOfStock",type:"select",options:[{value:!1,label:"Show message"},{value:!0,label:"Hide counter"}],default:!1},{id:"message",label:"Message",type:"group",controls:[{id:"template",label:"Template",type:"textarea",autoHeight:!0,showPlusBtn:!0,default:`Only ${t} left`,info:`Use ${t} to represent remaining number`,minHeight:56,suggestContents:[{message:"%number%",eg:" Only 2 left"}]},{id:"outOfStockMessage",label:"Out Of Stock Message",type:"input",default:"OUT OF STOCK"},{id:"continueSelling",label:"Continue Selling When Out Of Stock Message",type:"textarea",autoHeight:!0,default:"Restock soon! PREORDER NOW",info:"Turn out-of-stock productions into pre-orders"},{id:"unlimitedQuantityMessage",label:"Unlimited Quantity Message",type:"textarea",autoHeight:!0,default:"Hurry! LET BUY NOW"},{id:"translate",type:"input",default:"template,outOfStockMessage,continueSelling,unlimitedQuantityMessage"}]},{id:"icon",label:"Icon",type:"group",controls:[{id:"showIcon",label:"Show Icon",type:"toggle",default:!0},{id:"icon",label:"",type:"icon",default:`<svg height="20px" width="20px" data-name="lightning-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817742720598376">
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"></path></svg>`}]},{id:"progressBarPosition",type:"option:value",options:[{value:"top",label:"Top"},{value:"bottom",label:"Bottom"}],default:"bottom"},{id:"iconPosition",type:"option:value",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],default:"left"},{id:"iconSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"remainingPercentage",label:"Remaining Percentage (%)",type:"input:slider",default:l,min:o,max:a,step:i,units:["%"],showDefaultUnit:!0,isNumber:!0,useOnlyUnitInit:!0}]},{id:"style",controls:[{id:"dimension",label:"Dimension",type:"group",controls:[{id:"fullWidth",label:"Full width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"alignment",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:"display",label:"Display",type:"group",controls:[{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColor",label:"Text Color",type:"color-picker-v2",default:"text-1"},{id:"color",label:"Color",type:"color-picker-v2",default:"line-3"},{id:"iconColor",label:"Color",type:"color-picker-v2",default:"text-2"},{id:"oosIconColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"},{id:"oosTextColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"}]},{id:"progressBar",label:"Progress Bar",type:"group",controls:[{id:"displayProgressBar",label:"Display",type:"toggle",default:!0},{id:"progressBarHeight",type:"input:stepper",min:5,max:20,devices:{desktop:{default:10}}},{id:"roundedBorder",label:"Rounded Border",type:"toggle",default:!0},{id:"effect",label:"Effect",type:"toggle",default:!0}]},{id:"borderRadius",type:"corner-v2",devices:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}},compoDefaultValue:{desktop:{default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}}}]}];export{StockCounterSettingsV2};
@@ -1 +1 @@
1
- import{composeTypographyClassName as e,getGlobalColorClass as t,getGlobalColorStateClass as s}from"@gem-sdk/core";let getClasses=({setting:e,advanced:t,builderProps:s})=>({...s?.uid&&{[s.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...t?.cssClass&&{[t.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:t}=e??{},s="";return t||(s+=" gp-flex"),composeClasses(s)},getTextClasses=({styles:e,setting:t,className:s,mode:r})=>{let{text:o,options:l}=t??{},p="";o||(p+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.underlineLink&&(p+=` ${e.underlineLink.hover?"hover:gp-underline":"hover:!gp-no-underline"} ${e.underlineLink.normal?" gp-underline":""}`+(e.underlineLink.hover?"":" hover:!gp-no-underline")),"edit"===r?(p+=" gp-text gp-cursor-pointer !gp-cursor-default gp-p-[2px]",l?.useState&&(p+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(p+=" gp-text-instant",l?.disablePointerEvent&&(p+=" gp-pointer-events-none"));let n=p.trim().split(" ").reduce((e,t)=>(e[t]=!0,e),{});return{...s&&{[s]:!0},...globalTypoClasses(e),...n}};function composeClasses(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}let globalTypoClasses=r=>{let o=e(r?.typo);return{...o&&{[o]:!0},...r?.textColor&&{[t("text",r?.textColor)]:!0},...!r?.textColor&&{[s("text",r?.color)]:!0}}};export{composeClasses,getClasses,getContainerClasses,getTextClasses,globalTypoClasses};
1
+ import{composeTypographyClassName as e,getGlobalColorClass as t,getGlobalColorStateClass as s}from"@gem-sdk/core";let getClasses=({setting:e,advanced:t,builderProps:s})=>({...s?.uid&&{[s.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...t?.cssClass&&{[t.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:t}=e??{},s="";return t||(s+=" gp-flex"),composeClasses(s)},getTextClasses=({styles:e,setting:t,className:s,mode:r,disableEdit:o})=>{let{text:l,options:p}=t??{},n="";l||o||(n+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.underlineLink&&(n+=` ${e.underlineLink.hover?"hover:gp-underline":"hover:!gp-no-underline"} ${e.underlineLink.normal?" gp-underline":""}`+(e.underlineLink.hover?"":" hover:!gp-no-underline")),"edit"===r?(n+=" gp-text gp-cursor-pointer !gp-cursor-default",o||(n+=" gp-p-[2px]"),p?.useState&&(n+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(n+=" gp-text-instant",p?.disablePointerEvent&&(n+=" gp-pointer-events-none"));let a=n.trim().split(" ").reduce((e,t)=>(e[t]=!0,e),{});return{...s&&{[s]:!0},...globalTypoClasses(e),...a}};function composeClasses(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}let globalTypoClasses=r=>{let o=e(r?.typo);return{...o&&{[o]:!0},...r?.textColor&&{[t("text",r?.textColor)]:!0},...!r?.textColor&&{[s("text",r?.color)]:!0}}};export{composeClasses,getClasses,getContainerClasses,getTextClasses,globalTypoClasses};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import{forwardRef as m}from"react";import{createAttr as o,createStyleReact as s,createClass as a,createContent as l}from"@gem-sdk/system";import{getAttr as i,getTextAttr as n}from"../common/attrs.js";import{getStyle as c,getContainerStyle as p,getTextStyle as f}from"../common/styles.js";import{getClasses as d,getContainerClasses as u,getTextClasses as y}from"../common/classes.js";import{getDisplayText as g}from"../common/helpers.js";let Text=m(({styles:m,builderAttrs:h,style:j,setting:v,advanced:x,builderProps:D,className:T,children:N,...k},S)=>{let _=r(),{htmlTag:H="div",options:I}=v??{},L=o({...i({uid:D?.uid||""})}),M=o({...n(I)}),R=s({...c(m,j)}),b=s({...p(m,v)}),q=s({...f(m,v)}),w=a({...d({setting:v,advanced:x,builderProps:D})}),z=a({...u({setting:v})}),A=a({...y({styles:m,setting:v,className:T,mode:_})}),B=g({type:"React",styles:m,setting:v,builderProps:D}),C=l(B);return e("div",{...L,...k,...h,style:R,className:w,children:[t("div",{className:z,style:{...b},children:t(H,{ref:S,...M,className:A,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...q},dangerouslySetInnerHTML:{__html:C}})}),N]})});export{Text as default};
2
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import{forwardRef as m}from"react";import{createAttr as o,createStyleReact as s,createClass as a,createContent as l}from"@gem-sdk/system";import{getAttr as i,getTextAttr as n}from"../common/attrs.js";import{getStyle as c,getContainerStyle as p,getTextStyle as f}from"../common/styles.js";import{getClasses as d,getContainerClasses as u,getTextClasses as y}from"../common/classes.js";import{getDisplayText as g}from"../common/helpers.js";let Text=m(({styles:m,builderAttrs:h,style:j,setting:v,advanced:x,builderProps:D,className:T,children:N,disableEdit:k,...S},_)=>{let H=r(),{htmlTag:I="div",options:L}=v??{},M=o({...i({uid:D?.uid||""})}),R=o({...n(L)}),b=s({...c(m,j)}),q=s({...p(m,v)}),w=s({...f(m,v)}),z=a({...d({setting:v,advanced:x,builderProps:D})}),A=a({...u({setting:v})}),B=a({...y({styles:m,setting:v,className:T,mode:H,disableEdit:k})}),C=g({type:"React",styles:m,setting:v,builderProps:D}),E=l(C);return e("div",{...M,...S,...h,style:b,className:z,children:[t("div",{className:A,style:{...q},children:t(I,{ref:_,...R,className:B,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...w},dangerouslySetInnerHTML:{__html:E}})}),N]})});export{Text as default};
@@ -1 +1 @@
1
- import{BackgroundSettingValidate as e}from"../../../validates/background.js";let TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:e,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-2",transform:"none",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{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:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];export{TextSettings};
1
+ import{BackgroundSettingValidate as e}from"../../../validates/background.js";let TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:e,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-2",transform:"none",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{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:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];export{TextSettings};
@@ -134,7 +134,9 @@ type TextProps = BasePropsWrap<{
134
134
  isForceValue?: boolean;
135
135
  lineThrough?: boolean;
136
136
  opacityPrice?: number;
137
- }> & Omit<React.ComponentPropsWithoutRef<'p'>, ''>;
137
+ }> & Omit<React.ComponentPropsWithoutRef<'p'>, ''> & {
138
+ disableEdit?: boolean;
139
+ };
138
140
 
139
141
  declare const Text$2: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<{
140
142
  text?: string | number | undefined;
@@ -189,7 +191,9 @@ declare const Text$2: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<{
189
191
  }, Record<string, any>> & {
190
192
  builderAttrs?: Record<string, any> | undefined;
191
193
  style?: React.CSSProperties | undefined;
192
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & React.RefAttributes<HTMLElement>>;
194
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
195
+ disableEdit?: boolean | undefined;
196
+ } & React.RefAttributes<HTMLElement>>;
193
197
 
194
198
  declare const textSetting: {
195
199
  Text: _gem_sdk_core.ComponentSetting<TextProps>;
@@ -5730,7 +5734,9 @@ declare const _default$3: {
5730
5734
  }, Record<string, any>> & {
5731
5735
  builderAttrs?: Record<string, any> | undefined;
5732
5736
  style?: React.CSSProperties | undefined;
5733
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & React.RefAttributes<HTMLElement>>;
5737
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
5738
+ disableEdit?: boolean | undefined;
5739
+ } & React.RefAttributes<HTMLElement>>;
5734
5740
  Tabs: React.ComponentType<TabsProps>;
5735
5741
  TabItem: React.ComponentType<TabItemProps>;
5736
5742
  Select: React.ComponentType<SelectProps>;
@@ -6248,6 +6254,8 @@ declare const Text: ({ id, styles, builderAttrs, style, setting, advanced, build
6248
6254
  builderAttrs?: Record<string, any> | undefined;
6249
6255
  style?: React.CSSProperties | undefined;
6250
6256
  } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
6257
+ disableEdit?: boolean | undefined;
6258
+ } & {
6251
6259
  isText?: boolean | undefined;
6252
6260
  advanced?: any;
6253
6261
  pageContext?: PageContext | undefined;
@@ -7340,7 +7348,9 @@ declare const _default$2: {
7340
7348
  }, Record<string, any>> & {
7341
7349
  builderAttrs?: Record<string, any> | undefined;
7342
7350
  style?: React.CSSProperties | undefined;
7343
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & React.RefAttributes<HTMLElement>>;
7351
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
7352
+ disableEdit?: boolean | undefined;
7353
+ } & React.RefAttributes<HTMLElement>>;
7344
7354
  Textarea: React.FC<TextareaProps>;
7345
7355
  Video: React.FC<VideoProps>;
7346
7356
  PushOwl: React.FC<ButtonProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.798",
3
+ "version": "2.0.0-staging.800",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",