@gem-sdk/components 19.0.0-staging.8 → 19.1.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/dist/cjs/accordion/components/Accordion.liquid.js +4 -5
  2. package/dist/cjs/builder.js +1 -1
  3. package/dist/cjs/button/components/Button.liquid.js +15 -15
  4. package/dist/cjs/carousel/components/root/Carousel.liquid.js +5 -4
  5. package/dist/cjs/carousel-v3/common/selectors.js +1 -0
  6. package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +8 -8
  7. package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -1
  8. package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -1
  9. package/dist/cjs/carousel-v3/components/item/CarouselItem.js +1 -1
  10. package/dist/cjs/carousel-v3/components/root/Carousel.js +1 -1
  11. package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +6 -5
  12. package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
  13. package/dist/cjs/carousel-v3/components/root/common/attrs.js +1 -1
  14. package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
  15. package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -1
  16. package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -1
  17. package/dist/cjs/carousel-v3/index.js +1 -1
  18. package/dist/cjs/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
  19. package/dist/cjs/collection/components/collection-description/CollectionDescription.liquid.js +7 -8
  20. package/dist/cjs/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
  21. package/dist/cjs/collection/components/collection-toolbar/CollectionToolbar.liquid.js +1 -1
  22. package/dist/cjs/countdown-timer/components/Countdown.liquid.js +16 -15
  23. package/dist/cjs/estimate-delivery/common/helpers.js +1 -1
  24. package/dist/cjs/grid/components/row/Row.liquid.js +16 -11
  25. package/dist/cjs/hero-banner/common/classes.js +1 -1
  26. package/dist/cjs/hero-banner/common/helpers.js +1 -1
  27. package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
  28. package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +11 -11
  29. package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
  30. package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
  31. package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
  32. package/dist/cjs/image/common/attrs.js +1 -1
  33. package/dist/cjs/image/components/AdaptiveImage.js +1 -1
  34. package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
  35. package/dist/cjs/image/components/Image.liquid.js +10 -10
  36. package/dist/cjs/image/components/NextImage.js +1 -1
  37. package/dist/cjs/image/components/NextImage.liquid.js +2 -2
  38. package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
  39. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +11 -11
  40. package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
  41. package/dist/cjs/index.js +1 -1
  42. package/dist/cjs/index.liquid.js +1 -1
  43. package/dist/cjs/marquee/components/Marquee.liquid.js +21 -21
  44. package/dist/cjs/post-purchase/product/components/ProductTitle.js +1 -1
  45. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  46. package/dist/cjs/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
  47. package/dist/cjs/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
  48. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
  49. package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
  50. package/dist/cjs/product/components/ProductImages.liquid.js +9 -9
  51. package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +9 -9
  52. package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +2 -3
  53. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  54. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +15 -15
  55. package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
  56. package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
  57. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +7 -5
  58. package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.liquid.js +4 -3
  59. package/dist/cjs/product/components/product-button/ProductButton.liquid.js +8 -7
  60. package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
  61. package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
  62. package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
  63. package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +3 -4
  64. package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
  65. package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +5 -5
  66. package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +19 -19
  67. package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
  68. package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
  69. package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
  70. package/dist/cjs/product/components/product-images-v3/ProductImageV3.js +2 -2
  71. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +19 -19
  72. package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
  73. package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -1
  74. package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
  75. package/dist/cjs/product/components/product-images-v3/common/getBorderActiveCss.js +2 -1
  76. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
  77. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -1
  78. package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  79. package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -2
  80. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
  81. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +29 -29
  82. package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
  83. package/dist/cjs/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +1 -1
  84. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
  85. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
  86. package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
  87. package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
  88. package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  89. package/dist/cjs/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
  90. package/dist/cjs/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
  91. package/dist/cjs/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
  92. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  93. package/dist/cjs/product/components/product-list/ProductList.liquid.js +10 -9
  94. package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
  95. package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +7 -8
  96. package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +6 -4
  97. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  98. package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +10 -9
  99. package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
  100. package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +6 -6
  101. package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
  102. package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +6 -4
  103. package/dist/cjs/product/components/product-price/ProductPrice.liquid.js +4 -4
  104. package/dist/cjs/product/components/product-sku/Sku.liquid.js +4 -3
  105. package/dist/cjs/product/components/product-title/ProductTitle.liquid.js +7 -8
  106. package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
  107. package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
  108. package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +27 -27
  109. package/dist/cjs/product/components/product-wrap/Product.liquid.js +7 -4
  110. package/dist/cjs/product/index.js +1 -1
  111. package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  112. package/dist/cjs/sticky/components/Sticky.liquid.js +4 -5
  113. package/dist/cjs/sticky/hooks/useSticky.js +1 -1
  114. package/dist/cjs/tab/components/Tabs.liquid.js +7 -6
  115. package/dist/cjs/text/components/Text.liquid.js +3 -3
  116. package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
  117. package/dist/cjs/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
  118. package/dist/cjs/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
  119. package/dist/cjs/third-party/index.js +1 -1
  120. package/dist/cjs/third-party/next.js +1 -1
  121. package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
  122. package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
  123. package/dist/cjs/video/components/HTML5Embed.js +1 -1
  124. package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
  125. package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -10
  126. package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
  127. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +14 -13
  128. package/dist/cjs/video/components/Video.liquid.js +1 -1
  129. package/dist/esm/accordion/components/Accordion.liquid.js +8 -9
  130. package/dist/esm/builder.js +1 -1
  131. package/dist/esm/button/components/Button.liquid.js +22 -22
  132. package/dist/esm/carousel/components/root/Carousel.liquid.js +4 -3
  133. package/dist/esm/carousel-v3/common/selectors.js +1 -0
  134. package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +6 -6
  135. package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -1
  136. package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -1
  137. package/dist/esm/carousel-v3/components/item/CarouselItem.js +1 -1
  138. package/dist/esm/carousel-v3/components/root/Carousel.js +1 -1
  139. package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +6 -5
  140. package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +24 -0
  141. package/dist/esm/carousel-v3/components/root/common/attrs.js +1 -1
  142. package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
  143. package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
  144. package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -1
  145. package/dist/esm/carousel-v3/index.js +1 -1
  146. package/dist/esm/cart/components/shop-pay-button/ShopPayButton.liquid.js +2 -2
  147. package/dist/esm/collection/components/collection-description/CollectionDescription.liquid.js +6 -7
  148. package/dist/esm/collection/components/collection-paginator/CollectionPaginator.liquid.js +4 -3
  149. package/dist/esm/collection/components/collection-toolbar/CollectionToolbar.liquid.js +3 -3
  150. package/dist/esm/countdown-timer/components/Countdown.liquid.js +21 -20
  151. package/dist/esm/estimate-delivery/common/helpers.js +1 -1
  152. package/dist/esm/grid/components/row/Row.liquid.js +16 -11
  153. package/dist/esm/hero-banner/common/classes.js +1 -1
  154. package/dist/esm/hero-banner/common/helpers.js +1 -1
  155. package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
  156. package/dist/esm/hero-banner/components/HeroBanner.liquid.js +12 -12
  157. package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
  158. package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
  159. package/dist/esm/icon-list-v2/components/IconList.liquid.js +3 -3
  160. package/dist/esm/image/common/attrs.js +1 -1
  161. package/dist/esm/image/components/AdaptiveImage.js +1 -1
  162. package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
  163. package/dist/esm/image/components/Image.liquid.js +10 -10
  164. package/dist/esm/image/components/NextImage.js +1 -1
  165. package/dist/esm/image/components/NextImage.liquid.js +1 -1
  166. package/dist/esm/image/settings/configs/ui-v2.js +1 -1
  167. package/dist/esm/image-comparison/components/CompareImage.liquid.js +12 -12
  168. package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
  169. package/dist/esm/index.js +1 -1
  170. package/dist/esm/index.liquid.js +1 -1
  171. package/dist/esm/marquee/components/Marquee.liquid.js +21 -21
  172. package/dist/esm/post-purchase/product/components/ProductTitle.js +1 -1
  173. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  174. package/dist/esm/post-purchase/product/components/product-offer/context/PrdOfferSubscriptionPresenceContext.js +2 -0
  175. package/dist/esm/post-purchase/product/components/product-offer/helpers/scanSubscriptionBlocks.js +1 -0
  176. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferSubscriptionBlocksObserver.js +1 -0
  177. package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSubscriptionVisibility.js +1 -1
  178. package/dist/esm/product/components/ProductImages.liquid.js +12 -12
  179. package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +14 -14
  180. package/dist/esm/product/components/file-upload/UploadFile.liquid.js +3 -4
  181. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  182. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
  183. package/dist/esm/product/components/product-badge/common/classes.js +1 -1
  184. package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
  185. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
  186. package/dist/esm/product/components/product-bundle/ProductBundleDiscount.liquid.js +8 -7
  187. package/dist/esm/product/components/product-button/ProductButton.liquid.js +7 -6
  188. package/dist/esm/product/components/product-button/common/helpers.js +1 -1
  189. package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
  190. package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
  191. package/dist/esm/product/components/product-description/ProductDescription.liquid.js +5 -6
  192. package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
  193. package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +8 -8
  194. package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +21 -21
  195. package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
  196. package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
  197. package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
  198. package/dist/esm/product/components/product-images-v3/ProductImageV3.js +2 -2
  199. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +22 -22
  200. package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +44 -0
  201. package/dist/esm/product/components/product-images-v3/common/classes.js +1 -1
  202. package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
  203. package/dist/esm/product/components/product-images-v3/common/getBorderActiveCss.js +2 -1
  204. package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -1
  205. package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -1
  206. package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
  207. package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -2
  208. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
  209. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +45 -45
  210. package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +119 -0
  211. package/dist/esm/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +1 -1
  212. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
  213. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +3 -3
  214. package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +46 -0
  215. package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +10 -10
  216. package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
  217. package/dist/esm/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -1
  218. package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -1
  219. package/dist/esm/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -1
  220. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  221. package/dist/esm/product/components/product-list/ProductList.liquid.js +18 -17
  222. package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +5 -6
  223. package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +7 -8
  224. package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +9 -7
  225. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  226. package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +18 -17
  227. package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -6
  228. package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +9 -9
  229. package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +7 -8
  230. package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +9 -7
  231. package/dist/esm/product/components/product-price/ProductPrice.liquid.js +3 -3
  232. package/dist/esm/product/components/product-sku/Sku.liquid.js +6 -5
  233. package/dist/esm/product/components/product-title/ProductTitle.liquid.js +5 -6
  234. package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +11 -12
  235. package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +11 -10
  236. package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +44 -44
  237. package/dist/esm/product/components/product-wrap/Product.liquid.js +18 -15
  238. package/dist/esm/product/index.js +1 -1
  239. package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
  240. package/dist/esm/sticky/components/Sticky.liquid.js +11 -12
  241. package/dist/esm/sticky/hooks/useSticky.js +1 -1
  242. package/dist/esm/tab/components/Tabs.liquid.js +12 -11
  243. package/dist/esm/text/components/Text.liquid.js +3 -3
  244. package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.js +2 -0
  245. package/dist/esm/third-party/components/AppstleLoyaltyRewardProgram.liquid.js +16 -0
  246. package/dist/esm/third-party/configs/AppstleLoyaltyRewardProgram.js +1 -0
  247. package/dist/esm/third-party/index.js +1 -1
  248. package/dist/esm/third-party/next.js +1 -1
  249. package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +4 -0
  250. package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/uiV2.js +1 -0
  251. package/dist/esm/video/components/HTML5Embed.js +1 -1
  252. package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
  253. package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +16 -15
  254. package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
  255. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +11 -10
  256. package/dist/esm/video/components/Video.liquid.js +1 -1
  257. package/dist/types/index.d.ts +39 -13
  258. package/package.json +5 -5
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as a,useMemo as l,useEffect as i}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,useCollectionQuery as b,flattenConnection as k,ProductListProvider as T,filterToolbarPreview as I}from"@gem-sdk/core";import v from"../SalePageProductListWarning.js";import y from"next/head";import O from"./ProductListGridLayout.js";import w from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let W=o(()=>import("../ProductNotFound.js"),{loading:d}),j=o=>{let{children:j,styles:x,builderProps:G,setting:M,builderAttrs:B}=o,{isRelatedProduct:A,productSetting:Q}=N(o),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:D,isPreviewSharePageMode:F}=c(),H=s(),R=n(),$=u(e=>e.dynamicProduct),_=u(e=>e.dynamicCollection),[V,q]=a(1),[U,J]=a(!0),[K,X]=a(),[Y,Z]=a(!1),ee="GP_FUNNEL_PAGE"===R;"GP_COLLECTION"==R&&(Q.productSrc="DynamicCollection",Q.collectionId=_?.collectionId??"latest");let et=Q?.productSrc??"Collection",er=$?.productId&&$?.productId!==Q.relatedProductId?$?.productId:Q.relatedProductId,eo=m(),ed=u(e=>e.publicStoreFrontData),ea=l(()=>g(ed)?h(ed):eo,[ed]),{data:el}=p(A&&er?er:void 0,{revalidateOnMount:D||F},ea),ei=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!el?.tags||el?.tags.length===0),ec=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!el?.collections?.edges||el?.collections.edges.length===0),es=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!el?.vendor,en=f(K,{revalidateOnMount:D||F},ea),eu=D||F,em=P("PickProduct"===et?Q?.productIds:void 0,{revalidateOnMount:eu},{defaultSelectedProductCount:Q?.numOfSelectedProducts}),eg=l(()=>({id:Q?.collectionId??"latest",numberOfProducts:M?.numberOfProducts??4,orderBy:M?.orderBy}),[Q?.collectionId,Number(M?.numberOfProducts),M?.orderBy]),eh=b("PickProduct"!==et?eg:void 0,{revalidateOnMount:eu});i(()=>{if(A&&el&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(Z(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":X({first:M?.numberOfProducts,where:{vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?el?.vendor:"",idNEQ:el.id}});break;case"collection":{let t=el?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){Z(!0);break}X(e&&e.length>0?{first:M?.numberOfProducts,where:{idNEQ:el.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:M?.numberOfProducts,where:{idNEQ:el.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!el.tags||0===el.tags.length){Z(!0);break}X(e&&e.length>0?{first:M?.numberOfProducts,where:{idNEQ:el.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:el.tags},{nameNotIn:e}]}]}}:{first:M?.numberOfProducts,where:{idNEQ:el.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:el.tags}]}]}})}}},[el,Q.relatedType,Q.relatedTag,M?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,A]);let ep="PickProduct"===et?em.isValidating:eh.isValidating,ef="PickProduct"===et?em.isLoading:eh.isLoading,eP="PickProduct"===et?em.error:eh.error,eb=eh.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?k(em.data?.products):k(eb?.products),eT=en?.data?.products?k(en?.data?.products):void 0,eI=A&&eT?eT:"PickProduct"===et&&Q?.productIds?.length?Q?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),ev=l(()=>Y&&A&&D||!eI.length&&!ef&&U&&D,[U,ef,Y,A,D,eI.length]),ey=l(()=>!eI||Y&&A,[Y,A,eI]),eO=l(()=>{if(!M?.sameHeight)return[];let e=0,t=Math.ceil((eI?.length??0)/+(M?.slidesToShow?.[H]??1));return Array.from(Array(eI?.length??0)).map((r,o)=>(o>=+(M?.slidesToShow?.[H]??1)*(e+1)&&++e,{gridRow:`${1+V*e}/${V+1+V*e}`,marginBottom:e+1<t?L(x?.horizontalGutter,H):void 0}))},[M?.sameHeight,M?.slidesToShow,V,eI?.length,H,x?.horizontalGutter]),ew=l(()=>ep||ef||eP||!eI||Y&&A,[eP,ef,Y,A,ep,eI]);i(()=>{ew||setTimeout(()=>{let{builderData:e}=G??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&q(r.childElementCount||1)},D?0:500)},[G,ew,D]);let eS=l(()=>({collection:eb,products:eI,settings:{loop:M?.loop??{desktop:!1},scrollMode:M?.scrollMode??{desktop:"snap"},slidesToShow:M?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:x?.layout,dot:M?.dot,dotStyle:M?.dotStyle,arrow:M?.arrow,controlOverContent:M?.controlOverContent},styles:{horizontalGutter:x?.horizontalGutter,verticalGutter:x?.verticalGutter,fullWidth:x?.fullWidth,spacing:x?.spacing,width:x?.width,height:x?.height}}),[eb,eI,M,x]);if(G?.isPreview&&ee)return e(t,{});if(ev)return e(t,{children:C(U,e(W,{builderAttrs:B,collectionHandle:eb?.handle,productSrc:et,onClose:()=>J(!1),children:j,relatedTagString:z,assignProductNoTags:ei||ec||es,noAssignedProduct:!er}))});let{productListWrapStyle:eC,productListContentStyle:eE,productListWrapAlignStyle:eN}=S(o),{productListWrapClass:eL}=E(o);return r("div",{...B,className:eL,style:eC,children:[!!x?.preloadBgImage&&r(y,{children:[!!x.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage.desktop.image.src,as:"image"}),!!x.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.tablet?.image?.src,as:"image"}),!!x.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.mobile?.image?.src,as:"image"})]}),ep||ef?e(d,{}):eP?r("div",{children:["Error: ",eP?.message]}):ey?e("div",{children:"Products not found"}):e(T,{...eS,children:e("div",{className:"gp-flex gp-w-full",style:eN,children:r("div",{style:eE,children:[ee&&e(v,{}),e(t,{children:C(x?.layout==="grid",e(O,{...o,productSortedById:eI,generateGridRowArray:eO}),e(w,{...o,productSortedById:eI}))})]})})}),I(j,!0)]})};export{j as default};
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as a,useMemo as l,useEffect as i}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,useCollectionQuery as b,flattenConnection as k,ProductListProvider as T,filterToolbarPreview as I}from"@gem-sdk/core";import v from"../SalePageProductListWarning.js";import y from"next/head";import O from"./ProductListGridLayout.js";import w from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let W=o(()=>import("../ProductNotFound.js"),{loading:d}),j=o=>{let{children:j,styles:x,builderProps:G,setting:M,builderAttrs:B}=o,{isRelatedProduct:A,productSetting:H}=N(o),Q=H.relatedTag&&H.relatedTag[0],{isEditMode:z,isPreviewSharePageMode:D}=c(),F=s(),R=n(),$=u(e=>e.dynamicProduct),_=u(e=>e.dynamicCollection),[V,q]=a(1),[U,J]=a(!0),[K,X]=a(),[Y,Z]=a(!1),ee="GP_FUNNEL_PAGE"===R;"GP_COLLECTION"==R&&(H.productSrc="DynamicCollection",H.collectionId=_?.collectionId??"latest");let et=H?.productSrc??"Collection",er=$?.productId&&$?.productId!==H.relatedProductId?$?.productId:H.relatedProductId,eo=m(),ed=u(e=>e.publicStoreFrontData),ea=l(()=>g(ed)?h(ed):eo,[ed]),{data:el}=p(A&&er?er:void 0,{revalidateOnMount:z||D},ea),ei=H.relatedTag&&"tags"===H.relatedTag[0]&&(!el?.tags||el?.tags.length===0),ec=H.relatedTag&&"collection"===H.relatedTag[0]&&(!el?.collections?.edges||el?.collections.edges.length===0),es=H.relatedTag&&"vendor"===H.relatedTag[0]&&!el?.vendor,en=f(K,{revalidateOnMount:z||D},ea),eu=z||D,em=P("PickProduct"===et?H?.productIds:void 0,{revalidateOnMount:eu},{defaultSelectedProductCount:H?.numOfSelectedProducts}),eg=l(()=>({id:H?.collectionId??"latest",numberOfProducts:M?.numberOfProducts??4,orderBy:M?.orderBy}),[H?.collectionId,Number(M?.numberOfProducts),M?.orderBy]),eh=b("PickProduct"!==et?eg:void 0,{revalidateOnMount:eu});i(()=>{if(A&&el&&H.relatedTag&&"recommended-product"!==H.relatedType){let e;switch(Z(!1),H.hasRelatedExclude&&(e=H?.relatedExclude&&H.relatedExclude.split(",").map(e=>e.trim())),H.relatedTag[0]){case"vendor":X({first:M?.numberOfProducts,where:{vendor:H.relatedTag&&"vendor"===H.relatedTag[0]?el?.vendor:"",idNEQ:el.id}});break;case"collection":{let t=el?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){Z(!0);break}X(e&&e.length>0?{first:M?.numberOfProducts,where:{idNEQ:el.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:M?.numberOfProducts,where:{idNEQ:el.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!el.tags||0===el.tags.length){Z(!0);break}X(e&&e.length>0?{first:M?.numberOfProducts,where:{idNEQ:el.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:el.tags},{nameNotIn:e}]}]}}:{first:M?.numberOfProducts,where:{idNEQ:el.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:el.tags}]}]}})}}},[el,H.relatedType,H.relatedTag,M?.numberOfProducts,H.relatedExclude,H.hasRelatedExclude,A]);let ep="PickProduct"===et?em.isValidating:eh.isValidating,ef="PickProduct"===et?em.isLoading:eh.isLoading,eP="PickProduct"===et?em.error:eh.error,eb=eh.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?k(em.data?.products):k(eb?.products),eT=en?.data?.products?k(en?.data?.products):void 0,eI=A&&eT?eT:"PickProduct"===et&&H?.productIds?.length?H?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(H?.numOfSelectedProducts??4)),ev=l(()=>Y&&A&&z||!eI.length&&!ef&&U&&z,[U,ef,Y,A,z,eI.length]),ey=l(()=>!eI||Y&&A,[Y,A,eI]),eO=l(()=>{if(!M?.sameHeight)return[];let e=0,t=Math.ceil((eI?.length??0)/+(M?.slidesToShow?.[F]??1));return Array.from(Array(eI?.length??0)).map((r,o)=>(o>=+(M?.slidesToShow?.[F]??1)*(e+1)&&++e,{gridRow:`${1+V*e}/${V+1+V*e}`,marginBottom:e+1<t?L(x?.horizontalGutter,F):void 0}))},[M?.sameHeight,M?.slidesToShow,V,eI?.length,F,x?.horizontalGutter]),ew=l(()=>ep||ef||eP||!eI||Y&&A,[eP,ef,Y,A,ep,eI]);i(()=>{ew||setTimeout(()=>{let{builderData:e}=G??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&q(r.childElementCount||1)},z?0:500)},[G,ew,z]);let eS=l(()=>({collection:eb,products:eI,settings:{loop:M?.loop??{desktop:!1},scrollMode:M?.scrollMode??{desktop:"snap"},slidesToShow:M?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:x?.layout,dot:M?.dot,dotStyle:M?.dotStyle,arrow:M?.arrow,controlOverContent:M?.controlOverContent,sameHeight:M?.sameHeight},styles:{horizontalGutter:x?.horizontalGutter,verticalGutter:x?.verticalGutter,fullWidth:x?.fullWidth,spacing:x?.spacing,width:x?.width,height:x?.height}}),[eb,eI,M,x]);if(G?.isPreview&&ee)return e(t,{});if(ev)return e(t,{children:C(U,e(W,{builderAttrs:B,collectionHandle:eb?.handle,productSrc:et,onClose:()=>J(!1),children:j,relatedTagString:Q,assignProductNoTags:ei||ec||es,noAssignedProduct:!er}))});let{productListWrapStyle:eC,productListContentStyle:eE,productListWrapAlignStyle:eN}=S(o),{productListWrapClass:eL}=E(o);return r("div",{...B,className:eL,style:eC,children:[!!x?.preloadBgImage&&r(y,{children:[!!x.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage.desktop.image.src,as:"image"}),!!x.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.tablet?.image?.src,as:"image"}),!!x.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.mobile?.image?.src,as:"image"})]}),ep||ef?e(d,{}):eP?r("div",{children:["Error: ",eP?.message]}):ey?e("div",{children:"Products not found"}):e(T,{...eS,children:e("div",{className:"gp-flex gp-w-full",style:eN,children:r("div",{style:eE,children:[ee&&e(v,{}),e(t,{children:C(x?.layout==="grid",e(O,{...o,productSortedById:eI,generateGridRowArray:eO}),e(w,{...o,productSortedById:eI}))})]})})}),I(j,!0)]})};export{j as default};
@@ -1,6 +1,6 @@
1
- import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let g=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:A,productNumber:L,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>i`
2
- ${e("RelatedProduct"===A,`
3
- assign relatedTag = '${I}'
1
+ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as g}from"./common/helpers.js";let u=u=>{let{setting:p,styles:f,pageContext:m}=u,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:S,sortedBy:x,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:H,collectionHandle:I}=g(u),F=()=>i`
2
+ ${e("RelatedProduct"===L,`
3
+ assign relatedTag = '${H}'
4
4
  assign assignProduct = product
