@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.
@@ -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.platformUpdatedAt), timezone ?? '');
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.platformUpdatedAt,
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.updated_at | date: '${FORMAT_MAP[dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}']}' }}`,
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,
@@ -22,7 +22,7 @@ const ArticleList = ({ styles, setting, className, children, builderProps })=>{
22
22
  },
23
23
  orderBy: {
24
24
  direction: 'DESC',
25
- field: 'PLATFORM_UPDATED_AT'
25
+ field: 'PUBLISHED_AT'
26
26
  }
27
27
  };
28
28
  const blogsQuery = {
@@ -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 or inventory_management != "shopify" and inventory_quantity <= 0 %}
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 == '${appBlockId}' %}
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.platformUpdatedAt), timezone ?? '');
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.platformUpdatedAt,
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.updated_at | date: '${FORMAT_MAP[dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}']}' }}`,
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,
@@ -18,7 +18,7 @@ const ArticleList = ({ styles, setting, className, children, builderProps })=>{
18
18
  },
19
19
  orderBy: {
20
20
  direction: 'DESC',
21
- field: 'PLATFORM_UPDATED_AT'
21
+ field: 'PUBLISHED_AT'
22
22
  }
23
23
  };
24
24
  const blogsQuery = {
@@ -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 or inventory_management != "shopify" and inventory_quantity <= 0 %}
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 == '${appBlockId}' %}
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",
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.0",
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
  },