@nuskin/product-components 3.17.10-brw-4218.4 → 3.17.11-brw-4218.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.
package/docs/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- ## [3.17.10-brw-4218.4](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.10-brw-4218.3...v3.17.10-brw-4218.4) (2024-08-16)
1
+ ## [3.17.11-brw-4218.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.10...v3.17.11-brw-4218.1) (2024-08-21)
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "bomFormat": "CycloneDX",
3
3
  "specVersion": "1.4",
4
- "serialNumber": "urn:uuid:c0f14536-fe29-4f34-aeb7-4b940f0745b2",
4
+ "serialNumber": "urn:uuid:f33d6487-1a84-4b69-a58a-a789b7fe167b",
5
5
  "version": 1,
6
6
  "metadata": {
7
- "timestamp": "2024-08-16T17:15:26Z",
7
+ "timestamp": "2024-08-21T19:56:10Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "GitLab",
@@ -257,10 +257,10 @@
257
257
  },
258
258
  {
259
259
  "name": "@nuskin/ns-product-lib",
260
- "version": "2.18.0-brw-4218.1",
261
- "purl": "pkg:npm/@nuskin/ns-product-lib@2.18.0-brw-4218.1",
260
+ "version": "2.18.0",
261
+ "purl": "pkg:npm/@nuskin/ns-product-lib@2.18.0",
262
262
  "type": "library",
263
- "bom-ref": "pkg:npm/@nuskin/ns-product-lib@2.18.0-brw-4218.1",
263
+ "bom-ref": "pkg:npm/@nuskin/ns-product-lib@2.18.0",
264
264
  "properties": [
265
265
  {
266
266
  "name": "reachability",
@@ -4612,7 +4612,7 @@
4612
4612
  ]
4613
4613
  },
4614
4614
  {
4615
- "ref": "pkg:npm/@nuskin/ns-product-lib@2.18.0-brw-4218.1",
4615
+ "ref": "pkg:npm/@nuskin/ns-product-lib@2.18.0",
4616
4616
  "dependsOn": [
4617
4617
  "pkg:npm/qs@6.11.0"
4618
4618
  ]
@@ -662,7 +662,6 @@ const NsProductMixin = {
662
662
  );
663
663
  })
664
664
  .catch(error => {
665
- this.maxQuantity = 0;
666
665
  console.error("Failed to retrieve add to cart quantity.", error);
667
666
  })
668
667
  .finally(() => {
@@ -890,10 +889,9 @@ const NsProductMixin = {
890
889
  // set sales event pricing and points
891
890
  this.originalPriceType = this.product.priceType;
892
891
 
893
- this.originalPrice =
894
- isEquinoxEnabled && !isGraphQLActive
895
- ? this.product.getPricing(PriceType.WRTL)
896
- : this.product.getOriginalPrice();
892
+ this.originalPrice = isGraphQLActive
893
+ ? this.product.getPricing(PriceType.WRTL)
894
+ : this.product.getOriginalPrice();
897
895
 
898
896
  //workaround for graphQL active to show original price
899
897
  if (isGraphQLActive) {
@@ -912,11 +910,7 @@ const NsProductMixin = {
912
910
  //If EQ market, always show the discounted price if product has promotion
913
911
  //Hence, we set the price to member(wholesale / PriceType.WADW) if the price type PriceType.WADR (retail)
914
912
  //this is inline with the change in business rules to always show the discounted prices
915
- if (
916
- isEquinoxEnabled &&
917
- !isGraphQLActive &&
918
- this.getAdrPriceType() == PriceType.WADR
919
- ) {
913
+ if (isGraphQLActive && this.getAdrPriceType() == PriceType.WADR) {
920
914
  this.adrPrice = this.product.getPricing(PriceType.WADW);
921
915
  }
922
916
 
@@ -925,11 +919,7 @@ const NsProductMixin = {
925
919
  //for product that has promotion
926
920
  //set the price to WWHL if this.getPriceType() === WRTL
927
921
  //promotion price is set in product.js setPriceAndPvFromType function
928
- if (
929
- isEquinoxEnabled &&
930
- !isGraphQLActive &&
931
- this.getPriceType() == PriceType.WRTL
932
- ) {
922
+ if (isGraphQLActive && this.getPriceType() == PriceType.WRTL) {
933
923
  this.price = this.product.getPricing(PriceType.WWHL);
934
924
  }
935
925
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.17.10-brw-4218.4",
3
+ "version": "3.17.11-brw-4218.1",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
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.18.0-brw-4218.2",
32
+ "@nuskin/ns-product-lib": "2.18.0",
33
33
  "@nuskin/ns-shop": "7.0.8",
34
34
  "@nuskin/product-recommendation": "2.0.1",
35
35
  "axios": "1.6.7",
@@ -41,6 +41,8 @@ const buildPayload = product => {
41
41
  let personalOffer = sessionStorage.getItem("personalOffer");
42
42
  if (personalOffer !== null) {
43
43
  personalOffer = JSON.parse(personalOffer);
44
+ } else {
45
+ personalOffer = { products: [] };
44
46
  }
45
47
  const matchedProduct = personalOffer.products.filter(
46
48
  offerProduct => offerProduct.sku === product.sku