@gem-sdk/components 2.1.13-staging.30 → 2.1.13-staging.32

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.
@@ -46,14 +46,13 @@ const ProductBadge = ({ styles, builderProps, isInsideProductImage, builderAttrs
46
46
  });
47
47
  return core.template`
48
48
  {% if product %}
49
- ${generateLiquidContent.generateBadgeContent(displayContent, pageContext.isPreviewing)}
49
+ ${generateLiquidContent.generateBadgeContent(displayContentVal, pageContext?.isPreviewing)}
50
50
  ${renderBadgeLiquid.renderBadgeInFirstTime(setting?.displayTrigger, isDiscountContent, isTextBadge)}
51
51
  <gp-product-badge
52
52
  data-id="${builderProps?.uid}"
53
53
  class="gp-product-badge !gp-max-w-none gp-shrink-0 ${builderProps?.uid} ${builderProps?.builderData?.advanced?.cssClass || ''} {{className}}"
54
54
  id="g-product-badge-${builderProps?.uid}"
55
55
  gp-data='${core.dataStringify({
56
- displayContent: `${pageContext?.isPreviewing ? displayContentVal : `{{${displayContentVal}}}`}`,
57
56
  minPrice: '{{ minPriceValue }}',
58
57
  variantIDs: '{{ product.variants | map: "id" | json | escape }}',
59
58
  variantInventoryQuantities: '{{ product.variants | map: "inventory_quantity" | json | escape }}',
@@ -76,6 +75,7 @@ const ProductBadge = ({ styles, builderProps, isInsideProductImage, builderAttrs
76
75
  ...sizeStyles
77
76
  } : {}, style)
78
77
  }}"
78
+ data-displayContent="${pageContext?.isPreviewing ? displayContentVal : `{{${displayContentVal}}}`}"
79
79
  >
80
80
  <div class="${shapeAlignClass} ${isDropOutsideProductImage && isTextBadge ? '' : 'gp-h-full'}">
81
81
  <div
@@ -42,14 +42,13 @@ const ProductBadge = ({ styles, builderProps, isInsideProductImage, builderAttrs
42
42
  });
43
43
  return template`
44
44
  {% if product %}
45
- ${generateBadgeContent(displayContent, pageContext.isPreviewing)}
45
+ ${generateBadgeContent(displayContentVal, pageContext?.isPreviewing)}
46
46
  ${renderBadgeInFirstTime(setting?.displayTrigger, isDiscountContent, isTextBadge)}
47
47
  <gp-product-badge
48
48
  data-id="${builderProps?.uid}"
49
49
  class="gp-product-badge !gp-max-w-none gp-shrink-0 ${builderProps?.uid} ${builderProps?.builderData?.advanced?.cssClass || ''} {{className}}"
50
50
  id="g-product-badge-${builderProps?.uid}"
51
51
  gp-data='${dataStringify({
52
- displayContent: `${pageContext?.isPreviewing ? displayContentVal : `{{${displayContentVal}}}`}`,
53
52
  minPrice: '{{ minPriceValue }}',
54
53
  variantIDs: '{{ product.variants | map: "id" | json | escape }}',
55
54
  variantInventoryQuantities: '{{ product.variants | map: "inventory_quantity" | json | escape }}',
@@ -72,6 +71,7 @@ const ProductBadge = ({ styles, builderProps, isInsideProductImage, builderAttrs
72
71
  ...sizeStyles
73
72
  } : {}, style)
74
73
  }}"
74
+ data-displayContent="${pageContext?.isPreviewing ? displayContentVal : `{{${displayContentVal}}}`}"
75
75
  >
76
76
  <div class="${shapeAlignClass} ${isDropOutsideProductImage && isTextBadge ? '' : 'gp-h-full'}">
77
77
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.13-staging.30",
3
+ "version": "2.1.13-staging.32",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",