@gem-sdk/components 19.1.0-staging.2 → 19.1.0-staging.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/accordion/next.js +1 -1
- package/dist/cjs/article/components/ArticleContent.js +2 -2
- package/dist/cjs/article/components/ArticleExcerpt.js +1 -1
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/index.js +1 -1
- package/dist/cjs/article/next.js +1 -1
- package/dist/cjs/breadcrumb/next.js +1 -1
- package/dist/cjs/button/components/Button.js +1 -1
- package/dist/cjs/button/components/Button.liquid.js +6 -6
- package/dist/cjs/button/next.js +1 -1
- package/dist/cjs/carousel/components/root/common/helpers.js +1 -1
- package/dist/cjs/carousel/next.js +1 -1
- package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +6 -5
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/cjs/carousel-v3/next.js +1 -1
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/cart/next.js +1 -1
- package/dist/cjs/code/next.js +1 -1
- package/dist/cjs/collection/next.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/countdown-timer/components/Countdown.liquid.js +3 -3
- package/dist/cjs/countdown-timer/next.js +1 -1
- package/dist/cjs/coupon/next.js +1 -1
- package/dist/cjs/dialog/index.js +1 -1
- package/dist/cjs/dialog/next.js +1 -1
- package/dist/cjs/estimate-delivery/next.js +1 -1
- package/dist/cjs/form/components/form-dropdown/FormDropdown.liquid.js +10 -10
- package/dist/cjs/form/next.js +1 -1
- package/dist/cjs/grid/components/ChildrenDroppable.js +1 -2
- package/dist/cjs/grid/components/row/common/helpers.js +1 -1
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/header/components/SalePageHeaderWarning.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/header/next.js +1 -1
- package/dist/cjs/helpers.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/hero-banner/next.js +1 -1
- package/dist/cjs/icon/next.js +1 -1
- package/dist/cjs/icon-list/next.js +1 -1
- package/dist/cjs/icon-list-hoz/next.js +1 -1
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
- package/dist/cjs/icon-list-v2/next.js +1 -1
- package/dist/cjs/ignoreHashClasses.js +1 -1
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/common/const.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image/types.js +1 -0
- package/dist/cjs/image-comparison/next.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-detection/components/ImageDetection.js +1 -1
- package/dist/cjs/image-detection/next.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/input/next.js +1 -1
- package/dist/cjs/line/next.js +1 -1
- package/dist/cjs/link/next.js +1 -1
- package/dist/cjs/marquee/next.js +1 -1
- package/dist/cjs/menu/next.js +1 -1
- package/dist/cjs/modal/next.js +1 -1
- package/dist/cjs/pagination/next.js +1 -1
- package/dist/cjs/post-purchase/advanced-list/next.js +1 -1
- package/dist/cjs/post-purchase/button/next.js +1 -1
- package/dist/cjs/post-purchase/buyer-consent/next.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/components/CalloutBox.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/next.js +1 -1
- package/dist/cjs/post-purchase/countdown-timer/next.js +1 -1
- package/dist/cjs/post-purchase/image/next.js +1 -1
- package/dist/cjs/post-purchase/line/next.js +1 -1
- package/dist/cjs/post-purchase/link/next.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/Arrow.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/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/next.js +1 -1
- package/dist/cjs/post-purchase/text/next.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/utils/injectBadgeStateExtras.js +1 -0
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +5 -5
- package/dist/cjs/product/components/product-button/ProductButton.liquid.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -2
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.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 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
- package/dist/cjs/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
- package/dist/cjs/product/components/product-price/ProductPrice.js +1 -1
- package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/cjs/product/components/product-properties/property-select/common/styles.js +1 -1
- package/dist/cjs/product/components/product-quick-view/ProductQuickView.js +1 -1
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +6 -6
- package/dist/cjs/product/components/product-variants/components/rectangle-list/RectangleList.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductQuery.js +1 -0
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/product/helpers/product-bundle.js +1 -1
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/radio/next.js +1 -1
- package/dist/cjs/select/next.js +1 -1
- package/dist/cjs/shop-pay-installment/next.js +1 -1
- package/dist/cjs/sticky/common/helper.js +1 -0
- package/dist/cjs/sticky/common/styles.js +1 -1
- package/dist/cjs/sticky/components/Sticky.liquid.js +7 -7
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/sticky/index.js +1 -1
- package/dist/cjs/sticky/next.js +1 -1
- package/dist/cjs/sticky/settings/configs/settings-v2.js +1 -1
- package/dist/cjs/sticky/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/stock-counter/next.js +1 -1
- package/dist/cjs/tab/next.js +1 -1
- package/dist/cjs/textarea/next.js +1 -1
- package/dist/cjs/third-party/next.js +1 -1
- package/dist/cjs/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
- package/dist/cjs/third-party/settings/BoldSubscriptions/index.js +1 -1
- package/dist/cjs/third-party/settings/BoldSubscriptions/uiV2.js +1 -1
- package/dist/cjs/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
- package/dist/cjs/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
- package/dist/cjs/third-party/settings/LoopSubscriptions/index.js +1 -1
- package/dist/cjs/third-party/settings/LoopSubscriptions/uiV2.js +1 -1
- package/dist/cjs/third-party/settings/RechargeSubscriptions/index.js +1 -1
- package/dist/cjs/third-party/settings/SeoantTrustBadgesIcon/uiV2.js +1 -1
- package/dist/cjs/third-party/settings/ShopifyForms/uiV2.js +1 -1
- package/dist/cjs/third-party/settings/SkioSubscriptionsYcS20/index.js +2 -2
- package/dist/cjs/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
- package/dist/cjs/third-party/settings/TrustshopProductReviews/index.js +2 -2
- package/dist/cjs/third-party/settings/WcWishlistBackInStock/index.js +2 -2
- package/dist/cjs/third-party-instant/next.js +1 -1
- package/dist/cjs/third-party-slot/next.js +1 -1
- package/dist/cjs/video/next.js +1 -1
- package/dist/esm/accordion/next.js +1 -1
- package/dist/esm/article/components/ArticleContent.js +2 -2
- package/dist/esm/article/components/ArticleExcerpt.js +1 -1
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/index.js +1 -1
- package/dist/esm/article/next.js +1 -1
- package/dist/esm/breadcrumb/next.js +1 -1
- package/dist/esm/button/components/Button.js +1 -1
- package/dist/esm/button/components/Button.liquid.js +4 -4
- package/dist/esm/button/next.js +1 -1
- package/dist/esm/carousel/components/root/common/helpers.js +1 -1
- package/dist/esm/carousel/next.js +1 -1
- package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +4 -3
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
- package/dist/esm/carousel-v3/next.js +1 -1
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/cart/next.js +1 -1
- package/dist/esm/code/next.js +1 -1
- package/dist/esm/collection/next.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +5 -5
- package/dist/esm/countdown-timer/next.js +1 -1
- package/dist/esm/coupon/next.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/dialog/next.js +1 -1
- package/dist/esm/estimate-delivery/next.js +1 -1
- package/dist/esm/form/components/form-dropdown/FormDropdown.liquid.js +9 -9
- package/dist/esm/form/next.js +1 -1
- package/dist/esm/grid/components/ChildrenDroppable.js +1 -2
- package/dist/esm/grid/components/row/common/helpers.js +1 -1
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/header/components/SalePageHeaderWarning.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/header/next.js +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/hero-banner/next.js +1 -1
- package/dist/esm/icon/next.js +1 -1
- package/dist/esm/icon-list/next.js +1 -1
- package/dist/esm/icon-list-hoz/next.js +1 -1
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +8 -8
- package/dist/esm/icon-list-v2/next.js +1 -1
- package/dist/esm/ignoreHashClasses.js +1 -1
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/common/const.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image/types.js +1 -0
- package/dist/esm/image-comparison/next.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-detection/components/ImageDetection.js +1 -1
- package/dist/esm/image-detection/next.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/input/next.js +1 -1
- package/dist/esm/line/next.js +1 -1
- package/dist/esm/link/next.js +1 -1
- package/dist/esm/marquee/next.js +1 -1
- package/dist/esm/menu/next.js +1 -1
- package/dist/esm/modal/next.js +1 -1
- package/dist/esm/pagination/next.js +1 -1
- package/dist/esm/post-purchase/advanced-list/next.js +1 -1
- package/dist/esm/post-purchase/button/next.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/next.js +1 -1
- package/dist/esm/post-purchase/callout-banner/components/CalloutBox.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/callout-banner/next.js +1 -1
- package/dist/esm/post-purchase/countdown-timer/next.js +1 -1
- package/dist/esm/post-purchase/image/next.js +1 -1
- package/dist/esm/post-purchase/line/next.js +1 -1
- package/dist/esm/post-purchase/link/next.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/Arrow.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/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/next.js +1 -1
- package/dist/esm/post-purchase/text/next.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +15 -15
- package/dist/esm/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +1 -1
- package/dist/esm/product/components/product-button/ProductButton.liquid.js +5 -5
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +3 -3
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -2
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +12 -12
- package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +16 -16
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.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 -0
- package/dist/esm/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
- package/dist/esm/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
- package/dist/esm/product/components/product-price/ProductPrice.js +1 -1
- package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/esm/product/components/product-properties/property-select/common/styles.js +1 -1
- package/dist/esm/product/components/product-quick-view/ProductQuickView.js +1 -1
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +8 -8
- package/dist/esm/product/components/product-variants/components/rectangle-list/RectangleList.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductQuery.js +1 -0
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/product/helpers/product-bundle.js +1 -1
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/radio/next.js +1 -1
- package/dist/esm/select/next.js +1 -1
- package/dist/esm/shop-pay-installment/next.js +1 -1
- package/dist/esm/sticky/common/helper.js +1 -0
- package/dist/esm/sticky/common/styles.js +1 -1
- package/dist/esm/sticky/components/Sticky.liquid.js +7 -7
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/sticky/index.js +1 -1
- package/dist/esm/sticky/next.js +1 -1
- package/dist/esm/sticky/settings/configs/settings-v2.js +1 -1
- package/dist/esm/sticky/settings/configs/ui-v2.js +1 -1
- package/dist/esm/stock-counter/next.js +1 -1
- package/dist/esm/tab/next.js +1 -1
- package/dist/esm/textarea/next.js +1 -1
- package/dist/esm/third-party/next.js +1 -1
- package/dist/esm/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
- package/dist/esm/third-party/settings/BoldSubscriptions/index.js +1 -1
- package/dist/esm/third-party/settings/BoldSubscriptions/uiV2.js +1 -1
- package/dist/esm/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
- package/dist/esm/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
- package/dist/esm/third-party/settings/LoopSubscriptions/index.js +1 -1
- package/dist/esm/third-party/settings/LoopSubscriptions/uiV2.js +1 -1
- package/dist/esm/third-party/settings/RechargeSubscriptions/index.js +1 -1
- package/dist/esm/third-party/settings/SeoantTrustBadgesIcon/uiV2.js +1 -1
- package/dist/esm/third-party/settings/ShopifyForms/uiV2.js +1 -1
- package/dist/esm/third-party/settings/SkioSubscriptionsYcS20/index.js +2 -2
- package/dist/esm/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
- package/dist/esm/third-party/settings/TrustshopProductReviews/index.js +2 -2
- package/dist/esm/third-party/settings/WcWishlistBackInStock/index.js +2 -2
- package/dist/esm/third-party-instant/next.js +1 -1
- package/dist/esm/third-party-slot/next.js +1 -1
- package/dist/esm/video/next.js +1 -1
- package/dist/types/index.d.ts +32 -33
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as k,flattenConnection as I,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as y}from"../../../common/const.js";import O from"../SalePageProductListWarning.js";import S from"next/head";import C from"./ProductListGridLayout.js";import E from"./ProductListCarouselLayout.js";import{getStyle as N}from"./common/styles.js";import{If as w}from"@gem-sdk/system";import{getClass as L}from"./common/classes.js";import{getData as j}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let x=r(()=>import("../ProductNotFound.js"),{loading:d}),G=r=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=r,{isRelatedProduct:H,productSetting:Q}=j(r),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=c(),$=s(),_=n(),V=u(e=>e.dynamicProduct),q=u(e=>e.dynamicCollection),[U,J]=l(1),[K,X]=l(!0),[Y,Z]=l(),[ee,et]=l(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[y.Collection,y.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=y.DynamicCollection);let er=Q?.productSrc??y.Collection;er===y.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=m(),ei=u(e=>e.publicStoreFrontData),ea=i(()=>g(ei)?h(ei):el,[ei]),{data:ec}=p(H&&ed?ed:void 0,{revalidateOnMount:F||R},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ec?.tags||ec?.tags.length===0),en=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ec?.collections?.edges||ec?.collections.edges.length===0),eu=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ec?.vendor,em=f(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=P(er===y.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?b:void 0}),ep=i(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=k(er!==y.PickProduct?ep:void 0,{revalidateOnMount:eg});a(()=>{if(H&&ec&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(et(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Z({first:A?.numberOfProducts,vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ec?.vendor:"",idNEQ:ec.id});break;case"collection":{let t=ec?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ec.tags||0===ec.tags.length){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags},{nameNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags}]}]})}}},[ec,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let eP=er===y.PickProduct?eh.isValidating:ef.isValidating,eb=er===y.PickProduct?eh.isLoading:ef.isLoading,ek=er===y.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===y.PickProduct?I(eh.data?.products):I(eI?.products),ev=em?.data?.products?I(em?.data?.products):void 0,ey=H&&ev?ev:er===y.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==y.PickProduct?eT:eT.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eO=i(()=>ee&&H&&F||!ey.length&&!eb&&K&&F,[K,eb,ee,H,F,ey.length]),eS=i(()=>!ey||ee&&H,[ee,H,ey]),eC=i(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(A?.slidesToShow?.[$]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(A?.slidesToShow?.[$]??1)*(e+1)&&++e,{gridRow:`${1+U*e}/${U+1+U*e}`,marginBottom:e+1<t?W(M?.horizontalGutter,$):void 0}))},[A?.sameHeight,A?.slidesToShow,U,ey?.length,$,M?.horizontalGutter]),eE=i(()=>eP||eb||ek||!ey||ee&&H,[ek,eb,ee,H,eP,ey]);a(()=>{eE||setTimeout(()=>{let{builderData:e}=B??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&J(o.childElementCount||1)},F?0:500)},[B,eE,F]);let eN=i(()=>({collection:eI,products:ey,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:M?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:M?.horizontalGutter,verticalGutter:M?.verticalGutter,fullWidth:M?.fullWidth,spacing:M?.spacing,width:M?.width,height:M?.height}}),[eI,ey,A,M]);if(B?.isPreview&&eo)return e(t,{});if(eO)return e(t,{children:w(K,e(x,{builderAttrs:D,collectionHandle:eI?.handle,productSrc:er,onClose:()=>X(!1),children:G,relatedTagString:z,assignProductNoTags:es||en||eu,noAssignedProduct:!ed}))});let{productListWrapStyle:ew,productListContentStyle:eL,productListWrapAlignStyle:ej}=N(r),{productListWrapClass:eW}=L(r);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(S,{children:[!!M.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage.desktop.image.src,as:"image"}),!!M.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.tablet?.image?.src,as:"image"}),!!M.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||eb?e(d,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(T,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:w(M?.layout==="grid",e(C,{...r,productSortedById:ey,generateGridRowArray:eC}),e(E,{...r,productSortedById:ey}))})]})})}),v(G,!0)]})};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import r from"next/dynamic";import i from"../../../common/components/Loading.js";import{useState as d,useRef as l,useMemo as s,useEffect as c}from"react";import{useRenderMode as n,useCurrentDevice as a,usePageType as m,usePageStore as u,flattenConnection as g,ProductListProvider as p,filterToolbarPreview as h,PICKED_PRODUCT_STATUSES as f}from"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as P}from"../../../common/const.js";import y from"../SalePageProductListWarning.js";import k from"next/head";import I from"./ProductListGridLayout.js";import b from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as j}from"@gem-sdk/system";import{getClass as C}from"./common/classes.js";import{getData as v}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";import{useCollectionQuery as w}from"./hooks/useCollectionQuery.js";import N from"./hooks/useProductRelatedQuery.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as G}from"./constants/index.js";import T from"./hooks/useRelatedProductIDAssigned.js";import{useProductsQuery as A}from"./hooks/useProductsQuery.js";let O=r(()=>import("../ProductNotFound.js"),{loading:i}),x=r=>{let{children:x,styles:D,builderProps:B,setting:E,builderAttrs:H}=r,{isRelatedProduct:z,productSetting:M}=v(r),{isEditMode:Q,isPreviewSharePageMode:R}=n(),W=a(),$=m(),_=u(o=>o.dynamicCollection),[F,V]=d(1),[q,U]=d(!0),J=l(),K="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"!=$||[P.Collection,P.DynamicCollection].includes(M?.productSrc)||(M.productSrc=P.DynamicCollection);let X=M?.productSrc??P.Collection;X===P.DynamicCollection&&(M.collectionId=_?.collectionId||"latest");let Y=Number.isNaN(Number(E?.numberOfProducts))?G:Number(E?.numberOfProducts),{relatedProductIdAssigned:Z}=T({productSetting:M}),{isNotFoundRelatedProduct:oo,relatedProducts:oe,isNoRelatedProductData:ot,relatedTagString:or,isLoading:oi}=N({productSetting:M,isRelatedProduct:z,relatedProductIdAssigned:Z,numberOfProducts:Y}),od=Q||R,ol=A({productIds:M?.productIds,defaultSelectedProductCount:M?.numOfSelectedProducts,productSrc:X,selectedStatus:od&&M?.productIds?.length?f:void 0}),os=w({productSrc:X,collectionID:M?.collectionId??"latest",numberOfProducts:Y,orderBy:E?.orderBy}),oc=oi||(X===P.PickProduct?ol.isLoading:os.isLoading),on=X===P.PickProduct?ol.error:os.error,oa=X===P.PickProduct?ol.isValidating:os.isValidating,om=os.data?.collections?.edges?.[0]?.node,ou=X===P.PickProduct?g(ol.data?.products):g(om?.products),og=u(o=>o.assignedProductIds),op=u(o=>o.isApplyAllProducts),oh=s(()=>(og??[]).length>0&&!op||op,[og,op]),of=oe?.data?.products&&oh?g(oe?.data?.products):[],oP=z?of:X===P.PickProduct&&M?.productIds?.length?M?.productIds?.map(o=>ou?.find(e=>e?.baseID===o)).filter(Boolean)??ou:X!==P.PickProduct?ou:ou.filter((o,e)=>e<(M?.numOfSelectedProducts??4)),oy=s(()=>oo&&z&&Q||!oP.length&&!oc&&q&&Q,[q,oc,oo,z,Q,oP.length]),ok=s(()=>!oP||oo&&z,[oo,z,oP]),oI=s(()=>{if(!E?.sameHeight)return[];let o=0,e=Math.ceil((oP?.length??0)/+(E?.slidesToShow?.[W]??1));return Array.from(Array(oP?.length??0)).map((t,r)=>(r>=+(E?.slidesToShow?.[W]??1)*(o+1)&&++o,{gridRow:`${1+F*o}/${F+1+F*o}`,marginBottom:o+1<e?L(D?.horizontalGutter,W):void 0}))},[E?.sameHeight,E?.slidesToShow,F,oP?.length,W,D?.horizontalGutter]),ob=s(()=>oa||oc||on||!oP||oo&&z,[on,oc,oo,z,oa,oP]);c(()=>{if(!ob)return J.current=setTimeout(()=>{let{builderData:o}=B??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},Q?0:500),()=>{clearTimeout(J.current)}},[B,ob,Q,oP]);let oS=s(()=>({collection:om,products:oP,settings:{loop:E?.loop??{desktop:!1},scrollMode:E?.scrollMode??{desktop:"snap"},slidesToShow:E?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:D?.layout,dot:E?.dot,dotStyle:E?.dotStyle,arrow:E?.arrow,controlOverContent:E?.controlOverContent,sameHeight:E?.sameHeight},styles:{horizontalGutter:D?.horizontalGutter,verticalGutter:D?.verticalGutter,fullWidth:D?.fullWidth,spacing:D?.spacing,width:D?.width,height:D?.height}}),[om,oP,E,D]);if(B?.isPreview&&K)return o(e,{});if(oy)return o(e,{children:j(q,o(O,{builderAttrs:H,collectionHandle:om?.handle,productSrc:X,onClose:()=>U(!1),children:x,relatedTagString:or,assignProductNoTags:ot,noAssignedProduct:!Z}))});let{productListWrapStyle:oj,productListContentStyle:oC,productListWrapAlignStyle:ov}=S(r),{productListWrapClass:oL}=C(r);return t("div",{...H,className:oL,style:oj,children:[!!D?.preloadBgImage&&t(k,{children:[!!D.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage.desktop.image.src,as:"image"}),!!D.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.tablet?.image?.src,as:"image"}),!!D.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.mobile?.image?.src,as:"image"})]}),oc||oa?o(i,{}):on?t("div",{children:["Error: ",on?.message]}):ok?o("div",{children:"Products not found"}):o(p,{...oS,children:o("div",{className:"gp-flex gp-w-full",style:ov,children:t("div",{style:oC,children:[K&&o(y,{}),o(e,{children:j(D?.layout==="grid",o(I,{...r,productSortedById:oP,generateGridRowArray:oI}),o(b,{...r,productSortedById:oP}))})]})})}),h(x,!0)]})};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";let
|
|
1
|
+
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";import{RELATED_TAG_PRODUCT_SETTING as r}from"../constants/index.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as d}from"../../../../common/const.js";let c=e=>{let{setting:r,styles:c}=e,l=r?.productSetting??{},i=l.productSrc===d.RelatedProduct,n=o(r?.dot,r?.dotStyle),p={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete p.childItem;let a={...c,sizeSetting:{...t({adaptiveHeight:c?.adaptiveHeight,height:c?.height,fullWidth:{desktop:!0}})},spacing:c?.spacing};return delete a.backgroundColor,delete a.backgroundImage,{isRelatedProduct:i,productSetting:l,dotStyle:n,carouselConfigSetting:p,carouselConfigStyle:a}},l=t=>{let{setting:o,styles:c}=t,l=o?.productSetting,p=l?.relatedTag,a=l?.hasRelatedExclude,u=(p&&p[0]===r.Collection?l?.relatedCollectionExclude:l?.relatedTagsExclude)??"",s=u?.split(",").map(t=>t.trim()).toString(),m=l?.productSrc??d.Collection,g=l?.collectionId?.replace(i,"")??"latest",h=l?.productSrc===d.PickProduct&&l?.productIds?.length===0,P=c?.layout==="grid",I=e(o?.numberOfProducts,4),S=m===d.PickProduct&&l?.productIds?.length?l?.productIds.map(t=>t.replace(n,"")):[],C=m===d.PickProduct&&l?.productHandles?.length?l?.productHandles:[],k=o?.orderBy&&o?.orderBy!=="none",f=(l?.productSrc===d.Collection||l?.productSrc===d.DynamicCollection)&&k?o?.orderBy?.split("_"):"none",y=k&&f?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",E=f?.[f.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:s,collectionID:g,isLatestProducts:h,isGrid:P,numberOfProducts:I,productListId:S,productListHandles:C,sortedBy:y,isReverse:E,productSrc:m,productSetting:l,isSorted:k,relatedTag:p,productNumber:m===d.PickProduct?h?4:l?.numOfSelectedProducts??4:I,collectionHandle:l?.collectionHandle}},i="gid://shopify/Collection/",n="gid://shopify/Product/";export{i as PREFIX_COLLECTION_ID,n as PREFIX_PRODUCT_ID,c as getData,l as getDataLiquid};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var T;!function(T){T.Tags="tags",T.Collection="collection",T.Vendor="vendor"}(T||(T={}));let o=4;export{o as DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS,T as RELATED_TAG_PRODUCT_SETTING};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useFetchHandle as t,usePageStore as r,hasPublicStoreFrontData as o,createStoreFrontFetcher as e,useIsSampleProduct as i,useIsStorefrontProduct as a,generateCollectionQueryKey as l,getCollection as n}from"@gem-sdk/core";import{useMemo as m,useEffect as c}from"react";import s from"swr";import"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as d}from"../../../../common/const.js";let u=({productSrc:u,numberOfProducts:f,orderBy:p,collectionID:g})=>{let C=t(),v=r(t=>t.publicStoreFrontData),y=m(()=>o(v)?e(v):C,[v]),D=i(),j=a(),x=m(()=>u!==d.Collection&&u!==d.DynamicCollection?null:l({id:g,numberOfProducts:f,orderBy:p,isSample:D,isStorefront:j}),[u,D,j,g,f,p]),I=s(x,([,t])=>n(y,t),{revalidateOnMount:!1,refreshInterval:0,revalidateIfStale:!1});return c(()=>{if(u!==d.Collection&&u!==d.DynamicCollection)return;let t=!!I.error,r=I.isLoading||I.isValidating,o=!I.data&&!r;!t&&o&&I.mutate()},[u,I.data,I.error,I.isLoading,I.isValidating]),I};export{u as useCollectionQuery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"../../product-wrap/hook/useProductQuery.js";let r=({isRelatedProduct:r,relatedProductIdAssigned:e})=>{let{productData:{data:o,isLoading:u}}=t({id:r&&e?e:void 0});return{relatedProductIdAssigned:e,mainRelatedProduct:o,isLoading:u}};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e,useMemo as t,useEffect as a}from"react";import r from"swr";import{useFetchHandle as i,usePageStore as d,hasPublicStoreFrontData as l,createStoreFrontFetcher as o,getProductQueryAll as s}from"@gem-sdk/core";import n from"./useMainRelatedProductQuery.js";import{RELATED_TAG_PRODUCT_SETTING as g}from"../constants/index.js";let c=({isRelatedProduct:c,productSetting:u,relatedProductIdAssigned:h,numberOfProducts:f})=>{let[m,p]=e(!1),[T,E]=e(),{mainRelatedProduct:v,isLoading:I}=n({isRelatedProduct:c,relatedProductIdAssigned:h}),W=i(),x=d(e=>e.publicStoreFrontData),N=t(()=>l(x)?o(x):W,[x]),P=r(T?["query/products",T]:null,async([,e])=>s(N,e),{revalidateOnMount:!1,keepPreviousData:!0,refreshInterval:0,revalidateIfStale:!1}),Q=u.relatedTag&&u.relatedTag[0],k=t(()=>{if(!Q)return!1;let e=Q===g.Tags&&!v?.tags?.length,t=Q===g.Collection&&!v?.collections?.edges.length,a=Q===g.Vendor&&!v?.vendor;return e||t||a},[Q,v]),y=t(()=>{if(!c)return!1;if(!v&&I)return!0;let e=!P.data&&!P.error&&!P.isLoading;return e||!P.error&&(P.isLoading||P.isValidating)},[c,v,I,P.error,P.isLoading,P.isValidating,P.data]);return a(()=>{if(c&&v&&u.relatedTag&&"recommended-product"!==u.relatedType){let e;switch(p(!1),u.hasRelatedExclude&&(e=u?.relatedExclude&&u.relatedExclude.split(",").map(e=>e.trim())),u.relatedTag[0]){case"vendor":E({first:f,vendor:u.relatedTag&&"vendor"===u.relatedTag[0]?v?.vendor:"",idNEQ:v.id});break;case"collection":{let t=v?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){p(!0);break}E(e&&e.length>0?{first:f,idNEQ:v.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:f,idNEQ:v.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!v.tags||0===v.tags.length){p(!0);break}E(e&&e.length>0?{first:f,idNEQ:v.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:v.tags},{nameNotIn:e}]}]}:{first:f,idNEQ:v.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:v.tags}]}]})}}},[v,u.relatedType,u.relatedTag,f,u.relatedExclude,u.hasRelatedExclude,c]),a(()=>{if(!c||!T)return;let e=!!P.error,t=P.isLoading||P.isValidating,a=!P.data&&!t;!e&&a&&P.mutate()},[c,P.data,P.error,P.isLoading,P.isValidating,T]),{isNotFoundRelatedProduct:m,relatedProducts:P,isNoRelatedProductData:k,relatedTagString:Q,isLoading:y}};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useFetchHandle as r,usePageStore as t,hasPublicStoreFrontData as e,createStoreFrontFetcher as o,useIsSampleProduct as i,useIsStorefrontProduct as a,generateProductsQueryKey as n,getProducts as m}from"@gem-sdk/core";import{useMemo as s,useEffect as d}from"react";import c from"swr";import"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as l}from"../../../../common/const.js";let u=({defaultSelectedProductCount:u,productIds:f,productSrc:p,selectedStatus:g})=>{let P=r(),k=t(r=>r.publicStoreFrontData),v=s(()=>e(k)?o(k):P,[k]),j=i(),x=a(),y=s(()=>p!==l.PickProduct?null:n({ids:f??[],isSample:j,isStorefront:x,defaultSelectedProductCount:u,selectedStatus:g}),[p,f,j,x,u]),I=c(y,async([,r])=>m(v,r),{revalidateOnMount:!1,refreshInterval:0,revalidateIfStale:!1});return d(()=>{if(p!==l.PickProduct)return;let r=!!I.error,t=I.isLoading||I.isValidating,e=!I.data&&!t;!r&&e&&I.mutate()},[p,I.data,I.error,I.isLoading,I.isValidating]),{...I}};export{u as useProductsQuery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{usePageStore as d}from"@gem-sdk/core";function t({productSetting:t}){let r=d(d=>d.dynamicProduct),e=t.relatedProductId,o=r?.productId&&r?.productId!==e?r?.productId:e;return{relatedProductIdAssigned:o}}export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"../../../text/components/Text.js";import{createClass as i,createAttr as m}from"@gem-sdk/system";import{getWrapperClasses as s}from"./common/classes.js";import{getAttrs as p}from"./common/attrs.js";import{getTextProps as c}from"./common/helpers.js";import{useGpPrice as d}from"./hooks/useGpPrice.js";import{useEditorMode as l,useI18nStore as a,filterToolbarPreview as n}from"@gem-sdk/core";let f=f=>{let{style:h,children:g}=f,x=l(),{t:u}=a(),j="edit"===x,{elementRef:y,moneyFormatted:P,currentProductId:k,isNoComparePrice:N,isNoComparePriceILP:v,shouldHiddenComparePrice:b,emitNoDataSignal:C}=d(f),H=i(s(f)),I=m(p(f,{isILP:!j,productId:k,shouldHiddenComparePrice:b})),w=c(f,P);return e("div",{ref:y,...I,className:H,style:v?{visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0}:h,"aria-hidden":"true",onClick:C,children:[N&&j?r(o,{children:r("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:r("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3
|
|
2
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"../../../text/components/Text.js";import{createClass as i,createAttr as m}from"@gem-sdk/system";import{getWrapperClasses as s}from"./common/classes.js";import{getAttrs as p}from"./common/attrs.js";import{getTextProps as c}from"./common/helpers.js";import{useGpPrice as d}from"./hooks/useGpPrice.js";import{useEditorMode as l,useI18nStore as a,filterToolbarPreview as n}from"@gem-sdk/core";let f=f=>{let{style:h,children:g}=f,x=l(),{t:u}=a(),j="edit"===x,{elementRef:y,moneyFormatted:P,currentProductId:k,isNoComparePrice:N,isNoComparePriceILP:v,shouldHiddenComparePrice:b,emitNoDataSignal:C}=d(f),H=i(s(f)),I=m(p(f,{isILP:!j,productId:k,shouldHiddenComparePrice:b})),w=c(f,P);return e("div",{ref:y,...I,className:H,style:v?{visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0}:h,"aria-hidden":"true",onClick:C,children:[N&&j?r(o,{children:r("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:r("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3",children:u("No compare price")})})}):e(o,{children:[r(t,{...w}),g]}),n(g,!0)]})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useMemo as
|
|
1
|
+
import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{calculateBundleFixedDiscount as i,getMoneyFormatDecimals as c}from"../../../helpers/product-bundle.js";import{useEditorMode as a,useQuantity as o,useCurrentVariant as n,useProductBundleDiscount as p,convertDecimalToNumber as u,useInteraction as d,useProduct as l,useShopStore as m,useMoneyFormat as s,useFormatMoney as g}from"@gem-sdk/core";let h=h=>{let{setting:b,builderProps:P}=h,y=e(null),f=a(),{quantity:v,hasUpdatePrice:w}=o(),q=n(),{useProductCompareAtPrice:k}=p(),C=h["bundle-item"],j=u(q?.price)??0,x=u(q?.salePrice)??0,D=b?.priceType==="compare",{trigger:E}=d(),I=l(),N=I?.baseID?.replace("gid://shopify/Product/",""),V=m(e=>e.showPriceCurrency),{moneyFormat:$}=s(),G=r(()=>C?.quantity?C.quantity:w&&v||1,[v,w,C?.quantity]),L=r(()=>C?i(j,{...C,quantity:G},c($)):0,[C,j,G,$]),M=r(()=>C?.discountValue?k?(x||j)*G:j*G:x*G,[C?.discountValue,j,G,x,k]),S=r(()=>{let e=j*G;return D?M:L?Math.max(0,e-L):e},[j,G,L,M,D]),T=r(()=>!!D&&(!(x>j)||!(x>=0)),[D,x,j]),z=(e,r)=>{E({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${P?.uid}"]`,element:y.current}),E({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${P?.uid}"]`,element:y.current})};t(e=>{e!==j&&z(j,"price")},[j]),t(e=>{e!==x&&z(x,"compare")},[x]);let A=g(S??0,V||!1),B=D&&!S;return{elementRef:y,moneyFormatted:A,currentProductId:N,isNoComparePrice:B,isNoComparePriceILP:"edit"!==f&&B,emitNoDataSignal:()=>{if("edit"!==f)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:P?.uid,value:!S&&D,tag:"ProductPrice"}});window.dispatchEvent(e)},shouldHiddenComparePrice:T}};export{h as useGpPrice};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeWidth as b,
|
|
1
|
+
import{makeStyleResponsive as e,makeWidth as b,composeTypographyStyle as t,getGlobalColorStateStyle as o,getGlobalColorStateResponsiveStyle as g,getStyleShadowState as c,composeRadius as l,handleConvertBorderColor as s,handleConvertBorderWidth as r,handleConvertBorderStyle as f}from"@gem-sdk/core";import{filterTruthyObject as u}from"../../../../../helpers.js";let m=u=>{let{fullWidth:m,width:i,height:a,borderInput:p,borderRadius:h,hasShadowInput:n,shadowInput:S,valueBgColor:d,valueTextColor:w,valueTypo:x,valueTypography:y}=u??{},j=e("w",b(i,m)),k=a?e("h",a):{},O=t(x,y);return{...j,...k,...f(p),...r(p),...s(p),...l(h),...c(S,"box-shadow",n),...g("bg",d),...o("c",w),...O}},i=e=>{let{valueBgColor:b,valueTextColor:t}=e??{},c=g("bg",b),l=o("c",t),s={"--c":l["--focus-c"]?l["--focus-c"]:l["--c"],"--bg":c["--focus-bg"]?c["--focus-bg"]:c["--bg"],"--bg-tablet":c["--focus-bg-tablet"]?c["--focus-bg-tablet"]:c["--bg-tablet"],"--bg-mobile":c["--focus-bg-mobile"]?c["--focus-bg-mobile"]:c["--bg-mobile"]};return u(s)};export{i as getOptionStyles,m as getSelectStyles};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as t,jsx as
|
|
2
|
+
import{jsxs as t,jsx as o}from"react/jsx-runtime";import{usePluginEnable as r,useProduct as e,useProductQuery as i,ProductProvider as c}from"@gem-sdk/core";import{useState as l}from"react";import"../../../common/const.js";import p from"../../../grid/components/row/Row.js";import s from"../../../grid/components/col/Col.js";import"../../../modal/components/confirm.js";import n from"../../../modal/components/Modal.js";import a from"../product-button/ProductButton.js";import d from"../ProductImages.js";import m from"../product-price/ProductPrice.js";import u from"../product-quantity/ProductQuantity.js";import g from"../product-title/ProductTitle.js";import h from"../product-variants/ProductVariants.js";let y=()=>{let r=e(),{data:l,isValidating:n,error:y}=i(r?.id);return n?o("div",{children:t("svg",{className:"gp-mx-auto gp-my-20 gp-h-8 gp-w-8 gp-animate-spin gp-text-base",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[o("circle",{className:"gp-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o("path",{className:"gp-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):y?o("p",{className:"gp-py-20 gp-text-center gp-font-semibold",children:"Something went wrong"}):o(c,{product:l,children:t(p,{setting:{layout:{desktop:{cols:[6,6],display:"fill"},mobile:{cols:[12]}}},children:[o(s,{children:o(d,{})}),t(s,{children:[o(g,{setting:{htmlTag:"p"},styles:{typography:{type:"heading-3"}}}),t(p,{setting:{layout:{desktop:{cols:[6,6],display:"fit"}}},children:[o(s,{children:o(m,{setting:{priceType:"regular"},styles:{typography:{type:"subheading-2"}}})}),o(s,{children:o(m,{setting:{priceType:"compare"},styles:{typography:{type:"paragraph-2"}}})})]}),o(h,{}),o(u,{}),o(a,{})]})]})})},f=({label:e})=>{let[i,c]=l(!1),p=r();return p?.includes("quick-view")?t("div",{children:[o("div",{"aria-hidden":!0,role:"button","aria-label":"Quick view",onClick:()=>c(t=>!t),children:e}),o(n,{setting:{open:i},closeOnClickOutside:!0,onClose:()=>c(t=>!t),children:o(y,{})})]}):null};f.defaultProps={label:"Quick View"};export{f as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{template as t,baseAssetURL as
|
|
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:
|
|
3
|
-
${$(
|
|
1
|
+
import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,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 q}from"./OptionVariantsOldFormat.liquid.js";let A={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??A,{uid:U}=E??{},B=()=>{let t={};return e.forEach(i=>{let o=s(z,i);t[i]="auto"===o}),t},X=()=>{let t={};return e.forEach(i=>{t[i]=C?.[i]==="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},ti=t=>{let i={"'":"'",'"':"""},o=t;for(let e in i)t.indexOf(e)>=0&&(o=o.replaceAll(e,i[e]));return o},to=({showDropdown:i,isRenderDefault:o,typeOfOption:e})=>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:e,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...tt,swatchAutoWidth:B(),optionTypo:I,isRenderDefault:o}))}
|
|
3
|
+
${$(i?'type == "dropdown"':"false",r({...T,...tt,swatchAutoWidth:X(),optionTypo:I}))}`,te=k?.variantPresets?.map(t=>({name:ti(t.optionName),type:t.optionType})).map(t=>`${t.name}($1)${t.type}`).join("($2)").toString(),ts={renderVariantItem:to,variantPresetsLiquid:te??""},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
6
|
<gp-product-variants ${tm}>
|
|
7
7
|
<script gp-data type="application/json">
|
|
8
8
|
{
|
|
9
|
-
"setting":${JSON.stringify(tt)
|
|
9
|
+
"setting":${JSON.stringify(tt)},
|
|
10
10
|
"styles":${JSON.stringify(T)},
|
|
11
11
|
"variants":{{product.variants | json}},
|
|
12
12
|
"optionsWithValues": {{product.options_with_values | json}},
|
|
@@ -34,7 +34,7 @@ import{template as t,baseAssetURL as e,isLocalEnv as i,DEVICES as o,getResponsiv
|
|
|
34
34
|
${p(td)}
|
|
35
35
|
</div>
|
|
36
36
|
`,t`
|
|
37
|
-
${v(`{%- assign presets = "${k?.variantPresets?.map(t=>`${
|
|
37
|
+
${v(`{%- assign presets = "${k?.variantPresets?.map(t=>`${ti(t.optionName)}($2)${t.optionType}`).join("($1)")}" | split: '($1)' -%}`)}
|
|
38
38
|
${v(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(t=>!!t?.hide)?.map(t=>t.optionName).join(",")}" | split: ',' %}`)}
|
|
39
39
|
|
|
40
40
|
${v(`{% assign all_option_names = options | map: 'name' %}
|
|
@@ -93,13 +93,13 @@ import{template as t,baseAssetURL as e,isLocalEnv as i,DEVICES as o,getResponsiv
|
|
|
93
93
|
`)}
|
|
94
94
|
${g(!K,v("{%- assign selectedValue = null -%}"),"")}
|
|
95
95
|
${g(R,t`
|
|
96
|
-
${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ts),
|
|
97
|
-
`,
|
|
96
|
+
${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ts),q(ts))}
|
|
97
|
+
`,to({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 t=
|
|
104
|
+
${(()=>{let t=o?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${i}/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};
|
package/dist/esm/product/components/product-variants/components/rectangle-list/RectangleList.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{makeStyleResponsive as t,makeWidth as a,composeTypographyClassName as r,composeTypographyStyle as i,getGlobalColorStateStyle as c,makeStyle as o,getSingleColorVariable as s,cls as p,getGlobalColorStateClass as l,getGlobalColorClass as n,handleConvertBorderColor as g,handleConvertBorderWidth as v,handleConvertBorderStyle as b,getStyleShadowState as d,getStyleShadow as m,composeRadius as x,getRadiusStyleActiveState as u,handleConvertClassColor as f}from"@gem-sdk/core";import{useMemo as h}from"react";let w=({value:w,isVariantOutStock:y,checked:j,swatchAutoWidth:N,swatchWidth:k,swatchHeight:A,optionTransform:E,optionTypography:F,optionBgColor:L,optionTextColor:R,optionBorder:S,optionRounded:T,optionHasShadow:V,optionShadow:q,optionTypo:z})=>{let B=t("w",a(k,N)),C=h(()=>({...T,active:{...T?.active||{},radiusType:"custom"}}),[T]),D=r(z,F),G=i(z,F);return e("div",{className:p(j?n("bg",L?.active):l("bg",L),f(S),D,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{makeStyleResponsive as t,makeWidth as a,composeTypographyClassName as r,composeTypographyStyle as i,getGlobalColorStateStyle as c,makeStyle as o,getSingleColorVariable as s,cls as p,getGlobalColorStateClass as l,getGlobalColorClass as n,handleConvertBorderColor as g,handleConvertBorderWidth as v,handleConvertBorderStyle as b,getStyleShadowState as d,getStyleShadow as m,composeRadius as x,getRadiusStyleActiveState as u,handleConvertClassColor as f}from"@gem-sdk/core";import{useMemo as h}from"react";let w=({value:w,isVariantOutStock:y,checked:j,swatchAutoWidth:N,swatchWidth:k,swatchHeight:A,optionTransform:E,optionTypography:F,optionBgColor:L,optionTextColor:R,optionBorder:S,optionRounded:T,optionHasShadow:V,optionShadow:q,optionTypo:z})=>{let B=t("w",a(k,N)),C=h(()=>({...T,active:{...T?.active||{},radiusType:"custom"}}),[T]),D=r(z,F),G=i(z,F);return e("div",{className:p(j?n("bg",L?.active):l("bg",L),f(S),D,"gp-box-border gp-inline-flex gp-cursor-pointer gp-items-center gp-justify-center gp-text-center",{"gp-pointer-events-none !gp-cursor-not-allowed":y}),style:{...j?{}:c("bg",L),...j?o({bg:s(L?.active),bs:S?.active?.border,bw:S?.active?.width,bc:s(S?.active?.color)}):{},...o({tt:E}),...G,...t("h",A),...B,...j?u(C):x(T),...j?m({value:q?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:V?.active},!0):d(q,"box-shadow",V),...j?{}:b(S),...j?{}:v(S),...j?{}:g(S)},children:e("span",{className:p("gp-flex gp-items-center gp-px-[16px]",j?n("text",R?.active):l("text",R)),style:{...j?o({c:s(R?.active)}):c("c",R)},children:w?.label})})};export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import d from"../../../common/components/Loading.js";import"react";import"../../../common/const.js";import s from"../../../grid/components/row/Row.js";import{If as c}from"@gem-sdk/system";import n from"next/dynamic";import{useProductSetting as l}from"./hook/useProductSetting.js";import{getData as p}from"./common/helpers.js";let u=n(()=>import("../ProductNotFound.js"),{loading:d}),a=n=>{let{builderProps:a,children:h,setting:f,style:g,builderAttrs:j}=n,{isAuto:P}=f??{},{isLoading:b,isProductPage:y,isProductNotFound:k,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:D}=l(n),{rowSetting:S,rowStyles:E}=p(n);return y&&P?r(o,{children:e(h)?r(m,{}):h}):r(o,{children:c(!k,r(o,{children:b?r(d,{}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(s,{builderProps:a,builderAttrs:j,style:g,styles:E,setting:S,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(h)?r(m,{}):h})}):null})}),r(o,{children:c(x,r(u,{builderAttrs:j,productSrc:"PickProduct",onClose:()=>D(!1),children:h}))}))})};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useFetchHandle as r,usePageStore as t,useIsSampleProduct as e,useIsStorefrontProduct as a,hasPublicStoreFrontData as i,createStoreFrontFetcher as o,generateProductQueryKey as l,getProduct as n}from"@gem-sdk/core";import{useMemo as d,useEffect as s}from"react";import u from"swr";let m=({id:m})=>{let f=r(),c=t(r=>r.publicStoreFrontData),g=e(),p=a(),v=d(()=>i(c)?o(c):f,[c]),y=d(()=>m?l({id:m,isSample:g,isStorefront:p}):null,[m,g,p]),I=u(y,async([,r])=>n(v,r),{revalidateOnMount:!1,refreshInterval:0,revalidateIfStale:!1});return s(()=>{if(!m)return;let r=!!I.error,t=I.isLoading||I.isValidating,e=!I.data&&!t;!r&&e&&I.mutate()},[m,I.data,I.error,I.isLoading,I.isValidating]),{productData:I}};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{usePageType as t,usePageStore as
|
|
1
|
+
import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import{useState as d,useMemo as a}from"react";import i from"./useProductQuery.js";let o=o=>{let{setting:c}=o,{productSetting:u,quantity:s,readOnly:P,isSyncProduct:m}=c??{},l=t(),n=r(t=>t.dynamicProduct),{isEditMode:p}=e(),S=u?.productId??"latest",y=u?.productStatus=="dynamic"?{...u,...n}:u,f=y?.initialVariantId,g=y?.initialVariantBaseId,{productData:{data:h,isLoading:I,error:k}}=i({id:S}),[D,V]=d(!0),$=(k||!h&&!I)&&p,j=a(()=>({product:h,initialVariantId:f,initialVariantBaseId:g,quantity:s,readOnly:P,isSyncProduct:m,key:`uid-${h?.id}-${f??""}`,hasPreSelected:u?.hasPreSelected}),[g,f,m,h,u?.hasPreSelected,s,P]);return{forceProductSetting:y,isProductPage:"PRODUCT"===l,isProductNotFound:$,showProductNotFound:D,isLoading:I,product:h,errorLoadProduct:k,isEditor:p,productProviderData:j,setShowProductNotFound:V}};export{o as useProductSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertDecimalToNumber as t,formatMoney as o}from"@gem-sdk/core";import{DiscountType as e}from"../components/constants/product-bundle.js";let n=t=>({discountPercentAmount:0,discountAmount:o("0",t)}),r=r=>{let{currentVariant:
|
|
1
|
+
import{convertDecimalToNumber as t,formatMoney as o}from"@gem-sdk/core";import{DiscountType as e}from"../components/constants/product-bundle.js";let n=t=>({discountPercentAmount:0,discountAmount:o("0",t)}),r=r=>{let{currentVariant:a,bundleItem:s,options:l}=r;if(!l?.useProductCompareAtPrice&&s?.discountType===e.NoDiscount||!s||!a?.price)return n(l?.moneyFormat||"${{amount}}");let p=t(a?.price)??0,y=t(a?.salePrice)??p,P=Number(s?.quantity),A=c(p,s,i(l?.moneyFormat)),F=d(A,P*p),M=p*P-A,f=y*P;return y<=p&&A<=0?n(l?.moneyFormat||"${{amount}}"):{discountPercentAmount:l?.useProductCompareAtPrice?u(M,f):F,discountAmount:l?.useProductCompareAtPrice?m(M,f,l?.moneyFormat):o(A.toString(),l?.moneyFormat)}},u=(t,o)=>Math.round((o-t)/o*100),m=(t,e,n)=>o((e-t).toString(),n),c=(t,o,n=2)=>{let r=Number(o?.discountValue);return o?.discountType===e.Percentage?a(t*(r/100),n)*o.quantity:o?.discountType===e.FixedAmount?r:0},i=t=>t?.includes("amount_no_decimals")?0:2,a=(t,o=2)=>{let e=10**o;return Math.floor(Math.round(1e6*(t*e))/1e6)/e},d=(t,o)=>Math.round(t/o*100);export{r as applyBundleDiscountAmount,c as calculateBundleFixedDiscount,a as floorToMinorUnit,i as getMoneyFormatDecimals};
|
|
@@ -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"../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"
|
|
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"./components/constants/product-bundle.js";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"../common/const.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};
|
package/dist/esm/product/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let n=o(()=>import("./components/product-wrap/Product.js"),{loading:t}),r=o(()=>import("./components/product-title/ProductTitle.js"),{loading:t}),i=o(()=>import("./components/product-quantity/ProductQuantity.js"),{loading:t}),c=o(()=>import("./components/product-description/ProductDescription.js"),{loading:t}),p=o(()=>import("./components/product-price/ProductPrice.js"),{loading:t}),d=o(()=>import("./components/product-button/ProductButton.js"),{loading:t}),s=o(()=>import("./components/product-variants/ProductVariants.js"),{loading:t}),m=o(()=>import("./components/ProductImages.js"),{loading:t}),e=o(()=>import("./components/product-images-v3/ProductImageV3.js"),{loading:t}),u=o(()=>import("./components/product-images-v2/ProductImageV2.js"),{loading:t}),a=o(()=>import("./components/product-properties/ProductProperties.js"),{loading:t}),l=o(()=>import("./components/product-quick-view/QuickView.js"),{ssr:!1}),g=o(()=>import("./components/product-discount-tag/ProductDiscountTag.js"),{loading:t}),j=o(()=>import("./components/product-list-v3/ProductList.js"),{loading:t}),P=o(()=>import("./components/product-list/ProductList.js"),{loading:t}),v=o(()=>import("./components/dynamic-checkout/DynamicCheckout.js"),{loading:t}),k=o(()=>import("./components/product-vendor/Vendor.js"),{loading:t}),V=o(()=>import("./components/product-sku/Sku.js"),{loading:t}),w=o(()=>import("./components/product-view-more/ProductViewMore.js"),{loading:t}),y=o(()=>import("./components/product-badge/ProductBadge.js"),{loading:t}),D=o(()=>import("./components/product-bundle/ProductBundleDiscount.js"),{loading:t}),b=o(()=>import("./components/product-bundle/ProductBundleDiscountItem.js"),{loading:t}),f=o(()=>import("./components/file-upload/UploadFile.js"),{loading:t});var B={Product:n,ProductTitle:r,ProductQuantity:i,ProductPrice:p,ProductButton:d,ProductDescription:c,ProductVariants:s,ProductImages:m,ProductImagesV3:e,ProductImagesV2:u,ProductProperties:a,ProductQuickView:l,ProductTag:g,ProductListV3:j,ProductList:P,DynamicCheckout:v,ProductVendor:k,ProductViewMore:w,ProductBadge:y,ProductBundleDiscount:D,ProductBundleDiscountItem:b,ProductSku:V,FileUpload:f};export{B as default};
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let n=o(()=>import("./components/product-wrap/Product.js"),{loading:t}),r=o(()=>import("./components/product-title/ProductTitle.js"),{loading:t}),i=o(()=>import("./components/product-quantity/ProductQuantity.js"),{loading:t}),c=o(()=>import("./components/product-description/ProductDescription.js"),{loading:t}),p=o(()=>import("./components/product-price/ProductPrice.js"),{loading:t}),d=o(()=>import("./components/product-button/ProductButton.js"),{loading:t}),s=o(()=>import("./components/product-variants/ProductVariants.js"),{loading:t}),m=o(()=>import("./components/ProductImages.js"),{loading:t}),e=o(()=>import("./components/product-images-v3/ProductImageV3.js"),{loading:t}),u=o(()=>import("./components/product-images-v2/ProductImageV2.js"),{loading:t}),a=o(()=>import("./components/product-properties/ProductProperties.js"),{loading:t}),l=o(()=>import("./components/product-quick-view/QuickView.js"),{ssr:!1}),g=o(()=>import("./components/product-discount-tag/ProductDiscountTag.js"),{loading:t}),j=o(()=>import("./components/product-list-v3/ProductList.js"),{loading:t}),P=o(()=>import("./components/product-list/ProductList.js"),{loading:t}),v=o(()=>import("./components/dynamic-checkout/DynamicCheckout.js"),{loading:t}),k=o(()=>import("./components/product-vendor/Vendor.js"),{loading:t}),V=o(()=>import("./components/product-sku/Sku.js"),{loading:t}),w=o(()=>import("./components/product-view-more/ProductViewMore.js"),{loading:t}),y=o(()=>import("./components/product-badge/ProductBadge.js"),{loading:t}),D=o(()=>import("./components/product-bundle/ProductBundleDiscount.js"),{loading:t}),b=o(()=>import("./components/product-bundle/ProductBundleDiscountItem.js"),{loading:t}),f=o(()=>import("./components/file-upload/UploadFile.js"),{loading:t});var B={Product:n,ProductTitle:r,ProductQuantity:i,ProductPrice:p,ProductButton:d,ProductDescription:c,ProductVariants:s,ProductImages:m,ProductImagesV3:e,ProductImagesV2:u,ProductProperties:a,ProductQuickView:l,ProductTag:g,ProductListV3:j,ProductList:P,DynamicCheckout:v,ProductVendor:k,ProductViewMore:w,ProductBadge:y,ProductBundleDiscount:D,ProductBundleDiscountItem:b,ProductSku:V,FileUpload:f};export{B as default};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
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",conditionDisplay:'pageType !== "STATIC"',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};
|
package/dist/esm/radio/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Radio.js"),{loading:m});var r={Radio:t};export{r as default};
|
package/dist/esm/select/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Select.js"),{loading:t});var e={Select:m};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/ShopPayInstallments.js"),{loading:t});var n={ShopPayInstallments:m};export{n as default};
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/ShopPayInstallments.js"),{loading:t});var n={ShopPayInstallments:m};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=e=>e.trim()?(e.startsWith("#el-")?e.replace("#el-","#"):e).replace(/^#/,"").trim():"",t=({value:t})=>e(t?.link??""),r=({value:e})=>t({value:e}).length>0,i=({value:e})=>{let r=t({value:e});if(!r)return null;let i=r.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),l=window.CSS?.escape?window.CSS.escape(r):i;return document.querySelector(`[data-id="${i}"], #${l}`)},l=({value:e})=>{let t=i({value:e});if(!t)return;let r=t.getBoundingClientRect();if(0===r.width&&0===r.height)return;let l=window.innerHeight,n=r.top+window.scrollY,o=r.height>l;return o?{triggerY:n,ready:r.top<=0&&r.bottom>0}:{triggerY:n+r.height-l,ready:r.top>=0&&r.bottom<=l}},n=()=>{let e=document.documentElement,t=e.scrollHeight-window.innerHeight;return t<=0?100:window.scrollY/t*100},o=({showFrom:e,hideFrom:t})=>{let i=r({value:e}),n=r({value:t});if(!i&&!n)return!0;let o=i?l({value:e}):void 0,g=n?l({value:t}):void 0;if(o?.ready&&g?.ready)return!0;let c=window.scrollY;if(i&&!o)return!1;let d=o?.triggerY??-1/0,u=g?.triggerY??1/0;return i&&!n?c>=d:!i&&n?c<u:d===u||(d<u?c>=d&&c<u:c<u||c>=d)};export{n as getScrollPercent,i as getSectionElement,t as getSectionId,l as getSectionTrigger,r as hasSectionValue,o as isVisibleBetweenSections};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getGradientImageBgrStyleByDevice as t,getStyleBackgroundByDevice as e,makeStyle as l}from"@gem-sdk/core";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as o}from"../../common/const.js";import{getBackgroundTranslated as
|
|
1
|
+
import{getGradientImageBgrStyleByDevice as t,getStyleBackgroundByDevice as e,makeStyle as l}from"@gem-sdk/core";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as o}from"../../common/const.js";import{getBackgroundTranslated as r}from"../../helpers.js";import{Sticky as a}from"../settings/configs/translate.js";import{hasSectionValue as p}from"./helper.js";let s=t=>"top"==t?"sticky":"fixed",b=(t,e,l,o)=>{let r={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:s(l)};switch(e){case"after-first-cart-button":case"after-first-scroll":r[`--d${t}`]="none";break;case"always":r[`--d${t}`]="block";break;case"between-sections":r[`--d${t}`]=p({value:o})?"none":"block"}return r},i=(t,e,l)=>({...b("",t?.desktop,e?.desktop,l),...b("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop,l),...b("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop,l)}),n=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),m=t=>({...n(t?.desktop,""),...n(t?.tablet??t?.desktop,"-tablet"),...n(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),d=t=>{let{position:e,display:l,showFrom:r}=t;return{margin:"0 auto",...m(e),...i(l,e,r),"z-index":o.STICKY}},c=({setting:o,style:p,uid:s,pageContext:b,type:i="React"})=>{let{background:n}=o||{},m="Liquid"===i?r({background:n,uid:s,enableTranslate:!!a?.background?.id,pageContext:b,isTranslateVideo:!1}):n;return{...l({m:"0 auto"}),...k(p),...f(p),...e(m||n),...t(m||n)}},k=t=>{let e={};return["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"].forEach(l=>{t?.[l]&&(e[l]=t[l])}),e},f=t=>{let e={...t};return["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"].forEach(t=>{delete e?.[t]}),e};export{i as displayConditionStyle,f as filterStyles,d as getContainerStyles,c as getContentStyles,b as getDisplayStyle,k as getStylePadding};
|
|
@@ -1,17 +1,17 @@
|
|
|
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,
|
|
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,scrollPercent:j,showFrom:h,hideFrom:E,preloadBgImage:w,background:C,isScrollToTop:q}=$??{},x=f?.d,A=l({...s("w",b),...p({position:v,display:S,showFrom:h})}),G=l(m({setting:$,style:k,uid:y?.uid,pageContext:u??{},type:"Liquid"})),L=d(c({uid:y?.uid,isScrollToTop:q,cssClass:f?.cssClass,isLiquid:!0})),N=o({uid:y?.uid,setting:{display:{desktop:S?.desktop,tablet:S?.tablet??S?.desktop,mobile:S?.mobile??S?.tablet??S?.desktop},scrollPercent:j,showFrom:h,hideFrom:E},advanced:{d:x}}),O=`.drawer-page-content {
|
|
2
2
|
transform: none !important;
|
|
3
3
|
-webkit-transform: none !important;
|
|
4
4
|
}`;return r`
|
|
5
|
-
${e(!!
|
|
5
|
+
${e(!!w,`${e(!!C?.desktop?.image?.src,`<link rel="preload" href="${C?.desktop?.image?.src}" as="image" />`)}${e(!!C?.tablet?.image?.src,`<link rel="preload" href="${C?.tablet?.image?.src}" as="image" />`)}${e(!!C?.mobile?.image?.src,`<link rel="preload" href="${C?.mobile?.image?.src}" as="image" />`)}`)}
|
|
6
6
|
<gp-sticky
|
|
7
7
|
id="${y?.uid}"
|
|
8
8
|
data-id="${y?.uid}"
|
|
9
|
-
class="${
|
|
10
|
-
style="${
|
|
9
|
+
class="${L} ${a("gps-lazy")}"
|
|
10
|
+
style="${A}"
|
|
11
11
|
>
|
|
12
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
13
|
-
<style>${
|
|
14
|
-
<div ${{...g}} style="${{...
|
|
12
|
+
<script gp-data type="application/json">${JSON.stringify(N)}</script>
|
|
13
|
+
<style>${O}</style>
|
|
14
|
+
<div ${{...g}} style="${{...G}}">
|
|
15
15
|
${n}
|
|
16
16
|
</div>
|
|
17
17
|
</gp-sticky>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as
|
|
1
|
+
import{makeStyleResponsive as e,usePageStore as t,useCurrentDevice as o,useEditorMode as i,useStickyStore as n}from"@gem-sdk/core";import{useState as l,useMemo as s,useEffect as r}from"react";import{hasSectionValue as a,isVisibleBetweenSections as d,getScrollPercent as c}from"../common/helper.js";let b=b=>{let{width:p,position:m,display:u,scrollPercent:k,showFrom:w,hideFrom:f}=b??{},v=e("w",p),h=t(e=>"interaction"===e.sidebarMode),E=o(),S=i(),[L,V]=l(!1),F=n(e=>e.getFirstVisibleElement(E)),g=({position:e,device:t})=>({[`--left${t}`]:"top"==e?"0":"50%",[`--t${t}`]:"top"==e?"unset":"translateX(-50%)"}),x=s(()=>({...g({position:m?.desktop,device:""}),...g({position:m?.tablet??m?.desktop,device:"-tablet"}),...g({position:m?.mobile??m?.tablet??m?.desktop,device:"-mobile"})}),[m?.desktop,m?.mobile,m?.tablet]),y=s(()=>{if(h&&m?.[E]==="top")return"40px"},[E,h,m]),[B,R]=l(null),$=w?.link,A=f?.link;r(()=>{if(R(null),"edit"===S)return;let e=[u?.desktop,u?.tablet,u?.mobile],t=e.some(e=>"after-first-scroll"===e||"between-sections"===e);if(!t)return;let o=()=>({isScrollPercentReached:c()>=(k??0),isBetweenSectionsVisible:d({showFrom:{link:$},hideFrom:{link:A}})}),i=()=>{let e=o();R(t=>t&&t.isScrollPercentReached===e.isScrollPercentReached&&t.isBetweenSectionsVisible===e.isBetweenSectionsVisible?t:e)};i();let n=0,l=()=>{n||(n=requestAnimationFrame(()=>{n=0,i()}))};return window.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",l),window.addEventListener("orientationchange",l),()=>{n&&cancelAnimationFrame(n),window.removeEventListener("scroll",l),window.removeEventListener("resize",l),window.removeEventListener("orientationchange",l)}},[S,u?.desktop,u?.tablet,u?.mobile,$,A,k]);let P=s(()=>{let e=({displayValue:e})=>{switch(e){case"after-first-cart-button":return L?"block":"none";case"after-first-scroll":if(!B)return"none";return B.isScrollPercentReached?"block":"none";case"between-sections":if(!B)return a({value:w})?"none":"block";return B.isBetweenSectionsVisible?"block":"none";default:return"block"}},t=u?.desktop,o=u?.tablet??t,i=u?.mobile??o;return{"--d":e({displayValue:t}),"--d-tablet":e({displayValue:o}),"--d-mobile":e({displayValue:i})}},[u?.desktop,u?.mobile,u?.tablet,A,$,B,L]),q=s(()=>({"--top":y??"auto","--top-tablet":y??"auto","--top-mobile":y??"auto",[`--${m?.desktop}`]:y??"0px",[`--${m?.tablet??m?.desktop}-tablet`]:y??"0px",[`--${m?.mobile??m?.tablet??m?.desktop}-mobile`]:y??"0px"}),[y,m?.desktop,m?.mobile,m?.tablet]),z=({position:e})=>"top"==e?"sticky":"fixed",j=s(()=>({"--pos":z({position:m?.desktop}),"--pos-tablet":z({position:m?.tablet??m?.desktop}),"--pos-mobile":z({position:m?.mobile??m?.tablet??m?.desktop})}),[m?.desktop,m?.mobile,m?.tablet]);return r(()=>{if(!F)return;let e=null,t=()=>{e=null,V(F.getBoundingClientRect().top<=0)},o=()=>{null===e&&(e=requestAnimationFrame(t))};return t(),window.addEventListener("scroll",o,{passive:!0}),()=>{window.removeEventListener("scroll",o),null!==e&&cancelAnimationFrame(e)}},[F]),r(()=>{V(!1)},[E]),{w:v,displayStyle:q,positionStyle:j,getCSSAlign:x,makeDisplaySettingStyles:P}};export{b as default};
|
package/dist/esm/sticky/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@gem-sdk/core";import"next/head";import"react";import"@gem-sdk/system";import"next/link";import t from"./settings/Sticky.js";let
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/core";import"next/head";import"react";import"../common/const.js";import"@gem-sdk/system";import"next/link";import t from"./settings/Sticky.js";let i={Sticky:t};export{i as stickySetting};
|
package/dist/esm/sticky/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let m=o(()=>import("./components/Sticky.js"),{loading:t});var r={Sticky:m};export{r as default};
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Sticky.js"),{loading:t});var r={Sticky:m};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"1200px",showValue:!0}]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#dddddd",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 76 48",itemPerRow:2,itemSpacing:"large",enableItemBackground:!0,enableItemOpacity:!0,options:[{label:"Bottom",value:"bottom",iconName:"gp-sticky-position-bottom"},{label:"Top",value:"top",iconName:"gp-sticky-position-top"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"select",devices:{desktop:{default:"always"}},options:[{label:"Always show",value:"always"},{label:"After first cart button",value:"after-first-cart-button"}]},{id:"isScrollToTop",type:"toggle",default:!1}]}];export{e as StickySettingsV2};
|
|
1
|
+
let e=[{id:"setting",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"1200px",showValue:!0}]},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#dddddd",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1,loop:!0}}}},{id:"preloadBgImage",type:"toggle",label:"Preload Image",default:!1},{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 76 48",itemPerRow:2,itemSpacing:"large",enableItemBackground:!0,enableItemOpacity:!0,options:[{label:"Bottom",value:"bottom",iconName:"gp-sticky-position-bottom"},{label:"Top",value:"top",iconName:"gp-sticky-position-top"}],devices:{desktop:{default:"bottom"}}},{id:"display",label:"Display",type:"select",devices:{desktop:{default:"always"}},options:[{label:"Always show",value:"always"},{label:"After first cart button",value:"after-first-cart-button"},{label:"After scrolling down",value:"after-first-scroll"},{label:"Between sections",value:"between-sections"}]},{id:"scrollPercent",type:"input:unit",units:["%"],min:0,max:100,placeholder:"0%",isNumber:!0},{id:"showFrom",type:"pick-link",optionConfig:{"scroll-to":{popoverLabel:"Show Sticky ATC start from",title:"",hideScrollToTop:!0}},default:{type:"scroll-to",link:""},isHiddenOpenLinkSelect:!0,hiddenOptions:{"stay-on-page":!0,"open-page":!0,"open-url":!0,"open-popup":!0,"go-to-sales-page":!0}},{id:"hideFrom",type:"pick-link",optionConfig:{"scroll-to":{popoverLabel:"Hide Sticky ATC start from",title:"",hideScrollToTop:!0}},default:{type:"scroll-to",link:""},isHiddenOpenLinkSelect:!0,hiddenOptions:{"stay-on-page":!0,"open-page":!0,"open-url":!0,"open-popup":!0,"go-to-sales-page":!0}},{id:"isScrollToTop",type:"toggle",default:!1}]}];export{e as StickySettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let o=[{label:"Layout",controls:[{setting:{id:"position"},layout:"vertical"}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"width"},label:"Width"},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{type:"custom",top:"16px",bottom:"16px",left:"24px",right:"24px"}}}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{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:"Display option",controls:[{label:"Condition",setting:{id:"display"}}]}];export{o as SettingUIV2};
|
|
1
|
+
let o=[{label:"Layout",controls:[{setting:{id:"position"},layout:"vertical"}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"width"},label:"Width"},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{type:"custom",top:"16px",bottom:"16px",left:"24px",right:"24px"}}}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical",options:{updateFields:[{field:"preload",settingId:"preloadBgImage"}]},controlChangeTrigger:{settings:[{action:{controlId:"preloadBgImage",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}}],options:{noRecordHistory:!0}}}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{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:"Display option",controls:[{label:"Condition",setting:{id:"display"}},{label:"Page scrolled",conditionDisplay:"display === 'after-first-scroll'",setting:{id:"scrollPercent"}},{label:"Show from",conditionDisplay:"display === 'between-sections'",setting:{id:"showFrom"}},{label:"Hide from",conditionDisplay:"display === 'between-sections'",setting:{id:"hideFrom"}}]}];export{o as SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/StockCounter.js"),{loading:t});var r={StockCounter:m};export{r as default};
|
package/dist/esm/tab/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import
|
|
1
|
+
import o from"next/dynamic";import m from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let t=o(()=>import("./components/Tabs.js"),{loading:m}),r=o(()=>import("./components/TabItem.js"),{loading:m});var n={Tabs:t,TabItem:r};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let
|
|
1
|
+
import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let m=o(()=>import("./components/Textarea.js"),{loading:t});var r={Textarea:m};export{r as default};
|