@gem-sdk/components 2.1.43 → 2.2.0-staging.29

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 (98) hide show
  1. package/dist/cjs/article/components/ArticleImage.js +2 -1
  2. package/dist/cjs/banner/components/hero-banner/index.liquid.js +4 -7
  3. package/dist/cjs/builder.js +4 -0
  4. package/dist/cjs/button/components/Button.liquid.js +3 -3
  5. package/dist/cjs/carousel/components/Carousel.liquid.js +3 -2
  6. package/dist/cjs/carousel/components/plugins/AutoPlayPlugin.js +17 -58
  7. package/dist/cjs/common/const.js +1 -1
  8. package/dist/cjs/helpers.js +6 -1
  9. package/dist/cjs/image/components/AdaptiveImage.js +13 -16
  10. package/dist/cjs/image/components/AdaptiveImage.liquid.js +6 -5
  11. package/dist/cjs/image/components/Image.js +2 -1
  12. package/dist/cjs/image/components/Image.liquid.js +6 -4
  13. package/dist/cjs/image/components/NextImage.liquid.js +4 -3
  14. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +7 -3
  15. package/dist/cjs/index.js +4 -0
  16. package/dist/cjs/index.liquid.js +4 -0
  17. package/dist/cjs/marquee/components/Marquee.liquid.js +10 -13
  18. package/dist/cjs/post-purchase/product/components/variants/Dropdown.js +1 -1
  19. package/dist/cjs/product/components/ProductButton.js +1 -1
  20. package/dist/cjs/product/components/ProductButton.liquid.js +21 -3
  21. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +6 -5
  22. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductGalleryCarousel.liquid.js +2 -2
  23. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductGalleryGrid.liquid.js +4 -4
  24. package/dist/cjs/product/components/ProductImagesV2/liquid/ProductImages.liquid.js +4 -4
  25. package/dist/cjs/product/components/ProductVariants/variants/combine/index.js +1 -1
  26. package/dist/cjs/product/setting/ProductList.js +1 -1
  27. package/dist/cjs/tab/hooks/useTabInteraction.js +13 -9
  28. package/dist/cjs/text/components/Text.js +0 -1
  29. package/dist/cjs/third-party/components/AppstleBundlesDiscounts.js +32 -0
  30. package/dist/cjs/third-party/components/AppstleBundlesDiscounts.liquid.js +12 -0
  31. package/dist/cjs/third-party/components/Bogos/BogosSampleContent.js +9 -10
  32. package/dist/cjs/third-party/components/EcomsendBackInStockAlert.js +32 -0
  33. package/dist/cjs/third-party/components/EcomsendBackInStockAlert.liquid.js +21 -0
  34. package/dist/cjs/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  35. package/dist/cjs/third-party/components/Releasit.liquid.js +4 -2
  36. package/dist/cjs/third-party/configs/AppstleBundlesDiscounts.js +12 -0
  37. package/dist/cjs/third-party/configs/BoldProductOptions.js +2 -2
  38. package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +1 -1
  39. package/dist/cjs/third-party/configs/EcomsendBackInStockAlert.js +12 -0
  40. package/dist/cjs/third-party/next.js +10 -0
  41. package/dist/cjs/third-party/setting/AppstleBundlesDiscounts.js +146 -0
  42. package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +2 -2
  43. package/dist/cjs/third-party/setting/EcomsendBackInStockAlert.js +128 -0
  44. package/dist/cjs/third-party/setting/Releasit.js +59 -2
  45. package/dist/cjs/third-party/setting/index.js +5 -1
  46. package/dist/cjs/video/components/HTML5Embed.js +2 -2
  47. package/dist/cjs/video/components/HTML5Embed.liquid.js +6 -3
  48. package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +5 -3
  49. package/dist/esm/article/components/ArticleImage.js +2 -1
  50. package/dist/esm/banner/components/hero-banner/index.liquid.js +4 -7
  51. package/dist/esm/builder.js +4 -0
  52. package/dist/esm/button/components/Button.liquid.js +3 -3
  53. package/dist/esm/carousel/components/Carousel.liquid.js +3 -2
  54. package/dist/esm/carousel/components/plugins/AutoPlayPlugin.js +17 -58
  55. package/dist/esm/common/const.js +1 -1
  56. package/dist/esm/helpers.js +6 -1
  57. package/dist/esm/image/components/AdaptiveImage.js +13 -16
  58. package/dist/esm/image/components/AdaptiveImage.liquid.js +6 -5
  59. package/dist/esm/image/components/Image.js +3 -2
  60. package/dist/esm/image/components/Image.liquid.js +6 -4
  61. package/dist/esm/image/components/NextImage.liquid.js +4 -3
  62. package/dist/esm/image-comparison/components/CompareImage.liquid.js +7 -3
  63. package/dist/esm/index.js +2 -0
  64. package/dist/esm/index.liquid.js +2 -0
  65. package/dist/esm/marquee/components/Marquee.liquid.js +10 -13
  66. package/dist/esm/post-purchase/product/components/variants/Dropdown.js +1 -1
  67. package/dist/esm/product/components/ProductButton.js +1 -1
  68. package/dist/esm/product/components/ProductButton.liquid.js +21 -3
  69. package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +6 -5
  70. package/dist/esm/product/components/ProductImagesV2/liquid/ProductGalleryCarousel.liquid.js +2 -2
  71. package/dist/esm/product/components/ProductImagesV2/liquid/ProductGalleryGrid.liquid.js +4 -4
  72. package/dist/esm/product/components/ProductImagesV2/liquid/ProductImages.liquid.js +4 -4
  73. package/dist/esm/product/components/ProductVariants/variants/combine/index.js +1 -1
  74. package/dist/esm/product/setting/ProductList.js +1 -1
  75. package/dist/esm/tab/hooks/useTabInteraction.js +14 -10
  76. package/dist/esm/text/components/Text.js +0 -1
  77. package/dist/esm/third-party/components/AppstleBundlesDiscounts.js +28 -0
  78. package/dist/esm/third-party/components/AppstleBundlesDiscounts.liquid.js +8 -0
  79. package/dist/esm/third-party/components/Bogos/BogosSampleContent.js +10 -11
  80. package/dist/esm/third-party/components/EcomsendBackInStockAlert.js +28 -0
  81. package/dist/esm/third-party/components/EcomsendBackInStockAlert.liquid.js +17 -0
  82. package/dist/esm/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  83. package/dist/esm/third-party/components/Releasit.liquid.js +4 -2
  84. package/dist/esm/third-party/configs/AppstleBundlesDiscounts.js +8 -0
  85. package/dist/esm/third-party/configs/BoldProductOptions.js +2 -2
  86. package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +1 -1
  87. package/dist/esm/third-party/configs/EcomsendBackInStockAlert.js +8 -0
  88. package/dist/esm/third-party/next.js +10 -0
  89. package/dist/esm/third-party/setting/AppstleBundlesDiscounts.js +142 -0
  90. package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +2 -2
  91. package/dist/esm/third-party/setting/EcomsendBackInStockAlert.js +124 -0
  92. package/dist/esm/third-party/setting/Releasit.js +59 -2
  93. package/dist/esm/third-party/setting/index.js +5 -1
  94. package/dist/esm/video/components/HTML5Embed.js +2 -2
  95. package/dist/esm/video/components/HTML5Embed.liquid.js +6 -3
  96. package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +5 -3
  97. package/dist/types/index.d.ts +54 -8
  98. package/package.json +3 -3
