@gem-sdk/components 2.1.13-staging.0 → 2.1.13-staging.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/cjs/article/components/ArticleList.liquid.js +6 -2
  2. package/dist/cjs/banner/components/hero-banner/index.liquid.js +12 -10
  3. package/dist/cjs/builder.js +21 -1
  4. package/dist/cjs/common/const.js +1 -1
  5. package/dist/cjs/image/components/AdaptiveImage.liquid.js +6 -5
  6. package/dist/cjs/image/components/Image.js +22 -3
  7. package/dist/cjs/image/components/Image.liquid.js +6 -5
  8. package/dist/cjs/image/components/NextImage.liquid.js +4 -3
  9. package/dist/cjs/image/components/NoDataImage.js +133 -0
  10. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +7 -3
  11. package/dist/cjs/index.js +20 -0
  12. package/dist/cjs/index.liquid.js +22 -2
  13. package/dist/cjs/post-purchase/product/components/ProductDiscountTag.js +5 -2
  14. package/dist/cjs/post-purchase/product/components/ProductOffer.js +16 -3
  15. package/dist/cjs/post-purchase/product/components/ProductPrice.js +3 -1
  16. package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
  17. package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +127 -0
  18. package/dist/cjs/post-purchase/product/hooks/useDynamicProduct.js +28 -0
  19. package/dist/cjs/post-purchase/product/settings/ProductOffer.js +26 -0
  20. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +4 -4
  21. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductGalleryCarousel.liquid.js +2 -2
  22. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductGalleryGrid.liquid.js +4 -4
  23. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductImages.liquid.js +4 -4
  24. package/dist/cjs/tab/hooks/useTabInteraction.js +13 -9
  25. package/dist/cjs/text/components/Text.js +0 -1
  26. package/dist/cjs/third-party/components/AlsoBoughtCbb.js +32 -0
  27. package/dist/cjs/third-party/components/AlsoBoughtCbb.liquid.js +21 -0
  28. package/dist/cjs/third-party/components/BfSizeChartSizeGuide.js +32 -0
  29. package/dist/cjs/third-party/components/BfSizeChartSizeGuide.liquid.js +12 -0
  30. package/dist/cjs/third-party/components/EssentialAnnouncementBar.js +32 -0
  31. package/dist/cjs/third-party/components/EssentialAnnouncementBar.liquid.js +12 -0
  32. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.js +32 -0
  33. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.liquid.js +12 -0
  34. package/dist/cjs/third-party/components/EstimatedDeliveryDatePlus.js +32 -0
  35. package/dist/cjs/third-party/components/EstimatedDeliveryDatePlus.liquid.js +12 -0
  36. package/dist/cjs/third-party/components/GloColorSwatchvariantImage.js +32 -0
  37. package/dist/cjs/third-party/components/GloColorSwatchvariantImage.liquid.js +12 -0
  38. package/dist/cjs/third-party/components/HextomFreeShippingBar.js +32 -0
  39. package/dist/cjs/third-party/components/HextomFreeShippingBar.liquid.js +12 -0
  40. package/dist/cjs/third-party/components/OkendoReviewsLoyalty.js +32 -0
  41. package/dist/cjs/third-party/components/OkendoReviewsLoyalty.liquid.js +12 -0
  42. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.js +32 -0
  43. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.liquid.js +21 -0
  44. package/dist/cjs/third-party/components/TrustedsiteTrustBadges.js +32 -0
  45. package/dist/cjs/third-party/components/TrustedsiteTrustBadges.liquid.js +12 -0
  46. package/dist/cjs/third-party/configs/AlsoBoughtCbb.js +12 -0
  47. package/dist/cjs/third-party/configs/BfSizeChartSizeGuide.js +12 -0
  48. package/dist/cjs/third-party/configs/EssentialAnnouncementBar.js +12 -0
  49. package/dist/cjs/third-party/configs/EssentialCountdownTimerBar.js +12 -0
  50. package/dist/cjs/third-party/configs/EstimatedDeliveryDatePlus.js +12 -0
  51. package/dist/cjs/third-party/configs/GloColorSwatchvariantImage.js +12 -0
  52. package/dist/cjs/third-party/configs/HextomFreeShippingBar.js +12 -0
  53. package/dist/cjs/third-party/configs/OkendoReviewsLoyalty.js +12 -0
  54. package/dist/cjs/third-party/configs/StellarDeliveryDatePickup.js +12 -0
  55. package/dist/cjs/third-party/configs/TrustedsiteTrustBadges.js +12 -0
  56. package/dist/cjs/third-party/helpers/thirdParty.js +1 -1
  57. package/dist/cjs/third-party/next.js +51 -1
  58. package/dist/cjs/third-party/setting/AlsoBoughtCbb.js +127 -0
  59. package/dist/cjs/third-party/setting/BfSizeChartSizeGuide.js +131 -0
  60. package/dist/cjs/third-party/setting/EssentialAnnouncementBar.js +142 -0
  61. package/dist/cjs/third-party/setting/EssentialCountdownTimerBar.js +142 -0
  62. package/dist/cjs/third-party/setting/EstimatedDeliveryDatePlus.js +128 -0
  63. package/dist/cjs/third-party/setting/GloColorSwatchvariantImage.js +152 -0
  64. package/dist/cjs/third-party/setting/HextomFreeShippingBar.js +128 -0
  65. package/dist/cjs/third-party/setting/OkendoReviewsLoyalty.js +171 -0
  66. package/dist/cjs/third-party/setting/StellarDeliveryDatePickup.js +127 -0
  67. package/dist/cjs/third-party/setting/TrustedsiteTrustBadges.js +177 -0
  68. package/dist/cjs/third-party/setting/index.js +21 -1
  69. package/dist/cjs/video/components/HTML5Embed.js +2 -2
  70. package/dist/cjs/video/components/HTML5Embed.liquid.js +6 -3
  71. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +4 -2
  72. package/dist/esm/article/components/ArticleList.liquid.js +6 -2
  73. package/dist/esm/banner/components/hero-banner/index.liquid.js +12 -10
  74. package/dist/esm/builder.js +21 -1
  75. package/dist/esm/common/const.js +1 -1
  76. package/dist/esm/image/components/AdaptiveImage.liquid.js +6 -5
  77. package/dist/esm/image/components/Image.js +23 -4
  78. package/dist/esm/image/components/Image.liquid.js +6 -5
  79. package/dist/esm/image/components/NextImage.liquid.js +4 -3
  80. package/dist/esm/image/components/NoDataImage.js +129 -0
  81. package/dist/esm/image-comparison/components/CompareImage.liquid.js +7 -3
  82. package/dist/esm/index.js +10 -0
  83. package/dist/esm/index.liquid.js +11 -1
  84. package/dist/esm/post-purchase/product/components/ProductDiscountTag.js +5 -2
  85. package/dist/esm/post-purchase/product/components/ProductOffer.js +16 -3
  86. package/dist/esm/post-purchase/product/components/ProductPrice.js +3 -1
  87. package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
  88. package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +125 -0
  89. package/dist/esm/post-purchase/product/hooks/useDynamicProduct.js +26 -0
  90. package/dist/esm/post-purchase/product/settings/ProductOffer.js +26 -0
  91. package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +4 -4
  92. package/dist/esm/product/components/ProductImagesV2/liquid/ProductGalleryCarousel.liquid.js +2 -2
  93. package/dist/esm/product/components/ProductImagesV2/liquid/ProductGalleryGrid.liquid.js +4 -4
  94. package/dist/esm/product/components/ProductImagesV2/liquid/ProductImages.liquid.js +4 -4
  95. package/dist/esm/tab/hooks/useTabInteraction.js +14 -10
  96. package/dist/esm/text/components/Text.js +0 -1
  97. package/dist/esm/third-party/components/AlsoBoughtCbb.js +28 -0
  98. package/dist/esm/third-party/components/AlsoBoughtCbb.liquid.js +17 -0
  99. package/dist/esm/third-party/components/BfSizeChartSizeGuide.js +28 -0
  100. package/dist/esm/third-party/components/BfSizeChartSizeGuide.liquid.js +8 -0
  101. package/dist/esm/third-party/components/EssentialAnnouncementBar.js +28 -0
  102. package/dist/esm/third-party/components/EssentialAnnouncementBar.liquid.js +8 -0
  103. package/dist/esm/third-party/components/EssentialCountdownTimerBar.js +28 -0
  104. package/dist/esm/third-party/components/EssentialCountdownTimerBar.liquid.js +8 -0
  105. package/dist/esm/third-party/components/EstimatedDeliveryDatePlus.js +28 -0
  106. package/dist/esm/third-party/components/EstimatedDeliveryDatePlus.liquid.js +8 -0
  107. package/dist/esm/third-party/components/GloColorSwatchvariantImage.js +28 -0
  108. package/dist/esm/third-party/components/GloColorSwatchvariantImage.liquid.js +8 -0
  109. package/dist/esm/third-party/components/HextomFreeShippingBar.js +28 -0
  110. package/dist/esm/third-party/components/HextomFreeShippingBar.liquid.js +8 -0
  111. package/dist/esm/third-party/components/OkendoReviewsLoyalty.js +28 -0
  112. package/dist/esm/third-party/components/OkendoReviewsLoyalty.liquid.js +8 -0
  113. package/dist/esm/third-party/components/StellarDeliveryDatePickup.js +28 -0
  114. package/dist/esm/third-party/components/StellarDeliveryDatePickup.liquid.js +17 -0
  115. package/dist/esm/third-party/components/TrustedsiteTrustBadges.js +28 -0
  116. package/dist/esm/third-party/components/TrustedsiteTrustBadges.liquid.js +8 -0
  117. package/dist/esm/third-party/configs/AlsoBoughtCbb.js +8 -0
  118. package/dist/esm/third-party/configs/BfSizeChartSizeGuide.js +8 -0
  119. package/dist/esm/third-party/configs/EssentialAnnouncementBar.js +8 -0
  120. package/dist/esm/third-party/configs/EssentialCountdownTimerBar.js +8 -0
  121. package/dist/esm/third-party/configs/EstimatedDeliveryDatePlus.js +8 -0
  122. package/dist/esm/third-party/configs/GloColorSwatchvariantImage.js +8 -0
  123. package/dist/esm/third-party/configs/HextomFreeShippingBar.js +8 -0
  124. package/dist/esm/third-party/configs/OkendoReviewsLoyalty.js +8 -0
  125. package/dist/esm/third-party/configs/StellarDeliveryDatePickup.js +8 -0
  126. package/dist/esm/third-party/configs/TrustedsiteTrustBadges.js +8 -0
  127. package/dist/esm/third-party/helpers/thirdParty.js +1 -1
  128. package/dist/esm/third-party/next.js +51 -1
  129. package/dist/esm/third-party/setting/AlsoBoughtCbb.js +123 -0
  130. package/dist/esm/third-party/setting/BfSizeChartSizeGuide.js +127 -0
  131. package/dist/esm/third-party/setting/EssentialAnnouncementBar.js +138 -0
  132. package/dist/esm/third-party/setting/EssentialCountdownTimerBar.js +138 -0
  133. package/dist/esm/third-party/setting/EstimatedDeliveryDatePlus.js +124 -0
  134. package/dist/esm/third-party/setting/GloColorSwatchvariantImage.js +148 -0
  135. package/dist/esm/third-party/setting/HextomFreeShippingBar.js +124 -0
  136. package/dist/esm/third-party/setting/OkendoReviewsLoyalty.js +167 -0
  137. package/dist/esm/third-party/setting/StellarDeliveryDatePickup.js +123 -0
  138. package/dist/esm/third-party/setting/TrustedsiteTrustBadges.js +173 -0
  139. package/dist/esm/third-party/setting/index.js +224 -204
  140. package/dist/esm/video/components/HTML5Embed.js +2 -2
  141. package/dist/esm/video/components/HTML5Embed.liquid.js +6 -3
  142. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +4 -2
  143. package/dist/types/index.d.ts +172 -7
  144. package/package.json +2 -2
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var core = require('@gem-sdk/core');
7
7
  var React = require('react');
