@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.
- package/dist/cjs/helpers.js +1 -1
- package/dist/cjs/stock-counter/components/StockCounter.liquid.js +4 -4
- package/dist/cjs/stock-counter/helpers.js +3 -3
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +4 -4
- package/dist/esm/stock-counter/helpers.js +3 -3
- package/package.json +1 -1
package/dist/cjs/helpers.js
CHANGED
|
@@ -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: '
|
|
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"
|
|
149
|
-
<div id="out-of-stock-message"
|
|
150
|
-
<div id="continue-selling"
|
|
151
|
-
<div id="unlimited-quantity-message"
|
|
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}'
|
|
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}'
|
|
34
|
+
quantityTag = `<span class='gp-text-g-${stringColor}'><$quantity$></span>`;
|
|
35
35
|
}
|
|
36
36
|
if (quantityLeft) {
|
|
37
|
-
quantityTag = quantityTag.replace('
|
|
37
|
+
quantityTag = quantityTag.replace('<$quantity$>', quantityLeft.toString());
|
|
38
38
|
}
|
|
39
39
|
return template.replaceAll(_const.DEFAULT_QUANTITY_TEMPLATE, quantityTag);
|
|
40
40
|
};
|
package/dist/esm/helpers.js
CHANGED
|
@@ -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: '
|
|
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"
|
|
145
|
-
<div id="out-of-stock-message"
|
|
146
|
-
<div id="continue-selling"
|
|
147
|
-
<div id="unlimited-quantity-message"
|
|
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}'
|
|
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}'
|
|
32
|
+
quantityTag = `<span class='gp-text-g-${stringColor}'><$quantity$></span>`;
|
|
33
33
|
}
|
|
34
34
|
if (quantityLeft) {
|
|
35
|
-
quantityTag = quantityTag.replace('
|
|
35
|
+
quantityTag = quantityTag.replace('<$quantity$>', quantityLeft.toString());
|
|
36
36
|
}
|
|
37
37
|
return template.replaceAll(DEFAULT_QUANTITY_TEMPLATE, quantityTag);
|
|
38
38
|
};
|