@gem-sdk/components 2.0.0-dev.700 → 2.0.0-dev.701

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 (96) hide show
  1. package/dist/cjs/button/components/Button.js +4 -1
  2. package/dist/cjs/carousel/carousel-item/common/getClass.js +1 -1
  3. package/dist/cjs/grid/row/commons/getClass.js +1 -1
  4. package/dist/cjs/grid/row/commons/getStyle.js +2 -1
  5. package/dist/cjs/grid/row/setting/configs/settings.js +21 -0
  6. package/dist/cjs/grid/row/setting/configs/uiV2.js +10 -4
  7. package/dist/cjs/helpers.js +31 -1
  8. package/dist/cjs/icon-list-v2/components/IconList.liquid.js +1 -0
  9. package/dist/cjs/image/components/Image.js +1 -1
  10. package/dist/cjs/image/components/Image.liquid.js +1 -1
  11. package/dist/cjs/image/components/common/classes.js +3 -1
  12. package/dist/cjs/image/helpers/getSrcSet.js +2 -1
  13. package/dist/cjs/image/setting/configs/settings.js +9 -0
  14. package/dist/cjs/index.js +2 -0
  15. package/dist/cjs/post-purchase/product/components/product-offer/common/classes.js +5 -1
  16. package/dist/cjs/product/components/ProductBundle/common/styles.js +2 -2
  17. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +1 -1
  18. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
  19. package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +2 -8
  20. package/dist/cjs/product/components/ProductImagesV2/common/common.js +1 -1
  21. package/dist/cjs/product/components/ProductVariants/index.liquid.js +8 -3
  22. package/dist/cjs/product/setting/constant/bundle-layout/horizontalThree.js +4 -6
  23. package/dist/cjs/product/setting/constant/bundle-layout/horizontalTwo.js +3 -5
  24. package/dist/cjs/product/setting/constant/bundle-layout/verticalThree.js +2 -1
  25. package/dist/cjs/product/setting/constant/bundle-layout/verticalTwo.js +2 -1
  26. package/dist/cjs/stock-counter/components/common/getContent.js +1 -1
  27. package/dist/cjs/text/components/Text.liquid.js +1 -0
  28. package/dist/cjs/text/components/common/getDisplayText.js +11 -20
  29. package/dist/cjs/third-party/components/EcomsendBackInStockAlert.liquid.js +8 -8
  30. package/dist/cjs/third-party/components/ProductOptionsVariantOption.js +2 -2
  31. package/dist/cjs/third-party/components/ProductOptionsVariantOption.liquid.js +2 -2
  32. package/dist/cjs/third-party/components/UnlimitedBundlesDiscounts.liquid.js +1 -1
  33. package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +1 -1
  34. package/dist/cjs/third-party/configs/NotifyBackInStockPreOrder.js +1 -1
  35. package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc/index.js +2 -2
  36. package/dist/cjs/third-party/setting/EcomsendBackInStockAlert/index.js +5 -0
  37. package/dist/cjs/third-party/setting/EcomsendBackInStockAlert/uiV1.js +14 -0
  38. package/dist/cjs/third-party/setting/EcomsendBackInStockAlert/uiV2.js +31 -0
  39. package/dist/cjs/third-party/setting/FlyBundlesUpsellsFbt/uiV1.js +5 -0
  40. package/dist/cjs/third-party/setting/NotifyBackInStockPreOrder/index.js +2 -2
  41. package/dist/cjs/third-party/setting/ProductOptionsVariantOption/index.js +1 -7
  42. package/dist/cjs/third-party/setting/ProductOptionsVariantOption/uiV1.js +0 -9
  43. package/dist/cjs/third-party/setting/ProductOptionsVariantOption/uiV2.js +0 -30
  44. package/dist/cjs/third-party/setting/RequestQuoteHidePrice/index.js +2 -1
  45. package/dist/cjs/third-party/setting/UnlimitedBundlesDiscounts/index.js +5 -1
  46. package/dist/cjs/third-party/setting/UnlimitedBundlesDiscounts/uiV1.js +9 -0
  47. package/dist/cjs/third-party/setting/UnlimitedBundlesDiscounts/uiV2.js +12 -0
  48. package/dist/esm/button/components/Button.js +4 -1
  49. package/dist/esm/carousel/carousel-item/common/getClass.js +1 -1
  50. package/dist/esm/grid/row/commons/getClass.js +1 -1
  51. package/dist/esm/grid/row/commons/getStyle.js +2 -1
  52. package/dist/esm/grid/row/setting/configs/settings.js +21 -0
  53. package/dist/esm/grid/row/setting/configs/uiV2.js +10 -4
  54. package/dist/esm/helpers.js +30 -2
  55. package/dist/esm/icon-list-v2/components/IconList.liquid.js +1 -0
  56. package/dist/esm/image/components/Image.js +1 -1
  57. package/dist/esm/image/components/Image.liquid.js +1 -1
  58. package/dist/esm/image/components/common/classes.js +4 -2
  59. package/dist/esm/image/helpers/getSrcSet.js +2 -1
  60. package/dist/esm/image/setting/configs/settings.js +9 -0
  61. package/dist/esm/index.js +1 -1
  62. package/dist/esm/post-purchase/product/components/product-offer/common/classes.js +5 -1
  63. package/dist/esm/product/components/ProductBundle/common/styles.js +2 -2
  64. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +1 -1
  65. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
  66. package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +2 -8
  67. package/dist/esm/product/components/ProductImagesV2/common/common.js +1 -1
  68. package/dist/esm/product/components/ProductVariants/index.liquid.js +8 -3
  69. package/dist/esm/product/setting/constant/bundle-layout/horizontalThree.js +4 -6
  70. package/dist/esm/product/setting/constant/bundle-layout/horizontalTwo.js +3 -5
  71. package/dist/esm/product/setting/constant/bundle-layout/verticalThree.js +2 -1
  72. package/dist/esm/product/setting/constant/bundle-layout/verticalTwo.js +2 -1
  73. package/dist/esm/stock-counter/components/common/getContent.js +1 -1
  74. package/dist/esm/text/components/Text.liquid.js +1 -0
  75. package/dist/esm/text/components/common/getDisplayText.js +12 -21
  76. package/dist/esm/third-party/components/EcomsendBackInStockAlert.liquid.js +8 -8
  77. package/dist/esm/third-party/components/ProductOptionsVariantOption.js +2 -2
  78. package/dist/esm/third-party/components/ProductOptionsVariantOption.liquid.js +2 -2
  79. package/dist/esm/third-party/components/UnlimitedBundlesDiscounts.liquid.js +1 -1
  80. package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +1 -1
  81. package/dist/esm/third-party/configs/NotifyBackInStockPreOrder.js +1 -1
  82. package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc/index.js +2 -2
  83. package/dist/esm/third-party/setting/EcomsendBackInStockAlert/index.js +5 -0
  84. package/dist/esm/third-party/setting/EcomsendBackInStockAlert/uiV1.js +14 -0
  85. package/dist/esm/third-party/setting/EcomsendBackInStockAlert/uiV2.js +31 -0
  86. package/dist/esm/third-party/setting/FlyBundlesUpsellsFbt/uiV1.js +5 -0
  87. package/dist/esm/third-party/setting/NotifyBackInStockPreOrder/index.js +2 -2
  88. package/dist/esm/third-party/setting/ProductOptionsVariantOption/index.js +1 -7
  89. package/dist/esm/third-party/setting/ProductOptionsVariantOption/uiV1.js +0 -9
  90. package/dist/esm/third-party/setting/ProductOptionsVariantOption/uiV2.js +0 -30
  91. package/dist/esm/third-party/setting/RequestQuoteHidePrice/index.js +2 -1
  92. package/dist/esm/third-party/setting/UnlimitedBundlesDiscounts/index.js +5 -1
  93. package/dist/esm/third-party/setting/UnlimitedBundlesDiscounts/uiV1.js +9 -0
  94. package/dist/esm/third-party/setting/UnlimitedBundlesDiscounts/uiV2.js +12 -0
  95. package/dist/types/index.d.ts +5 -1
  96. package/package.json +2 -2
