@gem-sdk/components 19.0.0-staging.6 → 19.0.0-staging.61
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/builder.js +1 -1
- package/dist/cjs/carousel-v3/common/selectors.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +1 -1
- package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/cjs/carousel-v3/components/root/common/attrs.js +1 -1
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel-v3/index.js +1 -1
- package/dist/cjs/carousel-v3/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/code/common/helpers.js +1 -0
- package/dist/cjs/code/hooks/useCSSCode.js +4 -10
- package/dist/cjs/estimate-delivery/common/helpers.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +2 -2
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +10 -10
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +1 -1
- package/dist/cjs/post-purchase/link/components/PostPurchaseLink.js +1 -1
- package/dist/cjs/post-purchase/link/settings/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/link/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-variant/components/variants/DropdownOption.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +12 -12
- package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +7 -5
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +11 -8
- package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +2 -3
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/ProductImageV3.js +2 -2
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/getBorderActiveCss.js +3 -2
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.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 -2
- 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 +29 -29
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.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/gallery-carousel/GalleryCarousel.liquid.js +8 -8
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +6 -6
- package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +12 -9
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/cjs/third-party/components/EcomsendBackInStockAlert.js +1 -1
- package/dist/cjs/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/cjs/third-party/configs/EcomsendBackInStockAlert.js +1 -1
- package/dist/cjs/third-party/index.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/cjs/third-party/settings/EcomsendBackInStockAlert/index.js +4 -4
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +13 -13
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/builder.js +1 -1
- package/dist/esm/carousel-v3/common/selectors.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +4 -4
- package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/esm/carousel-v3/components/root/common/attrs.js +1 -1
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel-v3/index.js +1 -1
- package/dist/esm/carousel-v3/settings/configs/ui-v2.js +1 -1
- package/dist/esm/code/common/helpers.js +1 -0
- package/dist/esm/code/hooks/useCSSCode.js +4 -10
- package/dist/esm/estimate-delivery/common/helpers.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +11 -11
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
- package/dist/esm/image/components/Image.liquid.js +10 -10
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +12 -12
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/post-purchase/link/components/PostPurchaseLink.js +1 -1
- package/dist/esm/post-purchase/link/settings/configs/settings.js +1 -1
- package/dist/esm/post-purchase/link/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/esm/post-purchase/product/components/product-variant/components/variants/DropdownOption.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
- package/dist/esm/product/components/product-badge/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +11 -8
- package/dist/esm/product/components/product-button/common/helpers.js +1 -1
- package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +3 -4
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/ProductImageV3.js +2 -2
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/esm/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/getBorderActiveCss.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.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 -2
- 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 +45 -45
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/esm/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.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/gallery-carousel/GalleryCarousel.liquid.js +14 -14
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +9 -9
- package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/esm/product/components/product-wrap/Product.liquid.js +16 -13
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/esm/third-party/components/EcomsendBackInStockAlert.js +1 -1
- package/dist/esm/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/esm/third-party/configs/EcomsendBackInStockAlert.js +1 -1
- package/dist/esm/third-party/index.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/esm/third-party/settings/EcomsendBackInStockAlert/index.js +4 -4
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +14 -14
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +10 -10
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +44 -14
- package/package.json +5 -5
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{dataStringify as e,sanitizeLiquid as t,RenderIf as s,template as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as o,getSettingPreloadData as c}from"../../../helpers.js";import{generateBadgeContent as n}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as
|
|
1
|
+
import{dataStringify as e,sanitizeLiquid as t,RenderIf as s,template as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as o,getSettingPreloadData as c}from"../../../helpers.js";import{generateBadgeContent as n}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as d}from"./utils/renderBadgeLiquid.js";import{createClass as p,createStyle as l,createAttr as u,createStateOrContext as m}from"@gem-sdk/system";import{IS_LIQUID as g}from"./constants.js";import{getContainerStyle as y,getSubWrapperStyle as $,getContentStyleInternal as v,getTextBadgeWrapperStyles as f,getTextContentStyle as j,getImageContainerStyles as P}from"./common/styles.js";import{getContainerClasses as S,getWrapperClasses as D,getSubWrapperClass as V,getTextContainerClasses as b,getTextWrapperClasses as h,getTextContentClasses as C,getImageContainerClasses as I,getImageClasses as L}from"./common/classes.js";import{getSubWrapperAttrs as T,getContainerAttrs as k,getTextContentAttrs as q,getImageAttr as A}from"./common/attrs.js";import{checkDiscountContentProductBadge as E}from"./utils/common.js";import{ProductBadge as K}from"../../settings/product-badge/configs/translate.js";let N=N=>{let{styles:_,setting:B,builderProps:O,pageContext:Q}=N,w=B?.shape!=="image",G=w&&B?.displayContent?.trim()==="",H=E(B?.displayContent),J=p({...S({isInstant:!1,props:N})}),x=l({...y(N,g)}),M=p({...D(N)}),R=p({...V(N)}),Y=l({...$({props:N})}),z=u({...T(N)}),F=v(N),U=p({...b()}),W=u({...k(N)}),X=p({...h()}),Z=l({...f({setting:B,styles:_})}),ee=p({...C(_)}),et=l({...j({setting:B,styles:_})}),es=u({...q()}),ei=p({...I()}),er=l({...P({setting:B,styles:_})}),ea=p({...L()}),eo=u({...A({setting:B})}),ec=m({minPrice:"{{ minPriceValue | replace: '\"', '\\\"' | escape }}",variantIDs:'{{ product.variants | map: "id" | json | escape }}',variantInventoryQuantities:'{{ product.variants | map: "inventory_quantity" | json | escape }}',amountDiscount:"{{amountDiscountValue | replace: '\"', '\\\"' | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:JSON.parse(JSON.stringify(B?.displayTrigger).replaceAll("'","'")),uid:N.builderProps?.uid,productCreatedAt:'{{product.created_at | date: "%Y-%m-%d" }}',productTags:"{{ product.tags | join: \",\" | replace: '\"', '\\\"' | escape }}",isTextBadge:w,isSettingSameHeightProductList:"{{ isSettingSameHeightProductList }}"}),{displayContent:en}=B??{},ed=o({val:en?.trim(),uid:O?.uid,settingId:K?.displayContent?.id,isLiquid:!0,pageContext:Q});return i`
|
|
2
2
|
{% if product %}
|
|
3
|
-
${n(
|
|
4
|
-
${
|
|
3
|
+
${n(ed,Q?.isPreviewing)}
|
|
4
|
+
${d(B?.displayTrigger,!G,H)}
|
|
5
5
|
<gp-product-badge
|
|
6
6
|
${{...W}}
|
|
7
7
|
gp-data='${e(ec)}'
|
|
8
|
-
class="${
|
|
9
|
-
style="${
|
|
10
|
-
data-display-content="${Q?.isPreviewing?
|
|
8
|
+
class="${J} {{ className }}"
|
|
9
|
+
style="${x}"
|
|
10
|
+
data-display-content="${Q?.isPreviewing?ed:t(`{{${ed}}}`)}"
|
|
11
11
|
>
|
|
12
|
-
<div class="${
|
|
12
|
+
<div class="${M}">
|
|
13
13
|
<div
|
|
14
|
-
${{...
|
|
15
|
-
class="${
|
|
16
|
-
style="${
|
|
14
|
+
${{...z}}
|
|
15
|
+
class="${R}"
|
|
16
|
+
style="${Y}"
|
|
17
17
|
>
|
|
18
|
-
<style>${
|
|
18
|
+
<style>${F}</style>
|
|
19
19
|
${s(w,i`
|
|
20
20
|
<div class="${U}">
|
|
21
21
|
<div
|
|
@@ -36,4 +36,4 @@ import{dataStringify as e,sanitizeLiquid as t,RenderIf as s,template as i,isLoca
|
|
|
36
36
|
</gp-product-badge>
|
|
37
37
|
${s(r,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
38
38
|
{% endif %}
|
|
39
|
-
`};export{
|
|
39
|
+
`};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e,composeTypographyClassName as t}from"@gem-sdk/core";import{toggleBadge as
|
|
1
|
+
import{composeClasses as e,composeTypographyClassName as t}from"@gem-sdk/core";import{toggleBadge as r}from"../utils/renderBadgeILP.js";import{getAlignShape as s,getShapePlacementClass as g}from"../utils/common.js";let l=({mode:t,isInstant:s,product:g,currentVariant:l,props:i,isSameHeightInProductList:p})=>{let{setting:o,builderProps:a}=i,n="gp-shrink-0 product-badge ",d=!t&&s?r({triggers:o?.displayTrigger,productDetail:g,productVariant:l,isSameHeightInProductList:p}):`${a?.uid}`,u=a?.builderData?.advanced?.cssClass||"";return d&&(n+=`${d} `),u&&(n+=`${u} `),a?.uid&&(n+=`${a?.uid} `),o?.positionWithImage==="inside"&&(n+="inside-image "),{...e(n)}},i=()=>({...e("gp-w-full gp-h-full gp-overflow-hidden product-badge-item")}),p=()=>({...e("gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center gp-overflow-hidden")}),o=r=>{let s="gp-break-words gp-text-center ",g=t(r?.typo);return g&&(s+=`${g} `),{...e(s)}},a=()=>({...e("product-badge-item gp-w-full gp-h-full gp-overflow-hidden")}),n=()=>({...e("gp-object-cover gp-w-full gp-h-full gp-pointer-events-none")}),d=t=>{let{styles:r,setting:g}=t,{align:l}=r??{},i=g?.positionWithImage==="outside",p=i?"gp-flex ":"gp-h-full",o=s(l);return i&&o&&(p+=`${o} `),{...e(p)}},u=(t,r)=>{let{setting:s,style:l}=t,i=s?.positionWithImage==="inside",p=!i&&r?g(i,l,r):"gp-h-full";return{...e(p)}};export{l as getContainerClasses,n as getImageClasses,a as getImageContainerClasses,u as getSubWrapperClass,i as getTextContainerClasses,o as getTextContentClasses,p as getTextWrapperClasses,d as getWrapperClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CompareType as e}from"../types.js";let t=(e,t,o)=>{let
|
|
1
|
+
import{CompareType as e}from"../types.js";let t=({triggers:e,productDetail:t,productVariant:o,isSameHeightInProductList:n})=>{let i=r(e,t,o);return i?"":n?"!gp-invisible":"!gp-hidden"},r=(e,t,r)=>{if(!r)return;let o=t?.createdAt||"",n=t?.tags||[],p={...r,product_created_at:o,product_tags:n},d=e?.map(e=>{switch(e?.triggerEvent){case"inventory_status":return i(p,e);case"discount_price":return a(p,e);case"price_range":return c(p,e);case"creation_date":return u(p,e);case"product_tags":return m(p,e);default:return!1}});return d?.every(e=>!0===e)},o=(e,t,r)=>{switch(r){case"exact":return e===t.from;case"above":return e>t.from;case"below":return e<t.from;case"exact_or_above":return e>=t.from;case"exact_or_below":return e<=t.from;case"between":return e>=t.from&&e<=t.to;default:return!1}},n=t=>t===e.ABOVE?0:t===e.BELOW?2:1,i=(t,r)=>{if(void 0===t.inventoryQuantity)return!1;if("in_stock"===r.type){if(!1===t.manageInventory||t.inventoryPolicy?.toLowerCase()=="continue")return!0;if(r.conditionType===e.BELOW||r.conditionType===e.EXACT_OR_BELOW){let i=n(r.conditionType);return o(t?.inventoryQuantity,{from:1,to:Number(r.from)-i+1},e.BETWEEN)}return o(t?.inventoryQuantity,{from:Number(r.from),to:Number(r?.to)},r.conditionType)}return!1!==t.manageInventory&&t.inventoryPolicy?.toLowerCase()!="continue"&&o(t.inventoryQuantity,{from:0,to:0},e.EXACT_OR_BELOW)},a=(e,t)=>{if(e?.compare_at_price===void 0||void 0===e.price||e.compare_at_price<e.price)return!1;let r=(e.compare_at_price-e.price)/100,n=r/(e.compare_at_price/100),i="fixed"===t.discountType?r:Math.round(100*n);return o(i,{from:Number(t.from),to:Number(t.to)},t.conditionType)},c=(e,t)=>{if(void 0===e.price)return!1;let r=e.price/100;return o(r,{from:Number(t.from),to:Number(t.to)},t.conditionType)},u=(t,r)=>{if(!t.product_created_at)return!1;let n=new Date(new Date(t.product_created_at).setHours(0,0,0,0)),i=new Date(r.from),a=new Date(r.to),c=n.getTime();if("exact_date"===r.type)return o(c,{from:i.getTime(),to:0},e.EXACT);if("duration"===r.type){let e=new Date().setHours(0,0,0,0),t=(e-n.getTime())/864e5;if(t>=0&&t<=Number(r.days))return!0}return!(i.getTime()>=a.getTime())&&o(c,{from:i.getTime(),to:a.getTime()},e.BETWEEN)},m=(e,t)=>{let r=e.product_tags||[],o=t.searchTag;return o.some(e=>r.includes(e))};export{r as checkShowBadge,t as toggleBadge};
|
|
@@ -27,10 +27,12 @@ import{CompareType as e}from"../types.js";let i=i=>i===e.ABOVE?0:i===e.BELOW?2:1
|
|
|
27
27
|
{% endif %}
|
|
28
28
|
{% if isShow and isNotDiscount == false %}
|
|
29
29
|
{% assign className = "" %}
|
|
30
|
+
{% elsif isSettingSameHeightProductList %}
|
|
31
|
+
{% assign className = "!gp-invisible" %}
|
|
30
32
|
{% else %}
|
|
31
33
|
{% assign className = "!gp-hidden" %}
|
|
32
34
|
{% endif %}
|
|
33
|
-
`,s=e=>e?.length?e.map(e=>{switch(e?.triggerEvent){case"discount_price":return t(e);case"price_range":return o(e);case"inventory_status":return g(e);case"product_tags":return
|
|
35
|
+
`,s=e=>e?.length?e.map(e=>{switch(e?.triggerEvent){case"discount_price":return t(e);case"price_range":return o(e);case"inventory_status":return g(e);case"product_tags":return c(e);case"creation_date":return d(e);default:return""}}).join(" "):"",a=e=>e.replace(/[%$]/g,""),r=()=>`
|
|
34
36
|
{% assign enabled = false %}
|
|
35
37
|
{% case conditionType %}
|
|
36
38
|
{% when "exact" %}
|
|
@@ -131,7 +133,7 @@ import{CompareType as e}from"../types.js";let i=i=>i===e.ABOVE?0:i===e.BELOW?2:1
|
|
|
131
133
|
{% assign conditionTriggers = conditionTriggers | append: "," | append: false %}
|
|
132
134
|
{% endif %}
|
|
133
135
|
|
|
134
|
-
`},
|
|
136
|
+
`},c=e=>{let{searchTag:i}=e,n=i.map(e=>e.replaceAll("'","'")).join(", ");return`
|
|
135
137
|
{% assign productTags = product.tags | escape %}
|
|
136
138
|
{% assign searchTag = '${n}' %}
|
|
137
139
|
{% for tag in productTags %}
|
|
@@ -141,7 +143,7 @@ import{CompareType as e}from"../types.js";let i=i=>i===e.ABOVE?0:i===e.BELOW?2:1
|
|
|
141
143
|
{% endif %}
|
|
142
144
|
{% endfor %}
|
|
143
145
|
{% assign conditionTriggers = conditionTriggers | append: "," | append: isProductTag %}
|
|
144
|
-
`},
|
|
146
|
+
`},d=e=>{let{days:i,from:n,to:s,type:t,conditionType:o}=e;return`
|
|
145
147
|
{% assign type = "${t}" %}
|
|
146
148
|
{% assign days = ${a(i)} %}
|
|
147
149
|
{% assign from = "${n}" | date: "%Y-%m-%d" | date: "%s" | times: 1000 %}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonState as
|
|
2
|
-
${
|
|
1
|
+
import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonState as e,escapeSingleQuoteForAttr as s}from"./common/helpers.js";import{template as r,isLocalEnv as o,baseAssetURL as a}from"@gem-sdk/core";import{createStateOrContext as i,Liquid as n,LiquidFor as l,If as p}from"@gem-sdk/system";import{getInsertLinkData as c,getSettingPreloadData as u}from"../../../helpers.js";import{getButtonDynamicSourceLocales as m}from"./helpers/getButtonDynamicSourceLocales.js";import{SoldOutButton as d}from"./SoldOutButton.liquid.js";import{AddToCartButton as g}from"./AddToCartButton.liquid.js";let f=f=>{let{setting:$,builderProps:b,style:y,styles:v,pageContext:_}=f,{wrapStyle:h,restStyle:S}=t(y),{outOfStockButtonLabel:j,unavailableButtonLabel:k,variantSelectionRequiredMessage:q,successMessage:E,errorMessage:M}=m({setting:$,pageContext:_,builderProps:b}),{urlData:A}=c("",$?.actionEffect==="open-cart-drawer"?{link:"/cart",target:"_self"}:$?.customURL),B=i(e({styles:v,setting:$})),G=s(E??$?.successMessage),P=s(M??$?.errorMessage),w=s(q??$?.variantSelectionRequiredMessage);return r`
|
|
2
|
+
${n("{%- assign total_combinations = 1 -%}")}
|
|
3
3
|
${l("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
4
4
|
{%- liquid
|
|
5
5
|
assign inventory_quantity = variant.inventory_quantity | default: 0
|
|
6
6
|
assign is_in_stock = variant.available
|
|
7
7
|
-%}
|
|
8
8
|
<gp-product-button
|
|
9
|
-
style="${
|
|
9
|
+
style="${h}"
|
|
10
10
|
gp-data-wrapper="true"
|
|
11
11
|
gp-href="${A.href}"
|
|
12
12
|
class="gp-product-button"
|
|
13
|
-
gp-label-out-of-stock="${
|
|
14
|
-
gp-label-unavailable="${
|
|
13
|
+
gp-label-out-of-stock="${j}"
|
|
14
|
+
gp-label-unavailable="${k}"
|
|
15
15
|
gp-data='${JSON.stringify(B)}'
|
|
16
|
+
data-variant-selection-required-message="${w}"
|
|
16
17
|
gp-enable-third-partycart="{{shop.metafields.GEMPAGES.enableThirdPartyCart}}"
|
|
18
|
+
gp-error-message="${P}"
|
|
19
|
+
gp-success-message="${G}"
|
|
17
20
|
>
|
|
18
|
-
${
|
|
19
|
-
${
|
|
21
|
+
${g({...f,style:S})}
|
|
22
|
+
${d({...f,style:S,label:j})}
|
|
20
23
|
</gp-product-button>
|
|
21
|
-
${
|
|
24
|
+
${p(o,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-button-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-button-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
22
25
|
`};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape
|
|
1
|
+
import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","'").replaceAll("’","'").replaceAll('"',""")},a=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),n=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,s=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{a as checkIconVisibility,o as escapeSingleQuoteForAttr,c as getGPProductButtonState,i as getRenderComparePriceSettings,l as getRenderRegularPriceSettings,n as renderSeparator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRenderMode as e,useProduct as t,useCurrency as r,useQuantity as i,useProductProperties as
|
|
1
|
+
import{useRenderMode as e,useProduct as t,useCurrency as r,useQuantity as i,useProductProperties as a,useCurrentVariant as s,useHasPreSelected as o,useStickyStore as u,useProductStore as n,useCreateCart as l,useAddToCart as d,convertDecimalToNumber as m,useCurrentVariantInStock as c}from"@gem-sdk/core";import{useRef as p,useEffect as f,useCallback as b}from"react";import{addToCartTracking as v}from"../../../helpers/tracking.js";import{useDispatchInteractionEvent as g,useDispatchCustomEvent as k}from"./useDispatchAfterSubmitEvent.js";import{useCartMessage as D}from"./useCartMessage.js";import{useCartOperations as I}from"./useCartOperations.js";let E=({styles:E,setting:y,builderProps:S})=>{let j=p(null),{isEditMode:C,isPreviewSharePageMode:M}=e(),h=t(),{currency:w}=r(),{quantity:A}=i(),L=a(),O=s(),{hasPreSelected:q}=o(),x=u(e=>e.setElement),B=u(e=>e.removeElement),T=n(e=>e.updateIsSubmit),U=g(S?.uid),V=k({product:h,currentVariant:O,quantity:A}),{showMessage:z,notiComponent:F}=D(E,y),{handleSuccess:G,handleError:H,cartId:J}=I({setting:y,showMessage:z,dispatchInteractionEvent:U,dispatchCustomEvent:V}),{isMutating:K,trigger:N}=l({onSuccess:G,onError:H}),{isMutating:P,trigger:Q}=d({onSuccess:G,onError:H});f(()=>{let e=j.current;if(!(!e||e.closest(".sticky-wrapper"))&&S?.uid&&S.builderData?.advanced)return x({id:S.uid,element:e,deviceVisibility:S.builderData.advanced.d}),()=>{S?.uid&&B(S.uid)}},[]);let R=b(()=>{if(!O?.baseID||!A||!h?.baseID||void 0!==q&&!q||C||M)return;let e=L?.some(e=>e.required&&!e.value);if(T(!0),e)return;let t=L?.filter(e=>!!e.value)?.map(e=>({key:e.key,value:e.value}));v({quantity:A,currency:w,id:h?.baseID,name:h?.title,brand:h?.vendor,sku:O.sku,price:m(O?.price),variant:O.title});let r={quantity:A,attributes:t,variantId:O.baseID};y?.actionEffect!=="buy-now"&&J?Q({cartId:J,lines:[r]}):N({items:[r]})},[C,M,J,w,A,L,q,h?.title,h?.vendor,h?.baseID,O?.sku,O?.price,O?.title,O?.baseID,y?.actionEffect,N,Q,T]),W=c(),X=O?y?.outOfStockLabel:"Unavailable";return{addToCartRef:j,isLoading:K||P,isInStock:W,notiComponent:F,outOfStockLabel:X,addToCart:R}};export{E as useBtnAddToCart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as t,jsxs as s}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,getResponsiveValueByScreen as r,useI18nStore as m,makeStyleResponsive as c,makeLineClamp as n}from"@gem-sdk/core";import l from"../../../common/components/NoDataState.js";import{ICON_SVG as a}from"./common/helpers.js";import{createClass as p,createStyle as d,createAttr as h,If as u}from"@gem-sdk/system";import{getClasses as y,getButtonClasses as g,getClassPreBuilt as f}from"./common/classes.js";import{getTextStyle as x,getButtonStyle as k,getStaticCss as N}from"./common/styles.js";import{useGpDescription as j}from"./hooks/useGpDescription.js";let w=w=>{let{setting:L,advanced:b,builderProps:v}=w,{htmlTag:C}=L??{},H=o(),T=i(),M=r(L?.hasLineClamp,T),{ref:_,open:D,isShowViewMore:I,handleToggleShowMore:S,mode:A,redirectProductShopifyLink:P}=j(L),{t:q}=m(),G=p({"gp-product-description":!0,[b?.cssClass]:!0}),V=p(y({setting:L,isLiquid:!1})),$=p(g({setting:L})),z=p({"gp-show-more-text":!0}),B=p({"gp-show-more-icon gp-ml-1":!0,...D?{"gp-rotate-180":!0}:{}}),E=p(f()),F=d({...x({setting:L})
|
|
2
|
+
import{jsx as e,Fragment as t,jsxs as s}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,getResponsiveValueByScreen as r,useI18nStore as m,makeStyleResponsive as c,makeLineClamp as n}from"@gem-sdk/core";import l from"../../../common/components/NoDataState.js";import{ICON_SVG as a}from"./common/helpers.js";import{createClass as p,createStyle as d,createAttr as h,If as u}from"@gem-sdk/system";import{getClasses as y,getButtonClasses as g,getClassPreBuilt as f}from"./common/classes.js";import{getTextStyle as x,getButtonStyle as k,getStaticCss as N}from"./common/styles.js";import{useGpDescription as j}from"./hooks/useGpDescription.js";let w=w=>{let{setting:L,advanced:b,builderProps:v}=w,{htmlTag:C}=L??{},H=o(),T=i(),M=r(L?.hasLineClamp,T),{ref:_,open:D,isShowViewMore:I,handleToggleShowMore:S,mode:A,redirectProductShopifyLink:P}=j(L),{t:q}=m(),G=p({"gp-product-description":!0,[b?.cssClass]:!0}),V=p(y({setting:L,isLiquid:!1})),$=p(g({setting:L})),z=p({"gp-show-more-text":!0}),B=p({"gp-show-more-icon gp-ml-1":!0,...D?{"gp-rotate-180":!0}:{}}),E=p(f()),F=d({...x({setting:L}),...!D&&I?c("line-clamp",n(L?.lineClamp,L?.hasLineClamp)):{}}),J=d(k({setting:L})),K=h({"data-id":`${v?.uid}`}),O=h({"data-gp-text":""}),{gpDescriptionCss:Q,textDescriptionCss:R}=N(),U=!H?.descriptionHtml;return U&&"edit"===A?e(l,{elementType:"secondary",description:q("Highlight key benefits with product description."),descriptionActions:[{text:q("Add description"),callback:P},{text:q("sync data"),callback:"syncProduct"}]}):e(t,{children:u(U,"",s("div",{...K,className:G,children:[e("style",{children:R}),e("style",{children:Q}),e("div",{className:E}),e("html"===C?"div":"p",{ref:_,...O,className:V,style:F,dangerouslySetInnerHTML:{__html:H?.descriptionHtml||""}}),u(M&&I,s("button",{className:$,style:J,onClick:S,children:[e("span",{className:z,children:u(D,L?.viewLessText||"",L?.viewMoreText)}),u(L?.enableViewMoreIcon,e("span",{className:B,dangerouslySetInnerHTML:{__html:a}}))]})," ")]}))})};export{w as default};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeLineClamp as t,dataStringify as s,template as i,baseAssetURL as o,isLocalEnv as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,createSettingId as a,getSettingPreloadData as n}from"../../../helpers.js";import{createClass as d,createStyle as l,createAttr as c,createStateOrContext as m,LiquidIf as
|
|
1
|
+
import{makeStyleResponsive as e,makeLineClamp as t,dataStringify as s,template as i,baseAssetURL as o,isLocalEnv as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,createSettingId as a,getSettingPreloadData as n}from"../../../helpers.js";import{createClass as d,createStyle as l,createAttr as c,createStateOrContext as m,LiquidIf as u,Liquid as $,LiquidUnless as g,If as v}from"@gem-sdk/system";import{getClasses as f,getButtonClasses as x,getClassPreBuilt as w}from"./common/classes.js";import{getTextStyle as h,getButtonStyle as C,getStaticCss as y}from"./common/styles.js";import{ICON_SVG as b}from"./common/helpers.js";import{ProductDescription as j}from"../../settings/product-description/configs/translate.js";let M=M=>{let{setting:S,advanced:I,builderProps:L,pageContext:T}=M,{htmlTag:k,viewMoreText:E,viewLessText:P}=S??{},V="html"===k?"div":"p",A=d({"gp-product-description":!0,[I?.cssClass]:!0}),D=d(f({setting:S,isLiquid:!0})),G=d(x({setting:S})),_=d({"gp-show-more-text":!0}),q=d({"gp-show-more-icon gp-ml-1":!0}),H=l({...h({setting:S,renderMaxHeight:!0}),...e("line-clamp",t(S?.lineClamp,S?.hasLineClamp))}),N=d(w()),O=l(C({setting:S})),R=c({"data-id":`${L?.uid}`}),z=c({"data-gp-text":""}),{textDescriptionCss:B,gpDescriptionCss:F}=y(),J="product.description == blank",K=p({val:E,uid:L?.uid,settingId:a({id:j?.viewMoreText?.id}),pageContext:T??{}}),Q=p({val:P,uid:L?.uid,settingId:a({id:j?.viewLessText?.id}),pageContext:T??{}}),U=m({setting:{lineClamp:S?.lineClamp,hasLineClamp:S?.hasLineClamp,viewMoreText:K,viewLessText:Q,enableViewMoreIcon:S?.enableViewMoreIcon},textStyle:H});return u(J,"",$(i`
|
|
2
2
|
<gp-product-description
|
|
3
3
|
${R}
|
|
4
4
|
class="${A}"
|
|
5
|
-
gp-data='${s(U).replaceAll("'","
|
|
5
|
+
gp-data='${s(U).replaceAll("'","\\u0027")}'
|
|
6
6
|
data-view-more-text="${K}"
|
|
7
7
|
data-view-less-text="${Q}"
|
|
8
8
|
>
|
|
9
|
-
<style>${B}</style>
|
|
10
|
-
<style>${F}</style>
|
|
9
|
+
<style>${B}${F}</style>
|
|
11
10
|
<div class="${N}" ></div>
|
|
12
11
|
${g("product","<p>Product not found</p>",i`<${V} ${z} class="${D}" style="${H}">
|
|
13
12
|
{{product.description}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useState as t,useCallback as r,useEffect as
|
|
1
|
+
import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{useProduct as n,useCurrentDevice as l,getResponsiveValueByScreen as o,useProductShopifyEditLink as s,useEditorMode as m}from"@gem-sdk/core";let c=c=>{let{htmlTag:a,transform:u,typo:p,typography:y}=c??{},g=e(null),H=e(!1),[d,f]=t(!1),[w,h]=t(!1),x=n(),O=l(),P=o(c?.hasLineClamp,O),S=o(c?.lineClamp,O),v=o(p?.custom?.lineHeight,O),J=JSON.stringify(p),N=JSON.stringify(y),b=JSON.stringify(u),{redirectProductShopifyLink:A}=s(),C=m(),F=r(()=>{if(!g.current)return;let e=!d;H.current=e,g.current.style.maxHeight=e?"none":"",f(e)},[d]);return i(()=>{H.current=!1,f(!1)},[P,S,x?.descriptionHtml]),i(()=>{let e=g.current;if(!e)return;if(!P||!x?.descriptionHtml||!S){e.style.maxHeight="",h(!1);return}let t=()=>{if(H.current){e.style.maxHeight="none";return}e.style.maxHeight="";let t=e.style.getPropertyValue("--line-clamp");e.style.setProperty("--line-clamp",String(S));let r=e.scrollHeight-e.clientHeight>1;""!==t?e.style.setProperty("--line-clamp",t):e.style.removeProperty("--line-clamp"),h(r)},r=window.requestAnimationFrame(t),i=window.setTimeout(t,100),n=new ResizeObserver(()=>{t()});return n.observe(e),()=>{window.cancelAnimationFrame(r),window.clearTimeout(i),n.disconnect()}},[P,S,x?.descriptionHtml,v,a,b,J,N]),{ref:g,open:d,isShowViewMore:w,handleToggleShowMore:F,mode:C,redirectProductShopifyLink:A}};export{c as useGpDescription};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as S,If as j,Liquid as v}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as S,If as j,Liquid as v}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,N={...G,...D},A=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(c(_))},
|
|
@@ -9,33 +9,33 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,R
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
10
|
"collection": {{ collection | json | escape}}
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,B=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=i(N?.position,G?.type),q=k?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=S({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=S({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(N),R=n({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>r`
|
|
13
13
|
${s({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${t({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
14
|
`;return r`
|
|
15
|
-
${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:
|
|
15
|
+
${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${v(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
19
|
`)}
|
|
20
20
|
<gp-product-images
|
|
21
|
-
gp-data='${
|
|
22
|
-
${{...
|
|
21
|
+
gp-data='${A}'
|
|
22
|
+
${{...B}}
|
|
23
23
|
style="${{...z}}"
|
|
24
|
-
class="${
|
|
24
|
+
class="${E}"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
class="${h("product.media.size > 1",`${
|
|
28
|
-
style="${h("product.media.size > 1",I(
|
|
27
|
+
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
|
+
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
29
|
>
|
|
30
|
-
${l({builderPropUID:`gp-carousel-${b?.uid}`,...
|
|
31
|
-
${j(!
|
|
30
|
+
${l({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
|
|
31
|
+
${j(!U,r`
|
|
32
32
|
<div
|
|
33
|
-
class="${
|
|
34
|
-
style="${I(
|
|
35
|
-
${{...
|
|
33
|
+
class="${J}"
|
|
34
|
+
style="${I(M)}"
|
|
35
|
+
${{...q}}
|
|
36
36
|
>
|
|
37
|
-
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...
|
|
38
|
-
${j(
|
|
37
|
+
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
|
|
38
|
+
${j(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import m from"../../../../../video/components/HTML5Embed.liquid.js";import l from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as n}from"../../../../helpers/function.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as M,Liquid as _,If as $}from"@gem-sdk/system";import b from"../../../../../carousel/components/root/Carousel.liquid.js";import w from"../../../../../carousel/components/item/CarouselItem.liquid.js";let v=({builderPropUID:v,children:I,
|
|
1
|
+
import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import m from"../../../../../video/components/HTML5Embed.liquid.js";import l from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as n}from"../../../../helpers/function.js";import{getProductImagesStyles as c}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as M,Liquid as _,If as $}from"@gem-sdk/system";import b from"../../../../../carousel/components/root/Carousel.liquid.js";import w from"../../../../../carousel/components/item/CarouselItem.liquid.js";let v=({builderPropUID:v,children:I,pageContext:x,...q})=>{let{featuredImageCarouselClasses:z,galleryItemClasses:j,featuredCarouselItemClasses:S}=f(q),{featuredImageCarouselStyle:R,featureImageStyle:P,featureImageCarouselOnlyOneImageStyle:W,featureImageOnlyOneImageStyle:C,featureImageCarouselItemStyle:T}=c(q),{featuredImageCarouselSettingAttrs:L}=h(q),N=t(q.ftShape),k=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
4
|
${D()}
|
|
@@ -13,7 +13,7 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
13
13
|
{% else %}
|
|
14
14
|
${H()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,E=()=>l({src:y("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:N}),O=()=>p({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:N}),A=()=>m({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible"}),D=()=>i`
|
|
16
|
+
`,E=()=>l({src:y("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:N}),O=()=>p({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:N}),A=()=>m({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,style:{width:"100%","max-height":"100%"},className:"gp-invisible",pageContext:x}),D=()=>i`
|
|
17
17
|
${V(a("gp-w-full gp-transition-opacity",{"group-hover:gp-opacity-0":"other"==q.hoverEffect},"{{shouldHidden}}"))}
|
|
18
18
|
${$(q?.hoverEffect!=="none",`<div class="${a("zoom-element !gp-max-w-none",o())}">
|
|
19
19
|
${V("image-zoom",!0)}
|
|
@@ -29,8 +29,8 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
30
|
${y("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${g({srcIsLiquidCode:!0,src:y("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:y("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,
|
|
33
|
-
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",
|
|
32
|
+
${g({srcIsLiquidCode:!0,src:y("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:y("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e}`,pageContext:x})}`,H=()=>i`
|
|
33
|
+
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},priority:q?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",pageContext:x})}`,F=r(q.ftShape),G=d(q),J="gp-featured-image-wrapper",B=y("product.media.size > 0",`${I||""} {% assign largestRatio = 0 %}
|
|
34
34
|
${M("featureMedia in product.media",`
|
|
35
35
|
{% assign height = featureMedia.height | times: 1.0 %}
|
|
36
36
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
@@ -54,7 +54,7 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
54
54
|
${k()}
|
|
55
55
|
</div>
|
|
56
56
|
`})}`)}
|
|
57
|
-
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:q?.preload,setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,
|
|
57
|
+
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:q?.preload,setting:{layout:q?.ftLayout,aspectRatio:N,qualityType:q?.qualityType,qualityPercent:q?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,pageContext:x}));return _(`
|
|
58
58
|
{% capture featureImageOnlyOne %}
|
|
59
59
|
${_(`
|
|
60
60
|
{% assign featureMedia = variant.featured_media %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,makeStyleResponsive as t,getResponsiveValueByScreen as i}from"@gem-sdk/core";import o from"../../../../../image/components/NextImage.liquid.js";import{getPaddingBottomByShapeSetting as r,getAspectRatio as s,getDisplayStyle as a,getSrcImage as p}from"../../common/common.js";import{getShapeByLayout as l,getMinHeightByPosition as d,getZoomDisplay as m,checkDisplayGalleryByWidth as g,getCarouselVerticalConfigByPosition as n}from"../../common/productGallery.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as C}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as b}from"@gem-sdk/system";import v from"../../../../../carousel/components/root/Carousel.liquid.js";import f from"../../../../../carousel/components/item/CarouselItem.liquid.js";let w=({builderPropUID:w,children:L,
|
|
1
|
+
import{template as e,makeStyleResponsive as t,getResponsiveValueByScreen as i}from"@gem-sdk/core";import o from"../../../../../image/components/NextImage.liquid.js";import{getPaddingBottomByShapeSetting as r,getAspectRatio as s,getDisplayStyle as a,getSrcImage as p}from"../../common/common.js";import{getShapeByLayout as l,getMinHeightByPosition as d,getZoomDisplay as m,checkDisplayGalleryByWidth as g,getCarouselVerticalConfigByPosition as n}from"../../common/productGallery.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as u}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as C}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as h}from"../../composables/getProductImagesAttr.js";import{LiquidIf as y,LiquidFor as b}from"@gem-sdk/system";import v from"../../../../../carousel/components/root/Carousel.liquid.js";import f from"../../../../../carousel/components/item/CarouselItem.liquid.js";let w=({builderPropUID:w,children:L,pageContext:F,...$})=>{let{featuredImageGalleryClasses:x,galleryItemClasses:I}=C($),{galleryCarouselSettingAttrs:_}=h($),{galleryCarouselStyle:k,galleryCarouselItemStyle:j}=u($),V=l({shape:$.shape,shapeForBottom:$.shapeForBottom,shapeFor1Col:$.shapeFor1Col,shapeFor2Col:$.shapeFor2Col,shapeForFtOnly:$.shapeForFtOnly,shapeForInsideBottom:$.shapeForInsideBottom,shapeForInside:$.shapeForInside},$.position),M=(t,i)=>e`${o({srcIsLiquidCode:!0,src:`${p("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",customLazyload:!0,style:i,className:"!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer",pageContext:F})}`,Z=r(V),q=e=>`
|
|
2
2
|
${y("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
3
|
${y("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
4
|
${y("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getAspectRatio as n,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,
|
|
2
|
-
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,
|
|
1
|
+
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getAspectRatio as n,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,pageContext:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=f(L),{galleryGridStyles:q,galleryGridItemStyles:I}=w(L),M=C({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
|
|
2
|
+
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}
|
|
3
3
|
${r(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
4
|
-
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,
|
|
4
|
+
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,pageContext:x})}
|
|
5
5
|
</div>`," ")}
|
|
6
6
|
${r(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:n(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>g({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),P=()=>i`
|
|
9
|
+
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:n(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>g({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"},pageContext:x}),P=()=>i`
|
|
10
10
|
${d("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -81,7 +81,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
83
|
</div>`,T=()=>i`
|
|
84
|
-
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:n(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,
|
|
84
|
+
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:n(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}`;return o(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${V}"
|
|
87
87
|
style="${c(q)}}"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{setDefaultWhenUndefineSetting as a,getAspectRatio as i}from"./common/common.js";import{useProductShopifyEditLink as l,useProduct as C,useCurrentDevice as o,useCurrentVariant as r,useSelectedOption as n,useEditorMode as d,useProductStore as s,getResponsiveValueByScreen as p,useI18nStore as
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{setDefaultWhenUndefineSetting as a,getAspectRatio as i}from"./common/common.js";import{useProductShopifyEditLink as l,useProduct as C,useCurrentDevice as o,useCurrentVariant as r,useSelectedOption as n,useEditorMode as d,useProductStore as s,getResponsiveValueByScreen as p,useI18nStore as m,filterToolbarPreview as c}from"@gem-sdk/core";import{useMemo as g,useState as f,useEffect as h,Children as u,isValidElement as y}from"react";import D from"./components/feature-gallery/FeatureImageWithGallery.js";import I from"./components/feature-only/OnlyFeatureImage.js";import b from"./components/lightbox/ProductImagesLightBox.js";import M from"../../../common/components/NoDataState.js";import{getProductImagesClassName as Z}from"./composables/getProductImagesClassName.js";import{getBorderActiveCss as k}from"./common/getBorderActiveCss.js";import w from"./components/gallery-grid/GalleryGrid.js";let v=e=>e?.medias?.edges.map(e=>e?.node),E=["bottom-left","bottom-center","left","right","inside-left","inside-right","inside-bottom"],V=V=>{let L=g(()=>a(V),[V]),{redirectProductShopifyLink:x}=l(),{setting:H,styles:O,builderProps:B,builderAttrs:j,style:F,children:S}=L,A=C(),P=o(),T=r(),{isChangeSelectedOption:G}=n(),_=d(),N=s(e=>e.setProductFeaturedImage),[z,R]=f(!1),[J,U]=f(!1),W=e=>e?.medias?.edges.find(e=>["VIDEO","EXTERNAL_VIDEO"].includes(e?.node?.contentType??""))?.node,X=e=>e?.medias?.edges.find(e=>e?.node?.contentType==="IMAGE")?.node,q=e=>e?.medias?.edges.find(e=>e?.node?.contentType==="MODEL_3D")?.node,K=g(()=>H?.typeDisplay==="all-images"&&!G,[G,H?.typeDisplay]),Q=g(()=>{if(K){let e;switch(H?.preDisplay){case"1st-images":e=X(A);break;case"1st-3d-mode":e=q(A);break;case"1st-video":e=W(A);break;case"1st-available-variant":e=T?.media}return N(e),e}},[K,H?.preDisplay,N,A,T?.media]),Y=g(()=>H?.filterByVariant==="selected_variant",[H?.filterByVariant]),$=g(()=>{let e=v(A);return e?.length?e:[{id:A?.featuredImage?.id||"noImageError",baseID:A?.featuredImage?.baseID||"noImageError",src:A?.featuredImage?.src||"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",width:A?.featuredImage?.width||480,height:A?.featuredImage?.height||480}]},[A]),ee=g(()=>{if(!Y||!T?.selectedOptions?.length)return $;let e=T.selectedOptions.map(e=>e.value).filter(Boolean).map(e=>e?.trim().toLowerCase()),t=e.join("-"),a=e=>e.toLowerCase().trim().replace(/[\s_]+/g,"-").replace(/[^a-z\d-]/g,"").replace(/-+/g,"-"),i=$?.filter(e=>{if(!e?.alt)return!1;let i=a(e.alt),l=a(t),C=i===l||i.includes(l);return"all-variants"===i||C});return i?.length>0?i:$},[T?.selectedOptions,Y,$]),et=g(()=>$.reduce((e,t,a)=>t?{...e,[t.id]:a}:e,{}),[$]),ea=g(()=>p(O?.position,P),[P,O?.position]),ei=({imageID:e,enableOpenLightBox:t,isClickFromFeatureImage:a=!1})=>{eC(e),t&&(U(a),el())},el=()=>{R(!0)},eC=e=>{if(!e)return;let t=et[e];if(void 0!==t){let e=$[t];e&&N(e)}};h(()=>{if(!T||K)return;let e=et[T?.mediaId],t=Y?ee[0]:void 0,a=void 0!==e?$[e]??A?.featuredImage:t;a&&N(a)},[T,et,$,ee,A?.featuredImage,N,K,Y]);let eo=g(()=>{let e="popup"===p(H?.ftClickOpenLightBox,P)||p(H?.clickOpenLightBox,P);return e||"edit"!==_||window?.parent?.postMessage?.(JSON.stringify({type:"active-modal",value:open}),"*"),e},[H?.ftClickOpenLightBox,H?.clickOpenLightBox,P,_]),er=()=>ee.length>0?u.map(c(S),t=>y(t)?e(t.type,{...t.props,isInsideProductImage:!0,navigationPosition:H?.ftNavigationPosition,imageData:{imageShape:O?.ftShape,imageAlign:O?.align,imageLayout:O?.position},dotData:{dotSize:H?.ftDotSize,dotGapToCarousel:H?.ftDotGapToCarousel,dotStyle:H?.ftDotStyle}}):null):null,en=`
|
|
3
3
|
<svg viewBox="0 0 452 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
4
|
<path d="M0 7.99999C0 3.58171 3.58172 0 8 0H444C448.418 0 452 3.58172 452 8V392C452 396.418 448.418 400 444 400H8C3.58173 400 0 396.418 0 392V7.99999Z" fill="#F9F9F9"/>
|
|
5
5
|
<path d="M208.148 348.801C239.683 348.75 265.245 347.272 265.242 345.499C265.239 343.726 239.673 342.33 208.138 342.381C176.603 342.432 151.041 343.91 151.044 345.683C151.047 347.456 176.614 348.851 208.148 348.801Z" fill="#E6E6E6"/>
|
|
@@ -23,4 +23,4 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{setDefaultWhenUndefineS
|
|
|
23
23
|
<path opacity="0.2" d="M293.196 231.862C306.954 231.862 318.106 217.921 318.106 200.724C318.106 183.527 306.954 169.586 293.196 169.586C279.439 169.586 268.286 183.527 268.286 200.724C268.286 217.921 279.439 231.862 293.196 231.862Z" fill="white"/>
|
|
24
24
|
<path opacity="0.2" d="M293.196 247.637C313.923 247.637 330.726 226.634 330.726 200.725C330.726 174.816 313.923 153.812 293.196 153.812C272.469 153.812 255.666 174.816 255.666 200.725C255.666 226.634 272.469 247.637 293.196 247.637Z" fill="white"/>
|
|
25
25
|
</svg>
|
|
26
|
-
`,{t:
|
|
26
|
+
`,{t:ed}=m(),es=e(M,{elementType:"secondary",description:ed("Catch your customer's attention with attracted media."),descriptionActions:[{text:ed("Add image"),callback:x},{text:ed("sync data"),callback:"syncProduct"}],additionalMedia:en}),{wrapperClasses:ep}=Z(V);return t("div",{...j,className:ep,style:F,children:[e("style",{dangerouslySetInnerHTML:{__html:k({settings:{...H,...O},uid:B?.uid,type:"React"})}}),E.includes(ea)&&e(D,{...L,isFilterByVariantEnabled:Y,gallery:ee,featureGallery:$,priorityFeatureImage:Q,onHandleClickImage:(e,t,a)=>ei({imageID:e||"",enableOpenLightBox:t,isClickFromFeatureImage:a}),noDataChildren:es,children:er()}),"only-feature"===ea&&e(I,{gallery:$,...L,onHandleClickImage:(e,t)=>ei({imageID:e||"",enableOpenLightBox:t,isClickFromFeatureImage:!0}),noDataChildren:es,children:er()}),["one-col","two-col"].includes(ea)&&e(w,{gallery:ee,...L,onHandleClickImage:(e,t)=>ei({imageID:e||"",enableOpenLightBox:t}),noDataChildren:es,children:er()}),eo&&e(b,{productImages:J?$:ee,builderPropUID:B?.uid,open:z,onHandleClose:()=>R(!1),imageRatio:i(O?.ftShape)}),c(S,!0)]})};export{V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as S,Liquid as j}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as S,Liquid as j}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:z}=P,{rawChildren:O,pageContext:_}=C,N={...G,...D},A=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
4
|
"pageContext": ${JSON.stringify(c(_))},
|
|
@@ -9,33 +9,33 @@ import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,R
|
|
|
9
9
|
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
10
|
"collection": {{ collection | json | escape}}
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,B=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=i(N?.position,G?.type),q=k?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(N),R=n({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>r`
|
|
13
13
|
${s({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${t({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
14
|
`;return r`
|
|
15
|
-
${S(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:
|
|
15
|
+
${S(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
16
|
${j(`
|
|
17
17
|
{% assign featured_image = product.featured_image %}
|
|
18
18
|
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
19
|
`)}
|
|
20
20
|
<gp-product-images-v3
|
|
21
|
-
gp-data='${
|
|
22
|
-
${{...
|
|
21
|
+
gp-data='${A}'
|
|
22
|
+
${{...B}}
|
|
23
23
|
style="${{...z}}"
|
|
24
|
-
class="${
|
|
24
|
+
class="${E}"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
class="${h("product.media.size > 1",`${
|
|
28
|
-
style="${h("product.media.size > 1",I(
|
|
27
|
+
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
|
+
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
29
|
>
|
|
30
|
-
${l({builderPropUID:`gp-carousel-${b?.uid}`,...
|
|
31
|
-
${S(!
|
|
30
|
+
${l({builderPropUID:`gp-carousel-${b?.uid}`,...N,children:W(),pageContext:_})}
|
|
31
|
+
${S(!U,r`
|
|
32
32
|
<div
|
|
33
|
-
class="${
|
|
34
|
-
style="${I(
|
|
35
|
-
${{...
|
|
33
|
+
class="${J}"
|
|
34
|
+
style="${I(M)}"
|
|
35
|
+
${{...q}}
|
|
36
36
|
>
|
|
37
|
-
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...
|
|
38
|
-
${S(
|
|
37
|
+
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
|
|
38
|
+
${S(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
|
|
39
39
|
</div>
|
|
40
40
|
`)}
|
|
41
41
|
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import{isLocalEnv as e,baseAssetURL as o,template as r,WrapRenderChildren as s,RenderChildren as t}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as u}from"../../../helpers.js";import{getShapeByLayout as n,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as S,Liquid as j}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
|
|
2
|
+
{
|
|
3
|
+
"id":${JSON.stringify(D?.uid)},
|
|
4
|
+
"pageContext": ${JSON.stringify(c(_))},
|
|
5
|
+
"setting":${JSON.stringify(b)},
|
|
6
|
+
"styles":${JSON.stringify(G)},
|
|
7
|
+
"productUrl":{{product.url | json | escape}},
|
|
8
|
+
"product":{{product | json | escape}},
|
|
9
|
+
"collectionUrl": {{ collection.url | json | escape }},
|
|
10
|
+
"collection": {{ collection | json | escape}}
|
|
11
|
+
}
|
|
12
|
+
`,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=i(E?.position,b?.type),k=U?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(E),R=n({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>r`
|
|
13
|
+
${s({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return r`${t({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
|
|
14
|
+
`;return r`
|
|
15
|
+
${S(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
+
${j(`
|
|
17
|
+
{% assign featured_image = product.featured_image %}
|
|
18
|
+
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
|
+
`)}
|
|
20
|
+
<gp-product-images-v3
|
|
21
|
+
gp-data='${N}'
|
|
22
|
+
${{...A}}
|
|
23
|
+
style="${{...z}}"
|
|
24
|
+
class="${q}"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
class="${h("product.media.size > 1",`${w}`,`${T}`)}"
|
|
28
|
+
style="${h("product.media.size > 1",I(x),I(L))}"
|
|
29
|
+
>
|
|
30
|
+
${l({builderPropUID:`gp-carousel-${D?.uid}`,...E,children:W(),pageContext:_})}
|
|
31
|
+
${S(!B,r`
|
|
32
|
+
<div
|
|
33
|
+
class="${J}"
|
|
34
|
+
style="${I(M)}"
|
|
35
|
+
${{...k}}
|
|
36
|
+
>
|
|
37
|
+
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${D?.uid}`,...E,pageContext:_}))}
|
|
38
|
+
${S(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
|
|
39
|
+
</div>
|
|
40
|
+
`)}
|
|
41
|
+
</div>
|
|
42
|
+
</gp-product-images-v3>
|
|
43
|
+
${S(e,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
|
+
`};export{C as default};
|