@gem-sdk/components 2.1.27-staging.0 → 2.1.27-staging.1

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.
@@ -47,7 +47,7 @@ const getDynamicSourceLocales = ({ val, uid, settingId, isLiquid, pageContext, i
47
47
  locale += ` | replace: '$locationOrigin', locationOrigin`;
48
48
  }
49
49
  if (isReplaceInventoryQuantity) {
50
- locale += ` | replace: '$quantity$', inventory_quantity`;
50
+ locale += ` | replace: '<$quantity$>', inventory_quantity`;
51
51
  }
52
52
  if (isCapitalize) {
53
53
  locale = `${locale} | downcase`;
@@ -145,10 +145,10 @@ const StockCounter = ({ setting, styles, style, advanced, builderProps, pageCont
145
145
  ${icon}</div>
146
146
  `)}
147
147
  <div class="gp-hidden gp-text-white gp-py-1 gp-px-2 gp-mr-1 gp-inline-block gp-my-[1px] gp-text-g-${mainColor} gp-bg-g-${mainColor}" >
148
- <div id="template">{{ section.settings.gg9aeXbilgC_template | replace: '$quantity$', inventory_quantity }}</div>
149
- <div id="out-of-stock-message">{{ section.settings.gg9aeXbilgC_outOfStockMessage }}</div>
150
- <div id="continue-selling">{{ section.settings.gg9aeXbilgC_continueSelling }}</div>
151
- <div id="unlimited-quantity-message">{{ section.settings.gg9aeXbilgC_unlimitedQuantityMessage }}</div>
148
+ <div id="template">${templateStringDisplay}</div>
149
+ <div id="out-of-stock-message">${outOfStockMessageDisplay}</div>
150
+ <div id="continue-selling">${continueSellingDisplay}</div>
151
+ <div id="unlimited-quantity-message">${unlimitedQuantityMessageDisplay}</div>
152
152
  </div>
153
153
  <p
154
154
  data-slot-type="message"
@@ -28,13 +28,13 @@ const transformNumberTag = (template, stringColor, quantityLeft)=>{
28
28
  let quantityTag = '';
29
29
  // Is hex color
30
30
  if (stringColor.includes('#')) {
31
- quantityTag = `<span style='--c: ${stringColor}'>$quantity$</span>`;
31
+ quantityTag = `<span style='--c: ${stringColor}'><$quantity$></span>`;
32
32
  } else {
33
33
  // Is global style color
34
- quantityTag = `<span class='gp-text-g-${stringColor}'>$quantity$</span>`;
34
+ quantityTag = `<span class='gp-text-g-${stringColor}'><$quantity$></span>`;
35
35
  }
36
36
  if (quantityLeft) {
37
- quantityTag = quantityTag.replace('$quantity$', quantityLeft.toString());
37
+ quantityTag = quantityTag.replace('<$quantity$>', quantityLeft.toString());
38
38
  }
39
39
  return template.replaceAll(_const.DEFAULT_QUANTITY_TEMPLATE, quantityTag);
40
40
  };
@@ -45,7 +45,7 @@ const getDynamicSourceLocales = ({ val, uid, settingId, isLiquid, pageContext, i
45
45
  locale += ` | replace: '$locationOrigin', locationOrigin`;
46
46
  }
47
47
  if (isReplaceInventoryQuantity) {
48
- locale += ` | replace: '$quantity$', inventory_quantity`;
48
+ locale += ` | replace: '<$quantity$>', inventory_quantity`;
49
49
  }
50
50
  if (isCapitalize) {
51
51
  locale = `${locale} | downcase`;
@@ -141,10 +141,10 @@ const StockCounter = ({ setting, styles, style, advanced, builderProps, pageCont
141
141
  ${icon}</div>
142
142
  `)}
143
143
  <div class="gp-hidden gp-text-white gp-py-1 gp-px-2 gp-mr-1 gp-inline-block gp-my-[1px] gp-text-g-${mainColor} gp-bg-g-${mainColor}" >
144
- <div id="template">{{ section.settings.gg9aeXbilgC_template | replace: '$quantity$', inventory_quantity }}</div>
145
- <div id="out-of-stock-message">{{ section.settings.gg9aeXbilgC_outOfStockMessage }}</div>
146
- <div id="continue-selling">{{ section.settings.gg9aeXbilgC_continueSelling }}</div>
147
- <div id="unlimited-quantity-message">{{ section.settings.gg9aeXbilgC_unlimitedQuantityMessage }}</div>
144
+ <div id="template">${templateStringDisplay}</div>
145
+ <div id="out-of-stock-message">${outOfStockMessageDisplay}</div>
146
+ <div id="continue-selling">${continueSellingDisplay}</div>
147
+ <div id="unlimited-quantity-message">${unlimitedQuantityMessageDisplay}</div>
148
148
  </div>
149
149
  <p
150
150
  data-slot-type="message"
@@ -26,13 +26,13 @@ const transformNumberTag = (template, stringColor, quantityLeft)=>{
26
26
  let quantityTag = '';
27
27
  // Is hex color
28
28
  if (stringColor.includes('#')) {
29
- quantityTag = `<span style='--c: ${stringColor}'>$quantity$</span>`;
29
+ quantityTag = `<span style='--c: ${stringColor}'><$quantity$></span>`;
30
30
  } else {
31
31
  // Is global style color
32
- quantityTag = `<span class='gp-text-g-${stringColor}'>$quantity$</span>`;
32
+ quantityTag = `<span class='gp-text-g-${stringColor}'><$quantity$></span>`;
33
33
  }
34
34
  if (quantityLeft) {
35
- quantityTag = quantityTag.replace('$quantity$', quantityLeft.toString());
35
+ quantityTag = quantityTag.replace('<$quantity$>', quantityLeft.toString());
36
36
  }
37
37
  return template.replaceAll(DEFAULT_QUANTITY_TEMPLATE, quantityTag);
38
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.27-staging.0",
3
+ "version": "2.1.27-staging.1",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",