@gem-sdk/components 19.0.0-staging.8 → 19.1.0-dev.0
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/builder.js +1 -1
- package/dist/cjs/button/components/Button.liquid.js +15 -15
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +5 -4
- package/dist/cjs/carousel-v3/common/selectors.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/cjs/carousel-v3/components/root/common/attrs.js +1 -1
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel-v3/index.js +1 -1
- package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- 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/countdown-timer/components/Countdown.liquid.js +16 -15
- package/dist/cjs/estimate-delivery/common/helpers.js +1 -1
- package/dist/cjs/grid/components/row/Row.liquid.js +16 -11
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +11 -11
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +2 -2
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +11 -11
- 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/marquee/components/Marquee.liquid.js +21 -21
- package/dist/cjs/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/cjs/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/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +15 -15
- package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +7 -5
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +4 -3
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +8 -7
- 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.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +19 -19
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/ProductImageV3.js +2 -2
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +19 -19
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/common/getBorderActiveCss.js +2 -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/ProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -2
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +29 -29
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +10 -9
- package/dist/cjs/product/components/product-list/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 +10 -9
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.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-price/ProductPrice.liquid.js +4 -4
- 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/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +27 -27
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +7 -4
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/sticky/components/Sticky.liquid.js +4 -5
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/tab/components/Tabs.liquid.js +7 -6
- package/dist/cjs/text/components/Text.liquid.js +3 -3
- 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/configs/AppstleLoyaltyRewardProgram.js +1 -0
- 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/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -10
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +14 -13
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/accordion/components/Accordion.liquid.js +8 -9
- package/dist/esm/builder.js +1 -1
- package/dist/esm/button/components/Button.liquid.js +22 -22
- package/dist/esm/carousel/components/root/Carousel.liquid.js +4 -3
- package/dist/esm/carousel-v3/common/selectors.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +6 -5
- package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
- package/dist/esm/carousel-v3/components/root/common/attrs.js +1 -1
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel-v3/index.js +1 -1
- package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
- 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/countdown-timer/components/Countdown.liquid.js +21 -20
- package/dist/esm/estimate-delivery/common/helpers.js +1 -1
- package/dist/esm/grid/components/row/Row.liquid.js +16 -11
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +12 -12
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +3 -3
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
- package/dist/esm/image/components/Image.liquid.js +10 -10
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +12 -12
- 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/marquee/components/Marquee.liquid.js +21 -21
- package/dist/esm/post-purchase/product/components/ProductTitle.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
- package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
- package/dist/esm/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/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
- package/dist/esm/product/components/product-badge/common/classes.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +8 -7
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +7 -6
- 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.liquid.js +8 -8
- 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 +5 -5
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/ProductImageV3.js +2 -2
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +22 -22
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
- package/dist/esm/product/components/product-images-v3/common/classes.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/common/getBorderActiveCss.js +2 -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/ProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -2
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +45 -45
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
- package/dist/esm/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.liquid.js +18 -17
- package/dist/esm/product/components/product-list/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 +18 -17
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +9 -9
- 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-price/ProductPrice.liquid.js +3 -3
- 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/OptionVariantsNewFormat.liquid.js +11 -12
- package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +44 -44
- package/dist/esm/product/components/product-wrap/Product.liquid.js +18 -15
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/sticky/components/Sticky.liquid.js +11 -12
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/tab/components/Tabs.liquid.js +12 -11
- package/dist/esm/text/components/Text.liquid.js +3 -3
- 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/configs/AppstleLoyaltyRewardProgram.js +1 -0
- 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/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +16 -15
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +11 -10
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +39 -13
- package/package.json +5 -5
|
@@ -2,6 +2,16 @@ import{template as e}from"@gem-sdk/core";import{Liquid as s,LiquidIf as i}from"@
|
|
|
2
2
|
${s("{%- assign optionRendered = false -%}")}
|
|
3
3
|
${s("{%- assign swatches = shop.metafields.GEMPAGES.swatchesJSONFormat.value -%}")}
|
|
4
4
|
|
|
5
|
+
${s(`{%- assign variantPresetString = "${r}" -%}
|
|
6
|
+
{%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
|
|
7
|
+
{%- assign items = variantPresetString | split: '($2)' -%}
|
|
8
|
+
{%- assign type = 'dropdown' -%}
|
|
9
|
+
{% for item in items %}
|
|
10
|
+
{%- assign itemPreset = item | split: '($1)' -%}
|
|
11
|
+
{% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
|
|
12
|
+
{% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
|
|
13
|
+
{% endfor %}`)}
|
|
14
|
+
|
|
5
15
|
${s(`{% for swatch in swatches %}
|
|
6
16
|
{%- assign optionTitle = swatch.optionTitle -%}
|
|
7
17
|
{%- assign optionType = swatch.optionType -%}
|
|
@@ -21,21 +31,10 @@ import{template as e}from"@gem-sdk/core";import{Liquid as s,LiquidIf as i}from"@
|
|
|
21
31
|
{%- assign imageUrls = imageUrlsString | split: '${n}' | slice: 0, imageUrlsString.size -%}
|
|
22
32
|
|
|
23
33
|
{% if optionTitle == option.name %}
|
|
24
|
-
{%- assign variantPresetString = "${r}" -%}
|
|
25
|
-
{%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
|
|
26
|
-
{%- assign items = variantPresetString | split: '($2)' -%}
|
|
27
|
-
{%- assign type = 'dropdown' -%}
|
|
28
|
-
|
|
29
|
-
{% for item in items %}
|
|
30
|
-
{%- assign itemPreset = item | split: '($1)' -%}
|
|
31
|
-
{% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
|
|
32
|
-
{% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
|
|
33
|
-
{% endfor %}
|
|
34
34
|
{%- assign optionRendered = true -%}
|
|
35
|
-
|
|
36
35
|
${o({showDropdown:!0})}
|
|
37
36
|
{% endif %}
|
|
38
37
|
{% endfor %}`)}
|
|
39
38
|
|
|
40
|
-
${i("optionRendered == false",o({showDropdown:!
|
|
39
|
+
${i("optionRendered == false",o({showDropdown:!0,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
41
40
|
`};export{t as renderOptionValuesNewFormatSwatches};
|
|
@@ -3,6 +3,16 @@ import{Liquid as e,LiquidFor as s,LiquidIf as t}from"@gem-sdk/system";import{tem
|
|
|
3
3
|
${e("{%- assign swatches = shop.metafields.GEMPAGES.swatches -%}")}
|
|
4
4
|
${e("{%- assign swatchesItems = swatches | split: '($1)' -%}")}
|
|
5
5
|
|
|
6
|
+
${e(`{%- assign variantPresetString = "${o}" -%}
|
|
7
|
+
{%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
|
|
8
|
+
{%- assign items = variantPresetString | split: '($2)' -%}
|
|
9
|
+
{%- assign type = 'dropdown' -%}
|
|
10
|
+
{% for item in items %}
|
|
11
|
+
{%- assign itemPreset = item | split: '($1)' -%}
|
|
12
|
+
{% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
|
|
13
|
+
{% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
|
|
14
|
+
{% endfor %}`)}
|
|
15
|
+
|
|
6
16
|
${s("swatchesItem in swatchesItems",`
|
|
7
17
|
${e('{%- assign colorArraysString = "" -%}')}
|
|
8
18
|
${e('{%- assign labelsString = "" -%}')}
|
|
@@ -48,19 +58,10 @@ import{Liquid as e,LiquidFor as s,LiquidIf as t}from"@gem-sdk/system";import{tem
|
|
|
48
58
|
${e("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
|
|
49
59
|
|
|
50
60
|
${t("optionTitle == option.name",`
|
|
51
|
-
${e(`{%- assign variantPresetString = "${o}" -%}`)}
|
|
52
|
-
${e('{%- assign optionName = option.name | replace: "\'", "'" | replace: \'"\', """ -%}')}
|
|
53
|
-
${e("{%- assign items = variantPresetString | split:'($2)' -%}")}
|
|
54
|
-
${e("{%- assign type = 'dropdown' -%}")}
|
|
55
|
-
${s("item in items",`
|
|
56
|
-
${e("{%- assign itemPreset = item | split:'($1)' -%}")}
|
|
57
|
-
${t("itemPreset[0] == optionName",e("{%- assign type = itemPreset[1] -%}"))}
|
|
58
|
-
${t('itemPreset[0] == "base"',e("{%- assign type = itemPreset[1] -%}"))}
|
|
59
|
-
`)}
|
|
60
61
|
${e("{%- assign optionRendered = true -%}")}
|
|
61
62
|
${n({showDropdown:!0})}
|
|
62
63
|
`)}
|
|
63
64
|
`)}
|
|
64
65
|
|
|
65
|
-
${t("optionRendered == false",n({showDropdown:!
|
|
66
|
+
${t("optionRendered == false",n({showDropdown:!0,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
66
67
|
`};export{a as renderOptionValuesOld};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import{template as
|
|
2
|
-
${f("value in values",
|
|
3
|
-
${$(
|
|
1
|
+
import{template as t,baseAssetURL as e,isLocalEnv as i,DEVICES as o,getResponsiveValueByScreen as s}from"@gem-sdk/core";import n from"../../../text/components/Text.liquid.js";import a from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as $,If as g}from"@gem-sdk/system";import{getAttrs as _}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as b,getDropdownGroupData as S}from"./common/main/getData.js";import{getWrapVariantOptionClass as P}from"./common/variants/classes.js";import{getStyleOfObject as O}from"../../helpers/function.js";import{getMarginBottomStyle as x}from"./common/variants/styles.js";import{PRODUCT_VARIANT_OPTION_MINW_STYLE as V}from"./common/const.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as A}from"./OptionVariantsOldFormat.liquid.js";let q={desktop:!0,tablet:!0,mobile:!0},D=D=>{let{builderProps:E,styles:T,setting:k,advanced:F}=D,{align:G,swatchItemWidth:z,dropdownItemWidth:C,swatchSpacing:J,optionTypo:I,marginBottom:M}=T??{},{label:W,optionType:L,showAsSwatches:R,layout:H,hasPreSelected:K}=k??{},Q=F?.d??q,{uid:U}=E??{},B=()=>{let t={};return o.forEach(e=>{let i=s(z,e);t[e]="auto"===i}),t},X=()=>{let t={};return o.forEach(e=>{t[e]=C?.[e]==="fill"}),t},Y=k?.variantPresets?d(k?.variantPresets,T):[],Z=Y?.map(t=>(t.presets={[t.optionType]:t.presets[t.optionType]},t)),tt={...k,variantPresets:Z},te=t=>{let e={"'":"'",'"':"""},i=t;for(let o in e)t.indexOf(o)>=0&&(i=i.replaceAll(o,e[o]));return i},ti=({showDropdown:e,isRenderDefault:i,typeOfOption:o})=>t`
|
|
2
|
+
${f("value in values",a({id:"{{option.name | escape | handleize}}-{{value | escape | handleize}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:R,uid:U,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:K?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:o,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...tt,swatchAutoWidth:B(),optionTypo:I,isRenderDefault:i}))}
|
|
3
|
+
${$(e?'type == "dropdown"':"false",r({...T,...tt,swatchAutoWidth:X(),optionTypo:I}))}`,to=k?.variantPresets?.map(t=>({name:te(t.optionName),type:t.optionType})).map(t=>`${t.name}($1)${t.type}`).join("($2)").toString(),ts={renderVariantItem:ti,variantPresetsLiquid:to??""},tn=m(j(G)),ta=c(h(J,J)),tr=b(D,"Liquid"),tp=m(P(H,G)),tl=m(w(G)),td=S(D),tm=u(_({uid:U,hasPreSelected:K,cssClass:F?.cssClass})),tc=c(y(D)),tu=m({"gp-flex gp-flex-col !gp-ml-0":!0});return t`
|
|
4
4
|
${v("{%- assign total_combinations = 1 -%}")}
|
|
5
5
|
${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
6
|
-
<gp-product-variants
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
<gp-product-variants ${tm}>
|
|
7
|
+
<script gp-data type="application/json">
|
|
8
|
+
{
|
|
9
|
+
"setting":${JSON.stringify(tt)?.replaceAll("'","'")},
|
|
10
|
+
"styles":${JSON.stringify(T)},
|
|
11
|
+
"variants":{{product.variants | json}},
|
|
12
|
+
"optionsWithValues": {{product.options_with_values | json}},
|
|
13
|
+
"variantSelected": {{ variant | json }},
|
|
14
|
+
"variantInventoryQuantity": {{product.variants | map: 'inventory_quantity' | json }},
|
|
15
|
+
"variantInventoryPolicy": {{product.variants | map: 'inventory_policy' | json }},
|
|
16
|
+
"moneyFormat": {{shop.money_format | json }},
|
|
17
|
+
"productId": {{product.id | json }},
|
|
18
|
+
"productUrl": {{product.url | json }},
|
|
19
|
+
"productHandle": {{product.handle | json }},
|
|
20
|
+
"displayState": ${JSON.stringify(Q)},
|
|
21
|
+
"totalVariantCombinations": {{total_combinations}},
|
|
22
|
+
"firstAvailableVariant": {{product.selected_or_first_available_variant | json }}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
25
|
<div class="gp-hidden" style="--hvr-shadow: none; --hvr-shadow-tablet: none; --hvr-shadow-mobile: none"></div>
|
|
26
26
|
${v("{%- assign options = product.options_with_values -%}")}
|
|
27
27
|
${v("{%- assign variants = product.variants -%}")}
|
|
28
|
-
${$("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",
|
|
29
|
-
class="${
|
|
30
|
-
style="${
|
|
28
|
+
${$("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",t`<div
|
|
29
|
+
class="${tu}"
|
|
30
|
+
style="${tc}"
|
|
31
31
|
>
|
|
32
32
|
${g("groupOption"===L,`
|
|
33
|
-
<div className="${
|
|
34
|
-
${p(
|
|
33
|
+
<div className="${tl}">
|
|
34
|
+
${p(td)}
|
|
35
35
|
</div>
|
|
36
|
-
`,
|
|
37
|
-
${v(`{%- assign presets = "${k?.variantPresets?.map(
|
|
38
|
-
${v(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(
|
|
39
|
-
|
|
36
|
+
`,t`
|
|
37
|
+
${v(`{%- assign presets = "${k?.variantPresets?.map(t=>`${te(t.optionName)}($2)${t.optionType}`).join("($1)")}" | split: '($1)' -%}`)}
|
|
38
|
+
${v(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(t=>!!t?.hide)?.map(t=>t.optionName).join(",")}" | split: ',' %}`)}
|
|
39
|
+
|
|
40
40
|
${v(`{% assign all_option_names = options | map: 'name' %}
|
|
41
41
|
{% assign filtered_options_string = '' %}
|
|
42
42
|
{% assign delimiter = '||' %}
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
{% for item_name in all_option_names %}
|
|
45
45
|
{% assign is_excluded = false %}
|
|
46
46
|
{% for exclude_name in hiddenPresetOptions %}
|
|
@@ -48,7 +48,7 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
48
48
|
{% assign is_excluded = true %}
|
|
49
49
|
{% endif %}
|
|
50
50
|
{% endfor %}
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
{% unless is_excluded %}
|
|
53
53
|
{% if filtered_options_string == '' %}
|
|
54
54
|
{% assign filtered_options_string = item_name %}
|
|
@@ -57,15 +57,15 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
57
57
|
{% endif %}
|
|
58
58
|
{% endunless %}
|
|
59
59
|
{% endfor %}
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
{% assign filtered_options_array = filtered_options_string | split: delimiter %}`)}
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
${v("{% assign last_option_name = filtered_options_array | last %}")}
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
${f("option in options",`
|
|
66
66
|
<div
|
|
67
67
|
option-name="{{option.name | escape}}"
|
|
68
|
-
class="${
|
|
68
|
+
class="${tp} ${$("hiddenPresetOptions contains option.name","gp-hidden")}"
|
|
69
69
|
style="${O(x(M))}${V}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
|
|
70
70
|
>
|
|
71
71
|
${v("{%- assign showVariantClass = 'variant-display' -%}")}
|
|
@@ -74,11 +74,11 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
74
74
|
${v("{%- assign presetDetail = preset | split: '($2)' -%}")}
|
|
75
75
|
${$("presetDetail[1] == 'dropdown' and presetDetail[0] == optionName",`${v("{%- assign showVariantClass = '' -%}")} ${v("{%- break -%}")}`)}
|
|
76
76
|
`)}
|
|
77
|
-
${g(W,
|
|
77
|
+
${g(W,n(tr)," ")}
|
|
78
78
|
<div
|
|
79
79
|
variant-option-name="{{option.name | escape}}"
|
|
80
|
-
class="${
|
|
81
|
-
style="${O(
|
|
80
|
+
class="${tn}"
|
|
81
|
+
style="${O(ta)}"
|
|
82
82
|
>
|
|
83
83
|
${v("{%- assign values = option.values -%}")}
|
|
84
84
|
${v("{%- assign rootForloop = forloop.index0 -%}")}
|
|
@@ -92,14 +92,14 @@ import{template as e,baseAssetURL as t,isLocalEnv as o,DEVICES as i,getResponsiv
|
|
|
92
92
|
{%- endif -%}
|
|
93
93
|
`)}
|
|
94
94
|
${g(!K,v("{%- assign selectedValue = null -%}"),"")}
|
|
95
|
-
${g(R,
|
|
96
|
-
${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(
|
|
97
|
-
`,
|
|
95
|
+
${g(R,t`
|
|
96
|
+
${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ts),A(ts))}
|
|
97
|
+
`,ti({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
98
98
|
</div>
|
|
99
99
|
</div>`)}
|
|
100
100
|
`)}
|
|
101
101
|
</div>`)}
|
|
102
102
|
</gp-product-variants>
|
|
103
103
|
|
|
104
|
-
${(()=>{let
|
|
104
|
+
${(()=>{let t=i?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
|
|
105
105
|
`};export{D as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import
|
|
1
|
+
import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import o from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as a,If as d}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as l,STATIC_PRODUCT_STATUS as p,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let f=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:S,productSetting:h}=g??{},j=h?.hasPreSelected??!1,{rowSetting:I,rowStyles:b,formatVariantId:P,formatProductId:q,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f);return r`
|
|
2
2
|
${r`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${
|
|
4
|
+
${d(V==l,r`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${w}']
|
|
8
|
-
assign productId = '${
|
|
8
|
+
assign productId = '${q}' | times: 1
|
|
9
9
|
if product == empty or product == null
|
|
10
10
|
paginate collections.all.products by 100000
|
|
11
11
|
for item in collections.all.products
|
|
@@ -20,14 +20,14 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
20
20
|
`,r`
|
|
21
21
|
{%- liquid
|
|
22
22
|
if request.page_type == 'product'
|
|
23
|
-
if '${V}' == '${
|
|
24
|
-
if '${
|
|
23
|
+
if '${V}' == '${p}'
|
|
24
|
+
if '${q}' == '${u}'
|
|
25
25
|
paginate collections.all.products by 100000
|
|
26
26
|
assign product = collections.all.products | sort: 'created_at' | reverse | first
|
|
27
27
|
endpaginate
|
|
28
28
|
else
|
|
29
29
|
assign product = all_products['${w}']
|
|
30
|
-
assign productId = '${
|
|
30
|
+
assign productId = '${q}' | times: 1
|
|
31
31
|
if product == empty or product == null
|
|
32
32
|
paginate collections.all.products by 100000
|
|
33
33
|
for item in collections.all.products
|
|
@@ -40,13 +40,13 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
40
40
|
endif
|
|
41
41
|
endif
|
|
42
42
|
else
|
|
43
|
-
if '${
|
|
43
|
+
if '${q}' == '${u}'
|
|
44
44
|
paginate collections.all.products by 100000
|
|
45
45
|
assign product = collections.all.products | sort: 'created_at'| reverse | first
|
|
46
46
|
endpaginate
|
|
47
47
|
else
|
|
48
48
|
assign product = all_products['${w}']
|
|
49
|
-
assign productId = '${
|
|
49
|
+
assign productId = '${q}' | times: 1
|
|
50
50
|
if product == empty or product == null
|
|
51
51
|
paginate collections.all.products by 100000
|
|
52
52
|
for item in collections.all.products
|
|
@@ -61,33 +61,36 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
61
61
|
-%}
|
|
62
62
|
`)}
|
|
63
63
|
`}
|
|
64
|
-
${
|
|
64
|
+
${a("product != empty and product != null",r`
|
|
65
65
|
${r`
|
|
66
|
-
{%- assign initVariantId = ${
|
|
66
|
+
{%- assign initVariantId = ${P} -%}
|
|
67
67
|
{%- assign product_form_id = 'product-form-' | append: "${v?.uid}" -%}
|
|
68
|
-
${
|
|
69
|
-
${
|
|
68
|
+
${P?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
|
|
69
|
+
${P?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
|
|
70
70
|
{%-if productSelectedVariant == empty or productSelectedVariant == null -%}
|
|
71
71
|
{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
|
|
72
72
|
{%- endif -%}
|
|
73
73
|
{%-if variant == empty or variant == null -%}
|
|
74
74
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
75
75
|
{%- endif -%}
|
|
76
|
+
{% unless isSettingSameHeightProductList %}
|
|
77
|
+
{%- assign isSettingSameHeightProductList = false -%}
|
|
78
|
+
{% endunless %}
|
|
76
79
|
`}
|
|
77
80
|
<gp-product
|
|
78
81
|
data-uid="${v?.uid}"
|
|
79
82
|
data-id="${v?.uid}"
|
|
80
83
|
style="${E}"
|
|
81
84
|
class="${$?.cssClass}"
|
|
82
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${
|
|
83
|
-
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }}}'
|
|
85
|
+
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${j}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
84
86
|
>
|
|
87
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }}}</script>
|
|
85
88
|
<product-form class="product-form">
|
|
86
89
|
{%- form 'product', product, id: product_form_id, class: 'form contents', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
87
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
88
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
89
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
90
|
-
${
|
|
93
|
+
${o({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:b,setting:I,children:m,rawChildren:_})}
|
|
91
94
|
{%- endform -%}
|
|
92
95
|
</product-form>
|
|
93
96
|
</gp-product>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import m from"./settings/ProductImages.js";import c from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import
|
|
1
|
+
export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../carousel-v3/components/swiper/Swiper.js";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import m from"./settings/ProductImages.js";import c from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import p from"./settings/ProductDescription.js";import u from"./settings/ProductProperties.js";import d from"./settings/ProductTag.js";import a from"./settings/ProductListV3.js";import P from"./settings/ProductList.js";import g from"./settings/DynamicCheckout.js";import j from"./settings/Vendor.js";import f from"./settings/Sku.js";import l from"./components/product-bundle/setting/ProductBundleDiscount.js";import V from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import k from"./settings/ProductViewMore.js";import x from"./settings/ProductBadge.js";import b from"./components/file-upload/settings/index.js";let v={Product:t,ProductQuantity:o,ProductTitle:r,ProductButton:s,ProductPrice:i,ProductVariants:e,ProductImages:m,ProductImagesV2:n,ProductImagesV3:c,ProductDescription:p,ProductProperties:u,ProductTag:d,ProductListV3:a,ProductList:P,DynamicCheckout:g,ProductVendor:j,ProductSku:f,ProductBundleDiscount:l,ProductBundleDiscountItem:V,ProductViewMore:k,ProductBadge:x,FileUpload:b};export{v as productSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ImageListNavigation as i}from"./ui/ImageListNavigation.js";import{FeatureNavigation as o}from"./ui/FeatureNavigation.js";import{FeatureDots as
|
|
1
|
+
import{ImageListNavigation as i}from"./ui/ImageListNavigation.js";import{FeatureNavigation as o}from"./ui/FeatureNavigation.js";import{FeatureDots as t}from"./ui/FeatureDots.js";let e='((type == "slider" || position == "left" || position == "right") && position !== "one-col" && position != "two-col")',n='(["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position))',l=[{label:"Layout",controls:[{layout:"vertical",setting:{id:"position"},options:{isComboLayout:!0},controls:[{label:"Ratio",type:"control",setting:{id:"ratioLayout"},layout:"vertical",conditionDisplay:'position == "left"'},{label:"Ratio",type:"control",setting:{id:"ratioLayoutRight"},layout:"vertical",conditionDisplay:'position == "right"'}]}]},{label:"Featured image",conditionDisplay:n,controls:[{setting:{id:"ftShape"},hiddenOnMobile:!0,layout:"vertical",controlChangeTrigger:{settings:[{condition:"ftShape.shape === 'original'",source:["ftShape"],action:{controlId:"ftLayout",newValue:"contain",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}},{conditionDisplay:"ftShape.shape !== 'original'",label:"Image scale",setting:{id:"ftLayout"}},{...t,hiddenOnMobile:!0,conditionDisplay:`${n} && position === "only-feature"`},{...o,hiddenOnMobile:!0,conditionDisplay:`${n}`}],moreSettings:{type:"collapse",controls:[{label:"Corner",setting:{id:"ftCorner"},hiddenOnMobile:!0},{type:"combo",label:"Hover action",conditionDisplay:n,iconName:"gp-trigger-action-hover",getValueFromSettingID:"hoverEffect",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"zoom",hiddenOnMobile:!0,controls:[{label:"When hover",setting:{id:"hoverEffect"}},{label:"Zoom type",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoomType"}},{label:"Zoom value",conditionDisplay:'hoverEffect == "zoom"',setting:{id:"zoom"}},{label:"Other image",conditionDisplay:'hoverEffect == "other"',setting:{id:"otherImage"}}]},{type:"combo",label:"Click action",hiddenOnMobile:!0,iconName:"gp-trigger-action-click",conditionDisplay:n,getValueFromSettingID:"ftClickOpenLightBox",isShowSettingTitle:!0,defaultValueWhenClear:"none",compoDefaultValue:"popup",controls:[{label:"After click",setting:{id:"ftClickOpenLightBox"}},{label:"Open new tab",setting:{id:"ftClickOpenNewTab"},conditionDisplay:'ftClickOpenLightBox === "product-link"'}]},{type:"control",label:"Slide speed",setting:{id:"ftAnimationSpeed"}},{type:"control",label:"Animation",setting:{id:"ftAnimationMode"}},{label:"Drag / swipe",setting:{id:"ftDragToScroll"}},{label:"Infinity loop",setting:{id:"ftLoop"}}]}},{label:"Image list",conditionDisplay:'(position !== "only-feature")',controls:[{label:"Display",hiddenOnMobile:!0,conditionDisplay:'position === "bottom-center" || position === "bottom-left" || position === "inside-bottom"',setting:{id:"type"}},{setting:{id:"shape"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["left", "right"].includes(position)'},{setting:{id:"shapeForBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["bottom-left", "bottom-center"].includes(position)'},{setting:{id:"shapeForInsideBottom"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-bottom"].includes(position)'},{setting:{id:"shapeForInside"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'["inside-left", "inside-right"].includes(position)'},{setting:{id:"shapeForFtOnly"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "only-feature"'},{setting:{id:"shapeFor2Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "two-col"'},{setting:{id:"shapeFor1Col"},hiddenOnMobile:!0,layout:"vertical",conditionDisplay:'position == "one-col"'},{label:"Image gap",setting:{id:"itemSpacing"}},{conditionDisplay:"(position == 'one-col' && shapeFor1Col.shape !== 'original') || (position == 'two-col' && shapeFor2Col.shape !== 'original') || (position == 'only-feature' && shapeForFtOnly.shape !== 'original') || ([\"inside-left\", \"inside-right\"].includes(position) && shapeForInside.shape !== 'original') || ([\"inside-bottom\"].includes(position) && shapeForInsideBottom.shape !== 'original') || ([\"bottom-left\", \"bottom-center\"].includes(position) && shapeForBottom.shape !== 'original') || ([\"left\", \"right\"].includes(position) && shape.shape !== 'original')",label:"Image scale",setting:{id:"layout"}},{...i,hiddenOnMobile:!0,conditionDisplay:e}],moreSettings:{type:"collapse",controls:[{label:"Corner",hiddenOnMobile:!0,setting:{id:"corner"}},{label:"Active border",hiddenOnMobile:!0,conditionDisplay:'!["one-col", "two-col"].includes(position)',setting:{id:"borderActive"}},{type:"combo",label:"Hover action",conditionDisplay:'(position == "one-col" || position == "two-col")',iconName:"gp-trigger-action-hover",getValueFromSettingID:"galleryHoverEffect",defaultValueWhenClear:"none",hiddenOnMobile:!0,compoDefaultValue:"zoom",controls:[{label:"When hover",setting:{id:"galleryHoverEffect"},conditionDisplay:'galleryHoverEffect == "none"'},{label:"Zoom type",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoomType"}},{label:"Zoom value",conditionDisplay:'galleryHoverEffect == "zoom"',setting:{id:"galleryZoom"}},{label:"Other image",conditionDisplay:'galleryHoverEffect == "other"',setting:{id:"otherImage"}}]},{label:"Click action",setting:{id:"clickOpenLightBox"}},{conditionDisplay:e,label:"Drag / swipe",setting:{id:"dragToScroll"}},{conditionDisplay:e,label:"Infinity loop",setting:{id:"loop"}}]}},{label:"Item spacing",hiddenOnMobile:!0,conditionDisplay:'["bottom-center", "left", "right", "inside-bottom", "inside-left", "inside-right"].includes(position)',controls:[{label:"Gap",setting:{id:"spacing"}}]},{label:"Display condition",controls:[{conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',label:"Default item",setting:{id:"preDisplay"}},{label:"Image list",setting:{id:"filterByVariant"}}],messageConfig:{type:"info",message:'Image list can display based on the selected variants. <a class="text-white" target="_blank" href="https://gempages.co/display-selected-variant">How to setup</a>'}},{label:"Optimize LCP",controls:[{label:"Preload",conditionDisplay:'["bottom-center", "left", "right", "only-feature", "inside-bottom", "inside-left", "inside-right"].includes(position)',setting:{id:"preload"}},{label:"Quality",setting:{id:"qualityType"},conditionDisplay:'preload === false || (preload === true && (position === "one-col" || position === "two-col"))'},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom" && (preload === false || (preload === true && (position === "one-col" || position === "two-col")))',setting:{id:"qualityPercent"}}]},{hiddenOnMobile:!0,controls:[{label:"Align",setting:{id:"align"},options:{labelVariant:"primary"}}]}];export{l as SettingUIV2};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import{makeStyleResponsive as
|
|
1
|
+
import{makeStyleResponsive as s,RenderIf as e,isLocalEnv as t,baseAssetURL as i,template as r}from"@gem-sdk/core";import{getSettingPreloadData as a}from"../../helpers.js";import{createStyle as l,createClass as d,createStateOrContext as o}from"@gem-sdk/system";import{getContainerStyles as p,getContentStyles as m}from"../common/styles.js";import{getContainerClasses as c}from"../common/classes.js";let n=({children:n,builderAttrs:g,setting:$,style:k,builderProps:y,advanced:f,pageContext:u})=>{let{width:b,position:v,display:S,preloadBgImage:j,background:h,isScrollToTop:E}=$??{},w=f?.d,C=l({...s("w",b),...p({position:v,display:S})}),q=l(m({setting:$,style:k,uid:y?.uid,pageContext:u??{},type:"Liquid"})),x=d(c({uid:y?.uid,isScrollToTop:E,cssClass:f?.cssClass,isLiquid:!0})),A=o({uid:y?.uid,setting:{display:{desktop:S?.desktop,tablet:S?.tablet??S?.desktop,mobile:S?.mobile??S?.tablet??S?.desktop}},advanced:{d:w}}),G=`.drawer-page-content {
|
|
2
2
|
transform: none !important;
|
|
3
3
|
-webkit-transform: none !important;
|
|
4
|
-
}`;return
|
|
5
|
-
${
|
|
4
|
+
}`;return r`
|
|
5
|
+
${e(!!j,`${e(!!h?.desktop?.image?.src,`<link rel="preload" href="${h?.desktop?.image?.src}" as="image" />`)}${e(!!h?.tablet?.image?.src,`<link rel="preload" href="${h?.tablet?.image?.src}" as="image" />`)}${e(!!h?.mobile?.image?.src,`<link rel="preload" href="${h?.mobile?.image?.src}" as="image" />`)}`)}
|
|
6
6
|
<gp-sticky
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
data-id="${f?.uid}"
|
|
11
|
-
class="${x} ${r("gps-lazy")}"
|
|
7
|
+
id="${y?.uid}"
|
|
8
|
+
data-id="${y?.uid}"
|
|
9
|
+
class="${x} ${a("gps-lazy")}"
|
|
12
10
|
style="${C}"
|
|
13
11
|
>
|
|
12
|
+
<script gp-data type="application/json">${JSON.stringify(A)}</script>
|
|
14
13
|
<style>${G}</style>
|
|
15
|
-
<div ${{...
|
|
16
|
-
${
|
|
14
|
+
<div ${{...g}} style="${{...q}}">
|
|
15
|
+
${n}
|
|
17
16
|
</div>
|
|
18
17
|
</gp-sticky>
|
|
19
|
-
${
|
|
20
|
-
`};export{
|
|
18
|
+
${e(t,`<script ${a('class="gps-link" delay',"src")}="{{ 'gp-sticky-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${a('class="gps-link" delay',"src")}="${i}/assets-v2/gp-sticky-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
19
|
+
`};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as t,usePageStore as e,useCurrentDevice as o}from"@gem-sdk/core";import{useMemo as
|
|
1
|
+
import{makeStyleResponsive as t,usePageStore as e,useCurrentDevice as o,useStickyStore as l}from"@gem-sdk/core";import{useState as b,useMemo as i,useEffect as s}from"react";let p=p=>{let{width:r,position:a}=p??{},{desktop:d,tablet:n,mobile:m}=p?.display||{},k=t("w",r),u=e(t=>"interaction"===t.sidebarMode),c=o(),[f,x]=b(!1),$=l(t=>t.getFirstVisibleElement(c)),g=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),y=i(()=>({...g(a?.desktop,""),...g(a?.tablet??a?.desktop,"-tablet"),...g(a?.mobile??a?.tablet??a?.desktop,"-mobile")}),[a?.desktop,a?.mobile,a?.tablet]),v=i(()=>{if(u&&a?.[c]==="top")return"40px"},[c,u,a]),w=i(()=>{let t=t=>"after-first-cart-button"!==t||f?"block":"none";return{"--d":t(d),"--d-tablet":t(n??d),"--d-mobile":t(m??n??d)}},[d,n,m,f]),I=i(()=>({"--top":v??"auto","--top-tablet":v??"auto","--top-mobile":v??"auto",[`--${a?.desktop}`]:v??"0px",[`--${a?.tablet??a?.desktop}-tablet`]:v??"0px",[`--${a?.mobile??a?.tablet??a?.desktop}-mobile`]:v??"0px"}),[v,a?.desktop,a?.mobile,a?.tablet]),C=t=>"top"==t?"sticky":"fixed",E=i(()=>({"--pos":C(a?.desktop),"--pos-tablet":C(a?.tablet??a?.desktop),"--pos-mobile":C(a?.mobile??a?.tablet??a?.desktop)}),[a?.desktop,a?.mobile,a?.tablet]);return s(()=>{if(!$)return;let t=new IntersectionObserver(([t])=>{t&&x(t.isIntersecting||t.boundingClientRect.top<=0)});return t.observe($),()=>t.disconnect()},[$]),s(()=>{x(!1)},[c]),{w:k,displayStyle:I,positionStyle:E,getCSSAlign:y,makeDisplaySettingStyles:w}};export{p as default};
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import{template as
|
|
1
|
+
import{template as t,WrapRenderChildren as e,RenderChildren as s,RenderIf as i,isLocalEnv as l,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as r,createSettingId as d,getSettingPreloadData as o}from"../../helpers.js";import{createStateOrContext as p,createAttr as c,createStyle as m,createClass as n}from"@gem-sdk/system";import{getAttr as y,getAttrContent as u}from"../common/attrs.js";import $ from"../../text/components/Text.liquid.js";import{Tabs as g}from"../settings/configs/translate.js";import{getStyleWrapper as v,getTabParentListStyle as f,getTabListStyle as h,getContainContentStyle as x,getItemStyle as b}from"../common/styles.js";import{getClassesWrapper as j,getContainClasses as C,getStyleTagClasses as S,getTabParentListClasses as T,getTabListClasses as k,getWrapperContentClasses as A,getContainContentClasses as I,getTextClasses as K,getItemClasses as E}from"../common/classes.js";let N=N=>{let{builderProps:V,style:q,setting:P,advanced:z,rawChildren:F}=N;delete P?.labelTypoV2?.attrs?.color;let{cssClass:G}=z??{},{panelWidth:L,childItem:O,labelAlign:W,labelTypo:_,labelTypoV2:J}=P??{},M=p({setting:P,builderProps:V}),R=void 0;P&&!P?.labelWidth&&(P.labelWidth={desktop:"200px"});let U=c({...y({uid:V?.uid||""})}),w=m({...v({setting:P,style:q,uid:V?.uid,pageContext:N.pageContext??{},type:"Liquid"})}),B=n({...j({builderProps:V,advancedCssClass:G})}),D=n({...C({setting:P})}),H=S({panelWidth:L,builderProps:V}),Q=n({...T()}),X=m({...f(P)}),Y=n({...k({setting:P})}),Z=m({...h(P)}),tt=t=>n({...E({setting:P,isNotLiquid:!1,isActive:t,currentDevice:R})}),te=t=>m({...b(P,t)}),ts=n({...A()}),ti=n({...I()}),tl=m({...x()}),ta=c({...u({uid:V?.uid||""})}),tr=n({...K()});return t`
|
|
2
2
|
<gp-tab
|
|
3
3
|
${{...U}}
|
|
4
4
|
style="${w}"
|
|
5
5
|
class="${B}"
|
|
6
|
-
|
|
6
|
+
>
|
|
7
|
+
<script gp-data type="application/json">${JSON.stringify(M)?.replaceAll("'","'")}</script>
|
|
7
8
|
<style>${H}</style>
|
|
8
9
|
<div class="${D}">
|
|
9
10
|
<div class="${Q}" style="${X}">
|
|
10
11
|
<ul class="${Y}" style="${Z}">
|
|
11
|
-
${O?.map(
|
|
12
|
+
${O?.map(t=>t?.replaceAll("'","'"))?.map((e,s)=>{let i=(P?.activeKey??0)<0||(P?.activeKey??0)>=(P?.childItem??[]).length?0===s:s===P?.activeKey,l=r({val:e,uid:V?.uid,settingId:d({id:g?.childItem?.id,index:s}),pageContext:N.pageContext??{},isCapitalize:P?.labelTypoV2?.attrs?.transform==="capitalize"});return t`
|
|
12
13
|
<li
|
|
13
14
|
aria-hidden
|
|
14
|
-
class="${
|
|
15
|
-
style="${
|
|
15
|
+
class="${tt(i)}"
|
|
16
|
+
style="${te(i)}"
|
|
16
17
|
key="${V?.uid}"
|
|
17
18
|
|
|
18
19
|
>
|
|
19
|
-
${$({className:
|
|
20
|
+
${$({className:tr,styles:{typo:J,typography:_,textAlign:W},setting:{text:l,htmlTag:"div",excludeFlex:!0,isForceValue:!0},translateSetting:g?.childItem?.id})}
|
|
20
21
|
</li>
|
|
21
22
|
`}).join("")}
|
|
22
23
|
</ul>
|
|
23
24
|
</div>
|
|
24
|
-
<div class="${
|
|
25
|
+
<div class="${ts}">
|
|
25
26
|
<div
|
|
26
|
-
${{...
|
|
27
|
-
class="${
|
|
28
|
-
style="${
|
|
27
|
+
${{...ta}}
|
|
28
|
+
class="${ti}"
|
|
29
|
+
style="${tl}"
|
|
29
30
|
>
|
|
30
|
-
${
|
|
31
|
+
${e({uid:V?.uid||"",customProps:F?.[0].customProps},F?.map((e,i)=>{let l=(P?.activeKey??0)<0||(P?.activeKey??0)>=(P?.childItem??[]).length?0===i:i===P?.activeKey;return e?t`${s({...e,parentUid:V?.uid,isActive:l})}`:""}))}
|
|
31
32
|
</div>
|
|
32
33
|
</div>
|
|
33
34
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import{template as t}from"@gem-sdk/core";import{createAttr as o,createStyle as e,createClass as s,createContent as i}from"@gem-sdk/system";import{getAttr as r,getTextAttr as m}from"../common/attrs.js";import{getStyle as l,getContainerStyle as p,getTextStyle as n}from"../common/styles.js";import{getClasses as a,getTextClasses as d}from"../common/classes.js";import{getDisplayText as c}from"../common/helpers.js";let $=({id:$,styles:g,builderAttrs:u,style:f,setting:y,advanced:x,builderProps:j,className:v,isText:q,pageContext:h,translateSetting:k,elementAttrs:C})=>{let{htmlTag:L="div",excludeFlex:T}=y??{},I=o({...$&&{id:$},...r({uid:j?.uidInteraction??j?.uid??""}),...u}),O=o({...m(),...C}),_=e({...l(g,f)}),b=e({...p(g,y)}),w=e({...n({styles:g,setting:y,builderProps:j,pageContext:h??{},type:"Liquid"})}),z=s({...a({setting:y,advanced:x,builderProps:j})}),A=s({"gp-flex":!T}),B=s({...d({styles:g,setting:y,className:v}),...q&&{"gp-text":!0}}),D=c({type:"Liquid",styles:g,setting:y,builderProps:j,pageContext:h??{},translateSetting:k}),E=i(D);return t`
|
|
2
2
|
{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
|
|
3
3
|
<div ${{...I}}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
class="${z}"
|
|
5
|
+
style="${_}"
|
|
6
|
+
>
|
|
7
7
|
<div class="${A}" style="${b}">
|
|
8
8
|
<${L}
|
|
9
9
|
${{...O}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{makeStyleResponsive as e}from"@gem-sdk/core";import o from"./ThirdPartyPreview.js";import t from"../configs/AppstleLoyaltyRewardProgram.js";let a=({setting:a})=>r("div",{style:{...e("ta",a?.align)},children:r("div",{className:"gp-p-2",children:r(o,{setting:{label:"Appstle Loyalty Reward Program",iconSvg:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${t.logoUrl}">`}})})});export{a as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{makeStyleResponsive as a,template as t}from"@gem-sdk/core";let l=({setting:l,advanced:e})=>{let{widgetType:d,align:s}=l??{};return t`
|
|
2
|
+
<div
|
|
3
|
+
class="${e?.cssClass} gp-appstle-loyalty [&_*]:gp-max-w-none"
|
|
4
|
+
style="${{...a("ta",s)}}"
|
|
5
|
+
>
|
|
6
|
+
{% assign widget = '${d}' %}
|
|
7
|
+
{% case widget %}
|
|
8
|
+
{% when "loyalty_dedicated_page" %}
|
|
9
|
+
<div class="appstleLoyaltyPage" data-appstle-loyalty="APPSTLE_LOYALTY_PAGE" id="appstleLoyaltyPage"></div>
|
|
10
|
+
{% when "points_display_on_product" %}
|
|
11
|
+
<div class="appstle-loyalty-acquire-points-block" data-appstle-loyalty="APPSTLE_LOYALTY_ACQUIRE_POINTS" id="appstle-loyalty-acquire-points-block"></div>
|
|
12
|
+
{% when "points_display_on_collections" %}
|
|
13
|
+
<div class="appstle_loyalty_stand_alone_selector" data-product-id="{{product.id}}" data-product-handle="{{product.handle}}" data-variant-id="{{ product.selected_or_first_available_variant.id }}" data-product-data="{{product | json | escape}}"></div>
|
|
14
|
+
{% endcase %}
|
|
15
|
+
</div>
|
|
16
|
+
`};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={id:"appstle-loyalty-reward-program",label:"Appstle Loyalty Reward Program",logoUrl:"https://cdn.shopify.com/app-store/listing_images/96443d68c3eaa36c43a8b7d0afa5eada/icon/COui2tT74fwCEAE=.png?width=22&height=22",tag:"AppstleLoyaltyRewardProgram"};export{a as default};
|