@nuskin/product-components 3.15.4 → 3.15.5
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/components/NsProductOffer.vue +13 -23
- package/docs/CHANGELOG.md +1 -1
- package/gl-sbom-npm-yarn.cdx.json +6 -13
- package/package.json +4 -3
|
@@ -760,28 +760,7 @@ export default {
|
|
|
760
760
|
}, 250),
|
|
761
761
|
|
|
762
762
|
async addFullOfferToCart() {
|
|
763
|
-
|
|
764
|
-
const product = Object.keys(this.products[sku].data.variants).length
|
|
765
|
-
? this.products[sku].data.variants[this.products[sku].activeSku]
|
|
766
|
-
: this.products[sku];
|
|
767
|
-
const availableQuantity = Object.keys(this.products[sku].data.variants)
|
|
768
|
-
.length
|
|
769
|
-
? product.availableQuantity
|
|
770
|
-
: product.data.availableQuantity || 0;
|
|
771
|
-
if (
|
|
772
|
-
!product.data &&
|
|
773
|
-
Object.keys(this.products[sku].data.variants).length
|
|
774
|
-
) {
|
|
775
|
-
return !product.invalid && availableQuantity >= 1;
|
|
776
|
-
} else {
|
|
777
|
-
return (
|
|
778
|
-
!product.invalid &&
|
|
779
|
-
!isNullOrEmpty(product.data) &&
|
|
780
|
-
availableQuantity >= 1
|
|
781
|
-
);
|
|
782
|
-
}
|
|
783
|
-
}); */
|
|
784
|
-
|
|
763
|
+
const selectedQuantityArr = [];
|
|
785
764
|
const validSkus = Object.keys(this.products)
|
|
786
765
|
.map(sku => {
|
|
787
766
|
if (Object.keys(this.products[sku].data).length) {
|
|
@@ -791,9 +770,16 @@ export default {
|
|
|
791
770
|
? this.products[sku].data.variants[this.products[sku].activeSku]
|
|
792
771
|
.availableQuantity
|
|
793
772
|
: this.products[sku].availableQuantity || 0;
|
|
773
|
+
const selectedQuantity = this.products[sku].availability
|
|
774
|
+
.selectedQuantity;
|
|
775
|
+
|
|
794
776
|
if (!this.products[sku].invalid && availableQuantity >= 1) {
|
|
777
|
+
selectedQuantityArr[
|
|
778
|
+
this.products[sku].activeSku
|
|
779
|
+
] = selectedQuantity;
|
|
795
780
|
return this.products[sku].activeSku;
|
|
796
781
|
} else {
|
|
782
|
+
selectedQuantityArr[this.products[sku].sku] = selectedQuantity;
|
|
797
783
|
return this.products[sku].sku;
|
|
798
784
|
}
|
|
799
785
|
}
|
|
@@ -809,7 +795,11 @@ export default {
|
|
|
809
795
|
const countryCode = equinoxMarketsConfig.country_code;
|
|
810
796
|
|
|
811
797
|
if (equinoxMarketsConfig.active) {
|
|
812
|
-
EquinoxCartService.addBundleToEquinoxCart(
|
|
798
|
+
EquinoxCartService.addBundleToEquinoxCart(
|
|
799
|
+
validSkus,
|
|
800
|
+
this.products,
|
|
801
|
+
selectedQuantityArr
|
|
802
|
+
)
|
|
813
803
|
.then(() => {
|
|
814
804
|
events.publish(events.shop.ADD_TO_CART);
|
|
815
805
|
})
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.15.
|
|
1
|
+
## [3.15.5](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.15.4...v3.15.5) (2024-04-04)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.4",
|
|
4
|
-
"serialNumber": "urn:uuid:
|
|
4
|
+
"serialNumber": "urn:uuid:c8a725ac-ebd5-4f99-a8e5-030870cfdfe6",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2024-
|
|
7
|
+
"timestamp": "2024-04-04T07:37:43Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "GitLab",
|
|
11
11
|
"name": "Gemnasium",
|
|
12
|
-
"version": "4.
|
|
12
|
+
"version": "4.16.0"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"authors": [
|
|
@@ -154,13 +154,6 @@
|
|
|
154
154
|
"type": "library",
|
|
155
155
|
"bom-ref": "pkg:npm/@nuskin/ns-loyalty-web@1.5.6"
|
|
156
156
|
},
|
|
157
|
-
{
|
|
158
|
-
"name": "@nuskin/ns-product-lib",
|
|
159
|
-
"version": "2.15.1",
|
|
160
|
-
"purl": "pkg:npm/@nuskin/ns-product-lib@2.15.1",
|
|
161
|
-
"type": "library",
|
|
162
|
-
"bom-ref": "pkg:npm/@nuskin/ns-product-lib@2.15.1"
|
|
163
|
-
},
|
|
164
157
|
{
|
|
165
158
|
"name": "@nuskin/ns-product-lib",
|
|
166
159
|
"version": "2.15.2",
|
|
@@ -170,10 +163,10 @@
|
|
|
170
163
|
},
|
|
171
164
|
{
|
|
172
165
|
"name": "@nuskin/ns-shop",
|
|
173
|
-
"version": "6.11.3",
|
|
174
|
-
"purl": "pkg:npm/@nuskin/ns-shop@6.11.3",
|
|
166
|
+
"version": "6.11.5-cx24-6457.3",
|
|
167
|
+
"purl": "pkg:npm/@nuskin/ns-shop@6.11.5-cx24-6457.3",
|
|
175
168
|
"type": "library",
|
|
176
|
-
"bom-ref": "pkg:npm/@nuskin/ns-shop@6.11.3"
|
|
169
|
+
"bom-ref": "pkg:npm/@nuskin/ns-shop@6.11.5-cx24-6457.3"
|
|
177
170
|
},
|
|
178
171
|
{
|
|
179
172
|
"name": "@nuskin/nuskinjquery",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/product-components",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.5",
|
|
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.15.2",
|
|
33
|
-
"@nuskin/ns-shop": "6.11.
|
|
33
|
+
"@nuskin/ns-shop": "6.11.5",
|
|
34
34
|
"@nuskin/product-recommendation": "2.0.1",
|
|
35
35
|
"axios": "1.6.7",
|
|
36
36
|
"lodash": "4.17.21",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"terser": "4.8.1",
|
|
82
82
|
"tough-cookie": "4.1.3",
|
|
83
83
|
"url-parse": "1.5.9",
|
|
84
|
-
"word-wrap": "1.2.4"
|
|
84
|
+
"word-wrap": "1.2.4",
|
|
85
|
+
"json5": "2.2.2"
|
|
85
86
|
}
|
|
86
87
|
}
|