@gem-sdk/components 2.1.3 → 2.1.4
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/article/components/ArticleDate.js +2 -2
- package/dist/cjs/article/components/ArticleDate.liquid.js +1 -1
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/stock-counter/components/StockCounter.liquid.js +1 -1
- package/dist/cjs/third-party/components/BoldSubscriptions.liquid.js +1 -1
- package/dist/esm/article/components/ArticleDate.js +2 -2
- package/dist/esm/article/components/ArticleDate.liquid.js +1 -1
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +1 -1
- package/dist/esm/third-party/components/BoldSubscriptions.liquid.js +1 -1
- package/package.json +2 -2
|
@@ -18,11 +18,11 @@ const ArticleDate = ({ setting, builderProps, styles })=>{
|
|
|
18
18
|
}));
|
|
19
19
|
};
|
|
20
20
|
const formattedDate = React.useMemo(()=>{
|
|
21
|
-
const date = convertTZ(new Date(article.
|
|
21
|
+
const date = convertTZ(new Date(article.publishedAt), timezone ?? '');
|
|
22
22
|
const { locales, options } = JSON.parse(dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}');
|
|
23
23
|
return date.toLocaleDateString(locales, options);
|
|
24
24
|
}, [
|
|
25
|
-
article.
|
|
25
|
+
article.publishedAt,
|
|
26
26
|
timezone,
|
|
27
27
|
dateFormat
|
|
28
28
|
]);
|
|
@@ -20,7 +20,7 @@ const ArticleDate = ({ setting, styles, advanced, builderProps })=>{
|
|
|
20
20
|
styles: styles,
|
|
21
21
|
setting: {
|
|
22
22
|
...setting,
|
|
23
|
-
text: `{{ article.
|
|
23
|
+
text: `{{ article.published_at | date: '${FORMAT_MAP[dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}']}' }}`,
|
|
24
24
|
excludeFlex: true
|
|
25
25
|
},
|
|
26
26
|
advanced: advanced,
|
|
@@ -120,7 +120,7 @@ const StockCounter = ({ setting, styles, style, advanced, builderProps })=>{
|
|
|
120
120
|
class="${appendTypoClass} gp-stock-counter-mark"
|
|
121
121
|
style="${appendTypoStyle}"
|
|
122
122
|
>
|
|
123
|
-
{% if inventory_management == null
|
|
123
|
+
{% if inventory_management == null and inventory_quantity <= 0 %}
|
|
124
124
|
${helpers.transformHighlighTag(unlimitedQuantityMessage ?? helpers$1.getStaticLocale('StockCounter', 'let_buy_now'), mainColor)}
|
|
125
125
|
{% elsif available == false %}
|
|
126
126
|
${helpers.transformHighlighTag(outOfStockMessage || '', mainColor)}
|
|
@@ -19,7 +19,7 @@ const BoldSubscriptions = ({ setting, advanced })=>{
|
|
|
19
19
|
{% else %}
|
|
20
20
|
{% assign app_blocks = section.blocks | where: "type", "@app" %}
|
|
21
21
|
{% for block in app_blocks %}
|
|
22
|
-
{% if block.type == '@app' and block.id
|
|
22
|
+
{% if block.type == '@app' and block.id contains '${appBlockId}' %}
|
|
23
23
|
{% render block %}
|
|
24
24
|
{% endif %}
|
|
25
25
|
{% endfor %}
|
|
@@ -14,11 +14,11 @@ const ArticleDate = ({ setting, builderProps, styles })=>{
|
|
|
14
14
|
}));
|
|
15
15
|
};
|
|
16
16
|
const formattedDate = useMemo(()=>{
|
|
17
|
-
const date = convertTZ(new Date(article.
|
|
17
|
+
const date = convertTZ(new Date(article.publishedAt), timezone ?? '');
|
|
18
18
|
const { locales, options } = JSON.parse(dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}');
|
|
19
19
|
return date.toLocaleDateString(locales, options);
|
|
20
20
|
}, [
|
|
21
|
-
article.
|
|
21
|
+
article.publishedAt,
|
|
22
22
|
timezone,
|
|
23
23
|
dateFormat
|
|
24
24
|
]);
|
|
@@ -16,7 +16,7 @@ const ArticleDate = ({ setting, styles, advanced, builderProps })=>{
|
|
|
16
16
|
styles: styles,
|
|
17
17
|
setting: {
|
|
18
18
|
...setting,
|
|
19
|
-
text: `{{ article.
|
|
19
|
+
text: `{{ article.published_at | date: '${FORMAT_MAP[dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}']}' }}`,
|
|
20
20
|
excludeFlex: true
|
|
21
21
|
},
|
|
22
22
|
advanced: advanced,
|
|
@@ -116,7 +116,7 @@ const StockCounter = ({ setting, styles, style, advanced, builderProps })=>{
|
|
|
116
116
|
class="${appendTypoClass} gp-stock-counter-mark"
|
|
117
117
|
style="${appendTypoStyle}"
|
|
118
118
|
>
|
|
119
|
-
{% if inventory_management == null
|
|
119
|
+
{% if inventory_management == null and inventory_quantity <= 0 %}
|
|
120
120
|
${transformHighlighTag(unlimitedQuantityMessage ?? getStaticLocale('StockCounter', 'let_buy_now'), mainColor)}
|
|
121
121
|
{% elsif available == false %}
|
|
122
122
|
${transformHighlighTag(outOfStockMessage || '', mainColor)}
|
|
@@ -15,7 +15,7 @@ const BoldSubscriptions = ({ setting, advanced })=>{
|
|
|
15
15
|
{% else %}
|
|
16
16
|
{% assign app_blocks = section.blocks | where: "type", "@app" %}
|
|
17
17
|
{% for block in app_blocks %}
|
|
18
|
-
{% if block.type == '@app' and block.id
|
|
18
|
+
{% if block.type == '@app' and block.id contains '${appBlockId}' %}
|
|
19
19
|
{% render block %}
|
|
20
20
|
{% endif %}
|
|
21
21
|
{% endfor %}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"format": "prettier --write \"./src/**/*.{ts,tsx}\""
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@gem-sdk/core": "2.1.
|
|
24
|
+
"@gem-sdk/core": "2.1.4",
|
|
25
25
|
"@gem-sdk/styles": "2.1.0",
|
|
26
26
|
"@types/react-transition-group": "^4.4.5"
|
|
27
27
|
},
|