@gem-sdk/components 2.1.27-staging.2 → 2.1.27-staging.20

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 (64) hide show
  1. package/dist/cjs/article/components/ArticleList.js +1 -1
  2. package/dist/cjs/builder.js +3 -1
  3. package/dist/cjs/button/components/Button.liquid.js +3 -3
  4. package/dist/cjs/collection/components/CollectionPaginator.liquid.js +1 -1
  5. package/dist/cjs/collection/setting/CollectionPaginator.js +5 -0
  6. package/dist/cjs/helpers.js +26 -4
  7. package/dist/cjs/image/components/AdaptiveImage.js +4 -3
  8. package/dist/cjs/image/components/Image.js +2 -21
  9. package/dist/cjs/image/helpers/getSrcSet.js +2 -1
  10. package/dist/cjs/index.js +4 -0
  11. package/dist/cjs/index.liquid.js +2 -0
  12. package/dist/cjs/post-purchase/product/components/variants/Dropdown.js +1 -1
  13. package/dist/cjs/product/components/ProductButton.js +1 -1
  14. package/dist/cjs/product/components/ProductButton.liquid.js +21 -3
  15. package/dist/cjs/product/components/ProductList.liquid.js +4 -8
  16. package/dist/cjs/product/components/ProductTag.js +9 -1
  17. package/dist/cjs/text/components/Text.js +2 -1
  18. package/dist/cjs/text/components/Text.liquid.js +2 -2
  19. package/dist/cjs/text/components/common.js +14 -0
  20. package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.js +32 -0
  21. package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +12 -0
  22. package/dist/cjs/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  23. package/dist/cjs/third-party/components/Releasit.liquid.js +4 -2
  24. package/dist/cjs/third-party/configs/BoldProductOptions.js +2 -2
  25. package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +12 -0
  26. package/dist/cjs/third-party/next.js +5 -0
  27. package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +142 -0
  28. package/dist/cjs/third-party/setting/RechargeSubscriptions.js +5 -2
  29. package/dist/cjs/third-party/setting/Releasit.js +59 -2
  30. package/dist/cjs/third-party/setting/index.js +3 -1
  31. package/dist/esm/article/components/ArticleList.js +1 -1
  32. package/dist/esm/builder.js +3 -1
  33. package/dist/esm/button/components/Button.liquid.js +3 -3
  34. package/dist/esm/collection/components/CollectionPaginator.liquid.js +1 -1
  35. package/dist/esm/collection/setting/CollectionPaginator.js +5 -0
  36. package/dist/esm/helpers.js +25 -5
  37. package/dist/esm/image/components/AdaptiveImage.js +4 -3
  38. package/dist/esm/image/components/Image.js +2 -21
  39. package/dist/esm/image/helpers/getSrcSet.js +2 -1
  40. package/dist/esm/index.js +2 -1
  41. package/dist/esm/index.liquid.js +1 -0
  42. package/dist/esm/post-purchase/product/components/variants/Dropdown.js +1 -1
  43. package/dist/esm/product/components/ProductButton.js +1 -1
  44. package/dist/esm/product/components/ProductButton.liquid.js +21 -3
  45. package/dist/esm/product/components/ProductList.liquid.js +4 -8
  46. package/dist/esm/product/components/ProductTag.js +10 -2
  47. package/dist/esm/text/components/Text.js +2 -1
  48. package/dist/esm/text/components/Text.liquid.js +2 -2
  49. package/dist/esm/text/components/common.js +12 -0
  50. package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.js +28 -0
  51. package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +8 -0
  52. package/dist/esm/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  53. package/dist/esm/third-party/components/Releasit.liquid.js +4 -2
  54. package/dist/esm/third-party/configs/BoldProductOptions.js +2 -2
  55. package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +8 -0
  56. package/dist/esm/third-party/next.js +5 -0
  57. package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +138 -0
  58. package/dist/esm/third-party/setting/RechargeSubscriptions.js +5 -2
  59. package/dist/esm/third-party/setting/Releasit.js +59 -2
  60. package/dist/esm/third-party/setting/index.js +3 -1
  61. package/dist/types/index.d.ts +32 -3
  62. package/package.json +3 -3
  63. package/dist/cjs/image/components/NoDataImage.js +0 -133
  64. package/dist/esm/image/components/NoDataImage.js +0 -129