8
8
  var Text = require('../../text/Text.js');
9
+ var useDynamicProduct = require('../hooks/useDynamicProduct.js');
9
10
 
10
11
  const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, children })=>{
11
12
  const currentVariant = core.useCurrentVariant();
@@ -13,6 +14,7 @@ const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, c
13
14
  const price = currentVariant?.price ?? 0;
14
15
  const salePrice = currentVariant?.salePrice ?? 0;
15
16
  const discount = parseFloat(core.shopifyPriceRounding(core.useProductOfferDiscount(), 2));
17
+ const { isDynamicProduct } = useDynamicProduct.useDynamicProduct();
16
18
  const priceShow = React.useMemo(()=>{
17
19
  if (!discount) {
18
20
  if (styles?.priceType === 'compare') {
@@ -53,7 +55,7 @@ const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, c
53
55
  /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
54
56
  styles: styles,
55
57
  setting: {
56
- text: moneyFormatted
58
+ text: isDynamicProduct ? '$???' : moneyFormatted
57
59
  },
58
60
  className: core.cls({
59
61
  'gp-money': styles?.priceType === 'regular',
@@ -7,6 +7,7 @@ var core = require('@gem-sdk/core');
7
7
  var React = require('react');
8
8
  var helper = require('../../utils/helper.js');
9
9
  var MoneyLine = require('./priceBreakdown/MoneyLine.js');
10
+ var useDynamicProduct = require('../hooks/useDynamicProduct.js');
10
11
 
11
12
  const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
12
13
  const currentVariant = core.useCurrentVariant();
@@ -21,6 +22,7 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
21
22
  const discountShopifyFormat = core.shopifyPriceRounding(discountWithQuantity, 2);
22
23
  const totalMoneyFormatted = core.useFormatMoney(subTotal - parseFloat(discountShopifyFormat), false);
23
24
  const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
25
+ const { isDynamicProduct, dynamicPrice, dynamicDiscount, isEnableDynamicDiscount } = useDynamicProduct.useDynamicProduct();
24
26
  const { labelStyle, moneyStyle, spacing, width, align, isShowPrice } = styles;
25
27
  const itemGap = React.useMemo(()=>{
26
28
  return helper.postPurchaseSpacing[spacing || 'none'];
@@ -33,19 +35,19 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
33
35
  }, [
34
36
  isShowPrice
35
37
  ]);
36
- const moneyLines = React.useMemo(()=>{
38
+ const getMoneyLines = ()=>{
37
39
  const data = [];
38
40
  if (styles.isShowSubTotalLabel !== false) {
39
41
  data.push({
40
42
  title: setting.subTotalLabel,
41
- money: subTotalMoneyFormatted,
43
+ money: isDynamicProduct ? dynamicPrice : subTotalMoneyFormatted,
42
44
  uniqueId: 'subTotalLabel'
43
45
  });
44
46
  }
45
47
  if (styles.isShowDiscountLabel !== false) {
46
48
  data.push({
47
49
  title: setting.discountLabel,
48
- money: discount > 0 ? discountMoneyFormatted : 'No discount',
50
+ money: isDynamicProduct && dynamicDiscount && isEnableDynamicDiscount ? dynamicPrice : discount > 0 ? discountMoneyFormatted : 'No discount',
49
51
  uniqueId: 'discountLabel'
50
52
  });
51
53
  }
@@ -71,25 +73,11 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
71
73
  }
72
74
  data.push({
73
75
  title: setting.totalLabel,
74
- money: totalMoneyFormatted,
76
+ money: isDynamicProduct ? dynamicPrice : totalMoneyFormatted,
75
77
  uniqueId: 'totalLabel'
76
78
  });
77
79
  return data;
78
- }, [
79
- discount,
80
- discountMoneyFormatted,
81
- setting.discountLabel,
82
- setting.shippingLabel,
83
- setting.subTotalLabel,
84
- setting.taxesLabel,
85
- setting.totalLabel,
86
- styles.isShowSubTotalLabel,
87
- styles.isShowDiscountLabel,
88
- styles.isShowShippingLabel,
89
- styles.isShowTaxesLabel,
90
- subTotalMoneyFormatted,
91
- totalMoneyFormatted
92
- ]);
80
+ };
93
81
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
94
82
  children: [
95
83
  /*#__PURE__*/ jsxRuntime.jsxs("div", {
@@ -140,9 +128,9 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
140
128
  ...core.makeStyleResponsive('w', width),
141
129
  gap: itemGap
142
130
  },
143
- children: moneyLines.map((item)=>/*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
131
+ children: getMoneyLines().map((item)=>/*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
144
132
  children: [
145
- item.uniqueId === 'totalLabel' && moneyLines.length > 1 && /*#__PURE__*/ jsxRuntime.jsx("hr", {}),
133
+ item.uniqueId === 'totalLabel' && getMoneyLines().length > 1 && /*#__PURE__*/ jsxRuntime.jsx("hr", {}),
146
134
  /*#__PURE__*/ jsxRuntime.jsx("div", {
147
135
  children: /*#__PURE__*/ jsxRuntime.jsx(MoneyLine.default, {
148
136
  uniqueId: item.uniqueId,
@@ -0,0 +1,127 @@
1
+ 'use strict';
2
+
3
+ const productOfferPlaceholder = {
4
+ id: '',
5
+ title: 'Dynamic product',
6
+ description: 'This is a dynamic product. The actual product will appear here based on your setup',
7
+ descriptionHtml: '<p class="QN2lPu">This is a dynamic product. The actual product will</p>\n<p class="QN2lPu">appear here based on your setup</p>',
8
+ createdAt: '2024-07-01T04:19:51.286753Z',
9
+ handle: 'dynamic-product',
10
+ averageRating: 0,
11
+ isStorefront: true,
12
+ isSample: false,
13
+ baseID: '',
14
+ sku: '',
15
+ options: [
16
+ {
17
+ id: '1',
18
+ name: 'Variant',
19
+ optionType: '',
20
+ values: [
21
+ {
22
+ id: '1',
23
+ label: 'Variant option',
24
+ isDefault: true,
25
+ baseID: '1'
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ vendor: '',
31
+ featuredImage: {
32
+ id: '542178560626918105',
33
+ contentType: 'IMAGE',
34
+ previewImage: '',
35
+ src: 'https://cdn.shopify.com/s/files/1/0858/3168/0279/files/gempages_502328832959710176-312cf60c-d923-4913-9873-66545effe9cc.png',
36
+ width: 449,
37
+ height: 449,
38
+ alt: ''
39
+ },
40
+ collections: {
41
+ edges: [
42
+ {
43
+ node: {
44
+ id: '502321959132988135',
45
+ title: 'Home page'
46
+ }
47
+ },
48
+ {
49
+ node: {
50
+ id: '539286505089204764',
51
+ title: 'b'
52
+ }
53
+ },
54
+ {
55
+ node: {
56
+ id: '539286505089401372',
57
+ title: 'e'
58
+ }
59
+ }
60
+ ]
61
+ },
62
+ tags: [],
63
+ medias: {
64
+ edges: [
65
+ {
66
+ cursor: 'gqFpzweGNIc/AALZoXYB',
67
+ node: {
68
+ id: '542178560626918105',
69
+ contentType: 'IMAGE',
70
+ previewImage: '',
71
+ src: 'https://cdn.shopify.com/s/files/1/0858/3168/0279/files/gempages_502328832959710176-312cf60c-d923-4913-9873-66545effe9cc.png',
72
+ width: 449,
73
+ height: 449,
74
+ alt: ''
75
+ }
76
+ }
77
+ ],
78
+ pageInfo: {
79
+ endCursor: 'gqFpzweGNIc/AALZoXYB',
80
+ hasNextPage: true
81
+ }
82
+ },
83
+ variants: {
84
+ edges: [
85
+ {
86
+ cursor: 'gqFpzwc5ZqRtDAMIoXYC',
87
+ node: {
88
+ id: '520560088328176392',
89
+ title: 'Default Title',
90
+ barcode: '',
91
+ baseID: 'gid://shopify/ProductVariant/49298248925463',
92
+ costPrice: 88,
93
+ height: 0,
94
+ inventoryPolicy: 'DENY',
95
+ inventoryQuantity: 211,
96
+ inventoryStatus: '',
97
+ isDigital: true,
98
+ length: 0,
99
+ lowInventoryAmount: 0,
100
+ manageInventory: false,
101
+ mediaId: '0',
102
+ platform: 'SHOPIFY',
103
+ price: 88,
104
+ salePrice: 88,
105
+ sku: '',
106
+ soldIndividually: false,
107
+ weight: 0,
108
+ width: 0,
109
+ selectedOptions: [
110
+ {
111
+ name: 'Variant',
112
+ value: 'Variant option',
113
+ optionType: ''
114
+ }
115
+ ],
116
+ media: undefined
117
+ }
118
+ }
119
+ ],
120
+ pageInfo: {
121
+ hasNextPage: false,
122
+ endCursor: 'gaFpzwc5ZqRtDAMI'
123
+ }
124
+ }
125
+ };
126
+
127
+ exports.productOfferPlaceholder = productOfferPlaceholder;
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var core = require('@gem-sdk/core');
4
+ var React = require('react');
5
+
6
+ const useDynamicProduct = ()=>{
7
+ const dynamicDiscountOffer = core.usePageStore((s)=>s.dynamicDiscountOffer);
8
+ const isDynamicProduct = React.useMemo(()=>{
9
+ return !!dynamicDiscountOffer;
10
+ }, [
11
+ dynamicDiscountOffer
12
+ ]);
13
+ // false = No discount
14
+ const isEnableDynamicDiscount = React.useMemo(()=>{
15
+ return dynamicDiscountOffer?.isEnabled;
16
+ }, [
17
+ dynamicDiscountOffer
18
+ ]);
19
+ const dynamicPrice = '$???';
20
+ return {
21
+ isDynamicProduct,
22
+ dynamicPrice,
23
+ dynamicDiscount: dynamicDiscountOffer,
24
+ isEnableDynamicDiscount
25
+ };
26
+ };
27
+
28
+ exports.useDynamicProduct = useDynamicProduct;
@@ -184,6 +184,14 @@ const config = {
184
184
  }
185
185
  }
186
186
  },
187
+ {
188
+ id: 'dynamicOfferQuantity',
189
+ type: 'dynamic-offer-quantity',
190
+ min: 1,
191
+ max: 4,
192
+ default: 2,
193
+ isOnlyAcceptInteger: true
194
+ },
187
195
  {
188
196
  id: 'discountAndShippingFee',
189
197
  type: 'discount-and-shipping-fee-product-offer',
@@ -377,6 +385,24 @@ const config = {
377
385
  },
378
386
  layout: 'vertical'
379
387
  },
388
+ {
389
+ type: 'group',
390
+ label: {
391
+ en: 'Product offers'
392
+ },
393
+ controls: [
394
+ {
395
+ type: 'control',
396
+ label: {
397
+ en: 'Quantity'
398
+ },
399
+ setting: {
400
+ id: 'dynamicOfferQuantity'
401
+ }
402
+ }
403
+ ],
404
+ condition: 'false'
405
+ },
380
406
  {
381
407
  type: 'control',
382
408
  label: {
@@ -13,7 +13,7 @@ var NextImage_liquid = require('../../../../image/components/NextImage.liquid.js
13
13
  var Video_liquid = require('../../../../image/components/Video.liquid.js');
14
14
  var _function = require('../../../helpers/function.js');
15
15
 
16
- const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyloadImage, ...setting })=>{
16
+ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyLoadImage, ...setting })=>{
17
17
  const ftAspectRatio = common.getAspectRatio(setting.ftShape);
18
18
  const getStyleFeaturedImageDisplay = ()=>{
19
19
  return common.getDisplayStyle((device)=>![
@@ -153,7 +153,7 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
153
153
  },
154
154
  priority: setting?.preload,
155
155
  className: `gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${className}`,
156
- enableLazyloadImage
156
+ enableLazyLoadImage
157
157
  })}`;
158
158
  };
159
159
  const renderNoImage = ()=>{
@@ -171,7 +171,7 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
171
171
  },
172
172
  priority: setting?.preload,
173
173
  className: `gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none`,
174
- enableLazyloadImage
174
+ enableLazyLoadImage
175
175
  })}`;
176
176
  };
177
177
  const getValueFromValueContainUnit = (value)=>{
@@ -398,7 +398,7 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
398
398
  },
399
399
  className: `gp-w-full featured-image-only !gp-rounded-none`,
400
400
  customLazyload: true,
401
- enableLazyloadImage
401
+ enableLazyLoadImage
402
402
  })}
403
403
  {%- endif -%}
404
404
  `
@@ -10,7 +10,7 @@ var common = require('../common/common.js');
10
10
  var productGallery = require('../common/productGallery.js');
11
11
  var _function = require('../../../helpers/function.js');
12
12
 
13
- const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyloadImage, ...setting })=>{
13
+ const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyLoadImage, ...setting })=>{
14
14
  const getCarouselDisplay = ()=>{
15
15
  const isDisplayCarousel = (type, position, device)=>{
16
16
  const layout = core.getResponsiveValueByScreen(position, device);
@@ -90,7 +90,7 @@ const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyloadImage,
90
90
  customLazyload: true,
91
91
  style: style,
92
92
  className: '!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer',
93
- enableLazyloadImage
93
+ enableLazyLoadImage
94
94
  })}`;
95
95
  };
96
96
  const aspectRatioToPaddingBottom = ()=>{
@@ -12,7 +12,7 @@ var Modal3d_liquid = require('../../../../image/components/Modal3d.liquid.js');
12
12
  var Video_liquid = require('../../../../image/components/Video.liquid.js');
13
13
  var HTML5Embed_liquid = require('../../../../video/components/HTML5Embed.liquid.js');
14
14
 
15
- const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazyloadImage, ...setting })=>{
15
+ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazyLoadImage, ...setting })=>{
16
16
  const getGridDisplay = ()=>{
17
17
  const isDisplayGrid = (type, position, device)=>{
18
18
  const layout = core.getResponsiveValueByScreen(position, device);
@@ -101,7 +101,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
101
101
  style: style,
102
102
  className: '!gp-rounded-none',
103
103
  customLazyload: false,
104
- enableLazyloadImage
104
+ enableLazyLoadImage
105
105
  })}
106
106
  ${setting?.galleryHoverEffect !== 'none' ? `<div class="${core.cls('zoom-element !gp-max-w-none', productFeaturedImage.getZoomImageClass())}">
107
107
  ${NextImage_liquid.default({
@@ -115,7 +115,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
115
115
  style: style,
116
116
  className: '!gp-rounded-none gp-w-full gp-h-full',
117
117
  customLazyload: false,
118
- enableLazyloadImage
118
+ enableLazyLoadImage
119
119
  })}
120
120
  </div>` : ''}
121
121
  ${setting?.galleryHoverEffect == 'zoom' && setting?.galleryZoomType == 'glasses' ? `
@@ -298,7 +298,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
298
298
  },
299
299
  className: '!gp-rounded-none',
300
300
  customLazyload: false,
301
- enableLazyloadImage
301
+ enableLazyLoadImage
302
302
  })}`;
303
303
  };
304
304
  return core.template`
@@ -11,7 +11,7 @@ var helpers = require('../../../../helpers.js');
11
11
  var productGallery = require('../common/productGallery.js');
12
12
 
13
13
  const ProductImages = (productImageProps)=>{
14
- const { setting, styles, builderProps, style, advanced, rawChildren, pageContext, enableLazyloadImage } = productImageProps;
14
+ const { setting, styles, builderProps, style, advanced, rawChildren, pageContext, enableLazyLoadImage } = productImageProps;
15
15
  const settings = {
16
16
  ...setting,
17
17
  ...styles
@@ -116,7 +116,7 @@ const ProductImages = (productImageProps)=>{
116
116
  builderPropUID: `gp-carousel-${builderProps?.uid}`,
117
117
  ...settings,
118
118
  children: renderProductBadge(),
119
- enableLazyloadImage
119
+ enableLazyLoadImage
120
120
  })}
121
121
  ${common.shouldSkipLiquidRenderForSingleImage(settings?.position, core.template`
122
122
  <div
@@ -132,7 +132,7 @@ const ProductImages = (productImageProps)=>{
132
132
  ${ProductGalleryCarousel_liquid.default({
133
133
  builderPropUID: `gp-gallery-${builderProps?.uid}`,
134
134
  ...settings,
135
- enableLazyloadImage
135
+ enableLazyLoadImage
136
136
  })}
137
137
  </div>
138
138
  ${ProductGalleryGrid_liquid.default({
@@ -142,7 +142,7 @@ const ProductImages = (productImageProps)=>{
142
142
  },
143
143
  children: renderProductBadge(),
144
144
  ...settings,
145
- enableLazyloadImage
145
+ enableLazyLoadImage
146
146
  })}
147
147
  `)}
148
148
  </div>
@@ -4,19 +4,18 @@ var core = require('@gem-sdk/core');
4
4
  var React = require('react');
5
5
 
6
6
  const useTabInteraction = ({ activeKey, setActiveKey, activeTab, refContainer, componentUid })=>{
7
- const [previousTab, setPreviousTab] = React.useState(activeKey || 1);
8
- const { trigger, onListener, interactionListenerLoaded } = core.useInteraction();
7
+ const { trigger, onListener, interactionListenerLoaded, saveToElementInteractionData, findElementIncludingSelf } = core.useInteraction();
9
8
  const mode = core.useEditorMode();
10
9
  const changeOpenTabInteraction = (params)=>{
11
- const { data, isRollback } = params || {};
12
- if (data === undefined && isRollback === undefined) return;
10
+ const { data, isRollback, element, key } = params || {};
11
+ if (data === undefined && isRollback) return;
12
+ const newData = Number(data) + 1;
13
13
  if (isRollback) {
14
- setActiveKey(previousTab);
15
- setPreviousTab(activeTab);
14
+ setActiveKey(newData);
16
15
  return;
17
16
  }
18
- setPreviousTab(activeTab);
19
- setActiveKey(data + 1);
17
+ saveToElementInteractionData(element, key, String(activeKey));
18
+ setActiveKey(newData);
20
19
  };
21
20
  const dispatchEventTabActive = (index)=>{
22
21
  trigger({
@@ -37,11 +36,16 @@ const useTabInteraction = ({ activeKey, setActiveKey, activeTab, refContainer, c
37
36
  dispatchEventTabActive(activeTab - 1);
38
37
  });
39
38
  const selector = `[data-id="${componentUid}"]`;
39
+ const element = findElementIncludingSelf(document, selector);
40
40
  const removeListener = onListener({
41
41
  event: 'gp:change-open-tab',
42
42
  selector
43
43
  }, (params)=>{
44
- changeOpenTabInteraction(params);
44
+ changeOpenTabInteraction({
45
+ ...params,
46
+ element,
47
+ key: params?.uniqueStorageKey
48
+ });
45
49
  });
46
50
  return ()=>{
47
51
  removeListener?.();
@@ -9,7 +9,6 @@ var React = require('react');
9
9
  const Text = /*#__PURE__*/ React.forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
10
10
  const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
11
11
  const composeGlobalSize = core.makeGlobalSize(setting?.globalSize);
12
- console.log('Text: ', text);
13
12
  const mode = core.useEditorMode();
14
13
  const getPlaceHolderWhenContentNone = ()=>{
15
14
  let classList = '';
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@gem-sdk/core');
7
+ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
+ var AlsoBoughtCbb$1 = require('../configs/AlsoBoughtCbb.js');
9
+
10
+ const AlsoBoughtCbbContent = ()=>{
11
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
12
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
13
+ className: "gp-p-2",
14
+ children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
15
+ setting: {
16
+ label: 'Also Bought • CBB',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AlsoBoughtCbb$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const AlsoBoughtCbb = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(AlsoBoughtCbbContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = AlsoBoughtCbb;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@gem-sdk/core');
6
+
7
+ const AlsoBoughtCbb = ({ setting, advanced })=>{
8
+ const { align } = setting ?? {};
9
+ return core.template`
10
+ <div
11
+ class="${advanced?.cssClass}"
12
+ style="${{
13
+ ...core.makeStyleResponsive('ta', align)
14
+ }}"
15
+ >
16
+ <div class="gp-integration-also-bought__position" />
17
+ </div>
18
+ `;
19
+ };
20
+
21
+ exports.default = AlsoBoughtCbb;
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@gem-sdk/core');
7
+ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
+ var BfSizeChartSizeGuide$1 = require('../configs/BfSizeChartSizeGuide.js');
9
+
10
+ const BfSizeChartSizeGuideContent = ()=>{
11
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
12
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
13
+ className: "gp-p-2",
14
+ children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
15
+ setting: {
16
+ label: 'BF Size Chart & Size Guide',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${BfSizeChartSizeGuide$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const BfSizeChartSizeGuide = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(BfSizeChartSizeGuideContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = BfSizeChartSizeGuide;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var thirdParty = require('../helpers/thirdParty.js');
6
+
7
+ const BfSizeChartSizeGuide = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
10
+ };
11
+
12
+ exports.default = BfSizeChartSizeGuide;
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@gem-sdk/core');
7
+ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
+ var EssentialAnnouncementBar$1 = require('../configs/EssentialAnnouncementBar.js');
9
+
10
+ const EssentialAnnouncementBarContent = ()=>{
11
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
12
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
13
+ className: "gp-p-2",
14
+ children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
15
+ setting: {
16
+ label: 'Essential Announcement Bar',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${EssentialAnnouncementBar$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const EssentialAnnouncementBar = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(EssentialAnnouncementBarContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = EssentialAnnouncementBar;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var thirdParty = require('../helpers/thirdParty.js');
6
+
7
+ const EssentialAnnouncementBar = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
10
+ };
11
+
12
+ exports.default = EssentialAnnouncementBar;
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@gem-sdk/core');
7
+ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
+ var EssentialCountdownTimerBar$1 = require('../configs/EssentialCountdownTimerBar.js');
9
+
10
+ const EssentialCountdownTimerBarContent = ()=>{
11
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
12
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
13
+ className: "gp-p-2",
14
+ children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
15
+ setting: {
16
+ label: 'Essential Countdown Timer Bar',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${EssentialCountdownTimerBar$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const EssentialCountdownTimerBar = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(EssentialCountdownTimerBarContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = EssentialCountdownTimerBar;