@nuskin/product-components 3.18.0-td-341.1 → 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,
@@ -25,7 +24,6 @@ import {
25
24
  Product as ShopProduct,
26
25
  EquinoxCartService
27
26
  } from "@nuskin/ns-shop";
28
- import { isEnabled } from "@nuskin/ns-feature-flags";
29
27
  import QualificationService from "@nuskin/exclusive-offer-sdk";
30
28
  import webLoyalty from "@nuskin/ns-loyalty-web";
31
29
  import { getProp, getFullUrl } from "@nuskin/ns-common-lib";
@@ -474,44 +472,8 @@ const NsProductMixin = {
474
472
  this.loyaltyStatusAndLinks.productOptedInRedeemNotEarn =
475
473
  "Save with Nu Skin Rewards";
476
474
 
477
- const commonStringKeys = [
478
- { key: "productDisplayNotOptedinMessage", dflt: "" },
479
- {
480
- key: "productDisplayOptedinMessage",
481
- dflt: "{earnPercentage} Nu Skin enJoy Rewards Available!"
482
- },
483
- { key: "productOptedInEarnNotRedeem", dflt: "" },
484
- {
485
- key: "productOptedInRedeemNotEarn",
486
- dflt:
487
- "This product does not earn rewards points but is available to be redeemed for rewards points."
488
- }
489
- ];
490
-
491
- try {
492
- const configs = await getConfiguration(["Mysite"]);
493
- let useCSResources = false;
494
- if (
495
- configs &&
496
- configs.Mysite &&
497
- configs.Mysite.useCSResources &&
498
- Array.isArray(configs.Mysite.useCSResources)
499
- ) {
500
- useCSResources = configs.Mysite.useCSResources.includes(
501
- this.runConfig.country
502
- );
503
- }
504
- let loyalityStringsContent = {};
505
- if (useCSResources && isEnabled("td_341")) {
506
- loyalityStringsContent = await csStringService.getStrings(
507
- commonStringKeys
508
- );
509
- } else {
510
- loyalityStringsContent = await StringService.getStrings(
511
- commonStringKeys
512
- );
513
- }
514
- this.loyaltyStrings = loyalityStringsContent;
475
+ StringService.getApplicationStrings("loyalty").then(content => {
476
+ this.loyaltyStrings = content;
515
477
  // Link message to show to non-opted in users
516
478
  if (this.loyaltyStrings.productDisplayNotOptedinMessage) {
517
479
  this.loyaltyStatusAndLinks.landingPageLinkMessage = this.loyaltyStrings.productDisplayNotOptedinMessage;
@@ -553,14 +515,12 @@ const NsProductMixin = {
553
515
  );
554
516
  this.userLoyalty = loyaltyData;
555
517
  }
518
+ });
556
519
 
557
- this.loyaltyStatusAndLinks.landingPage = this.localeReplace(
558
- this.loyaltyStatusAndLinks.dashboardPage
559
- );
560
- this.loyaltyStatusAndLinks.siteUrl = this.siteUrl;
561
- } catch (err) {
562
- console.warn("Unable to retrieve loyalty strings translations.", err);
563
- }
520
+ this.loyaltyStatusAndLinks.landingPage = this.localeReplace(
521
+ this.loyaltyStatusAndLinks.dashboardPage
522
+ );
523
+ this.loyaltyStatusAndLinks.siteUrl = this.siteUrl;
564
524
  }
565
525
  },
566
526
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.18.0-td-341.1",
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.0",
33
- "@nuskin/ns-shop": "7.0.10",
32
+ "@nuskin/ns-product-lib": "2.19.7",
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
 
@@ -180,31 +177,10 @@ if (!NsProductAppService) {
180
177
  ];
181
178
 
182
179
  try {
183
- const configs = await getConfiguration(["Mysite"]);
184
- let useCSResources = false;
185
- if (
186
- configs &&
187
- configs.Mysite &&
188
- configs.Mysite.useCSResources &&
189
- Array.isArray(configs.Mysite.useCSResources)
190
- ) {
191
- useCSResources = configs.Mysite.useCSResources.includes(
192
- this.runConfig.country
193
- );
194
- }
195
-
196
- let commonStrings = {};
197
- if (useCSResources && isEnabled("td_341")) {
198
- commonStrings = await csStringService.getStrings(
199
- commonStringKeys,
200
- this.locale
201
- );
202
- } else {
203
- commonStrings = await StringService.getStrings(
204
- commonStringKeys,
205
- this.locale
206
- );
207
- }
180
+ const commonStrings = await StringService.getStrings(
181
+ commonStringKeys,
182
+ this.locale
183
+ );
208
184
 
209
185
  this.appendTranslations(commonStrings);
210
186
  } catch (err) {
@@ -94,14 +94,14 @@ function getProductGraphqlUrl() {
94
94
 
95
95
  switch (env) {
96
96
  case "dev":
97
- return "https://test.nuskin.com/product-api/graphql";
97
+ return "https://product.api.dev.nuskin.com/graphql";
98
98
  case "stage":
99
99
  case "test":
100
- return "https://test.nuskin.com/product-api/graphql";
100
+ return "https://product.api.test.nuskin.com/graphql";
101
101
  case "unknown":
102
102
  case "prod":
103
103
  default:
104
- return "https://www.nuskin.com/product-api/graphql";
104
+ return "https://product.api.nuskin.com/graphql";
105
105
  }
106
106
  }
107
107
 
@@ -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) {