@gem-sdk/components 23.1.2 → 24.0.0-dev.10

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.
Files changed (519) hide show
  1. package/dist/cjs/article/components/ArticleImage.js +1 -1
  2. package/dist/cjs/article/components/ArticleImage.liquid.js +6 -6
  3. package/dist/cjs/article/components/ArticleList.js +1 -1
  4. package/dist/cjs/article/index.js +1 -1
  5. package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
  6. package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
  7. package/dist/cjs/builder.js +1 -1
  8. package/dist/cjs/button/common/helpers.js +2 -2
  9. package/dist/cjs/cart/components/CartList.js +1 -1
  10. package/dist/cjs/cart/index.js +1 -1
  11. package/dist/cjs/collection/index.js +1 -1
  12. package/dist/cjs/common/components/Loading.js +1 -1
  13. package/dist/cjs/common/const.js +1 -1
  14. package/dist/cjs/common/helpers.js +1 -0
  15. package/dist/cjs/common/hooks/useElementWidth.js +1 -0
  16. package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
  17. package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
  18. package/dist/cjs/grid/components/section/Section.js +1 -1
  19. package/dist/cjs/grid/index.js +1 -1
  20. package/dist/cjs/header/components/kind/basic/index.js +1 -1
  21. package/dist/cjs/header/components/kind/modern/index.js +1 -1
  22. package/dist/cjs/header/index.js +1 -1
  23. package/dist/cjs/hero-banner/common/styles.js +1 -1
  24. package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
  25. package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
  26. package/dist/cjs/hero-banner/index.js +1 -1
  27. package/dist/cjs/image/common/adaptiveSources.js +1 -0
  28. package/dist/cjs/image/common/attrs.js +1 -1
  29. package/dist/cjs/image/common/classes.js +1 -1
  30. package/dist/cjs/image/common/helpers.js +2 -2
  31. package/dist/cjs/image/common/liquidSrcset.js +1 -0
  32. package/dist/cjs/image/common/listContext.js +1 -0
  33. package/dist/cjs/image/common/listImageContext.js +1 -0
  34. package/dist/cjs/image/common/sizes.js +1 -0
  35. package/dist/cjs/image/common/srcset.js +1 -0
  36. package/dist/cjs/image/components/AdaptiveImage.js +1 -1
  37. package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
  38. package/dist/cjs/image/components/Image.js +1 -1
  39. package/dist/cjs/image/components/Image.liquid.js +10 -10
  40. package/dist/cjs/image/components/NextImage.js +1 -1
  41. package/dist/cjs/image/components/NextImage.liquid.js +4 -5
  42. package/dist/cjs/image/constants.js +1 -1
  43. package/dist/cjs/image/index.js +1 -1
  44. package/dist/cjs/image/settings/configs/settings.js +1 -1
  45. package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
  46. package/dist/cjs/image-comparison/common/attrs.js +1 -1
  47. package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
  48. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
  49. package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
  50. package/dist/cjs/image-comparison/index.js +1 -1
  51. package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
  52. package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
  53. package/dist/cjs/index.js +1 -1
  54. package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
  55. package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
  56. package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
  57. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  58. package/dist/cjs/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
  59. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
  60. package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
  61. package/dist/cjs/post-purchase/product/index.js +1 -1
  62. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  63. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
  64. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  65. package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
  66. package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.js +1 -1
  67. package/dist/cjs/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
  68. package/dist/cjs/product/components/product-bundle/common/classes.js +1 -1
  69. package/dist/cjs/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
  70. package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  71. package/dist/cjs/product/components/product-discount-tag/common/helpers.js +1 -0
  72. package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
  73. package/dist/cjs/product/components/product-images-v2/common/attrs.js +1 -1
  74. package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
  75. package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
  76. package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
  77. package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +41 -41
  78. package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
  79. package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
  80. package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
  81. package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
  82. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  83. package/dist/cjs/product/components/product-images-v3/common/attrs.js +1 -1
  84. package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
  85. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  86. package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
  87. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
  88. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +40 -40
  89. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +40 -40
  90. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
  91. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
  92. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
  93. package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
  94. package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  95. package/dist/cjs/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
  96. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  97. package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +1 -1
  98. package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +9 -7
  99. package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
  100. package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +16 -14
  101. package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
  102. package/dist/cjs/product/components/product-list/common/imagePriority.js +17 -0
  103. package/dist/cjs/product/components/product-list/common/imagePriorityHints.js +1 -0
  104. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  105. package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
  106. package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
  107. package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
  108. package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +16 -14
  109. package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
  110. package/dist/cjs/product/components/product-wrap/Product.js +1 -1
  111. package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
  112. package/dist/cjs/product/helpers/product-bundle.js +1 -1
  113. package/dist/cjs/product/helpers/productImagesDrag.js +1 -0
  114. package/dist/cjs/product/index.js +1 -1
  115. package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +2 -2
  116. package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +2 -2
  117. package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
  118. package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  119. package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductFeatureImage.js +2 -2
  120. package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -2
  121. package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
  122. package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  123. package/dist/cjs/stock-counter/common/attrs.js +1 -1
  124. package/dist/cjs/stock-counter/common/helpers.js +23 -23
  125. package/dist/cjs/stock-counter/hooks/useStockCounter.js +1 -1
  126. package/dist/cjs/third-party/common/helpers.js +4 -4
  127. package/dist/cjs/third-party/components/KlarnaMessaging.liquid.js +29 -4
  128. package/dist/cjs/third-party/settings/AftershipEmailMarketingsms/index.js +1 -1
  129. package/dist/cjs/third-party/settings/AirProductReviewsAppUgc/index.js +2 -2
  130. package/dist/cjs/third-party/settings/AliReviews/index.js +1 -1
  131. package/dist/cjs/third-party/settings/AlsoBoughtCbb/index.js +1 -1
  132. package/dist/cjs/third-party/settings/AovBundlesVolumeDiscounts/index.js +2 -2
  133. package/dist/cjs/third-party/settings/AovFreeGiftBuyXGetYBogo/index.js +2 -2
  134. package/dist/cjs/third-party/settings/AppointmentBookingCowlendar/index.js +2 -2
  135. package/dist/cjs/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
  136. package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +1 -1
  137. package/dist/cjs/third-party/settings/AppstleSubscriptions/index.js +1 -1
  138. package/dist/cjs/third-party/settings/BestBuyFulfillment/index.js +1 -1
  139. package/dist/cjs/third-party/settings/BfSizeChartSizeGuide/index.js +1 -1
  140. package/dist/cjs/third-party/settings/BirdChime/index.js +4 -4
  141. package/dist/cjs/third-party/settings/BloyRewardsProgramLoyalty/index.js +1 -1
  142. package/dist/cjs/third-party/settings/Bogos/index.js +1 -1
  143. package/dist/cjs/third-party/settings/BoldProductOptions/index.js +4 -4
  144. package/dist/cjs/third-party/settings/BoldSubscriptions/index.js +1 -1
  145. package/dist/cjs/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
  146. package/dist/cjs/third-party/settings/BonySubscriptionsApp/index.js +2 -2
  147. package/dist/cjs/third-party/settings/BoostAISearchDiscovery/index.js +1 -1
  148. package/dist/cjs/third-party/settings/Bundler/index.js +1 -1
  149. package/dist/cjs/third-party/settings/CleanSizeCharts/index.js +1 -1
  150. package/dist/cjs/third-party/settings/CrossSellCartUpsell/index.js +1 -1
  151. package/dist/cjs/third-party/settings/CustomProductOptionsVariant/index.js +2 -2
  152. package/dist/cjs/third-party/settings/DealeasyVolumeDiscounts/index.js +2 -2
  153. package/dist/cjs/third-party/settings/DiscountyBulkDiscountSales/index.js +2 -2
  154. package/dist/cjs/third-party/settings/EasifyProductOptions/index.js +1 -1
  155. package/dist/cjs/third-party/settings/EasyBundleBuilderSkailama/index.js +2 -2
  156. package/dist/cjs/third-party/settings/EasySellCOD/index.js +4 -4
  157. package/dist/cjs/third-party/settings/EcoboostifyShoppableReelUgc/index.js +2 -2
  158. package/dist/cjs/third-party/settings/EcomsendBackInStockAlert/index.js +1 -1
  159. package/dist/cjs/third-party/settings/EssentPreorderBackInStock/index.js +2 -2
  160. package/dist/cjs/third-party/settings/EssentialAnnouncementBar/index.js +1 -1
  161. package/dist/cjs/third-party/settings/EssentialCountdownTimerBar/index.js +2 -2
  162. package/dist/cjs/third-party/settings/EstimatedDeliveryDatePlus/index.js +2 -2
  163. package/dist/cjs/third-party/settings/FastBundleBundlesDiscounts/index.js +2 -2
  164. package/dist/cjs/third-party/settings/FeraReviews/index.js +1 -1
  165. package/dist/cjs/third-party/settings/FirePush/index.js +1 -1
  166. package/dist/cjs/third-party/settings/FlyBundlesUpsellsFbt/index.js +1 -1
  167. package/dist/cjs/third-party/settings/FordeerProductLabels/index.js +2 -2
  168. package/dist/cjs/third-party/settings/FrequentlyBoughtTogether/index.js +1 -1
  169. package/dist/cjs/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
  170. package/dist/cjs/third-party/settings/GloboProductOptionsVariant/index.js +1 -1
  171. package/dist/cjs/third-party/settings/GoogleReviewsByReputon/index.js +1 -1
  172. package/dist/cjs/third-party/settings/Growave/index.js +1 -1
  173. package/dist/cjs/third-party/settings/GrowthSuiteDiscountCodes/index.js +2 -2
  174. package/dist/cjs/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
  175. package/dist/cjs/third-party/settings/HextomFreeShippingBar/index.js +2 -2
  176. package/dist/cjs/third-party/settings/HulkFormBuilder/index.js +1 -1
  177. package/dist/cjs/third-party/settings/HulkProductOptions/index.js +1 -1
  178. package/dist/cjs/third-party/settings/InfiniteOptions/index.js +1 -1
  179. package/dist/cjs/third-party/settings/Instafeed/index.js +1 -1
  180. package/dist/cjs/third-party/settings/InstasellShoppableInstagram/index.js +1 -1
  181. package/dist/cjs/third-party/settings/JudgemeReviews/index.js +1 -1
  182. package/dist/cjs/third-party/settings/JunipProductReviewsUgc/index.js +1 -1
  183. package/dist/cjs/third-party/settings/KachingBundles/index.js +1 -1
  184. package/dist/cjs/third-party/settings/KachingSubscriptionsApp/index.js +1 -1
  185. package/dist/cjs/third-party/settings/KingProductOptions/index.js +1 -1
  186. package/dist/cjs/third-party/settings/KiteFreeGiftDiscount/index.js +2 -2
  187. package/dist/cjs/third-party/settings/KlarnaMessaging/index.js +2 -2
  188. package/dist/cjs/third-party/settings/Klaviyo/index.js +4 -4
  189. package/dist/cjs/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
  190. package/dist/cjs/third-party/settings/LaiProductReviews/index.js +1 -1
  191. package/dist/cjs/third-party/settings/LoloyalLoyaltyReferrals/index.js +1 -1
  192. package/dist/cjs/third-party/settings/LoopSubscriptions/index.js +1 -1
  193. package/dist/cjs/third-party/settings/LooxReviews/index.js +1 -1
  194. package/dist/cjs/third-party/settings/MaxbundleProductBundles/index.js +1 -1
  195. package/dist/cjs/third-party/settings/MbcBundleVolumeDiscount/index.js +1 -1
  196. package/dist/cjs/third-party/settings/MyappgurusProductReviews/index.js +1 -1
  197. package/dist/cjs/third-party/settings/NotifyBackInStockPreOrder/index.js +1 -1
  198. package/dist/cjs/third-party/settings/OkendoReviewsLoyalty/index.js +1 -1
  199. package/dist/cjs/third-party/settings/Omnisend/index.js +1 -1
  200. package/dist/cjs/third-party/settings/Opinew/index.js +1 -1
  201. package/dist/cjs/third-party/settings/ParcelPanel/index.js +1 -1
  202. package/dist/cjs/third-party/settings/PickyStory/index.js +4 -4
  203. package/dist/cjs/third-party/settings/PowerfulContactFormBuilder/index.js +1 -1
  204. package/dist/cjs/third-party/settings/PreorderNowPreOrderPq/index.js +2 -2
  205. package/dist/cjs/third-party/settings/PreorderNowWodPresale/index.js +1 -1
  206. package/dist/cjs/third-party/settings/ProductOptionsCustomizer/index.js +2 -2
  207. package/dist/cjs/third-party/settings/ProductOptionsVariantOption/index.js +2 -2
  208. package/dist/cjs/third-party/settings/PumperBundlesVolumeDiscount/index.js +2 -2
  209. package/dist/cjs/third-party/settings/PushOwl/index.js +1 -1
  210. package/dist/cjs/third-party/settings/QikifyUpsell/index.js +2 -2
  211. package/dist/cjs/third-party/settings/RapiBundleQuantityBreaks/index.js +2 -2
  212. package/dist/cjs/third-party/settings/RechargeSubscriptions/index.js +1 -1
  213. package/dist/cjs/third-party/settings/RecurpaySubscriptionApp/index.js +1 -1
  214. package/dist/cjs/third-party/settings/Releasit/index.js +1 -1
  215. package/dist/cjs/third-party/settings/RequestQuoteHidePrice/index.js +1 -1
  216. package/dist/cjs/third-party/settings/ReviewxpoProductReviewsApp/index.js +1 -1
  217. package/dist/cjs/third-party/settings/Rivyo/index.js +1 -1
  218. package/dist/cjs/third-party/settings/Ryviu/index.js +1 -1
  219. package/dist/cjs/third-party/settings/SealSubscriptions/index.js +2 -2
  220. package/dist/cjs/third-party/settings/SegunoEmailMarketing/index.js +1 -1
  221. package/dist/cjs/third-party/settings/Selleasy/index.js +1 -1
  222. package/dist/cjs/third-party/settings/SeoantTrustBadgesIcon/index.js +2 -2
  223. package/dist/cjs/third-party/settings/ShopifyForms/index.js +1 -1
  224. package/dist/cjs/third-party/settings/ShopifySubscriptions/index.js +2 -2
  225. package/dist/cjs/third-party/settings/SimpleBundlesKits/index.js +1 -1
  226. package/dist/cjs/third-party/settings/SkioSubscriptionsYcS20/index.js +1 -1
  227. package/dist/cjs/third-party/settings/SmartSearchBarAndFilters/index.js +4 -4
  228. package/dist/cjs/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
  229. package/dist/cjs/third-party/settings/Stamped.js +1 -1
  230. package/dist/cjs/third-party/settings/StellarDeliveryDatePickup/index.js +1 -1
  231. package/dist/cjs/third-party/settings/SubifySubscriptionsApp/index.js +2 -2
  232. package/dist/cjs/third-party/settings/TagembedSocialPostReview/index.js +2 -2
  233. package/dist/cjs/third-party/settings/TagshopShoppableVideosUgc/index.js +2 -2
  234. package/dist/cjs/third-party/settings/TeeinblueProductPersonalizer/index.js +2 -2
  235. package/dist/cjs/third-party/settings/TrustBadgesBear/index.js +2 -2
  236. package/dist/cjs/third-party/settings/TrustMe/index.js +4 -4
  237. package/dist/cjs/third-party/settings/TrustedsiteTrustBadges/index.js +1 -1
  238. package/dist/cjs/third-party/settings/Trustoo/index.js +1 -1
  239. package/dist/cjs/third-party/settings/TrustreviewsProductReviews/index.js +1 -1
  240. package/dist/cjs/third-party/settings/TrustshopProductReviews/index.js +1 -1
  241. package/dist/cjs/third-party/settings/UltimateSalesBoost/index.js +1 -1
  242. package/dist/cjs/third-party/settings/UnlimitedBundlesDiscounts/index.js +2 -2
  243. package/dist/cjs/third-party/settings/UppromoteAffiliateMarketing/setting.js +2 -2
  244. package/dist/cjs/third-party/settings/Vitals/index.js +1 -1
  245. package/dist/cjs/third-party/settings/WcWishlistBackInStock/index.js +1 -1
  246. package/dist/cjs/third-party/settings/WhatmoreShoppableVideosreel/index.js +1 -1
  247. package/dist/cjs/third-party/settings/WideBundle/index.js +4 -4
  248. package/dist/cjs/third-party/settings/Wiser/index.js +1 -1
  249. package/dist/cjs/third-party/settings/WishlistKing/index.js +2 -2
  250. package/dist/cjs/third-party/settings/WishlistPlus/index.js +2 -2
  251. package/dist/cjs/third-party/settings/YotpoReviews/index.js +1 -1
  252. package/dist/cjs/video/common/attrs.js +1 -1
  253. package/dist/cjs/video/components/HTML5Embed.js +1 -1
  254. package/dist/cjs/video/components/HTML5Embed.liquid.js +11 -11
  255. package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
  256. package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
  257. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
  258. package/dist/cjs/video/components/Video.liquid.js +1 -1
  259. package/dist/esm/article/components/ArticleImage.js +1 -1
  260. package/dist/esm/article/components/ArticleImage.liquid.js +7 -7
  261. package/dist/esm/article/components/ArticleList.js +1 -1
  262. package/dist/esm/article/index.js +1 -1
  263. package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
  264. package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
  265. package/dist/esm/builder.js +1 -1
  266. package/dist/esm/button/common/helpers.js +2 -2
  267. package/dist/esm/cart/components/CartList.js +1 -1
  268. package/dist/esm/cart/index.js +1 -1
  269. package/dist/esm/collection/index.js +1 -1
  270. package/dist/esm/common/components/Loading.js +1 -1
  271. package/dist/esm/common/const.js +1 -1
  272. package/dist/esm/common/helpers.js +1 -0
  273. package/dist/esm/common/hooks/useElementWidth.js +1 -0
  274. package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
  275. package/dist/esm/grid/components/row/Row.liquid.js +10 -10
  276. package/dist/esm/grid/components/section/Section.js +1 -1
  277. package/dist/esm/grid/index.js +1 -1
  278. package/dist/esm/header/components/kind/basic/index.js +1 -1
  279. package/dist/esm/header/components/kind/modern/index.js +1 -1
  280. package/dist/esm/header/index.js +1 -1
  281. package/dist/esm/hero-banner/common/styles.js +1 -1
  282. package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
  283. package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
  284. package/dist/esm/hero-banner/index.js +1 -1
  285. package/dist/esm/image/common/adaptiveSources.js +1 -0
  286. package/dist/esm/image/common/attrs.js +1 -1
  287. package/dist/esm/image/common/classes.js +1 -1
  288. package/dist/esm/image/common/helpers.js +2 -2
  289. package/dist/esm/image/common/liquidSrcset.js +1 -0
  290. package/dist/esm/image/common/listContext.js +1 -0
  291. package/dist/esm/image/common/listImageContext.js +1 -0
  292. package/dist/esm/image/common/sizes.js +1 -0
  293. package/dist/esm/image/common/srcset.js +1 -0
  294. package/dist/esm/image/components/AdaptiveImage.js +1 -1
  295. package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
  296. package/dist/esm/image/components/Image.js +1 -1
  297. package/dist/esm/image/components/Image.liquid.js +3 -3
  298. package/dist/esm/image/components/NextImage.js +1 -1
  299. package/dist/esm/image/components/NextImage.liquid.js +5 -6
  300. package/dist/esm/image/constants.js +1 -1
  301. package/dist/esm/image/index.js +1 -1
  302. package/dist/esm/image/settings/configs/settings.js +1 -1
  303. package/dist/esm/image/settings/configs/ui-v2.js +1 -1
  304. package/dist/esm/image-comparison/common/attrs.js +1 -1
  305. package/dist/esm/image-comparison/components/CompareImage.js +1 -1
  306. package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
  307. package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
  308. package/dist/esm/image-comparison/index.js +1 -1
  309. package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
  310. package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
  311. package/dist/esm/index.js +1 -1
  312. package/dist/esm/post-purchase/callout-banner/index.js +1 -1
  313. package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
  314. package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
  315. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  316. package/dist/esm/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
  317. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
  318. package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
  319. package/dist/esm/post-purchase/product/index.js +1 -1
  320. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  321. package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
  322. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  323. package/dist/esm/product/components/product-badge/common/styles.js +1 -1
  324. package/dist/esm/product/components/product-bundle/ProductBundleDiscount.js +1 -1
  325. package/dist/esm/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
  326. package/dist/esm/product/components/product-bundle/common/classes.js +1 -1
  327. package/dist/esm/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
  328. package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  329. package/dist/esm/product/components/product-discount-tag/common/helpers.js +1 -0
  330. package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
  331. package/dist/esm/product/components/product-images-v2/common/attrs.js +1 -1
  332. package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
  333. package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
  334. package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
  335. package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +35 -35
  336. package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
  337. package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
  338. package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
  339. package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
  340. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  341. package/dist/esm/product/components/product-images-v3/common/attrs.js +1 -1
  342. package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
  343. package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  344. package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
  345. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
  346. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
  347. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
  348. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
  349. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
  350. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
  351. package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
  352. package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  353. package/dist/esm/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
  354. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  355. package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +1 -1
  356. package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +11 -9
  357. package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
  358. package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +18 -16
  359. package/dist/esm/product/components/product-list/common/helpers.js +1 -1
  360. package/dist/esm/product/components/product-list/common/imagePriority.js +17 -0
  361. package/dist/esm/product/components/product-list/common/imagePriorityHints.js +1 -0
  362. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  363. package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
  364. package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +12 -10
  365. package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
  366. package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
  367. package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
  368. package/dist/esm/product/components/product-wrap/Product.js +1 -1
  369. package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
  370. package/dist/esm/product/helpers/product-bundle.js +1 -1
  371. package/dist/esm/product/helpers/productImagesDrag.js +1 -0
  372. package/dist/esm/product/index.js +1 -1
  373. package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +2 -2
  374. package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +2 -2
  375. package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
  376. package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  377. package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductFeatureImage.js +2 -2
  378. package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -2
  379. package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
  380. package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  381. package/dist/esm/stock-counter/common/attrs.js +1 -1
  382. package/dist/esm/stock-counter/common/helpers.js +21 -21
  383. package/dist/esm/stock-counter/components/StockCounter.liquid.js +1 -1
  384. package/dist/esm/stock-counter/hooks/useStockCounter.js +1 -1
  385. package/dist/esm/third-party/common/helpers.js +5 -5
  386. package/dist/esm/third-party/components/KlarnaMessaging.liquid.js +30 -5
  387. package/dist/esm/third-party/settings/AftershipEmailMarketingsms/index.js +2 -2
  388. package/dist/esm/third-party/settings/AirProductReviewsAppUgc/index.js +2 -2
  389. package/dist/esm/third-party/settings/AliReviews/index.js +2 -2
  390. package/dist/esm/third-party/settings/AlsoBoughtCbb/index.js +2 -2
  391. package/dist/esm/third-party/settings/AovBundlesVolumeDiscounts/index.js +2 -2
  392. package/dist/esm/third-party/settings/AovFreeGiftBuyXGetYBogo/index.js +2 -2
  393. package/dist/esm/third-party/settings/AppointmentBookingCowlendar/index.js +2 -2
  394. package/dist/esm/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
  395. package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +2 -2
  396. package/dist/esm/third-party/settings/AppstleSubscriptions/index.js +2 -2
  397. package/dist/esm/third-party/settings/BestBuyFulfillment/index.js +2 -2
  398. package/dist/esm/third-party/settings/BfSizeChartSizeGuide/index.js +2 -2
  399. package/dist/esm/third-party/settings/BirdChime/index.js +4 -4
  400. package/dist/esm/third-party/settings/BloyRewardsProgramLoyalty/index.js +2 -2
  401. package/dist/esm/third-party/settings/Bogos/index.js +4 -4
  402. package/dist/esm/third-party/settings/BoldProductOptions/index.js +4 -4
  403. package/dist/esm/third-party/settings/BoldSubscriptions/index.js +2 -2
  404. package/dist/esm/third-party/settings/BonLoyaltyRewardsReferrals/index.js +2 -2
  405. package/dist/esm/third-party/settings/BonySubscriptionsApp/index.js +2 -2
  406. package/dist/esm/third-party/settings/BoostAISearchDiscovery/index.js +2 -2
  407. package/dist/esm/third-party/settings/Bundler/index.js +4 -4
  408. package/dist/esm/third-party/settings/CleanSizeCharts/index.js +2 -2
  409. package/dist/esm/third-party/settings/CrossSellCartUpsell/index.js +2 -2
  410. package/dist/esm/third-party/settings/CustomProductOptionsVariant/index.js +2 -2
  411. package/dist/esm/third-party/settings/DealeasyVolumeDiscounts/index.js +2 -2
  412. package/dist/esm/third-party/settings/DiscountyBulkDiscountSales/index.js +2 -2
  413. package/dist/esm/third-party/settings/EasifyProductOptions/index.js +2 -2
  414. package/dist/esm/third-party/settings/EasyBundleBuilderSkailama/index.js +2 -2
  415. package/dist/esm/third-party/settings/EasySellCOD/index.js +4 -4
  416. package/dist/esm/third-party/settings/EcoboostifyShoppableReelUgc/index.js +2 -2
  417. package/dist/esm/third-party/settings/EcomsendBackInStockAlert/index.js +2 -2
  418. package/dist/esm/third-party/settings/EssentPreorderBackInStock/index.js +2 -2
  419. package/dist/esm/third-party/settings/EssentialAnnouncementBar/index.js +2 -2
  420. package/dist/esm/third-party/settings/EssentialCountdownTimerBar/index.js +2 -2
  421. package/dist/esm/third-party/settings/EstimatedDeliveryDatePlus/index.js +2 -2
  422. package/dist/esm/third-party/settings/FastBundleBundlesDiscounts/index.js +2 -2
  423. package/dist/esm/third-party/settings/FeraReviews/index.js +4 -4
  424. package/dist/esm/third-party/settings/FirePush/index.js +2 -2
  425. package/dist/esm/third-party/settings/FlyBundlesUpsellsFbt/index.js +2 -2
  426. package/dist/esm/third-party/settings/FordeerProductLabels/index.js +2 -2
  427. package/dist/esm/third-party/settings/FrequentlyBoughtTogether/index.js +2 -2
  428. package/dist/esm/third-party/settings/GloColorSwatchvariantImage/index.js +2 -2
  429. package/dist/esm/third-party/settings/GloboProductOptionsVariant/index.js +2 -2
  430. package/dist/esm/third-party/settings/GoogleReviewsByReputon/index.js +2 -2
  431. package/dist/esm/third-party/settings/Growave/index.js +4 -4
  432. package/dist/esm/third-party/settings/GrowthSuiteDiscountCodes/index.js +2 -2
  433. package/dist/esm/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
  434. package/dist/esm/third-party/settings/HextomFreeShippingBar/index.js +2 -2
  435. package/dist/esm/third-party/settings/HulkFormBuilder/index.js +2 -2
  436. package/dist/esm/third-party/settings/HulkProductOptions/index.js +2 -2
  437. package/dist/esm/third-party/settings/InfiniteOptions/index.js +2 -2
  438. package/dist/esm/third-party/settings/Instafeed/index.js +2 -2
  439. package/dist/esm/third-party/settings/InstasellShoppableInstagram/index.js +2 -2
  440. package/dist/esm/third-party/settings/JudgemeReviews/index.js +2 -2
  441. package/dist/esm/third-party/settings/JunipProductReviewsUgc/index.js +2 -2
  442. package/dist/esm/third-party/settings/KachingBundles/index.js +2 -2
  443. package/dist/esm/third-party/settings/KachingSubscriptionsApp/index.js +2 -2
  444. package/dist/esm/third-party/settings/KingProductOptions/index.js +2 -2
  445. package/dist/esm/third-party/settings/KiteFreeGiftDiscount/index.js +2 -2
  446. package/dist/esm/third-party/settings/KlarnaMessaging/index.js +4 -4
  447. package/dist/esm/third-party/settings/Klaviyo/index.js +4 -4
  448. package/dist/esm/third-party/settings/KoalaBundleQuantityDiscount/index.js +2 -2
  449. package/dist/esm/third-party/settings/LaiProductReviews/index.js +2 -2
  450. package/dist/esm/third-party/settings/LoloyalLoyaltyReferrals/index.js +2 -2
  451. package/dist/esm/third-party/settings/LoopSubscriptions/index.js +2 -2
  452. package/dist/esm/third-party/settings/LooxReviews/index.js +4 -4
  453. package/dist/esm/third-party/settings/MaxbundleProductBundles/index.js +2 -2
  454. package/dist/esm/third-party/settings/MbcBundleVolumeDiscount/index.js +2 -2
  455. package/dist/esm/third-party/settings/MyappgurusProductReviews/index.js +2 -2
  456. package/dist/esm/third-party/settings/NotifyBackInStockPreOrder/index.js +2 -2
  457. package/dist/esm/third-party/settings/OkendoReviewsLoyalty/index.js +2 -2
  458. package/dist/esm/third-party/settings/Omnisend/index.js +4 -4
  459. package/dist/esm/third-party/settings/Opinew/index.js +4 -4
  460. package/dist/esm/third-party/settings/ParcelPanel/index.js +4 -4
  461. package/dist/esm/third-party/settings/PickyStory/index.js +4 -4
  462. package/dist/esm/third-party/settings/PowerfulContactFormBuilder/index.js +2 -2
  463. package/dist/esm/third-party/settings/PreorderNowPreOrderPq/index.js +2 -2
  464. package/dist/esm/third-party/settings/PreorderNowWodPresale/index.js +2 -2
  465. package/dist/esm/third-party/settings/ProductOptionsCustomizer/index.js +2 -2
  466. package/dist/esm/third-party/settings/ProductOptionsVariantOption/index.js +2 -2
  467. package/dist/esm/third-party/settings/PumperBundlesVolumeDiscount/index.js +2 -2
  468. package/dist/esm/third-party/settings/PushOwl/index.js +4 -4
  469. package/dist/esm/third-party/settings/QikifyUpsell/index.js +2 -2
  470. package/dist/esm/third-party/settings/RapiBundleQuantityBreaks/index.js +2 -2
  471. package/dist/esm/third-party/settings/RechargeSubscriptions/index.js +2 -2
  472. package/dist/esm/third-party/settings/RecurpaySubscriptionApp/index.js +2 -2
  473. package/dist/esm/third-party/settings/Releasit/index.js +4 -4
  474. package/dist/esm/third-party/settings/RequestQuoteHidePrice/index.js +3 -3
  475. package/dist/esm/third-party/settings/ReviewxpoProductReviewsApp/index.js +2 -2
  476. package/dist/esm/third-party/settings/Rivyo/index.js +4 -4
  477. package/dist/esm/third-party/settings/Ryviu/index.js +4 -4
  478. package/dist/esm/third-party/settings/SealSubscriptions/index.js +2 -2
  479. package/dist/esm/third-party/settings/SegunoEmailMarketing/index.js +2 -2
  480. package/dist/esm/third-party/settings/Selleasy/index.js +2 -2
  481. package/dist/esm/third-party/settings/SeoantTrustBadgesIcon/index.js +2 -2
  482. package/dist/esm/third-party/settings/ShopifyForms/index.js +2 -2
  483. package/dist/esm/third-party/settings/ShopifySubscriptions/index.js +2 -2
  484. package/dist/esm/third-party/settings/SimpleBundlesKits/index.js +2 -2
  485. package/dist/esm/third-party/settings/SkioSubscriptionsYcS20/index.js +2 -2
  486. package/dist/esm/third-party/settings/SmartSearchBarAndFilters/index.js +4 -4
  487. package/dist/esm/third-party/settings/SproutPlantTreesGrowSales/index.js +2 -2
  488. package/dist/esm/third-party/settings/Stamped.js +4 -4
  489. package/dist/esm/third-party/settings/StellarDeliveryDatePickup/index.js +2 -2
  490. package/dist/esm/third-party/settings/SubifySubscriptionsApp/index.js +2 -2
  491. package/dist/esm/third-party/settings/TagembedSocialPostReview/index.js +2 -2
  492. package/dist/esm/third-party/settings/TagshopShoppableVideosUgc/index.js +2 -2
  493. package/dist/esm/third-party/settings/TeeinblueProductPersonalizer/index.js +2 -2
  494. package/dist/esm/third-party/settings/TrustBadgesBear/index.js +2 -2
  495. package/dist/esm/third-party/settings/TrustMe/index.js +4 -4
  496. package/dist/esm/third-party/settings/TrustedsiteTrustBadges/index.js +2 -2
  497. package/dist/esm/third-party/settings/Trustoo/index.js +2 -2
  498. package/dist/esm/third-party/settings/TrustreviewsProductReviews/index.js +2 -2
  499. package/dist/esm/third-party/settings/TrustshopProductReviews/index.js +2 -2
  500. package/dist/esm/third-party/settings/UltimateSalesBoost/index.js +2 -2
  501. package/dist/esm/third-party/settings/UnlimitedBundlesDiscounts/index.js +2 -2
  502. package/dist/esm/third-party/settings/UppromoteAffiliateMarketing/setting.js +2 -2
  503. package/dist/esm/third-party/settings/Vitals/index.js +4 -4
  504. package/dist/esm/third-party/settings/WcWishlistBackInStock/index.js +3 -3
  505. package/dist/esm/third-party/settings/WhatmoreShoppableVideosreel/index.js +2 -2
  506. package/dist/esm/third-party/settings/WideBundle/index.js +4 -4
  507. package/dist/esm/third-party/settings/Wiser/index.js +4 -4
  508. package/dist/esm/third-party/settings/WishlistKing/index.js +2 -2
  509. package/dist/esm/third-party/settings/WishlistPlus/index.js +2 -2
  510. package/dist/esm/third-party/settings/YotpoReviews/index.js +4 -4
  511. package/dist/esm/video/common/attrs.js +1 -1
  512. package/dist/esm/video/components/HTML5Embed.js +1 -1
  513. package/dist/esm/video/components/HTML5Embed.liquid.js +8 -8
  514. package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
  515. package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
  516. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
  517. package/dist/esm/video/components/Video.liquid.js +1 -1
  518. package/dist/types/index.d.ts +26 -8
  519. package/package.json +11 -8
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as r}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as l,usePageType as i,usePageStore as a,useFetchHandle as c,hasPublicStoreFrontData as s,createStoreFrontFetcher as n,useProductQuery as u,useProductsQueryAll as m,useProductsQuery as g,PICKED_PRODUCT_STATUSES as h,useCollectionQuery as p,flattenConnection as f,ProductListProvider as P,filterToolbarPreview as b}from"@gem-sdk/core";import{useState as k,useMemo as I,useEffect as T}from"react";import v from"../../../common/components/Loading.js";import y from"next/dynamic";import O from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import C from"./ProductListCarouselLayout.js";import E from"./ProductListGridLayout.js";import{getClass as N}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getStyle as L}from"./common/styles.js";import{If as j}from"@gem-sdk/system";import W from"next/head";let x=y(()=>import("../ProductNotFound.js"),{loading:v}),G=y=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=y,{isRelatedProduct:H,productSetting:Q}=w(y),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=d(),$=l(),_=i(),V=a(e=>e.dynamicProduct),q=a(e=>e.dynamicCollection),[U,J]=k(1),[K,X]=k(!0),[Y,Z]=k(),[ee,et]=k(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[r.Collection,r.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=r.DynamicCollection);let er=Q?.productSrc??r.Collection;er===r.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=c(),ei=a(e=>e.publicStoreFrontData),ea=I(()=>s(ei)?n(ei):el,[ei]),{data:ec}=u(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=m(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=g(er===r.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?h:void 0}),ep=I(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=p(er!==r.PickProduct?ep:void 0,{revalidateOnMount:eg});T(()=>{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===r.PickProduct?eh.isValidating:ef.isValidating,eb=er===r.PickProduct?eh.isLoading:ef.isLoading,ek=er===r.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===r.PickProduct?f(eh.data?.products):f(eI?.products),ev=em?.data?.products?f(em?.data?.products):void 0,ey=H&&ev?ev:er===r.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==r.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?S(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]);T(()=>{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:j(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}=L(y),{productListWrapClass:eW}=N(y);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(W,{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(v,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(P,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:j(M?.layout==="grid",e(E,{...y,productSortedById:ey,generateGridRowArray:eC}),e(C,{...y,productSortedById:ey}))})]})})}),b(G,!0)]})};export{G as default};
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{getElementLabel as o,isQueryLoading as d}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as a}from"../../../common/const.js";import{useRenderMode as l,useCurrentDevice as i,usePageType as c,usePageStore as s,useFetchHandle as n,hasPublicStoreFrontData as u,createStoreFrontFetcher as m,useProductQuery as g,useProductsQueryAll as h,useProductsQuery as p,PICKED_PRODUCT_STATUSES as f,useCollectionQuery as P,flattenConnection as T,ProductListProvider as b,filterToolbarPreview as y}from"@gem-sdk/core";import{useState as I,useMemo as v,useEffect as k}from"react";import O from"../../../common/components/Loading.js";import S from"next/dynamic";import{getData as C,isRelatedProductsLoading as L,hasQueryableRelatedTag as E}from"./common/helpers.js";import N from"../SalePageProductListWarning.js";import{getPropertyByDevice as w}from"../../../dialog/common/helpers.js";import j from"./ProductListCarouselLayout.js";import W from"./ProductListGridLayout.js";import{getClass as x}from"./common/classes.js";import{getStyle as G}from"./common/styles.js";import{If as M}from"@gem-sdk/system";import D from"next/head";let Q=S(()=>import("../ProductNotFound.js"),{loading:O}),B=S=>{let{children:B,styles:A,builderProps:H,setting:R,builderAttrs:z}=S,{isRelatedProduct:F,productSetting:$}=C(S),_=$.relatedTag&&$.relatedTag[0],{isEditMode:q,isPreviewSharePageMode:U}=l(),V=i(),J=c(),K=s(e=>e.dynamicProduct),X=s(e=>e.dynamicCollection),[Y,Z]=I(1),[ee,et]=I(!0),[er,eo]=I(),[ed,ea]=I(!1),[el,ei]=I(),ec="GP_FUNNEL_PAGE"===J;"GP_COLLECTION"!=J||[a.Collection,a.DynamicCollection].includes($?.productSrc)||($.productSrc=a.DynamicCollection);let es=$?.productSrc??a.Collection;es===a.DynamicCollection&&($.collectionId=X?.collectionId||"latest");let en=K?.productId&&K?.productId!==$.relatedProductId?K?.productId:$.relatedProductId,eu=n(),em=s(e=>e.publicStoreFrontData),eg=v(()=>u(em)?m(em):eu,[em]),{data:eh,error:ep,isLoading:ef}=g(F&&en?en:void 0,{revalidateOnMount:q||U},eg),eP=$.relatedTag&&"tags"===$.relatedTag[0]&&(!eh?.tags||eh?.tags.length===0),eT=$.relatedTag&&"collection"===$.relatedTag[0]&&(!eh?.collections?.edges||eh?.collections.edges.length===0),eb=$.relatedTag&&"vendor"===$.relatedTag[0]&&!eh?.vendor,ey=h(er,{revalidateOnMount:q||U},eg),eI=q||U,ev=p(es===a.PickProduct?$?.productIds:void 0,{revalidateOnMount:eI},{defaultSelectedProductCount:$?.numOfSelectedProducts,selectedStatus:eI&&$?.productIds?.length?f:void 0}),ek=v(()=>({id:$?.collectionId??"latest",numberOfProducts:R?.numberOfProducts??4,orderBy:R?.orderBy}),[$?.collectionId,Number(R?.numberOfProducts),R?.orderBy]),eO=P(es!==a.PickProduct?ek:void 0,{revalidateOnMount:eI});k(()=>{if(F&&eh&&$.relatedTag&&"recommended-product"!==$.relatedType){let e;switch(ea(!1),$.hasRelatedExclude&&(e=$?.relatedExclude&&$.relatedExclude.split(",").map(e=>e.trim())),$.relatedTag[0]){case"vendor":eo({first:R?.numberOfProducts,vendor:$.relatedTag&&"vendor"===$.relatedTag[0]?eh?.vendor:"",idNEQ:eh.id}),ei(eh.id);break;case"collection":{let t=eh?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ea(!0);break}eo(e&&e.length>0?{first:R?.numberOfProducts,idNEQ:eh.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:R?.numberOfProducts,idNEQ:eh.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}),ei(eh.id);break}case"tags":if(!eh.tags||0===eh.tags.length){ea(!0);break}eo(e&&e.length>0?{first:R?.numberOfProducts,idNEQ:eh.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eh.tags},{nameNotIn:e}]}]}:{first:R?.numberOfProducts,idNEQ:eh.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:eh.tags}]}]}),ei(eh.id)}}},[eh,$.relatedType,$.relatedTag,R?.numberOfProducts,$.relatedExclude,$.hasRelatedExclude,F]);let eS=es===a.PickProduct,eC=eS?ev:eO,eL=eC.isValidating,eE=eC.error,eN=d({hasQuery:eI&&(!eS||!!$?.productIds),data:eC.data,error:eC.error,isLoading:eC.isLoading}),ew=L({isRelatedProduct:F,relatedType:$.relatedType,hasRelatedTag:E({relatedTag:$.relatedTag}),relatedProductIdAssigned:en,canRevalidateOnMount:eI,mainProduct:{data:eh,error:ep,isLoading:ef},relatedQuery:er,relatedQuerySource:el,mainProductId:eh?.id,isNotFoundRelatedProduct:ed,relatedProducts:{data:ey.data,error:ey.error,isLoading:ey.isLoading}}),ej=eN||ew,eW=eO.data?.collections?.edges?.[0]?.node,ex=es===a.PickProduct?T(ev.data?.products):T(eW?.products),eG=ey?.data?.products?T(ey?.data?.products):void 0,eM=F&&eG?eG:es===a.PickProduct&&$?.productIds?.length?$?.productIds?.map(e=>ex?.find(t=>t?.baseID===e)).filter(Boolean)??ex:es!==a.PickProduct?ex:ex.filter((e,t)=>t<($?.numOfSelectedProducts??4)),eD=v(()=>ed&&F&&q||!eM.length&&!ej&&ee&&q,[ee,ej,ed,F,q,eM.length]),eQ=v(()=>!eM||ed&&F,[ed,F,eM]),eB=v(()=>{if(!R?.sameHeight)return[];let e=0,t=Math.ceil((eM?.length??0)/+(R?.slidesToShow?.[V]??1));return Array.from(Array(eM?.length??0)).map((r,o)=>(o>=+(R?.slidesToShow?.[V]??1)*(e+1)&&++e,{gridRow:`${1+Y*e}/${Y+1+Y*e}`,marginBottom:e+1<t?w(A?.horizontalGutter,V):void 0}))},[R?.sameHeight,R?.slidesToShow,Y,eM?.length,V,A?.horizontalGutter]),eA=v(()=>eL||ej||eE||!eM||ed&&F,[eE,ej,ed,F,eL,eM]);k(()=>{eA||setTimeout(()=>{let{builderData:e}=H??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&Z(r.childElementCount||1)},q?0:500)},[H,eA,q]);let eH=v(()=>({collection:eW,products:eM,settings:{loop:R?.loop??{desktop:!1},scrollMode:R?.scrollMode??{desktop:"snap"},slidesToShow:R?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:A?.layout,dot:R?.dot,dotStyle:R?.dotStyle,arrow:R?.arrow,controlOverContent:R?.controlOverContent,sameHeight:R?.sameHeight},styles:{horizontalGutter:A?.horizontalGutter,verticalGutter:A?.verticalGutter,fullWidth:A?.fullWidth,spacing:A?.spacing,width:A?.width,height:A?.height}}),[eW,eM,R,A]);if(H?.isPreview&&ec)return e(t,{});if(eD)return e(t,{children:M(ee,e(Q,{builderAttrs:z,collectionHandle:eW?.handle,productSrc:es,onClose:()=>et(!1),children:B,relatedTagString:_,assignProductNoTags:eP||eT||eb,noAssignedProduct:!en}))});let{productListWrapStyle:eR,productListContentStyle:ez,productListWrapAlignStyle:eF}=G(S),{productListWrapClass:e$}=x(S);return r("div",{...z,className:e$,style:eR,children:[!!A?.preloadBgImage&&r(D,{children:[!!A.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage.desktop.image.src,as:"image"}),!!A.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage?.tablet?.image?.src,as:"image"}),!!A.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:A.backgroundImage?.mobile?.image?.src,as:"image"})]}),eL||ej?e(O,{label:o({builderData:H?.builderData})}):eE?r("div",{children:["Error: ",eE?.message]}):eQ?e("div",{children:"Products not found"}):e(b,{...eH,children:e("div",{className:"gp-flex gp-w-full",style:eF,children:r("div",{style:ez,children:[ec&&e(N,{}),e(t,{children:M(A?.layout==="grid",e(W,{...S,productSortedById:eM,generateGridRowArray:eB}),e(j,{...S,productSortedById:eM}))})]})})}),y(B,!0)]})};export{B as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as e,isEmptyChildren as s}from"@gem-sdk/core";import t from"../../../grid/components/ChildrenDroppable.js";import m from"../../../carousel/components/item/CarouselItem.js";import i from"../../../carousel/components/root/Carousel.js";import{getClass as l}from"./common/classes.js";import{getData as a}from"./common/helpers.js";import{getStyle as c}from"./common/styles.js";import{getAttr as n}from"./common/attrs.js";let p=p=>{let{children:d,builderProps:u,productSortedById:f,advanced:j}=p,h=r(),{carouselConfigSetting:y,carouselConfigStyle:C}=a(p),{productListAttr:b,getAttrProductItemEditor:g}=n(p),{carouselItemStyle:D}=c(p),{carouselClass:I,productItemClass:v}=l(p);return o(i,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...b},rootClass:I,setting:y,styles:C,children:f?.map(r=>o(m,{style:D,children:o(e,{product:r,readOnly:!0,children:o("div",{..."edit"===h?g(r?.baseID):{},className:v,children:s(d)?o(t,{}):d})})},r?.baseID))})};export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as m,isEmptyChildren as e}from"@gem-sdk/core";import s from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as t}from"../../../image/common/listImageContext.js";import{getListImageHints as i}from"./common/imagePriorityHints.js";import{LIST_PRELOAD_ROWS as l}from"./common/imagePriority.js";import n from"../../../carousel/components/item/CarouselItem.js";import a from"../../../carousel/components/root/Carousel.js";import{getClass as c}from"./common/classes.js";import{getData as d}from"./common/helpers.js";import{getStyle as p}from"./common/styles.js";import{getAttr as u}from"./common/attrs.js";let f=f=>{let{children:j,builderProps:h,productSortedById:g,advanced:y,setting:C}=f,P=r(),{carouselConfigSetting:b,carouselConfigStyle:v}=d(f),{productListAttr:x,getAttrProductItemEditor:I}=u(f),{carouselItemStyle:w}=p(f),{carouselClass:D,productItemClass:L}=c(f);return o(a,{advanced:y,builderProps:{uid:h?.uid},rootAttrs:{...x},rootClass:D,setting:b,styles:v,children:g?.map((r,a)=>o(n,{style:w,children:o(m,{product:r,readOnly:!0,children:o(t.Provider,{value:i({slidesToShow:C?.slidesToShow,rows:l.CAROUSEL,index:a+1}),children:o("div",{..."edit"===P?I(r?.baseID):{},className:L,children:e(j)?o(s,{}):j})})})},r?.baseID))})};export{f as default};
@@ -1,22 +1,24 @@
1
- import o from"../../../carousel/components/item/CarouselItem.liquid.js";import t from"../../../carousel/components/root/Carousel.liquid.js";import r from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";import{getClass as i}from"./common/classes.js";import{getData as s}from"./common/helpers.js";import{getStyle as d}from"./common/styles.js";import{template as u}from"@gem-sdk/core";let l=l=>{let{builderProps:c,advanced:n,productSrc:a,productListId:p}=l,{carouselConfigSetting:m,carouselConfigStyle:f}=s(l),{carouselItemStyle:$}=d(l),{carouselClass:g}=i(l);return u`
2
- ${t({advanced:n,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:g,setting:m,styles:f,children:`
1
+ import{getListImagePriorityLiquid as o,LIST_PRELOAD_ROWS as t}from"./common/imagePriority.js";import r from"../../../carousel/components/item/CarouselItem.liquid.js";import e from"../../../carousel/components/root/Carousel.liquid.js";import i from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as m}from"@gem-sdk/core";let n=n=>{let{builderProps:c,advanced:a,productSrc:p,productListId:f}=n,{carouselConfigSetting:$,carouselConfigStyle:g}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:h}=d(n),j=o({slidesToShow:n.setting?.slidesToShow,rows:t.CAROUSEL});return m`
2
+ ${e({advanced:a,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:h,setting:$,styles:g,children:`
3
3
  {%- assign count = 0 -%}
4
4
  {%- for product in products limit: limit -%}
5
5
  {%- if product.id != empty -%}
6
6
  {%- assign count = count | plus: 1 -%}
7
+ ${j.item}
7
8
  {%- assign variant = product.selected_or_first_available_variant -%}
8
9
  {%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
9
- ${o({builderProps:{...c},style:$,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,background:m?.background,children:`
10
- ${r({...l})}
10
+ ${r({builderProps:{...c},style:_,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:g,background:$?.background,children:`
11
+ ${i({...n})}
11
12
  `})}
12
13
  {%- endif -%}
13
14
  {% endfor %}
14
- {%- if count == 0 and ${p.length} == 0 -%}
15
- {% if '${a}' == 'RelatedProduct' -%}
16
- <div>${e("ProductList","no_related_products")}</div>
15
+ ${j.reset}
16
+ {%- if count == 0 and ${f.length} == 0 -%}
17
+ {% if '${p}' == 'RelatedProduct' -%}
18
+ <div>${s("ProductList","no_related_products")}</div>
17
19
  {% else %}
18
- <div>${e("ProductList","no_products_found")}</div>
20
+ <div>${s("ProductList","no_products_found")}</div>
19
21
  {%- endif -%}
20
22
  {%- endif -%}
21
23
  `})}
22
- `};export{l as default};
24
+ `};export{n as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Children as o,isValidElement as e,createElement as m}from"react";import{useEditorMode as t,ProductProvider as s,isEmptyChildren as i}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getClass as a}from"./common/classes.js";import{getStyle as d}from"./common/styles.js";import{getAttr as c}from"./common/attrs.js";let p=p=>{let{children:n,productSortedById:f,generateGridRowArray:h,setting:u}=p,y=t(),{gridLayoutStyle:g}=d(p),{gridLayoutClass:j,productItemClass:b}=a(p),{productListAttr:k,getAttrProductItemEditor:v}=c(p);return r("div",{...k,style:g,className:j,children:f?.length?f?.map((t,a)=>r(s,{product:t,readOnly:!0,children:r("div",{..."edit"===y?v(t?.baseID):{},className:b,style:{"--grchild":u?.sameHeight?h?.[a]?.gridRow:void 0,"--mbchild":h?.[a]?.marginBottom},children:i(n)?r(l,{}):o.map(n,r=>e(r)?m(r.type,{...r.props,key:r.key}):null)})},t?.baseID)):null})};export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{Children as r,isValidElement as m,createElement as e}from"react";import{useEditorMode as i,ProductProvider as t,isEmptyChildren as s}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as a}from"../../../image/common/listImageContext.js";import{getListImageHints as d}from"./common/imagePriorityHints.js";import{LIST_PRELOAD_ROWS as n}from"./common/imagePriority.js";import{getClass as c}from"./common/classes.js";import{getStyle as p}from"./common/styles.js";import{getAttr as f}from"./common/attrs.js";let g=g=>{let{children:h,productSortedById:y,generateGridRowArray:u,setting:j}=g,v=i(),{gridLayoutStyle:b}=p(g),{gridLayoutClass:w,productItemClass:x}=c(g),{productListAttr:D,getAttrProductItemEditor:I}=f(g);return o("div",{...D,style:b,className:w,children:y?.length?y?.map((i,c)=>o(t,{product:i,readOnly:!0,children:o(a.Provider,{value:d({slidesToShow:j?.slidesToShow,rows:n.GRID,index:c+1}),children:o("div",{..."edit"===v?I(i?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?u?.[c]?.gridRow:void 0,"--mbchild":u?.[c]?.marginBottom},children:s(h)?o(l,{}):r.map(h,o=>m(o)?e(o.type,{...o.props,key:o.key}):null)})})},i?.baseID)):null})};export{g as default};
@@ -1,36 +1,38 @@
1
- import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as i}from"../../../helpers.js";import{RenderIf as o,template as s}from"@gem-sdk/core";import{getClass as r}from"./common/classes.js";import{getStyle as e}from"./common/styles.js";import{getAttr as d}from"./common/attrs.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=e(a),{gridLayoutClass:f}=r(a),{productListAttr:g}=d(a),$=()=>s`
1
+ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"./common/imagePriority.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as r,template as e}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as m}from"./common/attrs.js";let n=n=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=n,{gridLayoutStyle:g}=a(n),{gridLayoutClass:$}=d(n),{productListAttr:h}=m(n),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>e`
2
2
  {%- assign count = 0 -%}
3
3
  {%- for product in products limit: limit -%}
4
4
  {%- if product.id != empty -%}
5
5
  {%- assign count = count | plus: 1 -%}
6
+ ${v.item}
6
7
  {%- assign variant = product.selected_or_first_available_variant -%}
7
- {%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
8
- ${t({...a})}
8
+ {%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
9
+ ${o({...n})}
9
10
  {%- endif -%}
10
11
  {% endfor %}
11
- {%- if count == 0 and ${m?.length} == 0 -%}
12
- {% if '${l}' == 'RelatedProduct' -%}
13
- <div>${i("ProductList","no_related_products")}</div>
12
+ ${v.reset}
13
+ {%- if count == 0 and ${u?.length} == 0 -%}
14
+ {% if '${f}' == 'RelatedProduct' -%}
15
+ <div>${s("ProductList","no_related_products")}</div>
14
16
  {% else %}
15
- <div>${i("ProductList","no_products_found")}</div>
17
+ <div>${s("ProductList","no_products_found")}</div>
16
18
  {%- endif -%}
17
19
  {%- endif -%}
18
- `;return s`
20
+ `;return e`
19
21
  <div
20
- ${g}
21
- style="${u}"
22
- class="${f}"
22
+ ${h}
23
+ style="${g}"
24
+ class="${$}"
23
25
  >
24
- ${o(n?.sameHeight,s`
26
+ ${r(p?.sameHeight,e`
25
27
  <gp-same-height
26
28
  class="gp-contents"
27
29
  style="visibility: hidden"
28
30
  >
29
- <script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
31
+ <script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
30
32
  </script>
31
- ${`${$()}`}
33
+ ${`${_()}`}
32
34
  </gp-same-height>
33
35
  `)}
34
- ${o(!n?.sameHeight,s`${$()}`)}
36
+ ${r(!p?.sameHeight,e`${_()}`)}
35
37
  </div>
36
- `};export{a as default};
38
+ `};export{n as default};
@@ -1 +1 @@
1
- import{getUpdatedDotStyle as t}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";let r=e=>{let{setting:r,styles:d}=e,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=t(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let p={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete p.backgroundColor,delete p.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:p}},d=t=>{let{setting:o,styles:r}=t,d=o?.productSetting,i=d?.relatedTag,a=d?.hasRelatedExclude,p=(i&&"collection"===i[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",u=p?.split(",").map(t=>t.trim()).toString(),n=d?.productSrc??"Collection",s=d?.collectionId?.replace(c,"")??"latest",g=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,m=r?.layout==="grid",h=e(o?.numberOfProducts,4),P="PickProduct"===n&&d?.productIds?.length?d?.productIds.map(t=>t.replace(l,"")):[],I="PickProduct"===n&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",C=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",k=S&&C?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",f=C?.[C.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:u,collectionID:s,isLatestProducts:g,isGrid:m,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:k,isReverse:f,productSrc:n,productSetting:d,isSorted:S,relatedTag:i,productNumber:"PickProduct"===n?g?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},c="gid://shopify/Collection/",l="gid://shopify/Product/";export{c as PREFIX_COLLECTION_ID,l as PREFIX_PRODUCT_ID,r as getData,d as getDataLiquid};
1
+ import{getUpdatedDotStyle as e}from"../../../../carousel/components/dot/common/helpers.js";import{convertUnitToNumber as t}from"../../product-images/common/productFeaturedImage.js";import{getSizeSetting as o}from"../../../helpers/product.js";import{isQueryLoading as r}from"../../../../common/helpers.js";import"../../../../common/const.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";let d=t=>{let{setting:r,styles:d}=t,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=e(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let n={...d,sizeSetting:{...o({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete n.backgroundColor,delete n.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:n}},c=e=>{let{setting:o,styles:r}=e,d=o?.productSetting,c=d?.relatedTag,a=d?.hasRelatedExclude,n=(c&&"collection"===c[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",u=n?.split(",").map(e=>e.trim()).toString(),p=d?.productSrc??"Collection",s=d?.collectionId?.replace(l,"")??"latest",m=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,g=r?.layout==="grid",h=t(o?.numberOfProducts,4),P="PickProduct"===p&&d?.productIds?.length?d?.productIds.map(e=>e.replace(i,"")):[],I="PickProduct"===p&&d?.productHandles?.length?d?.productHandles:[],S=o?.orderBy&&o?.orderBy!=="none",k=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&S?o?.orderBy?.split("_"):"none",y=S&&k?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",C=k?.[k.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:u,collectionID:s,isLatestProducts:m,isGrid:g,numberOfProducts:h,productListId:P,productListHandles:I,sortedBy:y,isReverse:C,productSrc:p,productSetting:d,isSorted:S,relatedTag:c,productNumber:"PickProduct"===p?m?4:d?.numOfSelectedProducts??4:h,collectionHandle:d?.collectionHandle}},l="gid://shopify/Collection/",i="gid://shopify/Product/",a=["vendor","collection","tags"],n=({relatedTag:e})=>!!e?.[0]&&a.includes(e[0]),u=({isRelatedProduct:e,relatedType:t,hasRelatedTag:o,relatedProductIdAssigned:d,canRevalidateOnMount:c,mainProduct:l,mainProductId:i,relatedQuery:a,relatedQuerySource:n,isNotFoundRelatedProduct:u,relatedProducts:p})=>{if(!e)return!1;let s="recommended-product"!==t&&o&&!!d,m=s&&!!l.data&&n!==i&&!u;return c?r({hasQuery:s,...l})||m||r({hasQuery:!!a,...p}):l.isLoading||p.isLoading};export{l as PREFIX_COLLECTION_ID,i as PREFIX_PRODUCT_ID,d as getData,c as getDataLiquid,n as hasQueryableRelatedTag,u as isRelatedProductsLoading};
@@ -0,0 +1,17 @@
1
+ import{DEVICES as i,getResponsiveValueByScreen as e,LIST_IMAGE_LIQUID_VARS as t}from"@gem-sdk/core";import{getImageSizes as s}from"../../../../image/common/sizes.js";let a={desktop:4,tablet:2,mobile:2},r={GRID:2,CAROUSEL:1},m=t=>i.map(i=>{let s=Number(e(t,i));return Math.max(1,Math.floor(s||a[i]))}),n=i=>100/Math.min(...m(i)),g=({slidesToShow:i,rows:e})=>{let t=m(i);return{eagerLimit:Math.max(...t)*e,highLimit:Math.min(...t),sizes:`${Number(n(i).toFixed(2))}vw`}},o=({slidesToShow:i,rows:e,indexVar:a="count"})=>{let{eagerLimit:r,highLimit:m}=g({slidesToShow:i,rows:e}),o=s({slotVw:n(i)});return{item:`{%- liquid
2
+ if ${a} <= ${r}
3
+ assign ${t.LOADING} = 'eager'
4
+ else
5
+ assign ${t.LOADING} = 'lazy'
6
+ endif
7
+ if ${a} <= ${m}
8
+ assign ${t.FETCH_PRIORITY} = 'high'
9
+ else
10
+ assign ${t.FETCH_PRIORITY} = 'auto'
11
+ endif
12
+ assign ${t.SIZES} = '${o}'
13
+ -%}`,reset:`{%- liquid
14
+ assign ${t.LOADING} = nil
15
+ assign ${t.FETCH_PRIORITY} = nil
16
+ assign ${t.SIZES} = nil
17
+ -%}`}};export{r as LIST_PRELOAD_ROWS,g as getListImagePriority,o as getListImagePriorityLiquid};
@@ -0,0 +1 @@
1
+ import{getListImagePriority as t}from"./imagePriority.js";let e=({slidesToShow:e,rows:i,index:r})=>{let{eagerLimit:o,highLimit:a,sizes:g}=t({slidesToShow:e,rows:i});return{loading:r<=o?"eager":"lazy",fetchpriority:r<=a?"high":"auto",sizes:g}};export{e as getListImageHints};
@@ -1 +1 @@
1
- import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as r}from"../../../common/const.js";import{useRenderMode as i,useCurrentDevice as d,usePageType as l,usePageStore as s,flattenConnection as c,ProductListProvider as n,filterToolbarPreview as a,PICKED_PRODUCT_STATUSES as m}from"@gem-sdk/core";import{useState as u,useRef as g,useMemo as p,useEffect as h}from"react";import f from"../../../common/components/Loading.js";import P from"next/dynamic";import y from"./hooks/useRelatedProductIDAssigned.js";import k from"../SalePageProductListWarning.js";import{getPropertyByDevice as I}from"../../../dialog/common/helpers.js";import b from"./hooks/useProductRelatedQuery.js";import S from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as j}from"./constants/index.js";import{useCollectionQuery as C}from"./hooks/useCollectionQuery.js";import{useProductsQuery as v}from"./hooks/useProductsQuery.js";import L from"./ProductListGridLayout.js";import{getClass as w}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getStyle as G}from"./common/styles.js";import{If as T}from"@gem-sdk/system";import A from"next/head";let O=P(()=>import("../ProductNotFound.js"),{loading:f}),x=P=>{let{children:x,styles:D,builderProps:B,setting:E,builderAttrs:H}=P,{isRelatedProduct:z,productSetting:M}=N(P),{isEditMode:Q,isPreviewSharePageMode:R}=i(),W=d(),$=l(),_=s(o=>o.dynamicCollection),[F,V]=u(1),[q,U]=u(!0),J=g(),K="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"!=$||[r.Collection,r.DynamicCollection].includes(M?.productSrc)||(M.productSrc=r.DynamicCollection);let X=M?.productSrc??r.Collection;X===r.DynamicCollection&&(M.collectionId=_?.collectionId||"latest");let Y=Number.isNaN(Number(E?.numberOfProducts))?j:Number(E?.numberOfProducts),{relatedProductIdAssigned:Z}=y({productSetting:M}),{isNotFoundRelatedProduct:oo,relatedProducts:oe,isNoRelatedProductData:ot,relatedTagString:or,isLoading:oi}=b({productSetting:M,isRelatedProduct:z,relatedProductIdAssigned:Z,numberOfProducts:Y}),od=Q||R,ol=v({productIds:M?.productIds,defaultSelectedProductCount:M?.numOfSelectedProducts,productSrc:X,selectedStatus:od&&M?.productIds?.length?m:void 0}),os=C({productSrc:X,collectionID:M?.collectionId??"latest",numberOfProducts:Y,orderBy:E?.orderBy}),oc=oi||(X===r.PickProduct?ol.isLoading:os.isLoading),on=X===r.PickProduct?ol.error:os.error,oa=X===r.PickProduct?ol.isValidating:os.isValidating,om=os.data?.collections?.edges?.[0]?.node,ou=X===r.PickProduct?c(ol.data?.products):c(om?.products),og=s(o=>o.assignedProductIds),op=s(o=>o.isApplyAllProducts),oh=p(()=>(og??[]).length>0&&!op||op,[og,op]),of=oe?.data?.products&&oh?c(oe?.data?.products):[],oP=z?of:X===r.PickProduct&&M?.productIds?.length?M?.productIds?.map(o=>ou?.find(e=>e?.baseID===o)).filter(Boolean)??ou:X!==r.PickProduct?ou:ou.filter((o,e)=>e<(M?.numOfSelectedProducts??4)),oy=p(()=>oo&&z&&Q||!oP.length&&!oc&&q&&Q,[q,oc,oo,z,Q,oP.length]),ok=p(()=>!oP||oo&&z,[oo,z,oP]),oI=p(()=>{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?I(D?.horizontalGutter,W):void 0}))},[E?.sameHeight,E?.slidesToShow,F,oP?.length,W,D?.horizontalGutter]),ob=p(()=>oa||oc||on||!oP||oo&&z,[on,oc,oo,z,oa,oP]);h(()=>{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=p(()=>({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:T(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}=G(P),{productListWrapClass:oL}=w(P);return t("div",{...H,className:oL,style:oj,children:[!!D?.preloadBgImage&&t(A,{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(f,{}):on?t("div",{children:["Error: ",on?.message]}):ok?o("div",{children:"Products not found"}):o(n,{...oS,children:o("div",{className:"gp-flex gp-w-full",style:ov,children:t("div",{style:oC,children:[K&&o(k,{}),o(e,{children:T(D?.layout==="grid",o(L,{...P,productSortedById:oP,generateGridRowArray:oI}),o(S,{...P,productSortedById:oP}))})]})})}),a(x,!0)]})};export{x as default};
1
+ import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import{getElementLabel as r,isQueryLoading as i}from"../../../common/helpers.js";import{PRODUCT_LIST_PRODUCT_SOURCE as l}from"../../../common/const.js";import{useRenderMode as d,useCurrentDevice as s,usePageType as c,usePageStore as a,flattenConnection as n,ProductListProvider as m,filterToolbarPreview as u,PICKED_PRODUCT_STATUSES as g}from"@gem-sdk/core";import{useState as p,useRef as h,useMemo as f,useEffect as P}from"react";import y from"../../../common/components/Loading.js";import k from"next/dynamic";import b from"./hooks/useRelatedProductIDAssigned.js";import I from"../SalePageProductListWarning.js";import{getPropertyByDevice as S}from"../../../dialog/common/helpers.js";import j from"./hooks/useProductRelatedQuery.js";import C from"./ProductListCarouselLayout.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as v}from"./constants/index.js";import{useCollectionQuery as L}from"./hooks/useCollectionQuery.js";import{useProductsQuery as w}from"./hooks/useProductsQuery.js";import N from"./ProductListGridLayout.js";import{getClass as G}from"./common/classes.js";import{getData as T}from"./common/helpers.js";import{getStyle as D}from"./common/styles.js";import{If as A}from"@gem-sdk/system";import O from"next/head";let x=k(()=>import("../ProductNotFound.js"),{loading:y}),B=k=>{let{children:B,styles:E,builderProps:H,setting:z,builderAttrs:Q}=k,{isRelatedProduct:M,productSetting:R}=T(k),{isEditMode:W,isPreviewSharePageMode:$}=d(),_=s(),F=c(),q=a(o=>o.dynamicCollection),[U,V]=p(1),[J,K]=p(!0),X=h(),Y="GP_FUNNEL_PAGE"===F;"GP_COLLECTION"!=F||[l.Collection,l.DynamicCollection].includes(R?.productSrc)||(R.productSrc=l.DynamicCollection);let Z=R?.productSrc??l.Collection;Z===l.DynamicCollection&&(R.collectionId=q?.collectionId||"latest");let oo=Number.isNaN(Number(z?.numberOfProducts))?v:Number(z?.numberOfProducts),{relatedProductIdAssigned:oe}=b({productSetting:R}),{isNotFoundRelatedProduct:ot,relatedProducts:or,isNoRelatedProductData:oi,relatedTagString:ol,isLoading:od}=j({productSetting:R,isRelatedProduct:M,relatedProductIdAssigned:oe,numberOfProducts:oo}),os=W||$,oc=w({productIds:R?.productIds,defaultSelectedProductCount:R?.numOfSelectedProducts,productSrc:Z,selectedStatus:os&&R?.productIds?.length?g:void 0}),oa=L({productSrc:Z,collectionID:R?.collectionId??"latest",numberOfProducts:oo,orderBy:z?.orderBy}),on=Z===l.PickProduct,om=on?oc:oa,ou=on?!!R?.productIds:Z===l.Collection||Z===l.DynamicCollection,og=od||i({hasQuery:ou,data:om.data,error:om.error,isLoading:om.isLoading}),op=om.error,oh=om.isValidating,of=oa.data?.collections?.edges?.[0]?.node,oP=Z===l.PickProduct?n(oc.data?.products):n(of?.products),oy=a(o=>o.assignedProductIds),ok=a(o=>o.isApplyAllProducts),ob=f(()=>(oy??[]).length>0&&!ok||ok,[oy,ok]),oI=or?.data?.products&&ob?n(or?.data?.products):[],oS=M?oI:Z===l.PickProduct&&R?.productIds?.length?R?.productIds?.map(o=>oP?.find(e=>e?.baseID===o)).filter(Boolean)??oP:Z!==l.PickProduct?oP:oP.filter((o,e)=>e<(R?.numOfSelectedProducts??4)),oj=f(()=>ot&&M&&W||!oS.length&&!og&&J&&W,[J,og,ot,M,W,oS.length]),oC=f(()=>!oS||ot&&M,[ot,M,oS]),ov=f(()=>{if(!z?.sameHeight)return[];let o=0,e=Math.ceil((oS?.length??0)/+(z?.slidesToShow?.[_]??1));return Array.from(Array(oS?.length??0)).map((t,r)=>(r>=+(z?.slidesToShow?.[_]??1)*(o+1)&&++o,{gridRow:`${1+U*o}/${U+1+U*o}`,marginBottom:o+1<e?S(E?.horizontalGutter,_):void 0}))},[z?.sameHeight,z?.slidesToShow,U,oS?.length,_,E?.horizontalGutter]),oL=f(()=>oh||og||op||!oS||ot&&M,[op,og,ot,M,oh,oS]);P(()=>{if(!oL)return X.current=setTimeout(()=>{let{builderData:o}=H??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},W?0:500),()=>{clearTimeout(X.current)}},[H,oL,W,oS]);let ow=f(()=>({collection:of,products:oS,settings:{loop:z?.loop??{desktop:!1},scrollMode:z?.scrollMode??{desktop:"snap"},slidesToShow:z?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:E?.layout,dot:z?.dot,dotStyle:z?.dotStyle,arrow:z?.arrow,controlOverContent:z?.controlOverContent,sameHeight:z?.sameHeight},styles:{horizontalGutter:E?.horizontalGutter,verticalGutter:E?.verticalGutter,fullWidth:E?.fullWidth,spacing:E?.spacing,width:E?.width,height:E?.height}}),[of,oS,z,E]);if(H?.isPreview&&Y)return o(e,{});if(oj)return o(e,{children:A(J,o(x,{builderAttrs:Q,collectionHandle:of?.handle,productSrc:Z,onClose:()=>K(!1),children:B,relatedTagString:ol,assignProductNoTags:oi,noAssignedProduct:!oe}))});let{productListWrapStyle:oN,productListContentStyle:oG,productListWrapAlignStyle:oT}=D(k),{productListWrapClass:oD}=G(k);return t("div",{...Q,className:oD,style:oN,children:[!!E?.preloadBgImage&&t(O,{children:[!!E.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage.desktop.image.src,as:"image"}),!!E.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.tablet?.image?.src,as:"image"}),!!E.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:E.backgroundImage?.mobile?.image?.src,as:"image"})]}),og||oh?o(y,{label:r({builderData:H?.builderData})}):op?t("div",{children:["Error: ",op?.message]}):oC?o("div",{children:"Products not found"}):o(m,{...ow,children:o("div",{className:"gp-flex gp-w-full",style:oT,children:t("div",{style:oG,children:[Y&&o(I,{}),o(e,{children:A(E?.layout==="grid",o(N,{...k,productSortedById:oS,generateGridRowArray:ov}),o(C,{...k,productSortedById:oS}))})]})})}),u(B,!0)]})};export{B as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import r from"../../../carousel-v3/components/item/CarouselItem.js";import s from"../../../carousel-v3/components/root/Carousel.js";import{useEditorMode as t,ProductProvider as e,isEmptyChildren as m}from"@gem-sdk/core";import i from"../../../grid/components/ChildrenDroppable.js";import{getClass as l}from"./common/classes.js";import{getData as a}from"./common/helpers.js";import{getStyle as c}from"./common/styles.js";import{getAttr as n}from"./common/attrs.js";let d=d=>{let{children:p,builderProps:u,productSortedById:f,advanced:j}=d,h=t(),{carouselConfigSetting:y,carouselConfigStyle:C}=a(d),{productListAttr:b,getAttrProductItemEditor:v}=n(d),{carouselItemStyle:g}=c(d),{carouselClass:D,productItemClass:I}=l(d);return o(s,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...b},rootClass:D,setting:y,styles:C,isProductList:!0,children:f?.map(s=>o(r,{style:g,children:o(e,{product:s,readOnly:!0,children:o("div",{..."edit"===h?v(s?.baseID):{},className:I,children:m(p)?o(i,{}):p})})},s?.baseID))})};export{d as default};
1
+ import{jsx as o}from"react/jsx-runtime";import r from"../../../carousel-v3/components/item/CarouselItem.js";import t from"../../../carousel-v3/components/root/Carousel.js";import{useEditorMode as s,ProductProvider as m,isEmptyChildren as e}from"@gem-sdk/core";import{getListImageHints as i}from"../product-list/common/imagePriorityHints.js";import l from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as c}from"../../../image/common/listImageContext.js";import{LIST_PRELOAD_ROWS as n}from"../product-list/common/imagePriority.js";import{getClass as a}from"./common/classes.js";import{getData as d}from"./common/helpers.js";import{getStyle as p}from"./common/styles.js";import{getAttr as u}from"./common/attrs.js";let f=f=>{let{children:j,builderProps:h,productSortedById:g,advanced:y,setting:C}=f,v=s(),{carouselConfigSetting:P,carouselConfigStyle:b}=d(f),{productListAttr:x,getAttrProductItemEditor:I}=u(f),{carouselItemStyle:L}=p(f),{carouselClass:w,productItemClass:D}=a(f);return o(t,{advanced:y,builderProps:{uid:h?.uid},rootAttrs:{...x},rootClass:w,setting:P,styles:b,isProductList:!0,children:g?.map((t,s)=>o(r,{style:L,children:o(m,{product:t,readOnly:!0,children:o(c.Provider,{value:i({slidesToShow:C?.slidesToShow,rows:n.CAROUSEL,index:s+1}),children:o("div",{..."edit"===v?I(t?.baseID):{},className:D,children:e(j)?o(l,{}):j})})})},t?.baseID))})};export{f as default};
@@ -1,22 +1,24 @@
1
- import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import r from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";import{getClass as i}from"./common/classes.js";import{getData as s}from"./common/helpers.js";import{getStyle as d}from"./common/styles.js";import{template as u}from"@gem-sdk/core";let c=c=>{let{builderProps:l,advanced:n,productSrc:p,productListId:a}=c,{carouselConfigSetting:m,carouselConfigStyle:f}=s(c),{carouselItemStyle:g}=d(c),{carouselClass:$}=i(c);return u`
2
- ${t({advanced:n,builderProps:{...l},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${l?.uid}`,rootClass:$,setting:m,styles:f,isProductList:!0,children:`
1
+ import o from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import t from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getListImagePriorityLiquid as r,LIST_PRELOAD_ROWS as i}from"../product-list/common/imagePriority.js";import e from"./ProductListCarouselItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{getClass as d}from"./common/classes.js";import{getData as u}from"./common/helpers.js";import{getStyle as l}from"./common/styles.js";import{template as c}from"@gem-sdk/core";let n=n=>{let{builderProps:m,advanced:p,productSrc:a,productListId:f}=n,{carouselConfigSetting:g,carouselConfigStyle:$}=u(n),{carouselItemStyle:_}=l(n),{carouselClass:v}=d(n),P=r({slidesToShow:n.setting?.slidesToShow,rows:i.CAROUSEL});return c`
2
+ ${t({advanced:p,builderProps:{...m},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${m?.uid}`,rootClass:v,setting:g,styles:$,isProductList:!0,children:`
3
3
  {%- assign count = 0 -%}
4
4
  {%- for product in products limit: limit -%}
5
5
  {%- if product.id != empty -%}
6
6
  {%- assign count = count | plus: 1 -%}
7
+ ${P.item}
7
8
  {%- assign variant = product.selected_or_first_available_variant -%}
8
- {%- assign product_form_id = 'product-form-' | append: "${l?.uid}" | append: product.id -%}
9
- ${o({builderProps:{...l},style:g,parentId:`product-list-carousel-${l?.uid} gp-child-item-${l?.uid}`,parentStyle:f,parentSettings:m,background:m?.background,children:`
10
- ${r({...c})}
9
+ {%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
10
+ ${o({builderProps:{...m},style:_,parentId:`product-list-carousel-${m?.uid} gp-child-item-${m?.uid}`,parentStyle:$,parentSettings:g,background:g?.background,children:`
11
+ ${e({...n})}
11
12
  `})}
12
13
  {%- endif -%}
13
14
  {% endfor %}
14
- {%- if count == 0 and ${a.length} == 0 -%}
15
- {% if '${p}' == 'RelatedProduct' -%}
16
- <div>${e("ProductList","no_related_products")}</div>
15
+ ${P.reset}
16
+ {%- if count == 0 and ${f.length} == 0 -%}
17
+ {% if '${a}' == 'RelatedProduct' -%}
18
+ <div>${s("ProductList","no_related_products")}</div>
17
19
  {% else %}
18
- <div>${e("ProductList","no_products_found")}</div>
20
+ <div>${s("ProductList","no_products_found")}</div>
19
21
  {%- endif -%}
20
22
  {%- endif -%}
21
23
  `,carouselType:"product_list"})}
22
- `};export{c as default};
24
+ `};export{n as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Children as o,isValidElement as e,createElement as m}from"react";import{useEditorMode as t,ProductProvider as s,isEmptyChildren as i}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getClass as a}from"./common/classes.js";import{getStyle as d}from"./common/styles.js";import{getAttr as c}from"./common/attrs.js";let p=p=>{let{children:n,productSortedById:f,generateGridRowArray:h,setting:u}=p,y=t(),{gridLayoutStyle:g}=d(p),{gridLayoutClass:j,productItemClass:b}=a(p),{productListAttr:k,getAttrProductItemEditor:v}=c(p);return r("div",{...k,style:g,className:j,children:f?.length?f?.map((t,a)=>r(s,{product:t,readOnly:!0,children:r("div",{..."edit"===y?v(t?.baseID):{},className:b,style:{"--grchild":u?.sameHeight?h?.[a]?.gridRow:void 0,"--mbchild":h?.[a]?.marginBottom},children:i(n)?r(l,{}):o.map(n,r=>e(r)?m(r.type,{...r.props,key:r.key}):null)})},t?.baseID)):null})};export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{Children as r,isValidElement as m,createElement as t}from"react";import{useEditorMode as e,ProductProvider as i,isEmptyChildren as s}from"@gem-sdk/core";import{getListImageHints as l}from"../product-list/common/imagePriorityHints.js";import d from"../../../grid/components/ChildrenDroppable.js";import{ListImageContext as a}from"../../../image/common/listImageContext.js";import{LIST_PRELOAD_ROWS as c}from"../product-list/common/imagePriority.js";import{getClass as n}from"./common/classes.js";import{getStyle as p}from"./common/styles.js";import{getAttr as f}from"./common/attrs.js";let g=g=>{let{children:h,productSortedById:u,generateGridRowArray:y,setting:j}=g,v=e(),{gridLayoutStyle:b}=p(g),{gridLayoutClass:w,productItemClass:x}=n(g),{productListAttr:D,getAttrProductItemEditor:I}=f(g);return o("div",{...D,style:b,className:w,children:u?.length?u?.map((e,n)=>o(i,{product:e,readOnly:!0,children:o(a.Provider,{value:l({slidesToShow:j?.slidesToShow,rows:c.GRID,index:n+1}),children:o("div",{..."edit"===v?I(e?.baseID):{},className:x,style:{"--grchild":j?.sameHeight?y?.[n]?.gridRow:void 0,"--mbchild":y?.[n]?.marginBottom},children:s(h)?o(d,{}):r.map(h,o=>m(o)?t(o.type,{...o.props,key:o.key}):null)})})},e?.baseID)):null})};export{g as default};
@@ -1,36 +1,38 @@
1
- import t from"./ProductListGridItem.liquid.js";import{getStaticLocale as i}from"../../../helpers.js";import{RenderIf as o,template as s}from"@gem-sdk/core";import{getClass as r}from"./common/classes.js";import{getStyle as e}from"./common/styles.js";import{getAttr as d}from"./common/attrs.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=e(a),{gridLayoutClass:f}=r(a),{productListAttr:g}=d(a),$=()=>s`
1
+ import{getListImagePriorityLiquid as t,LIST_PRELOAD_ROWS as i}from"../product-list/common/imagePriority.js";import o from"./ProductListGridItem.liquid.js";import{getStaticLocale as s}from"../../../helpers.js";import{RenderIf as r,template as e}from"@gem-sdk/core";import{getClass as d}from"./common/classes.js";import{getStyle as a}from"./common/styles.js";import{getAttr as m}from"./common/attrs.js";let n=n=>{let{setting:p,builderProps:c,styles:l,productListId:u,productSrc:f}=n,{gridLayoutStyle:g}=a(n),{gridLayoutClass:$}=d(n),{productListAttr:h}=m(n),v=t({slidesToShow:p?.slidesToShow,rows:i.GRID}),_=()=>e`
2
2
  {%- assign count = 0 -%}
3
3
  {%- for product in products limit: limit -%}
4
4
  {%- if product.id != empty -%}
5
5
  {%- assign count = count | plus: 1 -%}
6
+ ${v.item}
6
7
  {%- assign variant = product.selected_or_first_available_variant -%}
7
- {%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
8
- ${t({...a})}
8
+ {%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
9
+ ${o({...n})}
9
10
  {%- endif -%}
10
11
  {% endfor %}
11
- {%- if count == 0 and ${m?.length} == 0 -%}
12
- {% if '${l}' == 'RelatedProduct' -%}
13
- <div>${i("ProductList","no_related_products")}</div>
12
+ ${v.reset}
13
+ {%- if count == 0 and ${u?.length} == 0 -%}
14
+ {% if '${f}' == 'RelatedProduct' -%}
15
+ <div>${s("ProductList","no_related_products")}</div>
14
16
  {% else %}
15
- <div>${i("ProductList","no_products_found")}</div>
17
+ <div>${s("ProductList","no_products_found")}</div>
16
18
  {%- endif -%}
17
19
  {%- endif -%}
18
- `;return s`
20
+ `;return e`
19
21
  <div
20
- ${g}
21
- style="${u}"
22
- class="${f}"
22
+ ${h}
23
+ style="${g}"
24
+ class="${$}"
23
25
  >
24
- ${o(n?.sameHeight,s`
26
+ ${r(p?.sameHeight,e`
25
27
  <gp-same-height
26
28
  class="gp-contents"
27
29
  style="visibility: hidden"
28
30
  >
29
- <script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
31
+ <script gp-data type="application/json">${JSON.stringify({targetUid:c?.builderData?.childrens?.[0],slidesToShow:p?.slidesToShow,rowGap:l?.horizontalGutter})}
30
32
  </script>
31
- ${`${$()}`}
33
+ ${`${_()}`}
32
34
  </gp-same-height>
33
35
  `)}
34
- ${o(!n?.sameHeight,s`${$()}`)}
36
+ ${r(!p?.sameHeight,e`${_()}`)}
35
37
  </div>
36
- `};export{a as default};
38
+ `};export{n as default};
@@ -1 +1 @@
1
- import{useEditorMode as e,useQuantity as r,useCurrentVariant as t,useProductBundleDiscount as i,convertDecimalToNumber as c,useInteraction as a,useProduct as o,useShopStore as n,useMoneyFormat as p,useFormatMoney as u}from"@gem-sdk/core";import{calculateBundleFixedDiscount as d,getMoneyFormatDecimals as l}from"../../../helpers/product-bundle.js";import{useTransition as m}from"../../product-variants/common/common.js";import{useRef as s,useMemo as g}from"react";let h=h=>{let{setting:b,builderProps:P}=h,y=s(null),f=e(),{quantity:v,hasUpdatePrice:w}=r(),q=t(),{useProductCompareAtPrice:k}=i(),C=h["bundle-item"],j=c(q?.price)??0,x=c(q?.salePrice)??0,D=b?.priceType==="compare",{trigger:E}=a(),I=o(),N=I?.baseID?.replace("gid://shopify/Product/",""),V=n(e=>e.showPriceCurrency),{moneyFormat:$}=p(),G=g(()=>C?.quantity?C.quantity:w&&v||1,[v,w,C?.quantity]),L=g(()=>C?d(j,{...C,quantity:G},l($)):0,[C,j,G,$]),M=g(()=>C?.discountValue?k?(x||j)*G:j*G:x*G,[C?.discountValue,j,G,x,k]),S=g(()=>{let e=j*G;return D?M:L?Math.max(0,e-L):e},[j,G,L,M,D]),T=g(()=>!!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})};m(e=>{e!==j&&z(j,"price")},[j]),m(e=>{e!==x&&z(x,"compare")},[x]);let A=u(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
+ import{useEditorMode as e,useQuantity as r,useCurrentVariant as t,useProductBundleDiscount as i,convertDecimalToNumber as c,useInteraction as a,useProduct as u,useShopStore as n,useMoneyFormat as o,useFormatMoney as p}from"@gem-sdk/core";import{calculateBundleFixedDiscount as d,getMoneyFormatDecimals as l}from"../../../helpers/product-bundle.js";import{useTransition as m}from"../../product-variants/common/common.js";import{useRef as s,useMemo as g}from"react";let b=b=>{let{setting:y,builderProps:h}=b,P=s(null),f=e(),{quantity:N,hasUpdatePrice:q}=r(),v=t(),{useProductCompareAtPrice:w}=i(),k=b["bundle-item"],C=c(v?.price)??0,I=c(v?.salePrice)??0,V=y?.priceType==="compare",{trigger:j}=a(),x=u(),D=x?.baseID?.replace("gid://shopify/Product/",""),E=n(e=>e.showPriceCurrency),{moneyFormat:T}=o(),$=g(()=>{if(!k)return!0;let e=Number(k.quantity);return Number.isInteger(e)&&e>0},[k?.quantity]),F=g(()=>{let e=Number(k?.discountValue);return Number.isFinite(e)&&e>0},[k?.discountValue]),G=g(()=>k?$?Number(k.quantity):1:q&&N||1,[N,q,k?.quantity,$]),L=g(()=>k&&$?d(C,{...k,quantity:G},l(T)):0,[k?.quantity,k?.discountType,k?.discountValue,$,C,G,T]),M=g(()=>F?w?(I||C)*G:C*G:I*G,[F,C,G,I,w]),S=g(()=>{let e=C*G;return V?M:L?Math.max(0,e-L):e},[C,G,L,M,V]),z=g(()=>!!V&&(!(I>C)||!(I>=0)),[V,I,C]),A=(e,r)=>{j({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${h?.uid}"]`,element:P.current}),j({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${h?.uid}"]`,element:P.current})};m(e=>{e!==C&&A(C,"price")},[C]),m(e=>{e!==I&&A(I,"compare")},[I]);let B=p(S??0,E||!1),H=V&&!S;return{elementRef:P,moneyFormatted:B,currentProductId:D,isNoComparePrice:H,isNoComparePriceILP:"edit"!==f&&H,emitNoDataSignal:()=>{if("edit"!==f)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:h?.uid,value:!S&&V,tag:"ProductPrice"}});window.dispatchEvent(e)},shouldHiddenComparePrice:z}};export{b as useGpPrice};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import{useProductSetting as d}from"./hook/useProductSetting.js";import{getData as s}from"./common/helpers.js";import"../../../common/const.js";import"react";import c from"../../../common/components/Loading.js";import{If as n}from"@gem-sdk/system";import l from"../../../grid/components/row/Row.js";import p from"next/dynamic";let u=p(()=>import("../ProductNotFound.js"),{loading:c}),a=p=>{let{builderProps:a,children:h,setting:f,style:g,builderAttrs:j}=p,{isAuto:P}=f??{},{isLoading:b,isProductPage:y,isProductNotFound:k,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:D}=d(p),{rowSetting:S,rowStyles:E}=s(p);return y&&P?r(o,{children:e(h)?r(m,{}):h}):r(o,{children:n(!k,r(o,{children:b?r(c,{}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(l,{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:n(x,r(u,{builderAttrs:j,productSrc:"PickProduct",onClose:()=>D(!1),children:h}))}))})};export{a as default};
1
+ import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import m from"../../../grid/components/ChildrenDroppable.js";import{useProductSetting as d}from"./hook/useProductSetting.js";import{getElementLabel as s}from"../../../common/helpers.js";import"../../../common/const.js";import"react";import c from"../../../common/components/Loading.js";import{getData as n}from"./common/helpers.js";import{If as l}from"@gem-sdk/system";import p from"../../../grid/components/row/Row.js";import u from"next/dynamic";let a=u(()=>import("../ProductNotFound.js"),{loading:c}),h=u=>{let{builderProps:h,children:f,setting:g,style:j,builderAttrs:b}=u,{isAuto:P}=g??{},{isLoadingProduct:y,isProductPage:k,isProductNotFound:D,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:S}=d(u),{rowSetting:E,rowStyles:F}=n(u);return k&&P?r(o,{children:e(f)?r(m,{}):f}):r(o,{children:l(!D,r(o,{children:y?r(c,{label:s({builderData:h?.builderData})}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(p,{builderProps:h,builderAttrs:b,style:j,styles:F,setting:E,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(f)?r(m,{}):f})}):null})}),r(o,{children:l(x,r(a,{builderAttrs:b,productSrc:"PickProduct",onClose:()=>S(!1),children:f}))}))})};export{h as default};
@@ -1 +1 @@
1
- import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import d from"./useProductQuery.js";import{useState as a,useMemo as i}from"react";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}}=d({id:S}),[D,V]=a(!0),$=(k||!h&&!I)&&p,j=i(()=>({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
+ import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import{isQueryLoading as o}from"../../../../common/helpers.js";import"../../../../common/const.js";import"react/jsx-runtime";import{useState as a,useMemo as d}from"react";import i from"./useProductQuery.js";let c=c=>{let{setting:m}=c,{productSetting:s,quantity:u,readOnly:n,isSyncProduct:p}=m??{},P=t(),l=r(t=>t.dynamicProduct),{isEditMode:h}=e(),y=s?.productId??"latest",S=s?.productStatus=="dynamic"?{...s,...l}:s,f=S?.initialVariantId,j=S?.initialVariantBaseId,{productData:{data:g,isLoading:I,error:k}}=i({id:y}),[x,D]=a(!0),Q=o({hasQuery:!!y,data:g,error:k,isLoading:I}),V=(k||!g&&!Q)&&h,$=d(()=>({product:g,initialVariantId:f,initialVariantBaseId:j,quantity:u,readOnly:n,isSyncProduct:p,key:`uid-${g?.id}-${f??""}`,hasPreSelected:s?.hasPreSelected}),[j,f,p,g,s?.hasPreSelected,u,n]);return{forceProductSetting:S,isProductPage:"PRODUCT"===P,isProductNotFound:V,showProductNotFound:x,isLoadingProduct:Q,product:g,errorLoadProduct:k,isEditor:h,productProviderData:$,setShowProductNotFound:D}};export{c 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: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
+ import{convertDecimalToNumber as t,formatMoney as e}from"@gem-sdk/core";import{DiscountType as o}from"../components/constants/product-bundle.js";let n=t=>({discountPercentAmount:0,discountAmount:e("0",t)}),r=t=>{let e=Number(t);return Number.isInteger(e)&&e>0?e:void 0},u=u=>{let{currentVariant:d,bundleItem:l,options:p}=u;if(!p?.useProductCompareAtPrice&&l?.discountType===o.NoDiscount||!l||!d?.price)return n(p?.moneyFormat||"${{amount}}");let y=t(d?.price)??0,F=t(d?.salePrice)??y,P=r(l.quantity);if(void 0===P)return n(p?.moneyFormat||"${{amount}}");let A=c(y,l,a(p?.moneyFormat)),f=s(A,P*y),g=y*P-A,M=F*P;return F<=y&&A<=0?n(p?.moneyFormat||"${{amount}}"):{discountPercentAmount:p?.useProductCompareAtPrice?i(g,M):f,discountAmount:p?.useProductCompareAtPrice?m(g,M,p?.moneyFormat):e(A.toString(),p?.moneyFormat)}},i=(t,e)=>Math.round((e-t)/e*100),m=(t,o,n)=>e((o-t).toString(),n),c=(t,e,n=2)=>{let u=Number(e?.discountValue);if(!Number.isFinite(u)||u<0)return 0;if(e?.discountType===o.Percentage){let o=r(e?.quantity);return void 0===o?0:d(t*(u/100),n)*o}return e?.discountType===o.FixedAmount?u:0},a=t=>t?.includes("amount_no_decimals")?0:2,d=(t,e=2)=>{let o=10**e;return Math.floor(Math.round(1e6*(t*o))/1e6)/o},s=(t,e)=>Math.round(t/e*100);export{u as applyBundleDiscountAmount,c as calculateBundleFixedDiscount,d as floorToMinorUnit,a as getMoneyFormatDecimals};
@@ -0,0 +1 @@
1
+ let e=!0,t=({dragToScroll:t})=>{let l=t??e;return{desktop:l,tablet:l,mobile:l}};export{e as PRODUCT_IMAGES_DRAG_TO_SCROLL_DEFAULT,t as getProductImagesEnableDrag};
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"@gem-sdk/system";import"next/link";import"./components/constants/product-bundle.js";import"../common/const.js";import"./components/product-variants/components/variants/index.js";import"../carousel-v3/components/swiper/Swiper.js";import"next/image";import"../video/components/Video.js";import"../modal/components/confirm.js";import"react-dom";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";import"./components/product-badge/types.js";import"./components/product-badge/constants.js";import"./components/product-badge/utils/shape.js";export{default as ProductList}from"./components/product-list/ProductList.js";export{default as Product}from"./components/product-wrap/Product.js";import t from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import o from"./components/product-bundle/setting/ProductBundleDiscount.js";import r from"./settings/product-image-v3/ProductImages.js";import s from"./settings/product-image-v2/ProductImages.js";import i from"./settings/ProductDescription.js";import e from"./settings/ProductProperties.js";import m from"./components/file-upload/settings/index.js";import c from"./settings/ProductViewMore.js";import n from"./settings/ProductVariants.js";import p from"./settings/ProductQuantity.js";import u from"./settings/DynamicCheckout.js";import d from"./settings/ProductListV3.js";import a from"./settings/ProductImages.js";import P from"./settings/ProductButton.js";import g from"./settings/ProductTitle.js";import j from"./settings/ProductPrice.js";import f from"./settings/ProductBadge.js";import l from"./settings/ProductList.js";import V from"./settings/ProductTag.js";import k from"./settings/Vendor.js";import x from"./settings/Product.js";import b from"./settings/Sku.js";let v={Product:x,ProductQuantity:p,ProductTitle:g,ProductButton:P,ProductPrice:j,ProductVariants:n,ProductImages:a,ProductImagesV2:s,ProductImagesV3:r,ProductDescription:i,ProductProperties:e,ProductTag:V,ProductListV3:d,ProductList:l,DynamicCheckout:u,ProductVendor:k,ProductSku:b,ProductBundleDiscount:o,ProductBundleDiscountItem:t,ProductViewMore:c,ProductBadge:f,FileUpload:m};export{v as productSetting};
1
+ import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"./components/product-bundle/common/classes.js";import"./components/product-bundle/common/styles.js";import"@gem-sdk/system";import"next/link";import"./components/constants/product-bundle.js";import"../common/const.js";import"./components/product-variants/components/variants/index.js";import"../carousel-v3/components/swiper/Swiper.js";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import"../video/components/Video.js";import"../modal/components/confirm.js";import"react-dom";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";import"./components/product-badge/types.js";import"./components/product-badge/constants.js";import"./components/product-badge/utils/shape.js";export{default as ProductList}from"./components/product-list/ProductList.js";export{default as Product}from"./components/product-wrap/Product.js";import t from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import o from"./components/product-bundle/setting/ProductBundleDiscount.js";import r from"./settings/product-image-v3/ProductImages.js";import s from"./settings/product-image-v2/ProductImages.js";import i from"./settings/ProductDescription.js";import e from"./settings/ProductProperties.js";import m from"./components/file-upload/settings/index.js";import c from"./settings/ProductViewMore.js";import n from"./settings/ProductVariants.js";import p from"./settings/ProductQuantity.js";import u from"./settings/DynamicCheckout.js";import d from"./settings/ProductListV3.js";import a from"./settings/ProductImages.js";import P from"./settings/ProductButton.js";import g from"./settings/ProductTitle.js";import j from"./settings/ProductPrice.js";import f from"./settings/ProductBadge.js";import l from"./settings/ProductList.js";import V from"./settings/ProductTag.js";import k from"./settings/Vendor.js";import x from"./settings/Product.js";import b from"./settings/Sku.js";let I={Product:x,ProductQuantity:p,ProductTitle:g,ProductButton:P,ProductPrice:j,ProductVariants:n,ProductImages:a,ProductImagesV2:s,ProductImagesV3:r,ProductDescription:i,ProductProperties:e,ProductTag:V,ProductListV3:d,ProductList:l,DynamicCheckout:u,ProductVendor:k,ProductSku:b,ProductBundleDiscount:o,ProductBundleDiscountItem:t,ProductViewMore:c,ProductBadge:f,FileUpload:m};export{I as productSetting};
@@ -1,2 +1,2 @@
1
- import{CAROUSEL_ANIMATION as e}from"../../../../../carousel/plugins/animation.js";let l=e=>({desktop:{default:e}}),t=[{id:"hoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"Zoom",value:"zoom"},{title:"Show other image",value:"other"}],default:"none"},{id:"zoomType",type:"option:value",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{label:"Default",value:"default"},{label:"Glasses",value:"glasses"}]},{id:"zoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],showDefaultUnit:!0,useOnlyUnitInit:!0,isNumber:!0},{id:"otherImage",label:"Other image",type:"dropdown:input",isNumber:!0,isIndexValue:!0,displayOptions:[{label:"Image 1",value:1},{label:"Image 2",value:2},{label:"Image 3",value:3},{label:"Image 4",value:4},{label:"Last image",value:"Last image"}],default:0},{id:"ftClickOpenLightBox",label:"Click Effect",type:"select",options:[{title:"Open gallery",value:"popup"},{title:"Open product",value:"product-link"}],devices:l("none")},{id:"ftClickOpenNewTab",type:"option:value",options:[{label:"Yes",value:!0},{label:"No",value:!1}],default:!1},{id:"ftNavigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:l("none")},{id:"ftLoop",type:"toggle",devices:l(!0)},{id:"ftPauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"ftAnimationSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"ftAnimationMode",label:"Animation",type:"select",default:e.EASE_OUT.value,options:[{label:"Ease in",value:e.EASE_IN.value},{label:"Ease out",value:e.EASE_OUT.value},{label:"Ease in out",value:e.EASE_IN_OUT.value}]},{id:"ftArrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
2
- <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" /></svg>`},{id:"ftArrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#121212"},{id:"ftArrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"ftArrowNavColor",label:"Nav. color",type:"color-picker-v2",default:"#FFFFFF"},{id:"ftArrowNavBorder",label:"Nav. border",type:"border",compoDefaultValue:{color:"line-3",borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"ftArrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},{id:"ftArrowNavShadow",type:"shadow-v2"},{id:"ftDotStyle",label:"Dot style",type:"option:illustration",enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",hide:!0},{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:80,isNumber:!0,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"#121212"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"#FFFFFF"}}}],a=[{id:"typeDisplay",type:"select",options:[{title:"All images",value:"all-images"},{title:"Select manually",value:"select-manual"}],default:"all-images"},{id:"preDisplay",type:"select",label:"Pre-display",default:"1st-available-variant",options:[{title:"1st available variant",value:"1st-available-variant"},{title:"1st image",value:"1st-images"},{title:"1st video",value:"1st-video"},{title:"1st 3D model",value:"1st-3d-mode"}]}],o=[{id:"ftShape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"ftLayout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:l("cover")},{id:"ftCorner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{t as productFeatureImageSetting,o as productFeatureImageStyle,a as productSelectDisplaySetting};
1
+ import{CAROUSEL_ANIMATION as e}from"../../../../../carousel/plugins/animation.js";import{PRODUCT_IMAGES_DRAG_TO_SCROLL_DEFAULT as l}from"../../../../helpers/productImagesDrag.js";let t=e=>({desktop:{default:e}}),a=[{id:"hoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"Zoom",value:"zoom"},{title:"Show other image",value:"other"}],default:"none"},{id:"zoomType",type:"option:value",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{label:"Default",value:"default"},{label:"Glasses",value:"glasses"}]},{id:"zoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],showDefaultUnit:!0,useOnlyUnitInit:!0,isNumber:!0},{id:"otherImage",label:"Other image",type:"dropdown:input",isNumber:!0,isIndexValue:!0,displayOptions:[{label:"Image 1",value:1},{label:"Image 2",value:2},{label:"Image 3",value:3},{label:"Image 4",value:4},{label:"Last image",value:"Last image"}],default:0},{id:"ftClickOpenLightBox",label:"Click Effect",type:"select",options:[{title:"Open gallery",value:"popup"},{title:"Open product",value:"product-link"}],devices:t("none")},{id:"ftClickOpenNewTab",type:"option:value",options:[{label:"Yes",value:!0},{label:"No",value:!1}],default:!1},{id:"ftNavigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:t("none")},{id:"ftLoop",type:"toggle",devices:t(!0)},{id:"ftPauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"ftAnimationSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"ftAnimationMode",label:"Animation",type:"select",default:e.EASE_OUT.value,options:[{label:"Ease in",value:e.EASE_IN.value},{label:"Ease out",value:e.EASE_OUT.value},{label:"Ease in out",value:e.EASE_IN_OUT.value}]},{id:"ftArrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
2
+ <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" /></svg>`},{id:"ftArrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#121212"},{id:"ftArrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:l},{id:"ftArrowNavColor",label:"Nav. color",type:"color-picker-v2",default:"#FFFFFF"},{id:"ftArrowNavBorder",label:"Nav. border",type:"border",compoDefaultValue:{color:"line-3",borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"ftArrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},{id:"ftArrowNavShadow",type:"shadow-v2"},{id:"ftDotStyle",label:"Dot style",type:"option:illustration",enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",hide:!0},{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:80,isNumber:!0,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"#121212"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"#FFFFFF"}}}],o=[{id:"typeDisplay",type:"select",options:[{title:"All images",value:"all-images"},{title:"Select manually",value:"select-manual"}],default:"all-images"},{id:"preDisplay",type:"select",label:"Pre-display",default:"1st-available-variant",options:[{title:"1st available variant",value:"1st-available-variant"},{title:"1st image",value:"1st-images"},{title:"1st video",value:"1st-video"},{title:"1st 3D model",value:"1st-3d-mode"}]}],i=[{id:"ftShape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"ftLayout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:t("cover")},{id:"ftCorner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{a as productFeatureImageSetting,i as productFeatureImageStyle,o as productSelectDisplaySetting};
@@ -1,3 +1,3 @@
1
- let e=e=>({desktop:{default:e}}),i=[{id:"type",label:"Gallery Type",type:"segment",hide:!0,options:[{label:"Slide",value:"slider"},{label:"All",value:"images"}],devices:e("slider")},{id:"galleryHoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"None",value:"none"},{title:"Zoom",value:"zoom"}],default:"none"},{id:"galleryZoomType",type:"select",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{title:"Default",value:"default"},{title:"Glasses",value:"glasses"}]},{id:"galleryZoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],useOnlyUnitInit:!0,isNumber:!0},{id:"clickOpenLightBox",label:"Large view in pop-up",type:"select",options:[{label:"View in featured",value:!1},{label:"Open Gallery",value:!0}],devices:e(!1)},{id:"borderActive",label:"Active border",type:"border",default:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"},compoDefaultValue:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"navigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:e("inside")},{id:"loop",type:"toggle",devices:e(!0)},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"speed",type:"input:slider",label:"Speed (s)",hide:!0,min:0,max:60,step:1,default:1},{id:"arrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg data-name="arrow" width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{PRODUCT_IMAGES_DRAG_TO_SCROLL_DEFAULT as e}from"../../../../helpers/productImagesDrag.js";let i=e=>({desktop:{default:e}}),l=[{id:"type",label:"Gallery Type",type:"segment",hide:!0,options:[{label:"Slide",value:"slider"},{label:"All",value:"images"}],devices:i("slider")},{id:"galleryHoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"None",value:"none"},{title:"Zoom",value:"zoom"}],default:"none"},{id:"galleryZoomType",type:"select",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{title:"Default",value:"default"},{title:"Glasses",value:"glasses"}]},{id:"galleryZoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],useOnlyUnitInit:!0,isNumber:!0},{id:"clickOpenLightBox",label:"Large view in pop-up",type:"select",options:[{label:"View in featured",value:!1},{label:"Open Gallery",value:!0}],devices:i(!1)},{id:"borderActive",label:"Active border",type:"border",default:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"},compoDefaultValue:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"navigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:i("inside")},{id:"loop",type:"toggle",devices:i(!0)},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"speed",type:"input:slider",label:"Speed (s)",hide:!0,min:0,max:60,step:1,default:1},{id:"arrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg data-name="arrow" width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0ZM10.6828 8.13017C10.5266 7.95661 10.2734 7.95661 10.1172 8.13017C9.96095 8.30374 9.96095 8.58515 10.1172 8.75871L13.0343 12L10.1172 15.2413C9.96095 15.4149 9.96095 15.6963 10.1172 15.8698C10.2734 16.0434 10.5266 16.0434 10.6828 15.8698L13.8828 12.3143C14.0391 12.1407 14.0391 11.8593 13.8828 11.6857L10.6828 8.13017Z" fill="currentColor"/>
3
- </svg>`},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#000000"},{id:"dragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"arrowNavColor",label:"Nav. color",type:"color-picker-v2"},{id:"arrowNavBorder",label:"Nav. border",type:"border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"arrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},{id:"arrowNavShadow",type:"shadow-v2",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}],l=[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForFtOnly",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInsideBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInside",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor2Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"50%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor1Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"layout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:e("cover")},{id:"itemSpacing",label:"Gallery Item Spacing",type:"input:slider",units:["px"],devices:{desktop:{default:"8px"}}},{id:"corner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{i as productGalleryImageSetting,l as productGalleryImageStyle};
3
+ </svg>`},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#000000"},{id:"dragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:e},{id:"arrowNavColor",label:"Nav. color",type:"color-picker-v2"},{id:"arrowNavBorder",label:"Nav. border",type:"border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"arrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},{id:"arrowNavShadow",type:"shadow-v2",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}}],t=[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForFtOnly",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"shapeForBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInsideBottom",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeForInside",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["small","medium","large"],sizeConfig:{small:"10%",medium:"20%",large:"25%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor2Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"50%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"shapeFor1Col",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","small","medium","large"],sizeConfig:{small:"25%",medium:"33%",large:"50%"}}},hiddenSettings:["padding","gap"]},{id:"layout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:i("cover")},{id:"itemSpacing",label:"Gallery Item Spacing",type:"input:slider",units:["px"],devices:{desktop:{default:"8px"}}},{id:"corner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{l as productGalleryImageSetting,t as productGalleryImageStyle};
@@ -1 +1 @@
1
- import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productFeatureImageStyle as l}from"./ProductFeatureImage.js";import{productGalleryImageSetting as a,productGalleryImageStyle as i}from"./ProductGalleryImage.js";let o=[{id:"setting",controls:[{id:"displayByVariant",label:"Option Label",type:"toggle",default:!1},{id:"variantSelect",type:"variant:listing"},{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 50 50",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",enableItemOpacity:!0,options:[{label:"Featured top",value:"bottom-center",type:"p-image-layout",iconName:"gp-product-image-layout-bottom"},{label:"Featured right",value:"left",type:"p-image-layout",iconName:"gp-product-image-layout-left"},{label:"Featured left",value:"right",type:"p-image-layout",iconName:"gp-product-image-layout-right"},{label:"Image list inside bottom",value:"inside-bottom",type:"p-image-layout",iconName:"gp-product-image-layout-bottom-inside"},{label:"Image list inside left",value:"inside-left",type:"p-image-layout",iconName:"gp-product-image-layout-left-inside"},{label:"Image list inside right",value:"inside-right",type:"p-image-layout",iconName:"gp-product-image-layout-right-inside"},{label:"Featured only",value:"only-feature",type:"p-image-layout",iconName:"gp-product-image-layout-featured-only"},{label:"Image list 1 col",value:"one-col",type:"p-image-layout",iconName:"gp-product-image-layout-one-col",noPadding:"y"},{label:"Image list 2 col",value:"two-col",type:"p-image-layout",iconName:"gp-product-image-layout-two-col"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"8px"}}},{id:"ratioLayout",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[2,10],devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[10,2],devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:l},{id:"galleryStyles",type:"group",label:"Gallery",controls:i},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:{desktop:{default:"flex-start"}}}]}];export{o as ProductImageSettingsV2};
1
+ import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productFeatureImageStyle as l}from"./ProductFeatureImage.js";import{productGalleryImageSetting as a,productGalleryImageStyle as i}from"./ProductGalleryImage.js";let o=[{id:"setting",controls:[{id:"displayByVariant",label:"Option Label",type:"toggle",default:!1},{id:"variantSelect",type:"variant:listing"},{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:20,max:400,step:20,useOnlyUnitInit:!0,devices:{desktop:{default:100}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-selector",iconViewBox:"0 0 50 50",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",enableItemOpacity:!0,options:[{label:"Featured top",value:"bottom-center",type:"p-image-layout",iconName:"gp-product-image-layout-bottom"},{label:"Featured right",value:"left",type:"p-image-layout",iconName:"gp-product-image-layout-left"},{label:"Featured left",value:"right",type:"p-image-layout",iconName:"gp-product-image-layout-right"},{label:"Image list inside bottom",value:"inside-bottom",type:"p-image-layout",iconName:"gp-product-image-layout-bottom-inside"},{label:"Image list inside left",value:"inside-left",type:"p-image-layout",iconName:"gp-product-image-layout-left-inside"},{label:"Image list inside right",value:"inside-right",type:"p-image-layout",iconName:"gp-product-image-layout-right-inside"},{label:"Featured only",value:"only-feature",type:"p-image-layout",iconName:"gp-product-image-layout-featured-only"},{label:"Image list 1 col",value:"one-col",type:"p-image-layout",iconName:"gp-product-image-layout-one-col",noPadding:"y"},{label:"Image list 2 col",value:"two-col",type:"p-image-layout",iconName:"gp-product-image-layout-two-col"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"8px"}}},{id:"ratioLayout",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[2,10],devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"column-with-slider",fallbackArrayValue:[10,2],devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:l},{id:"galleryStyles",type:"group",label:"Gallery",controls:i},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:{desktop:{default:"flex-start"}}}]}];export{o as ProductImageSettingsV2};