@gem-sdk/components 23.1.3 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/article/components/ArticleImage.js +1 -1
- package/dist/cjs/article/components/ArticleImage.liquid.js +6 -6
- package/dist/cjs/article/index.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/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/collection/index.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -1
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/header/index.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/image/common/adaptiveSources.js +1 -0
- 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/common/liquidSrcset.js +1 -0
- package/dist/cjs/image/common/listContext.js +1 -0
- package/dist/cjs/image/common/listImageContext.js +1 -0
- package/dist/cjs/image/common/sizes.js +1 -0
- package/dist/cjs/image/common/srcset.js +1 -0
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
- package/dist/cjs/image/components/Image.js +1 -1
- 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 +4 -5
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image/index.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/common/attrs.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.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/index.js +1 -1
- 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/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.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/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.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.js +1 -1
- 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-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.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.js +1 -1
- 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-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +9 -7
- package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/cjs/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/index.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.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.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/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +7 -7
- package/dist/esm/article/index.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/cart/components/CartList.js +1 -1
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/collection/index.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -1
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/header/index.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/image/common/adaptiveSources.js +1 -0
- 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/common/liquidSrcset.js +1 -0
- package/dist/esm/image/common/listContext.js +1 -0
- package/dist/esm/image/common/listImageContext.js +1 -0
- package/dist/esm/image/common/sizes.js +1 -0
- package/dist/esm/image/common/srcset.js +1 -0
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
- package/dist/esm/image/components/Image.js +1 -1
- 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 +5 -6
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image/index.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/common/attrs.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.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/index.js +1 -1
- 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/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-images/ProductImagesLightBox.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/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.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.js +1 -1
- 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-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.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.js +1 -1
- 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-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/esm/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +12 -10
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/index.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.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.js +1 -1
- 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 +20 -5
- package/package.json +10 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as m,isEmptyChildren as e}from"@gem-sdk/core";import s from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as t}from"../../../image/common/listImageContext.js";import{getListImageHints as i}from"./common/imagePriorityHints.js";import{LIST_PRELOAD_ROWS as l}from"./common/imagePriority.js";import n from"../../../carousel/components/item/CarouselItem.js";import a from"../../../carousel/components/root/Carousel.js";import{getClass as c}from"./common/classes.js";import{getData as d}from"./common/helpers.js";import{getStyle as p}from"./common/styles.js";import{getAttr as u}from"./common/attrs.js";let f=f=>{let{children:j,builderProps:h,productSortedById:g,advanced:y,setting:C}=f,P=r(),{carouselConfigSetting:b,carouselConfigStyle:v}=d(f),{productListAttr:x,getAttrProductItemEditor:I}=u(f),{carouselItemStyle:w}=p(f),{carouselClass:D,productItemClass:L}=c(f);return o(a,{advanced:y,builderProps:{uid:h?.uid},rootAttrs:{...x},rootClass:D,setting:b,styles:v,children:g?.map((r,a)=>o(n,{style:w,children:o(m,{product:r,readOnly:!0,children:o(t.Provider,{value:i({slidesToShow:C?.slidesToShow,rows:l.CAROUSEL,index:a+1}),children:o("div",{..."edit"===P?I(r?.baseID):{},className:L,children:e(j)?o(s,{}):j})})})},r?.baseID))})};export{f as default};
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import o from"../../../carousel/components/item/CarouselItem.liquid.js";import
|
|
2
|
-
${
|
|
1
|
+
import{getListImagePriorityLiquid as o,LIST_PRELOAD_ROWS as t}from"./common/imagePriority.js";import r from"../../../carousel/components/item/CarouselItem.liquid.js";import e from"../../../carousel/components/root/Carousel.liquid.js";import i from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as m}from"@gem-sdk/core";let n=n=>{let{builderProps:c,advanced:a,productSrc:p,productListId:f}=n,{carouselConfigSetting:$,carouselConfigStyle:g}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:h}=d(n),j=o({slidesToShow:n.setting?.slidesToShow,rows:t.CAROUSEL});return m`
|
|
2
|
+
${e({advanced:a,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:h,setting:$,styles:g,children:`
|
|
3
3
|
{%- assign count = 0 -%}
|
|
4
4
|
{%- for product in products limit: limit -%}
|
|
5
5
|
{%- if product.id != empty -%}
|
|
6
6
|
{%- assign count = count | plus: 1 -%}
|
|
7
|
+
${j.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
9
|
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
-
${
|
|
10
|
-
${
|
|
10
|
+
${r({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:g,background:$?.background,children:`
|
|
11
|
+
${i({...n})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
${j.reset}
|
|
16
|
+
{%- if count == 0 and ${f.length} == 0 -%}
|
|
17
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
18
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
|
-
<div>${
|
|
20
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
19
21
|
{%- endif -%}
|
|
20
22
|
{%- endif -%}
|
|
21
23
|
`})}
|
|
22
|
-
`};export{
|
|
24
|
+
`};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Children as r,isValidElement as m,createElement as e}from"react";import{useEditorMode as i,ProductProvider as t,isEmptyChildren as s}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as a}from"../../../image/common/listImageContext.js";import{getListImageHints as d}from"./common/imagePriorityHints.js";import{LIST_PRELOAD_ROWS as n}from"./common/imagePriority.js";import{getClass as c}from"./common/classes.js";import{getStyle as p}from"./common/styles.js";import{getAttr as f}from"./common/attrs.js";let g=g=>{let{children:h,productSortedById:y,generateGridRowArray:u,setting:j}=g,v=i(),{gridLayoutStyle:b}=p(g),{gridLayoutClass:w,productItemClass:x}=c(g),{productListAttr:D,getAttrProductItemEditor:I}=f(g);return o("div",{...D,style:b,className:w,children:y?.length?y?.map((i,c)=>o(t,{product:i,readOnly:!0,children:o(a.Provider,{value:d({slidesToShow:j?.slidesToShow,rows:n.GRID,index:c+1}),children:o("div",{..."edit"===v?I(i?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?u?.[c]?.gridRow:void 0,"--mbchild":u?.[c]?.marginBottom},children:s(h)?o(l,{}):r.map(h,o=>m(o)?e(o.type,{...o.props,key:o.key}):null)})})},i?.baseID)):null})};export{g as default};
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as
|
|
1
|
+
import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"./common/imagePriority.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as r,template as e}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as m}from"./common/attrs.js";let n=n=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=n,{gridLayoutStyle:g}=a(n),{gridLayoutClass:$}=d(n),{productListAttr:h}=m(n),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>e`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
|
+
${v.item}
|
|
6
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
+
${o({...n})}
|
|
9
10
|
{%- endif -%}
|
|
10
11
|
{% endfor %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
${v.reset}
|
|
13
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
14
|
+
{% if '${f}' == 'RelatedProduct' -%}
|
|
15
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
14
16
|
{% else %}
|
|
15
|
-
<div>${
|
|
17
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{%- endif -%}
|
|
18
|
-
`;return
|
|
20
|
+
`;return e`
|
|
19
21
|
<div
|
|
20
|
-
${
|
|
21
|
-
style="${
|
|
22
|
-
class="${
|
|
22
|
+
${h}
|
|
23
|
+
style="${g}"
|
|
24
|
+
class="${$}"
|
|
23
25
|
>
|
|
24
|
-
${
|
|
26
|
+
${r(p?.sameHeight,e`
|
|
25
27
|
<gp-same-height
|
|
26
28
|
class="gp-contents"
|
|
27
29
|
style="visibility: hidden"
|
|
28
30
|
>
|
|
29
|
-
<script gp-data type="application/json">${JSON.stringify({targetUid:
|
|
31
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
|
|
30
32
|
</script>
|
|
31
|
-
${`${
|
|
33
|
+
${`${_()}`}
|
|
32
34
|
</gp-same-height>
|
|
33
35
|
`)}
|
|
34
|
-
${
|
|
36
|
+
${r(!p?.sameHeight,e`${_()}`)}
|
|
35
37
|
</div>
|
|
36
|
-
`};export{
|
|
38
|
+
`};export{n as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{DEVICES as i,getResponsiveValueByScreen as e,LIST_IMAGE_LIQUID_VARS as t}from"@gem-sdk/core";import{getImageSizes as s}from"../../../../image/common/sizes.js";let a={desktop:4,tablet:2,mobile:2},r={GRID:2,CAROUSEL:1},m=t=>i.map(i=>{let s=Number(e(t,i));return Math.max(1,Math.floor(s||a[i]))}),n=i=>100/Math.min(...m(i)),g=({slidesToShow:i,rows:e})=>{let t=m(i);return{eagerLimit:Math.max(...t)*e,highLimit:Math.min(...t),sizes:`${Number(n(i).toFixed(2))}vw`}},o=({slidesToShow:i,rows:e,indexVar:a="count"})=>{let{eagerLimit:r,highLimit:m}=g({slidesToShow:i,rows:e}),o=s({slotVw:n(i)});return{item:`{%- liquid
|
|
2
|
+
if ${a} <= ${r}
|
|
3
|
+
assign ${t.LOADING} = 'eager'
|
|
4
|
+
else
|
|
5
|
+
assign ${t.LOADING} = 'lazy'
|
|
6
|
+
endif
|
|
7
|
+
if ${a} <= ${m}
|
|
8
|
+
assign ${t.FETCH_PRIORITY} = 'high'
|
|
9
|
+
else
|
|
10
|
+
assign ${t.FETCH_PRIORITY} = 'auto'
|
|
11
|
+
endif
|
|
12
|
+
assign ${t.SIZES} = '${o}'
|
|
13
|
+
-%}`,reset:`{%- liquid
|
|
14
|
+
assign ${t.LOADING} = nil
|
|
15
|
+
assign ${t.FETCH_PRIORITY} = nil
|
|
16
|
+
assign ${t.SIZES} = nil
|
|
17
|
+
-%}`}};export{r as LIST_PRELOAD_ROWS,g as getListImagePriority,o as getListImagePriorityLiquid};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getListImagePriority as t}from"./imagePriority.js";let e=({slidesToShow:e,rows:i,index:r})=>{let{eagerLimit:o,highLimit:a,sizes:g}=t({slidesToShow:e,rows:i});return{loading:r<=o?"eager":"lazy",fetchpriority:r<=a?"high":"auto",sizes:g}};export{e as getListImageHints};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import r from"../../../carousel-v3/components/item/CarouselItem.js";import
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import r from"../../../carousel-v3/components/item/CarouselItem.js";import t from"../../../carousel-v3/components/root/Carousel.js";import{useEditorMode as s,ProductProvider as m,isEmptyChildren as e}from"@gem-sdk/core";import{getListImageHints as i}from"../product-list/common/imagePriorityHints.js";import l from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as c}from"../../../image/common/listImageContext.js";import{LIST_PRELOAD_ROWS as n}from"../product-list/common/imagePriority.js";import{getClass as a}from"./common/classes.js";import{getData as d}from"./common/helpers.js";import{getStyle as p}from"./common/styles.js";import{getAttr as u}from"./common/attrs.js";let f=f=>{let{children:j,builderProps:h,productSortedById:g,advanced:y,setting:C}=f,v=s(),{carouselConfigSetting:P,carouselConfigStyle:b}=d(f),{productListAttr:x,getAttrProductItemEditor:I}=u(f),{carouselItemStyle:L}=p(f),{carouselClass:w,productItemClass:D}=a(f);return o(t,{advanced:y,builderProps:{uid:h?.uid},rootAttrs:{...x},rootClass:w,setting:P,styles:b,isProductList:!0,children:g?.map((t,s)=>o(r,{style:L,children:o(m,{product:t,readOnly:!0,children:o(c.Provider,{value:i({slidesToShow:C?.slidesToShow,rows:n.CAROUSEL,index:s+1}),children:o("div",{..."edit"===v?I(t?.baseID):{},className:D,children:e(j)?o(l,{}):j})})})},t?.baseID))})};export{f as default};
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import r from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as
|
|
2
|
-
${t({advanced:
|
|
1
|
+
import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getListImagePriorityLiquid as r,LIST_PRELOAD_ROWS as i}from"../product-list/common/imagePriority.js";import e from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as c}from"@gem-sdk/core";let n=n=>{let{builderProps:m,advanced:p,productSrc:a,productListId:f}=n,{carouselConfigSetting:g,carouselConfigStyle:$}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:v}=d(n),P=r({slidesToShow:n.setting?.slidesToShow,rows:i.CAROUSEL});return c`
|
|
2
|
+
${t({advanced:p,builderProps:{...m},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${m?.uid}`,rootClass:v,setting:g,styles:$,isProductList:!0,children:`
|
|
3
3
|
{%- assign count = 0 -%}
|
|
4
4
|
{%- for product in products limit: limit -%}
|
|
5
5
|
{%- if product.id != empty -%}
|
|
6
6
|
{%- assign count = count | plus: 1 -%}
|
|
7
|
+
${P.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
9
|
-
${o({builderProps:{...
|
|
10
|
-
${
|
|
9
|
+
{%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
|
|
10
|
+
${o({builderProps:{...m},style:_,parentId:`product-list-carousel-${m?.uid} gp-child-item-${m?.uid}`,parentStyle:$,parentSettings:g,background:g?.background,children:`
|
|
11
|
+
${e({...n})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
${P.reset}
|
|
16
|
+
{%- if count == 0 and ${f.length} == 0 -%}
|
|
17
|
+
{% if '${a}' == 'RelatedProduct' -%}
|
|
18
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
|
-
<div>${
|
|
20
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
19
21
|
{%- endif -%}
|
|
20
22
|
{%- endif -%}
|
|
21
23
|
`,carouselType:"product_list"})}
|
|
22
|
-
`};export{
|
|
24
|
+
`};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Children as r,isValidElement as m,createElement as t}from"react";import{useEditorMode as e,ProductProvider as i,isEmptyChildren as s}from"@gem-sdk/core";import{getListImageHints as l}from"../product-list/common/imagePriorityHints.js";import d from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as a}from"../../../image/common/listImageContext.js";import{LIST_PRELOAD_ROWS as c}from"../product-list/common/imagePriority.js";import{getClass as n}from"./common/classes.js";import{getStyle as p}from"./common/styles.js";import{getAttr as f}from"./common/attrs.js";let g=g=>{let{children:h,productSortedById:u,generateGridRowArray:y,setting:j}=g,v=e(),{gridLayoutStyle:b}=p(g),{gridLayoutClass:w,productItemClass:x}=n(g),{productListAttr:D,getAttrProductItemEditor:I}=f(g);return o("div",{...D,style:b,className:w,children:u?.length?u?.map((e,n)=>o(i,{product:e,readOnly:!0,children:o(a.Provider,{value:l({slidesToShow:j?.slidesToShow,rows:c.GRID,index:n+1}),children:o("div",{..."edit"===v?I(e?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?y?.[n]?.gridRow:void 0,"--mbchild":y?.[n]?.marginBottom},children:s(h)?o(d,{}):r.map(h,o=>m(o)?t(o.type,{...o.props,key:o.key}):null)})})},e?.baseID)):null})};export{g as default};
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as
|
|
1
|
+
import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../product-list/common/imagePriority.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as r,template as e}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as m}from"./common/attrs.js";let n=n=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=n,{gridLayoutStyle:g}=a(n),{gridLayoutClass:$}=d(n),{productListAttr:h}=m(n),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>e`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
|
+
${v.item}
|
|
6
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
+
${o({...n})}
|
|
9
10
|
{%- endif -%}
|
|
10
11
|
{% endfor %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
${v.reset}
|
|
13
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
14
|
+
{% if '${f}' == 'RelatedProduct' -%}
|
|
15
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
14
16
|
{% else %}
|
|
15
|
-
<div>${
|
|
17
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{%- endif -%}
|
|
18
|
-
`;return
|
|
20
|
+
`;return e`
|
|
19
21
|
<div
|
|
20
|
-
${
|
|
21
|
-
style="${
|
|
22
|
-
class="${
|
|
22
|
+
${h}
|
|
23
|
+
style="${g}"
|
|
24
|
+
class="${$}"
|
|
23
25
|
>
|
|
24
|
-
${
|
|
26
|
+
${r(p?.sameHeight,e`
|
|
25
27
|
<gp-same-height
|
|
26
28
|
class="gp-contents"
|
|
27
29
|
style="visibility: hidden"
|
|
28
30
|
>
|
|
29
|
-
<script gp-data type="application/json">${JSON.stringify({targetUid:
|
|
31
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
|
|
30
32
|
</script>
|
|
31
|
-
${`${
|
|
33
|
+
${`${_()}`}
|
|
32
34
|
</gp-same-height>
|
|
33
35
|
`)}
|
|
34
|
-
${
|
|
36
|
+
${r(!p?.sameHeight,e`${_()}`)}
|
|
35
37
|
</div>
|
|
36
|
-
`};export{
|
|
38
|
+
`};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"@gem-sdk/system";import"next/link";import"./components/constants/product-bundle.js";import"../common/const.js";import"./components/product-variants/components/variants/index.js";import"../carousel-v3/components/swiper/Swiper.js";import"
|
|
1
|
+
import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"@gem-sdk/system";import"next/link";import"./components/constants/product-bundle.js";import"../common/const.js";import"./components/product-variants/components/variants/index.js";import"../carousel-v3/components/swiper/Swiper.js";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import"../video/components/Video.js";import"../modal/components/confirm.js";import"react-dom";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";import"./components/product-badge/types.js";import"./components/product-badge/constants.js";import"./components/product-badge/utils/shape.js";export{default as ProductList}from"./components/product-list/ProductList.js";export{default as Product}from"./components/product-wrap/Product.js";import t from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import o from"./components/product-bundle/setting/ProductBundleDiscount.js";import r from"./settings/product-image-v3/ProductImages.js";import s from"./settings/product-image-v2/ProductImages.js";import i from"./settings/ProductDescription.js";import e from"./settings/ProductProperties.js";import m from"./components/file-upload/settings/index.js";import c from"./settings/ProductViewMore.js";import n from"./settings/ProductVariants.js";import p from"./settings/ProductQuantity.js";import u from"./settings/DynamicCheckout.js";import d from"./settings/ProductListV3.js";import a from"./settings/ProductImages.js";import P from"./settings/ProductButton.js";import g from"./settings/ProductTitle.js";import j from"./settings/ProductPrice.js";import f from"./settings/ProductBadge.js";import l from"./settings/ProductList.js";import V from"./settings/ProductTag.js";import k from"./settings/Vendor.js";import x from"./settings/Product.js";import b from"./settings/Sku.js";let I={Product:x,ProductQuantity:p,ProductTitle:g,ProductButton:P,ProductPrice:j,ProductVariants:n,ProductImages:a,ProductImagesV2:s,ProductImagesV3:r,ProductDescription:i,ProductProperties:e,ProductTag:V,ProductListV3:d,ProductList:l,DynamicCheckout:u,ProductVendor:k,ProductSku:b,ProductBundleDiscount:o,ProductBundleDiscountItem:t,ProductViewMore:c,ProductBadge:f,FileUpload:m};export{I as productSetting};
|
|
@@ -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:20,max:400,step:20,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",
|
|
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",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 +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:20,max:400,step:200,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",
|
|
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",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,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{getWrapThumbnailClasses as s,getButtonThumbnailClasses as r,getImageThumbnailClasses as l,getVideoYoutubeClasses as m}from"../common/classes.js";import{createAttr as i,createClass as a,createStyle as c}from"@gem-sdk/system";import n from"../hooks/useLiteHtml5Embed.js";import p from"../../image/components/NextImage.js";import{getPreloadImageStyle as d}from"../common/styles.js";import{getHtml5Attr as y}from"../common/attrs.js";import{useEditorMode as f}from"@gem-sdk/core";let u=u=>{let g=f(),h="edit"!==g,{thumbnail:b,muted:
|
|
2
|
+
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{getWrapThumbnailClasses as s,getButtonThumbnailClasses as r,getImageThumbnailClasses as l,getVideoYoutubeClasses as m}from"../common/classes.js";import{createAttr as i,createClass as a,createStyle as c}from"@gem-sdk/system";import n from"../hooks/useLiteHtml5Embed.js";import p from"../../image/components/NextImage.js";import{getPreloadImageStyle as d}from"../common/styles.js";import{getHtml5Attr as y}from"../common/attrs.js";import{useEditorMode as f}from"@gem-sdk/core";let u=u=>{let g=f(),h="edit"!==g,{thumbnail:b,muted:j,autoplay:v,loop:x,controls:N,src:k,style:C,title:w,className:L,lazy:T,poster:E}=u,{playVideoAndTurnOffThumbnail:H,videoRef:I,showThumbnail:M}=n(v,j,k),P=!h&&v&&j&&!!b,V=!T&&u.isVideoComponent&&h,A=!b||!M,B=k||void 0,D=i({...y({title:w,autoplay:v,preloadThumbnail:P,offLazyLoad:V,src:k,thumbnail:b})}),S=a({...s(A)}),Z=c({...d()}),q=a({...r()}),z=a({...l()}),F=a({...m(L,V)});return e(t,{children:[P?o(p,{src:b,alt:w,priority:!0,style:Z}):"",o("video",{ref:I,...D,style:C,className:F,controls:N,loop:x,muted:j,autoPlay:v,playsInline:!0,src:B}),!A&&e("div",{role:"presentation",style:C,className:S,onClick:H,children:[o(p,{id:"video-thumbnail",src:b??"",alt:E?.altText,title:E?.imageTitle,priority:E?.preload&&h,className:z,isDisableAspectStyle:!0}),o("button",{type:"button",className:q,"aria-label":"Play",children:o("svg",{className:"gp-w-5 gp-text-white",viewBox:"0 0 24 24",children:o("path",{fill:"currentColor",d:"M5 5.274c0-1.707 1.826-2.792 3.325-1.977l12.362 6.726c1.566.853 1.566 3.101 0 3.953L8.325 20.702C6.826 21.518 5 20.432 5 18.726V5.274Z"})})})]})]})};export{u as default};
|
|
@@ -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
|
|
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,V=L&&h&&!!g,x=!j&&f.isVideoComponent,C=!g||L&&h,M=x?A:void 0,I=l({...y({videoId:$,title:w,autoplay:L,preloadThumbnail:V,offLazyLoad:x,src:A,thumbnail:g})}),N=n({...e(C)}),B=m({...p()}),D=n({...t()}),G=n({...o()}),O=n({...i(T,x)});return d`
|
|
2
2
|
<gp-lite-html5-embed is-check-loaded="${f.isCheckLoaded??!1}" style="${S}">
|
|
3
|
-
${
|
|
3
|
+
${V?d`${u({src:g,alt:w,priority:k?.preload,style:B})}
|
|
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
|
+
${{...I}}
|
|
40
40
|
style="${P}"
|
|
41
|
-
class="${
|
|
41
|
+
class="${O}"
|
|
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
|
+
${M?`src="${M}"`:""}
|
|
48
48
|
></video>
|
|
49
|
-
${c(!
|
|
49
|
+
${c(!C,d`
|
|
50
50
|
<div
|
|
51
51
|
role="presentation"
|
|
52
52
|
style="${P}"
|
|
53
|
-
class="${
|
|
53
|
+
class="${N}"
|
|
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:G,isDisableAspectStyle:!0,priority:k?.preload})}
|
|
56
|
+
<button type="button" class="${D}" 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
|
|
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:N}=$(h),A=!v,I=h.thumbnail,T=r({id:b,thumbnail:x,lazy:v,iframeSrc:N,title:u,autoplay:S,muted:w,style:h?.vimeoStyleIframe||"",translatedVideoUrl:k}),V=l({...o(j)}),C=l({...p(j,"")}),G=a({...e(I,j)}),L=a({...t(A)}),M=a({...s(A)}),O=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(T)}</script>
|
|
4
4
|
<article
|
|
5
5
|
aria-hidden
|
|
6
|
-
class="${
|
|
6
|
+
class="${G}"
|
|
7
7
|
data-title="${u}"
|
|
8
|
-
style="${
|
|
8
|
+
style="${C}"
|
|
9
9
|
>
|
|
10
|
-
${g({src:
|
|
11
|
-
${m(!
|
|
12
|
-
<button type="button" class="${
|
|
10
|
+
${g({src:I,alt:E?.altText,title:E?.imageTitle,className:L,isDisableAspectStyle:!0,priority:E?.preload,height:E?.height,width:E?.width})}
|
|
11
|
+
${m(!A,c`
|
|
12
|
+
<button type="button" class="${M}" 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(A,c`
|
|
21
21
|
<iframe
|
|
22
|
-
style="${
|
|
22
|
+
style="${V}"
|
|
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="${N}"
|
|
28
|
+
class="${O}"
|
|
29
29
|
></iframe>`)}
|
|
30
30
|
</article>
|
|
31
31
|
</gp-lite-vimeo-embed>
|
|
@@ -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{getButtonYoutubeClasses as o,getImageYoutubeClasses as i,getArticleYoutubeClasses as l,getIframeYoutubeClasses as s,getYoutubeContentClasses as m}from"../common/classes.js";import{getYoutubeParams as n,isSettingLoop as c,covertStrParamsToObj as u}from"../common/helpers.js";import{getIframeYoutubeStyle as d,getArticleYoutubeStyle as p}from"../common/styles.js";import f from"../hooks/useLiteYoutubeEmbed.js";import{createClass as y,createStyle as h}from"@gem-sdk/system";import
|
|
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{getButtonYoutubeClasses as o,getImageYoutubeClasses as i,getArticleYoutubeClasses as l,getIframeYoutubeClasses as s,getYoutubeContentClasses as m}from"../common/classes.js";import{getYoutubeParams as n,isSettingLoop as c,covertStrParamsToObj as u}from"../common/helpers.js";import{getIframeYoutubeStyle as d,getArticleYoutubeStyle as p}from"../common/styles.js";import f from"../hooks/useLiteYoutubeEmbed.js";import{createClass as y,createStyle as h}from"@gem-sdk/system";import b from"../../image/components/NextImage.js";let g=g=>{let C=r(),v="edit"!==C,{style:w,poster:N,iframeClass:j,wrapperClass:k,title:x}=g,{preload:B}=N||{},{videoId:S,paramsImp:E,posterUrl:T,iframeSrc:V}=n(g),{iframe:H,intervalPlay:I,warmConnections:M,isVideoStarted:D,videoDuration:L,addIframe:P}=f(g,E,S),Y=y({...o(H)}),z=y({...i()}),A=y({...l(B&&v||!1,k)}),F=y({...s(j)}),O=h({...d(w)}),R=h({...p(w,T)}),q=y({...m()});return e("article",{"aria-hidden":!0,className:A,"data-title":x,style:R,onPointerOver:M,onClick:P,children:[t(b,{src:T,alt:N?.altText,title:N?.imageTitle,priority:v&&B,className:z,isDisableAspectStyle:!0}),t("button",{type:"button","aria-label":"Play",className:Y,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"})]})}),H&&(()=>{if(g.isHeroBanner&&c(E))return t(a,{videoId:S,title:x,iframeClassName:F,style:O,className:q,opts:{host:"https://www.youtube-nocookie.com",playerVars:{autoplay:1,state:1,controls:0,mute:1,...u(E)}},onReady:e=>{if(e.target.playVideo(),L.current=Math.floor(e.target.getDuration()),g.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;D.current||(t.playVideo(),D.current=!0,I(e)),0===e.data&&(L.current=t.getCurrentTime(),t.playVideo(),I(e))}});let e=t("iframe",{className:F,style:O,title:x,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:V});return g.isHeroBanner?t("div",{className:q,children:e}):e})()]})};export{g as default};
|