@gem-sdk/components 23.0.0-staging.2 → 23.0.0-staging.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/article/components/ArticleImage.js +1 -1
- package/dist/cjs/article/components/ArticleImage.liquid.js +6 -6
- package/dist/cjs/article/index.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/collection/index.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -1
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/header/index.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/image/common/adaptiveSources.js +1 -0
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/common/classes.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/common/liquidSrcset.js +1 -0
- package/dist/cjs/image/common/listContext.js +1 -0
- package/dist/cjs/image/common/listImageContext.js +1 -0
- package/dist/cjs/image/common/sizes.js +1 -0
- package/dist/cjs/image/common/srcset.js +1 -0
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +4 -5
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image/index.js +1 -1
- package/dist/cjs/image/settings/configs/settings.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/common/attrs.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
- package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/cjs/image-comparison/index.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +42 -42
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +39 -39
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +38 -38
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +4 -4
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +9 -7
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +4 -4
- package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/cjs/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +2 -3
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +4 -4
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +13 -13
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +7 -7
- package/dist/esm/article/index.js +1 -1
- package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/collection/index.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -1
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/header/index.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/image/common/adaptiveSources.js +1 -0
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/common/classes.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/common/liquidSrcset.js +1 -0
- package/dist/esm/image/common/listContext.js +1 -0
- package/dist/esm/image/common/listImageContext.js +1 -0
- package/dist/esm/image/common/sizes.js +1 -0
- package/dist/esm/image/common/srcset.js +1 -0
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/image/components/Image.liquid.js +3 -3
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +5 -6
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image/index.js +1 -1
- package/dist/esm/image/settings/configs/settings.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/common/attrs.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/image-comparison/index.js +1 -1
- package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/esm/product/components/product-list/ProductListGridItem.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 +18 -16
- package/dist/esm/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/esm/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -7
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +12 -10
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-wrap/Product.liquid.js +7 -7
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +9 -9
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +20 -5
- package/package.json +9 -6
package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../composables/getProductImagesClassName.js"),
|
|
2
|
-
${
|
|
3
|
-
${m.If(
|
|
4
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("../../composables/getProductImagesClassName.js"),t=require("../../common/productFeaturedImage.js"),a=require("../../composables/getProductImagesStyles.js"),s=require("../../../../../image/common/liquidSrcset.js"),d=require("../../common/productGallery.js"),o=require("../../../../../video/components/HTML5Embed.liquid.js"),r=require("../../../../../image/components/NextImage.liquid.js"),l=require("../../../../../image/components/Modal3d.liquid.js"),m=require("@gem-sdk/system"),p=require("../../../../../image/components/Video.liquid.js"),u=require("../../../../helpers/function.js"),g=require("../../common/common.js");exports.default=({builderPropUID:c,wrapperStyle:n,children:y,pageContext:h,...f})=>{let{galleryItemClasses:C,galleryGridWrapperClasses:v}=i.getProductImagesClassName(f),{galleryGridStyles:q,galleryGridItemStyles:L}=a.getProductImagesStyles(f),w=d.getShapeByLayout({shape:f.shape,shapeForBottom:f.shapeForBottom,shapeFor1Col:f.shapeFor1Col,shapeFor2Col:f.shapeFor2Col,shapeForFtOnly:f.shapeForFtOnly,shapeForInsideBottom:f.shapeForInsideBottom,shapeForInside:f.shapeForInside},f.position),_=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(a=>{let s=e.getResponsiveValueByScreen(f?.position,a)||"",d="one-col"===s||"two-col"===s;t[a]=(i?!d:d)?"block":"none"}),e.makeStyleResponsive("d",t)},b=()=>_(),I=()=>_(!0),$=s.getLiquidImageSrcset({liquidSrc:"media.preview_image",sizeTarget:"ProductFeatureImage",qualityType:f.qualityType,qualityPercent:f.qualityPercent}),x=(i,a)=>e.template`
|
|
2
|
+
${r.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:$,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:a,className:"!gp-rounded-none"})}
|
|
3
|
+
${m.If(f?.galleryHoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",t.getZoomImageClass())}">
|
|
4
|
+
${r.default({srcIsLiquidCode:!0,src:"{{media.preview_image | image_url}}",srcset:$,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:i,style:a,className:"!gp-rounded-none gp-w-full gp-h-full"})}
|
|
5
5
|
</div>`," ")}
|
|
6
|
-
${m.If(
|
|
6
|
+
${m.If(f?.galleryHoverEffect=="zoom"&&f?.galleryZoomType=="glasses",`<div class="${e.cls("zoom-lens-element",t.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
|
|
9
|
+
`,S=()=>l.default({src:m.LiquidIf("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:g.getAspectRatio(w)}),F=()=>p.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),j=()=>o.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),V=()=>e.template`
|
|
10
10
|
${m.LiquidIf("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"/>
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z" fill="#F9F9F9"/>
|
|
20
20
|
</svg>
|
|
21
21
|
</div>`)}
|
|
22
|
-
${
|
|
22
|
+
${x({aspectRatio:g.getAspectRatio(w),layout:f?.layout,qualityType:f?.qualityType,qualityPercent:f?.qualityPercent},{width:"100%",height:"100%"})}
|
|
23
23
|
|
|
24
24
|
<div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
|
|
25
|
-
style="${
|
|
25
|
+
style="${u.getStyleOfObject(d.getZoomDisplay(f?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
|
-
`,
|
|
42
|
+
`,k=i=>`
|
|
43
43
|
${m.LiquidIf("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
44
|
${m.LiquidIf("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
45
|
${m.LiquidIf("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
@@ -53,41 +53,41 @@
|
|
|
53
53
|
external-id="{{media.external_id}}"
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
55
|
data-outline="none"
|
|
56
|
-
class="${
|
|
57
|
-
style="${
|
|
56
|
+
class="${C(`gem-slider-item-${c}-{{product.id}} gp-gallery-image-item ${i??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
|
|
57
|
+
style="${u.getStyleOfObject(L)}"
|
|
58
58
|
>
|
|
59
59
|
${m.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
61
|
${m.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
<div class="gp-w-full" style="${m.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${m.LiquidIf("isVideo == true",
|
|
64
|
-
${m.LiquidIf("media != null",
|
|
63
|
+
<div class="gp-w-full" style="${m.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${m.LiquidIf("isVideo == true",u.getStyleOfObject({...I()}))}">
|
|
64
|
+
${m.LiquidIf("media != null",V(),M())}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
<div class="${m.LiquidIf("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${m.LiquidIf("isMedia",
|
|
68
|
+
style="${m.LiquidIf("isMedia",u.getStyleOfObject({...e.makeStyleResponsive("aspect",g.getAspectRatio(w))}))} ${u.getStyleOfObject({...b()})}"
|
|
69
69
|
>
|
|
70
70
|
{% case media.media_type %}
|
|
71
71
|
{% when 'external_video' %}
|
|
72
72
|
{% assign mediaSourceVideo = media | external_video_url %}
|
|
73
|
-
${
|
|
73
|
+
${F()}
|
|
74
74
|
{% when 'video' %}
|
|
75
75
|
{% assign mediaSourceVideo = media.sources.last.url %}
|
|
76
|
-
${
|
|
76
|
+
${j()}
|
|
77
77
|
{% when 'model' %}
|
|
78
|
-
${
|
|
78
|
+
${S()}
|
|
79
79
|
{% endcase %}
|
|
80
80
|
</div>
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
|
-
</div>`,
|
|
84
|
-
${
|
|
83
|
+
</div>`,M=()=>e.template`
|
|
84
|
+
${r.default({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",setting:{aspectRatio:g.getAspectRatio(w),layout:f?.layout,qualityType:f?.qualityType,qualityPercent:f?.qualityPercent},className:"!gp-rounded-none"})}`;return m.Liquid(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${v}"
|
|
87
|
-
style="${
|
|
87
|
+
style="${u.getStyleOfObject(q)}}"
|
|
88
88
|
>
|
|
89
89
|
${m.LiquidFor("media in product.media",`${m.LiquidIf("media.media_type == 'image'",m.LiquidFor("image in product.images",m.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
|
-
${m.LiquidIf("media.id == product.featured_media.id ",
|
|
91
|
-
${m.LiquidIf("product.media.size > 0",
|
|
92
|
-
${m.LiquidIf("product.media.size < 1",
|
|
90
|
+
${m.LiquidIf("media.id == product.featured_media.id ",k(f?.borderActive?.border!=="none"?"active":""),k())}`)}
|
|
91
|
+
${m.LiquidIf("product.media.size > 0",y)}
|
|
92
|
+
${m.LiquidIf("product.media.size < 1",k())}
|
|
93
93
|
</div>`)};
|
package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../carousel-v3/components/item/CarouselItem.js"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("@gem-sdk/core"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../carousel-v3/components/item/CarouselItem.js"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("@gem-sdk/core"),s=require("../../common/productFeaturedImage.js"),l=require("../../../../../image/components/NextImage.js"),d=require("../child/ProductFeatureVideo.js");require("../../../../../modal/components/confirm.js");var r=require("../../../../../modal/components/Modal.js"),n=require("../child/MediaIcon.js"),a=require("react");const p={desktop:"finest"};exports.default=({builderPropUID:u,productImages:c,open:m,imageRatio:g,onHandleClose:h})=>{let b=i.useFeaturedImageGlobal(),j=a.useMemo(()=>{let e=c?.findIndex(e=>e.id===b?.id);return e&&e>0?e:0},[c,b]),f={desktop:c&&c.length>1,mobile:c&&c?.length>1,tablet:c&&c?.length>1},y=i.useEditorMode(),k=e=>"edit"!==y&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e.jsx(r.default,{setting:{open:m},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{h(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:j,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:f,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:j},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:j,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:c?.map(o=>e.jsx(t.default,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:k(o)?e.jsx(d.default,{type:o?.contentType,url:o.src??"",thumbnail:o?.previewImage,aspectRatio:g}):e.jsxs(e.Fragment,{children:[e.jsx(l.default,{src:s.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:g,qualityType:p},className:i.cls("gp-h-full gp-w-full gp-object-contain")},o?.id),e.jsx(n.default,{contentType:o?.contentType??""})]})},o?.id))})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../common/styles.js"),t=require("@gem-sdk/system");exports.getProductImagesStyles=(l
|
|
1
|
+
"use strict";var e=require("../common/styles.js"),t=require("@gem-sdk/system");exports.getProductImagesStyles=(a,l)=>{let r=t.createStyle(e.getWrapContainerStyle(a)),y=t.createStyle(e.getWrapContainerStyle(a,!0)),g=t.createStyle(e.getWrapContainerStyle(a,l?.isGalleryVisible===!1)),S=t.createStyle(e.getFeatureImageStyle(a,{enableOrder:!0,enableDisplay:!0})),s=t.createStyle(e.getFeaturedImageOnlyOneImageStyle({setting:a,options:{enableRadius:!0,enableHeight:!0}})),i=t.createStyle(e.getGalleryImageStyle(a,l?.featureImageHeight)),m=t.createStyle(e.getFeaturedImageCarouselStyle(a)),u=t.createStyle({...e.getFeatureImageCarouselItemStyle(a)}),c=t.createStyle({...e.getFeatureImageCarouselItemStyle(a),width:"{{productImageWidth}}px"}),n=t.createStyle(e.getGalleryGridStyle(a)),o=t.createStyle(e.getGalleryGridItemStyle(a)),I=t.createStyle(e.getGalleryCarouselStyle(a)),d=t.createStyle(e.getGalleryCarouselItemStyle(a));return{wrapContainerStyle:r,wrapContainerStyleOnlyOneImage:y,wrapperFeaturedImageStyle:g,featureImageStyle:S,featureImageOnlyOneImageStyle:s,galleryImageStyle:i,featuredImageCarouselStyle:m,featureImageCarouselItemStyle:u,featureImageCarouselOnlyOneImageStyle:c,galleryGridStyles:n,galleryGridItemStyles:o,galleryCarouselStyle:I,galleryCarouselItemStyle:d}};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:a,children:o}=n,{productItemClass:r,gpProductClass:i}=t.getClass(n);return e.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
7
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
8
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
9
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
10
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
11
|
-
${
|
|
11
|
+
${o}
|
|
12
12
|
{%- endform -%}
|
|
13
13
|
</gp-product>
|
|
14
14
|
`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),t=require("../../../carousel/components/item/CarouselItem.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),t=require("../../../image/common/listImageContext.js"),o=require("./common/imagePriorityHints.js"),i=require("./common/imagePriority.js"),l=require("../../../carousel/components/item/CarouselItem.js"),a=require("../../../carousel/components/root/Carousel.js"),d=require("./common/classes.js"),u=require("./common/helpers.js"),n=require("./common/styles.js"),m=require("./common/attrs.js");exports.default=c=>{let{children:j,builderProps:g,productSortedById:p,advanced:q,setting:x}=c,h=r.useEditorMode(),{carouselConfigSetting:y,carouselConfigStyle:C}=u.getData(c),{productListAttr:P,getAttrProductItemEditor:v}=m.getAttr(c),{carouselItemStyle:I}=n.getStyle(c),{carouselClass:S,productItemClass:b}=d.getClass(c);return e.jsx(a.default,{advanced:q,builderProps:{uid:g?.uid},rootAttrs:{...P},rootClass:S,setting:y,styles:C,children:p?.map((a,d)=>e.jsx(l.default,{style:I,children:e.jsx(r.ProductProvider,{product:a,readOnly:!0,children:e.jsx(t.ListImageContext.Provider,{value:o.getListImageHints({slidesToShow:x?.slidesToShow,rows:i.LIST_PRELOAD_ROWS.CAROUSEL,index:d+1}),children:e.jsx("div",{..."edit"===h?v(a?.baseID):{},className:b,children:r.isEmptyChildren(j)?e.jsx(s.default,{}):j})})})},a?.baseID))})};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../carousel/components/item/CarouselItem.liquid.js"),
|
|
2
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/imagePriority.js"),t=require("../../../carousel/components/item/CarouselItem.liquid.js"),r=require("../../../carousel/components/root/Carousel.liquid.js"),i=require("./ProductListCarouselItem.liquid.js"),o=require("../../../helpers.js"),s=require("./common/classes.js"),d=require("./common/helpers.js"),u=require("./common/styles.js"),l=require("@gem-sdk/core");exports.default=a=>{let{builderProps:c,advanced:n,productSrc:p,productListId:m}=a,{carouselConfigSetting:g,carouselConfigStyle:f}=d.getData(a),{carouselItemStyle:_}=u.getStyle(a),{carouselClass:q}=s.getClass(a),$=e.getListImagePriorityLiquid({slidesToShow:a.setting?.slidesToShow,rows:e.LIST_PRELOAD_ROWS.CAROUSEL});return l.template`
|
|
2
|
+
${r.default({advanced:n,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:q,setting:g,styles:f,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
|
+
${$.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
9
|
-
${
|
|
10
|
-
${
|
|
9
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
10
|
+
${t.default({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,background:g?.background,children:`
|
|
11
|
+
${i.default({...a})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
${$.reset}
|
|
16
|
+
{%- if count == 0 and ${m.length} == 0 -%}
|
|
17
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
16
18
|
<div>${o.getStaticLocale("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
20
|
<div>${o.getStaticLocale("ProductList","no_products_found")}</div>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:a,rawChildren:o}=n,{productItemClass:r,gpProductClass:i}=e.getClass(n);return t.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
7
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
8
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
9
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
10
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
11
11
|
${t.template`
|
|
12
|
-
${
|
|
12
|
+
${o?.map((e,n)=>{if(e)return t.template`
|
|
13
13
|
${t.RenderChildren({...e,index:n})}
|
|
14
14
|
`}).join("")}
|
|
15
15
|
`}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),i=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),t=require("../../../image/common/listImageContext.js"),o=require("./common/imagePriorityHints.js"),l=require("./common/imagePriority.js"),m=require("./common/classes.js"),d=require("./common/styles.js"),a=require("./common/attrs.js");exports.default=n=>{let{children:c,productSortedById:u,generateGridRowArray:g,setting:j}=n,h=i.useEditorMode(),{gridLayoutStyle:p}=d.getStyle(n),{gridLayoutClass:y,productItemClass:x}=m.getClass(n),{productListAttr:q,getAttrProductItemEditor:v}=a.getAttr(n);return e.jsx("div",{...q,style:p,className:y,children:u?.length?u?.map((m,d)=>e.jsx(i.ProductProvider,{product:m,readOnly:!0,children:e.jsx(t.ListImageContext.Provider,{value:o.getListImageHints({slidesToShow:j?.slidesToShow,rows:l.LIST_PRELOAD_ROWS.GRID,index:d+1}),children:e.jsx("div",{..."edit"===h?v(m?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?g?.[d]?.gridRow:void 0,"--mbchild":g?.[d]?.marginBottom},children:i.isEmptyChildren(c)?e.jsx(s.default,{}):r.Children.map(c,e=>r.isValidElement(e)?r.createElement(e.type,{...e.props,key:e.key}):null)})})},m?.baseID)):null})};
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ProductListGridItem.liquid.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/imagePriority.js"),t=require("./ProductListGridItem.liquid.js"),i=require("../../../helpers.js"),s=require("@gem-sdk/core"),r=require("./common/classes.js"),o=require("./common/styles.js"),d=require("./common/attrs.js");exports.default=a=>{let{setting:l,builderProps:n,styles:c,productListId:u,productSrc:p}=a,{gridLayoutStyle:m}=o.getStyle(a),{gridLayoutClass:g}=r.getClass(a),{productListAttr:f}=d.getAttr(a),$=e.getListImagePriorityLiquid({slidesToShow:l?.slidesToShow,rows:e.LIST_PRELOAD_ROWS.GRID}),h=()=>s.template`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
|
+
${$.item}
|
|
6
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${n?.uid}" | append: product.id -%}
|
|
9
|
+
${t.default({...a})}
|
|
9
10
|
{%- endif -%}
|
|
10
11
|
{% endfor %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
${$.reset}
|
|
13
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
14
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
15
|
+
<div>${i.getStaticLocale("ProductList","no_related_products")}</div>
|
|
14
16
|
{% else %}
|
|
15
|
-
<div>${
|
|
17
|
+
<div>${i.getStaticLocale("ProductList","no_products_found")}</div>
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{%- endif -%}
|
|
18
|
-
`;return
|
|
20
|
+
`;return s.template`
|
|
19
21
|
<div
|
|
20
|
-
${
|
|
21
|
-
style="${
|
|
22
|
+
${f}
|
|
23
|
+
style="${m}"
|
|
22
24
|
class="${g}"
|
|
23
25
|
>
|
|
24
|
-
${
|
|
26
|
+
${s.RenderIf(l?.sameHeight,s.template`
|
|
25
27
|
<gp-same-height
|
|
26
28
|
class="gp-contents"
|
|
27
29
|
style="visibility: hidden"
|
|
28
30
|
>
|
|
29
|
-
<script gp-data type="application/json">${JSON.stringify({targetUid:
|
|
31
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:n?.builderData?.childrens?.[0],slidesToShow:l?.slidesToShow,rowGap:c?.horizontalGutter})}
|
|
30
32
|
</script>
|
|
31
|
-
${`${
|
|
33
|
+
${`${h()}`}
|
|
32
34
|
</gp-same-height>
|
|
33
35
|
`)}
|
|
34
|
-
${
|
|
36
|
+
${s.RenderIf(!l?.sameHeight,s.template`${h()}`)}
|
|
35
37
|
</div>
|
|
36
38
|
`};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core"),I=require("../../../../image/common/sizes.js");const i={desktop:4,tablet:2,mobile:2},s=I=>e.DEVICES.map(s=>{let t=Number(e.getResponsiveValueByScreen(I,s));return Math.max(1,Math.floor(t||i[s]))}),t=e=>100/Math.min(...s(e)),_=({slidesToShow:e,rows:I})=>{let i=s(e);return{eagerLimit:Math.max(...i)*I,highLimit:Math.min(...i),sizes:`${Number(t(e).toFixed(2))}vw`}};exports.LIST_PRELOAD_ROWS={GRID:2,CAROUSEL:1},exports.getListImagePriority=_,exports.getListImagePriorityLiquid=({slidesToShow:i,rows:s,indexVar:a="count"})=>{let{eagerLimit:r,highLimit:L}=_({slidesToShow:i,rows:s}),S=I.getImageSizes({slotVw:t(i)});return{item:`{%- liquid
|
|
2
|
+
if ${a} <= ${r}
|
|
3
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.LOADING} = 'eager'
|
|
4
|
+
else
|
|
5
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.LOADING} = 'lazy'
|
|
6
|
+
endif
|
|
7
|
+
if ${a} <= ${L}
|
|
8
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.FETCH_PRIORITY} = 'high'
|
|
9
|
+
else
|
|
10
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.FETCH_PRIORITY} = 'auto'
|
|
11
|
+
endif
|
|
12
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.SIZES} = '${S}'
|
|
13
|
+
-%}`,reset:`{%- liquid
|
|
14
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.LOADING} = nil
|
|
15
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.FETCH_PRIORITY} = nil
|
|
16
|
+
assign ${e.LIST_IMAGE_LIQUID_VARS.SIZES} = nil
|
|
17
|
+
-%}`}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./imagePriority.js");exports.getListImageHints=({slidesToShow:e,rows:i,index:r})=>{let{eagerLimit:a,highLimit:g,sizes:s}=t.getListImagePriority({slidesToShow:e,rows:i});return{loading:r<=a?"eager":"lazy",fetchpriority:r<=g?"high":"auto",sizes:s}};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:a,children:o}=n,{productItemClass:r,gpProductClass:i}=t.getClass(n);return e.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
5
4
|
class="${i}"
|
|
6
5
|
>
|
|
7
6
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../../carousel-v3/components/item/CarouselItem.js"),s=require("../../../carousel-v3/components/root/Carousel.js"),t=require("@gem-sdk/core"),o=require("../../../grid/components/ChildrenDroppable.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../../carousel-v3/components/item/CarouselItem.js"),s=require("../../../carousel-v3/components/root/Carousel.js"),t=require("@gem-sdk/core"),o=require("../product-list/common/imagePriorityHints.js"),i=require("../../../grid/components/ChildrenDroppable.js"),l=require("../../../image/common/listImageContext.js"),d=require("../product-list/common/imagePriority.js"),u=require("./common/classes.js"),a=require("./common/helpers.js"),n=require("./common/styles.js"),m=require("./common/attrs.js");exports.default=c=>{let{children:j,builderProps:p,productSortedById:g,advanced:q,setting:x}=c,h=t.useEditorMode(),{carouselConfigSetting:v,carouselConfigStyle:y}=a.getData(c),{productListAttr:C,getAttrProductItemEditor:P}=m.getAttr(c),{carouselItemStyle:I}=n.getStyle(c),{carouselClass:L,productItemClass:S}=u.getClass(c);return e.jsx(s.default,{advanced:q,builderProps:{uid:p?.uid},rootAttrs:{...C},rootClass:L,setting:v,styles:y,isProductList:!0,children:g?.map((s,u)=>e.jsx(r.default,{style:I,children:e.jsx(t.ProductProvider,{product:s,readOnly:!0,children:e.jsx(l.ListImageContext.Provider,{value:o.getListImageHints({slidesToShow:x?.slidesToShow,rows:d.LIST_PRELOAD_ROWS.CAROUSEL,index:u+1}),children:e.jsx("div",{..."edit"===h?P(s?.baseID):{},className:S,children:t.isEmptyChildren(j)?e.jsx(i.default,{}):j})})})},s?.baseID))})};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../carousel-v3/components/item/CarouselItem.liquid.js"),t=require("../../../carousel-v3/components/root/Carousel.liquid.js"),r=require("./ProductListCarouselItem.liquid.js"),
|
|
2
|
-
${t.default({advanced:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../carousel-v3/components/item/CarouselItem.liquid.js"),t=require("../../../carousel-v3/components/root/Carousel.liquid.js"),r=require("../product-list/common/imagePriority.js"),i=require("./ProductListCarouselItem.liquid.js"),o=require("../../../helpers.js"),s=require("./common/classes.js"),d=require("./common/helpers.js"),u=require("./common/styles.js"),l=require("@gem-sdk/core");exports.default=a=>{let{builderProps:c,advanced:n,productSrc:p,productListId:m}=a,{carouselConfigSetting:g,carouselConfigStyle:f}=d.getData(a),{carouselItemStyle:_}=u.getStyle(a),{carouselClass:q}=s.getClass(a),$=r.getListImagePriorityLiquid({slidesToShow:a.setting?.slidesToShow,rows:r.LIST_PRELOAD_ROWS.CAROUSEL});return l.template`
|
|
2
|
+
${t.default({advanced:n,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:q,setting:g,styles:f,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
|
+
${$.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
9
|
-
${e.default({builderProps:{...
|
|
10
|
-
${
|
|
9
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
10
|
+
${e.default({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,parentSettings:g,background:g?.background,children:`
|
|
11
|
+
${i.default({...a})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
${$.reset}
|
|
16
|
+
{%- if count == 0 and ${m.length} == 0 -%}
|
|
17
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
18
|
+
<div>${o.getStaticLocale("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
|
-
<div>${
|
|
20
|
+
<div>${o.getStaticLocale("ProductList","no_products_found")}</div>
|
|
19
21
|
{%- endif -%}
|
|
20
22
|
{%- endif -%}
|
|
21
23
|
`,carouselType:"product_list"})}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:a,rawChildren:o}=n,{productItemClass:r,gpProductClass:i}=e.getClass(n);return t.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
7
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
8
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
9
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
10
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
11
11
|
${t.template`
|
|
12
|
-
${
|
|
12
|
+
${o?.map((e,n)=>{if(e)return t.template`
|
|
13
13
|
${t.RenderChildren({...e,index:n})}
|
|
14
14
|
`}).join("")}
|
|
15
15
|
`}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("@gem-sdk/core"),i=require("../product-list/common/imagePriorityHints.js"),s=require("../../../grid/components/ChildrenDroppable.js"),o=require("../../../image/common/listImageContext.js"),l=require("../product-list/common/imagePriority.js"),d=require("./common/classes.js"),m=require("./common/styles.js"),a=require("./common/attrs.js");exports.default=n=>{let{children:c,productSortedById:u,generateGridRowArray:g,setting:p}=n,j=t.useEditorMode(),{gridLayoutStyle:h}=m.getStyle(n),{gridLayoutClass:y,productItemClass:x}=d.getClass(n),{productListAttr:q,getAttrProductItemEditor:v}=a.getAttr(n);return e.jsx("div",{...q,style:h,className:y,children:u?.length?u?.map((d,m)=>e.jsx(t.ProductProvider,{product:d,readOnly:!0,children:e.jsx(o.ListImageContext.Provider,{value:i.getListImageHints({slidesToShow:p?.slidesToShow,rows:l.LIST_PRELOAD_ROWS.GRID,index:m+1}),children:e.jsx("div",{..."edit"===j?v(d?.baseID):{},className:x,style:{"--grchild":p?.sameHeight?g?.[m]?.gridRow:void 0,"--mbchild":g?.[m]?.marginBottom},children:t.isEmptyChildren(c)?e.jsx(s.default,{}):r.Children.map(c,e=>r.isValidElement(e)?r.createElement(e.type,{...e.props,key:e.key}):null)})})},d?.baseID)):null})};
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ProductListGridItem.liquid.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../product-list/common/imagePriority.js"),t=require("./ProductListGridItem.liquid.js"),i=require("../../../helpers.js"),s=require("@gem-sdk/core"),r=require("./common/classes.js"),o=require("./common/styles.js"),d=require("./common/attrs.js");exports.default=a=>{let{setting:l,builderProps:c,styles:n,productListId:u,productSrc:p}=a,{gridLayoutStyle:m}=o.getStyle(a),{gridLayoutClass:g}=r.getClass(a),{productListAttr:f}=d.getAttr(a),$=e.getListImagePriorityLiquid({slidesToShow:l?.slidesToShow,rows:e.LIST_PRELOAD_ROWS.GRID}),h=()=>s.template`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
|
+
${$.item}
|
|
6
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
+
${t.default({...a})}
|
|
9
10
|
{%- endif -%}
|
|
10
11
|
{% endfor %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
${$.reset}
|
|
13
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
14
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
15
|
+
<div>${i.getStaticLocale("ProductList","no_related_products")}</div>
|
|
14
16
|
{% else %}
|
|
15
|
-
<div>${
|
|
17
|
+
<div>${i.getStaticLocale("ProductList","no_products_found")}</div>
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{%- endif -%}
|
|
18
|
-
`;return
|
|
20
|
+
`;return s.template`
|
|
19
21
|
<div
|
|
20
|
-
${
|
|
21
|
-
style="${
|
|
22
|
+
${f}
|
|
23
|
+
style="${m}"
|
|
22
24
|
class="${g}"
|
|
23
25
|
>
|
|
24
|
-
${
|
|
26
|
+
${s.RenderIf(l?.sameHeight,s.template`
|
|
25
27
|
<gp-same-height
|
|
26
28
|
class="gp-contents"
|
|
27
29
|
style="visibility: hidden"
|
|
28
30
|
>
|
|
29
|
-
<script gp-data type="application/json">${JSON.stringify({targetUid:
|
|
31
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:l?.slidesToShow,rowGap:n?.horizontalGutter})}
|
|
30
32
|
</script>
|
|
31
|
-
${`${
|
|
33
|
+
${`${h()}`}
|
|
32
34
|
</gp-same-height>
|
|
33
35
|
`)}
|
|
34
|
-
${
|
|
36
|
+
${s.RenderIf(!l?.sameHeight,s.template`${h()}`)}
|
|
35
37
|
</div>
|
|
36
38
|
`};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/helpers.js"),e=require("@gem-sdk/core"),i=require("../../../helpers.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/helpers.js"),e=require("@gem-sdk/core"),i=require("../../../helpers.js"),a=require("../../../grid/components/row/Row.liquid.js"),r=require("@gem-sdk/system");exports.default=d=>{let{children:n,setting:o,style:s,builderProps:c,rawChildren:l,advanced:p}=d,{isSyncProduct:u,productSetting:f}=o??{},g=f?.hasPreSelected??!1,{rowSetting:m,rowStyles:_,formatVariantId:y,formatProductId:v,productStatus:$,preSelectedOptionIds:S,productHandle:I,advancedStyle:P}=t.getData(d);return e.template`
|
|
2
2
|
${e.template`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${
|
|
4
|
+
${r.If($==t.DYNAMIC_PRODUCT_STATUS,e.template`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${I}']
|
|
8
|
-
assign productId = '${
|
|
8
|
+
assign productId = '${v}' | times: 1
|
|
9
9
|
if product == empty or product == null
|
|
10
10
|
paginate collections.all.products by 100000
|
|
11
11
|
for item in collections.all.products
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
{%- liquid
|
|
22
22
|
if request.page_type == 'product'
|
|
23
23
|
if '${$}' == '${t.STATIC_PRODUCT_STATUS}'
|
|
24
|
-
if '${
|
|
24
|
+
if '${v}' == '${t.PRODUCT_ID_LATEST}'
|
|
25
25
|
paginate collections.all.products by 100000
|
|
26
26
|
assign product = collections.all.products | sort: 'created_at' | reverse | first
|
|
27
27
|
endpaginate
|
|
28
28
|
else
|
|
29
29
|
assign product = all_products['${I}']
|
|
30
|
-
assign productId = '${
|
|
30
|
+
assign productId = '${v}' | times: 1
|
|
31
31
|
if product == empty or product == null
|
|
32
32
|
paginate collections.all.products by 100000
|
|
33
33
|
for item in collections.all.products
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
endif
|
|
41
41
|
endif
|
|
42
42
|
else
|
|
43
|
-
if '${
|
|
43
|
+
if '${v}' == '${t.PRODUCT_ID_LATEST}'
|
|
44
44
|
paginate collections.all.products by 100000
|
|
45
45
|
assign product = collections.all.products | sort: 'created_at'| reverse | first
|
|
46
46
|
endpaginate
|
|
47
47
|
else
|
|
48
48
|
assign product = all_products['${I}']
|
|
49
|
-
assign productId = '${
|
|
49
|
+
assign productId = '${v}' | times: 1
|
|
50
50
|
if product == empty or product == null
|
|
51
51
|
paginate collections.all.products by 100000
|
|
52
52
|
for item in collections.all.products
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
-%}
|
|
62
62
|
`)}
|
|
63
63
|
`}
|
|
64
|
-
${
|
|
64
|
+
${r.LiquidIf("product != empty and product != null",e.template`
|
|
65
65
|
${e.template`
|
|
66
|
-
{%- assign initVariantId = ${
|
|
66
|
+
{%- assign initVariantId = ${y} -%}
|
|
67
67
|
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" -%}
|
|
68
|
-
${
|
|
69
|
-
${
|
|
68
|
+
${y?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
|
|
69
|
+
${y?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
|
|
70
70
|
{%-if productSelectedVariant == empty or productSelectedVariant == null -%}
|
|
71
71
|
{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
|
|
72
72
|
{%- endif -%}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
data-id="${c?.uid}"
|
|
83
83
|
style="${P}"
|
|
84
84
|
class="${p?.cssClass}"
|
|
85
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${S}], "isSyncProduct": "${u}", "hasPreSelected": ${g}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
85
|
+
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${S}], "isSyncProduct": "${u}", "hasPreSelected": ${g}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
86
86
|
>
|
|
87
87
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }}}</script>
|
|
88
88
|
<product-form class="product-form">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
91
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
92
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
93
|
-
${
|
|
93
|
+
${a.default({builderProps:{...c,uid:c?.uid,uidInteraction:`${c?.uid}-row`},style:s,styles:_,setting:m,children:n,rawChildren:l})}
|
|
94
94
|
{%- endform -%}
|
|
95
95
|
</product-form>
|
|
96
96
|
</gp-product>
|