@@ -2,7 +2,7 @@ import { template, cls, RenderIf, makeStyleResponsive } from '@gem-sdk/core';
2
2
  import { getImageSrc } from '../helpers/getSrcSet.js';
3
3
  import { createBlurDataURL } from './helpers.js';
4
4
 
5
- const AdaptiveImage = ({ srcSet, priority, alt, aspectRatio, layout, className, pictureClass, style, imagePlaceholder, enableLazyloadImage = true, ...props })=>{
5
+ const AdaptiveImage = ({ srcSet, priority, alt, aspectRatio, layout, className, pictureClass, style, imagePlaceholder, enableLazyLoadImage = true, pageContext, ...props })=>{
6
6
  const fallBackImage = 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif';
7
7
  const srcDesktop = getImageSrc(srcSet?.desktop, 'desktop') || fallBackImage;
8
8
  const srcTablet = (getImageSrc(srcSet?.tablet, 'tablet') ?? getImageSrc(srcSet?.desktop, 'tablet')) || fallBackImage;
@@ -27,16 +27,17 @@ const AdaptiveImage = ({ srcSet, priority, alt, aspectRatio, layout, className,
27
27
  }}"
28
28
  />
29
29
  `, template`
30
- ${srcMobile ? `<source media="(max-width: 767px)" data-srcSet="${srcMobile}" srcset="${enableLazyloadImage ? imagePlaceholder?.['mobile'] ?? createBlurDataURL(srcSet?.mobile?.width ?? srcSet?.tablet?.width ?? srcSet?.desktop?.width ?? 0, srcSet?.mobile?.height ?? srcSet?.tablet?.height ?? srcSet?.desktop?.height ?? 0) : srcMobile}" />` : ''}
31
- ${srcTablet ? `<source media="(max-width: 1024px)" data-srcSet="${srcTablet}" srcset="${enableLazyloadImage ? imagePlaceholder?.['tablet'] ?? createBlurDataURL(srcSet?.tablet?.width ?? srcSet?.desktop?.width ?? 0, srcSet?.tablet?.height ?? srcSet?.desktop?.height ?? 0) : srcTablet}" />` : ''}
30
+ ${srcMobile ? `<source media="(max-width: 767px)" data-srcSet="${srcMobile}" srcset="${enableLazyLoadImage ? imagePlaceholder?.['mobile'] ?? createBlurDataURL(srcSet?.mobile?.width ?? srcSet?.tablet?.width ?? srcSet?.desktop?.width ?? 0, srcSet?.mobile?.height ?? srcSet?.tablet?.height ?? srcSet?.desktop?.height ?? 0) : srcMobile}" />` : ''}
31
+ ${srcTablet ? `<source media="(max-width: 1024px)" data-srcSet="${srcTablet}" srcset="${enableLazyLoadImage ? imagePlaceholder?.['tablet'] ?? createBlurDataURL(srcSet?.tablet?.width ?? srcSet?.desktop?.width ?? 0, srcSet?.tablet?.height ?? srcSet?.desktop?.height ?? 0) : srcTablet}" />` : ''}
32
32
  <img
33
33
  ${{
34
34
  ...props
35
35
  }}
36
36
  class="${cls(className, {
37
- gp_lazyload: enableLazyloadImage
37
+ gp_lazyload: enableLazyLoadImage,
38
+ gp_force_load: pageContext?.isOptimizePlan
38
39
  })}"