5
5
  assign idAssignProduct = assignProduct.id
6
6
  paginate collections.all.products by 10000
@@ -95,7 +95,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
95
95
  assign products = products
96
96
  endpaginate
97
97
  `)}
98
- `,{productListWrapStyle:w,productListContentStyle:H,productListWrapAlignStyle:q}=c(g),{productListWrapClass:G}=l(g);return i`
98
+ `,{productListWrapStyle:j,productListContentStyle:w,productListWrapAlignStyle:q}=c(u),{productListWrapClass:G}=l(u);return i`
99
99
  ${e(s,`
100
100
  <script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>
101
101
  ${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height-v7-5.js' | asset_url }}" defer="defer"></script>`:""}
@@ -107,16 +107,16 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
107
107
  ${e(!!f?.preloadBgImage,`${e(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
108
108
  <div
109
109
  class="${G}"
110
- style="${w}"
110
+ style="${j}"
111
111
  >
112
112
  <div class='gp-flex gp-w-full' style="${q}">
113
113
  <div
114
- style="${H}"
114
+ style="${w}"
115
115
  >
116
116
  {%- assign gpBkProduct = product -%}
117
117
  {%- assign gpBkProducts = products -%}
118
- ${(()=>{let e=F?`
119
- assign target_collection = collections['${F}']
118
+ ${(()=>{let e=I?`
119
+ assign target_collection = collections['${I}']
120
120
  if target_collection == empty
121
121
  for collection in collections
122
122
  if collection.id == ${_}
@@ -134,12 +134,13 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
134
134
  endfor
135
135
  `;return i`
136
136
  {%- liquid
137
- assign productHandles = '${x.toString()}'| split: ','
137
+ assign productHandles = '${S.toString()}'| split: ','
138
138
  assign products = null
139
139
  assign target_collection = null
140
- assign productSrc = '${A}'
140
+ assign productSrc = '${L}'
141
141
  assign c = 0
142
- assign limit = ${L??4}
142
+ assign limit = ${A??4}
143
+ assign isSettingSameHeightProductList = ${p?.sameHeight??!1}
143
144
 
144
145
  if request.page_type == 'collection' or preview_page_type == 'collection'
145
146
  assign target_collection = collection
@@ -151,11 +152,11 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
151
152
  endif
152
153
  endif
153
154
  paginate target_collection.products by ${E||4}
154
- assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
155
+ assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
155
156
  endpaginate
156
157
  else
157
158
  if productSrc == 'RelatedProduct'
158
- ${j()}
159
+ ${F()}
159
160
  elsif productSrc == 'PickProduct'
160
161
  unless ${y}
161
162
  assign products = null | sort
@@ -178,7 +179,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
178
179
  ${e}
179
180
  endif
180
181
  paginate target_collection.products by ${E||4}
181
- assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
182
+ assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
182
183
  endpaginate
183
184
  endif
184
185
  endif
@@ -187,14 +188,14 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
187
188
  ${i`
188
189
  {%- if products == null -%}
189
190
  {%- if count == 0 and ${k.length} == 0 -%}
190
- {% if '${A}' == 'RelatedProduct' -%}
191
+ {% if '${L}' == 'RelatedProduct' -%}
191
192
  <div>${o("ProductList","no_related_products")}</div>
192
193
  {% else %}
193
194
  <div>${o("ProductList","no_products_found")}</div>
194
195
  {%- endif -%}
195
196
  {%- endif -%}
196
197
  {%-else-%}
197
- ${r(v,i`${n({...g,productListId:k,productSrc:A})}`,i`${a({...g,productListId:k,productSrc:A})}`)}
198
+ ${r(v,i`${n({...u,productListId:k,productSrc:L})}`,i`${a({...u,productListId:k,productSrc:L})}`)}
198
199
  {%- endif -%}
199
200
  `}
200
201
  {%- assign product = gpBkProduct -%}
@@ -202,4 +203,4 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
202
203
  </div>
203
204
  </div>
204
205
  </div>
205
- `};export{g as default};
206
+ `};export{u as default};
@@ -1,15 +1,14 @@
1
- import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";import{filterPageContext as n}from"../../../helpers.js";let o=o=>{let{pageContext:a,children:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
1
+ import{template as t}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=n(o);return t`
2
2
  <gp-product
3
3
  gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
- gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(n(a))}}'
5
- class="${c}"
6
-
4
+ class="${i}"
7
5
  >
8
- {%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
6
+ <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(e)}}</script>
7
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
9
8
  <input type="hidden" name="id" value="{{ variant.id }}" />
10
9
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
11
10
  <button type="submit" onclick="return false;" style="display:none;"></button>
12
- ${r}
11
+ ${a}
13
12
  {%- endform -%}
14
13
  </gp-product>
15
14
  `};export{o as default};
@@ -1,19 +1,18 @@
1
- import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";import{filterPageContext as o}from"../../../helpers.js";let a=a=>{let{pageContext:r,rawChildren:i}=a,{productItemClass:c,gpProductClass:p}=n(a);return t`
1
+ import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
2
2
  <gp-product
3
3
  gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
- gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o(r))}}'
5
- class="${p}"
6
-
4
+ class="${c}"
7
5
  >