@@ -86,7 +86,10 @@ const Button = (props)=>{
86
86
  className: buttonWrapperClasses,
87
87
  children: [
88
88
  /*#__PURE__*/ jsxRuntime.jsx("style", {
89
- children: customCss
89
+ type: "text/css",
90
+ dangerouslySetInnerHTML: {
91
+ __html: customCss
92
+ }
90
93
  }),
91
94
  system.If(isScrollToElement, // eslint-disable-next-line jsx-a11y/anchor-has-content
92
95
  /*#__PURE__*/ jsxRuntime.jsx("a", {
@@ -18,7 +18,7 @@ const getClass = (props)=>{
18
18
  }
19
19
  });
20
20
  const carouselItemInnerClass = system.createClass({
21
- 'gp-w-full': true
21
+ 'gp-w-full gp-h-full': true
22
22
  });
23
23
  return {
24
24
  carouselItemClass,
@@ -17,7 +17,7 @@ const getClass = (props)=>{
17
17
  ...builderProps?.uid && {
18
18
  [builderProps.uid]: true
19
19
  },
20
- 'gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full': true,
20
+ 'gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]': true,
21
21
  ...advanced?.cssClass && {
22
22
  [advanced?.cssClass]: true
23
23
  }
@@ -10,7 +10,7 @@ var helper = require('../../../post-purchase/utils/helper.js');
10
10
  const getRowStyle = (rowProps)=>{
11
11
  const { children, setting, builderProps, styles, style, advanced, isNotFullWidth, parentStyle } = rowProps;
12
12
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
13
- const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
13
+ const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding, height } = styles ?? {};
14
14
  const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
15
15
  const checkHasRadius = (corner)=>{
16
16
  const cornerNormal = corner?.normal;
@@ -51,6 +51,7 @@ const getRowStyle = (rowProps)=>{
51
51
  ...core.makeStyleResponsive('rg', verticalGutterMobile),
52
52
  ...layout ? core.composeGridLayout(layout) : core.makeStyleResponsive('gtc', responsive),
53
53
  ...core.makeStyleResponsive('w', sizeStyles.content),
54
+ ...core.makeStyleResponsive('h', height),
54
55
  ...isSection ? {} : overFlowStyle
55
56
  };
56
57
  };
@@ -187,6 +187,27 @@ const RowSettings = [
187
187
  }
188
188
  ]
189
189
  },
190
+ {
191
+ id: 'height',
192
+ type: 'option:value',
193
+ devices: {
194
+ desktop: {
195
+ default: 'auto'
196
+ }
197
+ },
198
+ options: [
199
+ {
200
+ label: 'Full',
201
+ value: '100%',
202
+ tooltip: 'Stretch to fill <br> vertical space'
203
+ },
204
+ {
205
+ label: 'Fit',
206
+ value: 'auto',
207
+ tooltip: 'Adjust size <br> based on content'
208
+ }
209
+ ]
210
+ },
190
211
  {
191
212
  id: 'verticalGutter',
192
213
  type: 'input:slider',
@@ -108,8 +108,15 @@ const SettingUIV2 = [
108
108
  en: 'Width',
109
109
  es: 'Ancho',
110
110
  cn: '宽度'
111
+ }
112
+ },
113
+ {
114
+ setting: {
115
+ id: 'height'
111
116
  },
112
- layout: 'horizontal'
117
+ label: {
118
+ en: 'Height'
119
+ }
113
120
  },
114
121
  {
115
122
  label: {
@@ -260,7 +267,6 @@ const SettingUIV2 = [
260
267
  label: {
261
268
  en: 'Align column'
262
269
  },
263
- conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))`,
264
270
  controls: [
265
271
  {
266
272
  id: 'verticalAlign',
@@ -270,7 +276,7 @@ const SettingUIV2 = [
270
276
  setting: {
271
277
  id: 'verticalAlign'
272
278
  },
273
- conditionDisplay: '!!layout.cols && layout.cols.length > 1'
279
+ conditionDisplay: `((!!layout.cols && layout.cols.length > 1) || (!!layout.cols && layout.cols.length == 1 && height == '100%')) && pageType != "POST_PURCHASE"`
274
280
  },
275
281
  {
276
282
  id: 'horizontalAlign',
@@ -280,7 +286,7 @@ const SettingUIV2 = [
280
286
  setting: {
281
287
  id: 'horizontalAlign'
282
288
  },
283
- conditionDisplay: `layout.display !== 'fill'`,
289
+ conditionDisplay: `layout.display !== 'fill' && pageType != "POST_PURCHASE"`,
284
290
  options: {
285
291
  disableMessage: `Horizontal Align is available when layout is "Fit to content"`
286
292
  }
@@ -66,6 +66,10 @@ const getStaticLocale = (tag, key)=>{
66
66
  const getSettingPreloadData = (disabledValue, enabledValue)=>{
67
67
  return `{% if section.settings.section_preload == "false" %}${disabledValue} ${enabledValue ? `{% else %}${enabledValue}` : ''}{% endif %}`;
68
68
  };
69
+ const getHttpUrl = (link)=>{
70
+ if (!link) return '';
71
+ return link.match(/^https?:\/\//i) ? link : `http://${link}`;
72
+ };
69
73
  const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
70
74
  const URL_START_WITH = [
71
75
  '#',
@@ -78,7 +82,7 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
78
82
  const isHyperlink = setting?.link !== undefined && setting.link !== '';
79
83
  let urlHref = setting?.link ?? '';
80
84
  const isHomePageHref = urlHref === '/';
81
- const regexHttp = new RegExp(/^https?:\/\//i);
85
+ const regexHttp = new RegExp(/^(?:https?:\/\/)?[\w.-]+\.[a-z]{2,}/i);
82
86
  const regexPageType = new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i);
83
87
  const isShopifyDomain = isHyperlink && !regexHttp.test(urlHref) && regexPageType.test(urlHref);
84
88
  const isDomain = isHyperlink && regexHttp.test(urlHref);
@@ -89,6 +93,7 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
89
93
  urlHref = "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
90
94
  }
91
95
  }
96
+ if (isDomain) urlHref = getHttpUrl(urlHref);
92
97
  const isLink = ()=>{
93
98
  if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
94
99
  if (URL_INCLUDES.find((el)=>urlHref.includes(el))) return true;
@@ -214,10 +219,34 @@ const convertUnitToNumber = (value, defaultValue)=>{
214
219
  const data = typeof value === 'string' ? value.replaceAll('px', '').replaceAll('%', '').replaceAll('rem', '').replaceAll('em', '') : defaultValue;
215
220
  return !isNaN(Number(data)) ? Number(data) : defaultValue;
216
221
  };
222
+ const getAllHrefFromString = (htmlString)=>{
223
+ if (!htmlString) return [];
224
+ const regex = /href="([^"]*)"/g;
225
+ const hrefs = [];
226
+ let match;
227
+ while((match = regex.exec(htmlString)) !== null){
228
+ match[1] && hrefs.push(match[1]);
229
+ }
230
+ return hrefs;
231
+ };
232
+ const replaceAllHrefFromString = (htmlString, hrefs)=>{
233
+ if (!htmlString) return '';
234
+ const regex = /href="([^"]*)"/g;
235
+ let match;
236
+ let i = 0;
237
+ while((match = regex.exec(htmlString)) !== null){
238
+ if (match[1]) {
239
+ htmlString = htmlString.replace(match[1], hrefs[i] ?? '');
240
+ i++;
241
+ }
242
+ }
243
+ return htmlString;
244
+ };
217
245
 