39
- src="${enableLazyloadImage ? imagePlaceholder?.['desktop'] ?? createBlurDataURL(srcSet?.desktop?.width ?? 0, srcSet?.desktop?.height ?? 0) : srcDesktop}"
40
+ src="${enableLazyLoadImage ? imagePlaceholder?.['desktop'] ?? createBlurDataURL(srcSet?.desktop?.width ?? 0, srcSet?.desktop?.height ?? 0) : srcDesktop}"
40
41
  data-src="${srcDesktop}"
41
42
  width="100%"
42
43
  alt="${alt}"
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { makeStyleResponsive, getWidthByShapeGlobalSize, makeWidth, getHeightByShapeGlobalSize, cls, getStyleShadowState, handleConvertClassColor, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getAspectRatioGlobalSize, getGlobalColorStateClass, getGlobalColorStateStyle, makeStyleState, getCornerCSSFromGlobal } from '@gem-sdk/core';
2
+ import { useCurrentDevice, makeStyleResponsive, getWidthByShapeGlobalSize, makeWidth, getHeightByShapeGlobalSize, cls, getStyleShadowState, handleConvertClassColor, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getAspectRatioGlobalSize, getGlobalColorStateClass, getGlobalColorStateStyle, makeStyleState, getCornerCSSFromGlobal } from '@gem-sdk/core';
3
3
  import Link from '../../link/components/Link.js';
4
4
  import AdaptiveImage from './AdaptiveImage.js';
5
5
  import NextImage from './NextImage.js';
