@gem-sdk/components 23.0.0-dev.2 → 23.0.0-dev.20
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/accordion/settings/configs/settings.js +2 -17
- package/dist/cjs/article/components/ArticleImage.liquid.js +2 -2
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/settings/ArticleAuthor.js +1 -1
- package/dist/cjs/article/settings/ArticleCategory.js +1 -1
- package/dist/cjs/article/settings/ArticleContent.js +1 -1
- package/dist/cjs/article/settings/ArticleDate.js +1 -1
- package/dist/cjs/article/settings/ArticleExcerpt.js +1 -1
- package/dist/cjs/article/settings/ArticleImage.js +1 -1
- package/dist/cjs/article/settings/ArticleList.js +1 -1
- package/dist/cjs/article/settings/ArticleReadMore.js +1 -1
- package/dist/cjs/article/settings/ArticleTag.js +1 -1
- package/dist/cjs/article/settings/ArticleTitle.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/article/settings/configs/article-list/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-read-more/settings.js +2 -2
- package/dist/cjs/breadcrumb/settings/configs/settings.js +1 -1
- package/dist/cjs/button/common/helpers.js +1 -1
- package/dist/cjs/button/common/styles.js +1 -1
- package/dist/cjs/button/settings/configs/settings.js +2 -2
- package/dist/cjs/carousel/settings/Carousel.js +1 -1
- package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +4 -4
- package/dist/cjs/carousel-v3/settings/Carousel.js +1 -1
- package/dist/cjs/code/settings/configs/settings.js +1 -1
- package/dist/cjs/collection/settings/collection-banner/configs/settings.js +1 -1
- package/dist/cjs/collection/settings/collection-description/configs/settings.js +1 -1
- package/dist/cjs/collection/settings/collection-paginator/configs/settings.js +1 -1
- package/dist/cjs/collection/settings/collection-title/configs/settings.js +1 -1
- package/dist/cjs/collection/settings/collection-toolbar/configs/settings.js +1 -1
- package/dist/cjs/common/components/Loading.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/common/helpers.js +1 -0
- package/dist/cjs/common/hooks/useElementWidth.js +1 -0
- package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
- package/dist/cjs/coupon/settings/configs/settings.js +2 -2
- package/dist/cjs/dialog/settings/configs/settings.js +1 -1
- package/dist/cjs/estimate-delivery/settings/configs/settings.js +1 -1
- package/dist/cjs/form/settings/contact/configs/settings.js +1 -1
- package/dist/cjs/form/settings/submit-button/configs/settings.js +2 -2
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/grid/settings/configs/section/settings.js +1 -1
- package/dist/cjs/header/settings/configs/settings.js +2 -2
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +7 -7
- package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
- 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 +15 -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.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/settings/configs/settings.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.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/settings/configs/settings.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/line/common/helpers.js +1 -1
- package/dist/cjs/line/common/styles.js +1 -1
- package/dist/cjs/line/settings/configs/settings.js +1 -1
- package/dist/cjs/marquee/settings/Marquee.js +1 -1
- package/dist/cjs/post-purchase/image/settings/Image.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-description/ProductDescription.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-image/ProductImages.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-offer/index.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-price/ProductPrice.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/post-purchase/product/settings/product-title/ProductTitle.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-variants/ProductVariant.js +2 -2
- package/dist/cjs/post-purchase/text/settings/text/Text.js +1 -1
- package/dist/cjs/product/components/file-upload/settings/configs/settings.js +2 -2
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
- package/dist/cjs/product/components/product-bundle/common/classes.js +1 -1
- package/dist/cjs/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.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/feature-gallery/FeatureImageWithGallery.liquid.js +42 -42
- 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-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/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.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/composables/getProductImagesStyles.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +4 -4
- 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.liquid.js +16 -14
- package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +2 -3
- 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.liquid.js +16 -14
- package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +5 -6
- package/dist/cjs/product/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +14 -13
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/product/helpers/product-bundle.js +1 -1
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/ProductList.js +1 -1
- package/dist/cjs/product/settings/ProductListV3.js +1 -1
- package/dist/cjs/product/settings/ProductProperties.js +1 -1
- package/dist/cjs/product/settings/dynamic-checkout/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-button/configs/settings.js +2 -2
- package/dist/cjs/product/settings/product-image-v2/ProductImages.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/settings/index.js +1 -0
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/ProductImages.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/{setting-v2 → settings}/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-list/configs/settings.js +1 -0
- package/dist/cjs/product/settings/product-list-v3/configs/settings.js +1 -0
- package/dist/cjs/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/cjs/stock-counter/common/attrs.js +1 -1
- package/dist/cjs/stock-counter/common/helpers.js +1 -1
- package/dist/cjs/stock-counter/common/styles.js +1 -1
- package/dist/cjs/stock-counter/hooks/useStockCounter.js +1 -1
- package/dist/cjs/stock-counter/settings/StockCounter.js +1 -1
- package/dist/cjs/stock-counter/settings/configs/settings.js +2 -0
- package/dist/cjs/tab/settings/configs/settings.js +1 -1
- package/dist/cjs/text/settings/configs/settings.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.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/accordion/settings/configs/settings.js +2 -17
- package/dist/esm/article/components/ArticleImage.liquid.js +3 -3
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/settings/ArticleAuthor.js +2 -2
- package/dist/esm/article/settings/ArticleCategory.js +2 -2
- package/dist/esm/article/settings/ArticleContent.js +1 -1
- package/dist/esm/article/settings/ArticleDate.js +1 -1
- package/dist/esm/article/settings/ArticleExcerpt.js +1 -1
- package/dist/esm/article/settings/ArticleImage.js +1 -1
- package/dist/esm/article/settings/ArticleList.js +1 -1
- package/dist/esm/article/settings/ArticleReadMore.js +1 -1
- package/dist/esm/article/settings/ArticleTag.js +1 -1
- package/dist/esm/article/settings/ArticleTitle.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/article/settings/configs/article-list/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-read-more/settings.js +2 -2
- package/dist/esm/breadcrumb/settings/configs/settings.js +1 -1
- package/dist/esm/button/common/helpers.js +1 -1
- package/dist/esm/button/common/styles.js +1 -1
- package/dist/esm/button/settings/configs/settings.js +2 -2
- package/dist/esm/carousel/settings/Carousel.js +1 -1
- package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +6 -6
- package/dist/esm/carousel-v3/settings/Carousel.js +1 -1
- package/dist/esm/code/settings/configs/settings.js +1 -1
- package/dist/esm/collection/settings/collection-banner/configs/settings.js +1 -1
- package/dist/esm/collection/settings/collection-description/configs/settings.js +1 -1
- package/dist/esm/collection/settings/collection-paginator/configs/settings.js +1 -1
- package/dist/esm/collection/settings/collection-title/configs/settings.js +1 -1
- package/dist/esm/collection/settings/collection-toolbar/configs/settings.js +1 -1
- package/dist/esm/common/components/Loading.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/common/helpers.js +1 -0
- package/dist/esm/common/hooks/useElementWidth.js +1 -0
- package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
- package/dist/esm/coupon/settings/configs/settings.js +2 -2
- package/dist/esm/dialog/settings/configs/settings.js +1 -1
- package/dist/esm/estimate-delivery/settings/configs/settings.js +1 -1
- package/dist/esm/form/settings/contact/configs/settings.js +1 -1
- package/dist/esm/form/settings/submit-button/configs/settings.js +2 -2
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/grid/settings/configs/section/settings.js +1 -1
- package/dist/esm/header/settings/configs/settings.js +2 -2
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
- 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 +15 -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.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/settings/configs/settings.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.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/settings/configs/settings.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/line/common/helpers.js +1 -1
- package/dist/esm/line/common/styles.js +1 -1
- package/dist/esm/line/settings/configs/settings.js +1 -1
- package/dist/esm/marquee/settings/Marquee.js +1 -1
- package/dist/esm/post-purchase/image/settings/Image.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-description/ProductDescription.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-image/ProductImages.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-offer/index.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-price/ProductPrice.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/post-purchase/product/settings/product-title/ProductTitle.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-variants/ProductVariant.js +2 -2
- package/dist/esm/post-purchase/text/settings/text/Text.js +1 -1
- package/dist/esm/product/components/file-upload/settings/configs/settings.js +2 -2
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
- package/dist/esm/product/components/product-bundle/common/classes.js +1 -1
- package/dist/esm/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.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/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- 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-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/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.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/composables/getProductImagesStyles.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.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.liquid.js +18 -16
- package/dist/esm/product/components/product-list/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -7
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +12 -13
- package/dist/esm/product/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.liquid.js +23 -22
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/product/helpers/product-bundle.js +1 -1
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/ProductList.js +1 -1
- package/dist/esm/product/settings/ProductListV3.js +1 -1
- package/dist/esm/product/settings/ProductProperties.js +1 -1
- package/dist/esm/product/settings/dynamic-checkout/configs/settings.js +1 -1
- package/dist/esm/product/settings/product/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-button/configs/settings.js +2 -2
- package/dist/esm/product/settings/product-image-v2/ProductImages.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/settings/index.js +1 -0
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/ProductImages.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/{setting-v2 → settings}/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-list/configs/settings.js +1 -0
- package/dist/esm/product/settings/product-list-v3/configs/settings.js +1 -0
- package/dist/esm/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/esm/stock-counter/common/attrs.js +1 -1
- package/dist/esm/stock-counter/common/helpers.js +4 -4
- package/dist/esm/stock-counter/common/styles.js +1 -1
- package/dist/esm/stock-counter/hooks/useStockCounter.js +1 -1
- package/dist/esm/stock-counter/settings/StockCounter.js +1 -1
- package/dist/esm/stock-counter/settings/configs/settings.js +2 -0
- package/dist/esm/tab/settings/configs/settings.js +1 -1
- package/dist/esm/text/settings/configs/settings.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.liquid.js +9 -9
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +39 -35
- package/package.json +5 -5
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +0 -1
- package/dist/cjs/product/settings/product-list/configs/settings-v2.js +0 -1
- package/dist/cjs/product/settings/product-list-v3/configs/settings-v2.js +0 -1
- package/dist/cjs/stock-counter/settings/configs/settings-v2.js +0 -2
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +0 -1
- package/dist/esm/product/settings/product-list/configs/settings-v2.js +0 -1
- package/dist/esm/product/settings/product-list-v3/configs/settings-v2.js +0 -1
- package/dist/esm/stock-counter/settings/configs/settings-v2.js +0 -2
- /package/dist/cjs/carousel/settings/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/carousel-v3/settings/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/marquee/settings/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/image/settings/configs/{setting-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-description/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-discount-tag/configs/{setting-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-image/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-offer/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-price/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-title/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/product/settings/product-variants/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/cjs/post-purchase/text/settings/text/configs/{setting-v2.js → settings.js} +0 -0
- /package/dist/cjs/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
- /package/dist/cjs/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
- /package/dist/cjs/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
- /package/dist/cjs/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
- /package/dist/cjs/product/settings/product-properties/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/carousel/settings/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/carousel-v3/settings/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/marquee/settings/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/image/settings/configs/{setting-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-description/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-discount-tag/configs/{setting-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-image/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-offer/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-price/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-title/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/product/settings/product-variants/configs/{settings-v2.js → settings.js} +0 -0
- /package/dist/esm/post-purchase/text/settings/text/configs/{setting-v2.js → settings.js} +0 -0
- /package/dist/esm/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
- /package/dist/esm/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
- /package/dist/esm/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
- /package/dist/esm/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
- /package/dist/esm/product/settings/product-properties/configs/{settings-v2.js → settings.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getWrapContainerStyle as e,getFeatureImageStyle as t,getFeaturedImageOnlyOneImageStyle as
|
|
1
|
+
import{getWrapContainerStyle as e,getFeatureImageStyle as t,getFeaturedImageOnlyOneImageStyle as s,getGalleryImageStyle as i,getFeaturedImageCarouselStyle as r,getFeatureImageCarouselItemStyle as l,getGalleryGridStyle as a,getGalleryGridItemStyle as m,getGalleryCarouselStyle as o,getGalleryCarouselItemStyle as g}from"../common/styles.js";import{createStyle as n}from"@gem-sdk/system";let d=(d,p)=>{let b=n(e(d)),u=n(e(d,!0)),y=n(e(d,p?.isGalleryVisible===!1)),h=n(t(d,{enableOrder:!0,enableDisplay:!0})),c=n(s({setting:d,options:{enableRadius:!0,enableHeight:!0}})),f=n(i(d,p?.featureImageHeight)),I=n(r(d)),x=n({...l(d)}),H=n({...l(d),width:"{{productImageWidth}}px"}),j=n(a(d)),k=n(m(d)),w=n(o(d)),D=n(g(d));return{wrapContainerStyle:b,wrapContainerStyleOnlyOneImage:u,wrapperFeaturedImageStyle:y,featureImageStyle:h,featureImageOnlyOneImageStyle:c,galleryImageStyle:f,featuredImageCarouselStyle:I,featureImageCarouselItemStyle:x,featureImageCarouselOnlyOneImageStyle:H,galleryGridStyles:j,galleryGridItemStyles:k,galleryCarouselStyle:w,galleryCarouselItemStyle:D}};export{d as getProductImagesStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{getElementLabel as o,isQueryLoading as d}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as a}from"../../../common/const.js";import{useRenderMode as l,useCurrentDevice as i,usePageType as c,usePageStore as s,useFetchHandle as n,hasPublicStoreFrontData as u,createStoreFrontFetcher as m,useProductQuery as g,useProductsQueryAll as h,useProductsQuery as p,PICKED_PRODUCT_STATUSES as f,useCollectionQuery as P,flattenConnection as T,ProductListProvider as b,filterToolbarPreview as y}from"@gem-sdk/core";import{useState as I,useMemo as v,useEffect as k}from"react";import O from"../../../common/components/Loading.js";import S from"next/dynamic";import C from"../SalePageProductListWarning.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";import{getData as E,isRelatedProductsLoading as N}from"./common/helpers.js";import w from"./ProductListCarouselLayout.js";import j from"./ProductListGridLayout.js";import{getClass as W}from"./common/classes.js";import{getStyle as x}from"./common/styles.js";import{If as G}from"@gem-sdk/system";import M from"next/head";let Q=S(()=>import("../ProductNotFound.js"),{loading:O}),B=S=>{let{children:B,styles:D,builderProps:A,setting:H,builderAttrs:R}=S,{isRelatedProduct:z,productSetting:F}=E(S),$=F.relatedTag&&F.relatedTag[0],{isEditMode:_,isPreviewSharePageMode:q}=l(),U=i(),V=c(),J=s(e=>e.dynamicProduct),K=s(e=>e.dynamicCollection),[X,Y]=I(1),[Z,ee]=I(!0),[et,er]=I(),[eo,ed]=I(!1),[ea,el]=I(),ei="GP_FUNNEL_PAGE"===V;"GP_COLLECTION"!=V||[a.Collection,a.DynamicCollection].includes(F?.productSrc)||(F.productSrc=a.DynamicCollection);let ec=F?.productSrc??a.Collection;ec===a.DynamicCollection&&(F.collectionId=K?.collectionId||"latest");let es=J?.productId&&J?.productId!==F.relatedProductId?J?.productId:F.relatedProductId,en=n(),eu=s(e=>e.publicStoreFrontData),em=v(()=>u(eu)?m(eu):en,[eu]),{data:eg,error:eh,isLoading:ep}=g(z&&es?es:void 0,{revalidateOnMount:_||q},em),ef=F.relatedTag&&"tags"===F.relatedTag[0]&&(!eg?.tags||eg?.tags.length===0),eP=F.relatedTag&&"collection"===F.relatedTag[0]&&(!eg?.collections?.edges||eg?.collections.edges.length===0),eT=F.relatedTag&&"vendor"===F.relatedTag[0]&&!eg?.vendor,eb=h(et,{revalidateOnMount:_||q},em),ey=_||q,eI=p(ec===a.PickProduct?F?.productIds:void 0,{revalidateOnMount:ey},{defaultSelectedProductCount:F?.numOfSelectedProducts,selectedStatus:ey&&F?.productIds?.length?f:void 0}),ev=v(()=>({id:F?.collectionId??"latest",numberOfProducts:H?.numberOfProducts??4,orderBy:H?.orderBy}),[F?.collectionId,Number(H?.numberOfProducts),H?.orderBy]),ek=P(ec!==a.PickProduct?ev:void 0,{revalidateOnMount:ey});k(()=>{if(z&&eg&&F.relatedTag&&"recommended-product"!==F.relatedType){let e;switch(ed(!1),F.hasRelatedExclude&&(e=F?.relatedExclude&&F.relatedExclude.split(",").map(e=>e.trim())),F.relatedTag[0]){case"vendor":er({first:H?.numberOfProducts,vendor:F.relatedTag&&"vendor"===F.relatedTag[0]?eg?.vendor:"",idNEQ:eg.id}),el(eg.id);break;case"collection":{let t=eg?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ed(!0);break}er(e&&e.length>0?{first:H?.numberOfProducts,idNEQ:eg.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:H?.numberOfProducts,idNEQ:eg.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}),el(eg.id);break}case"tags":if(!eg.tags||0===eg.tags.length){ed(!0);break}er(e&&e.length>0?{first:H?.numberOfProducts,idNEQ:eg.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eg.tags},{nameNotIn:e}]}]}:{first:H?.numberOfProducts,idNEQ:eg.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eg.tags}]}]}),el(eg.id)}}},[eg,F.relatedType,F.relatedTag,H?.numberOfProducts,F.relatedExclude,F.hasRelatedExclude,z]);let eO=ec===a.PickProduct,eS=eO?eI:ek,eC=eS.isValidating,eL=eS.error,eE=d({hasQuery:ey&&(!eO||!!F?.productIds),data:eS.data,error:eS.error,isLoading:eS.isLoading}),eN=N({isRelatedProduct:z,relatedType:F.relatedType,hasRelatedTag:!!F.relatedTag?.length,relatedProductIdAssigned:es,canRefetchMainProduct:ey,mainProduct:{data:eg,error:eh,isLoading:ep},relatedQuery:et,relatedQuerySource:ea,mainProductId:eg?.id,isNotFoundRelatedProduct:eo,relatedProducts:{data:eb.data,error:eb.error,isLoading:eb.isLoading}}),ew=eE||eN,ej=ek.data?.collections?.edges?.[0]?.node,eW=ec===a.PickProduct?T(eI.data?.products):T(ej?.products),ex=eb?.data?.products?T(eb?.data?.products):void 0,eG=z&&ex?ex:ec===a.PickProduct&&F?.productIds?.length?F?.productIds?.map(e=>eW?.find(t=>t?.baseID===e)).filter(Boolean)??eW:ec!==a.PickProduct?eW:eW.filter((e,t)=>t<(F?.numOfSelectedProducts??4)),eM=v(()=>eo&&z&&_||!eG.length&&!ew&&Z&&_,[Z,ew,eo,z,_,eG.length]),eQ=v(()=>!eG||eo&&z,[eo,z,eG]),eB=v(()=>{if(!H?.sameHeight)return[];let e=0,t=Math.ceil((eG?.length??0)/+(H?.slidesToShow?.[U]??1));return Array.from(Array(eG?.length??0)).map((r,o)=>(o>=+(H?.slidesToShow?.[U]??1)*(e+1)&&++e,{gridRow:`${1+X*e}/${X+1+X*e}`,marginBottom:e+1<t?L(D?.horizontalGutter,U):void 0}))},[H?.sameHeight,H?.slidesToShow,X,eG?.length,U,D?.horizontalGutter]),eD=v(()=>eC||ew||eL||!eG||eo&&z,[eL,ew,eo,z,eC,eG]);k(()=>{eD||setTimeout(()=>{let{builderData:e}=A??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&Y(r.childElementCount||1)},_?0:500)},[A,eD,_]);let eA=v(()=>({collection:ej,products:eG,settings:{loop:H?.loop??{desktop:!1},scrollMode:H?.scrollMode??{desktop:"snap"},slidesToShow:H?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:D?.layout,dot:H?.dot,dotStyle:H?.dotStyle,arrow:H?.arrow,controlOverContent:H?.controlOverContent,sameHeight:H?.sameHeight},styles:{horizontalGutter:D?.horizontalGutter,verticalGutter:D?.verticalGutter,fullWidth:D?.fullWidth,spacing:D?.spacing,width:D?.width,height:D?.height}}),[ej,eG,H,D]);if(A?.isPreview&&ei)return e(t,{});if(eM)return e(t,{children:G(Z,e(Q,{builderAttrs:R,collectionHandle:ej?.handle,productSrc:ec,onClose:()=>ee(!1),children:B,relatedTagString:$,assignProductNoTags:ef||eP||eT,noAssignedProduct:!es}))});let{productListWrapStyle:eH,productListContentStyle:eR,productListWrapAlignStyle:ez}=x(S),{productListWrapClass:eF}=W(S);return r("div",{...R,className:eF,style:eH,children:[!!D?.preloadBgImage&&r(M,{children:[!!D.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:D.backgroundImage.desktop.image.src,as:"image"}),!!D.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:D.backgroundImage?.tablet?.image?.src,as:"image"}),!!D.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:D.backgroundImage?.mobile?.image?.src,as:"image"})]}),eC||ew?e(O,{label:o(A?.builderData)}):eL?r("div",{children:["Error: ",eL?.message]}):eQ?e("div",{children:"Products not found"}):e(b,{...eA,children:e("div",{className:"gp-flex gp-w-full",style:ez,children:r("div",{style:eR,children:[ei&&e(C,{}),e(t,{children:G(D?.layout==="grid",e(j,{...S,productSortedById:eG,generateGridRowArray:eB}),e(w,{...S,productSortedById:eG}))})]})})}),y(B,!0)]})};export{B as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=t(o);return n`
|
|
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
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(e)}}</script>
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import o from"../../../carousel/components/item/CarouselItem.liquid.js";import
|
|
2
|
-
${
|
|
1
|
+
import{getListImagePriorityLiquid as o,LIST_PRELOAD_ROWS as t}from"../../../image/common/listContext.js";import r from"../../../carousel/components/item/CarouselItem.liquid.js";import e from"../../../carousel/components/root/Carousel.liquid.js";import i from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as m}from"@gem-sdk/core";let n=n=>{let{builderProps:c,advanced:a,productSrc:p,productListId:f}=n,{carouselConfigSetting:$,carouselConfigStyle:g}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:h}=d(n),j=o({slidesToShow:n.setting?.slidesToShow,rows:t.CAROUSEL});return m`
|
|
2
|
+
${e({advanced:a,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:h,setting:$,styles:g,children:`
|
|
3
3
|
{%- assign count = 0 -%}
|
|
4
4
|
{%- for product in products limit: limit -%}
|
|
5
5
|
{%- if product.id != empty -%}
|
|
6
6
|
{%- assign count = count | plus: 1 -%}
|
|
7
|
+
${j.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
9
|
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
-
${
|
|
10
|
-
${
|
|
10
|
+
${r({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:g,background:$?.background,children:`
|
|
11
|
+
${i({...n})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
${j.reset}
|
|
16
|
+
{%- if count == 0 and ${f.length} == 0 -%}
|
|
17
|
+
{% if '${p}' == 'RelatedProduct' -%}
|
|
18
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
|
-
<div>${
|
|
20
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
19
21
|
{%- endif -%}
|
|
20
22
|
{%- endif -%}
|
|
21
23
|
`})}
|
|
22
|
-
`};export{
|
|
24
|
+
`};export{n as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
|
|
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="${c}"
|
|
5
5
|
>
|
|
6
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,36 +1,38 @@
|
|
|
1
|
-
import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as
|
|
1
|
+
import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../image/common/listContext.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as e,template as r}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as n}from"./common/attrs.js";let m=m=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=m,{gridLayoutStyle:g}=a(m),{gridLayoutClass:$}=d(m),{productListAttr:h}=n(m),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>r`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
|
+
${v.item}
|
|
6
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
+
${o({...m})}
|
|
9
10
|
{%- endif -%}
|
|
10
11
|
{% endfor %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
${v.reset}
|
|
13
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
14
|
+
{% if '${f}' == 'RelatedProduct' -%}
|
|
15
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
14
16
|
{% else %}
|
|
15
|
-
<div>${
|
|
17
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{%- endif -%}
|
|
18
|
-
`;return
|
|
20
|
+
`;return r`
|
|
19
21
|
<div
|
|
20
|
-
${
|
|
21
|
-
style="${
|
|
22
|
-
class="${
|
|
22
|
+
${h}
|
|
23
|
+
style="${g}"
|
|
24
|
+
class="${$}"
|
|
23
25
|
>
|
|
24
|
-
${
|
|
26
|
+
${e(p?.sameHeight,r`
|
|
25
27
|
<gp-same-height
|
|
26
28
|
class="gp-contents"
|
|
27
29
|
style="visibility: hidden"
|
|
28
30
|
>
|
|
29
|
-
<script gp-data type="application/json">${JSON.stringify({targetUid:
|
|
31
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
|
|
30
32
|
</script>
|
|
31
|
-
${`${
|
|
33
|
+
${`${_()}`}
|
|
32
34
|
</gp-same-height>
|
|
33
35
|
`)}
|
|
34
|
-
${
|
|
36
|
+
${e(!p?.sameHeight,r`${_()}`)}
|
|
35
37
|
</div>
|
|
36
|
-
`};export{
|
|
38
|
+
`};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getUpdatedDotStyle as t}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";let
|
|
1
|
+
import{getUpdatedDotStyle as t}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";import{isQueryLoading as r}from"../../../../common/helpers.js";import"../../../../common/const.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";let d=e=>{let{setting:r,styles:d}=e,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=t(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let n={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete n.backgroundColor,delete n.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:n}},c=t=>{let{setting:o,styles:r}=t,d=o?.productSetting,c=d?.relatedTag,a=d?.hasRelatedExclude,n=(c&&"collection"===c[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",p=n?.split(",").map(t=>t.trim()).toString(),u=d?.productSrc??"Collection",s=d?.collectionId?.replace(l,"")??"latest",m=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,g=r?.layout==="grid",h=e(o?.numberOfProducts,4),P="PickProduct"===u&&d?.productIds?.length?d?.productIds.map(t=>t.replace(i,"")):[],I="PickProduct"===u&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",k=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",C=S&&k?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",f=k?.[k.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:p,collectionID:s,isLatestProducts:m,isGrid:g,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:C,isReverse:f,productSrc:u,productSetting:d,isSorted:S,relatedTag:c,productNumber:"PickProduct"===u?m?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},l="gid://shopify/Collection/",i="gid://shopify/Product/",a=({isRelatedProduct:t,relatedType:e,hasRelatedTag:o,relatedProductIdAssigned:d,canRefetchMainProduct:c,mainProduct:l,mainProductId:i,relatedQuery:a,relatedQuerySource:n,isNotFoundRelatedProduct:p,relatedProducts:u})=>{if(!t)return!1;let s="recommended-product"!==e&&o&&!!d,m=s&&!!l.data&&n!==i&&!p;return r({hasQuery:s&&c,...l})||m||r({hasQuery:!!a,...u})};export{l as PREFIX_COLLECTION_ID,i as PREFIX_PRODUCT_ID,d as getData,c as getDataLiquid,a as isRelatedProductsLoading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{getElementLabel as r,isQueryLoading as i}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as l}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as s,usePageType as c,usePageStore as a,flattenConnection as n,ProductListProvider as m,filterToolbarPreview as u,PICKED_PRODUCT_STATUSES as g}from"@gem-sdk/core";import{useState as p,useRef as h,useMemo as f,useEffect as P}from"react";import y from"../../../common/components/Loading.js";import k from"next/dynamic";import b from"./hooks/useRelatedProductIDAssigned.js";import I from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import j from"./hooks/useProductRelatedQuery.js";import C from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as v}from"./constants/index.js";import{useCollectionQuery as L}from"./hooks/useCollectionQuery.js";import{useProductsQuery as w}from"./hooks/useProductsQuery.js";import N from"./ProductListGridLayout.js";import{getClass as G}from"./common/classes.js";import{getData as T}from"./common/helpers.js";import{getStyle as A}from"./common/styles.js";import{If as D}from"@gem-sdk/system";import O from"next/head";let x=k(()=>import("../ProductNotFound.js"),{loading:y}),B=k=>{let{children:B,styles:E,builderProps:H,setting:z,builderAttrs:Q}=k,{isRelatedProduct:M,productSetting:R}=T(k),{isEditMode:W,isPreviewSharePageMode:$}=d(),_=s(),F=c(),q=a(o=>o.dynamicCollection),[U,V]=p(1),[J,K]=p(!0),X=h(),Y="GP_FUNNEL_PAGE"===F;"GP_COLLECTION"!=F||[l.Collection,l.DynamicCollection].includes(R?.productSrc)||(R.productSrc=l.DynamicCollection);let Z=R?.productSrc??l.Collection;Z===l.DynamicCollection&&(R.collectionId=q?.collectionId||"latest");let oo=Number.isNaN(Number(z?.numberOfProducts))?v:Number(z?.numberOfProducts),{relatedProductIdAssigned:oe}=b({productSetting:R}),{isNotFoundRelatedProduct:ot,relatedProducts:or,isNoRelatedProductData:oi,relatedTagString:ol,isLoading:od}=j({productSetting:R,isRelatedProduct:M,relatedProductIdAssigned:oe,numberOfProducts:oo}),os=W||$,oc=w({productIds:R?.productIds,defaultSelectedProductCount:R?.numOfSelectedProducts,productSrc:Z,selectedStatus:os&&R?.productIds?.length?g:void 0}),oa=L({productSrc:Z,collectionID:R?.collectionId??"latest",numberOfProducts:oo,orderBy:z?.orderBy}),on=Z===l.PickProduct,om=on?oc:oa,ou=on?!!R?.productIds:Z===l.Collection||Z===l.DynamicCollection,og=od||i({hasQuery:ou,data:om.data,error:om.error,isLoading:om.isLoading}),op=om.error,oh=om.isValidating,of=oa.data?.collections?.edges?.[0]?.node,oP=Z===l.PickProduct?n(oc.data?.products):n(of?.products),oy=a(o=>o.assignedProductIds),ok=a(o=>o.isApplyAllProducts),ob=f(()=>(oy??[]).length>0&&!ok||ok,[oy,ok]),oI=or?.data?.products&&ob?n(or?.data?.products):[],oS=M?oI:Z===l.PickProduct&&R?.productIds?.length?R?.productIds?.map(o=>oP?.find(e=>e?.baseID===o)).filter(Boolean)??oP:Z!==l.PickProduct?oP:oP.filter((o,e)=>e<(R?.numOfSelectedProducts??4)),oj=f(()=>ot&&M&&W||!oS.length&&!og&&J&&W,[J,og,ot,M,W,oS.length]),oC=f(()=>!oS||ot&&M,[ot,M,oS]),ov=f(()=>{if(!z?.sameHeight)return[];let o=0,e=Math.ceil((oS?.length??0)/+(z?.slidesToShow?.[_]??1));return Array.from(Array(oS?.length??0)).map((t,r)=>(r>=+(z?.slidesToShow?.[_]??1)*(o+1)&&++o,{gridRow:`${1+U*o}/${U+1+U*o}`,marginBottom:o+1<e?S(E?.horizontalGutter,_):void 0}))},[z?.sameHeight,z?.slidesToShow,U,oS?.length,_,E?.horizontalGutter]),oL=f(()=>oh||og||op||!oS||ot&&M,[op,og,ot,M,oh,oS]);P(()=>{if(!oL)return X.current=setTimeout(()=>{let{builderData:o}=H??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},W?0:500),()=>{clearTimeout(X.current)}},[H,oL,W,oS]);let ow=f(()=>({collection:of,products:oS,settings:{loop:z?.loop??{desktop:!1},scrollMode:z?.scrollMode??{desktop:"snap"},slidesToShow:z?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:E?.layout,dot:z?.dot,dotStyle:z?.dotStyle,arrow:z?.arrow,controlOverContent:z?.controlOverContent,sameHeight:z?.sameHeight},styles:{horizontalGutter:E?.horizontalGutter,verticalGutter:E?.verticalGutter,fullWidth:E?.fullWidth,spacing:E?.spacing,width:E?.width,height:E?.height}}),[of,oS,z,E]);if(H?.isPreview&&Y)return o(e,{});if(oj)return o(e,{children:D(J,o(x,{builderAttrs:Q,collectionHandle:of?.handle,productSrc:Z,onClose:()=>K(!1),children:B,relatedTagString:ol,assignProductNoTags:oi,noAssignedProduct:!oe}))});let{productListWrapStyle:oN,productListContentStyle:oG,productListWrapAlignStyle:oT}=A(k),{productListWrapClass:oA}=G(k);return t("div",{...Q,className:oA,style:oN,children:[!!E?.preloadBgImage&&t(O,{children:[!!E.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage.desktop.image.src,as:"image"}),!!E.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.tablet?.image?.src,as:"image"}),!!E.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.mobile?.image?.src,as:"image"})]}),og||oh?o(y,{label:r(H?.builderData)}):op?t("div",{children:["Error: ",op?.message]}):oC?o("div",{children:"Products not found"}):o(m,{...ow,children:o("div",{className:"gp-flex gp-w-full",style:oT,children:t("div",{style:oG,children:[Y&&o(I,{}),o(e,{children:D(E?.layout==="grid",o(N,{...k,productSortedById:oS,generateGridRowArray:ov}),o(C,{...k,productSortedById:oS}))})]})})}),u(B,!0)]})};export{B as default};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let
|
|
1
|
+
import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=t(o);return n`
|
|
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
|
-
|
|
5
|
-
class="${r}"
|
|
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
|
+
class="${i}"
|
|
6
5
|
>
|
|
7
|
-
<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(
|
|
8
|
-
{%- form 'product', product, id: product_form_id, class: 'form contents ${
|
|
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(e)}}</script>
|
|
7
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
11
|
${a}
|
|
13
12
|
{%- endform -%}
|
|
14
13
|
</gp-product>
|
|
15
|
-
`};export{
|
|
14
|
+
`};export{o as default};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import r from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as
|
|
2
|
-
${t({advanced:
|
|
1
|
+
import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getListImagePriorityLiquid as r,LIST_PRELOAD_ROWS as e}from"../../../image/common/listContext.js";import s from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as i}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as n}from"@gem-sdk/core";let c=c=>{let{builderProps:m,advanced:p,productSrc:a,productListId:f}=c,{carouselConfigSetting:g,carouselConfigStyle:$}=u(c),{carouselItemStyle:_}=l(c),{carouselClass:v}=d(c),h=r({slidesToShow:c.setting?.slidesToShow,rows:e.CAROUSEL});return n`
|
|
2
|
+
${t({advanced:p,builderProps:{...m},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${m?.uid}`,rootClass:v,setting:g,styles:$,isProductList:!0,children:`
|
|
3
3
|
{%- assign count = 0 -%}
|
|
4
4
|
{%- for product in products limit: limit -%}
|
|
5
5
|
{%- if product.id != empty -%}
|
|
6
6
|
{%- assign count = count | plus: 1 -%}
|
|
7
|
+
${h.item}
|
|
7
8
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
8
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
9
|
-
${o({builderProps:{...
|
|
10
|
-
${
|
|
9
|
+
{%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
|
|
10
|
+
${o({builderProps:{...m},style:_,parentId:`product-list-carousel-${m?.uid} gp-child-item-${m?.uid}`,parentStyle:$,parentSettings:g,background:g?.background,children:`
|
|
11
|
+
${s({...c})}
|
|
11
12
|
`})}
|
|
12
13
|
{%- endif -%}
|
|
13
14
|
{% endfor %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
${h.reset}
|
|
16
|
+
{%- if count == 0 and ${f.length} == 0 -%}
|
|
17
|
+
{% if '${a}' == 'RelatedProduct' -%}
|
|
18
|
+
<div>${i("ProductList","no_related_products")}</div>
|
|
17
19
|
{% else %}
|
|
18
|
-
<div>${
|
|
20
|
+
<div>${i("ProductList","no_products_found")}</div>
|
|
19
21
|
{%- endif -%}
|
|
20
22
|
{%- endif -%}
|
|
21
23
|
`,carouselType:"product_list"})}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
|
|
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="${c}"
|
|
5
5
|
>
|
|
6
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,36 +1,38 @@
|
|
|
1
|
-
import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as
|
|
1
|
+
import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../../../image/common/listContext.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as e,template as r}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as n}from"./common/attrs.js";let m=m=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=m,{gridLayoutStyle:g}=a(m),{gridLayoutClass:$}=d(m),{productListAttr:h}=n(m),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>r`
|
|
2
2
|
{%- assign count = 0 -%}
|
|
3
3
|
{%- for product in products limit: limit -%}
|
|
4
4
|
{%- if product.id != empty -%}
|
|
5
5
|
{%- assign count = count | plus: 1 -%}
|
|
6
|
+
${v.item}
|
|
6
7
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
7
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
8
|
-
${
|
|
8
|
+
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
|
|
9
|
+
${o({...m})}
|
|
9
10
|
{%- endif -%}
|
|
10
11
|
{% endfor %}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
${v.reset}
|
|
13
|
+
{%- if count == 0 and ${u?.length} == 0 -%}
|
|
14
|
+
{% if '${f}' == 'RelatedProduct' -%}
|
|
15
|
+
<div>${s("ProductList","no_related_products")}</div>
|
|
14
16
|
{% else %}
|
|
15
|
-
<div>${
|
|
17
|
+
<div>${s("ProductList","no_products_found")}</div>
|
|
16
18
|
{%- endif -%}
|
|
17
19
|
{%- endif -%}
|
|
18
|
-
`;return
|
|
20
|
+
`;return r`
|
|
19
21
|
<div
|
|
20
|
-
${
|
|
21
|
-
style="${
|
|
22
|
-
class="${
|
|
22
|
+
${h}
|
|
23
|
+
style="${g}"
|
|
24
|
+
class="${$}"
|
|
23
25
|
>
|
|
24
|
-
${
|
|
26
|
+
${e(p?.sameHeight,r`
|
|
25
27
|
<gp-same-height
|
|
26
28
|
class="gp-contents"
|
|
27
29
|
style="visibility: hidden"
|
|
28
30
|
>
|
|
29
|
-
<script gp-data type="application/json">${JSON.stringify({targetUid:
|
|
31
|
+
<script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
|
|
30
32
|
</script>
|
|
31
|
-
${`${
|
|
33
|
+
${`${_()}`}
|
|
32
34
|
</gp-same-height>
|
|
33
35
|
`)}
|
|
34
|
-
${
|
|
36
|
+
${e(!p?.sameHeight,r`${_()}`)}
|
|
35
37
|
</div>
|
|
36
|
-
`};export{
|
|
38
|
+
`};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEditorMode as e,useQuantity as r,useCurrentVariant as t,useProductBundleDiscount as i,convertDecimalToNumber as c,useInteraction as a,useProduct as
|
|
1
|
+
import{useEditorMode as e,useQuantity as r,useCurrentVariant as t,useProductBundleDiscount as i,convertDecimalToNumber as c,useInteraction as a,useProduct as u,useShopStore as n,useMoneyFormat as o,useFormatMoney as p}from"@gem-sdk/core";import{calculateBundleFixedDiscount as d,getMoneyFormatDecimals as l}from"../../../helpers/product-bundle.js";import{useTransition as m}from"../../product-variants/common/common.js";import{useRef as s,useMemo as g}from"react";let b=b=>{let{setting:y,builderProps:h}=b,P=s(null),f=e(),{quantity:N,hasUpdatePrice:q}=r(),v=t(),{useProductCompareAtPrice:w}=i(),k=b["bundle-item"],C=c(v?.price)??0,I=c(v?.salePrice)??0,V=y?.priceType==="compare",{trigger:j}=a(),x=u(),D=x?.baseID?.replace("gid://shopify/Product/",""),E=n(e=>e.showPriceCurrency),{moneyFormat:T}=o(),$=g(()=>{if(!k)return!0;let e=Number(k.quantity);return Number.isInteger(e)&&e>0},[k?.quantity]),F=g(()=>{let e=Number(k?.discountValue);return Number.isFinite(e)&&e>0},[k?.discountValue]),G=g(()=>k?$?Number(k.quantity):1:q&&N||1,[N,q,k?.quantity,$]),L=g(()=>k&&$?d(C,{...k,quantity:G},l(T)):0,[k?.quantity,k?.discountType,k?.discountValue,$,C,G,T]),M=g(()=>F?w?(I||C)*G:C*G:I*G,[F,C,G,I,w]),S=g(()=>{let e=C*G;return V?M:L?Math.max(0,e-L):e},[C,G,L,M,V]),z=g(()=>!!V&&(!(I>C)||!(I>=0)),[V,I,C]),A=(e,r)=>{j({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${h?.uid}"]`,element:P.current}),j({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${h?.uid}"]`,element:P.current})};m(e=>{e!==C&&A(C,"price")},[C]),m(e=>{e!==I&&A(I,"compare")},[I]);let B=p(S??0,E||!1),H=V&&!S;return{elementRef:P,moneyFormatted:B,currentProductId:D,isNoComparePrice:H,isNoComparePriceILP:"edit"!==f&&H,emitNoDataSignal:()=>{if("edit"!==f)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:h?.uid,value:!S&&V,tag:"ProductPrice"}});window.dispatchEvent(e)},shouldHiddenComparePrice:z}};export{b as useGpPrice};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{template as t,baseAssetURL as
|
|
2
|
-
${l("value in values",O({id:"{{option.name | escape | handleize}}-{{value | escape | handleize}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:R,uid:U,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:K?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:e,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...
|
|
3
|
-
${d(
|
|
1
|
+
import{template as t,baseAssetURL as o,isLocalEnv as i,DEVICES as e,getResponsiveValueByScreen as s}from"@gem-sdk/core";import{createClass as n,createStyle as a,createAttr as r,Liquid as p,LiquidFor as l,LiquidIf as d,If as m}from"@gem-sdk/system";import{getVariantOptionGroupClass as c,getWrapDropdownClass as u}from"./common/main/classes.js";import{renderOptionValuesNewFormatSwatches as f}from"./OptionVariantsNewFormat.liquid.js";import{getTextVariantTitleData as v,getDropdownGroupData as $}from"./common/main/getData.js";import g from"./components/dropdown-group/DropdownGroup.liquid.js";import{getVariantOptionGroupStyle as _,getWrapperStyle as h}from"./common/main/styles.js";import y from"./components/dropdown-swatches/Dropdown.liquid.js";import{renderOptionValuesOld as j}from"./OptionVariantsOldFormat.liquid.js";import{getWrapVariantOptionClass as w}from"./common/variants/classes.js";import{mappingVariantStyles as S}from"./utils/mappingVariantStyles.js";import{PRODUCT_VARIANT_OPTION_MINW_STYLE as b}from"./common/const.js";import{getMarginBottomStyle as P}from"./common/variants/styles.js";import O from"./components/variants/index.liquid.js";import{getStyleOfObject as x}from"../../helpers/function.js";import{getSettingPreloadData as N}from"../../../helpers.js";import V from"../../../text/components/Text.liquid.js";import{getAttrs as q}from"./common/main/getAttr.js";let D={desktop:!0,tablet:!0,mobile:!0},E=E=>{let{builderProps:T,styles:A,setting:k,advanced:F}=E,{align:G,swatchItemWidth:z,dropdownItemWidth:C,swatchSpacing:J,optionTypo:I,marginBottom:M}=A??{},{label:W,optionType:L,showAsSwatches:R,layout:H,hasPreSelected:K}=k??{},Q=F?.d??D,{uid:U}=T??{},B=()=>{let t={};return e.forEach(o=>{let i=s(z,o);t[o]="auto"===i}),t},X=()=>{let t={};return e.forEach(o=>{t[o]=C?.[o]==="fill"}),t},Y=k?.variantPresets?S(k?.variantPresets,A):[],Z=Y?.map(t=>(t.presets={[t.optionType]:t.presets[t.optionType]},t)),tt={...k,variantPresets:Z},to=t=>{let o={"'":"'",'"':"""},i=t;for(let e in o)t.indexOf(e)>=0&&(i=i.replaceAll(e,o[e]));return i},ti=({showDropdown:o,isRenderDefault:i,typeOfOption:e})=>t`
|
|
2
|
+
${l("value in values",O({id:"{{option.name | escape | handleize}}-{{value | escape | handleize}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:R,uid:U,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:K?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:e,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...A,...tt,swatchAutoWidth:B(),optionTypo:I,isRenderDefault:i}))}
|
|
3
|
+
${d(o?'type == "dropdown"':"false",y({...A,...tt,swatchAutoWidth:X(),optionTypo:I}))}`,te=k?.variantPresets?.map(t=>({name:to(t.optionName),type:t.optionType})).map(t=>`${t.name}($1)${t.type}`).join("($2)").toString(),ts={renderVariantItem:ti,variantPresetsLiquid:te??""},tn=n(c(G)),ta=a(_(J,J)),tr=v(E,"Liquid"),tp=n(w(H,G)),tl=n(u(G)),td=$(E),tm=r(q({uid:U,hasPreSelected:K,cssClass:F?.cssClass})),tc=a(h(E)),tu=n({"gp-flex gp-flex-col !gp-ml-0":!0});return t`
|
|
4
4
|
${p("{%- assign total_combinations = 1 -%}")}
|
|
5
5
|
${l("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
6
6
|
<gp-product-variants ${tm}>
|
|
7
7
|
<script gp-data type="application/json">
|
|
8
8
|
{
|
|
9
9
|
"setting":${JSON.stringify(tt)},
|
|
10
|
-
"styles":${JSON.stringify(
|
|
10
|
+
"styles":${JSON.stringify(A)},
|
|
11
11
|
"variants":{{product.variants | json}},
|
|
12
12
|
"optionsWithValues": {{product.options_with_values | json}},
|
|
13
13
|
"variantSelected": {{ variant | json }},
|
|
@@ -18,8 +18,7 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
|
|
|
18
18
|
"productUrl": {{product.url | json }},
|
|
19
19
|
"productHandle": {{product.handle | json }},
|
|
20
20
|
"displayState": ${JSON.stringify(Q)},
|
|
21
|
-
"totalVariantCombinations": {{total_combinations}}
|
|
22
|
-
"firstAvailableVariant": {{product.selected_or_first_available_variant | json }}
|
|
21
|
+
"totalVariantCombinations": {{total_combinations}}
|
|
23
22
|
}
|
|
24
23
|
</script>
|
|
25
24
|
<div class="gp-hidden" style="--hvr-shadow: none; --hvr-shadow-tablet: none; --hvr-shadow-mobile: none"></div>
|
|
@@ -34,7 +33,7 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
|
|
|
34
33
|
${g(td)}
|
|
35
34
|
</div>
|
|
36
35
|
`,t`
|
|
37
|
-
${p(`{%- assign presets = "${k?.variantPresets?.map(t=>`${
|
|
36
|
+
${p(`{%- assign presets = "${k?.variantPresets?.map(t=>`${to(t.optionName)}($2)${t.optionType}`).join("($1)")}" | split: '($1)' -%}`)}
|
|
38
37
|
${p(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(t=>!!t?.hide)?.map(t=>t.optionName).join(",")}" | split: ',' %}`)}
|
|
39
38
|
|
|
40
39
|
${p(`{% assign all_option_names = options | map: 'name' %}
|
|
@@ -66,7 +65,7 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
|
|
|
66
65
|
<div
|
|
67
66
|
option-name="{{option.name | escape}}"
|
|
68
67
|
class="${tp} ${d("hiddenPresetOptions contains option.name","gp-hidden")}"
|
|
69
|
-
style="${x(P(M))}${
|
|
68
|
+
style="${x(P(M))}${b}${p("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
|
|
70
69
|
>
|
|
71
70
|
${p("{%- assign showVariantClass = 'variant-display' -%}")}
|
|
72
71
|
${p("{%- assign optionName = option.name -%}")}
|
|
@@ -74,7 +73,7 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
|
|
|
74
73
|
${p("{%- assign presetDetail = preset | split: '($2)' -%}")}
|
|
75
74
|
${d("presetDetail[1] == 'dropdown' and presetDetail[0] == optionName",`${p("{%- assign showVariantClass = '' -%}")} ${p("{%- break -%}")}`)}
|
|
76
75
|
`)}
|
|
77
|
-
${m(W,
|
|
76
|
+
${m(W,V(tr)," ")}
|
|
78
77
|
<div
|
|
79
78
|
variant-option-name="{{option.name | escape}}"
|
|
80
79
|
class="${tn}"
|
|
@@ -93,13 +92,13 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
|
|
|
93
92
|
`)}
|
|
94
93
|
${m(!K,p("{%- assign selectedValue = null -%}"),"")}
|
|
95
94
|
${m(R,t`
|
|
96
|
-
${d("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",
|
|
97
|
-
`,
|
|
95
|
+
${d("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",f(ts),j(ts))}
|
|
96
|
+
`,ti({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
98
97
|
</div>
|
|
99
98
|
</div>`)}
|
|
100
99
|
`)}
|
|
101
100
|
</div>`)}
|
|
102
101
|
</gp-product-variants>
|
|
103
102
|
|
|
104
|
-
${(()=>{let t=
|
|
105
|
-
`};export{
|
|
103
|
+
${(()=>{let t=i?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${N('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
|
|
104
|
+
`};export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import{useProductSetting as d}from"./hook/useProductSetting.js";import{
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import{useProductSetting as d}from"./hook/useProductSetting.js";import{getElementLabel as s}from"../../../common/helpers.js";import"../../../common/const.js";import"react";import c from"../../../common/components/Loading.js";import{getData as n}from"./common/helpers.js";import{If as l}from"@gem-sdk/system";import p from"../../../grid/components/row/Row.js";import u from"next/dynamic";let a=u(()=>import("../ProductNotFound.js"),{loading:c}),h=u=>{let{builderProps:h,children:f,setting:g,style:j,builderAttrs:b}=u,{isAuto:P}=g??{},{isLoadingProduct:y,isProductPage:k,isProductNotFound:x,showProductNotFound:A,errorLoadProduct:D,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:S}=d(u),{rowSetting:E,rowStyles:F}=n(u);return k&&P?r(o,{children:e(f)?r(m,{}):f}):r(o,{children:l(!x,r(o,{children:y?r(c,{label:s(h?.builderData)}):r(o,{children:D?t("div",{children:["Error: ",D?.message]}):v?r(i,{...C,children:r(p,{builderProps:h,builderAttrs:b,style:j,styles:F,setting:E,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(f)?r(m,{}):f})}):null})}),r(o,{children:l(A,r(a,{builderAttrs:b,productSrc:"PickProduct",onClose:()=>S(!1),children:f}))}))})};export{h as default};
|