@gem-sdk/components 19.0.0 → 19.1.0-dev.0
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 +8 -3
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +3 -3
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +6 -6
- package/dist/cjs/marquee/components/Marquee.liquid.js +21 -21
- 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 +2 -2
- 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 +9 -9
- 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 +8 -7
- 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 +8 -3
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +5 -5
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +3 -3
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +7 -7
- package/dist/esm/marquee/components/Marquee.liquid.js +21 -21
- 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 +4 -4
- 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 +6 -6
- 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 +4 -3
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +5 -4
- package/package.json +2 -2
|
@@ -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 a,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 l,STATIC_PRODUCT_STATUS as p,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:h}=g??{},j=h?.hasPreSelected??!1,{rowSetting:I,rowStyles:b,formatVariantId:P,formatProductId:q,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f);return r`
|
|
2
2
|
${r`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${
|
|
4
|
+
${d(V==l,r`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${w}']
|
|
@@ -61,7 +61,7 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
61
61
|
-%}
|
|
62
62
|
`)}
|
|
63
63
|
`}
|
|
64
|
-
${
|
|
64
|
+
${a("product != empty and product != null",r`
|
|
65
65
|
${r`
|
|
66
66
|
{%- assign initVariantId = ${P} -%}
|
|
67
67
|
{%- assign product_form_id = 'product-form-' | append: "${v?.uid}" -%}
|
|
@@ -82,15 +82,15 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
82
82
|
data-id="${v?.uid}"
|
|
83
83
|
style="${E}"
|
|
84
84
|
class="${$?.cssClass}"
|
|
85
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${
|
|
86
|
-
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 }}}'
|
|
85
|
+
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${j}, "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 }}" }'
|
|
87
86
|
>
|
|
87
|
+
<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>
|
|
88
88
|
<product-form class="product-form">
|
|
89
89
|
{%- form 'product', product, id: product_form_id, class: 'form contents', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
90
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
91
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
92
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
93
|
-
${
|
|
93
|
+
${o({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:b,setting:I,children:m,rawChildren:_})}
|
|
94
94
|
{%- endform -%}
|
|
95
95
|
</product-form>
|
|
96
96
|
</gp-product>
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import{makeStyleResponsive as
|
|
1
|
+
import{makeStyleResponsive as s,RenderIf as e,isLocalEnv as t,baseAssetURL as i,template 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 n=({children:n,builderAttrs:g,setting:$,style:k,builderProps:y,advanced:f,pageContext:u})=>{let{width:b,position:v,display:S,preloadBgImage:j,background:h,isScrollToTop:E}=$??{},w=f?.d,C=l({...s("w",b),...p({position:v,display:S})}),q=l(m({setting:$,style:k,uid:y?.uid,pageContext:u??{},type:"Liquid"})),x=d(c({uid:y?.uid,isScrollToTop:E,cssClass:f?.cssClass,isLiquid:!0})),A=o({uid:y?.uid,setting:{display:{desktop:S?.desktop,tablet:S?.tablet??S?.desktop,mobile:S?.mobile??S?.tablet??S?.desktop}},advanced:{d:w}}),G=`.drawer-page-content {
|
|
2
2
|
transform: none !important;
|
|
3
3
|
-webkit-transform: none !important;
|
|
4
|
-
}`;return
|
|
5
|
-
${
|
|
4
|
+
}`;return r`
|
|
5
|
+
${e(!!j,`${e(!!h?.desktop?.image?.src,`<link rel="preload" href="${h?.desktop?.image?.src}" as="image" />`)}${e(!!h?.tablet?.image?.src,`<link rel="preload" href="${h?.tablet?.image?.src}" as="image" />`)}${e(!!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="${x} ${r("gps-lazy")}"
|
|
7
|
+
id="${y?.uid}"
|
|
8
|
+
data-id="${y?.uid}"
|
|
9
|
+
class="${x} ${a("gps-lazy")}"
|
|
12
10
|
style="${C}"
|
|
13
11
|
>
|
|
12
|
+
<script gp-data type="application/json">${JSON.stringify(A)}</script>
|
|
14
13
|
<style>${G}</style>
|
|
15
|
-
<div ${{...
|
|
16
|
-
${
|
|
14
|
+
<div ${{...g}} style="${{...q}}">
|
|
15
|
+
${n}
|
|
17
16
|
</div>
|
|
18
17
|
</gp-sticky>
|
|
19
|
-
${
|
|
20
|
-
`};export{
|
|
18
|
+
${e(t,`<script ${a('class="gps-link" delay',"src")}="{{ 'gp-sticky-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${a('class="gps-link" delay',"src")}="${i}/assets-v2/gp-sticky-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
19
|
+
`};export{n as default};
|
|
@@ -1,33 +1,34 @@
|
|
|
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 C,getStyleTagClasses as S,getTabParentListClasses as T,getTabListClasses as k,getWrapperContentClasses as A,getContainContentClasses as I,getTextClasses as K,getItemClasses as E}from"../common/classes.js";let N=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({...C({setting:P})}),H=S({panelWidth:L,builderProps:V}),Q=n({...T()}),X=m({...f(P)}),Y=n({...k({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({...A()}),ti=n({...I()}),tl=m({...x()}),ta=c({...u({uid:V?.uid||""})}),tr=n({...K()});return t`
|
|
2
2
|
<gp-tab
|
|
3
3
|
${{...U}}
|
|
4
4
|
style="${w}"
|
|
5
5
|
class="${B}"
|
|
6
|
-
|
|
6
|
+
>
|
|
7
|
+
<script gp-data type="application/json">${JSON.stringify(M)?.replaceAll("'","'")}</script>
|
|
7
8
|
<style>${H}</style>
|
|
8
9
|
<div class="${D}">
|
|
9
10
|
<div class="${Q}" style="${X}">
|
|
10
11
|
<ul class="${Y}" style="${Z}">
|
|
11
|
-
${O?.map(
|
|
12
|
+
${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`
|
|
12
13
|
<li
|
|
13
14
|
aria-hidden
|
|
14
|
-
class="${
|
|
15
|
-
style="${
|
|
15
|
+
class="${tt(i)}"
|
|
16
|
+
style="${te(i)}"
|
|
16
17
|
key="${V?.uid}"
|
|
17
18
|
|
|
18
19
|
>
|
|
19
|
-
${$({className:
|
|
20
|
+
${$({className:tr,styles:{typo:J,typography:_,textAlign:W},setting:{text:l,htmlTag:"div",excludeFlex:!0,isForceValue:!0},translateSetting:g?.childItem?.id})}
|
|
20
21
|
</li>
|
|
21
22
|
`}).join("")}
|
|
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
|
+
${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})}`:""}))}
|
|
31
32
|
</div>
|
|
32
33
|
</div>
|
|
33
34
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import{template as t}from"@gem-sdk/core";import{createAttr as o,createStyle as e,createClass as s,createContent as i}from"@gem-sdk/system";import{getAttr as r,getTextAttr as m}from"../common/attrs.js";import{getStyle as l,getContainerStyle as p,getTextStyle as n}from"../common/styles.js";import{getClasses as a,getTextClasses as d}from"../common/classes.js";import{getDisplayText as c}from"../common/helpers.js";let $=({id:$,styles:g,builderAttrs:u,style:f,setting:y,advanced:x,builderProps:j,className:v,isText:q,pageContext:h,translateSetting:k,elementAttrs:C})=>{let{htmlTag:L="div",excludeFlex:T}=y??{},I=o({...$&&{id:$},...r({uid:j?.uidInteraction??j?.uid??""}),...u}),O=o({...m(),...C}),_=e({...l(g,f)}),b=e({...p(g,y)}),w=e({...n({styles:g,setting:y,builderProps:j,pageContext:h??{},type:"Liquid"})}),z=s({...a({setting:y,advanced:x,builderProps:j})}),A=s({"gp-flex":!T}),B=s({...d({styles:g,setting:y,className:v}),...q&&{"gp-text":!0}}),D=c({type:"Liquid",styles:g,setting:y,builderProps:j,pageContext:h??{},translateSetting:k}),E=i(D);return t`
|
|
2
2
|
{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
|
|
3
3
|
<div ${{...I}}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
class="${z}"
|
|
5
|
+
style="${_}"
|
|
6
|
+
>
|
|
7
7
|
<div class="${A}" style="${b}">
|
|
8
8
|
<${L}
|
|
9
9
|
${{...O}}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as
|
|
2
|
-
<gp-lite-vimeo-embed
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as r}from"../../helpers.js";import{createStateOrContext as l,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 f,getArticleVimeoStyle as g}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let h=h=>{let{title:u,id:b,lazy:v,aspectRatio:j,autoplay:S,muted:w,thumbnailLink:x,poster:E,translatedVideoUrl:k,pageContext:N}=h,{iframeSrc:A}=y(h),I=!v,T=h.thumbnail,V=l({id:b,thumbnail:x,lazy:v,iframeSrc:A,title:u,autoplay:S,muted:w,style:h?.vimeoStyleIframe||"",translatedVideoUrl:k}),C=a({...f(j)}),G=a({...g(j,"")}),L=m({...p(T,j)}),M=m({...c(I)}),O=m({...d(I)}),P=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="${L}"
|
|
@@ -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(s,`<script ${
|
|
32
|
+
${t(s,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-lite-vimeo-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${i}/assets-v2/gp-lite-vimeo-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
32
33
|
`};export{h as default};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as r}from"@gem-sdk/core";import
|
|
2
|
-
<gp-lite-youtube-embed
|
|
1
|
+
import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as r}from"@gem-sdk/core";import i from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as a}from"../../helpers.js";import{createStateOrContext as l,createClass as o,createStyle as p,If as m}from"@gem-sdk/system";import{getButtonYoutubeClasses as c,getImageYoutubeClasses as d,getArticleYoutubeClasses as n,getIframeYoutubeClasses as u,getYoutubeContentClasses as y}from"../common/classes.js";import{getIframeYoutubeStyle as f,getArticleYoutubeStyle as $}from"../common/styles.js";import{getYoutubeParams as g}from"../common/helpers.js";let b=b=>{let{style:h,iframeClass:v,wrapperClass:S,title:j,poster:w,translatedVideoUrl:z,autoplay:C,pageContext:E}=b,N=`gp-video-${b.uid}`,{posterUrl:k,iframeSrc:x}=g(b),B=!!b.thumbnail,T=w?.preload,A=l({lazy:b.lazy,hasThumbnail:B,style:h,title:j,iframeSrc:x,translatedVideoUrl:z,autoplay:C,isHeroBanner:b.isHeroBanner}),H=!b.lazy&&(!B||!!b.autoplay),M=o({...c(H)}),G=o({...d()}),I=o({...n(T||!1,S)}),L=o({...u(v)}),O=p({...f(h)}),P=p({...$(h,k)}),_=o({...y()});return r`
|
|
2
|
+
<gp-lite-youtube-embed>
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(A)}</script>
|
|
3
4
|
<article
|
|
4
5
|
aria-hidden
|
|
5
6
|
class="${I}"
|
|
6
7
|
data-title="${j}"
|
|
7
8
|
style="${P}"
|
|
8
9
|
>
|
|
9
|
-
${
|
|
10
|
+
${i({id:N,src:k,alt:w?.altText,title:w?.imageTitle,priority:w?.preload,pageContext:E,className:G,isDisableAspectStyle:!0,isNotLazyload:w?.preload})}
|
|
10
11
|
<button type="button" aria-label="Play" class="${M}">
|
|
11
12
|
<svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%">
|
|
12
13
|
<path
|
|
@@ -32,5 +33,5 @@ import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as r}from"@gem-s
|
|
|
32
33
|
`:e})())}
|
|
33
34
|
</article>
|
|
34
35
|
</gp-lite-youtube-embed>
|
|
35
|
-
${e(t,`<script ${
|
|
36
|
+
${e(t,`<script ${a('class="gps-link" delay',"src")}="{{ 'gp-lite-youtube-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${a('class="gps-link" delay',"src")}="${s}/assets-v2/gp-lite-youtube-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
36
37
|
`};export{b as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "19.0.0",
|
|
3
|
+
"version": "19.1.0-dev.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"i18n:extract": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/translate/extract-texts-to-locales.js && node ./scripts/translate/en-keys-usage.js"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "19.0.0",
|
|
29
|
+
"@gem-sdk/core": "19.1.0-dev.0",
|
|
30
30
|
"@gem-sdk/styles": "19.0.0",
|
|
31
31
|
"@gem-sdk/system": "19.0.0",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|