@gem-sdk/components 19.0.1 → 19.0.3
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-description/common/styles.js +7 -2
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +14 -14
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +10 -10
- package/dist/esm/product/components/product-description/common/styles.js +7 -2
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +12 -12
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core");const t=["desktop","mobile","tablet"],o=(e,o)=>{let l={};return t.forEach(t=>{l={...l,[`--d${"desktop"===t?"":`-${t}`}`]:`${e(t)?"none":o}`}}),l},l=t=>{let o={desktop:"none"};return["desktop","mobile","tablet"].forEach(l=>{let
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core");const t=["desktop","mobile","tablet"],o=(e,o)=>{let l={};return t.forEach(t=>{l={...l,[`--d${"desktop"===t?"":`-${t}`}`]:`${e(t)?"none":o}`}}),l},l=t=>{let o={desktop:"none"};return["desktop","mobile","tablet"].forEach(l=>{let p=e.getResponsiveValueByScreen(t?.lineClamp,l),r=e.getResponsiveValueByScreen(t?.hasLineClamp,l);r&&p?o[l]=`calc(${p} * 1lh)`:o[l]="none"}),{...e.makeStyleResponsive("maxh",o)}};exports.getButtonStyle=({setting:t})=>{let l=e.composeTypographyStyle(t?.typo,t?.typography),p={...e.makeStyleResponsive("jc",t?.textAlign),...e.makeStyle({tt:t?.transform}),...l,...e.getGlobalColorStyle(t?.showMoreColor),...o(e=>!!t?.hasLineClamp&&void 0!==t.hasLineClamp[e]&&!t.hasLineClamp[e],"inline-flex")};return e.filterTruthyStyles(p)},exports.getMaxHeightStyleDefault=l,exports.getStaticCss=()=>{let e=`
|
|
2
2
|
.gp-p-description-text > :not(ol, ul, table, div, style, script) {
|
|
3
3
|
display: inline !important;
|
|
4
4
|
}
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
content: "";
|
|
8
8
|
display: block; /* đảm bảo xuống d\xf2ng tr\xean Safari/iOS */
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
.gp-p-description-text > :is(p, h1, h2, h3, h4, h5, h6, blockquote):not(:last-child)::after {
|
|
12
|
+
height: 1lh;
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
.gp-p-description-text > table {
|
|
11
16
|
box-shadow: none;
|
|
12
17
|
}
|
|
@@ -14,4 +19,4 @@
|
|
|
14
19
|
.p-description-wrapper.gp-p-description-text * {
|
|
15
20
|
color: inherit;
|
|
16
21
|
line-height: inherit !important;
|
|
17
|
-
}`;return{gpDescriptionCss:e,textDescriptionCss:t}},exports.getTextStyle=({setting:t,renderMaxHeight:o})=>{let
|
|
22
|
+
}`;return{gpDescriptionCss:e,textDescriptionCss:t}},exports.getTextStyle=({setting:t,renderMaxHeight:o})=>{let p=e.composeTypographyStyle(t?.typo,t?.typography),r={...e.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...e.makeStyleResponsive("ta",t?.textAlign),...e.getGlobalColorStyle(t?.color),...e.makeStyle({tt:t?.transform}),...p,...o&&l(t)};return e.filterTruthyStyles(r)};
|
|
@@ -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/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"),n=require("./common/getBorderActiveCss.js"),p=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
|
-
"productUrl":{{product.url | json
|
|
8
|
-
"product":{{product | json |
|
|
9
|
-
"collectionUrl": {{ collection.url | json
|
|
10
|
-
"collection": {{ collection | json
|
|
7
|
+
"productUrl":{{product.url | json }},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
|
|
9
|
+
"collectionUrl": {{ collection.url | json }},
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% 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),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>${
|
|
15
|
+
${u.If(m?.borderActive?.border!=="none",u.LiquidIf("product.media.size > 1",`<style>${n.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 %}")}
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
27
|
class="${u.LiquidIf("product.media.size > 1",`${O}`,`${D}`)}"
|
|
28
|
-
style="${u.LiquidIf("product.media.size > 1",
|
|
28
|
+
style="${u.LiquidIf("product.media.size > 1",p.getStyleOfObject(b),p.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
|
-
style="${
|
|
34
|
+
style="${p.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,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,4 +1,4 @@
|
|
|
1
|
-
import{composeTypographyStyle as t,makeStyle as e,getGlobalColorStyle as o,makeStyleResponsive as l,getStyleShadow as i,filterTruthyStyles as n,getResponsiveValueByScreen as
|
|
1
|
+
import{composeTypographyStyle as t,makeStyle as e,getGlobalColorStyle as o,makeStyleResponsive as l,getStyleShadow as i,filterTruthyStyles as n,getResponsiveValueByScreen as p}from"@gem-sdk/core";let a=["desktop","mobile","tablet"],r=(t,e)=>{let o={};return a.forEach(l=>{o={...o,[`--d${"desktop"===l?"":`-${l}`}`]:`${t(l)?"none":e}`}}),o},s=({setting:p,renderMaxHeight:a})=>{let r=t(p?.typo,p?.typography),s={...i({value:p?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:p?.typo?.custom?.hasShadowText}),...l("ta",p?.textAlign),...o(p?.color),...e({tt:p?.transform}),...r,...a&&c(p)};return n(s)},h=({setting:i})=>{let p=t(i?.typo,i?.typography),a={...l("jc",i?.textAlign),...e({tt:i?.transform}),...p,...o(i?.showMoreColor),...r(t=>!!i?.hasLineClamp&&void 0!==i.hasLineClamp[t]&&!i.hasLineClamp[t],"inline-flex")};return n(a)},d=()=>{let t=`
|
|
2
2
|
.gp-p-description-text > :not(ol, ul, table, div, style, script) {
|
|
3
3
|
display: inline !important;
|
|
4
4
|
}
|
|
@@ -7,6 +7,11 @@ import{composeTypographyStyle as t,makeStyle as e,getGlobalColorStyle as o,makeS
|
|
|
7
7
|
content: "";
|
|
8
8
|
display: block; /* đảm bảo xuống d\xf2ng tr\xean Safari/iOS */
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
.gp-p-description-text > :is(p, h1, h2, h3, h4, h5, h6, blockquote):not(:last-child)::after {
|
|
12
|
+
height: 1lh;
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
.gp-p-description-text > table {
|
|
11
16
|
box-shadow: none;
|
|
12
17
|
}
|
|
@@ -14,4 +19,4 @@ import{composeTypographyStyle as t,makeStyle as e,getGlobalColorStyle as o,makeS
|
|
|
14
19
|
.p-description-wrapper.gp-p-description-text * {
|
|
15
20
|
color: inherit;
|
|
16
21
|
line-height: inherit !important;
|
|
17
|
-
}`;return{gpDescriptionCss:t,textDescriptionCss:e}},c=t=>{let e={desktop:"none"};return["desktop","mobile","tablet"].forEach(o=>{let l=
|
|
22
|
+
}`;return{gpDescriptionCss:t,textDescriptionCss:e}},c=t=>{let e={desktop:"none"};return["desktop","mobile","tablet"].forEach(o=>{let l=p(t?.lineClamp,o),i=p(t?.hasLineClamp,o);i&&l?e[o]=`calc(${l} * 1lh)`:e[o]="none"}),{...l("maxh",e)}};export{h as getButtonStyle,c as getMaxHeightStyleDefault,d as getStaticCss,s as getTextStyle};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as i,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as s,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import d from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import p from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as n,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as c,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: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
|
-
"productUrl":{{product.url | json
|
|
8
|
-
"product":{{product | json |
|
|
9
|
-
"collectionUrl": {{ collection.url | json
|
|
10
|
-
"collection": {{ collection | json
|
|
7
|
+
"productUrl":{{product.url | json }},
|
|
8
|
+
"product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
|
|
9
|
+
"collectionUrl": {{ collection.url | json }},
|
|
10
|
+
"collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
|
|
11
11
|
}
|
|
12
|
-
`,B=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=
|
|
13
|
-
${
|
|
12
|
+
`,B=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=s(N?.position,G?.type),q=k?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,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}=$(N),R=c({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=()=>r`
|
|
13
|
+
${i({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${t({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
14
|
`;return r`
|
|
15
|
-
${
|
|
16
|
-
${
|
|
15
|
+
${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.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
|
+
${d({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
|
|
31
|
+
${j(!U,r`
|
|
32
32
|
<div
|
|
33
33
|
class="${J}"
|
|
34
34
|
style="${I(M)}"
|
|
35
35
|
${{...q}}
|
|
36
36
|
>
|
|
37
|
-
${h("product.media.size > 1",
|
|
38
|
-
${
|
|
37
|
+
${h("product.media.size > 1",p({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
|
|
38
|
+
${j(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
|
+
${j(e,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('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};
|