@gem-sdk/components 19.1.0-staging.8 → 20.0.0-dev.25

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 (482) hide show
  1. package/dist/cjs/accordion/next.js +1 -1
  2. package/dist/cjs/accordion/settings/configs/settings.js +2 -17
  3. package/dist/cjs/article/components/ArticleContent.js +2 -2
  4. package/dist/cjs/article/components/ArticleExcerpt.js +1 -1
  5. package/dist/cjs/article/components/ArticleList.js +1 -1
  6. package/dist/cjs/article/index.js +1 -1
  7. package/dist/cjs/article/next.js +1 -1
  8. package/dist/cjs/article/settings/ArticleAuthor.js +1 -1
  9. package/dist/cjs/article/settings/ArticleCategory.js +1 -1
  10. package/dist/cjs/article/settings/ArticleContent.js +1 -1
  11. package/dist/cjs/article/settings/ArticleDate.js +1 -1
  12. package/dist/cjs/article/settings/ArticleExcerpt.js +1 -1
  13. package/dist/cjs/article/settings/ArticleImage.js +1 -1
  14. package/dist/cjs/article/settings/ArticleList.js +1 -1
  15. package/dist/cjs/article/settings/ArticleReadMore.js +1 -1
  16. package/dist/cjs/article/settings/ArticleTag.js +1 -1
  17. package/dist/cjs/article/settings/ArticleTitle.js +1 -1
  18. package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
  19. package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
  20. package/dist/cjs/article/settings/configs/article-list/settings.js +1 -1
  21. package/dist/cjs/article/settings/configs/article-read-more/settings.js +2 -2
  22. package/dist/cjs/breadcrumb/next.js +1 -1
  23. package/dist/cjs/breadcrumb/settings/configs/settings.js +1 -1
  24. package/dist/cjs/button/common/helpers.js +1 -1
  25. package/dist/cjs/button/common/styles.js +1 -1
  26. package/dist/cjs/button/components/Button.liquid.js +6 -6
  27. package/dist/cjs/button/next.js +1 -1
  28. package/dist/cjs/button/settings/configs/settings.js +2 -2
  29. package/dist/cjs/carousel/components/item/common/classes.js +1 -1
  30. package/dist/cjs/carousel/components/root/common/helpers.js +1 -1
  31. package/dist/cjs/carousel/next.js +1 -1
  32. package/dist/cjs/carousel/settings/Carousel.js +1 -1
  33. package/dist/cjs/carousel-v3/components/item/common/classes.js +1 -1
  34. package/dist/cjs/carousel-v3/components/root/CarouselEmbla.liquid.js +5 -6
  35. package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -1
  36. package/dist/cjs/carousel-v3/next.js +1 -1
  37. package/dist/cjs/carousel-v3/settings/Carousel.js +1 -1
  38. package/dist/cjs/cart/components/CartList.js +1 -1
  39. package/dist/cjs/cart/index.js +1 -1
  40. package/dist/cjs/cart/next.js +1 -1
  41. package/dist/cjs/code/next.js +1 -1
  42. package/dist/cjs/code/settings/configs/settings.js +1 -1
  43. package/dist/cjs/collection/next.js +1 -1
  44. package/dist/cjs/collection/settings/collection-banner/configs/settings.js +1 -1
  45. package/dist/cjs/collection/settings/collection-description/configs/settings.js +1 -1
  46. package/dist/cjs/collection/settings/collection-paginator/configs/settings.js +1 -1
  47. package/dist/cjs/collection/settings/collection-title/configs/settings.js +1 -1
  48. package/dist/cjs/collection/settings/collection-toolbar/configs/settings.js +1 -1
  49. package/dist/cjs/common/const.js +1 -1
  50. package/dist/cjs/countdown-timer/components/Countdown.liquid.js +3 -3
  51. package/dist/cjs/countdown-timer/next.js +1 -1
  52. package/dist/cjs/coupon/next.js +1 -1
  53. package/dist/cjs/coupon/settings/configs/settings.js +2 -2
  54. package/dist/cjs/dialog/index.js +1 -1
  55. package/dist/cjs/dialog/next.js +1 -1
  56. package/dist/cjs/dialog/settings/configs/settings.js +1 -1
  57. package/dist/cjs/estimate-delivery/next.js +1 -1
  58. package/dist/cjs/estimate-delivery/settings/configs/settings.js +1 -1
  59. package/dist/cjs/form/components/form-dropdown/FormDropdown.liquid.js +10 -10
  60. package/dist/cjs/form/next.js +1 -1
  61. package/dist/cjs/form/settings/contact/configs/settings.js +1 -1
  62. package/dist/cjs/form/settings/submit-button/configs/settings.js +2 -2
  63. package/dist/cjs/grid/components/row/common/helpers.js +1 -1
  64. package/dist/cjs/grid/components/section/Section.js +1 -1
  65. package/dist/cjs/grid/index.js +1 -1
  66. package/dist/cjs/grid/settings/configs/section/settings.js +1 -1
  67. package/dist/cjs/header/components/kind/basic/index.js +1 -1
  68. package/dist/cjs/header/components/kind/modern/index.js +1 -1
  69. package/dist/cjs/header/index.js +1 -1
  70. package/dist/cjs/header/next.js +1 -1
  71. package/dist/cjs/header/settings/configs/settings.js +2 -2
  72. package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
  73. package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +4 -4
  74. package/dist/cjs/hero-banner/index.js +1 -1
  75. package/dist/cjs/hero-banner/next.js +1 -1
  76. package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
  77. package/dist/cjs/icon/next.js +1 -1
  78. package/dist/cjs/icon-list/next.js +1 -1
  79. package/dist/cjs/icon-list-hoz/next.js +1 -1
  80. package/dist/cjs/icon-list-v2/components/IconList.liquid.js +5 -5
  81. package/dist/cjs/icon-list-v2/next.js +1 -1
  82. package/dist/cjs/image/common/const.js +1 -1
  83. package/dist/cjs/image/common/helpers.js +2 -2
  84. package/dist/cjs/image/settings/configs/settings.js +1 -1
  85. package/dist/cjs/image-comparison/next.js +1 -1
  86. package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
  87. package/dist/cjs/image-detection/next.js +1 -1
  88. package/dist/cjs/input/next.js +1 -1
  89. package/dist/cjs/line/common/helpers.js +1 -1
  90. package/dist/cjs/line/common/styles.js +1 -1
  91. package/dist/cjs/line/next.js +1 -1
  92. package/dist/cjs/line/settings/configs/settings.js +1 -1
  93. package/dist/cjs/link/next.js +1 -1
  94. package/dist/cjs/marquee/next.js +1 -1
  95. package/dist/cjs/marquee/settings/Marquee.js +1 -1
  96. package/dist/cjs/menu/next.js +1 -1
  97. package/dist/cjs/modal/next.js +1 -1
  98. package/dist/cjs/pagination/next.js +1 -1
  99. package/dist/cjs/post-purchase/advanced-list/next.js +1 -1
  100. package/dist/cjs/post-purchase/button/next.js +1 -1
  101. package/dist/cjs/post-purchase/buyer-consent/next.js +1 -1
  102. package/dist/cjs/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  103. package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
  104. package/dist/cjs/post-purchase/callout-banner/next.js +1 -1
  105. package/dist/cjs/post-purchase/countdown-timer/next.js +1 -1
  106. package/dist/cjs/post-purchase/image/next.js +1 -1
  107. package/dist/cjs/post-purchase/image/settings/Image.js +1 -1
  108. package/dist/cjs/post-purchase/line/next.js +1 -1
  109. package/dist/cjs/post-purchase/link/next.js +1 -1
  110. package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
  111. package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
  112. package/dist/cjs/post-purchase/product/components/product-image/FeatureImage.js +1 -1
  113. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +1 -1
  114. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
  115. package/dist/cjs/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
  116. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  117. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  118. package/dist/cjs/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
  119. package/dist/cjs/post-purchase/product/index.js +1 -1
  120. package/dist/cjs/post-purchase/product/next.js +1 -1
  121. package/dist/cjs/post-purchase/product/settings/product-description/ProductDescription.js +1 -1
  122. package/dist/cjs/post-purchase/product/settings/product-discount-tag/ProductDiscountTag.js +1 -1
  123. package/dist/cjs/post-purchase/product/settings/product-image/ProductImages.js +1 -1
  124. package/dist/cjs/post-purchase/product/settings/product-offer/index.js +1 -1
  125. package/dist/cjs/post-purchase/product/settings/product-price/ProductPrice.js +1 -1
  126. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  127. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
  128. package/dist/cjs/post-purchase/product/settings/product-title/ProductTitle.js +1 -1
  129. package/dist/cjs/post-purchase/product/settings/product-variants/ProductVariant.js +1 -1
  130. package/dist/cjs/post-purchase/text/next.js +1 -1
  131. package/dist/cjs/post-purchase/text/settings/text/Text.js +1 -1
  132. package/dist/cjs/product/components/file-upload/UploadFile.js +1 -1
  133. package/dist/cjs/product/components/file-upload/UploadFile.liquid.js +10 -10
  134. package/dist/cjs/product/components/file-upload/common/attr.js +1 -1
  135. package/dist/cjs/product/components/file-upload/settings/configs/settings.js +2 -2
  136. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  137. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +18 -18
  138. package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
  139. package/dist/cjs/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
  140. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +5 -5
  141. package/dist/cjs/product/components/product-button/ProductButton.liquid.js +1 -1
  142. package/dist/cjs/product/components/product-button/common/helpers.js +1 -1
  143. package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +1 -1
  144. package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  145. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  146. package/dist/cjs/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +9 -9
  147. package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -1
  148. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  149. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  150. package/dist/cjs/product/components/product-list-v3/common/helpers.js +1 -1
  151. package/dist/cjs/product/components/product-list-v3/constants/index.js +1 -0
  152. package/dist/cjs/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
  153. package/dist/cjs/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
  154. package/dist/cjs/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
  155. package/dist/cjs/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
  156. package/dist/cjs/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
  157. package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
  158. package/dist/cjs/product/components/product-properties/property-select/common/styles.js +1 -1
  159. package/dist/cjs/product/components/product-quick-view/ProductQuickView.js +1 -1
  160. package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +6 -6
  161. package/dist/cjs/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js +6 -6
  162. package/dist/cjs/product/components/product-wrap/Product.js +1 -1
  163. package/dist/cjs/product/components/product-wrap/hook/useProductQuery.js +1 -0
  164. package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
  165. package/dist/cjs/product/helpers/product-bundle.js +1 -1
  166. package/dist/cjs/product/index.js +1 -1
  167. package/dist/cjs/product/next.js +1 -1
  168. package/dist/cjs/product/settings/ProductList.js +1 -1
  169. package/dist/cjs/product/settings/ProductListV3.js +1 -1
  170. package/dist/cjs/product/settings/ProductProperties.js +1 -1
  171. package/dist/cjs/product/settings/dynamic-checkout/configs/settings.js +1 -1
  172. package/dist/cjs/product/settings/product/configs/settings.js +1 -1
  173. package/dist/cjs/product/settings/product-badge/configs/settings.js +1 -1
  174. package/dist/cjs/product/settings/product-button/configs/settings.js +2 -2
  175. package/dist/cjs/product/settings/product-image-v2/ProductImages.js +1 -1
  176. package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  177. package/dist/cjs/product/settings/product-image-v3/ProductImages.js +1 -1
  178. package/dist/cjs/product/settings/product-list/configs/settings.js +1 -0
  179. package/dist/cjs/product/settings/product-list-v3/configs/settings.js +1 -0
  180. package/dist/cjs/product/settings/product-quantity/configs/settings.js +1 -1
  181. package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
  182. package/dist/cjs/radio/next.js +1 -1
  183. package/dist/cjs/select/next.js +1 -1
  184. package/dist/cjs/shop-pay-installment/next.js +1 -1
  185. package/dist/cjs/sticky/common/helper.js +1 -0
  186. package/dist/cjs/sticky/common/styles.js +1 -1
  187. package/dist/cjs/sticky/components/Sticky.liquid.js +7 -7
  188. package/dist/cjs/sticky/hooks/useSticky.js +1 -1
  189. package/dist/cjs/sticky/index.js +1 -1
  190. package/dist/cjs/sticky/next.js +1 -1
  191. package/dist/cjs/sticky/settings/configs/settings-v2.js +1 -1
  192. package/dist/cjs/sticky/settings/configs/ui-v2.js +1 -1
  193. package/dist/cjs/stock-counter/common/attrs.js +1 -1
  194. package/dist/cjs/stock-counter/common/helpers.js +1 -1
  195. package/dist/cjs/stock-counter/common/styles.js +1 -1
  196. package/dist/cjs/stock-counter/hooks/useStockCounter.js +1 -1
  197. package/dist/cjs/stock-counter/next.js +1 -1
  198. package/dist/cjs/stock-counter/settings/StockCounter.js +1 -1
  199. package/dist/cjs/stock-counter/settings/configs/settings.js +2 -0
  200. package/dist/cjs/tab/next.js +1 -1
  201. package/dist/cjs/tab/settings/configs/settings.js +1 -1
  202. package/dist/cjs/text/settings/configs/settings.js +1 -1
  203. package/dist/cjs/textarea/next.js +1 -1
  204. package/dist/cjs/third-party/next.js +1 -1
  205. package/dist/cjs/third-party/settings/AppstleBundlesDiscounts/index.js +2 -2
  206. package/dist/cjs/third-party/settings/BoldSubscriptions/index.js +1 -1
  207. package/dist/cjs/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
  208. package/dist/cjs/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
  209. package/dist/cjs/third-party/settings/LoopSubscriptions/index.js +1 -1
  210. package/dist/cjs/third-party/settings/RechargeSubscriptions/index.js +1 -1
  211. package/dist/cjs/third-party/settings/SeoantTrustBadgesIcon/index.js +2 -2
  212. package/dist/cjs/third-party/settings/SkioSubscriptionsYcS20/index.js +1 -1
  213. package/dist/cjs/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
  214. package/dist/cjs/third-party/settings/TrustshopProductReviews/index.js +1 -1
  215. package/dist/cjs/third-party/settings/WcWishlistBackInStock/index.js +1 -1
  216. package/dist/cjs/third-party-instant/next.js +1 -1
  217. package/dist/cjs/third-party-slot/next.js +1 -1
  218. package/dist/cjs/video/next.js +1 -1
  219. package/dist/esm/accordion/next.js +1 -1
  220. package/dist/esm/accordion/settings/configs/settings.js +2 -17
  221. package/dist/esm/article/components/ArticleContent.js +2 -2
  222. package/dist/esm/article/components/ArticleExcerpt.js +1 -1
  223. package/dist/esm/article/components/ArticleList.js +1 -1
  224. package/dist/esm/article/index.js +1 -1
  225. package/dist/esm/article/next.js +1 -1
  226. package/dist/esm/article/settings/ArticleAuthor.js +2 -2
  227. package/dist/esm/article/settings/ArticleCategory.js +2 -2
  228. package/dist/esm/article/settings/ArticleContent.js +1 -1
  229. package/dist/esm/article/settings/ArticleDate.js +1 -1
  230. package/dist/esm/article/settings/ArticleExcerpt.js +1 -1
  231. package/dist/esm/article/settings/ArticleImage.js +1 -1
  232. package/dist/esm/article/settings/ArticleList.js +1 -1
  233. package/dist/esm/article/settings/ArticleReadMore.js +1 -1
  234. package/dist/esm/article/settings/ArticleTag.js +1 -1
  235. package/dist/esm/article/settings/ArticleTitle.js +1 -1
  236. package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
  237. package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
  238. package/dist/esm/article/settings/configs/article-list/settings.js +1 -1
  239. package/dist/esm/article/settings/configs/article-read-more/settings.js +2 -2
  240. package/dist/esm/breadcrumb/next.js +1 -1
  241. package/dist/esm/breadcrumb/settings/configs/settings.js +1 -1
  242. package/dist/esm/button/common/helpers.js +1 -1
  243. package/dist/esm/button/common/styles.js +1 -1
  244. package/dist/esm/button/components/Button.liquid.js +4 -4
  245. package/dist/esm/button/next.js +1 -1
  246. package/dist/esm/button/settings/configs/settings.js +2 -2
  247. package/dist/esm/carousel/components/item/common/classes.js +1 -1
  248. package/dist/esm/carousel/components/root/common/helpers.js +1 -1
  249. package/dist/esm/carousel/next.js +1 -1
  250. package/dist/esm/carousel/settings/Carousel.js +1 -1
  251. package/dist/esm/carousel-v3/components/item/common/classes.js +1 -1
  252. package/dist/esm/carousel-v3/components/root/CarouselEmbla.liquid.js +3 -4
  253. package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -1
  254. package/dist/esm/carousel-v3/next.js +1 -1
  255. package/dist/esm/carousel-v3/settings/Carousel.js +1 -1
  256. package/dist/esm/cart/components/CartList.js +1 -1
  257. package/dist/esm/cart/index.js +1 -1
  258. package/dist/esm/cart/next.js +1 -1
  259. package/dist/esm/code/next.js +1 -1
  260. package/dist/esm/code/settings/configs/settings.js +1 -1
  261. package/dist/esm/collection/next.js +1 -1
  262. package/dist/esm/collection/settings/collection-banner/configs/settings.js +1 -1
  263. package/dist/esm/collection/settings/collection-description/configs/settings.js +1 -1
  264. package/dist/esm/collection/settings/collection-paginator/configs/settings.js +1 -1
  265. package/dist/esm/collection/settings/collection-title/configs/settings.js +1 -1
  266. package/dist/esm/collection/settings/collection-toolbar/configs/settings.js +1 -1
  267. package/dist/esm/common/const.js +1 -1
  268. package/dist/esm/countdown-timer/components/Countdown.liquid.js +5 -5
  269. package/dist/esm/countdown-timer/next.js +1 -1
  270. package/dist/esm/coupon/next.js +1 -1
  271. package/dist/esm/coupon/settings/configs/settings.js +2 -2
  272. package/dist/esm/dialog/index.js +1 -1
  273. package/dist/esm/dialog/next.js +1 -1
  274. package/dist/esm/dialog/settings/configs/settings.js +1 -1
  275. package/dist/esm/estimate-delivery/next.js +1 -1
  276. package/dist/esm/estimate-delivery/settings/configs/settings.js +1 -1
  277. package/dist/esm/form/components/form-dropdown/FormDropdown.liquid.js +9 -9
  278. package/dist/esm/form/next.js +1 -1
  279. package/dist/esm/form/settings/contact/configs/settings.js +1 -1
  280. package/dist/esm/form/settings/submit-button/configs/settings.js +2 -2
  281. package/dist/esm/grid/components/row/common/helpers.js +1 -1
  282. package/dist/esm/grid/components/section/Section.js +1 -1
  283. package/dist/esm/grid/index.js +1 -1
  284. package/dist/esm/grid/settings/configs/section/settings.js +1 -1
  285. package/dist/esm/header/components/kind/basic/index.js +1 -1
  286. package/dist/esm/header/components/kind/modern/index.js +1 -1
  287. package/dist/esm/header/index.js +1 -1
  288. package/dist/esm/header/next.js +1 -1
  289. package/dist/esm/header/settings/configs/settings.js +2 -2
  290. package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
  291. package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +7 -7
  292. package/dist/esm/hero-banner/index.js +1 -1
  293. package/dist/esm/hero-banner/next.js +1 -1
  294. package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
  295. package/dist/esm/icon/next.js +1 -1
  296. package/dist/esm/icon-list/next.js +1 -1
  297. package/dist/esm/icon-list-hoz/next.js +1 -1
  298. package/dist/esm/icon-list-v2/components/IconList.liquid.js +8 -8
  299. package/dist/esm/icon-list-v2/next.js +1 -1
  300. package/dist/esm/image/common/const.js +1 -1
  301. package/dist/esm/image/common/helpers.js +2 -2
  302. package/dist/esm/image/settings/configs/settings.js +1 -1
  303. package/dist/esm/image-comparison/next.js +1 -1
  304. package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
  305. package/dist/esm/image-detection/next.js +1 -1
  306. package/dist/esm/input/next.js +1 -1
  307. package/dist/esm/line/common/helpers.js +1 -1
  308. package/dist/esm/line/common/styles.js +1 -1
  309. package/dist/esm/line/next.js +1 -1
  310. package/dist/esm/line/settings/configs/settings.js +1 -1
  311. package/dist/esm/link/next.js +1 -1
  312. package/dist/esm/marquee/next.js +1 -1
  313. package/dist/esm/marquee/settings/Marquee.js +1 -1
  314. package/dist/esm/menu/next.js +1 -1
  315. package/dist/esm/modal/next.js +1 -1
  316. package/dist/esm/pagination/next.js +1 -1
  317. package/dist/esm/post-purchase/advanced-list/next.js +1 -1
  318. package/dist/esm/post-purchase/button/next.js +1 -1
  319. package/dist/esm/post-purchase/buyer-consent/next.js +1 -1
  320. package/dist/esm/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  321. package/dist/esm/post-purchase/callout-banner/index.js +1 -1
  322. package/dist/esm/post-purchase/callout-banner/next.js +1 -1
  323. package/dist/esm/post-purchase/countdown-timer/next.js +1 -1
  324. package/dist/esm/post-purchase/image/next.js +1 -1
  325. package/dist/esm/post-purchase/image/settings/Image.js +1 -1
  326. package/dist/esm/post-purchase/line/next.js +1 -1
  327. package/dist/esm/post-purchase/link/next.js +1 -1
  328. package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
  329. package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
  330. package/dist/esm/post-purchase/product/components/product-image/FeatureImage.js +1 -1
  331. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +1 -1
  332. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +1 -1
  333. package/dist/esm/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +1 -1
  334. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
  335. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +1 -1
  336. package/dist/esm/post-purchase/product/hooks/useNavigationCarouselPostPurchase.js +1 -1
  337. package/dist/esm/post-purchase/product/index.js +1 -1
  338. package/dist/esm/post-purchase/product/next.js +1 -1
  339. package/dist/esm/post-purchase/product/settings/product-description/ProductDescription.js +1 -1
  340. package/dist/esm/post-purchase/product/settings/product-discount-tag/ProductDiscountTag.js +1 -1
  341. package/dist/esm/post-purchase/product/settings/product-image/ProductImages.js +1 -1
  342. package/dist/esm/post-purchase/product/settings/product-offer/index.js +1 -1
  343. package/dist/esm/post-purchase/product/settings/product-price/ProductPrice.js +1 -1
  344. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  345. package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
  346. package/dist/esm/post-purchase/product/settings/product-title/ProductTitle.js +1 -1
  347. package/dist/esm/post-purchase/product/settings/product-variants/ProductVariant.js +1 -1
  348. package/dist/esm/post-purchase/text/next.js +1 -1
  349. package/dist/esm/post-purchase/text/settings/text/Text.js +1 -1
  350. package/dist/esm/product/components/file-upload/UploadFile.js +1 -1
  351. package/dist/esm/product/components/file-upload/UploadFile.liquid.js +19 -19
  352. package/dist/esm/product/components/file-upload/common/attr.js +1 -1
  353. package/dist/esm/product/components/file-upload/settings/configs/settings.js +2 -2
  354. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  355. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +14 -14
  356. package/dist/esm/product/components/product-badge/common/styles.js +1 -1
  357. package/dist/esm/product/components/product-badge/utils/injectBadgeStateExtras.js +1 -0
  358. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +1 -1
  359. package/dist/esm/product/components/product-button/ProductButton.liquid.js +5 -5
  360. package/dist/esm/product/components/product-button/common/helpers.js +1 -1
  361. package/dist/esm/product/components/product-description/ProductDescription.liquid.js +3 -3
  362. package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
  363. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
  364. package/dist/esm/product/components/product-images-v3/ProductImagesV3Embla.liquid.js +14 -14
  365. package/dist/esm/product/components/product-images-v3/common/classes.js +1 -1
  366. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  367. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  368. package/dist/esm/product/components/product-list-v3/common/helpers.js +1 -1
  369. package/dist/esm/product/components/product-list-v3/constants/index.js +1 -0
  370. package/dist/esm/product/components/product-list-v3/hooks/useCollectionQuery.js +1 -0
  371. package/dist/esm/product/components/product-list-v3/hooks/useMainRelatedProductQuery.js +1 -0
  372. package/dist/esm/product/components/product-list-v3/hooks/useProductRelatedQuery.js +1 -0
  373. package/dist/esm/product/components/product-list-v3/hooks/useProductsQuery.js +1 -0
  374. package/dist/esm/product/components/product-list-v3/hooks/useRelatedProductIDAssigned.js +1 -0
  375. package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
  376. package/dist/esm/product/components/product-properties/property-select/common/styles.js +1 -1
  377. package/dist/esm/product/components/product-quick-view/ProductQuickView.js +1 -1
  378. package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +8 -8
  379. package/dist/esm/product/components/product-variants/components/dropdown-swatches/Dropdown.liquid.js +7 -7
  380. package/dist/esm/product/components/product-wrap/Product.js +1 -1
  381. package/dist/esm/product/components/product-wrap/hook/useProductQuery.js +1 -0
  382. package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
  383. package/dist/esm/product/helpers/product-bundle.js +1 -1
  384. package/dist/esm/product/index.js +1 -1
  385. package/dist/esm/product/next.js +1 -1
  386. package/dist/esm/product/settings/ProductList.js +1 -1
  387. package/dist/esm/product/settings/ProductListV3.js +1 -1
  388. package/dist/esm/product/settings/ProductProperties.js +1 -1
  389. package/dist/esm/product/settings/dynamic-checkout/configs/settings.js +1 -1
  390. package/dist/esm/product/settings/product/configs/settings.js +1 -1
  391. package/dist/esm/product/settings/product-badge/configs/settings.js +1 -1
  392. package/dist/esm/product/settings/product-button/configs/settings.js +2 -2
  393. package/dist/esm/product/settings/product-image-v2/ProductImages.js +1 -1
  394. package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
  395. package/dist/esm/product/settings/product-image-v3/ProductImages.js +1 -1
  396. package/dist/esm/product/settings/product-list/configs/settings.js +1 -0
  397. package/dist/esm/product/settings/product-list-v3/configs/settings.js +1 -0
  398. package/dist/esm/product/settings/product-quantity/configs/settings.js +1 -1
  399. package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
  400. package/dist/esm/radio/next.js +1 -1
  401. package/dist/esm/select/next.js +1 -1
  402. package/dist/esm/shop-pay-installment/next.js +1 -1
  403. package/dist/esm/sticky/common/helper.js +1 -0
  404. package/dist/esm/sticky/common/styles.js +1 -1
  405. package/dist/esm/sticky/components/Sticky.liquid.js +7 -7
  406. package/dist/esm/sticky/hooks/useSticky.js +1 -1
  407. package/dist/esm/sticky/index.js +1 -1
  408. package/dist/esm/sticky/next.js +1 -1
  409. package/dist/esm/sticky/settings/configs/settings-v2.js +1 -1
  410. package/dist/esm/sticky/settings/configs/ui-v2.js +1 -1
  411. package/dist/esm/stock-counter/common/attrs.js +1 -1
  412. package/dist/esm/stock-counter/common/helpers.js +4 -4
  413. package/dist/esm/stock-counter/common/styles.js +1 -1
  414. package/dist/esm/stock-counter/hooks/useStockCounter.js +1 -1
  415. package/dist/esm/stock-counter/next.js +1 -1
  416. package/dist/esm/stock-counter/settings/StockCounter.js +1 -1
  417. package/dist/esm/stock-counter/settings/configs/settings.js +2 -0
  418. package/dist/esm/tab/next.js +1 -1
  419. package/dist/esm/tab/settings/configs/settings.js +1 -1
  420. package/dist/esm/text/settings/configs/settings.js +1 -1
  421. package/dist/esm/textarea/next.js +1 -1
  422. package/dist/esm/third-party/next.js +1 -1
  423. package/dist/esm/third-party/settings/AppstleBundlesDiscounts/index.js +1 -1
  424. package/dist/esm/third-party/settings/BoldSubscriptions/index.js +1 -1
  425. package/dist/esm/third-party/settings/GloColorSwatchvariantImage/index.js +1 -1
  426. package/dist/esm/third-party/settings/HextomCountdownTimerBar/index.js +2 -2
  427. package/dist/esm/third-party/settings/LoopSubscriptions/index.js +1 -1
  428. package/dist/esm/third-party/settings/RechargeSubscriptions/index.js +1 -1
  429. package/dist/esm/third-party/settings/SeoantTrustBadgesIcon/index.js +2 -2
  430. package/dist/esm/third-party/settings/SkioSubscriptionsYcS20/index.js +1 -1
  431. package/dist/esm/third-party/settings/SproutPlantTreesGrowSales/index.js +1 -1
  432. package/dist/esm/third-party/settings/TrustshopProductReviews/index.js +1 -1
  433. package/dist/esm/third-party/settings/WcWishlistBackInStock/index.js +1 -1
  434. package/dist/esm/third-party-instant/next.js +1 -1
  435. package/dist/esm/third-party-slot/next.js +1 -1
  436. package/dist/esm/video/next.js +1 -1
  437. package/dist/types/index.d.ts +27 -32
  438. package/package.json +4 -4
  439. package/dist/cjs/product/settings/product-list/configs/settings-v2.js +0 -1
  440. package/dist/cjs/product/settings/product-list-v3/configs/settings-v2.js +0 -1
  441. package/dist/cjs/stock-counter/settings/configs/settings-v2.js +0 -2
  442. package/dist/esm/product/settings/product-list/configs/settings-v2.js +0 -1
  443. package/dist/esm/product/settings/product-list-v3/configs/settings-v2.js +0 -1
  444. package/dist/esm/stock-counter/settings/configs/settings-v2.js +0 -2
  445. /package/dist/cjs/carousel/settings/configs/{settings-v2.js → settings.js} +0 -0
  446. /package/dist/cjs/carousel-v3/settings/configs/{settings-v2.js → settings.js} +0 -0
  447. /package/dist/cjs/marquee/settings/configs/{settings-v2.js → settings.js} +0 -0
  448. /package/dist/cjs/post-purchase/image/settings/configs/{setting-v2.js → settings.js} +0 -0
  449. /package/dist/cjs/post-purchase/product/settings/product-description/configs/{settings-v2.js → settings.js} +0 -0
  450. /package/dist/cjs/post-purchase/product/settings/product-discount-tag/configs/{setting-v2.js → settings.js} +0 -0
  451. /package/dist/cjs/post-purchase/product/settings/product-image/configs/{settings-v2.js → settings.js} +0 -0
  452. /package/dist/cjs/post-purchase/product/settings/product-offer/configs/{settings-v2.js → settings.js} +0 -0
  453. /package/dist/cjs/post-purchase/product/settings/product-price/configs/{settings-v2.js → settings.js} +0 -0
  454. /package/dist/cjs/post-purchase/product/settings/product-title/configs/{settings-v2.js → settings.js} +0 -0
  455. /package/dist/cjs/post-purchase/product/settings/product-variants/configs/{settings-v2.js → settings.js} +0 -0
  456. /package/dist/cjs/post-purchase/text/settings/text/configs/{setting-v2.js → settings.js} +0 -0
  457. /package/dist/cjs/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
  458. /package/dist/cjs/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
  459. /package/dist/cjs/product/settings/product-image-v2/configs/{setting-v2 → settings}/index.js +0 -0
  460. /package/dist/cjs/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
  461. /package/dist/cjs/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
  462. /package/dist/cjs/product/settings/product-image-v3/configs/{setting-v2 → settings}/index.js +0 -0
  463. /package/dist/cjs/product/settings/product-properties/configs/{settings-v2.js → settings.js} +0 -0
  464. /package/dist/esm/carousel/settings/configs/{settings-v2.js → settings.js} +0 -0
  465. /package/dist/esm/carousel-v3/settings/configs/{settings-v2.js → settings.js} +0 -0
  466. /package/dist/esm/marquee/settings/configs/{settings-v2.js → settings.js} +0 -0
  467. /package/dist/esm/post-purchase/image/settings/configs/{setting-v2.js → settings.js} +0 -0
  468. /package/dist/esm/post-purchase/product/settings/product-description/configs/{settings-v2.js → settings.js} +0 -0
  469. /package/dist/esm/post-purchase/product/settings/product-discount-tag/configs/{setting-v2.js → settings.js} +0 -0
  470. /package/dist/esm/post-purchase/product/settings/product-image/configs/{settings-v2.js → settings.js} +0 -0
  471. /package/dist/esm/post-purchase/product/settings/product-offer/configs/{settings-v2.js → settings.js} +0 -0
  472. /package/dist/esm/post-purchase/product/settings/product-price/configs/{settings-v2.js → settings.js} +0 -0
  473. /package/dist/esm/post-purchase/product/settings/product-title/configs/{settings-v2.js → settings.js} +0 -0
  474. /package/dist/esm/post-purchase/product/settings/product-variants/configs/{settings-v2.js → settings.js} +0 -0
  475. /package/dist/esm/post-purchase/text/settings/text/configs/{setting-v2.js → settings.js} +0 -0
  476. /package/dist/esm/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
  477. /package/dist/esm/product/settings/product-image-v2/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
  478. /package/dist/esm/product/settings/product-image-v2/configs/{setting-v2 → settings}/index.js +0 -0
  479. /package/dist/esm/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductFeatureImage.js +0 -0
  480. /package/dist/esm/product/settings/product-image-v3/configs/{setting-v2 → settings}/ProductGalleryImage.js +0 -0
  481. /package/dist/esm/product/settings/product-image-v3/configs/{setting-v2 → settings}/index.js +0 -0
  482. /package/dist/esm/product/settings/product-properties/configs/{settings-v2.js → settings.js} +0 -0
