@gem-sdk/components 2.0.0-dev.841 → 2.0.0-dev.843
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/button/setting/Button.js +1 -1
- package/dist/cjs/header/components/Header.js +1 -1
- package/dist/cjs/icon/setting/Icon.js +1 -1
- package/dist/cjs/image/helpers/getSrcSet.js +1 -1
- package/dist/cjs/image/setting/Image.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +1 -1
- package/dist/cjs/product/components/ProductDescription.liquid.js +4 -4
- package/dist/cjs/product/components/ProductList.js +1 -1
- package/dist/cjs/product/components/ProductList.liquid.js +1 -1
- package/dist/esm/button/setting/Button.js +1 -1
- package/dist/esm/header/components/Header.js +1 -1
- package/dist/esm/icon/setting/Icon.js +1 -1
- package/dist/esm/image/helpers/getSrcSet.js +1 -1
- package/dist/esm/image/setting/Image.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +1 -1
- package/dist/esm/product/components/ProductDescription.liquid.js +8 -8
- package/dist/esm/product/components/ProductList.js +1 -1
- package/dist/esm/product/components/ProductList.liquid.js +1 -1
- package/dist/types/index.d.ts +3 -3
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M3.16699 6.66663C2.89085 6.66663 2.66699 6.89048 2.66699 7.16663V26.1666C2.66699 26.4428 2.89085 26.6666 3.16699 26.6666H13.5531C13.8587 26.6666 14.0929 26.3948 14.0475 26.0925L13.7975 24.4258C13.7608 24.181 13.5506 24 13.3031 24H5.33366V9.33329H34.667V24H32.5003C32.2242 24 32.0003 24.2238 32.0003 24.5V25.1121C32.0003 25.253 32.0597 25.3873 32.164 25.4821L33.324 26.5366C33.416 26.6203 33.5359 26.6666 33.6603 26.6666H36.8337C37.1098 26.6666 37.3337 26.4428 37.3337 26.1666V7.16663C37.3337 6.89048 37.1098 6.66663 36.8337 6.66663H3.16699ZM19.8589 29.6767C19.9172 30.0846 20.4161 30.2509 20.7074 29.9595L22.667 28L27.6468 32.9797C27.842 33.175 28.1586 33.175 28.3539 32.9797L30.3134 31.0202C30.5087 30.8249 30.5087 30.5083 30.3134 30.3131L25.3337 25.3333L27.2932 23.3737C27.5846 23.0824 27.4183 22.5835 27.0104 22.5252L19.327 21.4276C18.997 21.3804 18.7141 21.6633 18.7613 21.9933L19.8589 29.6767Z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"Button"},{id:"translate",type:"input",default:"label"},{id:"btnLink",type:"pick-link",pickLinkLabel:"Button link",label:"Pick Link",default:{link:"",target:"_self"}},{id:"iconGroup",type:"group",label:"Icon",controls:[{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"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconAlign",label:"Icon Alignment",type:"segment",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"behavior-state",type:"behavior-state",controls:[{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{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:"boxShadow",label:"Button Shadow",hideOnState:{normal:!0,hover:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}}]},{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:"left"}}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1"},ignoreReRender:!0,hiddenSetting:{color:!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:"dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}}]},{id:"dimensions1",type:"group",label:"Icon Dimension",controls:[{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:"range",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}},{id:"spacing",label:"Spacing Icon",type:"input:unit",units:["px","em","rem","%"],placeholder:"Auto",default:"8px"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"8px",bottom:"8px",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"]}]}],ui:[{type:"group",controls:[{type:"control",label:{en:"Icon"},options:{label:"large"},setting:{id:"iconVisible"}},{type:"group",condition:"iconVisible == true",controls:[{type:"control",layout:"vertical",setting:{id:"iconSvg"}},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},options:{styleWrapper:{marginBottom:"0 !important"}}}]}]},{type:"control",label:{en:"
|
|
5
|
+
`,settings:[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"Button"},{id:"translate",type:"input",default:"label"},{id:"btnLink",type:"pick-link",pickLinkLabel:"Button link",label:"Pick Link",default:{link:"",target:"_self"}},{id:"iconGroup",type:"group",label:"Icon",controls:[{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"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconAlign",label:"Icon Alignment",type:"segment",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"behavior-state",type:"behavior-state",controls:[{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{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:"boxShadow",label:"Button Shadow",hideOnState:{normal:!0,hover:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}}]},{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:"left"}}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1"},ignoreReRender:!0,hiddenSetting:{color:!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:"dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}}]},{id:"dimensions1",type:"group",label:"Icon Dimension",controls:[{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:"range",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}},{id:"spacing",label:"Spacing Icon",type:"input:unit",units:["px","em","rem","%"],placeholder:"Auto",default:"8px"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"8px",bottom:"8px",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"]}]}],ui:[{type:"group",controls:[{type:"control",label:{en:"Icon"},options:{label:"large"},setting:{id:"iconVisible"}},{type:"group",condition:"iconVisible == true",controls:[{type:"control",layout:"vertical",setting:{id:"iconSvg"}},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},options:{styleWrapper:{marginBottom:"0 !important"}}}]}]},{type:"control",label:{en:"Insert link"},layout:"vertical",setting:{id:"btnLink"}},{type:"group",label:{en:"Size"},controls:[{type:"control",setting:{id:"globalSize"},layout:"vertical"}]},{type:"group",label:{en:"States"},options:{labelSpacing:"small"},controls:[{type:"tab",controls:[{type:"group",label:{en:"Normal"},controls:[{type:"control",label:{en:"Background color"},setting:{id:"backgroundColor",state:"normal"}},{type:"control",label:{en:"Text color"},setting:{id:"textColor",state:"normal"}},{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"borderBtn",state:"normal"}},{type:"control",label:{en:"Corner"},setting:{id:"roundedBtn",state:"normal"}},{type:"control",label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"normal"}},{type:"group",condition:"hasBoxShadowBtn.normal == true",controls:[{type:"control",layout:"vertical",setting:{id:"boxShadowBtn",state:"normal"}}]}]},{type:"group",label:{en:"Hover"},controls:[{type:"control",label:{en:"Background color"},setting:{id:"backgroundColor",state:"hover"}},{type:"control",label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{type:"control",label:{en:"Corner"},setting:{id:"roundedBtn",state:"hover"}},{type:"control",label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"hover"}},{type:"group",condition:"hasBoxShadowBtn.hover == true",controls:[{type:"control",setting:{id:"boxShadowBtn",state:"hover"},layout:"vertical"}]}]}]}]},{type:"group",label:{en:"Text"},controls:[{type:"control",setting:{id:"typo"},layout:"vertical"}]},{type:"control",label:{en:"Align"},condition:"globalSize.width !== '100%'",options:{label:"large"},setting:{id:"align"}}],editorConfigs:{slots:{children:!1}},presets:[{id:"button",name:{en:"Button"},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="96" height="48" rx="3" fill="#424242"/>
|
|
8
8
|
<rect x="21.5" y="20" width="53" height="8" rx="4" fill="#757575"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),react=require("react"),SalePageHeaderWarning=require("./SalePageHeaderWarning.js");const BasicHeader=dynamic(()=>Promise.resolve().then(function(){return require("./kind/basic/index.js")})),ModernHeader=dynamic(()=>Promise.resolve().then(function(){return require("./kind/modern/index.js")})),Header=({builderAttrs:e,builderProps:r,style:a,setting:n,styles:i,children:s})=>{let{kind:t,...d}=n??{},o="morden"===t?ModernHeader:BasicHeader,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),react=require("react"),SalePageHeaderWarning=require("./SalePageHeaderWarning.js");const BasicHeader=dynamic(()=>Promise.resolve().then(function(){return require("./kind/basic/index.js")})),ModernHeader=dynamic(()=>Promise.resolve().then(function(){return require("./kind/modern/index.js")})),Header=({builderAttrs:e,builderProps:r,style:a,setting:n,styles:i,children:s})=>{let{kind:t,...d}=n??{},o="morden"===t?ModernHeader:BasicHeader,u=core.usePageType(),c=react.useMemo(()=>"GP_FUNNEL_PAGE"===u,[u]);return r?.isPreview&&c?null:jsxRuntime.jsxs("nav",{className:core.cls("gp-w-full",r?.uid),...e,style:{...a,...core.getGlobalColorResponsiveStyle("bgc",i?.headerBg),...core.makeStyleResponsive("h",i?.height)},children:[c&&jsxRuntime.jsx(SalePageHeaderWarning.default,{}),jsxRuntime.jsx(o,{...d,...i}),s]})};exports.default=Header;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8255 2.7925C12.9604 1.28792 10.7896 1.28791 9.92446 2.7925L6.76725 8.2833C5.90475 9.7833 6.9875 11.6549 8.71779 11.6549H15.0322C16.7625 11.6549 17.8452 9.7833 16.9827 8.2833L13.8255 2.7925ZM11.2248 3.54021C11.5132 3.03868 12.2368 3.03868 12.5252 3.54021L15.6824 9.03101C15.9699 9.53101 15.609 10.1549 15.0322 10.1549H8.71779C8.14103 10.1549 7.78011 9.53101 8.06761 9.03101L11.2248 3.54021ZM12.375 17.3389C12.375 14.5775 14.6136 12.3389 17.375 12.3389C20.1364 12.3389 22.375 14.5775 22.375 17.3389C22.375 20.1004 20.1364 22.3389 17.375 22.3389C14.6136 22.3389 12.375 20.1004 12.375 17.3389ZM17.375 13.8389C15.442 13.8389 13.875 15.4059 13.875 17.3389C13.875 19.2719 15.442 20.8389 17.375 20.8389C19.308 20.8389 20.875 19.2719 20.875 17.3389C20.875 15.4059 19.308 13.8389 17.375 13.8389ZM1.625 14.8389C1.625 13.5963 2.63236 12.5889 3.875 12.5889H8.875C10.1176 12.5889 11.125 13.5963 11.125 14.8389V19.8389C11.125 21.0816 10.1176 22.0889 8.875 22.0889H3.875C2.63236 22.0889 1.625 21.0816 1.625 19.8389V14.8389ZM3.875 14.0889C3.46079 14.0889 3.125 14.4247 3.125 14.8389V19.8389C3.125 20.2532 3.46079 20.5889 3.875 20.5889H8.875C9.28921 20.5889 9.625 20.2532 9.625 19.8389V14.8389C9.625 14.4247 9.28921 14.0889 8.875 14.0889H3.875Z" fill="white"/>
|
|
4
4
|
</svg>
|
|
5
5
|
|
|
6
|
-
`,settings:[{id:"setting",controls:[{id:"iconSvg",type:"icon",label:"Icon",info:"Choose from list or paste any SVG icon",default:'<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="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconLink",type:"pick-link",label:"Source URL",default:{link:"",target:"_self",title:""}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"colorpicker",label:"Background Color",state:{hover:!0,normal:!0}},{id:"color",type:"colorpicker",label:"Color",default:{normal:"line-3"},state:{hover:!0,normal:!0}},{id:"iconBorder",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#000000",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"iconRounded",type:"radius-preset",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},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"}]}]}],ui:[{type:"group",options:{label:"large"},label:{en:"Icon"},controls:[{type:"control",setting:{id:"iconSvg"},layout:"vertical",options:{styleControl:{"max-width":"100%"}}},{type:"control",label:{en:"Size"},setting:{id:"iconWidth"}},{type:"control",label:{en:"Inside spacing"},setting:{id:"iconSpacing"}}]},{type:"control",label:{en:"
|
|
6
|
+
`,settings:[{id:"setting",controls:[{id:"iconSvg",type:"icon",label:"Icon",info:"Choose from list or paste any SVG icon",default:'<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="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconLink",type:"pick-link",label:"Source URL",default:{link:"",target:"_self",title:""}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"colorpicker",label:"Background Color",state:{hover:!0,normal:!0}},{id:"color",type:"colorpicker",label:"Color",default:{normal:"line-3"},state:{hover:!0,normal:!0}},{id:"iconBorder",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#000000",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"iconRounded",type:"radius-preset",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},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"}]}]}],ui:[{type:"group",options:{label:"large"},label:{en:"Icon"},controls:[{type:"control",setting:{id:"iconSvg"},layout:"vertical",options:{styleControl:{"max-width":"100%"}}},{type:"control",label:{en:"Size"},setting:{id:"iconWidth"}},{type:"control",label:{en:"Inside spacing"},setting:{id:"iconSpacing"}}]},{type:"control",label:{en:"Insert link"},layout:"vertical",setting:{id:"iconLink"}},{type:"group",label:{en:"Color & border"},controls:[{type:"control",label:{en:"Icon color"},setting:{id:"color",state:"normal"}},{type:"control",label:{en:"Background color"},setting:{id:"bgColor",state:"normal"}},{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"iconBorder",state:"normal"}},{type:"control",label:{en:"Corner"},setting:{id:"iconRounded",state:"normal"}}]},{type:"control",label:{en:"Align"},setting:{id:"align"}}],presets:[{id:"icon",name:{en:"Icon"},icon:{desktop:`
|
|
7
7
|
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
8
|
<path d="M47.283 7.62515C47.5764 7.03055 48.4243 7.03055 48.7177 7.62515L52.251 14.7844C52.3676 15.0205 52.5928 15.1842 52.8534 15.222L60.7541 16.3701C61.4102 16.4654 61.6722 17.2718 61.1974 17.7346L55.4804 23.3073C55.2919 23.4911 55.2059 23.7559 55.2504 24.0154L56.6 31.8842C56.7121 32.5377 56.0261 33.0361 55.4392 32.7275L48.3726 29.0124C48.1396 28.8899 47.8611 28.8898 47.6281 29.0124L40.5615 32.7275C39.9746 33.0361 39.2886 32.5377 39.4007 31.8842L40.7503 24.0154C40.7948 23.7559 40.7088 23.4911 40.5202 23.3073L34.8033 17.7346C34.3284 17.2718 34.5904 16.4654 35.2466 16.3701L43.1473 15.222C43.4079 15.1842 43.6331 15.0205 43.7497 14.7844L47.283 7.62515Z" fill="#D6D6D6"/>
|
|
9
9
|
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const DEVICES=["desktop","tablet","mobile"],getSrcSet=(e,t,r)=>e?getSrcSetLiquid(e,t):getSrcSetLink(r),isCannotResizeImage=e=>e.includes("webp")||e.includes("jfif")||e.includes(".svg")||e.includes(".tiff"),getSrcSetLiquid=(e,t)=>{let r=replaceBackupFileKeyFileContent(e);return isCannotResizeImage(e)?"FILE_CONTENT"==t?`{{ '${r}' | file_url }} 768w, {{ '${r}' | file_url }} 1024w, {{ '${r}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${r}' | file_img_url: '768x768' }} 768w, {{ '${r}' | file_img_url: '1024x1024' }} 1024w, {{ '${r}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x768' }} 768w, {{ '${e}' | asset_img_url: '1024x1024' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},getSrcSetLink=e=>`${e} 768w,${e} 1024w,${e} 1440w`,getImageSrc=e=>{let t=e?.backupFilePath;return e?.backupFileKey&&("THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(t=`{{ "${replaceBackupFileKeyFileContent(e.backupFileKey)}" | file_url }}`):t=`{{ "${e.backupFileKey}" | asset_url }}`),t??e?.src},replaceBackupFileKeyFileContent=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),getNewBackupFileKey=(e,t)=>{let r=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp))$/)?.[1];return r&&r!=e?r:e};function resizeImage(e,t){let r=e.match(/\.webp/g)?.length,i=replaceRegexLastMatch({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(r)return i;let a=replaceRegexLastMatch({str:i,reg:/\.jpg|\.png|\.gif|\.jpeg/g,newString:t,isAdd:!0});return a}const replaceRegexLastMatch=e=>{let t=e.str,r=e.str.match(e.reg)?.length;if(r){let i,a=1;for(;null!==(i=e.reg.exec(e.str));){if(a===r){let r=e.reg.lastIndex,a=r-i[0].length;e.isAdd&&(e.newString="_"+e.newString+i),t=t.slice(0,a)+e.newString+t.slice(r,t.length)}a++}}return t},getItemWidth=(e,t)=>{let r=getCurrentDevice(),i=t?.[r]||"auto";if(!i||"auto"===i||i.includes("%"))return e;let a=Number(i.replace("px",""));return a>e?e:Number(i.replace("px",""))},getImageWidthFollowByQuality=e=>{let{itemWidthParam:t,imageWidthSetting:r,qualityType:i,qualityPercent:a}=e,l=getCurrentDevice(),g=getItemWidth(t,r),n=core.getResponsiveValueByScreen(i,l,"finest"),
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const DEVICES=["desktop","tablet","mobile"],getSrcSet=(e,t,r)=>e?getSrcSetLiquid(e,t):getSrcSetLink(r),isCannotResizeImage=e=>e.includes("webp")||e.includes("jfif")||e.includes(".svg")||e.includes(".tiff"),getSrcSetLiquid=(e,t)=>{let r=replaceBackupFileKeyFileContent(e);return isCannotResizeImage(e)?"FILE_CONTENT"==t?`{{ '${r}' | file_url }} 768w, {{ '${r}' | file_url }} 1024w, {{ '${r}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${r}' | file_img_url: '768x768' }} 768w, {{ '${r}' | file_img_url: '1024x1024' }} 1024w, {{ '${r}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x768' }} 768w, {{ '${e}' | asset_img_url: '1024x1024' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},getSrcSetLink=e=>`${e} 768w,${e} 1024w,${e} 1440w`,getImageSrc=e=>{let t=e?.backupFilePath;return e?.backupFileKey&&("THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(t=`{{ "${replaceBackupFileKeyFileContent(e.backupFileKey)}" | file_url }}`):t=`{{ "${e.backupFileKey}" | asset_url }}`),t??e?.src},replaceBackupFileKeyFileContent=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),getNewBackupFileKey=(e,t)=>{let r=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp))$/)?.[1];return r&&r!=e?r:e};function resizeImage(e,t){let r=e.match(/\.webp/g)?.length,i=replaceRegexLastMatch({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(r)return i;let a=replaceRegexLastMatch({str:i,reg:/\.jpg|\.png|\.gif|\.jpeg/g,newString:t,isAdd:!0});return a}const replaceRegexLastMatch=e=>{let t=e.str,r=e.str.match(e.reg)?.length;if(r){let i,a=1;for(;null!==(i=e.reg.exec(e.str));){if(a===r){let r=e.reg.lastIndex,a=r-i[0].length;e.isAdd&&(e.newString="_"+e.newString+i),t=t.slice(0,a)+e.newString+t.slice(r,t.length)}a++}}return t},getItemWidth=(e,t)=>{let r=getCurrentDevice(),i=t?.[r]||"auto";if(!i||"auto"===i||i.includes("%"))return e;let a=Number(i.replace("px",""));return a>e?e:Number(i.replace("px",""))},getImageWidthFollowByQuality=e=>{let{itemWidthParam:t,imageWidthSetting:r,qualityType:i,qualityPercent:a}=e,l=getCurrentDevice(),g=getItemWidth(t,r),n=core.getResponsiveValueByScreen(i,l,"finest"),c=core.getResponsiveValueByScreen(a,l,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*g)||1;case"medium":return Math.round(g)||1;case"custom":return Math.round(g*(Number(c)/100))||1}},getWidthOfFeatureImageSetting=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return DEVICES.forEach(r=>{let i=core.getResponsiveValueByScreen(e,r)?.width||"100%";t[r]=i}),t},getWidthOfImageListSetting=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return DEVICES.forEach(r=>{let i=core.getResponsiveValueByScreen(e,r)?.width||"100%";t[r]=i}),t},getWidthOfListImageInDom=()=>{let e=document.querySelectorAll(".gp-gallery-image-item"),t=0;return e.forEach(e=>{e.offsetWidth>t&&(t=e.offsetWidth)}),t},getWidthOfFeatureImageInDom=()=>{let e=document.querySelectorAll(".gp-ft-image-item"),t=0;return e.forEach(e=>{e.offsetWidth>t&&(t=e.offsetWidth)}),t},handleSetSrcForProductImageList=e=>{let{shapeByLayout:t,qualityType:r,qualityPercent:i,builderPropUID:a}=e,l=document.querySelectorAll(`.gem-slider-item-${a}.gp-gallery-image-item`),g=getWidthOfImageListSetting(t),n=getWidthOfListImageInDom();l.forEach(e=>{handleSetSrcForGalleryImage({item:e,settingWidth:g,width:n,qualityType:r,qualityPercent:i})})},handleSetSrcForFeatureProductImage=e=>{let{ftShape:t,qualityType:r,qualityPercent:i,builderPropUID:a}=e,l=document.querySelectorAll(`.gem-slider-item-${a}.gp-ft-image-item`),g=getWidthOfFeatureImageSetting(t),n=getWidthOfFeatureImageInDom();l.forEach(e=>{handleSetSrcForGalleryImage({item:e,settingWidth:g,width:n,qualityType:r,qualityPercent:i})})},handleSetSrcForGalleryImage=e=>{let{item:t,settingWidth:r,width:i,qualityType:a,qualityPercent:l}=e,g=getCurrentDevice(),n=t.querySelector("img");if(n){let e=getImageWidthFollowByQuality({itemWidthParam:i,imageWidthSetting:r,qualityType:a,qualityPercent:l}),t=n.getAttribute("base-src");if(!t)return;let c=getImageSrcByQuality(e,t),s=getImageSrcSet(t,c,g);n.setAttribute("srcset",s)}},getImageSrcByQuality=(e,t)=>"auto"===e?t:resizeImage(t,`${e}x`),getImageSrcSet=(e,t,r)=>`${"mobile"===r&&e!==t?t:resizeImage(e,"768x768")} 767w, ${"tablet"===r&&e!==t?t:resizeImage(e,"1024x1024")} 1023w, ${"desktop"===r&&e!==t?t:resizeImage(e,"1920x1920")} 1440w`,getCurrentDevice=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1024?"tablet":"desktop";exports.DEVICES=DEVICES,exports.getCurrentDevice=getCurrentDevice,exports.getImageSrc=getImageSrc,exports.getImageWidthFollowByQuality=getImageWidthFollowByQuality,exports.getNewBackupFileKey=getNewBackupFileKey,exports.getSrcSet=getSrcSet,exports.handleSetSrcForFeatureProductImage=handleSetSrcForFeatureProductImage,exports.handleSetSrcForProductImageList=handleSetSrcForProductImageList,exports.isCannotResizeImage=isCannotResizeImage,exports.replaceBackupFileKeyFileContent=replaceBackupFileKeyFileContent,exports.resizeImage=resizeImage;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
`,settings:[{id:"setting",controls:[{id:"image-info",label:"Image",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/",width:2237,height:1678}},{id:"srcSet",type:"image",label:"Device Image",hide:!0,devices:{desktop:{default:{src:"https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/",width:2237,height:1678}}}},{id:"isAdaptive",type:"toggle",label:"Adaptive",default:!1,hideOnMode:{mobileOnly:!0}}]},{id:"imageLink",type:"pick-link",label:"Pick Link",default:{link:"",target:"_self"}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:100,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist logo design, casual and versatile style"},{id:"title",label:"Image title",info:"Show title when hover to image",type:"input",placeholder:"E.g: White t-shirt"}]},{id:"optimize",type:"group",label:"Optimize",hiddenWithGemPages:!0,controls:[{id:"priority",type:"toggle",label:"Preload",default:!1},{id:"quality",type:"range",label:"Quality",min:1,max:100,step:1,default:70,info:"The quality of the image. The higher the quality, the better the image will look, but the larger the file size."}]}]},{id:"style",controls:[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"objectFit",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image"},{label:"Fit image",value:"contain",type:"image"}],devices:{desktop:{default:"cover"}}},{id:"align",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"shapeBorder",type:"border",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#000000",isCustom:!0}},{id:"shapeRounded",type:"radius-preset",label:"Corner",default:{radiusType:"none"}},{id:"shapeHasBoxShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shapeBoxShadow",type:"boxShadow",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}}]}],ui:[{type:"group",label:{en:"Image"},options:{labelSpacing:"small"},controls:[{type:"control",condition:"isAdaptive === false",label:{en:"Choose Image"},layout:"vertical",setting:{id:"image"},options:{tooltip:{icon:"info-line-16",content:`For the best display, set these image sizes as recommended: <br />
|
|
6
6
|
• Desktop/Laptop: 1920px <br />
|
|
7
7
|
• Mobile: 375px <br />
|
|
8
|
-
• Tablet: 1024px`,iconClass:"text-[#757575] hover:text-[#F9F9F9]",containerClass:"w-[232px] whitespace-normal lead-5",enableTeleport:!0}}},{type:"control",condition:"isAdaptive === true",layout:"vertical",label:{en:"Image"},setting:{id:"srcSet"}},{type:"control",label:{en:"Adaptive"},options:{info:"near"},setting:{id:"isAdaptive"},isMoreSetting:!0},{type:"control",label:{en:"Preload"},options:{info:"near"},setting:{id:"priority"},isMoreSetting:!0,condition:"sectionIndex === 0"}]},{type:"control",label:{en:"
|
|
8
|
+
• Tablet: 1024px`,iconClass:"text-[#757575] hover:text-[#F9F9F9]",containerClass:"w-[232px] whitespace-normal lead-5",enableTeleport:!0}}},{type:"control",condition:"isAdaptive === true",layout:"vertical",label:{en:"Choose Image"},setting:{id:"srcSet"}},{type:"control",label:{en:"Adaptive"},options:{info:"near"},setting:{id:"isAdaptive"},isMoreSetting:!0},{type:"control",label:{en:"Preload"},options:{info:"near"},setting:{id:"priority"},isMoreSetting:!0,condition:"sectionIndex === 0"}]},{type:"control",label:{en:"Insert link"},setting:{id:"imageLink"},layout:"vertical"},{type:"group",label:{en:"Size"},controls:[{type:"control",setting:{id:"shape"},layout:"vertical"},{type:"control",label:{en:"Image scale"},setting:{id:"objectFit"}}]},{type:"group",label:{en:"Shape"},controls:[{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"shapeBorder"}},{type:"control",label:{en:"Corner"},setting:{id:"shapeRounded"}},{type:"control",label:{en:"Shadow"},setting:{id:"shapeHasBoxShadow"}},{type:"control",setting:{id:"shapeBoxShadow"},layout:"vertical",condition:"shapeHasBoxShadow === true"}]},{type:"control",label:{en:"Align"},options:{label:"large"},setting:{id:"align"}},{type:"group",label:{en:"SEO"},controls:[{type:"control",label:{en:"Alt text"},setting:{id:"alt"},layout:"vertical"},{type:"control",label:{en:"Image title"},setting:{id:"title"},layout:"vertical"}]}],presets:[{id:"image",name:{en:"Image"},icon:{desktop:`
|
|
9
9
|
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
10
|
<rect width="96" height="48" rx="3" fill="#424242"/>
|
|
11
11
|
<circle cx="37" cy="17" r="3" fill="#D6D6D6"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),helper=require("../../utils/helper.js"),MoneyLine=require("./priceBreakdown/MoneyLine.js");const PostPurchaseProductPriceBreakdown=({setting:e={},styles:t={},style:i,builderAttrs:s,builderProps:l,children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react"),helper=require("../../utils/helper.js"),MoneyLine=require("./priceBreakdown/MoneyLine.js");const PostPurchaseProductPriceBreakdown=({setting:e={},styles:t={},style:i,builderAttrs:s,builderProps:l,children:r})=>{let o=core.useCurrentVariant(),n=core.useProduct(),{quantity:a}=core.useQuantity(),u=o?.price??0,c=parseFloat(core.shopifyPriceRounding(core.useProductOfferDiscount(),2)),d=c*(a||1),p=u*(a||1),x=core.useFormatMoney(p,!0),m=core.useFormatMoney(d,!0),g=core.useFormatMoney(p-d,!0),h=n?.baseID?.replace("gid://shopify/Product/",""),{labelStyle:j,moneyStyle:f,spacing:y,width:b,align:L,isShowPrice:w}=t,R=react.useMemo(()=>helper.postPurchaseSpacing[y||"none"],[y]),[v,P]=react.useState(w);react.useEffect(()=>{P(w)},[w]);let q=react.useMemo(()=>[{title:e.subTotalLabel,money:x,uniqueId:"subTotalLabel"},{title:e.discountLabel,money:c>0?m:"No discount",uniqueId:"discountLabel"},{title:e.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}},{title:e.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}},{title:e.totalLabel,uniqueId:"totalLabel",money:g}],[c,m,e.discountLabel,e.shippingLabel,e.subTotalLabel,e.taxesLabel,e.totalLabel,x,g]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{onClick:()=>P(e=>!e),className:"gp-flex gp-text-[#1879B9] gp-h-4.5 gp-cursor-pointer","aria-hidden":"true",children:[jsxRuntime.jsx("p",{className:"gp-underline",children:v?"Show price breakdown":"Hide price breakdown"}),jsxRuntime.jsx("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`${v||"gp-rotate-180"}`,children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0187 10.3598C10.7759 10.5853 10.3963 10.5712 10.1708 10.3284L8.01045 8.00191L5.85012 10.3284C5.62464 10.5712 5.245 10.5853 5.00218 10.3598C4.75935 10.1343 4.74529 9.75469 4.97077 9.51187L7.57077 6.71187C7.6843 6.58961 7.84361 6.52014 8.01045 6.52014C8.17729 6.52014 8.3366 6.58961 8.45012 6.71187L11.0501 9.51187C11.2756 9.75469 11.2615 10.1343 11.0187 10.3598Z",fill:"#1879B9"})})]}),jsxRuntime.jsx("div",{className:"gp-w-full gp-h-[1px] gp-bg-[#E9E9E9] gp-my-3"}),v?jsxRuntime.jsx("div",{className:"gp-col-[1] gp-row-[1] gp-overflow-hidden",children:jsxRuntime.jsxs("div",{...s,className:core.cls(l?.uid,"gp-flex gp-w-full","gp-min-h-0","left"===L?"gp-justify-start":"right"===L?"gp-justify-end":"gp-justify-center"),style:{...i},id:`shopify-text-element-${l?.uid}`,"data-product-id":h,children:[jsxRuntime.jsx("div",{className:"gp-flex gp-flex-col",style:{...core.makeStyleResponsive("w",b),gap:R},children:q.map((e,t)=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(MoneyLine.default,{uniqueId:e.uniqueId,builderPropsUID:l?.uid,title:e.title,money:e.money,tooltipData:e.tooltip,labelTextStyles:{typo:j},moneyTextStyles:{typo:f}}),t==q.length-2&&jsxRuntime.jsx("hr",{})]},e.uniqueId))}),r]})}):null]})};exports.default=PostPurchaseProductPriceBreakdown;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core");const devices=["desktop","mobile","tablet"],getDisplayStyle=(e,t)=>{let r={};return devices.forEach(o=>{r={...r,[`--d${"desktop"===o?"":`-${o}`}`]:`${e(o)?"none":t}`}}),r},ProductDescription=({setting:e,advanced:t})=>{let{htmlTag:r}=e??{},o=core.composeTypographyClassName(e?.typo,e?.typography),s=core.composeTypographyStyle(e?.typo,e?.typography),a={...core.getStyleShadow({value:e?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.hasTextShadow}),...core.makeStyleResponsive("ta",e?.textAlign),...core.getGlobalColorStyle(e?.color),...core.makeStyle({tt:e?.transform}),...s},
|
|
2
|
-
<gp-product-description class="${t?.cssClass}" gp-data='${JSON.stringify({setting:e,styles:e,defaultStyle:a,collapseStyle:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core");const devices=["desktop","mobile","tablet"],getDisplayStyle=(e,t)=>{let r={};return devices.forEach(o=>{r={...r,[`--d${"desktop"===o?"":`-${o}`}`]:`${e(o)?"none":t}`}}),r},ProductDescription=({setting:e,advanced:t})=>{let{htmlTag:r}=e??{},o=core.composeTypographyClassName(e?.typo,e?.typography),s=core.composeTypographyStyle(e?.typo,e?.typography),a={...core.getStyleShadow({value:e?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.hasTextShadow}),...core.makeStyleResponsive("ta",e?.textAlign),...core.getGlobalColorStyle(e?.color),...core.makeStyle({tt:e?.transform}),...s},p={...a,...core.makeStyleResponsive("line-clamp",core.makeLineClamp(e?.lineClamp,e?.hasLineClamp))},l=()=>getDisplayStyle(t=>!!e?.hasLineClamp&&void 0!==e.hasLineClamp[t]&&!e.hasLineClamp[t],"block"),i="html"===r?"div":"p";return core.template`
|
|
2
|
+
<gp-product-description class="${t?.cssClass}" gp-data='${JSON.stringify({setting:e,styles:e,defaultStyle:a,collapseStyle:p}).replaceAll("'","'")}'>
|
|
3
3
|
{%- unless product -%}
|
|
4
4
|
<p>Product not found</p>
|
|
5
5
|
{%- else -%}
|
|
6
6
|
<${i}
|
|
7
7
|
class="${core.cls("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",o,core.getGlobalColorClass("text",e?.color),"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")}"
|
|
8
|
-
style="${
|
|
8
|
+
style="${p}"
|
|
9
9
|
>
|
|
10
10
|
${"html"===r?"{{product.description}}":"{{product.description | strip_html}}"}
|
|
11
11
|
</${i}>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<button
|
|
14
14
|
type="button"
|
|
15
15
|
class="p-description-show-more ${core.cls(o,core.getGlobalColorClass("text",e?.showMoreColor),"gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full")}"
|
|
16
|
-
style="${{...core.makeStyle({tt:e?.transform}),...core.makeStyleResponsive("ta",e?.textAlign),...s,...core.getGlobalColorStyle(e?.showMoreColor),...
|
|
16
|
+
style="${{...core.makeStyle({tt:e?.transform}),...core.makeStyleResponsive("ta",e?.textAlign),...s,...core.getGlobalColorStyle(e?.showMoreColor),...l(),position:"absolute",visibility:"hidden"}}"
|
|
17
17
|
>
|
|
18
18
|
|
|
19
19
|
${e?.viewMoreText}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),react=require("react"),Loading=require("../../common/components/Loading.js"),Carousel=require("../../carousel/components/Carousel.js"),CarouselItem=require("../../carousel/components/CarouselItem.js"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),arrow=require("../../carousel/components/common/arrow.js"),dots=require("../../carousel/components/common/dots.js"),SalePageProductListWarning=require("./SalePageProductListWarning.js"),carousel=require("../../carousel/components/common/carousel.js"),product=require("../helpers/product.js");const ProductNotFound=dynamic(()=>Promise.resolve().then(function(){return require("./ProductNotFound.js")}),{loading:Loading.default}),ProductList=({children:e,className:t,setting:o,styles:r})=>{let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),react=require("react"),Loading=require("../../common/components/Loading.js"),Carousel=require("../../carousel/components/Carousel.js"),CarouselItem=require("../../carousel/components/CarouselItem.js"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),arrow=require("../../carousel/components/common/arrow.js"),dots=require("../../carousel/components/common/dots.js"),SalePageProductListWarning=require("./SalePageProductListWarning.js"),carousel=require("../../carousel/components/common/carousel.js"),product=require("../helpers/product.js");const ProductNotFound=dynamic(()=>Promise.resolve().then(function(){return require("./ProductNotFound.js")}),{loading:Loading.default}),ProductList=({children:e,className:t,setting:o,styles:r,builderProps:d})=>{let i=core.useEditorMode(),l=core.usePageType(),a=o?.productSetting??{},s=core.usePageStore(e=>e.dynamicCollection),n="GP_COLLECTION"==l;n&&(a.productSrc="DynamicCollection",a.collectionId=s?.collectionId??"latest");let c=react.useMemo(()=>"GP_FUNNEL_PAGE"===l,[l]),u=react.useMemo(()=>arrow.getUpdatedArrowDisplay(o?.arrow,o?.controlOverContent),[o?.arrow,o?.controlOverContent]),[p,m]=react.useState(),[g,h]=react.useState(!1),P="RelatedProduct"===a.productSrc,x=react.useMemo(()=>dots.getUpdatedDotStyle(o?.dot),[o?.dot]),j=a?.productSrc??"Collection",y=react.useMemo(()=>({id:a?.collectionId??"latest",numberOfProducts:o?.numberOfProducts??4,orderBy:o?.orderBy==="none"?"CREATED_AT_DESC":o?.orderBy}),[a?.collectionId,o?.numberOfProducts,o?.orderBy]),{data:S}=core.useProductQuery(P&&o?.productSetting?.relatedProductId?o.productSetting.relatedProductId:void 0);react.useEffect(()=>{if(P&&S&&a.relatedTag&&"recommended-product"!==a.relatedType){let e;switch(h(!1),a.hasRelatedExclude&&(e=a?.relatedExclude&&a.relatedExclude.split(",").map(e=>e.trim())),a.relatedTag[0]){case"vendor":m({vendor:a.relatedTag&&"vendor"===a.relatedTag[0]?S?.vendor:"",limit:o?.numberOfProducts,idNEQ:S.id});break;case"collection":{let t;let r=S?.collections?.edges.map(e=>e.node?.id);if(!r||r?.length===0){h(!0);break}m(t=e&&e.length>0?{idNEQ:S.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:r},{titleNotIn:e}]}],limit:o?.numberOfProducts}:{idNEQ:S.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:r}]}],limit:o?.numberOfProducts});break}case"tags":{let t;if(!S.tags||0===S.tags.length){h(!0);break}m(t=e&&e.length>0?{idNEQ:S.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:S.tags},{nameNotIn:e}]}],limit:o?.numberOfProducts}:{idNEQ:S.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:S.tags}]}],limit:o?.numberOfProducts})}}}},[S,a.relatedType,a.relatedTag,o?.numberOfProducts,a.relatedExclude,a.hasRelatedExclude,P]);let C=core.useCollectionQuery("PickProduct"!==j?y:void 0),v=core.useProductsQuery("PickProduct"===j?a?.productIds:void 0,{revalidateOnMount:"edit"===i},{defaultSelectedProductCount:a?.numOfSelectedProducts}),f=core.useProductsQueryAll(p,{revalidateOnMount:"edit"===i}),[b,w]=react.useState(!0),T="PickProduct"===j?v.isValidating:C.isValidating,R="PickProduct"===j?v.isLoading:C.isLoading,k="PickProduct"===j?v.error:C.error,I=C.data?.collections?.edges?.[0]?.node,O="PickProduct"===j?core.flattenConnection(v.data?.products):core.flattenConnection(I?.products),E=f?.data?.products?core.flattenConnection(f?.data?.products):void 0,W=P&&E?E:"PickProduct"===j&&a?.productIds?.length?a?.productIds?.map(e=>O?.find(t=>t?.baseID===e)).filter(Boolean)??O:"PickProduct"!==j?O:O.filter((e,t)=>t<(a?.numOfSelectedProducts||4));return d?.isPreview&&c?null:g&&P&&"edit"==i?jsxRuntime.jsx(ProductNotFound,{collectionHandle:I?.handle,productSrc:j,onClose:()=>w(!1),children:e}):W.length||R||"edit"!=i?jsxRuntime.jsx(jsxRuntime.Fragment,{children:T||R?jsxRuntime.jsx(Loading.default,{}):k?jsxRuntime.jsxs("div",{children:["Error: ",k?.message]}):!W||g&&P?jsxRuntime.jsx("div",{children:"Products not found"}):jsxRuntime.jsx(core.ProductListProvider,{collection:I,products:W,settings:{loop:o?.loop??{desktop:!1},scrollMode:o?.scrollMode??{desktop:"snap"},slidesToShow:o?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:r?.layout,dot:o?.dot,dotStyle:o?.dotStyle,arrow:o?.arrow,controlOverContent:o?.controlOverContent},styles:{horizontalGutter:r?.horizontalGutter,verticalGutter:r?.verticalGutter,fullWidth:r?.fullWidth,spacing:r?.spacing,width:r?.width,height:r?.height},children:jsxRuntime.jsxs("div",{className:"gp-relative",children:[c&&jsxRuntime.jsx(SalePageProductListWarning.default,{}),r?.layout==="grid"?jsxRuntime.jsx("div",{style:{...core.makeStyleResponsive("w",core.makeWidth(r?.width,r?.fullWidth)),...core.makeStyleResponsive("rg",r?.horizontalGutter),...core.makeStyleResponsive("cg",r?.verticalGutter),...core.makeStyleResponsive("gtc",{desktop:`repeat(${core.getResponsiveValueByScreen(o?.slidesToShow,"desktop")}, minmax(0, 1fr))`,tablet:o?.slidesToShow?.tablet&&`repeat(${core.getResponsiveValueByScreen(o?.slidesToShow,"tablet")}, minmax(0, 1fr))`,mobile:o?.slidesToShow?.mobile&&`repeat(${core.getResponsiveValueByScreen(o?.slidesToShow,"mobile")}, minmax(0, 1fr))`})},className:core.cls(t,"gp-m-auto gp-grid gp-w-full"),children:W?.length?W?.map(t=>jsxRuntime.jsx(core.ProductProvider,{product:t,readOnly:!0,children:jsxRuntime.jsx("div",{..."edit"===i?{"data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":t?.baseID?.replace("gid://shopify/Product/","")}:{},children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})},t?.baseID)):null}):jsxRuntime.jsx(Carousel.default,{setting:{loop:o?.loop,slidesToShow:o?.slidesToShow,dot:o?.dot,dotStyle:x,dotSize:{desktop:12},dotGapToCarousel:{desktop:16},navigationStyle:u,arrowCustom:o?.arrowCustom,controlOverContent:o?.controlOverContent,enableDrag:{desktop:o?.dragToScroll,tablet:o?.dragToScroll,mobile:o?.dragToScroll},speed:o?.speed,dotActiveColor:o?.dotActiveColor,dotColor:o?.dotColor,autoplay:o?.autoplay,pauseOnHover:o?.pauseOnHover,autoplayTimeout:o?.autoplayTimeout,arrowCustomColor:o?.arrowCustomColor,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootClass:"gp-justify-center",styles:{sizeSetting:{...product.getSizeSetting({adaptiveHeight:r?.adaptiveHeight,fullWidth:r?.fullWidth,width:r?.width,height:r?.height})},spacing:r?.spacing},children:W?.map(t=>jsxRuntime.jsx(CarouselItem.default,{style:{...carousel.getInitialWidthForCarouselItem({spacing:r?.spacing,slidesToShow:o?.slidesToShow})},children:jsxRuntime.jsx(core.ProductProvider,{product:t,readOnly:!0,children:jsxRuntime.jsx("div",{..."edit"===i?{"data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":t?.baseID?.replace("gid://shopify/Product/","")}:{},children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})})},t?.baseID))})]})})}):b?jsxRuntime.jsx(ProductNotFound,{collectionHandle:I?.handle,productSrc:j,onClose:()=>w(!1),children:e}):null};exports.default=ProductList;
|
|
@@ -152,7 +152,7 @@ ${core.RenderIf(core.isLocalEnv,'<script src="{{ \'gp-product.v2.js\' | asset_ur
|
|
|
152
152
|
endif
|
|
153
153
|
endfor
|
|
154
154
|
endif
|
|
155
|
-
if relatedTag == '
|
|
155
|
+
if relatedTag == 'tags'
|
|
156
156
|
assign tagsAssignProduct = assignProduct.tags
|
|
157
157
|
for item in allProducts
|
|
158
158
|
assign handle = item.handle
|
|
@@ -2,7 +2,7 @@ let config={tag:"Button",label:"Button",icon:`
|
|
|
2
2
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M3.16699 6.66663C2.89085 6.66663 2.66699 6.89048 2.66699 7.16663V26.1666C2.66699 26.4428 2.89085 26.6666 3.16699 26.6666H13.5531C13.8587 26.6666 14.0929 26.3948 14.0475 26.0925L13.7975 24.4258C13.7608 24.181 13.5506 24 13.3031 24H5.33366V9.33329H34.667V24H32.5003C32.2242 24 32.0003 24.2238 32.0003 24.5V25.1121C32.0003 25.253 32.0597 25.3873 32.164 25.4821L33.324 26.5366C33.416 26.6203 33.5359 26.6666 33.6603 26.6666H36.8337C37.1098 26.6666 37.3337 26.4428 37.3337 26.1666V7.16663C37.3337 6.89048 37.1098 6.66663 36.8337 6.66663H3.16699ZM19.8589 29.6767C19.9172 30.0846 20.4161 30.2509 20.7074 29.9595L22.667 28L27.6468 32.9797C27.842 33.175 28.1586 33.175 28.3539 32.9797L30.3134 31.0202C30.5087 30.8249 30.5087 30.5083 30.3134 30.3131L25.3337 25.3333L27.2932 23.3737C27.5846 23.0824 27.4183 22.5835 27.0104 22.5252L19.327 21.4276C18.997 21.3804 18.7141 21.6633 18.7613 21.9933L19.8589 29.6767Z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"Button"},{id:"translate",type:"input",default:"label"},{id:"btnLink",type:"pick-link",pickLinkLabel:"Button link",label:"Pick Link",default:{link:"",target:"_self"}},{id:"iconGroup",type:"group",label:"Icon",controls:[{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"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconAlign",label:"Icon Alignment",type:"segment",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"behavior-state",type:"behavior-state",controls:[{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{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:"boxShadow",label:"Button Shadow",hideOnState:{normal:!0,hover:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}}]},{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:"left"}}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1"},ignoreReRender:!0,hiddenSetting:{color:!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:"dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}}]},{id:"dimensions1",type:"group",label:"Icon Dimension",controls:[{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:"range",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}},{id:"spacing",label:"Spacing Icon",type:"input:unit",units:["px","em","rem","%"],placeholder:"Auto",default:"8px"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"8px",bottom:"8px",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"]}]}],ui:[{type:"group",controls:[{type:"control",label:{en:"Icon"},options:{label:"large"},setting:{id:"iconVisible"}},{type:"group",condition:"iconVisible == true",controls:[{type:"control",layout:"vertical",setting:{id:"iconSvg"}},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},options:{styleWrapper:{marginBottom:"0 !important"}}}]}]},{type:"control",label:{en:"
|
|
5
|
+
`,settings:[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"Button"},{id:"translate",type:"input",default:"label"},{id:"btnLink",type:"pick-link",pickLinkLabel:"Button link",label:"Pick Link",default:{link:"",target:"_self"}},{id:"iconGroup",type:"group",label:"Icon",controls:[{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"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconAlign",label:"Icon Alignment",type:"segment",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"behavior-state",type:"behavior-state",controls:[{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{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:"boxShadow",label:"Button Shadow",hideOnState:{normal:!0,hover:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}}]},{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:"left"}}},{id:"typo",type:"typography-v2",default:{type:"paragraph-1"},ignoreReRender:!0,hiddenSetting:{color:!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:"dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:void 0}}}]},{id:"dimensions1",type:"group",label:"Icon Dimension",controls:[{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:"range",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}},{id:"spacing",label:"Spacing Icon",type:"input:unit",units:["px","em","rem","%"],placeholder:"Auto",default:"8px"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"8px",bottom:"8px",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"]}]}],ui:[{type:"group",controls:[{type:"control",label:{en:"Icon"},options:{label:"large"},setting:{id:"iconVisible"}},{type:"group",condition:"iconVisible == true",controls:[{type:"control",layout:"vertical",setting:{id:"iconSvg"}},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},options:{styleWrapper:{marginBottom:"0 !important"}}}]}]},{type:"control",label:{en:"Insert link"},layout:"vertical",setting:{id:"btnLink"}},{type:"group",label:{en:"Size"},controls:[{type:"control",setting:{id:"globalSize"},layout:"vertical"}]},{type:"group",label:{en:"States"},options:{labelSpacing:"small"},controls:[{type:"tab",controls:[{type:"group",label:{en:"Normal"},controls:[{type:"control",label:{en:"Background color"},setting:{id:"backgroundColor",state:"normal"}},{type:"control",label:{en:"Text color"},setting:{id:"textColor",state:"normal"}},{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"borderBtn",state:"normal"}},{type:"control",label:{en:"Corner"},setting:{id:"roundedBtn",state:"normal"}},{type:"control",label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"normal"}},{type:"group",condition:"hasBoxShadowBtn.normal == true",controls:[{type:"control",layout:"vertical",setting:{id:"boxShadowBtn",state:"normal"}}]}]},{type:"group",label:{en:"Hover"},controls:[{type:"control",label:{en:"Background color"},setting:{id:"backgroundColor",state:"hover"}},{type:"control",label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{type:"control",label:{en:"Corner"},setting:{id:"roundedBtn",state:"hover"}},{type:"control",label:{en:"Shadow"},setting:{id:"hasBoxShadowBtn",state:"hover"}},{type:"group",condition:"hasBoxShadowBtn.hover == true",controls:[{type:"control",setting:{id:"boxShadowBtn",state:"hover"},layout:"vertical"}]}]}]}]},{type:"group",label:{en:"Text"},controls:[{type:"control",setting:{id:"typo"},layout:"vertical"}]},{type:"control",label:{en:"Align"},condition:"globalSize.width !== '100%'",options:{label:"large"},setting:{id:"align"}}],editorConfigs:{slots:{children:!1}},presets:[{id:"button",name:{en:"Button"},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="96" height="48" rx="3" fill="#424242"/>
|
|
8
8
|
<rect x="21.5" y="20" width="53" height="8" rx="4" fill="#757575"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{usePageType as a,cls as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{usePageType as a,cls as i,getGlobalColorResponsiveStyle as d,makeStyleResponsive as m}from"@gem-sdk/core";import o from"next/dynamic";import{useMemo as t}from"react";import n from"./SalePageHeaderWarning.js";let BasicHeader=o(()=>import("./kind/basic/index.js")),ModernHeader=o(()=>import("./kind/modern/index.js")),Header=({builderAttrs:o,builderProps:s,style:l,setting:c,styles:p,children:f})=>{let{kind:g,...H}=c??{},u="morden"===g?ModernHeader:BasicHeader,h=a(),x=t(()=>"GP_FUNNEL_PAGE"===h,[h]);return s?.isPreview&&x?null:e("nav",{className:i("gp-w-full",s?.uid),...o,style:{...l,...d("bgc",p?.headerBg),...m("h",p?.height)},children:[x&&r(n,{}),r(u,{...H,...p}),f]})};export{Header as default};
|
|
@@ -3,7 +3,7 @@ let config={tag:"Icon",label:"Icon",icon:`
|
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8255 2.7925C12.9604 1.28792 10.7896 1.28791 9.92446 2.7925L6.76725 8.2833C5.90475 9.7833 6.9875 11.6549 8.71779 11.6549H15.0322C16.7625 11.6549 17.8452 9.7833 16.9827 8.2833L13.8255 2.7925ZM11.2248 3.54021C11.5132 3.03868 12.2368 3.03868 12.5252 3.54021L15.6824 9.03101C15.9699 9.53101 15.609 10.1549 15.0322 10.1549H8.71779C8.14103 10.1549 7.78011 9.53101 8.06761 9.03101L11.2248 3.54021ZM12.375 17.3389C12.375 14.5775 14.6136 12.3389 17.375 12.3389C20.1364 12.3389 22.375 14.5775 22.375 17.3389C22.375 20.1004 20.1364 22.3389 17.375 22.3389C14.6136 22.3389 12.375 20.1004 12.375 17.3389ZM17.375 13.8389C15.442 13.8389 13.875 15.4059 13.875 17.3389C13.875 19.2719 15.442 20.8389 17.375 20.8389C19.308 20.8389 20.875 19.2719 20.875 17.3389C20.875 15.4059 19.308 13.8389 17.375 13.8389ZM1.625 14.8389C1.625 13.5963 2.63236 12.5889 3.875 12.5889H8.875C10.1176 12.5889 11.125 13.5963 11.125 14.8389V19.8389C11.125 21.0816 10.1176 22.0889 8.875 22.0889H3.875C2.63236 22.0889 1.625 21.0816 1.625 19.8389V14.8389ZM3.875 14.0889C3.46079 14.0889 3.125 14.4247 3.125 14.8389V19.8389C3.125 20.2532 3.46079 20.5889 3.875 20.5889H8.875C9.28921 20.5889 9.625 20.2532 9.625 19.8389V14.8389C9.625 14.4247 9.28921 14.0889 8.875 14.0889H3.875Z" fill="white"/>
|
|
4
4
|
</svg>
|
|
5
5
|
|
|
6
|
-
`,settings:[{id:"setting",controls:[{id:"iconSvg",type:"icon",label:"Icon",info:"Choose from list or paste any SVG icon",default:'<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="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconLink",type:"pick-link",label:"Source URL",default:{link:"",target:"_self",title:""}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"colorpicker",label:"Background Color",state:{hover:!0,normal:!0}},{id:"color",type:"colorpicker",label:"Color",default:{normal:"line-3"},state:{hover:!0,normal:!0}},{id:"iconBorder",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#000000",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"iconRounded",type:"radius-preset",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},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"}]}]}],ui:[{type:"group",options:{label:"large"},label:{en:"Icon"},controls:[{type:"control",setting:{id:"iconSvg"},layout:"vertical",options:{styleControl:{"max-width":"100%"}}},{type:"control",label:{en:"Size"},setting:{id:"iconWidth"}},{type:"control",label:{en:"Inside spacing"},setting:{id:"iconSpacing"}}]},{type:"control",label:{en:"
|
|
6
|
+
`,settings:[{id:"setting",controls:[{id:"iconSvg",type:"icon",label:"Icon",info:"Choose from list or paste any SVG icon",default:'<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="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>'},{id:"iconLink",type:"pick-link",label:"Source URL",default:{link:"",target:"_self",title:""}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"colorpicker",label:"Background Color",state:{hover:!0,normal:!0}},{id:"color",type:"colorpicker",label:"Color",default:{normal:"line-3"},state:{hover:!0,normal:!0}},{id:"iconBorder",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#000000",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"iconRounded",type:"radius-preset",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},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"}]}]}],ui:[{type:"group",options:{label:"large"},label:{en:"Icon"},controls:[{type:"control",setting:{id:"iconSvg"},layout:"vertical",options:{styleControl:{"max-width":"100%"}}},{type:"control",label:{en:"Size"},setting:{id:"iconWidth"}},{type:"control",label:{en:"Inside spacing"},setting:{id:"iconSpacing"}}]},{type:"control",label:{en:"Insert link"},layout:"vertical",setting:{id:"iconLink"}},{type:"group",label:{en:"Color & border"},controls:[{type:"control",label:{en:"Icon color"},setting:{id:"color",state:"normal"}},{type:"control",label:{en:"Background color"},setting:{id:"bgColor",state:"normal"}},{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"iconBorder",state:"normal"}},{type:"control",label:{en:"Corner"},setting:{id:"iconRounded",state:"normal"}}]},{type:"control",label:{en:"Align"},setting:{id:"align"}}],presets:[{id:"icon",name:{en:"Icon"},icon:{desktop:`
|
|
7
7
|
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
8
|
<path d="M47.283 7.62515C47.5764 7.03055 48.4243 7.03055 48.7177 7.62515L52.251 14.7844C52.3676 15.0205 52.5928 15.1842 52.8534 15.222L60.7541 16.3701C61.4102 16.4654 61.6722 17.2718 61.1974 17.7346L55.4804 23.3073C55.2919 23.4911 55.2059 23.7559 55.2504 24.0154L56.6 31.8842C56.7121 32.5377 56.0261 33.0361 55.4392 32.7275L48.3726 29.0124C48.1396 28.8899 47.8611 28.8898 47.6281 29.0124L40.5615 32.7275C39.9746 33.0361 39.2886 32.5377 39.4007 31.8842L40.7503 24.0154C40.7948 23.7559 40.7088 23.4911 40.5202 23.3073L34.8033 17.7346C34.3284 17.2718 34.5904 16.4654 35.2466 16.3701L43.1473 15.222C43.4079 15.1842 43.6331 15.0205 43.7497 14.7844L47.283 7.62515Z" fill="#D6D6D6"/>
|
|
9
9
|
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";let DEVICES=["desktop","tablet","mobile"],getSrcSet=(e,t,r)=>e?getSrcSetLiquid(e,t):getSrcSetLink(r),isCannotResizeImage=e=>e.includes("webp")||e.includes("jfif")||e.includes(".svg")||e.includes(".tiff"),getSrcSetLiquid=(e,t)=>{let r=replaceBackupFileKeyFileContent(e);return isCannotResizeImage(e)?"FILE_CONTENT"==t?`{{ '${r}' | file_url }} 768w, {{ '${r}' | file_url }} 1024w, {{ '${r}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${r}' | file_img_url: '768x768' }} 768w, {{ '${r}' | file_img_url: '1024x1024' }} 1024w, {{ '${r}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x768' }} 768w, {{ '${e}' | asset_img_url: '1024x1024' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},getSrcSetLink=e=>`${e} 768w,${e} 1024w,${e} 1440w`,getImageSrc=e=>{let t=e?.backupFilePath;return e?.backupFileKey&&("THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(t=`{{ "${replaceBackupFileKeyFileContent(e.backupFileKey)}" | file_url }}`):t=`{{ "${e.backupFileKey}" | asset_url }}`),t??e?.src},replaceBackupFileKeyFileContent=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),getNewBackupFileKey=(e,t)=>{let r=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp))$/)?.[1];return r&&r!=e?r:e};function resizeImage(e,t){let r=e.match(/\.webp/g)?.length,i=replaceRegexLastMatch({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(r)return i;let l=replaceRegexLastMatch({str:i,reg:/\.jpg|\.png|\.gif|\.jpeg/g,newString:t,isAdd:!0});return l}let replaceRegexLastMatch=e=>{let t=e.str,r=e.str.match(e.reg)?.length;if(r){let i,l=1;for(;null!==(i=e.reg.exec(e.str));){if(l===r){let r=e.reg.lastIndex,l=r-i[0].length;e.isAdd&&(e.newString="_"+e.newString+i),t=t.slice(0,l)+e.newString+t.slice(r,t.length)}l++}}return t},getItemWidth=(e,t)=>{let r=getCurrentDevice(),i=t?.[r]||"auto";if(!i||"auto"===i||i.includes("%"))return e;let l=Number(i.replace("px",""));return l>e?e:Number(i.replace("px",""))},getImageWidthFollowByQuality=t=>{let{itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}=t,g=getCurrentDevice(),n=getItemWidth(r,i),u=e(l,g,"finest"),c=e(a,g,100);switch(u){case"finest":default:return"auto";case"high":return Math.round(1.5*n)||1;case"medium":return Math.round(n)||1;case"custom":return Math.round(n*(Number(c)/100))||1}},getWidthOfFeatureImageSetting=t=>{let r={desktop:"100%",tablet:"100%",mobile:"100%"};return DEVICES.forEach(i=>{let l=e(t,i)?.width||"100%";r[i]=l}),r},getWidthOfImageListSetting=t=>{let r={desktop:"100%",tablet:"100%",mobile:"100%"};return DEVICES.forEach(i=>{let l=e(t,i)?.width||"100%";r[i]=l}),r},getWidthOfListImageInDom=()=>{let e=document.querySelectorAll(".gp-gallery-image-item"),t=0;return e.forEach(e=>{e.offsetWidth>t&&(t=e.offsetWidth)}),t},getWidthOfFeatureImageInDom=()=>{let e=document.querySelectorAll(".gp-ft-image-item"),t=0;return e.forEach(e=>{e.offsetWidth>t&&(t=e.offsetWidth)}),t},handleSetSrcForProductImageList=e=>{let{shapeByLayout:t,qualityType:r,qualityPercent:i,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),g=getWidthOfImageListSetting(t),n=getWidthOfListImageInDom();a.forEach(e=>{handleSetSrcForGalleryImage({item:e,settingWidth:g,width:n,qualityType:r,qualityPercent:i})})},handleSetSrcForFeatureProductImage=e=>{let{ftShape:t,qualityType:r,qualityPercent:i,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),g=getWidthOfFeatureImageSetting(t),n=getWidthOfFeatureImageInDom();a.forEach(e=>{handleSetSrcForGalleryImage({item:e,settingWidth:g,width:n,qualityType:r,qualityPercent:i})})},handleSetSrcForGalleryImage=e=>{let{item:t,settingWidth:r,width:i,qualityType:l,qualityPercent:a}=e,g=getCurrentDevice(),n=t.querySelector("img");if(n){let e=getImageWidthFollowByQuality({itemWidthParam:i,imageWidthSetting:r,qualityType:l,qualityPercent:a}),t=n.getAttribute("base-src");if(!t)return;let u=getImageSrcByQuality(e,t),c=getImageSrcSet(t,u,g)
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";let DEVICES=["desktop","tablet","mobile"],getSrcSet=(e,t,r)=>e?getSrcSetLiquid(e,t):getSrcSetLink(r),isCannotResizeImage=e=>e.includes("webp")||e.includes("jfif")||e.includes(".svg")||e.includes(".tiff"),getSrcSetLiquid=(e,t)=>{let r=replaceBackupFileKeyFileContent(e);return isCannotResizeImage(e)?"FILE_CONTENT"==t?`{{ '${r}' | file_url }} 768w, {{ '${r}' | file_url }} 1024w, {{ '${r}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${r}' | file_img_url: '768x768' }} 768w, {{ '${r}' | file_img_url: '1024x1024' }} 1024w, {{ '${r}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x768' }} 768w, {{ '${e}' | asset_img_url: '1024x1024' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},getSrcSetLink=e=>`${e} 768w,${e} 1024w,${e} 1440w`,getImageSrc=e=>{let t=e?.backupFilePath;return e?.backupFileKey&&("THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(t=`{{ "${replaceBackupFileKeyFileContent(e.backupFileKey)}" | file_url }}`):t=`{{ "${e.backupFileKey}" | asset_url }}`),t??e?.src},replaceBackupFileKeyFileContent=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),getNewBackupFileKey=(e,t)=>{let r=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp))$/)?.[1];return r&&r!=e?r:e};function resizeImage(e,t){let r=e.match(/\.webp/g)?.length,i=replaceRegexLastMatch({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(r)return i;let l=replaceRegexLastMatch({str:i,reg:/\.jpg|\.png|\.gif|\.jpeg/g,newString:t,isAdd:!0});return l}let replaceRegexLastMatch=e=>{let t=e.str,r=e.str.match(e.reg)?.length;if(r){let i,l=1;for(;null!==(i=e.reg.exec(e.str));){if(l===r){let r=e.reg.lastIndex,l=r-i[0].length;e.isAdd&&(e.newString="_"+e.newString+i),t=t.slice(0,l)+e.newString+t.slice(r,t.length)}l++}}return t},getItemWidth=(e,t)=>{let r=getCurrentDevice(),i=t?.[r]||"auto";if(!i||"auto"===i||i.includes("%"))return e;let l=Number(i.replace("px",""));return l>e?e:Number(i.replace("px",""))},getImageWidthFollowByQuality=t=>{let{itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}=t,g=getCurrentDevice(),n=getItemWidth(r,i),u=e(l,g,"finest"),c=e(a,g,100);switch(u){case"finest":default:return"auto";case"high":return Math.round(1.5*n)||1;case"medium":return Math.round(n)||1;case"custom":return Math.round(n*(Number(c)/100))||1}},getWidthOfFeatureImageSetting=t=>{let r={desktop:"100%",tablet:"100%",mobile:"100%"};return DEVICES.forEach(i=>{let l=e(t,i)?.width||"100%";r[i]=l}),r},getWidthOfImageListSetting=t=>{let r={desktop:"100%",tablet:"100%",mobile:"100%"};return DEVICES.forEach(i=>{let l=e(t,i)?.width||"100%";r[i]=l}),r},getWidthOfListImageInDom=()=>{let e=document.querySelectorAll(".gp-gallery-image-item"),t=0;return e.forEach(e=>{e.offsetWidth>t&&(t=e.offsetWidth)}),t},getWidthOfFeatureImageInDom=()=>{let e=document.querySelectorAll(".gp-ft-image-item"),t=0;return e.forEach(e=>{e.offsetWidth>t&&(t=e.offsetWidth)}),t},handleSetSrcForProductImageList=e=>{let{shapeByLayout:t,qualityType:r,qualityPercent:i,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),g=getWidthOfImageListSetting(t),n=getWidthOfListImageInDom();a.forEach(e=>{handleSetSrcForGalleryImage({item:e,settingWidth:g,width:n,qualityType:r,qualityPercent:i})})},handleSetSrcForFeatureProductImage=e=>{let{ftShape:t,qualityType:r,qualityPercent:i,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),g=getWidthOfFeatureImageSetting(t),n=getWidthOfFeatureImageInDom();a.forEach(e=>{handleSetSrcForGalleryImage({item:e,settingWidth:g,width:n,qualityType:r,qualityPercent:i})})},handleSetSrcForGalleryImage=e=>{let{item:t,settingWidth:r,width:i,qualityType:l,qualityPercent:a}=e,g=getCurrentDevice(),n=t.querySelector("img");if(n){let e=getImageWidthFollowByQuality({itemWidthParam:i,imageWidthSetting:r,qualityType:l,qualityPercent:a}),t=n.getAttribute("base-src");if(!t)return;let u=getImageSrcByQuality(e,t),c=getImageSrcSet(t,u,g);n.setAttribute("srcset",c)}},getImageSrcByQuality=(e,t)=>"auto"===e?t:resizeImage(t,`${e}x`),getImageSrcSet=(e,t,r)=>`${"mobile"===r&&e!==t?t:resizeImage(e,"768x768")} 767w, ${"tablet"===r&&e!==t?t:resizeImage(e,"1024x1024")} 1023w, ${"desktop"===r&&e!==t?t:resizeImage(e,"1920x1920")} 1440w`,getCurrentDevice=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1024?"tablet":"desktop";export{DEVICES,getCurrentDevice,getImageSrc,getImageWidthFollowByQuality,getNewBackupFileKey,getSrcSet,handleSetSrcForFeatureProductImage,handleSetSrcForProductImageList,isCannotResizeImage,replaceBackupFileKeyFileContent,resizeImage};
|
|
@@ -5,7 +5,7 @@ let config={tag:"Image",label:"Image",icon:`
|
|
|
5
5
|
`,settings:[{id:"setting",controls:[{id:"image-info",label:"Image",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/",width:2237,height:1678}},{id:"srcSet",type:"image",label:"Device Image",hide:!0,devices:{desktop:{default:{src:"https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/",width:2237,height:1678}}}},{id:"isAdaptive",type:"toggle",label:"Adaptive",default:!1,hideOnMode:{mobileOnly:!0}}]},{id:"imageLink",type:"pick-link",label:"Pick Link",default:{link:"",target:"_self"}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:100,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist logo design, casual and versatile style"},{id:"title",label:"Image title",info:"Show title when hover to image",type:"input",placeholder:"E.g: White t-shirt"}]},{id:"optimize",type:"group",label:"Optimize",hiddenWithGemPages:!0,controls:[{id:"priority",type:"toggle",label:"Preload",default:!1},{id:"quality",type:"range",label:"Quality",min:1,max:100,step:1,default:70,info:"The quality of the image. The higher the quality, the better the image will look, but the larger the file size."}]}]},{id:"style",controls:[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"objectFit",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image"},{label:"Fit image",value:"contain",type:"image"}],devices:{desktop:{default:"cover"}}},{id:"align",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"shapeBorder",type:"border",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#000000",isCustom:!0}},{id:"shapeRounded",type:"radius-preset",label:"Corner",default:{radiusType:"none"}},{id:"shapeHasBoxShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shapeBoxShadow",type:"boxShadow",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}}]}],ui:[{type:"group",label:{en:"Image"},options:{labelSpacing:"small"},controls:[{type:"control",condition:"isAdaptive === false",label:{en:"Choose Image"},layout:"vertical",setting:{id:"image"},options:{tooltip:{icon:"info-line-16",content:`For the best display, set these image sizes as recommended: <br />
|
|
6
6
|
• Desktop/Laptop: 1920px <br />
|
|
7
7
|
• Mobile: 375px <br />
|
|
8
|
-
• Tablet: 1024px`,iconClass:"text-[#757575] hover:text-[#F9F9F9]",containerClass:"w-[232px] whitespace-normal lead-5",enableTeleport:!0}}},{type:"control",condition:"isAdaptive === true",layout:"vertical",label:{en:"Image"},setting:{id:"srcSet"}},{type:"control",label:{en:"Adaptive"},options:{info:"near"},setting:{id:"isAdaptive"},isMoreSetting:!0},{type:"control",label:{en:"Preload"},options:{info:"near"},setting:{id:"priority"},isMoreSetting:!0,condition:"sectionIndex === 0"}]},{type:"control",label:{en:"
|
|
8
|
+
• Tablet: 1024px`,iconClass:"text-[#757575] hover:text-[#F9F9F9]",containerClass:"w-[232px] whitespace-normal lead-5",enableTeleport:!0}}},{type:"control",condition:"isAdaptive === true",layout:"vertical",label:{en:"Choose Image"},setting:{id:"srcSet"}},{type:"control",label:{en:"Adaptive"},options:{info:"near"},setting:{id:"isAdaptive"},isMoreSetting:!0},{type:"control",label:{en:"Preload"},options:{info:"near"},setting:{id:"priority"},isMoreSetting:!0,condition:"sectionIndex === 0"}]},{type:"control",label:{en:"Insert link"},setting:{id:"imageLink"},layout:"vertical"},{type:"group",label:{en:"Size"},controls:[{type:"control",setting:{id:"shape"},layout:"vertical"},{type:"control",label:{en:"Image scale"},setting:{id:"objectFit"}}]},{type:"group",label:{en:"Shape"},controls:[{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"shapeBorder"}},{type:"control",label:{en:"Corner"},setting:{id:"shapeRounded"}},{type:"control",label:{en:"Shadow"},setting:{id:"shapeHasBoxShadow"}},{type:"control",setting:{id:"shapeBoxShadow"},layout:"vertical",condition:"shapeHasBoxShadow === true"}]},{type:"control",label:{en:"Align"},options:{label:"large"},setting:{id:"align"}},{type:"group",label:{en:"SEO"},controls:[{type:"control",label:{en:"Alt text"},setting:{id:"alt"},layout:"vertical"},{type:"control",label:{en:"Image title"},setting:{id:"title"},layout:"vertical"}]}],presets:[{id:"image",name:{en:"Image"},icon:{desktop:`
|
|
9
9
|
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
10
|
<rect width="96" height="48" rx="3" fill="#424242"/>
|
|
11
11
|
<circle cx="37" cy="17" r="3" fill="#D6D6D6"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as l}from"react/jsx-runtime";import{useCurrentVariant as i,useProduct as o,useQuantity as a,shopifyPriceRounding as r,useProductOfferDiscount as n,useFormatMoney as d,cls as p,makeStyleResponsive as s}from"@gem-sdk/core";import{useMemo as u,useState as c,useEffect as g}from"react";import{postPurchaseSpacing as h}from"../../utils/helper.js";import m from"./priceBreakdown/MoneyLine.js";let PostPurchaseProductPriceBreakdown=({setting:f={},styles:b={},style:w,builderAttrs:L,builderProps:y,children:x})=>{let v=i(),I=o(),{quantity:P}=a(),q=v?.price??0,N=parseFloat(r(n(),2)),k=N*(P||1),C=q*(P||1),j=d(C,!0),B=d(k,!0),T=d(C-k,!0),S=I?.baseID?.replace("gid://shopify/Product/",""),{labelStyle:D,moneyStyle:E,spacing:M,width:R,align:$,isShowPrice:F}=b,H=u(()=>h[M||"none"],[M]),[U,Z]=c(F);g(()=>{Z(F)},[F]);let z=u(()=>[{title:f.subTotalLabel,money:j,uniqueId:"subTotalLabel"},{title:f.discountLabel,money:N>0?B:"No discount",uniqueId:"discountLabel"},{title:f.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}},{title:f.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}},{title:f.totalLabel,uniqueId:"totalLabel",money:T}],[N,B,f.discountLabel,f.shippingLabel,f.subTotalLabel,f.taxesLabel,f.totalLabel,j,T]);return e(t,{children:[e("div",{onClick:()=>Z(e=>!e),className:"gp-flex gp-text-[#1879B9] gp-h-4.5 gp-cursor-pointer","aria-hidden":"true",children:[l("p",{className:"gp-underline",children:U?"Show price breakdown":"Hide price breakdown"}),l("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`${U||"gp-rotate-180"}`,children:l("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0187 10.3598C10.7759 10.5853 10.3963 10.5712 10.1708 10.3284L8.01045 8.00191L5.85012 10.3284C5.62464 10.5712 5.245 10.5853 5.00218 10.3598C4.75935 10.1343 4.74529 9.75469 4.97077 9.51187L7.57077 6.71187C7.6843 6.58961 7.84361 6.52014 8.01045 6.52014C8.17729 6.52014 8.3366 6.58961 8.45012 6.71187L11.0501 9.51187C11.2756 9.75469 11.2615 10.1343 11.0187 10.3598Z",fill:"#1879B9"})})]}),l("div",{className:"gp-w-full gp-h-[1px] gp-bg-[#E9E9E9] gp-my-3"}),U?l("div",{className:"gp-col-[1] gp-row-[1] gp-overflow-hidden",children:e("div",{...L,className:p(y?.uid,"gp-flex gp-w-full","gp-min-h-0","left"===$?"gp-justify-start":"right"===$?"gp-justify-end":"gp-justify-center"),style:{...w},id:`shopify-text-element-${y?.uid}`,"data-product-id":S,children:[l("div",{className:"gp-flex gp-flex-col",style:{...s("w",R),gap:H},children:z.map((t,i)=>e("div",{children:[l(m,{uniqueId:t.uniqueId,builderPropsUID:y?.uid,title:t.title,money:t.money,tooltipData:t.tooltip,labelTextStyles:{typo:D},moneyTextStyles:{typo:E}}),i==z.length-2&&l("hr",{})]},t.uniqueId))}),x]})}):null]})};export{PostPurchaseProductPriceBreakdown as default};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{composeTypographyClassName as t,composeTypographyStyle as e,getStyleShadow as r,makeStyleResponsive as
|
|
2
|
-
<gp-product-description class="${
|
|
1
|
+
import{composeTypographyClassName as t,composeTypographyStyle as e,getStyleShadow as r,makeStyleResponsive as s,getGlobalColorStyle as a,makeStyle as o,makeLineClamp as i,template as p,cls as l,getGlobalColorClass as d,RenderIf as n,isLocalEnv as c,baseAssetURL as g}from"@gem-sdk/core";let devices=["desktop","mobile","tablet"],getDisplayStyle=(t,e)=>{let r={};return devices.forEach(s=>{r={...r,[`--d${"desktop"===s?"":`-${s}`}`]:`${t(s)?"none":e}`}}),r},ProductDescription=({setting:f,advanced:h})=>{let{htmlTag:w}=f??{},u=t(f?.typo,f?.typography),b=e(f?.typo,f?.typography),m={...r({value:f?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:f?.hasTextShadow}),...s("ta",f?.textAlign),...a(f?.color),...o({tt:f?.transform}),...b},y={...m,...s("line-clamp",i(f?.lineClamp,f?.hasLineClamp))},L=()=>getDisplayStyle(t=>!!f?.hasLineClamp&&void 0!==f.hasLineClamp[t]&&!f.hasLineClamp[t],"block"),$="html"===w?"div":"p";return p`
|
|
2
|
+
<gp-product-description class="${h?.cssClass}" gp-data='${JSON.stringify({setting:f,styles:f,defaultStyle:m,collapseStyle:y}).replaceAll("'","'")}'>
|
|
3
3
|
{%- unless product -%}
|
|
4
4
|
<p>Product not found</p>
|
|
5
5
|
{%- else -%}
|
|
6
6
|
<${$}
|
|
7
|
-
class="${
|
|
8
|
-
style="${
|
|
7
|
+
class="${l("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",u,d("text",f?.color),"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")}"
|
|
8
|
+
style="${y}"
|
|
9
9
|
>
|
|
10
|
-
${"html"===
|
|
10
|
+
${"html"===w?"{{product.description}}":"{{product.description | strip_html}}"}
|
|
11
11
|
</${$}>
|
|
12
12
|
{% if product.description != blank -%}
|
|
13
13
|
<button
|
|
14
14
|
type="button"
|
|
15
|
-
class="p-description-show-more ${
|
|
16
|
-
style="${{...
|
|
15
|
+
class="p-description-show-more ${l(u,d("text",f?.showMoreColor),"gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full")}"
|
|
16
|
+
style="${{...o({tt:f?.transform}),...s("ta",f?.textAlign),...b,...a(f?.showMoreColor),...L(),position:"absolute",visibility:"hidden"}}"
|
|
17
17
|
>
|
|
18
18
|
|
|
19
19
|
${f?.viewMoreText}
|
|
@@ -41,5 +41,5 @@ import{composeTypographyClassName as t,composeTypographyStyle as e,getStyleShado
|
|
|
41
41
|
}
|
|
42
42
|
{% endstyle %}
|
|
43
43
|
</gp-product-description>
|
|
44
|
-
${
|
|
44
|
+
${n(c,'<script src="{{ \'gp-product-description.js\' | asset_url }}" defer="defer"></script>',`<script src="${g}/assets-v2/gp-product-description.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
45
45
|
`};export{ProductDescription as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,Fragment as o,jsxs as e}from"react/jsx-runtime";import{useEditorMode as r,usePageType as d,usePageStore as l,useProductQuery as i,useCollectionQuery as a,useProductsQuery as c,useProductsQueryAll as n,flattenConnection as s,ProductListProvider as u,makeStyleResponsive as p,makeWidth as m,getResponsiveValueByScreen as h,cls as g,ProductProvider as P,isEmptyChildren as f}from"@gem-sdk/core";import C from"next/dynamic";import{useMemo as
|
|
1
|
+
import{jsx as t,Fragment as o,jsxs as e}from"react/jsx-runtime";import{useEditorMode as r,usePageType as d,usePageStore as l,useProductQuery as i,useCollectionQuery as a,useProductsQuery as c,useProductsQueryAll as n,flattenConnection as s,ProductListProvider as u,makeStyleResponsive as p,makeWidth as m,getResponsiveValueByScreen as h,cls as g,ProductProvider as P,isEmptyChildren as f}from"@gem-sdk/core";import C from"next/dynamic";import{useMemo as v,useState as S,useEffect as b}from"react";import w from"../../common/components/Loading.js";import y from"../../carousel/components/Carousel.js";import T from"../../carousel/components/CarouselItem.js";import O from"../../grid/components/ChildrenDroppable.js";import{getUpdatedArrowDisplay as k}from"../../carousel/components/common/arrow.js";import{getUpdatedDotStyle as I}from"../../carousel/components/common/dots.js";import E from"./SalePageProductListWarning.js";import{getInitialWidthForCarouselItem as N}from"../../carousel/components/common/carousel.js";import{getSizeSetting as W}from"../helpers/product.js";let ProductNotFound=C(()=>import("./ProductNotFound.js"),{loading:w}),ProductList=({children:C,className:x,setting:j,styles:D,builderProps:G})=>{let L=r(),z=d(),B=j?.productSetting??{},H=l(t=>t.dynamicCollection),A="GP_COLLECTION"==z;A&&(B.productSrc="DynamicCollection",B.collectionId=H?.collectionId??"latest");let F=v(()=>"GP_FUNNEL_PAGE"===z,[z]),Q=v(()=>k(j?.arrow,j?.controlOverContent),[j?.arrow,j?.controlOverContent]),[_,M]=S(),[R,$]=S(!1),V="RelatedProduct"===B.productSrc,U=v(()=>I(j?.dot),[j?.dot]),q=B?.productSrc??"Collection",J=v(()=>({id:B?.collectionId??"latest",numberOfProducts:j?.numberOfProducts??4,orderBy:j?.orderBy==="none"?"CREATED_AT_DESC":j?.orderBy}),[B?.collectionId,j?.numberOfProducts,j?.orderBy]),{data:K}=i(V&&j?.productSetting?.relatedProductId?j.productSetting.relatedProductId:void 0);b(()=>{if(V&&K&&B.relatedTag&&"recommended-product"!==B.relatedType){let t;switch($(!1),B.hasRelatedExclude&&(t=B?.relatedExclude&&B.relatedExclude.split(",").map(t=>t.trim())),B.relatedTag[0]){case"vendor":M({vendor:B.relatedTag&&"vendor"===B.relatedTag[0]?K?.vendor:"",limit:j?.numberOfProducts,idNEQ:K.id});break;case"collection":{let o;let e=K?.collections?.edges.map(t=>t.node?.id);if(!e||e?.length===0){$(!0);break}M(o=t&&t.length>0?{idNEQ:K.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:e},{titleNotIn:t}]}],limit:j?.numberOfProducts}:{idNEQ:K.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:e}]}],limit:j?.numberOfProducts});break}case"tags":{let o;if(!K.tags||0===K.tags.length){$(!0);break}M(o=t&&t.length>0?{idNEQ:K.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:K.tags},{nameNotIn:t}]}],limit:j?.numberOfProducts}:{idNEQ:K.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:K.tags}]}],limit:j?.numberOfProducts})}}}},[K,B.relatedType,B.relatedTag,j?.numberOfProducts,B.relatedExclude,B.hasRelatedExclude,V]);let X=a("PickProduct"!==q?J:void 0),Y=c("PickProduct"===q?B?.productIds:void 0,{revalidateOnMount:"edit"===L},{defaultSelectedProductCount:B?.numOfSelectedProducts}),Z=n(_,{revalidateOnMount:"edit"===L}),[tt,to]=S(!0),te="PickProduct"===q?Y.isValidating:X.isValidating,tr="PickProduct"===q?Y.isLoading:X.isLoading,td="PickProduct"===q?Y.error:X.error,tl=X.data?.collections?.edges?.[0]?.node,ti="PickProduct"===q?s(Y.data?.products):s(tl?.products),ta=Z?.data?.products?s(Z?.data?.products):void 0,tc=V&&ta?ta:"PickProduct"===q&&B?.productIds?.length?B?.productIds?.map(t=>ti?.find(o=>o?.baseID===t)).filter(Boolean)??ti:"PickProduct"!==q?ti:ti.filter((t,o)=>o<(B?.numOfSelectedProducts||4));return G?.isPreview&&F?null:R&&V&&"edit"==L?t(ProductNotFound,{collectionHandle:tl?.handle,productSrc:q,onClose:()=>to(!1),children:C}):tc.length||tr||"edit"!=L?t(o,{children:te||tr?t(w,{}):td?e("div",{children:["Error: ",td?.message]}):!tc||R&&V?t("div",{children:"Products not found"}):t(u,{collection:tl,products:tc,settings:{loop:j?.loop??{desktop:!1},scrollMode:j?.scrollMode??{desktop:"snap"},slidesToShow:j?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:D?.layout,dot:j?.dot,dotStyle:j?.dotStyle,arrow:j?.arrow,controlOverContent:j?.controlOverContent},styles:{horizontalGutter:D?.horizontalGutter,verticalGutter:D?.verticalGutter,fullWidth:D?.fullWidth,spacing:D?.spacing,width:D?.width,height:D?.height},children:e("div",{className:"gp-relative",children:[F&&t(E,{}),D?.layout==="grid"?t("div",{style:{...p("w",m(D?.width,D?.fullWidth)),...p("rg",D?.horizontalGutter),...p("cg",D?.verticalGutter),...p("gtc",{desktop:`repeat(${h(j?.slidesToShow,"desktop")}, minmax(0, 1fr))`,tablet:j?.slidesToShow?.tablet&&`repeat(${h(j?.slidesToShow,"tablet")}, minmax(0, 1fr))`,mobile:j?.slidesToShow?.mobile&&`repeat(${h(j?.slidesToShow,"mobile")}, minmax(0, 1fr))`})},className:g(x,"gp-m-auto gp-grid gp-w-full"),children:tc?.length?tc?.map(o=>t(P,{product:o,readOnly:!0,children:t("div",{..."edit"===L?{"data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":o?.baseID?.replace("gid://shopify/Product/","")}:{},children:f(C)?t(O,{}):C})},o?.baseID)):null}):t(y,{setting:{loop:j?.loop,slidesToShow:j?.slidesToShow,dot:j?.dot,dotStyle:U,dotSize:{desktop:12},dotGapToCarousel:{desktop:16},navigationStyle:Q,arrowCustom:j?.arrowCustom,controlOverContent:j?.controlOverContent,enableDrag:{desktop:j?.dragToScroll,tablet:j?.dragToScroll,mobile:j?.dragToScroll},speed:j?.speed,dotActiveColor:j?.dotActiveColor,dotColor:j?.dotColor,autoplay:j?.autoplay,pauseOnHover:j?.pauseOnHover,autoplayTimeout:j?.autoplayTimeout,arrowCustomColor:j?.arrowCustomColor,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootClass:"gp-justify-center",styles:{sizeSetting:{...W({adaptiveHeight:D?.adaptiveHeight,fullWidth:D?.fullWidth,width:D?.width,height:D?.height})},spacing:D?.spacing},children:tc?.map(o=>t(T,{style:{...N({spacing:D?.spacing,slidesToShow:j?.slidesToShow})},children:t(P,{product:o,readOnly:!0,children:t("div",{..."edit"===L?{"data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":o?.baseID?.replace("gid://shopify/Product/","")}:{},children:f(C)?t(O,{}):C})})},o?.baseID))})]})})}):tt?t(ProductNotFound,{collectionHandle:tl?.handle,productSrc:q,onClose:()=>to(!1),children:C}):null};export{ProductList as default};
|
|
@@ -152,7 +152,7 @@ ${s(i,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></scri
|
|
|
152
152
|
endif
|
|
153
153
|
endfor
|
|
154
154
|
endif
|
|
155
|
-
if relatedTag == '
|
|
155
|
+
if relatedTag == 'tags'
|
|
156
156
|
assign tagsAssignProduct = assignProduct.tags
|
|
157
157
|
for item in allProducts
|
|
158
158
|
assign handle = item.handle
|
package/dist/types/index.d.ts
CHANGED
|
@@ -857,7 +857,7 @@ type HeaderProps = BasePropsWrap<HeaderSettingProps & {
|
|
|
857
857
|
}, HeaderStyleProps> & {
|
|
858
858
|
children: React.ReactNode;
|
|
859
859
|
};
|
|
860
|
-
declare const Header: ({ builderAttrs, builderProps, style, setting, styles, children }: HeaderProps) => React.JSX.Element;
|
|
860
|
+
declare const Header: ({ builderAttrs, builderProps, style, setting, styles, children }: HeaderProps) => React.JSX.Element | null;
|
|
861
861
|
|
|
862
862
|
type Props$3 = HeaderCommonProps;
|
|
863
863
|
declare const BasicHeader: ({ btnBgColor, btnBorder, btnRounded, btnSpacing, btnTextColor, btnTypography, btnType, btnWidth, openMode, buyNow, breakpoint, ...props }: Props$3) => React.JSX.Element;
|
|
@@ -1096,7 +1096,7 @@ declare const Pagination: React.FC<PaginationProps>;
|
|
|
1096
1096
|
|
|
1097
1097
|
type ProductSortedByOrderType = 'TITLE_ASC' | 'TITLE_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'none' | undefined;
|
|
1098
1098
|
type ProductSource = 'Collection' | 'PickProduct' | 'DynamicCollection' | 'RelatedProduct';
|
|
1099
|
-
type RelatedCondition = 'collection' | 'production-type' | 'vendor' | '
|
|
1099
|
+
type RelatedCondition = 'collection' | 'production-type' | 'vendor' | 'tags' | 'category';
|
|
1100
1100
|
type ProductListSetting = {
|
|
1101
1101
|
productSetting?: {
|
|
1102
1102
|
productSrc?: ProductSource;
|
|
@@ -5209,7 +5209,7 @@ declare const _default: {
|
|
|
5209
5209
|
Section: React.FC<RowProps$1>;
|
|
5210
5210
|
Root: React.FC<RootProps$1>;
|
|
5211
5211
|
Heading: React.FC<HeadingProps>;
|
|
5212
|
-
Header: ({ builderAttrs, builderProps, style, setting, styles, children }: HeaderProps) => React.JSX.Element;
|
|
5212
|
+
Header: ({ builderAttrs, builderProps, style, setting, styles, children }: HeaderProps) => React.JSX.Element | null;
|
|
5213
5213
|
BasicHeader: ({ btnBgColor, btnBorder, btnRounded, btnSpacing, btnTextColor, btnTypography, btnType, btnWidth, openMode, buyNow, breakpoint, ...props }: HeaderCommonProps) => React.JSX.Element;
|
|
5214
5214
|
ModernHeader: (props: HeaderCommonProps) => React.JSX.Element;
|
|
5215
5215
|
MobileMenu: ({ menu, typography, typo, arrow, menuTextColor, menuBg, textColor, className, }: Pick<HeaderCommonProps, "menu" | "height" | "textColor" | "typo" | "typography" | "arrow" | "menuTextColor" | "menuBg"> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.843",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"format": "prettier --write \"./src/**/*.{ts,tsx}\""
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
24
|
+
"@gem-sdk/core": "2.0.0-dev.843",
|
|
25
25
|
"@gem-sdk/styles": "1.14.0-dev.831",
|
|
26
26
|
"@types/react-transition-group": "^4.4.5"
|
|
27
27
|
},
|