@@ -8,6 +8,7 @@ import { composeAspectRatio } from './helpers.js';
8
8
  const Image = ({ styles, className, setting, builderAttrs, builderProps, style, children, onClick, onLoad })=>{
9
9
  const { image, imageLink, srcSet, isNotLazyload } = setting ?? {};
10
10
  const { customAspectRadio } = styles ?? {};
11
+ useCurrentDevice();
11
12
  const { shape } = styles ?? {};
12
13
  const WrapLink = imageLink?.link ? Link : 'div';
13
14
  const opacity = {
@@ -82,7 +83,7 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
82
83
  setting?.isAdaptive ? /*#__PURE__*/ jsx(AdaptiveImage, {
83
84
  srcSet: setting.srcSet,
84
85
  pictureClass: "gp-contents",
85
- className: cls(className, 'gp-w-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
86
+ className: cls(className, 'gp-inline-block gp-w-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
86
87
  alt: setting.alt,
87
88
  style: {
88
89
  ...imageWidth,
@@ -3,7 +3,7 @@ import AdaptiveImage from './AdaptiveImage.liquid.js';
3
3
  import NextImage from './NextImage.liquid.js';
4
4
  import { getInsertLinkData } from '../../helpers.js';
5
5
 
6
- const Image = ({ styles, className, setting, builderAttrs, builderProps, style, advanced, enableLazyloadImage = true })=>{
6
+ const Image = ({ styles, className, setting, builderAttrs, builderProps, style, advanced, enableLazyLoadImage = true, pageContext })=>{
7
7
  const { imageLink, isNotLazyload } = setting ?? {};
8
8
  const { shape } = styles ?? {};
9
9
  const { Wrap: WrapLink, urlData } = getInsertLinkData('div', imageLink);
@@ -30,7 +30,7 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
30
30
  }}
31
31
  data-id="${builderProps?.uid}"
32
32
  role="presentation"
33
- class="${cls('gp-group/image', builderProps?.uid, advanced?.cssClass)}"
33
+ class="${cls('gp-group/image', builderProps?.uid, advanced?.cssClass, `force-publish-${new Date().getTime()}`)}"
34
34
  style="${{
35
35
  ...style,
36
36
  ...makeStyleResponsive('ta', styles?.align)
@@ -72,7 +72,8 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
72
72
  aspectRatio: getAspectRatioGlobalSize(styles?.shape),
73
73
  layout: styles?.objectFit,
74
74
  priority: setting?.priority,
75
- enableLazyloadImage
75
+ enableLazyLoadImage,
76
+ pageContext
76
77
  }) : NextImage({
77
78
  ...setting?.image,
78
79
  priority: setting?.priority,
@@ -101,7 +102,8 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
101
102
  layout: styles?.objectFit
102
103
  },
103
104
  isNotLazyload,
104
- enableLazyloadImage
105
+ enableLazyLoadImage,
106
+ pageContext
105
107
  })}
106
108
  </${WrapLink}>
107
109
  </div>`;
@@ -3,7 +3,7 @@ import { getNewBackupFileKey, getImageSrc, getSrcSet } from '../helpers/getSrcSe
3
3
  import { DEVICES } from '../../product/components/ProductVariants/index.js';
4
4
  import { createBlurDataURL } from './helpers.js';
5
5
 
6
- const NextImage = ({ setting, src = 'https://ucarecdn.com/465c7cbb-f087-4d1d-8f08-f6665179f02f/-/format/auto/-/quality/lighter/placeholder-1.png', srcIsLiquidCode, alt = 'Alt image', width = 2237, height = 1678, backupFileKey, backupFilePath, storage, style, priority, vw, className, base64, baseSrc, isDisableAspectStyle, isDisableObjectFit, customAttrs, customLazyload, isNotLazyload, enableLazyloadImage = true, srcset, sizes, ...props })=>{
6
+ const NextImage = ({ setting, src = 'https://ucarecdn.com/465c7cbb-f087-4d1d-8f08-f6665179f02f/-/format/auto/-/quality/lighter/placeholder-1.png', srcIsLiquidCode, alt = 'Alt image', width = 2237, height = 1678, backupFileKey, backupFilePath, storage, style, priority, vw, className, base64, baseSrc, isDisableAspectStyle, isDisableObjectFit, customAttrs, customLazyload, isNotLazyload, enableLazyLoadImage = true, pageContext, srcset, sizes, ...props })=>{
7
7
  const { aspectRatio, layout, qualityPercent, qualityType } = setting ?? {};
8
8
  const newBackupFilekey = backupFileKey ? getNewBackupFileKey(backupFileKey ?? '', src) : '';
9
9
  const srcImage = srcIsLiquidCode ? baseSrc : getImageSrc({
@@ -93,12 +93,13 @@ const NextImage = ({ setting, src = 'https://ucarecdn.com/465c7cbb-f087-4d1d-8f0
93
93
  ${customAttrs}
94
94
  draggable="false"
95
95
  class="${cls(className, {
96
- gp_lazyload: !customLazyload && enableLazyloadImage
96
+ gp_lazyload: !customLazyload && enableLazyLoadImage,
97
+ gp_force_load: pageContext?.isOptimizePlan
97
98
  })}"
98
99
  ${{
99
100
  'data-src': srcImage,
100
101
  'data-srcset': srcSetImg,
101
- src: enableLazyloadImage ? imagePlaceholder : srcImage,
102
+ src: enableLazyLoadImage ? imagePlaceholder : srcImage,
102
103
  width,
103
104
  height,
104
105
  alt,
@@ -7,7 +7,7 @@ import { getSettingPreloadData } from '../../helpers.js';
7
7
  import { styleLazyPlaceholder } from './common/helpers.js';
8
8
 
9
9
  const CompareImage = (props)=>{
10
- const { handle = null, handleSize = 40, hover = false, leftImage, leftImageAlt = '', leftImageTitle = '', leftImageCss = {}, leftImageLabel = null, onSliderPositionChange, rightImage, rightImageAlt = '', rightImageTitle = '', rightImageCss = {}, rightImageLabel = null, sliderLineColor = '#ffffff', sliderLineWidth = 2, sliderPositionPercentage = 0.5, vertical = false, enableLabel = false, componentUid = '', styles, advanced, builderData, preload = false, pageContext, translate } = props;
10
+ const { handle = null, handleSize = 40, hover = false, leftImage, leftImageAlt = '', leftImageTitle = '', leftImageCss = {}, leftImageLabel = null, onSliderPositionChange, rightImage, rightImageAlt = '', rightImageTitle = '', rightImageCss = {}, rightImageLabel = null, sliderLineColor = '#ffffff', sliderLineWidth = 2, sliderPositionPercentage = 0.5, vertical = false, enableLabel = false, componentUid = '', styles, advanced, builderData, preload = false, enableLazyLoadImage, pageContext, translate } = props;
11
11
  const horizontal = !vertical;
12
12
  const leftRatio = (leftImage?.width ?? 0) / (leftImage?.height ?? 1);
13
13
  const rightRatio = (rightImage?.width ?? 0) / (rightImage?.height ?? 1);
@@ -267,7 +267,9 @@ const CompareImage = (props)=>{
267
267
  style: {
268
268
  ...initStyles.rightImage,
269
269
  ...makeStyleResponsive('objf', styles?.imageScale)
270
- }
270
+ },
271
+ enableLazyLoadImage,
272
+ pageContext
271
273
  })}
272
274
  ${NextImage({
273
275
  customAttrs: {
@@ -283,7 +285,9 @@ const CompareImage = (props)=>{
283
285
  style: {
284
286
  ...initStyles.rightImage,
285
287
  ...makeStyleResponsive('objf', styles?.imageScale)
286
- }
288
+ },
289
+ enableLazyLoadImage,
290
+ pageContext
287
291
  })}
288
292
  <div id="image-comparison-slider-${componentUid}" style="${{
289
293
  ...initStyles.slider
package/dist/esm/index.js CHANGED
@@ -218,6 +218,8 @@ export { default as BfSizeChartSizeGuide } from './third-party/components/BfSize
218
218
  export { default as AlsoBoughtCbb } from './third-party/components/AlsoBoughtCbb.js';
219
219
  export { default as HextomFreeShippingBar } from './third-party/components/HextomFreeShippingBar.js';
220
220
  export { default as EcoboostifyShoppableReelUgc } from './third-party/components/EcoboostifyShoppableReelUgc.js';
221
+ export { default as EcomsendBackInStockAlert } from './third-party/components/EcomsendBackInStockAlert.js';
222
+ export { default as AppstleBundlesDiscounts } from './third-party/components/AppstleBundlesDiscounts.js';
221
223
  export { default as thirdPartyInstantSetting } from './third-party-instant/setting/index.js';
222
224
  export { default as InstantJudgemeReviews } from './third-party-instant/components/InstantJudgemeReviews.js';
223
225
  export { default as InstantLooxReviews } from './third-party-instant/components/InstantLooxReviews.js';
@@ -173,6 +173,8 @@ export { default as BfSizeChartSizeGuide } from './third-party/components/BfSize
173
173
  export { default as AlsoBoughtCbb } from './third-party/components/AlsoBoughtCbb.liquid.js';
174
174
  export { default as HextomFreeShippingBar } from './third-party/components/HextomFreeShippingBar.liquid.js';
175
175
  export { default as EcoboostifyShoppableReelUgc } from './third-party/components/EcoboostifyShoppableReelUgc.liquid.js';
176
+ export { default as EcomsendBackInStockAlert } from './third-party/components/EcomsendBackInStockAlert.liquid.js';
177
+ export { default as AppstleBundlesDiscounts } from './third-party/components/AppstleBundlesDiscounts.liquid.js';
176
178
  export { default as ImageComparison } from './image-comparison/components/ImageComparison.liquid.js';
177
179
  export { default as ThirdPartySlot } from './third-party-slot/components/ThirdPartySlot.liquid.js';
178
180
  export { default as Sticky } from './sticky/components/Sticky.liquid.js';
@@ -69,7 +69,7 @@ const Marquee = ({ children, style, builderAttrs, rawChildren, advanced, ...prop
69
69
  const itemMaxWidthValue = getResponsiveValueByScreen(styles?.itemMaxWidth, currentDevice);
70
70
  return itemMaxWidthValue?.includes('%');
71
71
  };
72
- const getItemMaxWidthValueByScreen = (device)=>{
72
+ const itemMaxWidthValueByScreen = (device)=>{
73
73
  let value = getResponsiveValueByScreen(styles?.itemMaxWidth, device);
74
74
  const itemWidthTypeValue = getResponsiveValueByScreen(itemWidthType, device);
75
75
  if (itemWidthTypeValue === 'FIT_CONTENT') {
@@ -80,25 +80,22 @@ const Marquee = ({ children, style, builderAttrs, rawChildren, advanced, ...prop
80
80
  }
81
81
  return value;
82
82
  };
83
- const getMaxWidth = (device)=>{
84
- return getItemMaxWidthValueByScreen(device) === 'auto' ? 'unset' : getItemMaxWidthValueByScreen(device);
85
- };
86
83
  const getWidthForWrapperItem = ()=>{
87
84
  return {
88
85
  ...makeStyleResponsive('w', {
89
- desktop: getItemMaxWidthValueByScreen('desktop'),
90
- tablet: getItemMaxWidthValueByScreen('tablet'),
91
- mobile: getItemMaxWidthValueByScreen('mobile')
86
+ desktop: itemMaxWidthValueByScreen('desktop'),
87
+ tablet: itemMaxWidthValueByScreen('tablet'),
88
+ mobile: itemMaxWidthValueByScreen('mobile')
92
89
  }),
93
90
  ...makeStyleResponsive('minw', {
94
- desktop: getItemMaxWidthValueByScreen('desktop'),
95
- tablet: getItemMaxWidthValueByScreen('tablet'),
96
- mobile: getItemMaxWidthValueByScreen('mobile')
91
+ desktop: itemMaxWidthValueByScreen('desktop'),
92
+ tablet: itemMaxWidthValueByScreen('tablet'),
93
+ mobile: itemMaxWidthValueByScreen('mobile')
97
94
  }),
98
95
  ...makeStyleResponsive('maxw', {
99
- desktop: getMaxWidth('desktop'),
100
- tablet: getMaxWidth('tablet'),
101
- mobile: getMaxWidth('mobile')
96
+ desktop: itemMaxWidthValueByScreen('desktop'),
97
+ tablet: itemMaxWidthValueByScreen('tablet'),
98
+ mobile: itemMaxWidthValueByScreen('mobile')
102
99
  })
103
100
  };
104
101
  };
@@ -65,7 +65,7 @@ const DropdownVariant = ({ option, optionPosition, optionNumber, variantGroup, v
65
65
  children: /*#__PURE__*/ jsx("span", {
66
66
  className: "gp-max-w-full",
67
67
  children: /*#__PURE__*/ jsx("span", {
68
- className: "gp-block gp-overflow-hidden",
68
+ className: "gp-block gp-overflow-hidden gp-truncate",
69
69
  children: label
70
70
  })
71
71
  })
@@ -214,7 +214,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
214
214
  ]);
215
215
  const isInStock = useCurrentVariantInStock();
216
216
  const isDisable = !isInStock || createCartLoading || addToCartLoading;
217
- const label = !isInStock ? setting?.outOfStockLabel : setting?.label;
217
+ const label = !isInStock ? !currentVariant ? 'Unavailable' : setting?.outOfStockLabel : setting?.label;
218
218
  if (!isInStock && isCustomOutOfStock) {
219
219
  buttonStyles.backgroundColor = {
220
220
  normal: oosBackground
@@ -184,6 +184,22 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
184
184
  pageContext,
185
185
  translate: setting?.translate
186
186
  });
187
+ const labelUnavailableTranslate = getDynamicSourceLocales({
188
+ val: 'Unavailable',
189
+ uid: builderProps?.uid,
190
+ settingId: 'unavailableLabel',
191
+ isLiquid: true,
192
+ pageContext,
193
+ translate: setting?.translate ? 'unavailableLabel' : undefined
194
+ });
195
+ const labelOutOfStockTranslate = getDynamicSourceLocales({
196
+ val: setting?.outOfStockLabel,
197
+ uid: builderProps?.uid,
198
+ settingId: 'outOfStockLabel',
199
+ isLiquid: true,
200
+ pageContext,
201
+ translate: setting?.translate ? 'outOfStockLabel' : undefined
202
+ });
187
203
  return template /* liquid */ `
188
204
  {%- liquid
189
205
  assign inventory_quantity = variant.inventory_quantity | default: 0
@@ -191,6 +207,8 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
191
207
  <gp-product-button
192
208
  class="gp-product-button"
193
209
  gp-data-wrapper="true"
210
+ label-out-of-Stock="${pageContext?.isPreviewing ? labelOutOfStockTranslate : `{{${labelOutOfStockTranslate}}}`}"
211
+ label-unavailable="${pageContext?.isPreviewing ? labelUnavailableTranslate : `{{${labelUnavailableTranslate}}}`}"
194
212
  gp-data='${JSON.stringify({
195
213
  setting: {
196
214
  actionEffect: setting?.actionEffect,
@@ -268,8 +286,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
268
286
  'gp-data-hidden': `{% if variant.available %}true{% endif %}`
269
287
  },
270
288
  setting: {
271
- label: setting?.outOfStockLabel,
272
- translate: setting?.translate ? 'outOfStockLabel' : undefined,
289
+ label: `${pageContext?.isPreviewing ? labelOutOfStockTranslate : `{{${labelOutOfStockTranslate}}}`}`,
273
290
  htmlType: 'button',
274
291
  iconAlign: iconAlign,
275
292
  iconSvg: iconSvg,
@@ -288,7 +305,8 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
288
305
  }
289
306
  },
290
307
  pageContext,
291
- nodePrice: composeNodePrice()
308
+ nodePrice: composeNodePrice(),
309
+ isForceValue: true
292
310
  })}
