@gem-sdk/components 8.0.0-dev.121 → 8.0.0-dev.122
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/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/carousel-v3/components/swiper/common/styles.js +1 -1
- package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +1 -1
- package/dist/cjs/collection/components/collection-description/CollectionDescription.liquid.js +2 -3
- package/dist/cjs/collection/components/collection-paginator/CollectionPaginator.liquid.js +5 -4
- package/dist/cjs/collection/components/collection-toolbar/CollectionToolbar.liquid.js +1 -1
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +6 -6
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +4 -4
- package/dist/cjs/marquee/components/Marquee.liquid.js +20 -20
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +4 -5
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +8 -8
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +5 -4
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +5 -6
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +8 -8
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +2 -3
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +1 -2
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +7 -5
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +2 -3
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +1 -2
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +7 -5
- package/dist/cjs/product/components/product-sku/Sku.liquid.js +4 -3
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +29 -29
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +4 -4
- package/dist/cjs/sticky/components/Sticky.liquid.js +4 -5
- package/dist/cjs/tab/components/Tabs.liquid.js +5 -4
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +4 -3
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +4 -3
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/carousel-v3/components/swiper/common/styles.js +1 -1
- package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js +4 -5
- package/dist/esm/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/esm/collection/components/collection-toolbar/CollectionToolbar.liquid.js +4 -4
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +14 -14
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +3 -3
- package/dist/esm/marquee/components/Marquee.liquid.js +21 -21
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +3 -4
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +4 -4
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +6 -5
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +4 -5
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +5 -5
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +1 -2
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +3 -4
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +7 -5
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +1 -2
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +3 -4
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +7 -5
- package/dist/esm/product/components/product-sku/Sku.liquid.js +5 -4
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +31 -31
- package/dist/esm/product/components/product-wrap/Product.liquid.js +5 -5
- package/dist/esm/sticky/components/Sticky.liquid.js +9 -10
- package/dist/esm/tab/components/Tabs.liquid.js +14 -13
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +4 -3
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +4 -3
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as d}from"../../../helpers.js";import{createStyle as o,createClass as
|
|
1
|
+
import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as d}from"../../../helpers.js";import{createStyle as o,createClass as i,createStateOrContext as a,Liquid as p,LiquidIf as n}from"@gem-sdk/system";import{getSizeSettings as c,getContainerStyles as l}from"./common/styles.js";import{getContainerClasses as u}from"./common/classes.js";import m from"./ProductBundleDiscountChildrenItem.liquid.js";let ProductBundleDiscount=({rawChildren:f,setting:g,styles:I,advanced:$,style:P})=>{let S=g?.hasPreSelectItem?g?.selectItemDefault??0:-1,_=t=>S===t,h=(t,e)=>m({index:e,rawChildrenItem:f?.[e],setting:g,styles:I,isSelected:_(e),bundleItem:t}),y=o(c(I)?.gap),j=i(u(g,$?.cssClass)),A=o(l(y,I,P)),B=a({styles:I,settings:{useProductCompareAtPrice:g?.useProductCompareAtPrice,selectItemDefault:g?.selectItemDefault,hideNoDiscountItem:g?.hideNoDiscountItem,hasPreSelectItem:g?.hasPreSelectItem,iconItemColor:g?.iconItemColor}}),D=()=>e(s,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-bundle-discount-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-bundle-discount-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return t`
|
|
2
2
|
<gp-product-bundle-discount
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
style="${A}"
|
|
4
|
+
class="${j}"
|
|
5
|
+
>
|
|
6
|
+
<script gp-data type="application/json">${JSON.stringify(B)}</script>
|
|
6
7
|
${p(`
|
|
7
8
|
{%- assign gempages_product_bundle = product.metafields.gp_discount.gp_discount_selected_products -%}
|
|
8
9
|
{% assign productBundleItem = gempages_product_bundle | split: '($1)' %}
|
|
@@ -28,6 +29,6 @@ import{template as t,RenderIf as e,isLocalEnv as s,baseAssetURL as r}from"@gem-s
|
|
|
28
29
|
</gp-product-bundle-discount>
|
|
29
30
|
|
|
30
31
|
{% if productBundleItem %}
|
|
31
|
-
${
|
|
32
|
+
${D()}
|
|
32
33
|
{% endif %}
|
|
33
34
|
`};export{ProductBundleDiscount as default};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as i,isLocalEnv as o,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,createSettingId as
|
|
1
|
+
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as i,isLocalEnv as o,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,createSettingId as a,getSettingPreloadData as n}from"../../../helpers.js";import{createClass as d,createStyle as c,createAttr as l,createStateOrContext as m,LiquidIf as u,Liquid as $,LiquidUnless as g,If as v}from"@gem-sdk/system";import{getClasses as f,getButtonClasses as w,getClassPreBuilt as x}from"./common/classes.js";import{getTextStyle as h,getButtonStyle as y,getStaticCss as j}from"./common/styles.js";import{ICON_SVG as M}from"./common/helpers.js";import{ProductDescription as b}from"../../settings/product-description/configs/translate.js";let ProductDescription=C=>{let{setting:L,advanced:S,builderProps:T,pageContext:I}=C,{htmlTag:P,viewMoreText:k,viewLessText:E}=L??{},V="html"===P?"div":"p",A=d({"gp-product-description":!0,[S?.cssClass]:!0}),D=d(f({setting:L,isLiquid:!0})),G=d(w({setting:L})),_=d({"gp-show-more-text":!0}),q=d({"gp-show-more-icon gp-ml-1":!0}),H=c({...h({setting:L,renderMaxHeight:!0}),...e("line-clamp",t(L?.lineClamp,L?.hasLineClamp))}),N=d(x()),O=c(y({setting:L})),R=l({"data-id":`${T?.uid}`}),z=l({"data-gp-text":""}),{textDescriptionCss:B,gpDescriptionCss:F}=j(),J="product.description == blank",K=()=>{let e=o?"{{ 'gp-product-description-v7-5.js' | asset_url }}":`${r}/assets-v2/gp-product-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${n('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`},Q=m({setting:{lineClamp:L?.lineClamp,hasLineClamp:L?.hasLineClamp,viewMoreText:L?.viewMoreText,viewLessText:L?.viewLessText,enableViewMoreIcon:L?.enableViewMoreIcon},textStyle:H}),U=p({val:k,uid:T?.uid,settingId:a({id:b?.viewMoreText?.id}),pageContext:I}),W=p({val:E,uid:T?.uid,settingId:a({id:b?.viewLessText?.id}),pageContext:I});return u(J,"",$(s`
|
|
2
2
|
<gp-product-description
|
|
3
3
|
${R}
|
|
4
4
|
class="${A}"
|
|
5
|
-
gp-data='${i(Q).replaceAll("'","'")}'
|
|
6
5
|
data-view-more-text="${U}"
|
|
7
6
|
data-view-less-text="${W}"
|
|
8
7
|
>
|
|
9
|
-
<
|
|
10
|
-
<style>${F}</style>
|
|
8
|
+
<script gp-data type="application/json">${i(Q).replaceAll("'","'")}</script>
|
|
9
|
+
<style>${B}${F}</style>
|
|
11
10
|
<div class="${N}" ></div>
|
|
12
11
|
${g("product","<p>Product not found</p>",s`<${V} ${z} class="${D}" style="${H}">
|
|
13
12
|
{{product.description}}
|
|
@@ -16,7 +15,7 @@ import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify a
|
|
|
16
15
|
<span class="${_}">
|
|
17
16
|
${v(!1,W?.toString(),U?.toString())}
|
|
18
17
|
</span>
|
|
19
|
-
${v(L?.enableViewMoreIcon,s`<span class="${q}">${
|
|
18
|
+
${v(L?.enableViewMoreIcon,s`<span class="${q}">${M}</span>`," ")}
|
|
20
19
|
</button>`)}`)}
|
|
21
20
|
</gp-product-description>
|
|
22
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as i,baseAssetURL as s}from"@gem-sdk/core";import{getDynamicSourceLocales as a,createSettingId as r,getSettingPreloadData as t}from"../../../helpers.js";import p from"../../../text/components/Text.liquid.js";import{createStyle as n,createClass as c,LiquidIf as
|
|
1
|
+
import{template as e,isLocalEnv as i,baseAssetURL as s}from"@gem-sdk/core";import{getDynamicSourceLocales as a,createSettingId as r,getSettingPreloadData as t}from"../../../helpers.js";import p from"../../../text/components/Text.liquid.js";import{createStyle as n,createClass as c,LiquidIf as o,Liquid as d,If as l}from"@gem-sdk/system";import{getWrapperTextClass as u,getContainerClass as f,getProductTagClass as g}from"./common/classes.js";import{getRootClass as m,getWrapperTextStyle as v,getContainerStyle as y}from"./common/styles.js";import{ProductTag as $}from"../../settings/product-discount-tag/configs/translate.js";let ProductTag=({setting:x,styles:P,builderProps:S,advanced:V,pageContext:_})=>{let{customContent:h}=x??{},j=x?.moneyWithCurrentFormat?"money_with_currency":"money",C=$?.customContent?.id?a({val:h?.prefix,uid:S?.uid,settingId:r({id:$.customContent.id,suffix:"prefix"}),isLiquid:!0,pageContext:_}):h?.prefix,M=$?.customContent?.id?a({val:h?.suffix,uid:S?.uid,settingId:r({id:$.customContent.id,suffix:"suffix"}),isLiquid:!0,pageContext:_}):h?.suffix,T=n(m(P)),q=n(v(P)),w=n(y(P)),E=c(u(P)),F=c(f()),N=c(g(V)),O=h?.unit==="percentage",k=()=>{let e=i?"{{ 'gp-product-tag-v7-5.js' | asset_url }}":`${s}/assets-v2/gp-product-tag-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${t('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
2
2
|
{% liquid
|
|
3
3
|
assign price = variant.price | times: 1.0
|
|
4
4
|
assign salePrice = variant.compare_at_price | times: 1.0
|
|
@@ -6,8 +6,8 @@ import{template as e,isLocalEnv as i,baseAssetURL as s}from"@gem-sdk/core";impor
|
|
|
6
6
|
assign prefixVal = ${_?.isPreviewing?JSON.stringify(C):C}
|
|
7
7
|
assign suffixVal = ${_?.isPreviewing?JSON.stringify(M):M}
|
|
8
8
|
%}
|
|
9
|
-
${
|
|
10
|
-
{% assign pricePercentage = prefixVal | append: ' ' | append: salePercent | append: '% ' | append: suffixVal %}`,
|
|
9
|
+
${o("salePrice == null or price == null",d(`{% assign pricePercentage = prefixVal ${l(O,"| append: ' 0% '",`| ${j} | append: ' '`)} | append: suffixVal %}`),`${l(O,`{% assign salePercent = priceSave | divided_by: salePrice | times: 100 | round %}
|
|
10
|
+
{% assign pricePercentage = prefixVal | append: ' ' | append: salePercent | append: '% ' | append: suffixVal %}`,o("priceSave > 0",`{% assign priceSaveMoney = priceSave | ${j} %}
|
|
11
11
|
{% assign pricePercentage = prefixVal | append: ' ' | append: priceSaveMoney | append: ' ' | append: suffixVal %}`,`{% assign priceSaveMoney = 0 | ${j} %}
|
|
12
12
|
{% assign pricePercentage = prefixVal | append: ' ' | append: priceSaveMoney | append: ' ' | append: suffixVal %}`))}`)}
|
|
13
13
|
|
|
@@ -15,10 +15,10 @@ import{template as e,isLocalEnv as i,baseAssetURL as s}from"@gem-sdk/core";impor
|
|
|
15
15
|
class="${N}"
|
|
16
16
|
style="${T}"
|
|
17
17
|
data-id="${S?.uid}"
|
|
18
|
-
data-disabled="${
|
|
19
|
-
gp-data='{"setting":${JSON.stringify(x).replaceAll("'","'")}, "id": "${S?.uid}", "locale": "{{shop.locale}}", "currency": "{{shop.currency}}", "moneyFormat": "{{ ${x?.moneyWithCurrentFormat?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}"}'
|
|
18
|
+
data-disabled="${o(`${l(O,"salePercent","priceSave")} > 0`,"false","true")}"
|
|
20
19
|
price-save="{{priceSave}}"
|
|
21
20
|
>
|
|
21
|
+
<script gp-data type="application/json">{"setting":${JSON.stringify(x).replaceAll("'","'")}, "id": "${S?.uid}", "locale": "{{shop.locale}}", "currency": "{{shop.currency}}", "moneyFormat": "{{ ${x?.moneyWithCurrentFormat?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}"}'</script>
|
|
22
22
|
<div class="${F}" style="${w}">
|
|
23
23
|
<div class="${E}" style="${q}">
|
|
24
24
|
${p({styles:P,id:`p-tag-${S?.uid}`,setting:{...x,translate:"",text:"{{ pricePercentage }}",excludeFlex:!0}})}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:o,children:a}=n,{productItemClass:r,gpProductClass:i}=e(n);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 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o)}}'
|
|
5
4
|
class="${i}"
|
|
6
|
-
|
|
7
5
|
>
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o)}}</script>
|
|
8
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 }}" />
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=n(o),
|
|
1
|
+
import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=n(o),p=()=>t`
|
|
2
2
|
${r?.map((n,o)=>{if(n)return t`
|
|
3
3
|
${e({...n,index:o})}
|
|
4
4
|
`}).join("")}
|
|
5
5
|
`;return t`
|
|
6
6
|
<gp-product
|
|
7
7
|
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 }}"}'
|
|
8
|
-
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}'
|
|
9
8
|
class="${c}"
|
|
10
|
-
|
|
11
9
|
>
|
|
10
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
12
11
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
13
12
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
14
13
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
15
14
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
16
|
-
${
|
|
15
|
+
${p()}
|
|
17
16
|
{%- endform -%}
|
|
18
17
|
</gp-product>
|
|
19
18
|
`};export{ProductListItem as default};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import{template as t,RenderIf as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as
|
|
1
|
+
import{template as t,RenderIf 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 d from"./ProductListGridItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";let ProductListGridLayout=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:u}=a,{gridLayoutStyle:l}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=i=>t`
|
|
2
2
|
<gp-same-height
|
|
3
3
|
class="gp-contents"
|
|
4
4
|
style="visibility: hidden"
|
|
5
|
-
|
|
5
|
+
>
|
|
6
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
|
|
7
|
+
</script>
|
|
6
8
|
${i}
|
|
7
9
|
</gp-same-height>
|
|
8
10
|
`,h=()=>t`
|
|
@@ -11,12 +13,12 @@ import{template as t,RenderIf as i}from"@gem-sdk/core";import{getStyle as o}from
|
|
|
11
13
|
{%- if product.id != empty -%}
|
|
12
14
|
{%- assign count = count | plus: 1 -%}
|
|
13
15
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
14
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
16
|
+
{%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
|
|
15
17
|
${d({...a})}
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{% endfor %}
|
|
18
|
-
{%- if count == 0 and ${
|
|
19
|
-
{% if '${
|
|
20
|
+
{%- if count == 0 and ${m?.length} == 0 -%}
|
|
21
|
+
{% if '${u}' == 'RelatedProduct' -%}
|
|
20
22
|
<div>${e("ProductList","no_related_products")}</div>
|
|
21
23
|
{% else %}
|
|
22
24
|
<div>${e("ProductList","no_products_found")}</div>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:o,children:a}=n,{productItemClass:r,gpProductClass:i}=e(n);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 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o)}}'
|
|
5
4
|
class="${i}"
|
|
6
|
-
|
|
7
5
|
>
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o)}}</script>
|
|
8
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 }}" />
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=n(o),
|
|
1
|
+
import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=n(o),p=()=>t`
|
|
2
2
|
${r?.map((n,o)=>{if(n)return t`
|
|
3
3
|
${e({...n,index:o})}
|
|
4
4
|
`}).join("")}
|
|
5
5
|
`;return t`
|
|
6
6
|
<gp-product
|
|
7
7
|
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 }}"}'
|
|
8
|
-
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}'
|
|
9
8
|
class="${c}"
|
|
10
|
-
|
|
11
9
|
>
|
|
10
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
12
11
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
13
12
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
14
13
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
15
14
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
16
|
-
${
|
|
15
|
+
${p()}
|
|
17
16
|
{%- endform -%}
|
|
18
17
|
</gp-product>
|
|
19
18
|
`};export{ProductListItem as default};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import{template as t,RenderIf as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as
|
|
1
|
+
import{template as t,RenderIf 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 d from"./ProductListGridItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";let ProductListGridLayout=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:u}=a,{gridLayoutStyle:l}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=i=>t`
|
|
2
2
|
<gp-same-height
|
|
3
3
|
class="gp-contents"
|
|
4
4
|
style="visibility: hidden"
|
|
5
|
-
|
|
5
|
+
>
|
|
6
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
|
|
7
|
+
</script>
|
|
6
8
|
${i}
|
|
7
9
|
</gp-same-height>
|
|
8
10
|
`,h=()=>t`
|
|
@@ -11,12 +13,12 @@ import{template as t,RenderIf as i}from"@gem-sdk/core";import{getStyle as o}from
|
|
|
11
13
|
{%- if product.id != empty -%}
|
|
12
14
|
{%- assign count = count | plus: 1 -%}
|
|
13
15
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
14
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
16
|
+
{%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
|
|
15
17
|
${d({...a})}
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{% endfor %}
|
|
18
|
-
{%- if count == 0 and ${
|
|
19
|
-
{% if '${
|
|
20
|
+
{%- if count == 0 and ${m?.length} == 0 -%}
|
|
21
|
+
{% if '${u}' == 'RelatedProduct' -%}
|
|
20
22
|
<div>${e("ProductList","no_related_products")}</div>
|
|
21
23
|
{% else %}
|
|
22
24
|
<div>${e("ProductList","no_products_found")}</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import{template as
|
|
2
|
-
${
|
|
3
|
-
<gp-product-sku
|
|
4
|
-
|
|
1
|
+
import{template as t,isLocalEnv as e,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as s}from"../../../helpers.js";import a from"../../../text/components/Text.liquid.js";import{LiquidUnless as o,LiquidIf as l,If as i}from"@gem-sdk/system";let ProductSku=({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}`:"";u?.disableHoverColor&&delete u.underlineLink;let g=()=>{let t=e?"{{ 'gp-product-sku-v7-5.js' | asset_url }}":`${r}/assets-v2/gp-product-sku-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`};return 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
7
|
${g()}`)}`};export{ProductSku as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{template as e,isLocalEnv as t,baseAssetURL as
|
|
2
|
-
${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:
|
|
3
|
-
${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,eo=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:
|
|
1
|
+
import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as s,getResponsiveValueByScreen as o}from"@gem-sdk/core";import a from"../../../text/components/Text.liquid.js";import n 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 $}from"@gem-sdk/system";import{getAttrs as g}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 S,getDropdownGroupData as P}from"./common/main/getData.js";import{getWrapVariantOptionClass as b}from"./common/variants/classes.js";import{getStyleOfObject as A}from"../../helpers/function.js";import{getMarginBottomStyle as D}from"./common/variants/styles.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as V}from"./OptionVariantsOldFormat.liquid.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=E=>{let{builderProps:O,styles:T,setting:x,advanced:q}=E,{align:F,swatchItemWidth:G,dropdownItemWidth:C,swatchSpacing:I,optionTypo:k,marginBottom:L}=T??{},{label:J,optionType:z,showAsSwatches:M,layout:U,hasPreSelected:W}=x??{},R=q?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:Y}=O??{},H="groupOption"===z,K=()=>{let e={};return s.forEach(t=>{let i=o(G,t);e[t]="auto"===i}),e},Q=()=>{let e={};return s.forEach(t=>{e[t]=C?.[t]==="fill"}),e},B=x?.variantPresets?d(x?.variantPresets,T):[],X=B?.map(e=>({...e,presets:{[e.optionType]:e.presets[e.optionType]}})),Z={...x,variantPresets:X},ee=e=>{let t={"'":"'",'"':"""},i=e;for(let s in t)e.indexOf(s)>=0&&(i=i.replaceAll(s,t[s]));return i},et=()=>x?.variantPresets?.map(e=>`${ee(e.optionName)}($2)${e.optionType}`).join("($1)"),ei=()=>x?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),es=({showDropdown:t,isRenderDefault:i,typeOfOption:s})=>e`
|
|
2
|
+
${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:s,activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...Z,swatchAutoWidth:K(),optionTypo:k,isRenderDefault:i}))}
|
|
3
|
+
${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,eo=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:es,variantPresetsLiquid:eo??""},en=m(j(F)),er=c(h(I,I)),ep=S(E,"Liquid"),el=m(b(U,F)),ed=()=>e`
|
|
4
4
|
${v(`{%- assign presets = "${et()}" | split: '($1)' -%}`)}
|
|
5
|
-
${v(`{% assign hiddenPresetOptions = "${
|
|
6
|
-
|
|
5
|
+
${v(`{% assign hiddenPresetOptions = "${ei()}" | split: ',' %}`)}
|
|
6
|
+
|
|
7
7
|
${v(`{% assign all_option_names = options | map: 'name' %}
|
|
8
8
|
{% assign filtered_options_string = '' %}
|
|
9
9
|
{% assign delimiter = '||' %}
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
{% for item_name in all_option_names %}
|
|
12
12
|
{% assign is_excluded = false %}
|
|
13
13
|
{% for exclude_name in hiddenPresetOptions %}
|
|
@@ -15,7 +15,7 @@ import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiv
|
|
|
15
15
|
{% assign is_excluded = true %}
|
|
16
16
|
{% endif %}
|
|
17
17
|
{% endfor %}
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
{% unless is_excluded %}
|
|
20
20
|
{% if filtered_options_string == '' %}
|
|
21
21
|
{% assign filtered_options_string = item_name %}
|
|
@@ -24,11 +24,11 @@ import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiv
|
|
|
24
24
|
{% endif %}
|
|
25
25
|
{% endunless %}
|
|
26
26
|
{% endfor %}
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
{% assign filtered_options_array = filtered_options_string | split: delimiter %}`)}
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
${v("{% assign last_option_name = filtered_options_array | last %}")}
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
${f("option in options",`
|
|
33
33
|
<div
|
|
34
34
|
option-name="{{option.name | escape}}"
|
|
@@ -59,7 +59,7 @@ import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiv
|
|
|
59
59
|
{%- endif -%}
|
|
60
60
|
`)}
|
|
61
61
|
${$(!W,v("{%- assign selectedValue = null -%}"),"")}
|
|
62
|
-
${$(M,em(),
|
|
62
|
+
${$(M,em(),es({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
63
63
|
</div>
|
|
64
64
|
</div>`)}
|
|
65
65
|
`,em=()=>e`
|
|
@@ -68,28 +68,28 @@ import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiv
|
|
|
68
68
|
<div className="${ec}">
|
|
69
69
|
${p(eu)}
|
|
70
70
|
</div>
|
|
71
|
-
`,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${
|
|
71
|
+
`,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${i}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
72
72
|
${v("{%- assign total_combinations = 1 -%}")}
|
|
73
73
|
${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
74
|
-
<gp-product-variants
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
<gp-product-variants${ef}>
|
|
75
|
+
<script gp-data type="application/json">
|
|
76
|
+
{
|
|
77
|
+
"setting":${JSON.stringify(Z)?.replaceAll("'","'")},
|
|
78
|
+
"styles":${JSON.stringify(T)},
|
|
79
|
+
"variants":{{product.variants | json | escape}},
|
|
80
|
+
"optionsWithValues": {{product.options_with_values | json | escape}},
|
|
81
|
+
"variantSelected": {{ variant | json | escape }},
|
|
82
|
+
"variantInventoryQuantity": {{product.variants | map: 'inventory_quantity' | json | escape}},
|
|
83
|
+
"variantInventoryPolicy": {{product.variants | map: 'inventory_policy' | json | escape}},
|
|
84
|
+
"moneyFormat": {{shop.money_format | json | escape}},
|
|
85
|
+
"productId": {{product.id | json | escape}},
|
|
86
|
+
"productUrl": {{product.url | json | escape}},
|
|
87
|
+
"productHandle": {{product.handle | json | escape}},
|
|
88
|
+
"displayState": ${JSON.stringify(R)},
|
|
89
|
+
"totalVariantCombinations": {{total_combinations}},
|
|
90
|
+
"firstAvailableVariant": {{product.selected_or_first_available_variant | json | escape}}
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
93
93
|
<div class="gp-hidden" style="--hvr-shadow: none; --hvr-shadow-tablet: none; --hvr-shadow-mobile: none"></div>
|
|
94
94
|
${v("{%- assign options = product.options_with_values -%}")}
|
|
95
95
|
${v("{%- assign variants = product.variants -%}")}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as t,RenderIf as e,isLocalEnv as
|
|
1
|
+
import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import a from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as o,If as d}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 Product=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),x=()=>t`
|
|
2
2
|
{%- liquid
|
|
3
3
|
if request.page_type == 'product'
|
|
4
4
|
if '${V}' == '${l}'
|
|
@@ -79,15 +79,15 @@ import{template as t,RenderIf as e,isLocalEnv as r,baseAssetURL as i}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 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
84
83
|
>
|
|
84
|
+
<script gp-data type="application/json">{"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 }}}</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
|
-
${a({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:h,setting:
|
|
90
|
+
${a({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>
|
|
@@ -95,5 +95,5 @@ import{template as t,RenderIf as e,isLocalEnv as r,baseAssetURL as i}from"@gem-s
|
|
|
95
95
|
`;return t`
|
|
96
96
|
${B()}
|
|
97
97
|
${o("product != empty and product != null",O(),H())}
|
|
98
|
-
${e(
|
|
98
|
+
${e(i,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
99
99
|
`};export{Product as default};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import{makeStyleResponsive as s,template as e,RenderIf as t,isLocalEnv as i,baseAssetURL as
|
|
1
|
+
import{makeStyleResponsive as s,template as e,RenderIf as t,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getSettingPreloadData as a}from"../../helpers.js";import{createStyle as l,createClass as d,createStateOrContext as o}from"@gem-sdk/system";import{getContainerStyles as p,getContentStyles as m}from"../common/styles.js";import{getContainerClasses as c}from"../common/classes.js";let Sticky=({children:n,builderAttrs:g,setting:$,style:k,builderProps:y,advanced:f,pageContext:u})=>{let{width:b,position:S,display:v,preloadBgImage:j,background:h,isScrollToTop:E}=$??{},w=f?.d,C=l({...s("w",b),...p({position:S,style:k,display:v})}),x=l(m({setting:$,style:k,uid:y?.uid,pageContext:u})),A=d(c({uid:y?.uid,isScrollToTop:E,cssClass:f?.cssClass,isLiquid:!0})),G=o({uid:y?.uid,setting:{display:{desktop:v?.desktop,tablet:v?.tablet??v?.desktop,mobile:v?.mobile??v?.tablet??v?.desktop}},advanced:{d:w}}),N=`.drawer-page-content {
|
|
2
2
|
transform: none !important;
|
|
3
3
|
-webkit-transform: none !important;
|
|
4
4
|
}`;return e`
|
|
5
|
-
${t(!!
|
|
5
|
+
${t(!!j,`${t(!!h?.desktop?.image?.src,`<link rel="preload" href="${h?.desktop?.image?.src}" as="image" />`)}${t(!!h?.tablet?.image?.src,`<link rel="preload" href="${h?.tablet?.image?.src}" as="image" />`)}${t(!!h?.mobile?.image?.src,`<link rel="preload" href="${h?.mobile?.image?.src}" as="image" />`)}`)}
|
|
6
6
|
<gp-sticky
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
data-id="${f?.uid}"
|
|
11
|
-
class="${A} ${r("gps-lazy")}"
|
|
7
|
+
id="${y?.uid}"
|
|
8
|
+
data-id="${y?.uid}"
|
|
9
|
+
class="${A} ${a("gps-lazy")}"
|
|
12
10
|
style="${C}"
|
|
13
11
|
>
|
|
12
|
+
<script gp-data type="application/json">${JSON.stringify(G)}</script>
|
|
14
13
|
<style>${N}</style>
|
|
15
|
-
<div ${{...
|
|
16
|
-
${
|
|
14
|
+
<div ${{...g}} style="${{...x}}">
|
|
15
|
+
${n}
|
|
17
16
|
</div>
|
|
18
17
|
</gp-sticky>
|
|
19
|
-
${t(i,`<script ${
|
|
18
|
+
${t(i,`<script ${a('class="gps-link" delay',"src")}="{{ 'gp-sticky-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${a('class="gps-link" delay',"src")}="${r}/assets-v2/gp-sticky-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
20
19
|
`};export{Sticky as default};
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import{template as
|
|
1
|
+
import{template as t,WrapRenderChildren as e,RenderChildren as s,RenderIf as i,isLocalEnv as l,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as r,createSettingId as d,getSettingPreloadData as o}from"../../helpers.js";import{createStateOrContext as p,createAttr as c,createStyle as m,createClass as n}from"@gem-sdk/system";import{getAttr as y,getAttrContent as u}from"../common/attrs.js";import $ from"../../text/components/Text.liquid.js";import{Tabs as g}from"../settings/configs/translate.js";import{getStyleWrapper as v,getTabParentListStyle as f,getTabListStyle as h,getContainContentStyle as x,getItemStyle as b}from"../common/styles.js";import{getClassesWrapper as j,getContainClasses as T,getStyleTagClasses as C,getTabParentListClasses as k,getTabListClasses as A,getWrapperContentClasses as K,getContainContentClasses as S,getTextClasses as I,getItemClasses as E}from"../common/classes.js";let Tabs=N=>{let{builderProps:V,style:q,setting:P,advanced:z,rawChildren:F}=N;delete P?.labelTypoV2?.attrs?.color;let{cssClass:G}=z??{},{panelWidth:L,childItem:O,labelAlign:W,labelTypo:_,labelTypoV2:J}=P??{},M=p({setting:P,builderProps:V}),R=void 0;P&&!P?.labelWidth&&(P.labelWidth={desktop:"200px"});let U=c({...y({uid:V?.uid||""})}),w=m({...v({setting:P,style:q,uid:V?.uid,pageContext:N.pageContext,type:"Liquid"})}),B=n({...j({builderProps:V,advancedCssClass:G})}),D=n({...T({setting:P})}),H=C({panelWidth:L,builderProps:V}),Q=n({...k()}),X=m({...f(P)}),Y=n({...A({setting:P})}),Z=m({...h(P)}),tt=t=>n({...E({setting:P,isNotLiquid:!1,isActive:t,currentDevice:R})}),te=t=>m({...b(P,t)}),ts=n({...K()}),ti=n({...S()}),tl=m({...x()}),ta=c({...u({uid:V?.uid||""})}),tr=n({...I()}),td=()=>O?.map(t=>t?.replaceAll("'","'"))?.map((e,s)=>{let i=(P?.activeKey??0)<0||(P?.activeKey??0)>=(P?.childItem??[]).length?0===s:s===P?.activeKey,l=r({val:e,uid:V?.uid,settingId:d({id:g?.childItem?.id,index:s}),pageContext:N.pageContext,isCapitalize:P?.labelTypoV2?.attrs?.transform==="capitalize"});return t`
|
|
2
2
|
<li
|
|
3
3
|
aria-hidden
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
4
|
+
class="${tt(i)}"
|
|
5
|
+
style="${te(i)}"
|
|
6
6
|
key="${V?.uid}"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${$({className:
|
|
9
|
+
${$({className:tr,styles:{typo:J,typography:_,textAlign:W},setting:{text:l,htmlTag:"div",excludeFlex:!0,isForceValue:!0}})}
|
|
10
10
|
</li>
|
|
11
|
-
`}).join(""),
|
|
11
|
+
`}).join(""),to=()=>e({uid:V?.uid||"",customProps:F?.[0].customProps},F?.map((e,i)=>{let l=(P?.activeKey??0)<0||(P?.activeKey??0)>=(P?.childItem??[]).length?0===i:i===P?.activeKey;return e?t`${s({...e,parentUid:V?.uid,isActive:l})}`:""})),tp=()=>i(l,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-tab-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${a}/assets-v2/gp-tab-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return t`
|
|
12
12
|
<gp-tab
|
|
13
13
|
${{...U}}
|
|
14
14
|
style="${w}"
|
|
15
15
|
class="${B}"
|
|
16
|
-
|
|
16
|
+
>
|
|
17
|
+
<script gp-data type="application/json">${JSON.stringify(M)?.replaceAll("'","'")}</script>
|
|
17
18
|
<style>${H}</style>
|
|
18
19
|
<div class="${D}">
|
|
19
20
|
<div class="${Q}" style="${X}">
|
|
20
21
|
<ul class="${Y}" style="${Z}">
|
|
21
|
-
${
|
|
22
|
+
${td()}
|
|
22
23
|
</ul>
|
|
23
24
|
</div>
|
|
24
|
-
<div class="${
|
|
25
|
+
<div class="${ts}">
|
|
25
26
|
<div
|
|
26
|
-
${{...
|
|
27
|
-
class="${
|
|
28
|
-
style="${
|
|
27
|
+
${{...ta}}
|
|
28
|
+
class="${ti}"
|
|
29
|
+
style="${tl}"
|
|
29
30
|
>
|
|
30
|
-
${
|
|
31
|
+
${to()}
|
|
31
32
|
</div>
|
|
32
33
|
</div>
|
|
33
34
|
</div>
|
|
34
35
|
</gp-tab>
|
|
35
|
-
${
|
|
36
|
+
${tp()}
|
|
36
37
|
`};export{Tabs as default};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as
|
|
2
|
-
<gp-lite-vimeo-embed
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as i,baseAssetURL as s}from"@gem-sdk/core";import{getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as r,createStyle as a,createClass as m,If as o}from"@gem-sdk/system";import{getArticleVimeoClasses as p,getImageVimeoClasses as c,getButtonVimeoClasses as d,getIframeVimeoClasses as n}from"../common/classes.js";import{getIframeVimeoStyle as g,getArticleVimeoStyle as f}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let LiteVimeoEmbed=b=>{let{title:h,id:u,lazy:v,aspectRatio:j,autoplay:S,muted:w,thumbnailLink:E,poster:x,translatedVideoUrl:L}=b,{iframeSrc:k}=y(b),I=!v,N=b.thumbnail,V=r({id:u,thumbnail:E,lazy:v,iframeSrc:k,title:h,autoplay:S,muted:w,style:b?.vimeoStyleIframe||"",translatedVideoUrl:L}),A=a({...g(j)}),T=a({...f(j,"")}),C=m({...p(N,j)}),G=m({...c(I)}),M=m({...d(I)}),O=m({...n()});return e`
|
|
2
|
+
<gp-lite-vimeo-embed>
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(V)}</script>
|
|
3
4
|
<article
|
|
4
5
|
aria-hidden
|
|
5
6
|
class="${C}"
|
|
@@ -28,5 +29,5 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-s
|
|
|
28
29
|
></iframe>`)}
|
|
29
30
|
</article>
|
|
30
31
|
</gp-lite-vimeo-embed>
|
|
31
|
-
${t(
|
|
32
|
+
${t(i,`<script ${l('class="gps-link" delay',"src")}="{{ 'gp-lite-vimeo-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l('class="gps-link" delay',"src")}="${s}/assets-v2/gp-lite-vimeo-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
32
33
|
`};export{LiteVimeoEmbed as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import a from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as r}from"@gem-sdk/core";import a from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as i}from"../../helpers.js";import{createStateOrContext as l,createClass as o,createStyle as p,If as m}from"@gem-sdk/system";import{getButtonYoutubeClasses as d,getImageYoutubeClasses as c,getArticleYoutubeClasses as u,getIframeYoutubeClasses as y,getYoutubeContentClasses as f}from"../common/classes.js";import{getIframeYoutubeStyle as n,getArticleYoutubeStyle as b}from"../common/styles.js";import{getYoutubeParams as g}from"../common/helpers.js";let LiteYouTubeEmbed=$=>{let{style:h,iframeClass:v,wrapperClass:S,title:j,poster:z,translatedVideoUrl:E}=$,w=`gp-video-${$.uid}`,{posterUrl:C,iframeSrc:L}=g($),N=z?.preload,T=l({lazy:$.lazy,style:h,title:j,iframeSrc:L,translatedVideoUrl:E}),k=!$.lazy,x=o({...d(k)}),A=o({...c()}),I=o({...u(N||!1,S)}),M=o({...y(v)}),B=p({...n(h)}),G=p({...b(h,C)}),O=o({...f()}),P=()=>{let t=e`
|
|
2
2
|
<iframe
|
|
3
3
|
id="player-wrapper-${$.uid}"
|
|
4
4
|
class="${M}"
|
|
@@ -12,7 +12,8 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as r}from"@gem-s
|
|
|
12
12
|
`;return $.isHeroBanner?e`
|
|
13
13
|
<div class="${O}">${t}</div>
|
|
14
14
|
`:t};return e`
|
|
15
|
-
<gp-lite-youtube-embed
|
|
15
|
+
<gp-lite-youtube-embed>
|
|
16
|
+
<script gp-data type="application/json">${JSON.stringify(T)}</script>
|
|
16
17
|
<article
|
|
17
18
|
aria-hidden
|
|
18
19
|
class="${I}"
|
|
@@ -32,5 +33,5 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as r}from"@gem-s
|
|
|
32
33
|
${m(k,P())}
|
|
33
34
|
</article>
|
|
34
35
|
</gp-lite-youtube-embed>
|
|
35
|
-
${t(s,`<script ${
|
|
36
|
+
${t(s,`<script ${i('class="gps-link" delay',"src")}="{{ 'gp-lite-youtube-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${i('class="gps-link" delay',"src")}="${r}/assets-v2/gp-lite-youtube-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
36
37
|
`};export{LiteYouTubeEmbed as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "8.0.0-dev.
|
|
3
|
+
"version": "8.0.0-dev.122",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"i18n:generate": "node ./scripts/update-locales-to-setting.js"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/core": "8.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "8.0.0-dev.122",
|
|
31
31
|
"@gem-sdk/styles": "8.0.0-dev.115",
|
|
32
32
|
"@gem-sdk/system": "8.0.0-dev.115",
|
|
33
33
|
"@types/react-transition-group": "4.4.12",
|