@nuskin/product-components 3.17.21-mdigi-326.5 → 3.17.21-mdigi-326.6
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.
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
|
-
<div v-if="showSpinnerOnFirstLoad" :class="$style.spinnerWrapper">
|
|
27
|
+
<div v-if="isLoading || showSpinnerOnFirstLoad" :class="$style.spinnerWrapper">
|
|
28
28
|
<NsSpinner />
|
|
29
29
|
</div>
|
|
30
30
|
<NsProductList
|
|
@@ -138,7 +138,8 @@ export default {
|
|
|
138
138
|
products: {},
|
|
139
139
|
localSku: [],
|
|
140
140
|
sortedSkus: [],
|
|
141
|
-
sortByValue: this.sortBySelected
|
|
141
|
+
sortByValue: this.sortBySelected,
|
|
142
|
+
isLoading: false,
|
|
142
143
|
};
|
|
143
144
|
},
|
|
144
145
|
computed: {
|
|
@@ -253,13 +254,32 @@ export default {
|
|
|
253
254
|
},
|
|
254
255
|
|
|
255
256
|
sortSelect(value) {
|
|
257
|
+
this.isLoading = true;
|
|
258
|
+
|
|
256
259
|
if (!this.$NsProductDataService.check(this.localSkus)) {
|
|
260
|
+
console.log("Queuing products for fetching...");
|
|
257
261
|
this.$NsProductDataService.queue(this.localSkus);
|
|
258
262
|
}
|
|
259
263
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
264
|
+
// Ensure all products are loaded
|
|
265
|
+
const checkProductsLoaded = () => {
|
|
266
|
+
const allProducts = this.$NsProductDataService.findProducts(this.localSkus);
|
|
267
|
+
|
|
268
|
+
// If not, retry fetching
|
|
269
|
+
if (allProducts.length < this.localSkus.length) {
|
|
270
|
+
setTimeout(() => {
|
|
271
|
+
checkProductsLoaded();
|
|
272
|
+
}, 100);
|
|
273
|
+
} else {
|
|
274
|
+
this.isLoading = false;
|
|
275
|
+
this.sortByValue = value;
|
|
276
|
+
this.$emit("sort-by-select", value);
|
|
277
|
+
events.publish(events.shop.SEARCH_SORT_DROPDOWN);
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// Check if all products are loaded
|
|
282
|
+
checkProductsLoaded();
|
|
263
283
|
},
|
|
264
284
|
|
|
265
285
|
sortBy: debounce(function() {
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.17.21-mdigi-326.
|
|
1
|
+
## [3.17.21-mdigi-326.6](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.21-mdigi-326.5...v3.17.21-mdigi-326.6) (2025-01-30)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.4",
|
|
4
|
-
"serialNumber": "urn:uuid:
|
|
4
|
+
"serialNumber": "urn:uuid:6f2f66e8-dfe8-4da8-905f-9fdda07dc5f8",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2025-01-
|
|
7
|
+
"timestamp": "2025-01-30T12:45:28Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "GitLab",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/product-components",
|
|
3
|
-
"version": "3.17.21-mdigi-326.
|
|
3
|
+
"version": "3.17.21-mdigi-326.6",
|
|
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.19.7-mdigi-326.1",
|
|
33
|
-
"@nuskin/ns-shop": "7.3.0-mdigi-897.
|
|
33
|
+
"@nuskin/ns-shop": "7.3.0-mdigi-897.7",
|
|
34
34
|
"@nuskin/product-recommendation": "2.0.1",
|
|
35
35
|
"axios": "1.6.7",
|
|
36
36
|
"lodash": "4.17.21",
|