293
311
  </gp-product-button>
294
312
  ${RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-button.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-product-button.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
@@ -9,7 +9,7 @@ import NextImage from '../../../../image/components/NextImage.liquid.js';
9
9
  import Video from '../../../../image/components/Video.liquid.js';
10
10
  import { getStyleOfObject } from '../../../helpers/function.js';
11
11
 
12
- const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyloadImage, ...setting })=>{
12
+ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyLoadImage, ...setting })=>{
13
13
  const ftAspectRatio = getAspectRatio(setting.ftShape);
14
14
  const getStyleFeaturedImageDisplay = ()=>{
15
15
  return getDisplayStyle((device)=>![
@@ -149,7 +149,7 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
149
149
  },
150
150
  priority: setting?.preload,
151
151
  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}`,
152
- enableLazyloadImage
152
+ enableLazyLoadImage
153
153
  })}`;
154
154
  };
155
155
  const renderNoImage = ()=>{
@@ -167,7 +167,7 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
167
167
  },
168
168
  priority: setting?.preload,
169
169
  className: `gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none`,
170
- enableLazyloadImage
170
+ enableLazyLoadImage
171
171
  })}`;
172
172
  };
173
173
  const getValueFromValueContainUnit = (value)=>{
@@ -394,10 +394,11 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
394
394
  },
395
395
  className: `gp-w-full featured-image-only !gp-rounded-none`,
396
396
  customLazyload: true,
397
- enableLazyloadImage
397
+ enableLazyLoadImage
398
398
  })}
399
399
  {%- endif -%}
400
- `
400
+ `,
401
+ ftShapeProductImage: setting?.ftShape
401
402
  })}
402
403
  `;
