@gem-sdk/components 17.0.0-dev.14 → 17.0.0-dev.141
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/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/code/components/CSSCode.liquid.js +2 -2
- package/dist/cjs/code/hooks/useCSSCode.js +3 -10
- 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/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/ProductFeaturedImage.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +22 -22
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +23 -23
- 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/classes.js +1 -1
- 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/common/classes.js +1 -1
- package/dist/cjs/stock-counter/components/StockCounter.liquid.js +11 -8
- 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/EcomsendBackInStockAlert.js +1 -1
- 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/Stamped/LiquidTemplateByWidget.js +1 -1
- 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/EcomsendBackInStockAlert.js +1 -1
- 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/EcomsendBackInStockAlert/index.js +4 -4
- 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/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/code/components/CSSCode.liquid.js +6 -6
- package/dist/esm/code/hooks/useCSSCode.js +3 -10
- 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/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/ProductFeaturedImage.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +21 -21
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +22 -22
- 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 +20 -17
- 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/classes.js +1 -1
- 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/common/classes.js +1 -1
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +27 -24
- 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/EcomsendBackInStockAlert.js +1 -1
- 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/Stamped/LiquidTemplateByWidget.js +1 -1
- 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/EcomsendBackInStockAlert.js +1 -1
- 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/EcomsendBackInStockAlert/index.js +4 -4
- 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 +267 -30
- 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 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core"),t=require("../../image/common/helpers.js"),o=require("../../constant.js"),r=require("./const.js");const l=(t,o,r)=>{let l={};return e.DEVICES.map(i=>{let s=e.getResponsiveValueByScreen(t,i),a=e.getResponsiveValueByScreen(o,i),n=e.getResponsiveValueByScreen(r,i);l={...l,[i]:1>=(s?.cols?.length||1)?a:n}}),l},i=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},s=e=>{let o=i(e);return{desktop:t.createBlurDataURL(o?.desktop?.width??0,o?.desktop?.height??0),tablet:t.createBlurDataURL(o?.tablet?.width??o?.desktop?.width??0,o?.tablet?.height??o?.desktop?.width??0),mobile:t.createBlurDataURL(o?.mobile?.width??o?.tablet?.width??o?.desktop?.width??0,o?.mobile?.height??o?.tablet?.height??o?.desktop?.width??0)}},a=(o,r,l,a)=>{if(!o)return"";let n=i(o),p=e.getResponsiveValueByScreen(o,r),b=l?`url(${s(o)[r]})`:`url(${t.getImageSrc(e.getResponsiveValueByScreen(n,r),r,a)})`,g=p?.color?`, ${p.color}`:"";return p?.color?.includes(e.GRADIENT_BGR_KEY)&&p?.type==="image"?`${b}${g}`:p?.color?.includes(e.GRADIENT_BGR_KEY)&&p?.type!=="image"?`${p.color}`:p?.type==="image"?b:"url()"},n=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},p=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||t:void 0!==o?o:e?.shapeValue??t},b=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:r})=>{let l=p(e,t);return l?{...r,[o]:l}:r},g=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},c=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},u=(t,o)=>{let r=!1,l=e.DEVICES.reduce((l,i)=>{let s=e.getResponsiveValueByScreen(t,i),a=e.getResponsiveValueByScreen(o,i),n=c(s,a?.type==="video");return n&&(l[i]=n,r=!0),l},{});return{aspectRatio:r?l:void 0}},d=(t,o,r)=>e.DEVICES.reduce((l,i)=>{let s=e.getValueByDevice(t,i),a=s?.type==="video"?s?.videoType:void 0,n=e.getValueByDevice(o,i),p=r?.[i];return p&&"youtube"===a&&"cover"!==n&&(l[i]=p),l},{}),m=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,y=(t,o)=>{let r={};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=i?.type==="image"&&o,a=m({enableParallax:s,attachment:t[l]?.attachment});r={...r,[l]:s?"150%":a?"100vh":"100%"}}),e.makeStyleResponsive("h",r)},h=(t,o)=>{let r={};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=i?.type==="image"&&o,a=m({enableParallax:s,attachment:t[l]?.attachment});r={...r,[l]:a?"100vw":"100%"}}),e.makeStyleResponsive("w",r)},f=t=>{let o={};return["desktop","mobile","tablet"].forEach(e=>{o={...o,[e]:t[e]?.attachment==="fixed"?"0px":""}}),e.makeStyleResponsive("top",o)},I=(e,t=0,o=0)=>{let r=t,l=t;if(t>o?r=o:l=o,e>=999){let t=e-r;return t>0?t:0}let i=e-l;return i>0?i:0},v=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let r=t[e]?.cols??[],l=r.length<=1,i=o[e];if(l&&i)return["space-between","top","center","bottom"].includes(i)?i:void 0},k=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,r=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:r}},S=(t,o)=>{if(!t||!o)return 16/9;let r=e.getResponsiveValueByScreen(t,o),l=r?.videoCustomRatio;if(l?.width&&l?.height){let e=Number(l.width),t=Number(l.height);if(e>0&&t>0)return e/t}return 16/9},x=e=>{switch(e){case"top":default:return{top:"0%",transform:`translate(-50%, 0%) scale(${r.VIDEO_IFRAME_SCALE})`};case"bottom":return{top:"100%",transform:`translate(-50%, -100%) scale(${r.VIDEO_IFRAME_SCALE})`};case"center":return{top:"50%",transform:`translate(-50%, -50%) scale(${r.VIDEO_IFRAME_SCALE})`}}};exports.collectAspectRatioByDevice=u,exports.collectYoutubeAspectRatio=d,exports.debounce=function(e,t){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>e.apply(this,r),t)}},exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",exports.getAspectRatio=(e,t)=>{let{aspectRatio:o}=u(e,t);return o},exports.getAttachmentDevice=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let r=e?.[o]?.attachment;t={...t,[o]:"fixed"===r?"fixed":"absolute"}}),t},exports.getBackgroundImageHeroBanner=(t,o=!1,r=!1)=>{if(!t)return;let l={};return e.DEVICES.forEach(e=>{l={...l,[e]:a(t,e,o,r)}}),e.makeStyleResponsive("bgi",l)},exports.getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:o.HREF_TO_SALES_PAGE,target:"_self"}:t},exports.getBgImage=i,exports.getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),exports.getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",r=e.tablet||o,l=e.mobile||r;return{[`gp-justify-${t[o]}`]:!0,[`tablet:gp-justify-${t[r]}`]:!0,[`mobile:gp-justify-${t[l]}`]:!0}},exports.getClassForContentByFitContent=(t,o)=>{let r={desktop:!1,tablet:!1,mobile:!1};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=!!n(l,o),a=i?.shape,p=i?.height;r={...r,[l]:"original"===a&&"fit-content"!==p&&!s}}),e.cls(r.desktop?"!gp-absolute":"",r.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",r.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},exports.getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(r=>{let l=e.getResponsiveValueByScreen(t,r);o={...o,[r]:l}}),e.cls("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},exports.getClassSpaceBetween=(t,o)=>{let r=k(t),l=k(o),i={desktop:v({device:"desktop",settingLayoutRes:r,contentPosition1ColRes:l}),tablet:v({device:"tablet",settingLayoutRes:r,contentPosition1ColRes:l}),mobile:v({device:"mobile",settingLayoutRes:r,contentPosition1ColRes:l})},s={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},a={};return e.DEVICES.forEach(e=>{let t=i[e],o=s?.[t]?.[e];a[o]=!0}),a},exports.getClassSpaceBetweenLeftRight=e=>{let t=k(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",r=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",l=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":r,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":l,"mobile:!gp-h-auto":!l}},exports.getClipPath=(e,t)=>{if(!t)return`${r.DEFAULT_CLIP_PATH}`;let[o,l,i,s]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:n,bbrr:p,bblr:b}=t,g=I(parseInt(a??"0")||0,o,s),c=I(parseInt(n??"0")||0,o,l),u=I(parseInt(p??"0")||0,l,i),d=I(parseInt(b??"0")||0,i,s);return[g,c,u,d].every(e=>0===e)?`${r.DEFAULT_CLIP_PATH}`:`inset(0 0 0 round ${g}px ${c}px ${u}px ${d}px)`},exports.getContainerRatio=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},exports.getContentPosition=l,exports.getDataVideoHeroBannerResponsive=n,exports.getDisplayStyleByFitContent=(t,o)=>{let r={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=!!n(l,o),a=i?.shape,p=i?.height;r={...r,[l]:"original"!==a||"fit-content"===p||s?"none":"block"}}),e.makeStyleResponsive("d",r)},exports.getEnableBgImageByDevice=(t,o)=>{if(!e.getResponsiveValueByScreen(i(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},exports.getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,r="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||r},exports.getPercentageVisible=(e,t)=>{let{top:o,height:r}=e,l=-r;return o<l?0:o>t?100:Math.min(Math.max((o-l)/(t-l)*100,0),100)},exports.getResponsiveSetting=k,exports.getStyleAspectRatioHeroBannerCustom=(t,o)=>{let r=e.getAspectRatioGlobalSize(o);return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(o,l),s=!!n(l,t);s&&(r=b({shapeByDevice:i,fallbackRatio:"auto",device:l,currentResult:r}))}),e.makeStyleResponsive("aspect",r)},exports.getStyleHeroBannerBg=(e,t)=>{let o=y(e,t),r=h(e,t),l=f(e);return{...o,...r,...l}},exports.getVideoAspectRatio=S,exports.getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},exports.getWidth=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let r=e?.[o];r&&(t={...t,[o]:"default"===r?"var(--g-ct-w, 1200px)":r})}),t},exports.getYoutubeAspectRatio=(e,t,o)=>{let r=d(e,t,o);return Object.keys(r).length?r:void 0},exports.horizontalAlign=(e,t,o)=>g(l(e,t,o)),exports.imagePlaceholder=s,exports.isScaleImage=m,exports.mapContentPositionToHorizontal=g,exports.opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},r=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:r}},exports.resetVideoIframeStyle=e=>{e&&(e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("transform"),e.style.removeProperty("position"))},exports.resetVideoWrapperStyle=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},exports.scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),exports.setVideoIframeAlign=(e,t)=>{if(!e)return;let o=x(t);e.style.top=o.top,e.style.transform=o.transform},exports.setVideoWrapperStyle=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},exports.showVideoType=t=>e.DEVICES.some(o=>{let r=e.getValueByDevice(t,o);return r?.type!=="color"&&r?.type!=="image"&&!!r&&(r?.videoType==="html5"&&r?.videoHtml5||r?.videoType==="youtube"&&r?.video)}),exports.updateVideoIframeSize=({iframeEl:t,containerRatio:o,videoObjectFit:l,background:i,currentDevice:s,isYoutubeVideoMigrated:a})=>{let n,p;let b=S(i,s),g=e.getResponsiveValueByScreen(i,s);if(!t||!o)return;let c=g?.videoAlign||"top",u=x(c);if("contain"===l){Object.assign(t.style,{position:"absolute",top:"50%",left:"50%",width:"100%",height:"100%",maxWidth:"none",transform:`translate(-50%, -50%) scale(${r.VIDEO_IFRAME_SCALE})`});return}o>=b?(n=100,p=o/b*100):(p=100,n=b/o*100),Object.assign(t.style,{position:"absolute",top:u.top,left:"50%",width:a?"500%":`${n}%`,height:a?"100%":`${p}%`,maxWidth:"none",transform:u.transform})};
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core"),t=require("../../image/common/helpers.js"),o=require("../../constant.js"),r=require("./const.js");const l=(t,o,r)=>{let l={};return e.DEVICES.map(i=>{let s=e.getResponsiveValueByScreen(t,i),a=e.getResponsiveValueByScreen(o,i),n=e.getResponsiveValueByScreen(r,i);l={...l,[i]:1>=(s?.cols?.length||1)?a:n}}),l},i=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},s=e=>{let o=i(e);return{desktop:t.createBlurDataURL(o?.desktop?.width??0,o?.desktop?.height??0),tablet:t.createBlurDataURL(o?.tablet?.width??o?.desktop?.width??0,o?.tablet?.height??o?.desktop?.width??0),mobile:t.createBlurDataURL(o?.mobile?.width??o?.tablet?.width??o?.desktop?.width??0,o?.mobile?.height??o?.tablet?.height??o?.desktop?.width??0)}},a=(o,r,l,a)=>{if(!o)return"";let n=i(o),p=e.getResponsiveValueByScreen(o,r),b=l?`url(${s(o)[r]})`:`url(${t.getImageSrc(e.getResponsiveValueByScreen(n,r),r,a)})`,g=p?.color?`, ${p.color}`:"";return p?.color?.includes(e.GRADIENT_BGR_KEY)&&p?.type==="image"?`${b}${g}`:p?.color?.includes(e.GRADIENT_BGR_KEY)&&p?.type!=="image"?`${p.color}`:p?.type==="image"?b:"url()"},n=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},p=(e,t)=>{if(!e)return t;let o=e?.shapeVideo;return"custom"===o?e?.shapeValue||t:void 0!==o?o:e?.shapeValue??t},b=({shapeByDevice:e,fallbackRatio:t,device:o,currentResult:r})=>{let l=p(e,t);return l?{...r,[o]:l}:r},g=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},c=(e,t)=>{if(!e)return;if(!t)return e.shapeValue;let o=e.shapeVideo;return"custom"===o?e.shapeValue:o},u=(t,o)=>{let r=!1,l=e.DEVICES.reduce((l,i)=>{let s=e.getResponsiveValueByScreen(t,i),a=e.getResponsiveValueByScreen(o,i),n=c(s,a?.type==="video");return n&&(l[i]=n,r=!0),l},{});return{aspectRatio:r?l:void 0}},d=(t,o,r)=>e.DEVICES.reduce((l,i)=>{let s=e.getValueByDevice(t,i),a=s?.type==="video"?s?.videoType:void 0,n=e.getValueByDevice(o,i),p=r?.[i];return p&&"youtube"===a&&"cover"!==n&&(l[i]=p),l},{}),m=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,y=(t,o)=>{let r={};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=i?.type==="image"&&o,a=m({enableParallax:s,attachment:t[l]?.attachment});r={...r,[l]:s?"150%":a?"100vh":"100%"}}),e.makeStyleResponsive("h",r)},h=(t,o)=>{let r={};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=i?.type==="image"&&o,a=m({enableParallax:s,attachment:t[l]?.attachment});r={...r,[l]:a?"100vw":"100%"}}),e.makeStyleResponsive("w",r)},f=t=>{let o={};return["desktop","mobile","tablet"].forEach(e=>{o={...o,[e]:t[e]?.attachment==="fixed"?"0px":""}}),e.makeStyleResponsive("top",o)},I=(e,t=0,o=0)=>{let r=t,l=t;if(t>o?r=o:l=o,e>=999){let t=e-r;return t>0?t:0}let i=e-l;return i>0?i:0},v=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let r=t[e]?.cols??[],l=r.length<=1,i=o[e];if(l&&i)return["space-between","top","center","bottom"].includes(i)?i:void 0},k=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,r=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:r}},S=(t,o)=>{if(!t||!o)return 16/9;let r=e.getResponsiveValueByScreen(t,o),l=r?.videoCustomRatio;if(l?.width&&l?.height){let e=Number(l.width),t=Number(l.height);if(e>0&&t>0)return e/t}return 16/9},x=e=>{switch(e){case"top":default:return{top:"0%",transform:`translate(-50%, 0%) scale(${r.VIDEO_IFRAME_SCALE})`};case"bottom":return{top:"100%",transform:`translate(-50%, -100%) scale(${r.VIDEO_IFRAME_SCALE})`};case"center":return{top:"50%",transform:`translate(-50%, -50%) scale(${r.VIDEO_IFRAME_SCALE})`}}};exports.collectAspectRatioByDevice=u,exports.collectYoutubeAspectRatio=d,exports.debounce=function(e,t){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>e.apply(this,r),t)}},exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",exports.getAspectRatio=(e,t)=>{let{aspectRatio:o}=u(e,t);return o},exports.getAttachmentDevice=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let r=e?.[o]?.attachment;t={...t,[o]:"fixed"===r?"fixed":"absolute"}}),t},exports.getBackgroundImageHeroBanner=(t,o=!1,r=!1)=>{if(!t)return;let l={};return e.DEVICES.forEach(e=>{l={...l,[e]:a(t,e,o,r)}}),e.makeStyleResponsive("bgi",l)},exports.getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:o.HREF_TO_SALES_PAGE,target:"_self"}:t},exports.getBgImage=i,exports.getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),exports.getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",r=e.tablet||o,l=e.mobile||r;return{[`gp-justify-${t[o]}`]:!0,[`tablet:gp-justify-${t[r]}`]:!0,[`mobile:gp-justify-${t[l]}`]:!0}},exports.getClassForContentByFitContent=(t,o)=>{let r={desktop:!1,tablet:!1,mobile:!1};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=!!n(l,o),a=i?.shape,p=i?.height;r={...r,[l]:"original"===a&&"fit-content"!==p&&!s}}),e.cls(r.desktop?"!gp-absolute":"",r.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",r.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},exports.getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(r=>{let l=e.getResponsiveValueByScreen(t,r);o={...o,[r]:l}}),e.cls("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},exports.getClassSpaceBetween=(t,o)=>{let r=k(t),l=k(o),i={desktop:v({device:"desktop",settingLayoutRes:r,contentPosition1ColRes:l}),tablet:v({device:"tablet",settingLayoutRes:r,contentPosition1ColRes:l}),mobile:v({device:"mobile",settingLayoutRes:r,contentPosition1ColRes:l})},s={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(3)]:gp-absolute [&>*:nth-child(3)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(3)]:gp-absolute tablet:[&>*:nth-child(3)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(3)]:gp-absolute mobile:[&>*:nth-child(3)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},a={};return e.DEVICES.forEach(e=>{let t=i[e],o=s?.[t]?.[e];a[o]=!0}),a},exports.getClassSpaceBetweenLeftRight=e=>{let t=k(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",r=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",l=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":r,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":l,"mobile:!gp-h-auto":!l}},exports.getClipPath=(e,t)=>{if(!t)return`${r.DEFAULT_CLIP_PATH}`;let[o,l,i,s]=(e??"0 0 0 0").split(" ").map(e=>parseInt(e??"0")||0),{btlr:a,btrr:n,bbrr:p,bblr:b}=t,g=I(parseInt(a??"0")||0,o,s),c=I(parseInt(n??"0")||0,o,l),u=I(parseInt(p??"0")||0,l,i),d=I(parseInt(b??"0")||0,i,s);return[g,c,u,d].every(e=>0===e)?`${r.DEFAULT_CLIP_PATH}`:`inset(0 0 0 round ${g}px ${c}px ${u}px ${d}px)`},exports.getContainerRatio=e=>{if(!e)return 0;let{width:t,height:o}=e.getBoundingClientRect();return t&&o?t/o:0},exports.getContentPosition=l,exports.getDataVideoHeroBannerResponsive=n,exports.getDisplayStyleByFitContent=(t,o)=>{let r={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(t,l),s=!!n(l,o),a=i?.shape,p=i?.height;r={...r,[l]:"original"!==a||"fit-content"===p||s?"none":"block"}}),e.makeStyleResponsive("d",r)},exports.getEnableBgImageByDevice=(t,o)=>{if(!e.getResponsiveValueByScreen(i(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},exports.getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,r="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||r},exports.getPercentageVisible=(e,t)=>{let{top:o,height:r}=e,l=-r;return o<l?0:o>t?100:Math.min(Math.max((o-l)/(t-l)*100,0),100)},exports.getResponsiveSetting=k,exports.getStyleAspectRatioHeroBannerCustom=(t,o)=>{let r=e.getAspectRatioGlobalSize(o);return["desktop","mobile","tablet"].forEach(l=>{let i=e.getResponsiveValueByScreen(o,l),s=!!n(l,t);s&&(r=b({shapeByDevice:i,fallbackRatio:"auto",device:l,currentResult:r}))}),e.makeStyleResponsive("aspect",r)},exports.getStyleHeroBannerBg=(e,t)=>{let o=y(e,t),r=h(e,t),l=f(e);return{...o,...r,...l}},exports.getVideoAspectRatio=S,exports.getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},exports.getWidth=e=>{let t={};return["desktop","mobile","tablet"].forEach(o=>{let r=e?.[o];r&&(t={...t,[o]:"default"===r?"var(--g-ct-w, 1200px)":r})}),t},exports.getYoutubeAspectRatio=(e,t,o)=>{let r=d(e,t,o);return Object.keys(r).length?r:void 0},exports.horizontalAlign=(e,t,o)=>g(l(e,t,o)),exports.imagePlaceholder=s,exports.isScaleImage=m,exports.mapContentPositionToHorizontal=g,exports.opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},r=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:r}},exports.resetVideoIframeStyle=e=>{e&&(e.style.removeProperty("width"),e.style.removeProperty("height"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("transform"),e.style.removeProperty("position"))},exports.resetVideoWrapperStyle=e=>{e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("width"),e.style.removeProperty("height")},exports.scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),exports.setVideoIframeAlign=(e,t)=>{if(!e)return;let o=x(t);e.style.top=o.top,e.style.transform=o.transform},exports.setVideoWrapperStyle=e=>{Object.assign(e.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"})},exports.showVideoType=t=>e.DEVICES.some(o=>{let r=e.getValueByDevice(t,o);return r?.type!=="color"&&r?.type!=="image"&&!!r&&(r?.videoType==="html5"&&r?.videoHtml5||r?.videoType==="youtube"&&r?.video)}),exports.updateVideoIframeSize=({iframeEl:t,containerRatio:o,videoObjectFit:l,background:i,currentDevice:s,isYoutubeVideoMigrated:a})=>{let n,p;let b=S(i,s),g=e.getResponsiveValueByScreen(i,s);if(!t||!o)return;let c=g?.videoAlign||"top",u=x(c);if("contain"===l){Object.assign(t.style,{position:"absolute",top:"50%",left:"50%",width:"100%",height:"100%",maxWidth:"none",transform:`translate(-50%, -50%) scale(${r.VIDEO_IFRAME_SCALE})`});return}o>=b?(n=100,p=o/b*100):(p=100,n=b/o*100),Object.assign(t.style,{position:"absolute",top:u.top,left:"50%",width:a?"500%":`${n}%`,height:a?"100%":`${p}%`,maxWidth:"none",transform:u.transform})};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./HeroBannerItem.liquid.js"),t=require("../common/attrs.js"),r=require("../common/styles.js"),s=require("../common/classes.js"),a=require("@gem-sdk/system"),i=require("@gem-sdk/core"),n=require("../../helpers.js"),o=require("../common/helpers.js"),l=require("../settings/configs/translate.js");exports.default=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./HeroBannerItem.liquid.js"),t=require("../common/attrs.js"),r=require("../common/styles.js"),s=require("../common/classes.js"),a=require("@gem-sdk/system"),i=require("@gem-sdk/core"),n=require("../../helpers.js"),o=require("../common/helpers.js"),l=require("../settings/configs/translate.js");exports.default=c=>{let{builderAttrs:d,builderProps:g,setting:u,styles:p,style:f,children:v,advanced:b,pageContext:h}=c,{enableLazyLoadImage:S}=h??{},{enableLink:m,enableParallax:k}=u??{},y=n.getBackgroundTranslated({background:p?.background,uid:g?.uid,enableTranslate:!!l.HeroBanner?.background?.id,pageContext:h??{},isTranslateVideo:!0}),C=o.getBannerLink(u),{cssClass:$}=b??{},{urlData:j}=n.getInsertLinkData("",C),P=a.createStateOrContext({background:o.getResponsiveSetting(y||{}),uid:g?.uid,enableParallax:k&&Number(u?.speedParallax||0)>0,speedParallax:Number(u?.speedParallax)||0,hoverEffect:p?.hoverEffect,hoverEffectScale:p?.hoverEffectScale,layout:u?.layout,contentPosition1Col:p?.contentPosition1Col,contentPosition2Col:p?.contentPosition2Col,aspectRatio:u?.aspectRatio,sizeSetting:o.getResponsiveSetting(p?.sizeSetting||{}),videoObjectFit:o.getResponsiveSetting(p?.videoObjectFit||{}),target:C?.target??"_self",href:j?.href??"",linkType:C?.type??"",hoverEffectDuration:p?.hoverEffectDuration,isYoutubeVideoMigrated:u?.isYoutubeVideoMigrated}),E=!!C?.link&&m,q=a.createAttr({...t.getAttr({uid:g?.uid||""})}),x=a.createAttr(t.getAttrLink()),R=a.createStyle({...r.getStyle(p,u,f)}),A=a.createClass({...s.getClasses({setting:u,builderProps:g,advancedCssClass:$})}),I=a.createClass({...s.getLinkClasses()}),L=()=>e.default({setting:u,translatedBackground:y,styles:p,children:v,enableLazyLoadImage:S,rawChildren:c.rawChildren,builderProps:g,pageContext:h});return i.template`
|
|
2
2
|
<gp-hero-banner
|
|
3
|
-
${{...
|
|
3
|
+
${{...d}}
|
|
4
4
|
${{...q}}
|
|
5
5
|
class="${A}"
|
|
6
6
|
style="${R}"
|
|
7
|
-
gp-data='${i.dataStringify(P)}'
|
|
8
7
|
>
|
|
8
|
+
<script gp-data type="application/json">${i.dataStringify(P)}</script>
|
|
9
9
|
${a.If(!E,L())}
|
|
10
10
|
${a.If(E,i.template`
|
|
11
11
|
<div
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime"),require("react"),require("@gem-sdk/core"),require("next/head"),require("next/image"),require("@gem-sdk/system"),require("next/link"),require("react-youtube"),require("../image/components/AdaptiveImage.js"),require("./common/animation-manager.js");var e=require("./settings/HeroBanner.js");const r={HeroBanner:e.default};exports.bannerSetting=r;
|
|
1
|
+
"use strict";require("react/jsx-runtime"),require("react"),require("@gem-sdk/core"),require("next/head"),require("next/image"),require("@gem-sdk/system"),require("next/link"),require("react-youtube"),require("../grid/components/section/lazyload/lazyInteractionTrigger.js"),require("../image/components/AdaptiveImage.js"),require("./common/animation-manager.js");var e=require("./settings/HeroBanner.js");const r={HeroBanner:e.default};exports.bannerSetting=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Layout",controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:"Background",controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1},valueIfNull:{width:"100%",height:"fit-content"},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!0},valueIfNull:{enableVideoShape:!0},groupType:"style",controlType:"size-setting"}},{condition:'!!background.image.src && background.type == "image" && sizeSetting.height == "fit-content"',source:["background","sizeSetting"],action:{controlId:"sizeSetting",newValue:{shape:"original",height:""},valueIfNull:{shape:"original"},groupType:"style",controlType:"size-setting"}},{condition:'background.type != "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!1},valueIfNull:{enableVideoShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0,enableTriggerWhenChangeDevice:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:"Overlay",type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:"Color"},{setting:{id:"overlayOpacity",state:"normal"},label:"Opacity"}]}]}},{label:"Size",controls:[{setting:{id:"sizeSetting"},layout:"vertical"},{label:"Scale",setting:{id:"videoObjectFit"},conditionDisplay:'background.type == "video"'}]},{label:"Content",controls:[{id:"contentWidth",label:"Width",controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:"Padding",setting:{id:"contentPadding"}},{label:"Align",setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:"Shape",controls:[{label:"Border",setting:{id:"borderBg"}},{label:"Corner",setting:{id:"cornerBg"}},{label:"Shadow",setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Effect",controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:"Hover effect",setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:"Overlay",type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:"Opacity"},{setting:{id:"overlayColor",state:"hover"},controlChangeTrigger:{settings:[{condition:"overlayColor.hover == 'transparent'",source:["overlayColor","overlayOpacity"],action:{controlId:"overlayOpacity",groupType:"style",controlType:"style",state:"hover",newValue:"20%"}}],options:{noRecordHistory:!0}},compoDefaultValue:"#121212",label:"Color"}]},{label:"Scale",type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:"Scale",setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:"Time",setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:"Parallax scroll",setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:"Speed",setting:{id:"speedParallax"}}]}]},{controls:[{label:"Link",setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:"SEO",controls:[{type:"combo",label:"Image alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:"Align",conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Layout",controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:"Background",controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1},valueIfNull:{width:"100%",height:"fit-content"},groupType:"style",controlType:"size-setting"}},{condition:'background.type == "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!0},valueIfNull:{enableVideoShape:!0},groupType:"style",controlType:"size-setting"}},{condition:'!!background.image.src && background.type == "image" && sizeSetting.height == "fit-content"',source:["background","sizeSetting"],action:{controlId:"sizeSetting",newValue:{shape:"original",height:""},valueIfNull:{shape:"original"},groupType:"style",controlType:"size-setting"}},{condition:'background.type != "video"',source:["background"],action:{controlId:"sizeSetting",newValue:{enableVideoShape:!1},valueIfNull:{enableVideoShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0,enableTriggerWhenChangeDevice:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:"Overlay",type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"normal"},label:"Color"},{setting:{id:"overlayOpacity",state:"normal"},label:"Opacity"}]}]}},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"sizeSetting"},layout:"vertical"},{label:"Scale",setting:{id:"videoObjectFit"},conditionDisplay:'background.type == "video"'}]},{label:"Content",hiddenOnMobile:!0,controls:[{id:"contentWidth",label:"Width",controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:"Padding",setting:{id:"contentPadding"}},{label:"Align",setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"borderBg"}},{label:"Corner",setting:{id:"cornerBg"}},{label:"Shadow",setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Effect",hiddenOnMobile:!0,controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:"Hover effect",setting:{id:"hoverEffect"},controlChangeTrigger:{settings:[{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}},{condition:"hoverEffect == true",source:["hoverEffect","hoverEffectDuration"],action:{controlId:"hoverEffectDuration",groupType:"style",controlType:"style",newValue:"0.5s"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,state:"hover",controls:[{label:"Overlay",type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:"Opacity"},{setting:{id:"overlayColor",state:"hover"},controlChangeTrigger:{settings:[{condition:"overlayColor.hover == 'transparent'",source:["overlayColor","overlayOpacity"],action:{controlId:"overlayOpacity",groupType:"style",controlType:"style",state:"hover",newValue:"20%"}}],options:{noRecordHistory:!0}},compoDefaultValue:"#121212",label:"Color"}]},{label:"Scale",type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:"Scale",setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:"Time",setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:"Parallax scroll",setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:"Speed",setting:{id:"speedParallax"}}]}]},{controls:[{label:"Link",setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:"SEO",hiddenOnMobile:!0,controls:[{type:"combo",label:"Image alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:"Align",hiddenOnMobile:!0,conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Icon",controls:[{label:"Choose",setting:{id:"iconSvg"}},{label:"Color",setting:{id:"color",state:"normal"}},{label:"Size",controlConfig:{id:"width",type:"input:stepper",includeUnit:"px",linkWithSetting:{name:"globalSize",field:"width"}}},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{default:{top:"16px",right:"16px",bottom:"16px",left:"16px",linked:!1}}}}]},{label:"Background",controls:[{label:"Color",setting:{id:"bgColor",state:"normal"}}]},{label:"Shape",controls:[{label:"Border",setting:{id:"iconBorder",state:"normal"}},{label:"Corner",setting:{id:"iconRounded",state:"normal"}},{label:"Shadow",setting:{id:"iconShadow"}}]},{controls:[{label:"Link",setting:{id:"iconLinkEnable"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && iconLinkEnable == true'},{conditionDisplay:"iconLinkEnable == true",layout:"vertical",setting:{id:"iconLink"}}]},{controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Icon",controls:[{label:"Choose",setting:{id:"iconSvg"}},{label:"Color",setting:{id:"color",state:"normal"}},{label:"Size",controlConfig:{id:"width",type:"input:stepper",includeUnit:"px",linkWithSetting:{name:"globalSize",field:"width"}}},{label:"Padding",hiddenOnMobile:!0,controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{default:{top:"16px",right:"16px",bottom:"16px",left:"16px",linked:!1}}}}]},{label:"Background",controls:[{label:"Color",setting:{id:"bgColor",state:"normal"}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"iconBorder",state:"normal"}},{label:"Corner",setting:{id:"iconRounded",state:"normal"}},{label:"Shadow",setting:{id:"iconShadow"}}]},{controls:[{label:"Link",setting:{id:"iconLinkEnable"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && iconLinkEnable == true'},{conditionDisplay:"iconLinkEnable == true",layout:"vertical",setting:{id:"iconLink"}}]},{controls:[{label:"Align",hiddenOnMobile:!0,setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Item management",controls:[{label:"Order",setting:{id:"childItem"}}]},{label:"Item spacing",controls:[{label:"Gap",setting:{id:"verticalSpacing"}}]},{label:"Item style",moreSettings:{controls:[{label:"Padding",controlConfig:{id:"padding-item-padding",type:"padding-v2",linkWithSetting:{name:"itemPadding",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"8px",bottom:"8px",left:"16px",right:"16px"}}}}},{label:"Background",setting:{id:"itemBackgroundColor"}},{label:"Border",setting:{id:"itemBorder"}},{label:"Corner",setting:{id:"itemRounded"}},{label:"Shadow",setting:{id:"itemBoxShadow"}}]},controls:[{label:"Icon & text gap",setting:{id:"horizontalSpacing"}}]},{label:"Size",controls:[{id:"Width",label:"Width",controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}}},{label:"Arrange",setting:{id:"align"},options:{fullWidth:!0},conditionDisplay:"globalSize.width !== 'Auto'"}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:"Shape",controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:"Align",conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"alignWrapper"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Item management",controls:[{label:"Order",setting:{id:"childItem"}}]},{label:"Item spacing",controls:[{label:"Gap",setting:{id:"verticalSpacing"}}]},{label:"Item style",hiddenOnMobile:!0,moreSettings:{controls:[{label:"Padding",controlConfig:{id:"padding-item-padding",type:"padding-v2",linkWithSetting:{name:"itemPadding",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"8px",bottom:"8px",left:"16px",right:"16px"}}}}},{label:"Background",setting:{id:"itemBackgroundColor"}},{label:"Border",setting:{id:"itemBorder"}},{label:"Corner",setting:{id:"itemRounded"}},{label:"Shadow",setting:{id:"itemBoxShadow"}}]},controls:[{label:"Icon & text gap",setting:{id:"horizontalSpacing"}}]},{label:"Size",hiddenOnMobile:!0,controls:[{id:"Width",label:"Width",controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}}},{label:"Arrange",setting:{id:"align"},options:{fullWidth:!0},conditionDisplay:"globalSize.width !== 'Auto'"}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:"Align",hiddenOnMobile:!0,conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"alignWrapper"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Item management",controls:[{label:"Order",setting:{id:"childItem"},options:{fullWidth:!0}}]},{label:"Item spacing",controls:[{type:"control",label:"Gap",setting:{id:"horizontalSpacing"}}]},{label:"Background",controls:[{type:"control",setting:{id:"background"},layout:"vertical"}]},{label:"Shape",controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Align",controls:[{type:"control",label:"Horizontal",setting:{id:"align"}},{type:"control",label:"Vertical",setting:{id:"verticalAlign"}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Item management",controls:[{label:"Order",setting:{id:"childItem"},options:{fullWidth:!0}}]},{label:"Item spacing",hiddenOnMobile:!0,controls:[{type:"control",label:"Gap",setting:{id:"horizontalSpacing"}}]},{label:"Background",controls:[{type:"control",setting:{id:"background"},layout:"vertical"}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Align",hiddenOnMobile:!0,controls:[{type:"control",label:"Horizontal",setting:{id:"align"}},{type:"control",label:"Vertical",setting:{id:"verticalAlign"}}]}];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../helpers.js"),s=require("../../text/components/Text.liquid.js"),l=require("@gem-sdk/system"),a=require("../common/classes.js"),i=require("../common/styles.js"),r=require("../common/helpers.js");exports.default=c=>{let{builderProps:o,builderAttrs:n,style:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../helpers.js"),s=require("../../text/components/Text.liquid.js"),l=require("@gem-sdk/system"),a=require("../common/classes.js"),i=require("../common/styles.js"),r=require("../common/helpers.js");exports.default=c=>{let{builderProps:o,builderAttrs:n,style:p,setting:d,styles:g,pageContext:y}=c,u=o?.builderData?.advanced,$=l.createClass({[o?.uid??""]:!0}),m=l.createClass(a.getClassWraplistIcon()),S=l.createClass(a.getClassColListIcon()),v=l.createClass(a.getClassWrapItemIcon({builderProps:o})),I=l.createClass(a.getClassWrapIcon()),C=l.createClass(a.getClassIcon()),q=l.createClass(a.getClassTextItem({setting:d})),f=l.createStyle(i.getStyleContainerIconlistMain({styles:g,style:p,type:"liquid",advanced:u})),j=l.createStyle(i.getStyleWraplistIcon({styles:g,uid:o?.uid??"",pageContext:y,type:"Liquid"})),x=l.createStyle(i.getStyleColListIcon({styles:g})),T=l.createStyle(i.getStyleWrapIcon({styles:g,setting:d})),W=l.createStyle(i.getStyleWrapItemIcon({styles:g})),h=l.createStyle(i.getStyleIcon({styles:g,setting:d})),k=i.getStyleTypoText({setting:d}),A=l.createAttr({...n}),E=r.getTextIconNotFound("liquid"),L=r.getvalueMap({setting:d});return e.template`
|
|
2
2
|
{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
|
|
3
3
|
<gp-icon-list
|
|
4
4
|
${{...A}}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
data-id="${o?.uid}"
|
|
7
7
|
style="${f}"
|
|
8
8
|
className="${$}"
|
|
9
|
-
gp-data='${e.dataStringify({position:g?.position,iconWidth:p?.iconWidth}).replaceAll("'","'")}'
|
|
10
9
|
>
|
|
10
|
+
<script gp-data type="application/json">${e.dataStringify({position:g?.position,iconWidth:d?.iconWidth}).replaceAll("'","'")}</script>
|
|
11
11
|
${l.If(!L||!L.length,e.template`<div>${E}</div>`,e.template`
|
|
12
|
-
<div class="${m}" style="${
|
|
13
|
-
<div class="${S}" style="${
|
|
14
|
-
${L?.map((t,l)=>{let a=r.getTextIconTranslations({setting:
|
|
12
|
+
<div class="${m}" style="${j}">
|
|
13
|
+
<div class="${S}" style="${x}">
|
|
14
|
+
${L?.map((t,l)=>{let a=r.getTextIconTranslations({setting:d,builderProps:o,pageContext:y,key:l,type:"liquid"});return e.template`
|
|
15
15
|
<div
|
|
16
16
|
key="${l}"
|
|
17
17
|
data-index="${l}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Item management",controls:[{label:"Order",setting:{id:"childItem"}}]},{label:"Icon style",controls:[{label:"Icon type ",setting:{id:"iconType"}},{conditionDisplay:'iconType === "matching"',label:"Icon",setting:{id:"iconSvg"}},{conditionDisplay:'iconType === "different"',layout:"vertical",setting:{id:"childConfig"}},{label:"Icon color",setting:{id:"iconColor"}},{label:"Icon size",setting:{id:"iconWidth"}}],moreSettings:{type:"collapse",controls:[{label:"Position",setting:{id:"position"}},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{default:{top:"4px",right:"4px",bottom:"4px",left:"4px"}}}},{label:"Background",setting:{id:"backgroundColor"}},{label:"Border",setting:{id:"iconBorder"}},{label:"Corner",setting:{id:"iconRounded"}}]}},{label:"Text",controls:[{setting:{id:"textTypo"},layout:"vertical"}]},{label:"Item spacing",controls:[{label:"Gap",setting:{id:"verticalSpacing"}}]},{label:"Item style",controls:[{label:"Icon & text gap",setting:{id:"horizontalSpacing"}}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical"}]},{label:"Size",controls:[{label:"Width",setting:{id:"contentBoxWidth"},layout:"horizontal"},{label:"Padding",setting:{id:"contentBoxPadding"},layout:"horizontal"},{label:"Arrange",setting:{id:"panelAlign"}}]},{label:"Shape",controls:[{label:"Border",setting:{id:"contentBoxBorder"}},{label:"Corner",setting:{id:"contentBoxRounded"}},{label:"Shadow",setting:{id:"contentBoxShadow"}}]},{controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},conditionEnable:'!contentBoxWidth?.includes("%") || (parseInt(contentBoxWidth) < 100 && contentBoxWidth?.includes("%"))'}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Item management",controls:[{label:"Order",setting:{id:"childItem"}}]},{label:"Icon style",controls:[{label:"Icon type ",setting:{id:"iconType"}},{conditionDisplay:'iconType === "matching"',label:"Icon",setting:{id:"iconSvg"}},{conditionDisplay:'iconType === "different"',layout:"vertical",setting:{id:"childConfig"}},{label:"Icon color",setting:{id:"iconColor"}},{label:"Icon size",setting:{id:"iconWidth"}}],moreSettings:{type:"collapse",controls:[{label:"Position",hiddenOnMobile:!0,setting:{id:"position"}},{label:"Padding",hiddenOnMobile:!0,controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{default:{top:"4px",right:"4px",bottom:"4px",left:"4px"}}}},{label:"Background",hiddenOnMobile:!0,setting:{id:"backgroundColor"}},{label:"Border",hiddenOnMobile:!0,setting:{id:"iconBorder"}},{label:"Corner",hiddenOnMobile:!0,setting:{id:"iconRounded"}}]}},{label:"Text",controls:[{setting:{id:"textTypo"},layout:"vertical"}]},{label:"Item spacing",controls:[{label:"Gap",setting:{id:"verticalSpacing"}}]},{label:"Item style",controls:[{label:"Icon & text gap",setting:{id:"horizontalSpacing"}}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical"}]},{label:"Size",hiddenOnMobile:!0,controls:[{label:"Width",setting:{id:"contentBoxWidth"},layout:"horizontal"},{label:"Padding",setting:{id:"contentBoxPadding"},layout:"horizontal"},{label:"Arrange",setting:{id:"panelAlign"}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"contentBoxBorder"}},{label:"Corner",setting:{id:"contentBoxRounded"}},{label:"Shadow",setting:{id:"contentBoxShadow"}}]},{controls:[{label:"Align",hiddenOnMobile:!0,setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},conditionEnable:'!contentBoxWidth?.includes("%") || (parseInt(contentBoxWidth) < 100 && contentBoxWidth?.includes("%"))'}]}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.REGEX_IS_NON_RESIZABLE_IMAGE=/\.(gif|webp|jfif|svg|tiff?)(?:\?|$)/i;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core"),t=require("../../helpers.js"),r=require("../settings/configs/translate.js");const
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core"),t=require("../../helpers.js"),r=require("../settings/configs/translate.js"),i=require("./const.js");const s=({device:e,aspect:t,custom:r,auto:i})=>{let s=t?.[e];return"auto"===s?i?.height?`${i.width}/${i.height}`:void 0:"custom"===s?r?.[e]?.height?`${r?.[e]?.width}/${r?.[e]?.height}`:void 0:s},l=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="g-${e}-${t}">
|
|
4
4
|
<stop stop-color="rgba(51, 51, 51, 0)" offset="20%" />
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<rect width="${e}" height="${t}" fill="rgba(51, 51, 51, 0)" />
|
|
10
10
|
<rect id="r" width="${e}" height="${t}" fill="url(#g-${e}-${t})" />
|
|
11
11
|
<animate xlink:href="#r" attributeName="x" from="-${e}" to="${e}" dur="1s" repeatCount="indefinite" />
|
|
12
|
-
</svg>`,
|
|
12
|
+
</svg>`,a=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),o="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",n=e=>i.REGEX_IS_NON_RESIZABLE_IMAGE.test(e),g=(e,t)=>{let r=p(e);return n(e)?"FILE_CONTENT"==t?`{{ '${r}' | file_url }} 768w, {{ '${r}' | file_url }} 1024w, {{ '${r}' | file_url }} 1440w`:`{{ '${e}' | asset_url }} 768w, {{ '${e}' | asset_url }} 1024w, {{ '${e}' | asset_url }} 1440w`:"FILE_CONTENT"==t?`{{ '${r}' | file_img_url: '768x' }} 768w, {{ '${r}' | file_img_url: '1024x' }} 1024w, {{ '${r}' | file_img_url: 'master' }} 1440w`:`{{ '${e}' | asset_img_url: '768x' }} 768w, {{ '${e}' | asset_img_url: '1024x' }} 1024w, {{ '${e}' | asset_img_url: 'master' }} 1440w`},c=e=>e,u=(t,r,i)=>{if(t?.metafieldDefinitionKey)return d(t?.metafieldDefinitionKey);let s=t?.backupFilePath??t?.src??"";if(i)s=t?.src||"";else{let r=t?.src??"";if(e.hasTranslatedLiquid(r))return r;if(t?.backupFileKey){let e=m(t.backupFileKey,t?.src??"");"THEME"!==t.storage&&t.storage?"FILE_CONTENT"===t.storage&&(s=`{{ '${p(e)}' | file_url }}`):s=`{{ '${e}' | asset_url }}`}}if(r&&s?.includes("cdn.shopify")&&!n(s))switch(r){case"tablet":s=s?.includes("?")?`${s}&width=1024`:`${s}?width=1024`;break;case"mobile":s=s?.includes("?")?`${s}&width=768`:`${s}?width=768`}return s},d=e=>`{{${e} | file_url}}`,p=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),m=(e,t)=>{let r=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return r&&r!=e?r:e};function f(e,t){let r=h({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(n(r))return r;let i=h({str:r,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return i}const h=e=>{let t=e.str,r=e.str.match(e.reg)?.length;if(r){let i,s=1;for(;null!==(i=e.reg.exec(e.str));){if(s===r){let r=e.reg.lastIndex,s=r-i[0].length;e.isAdd&&(e.newString="_"+e.newString+i),t=t.slice(0,s)+e.newString+t.slice(r,t.length)}s++}}return t},b=(e,t)=>{let r=v(),i=t?.[r]||"auto";if("auto"===i||i.includes("%"))return e;let s=Number(i.replace("px",""));return s>e?e:Number(i.replace("px",""))},A=t=>{let{itemWidthParam:r,imageWidthSetting:i,qualityType:s,qualityPercent:l}=t,a=v(),o=b(r,i),n=e.getResponsiveValueByScreen(s,a,"finest"),g=e.getResponsiveValueByScreen(l,a,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*o)||1;case"medium":return Math.round(o)||1;case"custom":return Math.round(o*(Number(g)/100))||1}},w=t=>{let r={desktop:"100%",tablet:"100%",mobile:"100%"};return e.DEVICES.forEach(i=>{let s=e.getResponsiveValueByScreen(t,i)?.width||"100%";r[i]=s}),r},S=t=>{let r={desktop:"100%",tablet:"100%",mobile:"100%"};return e.DEVICES.forEach(i=>{let s=e.getResponsiveValueByScreen(t,i)?.width||"100%";r[i]=s}),r},x=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),r=0;return t.forEach(e=>{e.offsetWidth>r&&(r=e.offsetWidth)}),r},$=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),r=0;return t.forEach(e=>{e.offsetWidth>r&&(r=e.offsetWidth)}),r},_=e=>{let{item:t,settingWidth:r,width:i,qualityType:s,qualityPercent:l}=e,a=v(),o=t.querySelector("img");if(o){let e=A({itemWidthParam:i,imageWidthSetting:r,qualityType:s,qualityPercent:l}),t=o.getAttribute("base-src");if(!t)return;let n=E(e,t),g=I(t,n,a);o.setAttribute("srcset",g)}},E=(e,t)=>"auto"===e?t:f(t,`${e}x`),I=(e,t,r)=>`${"mobile"===r&&e!==t?t:f(e,"768x")} 767w, ${"tablet"===r&&e!==t?t:f(e,"1024x")} 1023w, ${"desktop"===r&&e!==t?t:f(e,"1920x")} 1440w`,v=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";exports.FALLBACK_IMAGE=o,exports.IMAGE_PLACEHOLDER="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",exports.NEXT_IMAGE_CONFIG={DEFAULT_SIZES:"100vw",DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH_PROPS:800,DEFAULT_HEIGHT_PROPS:533},exports.composeAspectRatio=s,exports.createBlurDataURL=(e,t)=>`data:image/svg+xml;base64,${a(l(e,t))}`,exports.getAdaptiveImageData=e=>{let{srcSet:t,fallbackImg:r}=e;return{getDeviceSource:e=>{let{isLiquid:i}=e??{},s=u(t?.desktop,"desktop",!i)||r||o,l=u(t?.tablet,"tablet",!i)||u(t?.desktop,"tablet",!i)||r||o,a=u(t?.mobile,"mobile",!i)||u(t?.tablet,"mobile",!i)||u(t?.desktop,"mobile",!i)||r||o;return{srcTablet:l,srcMobile:a,srcDesktop:s}}}},exports.getAspectRatio=({styles:t,setting:r})=>{let{srcSet:i,image:l}=r??{},{customAspectRadio:a,shape:o}=t??{},n={desktop:s({device:"desktop",aspect:t?.aspectRatio,auto:r?.isAdaptive?i?.desktop:l,custom:a}),tablet:s({device:"tablet",aspect:t?.aspectRatio,auto:r?.isAdaptive?i?.tablet:l,custom:a}),mobile:s({device:"mobile",aspect:t?.aspectRatio,auto:r?.isAdaptive?i?.mobile:l,custom:a})};return o?e.getAspectRatioGlobalSize(o):n},exports.getAspectRatioNextImage=({isDisableAspectStyle:t,aspectRatio:r,objectFits:i,width:s,height:l})=>{if(t)return{};let a={};return e.DEVICES.forEach(e=>{let t=`--objf${"desktop"!==e?`-${e}`:""}`,o=i?.[t]||i?.["--objf"];if(r?.[e]==="auto"&&"contain"===o){a[e]="auto";return}a[e]=r?.[e]!=="auto"&&r?.[e]?r[e]:`${s}/${l}`}),a},exports.getCurrentDevice=v,exports.getImageSrc=u,exports.getImageWidthFollowByQuality=A,exports.getNewBackupFileKey=m,exports.getResponsiveObjectFit=({layout:t,isDisableObjectFit:r})=>r?{}:e.makeStyleResponsive("objf",t),exports.getSettingTranslatedImageAndSeo=({setting:i,uid:s,pageContext:l})=>{if(!i||!r.Image)return{};let a=e.cloneDeep(i);for(let e in a.srcSet){let i=a.srcSet[e];if(i&&i.src){let a=t.getDynamicSourceLocales({val:i.src,uid:s,settingId:r.Image?.srcSet?.id?`${r.Image.srcSet.id}_${e}_src`:"",pageContext:l??{}});i.src=String(a)}}let o=t.getDynamicSourceLocales({val:a.alt,uid:s,settingId:t.createSettingId({id:r.Image?.alt?.id}),pageContext:l??{}});a.alt=String(o);let n=t.getDynamicSourceLocales({val:a.title,uid:s,settingId:t.createSettingId({id:r.Image?.title?.id}),pageContext:l??{}});return a.title=String(n),a},exports.getSrcSet=(e,t,r)=>e?g(e,t):c(r),exports.handleSetSrcForFeatureProductImage=e=>{let{ftShape:t,qualityType:r,qualityPercent:i,builderPropUID:s}=e,l=document.querySelectorAll(`.gem-slider-item-${s}.gp-ft-image-item`),a=w(t),o=$(s);l.forEach(e=>{_({item:e,settingWidth:a,width:o,qualityType:r,qualityPercent:i})})},exports.handleSetSrcForProductImageList=e=>{let{shapeByLayout:t,qualityType:r,qualityPercent:i,builderPropUID:s}=e,l=document.querySelectorAll(`.gem-slider-item-${s}.gp-gallery-image-item`),a=S(t),o=x(s);l.forEach(e=>{_({item:e,settingWidth:a,width:o,qualityType:r,qualityPercent:i})})},exports.isCannotResizeImage=n,exports.overwriteDefaultRadius=t=>{let r={...t},i=!0;return r&&Object.keys(r??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=r[e]??{};"0px"!==t&&(i=!1)}}),i?e.getCornerCSSFromGlobal(r):{}},exports.replaceBackupFileKeyFileContent=p,exports.resizeImage=f,exports.safeStringify=e=>JSON.stringify(e||{}).replace(/"/g,"""),exports.shimmer=l,exports.toBase64=a;
|
package/dist/cjs/image/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Image:require("./components/Image.js").default};exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Style",controls:[{setting:{id:"imageStyle"},layout:"vertical",controlChangeTrigger:{settings:[{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"square",shapeValue:"1/1",shapeLinked:!0,width:"80px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"9999px",btrr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"original",shapeValue:"",width:"100%"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"0px",btrr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:"Source",controls:[{conditionDisplay:"isAdaptive === false",setting:{id:"image"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{conditionDisplay:"isAdaptive === true",setting:{id:"srcSet"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"objectFit"},conditionDisplay:'shape.shape !== "original"'}]},{label:"Size",controls:[{setting:{id:"shape"},layout:"vertical"}]},{label:"Shape",controls:[{label:"Border",controlConfig:{id:"border",type:"border-v2",linkWithSetting:{name:"wrapperBorder"}}},{label:"Corner",controlConfig:{id:"corner",type:"corner-v2",linkWithSetting:{name:"borderRadius"}}},{label:"Shadow",setting:{id:"shadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadow.enable === true",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!0}},{condition:"shadow.enable === false",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:"Link",setting:{id:"enableImageLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableImageLink == true'},{setting:{id:"imageLink"},conditionDisplay:"enableImageLink === true",layout:"vertical"}]},{label:"SEO",controls:[{type:"combo",label:"Alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",isHideClear:!0,compoDefaultValue:"Title",controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{label:"Optimize LCP",controls:[{label:"Preload",setting:{id:"priority"}},{label:"Quality",setting:{id:"qualityType"},options:{disableMessage:"This setting only works with images uploaded to Shopify"},conditionEnable:"(activeScreenId === \"desktop\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"tablet\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"mobile\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com'))",conditionDisplay:"priority === false"},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && priority === false && ((activeScreenId === "desktop" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "tablet" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "mobile" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")))',setting:{id:"qualityPercent"}}]},{controls:[{label:"Align",setting:{id:"align"},conditionEnable:'!(shape.width === "default" || (parseInt(shape.width) >= 100 && shape.width?.includes("%")))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Style",controls:[{setting:{id:"imageStyle"},layout:"vertical",controlChangeTrigger:{settings:[{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"square",shapeValue:"1/1",shapeLinked:!0,width:"80px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"9999px",btrr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"wrapperBorder",newValue:{border:"none",color:"transparent",borderWidth:"0px"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="circle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shadow",newValue:{enable:!1},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"shape",newValue:{shape:"original",shapeValue:"",width:"100%"},groupType:"style",controlType:"style"}},{condition:'imageStyle==="rectangle"',source:["imageStyle"],action:{controlId:"borderRadius",newValue:{bblr:"0px",btrr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:"Source",controls:[{conditionDisplay:"isAdaptive === false",setting:{id:"image"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{conditionDisplay:"isAdaptive === true",setting:{id:"srcSet"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"priority"},{field:"altText",settingId:"alt"},{field:"imageTitle",settingId:"title"}]},controlChangeTrigger:{settings:[{action:{controlId:"priority",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"alt",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"title",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"objectFit"},conditionDisplay:'shape.shape !== "original"'}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"shape"},layout:"vertical"}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border",type:"border-v2",linkWithSetting:{name:"wrapperBorder"}}},{label:"Corner",controlConfig:{id:"corner",type:"corner-v2",linkWithSetting:{name:"borderRadius"}}},{label:"Shadow",setting:{id:"shadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadow.enable === true",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!0}},{condition:"shadow.enable === false",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"advanced",controlType:"advanced",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:"Link",setting:{id:"enableImageLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableImageLink == true'},{setting:{id:"imageLink"},conditionDisplay:"enableImageLink === true",layout:"vertical"}]},{label:"SEO",hiddenOnMobile:!0,controls:[{type:"combo",label:"Alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",isHideClear:!0,compoDefaultValue:"Title",controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"priority"}},{label:"Quality",setting:{id:"qualityType"},options:{disableMessage:"This setting only works with images uploaded to Shopify"},conditionEnable:"(activeScreenId === \"desktop\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"tablet\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com')) || (activeScreenId === \"mobile\" && srcSet?.src && srcSet.src.includes('cdn.shopify.com'))",conditionDisplay:"priority === false"},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && priority === false && ((activeScreenId === "desktop" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "tablet" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")) || (activeScreenId === "mobile" && srcSet?.src && srcSet.src.includes("cdn.shopify.com")))',setting:{id:"qualityPercent"}}]},{controls:[{label:"Align",hiddenOnMobile:!0,setting:{id:"align"},conditionEnable:'!(shape.width === "default" || (parseInt(shape.width) >= 100 && shape.width?.includes("%")))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core");exports.getImageComparisonWrapperClasses=()=>({"gp-flex gp-w-full gp-overflow-hidden":!0}),exports.getImageComparisonWrapperStyles=()=>({"border-radius":"inherit"}),exports.getLabelClasses=p=>{let s=e.composeTypographyClassName(p?.typo);return{[s]:!0,"gp-absolute gp-box-border gp-rounded-[4px] gp-bg-[rgba(0,0,0,0.60)] gp-px-2 gp-py-1":!0}},exports.getLabelContainerClasses=()=>({"gp-absolute gp-top-0 gp-h-full gp-w-full":!0}),exports.getOuterWrapperClasses=e=>({"gp-w-full gp-flex":!0,...e&&{cssClass:!0}});
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core");exports.getImageComparisonWrapperClasses=()=>({"gp-flex gp-w-full gp-overflow-hidden swiper-no-swiping":!0}),exports.getImageComparisonWrapperStyles=()=>({"border-radius":"inherit"}),exports.getLabelClasses=p=>{let s=e.composeTypographyClassName(p?.typo);return{[s]:!0,"gp-absolute gp-box-border gp-rounded-[4px] gp-bg-[rgba(0,0,0,0.60)] gp-px-2 gp-py-1":!0}},exports.getLabelContainerClasses=()=>({"gp-absolute gp-top-0 gp-h-full gp-w-full":!0}),exports.getOuterWrapperClasses=e=>({"gp-w-full gp-flex":!0,...e&&{cssClass:!0}});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("@gem-sdk/system"),a=require("../../helpers.js"),s=require("../../image/components/NextImage.liquid.js"),l=require("../common/styles.js"),i=require("../common/classes.js"),r=require("../common/attrs.js"),g=require("../common/helpers.js"),d=require("./Label.liquid.js"),c=require("./SlideHandle.liquid.js");exports.default=y=>{let{leftImage:o,rightImage:n,advanced:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("@gem-sdk/system"),a=require("../../helpers.js"),s=require("../../image/components/NextImage.liquid.js"),l=require("../common/styles.js"),i=require("../common/classes.js"),r=require("../common/attrs.js"),g=require("../common/helpers.js"),d=require("./Label.liquid.js"),c=require("./SlideHandle.liquid.js");exports.default=y=>{let{leftImage:o,rightImage:n,advanced:p,builderData:m,pageContext:S,preload:u=!1,onSliderPositionChange:h}=y,{hover:L,styles:b,handle:f,handleSize:$,leftImageAlt:q,leftImageTitle:A,leftImageCss:I,leftImageLabel:C,rightImageAlt:j,rightImageTitle:v,rightImageCss:w,rightImageLabel:O,sliderLineWidth:D,sliderLineColor:P,sliderPositionPercentage:W,vertical:z,componentUid:E,tempImage:N,aspectRatio:k,defaultRatio:x,isHorizontal:H,hasLeftLabel:_,hasRightLabel:F,qualityType:G,qualityPercent:M,getLeftImageSrc:R,getRightImageSrc:J}=g.getData(y),T=R({isLiquid:!0}),U=J({isLiquid:!0}),V=t.createStyle({...l.getOuterWrapperStyles(b)}),B=t.createStyle({...l.getWrapperWidth({width:b?.width,leftImageWidth:o?.width,rightImageWidth:n?.width})}),K=t.createStyle({...l.getContainerStyles({aspectRatio:k,builderData:m})}),Q=t.createStyle({...l.getLazyPlaceholderStyle(k)}),X=t.createStyle({...l.getImageStyles({type:"right",props:y})}),Y=t.createStyle({...l.getImageStyles({type:"left",props:y})}),Z=t.createStyle({...l.getLabelStyles({styles:b,type:"left",isHorizontal:H})}),ee=t.createStyle({...l.getLabelStyles({styles:b,type:"right",isHorizontal:H})}),et=t.createStyle({...l.getArrowStyles({type:"left"})}),ea=t.createStyle({...l.getArrowStyles({type:"right"})}),es=t.createStyle({...l.getLineStyles({isHorizontal:H,sliderLineColor:P,sliderLineWidth:D})}),el=t.createStyle({...l.getHandleStyles({handleSize:$,isHorizontal:H,sliderLineColor:P,sliderLineWidth:D})}),ei=t.createStyle({...l.getHandleCustomStyles()}),er=t.createStyle({...l.getSliderStyles({hover:L,handleSize:$,isHorizontal:H})}),eg=t.createClass({...i.getOuterWrapperClasses(p?.cssClass)}),ed=t.createClass({...i.getLabelClasses(b)}),ec=t.createClass({...i.getLabelContainerClasses()}),ey=r.getLabelAttrs({componentUid:E,positionId:"left",label:C??""}),eo=r.getLabelAttrs({componentUid:E,positionId:"right",label:O??""}),en=t.createAttr({...r.getImageLiquidAttrs({priority:u,src:U,title:v,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`right-image-${E}`})}),ep=t.createAttr({...r.getImageLiquidAttrs({priority:u,src:T,title:A,isDisableObjectFit:!0,isDisableAspectStyle:!0,id:`left-image-${E}`})}),em=r.getLabelLiquidAttrs({pageContext:S,translateLabel:"leftImageLabel"}),eS=r.getLabelLiquidAttrs({pageContext:S,translateLabel:"rightImageLabel"}),eu=t.createAttr({...r.getImagePlaceholderAttrs({width:N?.width,height:N?.height})}),eh=t.createStateOrContext({hover:L,handle:f,vertical:z,leftImage:o,rightImage:n,handleSize:$,aspectRatio:k,defaultRatio:x,componentUid:E,leftImageCss:I,rightImageCss:w,sliderLineColor:P,sliderLineWidth:D,sliderPositionPercentage:W,onSliderPositionChange:h});return e.template`
|
|
2
2
|
<gp-image-comparison
|
|
3
3
|
data-id="${E}"
|
|
4
4
|
style="${V}"
|
|
5
5
|
class="${eg}"
|
|
6
|
-
gp-data='${JSON.stringify(eh)}'
|
|
7
6
|
>
|
|
7
|
+
<script gp-data type="application/json">${JSON.stringify(eh)}</script>
|
|
8
8
|
<div id="img-comparison-wrapper-${E}" style="${B}">
|
|
9
9
|
<div
|
|
10
10
|
id="img-comparison-container-${E}"
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
<img alt="" ${eu} style="${Q}" />
|
|
16
16
|
`}
|
|
17
17
|
${s.default({...en,alt:j,style:X,setting:{qualityType:G,qualityPercent:M},enableLazyLoadImage:!u,isNotLazyload:u,customAttrs:{"data-testid":"right-image"}})}
|
|
18
|
-
${s.default({...
|
|
18
|
+
${s.default({...ep,alt:q,style:Y,setting:{qualityType:G,qualityPercent:M},enableLazyLoadImage:!u,isNotLazyload:u,customAttrs:{"data-testid":"left-image"}})}
|
|
19
19
|
${c.default({componentUid:E,customHandle:f,lineStyles:es,sliderStyles:er,handleStyles:el,customHandleStyles:ei,leftArrowStyles:et,rightArrowStyles:ea})}
|
|
20
|
-
${t.If(_,d.default({...ey,...
|
|
20
|
+
${t.If(_,d.default({...ey,...em,styles:b,childrenClass:ed,childrenStyle:Z,containerClass:ec,containerStyle:{}}),"")}
|
|
21
21
|
${t.If(F,d.default({...eo,...eS,styles:b,childrenClass:ed,childrenStyle:ee,containerClass:ec,containerStyle:{}}),"")}
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.SettingUIV2=[{label:"Layout",controls:[{setting:{id:"direction"},layout:"vertical",options:{fullWidth:!0}}]},{label:"Image",controls:[{label:"1st image",setting:{id:"imageLeft"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altLeft"},{field:"imageTitle",settingId:"titleLeft"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altLeft",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleLeft",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"2nd image",setting:{id:"imageRight"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altRight"},{field:"imageTitle",settingId:"titleRight"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altRight",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleRight",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"imageScale"}}]},{label:"Slider",controls:[{label:"Behavior",setting:{id:"hoverToSlide"}},{label:"Default ratio",setting:{id:"defaultPercentage"}}]},{controls:[{label:"Badge",setting:{id:"enableLabel"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:"1st",conditionDisplay:"enableLabel === true",setting:{id:"leftImageLabel"}},{label:"2nd",conditionDisplay:"enableLabel === true",setting:{id:"rightImageLabel"}},{conditionDisplay:"enableLabel === true",label:"Text style",setting:{id:"typo"},options:{updateFields:[{field:"attrs.color",settingId:"labelTextColor"}]},controlChangeTrigger:{settings:[{action:{controlId:"labelTextColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Padding",conditionDisplay:"enableLabel === true",setting:{id:"labelPadding"}},{label:"Background",conditionDisplay:"enableLabel === true",setting:{id:"labelBackgroundColor"}},{label:"Border",conditionDisplay:"enableLabel === true",setting:{id:"labelBorder"}},{label:"Corner",conditionDisplay:"enableLabel === true",setting:{id:"labelRounded"}},{label:"Shadow",conditionDisplay:"enableLabel === true",setting:{id:"labelShadow"}},{label:"Position",setting:{id:"labelPositionHoz"},conditionDisplay:"enableLabel === true && direction === 'horizontal'"},{label:"Position",setting:{id:"labelPositionVer"},conditionDisplay:"enableLabel === true && direction === 'vertical'"}]},{label:"Size",controls:[{label:"Frame",setting:{id:"aspectRatio"}},{label:"Ratio",conditionDisplay:"aspectRatio === 'custom'",setting:{id:"customAspectRadio"}},{label:"Width",setting:{id:"width"}}]},{label:"Shape",controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Optimize LCP",controls:[{label:"Preload",setting:{id:"preload"}},{label:"Quality",conditionEnable:"((imageLeft.src || imageRight.src) && (imageLeft.src.includes('cdn.shopify.com') || imageRight.src.includes('cdn.shopify.com')))",conditionDisplay:"preload === false",setting:{id:"qualityType"},options:{fullWidth:!0,disableMessage:"This setting only works with images uploaded to Shopify"}},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && preload === false && ((imageLeft.src || imageRight.src) && (imageLeft.src.includes("cdn.shopify.com") || imageRight.src.includes("cdn.shopify.com"))) ',setting:{id:"qualityPercent"}}]},{label:"SEO",controls:[{label:"1st image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",popoverLabel:"SEO",setting:{id:"enableSEOLeft"},controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altLeft"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleLeft"}}]},{label:"2nd image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",setting:{id:"enableSEORight"},popoverLabel:"SEO",controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altRight"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleRight"}}]}]},{controls:[{label:"Align",conditionEnable:'!(width === "default" || (parseInt(width) >= 100 && width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];
|
|
1
|
+
"use strict";exports.SettingUIV2=[{label:"Layout",controls:[{setting:{id:"direction"},layout:"vertical",options:{fullWidth:!0}}]},{label:"Image",controls:[{label:"1st image",setting:{id:"imageLeft"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altLeft"},{field:"imageTitle",settingId:"titleLeft"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altLeft",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleLeft",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"2nd image",setting:{id:"imageRight"},options:{updateFields:[{field:"preload",settingId:"preload"},{field:"altText",settingId:"altRight"},{field:"imageTitle",settingId:"titleRight"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"altRight",valueFromField:"altText",groupType:"setting",controlType:"setting",removeDevice:!0}},{action:{controlId:"titleRight",valueFromField:"imageTitle",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Scale",setting:{id:"imageScale"}}]},{label:"Slider",controls:[{label:"Behavior",setting:{id:"hoverToSlide"}},{label:"Default ratio",setting:{id:"defaultPercentage"}}]},{controls:[{label:"Badge",hiddenOnMobile:!0,setting:{id:"enableLabel"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:"1st",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"leftImageLabel"}},{label:"2nd",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"rightImageLabel"}},{conditionDisplay:"enableLabel === true",label:"Text style",hiddenOnMobile:!0,setting:{id:"typo"},options:{updateFields:[{field:"attrs.color",settingId:"labelTextColor"}]},controlChangeTrigger:{settings:[{action:{controlId:"labelTextColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0}}],options:{noRecordHistory:!0}}},{label:"Padding",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelPadding"}},{label:"Background",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelBackgroundColor"}},{label:"Border",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelBorder"}},{label:"Corner",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelRounded"}},{label:"Shadow",hiddenOnMobile:!0,conditionDisplay:"enableLabel === true",setting:{id:"labelShadow"}},{label:"Position",hiddenOnMobile:!0,setting:{id:"labelPositionHoz"},conditionDisplay:"enableLabel === true && direction === 'horizontal'"},{label:"Position",hiddenOnMobile:!0,setting:{id:"labelPositionVer"},conditionDisplay:"enableLabel === true && direction === 'vertical'"}]},{label:"Size",hiddenOnMobile:!0,controls:[{label:"Frame",setting:{id:"aspectRatio"}},{label:"Ratio",conditionDisplay:"aspectRatio === 'custom'",setting:{id:"customAspectRadio"}},{label:"Width",setting:{id:"width"}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",setting:{id:"border",state:"normal"}},{label:"Corner",setting:{id:"rounded",state:"normal"}},{label:"Shadow",setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"preload"}},{label:"Quality",conditionEnable:"((imageLeft.src || imageRight.src) && (imageLeft.src.includes('cdn.shopify.com') || imageRight.src.includes('cdn.shopify.com')))",conditionDisplay:"preload === false",setting:{id:"qualityType"},options:{fullWidth:!0,disableMessage:"This setting only works with images uploaded to Shopify"}},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && preload === false && ((imageLeft.src || imageRight.src) && (imageLeft.src.includes("cdn.shopify.com") || imageRight.src.includes("cdn.shopify.com"))) ',setting:{id:"qualityPercent"}}]},{label:"SEO",hiddenOnMobile:!0,controls:[{label:"1st image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",popoverLabel:"SEO",setting:{id:"enableSEOLeft"},controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altLeft"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleLeft"}}]},{label:"2nd image",type:"combo",iconName:"polaris-text-title",fixedValue:"Edit",setting:{id:"enableSEORight"},popoverLabel:"SEO",controls:[{label:"Alt text",options:{labelAlign:"top"},setting:{id:"altRight"}},{label:"Image title",options:{labelAlign:"top"},setting:{id:"titleRight"}}]}]},{controls:[{label:"Align",hiddenOnMobile:!0,conditionEnable:'!(width === "default" || (parseInt(width) >= 100 && width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];
|