@@ -1,6 +1,6 @@
1
- import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonState as e,escapeSingleQuoteForAttr as s}from"./common/helpers.js";import{template as r,isLocalEnv as a,baseAssetURL as o}from"@gem-sdk/core";import{createStateOrContext as i,Liquid as n,LiquidFor as p,If as l}from"@gem-sdk/system";import{getInsertLinkData as c,getSettingPreloadData as u}from"../../../helpers.js";import{getButtonDynamicSourceLocales as d}from"./helpers/getButtonDynamicSourceLocales.js";import{SoldOutButton as m}from"./SoldOutButton.liquid.js";import{AddToCartButton as g}from"./AddToCartButton.liquid.js";let f=f=>{let{setting:$,builderProps:y,style:b,styles:v,pageContext:_}=f,{wrapStyle:h,restStyle:S}=t(b),{outOfStockButtonLabel:j,unavailableButtonLabel:q,variantSelectionRequiredMessage:k,successMessage:E,errorMessage:M}=d({setting:$,pageContext:_,builderProps:y}),{urlData:A}=c("",$?.actionEffect==="open-cart-drawer"?{link:"/cart",target:"_self"}:$?.customURL),B=i(e({styles:v,setting:$})),G=s(E??$?.successMessage),P=s(M??$?.errorMessage),w=s(k??$?.variantSelectionRequiredMessage);return r`
1
+ import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonState as e,escapeSingleQuoteForAttr as s}from"./common/helpers.js";import{template as r,isLocalEnv as a,baseAssetURL as o}from"@gem-sdk/core";import{createStateOrContext as i,Liquid as n,LiquidFor as l,If as p}from"@gem-sdk/system";import{getInsertLinkData as c,getSettingPreloadData as u}from"../../../helpers.js";import{getButtonDynamicSourceLocales as d}from"./helpers/getButtonDynamicSourceLocales.js";import{SoldOutButton as m}from"./SoldOutButton.liquid.js";import{AddToCartButton as g}from"./AddToCartButton.liquid.js";let f=f=>{let{setting:$,builderProps:y,style:b,styles:v,pageContext:_}=f,{wrapStyle:h,restStyle:S}=t(b),{outOfStockButtonLabel:j,unavailableButtonLabel:q,variantSelectionRequiredMessage:k,successMessage:E,errorMessage:A}=d({setting:$,pageContext:_,builderProps:y}),{urlData:M}=c("",$?.actionEffect==="open-cart-drawer"?{link:"/cart",target:"_self"}:$?.customURL),B=i(e({styles:v,setting:$})),G=s(E??$?.successMessage),P=s(A??$?.errorMessage),w=s(k??$?.variantSelectionRequiredMessage);return r`
2
2
  ${n("{%- assign total_combinations = 1 -%}")}
3
- ${p("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
3
+ ${l("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
4
4
  {%- liquid
5
5
  assign inventory_quantity = variant.inventory_quantity | default: 0
6
6
  assign is_in_stock = variant.available
@@ -8,7 +8,7 @@ import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonStat
8
8
  <gp-product-button
9
9
  style="${h}"
10
10
  gp-data-wrapper="true"
11
- gp-href="${A.href}"
11
+ gp-href="${M.href}"
12
12
  class="gp-product-button"
13
13
  gp-label-out-of-stock="${j}"
14
14
  gp-label-unavailable="${q}"
@@ -18,9 +18,9 @@ import{getSplitStyle as t}from"./common/styles.js";import{getGPProductButtonStat
18
18
  gp-success-message="${G}"
19
19
  data-variant-selection-required-message="${k}"
20
20
  >
21
- <script gp-data type="application/json">${JSON.stringify(B)}</script>
21
+ <script gp-data type="application/json">${JSON.stringify(B).replaceAll("'","&#039;")}</script>
22
22
  ${g({...f,style:S})}
23
23
  ${m({...f,style:S,label:j})}
24
24
  </gp-product-button>
25
- ${l(a,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-button-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-button-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
25
+ ${p(a,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-product-button-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-button-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
26
26
  `};export{f as default};
@@ -1 +1 @@
1
- import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","&#39;").replaceAll("’","&#39;").replaceAll('"',"&quot;")},a=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),n=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,s=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{a as checkIconVisibility,o as escapeSingleQuoteForAttr,c as getGPProductButtonState,i as getRenderComparePriceSettings,l as getRenderRegularPriceSettings,n as renderSeparator};
1
+ import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape }}"),o=e=>{if(null==e)return e;let o=e.toString();return t.test(o)?r(o):o.replaceAll("'","&#39;").replaceAll("’","&#39;").replaceAll('"',"&quot;")},a=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:o(t?.label),outOfStockLabel:o(t?.outOfStockLabel),customURL:{link:o(t?.customURL?.link),target:t?.customURL?.target}},variantID:"{{variant.id}}",inStock:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),n=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,s=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{a as checkIconVisibility,o as escapeSingleQuoteForAttr,c as getGPProductButtonState,i as getRenderComparePriceSettings,l as getRenderRegularPriceSettings,n as renderSeparator};
@@ -1,11 +1,11 @@
1
- import{makeStyleResponsive as t,makeLineClamp as e,dataStringify as s,template as i,baseAssetURL as o,isLocalEnv as p}from"@gem-sdk/core";import{getDynamicSourceLocales as r,createSettingId as a,getSettingPreloadData as n}from"../../../helpers.js";import{createClass as d,createStyle as c,createAttr as l,createStateOrContext as m,LiquidIf as $,Liquid as u,LiquidUnless as g,If as v}from"@gem-sdk/system";import{getClasses as f,getButtonClasses as x,getClassPreBuilt as w}from"./common/classes.js";import{getTextStyle as h,getButtonStyle as y,getStaticCss as C}from"./common/styles.js";import{ICON_SVG as j}from"./common/helpers.js";import{ProductDescription as b}from"../../settings/product-description/configs/translate.js";let M=M=>{let{setting:S,advanced:I,builderProps:L,pageContext:T}=M,{htmlTag:k,viewMoreText:E,viewLessText:P}=S??{},V="html"===k?"div":"p",A=d({"gp-product-description":!0,[I?.cssClass]:!0}),D=d(f({setting:S,isLiquid:!0})),G=d(x({setting:S})),_=d({"gp-show-more-text":!0}),q=d({"gp-show-more-icon gp-ml-1":!0}),H=c({...h({setting:S,renderMaxHeight:!0}),...t("line-clamp",e(S?.lineClamp,S?.hasLineClamp))}),N=d(w()),O=c(y({setting:S})),R=l({"data-id":`${L?.uid}`}),z=l({"data-gp-text":""}),{textDescriptionCss:B,gpDescriptionCss:F}=C(),J="product.description == blank",K=r({val:E,uid:L?.uid,settingId:a({id:b?.viewMoreText?.id}),pageContext:T??{}}),Q=r({val:P,uid:L?.uid,settingId:a({id:b?.viewLessText?.id}),pageContext:T??{}}),U=m({setting:{lineClamp:S?.lineClamp,hasLineClamp:S?.hasLineClamp,viewMoreText:K,viewLessText:Q,enableViewMoreIcon:S?.enableViewMoreIcon},textStyle:H});return $(J,"",u(i`
1
+ import{makeStyleResponsive as e,makeLineClamp as t,dataStringify as s,template as i,baseAssetURL as o,isLocalEnv as p}from"@gem-sdk/core";import{getDynamicSourceLocales as r,createSettingId as a,getSettingPreloadData as n}from"../../../helpers.js";import{createClass as d,createStyle as l,createAttr as c,createStateOrContext as m,LiquidIf as $,Liquid as u,LiquidUnless as g,If as v}from"@gem-sdk/system";import{getClasses as f,getButtonClasses as x,getClassPreBuilt as w}from"./common/classes.js";import{getTextStyle as h,getButtonStyle as y,getStaticCss as C}from"./common/styles.js";import{ICON_SVG as j}from"./common/helpers.js";import{ProductDescription as b}from"../../settings/product-description/configs/translate.js";let M=M=>{let{setting:S,advanced:I,builderProps:L,pageContext:T}=M,{htmlTag:k,viewMoreText:E,viewLessText:P}=S??{},V="html"===k?"div":"p",A=d({"gp-product-description":!0,[I?.cssClass]:!0}),D=d(f({setting:S,isLiquid:!0})),G=d(x({setting:S})),_=d({"gp-show-more-text":!0}),q=d({"gp-show-more-icon gp-ml-1":!0}),H=l({...h({setting:S,renderMaxHeight:!0}),...e("line-clamp",t(S?.lineClamp,S?.hasLineClamp))}),N=d(w()),O=l(y({setting:S})),R=c({"data-id":`${L?.uid}`}),z=c({"data-gp-text":""}),{textDescriptionCss:B,gpDescriptionCss:F}=C(),J="product.description == blank",K=r({val:E,uid:L?.uid,settingId:a({id:b?.viewMoreText?.id}),pageContext:T??{}}),Q=r({val:P,uid:L?.uid,settingId:a({id:b?.viewLessText?.id}),pageContext:T??{}}),U=m({setting:{lineClamp:S?.lineClamp,hasLineClamp:S?.hasLineClamp,viewMoreText:K,viewLessText:Q,enableViewMoreIcon:S?.enableViewMoreIcon},textStyle:H});return $(J,"",u(i`
2
2
  <gp-product-description
3
3
  ${R}
4
4
  class="${A}"
5
5
  data-view-more-text="${K}"
6
6
  data-view-less-text="${Q}"
7
7
  >
8
- <script gp-data type="application/json">${s(U)}</script>
8
+ <script gp-data type="application/json">${s(U).replaceAll("'","&#039;")}</script>
9
9
  <style>${B}${F}</style>
10
10
  <div class="${N}" ></div>
11
11
  ${g("product","<p>Product not found</p>",i`<${V} ${z} class="${D}" style="${H}">
@@ -19,5 +19,5 @@ import{makeStyleResponsive as t,makeLineClamp as e,dataStringify as s,template a
19
19
  </button>`)}`)}
20
20
  </gp-product-description>
21
21
 
22
- ${(()=>{let t=p?"{{ 'gp-product-description-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${n('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
22
+ ${(()=>{let e=p?"{{ 'gp-product-description-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-description-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${n('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`})()}
23
23
  `))};export{M as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import r from"../../../text/components/Text.js";import{createStyle as d,createClass as m,If as n}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=d(a(y)),C=d(p(y)),I=m(c(y)),E=m(u()),G=m(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:n(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all gp-items-center",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useI18nStore as s,makeStyleResponsive as o}from"@gem-sdk/core";import i from"../../../common/components/NoDataState.js";import l from"../../../common/components/TooltipHover.js";import"../../../common/const.js";import r from"../../../text/components/Text.js";import{createStyle as m,createClass as n,If as d}from"@gem-sdk/system";import{getWrapperTextStyle as a,getContainerStyle as p}from"./common/styles.js";import{getWrapperTextClass as c,getContainerClass as u,getRootClass as x}from"./common/classes.js";import{useGpDiscountTag as f}from"./hooks/useGpDiscountTag.js";let g=({setting:g,styles:y,builderProps:h,...b})=>{let{customContent:j}=g??{},N=b["bundle-item"],{textAlign:v}=y??{},{t:T}=s(),{mode:k,product:w,salePrice:A,priceSave:D,currentProductId:F,unitCustomDisplay:S,shouldPlaceholderNoDiscount:$}=f({setting:g,styles:y,builderProps:h,...b});if($)return e(l,{enable:!0,text:T("Not be displayed when published"),position:"bottom",width:"205px",children:e(i,{builderAttrs:h?.builderData,elementType:"secondary",description:T("No discount"),rawMode:!0,customClass:"!gp-p-[5px]"})});let q=m(a(y)),C=m(p(y)),I=n(c(y)),E=n(u()),G=n(x({mode:k,salePrice:A,priceSave:D,bundleItem:N}));return e("div",{className:G,style:{...o("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-id":h?.uid,"data-product-id":F,"gp-data-hidden":"false",children:d(!w," ",e("div",{className:E,style:C,children:e("div",{className:I,style:q,children:t("div",{className:"gp-flex gp-break-all",children:[e(r,{styles:y,setting:{...g,text:j?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:S,options:{isCannotEditing:!0},excludeFlex:!0}}),e(r,{styles:y,setting:{...g,text:j?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}))})};export{g as default};
@@ -9,8 +9,8 @@ import{isLocalEnv as e,baseAssetURL as o,template as i,WrapRenderChildren as t,R
9
9
  "collectionUrl": {{ collection.url | json }},
10
10
  "collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
11
11
  }
12
- `,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=s(N?.position,G?.type),q=k?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(N),R=u({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=()=>i`
13
- ${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return i`${r({...e,isInsideProductImage:!0,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
12
+ `,B=$({"section-id":"{{section.id}}","data-id":`${b?.uid}`}),{isOnlyFeatureAllDevices:U,isRenderGalleryGrid:k}=s(N?.position,G?.type),q=k?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:E,productImagesGalleryClasses:J}=f(C),w=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(N),R=u({shape:N.shape,shapeForBottom:N.shapeForBottom,shapeFor1Col:N.shapeFor1Col,shapeFor2Col:N.shapeFor2Col,shapeForFtOnly:N.shapeForFtOnly,shapeForInsideBottom:N.shapeForInsideBottom??g,shapeForInside:N.shapeForInside??g},N.position),V=a(N.position,R,N?.spacing),W=(e=!1)=>i`
13
+ ${t({uid:b?.uid||"",customProps:O?.[0].customProps},O?.map(o=>{if(o)return i`${r({...o,isInsideProductImage:!0,isInsideImageList:e,imageData:{imageShape:D?.ftShape,imageAlign:D?.align,imageLayout:D?.position},dotData:{dotSize:G?.ftDotSize,dotGapToCarousel:G?.ftDotGapToCarousel,dotStyle:G?.ftDotStyle}})}`}))}
14
14
  `;return i`
15
15
  ${v(G?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:N,uid:b?.uid,type:"Liquid"})}</style>`),"")}
16
16
  ${S(`
@@ -35,7 +35,7 @@ import{isLocalEnv as e,baseAssetURL as o,template as i,WrapRenderChildren as t,R
35
35
  ${{...q}}
36
36
  >
37
37
  ${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${b?.uid}`,...N,pageContext:_}))}
38
- ${v(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(),...N,pageContext:_}))}
38
+ ${v(k,m({builderPropUID:b?.uid,wrapperStyle:{...V},children:W(!0),...N,pageContext:_}))}
39
39
  </div>
40
40
  `)}
41
41
  </div>
@@ -1,44 +1,44 @@
1
- import{isLocalEnv as e,baseAssetURL as o,template as i,WrapRenderChildren as t,RenderChildren as r}from"@gem-sdk/core";import{getConditionRenderGalleryImages as s,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as n,getSettingPreloadData as c}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as y}from"./composables/getProductImagesStyles.js";import{createAttr as $,LiquidIf as h,createClass as j,If as v,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
1
+ import{isLocalEnv as e,baseAssetURL as o,template as s,WrapRenderChildren as r,RenderChildren as i}from"@gem-sdk/core";import{getConditionRenderGalleryImages as t,getStyleInsideLayout as a,setDefaultWhenUndefineSetting as l}from"./common/common.js";import p from"./components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js";import d from"./components/gallery-carousel/GalleryCarouselEmbla.liquid.js";import m from"./components/gallery-grid/GalleryGrid.liquid.js";import{filterPageContext as c,getSettingPreloadData as n}from"../../../helpers.js";import{getShapeByLayout as u,sizeSettingDefaultForNewLayout as g}from"./common/productGallery.js";import{getProductImagesClassName as f}from"./composables/getProductImagesClassName.js";import{getProductImagesStyles as $}from"./composables/getProductImagesStyles.js";import{createAttr as y,LiquidIf as h,createClass as v,If as j,Liquid as S}from"@gem-sdk/system";import{getBorderActiveCss as F}from"./common/getBorderActiveCss.js";import{getStyleOfObject as I}from"../../helpers/function.js";let C=C=>{let P=l(C),{setting:b,styles:G,builderProps:D,style:z}=P,{rawChildren:O,pageContext:_}=C,E={...b,...G},N=`
2
2
  {
3
3
  "id":${JSON.stringify(D?.uid)},
4
- "pageContext": ${JSON.stringify(n(_))},
4
+ "pageContext": ${JSON.stringify(c(_))},
5
5
  "setting":${JSON.stringify(b)},
6
6
  "styles":${JSON.stringify(G)},
7
- "productUrl":{{product.url | json }},
8
- "product":{% if product %}{"id":{{ product.id | json }},"handle":{{ product.handle | json }},"media":{{ product.media | json }}}{% else %}null{% endif %},
9
- "collectionUrl": {{ collection.url | json }},
10
- "collection": {% if collection %}{"handle":{{ collection.handle | json }}}{% else %}null{% endif %}
7
+ "productUrl":{{product.url | json | escape}},
8
+ "product":{% if product %}{"id":{{ product.id | json | escape }},"handle":{{ product.handle | json | escape }},"media":{{ product.media | json | escape }}}{% else %}null{% endif %},
9
+ "collectionUrl": {{ collection.url | json | escape }},
10
+ "collection": {% if collection %}{"handle":{{ collection.handle | json | escape }}}{% else %}null{% endif %}
11
11
  }
12
- `,A=$({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=s(E?.position,b?.type),k=U?{}:$({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=j({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=j({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=y(E),R=u({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>i`
13
- ${t({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return i`${r({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
14
- `;return i`
15
- ${v(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
12
+ `,A=y({"section-id":"{{section.id}}","data-id":`${D?.uid}`}),{isOnlyFeatureAllDevices:B,isRenderGalleryGrid:U}=t(E?.position,b?.type),k=U?{}:y({"data-only-image":h("product.media.size > 1","false","true")}),{wrapperClasses:q,productImagesGalleryClasses:J}=f(C),w=v({"gp-grid gp-w-full !gp-m-0 gp-relative":!0}),T=v({"gp-w-full !gp-m-0 gp-relative":!0}),{wrapContainerStyle:x,wrapContainerStyleOnlyOneImage:L,galleryImageStyle:M}=$(E),R=u({shape:E.shape,shapeForBottom:E.shapeForBottom,shapeFor1Col:E.shapeFor1Col,shapeFor2Col:E.shapeFor2Col,shapeForFtOnly:E.shapeForFtOnly,shapeForInsideBottom:E.shapeForInsideBottom??g,shapeForInside:E.shapeForInside??g},E.position),V=a(E.position,R,E?.spacing),W=()=>s`
13
+ ${r({uid:D?.uid||"",customProps:O?.[0].customProps},O?.map(e=>{if(e)return s`${i({...e,isInsideProductImage:!0,imageData:{imageShape:G?.ftShape,imageAlign:G?.align,imageLayout:G?.position},dotData:{dotSize:b?.ftDotSize,dotGapToCarousel:b?.ftDotGapToCarousel,dotStyle:b?.ftDotStyle}})}`}))}
14
+ `;return s`
15
+ ${j(b?.borderActive?.border!=="none",h("product.media.size > 1",`<style>${F({settings:E,uid:D?.uid,type:"Liquid"})}</style>`),"")}
16
16
  ${S(`
17
17
  {% assign featured_image = product.featured_image %}
18
18
  ${h("variant != null and variant.featured_image != null","{% assign featured_image = variant.featured_image %}")}
19
19
  `)}
20
20
  <gp-product-images-v3
21
+ gp-data='${N}'
21
22
  ${{...A}}
22
23
  style="${{...z}}"
23
24
  class="${q}"
24
25
  >
25
- <script gp-data type="application/json">${N}</script>
26
26
  <div
27
27
  class="${h("product.media.size > 1",`${w}`,`${T}`)}"
28
28
  style="${h("product.media.size > 1",I(x),I(L))}"
29
29
  >
30
30
  ${p({builderPropUID:`gp-carousel-${D?.uid}`,...E,children:W(),pageContext:_})}
31
- ${v(!B,i`
31
+ ${j(!B,s`
32
32
  <div
33
33
  class="${J}"
34
34
  style="${I(M)}"
35
35
  ${{...k}}
36
36
  >
37
37
  ${h("product.media.size > 1",d({builderPropUID:`gp-gallery-${D?.uid}`,...E,pageContext:_}))}
38
- ${v(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
38
+ ${j(U,m({builderPropUID:D?.uid,wrapperStyle:{...V},children:W(),...E,pageContext:_}))}
39
39
  </div>
40
40
  `)}
41
41
  </div>
42
42
  </gp-product-images-v3>
43
- ${v(e,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
43
+ ${j(e,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-images-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-images-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
44
44
  `};export{C as default};
@@ -1 +1 @@
1
- import{DEVICES as e,getResponsiveValueByScreen as l}from"@gem-sdk/core";function t(e){return e.split(" ").reduce((e,l)=>(e[l]=!0,e),{})}let r=({extraClass:e,isAddOverFlowClass:l=!1})=>{let r="gp-relative gp-w-full";return e&&(r+=` ${e}`),l&&(r+=" gp-overflow-hidden"),t(r)},g=({extraClass:e})=>{let l="gallery-wrapper gp-product-images-gallery gp-flex gp-overflow-hidden gp-max-w-full gp-max-h-full data-[only-image=true]:gp-hidden";return e&&(l+=` ${e}`),t(l)},p=({extraClass:e})=>{let l="product-feature-image grid-gallery gp-flex !gp-h-fit gp-w-full gp-flex-wrap scrollbar-track:gp-rounded-2xl scrollbar-thumb:gp-rounded-2xl scrollbar-thumb:gp-bg-gray-400 gp-z-1";return e&&(l+=` ${e}`),t(l)},a=({extraClass:e})=>{let l="gp-flex !gp-h-fit gp-relative gp-overflow-hidden";return e&&(l+=` ${e}`),t(l)},s=({extraClass:e})=>{let l="gp-flex gp-h-fit gp-max-w-full gp-overflow-hidden";return e&&(l+=` ${e}`),t(l)},i=({extraClass:e})=>{let l="`gp-flex-1 gp-w-full gp-feature-image-carousel";return e&&(l+=` ${e}`),t(l)},o=({setting:r,extraClass:g})=>{let p=g??"";return e.forEach(e=>{let t=l(r?.ftNavigationPosition,e),g="desktop"!==e?`${e}:`:"";"outside"===t?p+=` ${g}gp-px-[16px]`:p+=` ${g}gp-px-0`}),t(p)},u=({settings:r,extraClass:g})=>{let p=g??"gp-flex-1 gp-w-full carousel-gallery";return e.forEach(e=>{let t=l(r?.navigationPosition,e),g=l(r?.type,e),a=l(r?.position,e),s="desktop"!==e?`${e}:`:"";"outside"===t&&"slider"===g&&["bottom-center"].includes(a||"")?p+=` ${s}gp-px-[16px]`:p+=` ${s}gp-px-0`}),t(p)},f=({extraClass:e})=>{let l="gp-image-item gp-flex gp-items-center gp-justify-center gp-group gp-relative gp-overflow-hidden gp-cursor-pointer";return e&&(l+=` ${e}`),t(l)},n=({extraClass:e})=>{let l="gp-group gp-z-0 gp-flex !gp-min-w-full !gp-max-w-full gp-w-full gp-relative gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 gp-image-item gp-ft-image-item data-[outline=active]:gp-outline";return e&&(l+=` ${e}`),t(l)},d="gp-flex gp-items-center gp-justify-center";export{d as FEATURE_MEDIA_CENTER_CLASSES,n as getFeaturedCarouselItemClasses,i as getFeaturedImageCarouselClasses,o as getFeaturedImageClasses,u as getFeaturedImageGalleryClasses,a as getFtImageWithGalleryClasses,p as getGalleryGridWrapperClasses,f as getGalleryItemClasses,g as getGalleryWrapperClasses,s as getImageGalleryWrapperClasses,r as getWrapperClasses};
1
+ import{DEVICES as e,getResponsiveValueByScreen as l}from"@gem-sdk/core";function t(e){return e.split(" ").reduce((e,l)=>(e[l]=!0,e),{})}let r=({extraClass:e,isAddOverFlowClass:l=!1})=>{let r="gp-relative gp-w-full";return e&&(r+=` ${e}`),l&&(r+=" gp-overflow-hidden"),t(r)},g=({extraClass:e})=>{let l="gallery-wrapper gp-product-images-gallery gp-flex gp-overflow-hidden gp-max-w-full gp-max-h-full data-[only-image=true]:gp-hidden";return e&&(l+=` ${e}`),t(l)},p=({extraClass:e})=>{let l="product-feature-image grid-gallery gp-flex !gp-h-fit gp-w-full gp-flex-wrap scrollbar-track:gp-rounded-2xl scrollbar-thumb:gp-rounded-2xl scrollbar-thumb:gp-bg-gray-400 gp-z-1";return e&&(l+=` ${e}`),t(l)},a=({extraClass:e})=>{let l="gp-flex !gp-h-fit gp-relative gp-overflow-hidden";return e&&(l+=` ${e}`),t(l)},s=({extraClass:e})=>{let l="gp-flex gp-h-fit gp-max-w-full gp-overflow-hidden";return e&&(l+=` ${e}`),t(l)},i=({extraClass:e})=>{let l="gp-flex-1 gp-w-full gp-feature-image-carousel";return e&&(l+=` ${e}`),t(l)},o=({setting:r,extraClass:g})=>{let p=g??"";return e.forEach(e=>{let t=l(r?.ftNavigationPosition,e),g="desktop"!==e?`${e}:`:"";"outside"===t?p+=` ${g}gp-px-[16px]`:p+=` ${g}gp-px-0`}),t(p)},u=({settings:r,extraClass:g})=>{let p=g??"gp-flex-1 gp-w-full carousel-gallery";return e.forEach(e=>{let t=l(r?.navigationPosition,e),g=l(r?.type,e),a=l(r?.position,e),s="desktop"!==e?`${e}:`:"";"outside"===t&&"slider"===g&&["bottom-center"].includes(a||"")?p+=` ${s}gp-px-[16px]`:p+=` ${s}gp-px-0`}),t(p)},f=({extraClass:e})=>{let l="gp-image-item gp-flex gp-items-center gp-justify-center gp-group gp-relative gp-overflow-hidden gp-cursor-pointer";return e&&(l+=` ${e}`),t(l)},n=({extraClass:e})=>{let l="gp-group gp-z-0 gp-flex !gp-min-w-full !gp-max-w-full gp-w-full gp-relative gp-items-start gp-justify-center gp-overflow-hidden gp-outline-1 -gp-outline-offset-1 gp-image-item gp-ft-image-item data-[outline=active]:gp-outline";return e&&(l+=` ${e}`),t(l)},d="gp-flex gp-items-center gp-justify-center";export{d as FEATURE_MEDIA_CENTER_CLASSES,n as getFeaturedCarouselItemClasses,i as getFeaturedImageCarouselClasses,o as getFeaturedImageClasses,u as getFeaturedImageGalleryClasses,a as getFtImageWithGalleryClasses,p as getGalleryGridWrapperClasses,f as getGalleryItemClasses,g as getGalleryWrapperClasses,s as getImageGalleryWrapperClasses,r as getWrapperClasses};
@@ -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,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as k,flattenConnection as I,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import O from"next/head";import w from"./ProductListGridLayout.js";import S from"./ProductListCarouselLayout.js";import{getStyle as C}from"./common/styles.js";import{If as E}from"@gem-sdk/system";import{getClass as N}from"./common/classes.js";import{getData as L}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let j=o(()=>import("../ProductNotFound.js"),{loading:d}),x=o=>{let{children:x,styles:G,builderProps:M,setting:B,builderAttrs:A}=o,{isRelatedProduct:H,productSetting:Q}=L(o),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:D,isPreviewSharePageMode:F}=c(),R=s(),$=n(),_=u(e=>e.dynamicProduct),V=u(e=>e.dynamicCollection),[q,U]=a(1),[J,K]=a(!0),[X,Y]=a(),[Z,ee]=a(!1),et="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"==$&&(Q.productSrc="DynamicCollection",Q.collectionId=V?.collectionId??"latest");let er=Q?.productSrc??"Collection",eo=_?.productId&&_?.productId!==Q.relatedProductId?_?.productId:Q.relatedProductId,ed=m(),ea=u(e=>e.publicStoreFrontData),el=l(()=>g(ea)?h(ea):ed,[ea]),{data:ei}=p(H&&eo?eo:void 0,{revalidateOnMount:D||F},el),ec=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),es=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ei?.vendor,eu=f(X,{revalidateOnMount:D||F},el),em=D||F,eg=P("PickProduct"===er?Q?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:em&&Q?.productIds?.length?b:void 0}),eh=l(()=>({id:Q?.collectionId??"latest",numberOfProducts:B?.numberOfProducts??4,orderBy:B?.orderBy}),[Q?.collectionId,Number(B?.numberOfProducts),B?.orderBy]),ep=k("PickProduct"!==er?eh:void 0,{revalidateOnMount:em});i(()=>{if(H&&ei&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(ee(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Y({first:B?.numberOfProducts,where:{vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ei?.vendor:"",idNEQ:ei.id}});break;case"collection":{let t=ei?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ee(!0);break}Y(e&&e.length>0?{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ei.tags||0===ei.tags.length){ee(!0);break}Y(e&&e.length>0?{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}]}}:{first:B?.numberOfProducts,where:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}]}})}}},[ei,Q.relatedType,Q.relatedTag,B?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let ef="PickProduct"===er?eg.isValidating:ep.isValidating,eP="PickProduct"===er?eg.isLoading:ep.isLoading,eb="PickProduct"===er?eg.error:ep.error,ek=ep.data?.collections?.edges?.[0]?.node,eI="PickProduct"===er?I(eg.data?.products):I(ek?.products),eT=eu?.data?.products?I(eu?.data?.products):void 0,ev=H&&eT?eT:"PickProduct"===er&&Q?.productIds?.length?Q?.productIds?.map(e=>eI?.find(t=>t?.baseID===e)).filter(Boolean)??eI:"PickProduct"!==er?eI:eI.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),ey=l(()=>Z&&H&&D||!ev.length&&!eP&&J&&D,[J,eP,Z,H,D,ev.length]),eO=l(()=>!ev||Z&&H,[Z,H,ev]),ew=l(()=>{if(!B?.sameHeight)return[];let e=0,t=Math.ceil((ev?.length??0)/+(B?.slidesToShow?.[R]??1));return Array.from(Array(ev?.length??0)).map((r,o)=>(o>=+(B?.slidesToShow?.[R]??1)*(e+1)&&++e,{gridRow:`${1+q*e}/${q+1+q*e}`,marginBottom:e+1<t?W(G?.horizontalGutter,R):void 0}))},[B?.sameHeight,B?.slidesToShow,q,ev?.length,R,G?.horizontalGutter]),eS=l(()=>ef||eP||eb||!ev||Z&&H,[eb,eP,Z,H,ef,ev]);i(()=>{eS||setTimeout(()=>{let{builderData:e}=M??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&U(r.childElementCount||1)},D?0:500)},[M,eS,D]);let eC=l(()=>({collection:ek,products:ev,settings:{loop:B?.loop??{desktop:!1},scrollMode:B?.scrollMode??{desktop:"snap"},slidesToShow:B?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:G?.layout,dot:B?.dot,dotStyle:B?.dotStyle,arrow:B?.arrow,controlOverContent:B?.controlOverContent,sameHeight:B?.sameHeight},styles:{horizontalGutter:G?.horizontalGutter,verticalGutter:G?.verticalGutter,fullWidth:G?.fullWidth,spacing:G?.spacing,width:G?.width,height:G?.height}}),[ek,ev,B,G]);if(M?.isPreview&&et)return e(t,{});if(ey)return e(t,{children:E(J,e(j,{builderAttrs:A,collectionHandle:ek?.handle,productSrc:er,onClose:()=>K(!1),children:x,relatedTagString:z,assignProductNoTags:ec||es||en,noAssignedProduct:!eo}))});let{productListWrapStyle:eE,productListContentStyle:eN,productListWrapAlignStyle:eL}=C(o),{productListWrapClass:eW}=N(o);return r("div",{...A,className:eW,style:eE,children:[!!G?.preloadBgImage&&r(O,{children:[!!G.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage.desktop.image.src,as:"image"}),!!G.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.tablet?.image?.src,as:"image"}),!!G.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.mobile?.image?.src,as:"image"})]}),ef||eP?e(d,{}):eb?r("div",{children:["Error: ",eb?.message]}):eO?e("div",{children:"Products not found"}):e(T,{...eC,children:e("div",{className:"gp-flex gp-w-full",style:eL,children:r("div",{style:eN,children:[et&&e(y,{}),e(t,{children:E(G?.layout==="grid",e(w,{...o,productSortedById:ev,generateGridRowArray:ew}),e(S,{...o,productSortedById:ev}))})]})})}),v(x,!0)]})};export{x as default};
1
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as s,usePageType as n,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as f,useProductsQuery as P,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as k,flattenConnection as I,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as y}from"../../../common/const.js";import O from"../SalePageProductListWarning.js";import S from"next/head";import C from"./ProductListGridLayout.js";import E from"./ProductListCarouselLayout.js";import{getStyle as N}from"./common/styles.js";import{If as w}from"@gem-sdk/system";import{getClass as L}from"./common/classes.js";import{getData as j}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let x=r(()=>import("../ProductNotFound.js"),{loading:d}),G=r=>{let{children:G,styles:M,builderProps:B,setting:A,builderAttrs:D}=r,{isRelatedProduct:H,productSetting:Q}=j(r),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:F,isPreviewSharePageMode:R}=c(),$=s(),_=n(),V=u(e=>e.dynamicProduct),q=u(e=>e.dynamicCollection),[U,J]=l(1),[K,X]=l(!0),[Y,Z]=l(),[ee,et]=l(!1),eo="GP_FUNNEL_PAGE"===_;"GP_COLLECTION"!=_||[y.Collection,y.DynamicCollection].includes(Q?.productSrc)||(Q.productSrc=y.DynamicCollection);let er=Q?.productSrc??y.Collection;er===y.DynamicCollection&&(Q.collectionId=q?.collectionId||"latest");let ed=V?.productId&&V?.productId!==Q.relatedProductId?V?.productId:Q.relatedProductId,el=m(),ei=u(e=>e.publicStoreFrontData),ea=i(()=>g(ei)?h(ei):el,[ei]),{data:ec}=p(H&&ed?ed:void 0,{revalidateOnMount:F||R},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ec?.tags||ec?.tags.length===0),en=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ec?.collections?.edges||ec?.collections.edges.length===0),eu=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ec?.vendor,em=f(Y,{revalidateOnMount:F||R},ea),eg=F||R,eh=P(er===y.PickProduct?Q?.productIds:void 0,{revalidateOnMount:eg},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:eg&&Q?.productIds?.length?b:void 0}),ep=i(()=>({id:Q?.collectionId??"latest",numberOfProducts:A?.numberOfProducts??4,orderBy:A?.orderBy}),[Q?.collectionId,Number(A?.numberOfProducts),A?.orderBy]),ef=k(er!==y.PickProduct?ep:void 0,{revalidateOnMount:eg});a(()=>{if(H&&ec&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(et(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Z({first:A?.numberOfProducts,vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ec?.vendor:"",idNEQ:ec.id});break;case"collection":{let t=ec?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!ec.tags||0===ec.tags.length){et(!0);break}Z(e&&e.length>0?{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags},{nameNotIn:e}]}]}:{first:A?.numberOfProducts,idNEQ:ec.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ec.tags}]}]})}}},[ec,Q.relatedType,Q.relatedTag,A?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let eP=er===y.PickProduct?eh.isValidating:ef.isValidating,eb=er===y.PickProduct?eh.isLoading:ef.isLoading,ek=er===y.PickProduct?eh.error:ef.error,eI=ef.data?.collections?.edges?.[0]?.node,eT=er===y.PickProduct?I(eh.data?.products):I(eI?.products),ev=em?.data?.products?I(em?.data?.products):void 0,ey=H&&ev?ev:er===y.PickProduct&&Q?.productIds?.length?Q?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:er!==y.PickProduct?eT:eT.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eO=i(()=>ee&&H&&F||!ey.length&&!eb&&K&&F,[K,eb,ee,H,F,ey.length]),eS=i(()=>!ey||ee&&H,[ee,H,ey]),eC=i(()=>{if(!A?.sameHeight)return[];let e=0,t=Math.ceil((ey?.length??0)/+(A?.slidesToShow?.[$]??1));return Array.from(Array(ey?.length??0)).map((o,r)=>(r>=+(A?.slidesToShow?.[$]??1)*(e+1)&&++e,{gridRow:`${1+U*e}/${U+1+U*e}`,marginBottom:e+1<t?W(M?.horizontalGutter,$):void 0}))},[A?.sameHeight,A?.slidesToShow,U,ey?.length,$,M?.horizontalGutter]),eE=i(()=>eP||eb||ek||!ey||ee&&H,[ek,eb,ee,H,eP,ey]);a(()=>{eE||setTimeout(()=>{let{builderData:e}=B??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&J(o.childElementCount||1)},F?0:500)},[B,eE,F]);let eN=i(()=>({collection:eI,products:ey,settings:{loop:A?.loop??{desktop:!1},scrollMode:A?.scrollMode??{desktop:"snap"},slidesToShow:A?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:M?.layout,dot:A?.dot,dotStyle:A?.dotStyle,arrow:A?.arrow,controlOverContent:A?.controlOverContent,sameHeight:A?.sameHeight},styles:{horizontalGutter:M?.horizontalGutter,verticalGutter:M?.verticalGutter,fullWidth:M?.fullWidth,spacing:M?.spacing,width:M?.width,height:M?.height}}),[eI,ey,A,M]);if(B?.isPreview&&eo)return e(t,{});if(eO)return e(t,{children:w(K,e(x,{builderAttrs:D,collectionHandle:eI?.handle,productSrc:er,onClose:()=>X(!1),children:G,relatedTagString:z,assignProductNoTags:es||en||eu,noAssignedProduct:!ed}))});let{productListWrapStyle:ew,productListContentStyle:eL,productListWrapAlignStyle:ej}=N(r),{productListWrapClass:eW}=L(r);return o("div",{...D,className:eW,style:ew,children:[!!M?.preloadBgImage&&o(S,{children:[!!M.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage.desktop.image.src,as:"image"}),!!M.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.tablet?.image?.src,as:"image"}),!!M.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:M.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||eb?e(d,{}):ek?o("div",{children:["Error: ",ek?.message]}):eS?e("div",{children:"Products not found"}):e(T,{...eN,children:e("div",{className:"gp-flex gp-w-full",style:ej,children:o("div",{style:eL,children:[eo&&e(O,{}),e(t,{children:w(M?.layout==="grid",e(C,{...r,productSortedById:ey,generateGridRowArray:eC}),e(E,{...r,productSortedById:ey}))})]})})}),v(G,!0)]})};export{G as default};
@@ -1 +1 @@
1
- import{jsx as 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,PICKED_PRODUCT_STATUSES as b,useCollectionQuery as I,flattenConnection as k,ProductListProvider as T,filterToolbarPreview as v}from"@gem-sdk/core";import y from"../SalePageProductListWarning.js";import O from"next/head";import w from"./ProductListGridLayout.js";import S from"./ProductListCarouselLayout.js";import{getStyle as C}from"./common/styles.js";import{If as E}from"@gem-sdk/system";import{getClass as N}from"./common/classes.js";import{getData as L}from"./common/helpers.js";import{getPropertyByDevice as W}from"../../../dialog/common/helpers.js";let j=o(()=>import("../ProductNotFound.js"),{loading:d}),x=o=>{let{children:x,styles:G,builderProps:A,setting:M,builderAttrs:B}=o,{isRelatedProduct:H,productSetting:Q}=L(o),z=Q.relatedTag&&Q.relatedTag[0],{isEditMode:D,isPreviewSharePageMode:F}=s(),R=c(),$=n(),_=u(e=>e.dynamicProduct),V=u(e=>e.dynamicCollection),[q,U]=l(1),[J,K]=l(!0),[X,Y]=l(),[Z,ee]=l(!1),et="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"==$&&(Q.productSrc="DynamicCollection",Q.collectionId=V?.collectionId??"latest");let er=Q?.productSrc??"Collection",eo=_?.productId&&_?.productId!==Q.relatedProductId?_?.productId:Q.relatedProductId,ed=m(),el=u(e=>e.publicStoreFrontData),ea=a(()=>g(el)?h(el):ed,[el]),{data:ei}=p(H&&eo?eo:void 0,{revalidateOnMount:D||F},ea),es=Q.relatedTag&&"tags"===Q.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),ec=Q.relatedTag&&"collection"===Q.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=Q.relatedTag&&"vendor"===Q.relatedTag[0]&&!ei?.vendor,eu=f(X,{revalidateOnMount:D||F},ea),em=D||F,eg=P("PickProduct"===er?Q?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:Q?.numOfSelectedProducts,selectedStatus:em&&Q?.productIds?.length?b:void 0}),eh=a(()=>({id:Q?.collectionId??"latest",numberOfProducts:M?.numberOfProducts??4,orderBy:M?.orderBy}),[Q?.collectionId,Number(M?.numberOfProducts),M?.orderBy]),ep=I("PickProduct"!==er?eh:void 0,{revalidateOnMount:em});i(()=>{if(H&&ei&&Q.relatedTag&&"recommended-product"!==Q.relatedType){let e;switch(ee(!1),Q.hasRelatedExclude&&(e=Q?.relatedExclude&&Q.relatedExclude.split(",").map(e=>e.trim())),Q.relatedTag[0]){case"vendor":Y({first:M?.numberOfProducts,where:{vendor:Q.relatedTag&&"vendor"===Q.relatedTag[0]?ei?.vendor:"",idNEQ:ei.id}});break;case"collection":{let t=ei?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){ee(!0);break}Y(e&&e.length>0?{first:M?.numberOfProducts,where:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}}:{first:M?.numberOfProducts,where:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]}});break}case"tags":if(!ei.tags||0===ei.tags.length){ee(!0);break}Y(e&&e.length>0?{first:M?.numberOfProducts,where:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}]}}:{first:M?.numberOfProducts,where:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}]}})}}},[ei,Q.relatedType,Q.relatedTag,M?.numberOfProducts,Q.relatedExclude,Q.hasRelatedExclude,H]);let ef="PickProduct"===er?eg.isValidating:ep.isValidating,eP="PickProduct"===er?eg.isLoading:ep.isLoading,eb="PickProduct"===er?eg.error:ep.error,eI=ep.data?.collections?.edges?.[0]?.node,ek="PickProduct"===er?k(eg.data?.products):k(eI?.products),eT=u(e=>e.assignedProductIds),ev=u(e=>e.isApplyAllProducts),ey=a(()=>(eT??[]).length>0&&!ev||ev,[eT,ev]),eO=eu?.data?.products&&ey?k(eu?.data?.products):[],ew=H?eO:"PickProduct"===er&&Q?.productIds?.length?Q?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==er?ek:ek.filter((e,t)=>t<(Q?.numOfSelectedProducts??4)),eS=a(()=>Z&&H&&D||!ew.length&&!eP&&J&&D,[J,eP,Z,H,D,ew.length]),eC=a(()=>!ew||Z&&H,[Z,H,ew]),eE=a(()=>{if(!M?.sameHeight)return[];let e=0,t=Math.ceil((ew?.length??0)/+(M?.slidesToShow?.[R]??1));return Array.from(Array(ew?.length??0)).map((r,o)=>(o>=+(M?.slidesToShow?.[R]??1)*(e+1)&&++e,{gridRow:`${1+q*e}/${q+1+q*e}`,marginBottom:e+1<t?W(G?.horizontalGutter,R):void 0}))},[M?.sameHeight,M?.slidesToShow,q,ew?.length,R,G?.horizontalGutter]),eN=a(()=>ef||eP||eb||!ew||Z&&H,[eb,eP,Z,H,ef,ew]),eL=ei?.collections?.edges.map(e=>e.node?.id)??[];i(()=>{eN||setTimeout(()=>{let{builderData:e}=A??{},t=e?.childrens?.[0];if(!t)return;let r=document.querySelector(`[data-id=${t}] div`);r&&U(r.childElementCount||1)},D?0:500)},[A,eN,D,eL]);let eW=a(()=>({collection:eI,products:ew,settings:{loop:M?.loop??{desktop:!1},scrollMode:M?.scrollMode??{desktop:"snap"},slidesToShow:M?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:G?.layout,dot:M?.dot,dotStyle:M?.dotStyle,arrow:M?.arrow,controlOverContent:M?.controlOverContent,sameHeight:M?.sameHeight},styles:{horizontalGutter:G?.horizontalGutter,verticalGutter:G?.verticalGutter,fullWidth:G?.fullWidth,spacing:G?.spacing,width:G?.width,height:G?.height}}),[eI,ew,M,G]);if(A?.isPreview&&et)return e(t,{});if(eS)return e(t,{children:E(J,e(j,{builderAttrs:B,collectionHandle:eI?.handle,productSrc:er,onClose:()=>K(!1),children:x,relatedTagString:z,assignProductNoTags:es||ec||en,noAssignedProduct:!eo}))});let{productListWrapStyle:ej,productListContentStyle:ex,productListWrapAlignStyle:eG}=C(o),{productListWrapClass:eA}=N(o);return r("div",{...B,className:eA,style:ej,children:[!!G?.preloadBgImage&&r(O,{children:[!!G.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage.desktop.image.src,as:"image"}),!!G.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.tablet?.image?.src,as:"image"}),!!G.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:G.backgroundImage?.mobile?.image?.src,as:"image"})]}),ef||eP?e(d,{}):eb?r("div",{children:["Error: ",eb?.message]}):eC?e("div",{children:"Products not found"}):e(T,{...eW,children:e("div",{className:"gp-flex gp-w-full",style:eG,children:r("div",{style:ex,children:[et&&e(y,{}),e(t,{children:E(G?.layout==="grid",e(w,{...o,productSortedById:ew,generateGridRowArray:eE}),e(S,{...o,productSortedById:ew}))})]})})}),v(x,!0)]})};export{x as default};
1
+ import{jsx as o,Fragment as e,jsxs as t}from"react/jsx-runtime";import r from"next/dynamic";import i from"../../../common/components/Loading.js";import{useState as d,useRef as l,useMemo as s,useEffect as c}from"react";import{useRenderMode as n,useCurrentDevice as a,usePageType as m,usePageStore as u,flattenConnection as g,ProductListProvider as p,filterToolbarPreview as h,PICKED_PRODUCT_STATUSES as f}from"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as P}from"../../../common/const.js";import y from"../SalePageProductListWarning.js";import k from"next/head";import I from"./ProductListGridLayout.js";import b from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as j}from"@gem-sdk/system";import{getClass as C}from"./common/classes.js";import{getData as v}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";import{useCollectionQuery as w}from"./hooks/useCollectionQuery.js";import N from"./hooks/useProductRelatedQuery.js";import{DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS as G}from"./constants/index.js";import T from"./hooks/useRelatedProductIDAssigned.js";import{useProductsQuery as A}from"./hooks/useProductsQuery.js";let O=r(()=>import("../ProductNotFound.js"),{loading:i}),x=r=>{let{children:x,styles:D,builderProps:B,setting:E,builderAttrs:H}=r,{isRelatedProduct:z,productSetting:M}=v(r),{isEditMode:Q,isPreviewSharePageMode:R}=n(),W=a(),$=m(),_=u(o=>o.dynamicCollection),[F,V]=d(1),[q,U]=d(!0),J=l(),K="GP_FUNNEL_PAGE"===$;"GP_COLLECTION"!=$||[P.Collection,P.DynamicCollection].includes(M?.productSrc)||(M.productSrc=P.DynamicCollection);let X=M?.productSrc??P.Collection;X===P.DynamicCollection&&(M.collectionId=_?.collectionId||"latest");let Y=Number.isNaN(Number(E?.numberOfProducts))?G:Number(E?.numberOfProducts),{relatedProductIdAssigned:Z}=T({productSetting:M}),{isNotFoundRelatedProduct:oo,relatedProducts:oe,isNoRelatedProductData:ot,relatedTagString:or,isLoading:oi}=N({productSetting:M,isRelatedProduct:z,relatedProductIdAssigned:Z,numberOfProducts:Y}),od=Q||R,ol=A({productIds:M?.productIds,defaultSelectedProductCount:M?.numOfSelectedProducts,productSrc:X,selectedStatus:od&&M?.productIds?.length?f:void 0}),os=w({productSrc:X,collectionID:M?.collectionId??"latest",numberOfProducts:Y,orderBy:E?.orderBy}),oc=oi||(X===P.PickProduct?ol.isLoading:os.isLoading),on=X===P.PickProduct?ol.error:os.error,oa=X===P.PickProduct?ol.isValidating:os.isValidating,om=os.data?.collections?.edges?.[0]?.node,ou=X===P.PickProduct?g(ol.data?.products):g(om?.products),og=u(o=>o.assignedProductIds),op=u(o=>o.isApplyAllProducts),oh=s(()=>(og??[]).length>0&&!op||op,[og,op]),of=oe?.data?.products&&oh?g(oe?.data?.products):[],oP=z?of:X===P.PickProduct&&M?.productIds?.length?M?.productIds?.map(o=>ou?.find(e=>e?.baseID===o)).filter(Boolean)??ou:X!==P.PickProduct?ou:ou.filter((o,e)=>e<(M?.numOfSelectedProducts??4)),oy=s(()=>oo&&z&&Q||!oP.length&&!oc&&q&&Q,[q,oc,oo,z,Q,oP.length]),ok=s(()=>!oP||oo&&z,[oo,z,oP]),oI=s(()=>{if(!E?.sameHeight)return[];let o=0,e=Math.ceil((oP?.length??0)/+(E?.slidesToShow?.[W]??1));return Array.from(Array(oP?.length??0)).map((t,r)=>(r>=+(E?.slidesToShow?.[W]??1)*(o+1)&&++o,{gridRow:`${1+F*o}/${F+1+F*o}`,marginBottom:o+1<e?L(D?.horizontalGutter,W):void 0}))},[E?.sameHeight,E?.slidesToShow,F,oP?.length,W,D?.horizontalGutter]),ob=s(()=>oa||oc||on||!oP||oo&&z,[on,oc,oo,z,oa,oP]);c(()=>{if(!ob)return J.current=setTimeout(()=>{let{builderData:o}=B??{},e=o?.childrens?.[0];if(!e)return;let t=document.querySelector(`[data-id=${e}] div`);t&&V(t.childElementCount||1)},Q?0:500),()=>{clearTimeout(J.current)}},[B,ob,Q,oP]);let oS=s(()=>({collection:om,products:oP,settings:{loop:E?.loop??{desktop:!1},scrollMode:E?.scrollMode??{desktop:"snap"},slidesToShow:E?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:D?.layout,dot:E?.dot,dotStyle:E?.dotStyle,arrow:E?.arrow,controlOverContent:E?.controlOverContent,sameHeight:E?.sameHeight},styles:{horizontalGutter:D?.horizontalGutter,verticalGutter:D?.verticalGutter,fullWidth:D?.fullWidth,spacing:D?.spacing,width:D?.width,height:D?.height}}),[om,oP,E,D]);if(B?.isPreview&&K)return o(e,{});if(oy)return o(e,{children:j(q,o(O,{builderAttrs:H,collectionHandle:om?.handle,productSrc:X,onClose:()=>U(!1),children:x,relatedTagString:or,assignProductNoTags:ot,noAssignedProduct:!Z}))});let{productListWrapStyle:oj,productListContentStyle:oC,productListWrapAlignStyle:ov}=S(r),{productListWrapClass:oL}=C(r);return t("div",{...H,className:oL,style:oj,children:[!!D?.preloadBgImage&&t(k,{children:[!!D.backgroundImage?.desktop?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage.desktop.image.src,as:"image"}),!!D.backgroundImage?.tablet?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.tablet?.image?.src,as:"image"}),!!D.backgroundImage?.mobile?.image?.src&&o("link",{rel:"preload",href:D.backgroundImage?.mobile?.image?.src,as:"image"})]}),oc||oa?o(i,{}):on?t("div",{children:["Error: ",on?.message]}):ok?o("div",{children:"Products not found"}):o(p,{...oS,children:o("div",{className:"gp-flex gp-w-full",style:ov,children:t("div",{style:oC,children:[K&&o(y,{}),o(e,{children:j(D?.layout==="grid",o(I,{...r,productSortedById:oP,generateGridRowArray:oI}),o(b,{...r,productSortedById:oP}))})]})})}),h(x,!0)]})};export{x as default};
@@ -1 +1 @@
1
- import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";let r=e=>{let{setting:r,styles:d}=e,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=o(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:{...t({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{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel-v3/components/dot/common/helpers.js";import{RELATED_TAG_PRODUCT_SETTING as r}from"../constants/index.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import{PRODUCT_LIST_PRODUCT_SOURCE as d}from"../../../../common/const.js";let c=e=>{let{setting:r,styles:c}=e,l=r?.productSetting??{},i=l.productSrc===d.RelatedProduct,n=o(r?.dot,r?.dotStyle),p={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete p.childItem;let a={...c,sizeSetting:{...t({adaptiveHeight:c?.adaptiveHeight,height:c?.height,fullWidth:{desktop:!0}})},spacing:c?.spacing};return delete a.backgroundColor,delete a.backgroundImage,{isRelatedProduct:i,productSetting:l,dotStyle:n,carouselConfigSetting:p,carouselConfigStyle:a}},l=t=>{let{setting:o,styles:c}=t,l=o?.productSetting,p=l?.relatedTag,a=l?.hasRelatedExclude,u=(p&&p[0]===r.Collection?l?.relatedCollectionExclude:l?.relatedTagsExclude)??"",s=u?.split(",").map(t=>t.trim()).toString(),m=l?.productSrc??d.Collection,g=l?.collectionId?.replace(i,"")??"latest",h=l?.productSrc===d.PickProduct&&l?.productIds?.length===0,P=c?.layout==="grid",I=e(o?.numberOfProducts,4),S=m===d.PickProduct&&l?.productIds?.length?l?.productIds.map(t=>t.replace(n,"")):[],C=m===d.PickProduct&&l?.productHandles?.length?l?.productHandles:[],k=o?.orderBy&&o?.orderBy!=="none",f=(l?.productSrc===d.Collection||l?.productSrc===d.DynamicCollection)&&k?o?.orderBy?.split("_"):"none",y=k&&f?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",E=f?.[f.length-1]==="DESC";return{hasRelatedExclude:a,relatedExcludeTrim:s,collectionID:g,isLatestProducts:h,isGrid:P,numberOfProducts:I,productListId:S,productListHandles:C,sortedBy:y,isReverse:E,productSrc:m,productSetting:l,isSorted:k,relatedTag:p,productNumber:m===d.PickProduct?h?4:l?.numOfSelectedProducts??4:I,collectionHandle:l?.collectionHandle}},i="gid://shopify/Collection/",n="gid://shopify/Product/";export{i as PREFIX_COLLECTION_ID,n as PREFIX_PRODUCT_ID,c as getData,l as getDataLiquid};
@@ -0,0 +1 @@
1
+ var T;!function(T){T.Tags="tags",T.Collection="collection",T.Vendor="vendor"}(T||(T={}));let o=4;export{o as DEFAULT_COLLECTION_NUMBER_OF_PRODUCTS,T as RELATED_TAG_PRODUCT_SETTING};
@@ -0,0 +1 @@
1
+ import{useFetchHandle as t,usePageStore as r,hasPublicStoreFrontData as o,createStoreFrontFetcher as e,useIsSampleProduct as i,useIsStorefrontProduct as a,generateCollectionQueryKey as l,getCollection as n}from"@gem-sdk/core";import{useMemo as m,useEffect as c}from"react";import s from"swr";import"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as d}from"../../../../common/const.js";let u=({productSrc:u,numberOfProducts:f,orderBy:p,collectionID:g})=>{let C=t(),v=r(t=>t.publicStoreFrontData),y=m(()=>o(v)?e(v):C,[v]),D=i(),j=a(),x=m(()=>u!==d.Collection&&u!==d.DynamicCollection?null:l({id:g,numberOfProducts:f,orderBy:p,isSample:D,isStorefront:j}),[u,D,j,g,f,p]),I=s(x,([,t])=>n(y,t),{revalidateOnMount:!1,refreshInterval:0,revalidateIfStale:!1});return c(()=>{if(u!==d.Collection&&u!==d.DynamicCollection)return;let t=!!I.error,r=I.isLoading||I.isValidating,o=!I.data&&!r;!t&&o&&I.mutate()},[u,I.data,I.error,I.isLoading,I.isValidating]),I};export{u as useCollectionQuery};
@@ -0,0 +1 @@
1
+ import t from"../../product-wrap/hook/useProductQuery.js";let r=({isRelatedProduct:r,relatedProductIdAssigned:e})=>{let{productData:{data:o,isLoading:u}}=t({id:r&&e?e:void 0});return{relatedProductIdAssigned:e,mainRelatedProduct:o,isLoading:u}};export{r as default};
@@ -0,0 +1 @@
1
+ import{useState as e,useMemo as t,useEffect as a}from"react";import r from"swr";import{useFetchHandle as i,usePageStore as d,hasPublicStoreFrontData as l,createStoreFrontFetcher as o,getProductQueryAll as s}from"@gem-sdk/core";import n from"./useMainRelatedProductQuery.js";import{RELATED_TAG_PRODUCT_SETTING as g}from"../constants/index.js";let c=({isRelatedProduct:c,productSetting:u,relatedProductIdAssigned:h,numberOfProducts:f})=>{let[m,p]=e(!1),[T,E]=e(),{mainRelatedProduct:v,isLoading:I}=n({isRelatedProduct:c,relatedProductIdAssigned:h}),W=i(),x=d(e=>e.publicStoreFrontData),N=t(()=>l(x)?o(x):W,[x]),P=r(T?["query/products",T]:null,async([,e])=>s(N,e),{revalidateOnMount:!1,keepPreviousData:!0,refreshInterval:0,revalidateIfStale:!1}),Q=u.relatedTag&&u.relatedTag[0],k=t(()=>{if(!Q)return!1;let e=Q===g.Tags&&!v?.tags?.length,t=Q===g.Collection&&!v?.collections?.edges.length,a=Q===g.Vendor&&!v?.vendor;return e||t||a},[Q,v]),y=t(()=>{if(!c)return!1;if(!v&&I)return!0;let e=!P.data&&!P.error&&!P.isLoading;return e||!P.error&&(P.isLoading||P.isValidating)},[c,v,I,P.error,P.isLoading,P.isValidating,P.data]);return a(()=>{if(c&&v&&u.relatedTag&&"recommended-product"!==u.relatedType){let e;switch(p(!1),u.hasRelatedExclude&&(e=u?.relatedExclude&&u.relatedExclude.split(",").map(e=>e.trim())),u.relatedTag[0]){case"vendor":E({first:f,vendor:u.relatedTag&&"vendor"===u.relatedTag[0]?v?.vendor:"",idNEQ:v.id});break;case"collection":{let t=v?.collections?.edges.map(e=>e.node?.id);if(!t||t?.length===0){p(!0);break}E(e&&e.length>0?{first:f,idNEQ:v.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t},{titleNotIn:e}]}]}:{first:f,idNEQ:v.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:t}]}]});break}case"tags":if(!v.tags||0===v.tags.length){p(!0);break}E(e&&e.length>0?{first:f,idNEQ:v.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:v.tags},{nameNotIn:e}]}]}:{first:f,idNEQ:v.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:v.tags}]}]})}}},[v,u.relatedType,u.relatedTag,f,u.relatedExclude,u.hasRelatedExclude,c]),a(()=>{if(!c||!T)return;let e=!!P.error,t=P.isLoading||P.isValidating,a=!P.data&&!t;!e&&a&&P.mutate()},[c,P.data,P.error,P.isLoading,P.isValidating,T]),{isNotFoundRelatedProduct:m,relatedProducts:P,isNoRelatedProductData:k,relatedTagString:Q,isLoading:y}};export{c as default};
@@ -0,0 +1 @@
1
+ import{useFetchHandle as r,usePageStore as t,hasPublicStoreFrontData as e,createStoreFrontFetcher as o,useIsSampleProduct as i,useIsStorefrontProduct as a,generateProductsQueryKey as n,getProducts as m}from"@gem-sdk/core";import{useMemo as s,useEffect as d}from"react";import c from"swr";import"react/jsx-runtime";import{PRODUCT_LIST_PRODUCT_SOURCE as l}from"../../../../common/const.js";let u=({defaultSelectedProductCount:u,productIds:f,productSrc:p,selectedStatus:g})=>{let P=r(),k=t(r=>r.publicStoreFrontData),v=s(()=>e(k)?o(k):P,[k]),j=i(),x=a(),y=s(()=>p!==l.PickProduct?null:n({ids:f??[],isSample:j,isStorefront:x,defaultSelectedProductCount:u,selectedStatus:g}),[p,f,j,x,u]),I=c(y,async([,r])=>m(v,r),{revalidateOnMount:!1,refreshInterval:0,revalidateIfStale:!1});return d(()=>{if(p!==l.PickProduct)return;let r=!!I.error,t=I.isLoading||I.isValidating,e=!I.data&&!t;!r&&e&&I.mutate()},[p,I.data,I.error,I.isLoading,I.isValidating]),{...I}};export{u as useProductsQuery};
@@ -0,0 +1 @@
1
+ import{usePageStore as d}from"@gem-sdk/core";function t({productSetting:t}){let r=d(d=>d.dynamicProduct),e=t.relatedProductId,o=r?.productId&&r?.productId!==e?r?.productId:e;return{relatedProductIdAssigned:o}}export{t as default};
@@ -1 +1 @@
1
- import{useRef as e,useMemo as t}from"react";import{useTransition as r}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as o,convertDecimalToNumber as n,useInteraction as u,useProduct as p,useShopStore as d,useFormatMoney as l}from"@gem-sdk/core";let m=m=>{let{setting:s,builderProps:g}=m,b=e(null),h=c(),{quantity:y,hasUpdatePrice:P}=i(),v=a(),{useProductCompareAtPrice:f}=o(),w=m["bundle-item"],V=n(v?.price)??0,k=n(v?.salePrice)??0,q=s?.priceType==="compare",{trigger:C}=u(),N=p(),T=N?.baseID?.replace("gid://shopify/Product/",""),x=d(e=>e.showPriceCurrency),D=t(()=>w?.quantity?w.quantity:P&&y||1,[y,P,w?.quantity]),E=t(()=>{let e=Number(w?.discountValue);return w?.discountType==="percentage"?V*D*e/100:e},[w?.discountType,w?.discountValue,V,D]),I=t(()=>w?.discountValue?f?(k||V)*D:V*D:k*D,[w?.discountValue,V,D,k,f]),$=t(()=>{let e=V*D;return q?I:E?Math.max(0,e-E):e},[V,D,E,I,q]),j=t(()=>!!q&&(!(k>V)||!(k>=0)),[q,k,V]),G=(e,t)=>{C({event:"price"===t?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${g?.uid}"]`,element:b.current}),C({event:"price"===t?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${g?.uid}"]`,element:b.current})};r(e=>{e!==V&&G(V,"price")},[V]),r(e=>{e!==k&&G(k,"compare")},[k]);let L=l($??0,x||!1),M=q&&!$;return{elementRef:b,moneyFormatted:L,currentProductId:T,isNoComparePrice:M,isNoComparePriceILP:"edit"!==h&&M,emitNoDataSignal:()=>{if("edit"!==h)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:g?.uid,value:!$&&q,tag:"ProductPrice"}});window.dispatchEvent(e)},shouldHiddenComparePrice:j}};export{m as useGpPrice};
1
+ import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{calculateBundleFixedDiscount as i}from"../../../helpers/product-bundle.js";import{useEditorMode as c,useQuantity as a,useCurrentVariant as o,useProductBundleDiscount as n,convertDecimalToNumber as p,useInteraction as u,useProduct as d,useShopStore as l,useFormatMoney as m}from"@gem-sdk/core";let s=s=>{let{setting:g,builderProps:h}=s,b=e(null),P=c(),{quantity:y,hasUpdatePrice:f}=a(),v=o(),{useProductCompareAtPrice:w}=n(),q=s["bundle-item"],k=p(v?.price)??0,C=p(v?.salePrice)??0,j=g?.priceType==="compare",{trigger:x}=u(),D=d(),E=D?.baseID?.replace("gid://shopify/Product/",""),I=l(e=>e.showPriceCurrency),N=r(()=>q?.quantity?q.quantity:f&&y||1,[y,f,q?.quantity]),V=r(()=>q?i(k,{...q,quantity:N}):0,[q,k,N]),$=r(()=>q?.discountValue?w?(C||k)*N:k*N:C*N,[q?.discountValue,k,N,C,w]),G=r(()=>{let e=k*N;return j?$:V?Math.max(0,e-V):e},[k,N,V,$,j]),L=r(()=>!!j&&(!(C>k)||!(C>=0)),[j,C,k]),M=(e,r)=>{x({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${h?.uid}"]`,element:b.current}),x({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${h?.uid}"]`,element:b.current})};t(e=>{e!==k&&M(k,"price")},[k]),t(e=>{e!==C&&M(C,"compare")},[C]);let S=m(G??0,I||!1),T=j&&!G;return{elementRef:b,moneyFormatted:S,currentProductId:E,isNoComparePrice:T,isNoComparePriceILP:"edit"!==P&&T,emitNoDataSignal:()=>{if("edit"!==P)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:h?.uid,value:!G&&j,tag:"ProductPrice"}});window.dispatchEvent(e)},shouldHiddenComparePrice:L}};export{s as useGpPrice};
@@ -1 +1 @@
1
- import{makeStyleResponsive as e,makeWidth as b,getGlobalColorStateStyle as t,getGlobalColorStateResponsiveStyle as o,getStyleShadowState as g,composeRadius as c,handleConvertBorderColor as l,handleConvertBorderWidth as s,handleConvertBorderStyle as r}from"@gem-sdk/core";import{filterTruthyObject as f}from"../../../../../helpers.js";let u=f=>{let{fullWidth:u,width:m,height:i,borderInput:a,borderRadius:p,hasShadowInput:h,shadowInput:n,valueBgColor:S,valueTextColor:d}=f??{},w=e("w",b(m,u)),x=i?e("h",i):{};return{...w,...x,...r(a),...s(a),...l(a),...c(p),...g(n,"box-shadow",h),...o("bg",S),...t("c",d)}},m=e=>{let{valueBgColor:b,valueTextColor:g}=e??{},c=o("bg",b),l=t("c",g),s={"--c":l["--focus-c"]?l["--focus-c"]:l["--c"],"--bg":c["--focus-bg"]?c["--focus-bg"]:c["--bg"],"--bg-tablet":c["--focus-bg-tablet"]?c["--focus-bg-tablet"]:c["--bg-tablet"],"--bg-mobile":c["--focus-bg-mobile"]?c["--focus-bg-mobile"]:c["--bg-mobile"]};return f(s)};export{m as getOptionStyles,u as getSelectStyles};
1
+ import{makeStyleResponsive as e,makeWidth as b,composeTypographyStyle as t,getGlobalColorStateStyle as o,getGlobalColorStateResponsiveStyle as g,getStyleShadowState as c,composeRadius as l,handleConvertBorderColor as s,handleConvertBorderWidth as r,handleConvertBorderStyle as f}from"@gem-sdk/core";import{filterTruthyObject as u}from"../../../../../helpers.js";let m=u=>{let{fullWidth:m,width:i,height:a,borderInput:p,borderRadius:h,hasShadowInput:n,shadowInput:S,valueBgColor:d,valueTextColor:w,valueTypo:x,valueTypography:y}=u??{},j=e("w",b(i,m)),k=a?e("h",a):{},O=t(x,y);return{...j,...k,...f(p),...r(p),...s(p),...l(h),...c(S,"box-shadow",n),...g("bg",d),...o("c",w),...O}},i=e=>{let{valueBgColor:b,valueTextColor:t}=e??{},c=g("bg",b),l=o("c",t),s={"--c":l["--focus-c"]?l["--focus-c"]:l["--c"],"--bg":c["--focus-bg"]?c["--focus-bg"]:c["--bg"],"--bg-tablet":c["--focus-bg-tablet"]?c["--focus-bg-tablet"]:c["--bg-tablet"],"--bg-mobile":c["--focus-bg-mobile"]?c["--focus-bg-mobile"]:c["--bg-mobile"]};return u(s)};export{i as getOptionStyles,m as getSelectStyles};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as t,jsx as r}from"react/jsx-runtime";import{usePluginEnable as o,useProduct as e,useProductQuery as i,ProductProvider as l}from"@gem-sdk/core";import{useState as c}from"react";import p from"../../../grid/components/row/Row.js";import s from"../../../grid/components/col/Col.js";import"../../../modal/components/confirm.js";import n from"../../../modal/components/Modal.js";import a from"../product-button/ProductButton.js";import d from"../ProductImages.js";import m from"../product-price/ProductPrice.js";import u from"../product-quantity/ProductQuantity.js";import g from"../product-title/ProductTitle.js";import h from"../product-variants/ProductVariants.js";let y=()=>{let o=e(),{data:c,isValidating:n,error:y}=i(o?.id);return n?r("div",{children:t("svg",{className:"gp-mx-auto gp-my-20 gp-h-8 gp-w-8 gp-animate-spin gp-text-base",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r("circle",{className:"gp-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r("path",{className:"gp-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):y?r("p",{className:"gp-py-20 gp-text-center gp-font-semibold",children:"Something went wrong"}):r(l,{product:c,children:t(p,{setting:{layout:{desktop:{cols:[6,6],display:"fill"},mobile:{cols:[12]}}},children:[r(s,{children:r(d,{})}),t(s,{children:[r(g,{setting:{htmlTag:"p"},styles:{typography:{type:"heading-3"}}}),t(p,{setting:{layout:{desktop:{cols:[6,6],display:"fit"}}},children:[r(s,{children:r(m,{setting:{priceType:"regular"},styles:{typography:{type:"subheading-2"}}})}),r(s,{children:r(m,{setting:{priceType:"compare"},styles:{typography:{type:"paragraph-2"}}})})]}),r(h,{}),r(u,{}),r(a,{})]})]})})},f=({label:e})=>{let[i,l]=c(!1),p=o();return p?.includes("quick-view")?t("div",{children:[r("div",{"aria-hidden":!0,role:"button","aria-label":"Quick view",onClick:()=>l(t=>!t),children:e}),r(n,{setting:{open:i},closeOnClickOutside:!0,onClose:()=>l(t=>!t),children:r(y,{})})]}):null};f.defaultProps={label:"Quick View"};export{f as default};
2
+ import{jsxs as t,jsx as o}from"react/jsx-runtime";import{usePluginEnable as r,useProduct as e,useProductQuery as i,ProductProvider as c}from"@gem-sdk/core";import{useState as l}from"react";import"../../../common/const.js";import p from"../../../grid/components/row/Row.js";import s from"../../../grid/components/col/Col.js";import"../../../modal/components/confirm.js";import n from"../../../modal/components/Modal.js";import a from"../product-button/ProductButton.js";import d from"../ProductImages.js";import m from"../product-price/ProductPrice.js";import u from"../product-quantity/ProductQuantity.js";import g from"../product-title/ProductTitle.js";import h from"../product-variants/ProductVariants.js";let y=()=>{let r=e(),{data:l,isValidating:n,error:y}=i(r?.id);return n?o("div",{children:t("svg",{className:"gp-mx-auto gp-my-20 gp-h-8 gp-w-8 gp-animate-spin gp-text-base",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[o("circle",{className:"gp-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o("path",{className:"gp-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):y?o("p",{className:"gp-py-20 gp-text-center gp-font-semibold",children:"Something went wrong"}):o(c,{product:l,children:t(p,{setting:{layout:{desktop:{cols:[6,6],display:"fill"},mobile:{cols:[12]}}},children:[o(s,{children:o(d,{})}),t(s,{children:[o(g,{setting:{htmlTag:"p"},styles:{typography:{type:"heading-3"}}}),t(p,{setting:{layout:{desktop:{cols:[6,6],display:"fit"}}},children:[o(s,{children:o(m,{setting:{priceType:"regular"},styles:{typography:{type:"subheading-2"}}})}),o(s,{children:o(m,{setting:{priceType:"compare"},styles:{typography:{type:"paragraph-2"}}})})]}),o(h,{}),o(u,{}),o(a,{})]})]})})},f=({label:e})=>{let[i,c]=l(!1),p=r();return p?.includes("quick-view")?t("div",{children:[o("div",{"aria-hidden":!0,role:"button","aria-label":"Quick view",onClick:()=>c(t=>!t),children:e}),o(n,{setting:{open:i},closeOnClickOutside:!0,onClose:()=>c(t=>!t),children:o(y,{})})]}):null};f.defaultProps={label:"Quick View"};export{f as default};
@@ -1,12 +1,12 @@
1
- import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiveValueByScreen as s}from"@gem-sdk/core";import n from"../../../text/components/Text.liquid.js";import a from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as $,If as g}from"@gem-sdk/system";import{getAttrs as _}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as b,getDropdownGroupData as S}from"./common/main/getData.js";import{getWrapVariantOptionClass as P}from"./common/variants/classes.js";import{getStyleOfObject as O}from"../../helpers/function.js";import{getMarginBottomStyle as x}from"./common/variants/styles.js";import{PRODUCT_VARIANT_OPTION_MINW_STYLE as V}from"./common/const.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as q}from"./OptionVariantsOldFormat.liquid.js";let A={desktop:!0,tablet:!0,mobile:!0},D=D=>{let{builderProps:E,styles:T,setting:k,advanced:F}=D,{align:G,swatchItemWidth:z,dropdownItemWidth:C,swatchSpacing:J,optionTypo:I,marginBottom:M}=T??{},{label:W,optionType:L,showAsSwatches:R,layout:H,hasPreSelected:K}=k??{},Q=F?.d??A,{uid:U}=E??{},B=()=>{let t={};return e.forEach(i=>{let o=s(z,i);t[i]="auto"===o}),t},X=()=>{let t={};return e.forEach(i=>{t[i]=C?.[i]==="fill"}),t},Y=k?.variantPresets?d(k?.variantPresets,T):[],Z=Y?.map(t=>(t.presets={[t.optionType]:t.presets[t.optionType]},t)),tt={...k,variantPresets:Z},ti=t=>{let i={"'":"&apos;",'"':"&quot;"},o=t;for(let e in i)t.indexOf(e)>=0&&(o=o.replaceAll(e,i[e]));return o},to=({showDropdown:i,isRenderDefault:o,typeOfOption:e})=>t`
2
- ${f("value in values",a({id:"{{option.name | escape | handleize}}-{{value | escape | handleize}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:R,uid:U,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:K?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:e,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...tt,swatchAutoWidth:B(),optionTypo:I,isRenderDefault:o}))}
3
- ${$(i?'type == "dropdown"':"false",r({...T,...tt,swatchAutoWidth:X(),optionTypo:I}))}`,te=k?.variantPresets?.map(t=>({name:ti(t.optionName),type:t.optionType})).map(t=>`${t.name}($1)${t.type}`).join("($2)").toString(),ts={renderVariantItem:to,variantPresetsLiquid:te??""},tn=m(j(G)),ta=c(h(J,J)),tr=b(D,"Liquid"),tp=m(P(H,G)),tl=m(w(G)),td=S(D),tm=u(_({uid:U,hasPreSelected:K,cssClass:F?.cssClass})),tc=c(y(D)),tu=m({"gp-flex gp-flex-col !gp-ml-0":!0});return t`
1
+ import{template as t,baseAssetURL as e,isLocalEnv as i,DEVICES as o,getResponsiveValueByScreen as s}from"@gem-sdk/core";import n from"../../../text/components/Text.liquid.js";import a from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as $,If as g}from"@gem-sdk/system";import{getAttrs as _}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as b,getDropdownGroupData as S}from"./common/main/getData.js";import{getWrapVariantOptionClass as P}from"./common/variants/classes.js";import{getStyleOfObject as O}from"../../helpers/function.js";import{getMarginBottomStyle as x}from"./common/variants/styles.js";import{PRODUCT_VARIANT_OPTION_MINW_STYLE as V}from"./common/const.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as A}from"./OptionVariantsOldFormat.liquid.js";let q={desktop:!0,tablet:!0,mobile:!0},D=D=>{let{builderProps:E,styles:T,setting:k,advanced:F}=D,{align:G,swatchItemWidth:z,dropdownItemWidth:C,swatchSpacing:J,optionTypo:I,marginBottom:M}=T??{},{label:W,optionType:L,showAsSwatches:R,layout:H,hasPreSelected:K}=k??{},Q=F?.d??q,{uid:U}=E??{},B=()=>{let t={};return o.forEach(e=>{let i=s(z,e);t[e]="auto"===i}),t},X=()=>{let t={};return o.forEach(e=>{t[e]=C?.[e]==="fill"}),t},Y=k?.variantPresets?d(k?.variantPresets,T):[],Z=Y?.map(t=>(t.presets={[t.optionType]:t.presets[t.optionType]},t)),tt={...k,variantPresets:Z},te=t=>{let e={"'":"&apos;",'"':"&quot;"},i=t;for(let o in e)t.indexOf(o)>=0&&(i=i.replaceAll(o,e[o]));return i},ti=({showDropdown:e,isRenderDefault:i,typeOfOption:o})=>t`
2
+ ${f("value in values",a({id:"{{option.name | escape | handleize}}-{{value | escape | handleize}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:R,uid:U,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:K?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:o,activeClass:K?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...tt,swatchAutoWidth:B(),optionTypo:I,isRenderDefault:i}))}
3
+ ${$(e?'type == "dropdown"':"false",r({...T,...tt,swatchAutoWidth:X(),optionTypo:I}))}`,to=k?.variantPresets?.map(t=>({name:te(t.optionName),type:t.optionType})).map(t=>`${t.name}($1)${t.type}`).join("($2)").toString(),ts={renderVariantItem:ti,variantPresetsLiquid:to??""},tn=m(j(G)),ta=c(h(J,J)),tr=b(D,"Liquid"),tp=m(P(H,G)),tl=m(w(G)),td=S(D),tm=u(_({uid:U,hasPreSelected:K,cssClass:F?.cssClass})),tc=c(y(D)),tu=m({"gp-flex gp-flex-col !gp-ml-0":!0});return t`
4
4
  ${v("{%- assign total_combinations = 1 -%}")}
5
5
  ${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
6
6
  <gp-product-variants ${tm}>
7
7
  <script gp-data type="application/json">
8
8
  {
9
- "setting":${JSON.stringify(tt)},
9
+ "setting":${JSON.stringify(tt)?.replaceAll("'","&#039;")},
10
10
  "styles":${JSON.stringify(T)},
11
11
  "variants":{{product.variants | json}},
12
12
  "optionsWithValues": {{product.options_with_values | json}},
@@ -34,7 +34,7 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
34
34
  ${p(td)}
35
35
  </div>
36
36
  `,t`
37
- ${v(`{%- assign presets = "${k?.variantPresets?.map(t=>`${ti(t.optionName)}($2)${t.optionType}`).join("($1)")}" | split: '($1)' -%}`)}
37
+ ${v(`{%- assign presets = "${k?.variantPresets?.map(t=>`${te(t.optionName)}($2)${t.optionType}`).join("($1)")}" | split: '($1)' -%}`)}
38
38
  ${v(`{% assign hiddenPresetOptions = "${k?.variantPresets?.filter(t=>!!t?.hide)?.map(t=>t.optionName).join(",")}" | split: ',' %}`)}
39
39
 
40
40
  ${v(`{% assign all_option_names = options | map: 'name' %}
@@ -93,13 +93,13 @@ import{template as t,baseAssetURL as i,isLocalEnv as o,DEVICES as e,getResponsiv
93
93
  `)}
94
94
  ${g(!K,v("{%- assign selectedValue = null -%}"),"")}
95
95
  ${g(R,t`
96
- ${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ts),q(ts))}
97
- `,to({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
96
+ ${$("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ts),A(ts))}
97
+ `,ti({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
98
98
  </div>
99
99
  </div>`)}
100
100
  `)}
101
101
  </div>`)}
102
102
  </gp-product-variants>
103
103
 
104
- ${(()=>{let t=o?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${i}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
104
+ ${(()=>{let t=i?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${e}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`})()}
105
105
  `};export{D as default};
@@ -1,9 +1,9 @@
1
- import{template as o}from"@gem-sdk/core";import{createClass as t,createStyle as r,createAttr as e,If as s}from"@gem-sdk/system";import{getSelectClass as m}from"../../common/dropdown/classes.js";import{getSelectStyle as i}from"../../common/dropdown/styles.js";import{getSelectAttr as d}from"../../common/dropdown/attrs.js";import{renderBlankOption as n,renderDropdownOptions as p}from"../dropdown-option/render-liquid/index.js";let l=l=>{let{variantGroup:a,blankText:c,swatchAutoWidth:f,swatchHeight:w,optionTypography:g,optionBgColor:$,optionTextColor:j,optionRounded:u,optionShadow:x,optionHasShadow:y,optionBorder:h,optionTransform:b,hasPreSelected:k,optionTypo:q,combineHeight:A,combineWidth:C,soldOutStyle:D,children:L}=l,V=t(m({optionTypo:q,optionTypography:g,optionBgColor:$,optionBorder:h,optionTextColor:j})),v=r(i({width:a?C:f,height:a?A:w,optionTypo:q,optionTypography:g,optionBgColor:$,optionTextColor:j,optionRounded:u,optionHasShadow:y,optionShadow:x,optionBorder:h,optionTransform:b,isCombine:a,textAlign:q?.attrs?.textAlign})),z=e(d({variantGroup:a,type:"Liquid"}));return o`
1
+ import{getResponsiveValueByScreen as o,template as t}from"@gem-sdk/core";import{createClass as e,createStyle as r,createAttr as s,If as m}from"@gem-sdk/system";import{getSelectClass as i}from"../../common/dropdown/classes.js";import{getSelectStyle as d}from"../../common/dropdown/styles.js";import{getSelectAttr as n}from"../../common/dropdown/attrs.js";import{renderBlankOption as p,renderDropdownOptions as l}from"../dropdown-option/render-liquid/index.js";let a=a=>{let{variantGroup:c,blankText:f,swatchAutoWidth:w,swatchHeight:g,optionTypography:$,optionBgColor:j,optionTextColor:u,optionRounded:x,optionShadow:y,optionHasShadow:h,optionBorder:k,optionTransform:b,hasPreSelected:q,optionTypo:A,combineHeight:C,combineWidth:D,soldOutStyle:L,children:V}=a,v=e(i({optionTypo:A,optionTypography:$,optionBgColor:j,optionBorder:k,optionTextColor:u})),z=r(d({width:c?D:w,height:c?C:o(g,"desktop"),optionTypo:A,optionTypography:$,optionBgColor:j,optionTextColor:u,optionRounded:x,optionHasShadow:h,optionShadow:y,optionBorder:k,optionTransform:b,isCombine:c,textAlign:A?.attrs?.textAlign})),B=s(n({variantGroup:c,type:"Liquid"}));return t`
2
2
  <select
3
- ${z}
4
- class="${V}"
5
- style="${v}"
3
+ ${B}
4
+ class="${v}"
5
+ style="${z}"
6
6
  >
7
- ${s(!k,n(c))}
8
- ${s(a,L,p("disable"===D,k))}
9
- </select>`};export{l as default};
7
+ ${m(!q,p(f))}
8
+ ${m(c,V,l("disable"===L,q))}
9
+ </select>`};export{a as default};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as o,jsxs as t}from"react/jsx-runtime";import{isEmptyChildren as e,ProductProvider as i}from"@gem-sdk/core";import d from"../../../grid/components/ChildrenDroppable.js";import m from"../../../common/components/Loading.js";import"react";import s from"../../../grid/components/row/Row.js";import{If as c}from"@gem-sdk/system";import n from"next/dynamic";import{useProductSetting as l}from"./hook/useProductSetting.js";import{getData as p}from"./common/helpers.js";let u=n(()=>import("../ProductNotFound.js"),{loading:m}),a=n=>{let{builderProps:a,children:h,setting:f,style:g,builderAttrs:j}=n,{isAuto:P}=f??{},{isLoading:b,isProductPage:y,isProductNotFound:k,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:D}=l(n),{rowSetting:S,rowStyles:E}=p(n);return y&&P?r(o,{children:e(h)?r(d,{}):h}):r(o,{children:c(!k,r(o,{children:b?r(m,{}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(s,{builderProps:a,builderAttrs:j,style:g,styles:E,setting:S,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(h)?r(d,{}):h})}):null})}),r(o,{children:c(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 d from"../../../common/components/Loading.js";import"react";import"../../../common/const.js";import s from"../../../grid/components/row/Row.js";import{If as c}from"@gem-sdk/system";import n from"next/dynamic";import{useProductSetting as l}from"./hook/useProductSetting.js";import{getData as p}from"./common/helpers.js";let u=n(()=>import("../ProductNotFound.js"),{loading:d}),a=n=>{let{builderProps:a,children:h,setting:f,style:g,builderAttrs:j}=n,{isAuto:P}=f??{},{isLoading:b,isProductPage:y,isProductNotFound:k,showProductNotFound:x,errorLoadProduct:A,product:v,isEditor:w,productProviderData:C,setShowProductNotFound:D}=l(n),{rowSetting:S,rowStyles:E}=p(n);return y&&P?r(o,{children:e(h)?r(m,{}):h}):r(o,{children:c(!k,r(o,{children:b?r(d,{}):r(o,{children:A?t("div",{children:["Error: ",A?.message]}):v?r(i,{...C,children:r(s,{builderProps:a,builderAttrs:j,style:g,styles:E,setting:S,customAttrs:w?{"data-product-id":v?.baseID?.replace("gid://shopify/Product/","")??""}:void 0,children:e(h)?r(m,{}):h})}):null})}),r(o,{children:c(x,r(u,{builderAttrs:j,productSrc:"PickProduct",onClose:()=>D(!1),children:h}))}))})};export{a as default};
@@ -0,0 +1 @@
1
+ import{useFetchHandle as r,usePageStore as t,useIsSampleProduct as e,useIsStorefrontProduct as a,hasPublicStoreFrontData as i,createStoreFrontFetcher as o,generateProductQueryKey as l,getProduct as n}from"@gem-sdk/core";import{useMemo as d,useEffect as s}from"react";import u from"swr";let m=({id:m})=>{let f=r(),c=t(r=>r.publicStoreFrontData),g=e(),p=a(),v=d(()=>i(c)?o(c):f,[c]),y=d(()=>m?l({id:m,isSample:g,isStorefront:p}):null,[m,g,p]),I=u(y,async([,r])=>n(v,r),{revalidateOnMount:!1,refreshInterval:0,revalidateIfStale:!1});return s(()=>{if(!m)return;let r=!!I.error,t=I.isLoading||I.isValidating,e=!I.data&&!t;!r&&e&&I.mutate()},[m,I.data,I.error,I.isLoading,I.isValidating]),{productData:I}};export{m as default};
@@ -1 +1 @@
1
- import{usePageType as t,usePageStore as e,useRenderMode as r,hasPublicStoreFrontData as a,createStoreFrontFetcher as d,useProductQuery as i}from"@gem-sdk/core";import{useMemo as o,useState as c}from"react";let u=u=>{let{setting:n}=u,{productSetting:l,quantity:s,readOnly:P,isSyncProduct:m}=n??{},p=t(),S=e(t=>t.dynamicProduct),g=e(t=>t.publicStoreFrontData),{isEditMode:h,isPreviewSharePageMode:y}=r(),I=l?.productId??"latest",f=l?.productStatus=="dynamic"?{...l,...S}:l,k=f?.initialVariantId,v=f?.initialVariantBaseId,D=o(()=>a(g)?d(g):void 0,[g]),{data:O,isLoading:V,error:$}=i(I,{revalidateOnMount:h||y},D),[b,x]=c(!0),B=($||!O&&!V)&&h,C=o(()=>({product:O,initialVariantId:k,initialVariantBaseId:v,quantity:s,readOnly:P,isSyncProduct:m,key:`uid-${O?.id}-${k??""}`,hasPreSelected:l?.hasPreSelected}),[v,k,m,O,l?.hasPreSelected,s,P]);return{forceProductSetting:f,isProductPage:"PRODUCT"===p,isProductNotFound:B,showProductNotFound:b,isLoading:V,product:O,errorLoadProduct:$,isEditor:h,productProviderData:C,setShowProductNotFound:x}};export{u as useProductSetting};
1
+ import{usePageType as t,usePageStore as r,useRenderMode as e}from"@gem-sdk/core";import{useState as d,useMemo as a}from"react";import i from"./useProductQuery.js";let o=o=>{let{setting:c}=o,{productSetting:u,quantity:s,readOnly:P,isSyncProduct:m}=c??{},l=t(),n=r(t=>t.dynamicProduct),{isEditMode:p}=e(),S=u?.productId??"latest",y=u?.productStatus=="dynamic"?{...u,...n}:u,f=y?.initialVariantId,g=y?.initialVariantBaseId,{productData:{data:h,isLoading:I,error:k}}=i({id:S}),[D,V]=d(!0),$=(k||!h&&!I)&&p,j=a(()=>({product:h,initialVariantId:f,initialVariantBaseId:g,quantity:s,readOnly:P,isSyncProduct:m,key:`uid-${h?.id}-${f??""}`,hasPreSelected:u?.hasPreSelected}),[g,f,m,h,u?.hasPreSelected,s,P]);return{forceProductSetting:y,isProductPage:"PRODUCT"===l,isProductNotFound:$,showProductNotFound:D,isLoading:I,product:h,errorLoadProduct:k,isEditor:p,productProviderData:j,setShowProductNotFound:V}};export{o as useProductSetting};
@@ -1 +1 @@
1
- import{convertDecimalToNumber as t,formatMoney as o}from"@gem-sdk/core";import{DiscountType as e}from"../components/constants/product-bundle.js";let n=t=>({discountPercentAmount:0,discountAmount:o("0",t)}),r=r=>{let{currentVariant:s,bundleItem:a,options:d}=r;if(!d?.useProductCompareAtPrice&&a?.discountType===e.NoDiscount||!a||!s?.price)return n(d?.moneyFormat||"${{amount}}");let p=t(s?.price)??0,y=t(s?.salePrice)??p,P=Number(a?.quantity),l=m(p,a),A=i(l,P*p),F=p*P-l,g=y*P;return y<=p&&l<=0?n(d?.moneyFormat||"${{amount}}"):{discountPercentAmount:d?.useProductCompareAtPrice?u(F,g):A,discountAmount:d?.useProductCompareAtPrice?c(F,g,d?.moneyFormat):o(l.toString(),d?.moneyFormat)}},u=(t,o)=>Math.round((o-t)/o*100),c=(t,e,n)=>o((e-t).toString(),n),m=(t,o)=>{let n=parseInt(o?.discountValue);return o?.discountType===e.Percentage?t*o.quantity*n/100:o?.discountType===e.FixedAmount?n:0},i=(t,o)=>Math.round(t/o*100);export{r as applyBundleDiscountAmount};
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:i,bundleItem:d,options:s}=r;if(!s?.useProductCompareAtPrice&&d?.discountType===e.NoDiscount||!d||!i?.price)return n(s?.moneyFormat||"${{amount}}");let p=t(i?.price)??0,l=t(i?.salePrice)??p,y=Number(d?.quantity),P=m(p,d),A=a(P,y*p),F=p*y-P,f=l*y;return l<=p&&P<=0?n(s?.moneyFormat||"${{amount}}"):{discountPercentAmount:s?.useProductCompareAtPrice?u(F,f):A,discountAmount:s?.useProductCompareAtPrice?c(F,f,s?.moneyFormat):o(P.toString(),s?.moneyFormat)}},u=(t,o)=>Math.round((o-t)/o*100),c=(t,e,n)=>o((e-t).toString(),n),m=(t,o)=>{let n=Number(o?.discountValue);return o?.discountType===e.Percentage?i(t*(n/100))*o.quantity:o?.discountType===e.FixedAmount?n:0},i=t=>Math.floor(Math.round(1e6*(100*t))/1e6)/100,a=(t,o)=>Math.round(t/o*100);export{r as applyBundleDiscountAmount,m as calculateBundleFixedDiscount,i as floorToCents};
@@ -1 +1 @@
1
- export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../carousel-v3/components/swiper/Swiper.js";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"./components/constants/product-bundle.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import m from"./settings/ProductImages.js";import c from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import p from"./settings/ProductDescription.js";import u from"./settings/ProductProperties.js";import d from"./settings/ProductTag.js";import a from"./settings/ProductListV3.js";import P from"./settings/ProductList.js";import g from"./settings/DynamicCheckout.js";import j from"./settings/Vendor.js";import f from"./settings/Sku.js";import l from"./components/product-bundle/setting/ProductBundleDiscount.js";import V from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import k from"./settings/ProductViewMore.js";import x from"./settings/ProductBadge.js";import b from"./components/file-upload/settings/index.js";let v={Product:t,ProductQuantity:o,ProductTitle:r,ProductButton:s,ProductPrice:i,ProductVariants:e,ProductImages:m,ProductImagesV2:n,ProductImagesV3:c,ProductDescription:p,ProductProperties:u,ProductTag:d,ProductListV3:a,ProductList:P,DynamicCheckout:g,ProductVendor:j,ProductSku:f,ProductBundleDiscount:l,ProductBundleDiscountItem:V,ProductViewMore:k,ProductBadge:x,FileUpload:b};export{v as productSetting};
1
+ export{default as Product}from"./components/product-wrap/Product.js";import"react/jsx-runtime";import"next/link";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"./components/constants/product-bundle.js";import"../notification/components/Notifications.js";import"../notification/components/Notice.js";import"./components/product-button/types.js";import"./components/product-variants/components/variants/index.js";import"next/image";import"../carousel-v3/components/swiper/Swiper.js";import"../modal/components/confirm.js";import"react-dom";import"../video/components/Video.js";import"@gem-sdk/keen-slider/react";export{default as ProductQuickView}from"./components/product-quick-view/QuickView.js";import"../common/const.js";export{default as ProductListV3}from"./components/product-list-v3/ProductList.js";export{default as ProductList}from"./components/product-list/ProductList.js";import"./components/product-bundle/common/styles.js";import"./components/product-bundle/common/classes.js";import"./components/product-badge/constants.js";import"./components/product-badge/types.js";import"./components/product-badge/utils/shape.js";import t from"./settings/Product.js";import o from"./settings/ProductQuantity.js";import r from"./settings/ProductTitle.js";import s from"./settings/ProductButton.js";import i from"./settings/ProductPrice.js";import e from"./settings/ProductVariants.js";import m from"./settings/ProductImages.js";import c from"./settings/product-image-v3/ProductImages.js";import n from"./settings/product-image-v2/ProductImages.js";import p from"./settings/ProductDescription.js";import u from"./settings/ProductProperties.js";import d from"./settings/ProductTag.js";import a from"./settings/ProductListV3.js";import P from"./settings/ProductList.js";import g from"./settings/DynamicCheckout.js";import j from"./settings/Vendor.js";import f from"./settings/Sku.js";import l from"./components/product-bundle/setting/ProductBundleDiscount.js";import V from"./components/product-bundle/setting/ProductBundleDiscountItem.js";import k from"./settings/ProductViewMore.js";import x from"./settings/ProductBadge.js";import b from"./components/file-upload/settings/index.js";let v={Product:t,ProductQuantity:o,ProductTitle:r,ProductButton:s,ProductPrice:i,ProductVariants:e,ProductImages:m,ProductImagesV2:n,ProductImagesV3:c,ProductDescription:p,ProductProperties:u,ProductTag:d,ProductListV3:a,ProductList:P,DynamicCheckout:g,ProductVendor:j,ProductSku:f,ProductBundleDiscount:l,ProductBundleDiscountItem:V,ProductViewMore:k,ProductBadge:x,FileUpload:b};export{v as productSetting};
@@ -1 +1 @@
1
- import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let n=o(()=>import("./components/product-wrap/Product.js"),{loading:t}),r=o(()=>import("./components/product-title/ProductTitle.js"),{loading:t}),i=o(()=>import("./components/product-quantity/ProductQuantity.js"),{loading:t}),c=o(()=>import("./components/product-description/ProductDescription.js"),{loading:t}),p=o(()=>import("./components/product-price/ProductPrice.js"),{loading:t}),d=o(()=>import("./components/product-button/ProductButton.js"),{loading:t}),s=o(()=>import("./components/product-variants/ProductVariants.js"),{loading:t}),m=o(()=>import("./components/ProductImages.js"),{loading:t}),e=o(()=>import("./components/product-images-v3/ProductImageV3.js"),{loading:t}),u=o(()=>import("./components/product-images-v2/ProductImageV2.js"),{loading:t}),a=o(()=>import("./components/product-properties/ProductProperties.js"),{loading:t}),l=o(()=>import("./components/product-quick-view/QuickView.js"),{ssr:!1}),g=o(()=>import("./components/product-discount-tag/ProductDiscountTag.js"),{loading:t}),j=o(()=>import("./components/product-list-v3/ProductList.js"),{loading:t}),P=o(()=>import("./components/product-list/ProductList.js"),{loading:t}),v=o(()=>import("./components/dynamic-checkout/DynamicCheckout.js"),{loading:t}),k=o(()=>import("./components/product-vendor/Vendor.js"),{loading:t}),V=o(()=>import("./components/product-sku/Sku.js"),{loading:t}),w=o(()=>import("./components/product-view-more/ProductViewMore.js"),{loading:t}),y=o(()=>import("./components/product-badge/ProductBadge.js"),{loading:t}),D=o(()=>import("./components/product-bundle/ProductBundleDiscount.js"),{loading:t}),b=o(()=>import("./components/product-bundle/ProductBundleDiscountItem.js"),{loading:t}),f=o(()=>import("./components/file-upload/UploadFile.js"),{loading:t});var B={Product:n,ProductTitle:r,ProductQuantity:i,ProductPrice:p,ProductButton:d,ProductDescription:c,ProductVariants:s,ProductImages:m,ProductImagesV3:e,ProductImagesV2:u,ProductProperties:a,ProductQuickView:l,ProductTag:g,ProductListV3:j,ProductList:P,DynamicCheckout:v,ProductVendor:k,ProductViewMore:w,ProductBadge:y,ProductBundleDiscount:D,ProductBundleDiscountItem:b,ProductSku:V,FileUpload:f};export{B as default};
1
+ import o from"next/dynamic";import t from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"../common/const.js";let n=o(()=>import("./components/product-wrap/Product.js"),{loading:t}),r=o(()=>import("./components/product-title/ProductTitle.js"),{loading:t}),i=o(()=>import("./components/product-quantity/ProductQuantity.js"),{loading:t}),c=o(()=>import("./components/product-description/ProductDescription.js"),{loading:t}),p=o(()=>import("./components/product-price/ProductPrice.js"),{loading:t}),d=o(()=>import("./components/product-button/ProductButton.js"),{loading:t}),s=o(()=>import("./components/product-variants/ProductVariants.js"),{loading:t}),m=o(()=>import("./components/ProductImages.js"),{loading:t}),e=o(()=>import("./components/product-images-v3/ProductImageV3.js"),{loading:t}),u=o(()=>import("./components/product-images-v2/ProductImageV2.js"),{loading:t}),a=o(()=>import("./components/product-properties/ProductProperties.js"),{loading:t}),l=o(()=>import("./components/product-quick-view/QuickView.js"),{ssr:!1}),g=o(()=>import("./components/product-discount-tag/ProductDiscountTag.js"),{loading:t}),j=o(()=>import("./components/product-list-v3/ProductList.js"),{loading:t}),P=o(()=>import("./components/product-list/ProductList.js"),{loading:t}),v=o(()=>import("./components/dynamic-checkout/DynamicCheckout.js"),{loading:t}),k=o(()=>import("./components/product-vendor/Vendor.js"),{loading:t}),V=o(()=>import("./components/product-sku/Sku.js"),{loading:t}),w=o(()=>import("./components/product-view-more/ProductViewMore.js"),{loading:t}),y=o(()=>import("./components/product-badge/ProductBadge.js"),{loading:t}),D=o(()=>import("./components/product-bundle/ProductBundleDiscount.js"),{loading:t}),b=o(()=>import("./components/product-bundle/ProductBundleDiscountItem.js"),{loading:t}),f=o(()=>import("./components/file-upload/UploadFile.js"),{loading:t});var B={Product:n,ProductTitle:r,ProductQuantity:i,ProductPrice:p,ProductButton:d,ProductDescription:c,ProductVariants:s,ProductImages:m,ProductImagesV3:e,ProductImagesV2:u,ProductProperties:a,ProductQuickView:l,ProductTag:g,ProductListV3:j,ProductList:P,DynamicCheckout:v,ProductVendor:k,ProductViewMore:w,ProductBadge:y,ProductBundleDiscount:D,ProductBundleDiscountItem:b,ProductSku:V,FileUpload:f};export{B as default};