@nuskin/product-components 3.17.3-cx24-6805.7 → 3.18.0-brw-988.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/.releaserc CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "branches": [
3
- "master", {"name":"CX24-6805", "channel":"prerelease", "prerelease":"cx24-6805"}
3
+ "master", {"name":"BRW-988", "channel":"prerelease", "prerelease":"brw-988"}
4
4
  ],
5
5
  "plugins": [
6
6
  "@semantic-release/release-notes-generator",
@@ -772,13 +772,7 @@ export default {
772
772
  : this.products[sku].availableQuantity || 0;
773
773
  const selectedQuantity = this.products[sku].availability
774
774
  .selectedQuantity;
775
- if (
776
- this.products[sku].invalid ||
777
- this.products[sku].data.availableQuantity <= 0 ||
778
- !this.products[sku].availability.addToCart
779
- ) {
780
- return undefined;
781
- }
775
+
782
776
  if (!this.products[sku].invalid && availableQuantity >= 1) {
783
777
  selectedQuantityArr[
784
778
  this.products[sku].activeSku
@@ -912,7 +906,6 @@ export default {
912
906
 
913
907
  if (
914
908
  availability &&
915
- availability.addToCart &&
916
909
  Object.keys(this.products[sku].data).length >= 1 &&
917
910
  availableQuantity >= 1
918
911
  ) {
package/docs/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- ## [3.17.3-cx24-6805.7](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.3-cx24-6805.6...v3.17.3-cx24-6805.7) (2024-06-21)
1
+ # [3.18.0-brw-988.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.2...v3.18.0-brw-988.1) (2024-06-24)
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "bomFormat": "CycloneDX",
3
3
  "specVersion": "1.4",
4
- "serialNumber": "urn:uuid:d783bef6-b6ed-428e-aeb3-5accbf583265",
4
+ "serialNumber": "urn:uuid:7384ddc2-e010-4331-8c05-1165e40c414e",
5
5
  "version": 1,
6
6
  "metadata": {
7
- "timestamp": "2024-06-21T14:00:35Z",
7
+ "timestamp": "2024-06-24T07:29:43Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "GitLab",
@@ -646,31 +646,31 @@ const NsProductMixin = {
646
646
  // WARNING: There's a instanceof check on CartService.getAddToCartQty for the ns-shop Product, previously different
647
647
  const shopProduct = new ShopProduct(this.product);
648
648
 
649
- // getConfiguration(["Equinox_Markets"]).then(({ Equinox_Markets }) => {
650
- // const { active } = Equinox_Markets;
651
-
652
- const cartService = CartService;
653
- // check if a user is qualified to purchase the product
654
- cartService
655
- .getAddToCartQty(shopProduct)
656
- .then(productQuantity => {
657
- // WARNING: this.product is volatile here. re-check is using this.product.
658
- this.maxQuantity = Math.min(
659
- shopProduct.maxQuantity,
660
- shopProduct.availableQuantity,
661
- productQuantity
662
- );
663
- })
664
- .catch(error => {
665
- this.maxQuantity = 0;
666
- console.error("Failed to retrieve add to cart quantity.", error);
667
- })
668
- .finally(() => {
669
- this.setStatus();
670
- this.checkedQualifications = true;
671
- this.emitAvailability();
672
- });
673
- //});
649
+ getConfiguration(["Equinox_Markets"]).then(({ Equinox_Markets }) => {
650
+ const { active } = Equinox_Markets;
651
+
652
+ const cartService = active ? EquinoxCartService : CartService;
653
+ // check if a user is qualified to purchase the product
654
+ cartService
655
+ .getAddToCartQty(shopProduct)
656
+ .then(productQuantity => {
657
+ // WARNING: this.product is volatile here. re-check is using this.product.
658
+ this.maxQuantity = Math.min(
659
+ shopProduct.maxQuantity,
660
+ shopProduct.availableQuantity,
661
+ productQuantity
662
+ );
663
+ })
664
+ .catch(error => {
665
+ this.maxQuantity = 0;
666
+ console.error("Failed to retrieve add to cart quantity.", error);
667
+ })
668
+ .finally(() => {
669
+ this.setStatus();
670
+ this.checkedQualifications = true;
671
+ this.emitAvailability();
672
+ });
673
+ });
674
674
  }
675
675
  },
676
676
 
@@ -703,12 +703,6 @@ const NsProductMixin = {
703
703
  )
704
704
  );
705
705
  this.statusMessageKey = "backOrderedWithDate";
706
-
707
- let backOrderDate = new Date(this.product.backOrderDate);
708
- let today = new Date();
709
- if (backOrderDate < today) {
710
- this.disable();
711
- }
712
706
  }
713
707
  } else {
714
708
  this.disable();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.17.3-cx24-6805.7",
3
+ "version": "3.18.0-brw-988.1",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  "@nuskin/ns-icon": "^2.12.0",
31
31
  "@nuskin/ns-loyalty-web": "1.5.6",
32
32
  "@nuskin/ns-product-lib": "2.16.0",
33
- "@nuskin/ns-shop": "6.11.7",
33
+ "@nuskin/ns-shop": "7.1.0-brw-988.1",
34
34
  "@nuskin/product-recommendation": "2.0.1",
35
35
  "axios": "1.6.7",
36
36
  "lodash": "4.17.21",