403
404
  };
@@ -6,7 +6,7 @@ import { convertSpacing, getDisplayStyle, getAspectRatio, getSrcImage } from '..
6
6
  import { getShapeByLayout, getSettingMinWidthForCarouselItem, getSettingWidthForCarouselItem, getMinHeightByPosition, getSliderPerShowConfig, getAllowDotConfig, getDotStyleConfig, getCarouselVerticalConfigByPosition, checkDisplayGalleryByWidth, getZoomDisplay } from '../common/productGallery.js';
7
7
  import { getStyleOfObject } from '../../../helpers/function.js';
8
8
 
9
- const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyloadImage, ...setting })=>{
9
+ const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyLoadImage, ...setting })=>{
10
10
  const getCarouselDisplay = ()=>{
11
11
  const isDisplayCarousel = (type, position, device)=>{
12
12
  const layout = getResponsiveValueByScreen(position, device);
@@ -86,7 +86,7 @@ const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyloadImage,
86
86
  customLazyload: true,
87
87
  style: style,
88
88
  className: '!gp-rounded-none gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 gp-cursor-pointer',
89
- enableLazyloadImage
89
+ enableLazyLoadImage
90
90
  })}`;
91
91
  };
92
92
  const aspectRatioToPaddingBottom = ()=>{
@@ -8,7 +8,7 @@ import Model3d from '../../../../image/components/Modal3d.liquid.js';
8
8
  import Video from '../../../../image/components/Video.liquid.js';
9
9
  import HTML5Embed from '../../../../video/components/HTML5Embed.liquid.js';
10
10
 
11
- const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazyloadImage, ...setting })=>{
11
+ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazyLoadImage, ...setting })=>{
12
12
  const getGridDisplay = ()=>{
13
13
  const isDisplayGrid = (type, position, device)=>{
14
14
  const layout = getResponsiveValueByScreen(position, device);
@@ -97,7 +97,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
97
97
  style: style,
98
98
  className: '!gp-rounded-none',
99
99
  customLazyload: false,
100
- enableLazyloadImage
100
+ enableLazyLoadImage
101
101
  })}
102
102
  ${setting?.galleryHoverEffect !== 'none' ? `<div class="${cls('zoom-element !gp-max-w-none', getZoomImageClass())}">