8
- {%- form 'product', product, id: product_form_id, class: 'form contents ${c}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
6
+ <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
7
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
9
8
  <input type="hidden" name="id" value="{{ variant.id }}" />
10
9
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
11
10
  <button type="submit" onclick="return false;" style="display:none;"></button>
12
11
  ${t`
13
- ${i?.map((n,o)=>{if(n)return t`
14
- ${e({...n,index:o})}
12
+ ${r?.map((e,o)=>{if(e)return t`
13
+ ${n({...e,index:o})}
15
14
  `}).join("")}
16
15
  `}
17
16
  {%- endform -%}
18
17
  </gp-product>
19
- `};export{a as default};
18
+ `};export{o as default};
@@ -1,18 +1,18 @@
1
- import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import d from"./ProductListGridItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";let a=a=>{let{setting:n,builderProps:m,styles:c,productListId:p,productSrc:l}=a,{gridLayoutStyle:u}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=()=>i`
1
+ import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import e from"./ProductListGridItem.liquid.js";import{getStaticLocale as d}from"../../../helpers.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=()=>i`
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
6
  {%- assign variant = product.selected_or_first_available_variant -%}
7
- {%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
8
- ${d({...a})}
7
+ {%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
8
+ ${e({...a})}
9
9
  {%- endif -%}
10
10
  {% endfor %}
11
- {%- if count == 0 and ${p?.length} == 0 -%}
11
+ {%- if count == 0 and ${m?.length} == 0 -%}
12
12
  {% if '${l}' == 'RelatedProduct' -%}
13
- <div>${e("ProductList","no_related_products")}</div>
13
+ <div>${d("ProductList","no_related_products")}</div>
14
14
  {% else %}
15
- <div>${e("ProductList","no_products_found")}</div>
15
+ <div>${d("ProductList","no_products_found")}</div>
16
16
  {%- endif -%}
17
17
  {%- endif -%}
18
18
  `;return i`
@@ -25,7 +25,9 @@ import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from
25
25
  <gp-same-height
26
26
  class="gp-contents"
27
27
  style="visibility: hidden"
28
- gp-data='${JSON.stringify({targetUid:m?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}'>
28
+ >
29
+ <script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
30
+ </script>
29
31
  ${`${$()}`}
30
32
  </gp-same-height>
31
33
  `)}
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as a,useEffect as i}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,useCollectionQuery as b,flattenConnection as k,ProductListProvider as I,filterToolbarPreview as T}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import v from"next/head";import O from"./ProductListGridLayout.js";import w from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let W=o(()=>import("../ProductNotFound.js"),{loading:d}),j=o=>{let{children:j,styles:x,builderProps:G,setting:A,builderAttrs:M}=o,{isRelatedProduct:B,productSetting:Q}=N(o),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:D,isPreviewSharePageMode:F}=c(),H=s(),R=n(),$=u(e=>e.dynamicProduct),_=u(e=>e.dynamicCollection),[V,q]=l(1),[U,J]=l(!0),[K,X]=l(),[Y,Z]=l(!1),ee="GP_FUNNEL_PAGE"===R;"GP_COLLECTION"==R&&(Q.productSrc="DynamicCollection",Q.collectionId=_?.collectionId??"latest");let et=Q?.productSrc??"Collection",er=$?.productId&&$?.productId!==Q.relatedProductId?$?.productId:Q.relatedProductId,eo=m(),ed=u(e=>e.publicStoreFrontData),el=a(()=>g(ed)?h(ed):eo,[ed]),{data:ea}=p(B&&er?er:void 0,{revalidateOnMount:D||F},el),ei=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ea?.tags||ea?.tags.length===0),ec=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ea?.collections?.edges||ea?.collections.edges.length===0),es=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ea?.vendor,en=f(K,{revalidateOnMount:D||F},el),eu=D||F,em=P("PickProduct"===et?Q?.productIds:void 0,{revalidateOnMount:eu},{defaultSelectedProductCount:Q?.numOfSelectedProducts}),eg=a(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),eh=b("PickProduct"!==et?eg:void 0,{revalidateOnMount:eu});i(()=>{if(B&&ea&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(Z(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":X({first:A?.numberOfProducts,where:{vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ea?.vendor:"",idNEQ:ea.id}});break;case"collection":{let t=ea?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ea.tags||0===ea.tags.length){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags},{nameNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags}]}]}})}}},[ea,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,B]);let ep="PickProduct"===et?em.isValidating:eh.isValidating,ef="PickProduct"===et?em.isLoading:eh.isLoading,eP="PickProduct"===et?em.error:eh.error,eb=eh.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?k(em.data?.products):k(eb?.products),eI=u(e=>e.assignedProductIds),eT=u(e=>e.isApplyAllProducts),ey=a(()=>(eI??[]).length>0&&!eT||eT,[eI,eT]),ev=en?.data?.products&&ey?k(en?.data?.products):[],eO=B?ev:"PickProduct"===et&&Q?.productIds?.length?Q?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),ew=a(()=>Y&&B&&D||!eO.length&&!ef&&U&&D,[U,ef,Y,B,D,eO.length]),eS=a(()=>!eO||Y&&B,[Y,B,eO]),eC=a(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((eO?.length??0)/+(A?.slidesToShow?.[H]??1));return Array.from(Array(eO?.length??0)).map((r,o)=>(o>=+(A?.slidesToShow?.[H]??1)*(e+1)&&++e,{gridRow:`${1+V*e}/${V+1+V*e}`,marginBottom:e+1<t?L(x?.horizontalGutter,H):void 0}))},[A?.sameHeight,A?.slidesToShow,V,eO?.length,H,x?.horizontalGutter]),eE=a(()=>ep||ef||eP||!eO||Y&&B,[eP,ef,Y,B,ep,eO]),eN=ea?.collections?.edges.map(e=>e.node?.id)??[];i(()=>{eE||setTimeout(()=>{let{builderData:e}=G??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&q(r.childElementCount||1)},D?0:500)},[G,eE,D,eN]);let eL=a(()=>({collection:eb,products:eO,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:x?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent},styles:{horizontalGutter:x?.horizontalGutter,verticalGutter:x?.verticalGutter,fullWidth:x?.fullWidth,spacing:x?.spacing,width:x?.width,height:x?.height}}),[eb,eO,A,x]);if(G?.isPreview&&ee)return e(t,{});if(ew)return e(t,{children:C(U,e(W,{builderAttrs:M,collectionHandle:eb?.handle,productSrc:et,onClose:()=>J(!1),children:j,relatedTagString:z,assignProductNoTags:ei||ec||es,noAssignedProduct:!er}))});let{productListWrapStyle:eW,productListContentStyle:ej,productListWrapAlignStyle:ex}=S(o),{productListWrapClass:eG}=E(o);return r("div",{...M,className:eG,style:eW,children:[!!x?.preloadBgImage&&r(v,{children:[!!x.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage.desktop.image.src,as:"image"}),!!x.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.tablet?.image?.src,as:"image"}),!!x.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.mobile?.image?.src,as:"image"})]}),ep||ef?e(d,{}):eP?r("div",{children:["Error: ",eP?.message]}):eS?e("div",{children:"Products not found"}):e(I,{...eL,children:e("div",{className:"gp-flex gp-w-full",style:ex,children:r("div",{style:ej,children:[ee&&e(y,{}),e(t,{children:C(x?.layout==="grid",e(O,{...o,productSortedById:eO,generateGridRowArray:eC}),e(w,{...o,productSortedById:eO}))})]})})}),T(j,!0)]})};export{j as default};
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import o from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as a,useEffect as i}from"react";import{useRenderMode as s,useCurrentDevice as c,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,useCollectionQuery as b,flattenConnection as k,ProductListProvider as I,filterToolbarPreview as T}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import v from"next/head";import O from"./ProductListGridLayout.js";import w from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as N}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let W=o(()=>import("../ProductNotFound.js"),{loading:d}),j=o=>{let{children:j,styles:x,builderProps:G,setting:A,builderAttrs:M}=o,{isRelatedProduct:B,productSetting:H}=N(o),Q=H.relatedTag&&H.relatedTag[0],{isEditMode:z,isPreviewSharePageMode:D}=s(),F=c(),R=n(),$=u(e=>e.dynamicProduct),_=u(e=>e.dynamicCollection),[V,q]=l(1),[U,J]=l(!0),[K,X]=l(),[Y,Z]=l(!1),ee="GP_FUNNEL_PAGE"===R;"GP_COLLECTION"==R&&(H.productSrc="DynamicCollection",H.collectionId=_?.collectionId??"latest");let et=H?.productSrc??"Collection",er=$?.productId&&$?.productId!==H.relatedProductId?$?.productId:H.relatedProductId,eo=m(),ed=u(e=>e.publicStoreFrontData),el=a(()=>g(ed)?h(ed):eo,[ed]),{data:ea}=p(B&&er?er:void 0,{revalidateOnMount:z||D},el),ei=H.relatedTag&&"tags"===H.relatedTag[0]&&(!ea?.tags||ea?.tags.length===0),es=H.relatedTag&&"collection"===H.relatedTag[0]&&(!ea?.collections?.edges||ea?.collections.edges.length===0),ec=H.relatedTag&&"vendor"===H.relatedTag[0]&&!ea?.vendor,en=f(K,{revalidateOnMount:z||D},el),eu=z||D,em=P("PickProduct"===et?H?.productIds:void 0,{revalidateOnMount:eu},{defaultSelectedProductCount:H?.numOfSelectedProducts}),eg=a(()=>({id:H?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[H?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),eh=b("PickProduct"!==et?eg:void 0,{revalidateOnMount:eu});i(()=>{if(B&&ea&&H.relatedTag&&"recommended-product"!==H.relatedType){let e;switch(Z(!1),H.hasRelatedExclude&&(e=H?.relatedExclude&&H.relatedExclude.split(",").map(e=>e.trim())),H.relatedTag[0]){case"vendor":X({first:A?.numberOfProducts,where:{vendor:H.relatedTag&&"vendor"===H.relatedTag[0]?ea?.vendor:"",idNEQ:ea.id}});break;case"collection":{let t=ea?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ea.tags||0===ea.tags.length){Z(!0);break}X(e&&e.length>0?{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags},{nameNotIn:e}]}]}}:{first:A?.numberOfProducts,where:{idNEQ:ea.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ea.tags}]}]}})}}},[ea,H.relatedType,H.relatedTag,A?.numberOfProducts,H.relatedExclude,H.hasRelatedExclude,B]);let ep="PickProduct"===et?em.isValidating:eh.isValidating,ef="PickProduct"===et?em.isLoading:eh.isLoading,eP="PickProduct"===et?em.error:eh.error,eb=eh.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?k(em.data?.products):k(eb?.products),eI=u(e=>e.assignedProductIds),eT=u(e=>e.isApplyAllProducts),ey=a(()=>(eI??[]).length>0&&!eT||eT,[eI,eT]),ev=en?.data?.products&&ey?k(en?.data?.products):[],eO=B?ev:"PickProduct"===et&&H?.productIds?.length?H?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(H?.numOfSelectedProducts??4)),ew=a(()=>Y&&B&&z||!eO.length&&!ef&&U&&z,[U,ef,Y,B,z,eO.length]),eS=a(()=>!eO||Y&&B,[Y,B,eO]),eC=a(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((eO?.length??0)/+(A?.slidesToShow?.[F]??1));return Array.from(Array(eO?.length??0)).map((r,o)=>(o>=+(A?.slidesToShow?.[F]??1)*(e+1)&&++e,{gridRow:`${1+V*e}/${V+1+V*e}`,marginBottom:e+1<t?L(x?.horizontalGutter,F):void 0}))},[A?.sameHeight,A?.slidesToShow,V,eO?.length,F,x?.horizontalGutter]),eE=a(()=>ep||ef||eP||!eO||Y&&B,[eP,ef,Y,B,ep,eO]),eN=ea?.collections?.edges.map(e=>e.node?.id)??[];i(()=>{eE||setTimeout(()=>{let{builderData:e}=G??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&q(r.childElementCount||1)},z?0:500)},[G,eE,z,eN]);let eL=a(()=>({collection:eb,products:eO,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:x?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:x?.horizontalGutter,verticalGutter:x?.verticalGutter,fullWidth:x?.fullWidth,spacing:x?.spacing,width:x?.width,height:x?.height}}),[eb,eO,A,x]);if(G?.isPreview&&ee)return e(t,{});if(ew)return e(t,{children:C(U,e(W,{builderAttrs:M,collectionHandle:eb?.handle,productSrc:et,onClose:()=>J(!1),children:j,relatedTagString:Q,assignProductNoTags:ei||es||ec,noAssignedProduct:!er}))});let{productListWrapStyle:eW,productListContentStyle:ej,productListWrapAlignStyle:ex}=S(o),{productListWrapClass:eG}=E(o);return r("div",{...M,className:eG,style:eW,children:[!!x?.preloadBgImage&&r(v,{children:[!!x.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage.desktop.image.src,as:"image"}),!!x.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.tablet?.image?.src,as:"image"}),!!x.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:x.backgroundImage?.mobile?.image?.src,as:"image"})]}),ep||ef?e(d,{}):eP?r("div",{children:["Error: ",eP?.message]}):eS?e("div",{children:"Products not found"}):e(I,{...eL,children:e("div",{className:"gp-flex gp-w-full",style:ex,children:r("div",{style:ej,children:[ee&&e(y,{}),e(t,{children:C(x?.layout==="grid",e(O,{...o,productSortedById:eO,generateGridRowArray:eC}),e(w,{...o,productSortedById:eO}))})]})})}),T(j,!0)]})};export{j as default};
@@ -1,6 +1,6 @@
1
- import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let g=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:A,productNumber:L,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>i`
2
- ${e("RelatedProduct"===A,`
3
- assign relatedTag = '${I}'
1
+ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as g}from"./common/helpers.js";let u=u=>{let{setting:p,styles:f,pageContext:m}=u,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:S,sortedBy:x,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:H,collectionHandle:I}=g(u),F=()=>i`
2
+ ${e("RelatedProduct"===L,`
3
+ assign relatedTag = '${H}'
4
4
  assign assignProduct = product
5
5
  assign idAssignProduct = assignProduct.id
6
6
  paginate collections.all.products by 10000
@@ -95,7 +95,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
95
95
  assign products = products
96
96
  endpaginate
97
97
  `)}
98
- `,{productListWrapStyle:w,productListContentStyle:H,productListWrapAlignStyle:q}=c(g),{productListWrapClass:G}=l(g);return i`
98
+ `,{productListWrapStyle:j,productListContentStyle:w,productListWrapAlignStyle:q}=c(u),{productListWrapClass:G}=l(u);return i`
99
99
  ${e(s,`
100
100
  <script ${d('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>
101
101
  ${p?.sameHeight?`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-same-height-v7-5.js' | asset_url }}" defer="defer"></script>`:""}
@@ -107,16 +107,16 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
107
107
  ${e(!!f?.preloadBgImage,`${e(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${e(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
108
108
  <div
109
109
  class="${G}"
110
- style="${w}"
110
+ style="${j}"
111
111
  >
112
112
  <div class='gp-flex gp-w-full' style="${q}">
113
113
  <div
114
- style="${H}"
114
+ style="${w}"
115
115
  >
116
116
  {%- assign gpBkProduct = product -%}
117
117
  {%- assign gpBkProducts = products -%}
118
- ${(()=>{let e=F?`
119
- assign target_collection = collections['${F}']
118
+ ${(()=>{let e=I?`
119
+ assign target_collection = collections['${I}']
120
120
  if target_collection == empty
121
121
  for collection in collections
122
122
  if collection.id == ${_}
@@ -134,12 +134,13 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
134
134
  endfor
135
135
  `;return i`
136
136
  {%- liquid
137
- assign productHandles = '${x.toString()}'| split: ','
137
+ assign productHandles = '${S.toString()}'| split: ','
138
138
  assign products = null
139
139
  assign target_collection = null
140
- assign productSrc = '${A}'
140
+ assign productSrc = '${L}'
141
141
  assign c = 0
142
- assign limit = ${L??4}
142
+ assign limit = ${A??4}
143
+ assign isSettingSameHeightProductList = ${p?.sameHeight??!1}
143
144
 
144
145
  if request.page_type == 'collection' or preview_page_type == 'collection'
145
146
  assign target_collection = collection
@@ -151,11 +152,11 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
151
152
  endif
152
153
  endif
153
154
  paginate target_collection.products by ${E||4}
154
- assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
155
+ assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
155
156
  endpaginate
156
157
  else
157
158
  if productSrc == 'RelatedProduct'
158
- ${j()}
159
+ ${F()}
159
160
  elsif productSrc == 'PickProduct'
160
161
  unless ${y}
161
162
  assign products = null | sort
@@ -178,7 +179,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
178
179
  ${e}
179
180
  endif
180
181
  paginate target_collection.products by ${E||4}
181
- assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
182
+ assign products = target_collection.products ${R?x:""} ${b?"| reverse":""}
182
183
  endpaginate
183
184
  endif
184
185
  endif
@@ -187,14 +188,14 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
187
188
  ${i`
188
189
  {%- if products == null -%}
189
190
  {%- if count == 0 and ${k.length} == 0 -%}
190
- {% if '${A}' == 'RelatedProduct' -%}
191
+ {% if '${L}' == 'RelatedProduct' -%}
191
192
  <div>${o("ProductList","no_related_products")}</div>
192
193
  {% else %}
193
194
  <div>${o("ProductList","no_products_found")}</div>
194
195
  {%- endif -%}
195
196
  {%- endif -%}
196
197
  {%-else-%}
197
- ${r(v,i`${n({...g,productListId:k,productSrc:A})}`,i`${a({...g,productListId:k,productSrc:A})}`)}
198
+ ${r(v,i`${n({...u,productListId:k,productSrc:L})}`,i`${a({...u,productListId:k,productSrc:L})}`)}
198
199
  {%- endif -%}
199
200
  `}
200
201
  {%- assign product = gpBkProduct -%}
@@ -202,4 +203,4 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
202
203
  </div>
203
204
  </div>
204
205
  </div>
205
- `};export{g as default};
206
+ `};export{u as default};
@@ -1,15 +1,15 @@
1
- import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";import{filterPageContext as n}from"../../../helpers.js";let o=o=>{let{pageContext:a,children:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
1
+ import{template as t}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";let e=e=>{let{pageContext:o,children:a}=e,{productItemClass:i,gpProductClass:r}=n(e);return t`
2
2
  <gp-product
3
3
  gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
- gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(n(a))}}'
5
- class="${c}"
6
-
4
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity }}, "formId": "{{ product_form_id }}"}'
5
+ class="${r}"
7
6
  >
7
+ <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(o)}}</script>
8
8
  {%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
9
9
  <input type="hidden" name="id" value="{{ variant.id }}" />
10
10
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
11
11
  <button type="submit" onclick="return false;" style="display:none;"></button>
12
- ${r}
12
+ ${a}
13
13
  {%- endform -%}
14
14
  </gp-product>
15
- `};export{o as default};
15
+ `};export{e as default};
@@ -1,22 +1,22 @@
1
- import{template as o}from"@gem-sdk/core";import t from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import r from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getData as e}from"./common/helpers.js";import{getClass as i}from"./common/classes.js";import{getStyle as s}from"./common/styles.js";import{getStaticLocale as d}from"../../../helpers.js";import u from"./ProductListCarouselItem.liquid.js";let n=n=>{let{builderProps:c,advanced:l,productSrc:a,productListId:p}=n,{carouselConfigSetting:m,carouselConfigStyle:f}=e(n),{carouselItemStyle:g}=s(n),{carouselClass:$}=i(n);return o`
2
- ${r({advanced:l,builderProps:{...c},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${c?.uid}`,rootClass:$,setting:m,styles:f,isProductList:!0,children:`
1
+ import{template as o}from"@gem-sdk/core";import t from"../../../carousel-v3/components/item/CarouselItem.liquid.js";import r from"../../../carousel-v3/components/root/Carousel.liquid.js";import{getData as e}from"./common/helpers.js";import{getClass as i}from"./common/classes.js";import{getStyle as s}from"./common/styles.js";import{getStaticLocale as d}from"../../../helpers.js";import u from"./ProductListCarouselItem.liquid.js";let c=c=>{let{builderProps:l,advanced:n,productSrc:p,productListId:a}=c,{carouselConfigSetting:m,carouselConfigStyle:f}=e(c),{carouselItemStyle:g}=s(c),{carouselClass:$}=i(c);return o`
2
+ ${r({advanced:n,builderProps:{...l},rootAttrs:{"items-repeat":"true"},rootId:`product-list-carousel-${l?.uid}`,rootClass:$,setting:m,styles:f,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
7
  {%- assign variant = product.selected_or_first_available_variant -%}
8
- {%- assign product_form_id = 'product-form-' | append: "${c?.uid}" | append: product.id -%}
9
- ${t({builderProps:{...c},style:g,parentId:`product-list-carousel-${c?.uid} gp-child-item-${c?.uid}`,parentStyle:f,parentSettings:m,background:m?.background,children:`
10
- ${u({...n})}
8
+ {%- assign product_form_id = 'product-form-' | append: "${l?.uid}" | append: product.id -%}
9
+ ${t({builderProps:{...l},style:g,parentId:`product-list-carousel-${l?.uid} gp-child-item-${l?.uid}`,parentStyle:f,parentSettings:m,background:m?.background,children:`
10
+ ${u({...c})}
11
11
  `})}
12
12
  {%- endif -%}
13
13
  {% endfor %}
14
- {%- if count == 0 and ${p.length} == 0 -%}
15
- {% if '${a}' == 'RelatedProduct' -%}
14
+ {%- if count == 0 and ${a.length} == 0 -%}
15
+ {% if '${p}' == 'RelatedProduct' -%}
16
16
  <div>${d("ProductList","no_related_products")}</div>
17
17
  {% else %}
18
18
  <div>${d("ProductList","no_products_found")}</div>
19
19
  {%- endif -%}
20
20
  {%- endif -%}
21
- `})}
22
- `};export{n as default};
21
+ `,carouselType:"product_list"})}
22
+ `};export{c as default};
@@ -1,19 +1,18 @@
1
- import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as n}from"./common/classes.js";import{filterPageContext as o}from"../../../helpers.js";let a=a=>{let{pageContext:r,rawChildren:i}=a,{productItemClass:c,gpProductClass:p}=n(a);return t`
1
+ import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
2
2
  <gp-product
3
3
  gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
- gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(o(r))}}'
5
- class="${p}"
6
-
4
+ class="${c}"
7
5
  >
8
- {%- form 'product', product, id: product_form_id, class: 'form contents ${c}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
6
+ <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
7
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
9
8
  <input type="hidden" name="id" value="{{ variant.id }}" />
10
9
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
11
10
  <button type="submit" onclick="return false;" style="display:none;"></button>
12
11
  ${t`
13
- ${i?.map((n,o)=>{if(n)return t`
14
- ${e({...n,index:o})}
12
+ ${r?.map((e,o)=>{if(e)return t`
13
+ ${n({...e,index:o})}
15
14
  `}).join("")}
16
15
  `}
17
16
  {%- endform -%}
18
17
  </gp-product>
19
- `};export{a as default};
18
+ `};export{o as default};
@@ -1,18 +1,18 @@
1
- import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import d from"./ProductListGridItem.liquid.js";import{getStaticLocale as e}from"../../../helpers.js";let a=a=>{let{setting:n,builderProps:m,styles:c,productListId:p,productSrc:l}=a,{gridLayoutStyle:u}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=()=>i`
1
+ import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from"./common/styles.js";import{getClass as s}from"./common/classes.js";import{getAttr as r}from"./common/attrs.js";import e from"./ProductListGridItem.liquid.js";import{getStaticLocale as d}from"../../../helpers.js";let a=a=>{let{setting:n,builderProps:p,styles:c,productListId:m,productSrc:l}=a,{gridLayoutStyle:u}=o(a),{gridLayoutClass:f}=s(a),{productListAttr:g}=r(a),$=()=>i`
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
6
  {%- assign variant = product.selected_or_first_available_variant -%}
7
- {%- assign product_form_id = 'product-form-' | append: "${m?.uid}" | append: product.id -%}
8
- ${d({...a})}
7
+ {%- assign product_form_id = 'product-form-' | append: "${p?.uid}" | append: product.id -%}
8
+ ${e({...a})}
9
9
  {%- endif -%}
10
10
  {% endfor %}
11
- {%- if count == 0 and ${p?.length} == 0 -%}
11
+ {%- if count == 0 and ${m?.length} == 0 -%}
12
12
  {% if '${l}' == 'RelatedProduct' -%}
13
- <div>${e("ProductList","no_related_products")}</div>
13
+ <div>${d("ProductList","no_related_products")}</div>
14
14
  {% else %}
15
- <div>${e("ProductList","no_products_found")}</div>
15
+ <div>${d("ProductList","no_products_found")}</div>
16
16
  {%- endif -%}
17
17
  {%- endif -%}
18
18
  `;return i`
@@ -25,7 +25,9 @@ import{RenderIf as t,template as i}from"@gem-sdk/core";import{getStyle as o}from
25
25
  <gp-same-height
26
26
  class="gp-contents"
27
27
  style="visibility: hidden"
28
- gp-data='${JSON.stringify({targetUid:m?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}'>
28
+ >
29
+ <script gp-data type="application/json">${JSON.stringify({targetUid:p?.builderData?.childrens?.[0],slidesToShow:n?.slidesToShow,rowGap:c?.horizontalGutter})}
30
+ </script>
29
31
  ${`${$()}`}
30
32
  </gp-same-height>
31
33
  `)}
@@ -1,11 +1,11 @@
1
- import{dataStringify as r,template as e,baseAssetURL as o,isLocalEnv as s}from"@gem-sdk/core";import{getSettingPreloadData as p}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as c,createAttr as m,createStateOrContext as i,Liquid as l}from"@gem-sdk/system";import{getWrapperClasses as a}from"./common/classes.js";import{getAttrs as d}from"./common/attrs.js";import{getTextProps as u}from"./common/helpers.js";let n=n=>{let{style:f,setting:y,builderProps:$,pageContext:h}=n,g=c(a(n)),j=m(d(n)),P=u(n),_=i({priceType:y?.priceType,uid:$?.uid,locale:"{{shop.locale}}",currency:"{{shop.currency}}",moneyFormat:`{{ ${h?.showPriceCurrency?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}`});return l(e`
1
+ import{dataStringify as r,template as e,baseAssetURL as o,isLocalEnv as s}from"@gem-sdk/core";import{getSettingPreloadData as p}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as c,createAttr as m,createStateOrContext as i,Liquid as a}from"@gem-sdk/system";import{getWrapperClasses as l}from"./common/classes.js";import{getAttrs as d}from"./common/attrs.js";import{getTextProps as n}from"./common/helpers.js";let u=u=>{let{style:f,setting:y,builderProps:$,pageContext:h}=u,g=c(l(u)),j=m(d(u)),P=n(u),_=i({priceType:y?.priceType,uid:$?.uid,locale:"{{shop.locale}}",currency:"{{shop.currency}}",moneyFormat:`{{ ${h?.showPriceCurrency?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}`});return a(e`
2
2
  <gp-product-price
3
3
  ${j}
4
4
  class="${g}"
5
5
  style="${f}"
6
- gp-data='${r(_)}'
7
6
  >
7
+ <script gp-data type="application/json">${r(_)}</script>
8
8
  ${t({...P})}
9
9
  </gp-product-price>
10
10
  ${(()=>{let r=s?"{{ 'gp-product-price-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-price-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${p('class="gps-link" delay',"src")}="${r}" defer="defer"></script>`})()}
11
- `)};export{n as ProductPrice,n as default};
11
+ `)};export{u as ProductPrice,u as default};
@@ -1,6 +1,7 @@
1
- import{template as e,baseAssetURL as t,isLocalEnv as r}from"@gem-sdk/core";import{getSettingPreloadData as s}from"../../../helpers.js";import a from"../../../text/components/Text.liquid.js";import{LiquidUnless as l,LiquidIf as o,If as u}from"@gem-sdk/system";let i=({setting:i,styles:p,advanced:c,builderProps:d})=>{let n=p?.typo?.attrs?.transform==="capitalize",m=i?.label&&i.label.trim().length?`${n?i.label.toString().toLocaleLowerCase():i.label}`:"";return p?.disableHoverColor&&delete p.underlineLink,e`
2
- ${l("product","<p>Product not found</p>",`{% assign currentVariant = product.selected_or_first_available_variant %}
3
- <gp-product-sku gp-data='${JSON.stringify({label:m})}'>
4
- ${a({styles:p,setting:{...i,text:`${o("currentVariant.sku.size > 0 ",`${m} ${u(n,"{{ currentVariant.sku | downcase }}","{{ currentVariant.sku }}")}`)}`,excludeFlex:!0,isForceValue:!0},advanced:c,builderProps:d,className:"gp-product-sku"})}
1
+ import{template as t,baseAssetURL as e,isLocalEnv as r}from"@gem-sdk/core";import{getSettingPreloadData as s}from"../../../helpers.js";import a from"../../../text/components/Text.liquid.js";import{LiquidUnless as o,LiquidIf as l,If as i}from"@gem-sdk/system";let p=({setting:p,styles:u,advanced:c,builderProps:n})=>{let d=u?.typo?.attrs?.transform==="capitalize",m=p?.label&&p.label.trim().length?`${d?p.label.toString().toLocaleLowerCase():p.label}`:"";return u?.disableHoverColor&&delete u.underlineLink,t`
2
+ ${o("product","<p>Product not found</p>",`{% assign currentVariant = product.selected_or_first_available_variant %}
3
+ <gp-product-sku>
4
+ <script gp-data type="application/json">${JSON.stringify({label:m})}</script>
5
+ ${a({styles:u,setting:{...p,text:`${l("currentVariant.sku.size > 0 ",`${m} ${i(d,"{{ currentVariant.sku | downcase }}","{{ currentVariant.sku }}")}`)}`,excludeFlex:!0,isForceValue:!0},advanced:c,builderProps:n,className:"gp-product-sku"})}
5
6
  </gp-product-sku>
6
- ${(()=>{let e=r?"{{ 'gp-product-sku-v7-5.js' | asset_url }}":`${t}/assets-v2/gp-product-sku-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`})()}`)}`};export{i as default};
7
+ ${(()=>{let t=r?"{{ 'gp-product-sku-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-sku-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}`)}`};export{p as default};
@@ -1,10 +1,9 @@
1
- import{dataStringify as t,template as r,baseAssetURL as e,isLocalEnv as o}from"@gem-sdk/core";import{getStaticLocale as p,getSettingPreloadData as s}from"../../../helpers.js";import i from"../../../text/components/Text.liquid.js";import{createAttr as l,createClass as d,createStateOrContext as u,LiquidUnless as c,If as m}from"@gem-sdk/system";import{getTextProps as a}from"./common/helpers.js";let n=n=>{let{setting:$,builderProps:f}=n,g=`<p>${p("ProductTitle","product_not_found")}</p>`,k=()=>i(a(n)),P=l({href:"{{ product.url }}",title:"{{ product.title }}"}),j=$?.linkProduct,S=d({"gp-product-title-link-wrapper":!0}),h=u({setting:{linkProduct:$?.linkProduct},uid:f?.uid});return c("product",`${g}`,r`
2
- <gp-product-title
3
- gp-data='${t(h)}'
4
- >
5
- ${m(j,r`<a ${P} class="${S}">
1
+ import{dataStringify as t,template as r,baseAssetURL as e,isLocalEnv as p}from"@gem-sdk/core";import{getStaticLocale as o,getSettingPreloadData as s}from"../../../helpers.js";import i from"../../../text/components/Text.liquid.js";import{createAttr as l,createClass as d,createStateOrContext as c,LiquidUnless as u,If as m}from"@gem-sdk/system";import{getTextProps as a}from"./common/helpers.js";let n=n=>{let{setting:$,builderProps:f}=n,g=`<p>${o("ProductTitle","product_not_found")}</p>`,k=()=>i(a(n)),j=l({href:"{{ product.url }}",title:"{{ product.title }}"}),P=$?.linkProduct,S=d({"gp-product-title-link-wrapper":!0}),h=c({setting:{linkProduct:$?.linkProduct},uid:f?.uid});return u("product",`${g}`,r`
2
+ <gp-product-title>
3
+ <script gp-data type="application/json">${t(h)}</script>
4
+ ${m(P,r`<a ${j} class="${S}">
6
5
  ${k()}
7
6
  </a>`,r`${k()}`)}
8
7
  </gp-product-title>
9
- ${(()=>{let t=o?"{{ 'gp-product-title-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-title-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
8
+ ${(()=>{let t=p?"{{ 'gp-product-title-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-title-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
10
9
  `)};export{n as default};