@nuskin/product-components 3.1.10 → 3.1.11

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.1.11](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.1.10...v3.1.11) (2022-11-17)
2
+
3
+
4
+ ### Fix
5
+
6
+ * variant select added to nsproductcard (#CX12-6183) ([3e74ab4](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/3e74ab45c312052ec7e652ebaafa35f955270c35)), closes [#CX12-6183](https://code.tls.nuskin.io/ns-am/ux/product-components/issues/CX12-6183)
7
+
1
8
  ## [3.1.10](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.1.9...v3.1.10) (2022-11-17)
2
9
 
3
10
 
@@ -98,6 +98,7 @@
98
98
  @active-sku="activeSku => modifyProduct(sku, { activeSku })"
99
99
  @availability="availability => modifyProduct(sku, { availability })"
100
100
  @product-update="handleProductUpdate"
101
+ @variant-select="results => handleVariantSelected(results, sku)"
101
102
  />
102
103
  </div>
103
104
 
@@ -714,9 +715,7 @@ export default {
714
715
  window.sessionStorage.setItem("nstoast-allowed", "true");
715
716
 
716
717
  const countryCode = CartService.getCartProperty("cntryCd") || "";
717
-
718
718
  let checkoutProducts = [];
719
-
720
719
  for (const validSku of validSkus) {
721
720
  const validProduct = this.products[validSku];
722
721
  const selectedSku = validProduct.activeSku;
@@ -889,6 +888,13 @@ export default {
889
888
  this.$NsProductDataService.handleProductStatus(results);
890
889
  },
891
890
 
891
+ /**
892
+ * Handle product status events
893
+ */
894
+ handleVariantSelected(results, sku) {
895
+ this.products[sku].activeSku = results;
896
+ },
897
+
892
898
  /**
893
899
  * Subscribe to events, should only be called when mounted
894
900
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.1.10",
3
+ "version": "3.1.11",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {