@nuskin/product-components 3.18.0-td-341.2 → 3.18.0-td-1000.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.
@@ -6,7 +6,6 @@ import {
6
6
  import {
7
7
  events,
8
8
  StringService,
9
- csStringService,
10
9
  util,
11
10
  SitesSessionStorageService,
12
11
  ShoppingContext,
@@ -473,32 +472,8 @@ const NsProductMixin = {
473
472
  this.loyaltyStatusAndLinks.productOptedInRedeemNotEarn =
474
473
  "Save with Nu Skin Rewards";
475
474
 
476
- const commonStringKeys = [
477
- { key: "productDisplayNotOptedinMessage", dflt: "" },
478
- {
479
- key: "productDisplayOptedinMessage",
480
- dflt: "{earnPercentage} Nu Skin enJoy Rewards Available!"
481
- },
482
- { key: "productOptedInEarnNotRedeem", dflt: "" },
483
- {
484
- key: "productOptedInRedeemNotEarn",
485
- dflt:
486
- "This product does not earn rewards points but is available to be redeemed for rewards points."
487
- }
488
- ];
489
-
490
- try {
491
- let loyalityStringsContent = {};
492
- if (this.$NsProductAppService.useCSResources) {
493
- loyalityStringsContent = await csStringService.getStrings(
494
- commonStringKeys
495
- );
496
- } else {
497
- loyalityStringsContent = await StringService.getStrings(
498
- commonStringKeys
499
- );
500
- }
501
- this.loyaltyStrings = loyalityStringsContent;
475
+ StringService.getApplicationStrings("loyalty").then(content => {
476
+ this.loyaltyStrings = content;
502
477
  // Link message to show to non-opted in users
503
478
  if (this.loyaltyStrings.productDisplayNotOptedinMessage) {
504
479
  this.loyaltyStatusAndLinks.landingPageLinkMessage = this.loyaltyStrings.productDisplayNotOptedinMessage;
@@ -540,14 +515,12 @@ const NsProductMixin = {
540
515
  );
541
516
  this.userLoyalty = loyaltyData;
542
517
  }
518
+ });
543
519
 
544
- this.loyaltyStatusAndLinks.landingPage = this.localeReplace(
545
- this.loyaltyStatusAndLinks.dashboardPage
546
- );
547
- this.loyaltyStatusAndLinks.siteUrl = this.siteUrl;
548
- } catch (err) {
549
- console.warn("Unable to retrieve loyalty strings translations.", err);
550
- }
520
+ this.loyaltyStatusAndLinks.landingPage = this.localeReplace(
521
+ this.loyaltyStatusAndLinks.dashboardPage
522
+ );
523
+ this.loyaltyStatusAndLinks.siteUrl = this.siteUrl;
551
524
  }
552
525
  },
553
526
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.18.0-td-341.2",
3
+ "version": "3.18.0-td-1000.1",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,10 +29,10 @@
29
29
  "@nuskin/ns-core-styles": "2.11.2",
30
30
  "@nuskin/ns-icon": "^2.12.0",
31
31
  "@nuskin/ns-loyalty-web": "1.5.6",
32
- "@nuskin/ns-product-lib": "2.19.2",
32
+ "@nuskin/ns-product-lib": "2.19.7",
33
33
  "@nuskin/ns-shop": "7.1.3",
34
34
  "@nuskin/product-recommendation": "2.0.1",
35
- "axios": "1.6.7",
35
+ "axios": "1.8.1",
36
36
  "lodash": "4.17.21",
37
37
  "sass": "^1.19.0",
38
38
  "sass-loader": "^8.0.2",
@@ -60,7 +60,7 @@
60
60
  "@nuskin/nuskinjquery": "2.3.1",
61
61
  "ansi-html": "0.0.8",
62
62
  "async": "2.6.4",
63
- "axios": "1.6.7",
63
+ "axios": "1.8.1",
64
64
  "decode-uri-component": "0.2.1",
65
65
  "eventsource/eventsource": "2.0.2",
66
66
  "fast-xml-parser": "4.2.5",
@@ -120,9 +120,13 @@ const _equinoxRequest = async options => {
120
120
  storeId: storeId
121
121
  };
122
122
 
123
+ let orchestrationURL = `${storefrontURL}/orchestrationservices/storefront/${options.endpoint}`;
124
+ if (storefrontURL && storefrontURL.indexOf("apis") > -1) {
125
+ orchestrationURL = `${storefrontURL}/${options.endpoint}`;
126
+ }
123
127
  let axiosRequest = {
124
128
  method: options.method,
125
- url: `${storefrontURL}/orchestrationservices/storefront/${options.endpoint}`,
129
+ url: orchestrationURL,
126
130
  headers: headers,
127
131
  withCredentials: options.method !== "DELETE",
128
132
  params: equinoxParams
@@ -3,11 +3,8 @@ import Vue from "vue";
3
3
  import {
4
4
  RunConfigService,
5
5
  ConfigService,
6
- StringService,
7
- csStringService
6
+ StringService
8
7
  } from "@nuskin/ns-util";
9
- import { getConfiguration } from "@nuskin/configuration-sdk";
10
- import { isEnabled } from "@nuskin/ns-feature-flags";
11
8
 
12
9
  import { isNullOrEmpty } from "@nuskin/ns-common-lib";
13
10
 
@@ -37,8 +34,7 @@ if (!NsProductAppService) {
37
34
  showWholeSalePricing: false,
38
35
  loadingConfig: true,
39
36
  translations: {},
40
- loadingTranslations: true,
41
- useCSResources: false
37
+ loadingTranslations: true
42
38
  };
43
39
  },
44
40
  computed: {
@@ -181,37 +177,10 @@ if (!NsProductAppService) {
181
177
  ];
182
178
 
183
179
  try {
184
- const configs = await getConfiguration(["Mysite_Product_Offer"]);
185
- let url = window.location.href;
186
- let isStaticApp = url.match(/\/static\//) !== null;
187
- let useCSResources = false;
188
- if (
189
- configs &&
190
- configs.Mysite_Product_Offer &&
191
- configs.Mysite_Product_Offer.useCSResources &&
192
- Array.isArray(configs.Mysite_Product_Offer.useCSResources)
193
- ) {
194
- useCSResources = configs.Mysite_Product_Offer.useCSResources.includes(
195
- this.runConfig.country
196
- );
197
- }
198
- // For static apps by default use CS resources
199
- // For AEM apps use CS resources only if the feature flag is enabled
200
- this.useCSResources =
201
- useCSResources &&
202
- (isStaticApp || (!isStaticApp && isEnabled("td_341")));
203
- let commonStrings = {};
204
- if (this.useCSResources) {
205
- commonStrings = await csStringService.getStrings(
206
- commonStringKeys,
207
- this.locale
208
- );
209
- } else {
210
- commonStrings = await StringService.getStrings(
211
- commonStringKeys,
212
- this.locale
213
- );
214
- }
180
+ const commonStrings = await StringService.getStrings(
181
+ commonStringKeys,
182
+ this.locale
183
+ );
215
184
 
216
185
  this.appendTranslations(commonStrings);
217
186
  } catch (err) {
@@ -9,10 +9,7 @@ import { isNullOrEmpty } from "@nuskin/ns-common-lib";
9
9
  import { ProductDataService } from "@nuskin/ns-product";
10
10
  import { Product, PriceType } from "@nuskin/ns-product-lib";
11
11
  import { equinoxLocalStorage } from "@nuskin/ns-util";
12
- import {
13
- getConfiguration,
14
- getCachedConfiguration
15
- } from "@nuskin/configuration-sdk";
12
+ import { getConfiguration } from "@nuskin/configuration-sdk";
16
13
 
17
14
  class ProductDataBatch {
18
15
  constructor(id, skus) {
@@ -272,7 +269,9 @@ if (!NsProductDataService) {
272
269
  return;
273
270
  }
274
271
 
275
- const equinoxMarketConfig = getCachedConfiguration("Equinox_Markets");
272
+ const equinoxMarketConfig = (
273
+ await getConfiguration(["Equinox_Markets"])
274
+ ).Equinox_Markets;
276
275
 
277
276
  // product data response has products
278
277
  if (productData.count && productData.products.length) {