@gem-sdk/components 19.1.0-staging.2 → 19.1.0-staging.4
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-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +10 -10
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +12 -12
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +12 -12
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("../../../common/components/NoDataState.js"),l=require("../../../common/components/TooltipHover.js"),i=require("../../../text/components/Text.js"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("../../../common/components/NoDataState.js"),l=require("../../../common/components/TooltipHover.js"),i=require("../../../text/components/Text.js"),r=require("@gem-sdk/system"),a=require("./common/styles.js"),o=require("./common/classes.js"),n=require("./hooks/useGpDiscountTag.js");exports.default=({setting:d,styles:u,builderProps:c,...p})=>{let{customContent:x}=d??{},m=p["bundle-item"],{textAlign:y}=u??{},{t:f}=t.useI18nStore(),{mode:g,product:j,salePrice:b,priceSave:h,currentProductId:q,unitCustomDisplay:C,shouldPlaceholderNoDiscount:S}=n.useGpDiscountTag({setting:d,styles:u,builderProps:c,...p});if(S)return e.jsx(l.default,{enable:!0,text:f("Not be displayed when published"),position:"bottom",width:"205px",children:e.jsx(s.default,{builderAttrs:c?.builderData,elementType:"secondary",description:f("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let v=r.createStyle(a.getWrapperTextStyle(u)),N=r.createStyle(a.getContainerStyle(u)),T=r.createClass(o.getWrapperTextClass(u)),k=r.createClass(o.getContainerClass()),D=r.createClass(o.getRootClass({mode:g,salePrice:b,priceSave:h,bundleItem:m}));return e.jsx("div",{className:D,style:{...t.makeStyleResponsive("ta",y)},id:`shopify-text-element-${c?.uid}`,"data-id":c?.uid,"data-product-id":q,"gp-data-hidden":"false",children:r.If(!j," ",e.jsx("div",{className:k,style:N,children:e.jsx("div",{className:T,style:v,children:e.jsxs("div",{className:"gp-flex gp-break-all gp-items-center",children:[e.jsx(i.default,{styles:u,setting:{...d,text:x?.prefix?.replaceAll(" "," "),options:{useState:!0,uniqueId:`${c?.uid}-prefix`},excludeFlex:!0}}),e.jsx(i.default,{styles:u,setting:{...d,text:C,options:{isCannotEditing:!0},excludeFlex:!0}}),e.jsx(i.default,{styles:u,setting:{...d,text:x?.suffix?.replaceAll(" "," "),excludeFlex:!0,options:{useState:!0,uniqueId:`${c?.uid}-suffix`}}})]})})}))})};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),i=require("./components/feature-gallery/FeatureImageWithGallery.liquid.js"),r=require("./components/gallery-carousel/GalleryCarousel.liquid.js"),s=require("./components/gallery-grid/GalleryGrid.liquid.js"),a=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=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./common/common.js"),i=require("./components/feature-gallery/FeatureImageWithGallery.liquid.js"),r=require("./components/gallery-carousel/GalleryCarousel.liquid.js"),s=require("./components/gallery-grid/GalleryGrid.liquid.js"),a=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=c=>{let g=t.setDefaultWhenUndefineSetting(c),{setting:m,styles:f,builderProps:y,style:$}=g,{rawChildren:h,pageContext:S}=c,I={...m,...f},j=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(y?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(a.filterPageContext(
|
|
4
|
+
"pageContext": ${JSON.stringify(a.filterPageContext(S))},
|
|
5
5
|
"setting":${JSON.stringify(m)},
|
|
6
6
|
"styles":${JSON.stringify(f)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
8
|
-
"product":{{ product | json }},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
|
-
"collection": {{ collection | json }}
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
13
|
-
${e.WrapRenderChildren({uid:y?.uid||"",customProps:
|
|
12
|
+
`,q=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:v,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(I?.position,m?.type),F=C?{}:u.createAttr({"data-only-image":u.LiquidIf("product.media.size > 1","false","true")}),{wrapperClasses:L,productImagesGalleryClasses:P}=l.getProductImagesClassName(c),O=u.createClass({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),D=u.createClass({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:b,wrapContainerStyleOnlyOneImage:G,galleryImageStyle:z}=d.getProductImagesStyles(I),A=o.getShapeByLayout({shape:I.shape,shapeForBottom:I.shapeForBottom,shapeFor1Col:I.shapeFor1Col,shapeFor2Col:I.shapeFor2Col,shapeForFtOnly:I.shapeForFtOnly,shapeForInsideBottom:I.shapeForInsideBottom??o.sizeSettingDefaultForNewLayout,shapeForInside:I.shapeForInside??o.sizeSettingDefaultForNewLayout},I.position),N=t.getStyleInsideLayout(I.position,A,I?.spacing),_=()=>e.template`
|
|
13
|
+
${e.WrapRenderChildren({uid:y?.uid||"",customProps:h?.[0].customProps},h?.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}})}`}))}
|
|
14
14
|
`;return e.template`
|
|
15
|
-
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:I,uid:y?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${u.Liquid(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${u.LiquidIf("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
19
|
`)}
|
|
20
20
|
<gp-product-images-v3
|
|
21
|
-
${{...
|
|
21
|
+
${{...q}}
|
|
22
22
|
style="${{...$}}"
|
|
23
23
|
class="${L}"
|
|
24
24
|
>
|
|
25
|
-
<script gp-data type="application/json">${
|
|
25
|
+
<script gp-data type="application/json">${j}</script>
|
|
26
26
|
<div
|
|
27
27
|
class="${u.LiquidIf("product.media.size > 1",`${O}`,`${D}`)}"
|
|
28
28
|
style="${u.LiquidIf("product.media.size > 1",n.getStyleOfObject(b),n.getStyleOfObject(G))}"
|
|
29
29
|
>
|
|
30
|
-
${i.default({builderPropUID:`gp-carousel-${y?.uid}`,...
|
|
31
|
-
${u.If(!
|
|
30
|
+
${i.default({builderPropUID:`gp-carousel-${y?.uid}`,...I,children:_(),pageContext:S})}
|
|
31
|
+
${u.If(!v,e.template`
|
|
32
32
|
<div
|
|
33
33
|
class="${P}"
|
|
34
34
|
style="${n.getStyleOfObject(z)}"
|
|
35
35
|
${{...F}}
|
|
36
36
|
>
|
|
37
|
-
${u.LiquidIf("product.media.size > 1",r.default({builderPropUID:`gp-gallery-${y?.uid}`,...
|
|
38
|
-
${u.If(C,s.default({builderPropUID:y?.uid,wrapperStyle:{...N},children:_(),...
|
|
37
|
+
${u.LiquidIf("product.media.size > 1",r.default({builderPropUID:`gp-gallery-${y?.uid}`,...I,pageContext:S}))}
|
|
38
|
+
${u.If(C,s.default({builderPropUID:y?.uid,wrapperStyle:{...N},children:_(),...I,pageContext:S}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
@@ -1,18 +1,18 @@
|
|
|
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"),i=require("./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js"),r=require("./components/gallery-carousel/GalleryCarouselEmbla.liquid.js"),s=require("./components/gallery-grid/GalleryGrid.liquid.js"),a=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=c=>{let g=t.setDefaultWhenUndefineSetting(c),{setting:m,styles:f,builderProps:y,style:$}=g,{rawChildren:h,pageContext:S}=c,I={...m,...f},q=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(y?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(a.filterPageContext(
|
|
4
|
+
"pageContext": ${JSON.stringify(a.filterPageContext(S))},
|
|
5
5
|
"setting":${JSON.stringify(m)},
|
|
6
6
|
"styles":${JSON.stringify(f)},
|
|
7
7
|
"productUrl":{{product.url | json | escape}},
|
|
8
|
-
"product":{{product | json | escape}},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json | escape }},"handle":{{ product.handle | json | escape }},"media":{{ product.media | json | escape }}}{% else %}null{% endif %},
|
|
9
9
|
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
|
-
"collection": {{ collection | json | escape}}
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json | escape }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,v=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:j,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(
|
|
13
|
-
${e.WrapRenderChildren({uid:y?.uid||"",customProps:
|
|
12
|
+
`,v=u.createAttr({"section-id":"{{section.id}}","data-id":`${y?.uid}`}),{isOnlyFeatureAllDevices:j,isRenderGalleryGrid:C}=t.getConditionRenderGalleryImages(I?.position,m?.type),F=C?{}:u.createAttr({"data-only-image":u.LiquidIf("product.media.size > 1","false","true")}),{wrapperClasses:L,productImagesGalleryClasses:P}=l.getProductImagesClassName(c),b=u.createClass({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),O=u.createClass({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:D,wrapContainerStyleOnlyOneImage:G,galleryImageStyle:z}=d.getProductImagesStyles(I),A=o.getShapeByLayout({shape:I.shape,shapeForBottom:I.shapeForBottom,shapeFor1Col:I.shapeFor1Col,shapeFor2Col:I.shapeFor2Col,shapeForFtOnly:I.shapeForFtOnly,shapeForInsideBottom:I.shapeForInsideBottom??o.sizeSettingDefaultForNewLayout,shapeForInside:I.shapeForInside??o.sizeSettingDefaultForNewLayout},I.position),N=t.getStyleInsideLayout(I.position,A,I?.spacing),_=()=>e.template`
|
|
13
|
+
${e.WrapRenderChildren({uid:y?.uid||"",customProps:h?.[0].customProps},h?.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}})}`}))}
|
|
14
14
|
`;return e.template`
|
|
15
|
-
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${p.getBorderActiveCss({settings:I,uid:y?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${u.Liquid(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${u.LiquidIf("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
class="${u.LiquidIf("product.media.size > 1",`${b}`,`${O}`)}"
|
|
28
28
|
style="${u.LiquidIf("product.media.size > 1",n.getStyleOfObject(D),n.getStyleOfObject(G))}"
|
|
29
29
|
>
|
|
30
|
-
${
|
|
30
|
+
${i.default({builderPropUID:`gp-carousel-${y?.uid}`,...I,children:_(),pageContext:S})}
|
|
31
31
|
${u.If(!j,e.template`
|
|
32
32
|
<div
|
|
33
33
|
class="${P}"
|
|
34
34
|
style="${n.getStyleOfObject(z)}"
|
|
35
35
|
${{...F}}
|
|
36
36
|
>
|
|
37
|
-
${u.LiquidIf("product.media.size > 1",
|
|
38
|
-
${u.If(C,s.default({builderPropUID:y?.uid,wrapperStyle:{...N},children:_(),...
|
|
37
|
+
${u.LiquidIf("product.media.size > 1",r.default({builderPropUID:`gp-gallery-${y?.uid}`,...I,pageContext:S}))}
|
|
38
|
+
${u.If(C,s.default({builderPropUID:y?.uid,wrapperStyle:{...N},children:_(),...I,pageContext:S}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import r from"../../../text/components/Text.js";import{createStyle as d,createClass as m,If as n}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=d(a(y)),C=d(p(y)),I=m(c(y)),E=m(u()),G=m(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:n(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" "," "),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" "," "),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import r from"../../../text/components/Text.js";import{createStyle as d,createClass as m,If as n}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=d(a(y)),C=d(p(y)),I=m(c(y)),E=m(u()),G=m(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:n(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all gp-items-center",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" "," "),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" "," "),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as i,WrapRenderChildren as t,RenderChildren as r}from"@gem-sdk/core";import{getConditionRenderGalleryImages as s,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p 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 n,getSettingPreloadData as c}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as y}from"./composables/getProductImagesStyles.js";import{createAttr as $,LiquidIf as h,createClass as j,If as v,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,N={...G,...D},A=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(
|
|
4
|
+
"pageContext": ${JSON.stringify(n(_))},
|
|
5
5
|
"setting":${JSON.stringify(G)},
|
|
6
6
|
"styles":${JSON.stringify(D)},
|
|
7
7
|
"productUrl":{{product.url | json }},
|
|
8
|
-
"product":{{ product | json }},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
|
|
9
9
|
"collectionUrl": {{ collection.url | json }},
|
|
10
|
-
"collection": {{ collection | json }}
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=
|
|
13
|
-
${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return
|
|
14
|
-
`;return
|
|
15
|
-
${
|
|
12
|
+
`,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=s(N?.position,G?.type),q=k?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(N),R=u({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>i`
|
|
13
|
+
${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return i`${r({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
|
+
`;return i`
|
|
15
|
+
${v(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${S(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
@@ -27,18 +27,18 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as t,R
|
|
|
27
27
|
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
28
|
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
29
|
>
|
|
30
|
-
${
|
|
31
|
-
${
|
|
30
|
+
${p({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
|
|
31
|
+
${v(!U,i`
|
|
32
32
|
<div
|
|
33
33
|
class="${J}"
|
|
34
34
|
style="${I(M)}"
|
|
35
35
|
${{...q}}
|
|
36
36
|
>
|
|
37
37
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
|
|
38
|
-
${
|
|
38
|
+
${v(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
42
42
|
</gp-product-images-v3>
|
|
43
|
-
${
|
|
43
|
+
${v(e,`<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>`)}
|
|
44
44
|
`};export{C as default};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as s,WrapRenderChildren as r,RenderChildren as i}from"@gem-sdk/core";import{getConditionRenderGalleryImages as t,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as n}from"../../../helpers.js";import{getShapeByLayout as u,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 j,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(D?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(c(_))},
|
|
5
5
|
"setting":${JSON.stringify(b)},
|
|
6
6
|
"styles":${JSON.stringify(G)},
|
|
7
7
|
"productUrl":{{product.url | json | escape}},
|
|
8
|
-
"product":{{product | json | escape}},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json | escape }},"handle":{{ product.handle | json | escape }},"media":{{ product.media | json | escape }}}{% else %}null{% endif %},
|
|
9
9
|
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
|
-
"collection": {{ collection | json | escape}}
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json | escape }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=
|
|
13
|
-
${
|
|
14
|
-
`;return
|
|
15
|
-
${
|
|
16
|
-
${
|
|
12
|
+
`,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=t(E?.position,b?.type),k=U?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(E),R=u({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>s`
|
|
13
|
+
${r({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return s`${i({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
|
|
14
|
+
`;return s`
|
|
15
|
+
${j(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${S(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
19
|
`)}
|
|
@@ -27,18 +27,18 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,R
|
|
|
27
27
|
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
28
|
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
29
|
>
|
|
30
|
-
${
|
|
31
|
-
${
|
|
30
|
+
${p({builderPropUID:`gp-carousel-${D?.uid}`,...E,children:W(),pageContext:_})}
|
|
31
|
+
${j(!B,s`
|
|
32
32
|
<div
|
|
33
33
|
class="${J}"
|
|
34
34
|
style="${I(M)}"
|
|
35
35
|
${{...k}}
|
|
36
36
|
>
|
|
37
37
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${D?.uid}`,...E,pageContext:_}))}
|
|
38
|
-
${
|
|
38
|
+
${j(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
42
42
|
</gp-product-images-v3>
|
|
43
|
-
${
|
|
43
|
+
${j(e,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
44
|
`};export{C as default};
|