@nuskin/product-components 3.2.1-cx24-3503.4 → 3.2.2

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/.releaserc CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "branches": [
3
- "master", {"name":"CX24-33772", "channel":"prerelease", "prerelease":"cx24-33772"}
3
+ "master"
4
4
  ],
5
5
  "plugins": [
6
6
  "@semantic-release/npm",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,16 @@
1
- ## [3.2.1-cx24-3503.4](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.1-cx24-3503.3...v3.2.1-cx24-3503.4) (2023-03-07)
1
+ ## [3.2.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.1...v3.2.2) (2023-03-11)
2
2
 
3
3
 
4
4
  ### Fix
5
5
 
6
- * Multiple variants not loading properly for equinox ([26967cb](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/26967cb3a5d0c7d5d1d5eab7413a97ab1a43df71))
6
+ * Version bump ([e45439e](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/e45439e69eae62082630f86b352fb45003ea4504))
7
+
8
+ ## [3.2.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.0...v3.2.1) (2023-03-08)
9
+
10
+
11
+ ### Fix
12
+
13
+ * update getConfiguration call to work with new version of configuration-sdk #CX24-3503 ([1b028dc](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/1b028dce8cbbca9fb909eda46bf3df3e837ba096)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/ux/product-components/issues/CX24-3503)
7
14
 
8
15
  ## [3.2.1-cx24-3503.3](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.1-cx24-3503.2...v3.2.1-cx24-3503.3) (2023-03-03)
9
16
 
@@ -9,6 +9,7 @@ import {
9
9
  PersonalOfferStorageService,
10
10
  dateFormatter,
11
11
  UrlService,
12
+ RunConfigService,
12
13
  equinoxLocalStorage
13
14
  } from "@nuskin/ns-util";
14
15
  import {
@@ -370,7 +371,7 @@ const NsProductMixin = {
370
371
  return;
371
372
  }
372
373
 
373
- if (product.isBase(this.checkEquinoxMarketEnabled())) {
374
+ if (product.isBase()) {
374
375
  this.baseSku = product.sku;
375
376
  this.variants = product.getVariantsList();
376
377
  this.baseProduct = product;
@@ -488,10 +489,7 @@ const NsProductMixin = {
488
489
  * Sets product to new selection
489
490
  */
490
491
  setActiveProduct() {
491
- if (
492
- this.baseProduct &&
493
- this.baseProduct.isBase(this.checkEquinoxMarketEnabled())
494
- ) {
492
+ if (this.baseProduct && this.baseProduct.isBase()) {
495
493
  let activeProduct = this.variants.find(
496
494
  variantProduct => variantProduct.sku === this.activeSku
497
495
  );
@@ -507,7 +505,7 @@ const NsProductMixin = {
507
505
  );
508
506
  this.description = this.product.longDescr;
509
507
 
510
- this.isBaseSku = this.product.isBase(this.checkEquinoxMarketEnabled());
508
+ this.isBaseSku = this.product.isBase();
511
509
  this.isVariantSku = this.product.isVariant();
512
510
 
513
511
  this.isExclusive = this.product.isExclusive;
@@ -542,7 +540,7 @@ const NsProductMixin = {
542
540
 
543
541
  handleProductChanged(product) {
544
542
  const baseProductChanged =
545
- product.isBase(this.checkEquinoxMarketEnabled()) &&
543
+ product.isBase() &&
546
544
  (this.baseSku === product.sku ||
547
545
  product.variantSkus().includes(this.activeSku));
548
546
  const productChanged =
@@ -911,9 +909,12 @@ const NsProductMixin = {
911
909
  domain: window.location.hostname
912
910
  };
913
911
 
912
+ const country = RunConfigService.getRunConfig().country;
914
913
  getConfiguration(["Equinox_Markets"]).then(config => {
914
+ const countryCode = config.Equinox_Markets.country_code;
915
+
915
916
  if (
916
- config.Equinox_Markets.active &&
917
+ countryCode === country &&
917
918
  equinoxLocalStorage.isEquinoxEnabled()
918
919
  ) {
919
920
  ProductDataService.getProductData(options.sku)
@@ -1350,14 +1351,6 @@ const NsProductMixin = {
1350
1351
  });
1351
1352
  }
1352
1353
  return text || "";
1353
- },
1354
- checkEquinoxMarketEnabled() {
1355
- getConfiguration("Equinox_Markets").then(config => {
1356
- return config.Equinox_Markets.active &&
1357
- equinoxLocalStorage.isEquinoxEnabled()
1358
- ? { isEquinoxEnabled: true }
1359
- : null;
1360
- });
1361
1354
  }
1362
1355
  }
1363
1356
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.2.1-cx24-3503.4",
3
+ "version": "3.2.2",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "@nuskin/ns-common-lib": "1.4.5",
28
28
  "@nuskin/ns-core-styles": "2.11.2",
29
29
  "@nuskin/ns-loyalty-web": "1.5.6",
30
- "@nuskin/ns-product-lib": "2.6.0-cx24-3503.1",
30
+ "@nuskin/ns-product-lib": "2.5.1",
31
31
  "@nuskin/product-recommendation": "2.0.1",
32
32
  "axios": "^0.19.2",
33
33
  "lodash": "^4.17.15",