@@ -14,7 +14,7 @@ const ArticleList = ({ styles, setting, className, children, builderProps })=>{
14
14
  const { articleSetting, numberOfArticle } = setting ?? {};
15
15
  const { articleIds, articlePickType } = articleSetting ?? {};
16
16
  const articlesQuery = {
17
- first: articleIds?.length ?? 50,
17
+ first: articleIds?.length || 50,
18
18
  where: {
19
19
  baseIDIn: [
20
20
  ...articleSetting?.articleIds ?? []
@@ -123,6 +123,7 @@ var GloColorSwatchvariantImage = require('./third-party/components/GloColorSwatc
123
123
  var BfSizeChartSizeGuide = require('./third-party/components/BfSizeChartSizeGuide.js');
124
124
  var AlsoBoughtCbb = require('./third-party/components/AlsoBoughtCbb.js');
125
125
  var HextomFreeShippingBar = require('./third-party/components/HextomFreeShippingBar.js');
126
+ var EcoboostifyShoppableReelUgc = require('./third-party/components/EcoboostifyShoppableReelUgc.js');
126
127
  var CartLineVariant = require('./cart/components/CartLineVariant.js');
127
128
  var Cart = require('./cart/components/Cart.js');
128
129
  var CartList = require('./cart/components/CartList.js');
@@ -503,7 +504,8 @@ var builder = {
503
504
  GloColorSwatchvariantImage: GloColorSwatchvariantImage.default,
504
505
  BfSizeChartSizeGuide: BfSizeChartSizeGuide.default,
505
506
  AlsoBoughtCbb: AlsoBoughtCbb.default,
506
- HextomFreeShippingBar: HextomFreeShippingBar.default
507
+ HextomFreeShippingBar: HextomFreeShippingBar.default,
508
+ EcoboostifyShoppableReelUgc: EcoboostifyShoppableReelUgc.default
507
509
  };
508
510
 
509
511
  exports.default = builder;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var core = require('@gem-sdk/core');
6
6
  var helpers = require('../../helpers.js');
7
7
 
8
- const Button = ({ className, builderProps, customAttrs, pageContext, setting = {}, styles = {}, style, wrapClassName = '', advanced, nodePrice, dataId })=>{
8
+ const Button = ({ className, builderProps, customAttrs, pageContext, setting = {}, styles = {}, style, wrapClassName = '', advanced, nodePrice, dataId, isForceValue = false })=>{
9
9
  const { align, size, backgroundColor, textColor, roundedBtn, iconSpacing, globalSize } = styles;
10
10
  const { label, iconSvg, btnLink, htmlType, disabled, loading, iconAlign, iconVisible, translate, disabledLoading = true } = setting;
11
11
  const [wrapStyle, restStyle] = core.splitStyle([
@@ -70,7 +70,7 @@ const Button = ({ className, builderProps, customAttrs, pageContext, setting = {
70
70
  color: ${core.getSingleColorVariable(styles?.textColor?.hover)};
71
71
  }
72
72
  `;
73
- const labelValDisplay = helpers.getDynamicSourceLocales({
73
+ const labelValDisplay = isForceValue ? label : helpers.getDynamicSourceLocales({
74
74
  val: label,
75
75
  uid: builderProps?.uidTranslate ?? builderProps?.uid,
76
76
  settingId: translate ?? 'label',
@@ -161,7 +161,7 @@ const Button = ({ className, builderProps, customAttrs, pageContext, setting = {
161
161
  >${iconSvg}</span>`)}
162
162
  <span
163
163
  data-gp-text
164
- class="${`gp-button-text-only gp-break-words group-data-[state=loading]:gp-invisible [&_p]:gp-whitespace-pre-line gp-z-1 gp-h-full gp-flex gp-items-center gp-overflow-hidden ${nodePrice ? appendTypoClass : ''}
164
+ class="${`gp-content-product-button gp-button-text-only gp-break-words group-data-[state=loading]:gp-invisible [&_p]:gp-whitespace-pre-line gp-z-1 gp-h-full gp-flex gp-items-center gp-overflow-hidden ${nodePrice ? appendTypoClass : ''}
165
165
  ${styles?.typo?.attrs?.italic ? '[&:not(:has(p))]:gp-pr-[0.2em] [&_p]:[&:has(p)]:gp-pr-[0.2em]' : ''}`}"
166
166
  style="${{
167
167
  ...nodePrice && appendTypoStyle,
@@ -7,7 +7,7 @@ var helpers = require('../../helpers.js');
7
7
 
8
8
  const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
9
9
  const { layout, previousText, nextText, typographyPaginator, normalColor, activeColor, align, typo, translate } = setting ?? {};
10
- const numberOfProductOfProductList = pageContext?.numberOfProductOfProductList || 0;
10
+ const numberOfProductOfProductList = setting?.numberOfProducts || pageContext?.numberOfProductOfProductList || 0;
11
11
  const limit = numberOfProductOfProductList > 0 ? numberOfProductOfProductList : 4;
12
12
  const appendTypoClass = core.composeTypographyClassName(typo, typographyPaginator);
13
13
  const appendTypoStyle = core.composeTypographyStyle(typo, typographyPaginator);
@@ -158,6 +158,11 @@ const config = {
158
158
  tooltip: 'Align right'
159
159
  }
160
160
  ]
161
+ },
162
+ {
163
+ id: 'numberOfProducts',
164
+ type: 'input:number',
165
+ default: 0
161
166
  }
162
167
  ]
163
168
  }
@@ -34,7 +34,7 @@ const isHexTransparent = (hex)=>{
34
34
  return Boolean(a);
35
35
  };
36
36
  const youtubeShortsRegex = /^(?:https?:\/\/)?(?:www\.)?youtube\.com\/shorts\/([^"&?/\s]{11})$/i;
37
- const getDynamicSourceLocales = ({ val, uid, settingId, isLiquid, pageContext, isCapitalize, defaultVal = '', translate, isReplaceLocationOrigin, isReplaceInventoryQuantity })=>{
37
+ const getDynamicSourceLocales = ({ val, uid, settingId, isLiquid, pageContext, defaultVal = '', translate, isReplaceLocationOrigin, isReplaceInventoryQuantity })=>{
38
38
  const hasLiquidInValue = new RegExp(/\{\{.*?\}\}|\{%.*?%\}/).test(val?.toString() ?? '');
39
39
  const translateLimit = pageContext?.isTranslateWithLocale ? 1000 : 5000;
40
40
  if (!translate || !val?.toString().trim() || val.toString().length > translateLimit || hasLiquidInValue || pageContext?.isPreviewing) return val ?? defaultVal;
@@ -49,9 +49,6 @@ const getDynamicSourceLocales = ({ val, uid, settingId, isLiquid, pageContext, i
49
49
  if (isReplaceInventoryQuantity) {
50
50
  locale += ` | replace: '<$quantity$>', inventory_quantity | replace: '&lt;$quantity$&gt;', inventory_quantity`;
51
51
  }
52
- if (isCapitalize) {
53
- locale = `${locale} | downcase`;
54
- }
55
52
  if (isLiquid) return locale;
56
53
  return `{{ ${locale} }}`;
57
54
  };
@@ -126,7 +123,31 @@ const replaceLinkData = (text, isTranslate)=>{
126
123
  }
127
124
  return text;
128
125
  };
126
+ const getAllHrefFromString = (htmlString)=>{
127
+ if (!htmlString) return [];
128
+ const regex = /href="([^"]*)"/g;
129
+ const hrefs = [];
130
+ let match;
131
+ while((match = regex.exec(htmlString)) !== null){
132
+ match[1] && hrefs.push(match[1]);
133
+ }
134
+ return hrefs;
135
+ };
136
+ const replaceAllHrefFromString = (htmlString, hrefs)=>{
137
+ if (!htmlString) return '';
138
+ const regex = /href="([^"]*)"/g;
139
+ let match;
140
+ let i = 0;
141
+ while((match = regex.exec(htmlString)) !== null){
142
+ if (match[1]) {
143
+ htmlString = htmlString.replace(match[1], hrefs[i] ?? '');
144
+ i++;
145
+ }
146
+ }
147
+ return htmlString;
148
+ };
129
149
 
150
+ exports.getAllHrefFromString = getAllHrefFromString;
130
151
  exports.getDynamicSourceLocales = getDynamicSourceLocales;
131
152
  exports.getInsertLinkData = getInsertLinkData;
132
153
  exports.getSettingPreloadData = getSettingPreloadData;
@@ -134,5 +155,6 @@ exports.getStaticLocale = getStaticLocale;
134
155
  exports.isHexTransparent = isHexTransparent;
135
156
  exports.isTransparentColor = isTransparentColor;
136
157
  exports.isTransparentRGBA = isTransparentRGBA;
158
+ exports.replaceAllHrefFromString = replaceAllHrefFromString;
137
159
  exports.replaceLinkData = replaceLinkData;
138
160
  exports.youtubeShortsRegex = youtubeShortsRegex;
@@ -7,6 +7,7 @@ var Head = require('next/head');
7
7
  var Img = require('./Img.js');
8
8
 
9
9
  const AdaptiveImage = ({ srcSet, priority, pictureClass, imagePlaceholder, ...rest })=>{
10
+ const fallBackImage = 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif';
10
11
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
11
12
  children: [
12
13
  /*#__PURE__*/ jsxRuntime.jsxs(Head, {
@@ -36,17 +37,17 @@ const AdaptiveImage = ({ srcSet, priority, pictureClass, imagePlaceholder, ...re
36
37
  children: [
37
38
  !!srcSet?.mobile?.src && /*#__PURE__*/ jsxRuntime.jsx("source", {
38
39
  media: "(max-width: 767px)",
39
- srcSet: srcSet.mobile.src
40
+ srcSet: srcSet.mobile.src || fallBackImage
40
41
  }),
41
42
  !!srcSet?.tablet?.src && /*#__PURE__*/ jsxRuntime.jsx("source", {
42
43
  media: "(max-width: 1024px)",
43
- srcSet: srcSet?.tablet?.src
44
+ srcSet: srcSet?.tablet?.src || fallBackImage
44
45
  }),
45
46
  /*#__PURE__*/ jsxRuntime.jsx(Img.default, {
46
47
  ...rest,
47
48
  loading: priority ? 'eager' : 'lazy',
48
49
  image: {
49
- src: srcSet?.desktop?.src || imagePlaceholder?.['desktop']
50
+ src: srcSet?.desktop?.src || imagePlaceholder?.['desktop'] || fallBackImage
50
51
  }
51
52
  })
52
53
  ]
@@ -8,13 +8,11 @@ var Link = require('../../link/components/Link.js');
8
8
  var AdaptiveImage = require('./AdaptiveImage.js');
9
9
  var NextImage = require('./NextImage.js');
10
10
  var helpers = require('./helpers.js');
11
- var NoDataImage = require('./NoDataImage.js');
12
- var React = require('react');
13
11
 
14
12
  const Image = ({ styles, className, setting, builderAttrs, builderProps, style, children, onClick, onLoad })=>{
15
13
  const { image, imageLink, srcSet, isNotLazyload } = setting ?? {};
16
14
  const { customAspectRadio } = styles ?? {};
17
- const currentDevice = core.useCurrentDevice();
15
+ core.useCurrentDevice();
18
16
  const { shape } = styles ?? {};
19
17
  const WrapLink = imageLink?.link ? Link.default : 'div';
20
18
  const opacity = {
@@ -59,18 +57,6 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
59
57
  custom: customAspectRadio
60
58
  })
61
59
  };
62
- const isShowNoDataState = React.useMemo(()=>{
63
- if (setting?.disableNoDataState) return false;
64
- if (currentDevice === 'mobile') return !setting?.srcSet?.mobile?.src && !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
65
- if (currentDevice === 'tablet') return !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
66
- return !setting?.srcSet?.desktop?.src;
67
- }, [
68
- currentDevice,
69
- setting?.disableNoDataState,
70
- setting?.srcSet?.desktop?.src,
71
- setting?.srcSet?.mobile?.src,
72
- setting?.srcSet?.tablet?.src
73
- ]);
74
60
  return /*#__PURE__*/ jsxRuntime.jsxs("div", {
75
61
  ...builderAttrs,
76
62
  "data-id": builderProps?.uid,
@@ -98,12 +84,7 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
98
84
  ...core.makeStyleResponsive('jc', styles?.align)
99
85
  },
100
86
  children: [
101
- isShowNoDataState ? /*#__PURE__*/ jsxRuntime.jsx(NoDataImage.default, {
102
- style: {
103
- ...imageWidth,
104
- ...imageHeight
105
- }
106
- }) : setting?.isAdaptive ? /*#__PURE__*/ jsxRuntime.jsx(AdaptiveImage.default, {
87
+ setting?.isAdaptive ? /*#__PURE__*/ jsxRuntime.jsx(AdaptiveImage.default, {
107
88
  srcSet: setting.srcSet,
108
89
  pictureClass: "gp-contents",
109
90
  className: core.cls(className, 'gp-inline-block gp-w-full gp-max-w-full', core.handleConvertClassColor(styles?.borderImg)),
@@ -30,7 +30,8 @@ const getSrcSetLiquid = (liquid, storage)=>{
30
30
  return `{{ '${liquid}' | asset_img_url: '768x' }} 768w, {{ '${liquid}' | asset_img_url: '1024x' }} 1024w, {{ '${liquid}' | asset_img_url: 'master' }} 1440w`;
31
31
  };
32
32
  const getSrcSetLink = (link)=>{
33
- return `${link} 768w,${link} 1024w,${link} 1440w`;
33
+ return link; // Since image src didn't change in size so this line of code is pointless
34
+ // return `${link} 768w,${link} 1024w,${link} 1440w`;
34
35
  };
35
36
  const getImageSrc = (image, currentDevice)=>{
36
37
  let src = image?.backupFilePath;
package/dist/cjs/index.js CHANGED
@@ -219,6 +219,7 @@ var GloColorSwatchvariantImage = require('./third-party/components/GloColorSwatc
219
219
  var BfSizeChartSizeGuide = require('./third-party/components/BfSizeChartSizeGuide.js');
220
220
  var AlsoBoughtCbb = require('./third-party/components/AlsoBoughtCbb.js');
221
221
  var HextomFreeShippingBar = require('./third-party/components/HextomFreeShippingBar.js');
222
+ var EcoboostifyShoppableReelUgc = require('./third-party/components/EcoboostifyShoppableReelUgc.js');
222
223
  var index$x = require('./third-party-instant/setting/index.js');
223
224
  var InstantJudgemeReviews = require('./third-party-instant/components/InstantJudgemeReviews.js');
224
225
  var InstantLooxReviews = require('./third-party-instant/components/InstantLooxReviews.js');
@@ -534,6 +535,7 @@ exports.GloColorSwatchvariantImage = GloColorSwatchvariantImage.default;
534
535
  exports.BfSizeChartSizeGuide = BfSizeChartSizeGuide.default;
535
536
  exports.AlsoBoughtCbb = AlsoBoughtCbb.default;
536
537
  exports.HextomFreeShippingBar = HextomFreeShippingBar.default;
538
+ exports.EcoboostifyShoppableReelUgc = EcoboostifyShoppableReelUgc.default;
537
539
  exports.thirdPartyInstantSetting = index$x.default;
538
540
  exports.InstantJudgemeReviews = InstantJudgemeReviews.default;
539
541
  exports.InstantLooxReviews = InstantLooxReviews.default;
@@ -622,6 +624,7 @@ exports.nextComponent = next.default;
622
624
  exports.liquidComponents = index_liquid;
623
625
  exports.builderComponent = builder.default;
624
626
  exports.ELEMENT_Z_INDEX = _const.ELEMENT_Z_INDEX;
627
+ exports.getAllHrefFromString = helpers.getAllHrefFromString;
625
628
  exports.getDynamicSourceLocales = helpers.getDynamicSourceLocales;
626
629
  exports.getInsertLinkData = helpers.getInsertLinkData;
627
630
  exports.getSettingPreloadData = helpers.getSettingPreloadData;
@@ -629,6 +632,7 @@ exports.getStaticLocale = helpers.getStaticLocale;
629
632
  exports.isHexTransparent = helpers.isHexTransparent;
630
633
  exports.isTransparentColor = helpers.isTransparentColor;
631
634
  exports.isTransparentRGBA = helpers.isTransparentRGBA;
635
+ exports.replaceAllHrefFromString = helpers.replaceAllHrefFromString;
632
636
  exports.replaceLinkData = helpers.replaceLinkData;
633
637
  exports.youtubeShortsRegex = helpers.youtubeShortsRegex;
634
638
  exports.postPurchaseTextSetting = index$M.default;
@@ -174,6 +174,7 @@ var GloColorSwatchvariantImage_liquid = require('./third-party/components/GloCol
174
174
  var BfSizeChartSizeGuide_liquid = require('./third-party/components/BfSizeChartSizeGuide.liquid.js');
175
175
  var AlsoBoughtCbb_liquid = require('./third-party/components/AlsoBoughtCbb.liquid.js');
176
176
  var HextomFreeShippingBar_liquid = require('./third-party/components/HextomFreeShippingBar.liquid.js');
177
+ var EcoboostifyShoppableReelUgc_liquid = require('./third-party/components/EcoboostifyShoppableReelUgc.liquid.js');
177
178
  var ImageComparison_liquid = require('./image-comparison/components/ImageComparison.liquid.js');
178
179
  var ThirdPartySlot_liquid = require('./third-party-slot/components/ThirdPartySlot.liquid.js');
179
180
  var Sticky_liquid = require('./sticky/components/Sticky.liquid.js');
@@ -370,6 +371,7 @@ exports.GloColorSwatchvariantImage = GloColorSwatchvariantImage_liquid.default;
370
371
  exports.BfSizeChartSizeGuide = BfSizeChartSizeGuide_liquid.default;
371
372
  exports.AlsoBoughtCbb = AlsoBoughtCbb_liquid.default;
372
373
  exports.HextomFreeShippingBar = HextomFreeShippingBar_liquid.default;
374
+ exports.EcoboostifyShoppableReelUgc = EcoboostifyShoppableReelUgc_liquid.default;
373
375
  exports.ImageComparison = ImageComparison_liquid.default;
374
376
  exports.ThirdPartySlot = ThirdPartySlot_liquid.default;
375
377
  exports.Sticky = Sticky_liquid.default;
@@ -69,7 +69,7 @@ const DropdownVariant = ({ option, optionPosition, optionNumber, variantGroup, v
69
69
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
70
70
  className: "gp-max-w-full",
71
71
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
72
- className: "gp-block gp-overflow-hidden",
72
+ className: "gp-block gp-overflow-hidden gp-truncate",
73
73
  children: label
74
74
  })
75
75
  })
@@ -218,7 +218,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
218
218
  ]);
219
219
  const isInStock = core.useCurrentVariantInStock();
220
220
  const isDisable = !isInStock || createCartLoading || addToCartLoading;
221
- const label = !isInStock ? setting?.outOfStockLabel : setting?.label;
221
+ const label = !isInStock ? !currentVariant ? 'Unavailable' : setting?.outOfStockLabel : setting?.label;
222
222
  if (!isInStock && isCustomOutOfStock) {
223
223
  buttonStyles.backgroundColor = {
224
224
  normal: oosBackground
@@ -188,6 +188,22 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
188
188
  pageContext,
189
189
  translate: setting?.translate
190
190
  });
191
+ const labelUnavailableTranslate = helpers.getDynamicSourceLocales({
192
+ val: 'Unavailable',
193
+ uid: builderProps?.uid,
194
+ settingId: 'unavailableLabel',
195
+ isLiquid: true,
196
+ pageContext,
197
+ translate: setting?.translate ? 'unavailableLabel' : undefined
198
+ });
199
+ const labelOutOfStockTranslate = helpers.getDynamicSourceLocales({
200
+ val: setting?.outOfStockLabel,
201
+ uid: builderProps?.uid,
202
+ settingId: 'outOfStockLabel',
203
+ isLiquid: true,
204
+ pageContext,
205
+ translate: setting?.translate ? 'outOfStockLabel' : undefined
206
+ });
191
207
  return core.template /* liquid */ `
192
208
  {%- liquid
193
209
  assign inventory_quantity = variant.inventory_quantity | default: 0
@@ -195,6 +211,8 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
195
211
  <gp-product-button
196
212
  class="gp-product-button"
197
213
  gp-data-wrapper="true"
214
+ label-out-of-Stock="${pageContext?.isPreviewing ? labelOutOfStockTranslate : `{{${labelOutOfStockTranslate}}}`}"
215
+ label-unavailable="${pageContext?.isPreviewing ? labelUnavailableTranslate : `{{${labelUnavailableTranslate}}}`}"
198
216
  gp-data='${JSON.stringify({
199
217
  setting: {
200
218
  actionEffect: setting?.actionEffect,
@@ -272,8 +290,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
272
290
  'gp-data-hidden': `{% if variant.available %}true{% endif %}`
273
291
  },
274
292
  setting: {
275
- label: setting?.outOfStockLabel,
276
- translate: setting?.translate ? 'outOfStockLabel' : undefined,
293
+ label: `${pageContext?.isPreviewing ? labelOutOfStockTranslate : `{{${labelOutOfStockTranslate}}}`}`,
277
294
  htmlType: 'button',
278
295
  iconAlign: iconAlign,
279
296
  iconSvg: iconSvg,
@@ -292,7 +309,8 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
292
309
  }
293
310
  },
294
311
  pageContext,
295
- nodePrice: composeNodePrice()
312
+ nodePrice: composeNodePrice(),
313
+ isForceValue: true
296
314
  })}
297
315
  </gp-product-button>
298
316
  ${core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-button.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-product-button.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
@@ -237,6 +237,7 @@ const ProductList = ({ setting, builderProps, styles, className, children, advan
237
237
  endif
238
238
  assign arrayRelatedExclude = relatedExclude | split: ","
239
239
  assign idSelectedList = ''
240
+ assign relatedListProduct = null
240
241
  for collection in collections
241
242
  assign collectionId = collection.id
242
243
  assign isInCollection = false
@@ -251,20 +252,15 @@ const ProductList = ({ setting, builderProps, styles, className, children, advan
251
252
  break
252
253
  else
253
254
  assign idSelectedList = idSelectedList | append: "," | append: product.id
255
+ assign productSelected = product | sort
256
+ assign relatedListProduct = relatedListProduct | concat: productSelected
254
257
  endif
255
258
  endfor
256
259
  endif
257
260
  endunless
258
261
  endfor
259
262
  endfor
260
- for item in allProductsPaginated
261
- assign handle = item.handle
262
- assign productF = item | sort
263
- if idSelectedList contains item.id
264
- assign products = products | concat: productF
265
- endif
266
- endfor
267
- assign products = products | uniq
263
+ assign products = relatedListProduct | uniq
268
264
  when 'vendor'
269
265
  assign vendorAssignProduct = assignProduct.vendor
270
266
  assign productFilter = allProductsPaginated | where: 'vendor', vendorAssignProduct
@@ -18,9 +18,17 @@ const ProductTag = ({ setting, styles, builderProps, ...passProps })=>{
18
18
  const mode = core.useEditorMode();
19
19
  const product = core.useProduct();
20
20
  const currentVariant = core.useCurrentVariant();
21
+ const { quantity, hasUpdatePrice } = core.useQuantity();
22
+ const quantityProduct = React.useMemo(()=>{
23
+ return hasUpdatePrice && customContent?.unit !== 'percentage' ? quantity || 1 : 1;
24
+ }, [
25
+ hasUpdatePrice,
26
+ customContent?.unit,
27
+ quantity
28
+ ]);
21
29
  const price = currentVariant?.price ?? 0;
22
30
  const salePrice = currentVariant?.salePrice ?? 0;
23
- const priceSave = salePrice - price;
31
+ const priceSave = (salePrice - price) * quantityProduct;
24
32
  const moneyFormatted = core.useFormatMoney(priceSave < 0 ? 0 : priceSave, setting?.moneyWithCurrentFormat || false);
25
33
  const customDisplayWithUnit = React.useMemo(()=>{
26
34
  if (!salePrice && salePrice !== 0 || !price && price !== 0) return `${customContent?.unit === 'percentage' ? '0%' : moneyFormatted}`;
@@ -5,6 +5,7 @@ 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 React = require('react');
8
+ var common = require('./common.js');
8
9
 
9
10
  const Text = /*#__PURE__*/ React.forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
10
11
  const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
@@ -89,7 +90,7 @@ const Text = /*#__PURE__*/ React.forwardRef(({ styles, builderAttrs, style, sett
89
90
  overflow: 'hidden'
90
91
  },
91
92
  dangerouslySetInnerHTML: {
92
- __html: styles?.typo?.attrs?.transform === 'capitalize' ? text?.toString().toLocaleLowerCase() : text?.toString() || '<p><br></p>'
93
+ __html: common.getDisplayText(text?.toString() ?? '<p><br></p>')
93
94
  }
94
95
  })
95
96
  }),
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@gem-sdk/core');
6
6
  var helpers = require('../../helpers.js');
7
+ var common = require('./common.js');
7
8
 
8
9
  const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs, ...props })=>{
9
10
  const { text, htmlTag: Element = 'div', tagWidth, excludeFlex, isForceValue } = setting ?? {};
@@ -31,7 +32,6 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
31
32
  uid: builderProps?.uid,
32
33
  settingId: setting?.translate,
33
34
  pageContext,
34
- isCapitalize: styles?.typo?.attrs?.transform === 'capitalize',
35
35
  translate: setting.translate,
36
36
  isReplaceLocationOrigin: isViewliveHeadingOrTextComponent
37
37
  });
@@ -39,7 +39,7 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
39
39
  displayText = renderText;
40
40
  }
41
41
  } else {
42
- displayText = styles?.typo?.attrs?.transform === 'capitalize' ? renderText?.toString().toLocaleLowerCase() : renderText;
42
+ displayText = common.getDisplayText(renderText ?? '');
43
43
  }
44
44
  return core.template`
45
45
  {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var helpers = require('../../helpers.js');
4
+
5
+ const getDisplayText = (renderText, isTextCapitalize = false)=>{
6
+ let displayText = renderText;
7
+ if (isTextCapitalize) {
8
+ const links = helpers.getAllHrefFromString(renderText ?? '');
9
+ displayText = helpers.replaceAllHrefFromString(renderText?.toString().toLocaleLowerCase(), links);
10
+ }
11
+ return displayText;
12
+ };
13
+
14
+ exports.getDisplayText = getDisplayText;
@@ -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 EcoboostifyShoppableReelUgc$1 = require('../configs/EcoboostifyShoppableReelUgc.js');
9
+
10
+ const EcoboostifyShoppableReelUgcContent = ()=>{
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: 'EcoBoostify Shoppable Reel UGC',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${EcoboostifyShoppableReelUgc$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const EcoboostifyShoppableReelUgc = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(EcoboostifyShoppableReelUgcContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = EcoboostifyShoppableReelUgc;
@@ -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 EcoboostifyShoppableReelUgc = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
10
+ };
11
+
12
+ exports.default = EcoboostifyShoppableReelUgc;
@@ -6,7 +6,7 @@ var thirdParty = require('../helpers/thirdParty.js');
6
6
 
7
7
  const RechargeSubscriptions = ({ setting, advanced })=>{
8
8
  const { align, appBlockId } = setting ?? {};
9
- return thirdParty.getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
10
10
  };
11
11
 
12
12
  exports.default = RechargeSubscriptions;
@@ -2,11 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var thirdParty = require('../helpers/thirdParty.js');
5
6
  var core = require('@gem-sdk/core');
6
7
 
7
8
  const Releasit = ({ setting, advanced })=>{
8
- const { align } = setting ?? {};
9
- return core.template`
9
+ const { align, version, appBlockId } = setting ?? {};
10
+ console.log('version', version);
11
+ return version === 'v2' ? thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''}!gp-block`) : core.template`
10
12
  <div
11
13
  class="${advanced?.cssClass}"
12
14
  style="${{
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var BoldProductOptionsConfig = {
6
6
  id: 'bold-product-options',
7
- label: 'Bold Product Options',
8
- logoUrl: 'https://ucarecdn.com/cae13b55-18b6-416a-a447-c18211d78cfe/-/format/auto/-/preview/3000x3000/-/quality/lighter/Bold%20Product%20Options.png',
7
+ label: 'SC Product Options',
8
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/9a0bf1159f79c6ab0660ec422f350445/icon/CP2Uwo_GuYIDEAE=.png',
9
9
  tag: 'BoldProductOptions'
10
10
  };
11
11
 
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var AppConfig = {
6
+ id: 'ecoboostify-shoppable-reel-ugc',
7
+ label: 'EcoBoostify Shoppable Reel UGC',
8
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/CJWKq4vxxIkDEAE=.png',
9
+ tag: 'EcoboostifyShoppableReelUgc'
10
+ };
11
+
12
+ exports.default = AppConfig;
@@ -458,7 +458,12 @@ const HextomFreeShippingBar = dynamic(()=>Promise.resolve().then(function () { r
458
458
  ssr: false,
459
459
  loading: Loading.default
460
460
  });
461
+ const EcoboostifyShoppableReelUgc = dynamic(()=>Promise.resolve().then(function () { return require('./components/EcoboostifyShoppableReelUgc.js'); }), {
462
+ ssr: false,
463
+ loading: Loading.default
464
+ });
461
465
  var thirdParty = {
466
+ EcoboostifyShoppableReelUgc,
462
467
  EstimatedDeliveryDatePlus,
463
468
  OkendoReviewsLoyalty,
464
469
  EssentialAnnouncementBar,