@gem-sdk/components 23.0.0-dev.4 → 23.0.0-staging.1
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/article/components/ArticleImage.liquid.js +2 -2
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/cjs/common/components/Loading.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/common/classes.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +12 -10
- 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 +5 -4
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image/settings/configs/settings.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
- package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +16 -16
- package/dist/cjs/product/components/file-upload/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +42 -42
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- 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 +39 -39
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +38 -38
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +3 -3
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/esm/common/components/Loading.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/common/classes.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +13 -11
- package/dist/esm/image/components/Image.liquid.js +3 -3
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +6 -5
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image/settings/configs/settings.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +19 -19
- package/dist/esm/product/components/file-upload/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
- 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 +24 -24
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +3 -16
- package/package.json +4 -4
- package/dist/cjs/common/helpers.js +0 -1
- package/dist/cjs/common/hooks/useElementWidth.js +0 -1
- package/dist/cjs/common/hooks/useLoadingProgress.js +0 -1
- package/dist/cjs/image/common/liquidSrcset.js +0 -1
- package/dist/cjs/image/common/srcset.js +0 -1
- package/dist/esm/common/helpers.js +0 -1
- package/dist/esm/common/hooks/useElementWidth.js +0 -1
- package/dist/esm/common/hooks/useLoadingProgress.js +0 -1
- package/dist/esm/image/common/liquidSrcset.js +0 -1
- package/dist/esm/image/common/srcset.js +0 -1
package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{getProductImagesClassName as o}from"../../composables/getProductImagesClassName.js";import{getZoomImageClass as s,getZoomLenClass as
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
1
|
+
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{getProductImagesClassName as o}from"../../composables/getProductImagesClassName.js";import{getZoomImageClass as s,getZoomLenClass as d}from"../../common/productFeaturedImage.js";import{getProductImagesStyles as r}from"../../composables/getProductImagesStyles.js";import{getShapeByLayout as l,getZoomDisplay as m}from"../../common/productGallery.js";import p from"../../../../../video/components/HTML5Embed.liquid.js";import n from"../../../../../image/components/NextImage.liquid.js";import g from"../../../../../image/components/Modal3d.liquid.js";import{getAspectRatio as c,getSrcImage as u}from"../../common/common.js";import{Liquid as h,LiquidFor as y,LiquidIf as C,If as v}from"@gem-sdk/system";import f from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as w}from"../../../../helpers/function.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,pageContext:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=o(L),{galleryGridStyles:q,galleryGridItemStyles:I}=r(L),M=l({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
|
|
2
|
+
${n({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}
|
|
3
|
+
${v(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",s())}">
|
|
4
|
+
${n({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,pageContext:x})}
|
|
5
5
|
</div>`," ")}
|
|
6
|
-
${
|
|
6
|
+
${v(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",d())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,
|
|
10
|
-
${
|
|
9
|
+
`,z=()=>g({src:C("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:c(M)}),B=()=>f({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>p({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"},pageContext:x}),P=()=>i`
|
|
10
|
+
${C("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
13
13
|
<path d="M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z" stroke="#F9F9F9" stroke-miterlimit="10"/>
|
|
14
14
|
</svg>
|
|
15
15
|
</div>`)}
|
|
16
|
-
${
|
|
16
|
+
${C("media.media_type == 'model'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0">
|
|
17
17
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
18
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
19
19
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
20
20
|
</svg>
|
|
21
21
|
</div>`)}
|
|
22
|
-
${
|
|
22
|
+
${Z({aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},{width:"100%",height:"100%"})}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${w(m(L?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -39,10 +39,10 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
|
-
`,
|
|
43
|
-
${
|
|
44
|
-
${
|
|
45
|
-
${
|
|
42
|
+
`,T=i=>`
|
|
43
|
+
${C("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
|
+
${C("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
|
+
${C("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
46
46
|
<div
|
|
47
47
|
aria-hidden
|
|
48
48
|
id="{{imageID}}"
|
|
@@ -54,18 +54,18 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
55
|
data-outline="none"
|
|
56
56
|
class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
|
|
57
|
-
style="${
|
|
57
|
+
style="${w(I)}"
|
|
58
58
|
>
|
|
59
|
-
${
|
|
59
|
+
${C("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
|
-
${
|
|
61
|
+
${C("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-w-full" style="${
|
|
64
|
-
${
|
|
63
|
+
<div class="gp-w-full" style="${C("media == null or media.media_type == 'image'","display: block !important;")} ${C("isVideo == true",w({...S()}))}">
|
|
64
|
+
${C("media != null",P(),N())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
|
-
<div class="${
|
|
68
|
-
style="${
|
|
67
|
+
<div class="${C("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
+
style="${C("isMedia",w({...e("aspect",c(M))}))} ${w({...k()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
@@ -75,19 +75,19 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
75
75
|
{% assign mediaSourceVideo = media.sources.last.url %}
|
|
76
76
|
${H()}
|
|
77
77
|
{% when 'model' %}
|
|
78
|
-
${
|
|
78
|
+
${z()}
|
|
79
79
|
{% endcase %}
|
|
80
80
|
</div>
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
|
-
</div>`,
|
|
84
|
-
${
|
|
83
|
+
</div>`,N=()=>i`
|
|
84
|
+
${n({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}`;return h(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
|
-
class="${
|
|
87
|
-
style="${
|
|
86
|
+
class="${V}"
|
|
87
|
+
style="${w(q)}}"
|
|
88
88
|
>
|
|
89
|
-
${
|
|
90
|
-
${
|
|
91
|
-
${
|
|
92
|
-
${
|
|
89
|
+
${y("media in product.media",`${C("media.media_type == 'image'",y("image in product.images",C("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
|
+
${C("media.id == product.featured_media.id ",T(L?.borderActive?.border!=="none"?"active":""),T())}`)}
|
|
91
|
+
${C("product.media.size > 0",b)}
|
|
92
|
+
${C("product.media.size < 1",T())}
|
|
93
93
|
</div>`)};export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as r}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as l,usePageType as i,usePageStore as a,useFetchHandle as c,hasPublicStoreFrontData as s,createStoreFrontFetcher as n,useProductQuery as u,useProductsQueryAll as m,useProductsQuery as g,PICKED_PRODUCT_STATUSES as h,useCollectionQuery as p,flattenConnection as f,ProductListProvider as P,filterToolbarPreview as b}from"@gem-sdk/core";import{useState as k,useMemo as I,useEffect as T}from"react";import v from"../../../common/components/Loading.js";import y from"next/dynamic";import O from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import C from"./ProductListCarouselLayout.js";import E from"./ProductListGridLayout.js";import{getClass as N}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getStyle as L}from"./common/styles.js";import{If as j}from"@gem-sdk/system";import W from"next/head";let x=y(()=>import("../ProductNotFound.js"),{loading:v}),G=y=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=y,{isRelatedProduct:H,productSetting:Q}=w(y),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=d(),$=l(),_=i(),V=a(e=>e.dynamicProduct),q=a(e=>e.dynamicCollection),[U,J]=k(1),[K,X]=k(!0),[Y,Z]=k(),[ee,et]=k(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[r.Collection,r.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=r.DynamicCollection);let er=Q?.productSrc??r.Collection;er===r.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=c(),ei=a(e=>e.publicStoreFrontData),ea=I(()=>s(ei)?n(ei):el,[ei]),{data:ec}=u(H&&ed?ed:void 0,{revalidateOnMount:F||R},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ec?.tags||ec?.tags.length===0),en=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ec?.collections?.edges||ec?.collections.edges.length===0),eu=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ec?.vendor,em=m(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=g(er===r.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?h:void 0}),ep=I(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=p(er!==r.PickProduct?ep:void 0,{revalidateOnMount:eg});T(()=>{if(H&&ec&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(et(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Z({first:A?.numberOfProducts,vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ec?.vendor:"",idNEQ:ec.id});break;case"collection":{let t=ec?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ec.tags||0===ec.tags.length){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags},{nameNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags}]}]})}}},[ec,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let eP=er===r.PickProduct?eh.isValidating:ef.isValidating,eb=er===r.PickProduct?eh.isLoading:ef.isLoading,ek=er===r.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===r.PickProduct?f(eh.data?.products):f(eI?.products),ev=em?.data?.products?f(em?.data?.products):void 0,ey=H&&ev?ev:er===r.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==r.PickProduct?eT:eT.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eO=I(()=>ee&&H&&F||!ey.length&&!eb&&K&&F,[K,eb,ee,H,F,ey.length]),eS=I(()=>!ey||ee&&H,[ee,H,ey]),eC=I(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(A?.slidesToShow?.[$]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(A?.slidesToShow?.[$]??1)*(e+1)&&++e,{gridRow:`${1+U*e}/${U+1+U*e}`,marginBottom:e+1<t?S(M?.horizontalGutter,$):void 0}))},[A?.sameHeight,A?.slidesToShow,U,ey?.length,$,M?.horizontalGutter]),eE=I(()=>eP||eb||ek||!ey||ee&&H,[ek,eb,ee,H,eP,ey]);T(()=>{eE||setTimeout(()=>{let{builderData:e}=B??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&J(o.childElementCount||1)},F?0:500)},[B,eE,F]);let eN=I(()=>({collection:eI,products:ey,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:M?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:M?.horizontalGutter,verticalGutter:M?.verticalGutter,fullWidth:M?.fullWidth,spacing:M?.spacing,width:M?.width,height:M?.height}}),[eI,ey,A,M]);if(B?.isPreview&&eo)return e(t,{});if(eO)return e(t,{children:j(K,e(x,{builderAttrs:D,collectionHandle:eI?.handle,productSrc:er,onClose:()=>X(!1),children:G,relatedTagString:z,assignProductNoTags:es||en||eu,noAssignedProduct:!ed}))});let{productListWrapStyle:ew,productListContentStyle:eL,productListWrapAlignStyle:ej}=L(y),{productListWrapClass:eW}=N(y);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(W,{children:[!!M.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage.desktop.image.src,as:"image"}),!!M.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.tablet?.image?.src,as:"image"}),!!M.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||eb?e(v,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(P,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:j(M?.layout==="grid",e(E,{...y,productSortedById:ey,generateGridRowArray:eC}),e(C,{...y,productSortedById:ey}))})]})})}),b(G,!0)]})};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getUpdatedDotStyle as t}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";
|
|
1
|
+
import{getUpdatedDotStyle as t}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";let r=e=>{let{setting:r,styles:d}=e,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=t(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let p={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete p.backgroundColor,delete p.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:p}},d=t=>{let{setting:o,styles:r}=t,d=o?.productSetting,i=d?.relatedTag,a=d?.hasRelatedExclude,p=(i&&"collection"===i[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",u=p?.split(",").map(t=>t.trim()).toString(),n=d?.productSrc??"Collection",s=d?.collectionId?.replace(c,"")??"latest",g=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,m=r?.layout==="grid",h=e(o?.numberOfProducts,4),P="PickProduct"===n&&d?.productIds?.length?d?.productIds.map(t=>t.replace(l,"")):[],I="PickProduct"===n&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",C=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",k=S&&C?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",f=C?.[C.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:u,collectionID:s,isLatestProducts:g,isGrid:m,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:k,isReverse:f,productSrc:n,productSetting:d,isSorted:S,relatedTag:i,productNumber:"PickProduct"===n?g?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},c="gid://shopify/Collection/",l="gid://shopify/Product/";export{c as PREFIX_COLLECTION_ID,l as PREFIX_PRODUCT_ID,r as getData,d as getDataLiquid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as r}from"../../../common/const.js";import{useRenderMode as i,useCurrentDevice as d,usePageType as l,usePageStore as s,flattenConnection as c,ProductListProvider as n,filterToolbarPreview as a,PICKED_PRODUCT_STATUSES as m}from"@gem-sdk/core";import{useState as u,useRef as g,useMemo as p,useEffect as h}from"react";import f from"../../../common/components/Loading.js";import P from"next/dynamic";import y from"./hooks/useRelatedProductIDAssigned.js";import k from"../SalePageProductListWarning.js";import{getPropertyByDevice as I}from"../../../dialog/common/helpers.js";import b from"./hooks/useProductRelatedQuery.js";import S from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as j}from"./constants/index.js";import{useCollectionQuery as C}from"./hooks/useCollectionQuery.js";import{useProductsQuery as v}from"./hooks/useProductsQuery.js";import L from"./ProductListGridLayout.js";import{getClass as w}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getStyle as G}from"./common/styles.js";import{If as T}from"@gem-sdk/system";import A from"next/head";let O=P(()=>import("../ProductNotFound.js"),{loading:f}),x=P=>{let{children:x,styles:D,builderProps:B,setting:E,builderAttrs:H}=P,{isRelatedProduct:z,productSetting:M}=N(P),{isEditMode:Q,isPreviewSharePageMode:R}=i(),W=d(),$=l(),_=s(o=>o.dynamicCollection),[F,V]=u(1),[q,U]=u(!0),J=g(),K="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"!=$||[r.Collection,r.DynamicCollection].includes(M?.productSrc)||(M.productSrc=r.DynamicCollection);let X=M?.productSrc??r.Collection;X===r.DynamicCollection&&(M.collectionId=_?.collectionId||"latest");let Y=Number.isNaN(Number(E?.numberOfProducts))?j:Number(E?.numberOfProducts),{relatedProductIdAssigned:Z}=y({productSetting:M}),{isNotFoundRelatedProduct:oo,relatedProducts:oe,isNoRelatedProductData:ot,relatedTagString:or,isLoading:oi}=b({productSetting:M,isRelatedProduct:z,relatedProductIdAssigned:Z,numberOfProducts:Y}),od=Q||R,ol=v({productIds:M?.productIds,defaultSelectedProductCount:M?.numOfSelectedProducts,productSrc:X,selectedStatus:od&&M?.productIds?.length?m:void 0}),os=C({productSrc:X,collectionID:M?.collectionId??"latest",numberOfProducts:Y,orderBy:E?.orderBy}),oc=oi||(X===r.PickProduct?ol.isLoading:os.isLoading),on=X===r.PickProduct?ol.error:os.error,oa=X===r.PickProduct?ol.isValidating:os.isValidating,om=os.data?.collections?.edges?.[0]?.node,ou=X===r.PickProduct?c(ol.data?.products):c(om?.products),og=s(o=>o.assignedProductIds),op=s(o=>o.isApplyAllProducts),oh=p(()=>(og??[]).length>0&&!op||op,[og,op]),of=oe?.data?.products&&oh?c(oe?.data?.products):[],oP=z?of:X===r.PickProduct&&M?.productIds?.length?M?.productIds?.map(o=>ou?.find(e=>e?.baseID===o)).filter(Boolean)??ou:X!==r.PickProduct?ou:ou.filter((o,e)=>e<(M?.numOfSelectedProducts??4)),oy=p(()=>oo&&z&&Q||!oP.length&&!oc&&q&&Q,[q,oc,oo,z,Q,oP.length]),ok=p(()=>!oP||oo&&z,[oo,z,oP]),oI=p(()=>{if(!E?.sameHeight)return[];let o=0,e=Math.ceil((oP?.length??0)/+(E?.slidesToShow?.[W]??1));return Array.from(Array(oP?.length??0)).map((t,r)=>(r>=+(E?.slidesToShow?.[W]??1)*(o+1)&&++o,{gridRow:`${1+F*o}/${F+1+F*o}`,marginBottom:o+1<e?I(D?.horizontalGutter,W):void 0}))},[E?.sameHeight,E?.slidesToShow,F,oP?.length,W,D?.horizontalGutter]),ob=p(()=>oa||oc||on||!oP||oo&&z,[on,oc,oo,z,oa,oP]);h(()=>{if(!ob)return J.current=setTimeout(()=>{let{builderData:o}=B??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},Q?0:500),()=>{clearTimeout(J.current)}},[B,ob,Q,oP]);let oS=p(()=>({collection:om,products:oP,settings:{loop:E?.loop??{desktop:!1},scrollMode:E?.scrollMode??{desktop:"snap"},slidesToShow:E?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:D?.layout,dot:E?.dot,dotStyle:E?.dotStyle,arrow:E?.arrow,controlOverContent:E?.controlOverContent,sameHeight:E?.sameHeight},styles:{horizontalGutter:D?.horizontalGutter,verticalGutter:D?.verticalGutter,fullWidth:D?.fullWidth,spacing:D?.spacing,width:D?.width,height:D?.height}}),[om,oP,E,D]);if(B?.isPreview&&K)return o(e,{});if(oy)return o(e,{children:T(q,o(O,{builderAttrs:H,collectionHandle:om?.handle,productSrc:X,onClose:()=>U(!1),children:x,relatedTagString:or,assignProductNoTags:ot,noAssignedProduct:!Z}))});let{productListWrapStyle:oj,productListContentStyle:oC,productListWrapAlignStyle:ov}=G(P),{productListWrapClass:oL}=w(P);return t("div",{...H,className:oL,style:oj,children:[!!D?.preloadBgImage&&t(A,{children:[!!D.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage.desktop.image.src,as:"image"}),!!D.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.tablet?.image?.src,as:"image"}),!!D.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.mobile?.image?.src,as:"image"})]}),oc||oa?o(f,{}):on?t("div",{children:["Error: ",on?.message]}):ok?o("div",{children:"Products not found"}):o(n,{...oS,children:o("div",{className:"gp-flex gp-w-full",style:ov,children:t("div",{style:oC,children:[K&&o(k,{}),o(e,{children:T(D?.layout==="grid",o(L,{...P,productSortedById:oP,generateGridRowArray:oI}),o(S,{...P,productSortedById:oP}))})]})})}),a(x,!0)]})};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import{useProductSetting as d}from"./hook/useProductSetting.js";import{
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import{useProductSetting as d}from"./hook/useProductSetting.js";import{getData as s}from"./common/helpers.js";import"../../../common/const.js";import"react";import c from"../../../common/components/Loading.js";import{If as n}from"@gem-sdk/system";import l from"../../../grid/components/row/Row.js";import p from"next/dynamic";let u=p(()=>import("../ProductNotFound.js"),{loading:c}),a=p=>{let{builderProps:a,children:h,setting:f,style:g,builderAttrs:j}=p,{isAuto:P}=f??{},{isLoading:b,isProductPage:y,isProductNotFound:k,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:D}=d(p),{rowSetting:S,rowStyles:E}=s(p);return y&&P?r(o,{children:e(h)?r(m,{}):h}):r(o,{children:n(!k,r(o,{children:b?r(c,{}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(l,{builderProps:a,builderAttrs:j,style:g,styles:E,setting:S,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(h)?r(m,{}):h})}):null})}),r(o,{children:n(x,r(u,{builderAttrs:j,productSrc:"PickProduct",onClose:()=>D(!1),children:h}))}))})};export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import
|
|
1
|
+
import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import d from"./useProductQuery.js";import{useState as a,useMemo as i}from"react";let o=o=>{let{setting:c}=o,{productSetting:u,quantity:s,readOnly:P,isSyncProduct:m}=c??{},l=t(),n=r(t=>t.dynamicProduct),{isEditMode:p}=e(),S=u?.productId??"latest",y=u?.productStatus=="dynamic"?{...u,...n}:u,f=y?.initialVariantId,g=y?.initialVariantBaseId,{productData:{data:h,isLoading:I,error:k}}=d({id:S}),[D,V]=a(!0),$=(k||!h&&!I)&&p,j=i(()=>({product:h,initialVariantId:f,initialVariantBaseId:g,quantity:s,readOnly:P,isSyncProduct:m,key:`uid-${h?.id}-${f??""}`,hasPreSelected:u?.hasPreSelected}),[g,f,m,h,u?.hasPreSelected,s,P]);return{forceProductSetting:y,isProductPage:"PRODUCT"===l,isProductNotFound:$,showProductNotFound:D,isLoading:I,product:h,errorLoadProduct:k,isEditor:p,productProviderData:j,setShowProductNotFound:V}};export{o as useProductSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productFeatureImageStyle as l}from"./ProductFeatureImage.js";import{productGalleryImageSetting as a,productGalleryImageStyle as i}from"./ProductGalleryImage.js";let o=[{id:"setting",controls:[{id:"displayByVariant",label:"Option Label",type:"toggle",default:!1},{id:"variantSelect",type:"variant:listing"},{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:
|
|
1
|
+
import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productFeatureImageStyle as l}from"./ProductFeatureImage.js";import{productGalleryImageSetting as a,productGalleryImageStyle as i}from"./ProductGalleryImage.js";let o=[{id:"setting",controls:[{id:"displayByVariant",label:"Option Label",type:"toggle",default:!1},{id:"variantSelect",type:"variant:listing"},{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 50 50",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",enableItemOpacity:!0,options:[{label:"Featured top",value:"bottom-center",type:"p-image-layout",iconName:"gp-product-image-layout-bottom"},{label:"Featured right",value:"left",type:"p-image-layout",iconName:"gp-product-image-layout-left"},{label:"Featured left",value:"right",type:"p-image-layout",iconName:"gp-product-image-layout-right"},{label:"Image list inside bottom",value:"inside-bottom",type:"p-image-layout",iconName:"gp-product-image-layout-bottom-inside"},{label:"Image list inside left",value:"inside-left",type:"p-image-layout",iconName:"gp-product-image-layout-left-inside"},{label:"Image list inside right",value:"inside-right",type:"p-image-layout",iconName:"gp-product-image-layout-right-inside"},{label:"Featured only",value:"only-feature",type:"p-image-layout",iconName:"gp-product-image-layout-featured-only"},{label:"Image list 1 col",value:"one-col",type:"p-image-layout",iconName:"gp-product-image-layout-one-col",noPadding:"y"},{label:"Image list 2 col",value:"two-col",type:"p-image-layout",iconName:"gp-product-image-layout-two-col"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"8px"}}},{id:"ratioLayout",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[2,10],devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[10,2],devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:l},{id:"galleryStyles",type:"group",label:"Gallery",controls:i},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:{desktop:{default:"flex-start"}}}]}];export{o as ProductImageSettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ImageListNavigation as i}from"./ui/ImageListNavigation.js";import{FeatureNavigation as o}from"./ui/FeatureNavigation.js";import{FeatureDots as t}from"./ui/FeatureDots.js";let e='((type == "slider" || position == "left" || position == "right") && position !== "one-col" && position != "two-col")',n='(["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position))',l=[{label:"Layout",controls:[{layout:"vertical",setting:{id:"position"},options:{isComboLayout:!0},controls:[{label:"Ratio",type:"control",setting:{id:"ratioLayout"},layout:"vertical",conditionDisplay:'position == "left"'},{label:"Ratio",type:"control",setting:{id:"ratioLayoutRight"},layout:"vertical",conditionDisplay:'position == "right"'}]}]},{label:"Featured image",conditionDisplay:n,controls:[{setting:{id:"ftShape"},hiddenOnMobile:!0,layout:"vertical",controlChangeTrigger:{settings:[{condition:"ftShape.shape === 'original'",source:["ftShape"],action:{controlId:"ftLayout",newValue:"contain",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{conditionDisplay:"ftShape.shape !== 'original'",label:"Image scale",setting:{id:"ftLayout"}},{...t,hiddenOnMobile:!0,conditionDisplay:`${n} && position === "only-feature"`},{...o,hiddenOnMobile:!0,conditionDisplay:`${n}`}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"ftCorner"}},{type:"combo",label:"Hover action",conditionDisplay:n,hiddenOnMobile:!0,iconName:"gp-trigger-action-hover",getValueFromSettingID:"hoverEffect",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"hoverEffect"}},{label:"Zoom type",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoomType"}},{label:"Zoom value",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoom"}},{label:"Other image",conditionDisplay:'hoverEffect == "other"',setting:{id:"otherImage"}}]},{type:"combo",label:"Click action",hiddenOnMobile:!0,iconName:"gp-trigger-action-click",conditionDisplay:n,getValueFromSettingID:"ftClickOpenLightBox",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"popup",controls:[{label:"After click",setting:{id:"ftClickOpenLightBox"}},{label:"Open new tab",setting:{id:"ftClickOpenNewTab"},conditionDisplay:'ftClickOpenLightBox === "product-link"'}]},{type:"control",label:"Slide speed",setting:{id:"ftAnimationSpeed"}},{type:"control",label:"Animation",setting:{id:"ftAnimationMode"}},{label:"Drag / swipe",setting:{id:"ftDragToScroll"}},{label:"Infinity loop",setting:{id:"ftLoop"}}]}},{label:"Image list",conditionDisplay:'(position !== "only-feature")',controls:[{label:"Display",hiddenOnMobile:!0,conditionDisplay:'position === "bottom-center" || position === "bottom-left" || position === "inside-bottom"',setting:{id:"type"}},{setting:{id:"shape"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["left", "right"].includes(position)'},{setting:{id:"shapeForBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["bottom-left", "bottom-center"].includes(position)'},{setting:{id:"shapeForInsideBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-bottom"].includes(position)'},{setting:{id:"shapeForInside"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-left", "inside-right"].includes(position)'},{setting:{id:"shapeForFtOnly"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "only-feature"'},{setting:{id:"shapeFor2Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "two-col"'},{setting:{id:"shapeFor1Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "one-col"'},{label:"Image gap",setting:{id:"itemSpacing"}},{conditionDisplay:"(position == 'one-col' && shapeFor1Col.shape !== 'original') || (position == 'two-col' && shapeFor2Col.shape !== 'original') || (position == 'only-feature' && shapeForFtOnly.shape !== 'original') || ([\"inside-left\", \"inside-right\"].includes(position) && shapeForInside.shape !== 'original') || ([\"inside-bottom\"].includes(position) && shapeForInsideBottom.shape !== 'original') || ([\"bottom-left\", \"bottom-center\"].includes(position) && shapeForBottom.shape !== 'original') || ([\"left\", \"right\"].includes(position) && shape.shape !== 'original')",label:"Image scale",setting:{id:"layout"}},{...i,hiddenOnMobile:!0,conditionDisplay:e}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"corner"}},{label:"Active border",hiddenOnMobile:!0,conditionDisplay:'!["one-col", "two-col"].includes(position)',setting:{id:"borderActive"}},{type:"combo",label:"Hover action",conditionDisplay:'(position == "one-col" || position == "two-col")',hiddenOnMobile:!0,iconName:"gp-trigger-action-hover",getValueFromSettingID:"galleryHoverEffect",defaultValueWhenClear:"none",compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"galleryHoverEffect"},conditionDisplay:'galleryHoverEffect == "none"'},{label:"Zoom type",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoomType"}},{label:"Zoom value",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoom"}},{label:"Other image",conditionDisplay:'galleryHoverEffect == "other"',setting:{id:"otherImage"}}]},{label:"Click action",setting:{id:"clickOpenLightBox"}},{conditionDisplay:e,label:"Drag / swipe",setting:{id:"dragToScroll"}},{conditionDisplay:e,label:"Infinity loop",setting:{id:"loop"}}]}},{label:"Item spacing",hiddenOnMobile:!0,conditionDisplay:'["bottom-center", "left", "right", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Gap",setting:{id:"spacing"}}]},{label:"Display condition",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Default item",setting:{id:"preDisplay"}}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',controls:[{label:"Preload",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',setting:{id:"preload"}},{label:"Quality",setting:{id:"qualityType"}},{layout:"horizontal",label:" ",conditionDisplay:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{hiddenOnMobile:!0,controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary"}}]}];export{l as SettingUIV2};
|
|
1
|
+
import{ImageListNavigation as i}from"./ui/ImageListNavigation.js";import{FeatureNavigation as o}from"./ui/FeatureNavigation.js";import{FeatureDots as t}from"./ui/FeatureDots.js";let e='((type == "slider" || position == "left" || position == "right") && position !== "one-col" && position != "two-col")',n='(["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position))',l=[{label:"Layout",controls:[{layout:"vertical",setting:{id:"position"},options:{isComboLayout:!0},controls:[{label:"Ratio",type:"control",setting:{id:"ratioLayout"},layout:"vertical",conditionDisplay:'position == "left"'},{label:"Ratio",type:"control",setting:{id:"ratioLayoutRight"},layout:"vertical",conditionDisplay:'position == "right"'}]}]},{label:"Featured image",conditionDisplay:n,controls:[{setting:{id:"ftShape"},hiddenOnMobile:!0,layout:"vertical",controlChangeTrigger:{settings:[{condition:"ftShape.shape === 'original'",source:["ftShape"],action:{controlId:"ftLayout",newValue:"contain",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{conditionDisplay:"ftShape.shape !== 'original'",label:"Image scale",setting:{id:"ftLayout"}},{...t,hiddenOnMobile:!0,conditionDisplay:`${n} && position === "only-feature"`},{...o,hiddenOnMobile:!0,conditionDisplay:`${n}`}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"ftCorner"}},{type:"combo",label:"Hover action",conditionDisplay:n,hiddenOnMobile:!0,iconName:"gp-trigger-action-hover",getValueFromSettingID:"hoverEffect",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"hoverEffect"}},{label:"Zoom type",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoomType"}},{label:"Zoom value",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoom"}},{label:"Other image",conditionDisplay:'hoverEffect == "other"',setting:{id:"otherImage"}}]},{type:"combo",label:"Click action",hiddenOnMobile:!0,iconName:"gp-trigger-action-click",conditionDisplay:n,getValueFromSettingID:"ftClickOpenLightBox",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"popup",controls:[{label:"After click",setting:{id:"ftClickOpenLightBox"}},{label:"Open new tab",setting:{id:"ftClickOpenNewTab"},conditionDisplay:'ftClickOpenLightBox === "product-link"'}]},{type:"control",label:"Slide speed",setting:{id:"ftAnimationSpeed"}},{type:"control",label:"Animation",setting:{id:"ftAnimationMode"}},{label:"Drag / swipe",setting:{id:"ftDragToScroll"}},{label:"Infinity loop",setting:{id:"ftLoop"}}]}},{label:"Image list",conditionDisplay:'(position !== "only-feature")',controls:[{label:"Display",hiddenOnMobile:!0,conditionDisplay:'position === "bottom-center" || position === "bottom-left" || position === "inside-bottom"',setting:{id:"type"}},{setting:{id:"shape"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["left", "right"].includes(position)'},{setting:{id:"shapeForBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["bottom-left", "bottom-center"].includes(position)'},{setting:{id:"shapeForInsideBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-bottom"].includes(position)'},{setting:{id:"shapeForInside"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-left", "inside-right"].includes(position)'},{setting:{id:"shapeForFtOnly"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "only-feature"'},{setting:{id:"shapeFor2Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "two-col"'},{setting:{id:"shapeFor1Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "one-col"'},{label:"Image gap",setting:{id:"itemSpacing"}},{conditionDisplay:"(position == 'one-col' && shapeFor1Col.shape !== 'original') || (position == 'two-col' && shapeFor2Col.shape !== 'original') || (position == 'only-feature' && shapeForFtOnly.shape !== 'original') || ([\"inside-left\", \"inside-right\"].includes(position) && shapeForInside.shape !== 'original') || ([\"inside-bottom\"].includes(position) && shapeForInsideBottom.shape !== 'original') || ([\"bottom-left\", \"bottom-center\"].includes(position) && shapeForBottom.shape !== 'original') || ([\"left\", \"right\"].includes(position) && shape.shape !== 'original')",label:"Image scale",setting:{id:"layout"}},{...i,hiddenOnMobile:!0,conditionDisplay:e}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"corner"}},{label:"Active border",hiddenOnMobile:!0,conditionDisplay:'!["one-col", "two-col"].includes(position)',setting:{id:"borderActive"}},{type:"combo",label:"Hover action",conditionDisplay:'(position == "one-col" || position == "two-col")',hiddenOnMobile:!0,iconName:"gp-trigger-action-hover",getValueFromSettingID:"galleryHoverEffect",defaultValueWhenClear:"none",compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"galleryHoverEffect"},conditionDisplay:'galleryHoverEffect == "none"'},{label:"Zoom type",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoomType"}},{label:"Zoom value",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoom"}},{label:"Other image",conditionDisplay:'galleryHoverEffect == "other"',setting:{id:"otherImage"}}]},{label:"Click action",setting:{id:"clickOpenLightBox"}},{conditionDisplay:e,label:"Drag / swipe",setting:{id:"dragToScroll"}},{conditionDisplay:e,label:"Infinity loop",setting:{id:"loop"}}]}},{label:"Item spacing",hiddenOnMobile:!0,conditionDisplay:'["bottom-center", "left", "right", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Gap",setting:{id:"spacing"}}]},{label:"Display condition",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Default item",setting:{id:"preDisplay"}}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',controls:[{label:"Preload",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',setting:{id:"preload"}},{label:"Quality",setting:{id:"qualityType"},conditionDisplay:"preload === false"},{layout:"horizontal",label:" ",conditionDisplay:'qualityType == "custom" && preload === false',setting:{id:"qualityPercent"}}]},{hiddenOnMobile:!0,controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary"}}]}];export{l as SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productFeatureImageStyle as l}from"./ProductFeatureImage.js";import{productGalleryImageSetting as a,productGalleryImageStyle as i}from"./ProductGalleryImage.js";let o=[{id:"setting",controls:[{id:"filterByVariant",type:"select",label:"Filter images by variant",default:"all_images",options:[{label:"All images",value:"all_images"},{label:"Selected variant",value:"selected_variant"}]},{id:"displayByVariant",label:"Option Label",type:"toggle",default:!1},{id:"variantSelect",type:"variant:listing"},{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:
|
|
1
|
+
import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productFeatureImageStyle as l}from"./ProductFeatureImage.js";import{productGalleryImageSetting as a,productGalleryImageStyle as i}from"./ProductGalleryImage.js";let o=[{id:"setting",controls:[{id:"filterByVariant",type:"select",label:"Filter images by variant",default:"all_images",options:[{label:"All images",value:"all_images"},{label:"Selected variant",value:"selected_variant"}]},{id:"displayByVariant",label:"Option Label",type:"toggle",default:!1},{id:"variantSelect",type:"variant:listing"},{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 50 50",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",enableItemOpacity:!0,options:[{label:"Featured top",value:"bottom-center",type:"p-image-layout",iconName:"gp-product-image-layout-bottom"},{label:"Featured right",value:"left",type:"p-image-layout",iconName:"gp-product-image-layout-left"},{label:"Featured left",value:"right",type:"p-image-layout",iconName:"gp-product-image-layout-right"},{label:"Image list inside bottom",value:"inside-bottom",type:"p-image-layout",iconName:"gp-product-image-layout-bottom-inside"},{label:"Image list inside left",value:"inside-left",type:"p-image-layout",iconName:"gp-product-image-layout-left-inside"},{label:"Image list inside right",value:"inside-right",type:"p-image-layout",iconName:"gp-product-image-layout-right-inside"},{label:"Featured only",value:"only-feature",type:"p-image-layout",iconName:"gp-product-image-layout-featured-only"},{label:"Image list 1 col",value:"one-col",type:"p-image-layout",iconName:"gp-product-image-layout-one-col",noPadding:"y"},{label:"Image list 2 col",value:"two-col",type:"p-image-layout",iconName:"gp-product-image-layout-two-col"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"8px"}}},{id:"ratioLayout",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[2,10],devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[10,2],devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:l},{id:"galleryStyles",type:"group",label:"Gallery",controls:i},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:{desktop:{default:"flex-start"}}}]}];export{o as ProductImageSettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ImageListNavigation as i}from"./ui/ImageListNavigation.js";import{FeatureNavigation as o}from"./ui/FeatureNavigation.js";import{FeatureDots as t}from"./ui/FeatureDots.js";let e='((type == "slider" || position == "left" || position == "right") && position !== "one-col" && position != "two-col")',n='(["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position))',l=[{label:"Layout",controls:[{layout:"vertical",setting:{id:"position"},options:{isComboLayout:!0},controls:[{label:"Ratio",type:"control",setting:{id:"ratioLayout"},layout:"vertical",conditionDisplay:'position == "left"'},{label:"Ratio",type:"control",setting:{id:"ratioLayoutRight"},layout:"vertical",conditionDisplay:'position == "right"'}]}]},{label:"Featured image",conditionDisplay:n,controls:[{setting:{id:"ftShape"},hiddenOnMobile:!0,layout:"vertical",controlChangeTrigger:{settings:[{condition:"ftShape.shape === 'original'",source:["ftShape"],action:{controlId:"ftLayout",newValue:"contain",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{conditionDisplay:"ftShape.shape !== 'original'",label:"Image scale",setting:{id:"ftLayout"}},{...t,hiddenOnMobile:!0,conditionDisplay:`${n} && position === "only-feature"`},{...o,hiddenOnMobile:!0,conditionDisplay:`${n}`}],moreSettings:{type:"collapse",controls:[{label:"Corner",setting:{id:"ftCorner"},hiddenOnMobile:!0},{type:"combo",label:"Hover action",conditionDisplay:n,iconName:"gp-trigger-action-hover",getValueFromSettingID:"hoverEffect",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"zoom",hiddenOnMobile:!0,controls:[{label:"When hover",setting:{id:"hoverEffect"}},{label:"Zoom type",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoomType"}},{label:"Zoom value",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoom"}},{label:"Other image",conditionDisplay:'hoverEffect == "other"',setting:{id:"otherImage"}}]},{type:"combo",label:"Click action",hiddenOnMobile:!0,iconName:"gp-trigger-action-click",conditionDisplay:n,getValueFromSettingID:"ftClickOpenLightBox",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"popup",controls:[{label:"After click",setting:{id:"ftClickOpenLightBox"}},{label:"Open new tab",setting:{id:"ftClickOpenNewTab"},conditionDisplay:'ftClickOpenLightBox === "product-link"'}]},{type:"control",label:"Slide speed",setting:{id:"ftAnimationSpeed"}},{type:"control",label:"Animation",setting:{id:"ftAnimationMode"}},{label:"Drag / swipe",setting:{id:"ftDragToScroll"}},{label:"Infinity loop",setting:{id:"ftLoop"}}]}},{label:"Image list",conditionDisplay:'(position !== "only-feature")',controls:[{label:"Display",hiddenOnMobile:!0,conditionDisplay:'position === "bottom-center" || position === "bottom-left" || position === "inside-bottom"',setting:{id:"type"}},{setting:{id:"shape"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["left", "right"].includes(position)'},{setting:{id:"shapeForBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["bottom-left", "bottom-center"].includes(position)'},{setting:{id:"shapeForInsideBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-bottom"].includes(position)'},{setting:{id:"shapeForInside"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-left", "inside-right"].includes(position)'},{setting:{id:"shapeForFtOnly"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "only-feature"'},{setting:{id:"shapeFor2Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "two-col"'},{setting:{id:"shapeFor1Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "one-col"'},{label:"Image gap",setting:{id:"itemSpacing"}},{conditionDisplay:"(position == 'one-col' && shapeFor1Col.shape !== 'original') || (position == 'two-col' && shapeFor2Col.shape !== 'original') || (position == 'only-feature' && shapeForFtOnly.shape !== 'original') || ([\"inside-left\", \"inside-right\"].includes(position) && shapeForInside.shape !== 'original') || ([\"inside-bottom\"].includes(position) && shapeForInsideBottom.shape !== 'original') || ([\"bottom-left\", \"bottom-center\"].includes(position) && shapeForBottom.shape !== 'original') || ([\"left\", \"right\"].includes(position) && shape.shape !== 'original')",label:"Image scale",setting:{id:"layout"}},{...i,hiddenOnMobile:!0,conditionDisplay:e}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"corner"}},{label:"Active border",hiddenOnMobile:!0,conditionDisplay:'!["one-col", "two-col"].includes(position)',setting:{id:"borderActive"}},{type:"combo",label:"Hover action",conditionDisplay:'(position == "one-col" || position == "two-col")',iconName:"gp-trigger-action-hover",getValueFromSettingID:"galleryHoverEffect",defaultValueWhenClear:"none",hiddenOnMobile:!0,compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"galleryHoverEffect"},conditionDisplay:'galleryHoverEffect == "none"'},{label:"Zoom type",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoomType"}},{label:"Zoom value",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoom"}},{label:"Other image",conditionDisplay:'galleryHoverEffect == "other"',setting:{id:"otherImage"}}]},{label:"Click action",setting:{id:"clickOpenLightBox"}},{conditionDisplay:e,label:"Drag / swipe",setting:{id:"dragToScroll"}},{conditionDisplay:e,label:"Infinity loop",setting:{id:"loop"}}]}},{label:"Item spacing",hiddenOnMobile:!0,conditionDisplay:'["bottom-center", "left", "right", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Gap",setting:{id:"spacing"}}]},{label:"Display condition",controls:[{conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',label:"Default item",setting:{id:"preDisplay"}},{label:"Image list",setting:{id:"filterByVariant"}}],messageConfig:{type:"info",message:'Image list can display based on the selected variants. <a class="text-white" target="_blank" href="https://gempages.co/display-selected-variant">How to setup</a>'}},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',controls:[{label:"Preload",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',setting:{id:"preload"}},{label:"Quality",setting:{id:"qualityType"}},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{hiddenOnMobile:!0,controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary"}}]}];export{l as SettingUIV2};
|
|
1
|
+
import{ImageListNavigation as i}from"./ui/ImageListNavigation.js";import{FeatureNavigation as o}from"./ui/FeatureNavigation.js";import{FeatureDots as t}from"./ui/FeatureDots.js";let e='((type == "slider" || position == "left" || position == "right") && position !== "one-col" && position != "two-col")',n='(["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position))',l=[{label:"Layout",controls:[{layout:"vertical",setting:{id:"position"},options:{isComboLayout:!0},controls:[{label:"Ratio",type:"control",setting:{id:"ratioLayout"},layout:"vertical",conditionDisplay:'position == "left"'},{label:"Ratio",type:"control",setting:{id:"ratioLayoutRight"},layout:"vertical",conditionDisplay:'position == "right"'}]}]},{label:"Featured image",conditionDisplay:n,controls:[{setting:{id:"ftShape"},hiddenOnMobile:!0,layout:"vertical",controlChangeTrigger:{settings:[{condition:"ftShape.shape === 'original'",source:["ftShape"],action:{controlId:"ftLayout",newValue:"contain",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{conditionDisplay:"ftShape.shape !== 'original'",label:"Image scale",setting:{id:"ftLayout"}},{...t,hiddenOnMobile:!0,conditionDisplay:`${n} && position === "only-feature"`},{...o,hiddenOnMobile:!0,conditionDisplay:`${n}`}],moreSettings:{type:"collapse",controls:[{label:"Corner",setting:{id:"ftCorner"},hiddenOnMobile:!0},{type:"combo",label:"Hover action",conditionDisplay:n,iconName:"gp-trigger-action-hover",getValueFromSettingID:"hoverEffect",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"zoom",hiddenOnMobile:!0,controls:[{label:"When hover",setting:{id:"hoverEffect"}},{label:"Zoom type",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoomType"}},{label:"Zoom value",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoom"}},{label:"Other image",conditionDisplay:'hoverEffect == "other"',setting:{id:"otherImage"}}]},{type:"combo",label:"Click action",hiddenOnMobile:!0,iconName:"gp-trigger-action-click",conditionDisplay:n,getValueFromSettingID:"ftClickOpenLightBox",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"popup",controls:[{label:"After click",setting:{id:"ftClickOpenLightBox"}},{label:"Open new tab",setting:{id:"ftClickOpenNewTab"},conditionDisplay:'ftClickOpenLightBox === "product-link"'}]},{type:"control",label:"Slide speed",setting:{id:"ftAnimationSpeed"}},{type:"control",label:"Animation",setting:{id:"ftAnimationMode"}},{label:"Drag / swipe",setting:{id:"ftDragToScroll"}},{label:"Infinity loop",setting:{id:"ftLoop"}}]}},{label:"Image list",conditionDisplay:'(position !== "only-feature")',controls:[{label:"Display",hiddenOnMobile:!0,conditionDisplay:'position === "bottom-center" || position === "bottom-left" || position === "inside-bottom"',setting:{id:"type"}},{setting:{id:"shape"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["left", "right"].includes(position)'},{setting:{id:"shapeForBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["bottom-left", "bottom-center"].includes(position)'},{setting:{id:"shapeForInsideBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-bottom"].includes(position)'},{setting:{id:"shapeForInside"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-left", "inside-right"].includes(position)'},{setting:{id:"shapeForFtOnly"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "only-feature"'},{setting:{id:"shapeFor2Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "two-col"'},{setting:{id:"shapeFor1Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "one-col"'},{label:"Image gap",setting:{id:"itemSpacing"}},{conditionDisplay:"(position == 'one-col' && shapeFor1Col.shape !== 'original') || (position == 'two-col' && shapeFor2Col.shape !== 'original') || (position == 'only-feature' && shapeForFtOnly.shape !== 'original') || ([\"inside-left\", \"inside-right\"].includes(position) && shapeForInside.shape !== 'original') || ([\"inside-bottom\"].includes(position) && shapeForInsideBottom.shape !== 'original') || ([\"bottom-left\", \"bottom-center\"].includes(position) && shapeForBottom.shape !== 'original') || ([\"left\", \"right\"].includes(position) && shape.shape !== 'original')",label:"Image scale",setting:{id:"layout"}},{...i,hiddenOnMobile:!0,conditionDisplay:e}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"corner"}},{label:"Active border",hiddenOnMobile:!0,conditionDisplay:'!["one-col", "two-col"].includes(position)',setting:{id:"borderActive"}},{type:"combo",label:"Hover action",conditionDisplay:'(position == "one-col" || position == "two-col")',iconName:"gp-trigger-action-hover",getValueFromSettingID:"galleryHoverEffect",defaultValueWhenClear:"none",hiddenOnMobile:!0,compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"galleryHoverEffect"},conditionDisplay:'galleryHoverEffect == "none"'},{label:"Zoom type",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoomType"}},{label:"Zoom value",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoom"}},{label:"Other image",conditionDisplay:'galleryHoverEffect == "other"',setting:{id:"otherImage"}}]},{label:"Click action",setting:{id:"clickOpenLightBox"}},{conditionDisplay:e,label:"Drag / swipe",setting:{id:"dragToScroll"}},{conditionDisplay:e,label:"Infinity loop",setting:{id:"loop"}}]}},{label:"Item spacing",hiddenOnMobile:!0,conditionDisplay:'["bottom-center", "left", "right", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Gap",setting:{id:"spacing"}}]},{label:"Display condition",controls:[{conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',label:"Default item",setting:{id:"preDisplay"}},{label:"Image list",setting:{id:"filterByVariant"}}],messageConfig:{type:"info",message:'Image list can display based on the selected variants. <a class="text-white" target="_blank" href="https://gempages.co/display-selected-variant">How to setup</a>'}},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',controls:[{label:"Preload",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',setting:{id:"preload"}},{label:"Quality",setting:{id:"qualityType"},conditionDisplay:'preload === false || (preload === true && (position === "one-col" || position === "two-col"))'},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && (preload === false || (preload === true && (position === "one-col" || position === "two-col")))',setting:{id:"qualityPercent"}}]},{hiddenOnMobile:!0,controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary"}}]}];export{l as SettingUIV2};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{getWrapThumbnailClasses as e,getButtonThumbnailClasses as t,getImageThumbnailClasses as o,getVideoYoutubeClasses as i}from"../common/classes.js";import{RenderIf as r,isLocalEnv as s,baseAssetURL as a,template as d}from"@gem-sdk/core";import{createAttr as l,createClass as n,createStyle as m,If as c}from"@gem-sdk/system";import u from"../../image/components/NextImage.liquid.js";import{getPreloadImageStyle as p}from"../common/styles.js";import{getSettingPreloadData as v}from"../../helpers.js";import{getHtml5Attr as y}from"../common/attrs.js";let f=f=>{let $=`gp-video-${f.uid}`,{thumbnail:g,muted:h,autoplay:L,loop:b,controls:E,src:A,style:P,title:w,className:T,lazy:j,poster:k,wrapperStyles:S}=f,
|
|
1
|
+
import{getWrapThumbnailClasses as e,getButtonThumbnailClasses as t,getImageThumbnailClasses as o,getVideoYoutubeClasses as i}from"../common/classes.js";import{RenderIf as r,isLocalEnv as s,baseAssetURL as a,template as d}from"@gem-sdk/core";import{createAttr as l,createClass as n,createStyle as m,If as c}from"@gem-sdk/system";import u from"../../image/components/NextImage.liquid.js";import{getPreloadImageStyle as p}from"../common/styles.js";import{getSettingPreloadData as v}from"../../helpers.js";import{getHtml5Attr as y}from"../common/attrs.js";let f=f=>{let $=`gp-video-${f.uid}`,{thumbnail:g,muted:h,autoplay:L,loop:b,controls:E,src:A,style:P,title:w,className:T,lazy:j,poster:k,wrapperStyles:S,pageContext:V}=f,x=L&&h&&!!g,C=!j&&f.isVideoComponent,M=!g||L&&h,I=C?A:void 0,N=l({...y({videoId:$,title:w,autoplay:L,preloadThumbnail:x,offLazyLoad:C,src:A,thumbnail:g})}),B=n({...e(M)}),D=m({...p()}),G=n({...t()}),O=n({...o()}),_=n({...i(T,C)});return d`
|
|
2
2
|
<gp-lite-html5-embed is-check-loaded="${f.isCheckLoaded??!1}" style="${S}">
|
|
3
|
-
${
|
|
3
|
+
${x?d`${u({src:g,alt:w,priority:k?.preload,pageContext:V,style:D})}
|
|
4
4
|
${c(L,`<script>
|
|
5
5
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
6
6
|
const eventList = ["keydown", "mousemove", "wheel", "touchmove", "touchstart", "touchend"];
|
|
@@ -36,24 +36,24 @@ import{getWrapThumbnailClasses as e,getButtonThumbnailClasses as t,getImageThumb
|
|
|
36
36
|
</script>`)}
|
|
37
37
|
`:""}
|
|
38
38
|
<video
|
|
39
|
-
${{...
|
|
39
|
+
${{...N}}
|
|
40
40
|
style="${P}"
|
|
41
|
-
class="${
|
|
41
|
+
class="${_}"
|
|
42
42
|
${E?"controls":void 0}
|
|
43
43
|
${b?"loop":void 0}
|
|
44
44
|
${h?"muted":void 0}
|
|
45
45
|
${L?"autoplay":void 0}
|
|
46
46
|
playsinline
|
|
47
|
-
${
|
|
47
|
+
${I?`src="${I}"`:""}
|
|
48
48
|
></video>
|
|
49
|
-
${c(!
|
|
49
|
+
${c(!M,d`
|
|
50
50
|
<div
|
|
51
51
|
role="presentation"
|
|
52
52
|
style="${P}"
|
|
53
|
-
class="${
|
|
53
|
+
class="${B}"
|
|
54
54
|
>
|
|
55
|
-
${u({id:"video-thumbnail",src:g??"",alt:k?.altText,title:k?.imageTitle,className:
|
|
56
|
-
<button type="button" class="${
|
|
55
|
+
${u({id:"video-thumbnail",src:g??"",alt:k?.altText,title:k?.imageTitle,className:O,isDisableAspectStyle:!0,priority:k?.preload,pageContext:V})}
|
|
56
|
+
<button type="button" class="${G}" aria-label="Play">
|
|
57
57
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
58
58
|
<path
|
|
59
59
|
fill="currentColor"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{getArticleVimeoClasses as e,getImageVimeoClasses as t,getButtonVimeoClasses as s,getIframeVimeoClasses as i}from"../common/classes.js";import{createStateOrContext as r,createStyle as l,createClass as a,If as m}from"@gem-sdk/system";import{getIframeVimeoStyle as o,getArticleVimeoStyle as p}from"../common/styles.js";import{template as c,RenderIf as d,isLocalEnv as n,baseAssetURL as f}from"@gem-sdk/core";import g from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as y}from"../../helpers.js";import{getVimeoParams as $}from"../common/helpers.js";let h=h=>{let{title:u,id:b,lazy:v,aspectRatio:j,autoplay:S,muted:w,thumbnailLink:x,poster:E,translatedVideoUrl:k}=h,{iframeSrc:
|
|
1
|
+
import{getArticleVimeoClasses as e,getImageVimeoClasses as t,getButtonVimeoClasses as s,getIframeVimeoClasses as i}from"../common/classes.js";import{createStateOrContext as r,createStyle as l,createClass as a,If as m}from"@gem-sdk/system";import{getIframeVimeoStyle as o,getArticleVimeoStyle as p}from"../common/styles.js";import{template as c,RenderIf as d,isLocalEnv as n,baseAssetURL as f}from"@gem-sdk/core";import g from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as y}from"../../helpers.js";import{getVimeoParams as $}from"../common/helpers.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}=$(h),I=!v,T=h.thumbnail,V=r({id:b,thumbnail:x,lazy:v,iframeSrc:A,title:u,autoplay:S,muted:w,style:h?.vimeoStyleIframe||"",translatedVideoUrl:k}),C=l({...o(j)}),G=l({...p(j,"")}),L=a({...e(T,j)}),M=a({...t(I)}),O=a({...s(I)}),P=a({...i()});return c`
|
|
2
2
|
<gp-lite-vimeo-embed>
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(V)}</script>
|
|
4
4
|
<article
|
|
5
5
|
aria-hidden
|
|
6
|
-
class="${
|
|
6
|
+
class="${L}"
|
|
7
7
|
data-title="${u}"
|
|
8
|
-
style="${
|
|
8
|
+
style="${G}"
|
|
9
9
|
>
|
|
10
|
-
${g({src:
|
|
11
|
-
${m(!
|
|
12
|
-
<button type="button" class="${
|
|
10
|
+
${g({src:T,alt:E?.altText,title:E?.imageTitle,className:M,isDisableAspectStyle:!0,pageContext:N,priority:E?.preload,height:E?.height,width:E?.width})}
|
|
11
|
+
${m(!I,c`
|
|
12
|
+
<button type="button" class="${O}" aria-label="Play">
|
|
13
13
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
14
14
|
<path
|
|
15
15
|
fill="currentColor"
|
|
@@ -17,15 +17,15 @@ import{getArticleVimeoClasses as e,getImageVimeoClasses as t,getButtonVimeoClass
|
|
|
17
17
|
/>
|
|
18
18
|
</svg>
|
|
19
19
|
</button>`)}
|
|
20
|
-
${m(
|
|
20
|
+
${m(I,c`
|
|
21
21
|
<iframe
|
|
22
|
-
style="${
|
|
22
|
+
style="${C}"
|
|
23
23
|
title="${u}"
|
|
24
24
|
frameborder="0"
|
|
25
25
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
26
26
|
allowfullscreen
|
|
27
|
-
src="${
|
|
28
|
-
class="${
|
|
27
|
+
src="${A}"
|
|
28
|
+
class="${P}"
|
|
29
29
|
></iframe>`)}
|
|
30
30
|
</article>
|
|
31
31
|
</gp-lite-vimeo-embed>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{getButtonYoutubeClasses as e,getImageYoutubeClasses as t,getArticleYoutubeClasses as s,getIframeYoutubeClasses as r,getYoutubeContentClasses as i}from"../common/classes.js";import{createStateOrContext as a,createClass as l,createStyle as o,If as p}from"@gem-sdk/system";import{getIframeYoutubeStyle as m,getArticleYoutubeStyle as c}from"../common/styles.js";import{RenderIf as d,isLocalEnv as n,baseAssetURL as u,template as
|
|
1
|
+
import{getButtonYoutubeClasses as e,getImageYoutubeClasses as t,getArticleYoutubeClasses as s,getIframeYoutubeClasses as r,getYoutubeContentClasses as i}from"../common/classes.js";import{createStateOrContext as a,createClass as l,createStyle as o,If as p}from"@gem-sdk/system";import{getIframeYoutubeStyle as m,getArticleYoutubeStyle as c}from"../common/styles.js";import{RenderIf as d,isLocalEnv as n,baseAssetURL as u,template as y}from"@gem-sdk/core";import f from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as $}from"../../helpers.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=a({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=l({...e(H)}),G=l({...t()}),I=l({...s(T||!1,S)}),L=l({...r(v)}),O=o({...m(h)}),P=o({...c(h,k)}),_=l({...i()});return y`
|
|
2
2
|
<gp-lite-youtube-embed>
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(A)}</script>
|
|
4
4
|
<article
|
|
5
5
|
aria-hidden
|
|
6
|
-
class="${
|
|
6
|
+
class="${I}"
|
|
7
7
|
data-title="${j}"
|
|
8
8
|
style="${P}"
|
|
9
9
|
>
|
|
10
|
-
${
|
|
11
|
-
<button type="button" aria-label="Play" class="${
|
|
10
|
+
${f({id:N,src:k,alt:w?.altText,title:w?.imageTitle,priority:w?.preload,pageContext:E,className:G,isDisableAspectStyle:!0,isNotLazyload:w?.preload})}
|
|
11
|
+
<button type="button" aria-label="Play" class="${M}">
|
|
12
12
|
<svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%">
|
|
13
13
|
<path
|
|
14
14
|
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"
|
|
@@ -17,18 +17,18 @@ import{getButtonYoutubeClasses as e,getImageYoutubeClasses as t,getArticleYoutub
|
|
|
17
17
|
<path d="M 45,24 27,14 27,34" fill="#fff"></path>
|
|
18
18
|
</svg>
|
|
19
19
|
</button>
|
|
20
|
-
${p(
|
|
20
|
+
${p(H,(()=>{let e=y`
|
|
21
21
|
<iframe
|
|
22
22
|
id="player-wrapper-${b.uid}"
|
|
23
|
-
class="${
|
|
23
|
+
class="${L}"
|
|
24
24
|
style="${O}"
|
|
25
25
|
title="${j}"
|
|
26
26
|
frameborder="0"
|
|
27
27
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
28
28
|
allowfullscreen
|
|
29
|
-
src="${
|
|
29
|
+
src="${x}"
|
|
30
30
|
></iframe>
|
|
31
|
-
`;return b.isHeroBanner?
|
|
31
|
+
`;return b.isHeroBanner?y`
|
|
32
32
|
<div class="${_}">${e}</div>
|
|
33
33
|
`:e})())}
|
|
34
34
|
</article>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{getSettingTranslatedVideoAndThumbnail as t,getAspectRatioSettings as e,getVimeoVideoId as o,vimeoVideoRegex as i,getYoutubeVideoId as s,youtubeVideoRegex as l,parseTimeVideo as m,fallbackImageVideoUrl as a}from"../common/helpers.js";import{template as r,hasTranslatedLiquid as d}from"@gem-sdk/core";import{getStyle as u,getYoutubeStyle as n,getVimeoStyle as c,getHtml5Style as p,getFallBackImageStyle as f}from"../common/styles.js";import{getFallbackImageClasses as y,getClasses as b}from"../common/classes.js";import{createAttr as j,createStyle as h,createClass as k}from"@gem-sdk/system";import V from"../../image/components/NextImage.liquid.js";import{getImageSrc as $}from"../../image/common/helpers.js";import v from"./LiteYouTubeEmbed.liquid.js";import g from"./LiteVimeoEmbed.liquid.js";import L from"./HTML5Embed.liquid.js";import{getAttr as N}from"../common/attrs.js";let q=({className:q,setting:C,style:x,builderAttrs:z,builderProps:E,advanced:F,pageContext:I})=>{let R=t({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=$(S),{cssClass:Q}=F??{},W=e(R?.ratioOptions,R?.aspectRatio),X=j({...N({uid:E?.uid||""})}),Z=h({...u(R,x)}),_=h({...n(W)}),tt=h({...c(W)}),te=h({...p(W)}),to=h({...f(C?.aspectRatio)}),ti=k({...y()}),ts=k({...b({className:q,builderProps:E,isInstantLP:!1,advancedCssClass:Q})});return r`
|
|
2
2
|
<div
|
|
3
3
|
${{...z}} ${{...X}} class="${ts}" style="${Z}">
|
|
4
|
-
${(()=>{switch(D){case"youtube":{let t=s(w),e=d(G);if((!l.test(w)||!t)&&!e)return V({src:a,alt:"Fallback video",className:ti,style:to});let o="";return M&&(o+=`&loop=1&playlist=${t}`),Y&&(o+=`&start=${m(Y)}`),A&&(o+=`&end=${m(A)}`),v({uid:E?.uid,id:t??"",translatedVideoUrl:e?G:"",autoplay:H,title:"Video",controls:O,params:o,adNetwork:!1,noCookie:!0,muted:!P,thumbnail:K,lazy:B??!0,poster:S,style:_})}case"vimeo":{let t=o(T),e=d(J);if((!i.test(T)||!t)&&!e)return V({src:a,alt:"Fallback video",className:ti,style:to});return g({muted:!P,loop:M,controls:O,thumbnail:K,thumbnailLink:S?.src,autoplay:H,lazy:B??!0,id:t??"",translatedVideoUrl:e?J:"",title:"Video",aspectRatio:W,poster:S,vimeoStyleIframe:tt})}case"html5":if(!U)return V({src:a,alt:"Fallback video",className:ti,style:to});return L({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=s(w),e=d(G);if((!l.test(w)||!t)&&!e)return V({src:a,alt:"Fallback video",className:ti,style:to});let o="";return M&&(o+=`&loop=1&playlist=${t}`),Y&&(o+=`&start=${m(Y)}`),A&&(o+=`&end=${m(A)}`),v({uid:E?.uid,id:t??"",translatedVideoUrl:e?G:"",autoplay:H,title:"Video",controls:O,params:o,adNetwork:!1,noCookie:!0,muted:!P,thumbnail:K,lazy:B??!0,poster:S,style:_,pageContext:I})}case"vimeo":{let t=o(T),e=d(J);if((!i.test(T)||!t)&&!e)return V({src:a,alt:"Fallback video",className:ti,style:to});return g({muted:!P,loop:M,controls:O,thumbnail:K,thumbnailLink:S?.src,autoplay:H,lazy:B??!0,id:t??"",translatedVideoUrl:e?J:"",title:"Video",aspectRatio:W,poster:S,vimeoStyleIframe:tt,pageContext:I})}case"html5":if(!U)return V({src:a,alt:"Fallback video",className:ti,style:to});return L({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};
|