103
103
  ${NextImage({
@@ -111,7 +111,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
111
111
  style: style,
112
112
  className: '!gp-rounded-none gp-w-full gp-h-full',
113
113
  customLazyload: false,
114
- enableLazyloadImage
114
+ enableLazyLoadImage
115
115
  })}
116
116
  </div>` : ''}
117
117
  ${setting?.galleryHoverEffect == 'zoom' && setting?.galleryZoomType == 'glasses' ? `
@@ -294,7 +294,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
294
294
  },
295
295
  className: '!gp-rounded-none',
296
296
  customLazyload: false,
297
- enableLazyloadImage
297
+ enableLazyLoadImage
298
298
  })}`;
299
299
  };
300
300
  return template`
@@ -7,7 +7,7 @@ import { getSettingPreloadData } from '../../../../helpers.js';
7
7
  import { getShapeByLayout, sizeSettingDefaultForNewLayout } from '../common/productGallery.js';
8
8
 
9
9
  const ProductImages = (productImageProps)=>{
10
- const { setting, styles, builderProps, style, advanced, rawChildren, pageContext, enableLazyloadImage } = productImageProps;
10
+ const { setting, styles, builderProps, style, advanced, rawChildren, pageContext, enableLazyLoadImage } = productImageProps;
11
11
  const settings = {
12
12
  ...setting,
13
13
  ...styles
@@ -112,7 +112,7 @@ const ProductImages = (productImageProps)=>{
112
112
  builderPropUID: `gp-carousel-${builderProps?.uid}`,
113
113
  ...settings,
114
114
  children: renderProductBadge(),
115
- enableLazyloadImage
115
+ enableLazyLoadImage
116
116
  })}
117
117
  ${shouldSkipLiquidRenderForSingleImage(settings?.position, template`
118
118
  <div
@@ -128,7 +128,7 @@ const ProductImages = (productImageProps)=>{
128
128
  ${ProductGalleryCarousel({
129
129
  builderPropUID: `gp-gallery-${builderProps?.uid}`,
130
130
  ...settings,
131
- enableLazyloadImage
131
+ enableLazyLoadImage
132
132
  })}
133
133
  </div>
134
134
  ${ProductGalleryGrid({
@@ -138,7 +138,7 @@ const ProductImages = (productImageProps)=>{
138
138
  },
139
139
  children: renderProductBadge(),
140
140
  ...settings,
141
- enableLazyloadImage
141
+ enableLazyLoadImage
142
142
  })}
143
143
  `)}
144
144
  </div>
@@ -38,7 +38,7 @@ const renderCombineVariants = (isSoldOutMark, hasPreSelected, enablePrice)=>{
38
38
  `}`;
39
39
  };
40
40
  const renderBlankOption = (hasPreSelected, blankText)=>{
41
- return !hasPreSelected ? `<option value="blank" selected>${blankText ?? getStaticLocale('ProductVariants', 'please_select')}</option>` : '';
41
+ return !hasPreSelected ? `<option value="blank" selected>${blankText || getStaticLocale('ProductVariants', 'please_select')}</option>` : '';
42
42
  };
43
43
 
44
44
  export { renderBlankOption, renderCombineVariants };
