@gem-sdk/components 2.1.13-staging.3 → 2.1.13-staging.31

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 (182) hide show
  1. package/dist/cjs/article/components/ArticleImage.js +2 -1
  2. package/dist/cjs/article/components/ArticleList.js +1 -1
  3. package/dist/cjs/banner/components/hero-banner/index.liquid.js +12 -13
  4. package/dist/cjs/banner/components/hero-banner/utils/index.js +5 -3
  5. package/dist/cjs/builder.js +21 -1
  6. package/dist/cjs/carousel/components/Carousel.liquid.js +3 -2
  7. package/dist/cjs/collection/components/CollectionDescription.js +101 -7
  8. package/dist/cjs/collection/components/CollectionDescription.liquid.js +102 -9
  9. package/dist/cjs/collection/setting/CollectionDescription.js +128 -0
  10. package/dist/cjs/form/components/textarea/TextArea.liquid.js +2 -2
  11. package/dist/cjs/image/components/AdaptiveImage.liquid.js +6 -5
  12. package/dist/cjs/image/components/Image.js +0 -1
  13. package/dist/cjs/image/components/Image.liquid.js +6 -5
  14. package/dist/cjs/image/components/NextImage.liquid.js +4 -3
  15. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +7 -3
  16. package/dist/cjs/index.js +20 -0
  17. package/dist/cjs/index.liquid.js +22 -2
  18. package/dist/cjs/marquee/components/MarqueeBase.liquid.js +7 -26
  19. package/dist/cjs/product/components/Product.liquid.js +3 -2
  20. package/dist/cjs/product/components/ProductBadge/index.liquid.js +13 -4
  21. package/dist/cjs/product/components/ProductBadge/utils/generateLiquidContent.js +2 -2
  22. package/dist/cjs/product/components/ProductDescription.liquid.js +21 -5
  23. package/dist/cjs/product/components/ProductImagesV2/jsx/ProductImages.js +2 -9
  24. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +12 -4
  25. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +6 -5
  26. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductGalleryCarousel.liquid.js +2 -2
  27. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductGalleryGrid.liquid.js +4 -4
  28. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductImages.liquid.js +4 -4
  29. package/dist/cjs/product/components/ProductVariants/index.liquid.js +11 -18
  30. package/dist/cjs/product/components/ProductVariants/variants/Base.liquid.js +1 -0
  31. package/dist/cjs/product/components/ProductVariants/variants/Dropdown.liquid.js +26 -12
  32. package/dist/cjs/product/components/ProductVariants/variants/DropdownGroup.liquid.js +4 -37
  33. package/dist/cjs/product/components/ProductVariants/variants/combine/index.js +47 -0
  34. package/dist/cjs/product/components/Sku.js +2 -14
  35. package/dist/cjs/product/setting/ProductBadge.js +5 -0
  36. package/dist/cjs/product/setting/ProductDescription.js +5 -0
  37. package/dist/cjs/tab/hooks/useTabInteraction.js +13 -9
  38. package/dist/cjs/third-party/components/AlsoBoughtCbb.js +32 -0
  39. package/dist/cjs/third-party/components/AlsoBoughtCbb.liquid.js +21 -0
  40. package/dist/cjs/third-party/components/BfSizeChartSizeGuide.js +32 -0
  41. package/dist/cjs/third-party/components/BfSizeChartSizeGuide.liquid.js +12 -0
  42. package/dist/cjs/third-party/components/EssentialAnnouncementBar.js +32 -0
  43. package/dist/cjs/third-party/components/EssentialAnnouncementBar.liquid.js +12 -0
  44. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.js +32 -0
  45. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.liquid.js +12 -0
  46. package/dist/cjs/third-party/components/EstimatedDeliveryDatePlus.js +32 -0
  47. package/dist/cjs/third-party/components/EstimatedDeliveryDatePlus.liquid.js +12 -0
  48. package/dist/cjs/third-party/components/GloColorSwatchvariantImage.js +32 -0
  49. package/dist/cjs/third-party/components/GloColorSwatchvariantImage.liquid.js +12 -0
  50. package/dist/cjs/third-party/components/HextomFreeShippingBar.js +32 -0
  51. package/dist/cjs/third-party/components/HextomFreeShippingBar.liquid.js +12 -0
  52. package/dist/cjs/third-party/components/NotifyBackInStockPreOrder.js +1 -1
  53. package/dist/cjs/third-party/components/OkendoReviewsLoyalty.js +32 -0
  54. package/dist/cjs/third-party/components/OkendoReviewsLoyalty.liquid.js +12 -0
  55. package/dist/cjs/third-party/components/QikifyUpsell.js +22 -10
  56. package/dist/cjs/third-party/components/QikifyUpsell.liquid.js +3 -46
  57. package/dist/cjs/third-party/components/ShopifySubscriptions.liquid.js +3 -2
  58. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.js +32 -0
  59. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.liquid.js +21 -0
  60. package/dist/cjs/third-party/components/TrustedsiteTrustBadges.js +32 -0
  61. package/dist/cjs/third-party/components/TrustedsiteTrustBadges.liquid.js +12 -0
  62. package/dist/cjs/third-party/configs/AlsoBoughtCbb.js +12 -0
  63. package/dist/cjs/third-party/configs/BfSizeChartSizeGuide.js +12 -0
  64. package/dist/cjs/third-party/configs/EssentialAnnouncementBar.js +12 -0
  65. package/dist/cjs/third-party/configs/EssentialCountdownTimerBar.js +12 -0
  66. package/dist/cjs/third-party/configs/EstimatedDeliveryDatePlus.js +12 -0
  67. package/dist/cjs/third-party/configs/GloColorSwatchvariantImage.js +12 -0
  68. package/dist/cjs/third-party/configs/HextomFreeShippingBar.js +12 -0
  69. package/dist/cjs/third-party/configs/OkendoReviewsLoyalty.js +12 -0
  70. package/dist/cjs/third-party/configs/StellarDeliveryDatePickup.js +12 -0
  71. package/dist/cjs/third-party/configs/TrustedsiteTrustBadges.js +12 -0
  72. package/dist/cjs/third-party/helpers/thirdParty.js +1 -1
  73. package/dist/cjs/third-party/next.js +51 -1
  74. package/dist/cjs/third-party/setting/AlsoBoughtCbb.js +127 -0
  75. package/dist/cjs/third-party/setting/BfSizeChartSizeGuide.js +131 -0
  76. package/dist/cjs/third-party/setting/EssentialAnnouncementBar.js +142 -0
  77. package/dist/cjs/third-party/setting/EssentialCountdownTimerBar.js +142 -0
  78. package/dist/cjs/third-party/setting/EstimatedDeliveryDatePlus.js +128 -0
  79. package/dist/cjs/third-party/setting/GloColorSwatchvariantImage.js +152 -0
  80. package/dist/cjs/third-party/setting/HextomFreeShippingBar.js +128 -0
  81. package/dist/cjs/third-party/setting/NotifyBackInStockPreOrder.js +2 -2
  82. package/dist/cjs/third-party/setting/OkendoReviewsLoyalty.js +171 -0
  83. package/dist/cjs/third-party/setting/QikifyUpsell.js +11 -1
  84. package/dist/cjs/third-party/setting/ShopifySubscriptions.js +22 -0
  85. package/dist/cjs/third-party/setting/StellarDeliveryDatePickup.js +127 -0
  86. package/dist/cjs/third-party/setting/TrustedsiteTrustBadges.js +177 -0
  87. package/dist/cjs/third-party/setting/index.js +21 -1
  88. package/dist/cjs/video/components/HTML5Embed.js +2 -2
  89. package/dist/cjs/video/components/HTML5Embed.liquid.js +6 -3
  90. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +5 -3
  91. package/dist/esm/article/components/ArticleImage.js +2 -1
  92. package/dist/esm/article/components/ArticleList.js +1 -1
  93. package/dist/esm/banner/components/hero-banner/index.liquid.js +12 -13
  94. package/dist/esm/banner/components/hero-banner/utils/index.js +5 -3
  95. package/dist/esm/builder.js +21 -1
  96. package/dist/esm/carousel/components/Carousel.liquid.js +3 -2
  97. package/dist/esm/collection/components/CollectionDescription.js +103 -9
  98. package/dist/esm/collection/components/CollectionDescription.liquid.js +103 -10
  99. package/dist/esm/collection/setting/CollectionDescription.js +128 -0
  100. package/dist/esm/form/components/textarea/TextArea.liquid.js +2 -2
  101. package/dist/esm/image/components/AdaptiveImage.liquid.js +6 -5
  102. package/dist/esm/image/components/Image.js +0 -1
  103. package/dist/esm/image/components/Image.liquid.js +6 -5
  104. package/dist/esm/image/components/NextImage.liquid.js +4 -3
  105. package/dist/esm/image-comparison/components/CompareImage.liquid.js +7 -3
  106. package/dist/esm/index.js +10 -0
  107. package/dist/esm/index.liquid.js +11 -1
  108. package/dist/esm/marquee/components/MarqueeBase.liquid.js +7 -26
  109. package/dist/esm/product/components/Product.liquid.js +3 -2
  110. package/dist/esm/product/components/ProductBadge/index.liquid.js +14 -5
  111. package/dist/esm/product/components/ProductBadge/utils/generateLiquidContent.js +2 -2
  112. package/dist/esm/product/components/ProductDescription.liquid.js +22 -6
  113. package/dist/esm/product/components/ProductImagesV2/jsx/ProductImages.js +2 -9
  114. package/dist/esm/product/components/ProductImagesV2/jsx/components/ProductFeaturedImageCarousel.js +13 -5
  115. package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +6 -5
  116. package/dist/esm/product/components/ProductImagesV2/liquid/ProductGalleryCarousel.liquid.js +2 -2
  117. package/dist/esm/product/components/ProductImagesV2/liquid/ProductGalleryGrid.liquid.js +4 -4
  118. package/dist/esm/product/components/ProductImagesV2/liquid/ProductImages.liquid.js +4 -4
  119. package/dist/esm/product/components/ProductVariants/index.liquid.js +12 -19
  120. package/dist/esm/product/components/ProductVariants/variants/Base.liquid.js +1 -0
  121. package/dist/esm/product/components/ProductVariants/variants/Dropdown.liquid.js +26 -12
  122. package/dist/esm/product/components/ProductVariants/variants/DropdownGroup.liquid.js +4 -37
  123. package/dist/esm/product/components/ProductVariants/variants/combine/index.js +44 -0
  124. package/dist/esm/product/components/Sku.js +3 -15
  125. package/dist/esm/product/setting/ProductBadge.js +5 -0
  126. package/dist/esm/product/setting/ProductDescription.js +5 -0
  127. package/dist/esm/tab/hooks/useTabInteraction.js +14 -10
  128. package/dist/esm/third-party/components/AlsoBoughtCbb.js +28 -0
  129. package/dist/esm/third-party/components/AlsoBoughtCbb.liquid.js +17 -0
  130. package/dist/esm/third-party/components/BfSizeChartSizeGuide.js +28 -0
  131. package/dist/esm/third-party/components/BfSizeChartSizeGuide.liquid.js +8 -0
  132. package/dist/esm/third-party/components/EssentialAnnouncementBar.js +28 -0
  133. package/dist/esm/third-party/components/EssentialAnnouncementBar.liquid.js +8 -0
  134. package/dist/esm/third-party/components/EssentialCountdownTimerBar.js +28 -0
  135. package/dist/esm/third-party/components/EssentialCountdownTimerBar.liquid.js +8 -0
  136. package/dist/esm/third-party/components/EstimatedDeliveryDatePlus.js +28 -0
  137. package/dist/esm/third-party/components/EstimatedDeliveryDatePlus.liquid.js +8 -0
  138. package/dist/esm/third-party/components/GloColorSwatchvariantImage.js +28 -0
  139. package/dist/esm/third-party/components/GloColorSwatchvariantImage.liquid.js +8 -0
  140. package/dist/esm/third-party/components/HextomFreeShippingBar.js +28 -0
  141. package/dist/esm/third-party/components/HextomFreeShippingBar.liquid.js +8 -0
  142. package/dist/esm/third-party/components/NotifyBackInStockPreOrder.js +1 -1
  143. package/dist/esm/third-party/components/OkendoReviewsLoyalty.js +28 -0
  144. package/dist/esm/third-party/components/OkendoReviewsLoyalty.liquid.js +8 -0
  145. package/dist/esm/third-party/components/QikifyUpsell.js +22 -10
  146. package/dist/esm/third-party/components/QikifyUpsell.liquid.js +3 -46
  147. package/dist/esm/third-party/components/ShopifySubscriptions.liquid.js +3 -2
  148. package/dist/esm/third-party/components/StellarDeliveryDatePickup.js +28 -0
  149. package/dist/esm/third-party/components/StellarDeliveryDatePickup.liquid.js +17 -0
  150. package/dist/esm/third-party/components/TrustedsiteTrustBadges.js +28 -0
  151. package/dist/esm/third-party/components/TrustedsiteTrustBadges.liquid.js +8 -0
  152. package/dist/esm/third-party/configs/AlsoBoughtCbb.js +8 -0
  153. package/dist/esm/third-party/configs/BfSizeChartSizeGuide.js +8 -0
  154. package/dist/esm/third-party/configs/EssentialAnnouncementBar.js +8 -0
  155. package/dist/esm/third-party/configs/EssentialCountdownTimerBar.js +8 -0
  156. package/dist/esm/third-party/configs/EstimatedDeliveryDatePlus.js +8 -0
  157. package/dist/esm/third-party/configs/GloColorSwatchvariantImage.js +8 -0
  158. package/dist/esm/third-party/configs/HextomFreeShippingBar.js +8 -0
  159. package/dist/esm/third-party/configs/OkendoReviewsLoyalty.js +8 -0
  160. package/dist/esm/third-party/configs/StellarDeliveryDatePickup.js +8 -0
  161. package/dist/esm/third-party/configs/TrustedsiteTrustBadges.js +8 -0
  162. package/dist/esm/third-party/helpers/thirdParty.js +1 -1
  163. package/dist/esm/third-party/next.js +51 -1
  164. package/dist/esm/third-party/setting/AlsoBoughtCbb.js +123 -0
  165. package/dist/esm/third-party/setting/BfSizeChartSizeGuide.js +127 -0
  166. package/dist/esm/third-party/setting/EssentialAnnouncementBar.js +138 -0
  167. package/dist/esm/third-party/setting/EssentialCountdownTimerBar.js +138 -0
  168. package/dist/esm/third-party/setting/EstimatedDeliveryDatePlus.js +124 -0
  169. package/dist/esm/third-party/setting/GloColorSwatchvariantImage.js +148 -0
  170. package/dist/esm/third-party/setting/HextomFreeShippingBar.js +124 -0
  171. package/dist/esm/third-party/setting/NotifyBackInStockPreOrder.js +2 -2
  172. package/dist/esm/third-party/setting/OkendoReviewsLoyalty.js +167 -0
  173. package/dist/esm/third-party/setting/QikifyUpsell.js +11 -1
  174. package/dist/esm/third-party/setting/ShopifySubscriptions.js +22 -0
  175. package/dist/esm/third-party/setting/StellarDeliveryDatePickup.js +123 -0
  176. package/dist/esm/third-party/setting/TrustedsiteTrustBadges.js +173 -0
  177. package/dist/esm/third-party/setting/index.js +224 -204
  178. package/dist/esm/video/components/HTML5Embed.js +2 -2
  179. package/dist/esm/video/components/HTML5Embed.liquid.js +6 -3
  180. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +5 -3
  181. package/dist/types/index.d.ts +257 -36
  182. package/package.json +2 -2
