@gem-sdk/components 17.0.0-dev.13 → 17.0.0-dev.130
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/components/Accordion.liquid.js +4 -5
- package/dist/cjs/accordion/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/article/components/ArticleReadMore.liquid.js +4 -4
- package/dist/cjs/article/settings/configs/article-author/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-category/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-content/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-date/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-excerpt/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-list/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-read-more/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-tag/ui-v2.js +1 -1
- package/dist/cjs/article/settings/configs/article-title/ui-v2.js +1 -1
- package/dist/cjs/breadcrumb/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/builder.js +1 -1
- package/dist/cjs/button/common/helpers.js +2 -2
- package/dist/cjs/button/components/Button.liquid.js +14 -14
- package/dist/cjs/button/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/carousel/components/dot/Dots.js +1 -1
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +5 -4
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel-v3/components/arrow/common/styles.js +17 -17
- package/dist/cjs/carousel-v3/components/dot/Dots.js +1 -1
- package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel-v3/index.js +1 -1
- package/dist/cjs/carousel-v3/settings/configs/settings-v2.js +3 -3
- package/dist/cjs/carousel-v3/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/code/common/styles.js +1 -1
- package/dist/cjs/collection/components/collection-description/CollectionDescription.js +1 -1
- package/dist/cjs/collection/components/collection-description/CollectionDescription.liquid.js +7 -8
- package/dist/cjs/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/cjs/collection/components/collection-toolbar/CollectionToolbar.liquid.js +1 -1
- package/dist/cjs/collection/index.js +1 -1
- package/dist/cjs/collection/settings/collection-banner/configs/ui-v2.js +1 -1
- package/dist/cjs/collection/settings/collection-description/configs/ui-v2.js +1 -1
- package/dist/cjs/collection/settings/collection-paginator/configs/ui-v2.js +1 -1
- package/dist/cjs/collection/settings/collection-title/configs/ui-v2.js +1 -1
- package/dist/cjs/collection/settings/collection-toolbar/configs/ui-v2.js +1 -1
- package/dist/cjs/countdown-timer/components/Countdown.liquid.js +16 -15
- package/dist/cjs/countdown-timer/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/coupon/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/dialog/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/estimate-delivery/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/contact/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/form-checkbox/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/form-dropdown/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/form-email/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/form-textarea/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/newsletter/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/submit-button/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/text-field/configs/ui-v2.js +1 -1
- package/dist/cjs/grid/components/row/Row.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +7 -2
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/grid/components/section/lazyload/LazySectionWrapper.js +1 -0
- package/dist/cjs/grid/components/section/lazyload/lazyInteractionTrigger.js +1 -0
- package/dist/cjs/grid/components/section/lazyload/lazySectionCoordinator.js +1 -0
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/grid/next.js +1 -1
- package/dist/cjs/grid/settings/configs/row/ui-v2.js +1 -1
- package/dist/cjs/grid/settings/configs/section/ui-v2.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/heading/next.js +1 -1
- package/dist/cjs/heading/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/headless.js +1 -0
- package/dist/cjs/helpers.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +3 -3
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/icon/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/icon-list/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/icon-list-hoz/settings/configs/uiV2.js +1 -1
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
- package/dist/cjs/icon-list-v2/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image/common/const.js +1 -0
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/next.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/common/classes.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +4 -4
- package/dist/cjs/image-comparison/components/ImageComparison.js +1 -1
- package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +2 -2
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +1 -1
- package/dist/cjs/line/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/marquee/components/Marquee.liquid.js +21 -21
- package/dist/cjs/marquee/settings/configs/child-image-template.js +1 -1
- package/dist/cjs/marquee/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/modal/components/Modal.js +1 -1
- package/dist/cjs/modal/index.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/link/components/PostPurchaseLink.js +1 -1
- package/dist/cjs/post-purchase/link/settings/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/link/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/FeatureImage.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-variant/components/ProductVariant.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-variant/components/variants/Dropdown.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-variant/components/variants/DropdownOption.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/post-purchase/text/components/Text.js +2 -2
- package/dist/cjs/product/components/ProductImages.liquid.js +9 -9
- package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +9 -9
- package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +2 -3
- package/dist/cjs/product/components/file-upload/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +18 -18
- package/dist/cjs/product/components/product-badge/common/attrs.js +1 -1
- package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
- package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +3 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +4 -3
- package/dist/cjs/product/components/product-bundle/setting/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +14 -11
- package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +3 -4
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +26 -29
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +26 -29
- package/dist/cjs/product/components/product-images-v3/common/productFeaturedImage.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.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 +2 -2
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +34 -33
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +19 -16
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesClassName.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +7 -8
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +6 -4
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +12 -11
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +6 -4
- package/dist/cjs/product/components/product-list-v3/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list-v3/constants/index.js +1 -1
- package/dist/cjs/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -1
- package/dist/cjs/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -1
- package/dist/cjs/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -1
- package/dist/cjs/product/components/product-list-v3/hooks/useProductsQuery.js +1 -1
- package/dist/cjs/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
- package/dist/cjs/product/components/product-price/ProductPrice.liquid.js +4 -4
- package/dist/cjs/product/components/product-sku/Sku.js +1 -1
- package/dist/cjs/product/components/product-sku/Sku.liquid.js +4 -3
- package/dist/cjs/product/components/product-title/ProductTitle.liquid.js +7 -8
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +43 -43
- package/dist/cjs/product/components/product-variants/common/const.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductQuery.js +1 -1
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/dynamic-checkout/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-badge/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-button/configs/ui-v2.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/ProductFeatureImage.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -2
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-list/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-list-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-properties/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-title/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-vendor/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-view-more/configs/ui-v2.js +1 -1
- package/dist/cjs/sticky/common/classes.js +1 -1
- package/dist/cjs/sticky/components/Sticky.liquid.js +4 -5
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/sticky/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/stock-counter/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/tab/components/Tabs.liquid.js +7 -6
- package/dist/cjs/tab/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/text/components/Text.liquid.js +3 -3
- package/dist/cjs/text/next.js +1 -1
- package/dist/cjs/text/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/cjs/third-party/components/BonySubscriptionsApp.liquid.js +10 -3
- package/dist/cjs/third-party/components/EssentPreorderBackInStock.js +2 -0
- package/dist/cjs/third-party/components/EssentPreorderBackInStock.liquid.js +8 -0
- package/dist/cjs/third-party/components/SubscribfySubscriptionsApp.js +2 -0
- package/dist/cjs/third-party/components/SubscribfySubscriptionsApp.liquid.js +1 -0
- package/dist/cjs/third-party/components/WcWishlistBackInStock.liquid.js +19 -1
- package/dist/cjs/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/cjs/third-party/configs/EssentPreorderBackInStock.js +1 -0
- package/dist/cjs/third-party/configs/SubscribfySubscriptionsApp.js +1 -0
- package/dist/cjs/third-party/configs/WcWishlistBackInStock.js +1 -1
- package/dist/cjs/third-party/index.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/cjs/third-party/settings/EssentPreorderBackInStock/index.js +4 -0
- package/dist/cjs/third-party/settings/EssentPreorderBackInStock/uiV2.js +1 -0
- package/dist/cjs/third-party/settings/SubscribfySubscriptionsApp/index.js +4 -0
- package/dist/cjs/third-party/settings/SubscribfySubscriptionsApp/uiV2.js +1 -0
- package/dist/cjs/third-party/settings/WcWishlistBackInStock/index.js +5 -2
- package/dist/cjs/video/common/helpers.js +1 -1
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +5 -4
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +15 -14
- package/dist/cjs/video/hooks/useLiteYoutubeEmbed.js +1 -1
- package/dist/esm/accordion/components/Accordion.liquid.js +8 -9
- package/dist/esm/accordion/settings/configs/ui-v2.js +1 -1
- package/dist/esm/article/components/ArticleReadMore.liquid.js +4 -4
- package/dist/esm/article/settings/configs/article-author/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-category/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-content/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-date/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-excerpt/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-list/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-read-more/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-tag/ui-v2.js +1 -1
- package/dist/esm/article/settings/configs/article-title/ui-v2.js +1 -1
- package/dist/esm/breadcrumb/settings/configs/ui-v2.js +1 -1
- package/dist/esm/builder.js +1 -1
- package/dist/esm/button/common/helpers.js +2 -2
- package/dist/esm/button/components/Button.liquid.js +19 -19
- package/dist/esm/button/settings/configs/ui-v2.js +1 -1
- package/dist/esm/carousel/components/dot/Dots.js +1 -1
- package/dist/esm/carousel/components/root/Carousel.liquid.js +4 -3
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel-v3/components/arrow/common/styles.js +17 -17
- package/dist/esm/carousel-v3/components/dot/Dots.js +1 -1
- package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel-v3/index.js +1 -1
- package/dist/esm/carousel-v3/settings/configs/settings-v2.js +3 -3
- package/dist/esm/carousel-v3/settings/configs/ui-v2.js +1 -1
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/code/common/styles.js +1 -1
- package/dist/esm/collection/components/collection-description/CollectionDescription.js +1 -1
- package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js +6 -7
- package/dist/esm/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
- package/dist/esm/collection/components/collection-toolbar/CollectionToolbar.liquid.js +3 -3
- package/dist/esm/collection/index.js +1 -1
- package/dist/esm/collection/settings/collection-banner/configs/ui-v2.js +1 -1
- package/dist/esm/collection/settings/collection-description/configs/ui-v2.js +1 -1
- package/dist/esm/collection/settings/collection-paginator/configs/ui-v2.js +1 -1
- package/dist/esm/collection/settings/collection-title/configs/ui-v2.js +1 -1
- package/dist/esm/collection/settings/collection-toolbar/configs/ui-v2.js +1 -1
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +21 -20
- package/dist/esm/countdown-timer/settings/configs/ui-v2.js +1 -1
- package/dist/esm/coupon/settings/configs/ui-v2.js +1 -1
- package/dist/esm/dialog/settings/configs/ui-v2.js +1 -1
- package/dist/esm/estimate-delivery/settings/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/contact/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/form-checkbox/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/form-dropdown/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/form-email/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/form-textarea/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/newsletter/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/submit-button/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/text-field/configs/ui-v2.js +1 -1
- package/dist/esm/grid/components/row/Row.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +10 -5
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/grid/components/section/lazyload/LazySectionWrapper.js +1 -0
- package/dist/esm/grid/components/section/lazyload/lazyInteractionTrigger.js +1 -0
- package/dist/esm/grid/components/section/lazyload/lazySectionCoordinator.js +1 -0
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/grid/next.js +1 -1
- package/dist/esm/grid/settings/configs/row/ui-v2.js +1 -1
- package/dist/esm/grid/settings/configs/section/ui-v2.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/heading/next.js +1 -1
- package/dist/esm/heading/settings/configs/ui-v2.js +1 -1
- package/dist/esm/headless.js +1 -0
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +5 -5
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/esm/icon/settings/configs/ui-v2.js +1 -1
- package/dist/esm/icon-list/settings/configs/ui-v2.js +1 -1
- package/dist/esm/icon-list-hoz/settings/configs/uiV2.js +1 -1
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +3 -3
- package/dist/esm/icon-list-v2/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image/common/const.js +1 -0
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/next.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/common/classes.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +5 -5
- package/dist/esm/image-comparison/components/ImageComparison.js +1 -1
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/line/settings/configs/ui-v2.js +1 -1
- package/dist/esm/marquee/components/Marquee.liquid.js +21 -21
- package/dist/esm/marquee/settings/configs/child-image-template.js +1 -1
- package/dist/esm/marquee/settings/configs/ui-v2.js +1 -1
- package/dist/esm/modal/components/Modal.js +1 -1
- package/dist/esm/modal/index.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/link/components/PostPurchaseLink.js +1 -1
- package/dist/esm/post-purchase/link/settings/configs/settings.js +1 -1
- package/dist/esm/post-purchase/link/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/FeatureImage.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
- package/dist/esm/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/esm/post-purchase/product/components/product-variant/components/ProductVariant.js +1 -1
- package/dist/esm/post-purchase/product/components/product-variant/components/variants/Dropdown.js +1 -1
- package/dist/esm/post-purchase/product/components/product-variant/components/variants/DropdownOption.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/post-purchase/text/components/Text.js +2 -2
- package/dist/esm/product/components/ProductImages.liquid.js +12 -12
- package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +14 -14
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +3 -4
- package/dist/esm/product/components/file-upload/settings/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +20 -20
- package/dist/esm/product/components/product-badge/common/attrs.js +1 -1
- package/dist/esm/product/components/product-badge/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
- package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +8 -7
- package/dist/esm/product/components/product-bundle/setting/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +14 -11
- package/dist/esm/product/components/product-button/common/helpers.js +1 -1
- package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +5 -6
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +8 -8
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +27 -30
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +27 -30
- package/dist/esm/product/components/product-images-v3/common/productFeaturedImage.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.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 +2 -2
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +17 -16
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +19 -16
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesClassName.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +7 -8
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +9 -7
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +20 -19
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +9 -7
- package/dist/esm/product/components/product-list-v3/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list-v3/constants/index.js +1 -1
- package/dist/esm/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -1
- package/dist/esm/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -1
- package/dist/esm/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -1
- package/dist/esm/product/components/product-list-v3/hooks/useProductsQuery.js +1 -1
- package/dist/esm/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
- package/dist/esm/product/components/product-price/ProductPrice.liquid.js +3 -3
- package/dist/esm/product/components/product-sku/Sku.js +1 -1
- package/dist/esm/product/components/product-sku/Sku.liquid.js +6 -5
- package/dist/esm/product/components/product-title/ProductTitle.liquid.js +5 -6
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +48 -48
- package/dist/esm/product/components/product-variants/common/const.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.liquid.js +5 -5
- package/dist/esm/product/components/product-wrap/hook/useProductQuery.js +1 -1
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/dynamic-checkout/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-badge/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-button/configs/ui-v2.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/ProductFeatureImage.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -2
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-list/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-list-v3/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-properties/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-title/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-vendor/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-view-more/configs/ui-v2.js +1 -1
- package/dist/esm/sticky/common/classes.js +1 -1
- package/dist/esm/sticky/components/Sticky.liquid.js +11 -12
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/sticky/settings/configs/ui-v2.js +1 -1
- package/dist/esm/stock-counter/settings/configs/ui-v2.js +1 -1
- package/dist/esm/tab/components/Tabs.liquid.js +12 -11
- package/dist/esm/tab/settings/configs/ui-v2.js +1 -1
- package/dist/esm/text/components/Text.liquid.js +3 -3
- package/dist/esm/text/next.js +1 -1
- package/dist/esm/text/settings/configs/ui-v2.js +1 -1
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
- package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
- package/dist/esm/third-party/components/BonySubscriptionsApp.liquid.js +11 -4
- package/dist/esm/third-party/components/EssentPreorderBackInStock.js +2 -0
- package/dist/esm/third-party/components/EssentPreorderBackInStock.liquid.js +8 -0
- package/dist/esm/third-party/components/SubscribfySubscriptionsApp.js +2 -0
- package/dist/esm/third-party/components/SubscribfySubscriptionsApp.liquid.js +1 -0
- package/dist/esm/third-party/components/WcWishlistBackInStock.liquid.js +19 -1
- package/dist/esm/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
- package/dist/esm/third-party/configs/EssentPreorderBackInStock.js +1 -0
- package/dist/esm/third-party/configs/SubscribfySubscriptionsApp.js +1 -0
- package/dist/esm/third-party/configs/WcWishlistBackInStock.js +1 -1
- package/dist/esm/third-party/index.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
- package/dist/esm/third-party/settings/EssentPreorderBackInStock/index.js +4 -0
- package/dist/esm/third-party/settings/EssentPreorderBackInStock/uiV2.js +1 -0
- package/dist/esm/third-party/settings/SubscribfySubscriptionsApp/index.js +4 -0
- package/dist/esm/third-party/settings/SubscribfySubscriptionsApp/uiV2.js +1 -0
- package/dist/esm/third-party/settings/WcWishlistBackInStock/index.js +5 -2
- package/dist/esm/video/common/helpers.js +1 -1
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +3 -2
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +14 -13
- package/dist/esm/video/hooks/useLiteYoutubeEmbed.js +1 -1
- package/dist/types/index.d.ts +266 -29
- package/package.json +5 -5
- package/dist/cjs/modal/components/ZoomButton.js +0 -2
- package/dist/cjs/product/components/product-images-v3/components/child/ProductImagesLightBoxPreview.js +0 -1
- package/dist/cjs/product/components/product-images-v3/components/lightbox/LightBoxCarousel.js +0 -2
- package/dist/cjs/product/components/product-images-v3/components/lightbox/LightBoxGalleryCarousel.js +0 -2
- package/dist/cjs/product/components/product-images-v3/components/lightbox/LightBoxImageZoom.js +0 -2
- package/dist/cjs/product/components/product-images-v3/components/lightbox/constants.js +0 -1
- package/dist/esm/modal/components/ZoomButton.js +0 -2
- package/dist/esm/product/components/product-images-v3/components/child/ProductImagesLightBoxPreview.js +0 -1
- package/dist/esm/product/components/product-images-v3/components/lightbox/LightBoxCarousel.js +0 -2
- package/dist/esm/product/components/product-images-v3/components/lightbox/LightBoxGalleryCarousel.js +0 -2
- package/dist/esm/product/components/product-images-v3/components/lightbox/LightBoxImageZoom.js +0 -2
- package/dist/esm/product/components/product-images-v3/components/lightbox/constants.js +0 -1
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{template as e,isLocalEnv as o,baseAssetURL as t,WrapRenderChildren as r,RenderChildren as s}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as n}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as j,If as v,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:O}=P,{rawChildren:_,pageContext:z}=C,{enableLazyLoadImage:N}=z??{},A={...G,...D},B=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(c(
|
|
4
|
+
"pageContext": ${JSON.stringify(c(z))},
|
|
5
5
|
"setting":${JSON.stringify(G)},
|
|
6
6
|
"styles":${JSON.stringify(D)},
|
|
7
|
-
"productUrl":{{product.url | json
|
|
8
|
-
"product":{{product | json
|
|
9
|
-
"collectionUrl": {{ collection.url | json
|
|
10
|
-
"collection": {{ collection | json
|
|
7
|
+
"productUrl":{{product.url | json }},
|
|
8
|
+
"product":{{product | json }},
|
|
9
|
+
"collectionUrl": {{ collection.url | json }},
|
|
10
|
+
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=
|
|
13
|
-
${
|
|
14
|
-
|
|
15
|
-
${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
-
${v(`
|
|
17
|
-
{% assign featured_image = product.featured_image %}
|
|
18
|
-
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
|
-
`)}
|
|
20
|
-
<gp-product-images
|
|
21
|
-
gp-data='${B}'
|
|
22
|
-
${{...U}}
|
|
23
|
-
style="${{...z}}"
|
|
24
|
-
class="${J}"
|
|
25
|
-
>
|
|
26
|
-
<div
|
|
27
|
-
class="${h("product.media.size > 1",`${T}`,`${x}`)}"
|
|
28
|
-
style="${h("product.media.size > 1",I(L),I(M))}"
|
|
29
|
-
>
|
|
30
|
-
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
31
|
-
${j(!k,r`
|
|
12
|
+
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=$(A),V=u({shape:A.shape,shapeForBottom:A.shapeForBottom,shapeFor1Col:A.shapeFor1Col,shapeFor2Col:A.shapeFor2Col,shapeForFtOnly:A.shapeForFtOnly,shapeForInsideBottom:A.shapeForInsideBottom??g,shapeForInside:A.shapeForInside??g},A.position),W=a(A.position,V,A?.spacing),H=()=>e`
|
|
13
|
+
${r({uid:b?.uid||"",customProps:_?.[0].customProps},_?.map(o=>{if(o)return e`${s({...o,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
|
+
`,K=()=>e`
|
|
32
15
|
<div
|
|
33
16
|
class="${w}"
|
|
34
17
|
style="${I(R)}"
|
|
35
18
|
${{...E}}
|
|
36
19
|
>
|
|
37
20
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
38
|
-
${
|
|
39
|
-
</div>
|
|
40
|
-
`)}
|
|
21
|
+
${v(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
41
22
|
</div>
|
|
23
|
+
`,Q=()=>e`
|
|
24
|
+
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
25
|
+
${v(!k,K())}
|
|
26
|
+
`;return e`
|
|
27
|
+
${v(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
28
|
+
${S(`
|
|
29
|
+
{% assign featured_image = product.featured_image %}
|
|
30
|
+
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
31
|
+
`)}
|
|
32
|
+
<gp-product-images
|
|
33
|
+
${{...U}}
|
|
34
|
+
style="${{...O}}"
|
|
35
|
+
class="${J}"
|
|
36
|
+
>
|
|
37
|
+
<script gp-data type="application/json">${B}</script>
|
|
38
|
+
${h("product.media.size > 1",e`<div class="${T}" style="${I(L)}">${Q()}</div>`,e`<div class="${x}" style="${I(M)}">${Q()}</div>`)}
|
|
42
39
|
</gp-product-images>
|
|
43
|
-
${
|
|
40
|
+
${v(o,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-images-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${t}/assets-v2/gp-product-images-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
41
|
`};export{C as default};
|
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{template as e,isLocalEnv as o,baseAssetURL as t,WrapRenderChildren as r,RenderChildren as s}from"@gem-sdk/core";import{getConditionRenderGalleryImages as i,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as p}from"./common/common.js";import l from"./components/feature-gallery/FeatureImageWithGallery.liquid.js";import d from"./components/gallery-carousel/GalleryCarousel.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as n}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as j,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=p(C),{setting:G,styles:D,builderProps:b,style:O}=P,{rawChildren:_,pageContext:z}=C,{enableLazyLoadImage:N}=z??{},A={...G,...D},B=`
|
|
2
2
|
{
|
|
3
3
|
"id":${JSON.stringify(b?.uid)},
|
|
4
|
-
"pageContext": ${JSON.stringify(c(
|
|
4
|
+
"pageContext": ${JSON.stringify(c(z))},
|
|
5
5
|
"setting":${JSON.stringify(G)},
|
|
6
6
|
"styles":${JSON.stringify(D)},
|
|
7
|
-
"productUrl":{{product.url | json
|
|
8
|
-
"product":{{product | json
|
|
9
|
-
"collectionUrl": {{ collection.url | json
|
|
10
|
-
"collection": {{ collection | json
|
|
7
|
+
"productUrl":{{product.url | json }},
|
|
8
|
+
"product":{{ product | json }},
|
|
9
|
+
"collectionUrl": {{ collection.url | json }},
|
|
10
|
+
"collection": {{ collection | json }}
|
|
11
11
|
}
|
|
12
|
-
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=$(A),V=
|
|
13
|
-
${
|
|
14
|
-
|
|
15
|
-
${S(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
16
|
-
${j(`
|
|
17
|
-
{% assign featured_image = product.featured_image %}
|
|
18
|
-
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
19
|
-
`)}
|
|
20
|
-
<gp-product-images-v3
|
|
21
|
-
gp-data='${B}'
|
|
22
|
-
${{...U}}
|
|
23
|
-
style="${{...z}}"
|
|
24
|
-
class="${J}"
|
|
25
|
-
>
|
|
26
|
-
<div
|
|
27
|
-
class="${h("product.media.size > 1",`${T}`,`${x}`)}"
|
|
28
|
-
style="${h("product.media.size > 1",I(L),I(M))}"
|
|
29
|
-
>
|
|
30
|
-
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
31
|
-
${S(!k,r`
|
|
12
|
+
`,U=y({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:k,isRenderGalleryGrid:q}=i(A?.position,G?.type),E=q?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:J,productImagesGalleryClasses:w}=f(C),T=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),x=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:L,wrapContainerStyleOnlyOneImage:M,galleryImageStyle:R}=$(A),V=u({shape:A.shape,shapeForBottom:A.shapeForBottom,shapeFor1Col:A.shapeFor1Col,shapeFor2Col:A.shapeFor2Col,shapeForFtOnly:A.shapeForFtOnly,shapeForInsideBottom:A.shapeForInsideBottom??g,shapeForInside:A.shapeForInside??g},A.position),W=a(A.position,V,A?.spacing),H=()=>e`
|
|
13
|
+
${r({uid:b?.uid||"",customProps:_?.[0].customProps},_?.map(o=>{if(o)return e`${s({...o,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
|
|
14
|
+
`,K=()=>e`
|
|
32
15
|
<div
|
|
33
16
|
class="${w}"
|
|
34
17
|
style="${I(R)}"
|
|
35
18
|
${{...E}}
|
|
36
19
|
>
|
|
37
20
|
${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...A,enableLazyLoadImage:N}))}
|
|
38
|
-
${
|
|
39
|
-
</div>
|
|
40
|
-
`)}
|
|
21
|
+
${j(q,m({builderPropUID:b?.uid,wrapperStyle:{...W},children:H(),...A,enableLazyLoadImage:N}))}
|
|
41
22
|
</div>
|
|
23
|
+
`,Q=()=>e`
|
|
24
|
+
${l({builderPropUID:`gp-carousel-${b?.uid}`,...A,children:H(),enableLazyLoadImage:N})}
|
|
25
|
+
${j(!k,K())}
|
|
26
|
+
`;return e`
|
|
27
|
+
${j(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:A,uid:b?.uid,type:"Liquid"})}</style>`),"")}
|
|
28
|
+
${S(`
|
|
29
|
+
{% assign featured_image = product.featured_image %}
|
|
30
|
+
${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
|
|
31
|
+
`)}
|
|
32
|
+
<gp-product-images-v3
|
|
33
|
+
${{...U}}
|
|
34
|
+
style="${{...O}}"
|
|
35
|
+
class="${J}"
|
|
36
|
+
>
|
|
37
|
+
<script gp-data type="application/json">${B}</script>
|
|
38
|
+
${h("product.media.size > 1",e`<div class="${T}" style="${I(L)}">${Q()}</div>`,e`<div class="${x}" style="${I(M)}">${Q()}</div>`)}
|
|
42
39
|
</gp-product-images-v3>
|
|
43
|
-
${
|
|
40
|
+
${j(o,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${t}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
44
41
|
`};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e,DEVICES as t,makeStyleResponsive as o}from"@gem-sdk/core";let n=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),p=()=>"!gp-flex gp-absolute gp-opacity-0 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white gp-pointer-events-none",r=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white gp-pointer-events-none",g=o=>{let n={};return t.forEach(t=>{let p=e(o.position,t),r=e(o.dotStyle,t);n={...n,[t]:"only-feature"===p?r:"none"}}),n},l=
|
|
1
|
+
import{getResponsiveValueByScreen as e,DEVICES as t,makeStyleResponsive as o}from"@gem-sdk/core";let n=e=>!!e&&["EXTERNAL_VIDEO","MODEL_3D","VIDEO"].includes(e),p=()=>"!gp-flex gp-absolute gp-opacity-0 gp-h-[150px] gp-w-[150px] gp-cursor-none gp-rounded-full gp-bg-no-repeat gp-shadow-glasses gp-bg-white gp-pointer-events-none",r=()=>"gp-absolute gp-left-0 gp-top-0 gp-opacity-0 gp-transition-opacity gp-bg-white gp-pointer-events-none",g=o=>{let n={};return t.forEach(t=>{let p=e(o.position,t),r=e(o.dotStyle,t);n={...n,[t]:"only-feature"===p?r:"none"}}),n},l=({ftLayout:t,ftShape:n})=>{if(!t)return null;let p={};return Object.keys(t).forEach(o=>{let r=t[o],g=e(n,o),l=g?.shape==="original";r&&(p[o]=l||"cover"===r?"100%":"auto")}),o("h",p)},a=e=>{let t=!1;return["desktop","mobile","tablet"].forEach(o=>{let n=i(e,o);i(e,o)&&(t=n)}),t},i=(t,o)=>"only-feature"!==e(t.position,o)||"none"!==e(t.ftNavigationPosition,o)||"none"!==e(t.ftDotStyle,o)||!0===e(t.ftLoop,o)||!0===t.ftDragToScroll;export{a as checkRenderFeaturedCarousel,g as getDotStyleForOnlyFeaturedImage,l as getVideoHeight,r as getZoomImageClass,p as getZoomLenClass,n as isFeatureMedia};
|
package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{memo as t,useMemo as r}from"react";import"@gem-sdk/core";import"next/link";import o from"../../../../../video/components/Video.js";var l=t(t=>{let{url:l,aspectRatio:i,thumbnail:m}=t,s=r(()=>l.includes("youtu.be")?"youtube":l.includes("vimeo")?"vimeo":"html5",[l]);return e("div",{className:"gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center",children:e(o,{setting:{type:s,html5Url:l,youtubeUrl:l,vimeoUrl:l,preload:!0,controls:!0,aspectRatio:i,poster:m?{src:m}:void 0},className:"gp-w-full"})})});export{l as default};
|
package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
2
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useProduct as o,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as l,makeStyle as s}from"@gem-sdk/core";import{memo as h,useMemo as f,useCallback as p}from"react";import m from"../../../../../image/components/NextImage.js";import g from"./MediaIcon.js";import{isFeatureMedia as d,getZoomImageClass as u,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import v from"./ProductFeatureVideo.js";let E={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var T=h(({image:h,imageShowWhenHover:T,setting:b,aspectRatio:w})=>{let I=o(),k=i(),x=a(e=>e.storefrontUrl),{isEditMode:L,isPreviewSharePageMode:N}=c(),O=f(()=>"none"!==n(b.ftClickOpenLightBox,k),[k,b.ftClickOpenLightBox]),j=f(()=>!L&&["VIDEO","EXTERNAL_VIDEO"].includes(h?.contentType||"")&&!O,[L,h?.contentType,O]),R=f(()=>h?{...h,src:j?h.src:d(h?.contentType)?h?.previewImage:h.src}:E,[h,j]),C=f(()=>{if(N)return"javascript:void(0)";if(!x)return"#";let e=new URL(x);return I?`${e.protocol}//${e.host}/products/${I.handle}`:"#"},[x,I,N]),$=f(()=>b?.hoverEffect!=="none"&&!d(R?.contentType),[R?.contentType,b?.hoverEffect]),_=f(()=>b?.hoverEffect=="zoom"&&b?.zoomType=="glasses"&&!d(R?.contentType),[R?.contentType,b?.hoverEffect,b?.zoomType]),z=p(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),A=f(()=>T?"other"!==b.hoverEffect?z(R):z(T):E.src,[T,R,b.hoverEffect,z]);return e(t,{children:(t=>{if("product-link"===n(b.ftClickOpenLightBox,k)){let r=b.ftClickOpenNewTab?"_blank":"_self";return e("a",{title:I?.title,href:C,className:"gp-w-full",target:r,children:t})}return t})(e(t,{children:j?e(v,{type:R?.contentType,url:R.src??"",thumbnail:R?.previewImage,aspectRatio:w}):r(t,{children:[e(m,{draggable:"false",src:R.src,width:R?.width,height:R?.height,alt:R?.alt,setting:{aspectRatio:w,layout:b?.ftLayout},priority:b?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(g,{contentType:R?.contentType??""}),$&&e(m,{draggable:"false",src:A,width:b?.hoverEffect==="other"?T?.width:R.width,height:b?.hoverEffect==="other"?T?.height:R.height,alt:b?.hoverEffect==="other"?T?.alt:R.alt,setting:{layout:b.ftLayout,aspectRatio:w},style:{width:"100%",height:"100%"},className:l("hover-image featured-image-only !gp-max-w-none",u()),priority:b?.preload}),_&&e("div",{className:l(y(),"room-len"),style:{...s({bgi:`url("${R?.src}")`})}})]})}))})});export{T as default};
|
package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,
|
|
2
|
-
${
|
|
1
|
+
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,useRenderMode as i,getResponsiveValueByScreen as a,cls as m,makeStyle as l}from"@gem-sdk/core";import{memo as c}from"react";import{getAspectRatio as s}from"../../common/common.js";import n from"../../../../../image/components/NextImage.js";import d from"../lightbox/ButtonOpenLightBox.js";import p from"./MediaIcon.js";import g from"./ProductFeatureVideo.js";import{isFeatureMedia as h,getZoomImageClass as y,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import{handleMouseOut as f,handleMouseMove as v}from"../../common/hoverAction.js";import{getProductImagesClassName as j}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as T}from"../../composables/getProductImagesStyles.js";import{useProductGalleryGrid as w}from"../../hooks/useProductGalleryGrid.js";var I=c(c=>{let{builderPropUID:I,productImages:E,onHandleClick:b,activeIndexFromFeatureImage:x,children:N,isHiddenInteraction:O,...P}=c,{isDisplay:k,shapeByLayout:G,imageActiveIndex:M,enableOpenLightBox:R,isEnableBorderActive:$,filteredProductImages:z}=w(c),A=r(),{isEditMode:B}=i(),H=["one-col","two-col"].includes(a(P.position,A)||""),{galleryGridWrapperClasses:L,galleryItemClasses:V}=j(P),{galleryGridStyles:Z,galleryGridItemStyles:C}=T(P);return e(o,{children:k&&t("div",{"data-slot":"children","data-id":I,className:L,style:Z,"gp-data-hidden":`${O}`,children:[z?.map((r,i)=>{let c=i===M,j=h(r.contentType)?r.previewImage:r.src,T=!B&&H&&!R&&["VIDEO","EXTERNAL_VIDEO"].includes(r?.contentType||"");return t("div",{"aria-hidden":!0,className:V(`gp-gallery-image-item gem-slider-item-${I}
|
|
2
|
+
${c&&$?"gem-slider-item-active":""}`),onClick:()=>b(r?.id||"",R),style:C,onMouseMove:e=>v(e,{hoverEffect:P.galleryHoverEffect,zoom:P.galleryZoom,zoomType:P.galleryZoomType}),onMouseOut:e=>f(e),"data-border":c&&P?.borderActive?"active":"deactive",children:[T?e(g,{type:r?.contentType,url:r?.src??"",thumbnail:r?.previewImage,aspectRatio:s(G)}):t(o,{children:[e(n,{src:j,width:r?.width,height:r?.height,alt:r?.alt,setting:{aspectRatio:s(G),layout:P?.layout},style:{width:"100%",height:"100%"}},r?.id),e(p,{contentType:r?.contentType||""})]}),P?.galleryHoverEffect!=="none"&&!h(r?.contentType)&&e(n,{src:j,width:r?.width,height:r?.height,alt:r?.alt,setting:{layout:P.layout,aspectRatio:s(G)},className:m("hover-image !gp-max-w-none",y())}),P?.galleryHoverEffect=="zoom"&&P?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(a(P.position,A)||"")&&!h(r?.contentType)&&e("div",{className:m(u(),"room-len"),style:{...l({bgi:`url("${r?.src}")`})}}),a(P?.clickOpenLightBox,A)&&e(d,{})]},r?.id)}),N]})})});export{I as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u,getVideoHeight as
|
|
1
|
+
import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u,getVideoHeight as m}from"../../common/productFeaturedImage.js";import l from"../../../../../video/components/HTML5Embed.liquid.js";import p from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import n from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as f}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as h}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as y}from"../../composables/getProductImagesAttr.js";import{If as M,LiquidIf as _,LiquidFor as w,Liquid as v,createStyle as b}from"@gem-sdk/system";import $ from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import I from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";let x=({builderPropUID:x,children:q,enableLazyLoadImage:S,...z})=>{let{featuredImageCarouselClasses:j,galleryItemClasses:L,featuredCarouselItemClasses:P}=h({...z,builderProps:{uid:x}}),{featuredImageCarouselStyle:R,featureImageStyle:T,featureImageCarouselOnlyOneImageStyle:W,featureImageOnlyOneImageStyle:C,featureImageCarouselItemStyle:N}=f(z),{featuredImageCarouselSettingAttrs:k}=y(z),E=t(z.ftShape),O=M("other"==z.hoverEffect,_("product.media.size > 1","group-hover:gp-opacity-0")),A=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
4
|
${F()}
|
|
@@ -13,31 +13,32 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
13
13
|
{% else %}
|
|
14
14
|
${G()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,D=()=>p({src:_("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:E}),V=()=>n({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:E}),H=()=>{let a=
|
|
16
|
+
`,D=()=>p({src:_("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:E}),V=()=>n({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:E}),H=()=>{let a=b({...m({ftLayout:z?.ftLayout,ftShape:z?.ftShape}),...e("objf",z?.ftLayout)}),i=b({...m({ftLayout:z?.ftLayout,ftShape:z?.ftShape})});return l({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,wrapperStyles:i,poster:{altText:"{{featureMedia.alt | escape}}"},style:{width:"100%","max-height":"100%",...a},className:"gp-invisible"})},F=()=>i`
|
|
17
17
|
${B(a("gp-w-full gp-transition-opacity",O,"{{shouldHidden}}"))}
|
|
18
|
-
${M(
|
|
18
|
+
${M(z?.hoverEffect!=="none",`<div class="${a("zoom-element !gp-max-w-none",o())}">
|
|
19
19
|
${B("image-zoom",!0)}
|
|
20
20
|
</div>`," ")}
|
|
21
|
-
${M(
|
|
21
|
+
${M(z?.hoverEffect=="zoom"&&z?.zoomType=="glasses",`<div class="${a("zoom-lens-element",u())}" style="opacity: 0; background-image: url('{{ featureMedia.src | img_url: "1024x1024"}}')"></div>`," ")}
|
|
22
22
|
`,B=(e,a)=>i`
|
|
23
23
|
{% assign src = featureMedia.src %}
|
|
24
|
-
${M(a&&"other"==
|
|
25
|
-
{% assign other_image_index = ${
|
|
24
|
+
${M(a&&"other"==z.hoverEffect,`{% assign media_length = product.media | size %}
|
|
25
|
+
{% assign other_image_index = ${z.otherImage} | plus: 0 %}
|
|
26
26
|
{% if other_image_index >= media_length %}
|
|
27
27
|
{% assign other_image_index = media_length | minus: 1 %}
|
|
28
28
|
{% endif %}
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
30
|
${_("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${g({srcIsLiquidCode:!0,src:_("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:_("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:
|
|
33
|
-
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:
|
|
34
|
-
${
|
|
35
|
-
{% assign height = featureMedia.height | times: 1.0 %}
|
|
36
|
-
|
|
32
|
+
${g({srcIsLiquidCode:!0,src:_("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:_("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},priority:z?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e??""}`,enableLazyLoadImage:S})}`,G=()=>i`
|
|
33
|
+
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},priority:z?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",enableLazyLoadImage:S})}`,J=r(z.ftShape),K=d(z),Q="gp-featured-image-wrapper",U=_("product.media.size > 0",`{% assign largestRatio = 0 %}
|
|
34
|
+
${w("featureMedia in product.media",`
|
|
35
|
+
${_("featureMedia.media_type == 'video' and featureMedia.preview_image",`{% assign height = featureMedia.preview_image.height | times: 1.0 %}
|
|
36
|
+
{% assign width = featureMedia.preview_image.width | times: 1.0 %}`,`{% assign height = featureMedia.height | times: 1.0 %}
|
|
37
|
+
{% assign width = featureMedia.width | times: 1.0 %}`)}
|
|
37
38
|
{% assign ratio = height | divided_by: width %}
|
|
38
39
|
${_("ratio > largestRatio","{% assign largestRatio = ratio %}")}
|
|
39
40
|
`)}
|
|
40
|
-
${
|
|
41
|
+
${w("featureMedia in product.media",`${_("featureMedia.media_type == 'image'",`${w("image in product.images",_("image.src == featureMedia.src","{% assign imageID = image.id %}{% break %}"))}`,"{% assign imageID = '' %}")}
|
|
41
42
|
|
|
42
43
|
${v(`{% assign productImageWidth = 0 %}
|
|
43
44
|
{% case featureMedia.media_type %}
|
|
@@ -54,16 +55,16 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
54
55
|
${A()}
|
|
55
56
|
</div>
|
|
56
57
|
`})}`)}
|
|
57
|
-
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:
|
|
58
|
+
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:z?.preload,setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,enableLazyLoadImage:S}));return v(`
|
|
58
59
|
{% capture featureImageOnlyOne %}
|
|
59
60
|
${v(`
|
|
60
61
|
{% assign featureMedia = variant.featured_media %}
|
|
61
62
|
{% unless featureMedia %}
|
|
62
63
|
{% assign featureMedia = product.featured_media %}
|
|
63
64
|
{% endunless %}
|
|
64
|
-
${_("product.media.size > 1",(()=>{switch(
|
|
65
|
+
${_("product.media.size > 1",(()=>{switch(z?.preDisplay){case"1st-images":return`
|
|
65
66
|
{% assign featureMedia = product.media.first %}
|
|
66
|
-
`;case"1st-3d-mode":return
|
|
67
|
+
`;case"1st-3d-mode":return w("media in product.media",_("media.media_type == 'model'","{% assign featureMedia = media %}{% break %}"));case"1st-video":return w("media in product.media",_("media.media_type == 'video' or media.media_type == 'external_video'","{% assign featureMedia = media %}{% break %}"));default:return`
|
|
67
68
|
{% assign featureMedia = variant.featured_media %}
|
|
68
69
|
{% unless featureMedia %}
|
|
69
70
|
{% assign featureMedia = product.featured_media %}
|
|
@@ -111,7 +112,7 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
111
112
|
{% endcapture %}
|
|
112
113
|
${_("product.media.size > 1",`
|
|
113
114
|
${M(K,`
|
|
114
|
-
${$({builderProps:{uid:x},rootId:`ft-${x}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:Q,rootClass:`${
|
|
115
|
+
${$({builderProps:{uid:x},rootId:`ft-${x}-{{section.id}}-{{product.id}}`,conditionAppendJs:"product.media.size > 1",wrapperClass:Q,rootClass:`${j}`,rootAttrs:{type:"gp-feature-image-carousel","product-id":"{{product.id}}","product-media":"{{product.media.size}}"},isHiddenArrowWhenDisabled:!0,setting:k,rootStyles:T,styles:R,style:{playSpeed:600},disableMarginAuto:!0,children:U,productBadgeLiquid:q||"",carouselType:"feature_image"})}
|
|
115
116
|
`," ")}
|
|
116
117
|
${M(!K,"{{ featureImageOnlyOne }}"," ")}
|
|
117
118
|
`,"{{ featureImageOnlyOne }}")}
|
package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import
|
|
1
|
+
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import g from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as n}from"../../../../helpers/function.js";import{getAspectRatio as c,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,enableLazyLoadImage:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:M}=f(L),{galleryGridStyles:V,galleryGridItemStyles:q}=w(L),I=C({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
|
|
2
2
|
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}
|
|
3
3
|
${r(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
4
4
|
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:x})}
|
|
@@ -6,7 +6,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
6
6
|
${r(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:c(
|
|
9
|
+
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:c(I)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>g({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),P=()=>i`
|
|
10
10
|
${d("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -19,10 +19,10 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
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
|
-
${Z({aspectRatio:c(
|
|
22
|
+
${Z({aspectRatio:c(I),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.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="${n(v(L?.clickOpenLightBox))}" >
|
|
26
26
|
<svg
|
|
27
27
|
height="100%"
|
|
28
28
|
width="100%"
|
|
@@ -39,7 +39,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
39
39
|
/>
|
|
40
40
|
</svg>
|
|
41
41
|
</div>
|
|
42
|
-
`,
|
|
42
|
+
`,T=i=>`
|
|
43
43
|
${d("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
44
44
|
${d("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
|
|
45
45
|
${d("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
@@ -54,18 +54,20 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
54
54
|
grid-index="{{forloop.index}}"
|
|
55
55
|
data-outline="none"
|
|
56
56
|
class="${F(`gem-slider-item-${_}-{{product.id}} gp-gallery-image-item ${i??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
|
|
57
|
-
style="${
|
|
57
|
+
style="${n(q)}"
|
|
58
58
|
>
|
|
59
59
|
${d("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
|
|
60
60
|
|
|
61
61
|
${d("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
${d("media.media_type == 'model'","{% assign isModel = true %}")}
|
|
64
|
+
|
|
65
|
+
<div class="gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")} ${d("isMedia",n({...S()}))}">
|
|
66
|
+
${d("media != null",P(),N())}
|
|
65
67
|
</div>
|
|
66
68
|
|
|
67
|
-
<div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")}"
|
|
68
|
-
style="${d("isMedia",
|
|
69
|
+
<div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")} ${d("isModel","gp-w-full")}"
|
|
70
|
+
style="${d("isMedia",n({...e("aspect",c(I))}))} ${n({...k()})}"
|
|
69
71
|
>
|
|
70
72
|
{% case media.media_type %}
|
|
71
73
|
{% when 'external_video' %}
|
|
@@ -80,14 +82,15 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
80
82
|
</div>
|
|
81
83
|
{% assign isVideo= false %}
|
|
82
84
|
{% assign isMedia= false %}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
{% assign isModel= false %}
|
|
86
|
+
</div>`,N=()=>i`
|
|
87
|
+
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:c(I),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:x})}`;return o(`
|
|
85
88
|
<div type="grid-gallery"
|
|
86
|
-
class="${
|
|
87
|
-
style="${
|
|
89
|
+
class="${M}"
|
|
90
|
+
style="${n(V)}}"
|
|
88
91
|
>
|
|
89
92
|
${s("media in product.media",`${d("media.media_type == 'image'",s("image in product.images",d("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
|
|
90
|
-
${d("media.id == product.featured_media.id ",
|
|
93
|
+
${d("media.id == product.featured_media.id ",T(L?.borderActive?.border!=="none"?"active":""),T())}`)}
|
|
91
94
|
${d("product.media.size > 0",b)}
|
|
92
|
-
${d("product.media.size < 1",
|
|
95
|
+
${d("product.media.size < 1",T())}
|
|
93
96
|
</div>`)};export{_ as default};
|
package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import d from"../../../../../carousel-v3/components/root/Carousel.js";import n from"../../../../../carousel-v3/components/item/CarouselItem.js";import r from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import p from"../../../../../modal/components/Modal.js";import{useMemo as m}from"react";import{isFeatureMedia as a}from"../../common/productFeaturedImage.js";import c from"../child/ProductFeatureVideo.js";import g from"../child/MediaIcon.js";let h=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=i(),E=m(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j=l(),v=e=>"edit"!==j&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(p,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(d,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,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:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(n,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:v(i)?e(c,{type:i?.contentType,url:i.src??"",thumbnail:i?.previewImage,aspectRatio:f}):t(o,{children:[e(r,{src:a(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:f},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(g,{contentType:i?.contentType??""})]})},i?.id))})})};export{h as default};
|
package/dist/esm/product/components/product-images-v3/composables/getProductImagesClassName.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createClass as e}from"@gem-sdk/system";import{getWrapperClasses as s,getGalleryWrapperClasses as
|
|
1
|
+
import{createClass as e}from"@gem-sdk/system";import{getWrapperClasses as s,getGalleryWrapperClasses as a,getGalleryGridWrapperClasses as r,getFtImageWithGalleryClasses as t,getImageGalleryWrapperClasses as l,getFeaturedImageCarouselClasses as g,getFeaturedImageGalleryClasses as m,getFeaturedImageClasses as o,getFeaturedCarouselItemClasses as p,getGalleryItemClasses as i}from"../common/classes.js";import{checkAddOverFlowClass as d,setDefaultWhenUndefineSetting as u}from"../common/common.js";let C=C=>{let{setting:c,style:f}=C,x=u(C),{builderProps:n,advanced:$}=x,y=$?.cssClass,j=e(s({extraClass:`${n?.uid} ${y??""} `,isAddOverFlowClass:d(f)})),v=e(a({})),w=e(r({})),I=e(t({extraClass:`gp-product-images-feature--${n?.uid}`})),h=e(l({extraClass:`gp-product-images-gallery-${n?.uid}`})),k=e(g({extraClass:`gp-product-images-gallery-${n?.uid}`})),A=e(m({settings:c})),F=e(o({setting:c,extraClass:`gp-flex gp-relative gp-product-images-gallery-${n?.uid} gp-overflow-hidden gp-flex gp-w-full gp-items-center gp-justify-center `}));return{wrapperClasses:j,productImagesGalleryClasses:v,galleryGridWrapperClasses:w,galleryItemClasses:s=>e(i({extraClass:`${s??""}`})),ftImageGalleryClasses:I,imageGalleryWrapperClasses:h,featuredImageCarouselClasses:k,featuredImageGalleryClasses:A,featureImageOnlyOneImageClasses:F,featuredCarouselItemClasses:s=>e(p({extraClass:`${s??""}`}))}};export{C as getProductImagesClassName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,useCollectionQuery as b,flattenConnection as k,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import I from"next/head";import O from"./ProductListGridLayout.js";import C from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as E}from"@gem-sdk/system";import{getClass as N}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";import{PRODUCT_SOURCE as j}from"../product-list-v3/constants/index.js";let x=r(()=>import("../ProductNotFound.js"),{loading:d}),W=r=>{let{children:W,styles:G,builderProps:M,setting:B,builderAttrs:A}=r,{isRelatedProduct:D,productSetting:H}=w(r),Q=H.relatedTag&&H.relatedTag[0],{isEditMode:z,isPreviewSharePageMode:F}=c(),R=s(),$=n(),_=u(e=>e.dynamicProduct),V=u(e=>e.dynamicCollection),[q,U]=l(1),[J,K]=l(!0),[X,Y]=l(),[Z,ee]=l(!1),et="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"!=$||[j.Collection,j.DynamicCollection].includes(H?.productSrc)||(H.productSrc=j.DynamicCollection);let eo=H?.productSrc??j.Collection;eo===j.DynamicCollection&&(H.collectionId=V?.collectionId||"latest");let er=_?.productId&&_?.productId!==H.relatedProductId?_?.productId:H.relatedProductId,ed=m(),el=u(e=>e.publicStoreFrontData),ei=i(()=>g(el)?h(el):ed,[el]),{data:ea}=p(D&&er?er:void 0,{revalidateOnMount:z||F},ei),ec=H.relatedTag&&"tags"===H.relatedTag[0]&&(!ea?.tags||ea?.tags.length===0),es=H.relatedTag&&"collection"===H.relatedTag[0]&&(!ea?.collections?.edges||ea?.collections.edges.length===0),en=H.relatedTag&&"vendor"===H.relatedTag[0]&&!ea?.vendor,eu=f(X,{revalidateOnMount:z||F},ei),em=z||F,eg=P(eo===j.PickProduct?H?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:H?.numOfSelectedProducts}),eh=i(()=>({id:H?.collectionId??"latest",numberOfProducts:B?.numberOfProducts??4,orderBy:B?.orderBy}),[H?.collectionId,Number(B?.numberOfProducts),B?.orderBy]),ep=b(eo!==j.PickProduct?eh:void 0,{revalidateOnMount:em});a(()=>{if(D&&ea&&H.relatedTag&&"recommended-product"!==H.relatedType){let e;switch(ee(!1),H.hasRelatedExclude&&(e=H?.relatedExclude&&H.relatedExclude.split(",").map(e=>e.trim())),H.relatedTag[0]){case"vendor":Y({first:B?.numberOfProducts,vendor:H.relatedTag&&"vendor"===H.relatedTag[0]?ea?.vendor:"",idNEQ:ea.id});break;case"collection":{let t=ea?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ee(!0);break}Y(e&&e.length>0?{first:B?.numberOfProducts,idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:B?.numberOfProducts,idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ea.tags||0===ea.tags.length){ee(!0);break}Y(e&&e.length>0?{first:B?.numberOfProducts,idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags},{nameNotIn:e}]}]}:{first:B?.numberOfProducts,idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags}]}]})}}},[ea,H.relatedType,H.relatedTag,B?.numberOfProducts,H.relatedExclude,H.hasRelatedExclude,D]);let ef=eo===j.PickProduct?eg.isValidating:ep.isValidating,eP=eo===j.PickProduct?eg.isLoading:ep.isLoading,eb=eo===j.PickProduct?eg.error:ep.error,ek=ep.data?.collections?.edges?.[0]?.node,eT=eo===j.PickProduct?k(eg.data?.products):k(ek?.products),ev=eu?.data?.products?k(eu?.data?.products):void 0,ey=D&&ev?ev:eo===j.PickProduct&&H?.productIds?.length?H?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:eo!==j.PickProduct?eT:eT.filter((e,t)=>t<(H?.numOfSelectedProducts??4)),eI=i(()=>Z&&D&&z||!ey.length&&!eP&&J&&z,[J,eP,Z,D,z,ey.length]),eO=i(()=>!ey||Z&&D,[Z,D,ey]),eC=i(()=>{if(!B?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(B?.slidesToShow?.[R]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(B?.slidesToShow?.[R]??1)*(e+1)&&++e,{gridRow:`${1+q*e}/${q+1+q*e}`,marginBottom:e+1<t?L(G?.horizontalGutter,R):void 0}))},[B?.sameHeight,B?.slidesToShow,q,ey?.length,R,G?.horizontalGutter]),eS=i(()=>ef||eP||eb||!ey||Z&&D,[eb,eP,Z,D,ef,ey]);a(()=>{eS||setTimeout(()=>{let{builderData:e}=M??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&U(o.childElementCount||1)},z?0:500)},[M,eS,z]);let eE=i(()=>({collection:ek,products:ey,settings:{loop:B?.loop??{desktop:!1},scrollMode:B?.scrollMode??{desktop:"snap"},slidesToShow:B?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:G?.layout,dot:B?.dot,dotStyle:B?.dotStyle,arrow:B?.arrow,controlOverContent:B?.controlOverContent,sameHeight:B?.sameHeight},styles:{horizontalGutter:G?.horizontalGutter,verticalGutter:G?.verticalGutter,fullWidth:G?.fullWidth,spacing:G?.spacing,width:G?.width,height:G?.height}}),[ek,ey,B,G]);if(M?.isPreview&&et)return e(t,{});if(eI)return e(t,{children:E(J,e(x,{builderAttrs:A,collectionHandle:ek?.handle,productSrc:eo,onClose:()=>K(!1),children:W,relatedTagString:Q,assignProductNoTags:ec||es||en,noAssignedProduct:!er}))});let{productListWrapStyle:eN,productListContentStyle:ew,productListWrapAlignStyle:eL}=S(r),{productListWrapClass:ej}=N(r);return o("div",{...A,className:ej,style:eN,children:[!!G?.preloadBgImage&&o(I,{children:[!!G.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage.desktop.image.src,as:"image"}),!!G.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.tablet?.image?.src,as:"image"}),!!G.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.mobile?.image?.src,as:"image"})]}),ef||eP?e(d,{}):eb?o("div",{children:["Error: ",eb?.message]}):eO?e("div",{children:"Products not found"}):e(T,{...eE,children:e("div",{className:"gp-flex gp-w-full",style:eL,children:o("div",{style:ew,children:[et&&e(y,{}),e(t,{children:E(G?.layout==="grid",e(O,{...r,productSortedById:ey,generateGridRowArray:eC}),e(C,{...r,productSortedById:ey}))})]})})}),v(W,!0)]})};export{W as default};
|