218
246
  exports.convertUnitToNumber = convertUnitToNumber;
219
247
  exports.filterTruthyObject = filterTruthyObject;
220
248
  exports.filterTruthyStyles = filterTruthyStyles;
249
+ exports.getAllHrefFromString = getAllHrefFromString;
221
250
  exports.getDisplayStyle = getDisplayStyle;
222
251
  exports.getDynamicSourceLocales = getDynamicSourceLocales;
223
252
  exports.getInsertLinkData = getInsertLinkData;
@@ -229,5 +258,6 @@ exports.isHexTransparent = isHexTransparent;
229
258
  exports.isLinkedToSalesPage = isLinkedToSalesPage;
230
259
  exports.isTransparentColor = isTransparentColor;
231
260
  exports.isTransparentRGBA = isTransparentRGBA;
261
+ exports.replaceAllHrefFromString = replaceAllHrefFromString;
232
262
  exports.replaceLinkData = replaceLinkData;
233
263
  exports.youtubeShortsRegex = youtubeShortsRegex;
@@ -58,6 +58,7 @@ const IconListV2 = (props)=>{
58
58
  setting
59
59
  });
60
60
  return core.template`
61
+ {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
61
62
  <gp-icon-list
62
63
  ${{
63
64
  ...attr
@@ -28,7 +28,7 @@ const Image = ({ style, styles: styles$1, setting, children, advanced, className
28
28
  const containerStyles = system.createStyle(styles.getContainerStyles(style, styles$1));
29
29
  const wrapperClasses = system.createClass(classes.getWrapperClasses());
30
30
  const imageClasses = system.createClass(classes.getImageClasses(className, styles$1));
31
- const containerClasses = system.createClass(classes.getContainerClasses(builderProps?.uid, advanced?.cssClass));
31
+ const containerClasses = system.createClass(classes.getContainerClasses(builderProps?.uid, advanced?.cssClass, styles$1?.shape));
32
32
  const containerAttrs = system.createAttr(attributes.getContainerAttrs(builderAttrs, builderProps?.uid));
33
33
  const linkWrapperAttrs = attributes.getLinkWrapperAttrs({
34
34
  urlData,
@@ -25,7 +25,7 @@ const Image = ({ style, styles: styles$1, setting, advanced, className, pageCont
25
25
  const containerStyles = system.createStyle(styles.getContainerStyles(style, styles$1));
26
26
  const wrapperClasses = system.createClass(classes.getWrapperClasses());
27
27
  const imageClasses = system.createClass(classes.getImageClasses(className, styles$1));
28
- const containerClasses = system.createClass(classes.getContainerClasses(builderProps?.uid, advanced?.cssClass));
28
+ const containerClasses = system.createClass(classes.getContainerClasses(builderProps?.uid, advanced?.cssClass, styles$1?.shape));
29
29
  const containerAttrs = system.createAttr(attributes.getContainerAttrs(builderAttrs, builderProps?.uid));
30
30
  const linkWrapperAttrs = attributes.getLinkWrapperAttrs({
31
31
  urlData,
@@ -2,10 +2,12 @@
2
2
 
3
3
  var core = require('@gem-sdk/core');
4
4
 
5
- const getContainerClasses = (uid, cssClass)=>{
5
+ const getContainerClasses = (uid, cssClass, shape)=>{
6
+ const imageFlexGrowClass = core.getFlexGrowClassByShapeGlobalSize(shape);
6
7
  return {
7
8
  'gp-group/image gp-relative': true,
8
9
  [`force-publish-${new Date().getTime()}`]: true,
10
+ ...imageFlexGrowClass,
9
11
  ...uid && {
10
12
  [uid]: true
11
13
  },
@@ -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;
34
+ // return `${link} 768w,${link} 1024w,${link} 1440w`; // Since image src didn't change in size so this line of code is pointless
34
35
  };
35
36
  const getImageSrc = (image, currentDevice, isNotLiquid)=>{
36
37
  if (image?.metafieldDefinitionKey) {
@@ -200,6 +200,15 @@ const ImageSettings = [
200
200
  displayOptions: [
201
201
  'full'
202
202
  ]
203
+ },
204
+ height: {
205
+ displayOptions: [
206
+ 'full'
207
+ ],
208
+ units: [
209
+ 'px',
210
+ '%'
211
+ ]
203
212
  }
204
213
  },
205
214
  hiddenSettings: [
package/dist/cjs/index.js CHANGED
@@ -390,6 +390,7 @@ exports.ELEMENT_Z_INDEX = _const.ELEMENT_Z_INDEX;
390
390
  exports.convertUnitToNumber = helpers.convertUnitToNumber;
391
391
  exports.filterTruthyObject = helpers.filterTruthyObject;
392
392
  exports.filterTruthyStyles = helpers.filterTruthyStyles;
393
+ exports.getAllHrefFromString = helpers.getAllHrefFromString;
393
394
  exports.getDisplayStyle = helpers.getDisplayStyle;
394
395
  exports.getDynamicSourceLocales = helpers.getDynamicSourceLocales;
395
396
  exports.getInsertLinkData = helpers.getInsertLinkData;
@@ -401,6 +402,7 @@ exports.isHexTransparent = helpers.isHexTransparent;
401
402
  exports.isLinkedToSalesPage = helpers.isLinkedToSalesPage;
402
403
  exports.isTransparentColor = helpers.isTransparentColor;
403
404
  exports.isTransparentRGBA = helpers.isTransparentRGBA;
405
+ exports.replaceAllHrefFromString = helpers.replaceAllHrefFromString;
404
406
  exports.replaceLinkData = helpers.replaceLinkData;
405
407
  exports.youtubeShortsRegex = helpers.youtubeShortsRegex;
406
408
  exports.Accordion = Accordion.default;
@@ -15,8 +15,12 @@ const getProductOfferWrapperClasses = ()=>{
15
15
  const getProductOfferItemClasses = (index, setting, totalProduct)=>{
16
16
  const { productOfferLayout } = setting ?? {};
17
17
  let className = '';
18
- constants.DEVICES.map((device)=>{
18
+ constants.DEVICES.forEach((device)=>{
19
19
  const key = device === 'desktop' ? '' : `${device}:`;
20
+ if (device === 'mobile') {
21
+ className += ` mobile:gp-col-span-2`;
22
+ return;
23
+ }
20
24
  if (productOfferLayout?.[device] === '1col' && index % 3 === 0 || (totalProduct || 0) <= 1) {
21
25
  className += ` ${key}gp-col-span-2`;
22
26
  }
@@ -61,11 +61,11 @@ const getSvgActiveStyles = (styles)=>{
61
61
  })
62
62
  };
63
63
  };
64
- const getSvgStyles = (settings, styles)=>{
64
+ const getSvgStyles = (styles)=>{
65
65
  return {
66
66
  ...core.getGlobalColorStateStyle('c', {
67
67
  ...styles?.iconColor,
68
- normal: settings?.iconItemColor ? settings?.iconItemColor : styles?.iconColor?.normal
68
+ normal: styles?.iconColor?.normal
69
69
  })
70
70
  };
71
71
  };
@@ -15,7 +15,7 @@ const ProductBundleDiscountChildrenItem = (props)=>{
15
15
  const composeLayoutClasses = system.createClass(classes.getLayoutClasses(setting));
16
16
  const composeIconStyles = system.createStyle(styles.getIconStyles(setting));
17
17
  const composeSvgActiveStyles = system.createStyle(styles.getSvgActiveStyles(styles$1));
18
- const composeSvgStyles = system.createStyle(styles.getSvgStyles(setting, styles$1));
18
+ const composeSvgStyles = system.createStyle(styles.getSvgStyles(styles$1));
19
19
  const composeIconSectionClasses = system.createClass(classes.getIconSectionClasses);
20
20
  const composeItemClasses = system.createClass(classes.getItemClasses);
21
21
  const composeFlexChildren = system.createClass(styles.getFlexChildren);
@@ -13,7 +13,7 @@ const ProductBundleDiscountChildrenItemLiquid = (props)=>{
13
13
  const composeLayoutClasses = system.createClass(classes.getLayoutClasses(setting));
14
14
  const composeIconStyles = system.createStyle(styles.getIconStyles(setting));
15
15
  const composeSvgActiveStyles = system.createStyle(styles.getSvgActiveStyles(styles$1));
16
- const composeSvgStyles = system.createStyle(styles.getSvgStyles(setting, styles$1));
16
+ const composeSvgStyles = system.createStyle(styles.getSvgStyles(styles$1));
17
17
  const composeIconSectionClasses = system.createClass(classes.getIconSectionClasses);
18
18
  const composeItemClasses = system.createClass(classes.getItemClasses);
19
19
  const composeFlexChildren = system.createClass(styles.getFlexChildren);
@@ -434,10 +434,7 @@ const config = {
434
434
  childItem: [],
435
435
  layout: 'vertical-layout'
436
436
  },
437
- childrens: [],
438
- advanced: {
439
- of: 'hidden'
440
- }
437
+ childrens: []
441
438
  }
442
439
  ]
443
440
  },
@@ -467,10 +464,7 @@ const config = {
467
464
  layout: 'horizontal-layout',
468
465
  enableIcon: false
469
466
  },
470
- childrens: [],
471
- advanced: {
472
- of: 'hidden'
473
- }
467
+ childrens: []
474
468
  }
475
469
  ]
476
470
  }
@@ -335,7 +335,7 @@ const getPaddingBottomByShapeSetting = (shapeSetting)=>{
335
335
  };
336
336
  return;
337
337
  }
338
- const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('').reverse().join('') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
338
+ const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('/').reverse().join('') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
339
339
  result = {
340
340
  ...result,
341
341
  [device]: `calc((${value})*100%)`
@@ -22,11 +22,16 @@ const DEVICES = [
22
22
  'tablet',
23
23
  'mobile'
24
24
  ];
25
+ const DEFAULT_ADVANCED_DISPLAY_SETTING = {
26
+ desktop: true,
27
+ tablet: true,
28
+ mobile: true
29
+ };
25
30
  const ProductVariants = (props)=>{
26
31
  const { builderProps, styles: styles$1, setting, advanced } = props;
27
32
  const { align, swatchItemWidth, dropdownItemWidth, swatchSpacing, optionTypo } = styles$1 ?? {};
28
33
  const { label, optionType, showAsSwatches, layout, hasPreSelected } = setting ?? {};
29
- const advancedDisplay = advanced?.d;
34
+ const advancedDisplay = advanced?.d ?? DEFAULT_ADVANCED_DISPLAY_SETTING;
30
35
  const { uid } = builderProps ?? {};
31
36
  const variantGroup = optionType === 'groupOption';
32
37
  const getSwatchAutoWidth = ()=>{
@@ -243,7 +248,7 @@ const ProductVariants = (props)=>{
243
248
  productId: `{{ product.id | json | escape }}`,
244
249
  productUrl: `{{ product.url | json | escape }}`,
245
250
  productHandle: `{{ product.handle | json | escape }}`,
246
- displayState: advancedDisplay,
251
+ displayState: `${JSON.stringify(advancedDisplay)}`,
247
252
  totalVariantCombinations: `{{ total_combinations }}`,
248
253
  firstAvailableVariant: `{{ product.selected_or_first_available_variant | json | escape }}`
249
254
  });
@@ -283,7 +288,7 @@ const ProductVariants = (props)=>{
283
288
  '>
284
289
  ${system.Liquid(`{%- assign options = product.options_with_values -%}`)}
285
290
  ${system.Liquid(`{%- assign variants = product.variants -%}`)}
286
- ${system.LiquidIf(`options.size == 0 or options.size == 1 and options[0].name == 'Title' and options[0].values.size == 1 and options[0].values[0] == 'Default Title'`, `<div></div>`, core.template`<div
291
+ ${system.LiquidIf(`options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'`, `<div></div>`, core.template`<div
287
292
  class="${pVariantClass}"
288
293
  style="${pVariantStyle}"
289
294
  >
@@ -14,7 +14,7 @@ const horizontalThree = [
14
14
  tablet: true
15
15
  },
16
16
  editorData: {
17
- css: '.{{rootClassName}} > div > div,.g5t77h4sjA gp-product-badge > div > div{\nwidth:100% !important;\n}',
17
+ css: '.{{rootClassName}} > div > div{\nwidth:100%;\n}',
18
18
  rootClassName: '{{rootClassName}}'
19
19
  },
20
20
  hasBoxShadow: {
@@ -29,7 +29,7 @@ const horizontalThree = [
29
29
  desktop: '100%'
30
30
  },
31
31
  pos: {
32
- desktop: 'absolute'
32
+ desktop: 'static'
33
33
  },
34
34
  right: {
35
35
  desktop: '0px'
@@ -52,9 +52,6 @@ const horizontalThree = [
52
52
  }
53
53
  }
54
54
  },
55
- top: {
56
- desktop: '-44px'
57
- },
58
55
  z: {
59
56
  desktop: 1
60
57
  }
@@ -154,7 +151,8 @@ const horizontalThree = [
154
151
  }
155
152
  },
156
153
  tag: 'ProductBadge',
157
- uid: 'gaWpBvn_TG'
154
+ uid: 'gHRinlrdow',
155
+ childrens: []
158
156
  },
159
157
  {
160
158
  advanced: {
@@ -28,7 +28,7 @@ const horizontalTwo = [
28
28
  desktop: '100%'
29
29
  },
30
30
  pos: {
31
- desktop: 'absolute'
31
+ desktop: 'static'
32
32
  },
33
33
  right: {
34
34
  desktop: '0px'
@@ -51,9 +51,6 @@ const horizontalTwo = [
51
51
  }
52
52
  }
53
53
  },
54
- top: {
55
- desktop: '-44px'
56
- },
57
54
  z: {
58
55
  desktop: 1
59
56
  }
@@ -153,7 +150,8 @@ const horizontalTwo = [
153
150
  }
154
151
  },
155
152
  tag: 'ProductBadge',
156
- uid: 'gPMEqW9TKV'
153
+ uid: 'gHRinlrdow',
154
+ childrens: []
157
155
  },
158
156
  {
159
157
  advanced: {
@@ -291,7 +291,8 @@ const verticalThree = [
291
291
  }
292
292
  },
293
293
  tag: 'ProductBadge',
294
- uid: 'gPMEqW9TKV'
294
+ uid: 'gHRinlrdow',
295
+ childrens: []
295
296
  },
296
297
  {
297
298
  childrens: [
@@ -291,7 +291,8 @@ const verticalTwo = [
291
291
  }
292
292
  },
293
293
  tag: 'ProductBadge',
294
- uid: 'gPMEqW9TKV'
294
+ uid: 'gHRinlrdow',
295
+ childrens: []
295
296
  },
296
297
  {
297
298
  childrens: [
@@ -8,7 +8,7 @@ const getLiquidTextContent = (setting, styles)=>{
8
8
  const { template: templateString, outOfStockMessage, continueSelling, unlimitedQuantityMessage } = setting ?? {};
9
9
  const { textColor } = styles ?? {};
10
10
  const mainColor = textColor || 'brand';
11
- return `{% if inventory_management == null or inventory_management != "shopify" and inventory_quantity <= 0 %}
11
+ return `{% if inventory_management == null and inventory_quantity <= 0 %}
12
12
  ${helpers.transformHighlighTag(unlimitedQuantityMessage ?? helpers$1.getStaticLocale('StockCounter', 'let_buy_now'), mainColor)}
13
13
  {% elsif available == false %}
14
14
  ${helpers.transformHighlighTag(outOfStockMessage || '', mainColor)}
@@ -62,6 +62,7 @@ const Text = ({ id, styles, builderAttrs, style, setting, advanced, builderProps
62
62
  });
63
63
  const outputText = system.createContent(displayText);
64
64
  return core.template`
65
+ {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
65
66
  <div ${{
66
67
  ...attrs
67
68
  }}
@@ -5,24 +5,11 @@ var helpers = require('../../../helpers.js');
5
5
  const getDisplayText = ({ type, styles, setting, builderProps, pageContext })=>{
6
6
  const { text, isForceValue } = setting ?? {};
7
7
  let displayText = '';
8
- let renderText = '';
9
- const regexCheckHasTagLink = /<a\s[^>]*>.*?<\/a>/;
10
- if (text && regexCheckHasTagLink.test(text)) {
11
- const regex = // eslint-disable-next-line regexp/no-super-linear-backtracking, regexp/no-unused-capturing-group
12
- /<a\s+(?:[^>]*?\s+)?href=["']([^"']*)["'](?:\s+[^>]*?)?(?:target=["']([^"']*)["'])?.*?>.*?<\/a>/gi;
13
- let newText = text.toString();
14
- let match;
15
- while((match = regex.exec(newText)) !== null){
16
- const href = match[1];
17
- const { urlData } = helpers.getInsertLinkData('', {
18
- link: href
19
- });
20
- newText = newText.replace(match[0], match[0].replace(/(href=['"])([^'"]*)(['"])/i, `$1${urlData.href}$3`));
21
- }
22
- renderText = newText;
23
- } else {
24
- renderText = text;
25
- }
8
+ const isViewliveHeadingOrTextComponent = [
9
+ 'Heading',
10
+ 'Text'
11
+ ].includes(builderProps?.builderData?.tag ?? '') && !pageContext?.isPreviewing;
12
+ const renderText = helpers.replaceLinkData(text?.toString());
26
13
  const isCapitalize = styles?.typo?.attrs?.transform === 'capitalize';
27
14
  if (type === 'React') {
28
15
  displayText = isCapitalize ? text?.toString().toLocaleLowerCase() : text?.toString();
@@ -31,13 +18,17 @@ const getDisplayText = ({ type, styles, setting, builderProps, pageContext })=>{
31
18
  displayText = renderText;
32
19
  } else if (setting?.translate) {
33
20
  displayText = helpers.getDynamicSourceLocales({
34
- val: renderText,
21
+ val: text,
35
22
  uid: builderProps?.uid,
36
23
  settingId: setting?.translate,
37
24
  pageContext,
38
25
  isCapitalize,
39
- translate: setting.translate
26
+ translate: setting.translate,
27
+ isReplaceLocationOrigin: isViewliveHeadingOrTextComponent
40
28
  });
29
+ if (displayText == text) {
30
+ displayText = renderText;
31
+ }
41
32
  } else {
42
33
  displayText = isCapitalize ? renderText?.toString().toLocaleLowerCase() : renderText;
43
34
  }
@@ -5,17 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var core = require('@gem-sdk/core');
6
6
 
7
7
  const EcomsendBackInStockAlert = ({ setting, advanced })=>{
8
- const { align } = setting ?? {};
8
+ const { align, productId } = setting ?? {};
9
9
  return core.template`
10
- <div
11
- class="${advanced?.cssClass}"
12
- style="${{
10
+ <div
11
+ class="${advanced?.cssClass}"
12
+ style="${{
13
13
  ...core.makeStyleResponsive('ta', align)
14
14
  }}"
15
- >
16
- <div id="sealapps-bis-widget"></div>
17
- </div>
18
- `;
15
+ >
16
+ ${productId ? `<div style="display: block" class="ecomsend-bis-block" data-product-id="${productId}"></div>` : `<div id="sealapps-bis-widget"></div>`}
17
+ </div>
18
+ `;
19
19
  };
20
20
 
21
21
  exports.default = EcomsendBackInStockAlert;
@@ -8,7 +8,7 @@ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
8
 
9
9
  const AppConfig = {
10
10
  id: 'product-options-variant-option',
11
- label: 'Product Options Variant Option',
11
+ label: 'Avis Product Options, Variants',
12
12
  logoUrl: 'https://cdn.shopify.com/app-store/listing_images/5ee1f244b087cfbec9b19c8b3f62c8f6/icon/CMCq1s7J5vQCEAE=.png',
13
13
  tag: 'ProductOptionsVariantOption'
14
14
  };
@@ -18,7 +18,7 @@ const ProductOptionsVariantOptionContent = ()=>{
18
18
  className: "gp-p-2",
19
19
  children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
20
20
  setting: {
21
- label: 'Product Options Variant Option',
21
+ label: 'Avis Product Options, Variants',
22
22
  iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
23
23
  }
24
24
  })
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var core = require('@gem-sdk/core');
6
6
 
7
7
  const ProductOptionsVariantOption = ({ setting, advanced })=>{
8
- const { align, idTrigger } = setting ?? {};
8
+ const { align } = setting ?? {};
9
9
  return core.template`
10
10
  <div
11
11
  class="${advanced?.cssClass}"
@@ -13,7 +13,7 @@ const ProductOptionsVariantOption = ({ setting, advanced })=>{
13
13
  ...core.makeStyleResponsive('ta', align)
14
14
  }}"
15
15
  >
16
- <div class="${idTrigger?.replace('.', '')}"></div>
16
+ <div class="avpoptions-container__v2"></div>
17
17
  </div>
18
18
  `;
19
19
  };
@@ -6,7 +6,7 @@ var thirdParty = require('../helpers/thirdParty.js');
6
6
 
7
7
  const UnlimitedBundlesDiscounts = ({ 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 = UnlimitedBundlesDiscounts;