@nuskin/cs-product-lib 1.0.28-cx12-9877.2 → 1.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/cs-product-lib",
3
- "version": "1.0.28-cx12-9877.2",
3
+ "version": "1.0.28",
4
4
  "description": "Library for pulling and parsing product content (and applying business logic) retrieved from Contentstack",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -15,7 +15,6 @@ const formatProduct = (parent, homeUrl) => {
15
15
  productImages: helpers?.getProductImages(parent),
16
16
  salesLabel: parent?.sales_label,
17
17
  salesText: parent?.sales_text,
18
- salesRichText: helpers?.mapSalesRichText(parent?.sales_rich_text),
19
18
  description: entities.decodeHTML(parent?.short_description || ''),
20
19
  salesDisclaimer: helpers?.mapSalesDisclaimer(parent?.sales_disclaimer),
21
20
  features: helpers?.mapFeatures(parent),
@@ -138,6 +138,9 @@ const formatTranslations = (parent) => ({
138
138
  subscribeButton:
139
139
  parent?.common_strings_overrides?.cart?.subscribe_button ||
140
140
  parent?.common_strings?.product?.subscribeMonthly,
141
+ subscribeAndSave:
142
+ parent?.common_strings?.product?.subscribeAndSave ||
143
+ "Subscribe And Save",
141
144
  total:
142
145
  parent?.common_strings_overrides?.cart?.total ||
143
146
  parent?.common_strings?.product?.total,
@@ -15,7 +15,6 @@ const formatVariant = (parent) => ({
15
15
  title: parent?.name || parent?.defaults?.name,
16
16
  salesLabel: parent?.sales_label,
17
17
  salesText: parent?.sales_text,
18
- salesRichText: helpers?.mapSalesRichText(parent?.sales_rich_text),
19
18
  description: entities?.decodeHTML(
20
19
  parent?.short_description_override || parent?.defaults?.description || ''
21
20
  ),
package/src/helpers.js CHANGED
@@ -935,17 +935,6 @@ function mapDisclaimerWarnings(disclaimerWarnings) {
935
935
  .filter((disclaimerWarning) => !!disclaimerWarning)
936
936
  }
937
937
 
938
- function mapSalesRichText(salesRichText) {
939
-
940
- if (!hasRichTextContent(salesRichText)) {
941
- return null
942
- }
943
- const markdownText = createMarkdown(salesRichText, '', '', '')
944
- return {
945
- markdownText
946
- }
947
- }
948
-
949
938
  function hasRichTextContent(richText) {
950
939
  // when cleared, the rich text json still contains children, this checks for any text or links
951
940
  return ((richText || {}).children || []).some((line) =>
@@ -1179,6 +1168,5 @@ module.exports = {
1179
1168
  reorderLocale,
1180
1169
  mapFaqs,
1181
1170
  createMarkdownFromRTE,
1182
- benefitsToMarkdown,
1183
- mapSalesRichText
1171
+ benefitsToMarkdown
1184
1172
  }