@gem-sdk/components 2.0.0-staging.1021 → 2.0.0-staging.1023
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/accordion/components/Accordion.liquid.js +6 -6
- package/dist/cjs/article/components/ArticleContent.liquid.js +3 -3
- package/dist/cjs/button/components/Button.liquid.js +5 -5
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +3 -3
- package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +3 -3
- package/dist/cjs/collection/components/collection-description/CollectionDescription.liquid.js +5 -5
- package/dist/cjs/collection/components/collection-paginator/CollectionPaginator.liquid.js +3 -3
- package/dist/cjs/collection/components/collection-toolbar/CollectionToolbar.liquid.js +5 -5
- package/dist/cjs/countdown-timer/components/Countdown.liquid.js +15 -15
- package/dist/cjs/coupon/components/Coupon.liquid.js +3 -3
- package/dist/cjs/dialog/components/Dialog.liquid.js +3 -3
- package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +3 -3
- package/dist/cjs/form/components/form-dropdown/FormDropdown.liquid.js +3 -3
- package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +3 -3
- package/dist/cjs/grid/components/row/Row.liquid.js +7 -7
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +9 -9
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +7 -7
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +4 -4
- package/dist/cjs/marquee/components/Marquee.liquid.js +3 -3
- package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +3 -3
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +3 -3
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +6 -6
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +3 -3
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscountChildrenItem.liquid.js +2 -2
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +3 -3
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +5 -5
- package/dist/cjs/product/components/product-description/common/styles.js +3 -3
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +3 -3
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +4 -4
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +2 -2
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +2 -2
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +2 -2
- package/dist/cjs/product/components/product-price/ProductPrice.liquid.js +3 -3
- package/dist/cjs/product/components/product-properties/ProductProperties.liquid.js +6 -6
- package/dist/cjs/product/components/product-quantity/ProductQuantity.liquid.js +4 -4
- package/dist/cjs/product/components/product-sku/Sku.liquid.js +3 -3
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +7 -7
- package/dist/cjs/product/components/product-view-more/ProductViewMore.liquid.js +3 -3
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +9 -9
- package/dist/cjs/sticky/components/Sticky.liquid.js +3 -3
- package/dist/cjs/stock-counter/components/StockCounter.liquid.js +3 -3
- package/dist/cjs/tab/components/Tabs.liquid.js +6 -6
- package/dist/cjs/third-party/components/BoostAISearchDiscovery.liquid.js +1 -1
- package/dist/cjs/third-party/components/SmartSearchBarAndFilters.liquid.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +3 -3
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +3 -3
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +3 -3
- package/dist/esm/accordion/components/Accordion.liquid.js +6 -6
- package/dist/esm/article/components/ArticleContent.liquid.js +5 -5
- package/dist/esm/button/components/Button.liquid.js +6 -6
- package/dist/esm/carousel/components/root/Carousel.liquid.js +4 -4
- package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +5 -5
- package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js +6 -6
- package/dist/esm/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -4
- package/dist/esm/collection/components/collection-toolbar/CollectionToolbar.liquid.js +4 -4
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +4 -4
- package/dist/esm/coupon/components/Coupon.liquid.js +4 -4
- package/dist/esm/dialog/components/Dialog.liquid.js +5 -5
- package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +5 -5
- package/dist/esm/form/components/form-dropdown/FormDropdown.liquid.js +6 -6
- package/dist/esm/form/components/newsletter/Newsletter.liquid.js +3 -3
- package/dist/esm/grid/components/row/Row.liquid.js +4 -4
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +4 -4
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +4 -4
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +4 -4
- package/dist/esm/marquee/components/Marquee.liquid.js +3 -3
- package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +6 -6
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +5 -5
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +4 -4
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +3 -3
- package/dist/esm/product/components/product-bundle/ProductBundleDiscountChildrenItem.liquid.js +2 -2
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +4 -4
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +11 -11
- package/dist/esm/product/components/product-description/common/styles.js +2 -2
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +3 -3
- package/dist/esm/product/components/product-list/ProductList.liquid.js +4 -4
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +2 -2
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +2 -2
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +2 -2
- package/dist/esm/product/components/product-price/ProductPrice.liquid.js +5 -5
- package/dist/esm/product/components/product-properties/ProductProperties.liquid.js +4 -4
- package/dist/esm/product/components/product-quantity/ProductQuantity.liquid.js +4 -4
- package/dist/esm/product/components/product-sku/Sku.liquid.js +3 -3
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +3 -3
- package/dist/esm/product/components/product-view-more/ProductViewMore.liquid.js +5 -5
- package/dist/esm/product/components/product-wrap/Product.liquid.js +8 -8
- package/dist/esm/sticky/components/Sticky.liquid.js +5 -5
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +3 -3
- package/dist/esm/tab/components/Tabs.liquid.js +5 -5
- package/dist/esm/third-party/components/BoostAISearchDiscovery.liquid.js +2 -2
- package/dist/esm/third-party/components/SmartSearchBarAndFilters.liquid.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +3 -3
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +3 -3
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +7 -7
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{template as s,dataStringify as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as a,createStyle as d,createAttr as p,If as c}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as m,getClassWrapItemIcon as $,getClassWrapIcon as
|
|
1
|
+
import{template as s,dataStringify as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as a,createStyle as d,createAttr as p,If as c}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as m,getClassWrapItemIcon as $,getClassWrapIcon as v,getClassIcon as g,getClassTextItem as u}from"../common/classes.js";import{getStyleContainerIconlistMain as f,getStyleWraplistIcon as y,getStyleColListIcon as j,getStyleWrapIcon as h,getStyleWrapItemIcon as S,getStyleIcon as k,getStyleTypoText as q}from"../common/styles.js";import{getvalueMap as x,getTextIconTranslations as E,getTextIconNotFound as V}from"../common/helpers.js";let IconListV2=A=>{let{builderProps:I,builderAttrs:N,style:T,setting:_,styles:w,pageContext:G}=A,L=I?.builderData?.advanced,O=a({[I?.uid??""]:!0}),W=a(n()),b=a(m()),C=a($({builderProps:I})),D=a(v()),F=a(g()),M=a(u({setting:_})),P=d(f({styles:w,style:T,type:"liquid",advanced:L})),R=d(y({styles:w})),z=d(j({styles:w})),B=d(h({styles:w,setting:_})),H=d(S({styles:w})),J=d(k({styles:w,setting:_})),K=q({setting:_}),Q=p({...N}),U=V("liquid"),X=x({setting:_});return s`
|
|
2
2
|
{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
|
|
3
|
-
<gp-icon-list
|
|
3
|
+
<gp-icon-list-v7-5
|
|
4
4
|
${{...Q}}
|
|
5
5
|
${{...I}}
|
|
6
6
|
data-id="${I?.uid}"
|
|
@@ -30,6 +30,6 @@ import{template as s,dataStringify as i,RenderIf as t,isLocalEnv as e,baseAssetU
|
|
|
30
30
|
</div>`}).join(" ")}
|
|
31
31
|
</div>
|
|
32
32
|
</div>`)}
|
|
33
|
-
</gp-icon-list>
|
|
34
|
-
${t(e,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-icon-list.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${l}/assets-v2/gp-icon-list.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
33
|
+
</gp-icon-list-v7-5>
|
|
34
|
+
${t(e,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-icon-list-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${l}/assets-v2/gp-icon-list-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
35
35
|
`};export{IconListV2 as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{template as t,isLocalEnv as e,baseAssetURL as i}from"@gem-sdk/core";import{createStyle as s,createClass as a,createAttr as r,createStateOrContext as l,If as o}from"@gem-sdk/system";import{getSettingPreloadData as m}from"../../helpers.js";import d from"../../image/components/NextImage.liquid.js";import{getOuterWrapperStyles as p,getWrapperWidth as g,getContainerStyles as c,getLazyPlaceholderStyle as n,getImageStyles as y,getLabelStyles as h,getArrowStyles as f,getLineStyles as $,getHandleStyles as b,getHandleCustomStyles as L,getSliderStyles as S}from"../common/styles.js";import{getOuterWrapperClasses as j,getLabelClasses as I,getLabelContainerClasses as u}from"../common/classes.js";import{getImageLiquidAttrs as
|
|
1
|
+
import{template as t,isLocalEnv as e,baseAssetURL as i}from"@gem-sdk/core";import{createStyle as s,createClass as a,createAttr as r,createStateOrContext as l,If as o}from"@gem-sdk/system";import{getSettingPreloadData as m}from"../../helpers.js";import d from"../../image/components/NextImage.liquid.js";import{getOuterWrapperStyles as p,getWrapperWidth as g,getContainerStyles as c,getLazyPlaceholderStyle as n,getImageStyles as y,getLabelStyles as h,getArrowStyles as f,getLineStyles as $,getHandleStyles as b,getHandleCustomStyles as L,getSliderStyles as S}from"../common/styles.js";import{getOuterWrapperClasses as j,getLabelClasses as I,getLabelContainerClasses as u}from"../common/classes.js";import{getImageLiquidAttrs as v,getImagePlaceholderAttrs as w,getLabelAttrs as C,getLabelLiquidAttrs as A}from"../common/attrs.js";import{getData as q}from"../common/helpers.js";import N from"./Label.liquid.js";import k from"./SlideHandle.liquid.js";let CompareImage=z=>{let{leftImage:D,rightImage:E,advanced:O,translate:x,builderData:F,pageContext:G,preload:H=!1,onSliderPositionChange:W}=z,{hover:_,styles:J,handle:M,handleSize:P,leftImageAlt:R,leftImageTitle:T,leftImageCss:V,leftImageLabel:B,rightImageAlt:K,rightImageTitle:Q,rightImageCss:U,rightImageLabel:X,sliderLineWidth:Y,sliderLineColor:Z,sliderPositionPercentage:tt,vertical:te,componentUid:ti,tempImage:ts,aspectRatio:ta,defaultRatio:tr,isHorizontal:tl,hasLeftLabel:to,hasRightLabel:tm,qualityType:td,qualityPercent:tp,getLeftImageSrc:tg,getRightImageSrc:tc}=q(z),tn=tg({isLiquid:!0}),ty=tc({isLiquid:!0}),th=s({...p(J)}),tf=s({...g({width:J?.width,leftImageWidth:D?.width,rightImageWidth:E?.width})}),t$=s({...c({aspectRatio:ta,builderData:F})}),tb=s({...n(ta)}),tL=s({...y({type:"right",props:z})}),tS=s({...y({type:"left",props:z})}),tj=s({...h({styles:J,type:"left",isHorizontal:tl})}),tI=s({...h({styles:J,type:"right",isHorizontal:tl})}),tu=s({...f({type:"left"})}),tv=s({...f({type:"right"})}),tw=s({...$({isHorizontal:tl,sliderLineColor:Z,sliderLineWidth:Y})}),tC=s({...b({handleSize:P,isHorizontal:tl,sliderLineColor:Z,sliderLineWidth:Y})}),tA=s({...L()}),tq=s({...S({hover:_,handleSize:P,isHorizontal:tl})}),tN=a({...j(O?.cssClass)}),tk=a({...I(J)}),tz=a({...u()}),tD=C({componentUid:ti,positionId:"left",label:B??""}),tE=C({componentUid:ti,positionId:"right",label:X??""}),tO=r({...v({priority:H,src:ty,title:Q,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`right-image-${ti}`})}),tx=r({...v({priority:H,src:tn,title:T,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`left-image-${ti}`})}),tF=A({translate:x,pageContext:G,translateLabel:"leftImageLabel"}),tG=A({translate:x,pageContext:G,translateLabel:"rightImageLabel"}),tH=r({...w({width:ts?.width,height:ts?.height})}),tW=l({hover:_,handle:M,vertical:te,leftImage:D,rightImage:E,handleSize:P,aspectRatio:ta,defaultRatio:tr,componentUid:ti,leftImageCss:V,rightImageCss:U,sliderLineColor:Z,sliderLineWidth:Y,sliderPositionPercentage:tt,onSliderPositionChange:W}),t_=()=>t`
|
|
2
2
|
<img alt="" ${tH} style="${tb}" />
|
|
3
|
-
`,tJ=()=>d({...tO,alt:K,style:tL,setting:{qualityType:td,qualityPercent:tp},enableLazyLoadImage:!H,isNotLazyload:H,customAttrs:{"data-testid":"right-image"}}),tM=()=>d({...tx,alt:R,style:tS,setting:{qualityType:td,qualityPercent:tp},enableLazyLoadImage:!H,isNotLazyload:H,customAttrs:{"data-testid":"left-image"}}),tP=()=>k({componentUid:ti,customHandle:M,lineStyles:
|
|
4
|
-
<gp-image-comparison
|
|
3
|
+
`,tJ=()=>d({...tO,alt:K,style:tL,setting:{qualityType:td,qualityPercent:tp},enableLazyLoadImage:!H,isNotLazyload:H,customAttrs:{"data-testid":"right-image"}}),tM=()=>d({...tx,alt:R,style:tS,setting:{qualityType:td,qualityPercent:tp},enableLazyLoadImage:!H,isNotLazyload:H,customAttrs:{"data-testid":"left-image"}}),tP=()=>k({componentUid:ti,customHandle:M,lineStyles:tw,sliderStyles:tq,handleStyles:tC,customHandleStyles:tA,leftArrowStyles:tu,rightArrowStyles:tv}),tR=()=>N({...tD,...tF,styles:J,childrenClass:tk,childrenStyle:tj,containerClass:tz,containerStyle:{}}),tT=()=>N({...tE,...tG,styles:J,childrenClass:tk,childrenStyle:tI,containerClass:tz,containerStyle:{}}),tV=()=>`${o(e,`<script ${m('class="gps-link" delay',"src")}="{{ 'gp-image-comparison-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${m('class="gps-link" delay',"src")}="${i}/assets-v2/gp-image-comparison-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`;return t`
|
|
4
|
+
<gp-image-comparison-v7-5
|
|
5
5
|
data-id="${ti}"
|
|
6
6
|
style="${th}"
|
|
7
7
|
class="${tN}"
|
|
@@ -21,6 +21,6 @@ import{template as t,isLocalEnv as e,baseAssetURL as i}from"@gem-sdk/core";impor
|
|
|
21
21
|
${o(tm,tT(),"")}
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
|
-
</gp-image-comparison>
|
|
24
|
+
</gp-image-comparison-v7-5>
|
|
25
25
|
${tV()}
|
|
26
26
|
`};export{CompareImage as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{template as e,cls as s,WrapRenderChildren as t,RenderChildren as i,RenderIf as r,isLocalEnv as o,baseAssetURL as d}from"@gem-sdk/core";import a from"./MarqueeBase.liquid.js";import{useMarqueeLiquidStyles as m}from"../common/helpers.js";import{createClass as l,createStyle as p,createStateOrContext as c,If as u}from"@gem-sdk/system";import{getMarqueeStyles as n,getAlignStyles as
|
|
1
|
+
import{template as e,cls as s,WrapRenderChildren as t,RenderChildren as i,RenderIf as r,isLocalEnv as o,baseAssetURL as d}from"@gem-sdk/core";import a from"./MarqueeBase.liquid.js";import{useMarqueeLiquidStyles as m}from"../common/helpers.js";import{createClass as l,createStyle as p,createStateOrContext as c,If as u}from"@gem-sdk/system";import{getMarqueeStyles as n,getAlignStyles as v,getContentStyles as $,getFastMarqueeChildrenIconStyles as g}from"../common/styles.js";import{getAlignClasses as f,getContentClasses as S,getWrapperClasses as h,getFastMarqueeContentClasses as y,getFastMarqueeClasses as q,getFastMarqueeContentChildrenClasses as j,getFastMarqueeChildrenIconClasses as k}from"../common/classes.js";let Marquee=({children:w,style:B,builderAttrs:C,rawChildren:b,advanced:E,...M})=>{let{styles:O,setting:I,builderProps:P}=M,{iconSeparatorColor:x,backgroundColor:A}=O||{},{iconSeparatorSvg:F,isShowIconSeparator:G}=I||{},H=b.length,{isFullWidth:N,getIsFullWidthValue:R}=m(I,O),{styleHeight:_,styleWidth:J,getWidthForWrapperItem:T,getHeightOfIconSeparatorSize:V,getWidthOfIconSeparatorSize:W,getIconPosition:z,getItemPaddingRightSpacingValue:D,getWidthForItem:K}=n({itemSize:H,setting:I,styles:O}),L=()=>({desktop:R("desktop"),tablet:R("tablet"),mobile:R("mobile")}),Q=l(f),U=p(v(O)),X=p($({style:B,backgroundColor:A,styleWidth:J,styleHeight:_})),Y=l(S),Z=l(h(P?.uid)),ee=l(y),es=l(q),et=l(j(N)),ei=e=>p(g({index:e,itemSize:H,iconSeparatorColor:x,getHeightOfIconSeparatorSize:V,getWidthOfIconSeparatorSize:W,getIconPosition:z})),er=l(k),eo=e=>p({...D(e),"text-wrap":"wrap",...T()}),ed=p(K()),ea=c({setting:{...I,uid:P?.uid},styles:O}),em=()=>r(o,'<script src="{{ \'gp-marquee-v7-5.js\' | asset_url }}" defer="defer"></script>',`<script src="${d}/assets-v2/gp-marquee-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return e`
|
|
2
2
|
${em()}
|
|
3
|
-
<gp-marquee data-id="${P?.uid}" gp-data='${JSON.stringify(ea)}'
|
|
3
|
+
<gp-marquee-v7-5 data-id="${P?.uid}" gp-data='${JSON.stringify(ea)}'
|
|
4
4
|
class="${s(P?.uid,E?.cssClass)}">
|
|
5
5
|
<div class="${Q}" style="${U}">
|
|
6
6
|
<div class="${Y}" style="${X}">
|
|
@@ -24,5 +24,5 @@ import{template as e,cls as s,WrapRenderChildren as t,RenderChildren as i,Render
|
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
|
-
</gp-marquee>
|
|
27
|
+
</gp-marquee-v7-5>
|
|
28
28
|
`};export{Marquee as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 v=r({pageContext:g,settingId:"label",val:c?.label,uid:_?.uid,translate:c?.translate}),$=e({...!!f&&{[f]:!0},...p({styles:y,uid:_?.uid})}),b=m({styles:y,uid:_?.uid}),S=i({setting:{label:c?.label},totalVariant:"{{total_combinations}}"});return t`
|
|
2
2
|
${o("{%- assign total_combinations = 1 -%}")}
|
|
3
3
|
${n("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
4
4
|
${o(`
|
|
@@ -7,14 +7,14 @@ import{template as t,isLocalEnv as s,baseAssetURL as a}from"@gem-sdk/core";impor
|
|
|
7
7
|
assign supported_payment_methods = shop.enabled_payment_types
|
|
8
8
|
-%}
|
|
9
9
|
`)}
|
|
10
|
-
<gp-product-dynamic data-id="${_?.uid}" data-translate-label="${
|
|
10
|
+
<gp-product-dynamic-v7-5 data-id="${_?.uid}" data-translate-label="${v}" class="${u?.cssClass}" gp-data='${JSON.stringify(S).replaceAll("'","'")}
|
|
11
11
|
'>
|
|
12
|
-
<div class="${
|
|
12
|
+
<div class="${$}">
|
|
13
13
|
{{ form | payment_button }}
|
|
14
14
|
</div>
|
|
15
15
|
{% style %}
|
|
16
|
-
${
|
|
16
|
+
${b}
|
|
17
17
|
{% endstyle %}
|
|
18
|
-
</gp-product-dynamic>
|
|
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
|
+
</gp-product-dynamic-v7-5>
|
|
19
|
+
${l(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-dynamic-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-dynamic-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
20
20
|
`};export{Button as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{template as e,RenderIf as s,isLocalEnv as i,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as r}from"../../../helpers.js";import{createClass as d,createStyle as t,createAttr as o,createStateOrContext as a,If as
|
|
2
|
-
<gp-file-upload
|
|
1
|
+
import{template as e,RenderIf as s,isLocalEnv as i,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as r}from"../../../helpers.js";import{createClass as d,createStyle as t,createAttr as o,createStateOrContext as a,If as v}from"@gem-sdk/system";import{createLayoutClasses as c,createTypoClasses as f,createPreviewClasses as m,createPreviewItemClasses as p,createPreviewRemoveClasses as $,createMessageClasses as n,createContentWidthClasses as u,createInputClasses as g,composeClasses as y,createWrapContainerClasses as b,createIconContentClasses as j}from"./common/classes.js";import{createLayoutStyles as E,createTypoStyles as H,createMessageStyles as F,createContainerStyles as S,createWrapContentWidthStyles as h,createContentWithStyles as k,createIconContainerStyles as q,createIconContentStyles as w}from"./common/style.js";import{getInputAttr as O}from"./common/attr.js";import{removeHoverStyles as x,getDisplayText as R}from"./common/helpers.js";let FileUpload=({setting:I,styles:P,builderProps:U,pageContext:C})=>{let J=d(c(I,U?.uid)),L=t({...x(E(I,P),P?.enableHoverEffect)}),N=d(f(P)),V=t({...x(H(P),P?.enableHoverEffect)}),_=d(m()),z=d(p()),A=d($()),B=d(n()),D=t(F()),G=d(u()),K=d(g()),M=d(y("gp-flex gp-items-center")),Q=o({...O(I?.isRequired,I?.numberOfFiles)}),T=t({...x(S(P?.align,P?.textColor),P?.enableHoverEffect)}),W=t({...x(h(I),P?.enableHoverEffect)}),X=d(b(U?.uid)),Y=t({...x(k(I,P),P?.enableHoverEffect)}),Z=t({...x(q(I),P?.enableHoverEffect)}),ee=d(j()),es=t({...x(w(I,P),P?.enableHoverEffect)}),ei=R("Liquid",{uid:U?.uid,setting:I,styles:P,pageContext:C}),el=a({settings:{isShowPreviewImage:I?.isShowPreviewImage,numberOfFiles:I?.numberOfFiles,isRequired:I?.isRequired}});return e`
|
|
2
|
+
<gp-file-upload-v7-5
|
|
3
3
|
gp-data='${JSON.stringify(el)}'
|
|
4
4
|
>
|
|
5
5
|
<div class="${X}" style="${T}">
|
|
@@ -7,7 +7,7 @@ import{template as e,RenderIf as s,isLocalEnv as i,baseAssetURL as l}from"@gem-s
|
|
|
7
7
|
<div class="${M}" style="${W}">
|
|
8
8
|
<div class="${G}" style="${Y}">
|
|
9
9
|
<div class="${J}" style="${L}">
|
|
10
|
-
${
|
|
10
|
+
${v(!!(I?.iconSvg&&I?.iconVisible),e`
|
|
11
11
|
<div class='${M}' style="${Z}">
|
|
12
12
|
<div class="${ee}" style="${es}">
|
|
13
13
|
${I?.iconSvg}
|
|
@@ -27,7 +27,7 @@ import{template as e,RenderIf as s,isLocalEnv as i,baseAssetURL as l}from"@gem-s
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="${B}" style="${D}"></div>
|
|
30
|
-
</gp-file-upload>
|
|
30
|
+
</gp-file-upload-v7-5>
|
|
31
31
|
|
|
32
|
-
${s(i,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-file-upload.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${l}/assets-v2/gp-file-upload.js" defer="defer"></script>`)}
|
|
32
|
+
${s(i,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-file-upload-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${l}/assets-v2/gp-file-upload-v7-5.js" defer="defer"></script>`)}
|
|
33
33
|
`};export{FileUpload as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{template as e,dataStringify as t,sanitizeLiquid as s,RenderIf as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as o,getSettingPreloadData as c}from"../../../helpers.js";import{checkDiscountContentProductBadge as n}from"./utils/common.js";import{generateBadgeContent as d}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as p}from"./utils/renderBadgeLiquid.js";import{createStyle as l,createClass as u,createAttr as m,createStateOrContext as g}from"@gem-sdk/system";import{IS_LIQUID as y}from"./constants.js";import{getContainerStyle as
|
|
1
|
+
import{template as e,dataStringify as t,sanitizeLiquid as s,RenderIf as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as o,getSettingPreloadData as c}from"../../../helpers.js";import{checkDiscountContentProductBadge as n}from"./utils/common.js";import{generateBadgeContent as d}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as p}from"./utils/renderBadgeLiquid.js";import{createStyle as l,createClass as u,createAttr as m,createStateOrContext as g}from"@gem-sdk/system";import{IS_LIQUID as y}from"./constants.js";import{getContainerStyle as v,getSubWrapperStyle as $,getContentStyleInternal as f,getTextBadgeWrapperStyles as j,getTextContentStyle as P,getImageContainerStyles as D}from"./common/styles.js";import{getWrapperClasses as V,getSubWrapperClass as b,getTextContainerClasses as C,getTextWrapperClasses as S,getTextContentClasses as T,getImageContainerClasses as k,getImageClasses as q}from"./common/classes.js";import{getSubWrapperAttrs as E,getContainerAttrs as I,getTextContentAttrs as K,getImageAttr as _}from"./common/attrs.js";let ProductBadge=h=>{let{styles:A,setting:B,builderProps:L,pageContext:Q}=h,w=B?.shape!=="image",G=n(B?.displayContent),N=l({...v(h,y)}),x=u({...V(h)}),M=u({...b(h)}),O=l({...$(h)}),R=m({...E(h)}),Y=f(h),z=u({...C()}),F=m({...I(h)}),H=u({...S()}),J=l({...j({setting:B,styles:A})}),U=u({...T(A)}),W=l({...P({setting:B,styles:A})}),X=m({...K()}),Z=u({...k()}),ee=l({...D({setting:B,styles:A})}),et=u({...q()}),es=m({..._({setting:B})}),ei=g({minPrice:"{{ minPriceValue | replace: '\"', '\\\"' | escape }}",variantIDs:'{{ product.variants | map: "id" | json | escape }}',variantInventoryQuantities:'{{ product.variants | map: "inventory_quantity" | json | escape }}',amountDiscount:"{{amountDiscountValue | replace: '\"', '\\\"' | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:B?.displayTrigger,uid:h.builderProps?.uid,productCreatedAt:'{{product.created_at | date: "%Y-%m-%d" }}',productTags:'{{ product.tags | join: "," }}',isTextBadge:w}),{displayContent:er,translate:ea}=B??{},eo=o({val:er?.trim(),uid:L?.uid,settingId:"displayContent",isLiquid:!0,pageContext:Q,translate:ea});return e`
|
|
2
2
|
{% if product %}
|
|
3
3
|
${d(eo,Q?.isPreviewing)}
|
|
4
4
|
${p(B?.displayTrigger,G,w)}
|
|
5
|
-
<gp-product-badge
|
|
5
|
+
<gp-product-badge-v7-5
|
|
6
6
|
${{...F}}
|
|
7
7
|
gp-data='${t(ei)}'
|
|
8
8
|
class="containerClass {{className}}"
|
|
@@ -33,7 +33,7 @@ import{template as e,dataStringify as t,sanitizeLiquid as s,RenderIf as i,isLoca
|
|
|
33
33
|
</div>`)}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
</gp-product-badge>
|
|
37
|
-
${i(r,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-badge.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-badge.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
36
|
+
</gp-product-badge-v7-5>
|
|
37
|
+
${i(r,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
38
38
|
{% endif %}
|
|
39
39
|
`};export{ProductBadge as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as d}from"../../../helpers.js";import{createStyle as o,createClass as a,createStateOrContext as i,Liquid as p,LiquidIf as n}from"@gem-sdk/system";import{getSizeSettings as c,getContainerStyles as l}from"./common/styles.js";import{getContainerClasses as u}from"./common/classes.js";import m from"./ProductBundleDiscountChildrenItem.liquid.js";let ProductBundleDiscount=({rawChildren:f,setting:g,styles:I,advanced:$,style:P})=>{let S=g?.hasPreSelectItem?g?.selectItemDefault??0:-1,_=t=>S===t,h=(t,e)=>m({index:e,rawChildrenItem:f?.[e],setting:g,styles:I,isSelected:_(e),bundleItem:t}),y=o(c(I)?.gap),A=a(u(g,$?.cssClass)),B=o(l(y,I,P)),D=i({styles:I,settings:{useProductCompareAtPrice:g?.useProductCompareAtPrice,selectItemDefault:g?.selectItemDefault,hideNoDiscountItem:g?.hideNoDiscountItem,hasPreSelectItem:g?.hasPreSelectItem,iconItemColor:g?.iconItemColor}}),j=()=>e(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-bundle-discount.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-bundle-discount.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return t`
|
|
2
|
-
<gp-product-bundle-discount
|
|
1
|
+
import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as d}from"../../../helpers.js";import{createStyle as o,createClass as a,createStateOrContext as i,Liquid as p,LiquidIf as n}from"@gem-sdk/system";import{getSizeSettings as c,getContainerStyles as l}from"./common/styles.js";import{getContainerClasses as u}from"./common/classes.js";import m from"./ProductBundleDiscountChildrenItem.liquid.js";let ProductBundleDiscount=({rawChildren:f,setting:g,styles:I,advanced:$,style:P})=>{let S=g?.hasPreSelectItem?g?.selectItemDefault??0:-1,_=t=>S===t,h=(t,e)=>m({index:e,rawChildrenItem:f?.[e],setting:g,styles:I,isSelected:_(e),bundleItem:t}),y=o(c(I)?.gap),A=a(u(g,$?.cssClass)),B=o(l(y,I,P)),D=i({styles:I,settings:{useProductCompareAtPrice:g?.useProductCompareAtPrice,selectItemDefault:g?.selectItemDefault,hideNoDiscountItem:g?.hideNoDiscountItem,hasPreSelectItem:g?.hasPreSelectItem,iconItemColor:g?.iconItemColor}}),j=()=>e(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-bundle-discount-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-bundle-discount-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return t`
|
|
2
|
+
<gp-product-bundle-discount-v7-5
|
|
3
3
|
gp-data='${JSON.stringify(D)}'
|
|
4
4
|
style="${B}"
|
|
5
5
|
class="${A}">
|
|
@@ -25,7 +25,7 @@ import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-s
|
|
|
25
25
|
${n(`forloop.index0 == ${s}`,h("{{ parsedAttrs | strip }}",s))}
|
|
26
26
|
{% endfor %}
|
|
27
27
|
`).join("")}
|
|
28
|
-
</gp-product-bundle-discount>
|
|
28
|
+
</gp-product-bundle-discount-v7-5>
|
|
29
29
|
|
|
30
30
|
{% if productBundleItem %}
|
|
31
31
|
${j()}
|
package/dist/esm/product/components/product-bundle/ProductBundleDiscountChildrenItem.liquid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{template as o,RenderChildren as t}from"@gem-sdk/core";import{createStyle as e,createClass as r,If as s}from"@gem-sdk/system";import{getItemWrapStyles as i,getIconStyles as l,getSvgActiveStyles as n,getSvgStyles as d,getFlexChildren as m}from"./common/styles.js";import{getLayoutClasses as u,getIconSectionClasses as c,getItemClasses as a}from"./common/classes.js";let ProductBundleDiscountChildrenItemLiquid=p=>{let{isSelected:v,setting:g,styles:$,bundleItem:w,rawChildrenItem:f}=p,h=e(i($,v)),k=r(u(g)),y=e(l(g)),C=e(n($)),L=e(d($)),x=r(c),A=r(a),Z=r(m);return o`
|
|
2
|
-
<gp-product-bundle-discount-item ${w} aria-hidden class="${A}" style="${h}">
|
|
2
|
+
<gp-product-bundle-discount-item-v7-5 ${w} aria-hidden class="${A}" style="${h}">
|
|
3
3
|
<div class="${k}">
|
|
4
4
|
${s(g?.enableIcon,o`
|
|
5
5
|
<div class="${x}" style="${y}">
|
|
@@ -18,5 +18,5 @@ import{template as o,RenderChildren as t}from"@gem-sdk/core";import{createStyle
|
|
|
18
18
|
${t({...f})}
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
|
-
</gp-product-bundle-discount-item>
|
|
21
|
+
</gp-product-bundle-discount-item-v7-5>
|
|
22
22
|
`};export{ProductBundleDiscountChildrenItemLiquid as default};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonState as r}from"./common/helpers.js";import{template as e,isLocalEnv as s,baseAssetURL as o}from"@gem-sdk/core";import{createStateOrContext as a,If as i}from"@gem-sdk/system";import{getInsertLinkData as l,getSettingPreloadData as p}from"../../../helpers.js";import{getButtonDynamicSourceLocales as n}from"./helpers/getButtonDynamicSourceLocales.js";import{SoldOutButton as u}from"./SoldOutButton.liquid.js";import{AddToCartButton as c}from"./AddToCartButton.liquid.js";let ProductButton=d=>{let{setting:m,builderProps:f,style:g,styles:
|
|
1
|
+
import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonState as r}from"./common/helpers.js";import{template as e,isLocalEnv as s,baseAssetURL as o}from"@gem-sdk/core";import{createStateOrContext as a,If as i}from"@gem-sdk/system";import{getInsertLinkData as l,getSettingPreloadData as p}from"../../../helpers.js";import{getButtonDynamicSourceLocales as n}from"./helpers/getButtonDynamicSourceLocales.js";import{SoldOutButton as u}from"./SoldOutButton.liquid.js";import{AddToCartButton as c}from"./AddToCartButton.liquid.js";let ProductButton=d=>{let{setting:m,builderProps:f,style:g,styles:v,pageContext:y}=d,{wrapStyle:$,restStyle:b}=t(g),{outOfStockButtonLabel:j,unavailableButtonLabel:S,variantSelectionRequiredMessage:k}=n({setting:m,pageContext:y,builderProps:f}),{urlData:_}=l("",m?.actionEffect==="open-cart-drawer"?{link:"/cart",target:"_self"}:m?.customURL),h=a(r(v,m)),q=()=>c({...d,style:b}),B=()=>u({...d,style:b,label:j}),E=()=>i(s,`<script ${p('class="gps-link" delay',"src")}="{{ 'gp-product-button-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${p('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-button-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return e`
|
|
2
2
|
{%- liquid
|
|
3
3
|
assign inventory_quantity = variant.inventory_quantity | default: 0
|
|
4
4
|
assign is_in_stock = variant.available
|
|
5
5
|
-%}
|
|
6
|
-
<gp-product-button
|
|
7
|
-
style="${
|
|
6
|
+
<gp-product-button-v7-5
|
|
7
|
+
style="${$}"
|
|
8
8
|
gp-data-wrapper="true"
|
|
9
9
|
gp-href="${_.href}"
|
|
10
10
|
class="gp-product-button"
|
|
@@ -15,6 +15,6 @@ import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonStat
|
|
|
15
15
|
>
|
|
16
16
|
${q()}
|
|
17
17
|
${B()}
|
|
18
|
-
</gp-product-button>
|
|
18
|
+
</gp-product-button-v7-5>
|
|
19
19
|
${E()}
|
|
20
20
|
`};export{ProductButton as default};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as o,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,getSettingPreloadData as
|
|
2
|
-
<gp-product-description-
|
|
3
|
-
${
|
|
1
|
+
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as o,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,getSettingPreloadData as a}from"../../../helpers.js";import{createClass as l,createStyle as n,createAttr as d,createStateOrContext as c,LiquidIf as m,Liquid as $,LiquidUnless as u,If as g}from"@gem-sdk/system";import{getClasses as v,getButtonClasses as w,getClassPreBuilt as x}from"./common/classes.js";import{getTextStyle as f,getButtonStyle as h,getStaticCss as y}from"./common/styles.js";import{ICON_SVG as M}from"./common/helpers.js";let ProductDescription=b=>{let{setting:C,advanced:S,builderProps:T,pageContext:j}=b,{htmlTag:I,translate:L,viewMoreText:k,viewLessText:E}=C??{},P="html"===I?"div":"p",V=l({"gp-product-description":!0,[S?.cssClass]:!0}),A=l(v({setting:C})),D=l(w({setting:C})),G=l({"gp-show-more-text":!0}),_=l({"gp-show-more-icon gp-ml-1":!0}),H=n({...f({setting:C,renderMaxHeight:!0}),...e("line-clamp",t(C?.lineClamp,C?.hasLineClamp))}),N=l(x()),O=n(h({setting:C})),R=d({"data-id":`${T?.uid}`}),q=d({"data-gp-text":""}),{textDescriptionCss:z}=y(),B="product.description == blank",F=()=>{let e=i?"{{ 'gp-product-description-v7-5.js' | asset_url }}":`${r}/assets-v2/gp-product-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${a('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`},J=c({setting:{lineClamp:C?.lineClamp,hasLineClamp:C?.hasLineClamp,viewMoreText:C?.viewMoreText,viewLessText:C?.viewLessText,enableViewMoreIcon:C?.enableViewMoreIcon},textStyle:H}),K=p({val:k,uid:T?.uid,settingId:"viewMoreText",pageContext:j,translate:L}),Q=p({val:E,uid:T?.uid,settingId:"viewLessText",pageContext:j,translate:L});return m(B,"",$(s`
|
|
2
|
+
<gp-product-description-v7-5
|
|
3
|
+
${R}
|
|
4
4
|
class="${V}"
|
|
5
5
|
gp-data='${o(J).replaceAll("'","'")}'
|
|
6
6
|
data-view-more-text="${K}"
|
|
7
7
|
data-view-less-text="${Q}"
|
|
8
8
|
>
|
|
9
|
-
<style>${
|
|
10
|
-
<div class="${
|
|
11
|
-
${u("product","<p>Product not found</p>",s`<${P} ${
|
|
9
|
+
<style>${z}</style>
|
|
10
|
+
<div class="${N}" ></div>
|
|
11
|
+
${u("product","<p>Product not found</p>",s`<${P} ${q} class="${A}" style="${H}">
|
|
12
12
|
{{product.description}}
|
|
13
13
|
</${P}>
|
|
14
|
-
${u(
|
|
14
|
+
${u(B,s`<button type="button" class="${D}" style="${O}">
|
|
15
15
|
<span class="${G}">
|
|
16
|
-
${
|
|
16
|
+
${g(!1,Q?.toString(),K?.toString())}
|
|
17
17
|
</span>
|
|
18
|
-
${
|
|
18
|
+
${g(C?.enableViewMoreIcon,s`<span class="${_}">${M}</span>`," ")}
|
|
19
19
|
</button>`)}`)}
|
|
20
|
-
</gp-product-description-
|
|
20
|
+
</gp-product-description-v7-5>
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${F()}
|
|
23
23
|
`))};export{ProductDescription as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as o,getGlobalColorStyle as
|
|
1
|
+
import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as o,getGlobalColorStyle as l,makeStyle as n,filterTruthyStyles as i,getResponsiveValueByScreen as p}from"@gem-sdk/core";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as a}from"./helpers.js";let devices=["desktop","mobile","tablet"],getDisplayStyle=(t,e)=>{let o={};return devices.forEach(l=>{o={...o,[`--d${"desktop"===l?"":`-${l}`}`]:`${t(l)?"none":e}`}}),o},getTextStyle=({setting:p,renderMaxHeight:a})=>{let r=t(p?.typo,p?.typography),s={...e({value:p?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:p?.typo?.custom?.hasShadowText}),...o("ta",p?.textAlign),...l(p?.color),...n({tt:p?.transform}),...r,...a&&getMaxHeightStyleDefault(p)};return i(s)},getButtonStyle=({setting:e})=>{let p=t(e?.typo,e?.typography),a=()=>getDisplayStyle(t=>!!e?.hasLineClamp&&void 0!==e.hasLineClamp[t]&&!e.hasLineClamp[t],"inline-flex"),r={...o("jc",e?.textAlign),...n({tt:e?.transform}),...p,...l(e?.showMoreColor),...a()};return i(r)},getStaticCss=()=>{let t=`
|
|
2
2
|
.gp-p-description-text > *:not(ol):not(ul):not(table):not(div):not(style):not(script) {
|
|
3
3
|
display: inline !important;
|
|
4
4
|
}
|
|
@@ -13,4 +13,4 @@ import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as o,
|
|
|
13
13
|
.p-description-wrapper.gp-p-description-text * {
|
|
14
14
|
color: inherit;
|
|
15
15
|
line-height: inherit !important;
|
|
16
|
-
}`;return{gpDescriptionCss:t,textDescriptionCss:e}};export{getButtonStyle,getStaticCss,getTextStyle};
|
|
16
|
+
}`;return{gpDescriptionCss:t,textDescriptionCss:e}},getMaxHeightStyleDefault=t=>{let e={desktop:"none"},l=["desktop","mobile","tablet"];l.forEach(o=>{let l=p(t?.lineClamp,o),n=p(t?.hasLineClamp,o),i=n&&l?`${l*a}px`:"none";e={...e,[o]:i}});let n=o("maxh",e);return n};export{getButtonStyle,getMaxHeightStyleDefault,getStaticCss,getTextStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as
|
|
1
|
+
import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as l}from"../common/helpers.js";import{useProduct as n,useCurrentDevice as o,getResponsiveValueByScreen as m,useProductShopifyEditLink as u,useEditorMode as p}from"@gem-sdk/core";let useGpDescription=s=>{let c=e(null),[a,h]=t(!1),[g,H]=t(!1),d=n(),y=o(),f=m(s?.hasLineClamp,y),x=m(s?.lineClamp,y),{redirectProductShopifyLink:C}=u(),w=p(),D=r(()=>{if(!c.current)return l;let e=window.getComputedStyle(c.current).getPropertyValue("line-height");return Math.ceil(parseFloat(e))},[]),G=r(e=>f&&x&&e?`${x*e}px`:"auto",[f,x]),M=()=>{if(!c.current)return;let e=D();a?c.current.style.maxHeight=G(e):c.current.style.maxHeight="none",h(e=>!e)};return i(()=>{let e=D();G(e)},[s?.typo?.custom,G,D]),i(()=>{let e=c.current;if(h(!1),!e)return;let t=f&&d?.descriptionHtml;t?setTimeout(()=>{let t=e?.scrollHeight??0,r=e?.clientHeight??0,i=D(),l=Math.round((t??0)/i);e.style.maxHeight=G(i);let n=x&&x<l||r<t;x&&n?H(()=>!0):H(()=>!1)},100):e.style.maxHeight="none"},[f,x,d?.description,d?.descriptionHtml,D,G,h,H]),{ref:c,open:a,isShowViewMore:g,handleToggleShowMore:M,mode:w,redirectProductShopifyLink:C}};export{useGpDescription};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as s,getSettingPreloadData as r}from"../../../helpers.js";import p from"../../../text/components/Text.liquid.js";import{createStyle as t,createClass as n,LiquidIf as c,Liquid as d,If as l}from"@gem-sdk/system";import{getWrapperTextClass as o,getContainerClass as u,getProductTagClass as g}from"./common/classes.js";import{getRootClass as m,getWrapperTextStyle as f,getContainerStyle as
|
|
1
|
+
import{template as e,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as s,getSettingPreloadData as r}from"../../../helpers.js";import p from"../../../text/components/Text.liquid.js";import{createStyle as t,createClass as n,LiquidIf as c,Liquid as d,If as l}from"@gem-sdk/system";import{getWrapperTextClass as o,getContainerClass as u,getProductTagClass as g}from"./common/classes.js";import{getRootClass as m,getWrapperTextStyle as f,getContainerStyle as v}from"./common/styles.js";let ProductTag=({setting:$,styles:y,builderProps:x,advanced:S,pageContext:P})=>{let{customContent:_,translate:V}=$??{},h=$?.moneyWithCurrentFormat?"money_with_currency":"money",j=s({val:_?.prefix,uid:x?.uid,settingId:"customContent_prefix",isLiquid:!0,pageContext:P,translate:V}),M=s({val:_?.suffix,uid:x?.uid,settingId:"customContent_suffix",isLiquid:!0,pageContext:P,translate:V}),q=t(m(y)),w=t(f(y)),C=t(v(y)),E=n(o(y)),F=n(u()),N=n(g(S)),O=_?.unit==="percentage",T=()=>{let e=i?"{{ 'gp-product-tag-v7-5.js' | asset_url }}":`${a}/assets-v2/gp-product-tag-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${r('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
2
2
|
{% liquid
|
|
3
3
|
assign price = variant.price | times: 1.0
|
|
4
4
|
assign salePrice = variant.compare_at_price | times: 1.0
|
|
@@ -11,20 +11,20 @@ import{template as e,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";impor
|
|
|
11
11
|
{% assign pricePercentage = prefixVal | append: ' ' | append: priceSaveMoney | append: ' ' | append: suffixVal %}`,`{% assign priceSaveMoney = 0 | ${h} %}
|
|
12
12
|
{% assign pricePercentage = prefixVal | append: ' ' | append: priceSaveMoney | append: ' ' | append: suffixVal %}`))}`)}
|
|
13
13
|
|
|
14
|
-
<gp-product-tag
|
|
14
|
+
<gp-product-tag-v7-5
|
|
15
15
|
class="${N}"
|
|
16
16
|
style="${q}"
|
|
17
17
|
data-id="${x?.uid}"
|
|
18
18
|
data-disabled="${c(`${l(O,"salePercent","priceSave")} > 0`,"false","true")}"
|
|
19
|
-
gp-data='{"setting":${JSON.stringify(
|
|
19
|
+
gp-data='{"setting":${JSON.stringify($).replaceAll("'","'")}, "id": "${x?.uid}", "locale": "{{shop.locale}}", "currency": "{{shop.currency}}", "moneyFormat": "{{ ${$?.moneyWithCurrentFormat?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}"}'
|
|
20
20
|
price-save="{{priceSave}}"
|
|
21
21
|
>
|
|
22
22
|
<div class="${F}" style="${C}">
|
|
23
23
|
<div class="${E}" style="${w}">
|
|
24
|
-
${p({styles:
|
|
24
|
+
${p({styles:y,id:`p-tag-${x?.uid}`,setting:{...$,translate:"",text:"{{ pricePercentage }}",excludeFlex:!0}})}
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
-
</gp-product-tag>
|
|
28
|
+
</gp-product-tag-v7-5>
|
|
29
29
|
${T()}
|
|
30
30
|
`};export{ProductTag as default};
|
|
@@ -26,7 +26,7 @@ import{template as e,isLocalEnv as o,baseAssetURL as r,WrapRenderChildren as s,R
|
|
|
26
26
|
{% assign featured_image = product.featured_image %}
|
|
27
27
|
${y("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
28
28
|
`)}
|
|
29
|
-
<gp-product-images-
|
|
29
|
+
<gp-product-images-v7-5
|
|
30
30
|
gp-data='${A}'
|
|
31
31
|
${{...B}}
|
|
32
32
|
style="${{...b}}"
|
|
@@ -39,6 +39,6 @@ import{template as e,isLocalEnv as o,baseAssetURL as r,WrapRenderChildren as s,R
|
|
|
39
39
|
${l({builderPropUID:`gp-carousel-${D?.uid}`,...N,children:V(),enableLazyLoadImage:z})}
|
|
40
40
|
${v(!L,y("product.media.size > 1",W()))}
|
|
41
41
|
</div>
|
|
42
|
-
</gp-product-images-
|
|
43
|
-
${v(o,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-images-
|
|
42
|
+
</gp-product-images-v7-5>
|
|
43
|
+
${v(o,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-images-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-images-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
44
|
`};export{ProductImages as default};
|
|
@@ -169,11 +169,11 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
169
169
|
{%- endif -%}
|
|
170
170
|
`;return e`
|
|
171
171
|
${s(t,`
|
|
172
|
-
<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product.
|
|
173
|
-
${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height.
|
|
172
|
+
<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>
|
|
173
|
+
${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height-v7-5.js' | asset_url }}" defer="defer"></script>`:""}
|
|
174
174
|
`,`
|
|
175
|
-
<script ${d('class="gps-link" delay',"src")}="${i}/assets-v2/gp-product.
|
|
176
|
-
${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="${i}/assets-v2/gp-same-height.
|
|
175
|
+
<script ${d('class="gps-link" delay',"src")}="${i}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
176
|
+
${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="${i}/assets-v2/gp-same-height-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`:""}
|
|
177
177
|
`)}
|
|
178
178
|
|
|
179
179
|
${s(!!f?.preloadBgImage,`${s(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:n,children:a}=o,{productItemClass:r,gpProductClass:c}=e(o);return t`
|
|
2
|
-
<gp-product
|
|
2
|
+
<gp-product-v7-5
|
|
3
3
|
gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
|
|
4
4
|
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(n)}}'
|
|
5
5
|
class="${c}"
|
|
@@ -11,5 +11,5 @@ import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/clas
|
|
|
11
11
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
12
|
${a}
|
|
13
13
|
{%- endform -%}
|
|
14
|
-
</gp-product>
|
|
14
|
+
</gp-product-v7-5>
|
|
15
15
|
`};export{ProductListItem as default};
|
|
@@ -3,7 +3,7 @@ import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as
|
|
|
3
3
|
${e({...o,index:n,style:{...o.style,...d}})}
|
|
4
4
|
`})}
|
|
5
5
|
`;return t`
|
|
6
|
-
<gp-product
|
|
6
|
+
<gp-product-v7-5
|
|
7
7
|
gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
|
|
8
8
|
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(r)}}'
|
|
9
9
|
class="${s}"
|
|
@@ -15,5 +15,5 @@ import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as
|
|
|
15
15
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
16
16
|
${l()}
|
|
17
17
|
{%- endform -%}
|
|
18
|
-
</gp-product>
|
|
18
|
+
</gp-product-v7-5>
|
|
19
19
|
`};export{ProductListItem as default};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import{template as t,RenderIf as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as r}from"./common/classes.js";import{getAttr as s}from"./common/attrs.js";import d from"./ProductListGridItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";let ProductListGridLayout=a=>{let{setting:n,builderProps:c,styles:m,productListId:u,productSrc:p}=a,{gridLayoutStyle:l}=o(a),{gridLayoutClass:f}=r(a),{productListAttr:g}=s(a),$=i=>t`
|
|
2
|
-
<gp-same-height-
|
|
2
|
+
<gp-same-height-v7-5
|
|
3
3
|
class="gp-contents"
|
|
4
4
|
style="visibility: hidden"
|
|
5
5
|
gp-data='${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:m?.horizontalGutter})}'>
|
|
6
6
|
${i}
|
|
7
|
-
</gp-same-height-
|
|
7
|
+
</gp-same-height-v7-5>
|
|
8
8
|
`,h=()=>t`
|
|
9
9
|
{%- assign count = 0 -%}
|
|
10
10
|
{%- for product in products limit: limit -%}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{template as r,dataStringify as e,isLocalEnv as o,baseAssetURL as s}from"@gem-sdk/core";import{getSettingPreloadData as c}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as p,createAttr as m,createStateOrContext as i,Liquid as l}from"@gem-sdk/system";import{getWrapperClasses as a}from"./common/classes.js";import{getAttrs as d}from"./common/attrs.js";import{getTextProps as u}from"./common/helpers.js";let ProductPrice=n=>{let{style:f,setting:y,builderProps:$,pageContext:h}=n,g=p(a(n)),P=m(d(n)),j=u(n),
|
|
2
|
-
<gp-product-price
|
|
1
|
+
import{template as r,dataStringify as e,isLocalEnv as o,baseAssetURL as s}from"@gem-sdk/core";import{getSettingPreloadData as c}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as p,createAttr as m,createStateOrContext as i,Liquid as l}from"@gem-sdk/system";import{getWrapperClasses as a}from"./common/classes.js";import{getAttrs as d}from"./common/attrs.js";import{getTextProps as u}from"./common/helpers.js";let ProductPrice=n=>{let{style:f,setting:y,builderProps:$,pageContext:h}=n,g=p(a(n)),P=m(d(n)),j=u(n),v=i({priceType:y?.priceType,uid:$?.uid,locale:"{{shop.locale}}",currency:"{{shop.currency}}",moneyFormat:`{{ ${h?.showPriceCurrency?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}`}),_=()=>{let r=o?"{{ 'gp-product-price-v7-5.js' | asset_url }}":`${s}/assets-v2/gp-product-price-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${c('class="gps-link" delay',"src")}="${r}" defer="defer"></script>`};return l(r`
|
|
2
|
+
<gp-product-price-v7-5
|
|
3
3
|
${P}
|
|
4
4
|
class="${g}"
|
|
5
5
|
style="${f}"
|
|
6
|
-
gp-data='${e(
|
|
6
|
+
gp-data='${e(v)}'
|
|
7
7
|
>
|
|
8
8
|
${t(j)}
|
|
9
|
-
</gp-product-price>
|
|
10
|
-
${
|
|
9
|
+
</gp-product-price-v7-5>
|
|
10
|
+
${_()}
|
|
11
11
|
`)};export{ProductPrice,ProductPrice as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{composeClasses as r,template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as o}from"@gem-sdk/core";import p from"./property-choice/ProductPropertyChoice.liquid.js";import l from"./property-input/ProductPropertyInput.liquid.js";import i from"./property-select/ProductPropertySelect.liquid.js";import{getSettingPreloadData as d}from"../../../helpers.js";import{createAttr as c,createStyle as m,createClass as a}from"@gem-sdk/system";import{getContents as n,getLabelContent as u}from"./common/helpers.js";import{getWrapperLiquidAttrs as $,getWrapperErrorMessageAttrs as y}from"./common/attrs.js";import{getWrapperStyles as f,getLabelStyles as
|
|
2
|
-
<gp-product-property ${{..._}} class="${O}"
|
|
1
|
+
import{composeClasses as r,template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as o}from"@gem-sdk/core";import p from"./property-choice/ProductPropertyChoice.liquid.js";import l from"./property-input/ProductPropertyInput.liquid.js";import i from"./property-select/ProductPropertySelect.liquid.js";import{getSettingPreloadData as d}from"../../../helpers.js";import{createAttr as c,createStyle as m,createClass as a}from"@gem-sdk/system";import{getContents as n,getLabelContent as u}from"./common/helpers.js";import{getWrapperLiquidAttrs as $,getWrapperErrorMessageAttrs as y}from"./common/attrs.js";import{getWrapperStyles as f,getLabelStyles as v,getLabelContentStyles as g,getWrapperErrorMessageStyles as h}from"./common/styles.js";import{getLabelClasses as C,getLiquidTagClasses as P,getLabelWrapperClasses as j,getWrapperErrorMessageClasses as w}from"./common/classes.js";let ProductProperties=({setting:x,styles:S,builderProps:k,advanced:E,pageContext:M})=>{let{name:b,type:q,childItem:V,translate:Z}=x??{},{isDisplayLabel:A=!0}=S??{};x&&!b&&(x.name="Property");let G=k?.uid,{displayLabel:I}=n(G,M,x),_=c({...$(G,M,x)}),B=m({...f(S)}),F=m({...v(S)}),N=a({...C(S)}),O=a({...P(x)}),R=a({...j(E)}),T=m({...g()}),z=u(x),D=a({...w(),...r("data-[hidden=true]:gp-hidden")}),H=m({...h(S)}),J=c({...y()});return e`
|
|
2
|
+
<gp-product-property-v7-5 ${{..._}} class="${O}"
|
|
3
3
|
style="${B}"
|
|
4
4
|
>
|
|
5
5
|
${t(A,e`<div class="${R}">
|
|
@@ -35,5 +35,5 @@ import{composeClasses as r,template as e,RenderIf as t,isLocalEnv as s,baseAsset
|
|
|
35
35
|
<span data-slot-type="message-content" class="gp-pl-1"></span>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
|
-
</gp-product-property>
|
|
39
|
-
${t(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-property.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-property.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`};export{ProductProperties as default};
|
|
38
|
+
</gp-product-property-v7-5>
|
|
39
|
+
${t(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-property-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-property-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`};export{ProductProperties as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{template as t,RenderIf as s,isLocalEnv as e,baseAssetURL as a}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../../helpers.js";import{createAttr as l,createClass as r,createStyle as o}from"@gem-sdk/system";import{getContainerAttrs as n,getInputAttr as u,getButtonAttrs as d}from"./common/attrs.js";import{getContainerClasses as c,getWrapperClasses as p,getInputClasses as f,getButtonClass as m,getIconWrapperClasses as $}from"./common/classes.js";import{getContainerStyles as b,getWrapperStyles as
|
|
1
|
+
import{template as t,RenderIf as s,isLocalEnv as e,baseAssetURL as a}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../../helpers.js";import{createAttr as l,createClass as r,createStyle as o}from"@gem-sdk/system";import{getContainerAttrs as n,getInputAttr as u,getButtonAttrs as d}from"./common/attrs.js";import{getContainerClasses as c,getWrapperClasses as p,getInputClasses as f,getButtonClass as m,getIconWrapperClasses as $}from"./common/classes.js";import{getContainerStyles as b,getWrapperStyles as v,getInputStyle as y,getButtonStyle as g}from"./common/styles.js";import{getIconWidth as S,getMinusIcon as _,getPlusIcon as h}from"./common/helpers.js";let ProductQuantity=({setting:j={},styles:q={},advanced:B,builderProps:k})=>{let{plusIcon:E,minusIcon:H,updatePrice:P}=j,Q=j.defaultQtyValue??1,{inputHeight:A,buttonBackgroundColor:G,iconColor:L,inputBackgroundColor:M,textColor:V,align:x,borderBtn:C,buttonWidth:D,iconSizeCustom:I,corner:N,backgroundColor:O,dividerColor:R,dividerStroke:T}=q,w=j?.hasButton,z=l({...n({uid:k?.uid||"",isDisableByLiquid:!0})}),F=r({...c(B?.cssClass)}),J=o({...b({align:x,inputHeight:A})}),K=r({...p()}),U=o({...v({backgroundColor:O,styles:q})}),W=l({...u({isLiquid:!0,hasButton:w,defaultQty:Q})}),X=r({...f({styles:q,borderBtn:C,inputBackgroundColor:M,textColor:V})}),Y=o({...y({setting:j,styles:{...q,borderBtn:C,inputBackgroundColor:M,textColor:V,dividerColor:R,dividerStroke:T}})}),Z=r({...m({borderBtn:C,buttonBackgroundColor:G,iconColor:L,buttonSide:"left"})}),tt=o({...g({borderBtn:C,buttonWidth:D,buttonBackgroundColor:G,iconColor:L,corner:N,enableHoverButton:j?.enableHoverButton})}),ts=l({...d({buttonSide:"left"})}),te=r({...m({borderBtn:C,buttonBackgroundColor:G,iconColor:L,buttonSide:"right"})}),ta=o({...g({borderBtn:C,buttonWidth:D,buttonBackgroundColor:G,iconColor:L,corner:N,enableHoverButton:j?.enableHoverButton})}),ti=l({...d({buttonSide:"right"})}),tl=r({...$()}),tr=S(I);return t`
|
|
2
2
|
{%- liquid
|
|
3
3
|
assign current_variant = product.selected_or_first_available_variant
|
|
4
4
|
assign available = current_variant.available | default: false
|
|
5
5
|
-%}
|
|
6
|
-
<gp-product-quantity
|
|
6
|
+
<gp-product-quantity-v7-5
|
|
7
7
|
${{...z}}
|
|
8
8
|
data-price="${P}"
|
|
9
9
|
class="${F}"
|
|
@@ -44,5 +44,5 @@ import{template as t,RenderIf as s,isLocalEnv as e,baseAssetURL as a}from"@gem-s
|
|
|
44
44
|
</button>
|
|
45
45
|
`)}
|
|
46
46
|
</div>
|
|
47
|
-
</gp-product-quantity>
|
|
48
|
-
${s(e,`<script ${i('class="gps-link" delay',"src")}="{{ 'gp-product-quantity.js' | asset_url }}" defer="defer"></script>`,`<script ${i('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-quantity.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`};export{ProductQuantity as default};
|
|
47
|
+
</gp-product-quantity-v7-5>
|
|
48
|
+
${s(e,`<script ${i('class="gps-link" delay',"src")}="{{ 'gp-product-quantity-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${i('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-quantity-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`};export{ProductQuantity as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as t,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as s}from"../../../helpers.js";import a from"../../../text/components/Text.liquid.js";import{LiquidUnless as l,LiquidIf as o,If as u}from"@gem-sdk/system";let ProductSku=({setting:i,styles:c,advanced:d,builderProps:p})=>{let n=c?.typo?.attrs?.transform==="capitalize",m=i?.label&&i.label.trim().length?`${n?i.label.toString().toLocaleLowerCase():i.label}`:"";c?.disableHoverColor&&delete c.underlineLink;let g=()=>{let e=t?"{{ 'gp-product-sku.js' | asset_url }}":`${r}/assets-v2/gp-product-sku.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
1
|
+
import{template as e,isLocalEnv as t,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as s}from"../../../helpers.js";import a from"../../../text/components/Text.liquid.js";import{LiquidUnless as l,LiquidIf as o,If as u}from"@gem-sdk/system";let ProductSku=({setting:i,styles:c,advanced:d,builderProps:p})=>{let n=c?.typo?.attrs?.transform==="capitalize",m=i?.label&&i.label.trim().length?`${n?i.label.toString().toLocaleLowerCase():i.label}`:"";c?.disableHoverColor&&delete c.underlineLink;let g=()=>{let e=t?"{{ 'gp-product-sku-v7-5.js' | asset_url }}":`${r}/assets-v2/gp-product-sku-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
2
2
|
${l("product","<p>Product not found</p>",`{% assign currentVariant = product.selected_or_first_available_variant %}
|
|
3
|
-
<gp-product-sku gp-data='${JSON.stringify({label:m})}'>
|
|
3
|
+
<gp-product-sku-v7-5 gp-data='${JSON.stringify({label:m})}'>
|
|
4
4
|
${a({styles:c,setting:{...i,text:`${o("currentVariant.sku.size > 0 ",`${m} ${u(n,"{{ currentVariant.sku | downcase }}","{{ currentVariant.sku }}")}`)}`,excludeFlex:!0,isForceValue:!0},advanced:d,builderProps:p,className:"gp-product-sku"})}
|
|
5
|
-
</gp-product-sku>
|
|
5
|
+
</gp-product-sku-v7-5>
|
|
6
6
|
${g()}`)}`};export{ProductSku as default};
|
|
@@ -94,10 +94,10 @@ import{composeMemo as t,template as e,DEVICES as s,getResponsiveValueByScreen as
|
|
|
94
94
|
<div className="${tl}">
|
|
95
95
|
${l(tm)}
|
|
96
96
|
</div>
|
|
97
|
-
`;$({setting:B,styles:JSON.stringify(E),variants:"{{ product.variants | json | escape }}",optionsWithValues:"{{ product.options_with_values | json | escape }}",variantSelected:"{{ variant | json | escape }}",variantInventoryQuantity:"{{ product.variants | map: 'inventory_quantity' | json | escape }}",variantInventoryPolicy:"{{ product.variants | map: 'inventory_policy' | json | escape }}",moneyFormat:"{{ shop.money_format | json | escape }}",productId:"{{ product.id | json | escape }}",productUrl:"{{ product.url | json | escape }}",productHandle:"{{ product.handle | json | escape }}",displayState:`${JSON.stringify(z)}`,totalVariantCombinations:"{{ total_combinations }}",firstAvailableVariant:"{{ product.selected_or_first_available_variant | json | escape }}"});let td=g(V({uid:H,hasPreSelected:W})),tu=u(_(N)),t$=d({"gp-flex gp-flex-col !gp-ml-0":!0}),tg=()=>{let t=i?"{{ 'gp-product-variant-
|
|
97
|
+
`;$({setting:B,styles:JSON.stringify(E),variants:"{{ product.variants | json | escape }}",optionsWithValues:"{{ product.options_with_values | json | escape }}",variantSelected:"{{ variant | json | escape }}",variantInventoryQuantity:"{{ product.variants | map: 'inventory_quantity' | json | escape }}",variantInventoryPolicy:"{{ product.variants | map: 'inventory_policy' | json | escape }}",moneyFormat:"{{ shop.money_format | json | escape }}",productId:"{{ product.id | json | escape }}",productUrl:"{{ product.url | json | escape }}",productHandle:"{{ product.handle | json | escape }}",displayState:`${JSON.stringify(z)}`,totalVariantCombinations:"{{ total_combinations }}",firstAvailableVariant:"{{ product.selected_or_first_available_variant | json | escape }}"});let td=g(V({uid:H,hasPreSelected:W})),tu=u(_(N)),t$=d({"gp-flex gp-flex-col !gp-ml-0":!0}),tg=()=>{let t=i?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${m('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`};return e`
|
|
98
98
|
${v("{%- assign total_combinations = 1 -%}")}
|
|
99
99
|
${y("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
100
|
-
<gp-product-variants
|
|
100
|
+
<gp-product-variants-v7-5
|
|
101
101
|
${td}
|
|
102
102
|
gp-data='{
|
|
103
103
|
"setting":${JSON.stringify(B)?.replaceAll("'","'")},
|
|
@@ -124,7 +124,7 @@ import{composeMemo as t,template as e,DEVICES as s,getResponsiveValueByScreen as
|
|
|
124
124
|
>
|
|
125
125
|
${S(M,tc(),to())}
|
|
126
126
|
</div>`)}
|
|
127
|
-
</gp-product-variants>
|
|
127
|
+
</gp-product-variants-v7-5>
|
|
128
128
|
|
|
129
129
|
${tg()}
|
|
130
130
|
`};export{ProductVariants as default};
|