@nuskin/product-components 3.18.0-cx24-6773.1 → 3.18.0-td-341.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 +1 -1
- package/components/NsProductList.vue +7 -4
- package/components/NsProductOffer.vue +18 -2
- package/docs/CHANGELOG.md +1 -1
- package/gl-sbom-npm-yarn.cdx.json +2495 -373
- package/mixins/NsProductMixin.js +107 -102
- package/package.json +3 -3
- package/services/EQPromotionService.js +36 -7
- package/services/NsProductAppService.js +37 -6
- package/services/NsProductContentService.js +3 -3
- package/services/NsProductDataService.js +5 -4
- package/stories/NsProductMixinPreview.vue +5 -34
package/.releaserc
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
<script>
|
|
48
48
|
import { NsExpressiveLink, NsIcon, NsSpinner } from "@nuskin/design-components";
|
|
49
|
-
import { StringService } from "@nuskin/ns-util";
|
|
49
|
+
import { StringService, csStringService } from "@nuskin/ns-util";
|
|
50
50
|
import { fromJsonString } from "@nuskin/ns-common-lib";
|
|
51
51
|
|
|
52
52
|
import NsProductCard from "./NsProductCard.vue";
|
|
@@ -190,9 +190,12 @@ export default {
|
|
|
190
190
|
await this.$nextTick();
|
|
191
191
|
|
|
192
192
|
try {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
let commonStrings = {};
|
|
194
|
+
if (this.$NsProductAppService.useCSResources) {
|
|
195
|
+
commonStrings = await csStringService.getStrings(commonStringKeys);
|
|
196
|
+
} else {
|
|
197
|
+
commonStrings = await StringService.getStrings(commonStringKeys);
|
|
198
|
+
}
|
|
196
199
|
if (commonStrings && commonStrings.loadMore) {
|
|
197
200
|
this.loadMoreText = commonStrings.loadMore;
|
|
198
201
|
}
|
|
@@ -772,7 +772,13 @@ export default {
|
|
|
772
772
|
: this.products[sku].availableQuantity || 0;
|
|
773
773
|
const selectedQuantity = this.products[sku].availability
|
|
774
774
|
.selectedQuantity;
|
|
775
|
-
|
|
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
|
+
}
|
|
776
782
|
if (!this.products[sku].invalid && availableQuantity >= 1) {
|
|
777
783
|
selectedQuantityArr[
|
|
778
784
|
this.products[sku].activeSku
|
|
@@ -790,18 +796,27 @@ export default {
|
|
|
790
796
|
return;
|
|
791
797
|
}
|
|
792
798
|
|
|
799
|
+
let options = {
|
|
800
|
+
add: {
|
|
801
|
+
item: {
|
|
802
|
+
qty: this.totalProductQuantity
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
|
|
793
807
|
let checkoutProducts = [];
|
|
794
808
|
const equinoxMarketsConfig = getCachedConfiguration("Equinox_Markets");
|
|
795
809
|
const countryCode = equinoxMarketsConfig.country_code;
|
|
796
810
|
|
|
797
811
|
if (equinoxMarketsConfig.active) {
|
|
812
|
+
window.sessionStorage.setItem("nstoast-allowed", "true");
|
|
798
813
|
EquinoxCartService.addBundleToEquinoxCart(
|
|
799
814
|
validSkus,
|
|
800
815
|
this.products,
|
|
801
816
|
selectedQuantityArr
|
|
802
817
|
)
|
|
803
818
|
.then(() => {
|
|
804
|
-
events.publish(events.shop.ADD_TO_CART);
|
|
819
|
+
events.publish(events.shop.ADD_TO_CART, options);
|
|
805
820
|
})
|
|
806
821
|
.catch(err => {
|
|
807
822
|
console.error(`Failed to add ${validSkus} with Error: ${err} `);
|
|
@@ -906,6 +921,7 @@ export default {
|
|
|
906
921
|
|
|
907
922
|
if (
|
|
908
923
|
availability &&
|
|
924
|
+
availability.addToCart &&
|
|
909
925
|
Object.keys(this.products[sku].data).length >= 1 &&
|
|
910
926
|
availableQuantity >= 1
|
|
911
927
|
) {
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# [3.18.0-
|
|
1
|
+
# [3.18.0-td-341.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.18.0-td-341.1...v3.18.0-td-341.2) (2024-10-25)
|