@nuskin/product-components 3.20.3-it-31008.3 → 3.20.3
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 +1 -1
- package/components/NsProductList.vue +3 -4
- package/docs/CHANGELOG.md +1 -1
- package/mixins/NsProductMixin.js +5 -7
- package/package.json +1 -1
package/.releaserc
CHANGED
|
@@ -237,12 +237,11 @@ export default {
|
|
|
237
237
|
return typeof item === "object" ? item : null;
|
|
238
238
|
},
|
|
239
239
|
getHydratedSearchItem(item) {
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
240
|
+
const sku = this.getItemSku(item);
|
|
241
|
+
if (!sku || !this.$NsProductDataService.findProduct(sku)) {
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
244
|
-
|
|
245
|
-
return itemObject;
|
|
244
|
+
return this.getItemObject(item);
|
|
246
245
|
},
|
|
247
246
|
getItemKey(item) {
|
|
248
247
|
const sku = this.getItemSku(item);
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.20.3
|
|
1
|
+
## [3.20.3](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.20.2...v3.20.3) (2026-06-09)
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -433,9 +433,7 @@ const NsProductMixin = {
|
|
|
433
433
|
this.variants = searchItem.getVariantsList
|
|
434
434
|
? searchItem.getVariantsList()
|
|
435
435
|
: [];
|
|
436
|
-
this.isBaseSku = !!(
|
|
437
|
-
searchItem.variantSkus && searchItem.variantSkus().length > 0
|
|
438
|
-
);
|
|
436
|
+
this.isBaseSku = !!(searchItem.isBase && searchItem.isBase());
|
|
439
437
|
this.isVariantSku = !!(searchItem.isVariant && searchItem.isVariant());
|
|
440
438
|
|
|
441
439
|
if (searchItem.setPriceAndPvFromType) {
|
|
@@ -471,7 +469,7 @@ const NsProductMixin = {
|
|
|
471
469
|
return;
|
|
472
470
|
}
|
|
473
471
|
|
|
474
|
-
if (product.
|
|
472
|
+
if (product.isBase()) {
|
|
475
473
|
this.baseSku = product.sku;
|
|
476
474
|
this.variants = product.getVariantsList();
|
|
477
475
|
this.baseProduct = product;
|
|
@@ -609,7 +607,7 @@ const NsProductMixin = {
|
|
|
609
607
|
* Sets product to new selection
|
|
610
608
|
*/
|
|
611
609
|
async setActiveProduct() {
|
|
612
|
-
if (this.baseProduct && this.baseProduct.
|
|
610
|
+
if (this.baseProduct && this.baseProduct.isBase()) {
|
|
613
611
|
let activeProduct = this.variants.find(
|
|
614
612
|
variantProduct => variantProduct.sku === this.activeSku
|
|
615
613
|
);
|
|
@@ -645,7 +643,7 @@ const NsProductMixin = {
|
|
|
645
643
|
}
|
|
646
644
|
this.description = this.product.longDescr;
|
|
647
645
|
|
|
648
|
-
this.isBaseSku = this.product.
|
|
646
|
+
this.isBaseSku = this.product.isBase();
|
|
649
647
|
this.isVariantSku = this.product.isVariant();
|
|
650
648
|
|
|
651
649
|
this.isExclusive = this.product.isExclusive;
|
|
@@ -707,7 +705,7 @@ const NsProductMixin = {
|
|
|
707
705
|
|
|
708
706
|
handleProductChanged(product) {
|
|
709
707
|
const baseProductChanged =
|
|
710
|
-
product.
|
|
708
|
+
product.isBase() &&
|
|
711
709
|
(this.baseSku === product.sku ||
|
|
712
710
|
product.variantSkus().includes(this.activeSku));
|
|
713
711
|
const productChanged =
|