@gem-sdk/components 17.0.0-dev.113 → 17.0.0-dev.115
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 +4 -5
- package/dist/cjs/button/components/Button.liquid.js +15 -15
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +5 -4
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/cjs/collection/components/collection-description/CollectionDescription.liquid.js +7 -8
- package/dist/cjs/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/cjs/collection/components/collection-toolbar/CollectionToolbar.liquid.js +1 -1
- package/dist/cjs/countdown-timer/components/Countdown.liquid.js +16 -15
- package/dist/cjs/grid/components/row/Row.liquid.js +7 -2
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +3 -3
- 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 +21 -21
- package/dist/cjs/marquee/settings/configs/child-image-template.js +1 -1
- package/dist/cjs/product/components/ProductImages.liquid.js +9 -9
- package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +9 -9
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +2 -3
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +5 -5
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +4 -3
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +8 -7
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +3 -4
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +9 -9
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +9 -9
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +7 -8
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +6 -4
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +6 -4
- package/dist/cjs/product/components/product-price/ProductPrice.liquid.js +4 -4
- package/dist/cjs/product/components/product-sku/Sku.liquid.js +4 -3
- package/dist/cjs/product/components/product-title/ProductTitle.liquid.js +7 -8
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +27 -27
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +1 -1
- package/dist/cjs/sticky/components/Sticky.liquid.js +4 -5
- package/dist/cjs/tab/components/Tabs.liquid.js +7 -6
- package/dist/cjs/text/components/Text.liquid.js +3 -3
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +5 -4
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +5 -4
- package/dist/esm/accordion/components/Accordion.liquid.js +8 -9
- package/dist/esm/button/components/Button.liquid.js +22 -22
- package/dist/esm/carousel/components/root/Carousel.liquid.js +4 -3
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +4 -3
- package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js +6 -7
- package/dist/esm/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/esm/collection/components/collection-toolbar/CollectionToolbar.liquid.js +3 -3
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +21 -20
- package/dist/esm/grid/components/row/Row.liquid.js +10 -5
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +5 -5
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +14 -14
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +5 -5
- package/dist/esm/marquee/components/Marquee.liquid.js +21 -21
- package/dist/esm/marquee/settings/configs/child-image-template.js +1 -1
- package/dist/esm/product/components/ProductImages.liquid.js +12 -12
- package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +14 -14
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +3 -4
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +5 -5
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +8 -7
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +7 -6
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +5 -6
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +8 -8
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +12 -12
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +13 -13
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +7 -8
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +9 -7
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +9 -7
- package/dist/esm/product/components/product-price/ProductPrice.liquid.js +3 -3
- package/dist/esm/product/components/product-sku/Sku.liquid.js +6 -5
- package/dist/esm/product/components/product-title/ProductTitle.liquid.js +5 -6
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +44 -44
- package/dist/esm/product/components/product-wrap/Product.liquid.js +5 -5
- package/dist/esm/sticky/components/Sticky.liquid.js +11 -12
- package/dist/esm/tab/components/Tabs.liquid.js +12 -11
- package/dist/esm/text/components/Text.liquid.js +3 -3
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +3 -2
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +2 -1
- package/package.json +2 -2
|
@@ -1,44 +1,44 @@
|
|
|
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 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 c,getSettingPreloadData as u}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 y}from"./composables/getProductImagesStyles.js";import{createAttr as $,LiquidIf as h,createClass as j,If as S,Liquid as v}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=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,{enableLazyLoadImage:N}=_??{},A={...G,...D},B=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(c(_))},
|
|
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":{{product | json }},
|
|
9
|
+
"collectionUrl": {{ collection.url | json }},
|
|
10
|
+
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,U
|
|
13
|
-
${
|
|
12
|
+
`,U=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=y(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=()=>r`
|
|
13
|
+
${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${s({...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
|
-
${
|
|
15
|
+
${S(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${v(`
|
|
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
|
`)}
|
|
20
20
|
<gp-product-images
|
|
21
|
-
gp-data='${B}'
|
|
22
21
|
${{...U}}
|
|
23
22
|
style="${{...z}}"
|
|
24
23
|
class="${J}"
|
|
25
24
|
>
|
|
25
|
+
<script gp-data type="application/json">${B}</script>
|
|
26
26
|
<div
|
|
27
27
|
class="${h("product.media.size > 1",`${T}`,`${x}`)}"
|
|
28
28
|
style="${h("product.media.size > 1",I(L),I(M))}"
|
|
29
29
|
>
|
|
30
30
|
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
31
|
-
${
|
|
31
|
+
${S(!k,r`
|
|
32
32
|
<div
|
|
33
33
|
class="${w}"
|
|
34
34
|
style="${I(R)}"
|
|
35
35
|
${{...E}}
|
|
36
36
|
>
|
|
37
37
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
38
|
-
${
|
|
38
|
+
${S(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
42
42
|
</gp-product-images>
|
|
43
|
-
${
|
|
43
|
+
${S(e,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-images-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
44
|
`};export{C as default};
|
|
@@ -1,44 +1,44 @@
|
|
|
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 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 c,getSettingPreloadData as u}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 y}from"./composables/getProductImagesStyles.js";import{createAttr as $,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=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,{enableLazyLoadImage:N}=_??{},A={...G,...D},B=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(c(_))},
|
|
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":{{ product | json }},
|
|
9
|
+
"collectionUrl": {{ collection.url | json }},
|
|
10
|
+
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,U
|
|
13
|
-
${
|
|
12
|
+
`,U=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:$({"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}=y(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=()=>r`
|
|
13
|
+
${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${s({...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:A,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
|
`)}
|
|
20
20
|
<gp-product-images-v3
|
|
21
|
-
gp-data='${B}'
|
|
22
21
|
${{...U}}
|
|
23
22
|
style="${{...z}}"
|
|
24
23
|
class="${J}"
|
|
25
24
|
>
|
|
25
|
+
<script gp-data type="application/json">${B}</script>
|
|
26
26
|
<div
|
|
27
27
|
class="${h("product.media.size > 1",`${T}`,`${x}`)}"
|
|
28
28
|
style="${h("product.media.size > 1",I(L),I(M))}"
|
|
29
29
|
>
|
|
30
30
|
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
31
|
-
${
|
|
31
|
+
${j(!k,r`
|
|
32
32
|
<div
|
|
33
33
|
class="${w}"
|
|
34
34
|
style="${I(R)}"
|
|
35
35
|
${{...E}}
|
|
36
36
|
>
|
|
37
37
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
38
|
-
${
|
|
38
|
+
${j(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
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,15 +1,14 @@
|
|
|
1
|
-
import{template as t}from"@gem-sdk/core";import{getClass as
|
|
1
|
+
import{template as t}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=n(o);return t`
|
|
2
2
|
<gp-product
|
|
3
3
|
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
|
|
5
|
-
class="${c}"
|
|
6
|
-
|
|
4
|
+
class="${i}"
|
|
7
5
|
>
|
|
8
|
-
{
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(e)}}</script>
|
|
7
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
|
-
${
|
|
11
|
+
${a}
|
|
13
12
|
{%- endform -%}
|
|
14
13
|
</gp-product>
|
|
15
14
|
`};export{o as default};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import{template as t,RenderChildren as
|
|
1
|
+
import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
|
|
2
2
|
<gp-product
|
|
3
3
|
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
|
|
5
|
-
class="${p}"
|
|
6
|
-
|
|
4
|
+
class="${c}"
|
|
7
5
|
>
|
|
8
|
-
{
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
11
|
${t`
|
|
13
|
-
${
|
|
14
|
-
${
|
|
12
|
+
${r?.map((e,o)=>{if(e)return t`
|
|
13
|
+
${n({...e,index:o})}
|
|
15
14
|
`}).join("")}
|
|
16
15
|
`}
|
|
17
16
|
{%- endform -%}
|
|
18
17
|
</gp-product>
|
|
19
|
-
`};export{
|
|
18
|
+
`};export{o as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import
|
|
1
|
+
import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import e from"./ProductListGridItem.liquid.js";import{getStaticLocale as d}from"../../../helpers.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=()=>i`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
6
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
7
|
+
{%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
|
|
8
|
+
${e({...a})}
|
|
9
9
|
{%- endif -%}
|
|
10
10
|
{% endfor %}
|
|
11
|
-
{%- if count == 0 and ${
|
|
11
|
+
{%- if count == 0 and ${m?.length} == 0 -%}
|
|
12
12
|
{% if '${l}' == 'RelatedProduct' -%}
|
|
13
|
-
<div>${
|
|
13
|
+
<div>${d("ProductList","no_related_products")}</div>
|
|
14
14
|
{% else %}
|
|
15
|
-
<div>${
|
|
15
|
+
<div>${d("ProductList","no_products_found")}</div>
|
|
16
16
|
{%- endif -%}
|
|
17
17
|
{%- endif -%}
|
|
18
18
|
`;return i`
|
|
@@ -25,7 +25,9 @@ import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from
|
|
|
25
25
|
<gp-same-height
|
|
26
26
|
class="gp-contents"
|
|
27
27
|
style="visibility: hidden"
|
|
28
|
-
|
|
28
|
+
>
|
|
29
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
|
|
30
|
+
</script>
|
|
29
31
|
${`${$()}`}
|
|
30
32
|
</gp-same-height>
|
|
31
33
|
`)}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{template as t}from"@gem-sdk/core";import{getClass as
|
|
1
|
+
import{template as t}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let e=e=>{let{pageContext:o,children:a}=e,{productItemClass:i,gpProductClass:r}=n(e);return t`
|
|
2
2
|
<gp-product
|
|
3
3
|
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
gp-
|
|
5
|
-
class="${
|
|
6
|
-
|
|
4
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity }}, "formId": "{{ product_form_id }}"}'
|
|
5
|
+
class="${r}"
|
|
7
6
|
>
|
|
7
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(o)}}</script>
|
|
8
8
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
9
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
10
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
11
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
|
-
${
|
|
12
|
+
${a}
|
|
13
13
|
{%- endform -%}
|
|
14
14
|
</gp-product>
|
|
15
|
-
`};export{
|
|
15
|
+
`};export{e as default};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import{template as t,RenderChildren as
|
|
1
|
+
import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
|
|
2
2
|
<gp-product
|
|
3
3
|
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
|
|
5
|
-
class="${p}"
|
|
6
|
-
|
|
4
|
+
class="${c}"
|
|
7
5
|
>
|
|
8
|
-
{
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
11
|
${t`
|
|
13
|
-
${
|
|
14
|
-
${
|
|
12
|
+
${r?.map((e,o)=>{if(e)return t`
|
|
13
|
+
${n({...e,index:o})}
|
|
15
14
|
`}).join("")}
|
|
16
15
|
`}
|
|
17
16
|
{%- endform -%}
|
|
18
17
|
</gp-product>
|
|
19
|
-
`};export{
|
|
18
|
+
`};export{o as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import
|
|
1
|
+
import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import e from"./ProductListGridItem.liquid.js";import{getStaticLocale as d}from"../../../helpers.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=()=>i`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
6
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
7
|
+
{%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
|
|
8
|
+
${e({...a})}
|
|
9
9
|
{%- endif -%}
|
|
10
10
|
{% endfor %}
|
|
11
|
-
{%- if count == 0 and ${
|
|
11
|
+
{%- if count == 0 and ${m?.length} == 0 -%}
|
|
12
12
|
{% if '${l}' == 'RelatedProduct' -%}
|
|
13
|
-
<div>${
|
|
13
|
+
<div>${d("ProductList","no_related_products")}</div>
|
|
14
14
|
{% else %}
|
|
15
|
-
<div>${
|
|
15
|
+
<div>${d("ProductList","no_products_found")}</div>
|
|
16
16
|
{%- endif -%}
|
|
17
17
|
{%- endif -%}
|
|
18
18
|
`;return i`
|
|
@@ -25,7 +25,9 @@ import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from
|
|
|
25
25
|
<gp-same-height
|
|
26
26
|
class="gp-contents"
|
|
27
27
|
style="visibility: hidden"
|
|
28
|
-
|
|
28
|
+
>
|
|
29
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
|
|
30
|
+
</script>
|
|
29
31
|
${`${$()}`}
|
|
30
32
|
</gp-same-height>
|
|
31
33
|
`)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{dataStringify as r,template as e,baseAssetURL as o,isLocalEnv as s}from"@gem-sdk/core";import{getSettingPreloadData as p}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as c,createAttr as m,createStateOrContext as i,Liquid as
|
|
1
|
+
import{dataStringify as r,template as e,baseAssetURL as o,isLocalEnv as s}from"@gem-sdk/core";import{getSettingPreloadData as p}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as c,createAttr as m,createStateOrContext as i,Liquid as a}from"@gem-sdk/system";import{getWrapperClasses as l}from"./common/classes.js";import{getAttrs as d}from"./common/attrs.js";import{getTextProps as n}from"./common/helpers.js";let u=u=>{let{style:f,setting:y,builderProps:$,pageContext:h}=u,g=c(l(u)),j=m(d(u)),P=n(u),_=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 }}`});return a(e`
|
|
2
2
|
<gp-product-price
|
|
3
3
|
${j}
|
|
4
4
|
class="${g}"
|
|
5
5
|
style="${f}"
|
|
6
|
-
gp-data='${r(_)}'
|
|
7
6
|
>
|
|
7
|
+
<script gp-data type="application/json">${r(_)}</script>
|
|
8
8
|
${t({...P})}
|
|
9
9
|
</gp-product-price>
|
|
10
10
|
${(()=>{let r=s?"{{ 'gp-product-price-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-price-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${p('class="gps-link" delay',"src")}="${r}" defer="defer"></script>`})()}
|
|
11
|
-
`)};export{
|
|
11
|
+
`)};export{u as ProductPrice,u as default};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import{template as
|
|
2
|
-
${
|
|
3
|
-
<gp-product-sku
|
|
4
|
-
|
|
1
|
+
import{template as t,baseAssetURL as e,isLocalEnv as r}from"@gem-sdk/core";import{getSettingPreloadData as s}from"../../../helpers.js";import a from"../../../text/components/Text.liquid.js";import{LiquidUnless as o,LiquidIf as l,If as i}from"@gem-sdk/system";let p=({setting:p,styles:u,advanced:c,builderProps:n})=>{let d=u?.typo?.attrs?.transform==="capitalize",m=p?.label&&p.label.trim().length?`${d?p.label.toString().toLocaleLowerCase():p.label}`:"";return u?.disableHoverColor&&delete u.underlineLink,t`
|
|
2
|
+
${o("product","<p>Product not found</p>",`{% assign currentVariant = product.selected_or_first_available_variant %}
|
|
3
|
+
<gp-product-sku>
|
|
4
|
+
<script gp-data type="application/json">${JSON.stringify({label:m})}</script>
|
|
5
|
+
${a({styles:u,setting:{...p,text:`${l("currentVariant.sku.size > 0 ",`${m} ${i(d,"{{ currentVariant.sku | downcase }}","{{ currentVariant.sku }}")}`)}`,excludeFlex:!0,isForceValue:!0},advanced:c,builderProps:n,className:"gp-product-sku"})}
|
|
5
6
|
</gp-product-sku>
|
|
6
|
-
${(()=>{let
|
|
7
|
+
${(()=>{let t=r?"{{ 'gp-product-sku-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-sku-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}`)}`};export{p as default};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import{dataStringify as t,template as r,baseAssetURL as e,isLocalEnv as
|
|
2
|
-
<gp-product-title
|
|
3
|
-
gp-data=
|
|
4
|
-
|
|
5
|
-
${m(j,r`<a ${P} class="${S}">
|
|
1
|
+
import{dataStringify as t,template as r,baseAssetURL as e,isLocalEnv as p}from"@gem-sdk/core";import{getStaticLocale as o,getSettingPreloadData as s}from"../../../helpers.js";import i from"../../../text/components/Text.liquid.js";import{createAttr as l,createClass as d,createStateOrContext as c,LiquidUnless as u,If as m}from"@gem-sdk/system";import{getTextProps as a}from"./common/helpers.js";let n=n=>{let{setting:$,builderProps:f}=n,g=`<p>${o("ProductTitle","product_not_found")}</p>`,k=()=>i(a(n)),j=l({href:"{{ product.url }}",title:"{{ product.title }}"}),P=$?.linkProduct,S=d({"gp-product-title-link-wrapper":!0}),h=c({setting:{linkProduct:$?.linkProduct},uid:f?.uid});return u("product",`${g}`,r`
|
|
2
|
+
<gp-product-title>
|
|
3
|
+
<script gp-data type="application/json">${t(h)}</script>
|
|
4
|
+
${m(P,r`<a ${j} class="${S}">
|
|
6
5
|
${k()}
|
|
7
6
|
</a>`,r`${k()}`)}
|
|
8
7
|
</gp-product-title>
|
|
9
|
-
${(()=>{let t=
|
|
8
|
+
${(()=>{let t=p?"{{ 'gp-product-title-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-title-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
|
|
10
9
|
`)};export{n as default};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import{template as
|
|
2
|
-
${f("value in values",
|
|
3
|
-
${$(
|
|
1
|
+
import{template as t,baseAssetURL as e,isLocalEnv as i,DEVICES as o,getResponsiveValueByScreen as s}from"@gem-sdk/core";import n from"../../../text/components/Text.liquid.js";import a from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as $,If as g}from"@gem-sdk/system";import{getAttrs as _}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as b,getDropdownGroupData as S}from"./common/main/getData.js";import{getWrapVariantOptionClass as P}from"./common/variants/classes.js";import{getStyleOfObject as O}from"../../helpers/function.js";import{getMarginBottomStyle as x}from"./common/variants/styles.js";import{PRODUCT_VARIANT_OPTION_MINW_STYLE as V}from"./common/const.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as A}from"./OptionVariantsOldFormat.liquid.js";let q={desktop:!0,tablet:!0,mobile:!0},D=D=>{let{builderProps:E,styles:T,setting:k,advanced:F}=D,{align:G,swatchItemWidth:z,dropdownItemWidth:C,swatchSpacing:J,optionTypo:I,marginBottom:M}=T??{},{label:W,optionType:L,showAsSwatches:R,layout:H,hasPreSelected:K}=k??{},Q=F?.d??q,{uid:U}=E??{},B=()=>{let t={};return o.forEach(e=>{let i=s(z,e);t[e]="auto"===i}),t},X=()=>{let t={};return o.forEach(e=>{t[e]=C?.[e]==="fill"}),t},Y=k?.variantPresets?d(k?.variantPresets,T):[],Z=Y?.map(t=>(t.presets={[t.optionType]:t.presets[t.optionType]},t)),tt={...k,variantPresets:Z},te=t=>{let e={"'":"'",'"':"""},i=t;for(let o in e)t.indexOf(o)>=0&&(i=i.replaceAll(o,e[o]));return i},ti=({showDropdown:e,isRenderDefault:i,typeOfOption:o})=>t`
|
|
2
|
+
${f("value in values",a({id:"{{option.name | escape | handleize}}-{{value | escape | handleize}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:R,uid:U,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:K?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:o,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...tt,swatchAutoWidth:B(),optionTypo:I,isRenderDefault:i}))}
|
|
3
|
+
${$(e?'type == "dropdown"':"false",r({...T,...tt,swatchAutoWidth:X(),optionTypo:I}))}`,to=k?.variantPresets?.map(t=>({name:te(t.optionName),type:t.optionType})).map(t=>`${t.name}($1)${t.type}`).join("($2)").toString(),ts={renderVariantItem:ti,variantPresetsLiquid:to??""},tn=m(j(G)),ta=c(h(J,J)),tr=b(D,"Liquid"),tp=m(P(H,G)),tl=m(w(G)),td=S(D),tm=u(_({uid:U,hasPreSelected:K,cssClass:F?.cssClass})),tc=c(y(D)),tu=m({"gp-flex gp-flex-col !gp-ml-0":!0});return t`
|
|
4
4
|
${v("{%- assign total_combinations = 1 -%}")}
|
|
5
5
|
${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
6
|
-
<gp-product-variants
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
<gp-product-variants ${tm}>
|
|
7
|
+
<script gp-data type="application/json">
|
|
8
|
+
{
|
|
9
|
+
"setting":${JSON.stringify(tt)?.replaceAll("'","'")},
|
|
10
|
+
"styles":${JSON.stringify(T)},
|
|
11
|
+
"variants":{{product.variants | json}},
|
|
12
|
+
"optionsWithValues": {{product.options_with_values | json}},
|
|
13
|
+
"variantSelected": {{ variant | json }},
|
|
14
|
+
"variantInventoryQuantity": {{product.variants | map: 'inventory_quantity' | json }},
|
|
15
|
+
"variantInventoryPolicy": {{product.variants | map: 'inventory_policy' | json }},
|
|
16
|
+
"moneyFormat": {{shop.money_format | json }},
|
|
17
|
+
"productId": {{product.id | json }},
|
|
18
|
+
"productUrl": {{product.url | json }},
|
|
19
|
+
"productHandle": {{product.handle | json }},
|
|
20
|
+
"displayState": ${JSON.stringify(Q)},
|
|
21
|
+
"totalVariantCombinations": {{total_combinations}},
|
|
22
|
+
"firstAvailableVariant": {{product.selected_or_first_available_variant | json }}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
25
|
<div class="gp-hidden" style="--hvr-shadow: none; --hvr-shadow-tablet: none; --hvr-shadow-mobile: none"></div>
|
|
26
26
|
${v("{%- assign options = product.options_with_values -%}")}
|
|
27
27
|
${v("{%- assign variants = product.variants -%}")}
|
|
28
|
-
${$("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",
|
|
29
|
-
class="${
|
|
30
|
-
style="${
|
|
28
|
+
${$("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",t`<div
|
|
29
|
+
class="${tu}"
|
|
30
|
+
style="${tc}"
|
|
31
31
|
>
|
|
32
32
|
${g("groupOption"===L,`
|
|
33
|
-
<div className="${
|
|
34
|
-
${p(
|
|
33
|
+
<div className="${tl}">
|
|
34
|
+
${p(td)}
|
|
35
35
|
</div>
|
|
36
|
-
`,
|
|
37
|
-
${v(`{%- assign presets = "${k?.variantPresets?.map(
|
|
38
|
-
${v(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(
|
|
39
|
-
|
|
36
|
+
`,t`
|
|
37
|
+
${v(`{%- assign presets = "${k?.variantPresets?.map(t=>`${te(t.optionName)}($2)${t.optionType}`).join("($1)")}" | split: '($1)' -%}`)}
|
|
38
|
+
${v(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(t=>!!t?.hide)?.map(t=>t.optionName).join(",")}" | split: ',' %}`)}
|
|
39
|
+
|
|
40
40
|
${v(`{% assign all_option_names = options | map: 'name' %}
|
|
41
41
|
{% assign filtered_options_string = '' %}
|
|
42
42
|
{% assign delimiter = '||' %}
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
{% for item_name in all_option_names %}
|
|
45
45
|
{% assign is_excluded = false %}
|
|
46
46
|
{% for exclude_name in hiddenPresetOptions %}
|
|
@@ -48,7 +48,7 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
48
48
|
{% assign is_excluded = true %}
|
|
49
49
|
{% endif %}
|
|
50
50
|
{% endfor %}
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
{% unless is_excluded %}
|
|
53
53
|
{% if filtered_options_string == '' %}
|
|
54
54
|
{% assign filtered_options_string = item_name %}
|
|
@@ -57,15 +57,15 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
57
57
|
{% endif %}
|
|
58
58
|
{% endunless %}
|
|
59
59
|
{% endfor %}
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
{% assign filtered_options_array = filtered_options_string | split: delimiter %}`)}
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
${v("{% assign last_option_name = filtered_options_array | last %}")}
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
${f("option in options",`
|
|
66
66
|
<div
|
|
67
67
|
option-name="{{option.name | escape}}"
|
|
68
|
-
class="${
|
|
68
|
+
class="${tp} ${$("hiddenPresetOptions contains option.name","gp-hidden")}"
|
|
69
69
|
style="${O(x(M))}${V}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
|
|
70
70
|
>
|
|
71
71
|
${v("{%- assign showVariantClass = 'variant-display' -%}")}
|
|
@@ -74,11 +74,11 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
74
74
|
${v("{%- assign presetDetail = preset | split: '($2)' -%}")}
|
|
75
75
|
${$("presetDetail[1] == 'dropdown' and presetDetail[0] == optionName",`${v("{%- assign showVariantClass = '' -%}")} ${v("{%- break -%}")}`)}
|
|
76
76
|
`)}
|
|
77
|
-
${g(W,
|
|
77
|
+
${g(W,n(tr)," ")}
|
|
78
78
|
<div
|
|
79
79
|
variant-option-name="{{option.name | escape}}"
|
|
80
|
-
class="${
|
|
81
|
-
style="${O(
|
|
80
|
+
class="${tn}"
|
|
81
|
+
style="${O(ta)}"
|
|
82
82
|
>
|
|
83
83
|
${v("{%- assign values = option.values -%}")}
|
|
84
84
|
${v("{%- assign rootForloop = forloop.index0 -%}")}
|
|
@@ -92,14 +92,14 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
92
92
|
{%- endif -%}
|
|
93
93
|
`)}
|
|
94
94
|
${g(!K,v("{%- assign selectedValue = null -%}"),"")}
|
|
95
|
-
${g(R,
|
|
96
|
-
${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(
|
|
97
|
-
`,
|
|
95
|
+
${g(R,t`
|
|
96
|
+
${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ts),A(ts))}
|
|
97
|
+
`,ti({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
98
98
|
</div>
|
|
99
99
|
</div>`)}
|
|
100
100
|
`)}
|
|
101
101
|
</div>`)}
|
|
102
102
|
</gp-product-variants>
|
|
103
103
|
|
|
104
|
-
${(()=>{let
|
|
104
|
+
${(()=>{let t=i?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
|
|
105
105
|
`};export{D as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import
|
|
1
|
+
import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import o from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as d,If as a}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as p,STATIC_PRODUCT_STATUS as l,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let f=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:S,productSetting:j}=g??{},I=j?.hasPreSelected??!1,{rowSetting:b,rowStyles:h,formatVariantId:q,formatProductId:P,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f);return r`
|
|
2
2
|
${r`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${
|
|
4
|
+
${a(V==p,r`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${w}']
|
|
@@ -79,15 +79,15 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
79
79
|
data-id="${v?.uid}"
|
|
80
80
|
style="${E}"
|
|
81
81
|
class="${$?.cssClass}"
|
|
82
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${
|
|
83
|
-
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 }}}'
|
|
82
|
+
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${I}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
84
83
|
>
|
|
84
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }}}</script>
|
|
85
85
|
<product-form class="product-form">
|
|
86
86
|
{%- form 'product', product, id: product_form_id, class: 'form contents', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
87
87
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
88
88
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
89
89
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
90
|
-
${
|
|
90
|
+
${o({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:h,setting:b,children:m,rawChildren:_})}
|
|
91
91
|
{%- endform -%}
|
|
92
92
|
</product-form>
|
|
93
93
|
</gp-product>
|