@gem-sdk/components 23.1.2 → 24.0.0-staging.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/components/ArticleList.js +1 -1
- 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/common/components/Loading.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/common/helpers.js +1 -0
- package/dist/cjs/common/hooks/useElementWidth.js +1 -0
- package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/components/section/Section.js +1 -1
- 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/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.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/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.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.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-images-v3/composables/getProductImagesStyles.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.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/helpers.js +1 -1
- 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/ProductList.js +1 -1
- 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/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- 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/components/ArticleList.js +1 -1
- 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/common/components/Loading.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/common/helpers.js +1 -0
- package/dist/esm/common/hooks/useElementWidth.js +1 -0
- package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/components/section/Section.js +1 -1
- 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/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.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/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.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.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-images-v3/composables/getProductImagesStyles.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.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/helpers.js +1 -1
- 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/ProductList.js +1 -1
- 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/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- 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 +11 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{getElementLabel as o,isQueryLoading as d}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as a}from"../../../common/const.js";import{useRenderMode as l,useCurrentDevice as i,usePageType as c,usePageStore as s,useFetchHandle as n,hasPublicStoreFrontData as u,createStoreFrontFetcher as m,useProductQuery as g,useProductsQueryAll as h,useProductsQuery as p,PICKED_PRODUCT_STATUSES as f,useCollectionQuery as P,flattenConnection as T,ProductListProvider as b,filterToolbarPreview as y}from"@gem-sdk/core";import{useState as I,useMemo as v,useEffect as k}from"react";import O from"../../../common/components/Loading.js";import S from"next/dynamic";import{getData as C,isRelatedProductsLoading as L,hasQueryableRelatedTag as E}from"./common/helpers.js";import N from"../SalePageProductListWarning.js";import{getPropertyByDevice as w}from"../../../dialog/common/helpers.js";import j from"./ProductListCarouselLayout.js";import W from"./ProductListGridLayout.js";import{getClass as x}from"./common/classes.js";import{getStyle as G}from"./common/styles.js";import{If as M}from"@gem-sdk/system";import D from"next/head";let Q=S(()=>import("../ProductNotFound.js"),{loading:O}),B=S=>{let{children:B,styles:A,builderProps:H,setting:R,builderAttrs:z}=S,{isRelatedProduct:F,productSetting:$}=C(S),_=$.relatedTag&&$.relatedTag[0],{isEditMode:q,isPreviewSharePageMode:U}=l(),V=i(),J=c(),K=s(e=>e.dynamicProduct),X=s(e=>e.dynamicCollection),[Y,Z]=I(1),[ee,et]=I(!0),[er,eo]=I(),[ed,ea]=I(!1),[el,ei]=I(),ec="GP_FUNNEL_PAGE"===J;"GP_COLLECTION"!=J||[a.Collection,a.DynamicCollection].includes($?.productSrc)||($.productSrc=a.DynamicCollection);let es=$?.productSrc??a.Collection;es===a.DynamicCollection&&($.collectionId=X?.collectionId||"latest");let en=K?.productId&&K?.productId!==$.relatedProductId?K?.productId:$.relatedProductId,eu=n(),em=s(e=>e.publicStoreFrontData),eg=v(()=>u(em)?m(em):eu,[em]),{data:eh,error:ep,isLoading:ef}=g(F&&en?en:void 0,{revalidateOnMount:q||U},eg),eP=$.relatedTag&&"tags"===$.relatedTag[0]&&(!eh?.tags||eh?.tags.length===0),eT=$.relatedTag&&"collection"===$.relatedTag[0]&&(!eh?.collections?.edges||eh?.collections.edges.length===0),eb=$.relatedTag&&"vendor"===$.relatedTag[0]&&!eh?.vendor,ey=h(er,{revalidateOnMount:q||U},eg),eI=q||U,ev=p(es===a.PickProduct?$?.productIds:void 0,{revalidateOnMount:eI},{defaultSelectedProductCount:$?.numOfSelectedProducts,selectedStatus:eI&&$?.productIds?.length?f:void 0}),ek=v(()=>({id:$?.collectionId??"latest",numberOfProducts:R?.numberOfProducts??4,orderBy:R?.orderBy}),[$?.collectionId,Number(R?.numberOfProducts),R?.orderBy]),eO=P(es!==a.PickProduct?ek:void 0,{revalidateOnMount:eI});k(()=>{if(F&&eh&&$.relatedTag&&"recommended-product"!==$.relatedType){let e;switch(ea(!1),$.hasRelatedExclude&&(e=$?.relatedExclude&&$.relatedExclude.split(",").map(e=>e.trim())),$.relatedTag[0]){case"vendor":eo({first:R?.numberOfProducts,vendor:$.relatedTag&&"vendor"===$.relatedTag[0]?eh?.vendor:"",idNEQ:eh.id}),ei(eh.id);break;case"collection":{let t=eh?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ea(!0);break}eo(e&&e.length>0?{first:R?.numberOfProducts,idNEQ:eh.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:R?.numberOfProducts,idNEQ:eh.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}),ei(eh.id);break}case"tags":if(!eh.tags||0===eh.tags.length){ea(!0);break}eo(e&&e.length>0?{first:R?.numberOfProducts,idNEQ:eh.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eh.tags},{nameNotIn:e}]}]}:{first:R?.numberOfProducts,idNEQ:eh.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eh.tags}]}]}),ei(eh.id)}}},[eh,$.relatedType,$.relatedTag,R?.numberOfProducts,$.relatedExclude,$.hasRelatedExclude,F]);let eS=es===a.PickProduct,eC=eS?ev:eO,eL=eC.isValidating,eE=eC.error,eN=d({hasQuery:eI&&(!eS||!!$?.productIds),data:eC.data,error:eC.error,isLoading:eC.isLoading}),ew=L({isRelatedProduct:F,relatedType:$.relatedType,hasRelatedTag:E({relatedTag:$.relatedTag}),relatedProductIdAssigned:en,canRevalidateOnMount:eI,mainProduct:{data:eh,error:ep,isLoading:ef},relatedQuery:er,relatedQuerySource:el,mainProductId:eh?.id,isNotFoundRelatedProduct:ed,relatedProducts:{data:ey.data,error:ey.error,isLoading:ey.isLoading}}),ej=eN||ew,eW=eO.data?.collections?.edges?.[0]?.node,ex=es===a.PickProduct?T(ev.data?.products):T(eW?.products),eG=ey?.data?.products?T(ey?.data?.products):void 0,eM=F&&eG?eG:es===a.PickProduct&&$?.productIds?.length?$?.productIds?.map(e=>ex?.find(t=>t?.baseID===e)).filter(Boolean)??ex:es!==a.PickProduct?ex:ex.filter((e,t)=>t<($?.numOfSelectedProducts??4)),eD=v(()=>ed&&F&&q||!eM.length&&!ej&&ee&&q,[ee,ej,ed,F,q,eM.length]),eQ=v(()=>!eM||ed&&F,[ed,F,eM]),eB=v(()=>{if(!R?.sameHeight)return[];let e=0,t=Math.ceil((eM?.length??0)/+(R?.slidesToShow?.[V]??1));return Array.from(Array(eM?.length??0)).map((r,o)=>(o>=+(R?.slidesToShow?.[V]??1)*(e+1)&&++e,{gridRow:`${1+Y*e}/${Y+1+Y*e}`,marginBottom:e+1<t?w(A?.horizontalGutter,V):void 0}))},[R?.sameHeight,R?.slidesToShow,Y,eM?.length,V,A?.horizontalGutter]),eA=v(()=>eL||ej||eE||!eM||ed&&F,[eE,ej,ed,F,eL,eM]);k(()=>{eA||setTimeout(()=>{let{builderData:e}=H??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&Z(r.childElementCount||1)},q?0:500)},[H,eA,q]);let eH=v(()=>({collection:eW,products:eM,settings:{loop:R?.loop??{desktop:!1},scrollMode:R?.scrollMode??{desktop:"snap"},slidesToShow:R?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:A?.layout,dot:R?.dot,dotStyle:R?.dotStyle,arrow:R?.arrow,controlOverContent:R?.controlOverContent,sameHeight:R?.sameHeight},styles:{horizontalGutter:A?.horizontalGutter,verticalGutter:A?.verticalGutter,fullWidth:A?.fullWidth,spacing:A?.spacing,width:A?.width,height:A?.height}}),[eW,eM,R,A]);if(H?.isPreview&&ec)return e(t,{});if(eD)return e(t,{children:M(ee,e(Q,{builderAttrs:z,collectionHandle:eW?.handle,productSrc:es,onClose:()=>et(!1),children:B,relatedTagString:_,assignProductNoTags:eP||eT||eb,noAssignedProduct:!en}))});let{productListWrapStyle:eR,productListContentStyle:ez,productListWrapAlignStyle:eF}=G(S),{productListWrapClass:e$}=x(S);return r("div",{...z,className:e$,style:eR,children:[!!A?.preloadBgImage&&r(D,{children:[!!A.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage.desktop.image.src,as:"image"}),!!A.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage?.tablet?.image?.src,as:"image"}),!!A.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage?.mobile?.image?.src,as:"image"})]}),eL||ej?e(O,{label:o({builderData:H?.builderData})}):eE?r("div",{children:["Error: ",eE?.message]}):eQ?e("div",{children:"Products not found"}):e(b,{...eH,children:e("div",{className:"gp-flex gp-w-full",style:eF,children:r("div",{style:ez,children:[ec&&e(N,{}),e(t,{children:M(A?.layout==="grid",e(W,{...S,productSortedById:eM,generateGridRowArray:eB}),e(j,{...S,productSortedById:eM}))})]})})}),y(B,!0)]})};export{B as default};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getUpdatedDotStyle as
|
|
1
|
+
import{getUpdatedDotStyle as e}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as t}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";import{isQueryLoading as r}from"../../../../common/helpers.js";import"../../../../common/const.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";let d=t=>{let{setting:r,styles:d}=t,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=e(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let n={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete n.backgroundColor,delete n.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:n}},c=e=>{let{setting:o,styles:r}=e,d=o?.productSetting,c=d?.relatedTag,a=d?.hasRelatedExclude,n=(c&&"collection"===c[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",u=n?.split(",").map(e=>e.trim()).toString(),p=d?.productSrc??"Collection",s=d?.collectionId?.replace(l,"")??"latest",m=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,g=r?.layout==="grid",h=t(o?.numberOfProducts,4),P="PickProduct"===p&&d?.productIds?.length?d?.productIds.map(e=>e.replace(i,"")):[],I="PickProduct"===p&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",k=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",y=S&&k?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",C=k?.[k.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:u,collectionID:s,isLatestProducts:m,isGrid:g,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:y,isReverse:C,productSrc:p,productSetting:d,isSorted:S,relatedTag:c,productNumber:"PickProduct"===p?m?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},l="gid://shopify/Collection/",i="gid://shopify/Product/",a=["vendor","collection","tags"],n=({relatedTag:e})=>!!e?.[0]&&a.includes(e[0]),u=({isRelatedProduct:e,relatedType:t,hasRelatedTag:o,relatedProductIdAssigned:d,canRevalidateOnMount:c,mainProduct:l,mainProductId:i,relatedQuery:a,relatedQuerySource:n,isNotFoundRelatedProduct:u,relatedProducts:p})=>{if(!e)return!1;let s="recommended-product"!==t&&o&&!!d,m=s&&!!l.data&&n!==i&&!u;return c?r({hasQuery:s,...l})||m||r({hasQuery:!!a,...p}):l.isLoading||p.isLoading};export{l as PREFIX_COLLECTION_ID,i as PREFIX_PRODUCT_ID,d as getData,c as getDataLiquid,n as hasQueryableRelatedTag,u as isRelatedProductsLoading};
|
|
@@ -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,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{getElementLabel as r,isQueryLoading as i}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as l}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as s,usePageType as c,usePageStore as a,flattenConnection as n,ProductListProvider as m,filterToolbarPreview as u,PICKED_PRODUCT_STATUSES as g}from"@gem-sdk/core";import{useState as p,useRef as h,useMemo as f,useEffect as P}from"react";import y from"../../../common/components/Loading.js";import k from"next/dynamic";import b from"./hooks/useRelatedProductIDAssigned.js";import I from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import j from"./hooks/useProductRelatedQuery.js";import C from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as v}from"./constants/index.js";import{useCollectionQuery as L}from"./hooks/useCollectionQuery.js";import{useProductsQuery as w}from"./hooks/useProductsQuery.js";import N from"./ProductListGridLayout.js";import{getClass as G}from"./common/classes.js";import{getData as T}from"./common/helpers.js";import{getStyle as D}from"./common/styles.js";import{If as A}from"@gem-sdk/system";import O from"next/head";let x=k(()=>import("../ProductNotFound.js"),{loading:y}),B=k=>{let{children:B,styles:E,builderProps:H,setting:z,builderAttrs:Q}=k,{isRelatedProduct:M,productSetting:R}=T(k),{isEditMode:W,isPreviewSharePageMode:$}=d(),_=s(),F=c(),q=a(o=>o.dynamicCollection),[U,V]=p(1),[J,K]=p(!0),X=h(),Y="GP_FUNNEL_PAGE"===F;"GP_COLLECTION"!=F||[l.Collection,l.DynamicCollection].includes(R?.productSrc)||(R.productSrc=l.DynamicCollection);let Z=R?.productSrc??l.Collection;Z===l.DynamicCollection&&(R.collectionId=q?.collectionId||"latest");let oo=Number.isNaN(Number(z?.numberOfProducts))?v:Number(z?.numberOfProducts),{relatedProductIdAssigned:oe}=b({productSetting:R}),{isNotFoundRelatedProduct:ot,relatedProducts:or,isNoRelatedProductData:oi,relatedTagString:ol,isLoading:od}=j({productSetting:R,isRelatedProduct:M,relatedProductIdAssigned:oe,numberOfProducts:oo}),os=W||$,oc=w({productIds:R?.productIds,defaultSelectedProductCount:R?.numOfSelectedProducts,productSrc:Z,selectedStatus:os&&R?.productIds?.length?g:void 0}),oa=L({productSrc:Z,collectionID:R?.collectionId??"latest",numberOfProducts:oo,orderBy:z?.orderBy}),on=Z===l.PickProduct,om=on?oc:oa,ou=on?!!R?.productIds:Z===l.Collection||Z===l.DynamicCollection,og=od||i({hasQuery:ou,data:om.data,error:om.error,isLoading:om.isLoading}),op=om.error,oh=om.isValidating,of=oa.data?.collections?.edges?.[0]?.node,oP=Z===l.PickProduct?n(oc.data?.products):n(of?.products),oy=a(o=>o.assignedProductIds),ok=a(o=>o.isApplyAllProducts),ob=f(()=>(oy??[]).length>0&&!ok||ok,[oy,ok]),oI=or?.data?.products&&ob?n(or?.data?.products):[],oS=M?oI:Z===l.PickProduct&&R?.productIds?.length?R?.productIds?.map(o=>oP?.find(e=>e?.baseID===o)).filter(Boolean)??oP:Z!==l.PickProduct?oP:oP.filter((o,e)=>e<(R?.numOfSelectedProducts??4)),oj=f(()=>ot&&M&&W||!oS.length&&!og&&J&&W,[J,og,ot,M,W,oS.length]),oC=f(()=>!oS||ot&&M,[ot,M,oS]),ov=f(()=>{if(!z?.sameHeight)return[];let o=0,e=Math.ceil((oS?.length??0)/+(z?.slidesToShow?.[_]??1));return Array.from(Array(oS?.length??0)).map((t,r)=>(r>=+(z?.slidesToShow?.[_]??1)*(o+1)&&++o,{gridRow:`${1+U*o}/${U+1+U*o}`,marginBottom:o+1<e?S(E?.horizontalGutter,_):void 0}))},[z?.sameHeight,z?.slidesToShow,U,oS?.length,_,E?.horizontalGutter]),oL=f(()=>oh||og||op||!oS||ot&&M,[op,og,ot,M,oh,oS]);P(()=>{if(!oL)return X.current=setTimeout(()=>{let{builderData:o}=H??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},W?0:500),()=>{clearTimeout(X.current)}},[H,oL,W,oS]);let ow=f(()=>({collection:of,products:oS,settings:{loop:z?.loop??{desktop:!1},scrollMode:z?.scrollMode??{desktop:"snap"},slidesToShow:z?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:E?.layout,dot:z?.dot,dotStyle:z?.dotStyle,arrow:z?.arrow,controlOverContent:z?.controlOverContent,sameHeight:z?.sameHeight},styles:{horizontalGutter:E?.horizontalGutter,verticalGutter:E?.verticalGutter,fullWidth:E?.fullWidth,spacing:E?.spacing,width:E?.width,height:E?.height}}),[of,oS,z,E]);if(H?.isPreview&&Y)return o(e,{});if(oj)return o(e,{children:A(J,o(x,{builderAttrs:Q,collectionHandle:of?.handle,productSrc:Z,onClose:()=>K(!1),children:B,relatedTagString:ol,assignProductNoTags:oi,noAssignedProduct:!oe}))});let{productListWrapStyle:oN,productListContentStyle:oG,productListWrapAlignStyle:oT}=D(k),{productListWrapClass:oD}=G(k);return t("div",{...Q,className:oD,style:oN,children:[!!E?.preloadBgImage&&t(O,{children:[!!E.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage.desktop.image.src,as:"image"}),!!E.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.tablet?.image?.src,as:"image"}),!!E.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.mobile?.image?.src,as:"image"})]}),og||oh?o(y,{label:r({builderData:H?.builderData})}):op?t("div",{children:["Error: ",op?.message]}):oC?o("div",{children:"Products not found"}):o(m,{...ow,children:o("div",{className:"gp-flex gp-w-full",style:oT,children:t("div",{style:oG,children:[Y&&o(I,{}),o(e,{children:A(E?.layout==="grid",o(N,{...k,productSortedById:oS,generateGridRowArray:ov}),o(C,{...k,productSortedById:oS}))})]})})}),u(B,!0)]})};export{B as default};
|
|
@@ -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{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{getElementLabel as s}from"../../../common/helpers.js";import"../../../common/const.js";import"react";import c from"../../../common/components/Loading.js";import{getData as n}from"./common/helpers.js";import{If as l}from"@gem-sdk/system";import p from"../../../grid/components/row/Row.js";import u from"next/dynamic";let a=u(()=>import("../ProductNotFound.js"),{loading:c}),h=u=>{let{builderProps:h,children:f,setting:g,style:j,builderAttrs:b}=u,{isAuto:P}=g??{},{isLoadingProduct:y,isProductPage:k,isProductNotFound:D,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:S}=d(u),{rowSetting:E,rowStyles:F}=n(u);return k&&P?r(o,{children:e(f)?r(m,{}):f}):r(o,{children:l(!D,r(o,{children:y?r(c,{label:s({builderData:h?.builderData})}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(p,{builderProps:h,builderAttrs:b,style:j,styles:F,setting:E,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(f)?r(m,{}):f})}):null})}),r(o,{children:l(x,r(a,{builderAttrs:b,productSrc:"PickProduct",onClose:()=>S(!1),children:f}))}))})};export{h 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{isQueryLoading as o}from"../../../../common/helpers.js";import"../../../../common/const.js";import"react/jsx-runtime";import{useState as a,useMemo as d}from"react";import i from"./useProductQuery.js";let c=c=>{let{setting:m}=c,{productSetting:s,quantity:u,readOnly:n,isSyncProduct:p}=m??{},P=t(),l=r(t=>t.dynamicProduct),{isEditMode:h}=e(),y=s?.productId??"latest",S=s?.productStatus=="dynamic"?{...s,...l}:s,f=S?.initialVariantId,j=S?.initialVariantBaseId,{productData:{data:g,isLoading:I,error:k}}=i({id:y}),[x,D]=a(!0),Q=o({hasQuery:!!y,data:g,error:k,isLoading:I}),V=(k||!g&&!Q)&&h,$=d(()=>({product:g,initialVariantId:f,initialVariantBaseId:j,quantity:u,readOnly:n,isSyncProduct:p,key:`uid-${g?.id}-${f??""}`,hasPreSelected:s?.hasPreSelected}),[j,f,p,g,s?.hasPreSelected,u,n]);return{forceProductSetting:S,isProductPage:"PRODUCT"===P,isProductNotFound:V,showProductNotFound:x,isLoadingProduct:Q,product:g,errorLoadProduct:k,isEditor:h,productProviderData:$,setShowProductNotFound:D}};export{c as useProductSetting};
|
|
@@ -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};
|