@gem-sdk/components 23.0.0-staging.11 → 23.0.0-staging.13
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/index.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/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/components/HeroBannerItem.js +1 -1
- 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/helpers.js +1 -1
- package/dist/cjs/image/common/listContext.js +1 -15
- 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 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -10
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/index.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/index.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.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/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.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/gallery-carousel/GalleryCarousel.js +1 -1
- 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 +1 -1
- package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.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/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +3 -3
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +3 -3
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/index.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/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/components/HeroBannerItem.js +1 -1
- 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/helpers.js +2 -2
- package/dist/esm/image/common/listContext.js +1 -15
- 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 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +9 -9
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/index.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/index.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/product/components/product-images/ProductImagesLightBox.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/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.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/gallery-carousel/GalleryCarousel.js +1 -1
- 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 +1 -1
- package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +6 -6
- 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 +7 -7
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +6 -6
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as m}from"react/jsx-runtime";import
|
|
2
|
+
import{jsx as m}from"react/jsx-runtime";import{createStyle as o,createClass as t}from"@gem-sdk/system";import{useContext as r}from"react";import{ListImageContext as e}from"../common/listImageContext.js";import{getNextImageReactAttrs as s}from"../common/attrs.js";import{getNextImageClasses as i}from"../common/classes.js";import{getNextImageStyles as a}from"../common/styles.js";let c=c=>{let{style:l,imgRef:f,setting:n,className:p,width:j,height:g,isDisableAspectStyle:x,onLoad:d,onClick:u}=c,y=r(e),b=o({...l,...a({width:j,height:g,setting:n,isDisableAspectStyle:x,isDisableObjectFit:!1})}),k=t({...i({className:p})}),C=s({props:c,listHints:y});return m("img",{ref:f,...C,onLoad:d,onClick:u,style:b,className:k})};export{c as default};
|
package/dist/esm/image/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./settings/Image.js";import"react/jsx-runtime";import"@gem-sdk/system";import"@gem-sdk/core";import"./components/AdaptiveImage.js";import"
|
|
1
|
+
import t from"./settings/Image.js";import"react/jsx-runtime";import"@gem-sdk/system";import"@gem-sdk/core";import"./components/AdaptiveImage.js";import"react";import"./common/listImageContext.js";import"./common/listContext.js";import"next/link";let m={Image:t};export{m as imageSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let
|
|
1
|
+
import{getNextImageReactAttrs as t}from"../../image/common/attrs.js";let e=({label:t="",positionId:e="left",componentUid:a})=>({label:t,positionId:e,uid:a}),a=({pageContext:t,translateLabel:e})=>({pageContext:t,translateLabel:e}),g=({width:t=0,height:e=0})=>({src:"",width:t,height:e,"data-testid":"temp-image"}),i=({src:t,title:e=""})=>({src:t,title:e}),s=({id:t,src:e,title:a="",priority:g=!1,isDisableObjectFit:s=!1,isDisableAspectStyle:m=!1})=>({...i({src:e,title:a}),id:t,priority:g,isDisableObjectFit:s,isDisableAspectStyle:m}),m=({side:e,src:a,title:g,alt:i,componentUid:s,priority:m,qualityType:r,qualityPercent:o})=>({...t({props:{id:`${e}-image-${s}`,src:a,title:g,alt:i,priority:m,sizeTarget:"ImageComparison",setting:{qualityType:r,qualityPercent:o}}}),"data-testid":`${e}-image`});export{i as getBaseImageAttrs,m as getComparisonImageAttrs,s as getImageLiquidAttrs,g as getImagePlaceholderAttrs,e as getLabelAttrs,a as getLabelLiquidAttrs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createStyleReact as i,createClass as r,createAttr as l,If as s}from"@gem-sdk/system";import"react";import{getOuterWrapperStyles as o,getWrapperWidth as a,getContainerStyles as m,getLazyPlaceholderStyle as n,getImageStyles as d,getLabelStyles as h,getArrowStyles as c,getLineStyles as p,getHandleStyles as y,getHandleCustomStyles as f,getSliderStyles as g}from"../common/styles.js";import{getComparisonImageAttrs as C,getImagePlaceholderAttrs as S,getLabelAttrs as w}from"../common/attrs.js";import{getOuterWrapperClasses as j,getLabelClasses as I,getLabelContainerClasses as u}from"../common/classes.js";import{getData as b,getReactStyles as L}from"../common/helpers.js";import{useCompareImage as v}from"../hooks/useCompareImage.js";import H from"./SlideHandle.js";import k from"./Label.js";let x=x=>{let{leftImage:A,rightImage:W,builderData:$,advanced:N}=x,{hover:P,styles:R,handle:U,handleSize:q,leftImageAlt:z,leftImageTitle:B,leftImageLabel:D,rightImageAlt:E,rightImageTitle:F,rightImageLabel:G,sliderLineWidth:J,sliderLineColor:K,componentUid:M,tempImage:O,aspectRatio:Q,isHorizontal:T,hasLeftLabel:V,hasRightLabel:X,qualityType:Y,qualityPercent:Z,getLeftImageSrc:_,getRightImageSrc:ee}=b(x),et=_(),ei=ee(),{ref:er,priority:el,sliderRef:es,containerRef:eo,leftImageRef:ea,rightImageRef:em,sliderPosition:en,containerWidth:ed,containerHeight:eh,allImagesLoaded:ec,setLeftImgLoaded:ep,setRightImgLoaded:ey}=v({props:x,aspectRatio:Q}),ef=L({handleSize:q,isHorizontal:T,containerWidth:ed,containerHeight:eh,sliderPosition:en}),eg=i({...o(R)}),eC=i({...a({width:R?.width,leftImageWidth:A?.width,rightImageWidth:W?.width})}),eS=i({...m({aspectRatio:Q,builderData:$,allImagesLoaded:ec})}),ew=i({...n(Q)}),ej=i({...d({type:"right",props:x}),...ef.rightImageClip}),eI=i({...d({type:"left",props:x}),...ef.leftImageClip}),eu=i({...h({styles:R,type:"left",isHorizontal:T})}),eb=i({...h({styles:R,type:"right",isHorizontal:T})}),eL=i({...c({type:"left"})}),ev=i({...c({type:"right"})}),eH=i({...p({isHorizontal:T,sliderLineColor:K,sliderLineWidth:J})}),ek=i({...y({handleSize:q,isHorizontal:T,sliderLineColor:K,sliderLineWidth:J})}),ex=i({...f()}),eA=i({...g({hover:P,handleSize:q,isHorizontal:T}),...ef.sliderPosition}),eW=r({...j(N?.cssClass)}),e$=r({...I(R)}),eN=r({...u()}),eP=C({side:"right",src:ei,title:F,alt:E,componentUid:M,priority:el,qualityType:Y,qualityPercent:Z}),eR=C({side:"left",src:et,title:B,alt:z,componentUid:M,priority:el,qualityType:Y,qualityPercent:Z}),eU=w({componentUid:M,positionId:"left",label:D??""}),eq=w({componentUid:M,positionId:"right",label:G??""}),ez=l({...S({width:O?.width,height:O?.height})});return e("div",{"data-id":M,className:eW,style:eg,children:e("div",{id:`img-comparison-wrapper-${M}`,style:eC,ref:er,children:t("div",{id:`img-comparison-container-${M}`,ref:eo,"data-testid":"container",style:eS,children:[e("img",{alt:"",...ez,style:ew}),e("img",{ref:em,...eP,style:ej,onLoad:()=>ey(!0)}),e("img",{ref:ea,...eR,style:eI,onLoad:()=>ep(!0)}),e(H,{customHandle:U,componentUid:M,lineStyles:eH,sliderStyles:eA,handleStyles:ek,customHandleStyles:ex,leftArrowStyles:eL,rightArrowStyles:ev,sliderRef:es}),s(V,e(k,{...eU,styles:R,childrenClass:e$,childrenStyle:eu,containerClass:eN,containerStyle:ef?.leftLabelContainer??{}})),s(X,e(k,{...eq,styles:R,childrenClass:e$,childrenStyle:eb,containerClass:eN,containerStyle:ef?.rightLabelContainer??{}}))]})})})};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import m from"./settings/ImageComparison.js";import"react/jsx-runtime";import"@gem-sdk/core";import"next/link";import"react";import"@gem-sdk/system";import"./components/Label.js";let t={ImageComparison:m};export{t as imageComparisonSetting};
|
|
1
|
+
import m from"./settings/ImageComparison.js";import"react/jsx-runtime";import"@gem-sdk/core";import"next/link";import"react";import"@gem-sdk/system";import"../image/common/listContext.js";import"./components/Label.js";let t={ImageComparison:m};export{t as imageComparisonSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./settings/CalloutText.js";import o from"./settings/CalloutBox.js";import"react/jsx-runtime";import"@gem-sdk/system";import"./common/styles.js";import"@gem-sdk/core";import"react";import"../../common/const.js";import"next/link";import"react-youtube";import"
|
|
1
|
+
import t from"./settings/CalloutText.js";import o from"./settings/CalloutBox.js";import"react/jsx-runtime";import"@gem-sdk/system";import"./common/styles.js";import"@gem-sdk/core";import"react";import"../../common/const.js";import"next/link";import"react-youtube";import"../../image/common/listImageContext.js";import"../../image/common/listContext.js";import"next/head";let m={PostPurchaseCalloutBox:o,PostPurchaseCalloutText:t};export{m as postPurchaseCalloutBoxSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./settings/product-discount-tag/ProductDiscountTag.js";import o from"./settings/product-description/ProductDescription.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";import"./constants/index.js";import"./components/product-subscription/types.js";import"@gem-sdk/system";import"next/link";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import r from"./settings/product-variants/ProductVariant.js";import s from"./settings/product-price-breakdown/index.js";import i from"./settings/product-image/ProductImages.js";import e from"./settings/product-subscription/index.js";import c from"./settings/product-title/ProductTitle.js";import n from"./settings/product-price/ProductPrice.js";import
|
|
1
|
+
import t from"./settings/product-discount-tag/ProductDiscountTag.js";import o from"./settings/product-description/ProductDescription.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";import"./constants/index.js";import"./components/product-subscription/types.js";import"@gem-sdk/system";import"next/link";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import r from"./settings/product-variants/ProductVariant.js";import s from"./settings/product-price-breakdown/index.js";import i from"./settings/product-image/ProductImages.js";import e from"./settings/product-subscription/index.js";import c from"./settings/product-title/ProductTitle.js";import n from"./settings/product-price/ProductPrice.js";import m from"./settings/product-quantity/index.js";import"./components/product-variant/components/variants/VariantItem.js";import p from"./settings/product-offer/index.js";import u from"./settings/accept-button/index.js";import"../../common/const.js";import"react-youtube";import"../../image/common/listImageContext.js";import"../../image/common/listContext.js";import"next/head";import"../image/components/Img.js";let a={PostPurchaseProductTitle:c,PostPurchaseProductDescription:o,PostPurchaseProductPrice:n,PostPurchaseProductVariants:r,PostPurchaseAcceptButton:u,PostPurchaseProductQuantity:m,PostPurchaseProductPriceBreakdown:s,PostPurchaseProductOffer:p,PostPurchaseProductDiscountTag:t,PostPurchaseProductImages:i,PostPurchaseProductSubscription:e};export{a as postPurchaseProductSetting};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import t from"../../../carousel-v3/components/item/CarouselItem.js";import o from"../../../carousel-v3/components/root/Carousel.js";import{isFeatureMedia as i}from"./common/productFeaturedImage.js";import l from"../../../image/components/NextImage.js";import{useFeaturedImageGlobal as s,cls as r}from"@gem-sdk/core";import"../../../modal/components/confirm.js";import m from"../../../modal/components/Modal.js";import{useMemo as n}from"react";let d=({builderPropUID:
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import t from"../../../carousel-v3/components/item/CarouselItem.js";import o from"../../../carousel-v3/components/root/Carousel.js";import{isFeatureMedia as i}from"./common/productFeaturedImage.js";import l from"../../../image/components/NextImage.js";import{useFeaturedImageGlobal as s,cls as r}from"@gem-sdk/core";import"../../../modal/components/confirm.js";import m from"../../../modal/components/Modal.js";import{useMemo as n}from"react";let d={desktop:"finest"},p=({builderPropUID:p,productImages:a,open:c,imageRatio:g,onHandleClose:h})=>{let b=s(),u=n(()=>{let e=a?.findIndex(e=>e.id===b?.id);return e&&e>0?e:0},[a,b]),f={desktop:a&&a.length>1,mobile:a&&a?.length>1,tablet:a&&a?.length>1};return e(m,{setting:{open:c},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>h(),disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2",children:e(o,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:u,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},controlOverContent:{desktop:!0,mobile:!0,tablet:!0},arrow:f},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:u,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:p},children:a?.map(o=>e(t,{className:`gem-slider-item gem-slider-item-${p} gp-flex gp-items-center gp-justify-center gp-px-4`,children:e(l,{src:i(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:g,qualityType:d},className:r("gp-h-full gp-w-full gp-object-contain")},o?.id)},o?.id))})})};export{p as default};
|
package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{isFeatureMedia as h,getZoomImageClass as
|
|
2
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{isFeatureMedia as h,getZoomImageClass as p,getZoomLenClass as f}from"../../common/productFeaturedImage.js";import m from"../../../../../image/components/NextImage.js";import u from"./ProductFeatureVideo.js";import{memo as y,useMemo as g}from"react";import d from"./MediaIcon.js";let T={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var w=y(({image:y,imageShowWhenHover:w,setting:v,aspectRatio:E})=>{let b=o(),I=i(),q=a(e=>e.storefrontUrl),{isEditMode:P,isPreviewSharePageMode:k}=c(),x=g(()=>"none"!==n(v.ftClickOpenLightBox,I),[I,v.ftClickOpenLightBox]),L=g(()=>!P&&["VIDEO","EXTERNAL_VIDEO"].includes(y?.contentType||"")&&!x,[P,y?.contentType,x]),N=g(()=>y?{...y,src:L?y.src:h(y?.contentType)?y?.previewImage:y.src}:T,[y,L]),O=g(()=>{if(k)return"javascript:void(0)";if(!q)return"#";let e=new URL(q);return b?`${e.protocol}//${e.host}/products/${b.handle}`:"#"},[q,b,k]),j=g(()=>v?.hoverEffect!=="none"&&!h(N?.contentType),[N?.contentType,v?.hoverEffect]),z=g(()=>v?.hoverEffect=="zoom"&&v?.zoomType=="glasses"&&!h(N?.contentType),[N?.contentType,v?.hoverEffect,v?.zoomType]);return e(t,{children:(t=>{if("product-link"===n(v.ftClickOpenLightBox,I)){let r=v.ftClickOpenNewTab?"_blank":"_self";return e("a",{title:b?.title,href:O,className:"gp-w-full",target:r,children:t})}return t})(e(t,{children:L?e(u,{type:N?.contentType,url:N.src??"",aspectRatio:E}):r(t,{children:[e(m,{sizeTarget:"ProductFeatureImage",listAware:!0,src:N.src,width:N?.width,height:N?.height,alt:N?.alt,setting:{qualityType:v?.qualityType,qualityPercent:v?.qualityPercent,aspectRatio:E,layout:v?.ftLayout},priority:v?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(d,{contentType:N?.contentType??""}),j&&e(m,{sizeTarget:"ProductFeatureImage",listAware:!0,src:v?.hoverEffect==="other"?w?.src:N.src,width:v?.hoverEffect==="other"?w?.width:N.width,height:v?.hoverEffect==="other"?w?.height:N.height,alt:v?.hoverEffect==="other"?w?.alt:N.alt,setting:{qualityType:v?.qualityType,qualityPercent:v?.qualityPercent,layout:v.ftLayout,aspectRatio:E},style:{width:"100%",height:"100%"},className:l("hover-image featured-image-only !gp-max-w-none",p()),priority:v?.preload}),z&&e("div",{className:l(f(),"room-len"),style:{...s({bgi:`url("${N?.src}")`})}})]})}))})});export{w as default};
|
package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{isFeatureMedia as r,getZoomImageClass as a,getZoomLenClass as i}from"../../common/productFeaturedImage.js";import{getProductImagesClassName as l}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as m}from"../../composables/getProductImagesStyles.js";import{useCurrentDevice as s,cls as c,getResponsiveValueByScreen as n,makeStyle as d}from"@gem-sdk/core";import{handleMouseOut as p,handleMouseMove as y}from"../../common/hoverAction.js";import{useProductGalleryGrid as g}from"../../hooks/useProductGalleryGrid.js";import u from"../../../../../image/components/NextImage.js";import h from"../lightbox/ButtonOpenLightBox.js";import{getAspectRatio as f}from"../../common/common.js";import v from"./MediaIcon.js";import{memo as T}from"react";var j=T(T=>{let{builderPropUID:j,productImages:w,onHandleClick:P,activeIndexFormFeatureImage:q,children:I,isHiddenInteraction:x,...b}=T,{isDisplay:N,shapeByLayout:z,imageActiveIndex:k,enableOpenLightBox:A,isEnableBorderActive:E,filteredProductImages:G}=g(T),M=s(),{galleryGridWrapperClasses:$,galleryItemClasses:B}=l(b),{galleryGridStyles:F,galleryGridItemStyles:H}=m(b);return e(t,{children:N&&o("div",{"data-slot":"children","data-id":j,className:$,style:F,"gp-data-hidden":`${x}`,children:[G?.map((t,l)=>{let m=l===k,s=r(t.contentType)?t.previewImage:t.src;return o("div",{"aria-hidden":!0,className:B(`gem-slider-item-${j} ${m&&E?"gem-slider-item-active":""}`),onClick:()=>P(t?.id||"",A),style:H,onMouseMove:e=>y(e,{hoverEffect:b.galleryHoverEffect,zoom:b.galleryZoom,zoomType:b.galleryZoomType}),onMouseOut:e=>p(e),"data-border":m&&b?.borderActive?"active":"deactive",children:[e(u,{sizeTarget:"ProductFeatureImage",listAware:!0,src:s,width:t?.width,height:t?.height,alt:t?.alt,setting:{qualityType:b?.qualityType,qualityPercent:b?.qualityPercent,aspectRatio:f(z),layout:b?.layout},style:{width:"100%",height:"100%"}},t?.id),e(v,{contentType:t?.contentType||""}),b?.galleryHoverEffect!=="none"&&!r(t?.contentType)&&e(u,{sizeTarget:"ProductFeatureImage",listAware:!0,src:s,width:t?.width,height:t?.height,alt:t?.alt,setting:{qualityType:b?.qualityType,qualityPercent:b?.qualityPercent,layout:b.layout,aspectRatio:f(z)},className:c("hover-image !gp-max-w-none",a())}),b?.galleryHoverEffect=="zoom"&&b?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(n(b.position,M)||"")&&!r(t?.contentType)&&e("div",{className:c(i(),"room-len"),style:{...d({bgi:`url("${t?.src}")`})}}),n(b?.clickOpenLightBox,M)&&e(h,{})]},t?.id)}),I]})})});export{j as default};
|
package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{getProductImagesClassName as r}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as s}from"../../composables/getProductImagesStyles.js";import{getProductImagesAttr as i}from"../../composables/getProductImagesAttr.js";import{getEditorMinHeightClass as m}from"../../common/productGallery.js";import{useGalleryCarousel as a}from"../../hooks/useGalleryCarousel.js";import{isFeatureMedia as l}from"../../common/productFeaturedImage.js";import c from"../../../../../image/components/NextImage.js";import
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{getProductImagesClassName as r}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as s}from"../../composables/getProductImagesStyles.js";import{getProductImagesAttr as i}from"../../composables/getProductImagesAttr.js";import{getEditorMinHeightClass as m}from"../../common/productGallery.js";import{useGalleryCarousel as a}from"../../hooks/useGalleryCarousel.js";import{isFeatureMedia as l}from"../../common/productFeaturedImage.js";import c from"../../../../../image/components/NextImage.js";import n from"../../../../../carousel/components/item/CarouselItem.js";import d from"../../../../../carousel/components/root/Carousel.js";import p from"../lightbox/ButtonOpenLightBox.js";import{getAspectRatio as u}from"../../common/common.js";import{useCurrentDevice as g}from"@gem-sdk/core";import y from"../child/MediaIcon.js";import{If as h}from"@gem-sdk/system";let f=f=>{let{builderPropUID:j,productImages:I,activeIndexFormFeatureImage:b,onClickFeatureArrow:C,builderPropsClass:P,arrow:T,priorityFeatureImage:v,...w}=f,x=g(),{galleryItemClasses:A}=r(w),{galleryCarouselSettingAttrs:k}=i(w),{galleryCarouselStyle:q,galleryCarouselItemStyle:G}=s(w),{moveToIdx:N,isDisplay:L,shapeByLayout:$,isEnableBorderActive:B,isShowButtonLightbox:M,filteredProductImages:z,handleClickCarouselItem:D,safeMoveToIdx:F,setSliderReady:H}=a(f);return e(t,{children:L&&e(d,{parentClass:P,rootClass:P,setting:k,styles:q,slidesClass:m(x,w.position,w.navigationPosition),builderProps:{uid:`${j}-carousel`},moveToIdx:F,isHiddenArrowWhenDisabled:!0,disableMarginAuto:!0,onLoaded:e=>{e&&H(!0)},children:z?.map((t,r)=>{let s=r===N,i=l(t.contentType)?t.previewImage:t.src;return o(n,{contentType:"productImage",className:A(`gp-gallery-image-item gem-slider-item-${j} ${s&&B?"gem-slider-item-active":""}`),onClickItem:()=>D(t?.id),style:G,"data-id":t?.id,"data-border":s&&w?.borderActive?"active":"deactive",children:[e(c,{sizeTarget:"GalleryList",listAware:!0,src:i,width:t?.width,height:t?.height,alt:t?.alt,setting:{aspectRatio:u($),layout:w?.layout,qualityPercent:w?.qualityPercent,qualityType:w?.qualityType},style:{width:"100%",height:"100%",cursor:"pointer"},className:"product-list-image"}),e(y,{contentType:t?.contentType||""}),h(M,e(p,{}))]},t?.id)})})})};export{f as default};
|
package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import{isFeatureMedia as n}from"../../common/productFeaturedImage.js";import
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import{isFeatureMedia as n}from"../../common/productFeaturedImage.js";import d from"../../../../../image/components/NextImage.js";import r from"../../../../../carousel/components/item/CarouselItem.js";import p from"../../../../../carousel/components/root/Carousel.js";import m from"../child/ProductFeatureVideo.js";import"../../../../../modal/components/confirm.js";import a from"../../../../../modal/components/Modal.js";import c from"../child/MediaIcon.js";import{useMemo as g}from"react";let h={desktop:"finest"},u=({builderPropUID:u,productImages:b,open:f,imageRatio:k,onHandleClose:y})=>{let E=i(),I=g(()=>{let e=b?.findIndex(e=>e.id===E?.id);return e&&e>0?e:0},[b,E]),j={desktop:b&&b.length>1,mobile:b&&b?.length>1,tablet:b&&b?.length>1},C=l(),T=e=>"edit"!==C&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(a,{setting:{open:f},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{y(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(p,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:I,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24}},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:I,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:u},fullHeight:!0,children:b?.map(i=>e(r,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:T(i)?e(m,{type:i?.contentType,url:i.src??"",aspectRatio:k}):t(o,{children:[e(d,{src:n(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:k,qualityType:h},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(c,{contentType:i?.contentType??""})]})},i?.id))})})};export{u as default};
|
package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{isFeatureMedia as
|
|
2
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{isFeatureMedia as p,getZoomImageClass as h,getZoomLenClass as f}from"../../common/productFeaturedImage.js";import m from"../../../../../image/components/NextImage.js";import u from"./ProductFeatureVideo.js";import{memo as y,useMemo as g,useCallback as d}from"react";import T from"./MediaIcon.js";let v={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var w=y(({image:y,imageShowWhenHover:w,setting:E,aspectRatio:I})=>{let b=o(),q=i(),P=a(e=>e.storefrontUrl),{isEditMode:k,isPreviewSharePageMode:x}=c(),L=g(()=>"none"!==n(E.ftClickOpenLightBox,q),[q,E.ftClickOpenLightBox]),N=g(()=>!k&&["VIDEO","EXTERNAL_VIDEO"].includes(y?.contentType||"")&&!L,[k,y?.contentType,L]),O=g(()=>y?{...y,src:N?y.src:p(y?.contentType)?y?.previewImage:y.src}:v,[y,N]),j=g(()=>{if(x)return"javascript:void(0)";if(!P)return"#";let e=new URL(P);return b?`${e.protocol}//${e.host}/products/${b.handle}`:"#"},[P,b,x]),z=g(()=>E?.hoverEffect!=="none"&&!p(O?.contentType),[O?.contentType,E?.hoverEffect]),A=g(()=>E?.hoverEffect=="zoom"&&E?.zoomType=="glasses"&&!p(O?.contentType),[O?.contentType,E?.hoverEffect,E?.zoomType]),F=d(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),R=g(()=>w?"other"!==E.hoverEffect?F(O):F(w):v.src,[w,O,E.hoverEffect,F]);return e(t,{children:(t=>{if("product-link"===n(E.ftClickOpenLightBox,q)){let r=E.ftClickOpenNewTab?"_blank":"_self";return e("a",{title:b?.title,href:j,className:"gp-w-full",target:r,children:t})}return t})(e(t,{children:N?e(u,{type:O?.contentType,url:O.src??"",thumbnail:O?.previewImage,aspectRatio:I}):r(t,{children:[e(m,{sizeTarget:"ProductFeatureImage",listAware:!0,src:O.src,width:O?.width,height:O?.height,alt:O?.alt,setting:{qualityType:E?.qualityType,qualityPercent:E?.qualityPercent,aspectRatio:I,layout:E?.ftLayout},priority:E?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(T,{contentType:O?.contentType??""}),z&&e(m,{sizeTarget:"ProductFeatureImage",listAware:!0,src:R,width:E?.hoverEffect==="other"?w?.width:O.width,height:E?.hoverEffect==="other"?w?.height:O.height,alt:E?.hoverEffect==="other"?w?.alt:O.alt,setting:{qualityType:E?.qualityType,qualityPercent:E?.qualityPercent,layout:E.ftLayout,aspectRatio:I},style:{width:"100%",height:"100%"},className:l("hover-image featured-image-only !gp-max-w-none",h()),priority:E?.preload}),A&&e("div",{className:l(f(),"room-len"),style:{...s({bgi:`url("${O?.src}")`})}})]})}))})});export{w as default};
|
package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{isFeatureMedia as r,getZoomImageClass as i,getZoomLenClass as a}from"../../common/productFeaturedImage.js";import{getProductImagesClassName as l}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as m}from"../../composables/getProductImagesStyles.js";import{useCurrentDevice as c,useRenderMode as s,getResponsiveValueByScreen as n,cls as d,makeStyle as p}from"@gem-sdk/core";import{handleMouseOut as y,handleMouseMove as g}from"../../common/hoverAction.js";import{useProductGalleryGrid as u}from"../../hooks/useProductGalleryGrid.js";import h from"../../../../../image/components/NextImage.js";import f from"../lightbox/ButtonOpenLightBox.js";import v from"./ProductFeatureVideo.js";import{getAspectRatio as T}from"../../common/common.js";import w from"./MediaIcon.js";import{memo as j}from"react";var I=j(j=>{let{builderPropUID:I,productImages:P,onHandleClick:b,activeIndexFromFeatureImage:q,children:E,isHiddenInteraction:x,...N}=j,{isDisplay:z,shapeByLayout:A,imageActiveIndex:O,enableOpenLightBox:k,isEnableBorderActive:F,filteredProductImages:G}=u(j),M=c(),{isEditMode:R}=s(),$=n(N.position,M)||"",B=["one-col","two-col"].includes($),H="bottom-center"===$,{galleryGridWrapperClasses:L,galleryItemClasses:V}=l(N),{galleryGridStyles:Z,galleryGridItemStyles:C}=m(N),D=H?"none":N.galleryHoverEffect;return e(t,{children:z&&o("div",{"data-slot":"children","data-id":I,className:L,style:Z,"gp-data-hidden":`${x}`,children:[G?.map((l,m)=>{let c=m===O,s=r(l.contentType)?l.previewImage:l.src,u=!R&&B&&!k&&["VIDEO","EXTERNAL_VIDEO"].includes(l?.contentType||"");return o("div",{"aria-hidden":!0,className:V(`gp-gallery-image-item gem-slider-item-${I} ${c&&F?"gem-slider-item-active":""}`),onClick:()=>b(l?.id||"",k),style:C,onMouseMove:e=>g(e,{hoverEffect:D,zoom:N.galleryZoom,zoomType:N.galleryZoomType}),onMouseOut:e=>y(e),"data-border":c&&N?.borderActive?"active":"deactive",children:[u?e(v,{type:l?.contentType,url:l?.src??"",thumbnail:l?.previewImage,aspectRatio:T(A)}):o(t,{children:[e(h,{sizeTarget:"ProductFeatureImage",listAware:!0,src:s,width:l?.width,height:l?.height,alt:l?.alt,setting:{qualityType:N?.qualityType,qualityPercent:N?.qualityPercent,aspectRatio:T(A),layout:N?.layout},style:{width:"100%",height:"100%"}},l?.id),e(w,{contentType:l?.contentType||""})]}),N?.galleryHoverEffect!=="none"&&!r(l?.contentType)&&e(h,{sizeTarget:"ProductFeatureImage",listAware:!0,src:s,width:l?.width,height:l?.height,alt:l?.alt,setting:{qualityType:N?.qualityType,qualityPercent:N?.qualityPercent,layout:N.layout,aspectRatio:T(A)},className:d("hover-image !gp-max-w-none",i())}),N?.galleryHoverEffect=="zoom"&&N?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(n(N.position,M)||"")&&!r(l?.contentType)&&e("div",{className:d(a(),"room-len"),style:{...p({bgi:`url("${l?.src}")`})}}),n(N?.clickOpenLightBox,M)&&e(f,{})]},l?.id)}),E]})})});export{I as default};
|
package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import r from"../../../../../carousel-v3/components/item/CarouselItem.js";import s from"../../../../../carousel-v3/components/root/Carousel.js";import{getProductImagesClassName as
|
|
1
|
+
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import r from"../../../../../carousel-v3/components/item/CarouselItem.js";import s from"../../../../../carousel-v3/components/root/Carousel.js";import{getProductImagesClassName as i}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as m}from"../../composables/getProductImagesStyles.js";import{getProductImagesAttr as a}from"../../composables/getProductImagesAttr.js";import{getEditorMinHeightClass as l}from"../../common/productGallery.js";import{useGalleryCarousel as n}from"../../hooks/useGalleryCarousel.js";import{isFeatureMedia as c}from"../../common/productFeaturedImage.js";import p from"../../../../../image/components/NextImage.js";import d from"../lightbox/ButtonOpenLightBox.js";import{getAspectRatio as u,getGalleryCarouselRootId as g}from"../../common/common.js";import{useCurrentDevice as y}from"@gem-sdk/core";import h from"../child/MediaIcon.js";import{If as f}from"@gem-sdk/system";let j=j=>{let{builderPropUID:I,productImages:C,onSwiperReady:b,activeIndexFormFeatureImage:P,onClickFeatureArrow:T,builderPropsClass:w,carouselInstanceUID:v,arrow:x,priorityFeatureImage:k,...q}=j,A=y(),{galleryItemClasses:G}=i(q),{galleryCarouselSettingAttrs:N}=a(q),{galleryCarouselStyle:L,galleryCarouselItemStyle:S}=m(q),{moveToIdx:$,isDisplay:B,shapeByLayout:H,isEnableBorderActive:M,isShowButtonLightbox:R,filteredProductImages:z,handleClickCarouselItem:D,safeMoveToIdx:E,setSliderReady:F}=n(j);return e(o,{children:B&&e(s,{parentClass:w,rootClass:w,setting:N,styles:L,slidesClass:l(A,q.position,q.navigationPosition),builderProps:{uid:`${I}-carousel`},rootId:g({carouselInstanceUID:v,builderPropUID:I}),moveToIdx:E,isHiddenArrowWhenDisabled:!0,disableMarginAuto:!0,isEnableCheckHasScrollableContent:!0,onLoaded:e=>{e&&F(!0)},onSwiperReady:b,children:z?.map((o,s)=>{let i=c(o.contentType)?o.previewImage:o.src;return t(r,{contentType:"productImage",className:G(`gp-gallery-image-item gem-slider-item-${I} ${s===$&&M?"gem-slider-item-active":""}`),onClickItem:()=>D(o?.id),style:S,"data-id":o?.id,children:[e(p,{sizeTarget:"GalleryList",listAware:!0,src:i,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:u(H),layout:q?.layout,qualityPercent:q?.qualityPercent,qualityType:q?.qualityType},style:{width:"100%",height:"100%",cursor:"pointer"},className:"product-list-image"}),e(h,{contentType:o?.contentType||""}),f(R,e(d,{}))]},o?.id)})})})};export{j as default};
|
package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import i from"../../../../../carousel-v3/components/item/CarouselItem.js";import l from"../../../../../carousel-v3/components/root/Carousel.js";import{useFeaturedImageGlobal as s,useEditorMode as d,cls as n}from"@gem-sdk/core";import{isFeatureMedia as r}from"../../common/productFeaturedImage.js";import p from"../../../../../image/components/NextImage.js";import m from"../child/ProductFeatureVideo.js";import"../../../../../modal/components/confirm.js";import a from"../../../../../modal/components/Modal.js";import c from"../child/MediaIcon.js";import{useMemo as g}from"react";let h=({builderPropUID:
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import i from"../../../../../carousel-v3/components/item/CarouselItem.js";import l from"../../../../../carousel-v3/components/root/Carousel.js";import{useFeaturedImageGlobal as s,useEditorMode as d,cls as n}from"@gem-sdk/core";import{isFeatureMedia as r}from"../../common/productFeaturedImage.js";import p from"../../../../../image/components/NextImage.js";import m from"../child/ProductFeatureVideo.js";import"../../../../../modal/components/confirm.js";import a from"../../../../../modal/components/Modal.js";import c from"../child/MediaIcon.js";import{useMemo as g}from"react";let h={desktop:"finest"},u=({builderPropUID:u,productImages:b,open:f,imageRatio:y,onHandleClose:k})=>{let E=s(),I=g(()=>{let e=b?.findIndex(e=>e.id===E?.id);return e&&e>0?e:0},[b,E]),j={desktop:b&&b.length>1,mobile:b&&b?.length>1,tablet:b&&b?.length>1},v=d(),C=e=>"edit"!==v&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(a,{setting:{open:f},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(l,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:I,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:I},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:I,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:b?.map(l=>e(i,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:C(l)?e(m,{type:l?.contentType,url:l.src??"",thumbnail:l?.previewImage,aspectRatio:y}):t(o,{children:[e(p,{src:r(l?.contentType)?l?.previewImage:l?.src,width:l?.width,height:l?.height,alt:l?.alt,"content-type":l?.contentType,setting:{aspectRatio:y,qualityType:h},className:n("gp-h-full gp-w-full gp-object-contain")},l?.id),e(c,{contentType:l?.contentType??""})]})},l?.id))})})};export{u 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,4 +1,4 @@
|
|
|
1
|
-
import{getListImagePriorityLiquid as o,LIST_PRELOAD_ROWS as t}from"
|
|
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
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 -%}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"
|
|
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 -%}
|
|
@@ -6,7 +6,7 @@ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../imag
|
|
|
6
6
|
${v.item}
|
|
7
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
8
|
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
-
${o({...
|
|
9
|
+
${o({...n})}
|
|
10
10
|
{%- endif -%}
|
|
11
11
|
{% endfor %}
|
|
12
12
|
${v.reset}
|
|
@@ -17,13 +17,13 @@ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../imag
|
|
|
17
17
|
<div>${s("ProductList","no_products_found")}</div>
|
|
18
18
|
{%- endif -%}
|
|
19
19
|
{%- endif -%}
|
|
20
|
-
`;return
|
|
20
|
+
`;return e`
|
|
21
21
|
<div
|
|
22
22
|
${h}
|
|
23
23
|
style="${g}"
|
|
24
24
|
class="${$}"
|
|
25
25
|
>
|
|
26
|
-
${
|
|
26
|
+
${r(p?.sameHeight,e`
|
|
27
27
|
<gp-same-height
|
|
28
28
|
class="gp-contents"
|
|
29
29
|
style="visibility: hidden"
|
|
@@ -33,6 +33,6 @@ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../imag
|
|
|
33
33
|
${`${_()}`}
|
|
34
34
|
</gp-same-height>
|
|
35
35
|
`)}
|
|
36
|
-
${
|
|
36
|
+
${r(!p?.sameHeight,e`${_()}`)}
|
|
37
37
|
</div>
|
|
38
|
-
`};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,24 +1,24 @@
|
|
|
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
|
|
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
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
|
-
${
|
|
7
|
+
${P.item}
|
|
8
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
9
9
|
{%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
|
|
10
10
|
${o({builderProps:{...m},style:_,parentId:`product-list-carousel-${m?.uid} gp-child-item-${m?.uid}`,parentStyle:$,parentSettings:g,background:g?.background,children:`
|
|
11
|
-
${
|
|
11
|
+
${e({...n})}
|
|
12
12
|
`})}
|
|
13
13
|
{%- endif -%}
|
|
14
14
|
{% endfor %}
|
|
15
|
-
${
|
|
15
|
+
${P.reset}
|
|
16
16
|
{%- if count == 0 and ${f.length} == 0 -%}
|
|
17
17
|
{% if '${a}' == 'RelatedProduct' -%}
|
|
18
|
-
<div>${
|
|
18
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
19
19
|
{% else %}
|
|
20
|
-
<div>${
|
|
20
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
21
21
|
{%- endif -%}
|
|
22
22
|
{%- endif -%}
|
|
23
23
|
`,carouselType:"product_list"})}
|
|
24
|
-
`};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,4 +1,4 @@
|
|
|
1
|
-
import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"
|
|
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 -%}
|
|
@@ -6,7 +6,7 @@ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../imag
|
|
|
6
6
|
${v.item}
|
|
7
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
8
|
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
-
${o({...
|
|
9
|
+
${o({...n})}
|
|
10
10
|
{%- endif -%}
|
|
11
11
|
{% endfor %}
|
|
12
12
|
${v.reset}
|
|
@@ -17,13 +17,13 @@ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../imag
|
|
|
17
17
|
<div>${s("ProductList","no_products_found")}</div>
|
|
18
18
|
{%- endif -%}
|
|
19
19
|
{%- endif -%}
|
|
20
|
-
`;return
|
|
20
|
+
`;return e`
|
|
21
21
|
<div
|
|
22
22
|
${h}
|
|
23
23
|
style="${g}"
|
|
24
24
|
class="${$}"
|
|
25
25
|
>
|
|
26
|
-
${
|
|
26
|
+
${r(p?.sameHeight,e`
|
|
27
27
|
<gp-same-height
|
|
28
28
|
class="gp-contents"
|
|
29
29
|
style="visibility: hidden"
|
|
@@ -33,6 +33,6 @@ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../imag
|
|
|
33
33
|
${`${_()}`}
|
|
34
34
|
</gp-same-height>
|
|
35
35
|
`)}
|
|
36
|
-
${
|
|
36
|
+
${r(!p?.sameHeight,e`${_()}`)}
|
|
37
37
|
</div>
|
|
38
|
-
`};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,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,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};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ type ImageProps = BasePropsWrap<ImageSettingProps$1, ImageStyleProps$1> & {
|
|
|
176
176
|
onLoad?: React.ReactEventHandler<any>;
|
|
177
177
|
} & {
|
|
178
178
|
advanced?: any;
|
|
179
|
-
}
|
|
179
|
+
} & Pick<ImageSizeProps, 'sizeTarget'>;
|
|
180
180
|
type ImageLiquidProps = ImageProps & Pick<ImageSizeProps, 'sizeTarget'> & {
|
|
181
181
|
pageContext?: PageContext;
|
|
182
182
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "23.0.0-staging.
|
|
3
|
+
"version": "23.0.0-staging.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"post:publish": "node ./scripts/convert-publish.js",
|
|
20
20
|
"pre:publish": "node ./scripts/convert-publish.js -p",
|
|
21
21
|
"relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/element-relationship/index.js",
|
|
22
|
-
"test": "jest -c ./../../helpers/jest.config.ts",
|
|
22
|
+
"test": "jest -c ./../../helpers/jest.config.ts && yarn test:data",
|
|
23
23
|
"test:data": "NODE_OPTIONS=--experimental-vm-modules GP_BASE_ASSET_URL=https://assets.gemcommerce.xyz jest -c ./../../helpers/jest.config.ts --testPathPatterns data.liquid.test",
|
|
24
24
|
"test:data:update": "yarn test:data -u",
|
|
25
25
|
"test:watch": "jest -c ./../../helpers/jest.config.ts --watch",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react-youtube": "10.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@gem-sdk/core": "23.0.0-staging.
|
|
37
|
+
"@gem-sdk/core": "23.0.0-staging.12",
|
|
38
38
|
"@gem-sdk/styles": "23.0.0-staging.9",
|
|
39
39
|
"@gem-sdk/system": "23.0.0-staging.1",
|
|
40
40
|
"@shopify/prettier-plugin-liquid": "^1.10.3",
|