@gem-sdk/components 2.0.0-staging.1038 → 2.0.0-staging.1039
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/coupon/common/styles.js +2 -2
- package/dist/cjs/form/settings/contact/configs/settings.js +1 -1
- package/dist/cjs/form/settings/form-email/configs/settings.js +1 -1
- package/dist/cjs/form/settings/form-email/configs/ui-v2.js +1 -1
- package/dist/cjs/icon-list/settings/configs/items.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +6 -6
- package/dist/cjs/product/components/product-description/common/classes.js +1 -1
- package/dist/cjs/product/settings/product-description/configs/ui-v2.js +1 -1
- package/dist/esm/coupon/common/styles.js +1 -1
- package/dist/esm/form/settings/contact/configs/settings.js +1 -1
- package/dist/esm/form/settings/form-email/configs/settings.js +1 -1
- package/dist/esm/form/settings/form-email/configs/ui-v2.js +1 -1
- package/dist/esm/icon-list/settings/configs/items.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +6 -6
- package/dist/esm/product/components/product-description/common/classes.js +1 -1
- package/dist/esm/product/settings/product-description/configs/ui-v2.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,{...t,enableTextStyle:!0}},getButtonStyle=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getInnerBorderCornerCss=e=>{let{uid:t,styles:r}=e;if(!t||!r)return"";let{borderBtnV2:o,roundedBtnV2:n,boxShadowBtn:a}=r,s=e=>e?core.getStyleShadow({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",i=a?.active?.enable!==void 0?s(a?.active??{}):"",
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,delete t?.boxShadowBtn?.active,{...t,enableTextStyle:!0}},getButtonStyle=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getInnerBorderCornerCss=e=>{let{uid:t,styles:r}=e;if(!t||!r)return"";let{borderBtnV2:o,roundedBtnV2:n,boxShadowBtn:a}=r,s=e=>e?core.getStyleShadow({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",i=a?.active?.enable!==void 0?s(a?.active??{}):"",d={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},c=e=>{let r=d[e],a=!!r,s=`
|
|
2
2
|
.gp-coupon[data-active="true"] .${t}::before {
|
|
3
3
|
${core.composeBorderCss(o?.active,{important:!0})};
|
|
4
4
|
${core.composeCornerCss(n?.active,!0)};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
`.trim();return a?`${r} {
|
|
11
11
|
${s}
|
|
12
|
-
}`:s};return
|
|
12
|
+
}`:s};return c("desktop")},getInnerActiveStyles=e=>{let t=e?.backgroundColorV2?.active,r=e?.textColor?.active;if(!t&&!r)return"";let o=`.gp-coupon[data-active="true"] button {
|
|
13
13
|
`;return t&&(o+=` background-color: ${t} !important;
|
|
14
14
|
`),r&&(o+=` color: ${r} !important;
|
|
15
15
|
`),o+="}"};exports.getButtonStyle=getButtonStyle,exports.getButtonStyles=getButtonStyles,exports.getInnerActiveStyles=getInnerActiveStyles,exports.getInnerBorderCornerCss=getInnerBorderCornerCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ContactSettings=[{id:"setting",controls:[{id:"callbackURL",type:"pick-link",label:"Pick Link",customLabel:{en:"Action"},default:{type:"stay-on-page",link:"",target:"_self"}},{id:"successMessage",type:"textarea",label:"Success Message",default:"Thanks for contacting us. We'll get back to you as soon as possible.",autoHeight:!0,minHeight:58,compoDefaultValue:"Thanks for contacting us. We'll get back to you as soon as possible."},{id:"successColor",type:"color-picker-v2",label:"Color",default:"#00A042",compoDefaultValue:"#00A042"},{id:"errorMessage",type:"textarea",label:"Error Message",default:"Can’t send email. Please try again later.",autoHeight:!0,minHeight:58,compoDefaultValue:"Can’t send email. Please try again later."},{id:"errorColor",type:"color-picker-v2",label:"Color",default:"#F44336",compoDefaultValue:"#F44336"},{id:"translate",type:"input",default:"successMessage,errorMessage"},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"transparent"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#E2E2E2"}}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"480px"}}},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"afterSubmitActionToggle",type:"toggle",label:"Action after submit",devices:{desktop:{default:!1}}},{id:"afterSubmitAction",type:"select",options:[{label:"Stay on page",value:"stay-on-page"},{label:"Open URL",value:"open-url"}],default:"stay-on-page"}]},{id:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"1200px",height:"Auto"}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ContactSettings=[{id:"setting",controls:[{id:"callbackURL",type:"pick-link",label:"Pick Link",customLabel:{en:"Action"},default:{type:"stay-on-page",link:"",target:"_self"}},{id:"successMessage",type:"textarea",label:"Success Message",default:"Thanks for contacting us. We'll get back to you as soon as possible.",autoHeight:!0,minHeight:58,compoDefaultValue:"Thanks for contacting us. We'll get back to you as soon as possible."},{id:"successColor",type:"color-picker-v2",label:"Color",default:"#00A042",compoDefaultValue:"#00A042"},{id:"errorMessage",type:"textarea",label:"Error Message",default:"Can’t send email. Please try again later.",autoHeight:!0,minHeight:58,compoDefaultValue:"Can’t send email. Please try again later."},{id:"errorColor",type:"color-picker-v2",label:"Color",default:"#F44336",compoDefaultValue:"#F44336"},{id:"translate",type:"input",default:"successMessage,errorMessage"},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"transparent"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#E2E2E2"}}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"480px"}}},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"afterSubmitActionToggle",type:"toggle",label:"Action after submit",devices:{desktop:{default:!1}}},{id:"afterSubmitAction",type:"select",options:[{label:"Stay on page",value:"stay-on-page"},{label:"Open URL",value:"open-url"}],default:"stay-on-page"}]},{id:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"1200px",height:"Auto"}}},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.default=ContactSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"input",label:"Placeholder",default:"Enter your email address",placeholder:"Enter your text"},{id:"placeholderColor",type:"color-picker-v2",label:"Color",default:"#A3A3A3"},{id:"translate",type:"input",default:"placeholder"},{id:"required",type:"toggle",label:"Placeholder",default:!0},{id:"hideOnClient",type:"toggle",label:"Hide on client",default:!1},{id:"defaultEmail",type:"input",label:"Default value",default:"default@gempages.help"},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{color:!0,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF"}}}},{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:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},settingConfig:{width:{},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border-v2",label:"Border",default:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#7D7D7D",isCustom:!0}},{id:"backgroundColorV2Hover",type:"color-picker-v2",enableGradient:!0},{id:"textColorHover",type:"color-picker-v2",label:"Text Color",state:{hover:!0}},{id:"borderEmailHover",type:"border",emptyOnClear:!0,state:{hover:!0}},{id:"roundedEmailHover",type:"radius-preset",default:{hover:{radiusType:"small"}},state:{hover:!0}},{id:"boxShadowEmailHover",type:"shadow-v2",label:"Button Shadow",hideOnState:{hover:!0},state:{hover:!0}},{id:"backgroundColorV2Active",type:"color-picker-v2",enableGradient:!0},{id:"textColorActive",type:"color-picker-v2",label:"Text Color",state:{active:!0}},{id:"borderEmailActive",type:"border",emptyOnClear:!0,state:{active:!0}},{id:"roundedEmailActive",type:"radius-preset",default:{active:{radiusType:"small"}},state:{active:!0}},{id:"boxShadowEmailActive",type:"shadow-v2",label:"Button Shadow",hideOnState:{active:!0},state:{active:!0}}]}];exports.default=FormEmailSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Placeholder"},iconName:"polaris-text-block",getValueFromSettingID:"placeholder",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"placeholder"}}]},{layout:"vertical",setting:{id:"typo"}}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Default",value:"1200px",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Hide on client"},setting:{id:"hideOnClient"}},{label:{en:"Default value"},setting:{id:"defaultEmail"},conditionDisplay:"hideOnClient === true"}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},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:"Text style"},controls:[{type:"combo",label:{en:"Placeholder"},iconName:"polaris-text-block",getValueFromSettingID:"placeholder",isHideClear:!0,controls:[{layout:"vertical",label:{en:"Content"},setting:{id:"placeholder"}}]},{layout:"vertical",setting:{id:"typo"}}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Default",value:"1200px",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Hide on client"},setting:{id:"hideOnClient"}},{label:{en:"Default value"},setting:{id:"defaultEmail"},conditionDisplay:"hideOnClient === true"}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const itemChildrenTemplateImage=e=>({tag:"IconListItem",childrens:[{tag:"Col",settings:{},styles:{},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Image",settings:{image:{src:e},disableNoDataState:!0},styles:{shape:{desktop:{height:"40px",width:"40px",shape:"square",shapeLinked:!0,shapeValue:"1/1"}}},childrens:[]}]},{tag:"Col",styles:{fullWidth:!0},advanced:{w:{desktop:"100%"},boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Text",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]}]}),itemChildrenTemplateText=e=>({tag:"IconListItem",childrens:[{tag:"Col",settings:{},styles:{},childrens:[{tag:"Text",settings:{text:e,globalSize:{desktop:{width:"40px"}}},styles:{typo:{attrs:{bold:!0}}}}]},{tag:"Col",styles:{fullWidth:!0},advanced:{w:{desktop:"100%"}},childrens:[{tag:"Text",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]}]}),itemControlTemplateCol={tag:"Col",settings:{},styles:{minWidth:{desktop:"200px"},justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0},fullWidth:!0},advanced:{},childrens:[{tag:"Text",label:"Text block",settings:{text:"Your custom text goes here",htmlTag:"div"},
|
|
1
|
+
"use strict";const itemChildrenTemplateImage=e=>({tag:"IconListItem",childrens:[{tag:"Col",settings:{},styles:{},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Image",settings:{image:{src:e},disableNoDataState:!0},styles:{shape:{desktop:{height:"40px",width:"40px",shape:"square",shapeLinked:!0,shapeValue:"1/1"}}},childrens:[]}]},{tag:"Col",styles:{fullWidth:!0},advanced:{w:{desktop:"100%"},boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Text",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]}]}),itemChildrenTemplateText=e=>({tag:"IconListItem",childrens:[{tag:"Col",settings:{},styles:{},childrens:[{tag:"Text",settings:{text:e,globalSize:{desktop:{width:"40px"}}},styles:{typo:{attrs:{bold:!0}}}}]},{tag:"Col",styles:{fullWidth:!0},advanced:{w:{desktop:"100%"}},childrens:[{tag:"Text",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]}]}),itemControlTemplateCol={tag:"Col",settings:{},styles:{minWidth:{desktop:"200px"},justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0},fullWidth:!0},advanced:{},childrens:[{tag:"Text",label:"Text block",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]},itemControlTemplate={tag:"IconListItem",label:"Icon List Item",settings:{},styles:{},advanced:{},childrens:[{tag:"Col",settings:{},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"Icon",label:"Icon",settings:{iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" className="w-6 h-6" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M407.552 127.04a23.456 23.456 0 0 1 33.504 0c9.152 9.248 9.28 24.192 0.32 33.6L252.16 384.32a23.456 23.456 0 0 1 -34.08 0.64L102.944 268.288a24.224 24.224 0 0 1 0 -33.92 23.456 23.456 0 0 1 33.504 0l97.664 98.976 172.8 -205.6a7.904 7.904 0 0 1 0.64 -0.704Z" /></svg>',iconLink:{link:"",target:"_self"}},styles:{align:{desktop:"left"},iconWidth:{desktop:"20px"},border:{normal:{borderType:"none",border:"none",width:"0px",color:"transparent",isCustom:!1}},bgColor:{normal:"transparent"},iconRotate:0,spin:!1},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[]}]},itemControlTemplateCol]},itemControlTemplateImage={tag:"IconListItem",label:"Icon List Item",settings:{},styles:{},advanced:{},childrens:[{tag:"Col",settings:{},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Image",label:"Image",settings:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/Item_list2.png"},srcSet:{desktop:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/Item_list2.png",width:2237,height:1678}},isAdaptive:!0},styles:{shape:{desktop:{height:"40px",width:"40px",shape:"square",shapeLinked:!0,shapeValue:"1/1"}},objectFit:{desktop:"cover"}},childrens:[],advanced:{boxShadow:{desktop:{normal:{}}}}}]},itemControlTemplateCol]},itemControlTemplateText={tag:"IconListItem",label:"Icon List Item",settings:{},styles:{},advanced:{},childrens:[{tag:"Col",settings:{},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Text",label:"Text",settings:{globalSize:{desktop:{width:"40px"}}},styles:{typo:{attrs:{bold:!0}}}}]},itemControlTemplateCol]};exports.itemChildrenTemplateImage=itemChildrenTemplateImage,exports.itemChildrenTemplateText=itemChildrenTemplateText,exports.itemControlTemplate=itemControlTemplate,exports.itemControlTemplateImage=itemControlTemplateImage,exports.itemControlTemplateText=itemControlTemplateText;
|
|
@@ -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"),NoDataState=require("../../../common/components/NoDataState.js"),helpers=require("./common/helpers.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),useGpDescription=require("./hooks/useGpDescription.js");const ProductDescription=e=>{let{setting:s,advanced:t,builderProps:r}=e,{htmlTag:i}=s??{},a="html"===i?"div":"p",c=core.useProduct(),l=core.useCurrentDevice(),n=core.getResponsiveValueByScreen(s?.hasLineClamp,l),{ref:o,open:m,isShowViewMore:u,handleToggleShowMore:p,mode:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),NoDataState=require("../../../common/components/NoDataState.js"),helpers=require("./common/helpers.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),useGpDescription=require("./hooks/useGpDescription.js");const ProductDescription=e=>{let{setting:s,advanced:t,builderProps:r}=e,{htmlTag:i}=s??{},a="html"===i?"div":"p",c=core.useProduct(),l=core.useCurrentDevice(),n=core.getResponsiveValueByScreen(s?.hasLineClamp,l),{ref:o,open:m,isShowViewMore:u,handleToggleShowMore:p,mode:d,redirectProductShopifyLink:y}=useGpDescription.useGpDescription(s),x=system.createClass({"gp-product-description":!0,[t?.cssClass]:!0}),j=system.createClass(classes.getClasses({setting:s,isLiquid:!1})),g=system.createClass(classes.getButtonClasses({setting:s})),h=system.createClass({"gp-show-more-text":!0}),C=system.createClass({"gp-show-more-icon gp-ml-1":!0,...m?{"gp-rotate-180":!0}:{}}),R=system.createClass(classes.getClassPreBuilt()),S=system.createStyle({...styles.getTextStyle({setting:s}),...m?{}:core.makeStyleResponsive("line-clamp",core.makeLineClamp(s?.lineClamp,s?.hasLineClamp))}),f=system.createStyle(styles.getButtonStyle({setting:s})),v=system.createAttr({"data-id":`${r?.uid}`}),D=system.createAttr({"data-gp-text":""}),{gpDescriptionCss:N,textDescriptionCss:k}=styles.getStaticCss(),q=!c?.descriptionHtml;return q&&"edit"===d?jsxRuntime.jsx(NoDataState.default,{elementType:"secondary",description:"Highlight key benefits with product description.",descriptionActions:[{text:"Add description",callback:y},{text:"sync data",callback:"syncProduct"}]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:system.If(q,"",jsxRuntime.jsxs("div",{...v,className:x,children:[jsxRuntime.jsx("style",{children:k}),system.If(!core.isSafari(),jsxRuntime.jsx("style",{children:N})," "),jsxRuntime.jsx("div",{className:R}),jsxRuntime.jsx(a,{ref:o,...D,className:j,style:S,dangerouslySetInnerHTML:{__html:c?.descriptionHtml||""}}),system.If(n&&u,jsxRuntime.jsxs("button",{className:g,style:f,onClick:p,children:[jsxRuntime.jsx("span",{className:h,children:system.If(m,s?.viewLessText||"",s?.viewMoreText)}),system.If(s?.enableViewMoreIcon,jsxRuntime.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:helpers.ICON_SVG}}))]})," ")]}))})};exports.default=ProductDescription;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),helpers$1=require("./common/helpers.js");const ProductDescription=e=>{let{setting:s,advanced:t,builderProps:r,pageContext:a}=e,{htmlTag:l,translate:i,viewMoreText:c,viewLessText:o}=s??{},p="html"===l?"div":"p",n=system.createClass({"gp-product-description":!0,[t?.cssClass]:!0}),d=system.createClass(classes.getClasses({setting:s})),m=system.createClass(classes.getButtonClasses({setting:s})),u=system.createClass({"gp-show-more-text":!0}),y=system.createClass({"gp-show-more-icon gp-ml-1":!0}),g=system.createStyle({...styles.getTextStyle({setting:s,renderMaxHeight:!0}),...core.makeStyleResponsive("line-clamp",core.makeLineClamp(s?.lineClamp,s?.hasLineClamp))}),$=system.createClass(classes.getClassPreBuilt()),v=system.createStyle(styles.getButtonStyle({setting:s})),C=system.createAttr({"data-id":`${r?.uid}`}),S=system.createAttr({"data-gp-text":""}),{textDescriptionCss:h}=styles.getStaticCss(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),helpers$1=require("./common/helpers.js");const ProductDescription=e=>{let{setting:s,advanced:t,builderProps:r,pageContext:a}=e,{htmlTag:l,translate:i,viewMoreText:c,viewLessText:o}=s??{},p="html"===l?"div":"p",n=system.createClass({"gp-product-description":!0,[t?.cssClass]:!0}),d=system.createClass(classes.getClasses({setting:s,isLiquid:!0})),m=system.createClass(classes.getButtonClasses({setting:s})),u=system.createClass({"gp-show-more-text":!0}),y=system.createClass({"gp-show-more-icon gp-ml-1":!0}),g=system.createStyle({...styles.getTextStyle({setting:s,renderMaxHeight:!0}),...core.makeStyleResponsive("line-clamp",core.makeLineClamp(s?.lineClamp,s?.hasLineClamp))}),$=system.createClass(classes.getClassPreBuilt()),v=system.createStyle(styles.getButtonStyle({setting:s})),C=system.createAttr({"data-id":`${r?.uid}`}),S=system.createAttr({"data-gp-text":""}),{textDescriptionCss:h}=styles.getStaticCss(),L="product.description == blank",x=()=>{let e=core.isLocalEnv?"{{ 'gp-product-description-v7-5.js' | asset_url }}":`${core.baseAssetURL}/assets-v2/gp-product-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`},w=system.createStateOrContext({setting:{lineClamp:s?.lineClamp,hasLineClamp:s?.hasLineClamp,viewMoreText:s?.viewMoreText,viewLessText:s?.viewLessText,enableViewMoreIcon:s?.enableViewMoreIcon},textStyle:g}),q=helpers.getDynamicSourceLocales({val:c,uid:r?.uid,settingId:"viewMoreText",pageContext:a,translate:i}),f=helpers.getDynamicSourceLocales({val:o,uid:r?.uid,settingId:"viewLessText",pageContext:a,translate:i});return system.LiquidIf(L,"",system.Liquid(core.template`
|
|
2
2
|
<gp-product-description-v7-5
|
|
3
3
|
${C}
|
|
4
4
|
class="${n}"
|
|
5
5
|
gp-data='${core.dataStringify(w).replaceAll("'","'")}'
|
|
6
|
-
data-view-more-text="${
|
|
7
|
-
data-view-less-text="${
|
|
6
|
+
data-view-more-text="${q}"
|
|
7
|
+
data-view-less-text="${f}"
|
|
8
8
|
>
|
|
9
9
|
<style>${h}</style>
|
|
10
10
|
<div class="${$}" ></div>
|
|
11
11
|
${system.LiquidUnless("product","<p>Product not found</p>",core.template`<${p} ${S} class="${d}" style="${g}">
|
|
12
12
|
{{product.description}}
|
|
13
13
|
</${p}>
|
|
14
|
-
${system.LiquidUnless(
|
|
14
|
+
${system.LiquidUnless(L,core.template`<button type="button" class="${m}" style="${v}">
|
|
15
15
|
<span class="${u}">
|
|
16
|
-
${system.If(!1,
|
|
16
|
+
${system.If(!1,f?.toString(),q?.toString())}
|
|
17
17
|
</span>
|
|
18
18
|
${system.If(s?.enableViewMoreIcon,core.template`<span class="${y}">${helpers$1.ICON_SVG}</span>`," ")}
|
|
19
19
|
</button>`)}`)}
|
|
20
20
|
</gp-product-description-v7-5>
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${x()}
|
|
23
23
|
`))};exports.default=ProductDescription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e})=>{let
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e,isLiquid:r})=>{let a=core.composeTypographyClassName(e?.typo,e?.typography),t=core.getGlobalColorClass("text",e?.color);return{"gp-relative gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre":!0,"p-description-wrapper":r,...a&&{[a]:!0},[t]:!0,"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white":!0}},getButtonClasses=({setting:e})=>{let r=core.composeTypographyClassName(e?.typo,e?.typography),a=core.getGlobalColorClass("text",e?.showMoreColor);return{"p-description-show-more gp-items-center gp-mt-4 gp-w-full gp-transition-all hover:gp-opacity-80":!0,...r&&{[r]:!0},[a]:!0}},getClassPreBuilt=()=>core.composeClasses(core.cls("gp-rotate-180 gp-hidden"));exports.getButtonClasses=getButtonClasses,exports.getClassPreBuilt=getClassPreBuilt,exports.getClasses=getClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Text"},controls:[{setting:{id:"typo"},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"View more button"},setting:{id:"hasLineClamp"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Text color"},setting:{id:"showMoreColor"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Collapsed text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewMoreText",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"viewMoreText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Expand text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewLessText",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"viewLessText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Icon"},setting:{id:"enableViewMoreIcon"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Max lines"},setting:{id:"lineClamp"},conditionDisplay:"hasLineClamp == true"}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Text"},controls:[{setting:{id:"typo"},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"View more button"},setting:{id:"hasLineClamp"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Text color"},setting:{id:"showMoreColor"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Collapsed text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewMoreText",isHideClear:!0,compoDefaultValue:"Show more",controls:[{label:{en:"Content"},setting:{id:"viewMoreText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Expand text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewLessText",isHideClear:!0,compoDefaultValue:"Show less",controls:[{label:{en:"Content"},setting:{id:"viewLessText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Icon"},setting:{id:"enableViewMoreIcon"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Max lines"},setting:{id:"lineClamp"},conditionDisplay:"hasLineClamp == true"}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,getStyleShadow as t,composeBorderCss as r,composeCornerCss as o}from"@gem-sdk/core";let getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,{...t,enableTextStyle:!0}},getButtonStyle=(t,r)=>({...t,...e("ta",r?.align)}),getInnerBorderCornerCss=e=>{let{uid:n,styles:a}=e;if(!n||!a)return"";let{borderBtnV2:i,roundedBtnV2:d,boxShadowBtn:l}=a,c=e=>e?t({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",p=l?.active?.enable!==void 0?c(l?.active??{}):"",s={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},u=e=>{let t=s[e],a=!!t,l=`
|
|
1
|
+
import{makeStyleResponsive as e,getStyleShadow as t,composeBorderCss as r,composeCornerCss as o}from"@gem-sdk/core";let getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,delete t?.boxShadowBtn?.active,{...t,enableTextStyle:!0}},getButtonStyle=(t,r)=>({...t,...e("ta",r?.align)}),getInnerBorderCornerCss=e=>{let{uid:n,styles:a}=e;if(!n||!a)return"";let{borderBtnV2:i,roundedBtnV2:d,boxShadowBtn:l}=a,c=e=>e?t({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",p=l?.active?.enable!==void 0?c(l?.active??{}):"",s={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},u=e=>{let t=s[e],a=!!t,l=`
|
|
2
2
|
.gp-coupon[data-active="true"] .${n}::before {
|
|
3
3
|
${r(i?.active,{important:!0})};
|
|
4
4
|
${o(d?.active,!0)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let ContactSettings=[{id:"setting",controls:[{id:"callbackURL",type:"pick-link",label:"Pick Link",customLabel:{en:"Action"},default:{type:"stay-on-page",link:"",target:"_self"}},{id:"successMessage",type:"textarea",label:"Success Message",default:"Thanks for contacting us. We'll get back to you as soon as possible.",autoHeight:!0,minHeight:58,compoDefaultValue:"Thanks for contacting us. We'll get back to you as soon as possible."},{id:"successColor",type:"color-picker-v2",label:"Color",default:"#00A042",compoDefaultValue:"#00A042"},{id:"errorMessage",type:"textarea",label:"Error Message",default:"Can’t send email. Please try again later.",autoHeight:!0,minHeight:58,compoDefaultValue:"Can’t send email. Please try again later."},{id:"errorColor",type:"color-picker-v2",label:"Color",default:"#F44336",compoDefaultValue:"#F44336"},{id:"translate",type:"input",default:"successMessage,errorMessage"},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"transparent"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#E2E2E2"}}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"480px"}}},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"afterSubmitActionToggle",type:"toggle",label:"Action after submit",devices:{desktop:{default:!1}}},{id:"afterSubmitAction",type:"select",options:[{label:"Stay on page",value:"stay-on-page"},{label:"Open URL",value:"open-url"}],default:"stay-on-page"}]},{id:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"1200px",height:"Auto"}}
|
|
1
|
+
let ContactSettings=[{id:"setting",controls:[{id:"callbackURL",type:"pick-link",label:"Pick Link",customLabel:{en:"Action"},default:{type:"stay-on-page",link:"",target:"_self"}},{id:"successMessage",type:"textarea",label:"Success Message",default:"Thanks for contacting us. We'll get back to you as soon as possible.",autoHeight:!0,minHeight:58,compoDefaultValue:"Thanks for contacting us. We'll get back to you as soon as possible."},{id:"successColor",type:"color-picker-v2",label:"Color",default:"#00A042",compoDefaultValue:"#00A042"},{id:"errorMessage",type:"textarea",label:"Error Message",default:"Can’t send email. Please try again later.",autoHeight:!0,minHeight:58,compoDefaultValue:"Can’t send email. Please try again later."},{id:"errorColor",type:"color-picker-v2",label:"Color",default:"#F44336",compoDefaultValue:"#F44336"},{id:"translate",type:"input",default:"successMessage,errorMessage"},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"transparent"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#E2E2E2"}}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"480px"}}},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"afterSubmitActionToggle",type:"toggle",label:"Action after submit",devices:{desktop:{default:!1}}},{id:"afterSubmitAction",type:"select",options:[{label:"Stay on page",value:"stay-on-page"},{label:"Open URL",value:"open-url"}],default:"stay-on-page"}]},{id:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"1200px",height:"Auto"}}},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{ContactSettings as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"
|
|
1
|
+
let FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"input",label:"Placeholder",default:"Enter your email address",placeholder:"Enter your text"},{id:"placeholderColor",type:"color-picker-v2",label:"Color",default:"#A3A3A3"},{id:"translate",type:"input",default:"placeholder"},{id:"required",type:"toggle",label:"Placeholder",default:!0},{id:"hideOnClient",type:"toggle",label:"Hide on client",default:!1},{id:"defaultEmail",type:"input",label:"Default value",default:"default@gempages.help"},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{color:!0,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF"}}}},{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:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},settingConfig:{width:{},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border-v2",label:"Border",default:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#7D7D7D",isCustom:!0}},{id:"backgroundColorV2Hover",type:"color-picker-v2",enableGradient:!0},{id:"textColorHover",type:"color-picker-v2",label:"Text Color",state:{hover:!0}},{id:"borderEmailHover",type:"border",emptyOnClear:!0,state:{hover:!0}},{id:"roundedEmailHover",type:"radius-preset",default:{hover:{radiusType:"small"}},state:{hover:!0}},{id:"boxShadowEmailHover",type:"shadow-v2",label:"Button Shadow",hideOnState:{hover:!0},state:{hover:!0}},{id:"backgroundColorV2Active",type:"color-picker-v2",enableGradient:!0},{id:"textColorActive",type:"color-picker-v2",label:"Text Color",state:{active:!0}},{id:"borderEmailActive",type:"border",emptyOnClear:!0,state:{active:!0}},{id:"roundedEmailActive",type:"radius-preset",default:{active:{radiusType:"small"}},state:{active:!0}},{id:"boxShadowEmailActive",type:"shadow-v2",label:"Button Shadow",hideOnState:{active:!0},state:{active:!0}}]}];export{FormEmailSettings as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Placeholder"},iconName:"polaris-text-block",getValueFromSettingID:"placeholder",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"placeholder"}}]},{layout:"vertical",setting:{id:"typo"}}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Default",value:"1200px",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Hide on client"},setting:{id:"hideOnClient"}},{label:{en:"Default value"},setting:{id:"defaultEmail"},conditionDisplay:"hideOnClient === true"}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},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:"Text style"},controls:[{type:"combo",label:{en:"Placeholder"},iconName:"polaris-text-block",getValueFromSettingID:"placeholder",isHideClear:!0,controls:[{layout:"vertical",label:{en:"Content"},setting:{id:"placeholder"}}]},{layout:"vertical",setting:{id:"typo"}}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Default",value:"1200px",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Hide on client"},setting:{id:"hideOnClient"}},{label:{en:"Default value"},setting:{id:"defaultEmail"},conditionDisplay:"hideOnClient === true"}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let itemChildrenTemplateImage=
|
|
1
|
+
let itemChildrenTemplateImage=e=>({tag:"IconListItem",childrens:[{tag:"Col",settings:{},styles:{},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Image",settings:{image:{src:e},disableNoDataState:!0},styles:{shape:{desktop:{height:"40px",width:"40px",shape:"square",shapeLinked:!0,shapeValue:"1/1"}}},childrens:[]}]},{tag:"Col",styles:{fullWidth:!0},advanced:{w:{desktop:"100%"},boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Text",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]}]}),itemChildrenTemplateText=e=>({tag:"IconListItem",childrens:[{tag:"Col",settings:{},styles:{},childrens:[{tag:"Text",settings:{text:e,globalSize:{desktop:{width:"40px"}}},styles:{typo:{attrs:{bold:!0}}}}]},{tag:"Col",styles:{fullWidth:!0},advanced:{w:{desktop:"100%"}},childrens:[{tag:"Text",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]}]}),itemControlTemplateCol={tag:"Col",settings:{},styles:{minWidth:{desktop:"200px"},justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0},fullWidth:!0},advanced:{},childrens:[{tag:"Text",label:"Text block",settings:{text:"Your custom text goes here",htmlTag:"div"},childrens:[]}]},itemControlTemplate={tag:"IconListItem",label:"Icon List Item",settings:{},styles:{},advanced:{},childrens:[{tag:"Col",settings:{},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{},childrens:[{tag:"Icon",label:"Icon",settings:{iconSvg:'<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" className="w-6 h-6" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M407.552 127.04a23.456 23.456 0 0 1 33.504 0c9.152 9.248 9.28 24.192 0.32 33.6L252.16 384.32a23.456 23.456 0 0 1 -34.08 0.64L102.944 268.288a24.224 24.224 0 0 1 0 -33.92 23.456 23.456 0 0 1 33.504 0l97.664 98.976 172.8 -205.6a7.904 7.904 0 0 1 0.64 -0.704Z" /></svg>',iconLink:{link:"",target:"_self"}},styles:{align:{desktop:"left"},iconWidth:{desktop:"20px"},border:{normal:{borderType:"none",border:"none",width:"0px",color:"transparent",isCustom:!1}},bgColor:{normal:"transparent"},iconRotate:0,spin:!1},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[]}]},itemControlTemplateCol]},itemControlTemplateImage={tag:"IconListItem",label:"Icon List Item",settings:{},styles:{},advanced:{},childrens:[{tag:"Col",settings:{},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Image",label:"Image",settings:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/Item_list2.png"},srcSet:{desktop:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/Item_list2.png",width:2237,height:1678}},isAdaptive:!0},styles:{shape:{desktop:{height:"40px",width:"40px",shape:"square",shapeLinked:!0,shapeValue:"1/1"}},objectFit:{desktop:"cover"}},childrens:[],advanced:{boxShadow:{desktop:{normal:{}}}}}]},itemControlTemplateCol]},itemControlTemplateText={tag:"IconListItem",label:"Icon List Item",settings:{},styles:{},advanced:{},childrens:[{tag:"Col",settings:{},styles:{justifyContent:{desktop:"normal"},alignItem:{desktop:"normal"},order:{desktop:0}},advanced:{boxShadow:{desktop:{normal:{}}}},childrens:[{tag:"Text",label:"Text",settings:{globalSize:{desktop:{width:"40px"}}},styles:{typo:{attrs:{bold:!0}}}}]},itemControlTemplateCol]};export{itemChildrenTemplateImage,itemChildrenTemplateText,itemControlTemplate,itemControlTemplateImage,itemControlTemplateText};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as t,jsxs as s}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,getResponsiveValueByScreen as r,makeStyleResponsive as c,makeLineClamp as m,isSafari as n}from"@gem-sdk/core";import l from"../../../common/components/NoDataState.js";import{ICON_SVG as a}from"./common/helpers.js";import{createClass as p,createStyle as d,createAttr as h,If as u}from"@gem-sdk/system";import{getClasses as y,getButtonClasses as g,getClassPreBuilt as f}from"./common/classes.js";import{getTextStyle as x,getButtonStyle as k,getStaticCss as N}from"./common/styles.js";import{useGpDescription as j}from"./hooks/useGpDescription.js";let ProductDescription=w=>{let{setting:
|
|
2
|
+
import{jsx as e,Fragment as t,jsxs as s}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,getResponsiveValueByScreen as r,makeStyleResponsive as c,makeLineClamp as m,isSafari as n}from"@gem-sdk/core";import l from"../../../common/components/NoDataState.js";import{ICON_SVG as a}from"./common/helpers.js";import{createClass as p,createStyle as d,createAttr as h,If as u}from"@gem-sdk/system";import{getClasses as y,getButtonClasses as g,getClassPreBuilt as f}from"./common/classes.js";import{getTextStyle as x,getButtonStyle as k,getStaticCss as N}from"./common/styles.js";import{useGpDescription as j}from"./hooks/useGpDescription.js";let ProductDescription=w=>{let{setting:L,advanced:b,builderProps:v}=w,{htmlTag:C}=L??{},H="html"===C?"div":"p",T=o(),D=i(),M=r(L?.hasLineClamp,D),{ref:_,open:I,isShowViewMore:P,handleToggleShowMore:S,mode:A,redirectProductShopifyLink:q}=j(L),G=p({"gp-product-description":!0,[b?.cssClass]:!0}),V=p(y({setting:L,isLiquid:!1})),$=p(g({setting:L})),z=p({"gp-show-more-text":!0}),B=p({"gp-show-more-icon gp-ml-1":!0,...I?{"gp-rotate-180":!0}:{}}),E=p(f()),F=d({...x({setting:L}),...I?{}:c("line-clamp",m(L?.lineClamp,L?.hasLineClamp))}),J=d(k({setting:L})),K=h({"data-id":`${v?.uid}`}),O=h({"data-gp-text":""}),{gpDescriptionCss:Q,textDescriptionCss:R}=N(),U=!T?.descriptionHtml;return U&&"edit"===A?e(l,{elementType:"secondary",description:"Highlight key benefits with product description.",descriptionActions:[{text:"Add description",callback:q},{text:"sync data",callback:"syncProduct"}]}):e(t,{children:u(U,"",s("div",{...K,className:G,children:[e("style",{children:R}),u(!n(),e("style",{children:Q})," "),e("div",{className:E}),e(H,{ref:_,...O,className:V,style:F,dangerouslySetInnerHTML:{__html:T?.descriptionHtml||""}}),u(M&&P,s("button",{className:$,style:J,onClick:S,children:[e("span",{className:z,children:u(I,L?.viewLessText||"",L?.viewMoreText)}),u(L?.enableViewMoreIcon,e("span",{className:B,dangerouslySetInnerHTML:{__html:a}}))]})," ")]}))})};export{ProductDescription as default};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as
|
|
1
|
+
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as i,isLocalEnv as o,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,getSettingPreloadData as a}from"../../../helpers.js";import{createClass as l,createStyle as n,createAttr as d,createStateOrContext as c,LiquidIf as m,Liquid as $,LiquidUnless as u,If as g}from"@gem-sdk/system";import{getClasses as v,getButtonClasses as w,getClassPreBuilt as x}from"./common/classes.js";import{getTextStyle as f,getButtonStyle as h,getStaticCss as y}from"./common/styles.js";import{ICON_SVG as M}from"./common/helpers.js";let ProductDescription=b=>{let{setting:C,advanced:L,builderProps:S,pageContext:T}=b,{htmlTag:j,translate:I,viewMoreText:k,viewLessText:E}=C??{},P="html"===j?"div":"p",V=l({"gp-product-description":!0,[L?.cssClass]:!0}),A=l(v({setting:C,isLiquid:!0})),D=l(w({setting:C})),G=l({"gp-show-more-text":!0}),_=l({"gp-show-more-icon gp-ml-1":!0}),q=n({...f({setting:C,renderMaxHeight:!0}),...e("line-clamp",t(C?.lineClamp,C?.hasLineClamp))}),H=l(x()),N=n(h({setting:C})),O=d({"data-id":`${S?.uid}`}),R=d({"data-gp-text":""}),{textDescriptionCss:z}=y(),B="product.description == blank",F=()=>{let e=o?"{{ 'gp-product-description-v7-5.js' | asset_url }}":`${r}/assets-v2/gp-product-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${a('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`},J=c({setting:{lineClamp:C?.lineClamp,hasLineClamp:C?.hasLineClamp,viewMoreText:C?.viewMoreText,viewLessText:C?.viewLessText,enableViewMoreIcon:C?.enableViewMoreIcon},textStyle:q}),K=p({val:k,uid:S?.uid,settingId:"viewMoreText",pageContext:T,translate:I}),Q=p({val:E,uid:S?.uid,settingId:"viewLessText",pageContext:T,translate:I});return m(B,"",$(s`
|
|
2
2
|
<gp-product-description-v7-5
|
|
3
|
-
${
|
|
3
|
+
${O}
|
|
4
4
|
class="${V}"
|
|
5
|
-
gp-data='${
|
|
5
|
+
gp-data='${i(J).replaceAll("'","'")}'
|
|
6
6
|
data-view-more-text="${K}"
|
|
7
7
|
data-view-less-text="${Q}"
|
|
8
8
|
>
|
|
9
9
|
<style>${z}</style>
|
|
10
|
-
<div class="${
|
|
11
|
-
${u("product","<p>Product not found</p>",s`<${P} ${
|
|
10
|
+
<div class="${H}" ></div>
|
|
11
|
+
${u("product","<p>Product not found</p>",s`<${P} ${R} class="${A}" style="${q}">
|
|
12
12
|
{{product.description}}
|
|
13
13
|
</${P}>
|
|
14
|
-
${u(B,s`<button type="button" class="${D}" style="${
|
|
14
|
+
${u(B,s`<button type="button" class="${D}" style="${N}">
|
|
15
15
|
<span class="${G}">
|
|
16
16
|
${g(!1,Q?.toString(),K?.toString())}
|
|
17
17
|
</span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyClassName as t,getGlobalColorClass as r,composeClasses as a,cls as e}from"@gem-sdk/core";let getClasses=({setting:a})=>{let
|
|
1
|
+
import{composeTypographyClassName as t,getGlobalColorClass as r,composeClasses as a,cls as e}from"@gem-sdk/core";let getClasses=({setting:a,isLiquid:e})=>{let s=t(a?.typo,a?.typography),p=r("text",a?.color);return{"gp-relative gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre":!0,"p-description-wrapper":e,...s&&{[s]:!0},[p]:!0,"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white":!0}},getButtonClasses=({setting:a})=>{let e=t(a?.typo,a?.typography),s=r("text",a?.showMoreColor);return{"p-description-show-more gp-items-center gp-mt-4 gp-w-full gp-transition-all hover:gp-opacity-80":!0,...e&&{[e]:!0},[s]:!0}},getClassPreBuilt=()=>a(e("gp-rotate-180 gp-hidden"));export{getButtonClasses,getClassPreBuilt,getClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Text"},controls:[{setting:{id:"typo"},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"View more button"},setting:{id:"hasLineClamp"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Text color"},setting:{id:"showMoreColor"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Collapsed text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewMoreText",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"viewMoreText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Expand text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewLessText",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"viewLessText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Icon"},setting:{id:"enableViewMoreIcon"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Max lines"},setting:{id:"lineClamp"},conditionDisplay:"hasLineClamp == true"}]}];export{SettingUIV2};
|
|
1
|
+
let SettingUIV2=[{label:{en:"Text"},controls:[{setting:{id:"typo"},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"View more button"},setting:{id:"hasLineClamp"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Text color"},setting:{id:"showMoreColor"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Collapsed text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewMoreText",isHideClear:!0,compoDefaultValue:"Show more",controls:[{label:{en:"Content"},setting:{id:"viewMoreText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Expand text"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"viewLessText",isHideClear:!0,compoDefaultValue:"Show less",controls:[{label:{en:"Content"},setting:{id:"viewLessText"},layout:"vertical"}],conditionDisplay:"hasLineClamp == true"},{label:{en:"Icon"},setting:{id:"enableViewMoreIcon"},conditionDisplay:"hasLineClamp == true"},{label:{en:"Max lines"},setting:{id:"lineClamp"},conditionDisplay:"hasLineClamp == true"}]}];export{SettingUIV2};
|