@gem-sdk/components 19.0.0-dev.22 → 19.0.0-dev.24
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/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +2 -2
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +7 -7
- package/dist/cjs/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +16 -18
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
- package/dist/cjs/third-party/settings/BoldSubscriptions/index.js +1 -1
- package/dist/cjs/third-party/settings/BoldSubscriptions/uiV2.js +1 -1
- package/dist/cjs/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
- package/dist/cjs/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
- package/dist/cjs/third-party/settings/LoopSubscriptions/index.js +1 -1
- package/dist/cjs/third-party/settings/RechargeSubscriptions/index.js +1 -1
- package/dist/cjs/third-party/settings/SkioSubscriptionsYcS20/index.js +2 -2
- package/dist/cjs/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
- package/dist/cjs/third-party/settings/TrustshopProductReviews/index.js +2 -2
- package/dist/cjs/third-party/settings/WcWishlistBackInStock/index.js +2 -2
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +13 -13
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +11 -11
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
- package/dist/esm/image/components/Image.liquid.js +10 -10
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +7 -7
- package/dist/esm/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +26 -28
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
- package/dist/esm/third-party/settings/BoldSubscriptions/index.js +1 -1
- package/dist/esm/third-party/settings/BoldSubscriptions/uiV2.js +1 -1
- package/dist/esm/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
- package/dist/esm/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
- package/dist/esm/third-party/settings/LoopSubscriptions/index.js +1 -1
- package/dist/esm/third-party/settings/RechargeSubscriptions/index.js +1 -1
- package/dist/esm/third-party/settings/SkioSubscriptionsYcS20/index.js +2 -2
- package/dist/esm/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
- package/dist/esm/third-party/settings/TrustshopProductReviews/index.js +2 -2
- package/dist/esm/third-party/settings/WcWishlistBackInStock/index.js +2 -2
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +14 -14
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +13 -13
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import a from"react-youtube";import{getYoutubeParams as o,isSettingLoop as i,covertStrParamsToObj as l}from"../common/helpers.js";import s from"../../image/components/NextImage.js";import{createClass as m,createStyle as n}from"@gem-sdk/system";import{getButtonYoutubeClasses as c,getImageYoutubeClasses as
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import a from"react-youtube";import{getYoutubeParams as o,isSettingLoop as i,covertStrParamsToObj as l}from"../common/helpers.js";import s from"../../image/components/NextImage.js";import{createClass as m,createStyle as n}from"@gem-sdk/system";import{getButtonYoutubeClasses as c,getImageYoutubeClasses as u,getArticleYoutubeClasses as d,getIframeYoutubeClasses as p,getYoutubeContentClasses as f}from"../common/classes.js";import{getIframeYoutubeStyle as y,getArticleYoutubeStyle as h}from"../common/styles.js";import g from"../hooks/useLiteYoutubeEmbed.js";let b=b=>{let C=r(),v="edit"!==C,{style:w,poster:N,iframeClass:j,wrapperClass:x,title:k,pageContext:B}=b,{preload:S}=N||{},{videoId:E,paramsImp:T,posterUrl:V,iframeSrc:H}=o(b),{iframe:I,intervalPlay:M,warmConnections:D,isVideoStarted:L,videoDuration:P,addIframe:Y}=g(b,T,E),z=m({...c(I)}),A=m({...u()}),F=m({...d(S&&v||!1,x)}),O=m({...p(j)}),R=n({...y(w)}),q=n({...h(w,V)}),G=m({...f()});return e("article",{"aria-hidden":!0,className:F,"data-title":k,style:q,onPointerOver:D,onClick:Y,children:[t(s,{src:V,alt:N?.altText,title:N?.imageTitle,priority:v&&S,pageContext:B,className:A,isDisableAspectStyle:!0}),t("button",{type:"button","aria-label":"Play",className:z,children:e("svg",{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%",children:[t("path",{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",fill:"#f00"}),t("path",{d:"M 45,24 27,14 27,34",fill:"#fff"})]})}),I&&(()=>{if(b.isHeroBanner&&i(T))return t(a,{videoId:E,title:k,iframeClassName:O,style:R,className:G,opts:{host:"https://www.youtube-nocookie.com",playerVars:{autoplay:1,state:1,controls:0,mute:1,...l(T)}},onReady:e=>{if(e.target.playVideo(),P.current=Math.floor(e.target.getDuration()),b.isHeroBanner){let t=e.target.getIframe();if(t){let e=t.closest("div.hero-banner-container");if(e){let r=new CustomEvent("youtube-iframe-ready",{detail:{iframe:t},bubbles:!0,cancelable:!0});e.dispatchEvent(r)}}}},onStateChange:e=>{let t=e.target;L.current||(t.playVideo(),L.current=!0,M(e)),0===e.data&&(P.current=t.getCurrentTime(),t.playVideo(),M(e))}});let e=t("iframe",{className:O,style:R,title:k,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:H});return b.isHeroBanner?t("div",{className:G,children:e}):e})()]})};export{b as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as
|
|
2
|
-
<gp-lite-youtube-embed gp-data='${JSON.stringify(
|
|
1
|
+
import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as l}from"@gem-sdk/core";import r from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as a}from"../../helpers.js";import{createStateOrContext as i,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 f,getYoutubeContentClasses as y}from"../common/classes.js";import{getIframeYoutubeStyle as n,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),T=!!b.thumbnail,A=w?.preload,M=i({lazy:b.lazy,hasThumbnail:T,style:h,title:j,iframeSrc:x,translatedVideoUrl:z,autoplay:C}),B=!b.lazy&&(!T||!!b.autoplay),G=o({...d(B)}),I=o({...c()}),L=o({...u(A||!1,S)}),O=o({...f(v)}),P=p({...n(h)}),_=p({...$(h,k)}),q=o({...y()});return l`
|
|
2
|
+
<gp-lite-youtube-embed gp-data='${JSON.stringify(M)}'>
|
|
3
3
|
<article
|
|
4
4
|
aria-hidden
|
|
5
|
-
class="${
|
|
5
|
+
class="${L}"
|
|
6
6
|
data-title="${j}"
|
|
7
|
-
style="${
|
|
7
|
+
style="${_}"
|
|
8
8
|
>
|
|
9
|
-
${
|
|
10
|
-
<button type="button" aria-label="Play" class="${
|
|
9
|
+
${r({id:N,src:k,alt:w?.altText,title:w?.imageTitle,priority:w?.preload,pageContext:E,className:I,isDisableAspectStyle:!0,isNotLazyload:w?.preload})}
|
|
10
|
+
<button type="button" aria-label="Play" class="${G}">
|
|
11
11
|
<svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%">
|
|
12
12
|
<path
|
|
13
13
|
d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z"
|
|
@@ -16,21 +16,21 @@ import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as a}from"@gem-s
|
|
|
16
16
|
<path d="M 45,24 27,14 27,34" fill="#fff"></path>
|
|
17
17
|
</svg>
|
|
18
18
|
</button>
|
|
19
|
-
${m(
|
|
19
|
+
${m(B,(()=>{let e=l`
|
|
20
20
|
<iframe
|
|
21
21
|
id="player-wrapper-${b.uid}"
|
|
22
|
-
class="${
|
|
23
|
-
style="${
|
|
22
|
+
class="${O}"
|
|
23
|
+
style="${P}"
|
|
24
24
|
title="${j}"
|
|
25
25
|
frameborder="0"
|
|
26
26
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
27
27
|
allowfullscreen
|
|
28
|
-
src="${
|
|
28
|
+
src="${x}"
|
|
29
29
|
></iframe>
|
|
30
|
-
`;return b.isHeroBanner?
|
|
31
|
-
<div class="${
|
|
30
|
+
`;return b.isHeroBanner?l`
|
|
31
|
+
<div class="${q}">${e}</div>
|
|
32
32
|
`:e})())}
|
|
33
33
|
</article>
|
|
34
34
|
</gp-lite-youtube-embed>
|
|
35
|
-
${e(t,`<script ${
|
|
35
|
+
${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
36
|
`};export{b as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{template as t,hasTranslatedLiquid as e}from"@gem-sdk/core";import{getSettingTranslatedVideoAndThumbnail as o,getAspectRatioSettings as i,getVimeoVideoId as s,vimeoVideoRegex as l,getYoutubeVideoId as m,youtubeVideoRegex as a,parseTimeVideo as r,fallbackImageVideoUrl as d}from"../common/helpers.js";import{createAttr as u,createStyle as n,createClass as c}from"@gem-sdk/system";import{getAttr as p}from"../common/attrs.js";import{getStyle as f,getYoutubeStyle as y,getVimeoStyle as b,getHtml5Style as j,getFallBackImageStyle as h}from"../common/styles.js";import{getFallbackImageClasses as k,getClasses as V}from"../common/classes.js";import $ from"./HTML5Embed.liquid.js";import v from"./LiteVimeoEmbed.liquid.js";import g from"./LiteYouTubeEmbed.liquid.js";import L from"../../image/components/NextImage.liquid.js";import{getImageSrc as N}from"../../image/common/helpers.js";let q=({className:q,setting:C,style:x,builderAttrs:z,builderProps:E,advanced:F,pageContext:I})=>{let R=o({setting:C,uid:E?.uid,pageContext:I??{}}),{youtubeUrl:w="",vimeoUrl:T="",html5Url:U,autoplay:H=!1,loopVideo:M=!1,controls:O=!1,mute:P,poster:S,startTime:Y,endTime:A,lazy:B,type:D}=R??{},{youtubeUrlTranslated:G,vimeoUrlTranslated:J}=R,K=N(S),{cssClass:Q}=F??{},W=i(R?.ratioOptions,R?.aspectRatio),X=u({...p({uid:E?.uid||""})}),Z=n({...f(R,x)}),_=n({...y(W)}),tt=n({...b(W)}),te=n({...j(W)}),to=n({...h(C?.aspectRatio)}),ti=c({...k()}),ts=c({...V({className:q,builderProps:E,isInstantLP:!1,advancedCssClass:Q})});return t`
|
|
2
2
|
<div
|
|
3
3
|
${{...z}} ${{...X}} class="${ts}" style="${Z}">
|
|
4
|
-
${(()=>{switch(D){case"youtube":{let t=m(w),o=e(G);if((!a.test(w)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});let i="";return M&&(i+=`&loop=1&playlist=${t}`),Y&&(i+=`&start=${r(Y)}`),A&&(i+=`&end=${r(A)}`),g({uid:E?.uid,id:t??"",translatedVideoUrl:o?G:"",autoplay:H,title:"Video",controls:O,params:i,adNetwork:!1,noCookie:!0,muted:!P,thumbnail:K,lazy:B??!0,poster:S,style:_})}case"vimeo":{let t=s(T),o=e(J);if((!l.test(T)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});return v({muted:!P,loop:M,controls:O,thumbnail:K,thumbnailLink:S?.src,autoplay:H,lazy:B??!0,id:t??"",translatedVideoUrl:o?J:"",title:"Video",aspectRatio:W,poster:S,vimeoStyleIframe:tt})}case"html5":if(!U)return L({src:d,alt:"Fallback video",className:ti,style:to});return $({uid:E?.uid,muted:!P,loop:M,controls:O,autoplay:H,src:U,thumbnail:K,title:"Video",poster:S,lazy:B??!0,isVideoComponent:!0,style:te})}})()}
|
|
4
|
+
${(()=>{switch(D){case"youtube":{let t=m(w),o=e(G);if((!a.test(w)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});let i="";return M&&(i+=`&loop=1&playlist=${t}`),Y&&(i+=`&start=${r(Y)}`),A&&(i+=`&end=${r(A)}`),g({uid:E?.uid,id:t??"",translatedVideoUrl:o?G:"",autoplay:H,title:"Video",controls:O,params:i,adNetwork:!1,noCookie:!0,muted:!P,thumbnail:K,lazy:B??!0,poster:S,style:_,pageContext:I})}case"vimeo":{let t=s(T),o=e(J);if((!l.test(T)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});return v({muted:!P,loop:M,controls:O,thumbnail:K,thumbnailLink:S?.src,autoplay:H,lazy:B??!0,id:t??"",translatedVideoUrl:o?J:"",title:"Video",aspectRatio:W,poster:S,vimeoStyleIframe:tt,pageContext:I})}case"html5":if(!U)return L({src:d,alt:"Fallback video",className:ti,style:to});return $({uid:E?.uid,muted:!P,loop:M,controls:O,autoplay:H,src:U,thumbnail:K,title:"Video",poster:S,lazy:B??!0,isVideoComponent:!0,style:te,pageContext:I})}})()}
|
|
5
5
|
</div>
|
|
6
6
|
`};export{q as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -223,7 +223,6 @@ type ImageProps = BasePropsWrap<ImageSettingProps$1, ImageStyleProps$1> & {
|
|
|
223
223
|
advanced?: any;
|
|
224
224
|
};
|
|
225
225
|
type ImageLiquidProps = ImageProps & {
|
|
226
|
-
enableLazyLoadImage?: boolean;
|
|
227
226
|
pageContext?: PageContext;
|
|
228
227
|
};
|
|
229
228
|
|
|
@@ -698,7 +697,6 @@ type HeroBannerProps = BasePropsWrap<HeroBannerSettingProps, HeroBannerStyleProp
|
|
|
698
697
|
rawChildren?: any[];
|
|
699
698
|
advanced?: any;
|
|
700
699
|
pageContext?: PageContext;
|
|
701
|
-
enableLazyLoadImage?: boolean;
|
|
702
700
|
};
|
|
703
701
|
type DataVideoType = {
|
|
704
702
|
data: Background;
|
|
@@ -6876,7 +6874,6 @@ type PropTypes$1 = ProductImagesProps$1 & React.ComponentPropsWithoutRef<'div'>
|
|
|
6876
6874
|
children?: any;
|
|
6877
6875
|
} & {
|
|
6878
6876
|
pageContext?: PageContext;
|
|
6879
|
-
enableLazyLoadImage?: boolean;
|
|
6880
6877
|
};
|
|
6881
6878
|
declare const ProductImages$1: (props: PropTypes$1) => string;
|
|
6882
6879
|
|
|
@@ -6885,7 +6882,6 @@ type PropTypes = ProductImagesProps$2 & React.ComponentPropsWithoutRef<'div'> &
|
|
|
6885
6882
|
children?: any;
|
|
6886
6883
|
} & {
|
|
6887
6884
|
pageContext?: PageContext;
|
|
6888
|
-
enableLazyLoadImage?: boolean;
|
|
6889
6885
|
};
|
|
6890
6886
|
declare const ProductImages: (props: PropTypes) => string;
|
|
6891
6887
|
|