@@ -156,6 +156,7 @@ const BaseVariant = ({ optionTransform, optionTypography, optionBgColor, optionT
156
156
  option-data="{{option.name | escape}}"
157
157
  option-value="{{value | escape}}"
158
158
  option-position="{{option.position}}"
159
+ data-gp-option-available="{{value.available}}"
159
160
  option-type="${type || 'rectangle_list'}"
160
161
  data-disabled="{%- if option_disabled == true -%} disabled {%- endif -%}"
161
162
  data-hidden='true'
@@ -18,6 +18,15 @@ const DropdownVariant = ({ variantGroup, blankText, swatchAutoWidth, swatchHeigh
18
18
  };
19
19
  const appendTypoClass = core.composeTypographyClassName(optionTypo, optionTypography);
20
20
  const appendTypoStyle = core.composeTypographyStyle(optionTypo, optionTypography);
21
+ const composeSelectOptionAttrs = `
22
+ option-data="{{option.name | escape}}"
23
+ option-value="{{value | escape}}"
24
+ data-gp-option-value-id="{{value.id}}"
25
+ data-gp-option-available="{{value.available}}"
26
+ value="{{value | escape}}"
27
+ class="option-value-wrapper"
28
+ key="{{value | escape}}"
29
+ `;
21
30
  return core.template /* liquid */ `
22
31
  <select
23
32
  aria-label={{option.name | escape}}
@@ -73,37 +82,42 @@ const DropdownVariant = ({ variantGroup, blankText, swatchAutoWidth, swatchHeigh
73
82
  -%}
74
83
  ${isSoldOutMark ? `{%- if option_disabled == true -%}
75
84
  {%- if value == selectedValue -%}
76
- <option disabled ${!hasPreSelected ? '' : 'selected'} option-data="{{option.name | escape}}"
85
+ <option disabled ${!hasPreSelected ? '' : 'selected'}
77
86
  option-position="{{option.position}}"
78
- option-value="{{value | escape}}" value="{{value | escape}}" class="option-value-wrapper" key="{{value | escape}}">
87
+ ${composeSelectOptionAttrs}>
79
88
  {{value}}
80
89
  </option>
81
90
  {% else %}
82
- <option disabled option-data="{{option.name | escape}}"
83
- option-value="{{value | escape}}" value="{{value | escape}}" class="option-value-wrapper" key="{{value | escape}}">
91
+ <option
92
+ disabled
93
+ ${composeSelectOptionAttrs}>
84
94
  {{value}}
85
95
  </option>
86
96
  {%- endif -%}
87
97
  {%- else -%}
88
98
  {%- if value == selectedValue -%}
89
- <option ${!hasPreSelected ? '' : 'selected'} option-data="{{option.name | escape}}"
90
- option-value="{{value | escape}}" option-position="{{option.position}}" class="option-value-wrapper" value="{{value | escape}}" key="{{value | escape}}">
99
+ <option ${!hasPreSelected ? '' : 'selected'}
100
+ option-position="{{option.position}}"
101
+ ${composeSelectOptionAttrs}>
91
102
  {{value}}
92
103
  </option>
93
104
  {% else %}
94
- <option option-data="{{option.name | escape}}"
95
- option-value="{{value | escape}}" option-position="{{option.position}}" class="option-value-wrapper" value="{{value | escape}}" key="{{value | escape}}">
105
+ <option
106
+ ${composeSelectOptionAttrs}
107
+ option-position="{{option.position}}">
96
108
  {{value}}
97
109
  </option>
98
110
  {%- endif -%}
99
111
  {%- endif -%}` : `{%- if value == selectedValue -%}
100
- <option ${!hasPreSelected ? '' : 'selected'} option-data="{{option.name | escape}}"
101
- option-value="{{value | escape}}" option-position="{{option.position}}" class="option-value-wrapper" value="{{value | escape}}" key="{{value | escape}}">
112
+ <option ${!hasPreSelected ? '' : 'selected'}
113
+ ${composeSelectOptionAttrs}
114
+ option-position="{{option.position}}">
102
115
  {{value}}
103
116
  </option>
104
117
  {% else %}
105
- <option option-data="{{option.name | escape}}"
106
- option-value="{{value | escape}}" option-position="{{option.position}}" class="option-value-wrapper" value="{{value | escape}}" key="{{value | escape}}">
118
+ <option
119
+ ${composeSelectOptionAttrs}
120
+ option-position="{{option.position}}">
107
121
  {{value}}
108
122
  </option>
109
123
  {%- endif -%}`}
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@gem-sdk/core');
6
- var helpers = require('../../../../helpers.js');
6
+ var index = require('./combine/index.js');
7
7
 
8
- const DropdownVariant = ({ price, blankText, optionTypography, optionBgColor, optionTextColor, optionRounded, optionShadow, optionHasShadow, optionBorder, optionTransform, hasPreSelected, optionTypo, combineWidth, combineHeight, soldOutStyle })=>{
8
+ const DropdownVariant = ({ price: hasPrice, blankText, optionTypography, optionBgColor, optionTextColor, optionRounded, optionShadow, optionHasShadow, optionBorder, optionTransform, hasPreSelected, optionTypo, combineWidth, combineHeight, soldOutStyle })=>{
9
9
  const swatchWidthResponsive = core.makeStyleResponsive('w', core.makeWidth(combineWidth));
10
10
  const getCustomCSSActiveState = ()=>{
11
11
  return core.makeStyle({
@@ -27,7 +27,6 @@ const DropdownVariant = ({ price, blankText, optionTypography, optionBgColor, op
27
27
  option-data="{{option.name}}"
28
28
  option-type="{{optionType}}"
29
29
  class="${core.cls('gp-truncate gp-bg-auto gp-pl-4 gp-pr-6 gp-outline-none dropdown-option-item', core.handleConvertClassColor(optionBorder), appendTypoClass, core.getGlobalColorStateClass('text', optionTextColor), core.getGlobalColorStateClass('bg', optionBgColor), 'gp-outline-none', 'gp-shadow-none')}"
30
-
31
30
  style="${{
32
31
  ...core.getStyleShadowState(optionShadow, 'box-shadow', optionHasShadow),
33
32
  ...getCustomCSSActiveState(),
@@ -49,40 +48,8 @@ const DropdownVariant = ({ price, blankText, optionTypography, optionBgColor, op
49
48
  'background-position': 'right 16px center'
50
49
  }}"
51
50
  >
52
- ${!hasPreSelected ? `<option value="blank" selected>${blankText || helpers.getStaticLocale('ProductVariants', 'please_select')}</option>` : ''}
53
- ${`{%- for variantItem in variants -%}
54
- ${isSoldOutMark ? `{%- if variantItem.available == false -%}
55
- {%- if variantItem.id == variant.id -%}
56
- <option origin-price="{{variantItem.price}}" disabled ${!hasPreSelected ? '' : 'selected'} value="{{variantItem.id}}" key="{{variantItem.id}}">
57
- {{variantItem.title}} ${price ? '- {{variantItem.price | money}}' : ''}
58
- </option>
59
- {% else %}
60
- <option origin-price="{{variantItem.price}}" disabled value="{{variantItem.id}}" key="{{variantItem.id}}">
61
- {{variantItem.title}} ${price ? '- {{variantItem.price | money}}' : ''}
62
- </option>
63
- {%- endif -%}
64
- {%- else -%}
65
- {%- if variantItem.id == variant.id -%}
66
- <option origin-price="{{variantItem.price}}" ${!hasPreSelected ? '' : 'selected'} value="{{variantItem.id}}" key="{{variantItem.id}}">
67
- {{variantItem.title}} ${price ? '- {{variantItem.price | money}}' : ''}
68
- </option>
69
- {% else %}
70
- <option origin-price="{{variantItem.price}}" value="{{variantItem.id}}" key="{{variantItem.id}}">
71
- {{variantItem.title}} ${price ? '- {{variantItem.price | money}}' : ''}
72
- </option>
73
- {%- endif -%}
74
- {%- endif -%}` : `{%- if variantItem.id == variant.id -%}
75
- <option origin-price="{{variantItem.price}}" ${!hasPreSelected ? '' : 'selected'} value="{{variantItem.id}}" key="{{variantItem.id}}">
76
- {{variantItem.title}} ${price ? '- {{variantItem.price | money}}' : ''}
77
- </option>
78
- {% else %}
79
- <option origin-price="{{variantItem.price}}" value="{{variantItem.id}}" key="{{variantItem.id}}">
80
- {{variantItem.title}} ${price ? '- {{variantItem.price | money}}' : ''}
81
- </option>
82
- {%- endif -%}`}
83
-
84
- {%- endfor -%}
85
- `}
51
+ ${index.renderBlankOption(hasPreSelected, blankText)}
52
+ ${index.renderCombineVariants(isSoldOutMark, hasPreSelected, hasPrice)}
86
53
  </select>
87
54
  `;
88
55
  };
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ var helpers = require('../../../../../helpers.js');
4
+
5
+ const renderCombineVariants = (isSoldOutMark, hasPreSelected, enablePrice)=>{
6
+ const hasPrice = enablePrice ? '- {{variantItem.price | money}}' : '';
7
+ const optionAttrs = 'origin-price="{{variantItem.price}}" value="{{variantItem.id}}" key="{{variantItem.id}}"';
8
+ return `${`{%- for variantItem in variants -%}
9
+ ${isSoldOutMark ? `{%- if variantItem.available == false -%}
10
+ {%- if variantItem.id == variant.id -%}
11
+ <option origin-price="{{variantItem.price}}" disabled ${hasPreSelected ? 'selected' : ''} value="{{variantItem.id}}" key="{{variantItem.id}}">
12
+ {{variantItem.title}} ${hasPrice} : ''}
13
+ </option>
14
+ {% else %}
15
+ <option ${optionAttrs} disabled>
16
+ {{variantItem.title}} ${hasPrice}
17
+ </option>
18
+ {%- endif -%}
19
+ {%- else -%}
20
+ {%- if variantItem.id == variant.id -%}
21
+ <option origin-price="{{variantItem.price}}" ${hasPreSelected ? 'selected' : ''} value="{{variantItem.id}}" key="{{variantItem.id}}">
22
+ {{variantItem.title}} ${hasPrice}
23
+ </option>
24
+ {% else %}
25
+ <option ${optionAttrs}>
26
+ {{variantItem.title}} ${hasPrice}
27
+ </option>
28
+ {%- endif -%}
29
+ {%- endif -%}` : `{%- if variantItem.id == variant.id -%}
30
+ <option origin-price="{{variantItem.price}}" ${hasPreSelected ? 'selected' : ''} value="{{variantItem.id}}" key="{{variantItem.id}}">
31
+ {{variantItem.title}} ${hasPrice}
32
+ </option>
33
+ {% else %}
34
+ <option ${optionAttrs}>
35
+ {{variantItem.title}} ${hasPrice}
36
+ </option>
37
+ {%- endif -%}`}
38
+
39
+ {%- endfor -%}
40
+ `}`;
41
+ };
42
+ const renderBlankOption = (hasPreSelected, blankText)=>{
43
+ return !hasPreSelected ? `<option value="blank" selected>${blankText || helpers.getStaticLocale('ProductVariants', 'please_select')}</option>` : '';
44
+ };
45
+
46
+ exports.renderBlankOption = renderBlankOption;
47
+ exports.renderCombineVariants = renderCombineVariants;
@@ -5,23 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var core = require('@gem-sdk/core');
7
7
  var Text = require('../../text/components/Text.js');
8
- var product = require('../helpers/product.js');
9
8
 
10
9
  const ProductSku = ({ setting, builderProps, styles })=>{
11
10
  const currentVariant = core.useCurrentVariant();
12
- const product$1 = core.useProduct();
13
- const isDefaultVariant = product.checkDefaultVariant(product$1);
14
- const textContent = setting?.label && setting.label.trim().length ? `${setting.label}: ${currentVariant?.sku || ''}` : `${currentVariant?.sku || ''}`;
15
- if (isDefaultVariant) {
16
- return /*#__PURE__*/ jsxRuntime.jsx("div", {
17
- "data-id": builderProps?.uid,
18
- children: /*#__PURE__*/ jsxRuntime.jsx("p", {
19
- className: "gp-p-2 gp-text-center gp-text-sm gp-font-semibold gp-text-gray-500",
20
- children: "This product does not have a SKU"
21
- })
22
- });
23
- }
24
- if (!isDefaultVariant && !currentVariant?.sku) {
11
+ const textContent = setting?.label?.trim()?.length ? `${setting.label}: ${currentVariant?.sku ?? ''}` : `${currentVariant?.sku ?? ''}`;
12
+ if (!currentVariant?.sku) {
25
13
  return /*#__PURE__*/ jsxRuntime.jsx("div", {
26
14
  "data-id": builderProps?.uid,
27
15
  children: /*#__PURE__*/ jsxRuntime.jsx("p", {
@@ -85,6 +85,11 @@ const config = {
85
85
  }
86
86
  ]
87
87
  },
88
+ {
89
+ id: 'translate',
90
+ type: 'input',
91
+ default: 'displayContent'
92
+ },
88
93
  {
89
94
  id: 'shape',
90
95
  label: 'Shape',
@@ -68,6 +68,11 @@ const config = {
68
68
  default: 'Show less',
69
69
  hide: true
70
70
  },
71
+ {
72
+ id: 'translate',
73
+ type: 'input',
74
+ default: 'viewMoreText,viewLessText'
75
+ },
71
76
  {
72
77
  id: 'enableViewMoreIcon',
73
78
  label: 'Enable Icon',
@@ -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?.();
@@ -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;
@@ -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 EssentialCountdownTimerBar = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
10
+ };
11
+
12
+ exports.default = EssentialCountdownTimerBar;
@@ -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 EstimatedDeliveryDatePlus$1 = require('../configs/EstimatedDeliveryDatePlus.js');
9
+
10
+ const EstimatedDeliveryDatePlusContent = ()=>{
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: 'Estimated Delivery Date ‑ Plus',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${EstimatedDeliveryDatePlus$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const EstimatedDeliveryDatePlus = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(EstimatedDeliveryDatePlusContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = EstimatedDeliveryDatePlus;
@@ -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 EstimatedDeliveryDatePlus = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
10
+ };
11
+
12
+ exports.default = EstimatedDeliveryDatePlus;
@@ -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 GloColorSwatchvariantImage$1 = require('../configs/GloColorSwatchvariantImage.js');
9
+
10
+ const GloColorSwatchvariantImageContent = ()=>{
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: 'GLO Color Swatch,Variant Image',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${GloColorSwatchvariantImage$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const GloColorSwatchvariantImage = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(GloColorSwatchvariantImageContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = GloColorSwatchvariantImage;
@@ -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 GloColorSwatchvariantImage = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
10
+ };
11
+
12
+ exports.default = GloColorSwatchvariantImage;
@@ -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 HextomFreeShippingBar$1 = require('../configs/HextomFreeShippingBar.js');
9
+
10
+ const HextomFreeShippingBarContent = ()=>{
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: 'Hextom: Free Shipping Bar',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${HextomFreeShippingBar$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const HextomFreeShippingBar = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(HextomFreeShippingBarContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = HextomFreeShippingBar;
@@ -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 HextomFreeShippingBar = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
10
+ };
11
+
12
+ exports.default = HextomFreeShippingBar;
@@ -9,7 +9,7 @@ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
9
9
  const AppConfig = {
10
10
  id: 'notify-back-in-stockpreorder',
11
11
  label: 'Notify! Back in Stock|PreOrder',
12
- logoUrl: 'https://cdn.shopify.com/app-store/listing_images/9216cd5dd17ab1a38de2641bae109159/icon/CNWHjbfSt4MDEAE=.png',
12
+ logoUrl: 'https://cdn.shopify.com/s/files/1/0643/0497/1949/files/Notify_Me_Logo.png?v=1736234550',
13
13
  tag: 'NotifyBackInStockPreOrder'
14
14
  };
15
15
  const NotifyBackInStockPreOrderContent = ()=>{