@gem-sdk/components 17.0.0-dev.134 → 17.0.0-dev.135
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/product-images-v2/ProductImagesV2.liquid.js +24 -21
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +24 -21
- package/dist/cjs/stock-counter/components/StockCounter.liquid.js +11 -8
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +23 -20
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +23 -20
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +27 -24
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),r=require("./components/feature-gallery/FeatureImageWithGallery.liquid.js"),a=require("./components/gallery-carousel/GalleryCarousel.liquid.js"),i=require("./components/gallery-grid/GalleryGrid.liquid.js"),s=require("../../../helpers.js"),o=require("./common/productGallery.js"),l=require("./composables/getProductImagesClassName.js"),d=require("./composables/getProductImagesStyles.js"),u=require("@gem-sdk/system"),p=require("./common/getBorderActiveCss.js"),n=require("../../helpers/function.js");exports.default=g=>{let c=t.setDefaultWhenUndefineSetting(g),{setting:m,styles:f,builderProps:y,style:$}=c,{rawChildren:I,pageContext:S}=g,{enableLazyLoadImage:h}=S??{},q={...m,...f},j=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(y?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(
|
|
4
|
+
"pageContext": ${JSON.stringify(s.filterPageContext(S))},
|
|
5
5
|
"setting":${JSON.stringify(m)},
|
|
6
6
|
"styles":${JSON.stringify(f)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
@@ -9,25 +9,13 @@
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
10
|
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,v=
|
|
13
|
-
${e.WrapRenderChildren({uid:y?.uid||"",customProps:
|
|
14
|
-
`,U=()=>e.template`
|
|
15
|
-
<div
|
|
16
|
-
class="${O}"
|
|
17
|
-
style="${n.getStyleOfObject(N)}"
|
|
18
|
-
${{...P}}
|
|
19
|
-
>
|
|
20
|
-
${p.LiquidIf("product.media.size > 1",r.default({builderPropUID:`gp-gallery-${y?.uid}`,...q,enableLazyLoadImage:I}))}
|
|
21
|
-
${p.If(F,s.default({builderPropUID:y?.uid,wrapperStyle:{...z},children:B(),...q,enableLazyLoadImage:I}))}
|
|
22
|
-
</div>
|
|
23
|
-
`,w=()=>e.template`
|
|
24
|
-
${i.default({builderPropUID:`gp-carousel-${y?.uid}`,...q,children:B(),enableLazyLoadImage:I})}
|
|
25
|
-
${p.If(!C,U())}
|
|
12
|
+
`,v=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:F,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(q?.position,m?.type),P=C?{}:u.createAttr({"data-only-image":u.LiquidIf("product.media.size > 1","false","true")}),{wrapperClasses:L,productImagesGalleryClasses:O}=l.getProductImagesClassName(g),D=u.createClass({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),b=u.createClass({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:G,wrapContainerStyleOnlyOneImage:A,galleryImageStyle:N}=d.getProductImagesStyles(q),_=o.getShapeByLayout({shape:q.shape,shapeForBottom:q.shapeForBottom,shapeFor1Col:q.shapeFor1Col,shapeFor2Col:q.shapeFor2Col,shapeForFtOnly:q.shapeForFtOnly,shapeForInsideBottom:q.shapeForInsideBottom??o.sizeSettingDefaultForNewLayout,shapeForInside:q.shapeForInside??o.sizeSettingDefaultForNewLayout},q.position),z=t.getStyleInsideLayout(q.position,_,q?.spacing),B=()=>e.template`
|
|
13
|
+
${e.WrapRenderChildren({uid:y?.uid||"",customProps:I?.[0].customProps},I?.map(t=>{if(t)return e.template`${e.RenderChildren({...t,isInsideProductImage:!0,imageData:{imageShape:f?.ftShape,imageAlign:f?.align,imageLayout:f?.position},dotData:{dotSize:m?.ftDotSize,dotGapToCarousel:m?.ftDotGapToCarousel,dotStyle:m?.ftDotStyle}})}`}))}
|
|
26
14
|
`;return e.template`
|
|
27
|
-
${
|
|
28
|
-
${
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:q,uid:y?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${u.Liquid(`
|
|
29
17
|
{% assign featured_image = product.featured_image %}
|
|
30
|
-
${
|
|
18
|
+
${u.LiquidIf("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
31
19
|
`)}
|
|
32
20
|
<gp-product-images
|
|
33
21
|
${{...v}}
|
|
@@ -35,7 +23,22 @@
|
|
|
35
23
|
class="${L}"
|
|
36
24
|
>
|
|
37
25
|
<script gp-data type="application/json">${j}</script>
|
|
38
|
-
|
|
26
|
+
{% capture renderFeatureImage %}
|
|
27
|
+
${e.template`
|
|
28
|
+
${r.default({builderPropUID:`gp-carousel-${y?.uid}`,...q,children:B(),enableLazyLoadImage:h})}
|
|
29
|
+
${u.If(!F,e.template`
|
|
30
|
+
<div
|
|
31
|
+
class="${O}"
|
|
32
|
+
style="${n.getStyleOfObject(N)}"
|
|
33
|
+
${{...P}}
|
|
34
|
+
>
|
|
35
|
+
${u.LiquidIf("product.media.size > 1",a.default({builderPropUID:`gp-gallery-${y?.uid}`,...q,enableLazyLoadImage:h}))}
|
|
36
|
+
${u.If(C,i.default({builderPropUID:y?.uid,wrapperStyle:{...z},children:B(),...q,enableLazyLoadImage:h}))}
|
|
37
|
+
</div>
|
|
38
|
+
`)}
|
|
39
|
+
`}
|
|
40
|
+
{% endcapture %}
|
|
41
|
+
${u.LiquidIf("product.media.size > 1",e.template`<div class="${D}" style="${n.getStyleOfObject(G)}">{{ renderFeatureImage }}</div>`,e.template`<div class="${b}" style="${n.getStyleOfObject(A)}">{{ renderFeatureImage }}</div>`)}
|
|
39
42
|
</gp-product-images>
|
|
40
|
-
${
|
|
43
|
+
${u.If(e.isLocalEnv,`<script ${s.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-product-images-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${s.getSettingPreloadData('class="gps-link" delay',"src")}="${e.baseAssetURL}/assets-v2/gp-product-images-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
41
44
|
`};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),r=require("./components/feature-gallery/FeatureImageWithGallery.liquid.js"),a=require("./components/gallery-carousel/GalleryCarousel.liquid.js"),i=require("./components/gallery-grid/GalleryGrid.liquid.js"),s=require("../../../helpers.js"),o=require("./common/productGallery.js"),l=require("./composables/getProductImagesClassName.js"),d=require("./composables/getProductImagesStyles.js"),u=require("@gem-sdk/system"),p=require("./common/getBorderActiveCss.js"),n=require("../../helpers/function.js");exports.default=g=>{let c=t.setDefaultWhenUndefineSetting(g),{setting:m,styles:f,builderProps:y,style:$}=c,{rawChildren:I,pageContext:S}=g,{enableLazyLoadImage:h}=S??{},v={...m,...f},q=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(y?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(
|
|
4
|
+
"pageContext": ${JSON.stringify(s.filterPageContext(S))},
|
|
5
5
|
"setting":${JSON.stringify(m)},
|
|
6
6
|
"styles":${JSON.stringify(f)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
@@ -9,25 +9,13 @@
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
10
|
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,j=
|
|
13
|
-
${e.WrapRenderChildren({uid:y?.uid||"",customProps:
|
|
14
|
-
`,U=()=>e.template`
|
|
15
|
-
<div
|
|
16
|
-
class="${O}"
|
|
17
|
-
style="${n.getStyleOfObject(N)}"
|
|
18
|
-
${{...P}}
|
|
19
|
-
>
|
|
20
|
-
${p.LiquidIf("product.media.size > 1",r.default({builderPropUID:`gp-gallery-${y?.uid}`,...v,enableLazyLoadImage:I}))}
|
|
21
|
-
${p.If(F,s.default({builderPropUID:y?.uid,wrapperStyle:{...z},children:B(),...v,enableLazyLoadImage:I}))}
|
|
22
|
-
</div>
|
|
23
|
-
`,w=()=>e.template`
|
|
24
|
-
${i.default({builderPropUID:`gp-carousel-${y?.uid}`,...v,children:B(),enableLazyLoadImage:I})}
|
|
25
|
-
${p.If(!C,U())}
|
|
12
|
+
`,j=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:F,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(v?.position,m?.type),P=C?{}:u.createAttr({"data-only-image":u.LiquidIf("product.media.size > 1","false","true")}),{wrapperClasses:L,productImagesGalleryClasses:O}=l.getProductImagesClassName(g),D=u.createClass({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),b=u.createClass({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:G,wrapContainerStyleOnlyOneImage:A,galleryImageStyle:N}=d.getProductImagesStyles(v),_=o.getShapeByLayout({shape:v.shape,shapeForBottom:v.shapeForBottom,shapeFor1Col:v.shapeFor1Col,shapeFor2Col:v.shapeFor2Col,shapeForFtOnly:v.shapeForFtOnly,shapeForInsideBottom:v.shapeForInsideBottom??o.sizeSettingDefaultForNewLayout,shapeForInside:v.shapeForInside??o.sizeSettingDefaultForNewLayout},v.position),z=t.getStyleInsideLayout(v.position,_,v?.spacing),B=()=>e.template`
|
|
13
|
+
${e.WrapRenderChildren({uid:y?.uid||"",customProps:I?.[0].customProps},I?.map(t=>{if(t)return e.template`${e.RenderChildren({...t,isInsideProductImage:!0,imageData:{imageShape:f?.ftShape,imageAlign:f?.align,imageLayout:f?.position},dotData:{dotSize:m?.ftDotSize,dotGapToCarousel:m?.ftDotGapToCarousel,dotStyle:m?.ftDotStyle}})}`}))}
|
|
26
14
|
`;return e.template`
|
|
27
|
-
${
|
|
28
|
-
${
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:v,uid:y?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${u.Liquid(`
|
|
29
17
|
{% assign featured_image = product.featured_image %}
|
|
30
|
-
${
|
|
18
|
+
${u.LiquidIf("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
31
19
|
`)}
|
|
32
20
|
<gp-product-images-v3
|
|
33
21
|
${{...j}}
|
|
@@ -35,7 +23,22 @@
|
|
|
35
23
|
class="${L}"
|
|
36
24
|
>
|
|
37
25
|
<script gp-data type="application/json">${q}</script>
|
|
38
|
-
|
|
26
|
+
{% capture renderFeatureImage %}
|
|
27
|
+
${e.template`
|
|
28
|
+
${r.default({builderPropUID:`gp-carousel-${y?.uid}`,...v,children:B(),enableLazyLoadImage:h})}
|
|
29
|
+
${u.If(!F,e.template`
|
|
30
|
+
<div
|
|
31
|
+
class="${O}"
|
|
32
|
+
style="${n.getStyleOfObject(N)}"
|
|
33
|
+
${{...P}}
|
|
34
|
+
>
|
|
35
|
+
${u.LiquidIf("product.media.size > 1",a.default({builderPropUID:`gp-gallery-${y?.uid}`,...v,enableLazyLoadImage:h}))}
|
|
36
|
+
${u.If(C,i.default({builderPropUID:y?.uid,wrapperStyle:{...z},children:B(),...v,enableLazyLoadImage:h}))}
|
|
37
|
+
</div>
|
|
38
|
+
`)}
|
|
39
|
+
`}
|
|
40
|
+
{% endcapture %}
|
|
41
|
+
${u.LiquidIf("product.media.size > 1",e.template`<div class="${D}" style="${n.getStyleOfObject(G)}">{{ renderFeatureImage }}</div>`,e.template`<div class="${b}" style="${n.getStyleOfObject(A)}">{{ renderFeatureImage }}</div>`)}
|
|
39
42
|
</gp-product-images-v3>
|
|
40
|
-
${
|
|
43
|
+
${u.If(e.isLocalEnv,`<script ${s.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${s.getSettingPreloadData('class="gps-link" delay',"src")}="${e.baseAssetURL}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
41
44
|
`};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../helpers.js"),s=require("../common/helpers.js"),a=require("../common/classes.js"),i=require("../common/styles.js"),r=require("../common/attrs.js"),l=require("@gem-sdk/system"),c=require("../settings/configs/translate.js");exports.default=({setting:o,styles:d,style:n,advanced:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../helpers.js"),s=require("../common/helpers.js"),a=require("../common/classes.js"),i=require("../common/styles.js"),r=require("../common/attrs.js"),l=require("@gem-sdk/system"),c=require("../settings/configs/translate.js");exports.default=({setting:o,styles:d,style:n,advanced:u,builderProps:g,pageContext:p})=>{let{borderRadius:$}=d??{},{showIcon:y,icon:S,oosIcon:v,layout:m="full",template:C,outOfStockMessage:I,continueSelling:k,unlimitedQuantityMessage:f}=o??{},q=s.getInlineCss(g?.uid,$),L=t.getDynamicSourceLocales({val:C,uid:g?.uid,settingId:t.createSettingId({id:c.StockCounter?.template?.id}),pageContext:p,isReplaceInventoryQuantity:!0}),b=t.getDynamicSourceLocales({val:I,uid:g?.uid,settingId:t.createSettingId({id:c.StockCounter?.outOfStockMessage?.id}),pageContext:p}),O=t.getDynamicSourceLocales({val:k,uid:g?.uid,settingId:t.createSettingId({id:c.StockCounter?.continueSelling?.id}),pageContext:p}),A=t.getDynamicSourceLocales({val:f,uid:g?.uid,settingId:t.createSettingId({id:c.StockCounter?.unlimitedQuantityMessage?.id}),pageContext:p}),T=l.createAttr({...r.getLiquidTagAttrs(g,o,d)}),x=l.createClass({...e.composeClasses("gp-stock-counter-progress gp-mt-2 data-[visible=true]:gp-block data-[visible=false]:gp-hidden"),...a.getProgressBarClasses(d)}),_=l.createStyle({...i.getProgressBarStyles(d,o)}),j=l.createStyle({...i.getContainerStyles(d)}),D=l.createClass({...a.getContainerClasses(o)}),P=l.createClass({...a.getLiquidTagClasses(u)}),R=l.createStyle({...n}),h=l.createStyle({...i.getWrapperStyles(d)}),E=s.getLiquidInitData(o,d),V=s.getLiquidTextContent({templateStringDisplay:L,outOfStockMessageDisplay:b,continueSellingDisplay:O,unlimitedQuantityMessageDisplay:A}),M=l.createClass({...a.getWrapperIconClasses(o)}),B=l.createClass({...e.composeClasses("gp-stock-counter-icon data-[visible=true]:gp-block data-[visible=false]:gp-hidden"),...a.getIconClasses(),...a.getOuterIconClasses()}),W=l.createClass({...a.getWrapperClasses(o)}),G=e=>l.createStyle({...i.getIconStyles(d,o,e)}),Q=({isOutOfStockIcon:e,isVisible:t})=>l.createAttr({...r.getIconAttrs(e,t)}),N=l.createAttr({...r.getLiquidProgressBarAttrs()}),U=l.createClass({...a.getTextClasses(d),...e.composeClasses("gp-stock-counter-mark")}),w=e=>l.createStyle({...i.getTextStyles(d,e)}),z=l.createAttr({...r.getLiquidTextAttrs()}),F=s.getTextDisplayData({templateStringDisplay:L,outOfStockMessageDisplay:b,continueSellingDisplay:O,unlimitedQuantityMessageDisplay:A},d);return e.template`
|
|
2
2
|
${E}
|
|
3
|
-
<gp-product-stock-counter ${{...
|
|
3
|
+
<gp-product-stock-counter ${{...T}} class="${P}"
|
|
4
4
|
style="${R}">
|
|
5
5
|
<div class="${W}" style="${h}">
|
|
6
6
|
<style>${q}</style>
|
|
7
7
|
<div
|
|
8
|
-
class="${
|
|
9
|
-
style="${
|
|
8
|
+
class="${D}"
|
|
9
|
+
style="${j}"
|
|
10
10
|
>
|
|
11
11
|
<div class="${M}">
|
|
12
12
|
${e.RenderIf(y,e.template`
|
|
@@ -40,19 +40,22 @@
|
|
|
40
40
|
</div>`)}
|
|
41
41
|
`)}
|
|
42
42
|
${F}
|
|
43
|
+
{% capture liquidTextContent %}
|
|
44
|
+
${V}
|
|
45
|
+
{% endcapture %}
|
|
43
46
|
${e.RenderIf("progress-bar"!==m,e.template`
|
|
44
47
|
${l.LiquidIf("is_out_of_stock",e.template`<p
|
|
45
48
|
${{...z}}
|
|
46
49
|
class="${U}"
|
|
47
50
|
style="${w(!0)}"
|
|
48
51
|
>
|
|
49
|
-
|
|
52
|
+
{{ liquidTextContent }}
|
|
50
53
|
</p>`,e.template`<p
|
|
51
54
|
${{...z}}
|
|
52
55
|
class="${U}"
|
|
53
56
|
style="${w(!1)}"
|
|
54
57
|
>
|
|
55
|
-
|
|
58
|
+
{{ liquidTextContent }}
|
|
56
59
|
</p>`)}
|
|
57
60
|
`)}
|
|
58
61
|
|
|
@@ -60,8 +63,8 @@
|
|
|
60
63
|
|
|
61
64
|
<div
|
|
62
65
|
${{...N}}
|
|
63
|
-
style="${
|
|
64
|
-
class="${
|
|
66
|
+
style="${_}"
|
|
67
|
+
class="${x}"
|
|
65
68
|
></div>
|
|
66
69
|
</div>
|
|
67
70
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as
|
|
1
|
+
import{template as e,isLocalEnv as r,baseAssetURL as o,WrapRenderChildren as t,RenderChildren as s}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as u,getSettingPreloadData as c}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as F,If as j,Liquid as v}from"@gem-sdk/system";import{getBorderActiveCss as I}from"./common/getBorderActiveCss.js";import{getStyleOfObject as S}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:O}=P,{rawChildren:_,pageContext:z}=C,{enableLazyLoadImage:N}=z??{},A={...G,...D},B=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(
|
|
4
|
+
"pageContext": ${JSON.stringify(u(z))},
|
|
5
5
|
"setting":${JSON.stringify(G)},
|
|
6
6
|
"styles":${JSON.stringify(D)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
@@ -9,23 +9,11 @@ import{template as e,isLocalEnv as o,baseAssetURL as t,WrapRenderChildren as r,R
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
10
|
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=
|
|
13
|
-
${
|
|
14
|
-
`,K=()=>e`
|
|
15
|
-
<div
|
|
16
|
-
class="${w}"
|
|
17
|
-
style="${I(R)}"
|
|
18
|
-
${{...E}}
|
|
19
|
-
>
|
|
20
|
-
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
21
|
-
${v(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
22
|
-
</div>
|
|
23
|
-
`,Q=()=>e`
|
|
24
|
-
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
25
|
-
${v(!k,K())}
|
|
12
|
+
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=F({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=F({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=$(A),V=n({shape:A.shape,shapeForBottom:A.shapeForBottom,shapeFor1Col:A.shapeFor1Col,shapeFor2Col:A.shapeFor2Col,shapeForFtOnly:A.shapeForFtOnly,shapeForInsideBottom:A.shapeForInsideBottom??g,shapeForInside:A.shapeForInside??g},A.position),W=a(A.position,V,A?.spacing),H=()=>e`
|
|
13
|
+
${t({uid:b?.uid||"",customProps:_?.[0].customProps},_?.map(r=>{if(r)return e`${s({...r,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
26
14
|
`;return e`
|
|
27
|
-
${
|
|
28
|
-
${
|
|
15
|
+
${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${I({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${v(`
|
|
29
17
|
{% assign featured_image = product.featured_image %}
|
|
30
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
31
19
|
`)}
|
|
@@ -35,7 +23,22 @@ import{template as e,isLocalEnv as o,baseAssetURL as t,WrapRenderChildren as r,R
|
|
|
35
23
|
class="${J}"
|
|
36
24
|
>
|
|
37
25
|
<script gp-data type="application/json">${B}</script>
|
|
38
|
-
|
|
26
|
+
{% capture renderFeatureImage %}
|
|
27
|
+
${e`
|
|
28
|
+
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
29
|
+
${j(!k,e`
|
|
30
|
+
<div
|
|
31
|
+
class="${w}"
|
|
32
|
+
style="${S(R)}"
|
|
33
|
+
${{...E}}
|
|
34
|
+
>
|
|
35
|
+
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
36
|
+
${j(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
37
|
+
</div>
|
|
38
|
+
`)}
|
|
39
|
+
`}
|
|
40
|
+
{% endcapture %}
|
|
41
|
+
${h("product.media.size > 1",e`<div class="${T}" style="${S(L)}">{{ renderFeatureImage }}</div>`,e`<div class="${x}" style="${S(M)}">{{ renderFeatureImage }}</div>`)}
|
|
39
42
|
</gp-product-images>
|
|
40
|
-
${
|
|
43
|
+
${j(r,`<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")}="${o}/assets-v2/gp-product-images-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
41
44
|
`};export{C as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as
|
|
1
|
+
import{template as e,isLocalEnv as r,baseAssetURL as o,WrapRenderChildren as t,RenderChildren as s}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as u,getSettingPreloadData as c}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as F,Liquid as j}from"@gem-sdk/system";import{getBorderActiveCss as I}from"./common/getBorderActiveCss.js";import{getStyleOfObject as S}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:O}=P,{rawChildren:_,pageContext:z}=C,{enableLazyLoadImage:N}=z??{},A={...G,...D},B=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(
|
|
4
|
+
"pageContext": ${JSON.stringify(u(z))},
|
|
5
5
|
"setting":${JSON.stringify(G)},
|
|
6
6
|
"styles":${JSON.stringify(D)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
@@ -9,23 +9,11 @@ import{template as e,isLocalEnv as o,baseAssetURL as t,WrapRenderChildren as r,R
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
10
|
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=$(A),V=
|
|
13
|
-
${
|
|
14
|
-
`,K=()=>e`
|
|
15
|
-
<div
|
|
16
|
-
class="${w}"
|
|
17
|
-
style="${I(R)}"
|
|
18
|
-
${{...E}}
|
|
19
|
-
>
|
|
20
|
-
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
21
|
-
${j(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
22
|
-
</div>
|
|
23
|
-
`,Q=()=>e`
|
|
24
|
-
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
25
|
-
${j(!k,K())}
|
|
12
|
+
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=$(A),V=n({shape:A.shape,shapeForBottom:A.shapeForBottom,shapeFor1Col:A.shapeFor1Col,shapeFor2Col:A.shapeFor2Col,shapeForFtOnly:A.shapeForFtOnly,shapeForInsideBottom:A.shapeForInsideBottom??g,shapeForInside:A.shapeForInside??g},A.position),W=a(A.position,V,A?.spacing),H=()=>e`
|
|
13
|
+
${t({uid:b?.uid||"",customProps:_?.[0].customProps},_?.map(r=>{if(r)return e`${s({...r,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
26
14
|
`;return e`
|
|
27
|
-
${
|
|
28
|
-
${
|
|
15
|
+
${F(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${I({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${j(`
|
|
29
17
|
{% assign featured_image = product.featured_image %}
|
|
30
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
31
19
|
`)}
|
|
@@ -35,7 +23,22 @@ import{template as e,isLocalEnv as o,baseAssetURL as t,WrapRenderChildren as r,R
|
|
|
35
23
|
class="${J}"
|
|
36
24
|
>
|
|
37
25
|
<script gp-data type="application/json">${B}</script>
|
|
38
|
-
|
|
26
|
+
{% capture renderFeatureImage %}
|
|
27
|
+
${e`
|
|
28
|
+
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
29
|
+
${F(!k,e`
|
|
30
|
+
<div
|
|
31
|
+
class="${w}"
|
|
32
|
+
style="${S(R)}"
|
|
33
|
+
${{...E}}
|
|
34
|
+
>
|
|
35
|
+
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
36
|
+
${F(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
37
|
+
</div>
|
|
38
|
+
`)}
|
|
39
|
+
`}
|
|
40
|
+
{% endcapture %}
|
|
41
|
+
${h("product.media.size > 1",e`<div class="${T}" style="${S(L)}">{{ renderFeatureImage }}</div>`,e`<div class="${x}" style="${S(M)}">{{ renderFeatureImage }}</div>`)}
|
|
39
42
|
</gp-product-images-v3>
|
|
40
|
-
${
|
|
43
|
+
${F(r,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
41
44
|
`};export{C as default};
|
|
@@ -1,58 +1,61 @@
|
|
|
1
|
-
import{composeClasses as s,RenderIf as t,template as
|
|
1
|
+
import{composeClasses as s,RenderIf as t,template as e,isLocalEnv as i,baseAssetURL as o}from"@gem-sdk/core";import{getDynamicSourceLocales as l,createSettingId as d,getSettingPreloadData as c}from"../../helpers.js";import{getLiquidInitData as r,getInlineCss as a,getTextDisplayData as p,getLiquidTextContent as n}from"../common/helpers.js";import{getProgressBarClasses as $,getContainerClasses as u,getLiquidTagClasses as m,getWrapperIconClasses as v,getOuterIconClasses as g,getIconClasses as f,getWrapperClasses as k,getTextClasses as y}from"../common/classes.js";import{getProgressBarStyles as S,getContainerStyles as b,getWrapperStyles as I,getIconStyles as O,getTextStyles as j}from"../common/styles.js";import{getLiquidTagAttrs as _,getLiquidProgressBarAttrs as h,getLiquidTextAttrs as C,getIconAttrs as V}from"../common/attrs.js";import{createAttr as x,createClass as E,createStyle as T,LiquidIf as q}from"@gem-sdk/system";import{StockCounter as M}from"../settings/configs/translate.js";let A=({setting:A,styles:G,style:Q,advanced:R,builderProps:N,pageContext:P})=>{let{borderRadius:w}=G??{},{showIcon:z,icon:B,oosIcon:D,layout:F="full",template:H,outOfStockMessage:J,continueSelling:K,unlimitedQuantityMessage:L}=A??{},U=a(N?.uid,w),W=l({val:H,uid:N?.uid,settingId:d({id:M?.template?.id}),pageContext:P,isReplaceInventoryQuantity:!0}),X=l({val:J,uid:N?.uid,settingId:d({id:M?.outOfStockMessage?.id}),pageContext:P}),Y=l({val:K,uid:N?.uid,settingId:d({id:M?.continueSelling?.id}),pageContext:P}),Z=l({val:L,uid:N?.uid,settingId:d({id:M?.unlimitedQuantityMessage?.id}),pageContext:P}),ss=x({..._(N,A,G)}),st=E({...s("gp-stock-counter-progress gp-mt-2 data-[visible=true]:gp-block data-[visible=false]:gp-hidden"),...$(G)}),se=T({...S(G,A)}),si=T({...b(G)}),so=E({...u(A)}),sl=E({...m(R)}),sd=T({...Q}),sc=T({...I(G)}),sr=r(A,G),sa=n({templateStringDisplay:W,outOfStockMessageDisplay:X,continueSellingDisplay:Y,unlimitedQuantityMessageDisplay:Z}),sp=E({...v(A)}),sn=E({...s("gp-stock-counter-icon data-[visible=true]:gp-block data-[visible=false]:gp-hidden"),...f(),...g()}),s$=E({...k(A)}),su=s=>T({...O(G,A,s)}),sm=({isOutOfStockIcon:s,isVisible:t})=>x({...V(s,t)}),sv=x({...h()}),sg=E({...y(G),...s("gp-stock-counter-mark")}),sf=s=>T({...j(G,s)}),sk=x({...C()}),sy=p({templateStringDisplay:W,outOfStockMessageDisplay:X,continueSellingDisplay:Y,unlimitedQuantityMessageDisplay:Z},G);return e`
|
|
2
2
|
${sr}
|
|
3
3
|
<gp-product-stock-counter ${{...ss}} class="${sl}"
|
|
4
|
-
style="${
|
|
5
|
-
<div class="${
|
|
4
|
+
style="${sd}">
|
|
5
|
+
<div class="${s$}" style="${sc}">
|
|
6
6
|
<style>${U}</style>
|
|
7
7
|
<div
|
|
8
8
|
class="${so}"
|
|
9
|
-
style="${
|
|
9
|
+
style="${si}"
|
|
10
10
|
>
|
|
11
|
-
<div class="${
|
|
12
|
-
${t(z,
|
|
13
|
-
${
|
|
11
|
+
<div class="${sp}">
|
|
12
|
+
${t(z,e`
|
|
13
|
+
${q("is_out_of_stock",e`<div
|
|
14
14
|
${{...sm({isOutOfStockIcon:!0,isVisible:!0})}}
|
|
15
|
-
class="${
|
|
16
|
-
style="${
|
|
15
|
+
class="${sn}"
|
|
16
|
+
style="${su(!0)}"
|
|
17
17
|
>
|
|
18
18
|
${D}
|
|
19
19
|
</div>
|
|
20
20
|
<div
|
|
21
21
|
${{...sm({isOutOfStockIcon:!1,isVisible:!1})}}
|
|
22
22
|
data-slot-type="false"
|
|
23
|
-
class="${
|
|
24
|
-
style="${
|
|
23
|
+
class="${sn}"
|
|
24
|
+
style="${su(!1)}"
|
|
25
25
|
>
|
|
26
26
|
${B}
|
|
27
|
-
</div>`,
|
|
27
|
+
</div>`,e` <div
|
|
28
28
|
${{...sm({isOutOfStockIcon:!0,isVisible:!1})}}
|
|
29
|
-
class="${
|
|
30
|
-
style="${
|
|
29
|
+
class="${sn}"
|
|
30
|
+
style="${su(!0)}"
|
|
31
31
|
>
|
|
32
32
|
${D}
|
|
33
33
|
</div>
|
|
34
34
|
<div
|
|
35
35
|
${{...sm({isOutOfStockIcon:!1,isVisible:!0})}}
|
|
36
|
-
class="${
|
|
37
|
-
style="${
|
|
36
|
+
class="${sn}"
|
|
37
|
+
style="${su(!1)}"
|
|
38
38
|
>
|
|
39
39
|
${B}
|
|
40
40
|
</div>`)}
|
|
41
41
|
`)}
|
|
42
42
|
${sy}
|
|
43
|
-
|
|
44
|
-
${
|
|
43
|
+
{% capture liquidTextContent %}
|
|
44
|
+
${sa}
|
|
45
|
+
{% endcapture %}
|
|
46
|
+
${t("progress-bar"!==F,e`
|
|
47
|
+
${q("is_out_of_stock",e`<p
|
|
45
48
|
${{...sk}}
|
|
46
49
|
class="${sg}"
|
|
47
50
|
style="${sf(!0)}"
|
|
48
51
|
>
|
|
49
|
-
|
|
50
|
-
</p>`,
|
|
52
|
+
{{ liquidTextContent }}
|
|
53
|
+
</p>`,e`<p
|
|
51
54
|
${{...sk}}
|
|
52
55
|
class="${sg}"
|
|
53
56
|
style="${sf(!1)}"
|
|
54
57
|
>
|
|
55
|
-
|
|
58
|
+
{{ liquidTextContent }}
|
|
56
59
|
</p>`)}
|
|
57
60
|
`)}
|
|
58
61
|
|
|
@@ -60,11 +63,11 @@ import{composeClasses as s,RenderIf as t,template as i,isLocalEnv as e,baseAsset
|
|
|
60
63
|
|
|
61
64
|
<div
|
|
62
65
|
${{...sv}}
|
|
63
|
-
style="${
|
|
66
|
+
style="${se}"
|
|
64
67
|
class="${st}"
|
|
65
68
|
></div>
|
|
66
69
|
</div>
|
|
67
70
|
</div>
|
|
68
71
|
</gp-product-stock-counter>
|
|
69
|
-
${t(
|
|
70
|
-
`};export{
|
|
72
|
+
${t(i,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-stock-counter-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-stock-counter-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
73
|
+
`};export{A as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6932,7 +6932,7 @@ declare const Tabs$1: (props: TabsProps) => string;
|
|
|
6932
6932
|
|
|
6933
6933
|
declare const TabItem: (props: TabItemProps) => string;
|
|
6934
6934
|
|
|
6935
|
-
declare const StockCounter$1: ({ setting, styles, style, advanced, builderProps, pageContext
|
|
6935
|
+
declare const StockCounter$1: ({ setting, styles, style, advanced, builderProps, pageContext }: StockCounterProps) => string;
|
|
6936
6936
|
|
|
6937
6937
|
declare const Klaviyo: ({ setting, advanced }: KlaviyoProps) => string;
|
|
6938
6938
|
|