@@ -814,7 +814,7 @@ const config = {
814
814
  options: {
815
815
  tooltip: {
816
816
  icon: 'info-line-16',
817
- content: 'Note: this might not work properly on Safari for iOS versions below 17',
817
+ content: 'Note: this might not work properly on Safari for iOS versions below 16',
818
818
  iconClass: 'text-[#757575] hover:text-[#F9F9F9]'
819
819
  }
820
820
  },
@@ -1,20 +1,19 @@
1
1
  import { useInteraction, useEditorMode } from '@gem-sdk/core';
2
- import { useState, useEffect } from 'react';
2
+ import { useEffect } from 'react';
3
3
 
4
4
  const useTabInteraction = ({ activeKey, setActiveKey, activeTab, refContainer, componentUid })=>{
5
- const [previousTab, setPreviousTab] = useState(activeKey || 1);
6
- const { trigger, onListener, interactionListenerLoaded } = useInteraction();
5
+ const { trigger, onListener, interactionListenerLoaded, saveToElementInteractionData, findElementIncludingSelf } = useInteraction();
7
6
  const mode = useEditorMode();
8
7
  const changeOpenTabInteraction = (params)=>{
9
- const { data, isRollback } = params || {};
10
- if (data === undefined && isRollback === undefined) return;
8
+ const { data, isRollback, element, key } = params || {};
9
+ if (data === undefined && isRollback) return;
10
+ const newData = Number(data) + 1;
11
11
  if (isRollback) {
12
- setActiveKey(previousTab);
13
- setPreviousTab(activeTab);
12
+ setActiveKey(newData);
14
13
  return;
15
14
  }
16
- setPreviousTab(activeTab);
17
- setActiveKey(data + 1);
15
+ saveToElementInteractionData(element, key, String(activeKey));
16
+ setActiveKey(newData);
18
17
  };
19
18
  const dispatchEventTabActive = (index)=>{
20
19
  trigger({
@@ -35,11 +34,16 @@ const useTabInteraction = ({ activeKey, setActiveKey, activeTab, refContainer, c
35
34
  dispatchEventTabActive(activeTab - 1);
36
35
  });
37
36
  const selector = `[data-id="${componentUid}"]`;
37
+ const element = findElementIncludingSelf(document, selector);
38
38
  const removeListener = onListener({
39
39
  event: 'gp:change-open-tab',
40
40
  selector
41
41
  }, (params)=>{
42
- changeOpenTabInteraction(params);
42
+ changeOpenTabInteraction({
43
+ ...params,
44
+ element,
45
+ key: params?.uniqueStorageKey
46
+ });
43
47
  });
44
48
  return ()=>{
45
49
  removeListener?.();
@@ -6,7 +6,6 @@ import { getDisplayText } from './common.js';
6
6
  const Text = /*#__PURE__*/ forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
7
7
  const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
8
8
  const composeGlobalSize = makeGlobalSize(setting?.globalSize);
9
- console.log('Text: ', text);
10
9
  const mode = useEditorMode();
11
10
  const getPlaceHolderWhenContentNone = ()=>{
12
11
  let classList = '';
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/AppstleBundlesDiscounts.js';
5
+
6
+ const AppstleBundlesDiscountsContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'Appstle℠ Bundles & Discounts',
13
+ iconSvg: `<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const AppstleBundlesDiscounts = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(AppstleBundlesDiscountsContent, {})
25
+ });
26
+ };
27
+
28
+ export { AppstleBundlesDiscounts as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const AppstleBundlesDiscounts = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
6
+ };
7
+
8
+ export { AppstleBundlesDiscounts as default };
@@ -1,4 +1,4 @@
1
- import { jsx, Fragment } from 'react/jsx-runtime';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { useMemo } from 'react';
3
3
  import BogosConfig from '../../configs/Bogos.js';
4
4
  import ThirdPartyPreview from '../ThirdPartyPreview.js';
@@ -9,7 +9,8 @@ const mapWidgetLabel = {
9
9
  slider: 'Gift slider',
10
10
  message: 'Cart message',
11
11
  ['classic-bundle']: 'Classic bundle',
12
- ['quantity-break']: 'Quantity break'
12
+ ['quantity-break']: 'Quantity break',
13
+ ['mix-match']: 'Mix and match'
13
14
  };
14
15
  const BogosSampleContent = ({ setting })=>{
15
16
  const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
@@ -18,15 +19,13 @@ const BogosSampleContent = ({ setting })=>{
18
19
  }, [
19
20
  widgetLabel
20
21
  ]);
21
- return /*#__PURE__*/ jsx(Fragment, {
22
- children: /*#__PURE__*/ jsx("div", {
23
- className: "p-2",
24
- children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
25
- setting: {
26
- label,
27
- iconSvg: `<img class="gp-w-[24px] border border-[#494949] rounded-[3px]" src="${BogosConfig.logoUrl}">`
28
- }
29
- })
22
+ return /*#__PURE__*/ jsx("div", {
23
+ className: "p-2",
24
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
25
+ setting: {
26
+ label,
27
+ iconSvg: `<img class="gp-w-[24px] border border-[#494949] rounded-[3px]" src="${BogosConfig.logoUrl}">`
28
+ }
30
29
  })
31
30
  });
32
31
  };
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/EcomsendBackInStockAlert.js';
5
+
6
+ const EcomsendBackInStockAlertContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'EcomSend Back in Stock Alert',
13
+ iconSvg: `<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const EcomsendBackInStockAlert = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(EcomsendBackInStockAlertContent, {})
25
+ });
26
+ };
27
+
28
+ export { EcomsendBackInStockAlert as default };
@@ -0,0 +1,17 @@
1
+ import { template, makeStyleResponsive } from '@gem-sdk/core';
2
+
3
+ const EcomsendBackInStockAlert = ({ setting, advanced })=>{
4
+ const { align } = setting ?? {};
5
+ return template`
6
+ <div
7
+ class="${advanced?.cssClass}"
8
+ style="${{
9
+ ...makeStyleResponsive('ta', align)
10
+ }}"
11
+ >
12
+ <div id="sealapps-bis-widget"></div>
13
+ </div>
14
+ `;
15
+ };
16
+
17
+ export { EcomsendBackInStockAlert as default };
@@ -2,7 +2,7 @@ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
2
 
3
3
  const RechargeSubscriptions = ({ setting, advanced })=>{
4
4
  const { align, appBlockId } = setting ?? {};
5
- return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''}!gp-block`);
5
+ return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
6
6
  };
7
7
 
8
8
  export { RechargeSubscriptions as default };