@gem-sdk/components 2.0.0-staging.723 → 2.0.0-staging.725
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/product/components/DynamicCheckout/components/Button.liquid.js +5 -3
- package/dist/cjs/product/components/ProductButton/common/helpers.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +4 -4
- package/dist/cjs/text/setting/configs/settings.js +1 -1
- package/dist/esm/product/components/DynamicCheckout/components/Button.liquid.js +8 -6
- package/dist/esm/product/components/ProductButton/common/helpers.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +1 -1
- package/dist/esm/text/setting/configs/settings.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers=require("../../../../helpers.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const Button=({setting:e,advanced:s,styles:t,pageContext:a,builderProps:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers=require("../../../../helpers.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const Button=({setting:e,advanced:s,styles:t,pageContext:a,builderProps:i,className:l=""})=>{let r=helpers.getDynamicSourceLocales({pageContext:a,settingId:"label",val:e?.label,uid:i?.uid,translate:e?.translate}),o=system.createClass({...!!l&&{[l]:!0},...classes.getButtonClasses({styles:t,uid:i?.uid})}),n=styles.getButtonStyles({styles:t,uid:i?.uid}),d=system.createStateOrContext({setting:{label:e?.label},totalVariant:"{{total_combinations}}"});return core.template`
|
|
2
|
+
${system.Liquid("{%- assign total_combinations = 1 -%}")}
|
|
3
|
+
${system.LiquidFor("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
2
4
|
${system.Liquid(`
|
|
3
5
|
{%- liquid
|
|
4
6
|
assign inventory_quantity = variant.inventory_quantity | default: 0
|
|
5
7
|
assign supported_payment_methods = shop.enabled_payment_types
|
|
6
8
|
-%}
|
|
7
9
|
`)}
|
|
8
|
-
<gp-product-dynamic data-id="${
|
|
10
|
+
<gp-product-dynamic data-id="${i?.uid}" data-translate-label="${r}" class="${s?.cssClass}" gp-data='${JSON.stringify(d).replaceAll("'","'")}
|
|
9
11
|
'>
|
|
10
|
-
<div class="${
|
|
12
|
+
<div class="${o}">
|
|
11
13
|
{{ form | payment_button }}
|
|
12
14
|
</div>
|
|
13
15
|
{% style %}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var constants=require("./constants.js");const checkIconVisibility=e=>e?.enableIcon===!0,getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:removeColorFromTypo(e?.priceTypo)}),getRenderComparePriceSettings=e=>({lineThrough:!0,typo:removeColorFromTypo(e?.compareAtPriceTypo)}),getGPProductButtonState=(e,t)=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:t?.label?.replaceAll("'","'"),errorMessage:t?.errorMessage?.replaceAll("'","'"),successMessage:t?.successMessage?.replaceAll("'","'"),outOfStockLabel:t?.outOfStockLabel?.replaceAll("'","'"),customURL:{link:t?.customURL?.link?.replaceAll("'","'"),target:t?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{
|
|
1
|
+
"use strict";var constants=require("./constants.js");const checkIconVisibility=e=>e?.enableIcon===!0,getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:removeColorFromTypo(e?.priceTypo)}),getRenderComparePriceSettings=e=>({lineThrough:!0,typo:removeColorFromTypo(e?.compareAtPriceTypo)}),getGPProductButtonState=(e,t)=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:t?.label?.replaceAll("'","'"),errorMessage:t?.errorMessage?.replaceAll("'","'"),successMessage:t?.successMessage?.replaceAll("'","'"),outOfStockLabel:t?.outOfStockLabel?.replaceAll("'","'"),customURL:{link:t?.customURL?.link?.replaceAll("'","'"),target:t?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),renderSeparator=e=>{let t=e??"horizontal-line";return({dot:constants.SEPARATOR.DOT,"vertical-line":constants.SEPARATOR.VERTICAL_LINE,"horizontal-line":constants.SEPARATOR.HORIZONTAL_LINE})[t]??constants.SEPARATOR.HORIZONTAL_LINE},removeColorFromTypo=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);exports.checkIconVisibility=checkIconVisibility,exports.getGPProductButtonState=getGPProductButtonState,exports.getRenderComparePriceSettings=getRenderComparePriceSettings,exports.getRenderRegularPriceSettings=getRenderRegularPriceSettings,exports.renderSeparator=renderSeparator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),Carousel_liquid=require("../../../../../carousel/root/Carousel.liquid.js"),CarouselItem_liquid=require("../../../../../carousel/carousel-item/CarouselItem.liquid.js"),HTML5Embed_liquid=require("../../../../../video/components/HTML5Embed.liquid.js"),Modal3d_liquid=require("../../../../../image/components/Modal3d.liquid.js"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),Video_liquid=require("../../../../../image/components/Video.liquid.js"),_function=require("../../../../helpers/function.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesAttr=require("../../composables/getProductImagesAttr.js"),system=require("@gem-sdk/system");const FeatureImageWithGallery=({builderPropUID:e,children:t,enableLazyLoadImage:i,...a})=>{let{featuredImageCarouselClasses:s,galleryItemClasses:d,featuredCarouselItemClasses:r}=getProductImagesClassName.getProductImagesClassName(a),{featuredImageCarouselStyle:u,featureImageStyle:o,featureImageCarouselOnlyOneImageStyle:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),common=require("../../common/common.js"),productFeaturedImage=require("../../common/productFeaturedImage.js"),Carousel_liquid=require("../../../../../carousel/root/Carousel.liquid.js"),CarouselItem_liquid=require("../../../../../carousel/carousel-item/CarouselItem.liquid.js"),HTML5Embed_liquid=require("../../../../../video/components/HTML5Embed.liquid.js"),Modal3d_liquid=require("../../../../../image/components/Modal3d.liquid.js"),NextImage_liquid=require("../../../../../image/components/NextImage.liquid.js"),Video_liquid=require("../../../../../image/components/Video.liquid.js"),_function=require("../../../../helpers/function.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesAttr=require("../../composables/getProductImagesAttr.js"),system=require("@gem-sdk/system");const FeatureImageWithGallery=({builderPropUID:e,children:t,enableLazyLoadImage:i,...a})=>{let{featuredImageCarouselClasses:s,galleryItemClasses:d,featuredCarouselItemClasses:r}=getProductImagesClassName.getProductImagesClassName(a),{featuredImageCarouselStyle:u,featureImageStyle:o,featureImageCarouselOnlyOneImageStyle:m,featureImageOnlyOneImageStyle:l,featureImageCarouselItemStyle:g}=getProductImagesStyles.getProductImagesStyles(a),{featuredImageCarouselSettingAttrs:c}=getProductImagesAttr.getProductImagesAttr(a),n=common.getAspectRatio(a.ftShape),p=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
4
|
${I()}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
28
|
{% endif %}
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
|
-
${system.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}")}
|
|
30
|
+
${system.LiquidIf("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
32
|
${NextImage_liquid.default({srcIsLiquidCode:!0,src:system.LiquidIf("src != null",common.getSrcImage("src"),"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}"),id:system.LiquidIf("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt}}",srcset:`${common.getSrcImage("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:a?.ftLayout,aspectRatio:n,qualityType:a?.qualityType,qualityPercent:a?.qualityPercent},priority:a?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:i})}`,_=()=>core.template`
|
|
33
33
|
${NextImage_liquid.default({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:a?.ftLayout,aspectRatio:n,qualityType:a?.qualityType,qualityPercent:a?.qualityPercent},priority:a?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",enableLazyLoadImage:i})}`,M=common.getPaddingBottomByShapeSetting(a.ftShape),b=t=>`
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
>
|
|
86
86
|
<div
|
|
87
87
|
class="gp-relative"
|
|
88
|
-
style="${_function.getStyleOfObject(
|
|
88
|
+
style="${_function.getStyleOfObject(l)}"
|
|
89
89
|
>
|
|
90
90
|
${t}
|
|
91
91
|
<div
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
product-id="{{product.id}}"
|
|
94
94
|
product-media="{{product.media.size}}"
|
|
95
95
|
class="${r(v)}
|
|
96
|
-
style="${_function.getStyleOfObject(
|
|
96
|
+
style="${_function.getStyleOfObject(m)}"
|
|
97
97
|
>
|
|
98
98
|
<div
|
|
99
99
|
class="gp-w-full gp-relative ${system.LiquidIf("featureMedia == null or featureMedia.media_type == 'image'","{{ 'gp-h-0' }}","{{ 'gp-h-full !gp-pb-0' }}")}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var background=require("../../../validates/background.js");const TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:background.BackgroundSettingValidate,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-2",distance:"12px",blur:"12px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];exports.TextSettings=TextSettings;
|
|
1
|
+
"use strict";var background=require("../../../validates/background.js");const TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:background.BackgroundSettingValidate,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1",transform:"none",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-2",distance:"12px",blur:"12px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];exports.TextSettings=TextSettings;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import{template as t,isLocalEnv as s,baseAssetURL as
|
|
2
|
-
${
|
|
1
|
+
import{template as t,isLocalEnv as s,baseAssetURL as a}from"@gem-sdk/core";import{createClass as e,createStateOrContext as i,Liquid as o,LiquidFor as n,If as l}from"@gem-sdk/system";import{getDynamicSourceLocales as r,getSettingPreloadData as d}from"../../../../helpers.js";import{getButtonClasses as p}from"../common/classes.js";import{getButtonStyles as m}from"../common/styles.js";let Button=({setting:c,advanced:u,styles:y,pageContext:g,builderProps:_,className:f=""})=>{let $=r({pageContext:g,settingId:"label",val:c?.label,uid:_?.uid,translate:c?.translate}),b=e({...!!f&&{[f]:!0},...p({styles:y,uid:_?.uid})}),v=m({styles:y,uid:_?.uid}),S=i({setting:{label:c?.label},totalVariant:"{{total_combinations}}"});return t`
|
|
2
|
+
${o("{%- assign total_combinations = 1 -%}")}
|
|
3
|
+
${n("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
4
|
+
${o(`
|
|
3
5
|
{%- liquid
|
|
4
6
|
assign inventory_quantity = variant.inventory_quantity | default: 0
|
|
5
7
|
assign supported_payment_methods = shop.enabled_payment_types
|
|
6
8
|
-%}
|
|
7
9
|
`)}
|
|
8
|
-
<gp-product-dynamic data-id="${
|
|
10
|
+
<gp-product-dynamic data-id="${_?.uid}" data-translate-label="${$}" class="${u?.cssClass}" gp-data='${JSON.stringify(S).replaceAll("'","'")}
|
|
9
11
|
'>
|
|
10
|
-
<div class="${
|
|
12
|
+
<div class="${b}">
|
|
11
13
|
{{ form | payment_button }}
|
|
12
14
|
</div>
|
|
13
15
|
{% style %}
|
|
14
|
-
${
|
|
16
|
+
${v}
|
|
15
17
|
{% endstyle %}
|
|
16
18
|
</gp-product-dynamic>
|
|
17
|
-
${l(s,`<script ${
|
|
19
|
+
${l(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-dynamic.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-dynamic.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
18
20
|
`};export{Button as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SEPARATOR as e}from"./constants.js";let checkIconVisibility=e=>e?.enableIcon===!0,getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:removeColorFromTypo(e?.priceTypo)}),getRenderComparePriceSettings=e=>({lineThrough:!0,typo:removeColorFromTypo(e?.compareAtPriceTypo)}),getGPProductButtonState=(e,r)=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:r?.errorType,actionEffect:r?.actionEffect,enableMessage:r?.enableMessage,label:r?.label?.replaceAll("'","'"),errorMessage:r?.errorMessage?.replaceAll("'","'"),successMessage:r?.successMessage?.replaceAll("'","'"),outOfStockLabel:r?.outOfStockLabel?.replaceAll("'","'"),customURL:{link:r?.customURL?.link?.replaceAll("'","'"),target:r?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{
|
|
1
|
+
import{SEPARATOR as e}from"./constants.js";let checkIconVisibility=e=>e?.enableIcon===!0,getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:removeColorFromTypo(e?.priceTypo)}),getRenderComparePriceSettings=e=>({lineThrough:!0,typo:removeColorFromTypo(e?.compareAtPriceTypo)}),getGPProductButtonState=(e,r)=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:r?.errorType,actionEffect:r?.actionEffect,enableMessage:r?.enableMessage,label:r?.label?.replaceAll("'","'"),errorMessage:r?.errorMessage?.replaceAll("'","'"),successMessage:r?.successMessage?.replaceAll("'","'"),outOfStockLabel:r?.outOfStockLabel?.replaceAll("'","'"),customURL:{link:r?.customURL?.link?.replaceAll("'","'"),target:r?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),renderSeparator=r=>{let t=r??"horizontal-line";return({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t]??e.HORIZONTAL_LINE},removeColorFromTypo=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{checkIconVisibility,getGPProductButtonState,getRenderComparePriceSettings,getRenderRegularPriceSettings,renderSeparator};
|
|
@@ -27,7 +27,7 @@ import{makeStyleResponsive as e,template as a,cls as i}from"@gem-sdk/core";impor
|
|
|
27
27
|
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
28
|
{% endif %}
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
|
-
${M("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}")}
|
|
30
|
+
${M("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
32
|
${n({srcIsLiquidCode:!0,src:M("src != null",s("src"),"{{ 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif' }}"),id:M("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,enableLazyLoadImage:x})}`,F=()=>a`
|
|
33
33
|
${n({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",enableLazyLoadImage:x})}`,H=r(q.ftShape),G=a=>`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BackgroundSettingValidate as e}from"../../../validates/background.js";let TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:e,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-2",distance:"12px",blur:"12px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];export{TextSettings};
|
|
1
|
+
import{BackgroundSettingValidate as e}from"../../../validates/background.js";let TextSettings=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"texteditor",options:["bold","italic","underline","foreColor","createlink"],default:"Replace this text with your content"}]},{id:"translate",type:"input",default:"text"},{id:"seo",type:"group",label:"SEO",controls:[{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"p",label:"P"},{value:"span",label:"Span"},{value:"div",label:"Div"}],default:"div"}]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},validate:e,compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0}}}},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",padding:{type:"custom"}}}},settingConfig:{width:{displayOptions:["full","auto","default"]},padding:{paddingConfig:{small:{vertical:"4px",horizontal:"4px"},medium:{vertical:"8px",horizontal:"8px"},large:{vertical:"16px",horizontal:"16px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]},{id:"style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1",transform:"none",isAlwaysLoadBold:!1}},ignoreReRender:!0},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"hasLineClamp",type:"toggle",label:"Has Line Clamp",devices:{desktop:{default:!1}}},{id:"lineClamp",type:"input:stepper",min:1,label:"Line Clamp",disableDecimal:!0,devices:{desktop:{default:1},tablet:{default:1},mobile:{default:1}},hide:!0},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},compoDefaultValue:{desktop:{default:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}},{id:"shapeBoxShadow",type:"shadow-v2",devices:{desktop:{default:{enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-2",distance:"12px",blur:"12px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}}]}];export{TextSettings};
|