@nuskin/product-components 3.18.0 → 4.0.0-cx15-11969.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "branches": [
3
- "master"
3
+ "master", {"name":"CX15-11969", "channel":"prerelease", "prerelease":"cx15-11969"}
4
4
  ],
5
5
  "plugins": [
6
6
  "@semantic-release/release-notes-generator",
@@ -31,9 +31,7 @@
31
31
 
32
32
  <script>
33
33
  import { PopularProductsService } from "@nuskin/ns-product";
34
- import { getRecommendations } from "@nuskin/product-recommendation";
35
34
  import { NsCarousel } from "@nuskin/design-components";
36
- import { CartService } from "@nuskin/ns-shop";
37
35
 
38
36
  import NsProductCard from "./NsProductCard.vue";
39
37
 
@@ -146,9 +144,6 @@ export default {
146
144
  },
147
145
  setSkusByType(type) {
148
146
  switch (type) {
149
- case "recommended":
150
- this.setSkusWithRecommendedProducts();
151
- break;
152
147
  case "popular":
153
148
  this.setSkusWithPopularProducts();
154
149
  break;
@@ -156,39 +151,6 @@ export default {
156
151
  this.localSkus = this.skus;
157
152
  }
158
153
  },
159
- async setSkusWithRecommendedProducts() {
160
- try {
161
- let options = {};
162
- let unique = [];
163
- let cartSkus = [];
164
-
165
- if (CartService.getItemData().length > 0) {
166
- cartSkus = CartService.getItemData().map(item => item.sku);
167
- options.productSkus = cartSkus;
168
- }
169
-
170
- let recommendedProducts = await getRecommendations(options);
171
- if (recommendedProducts) {
172
- recommendedProducts.sort((a, b) => (a.type > b.type ? 1 : -1));
173
-
174
- unique = Array.from(
175
- new Set(recommendedProducts.map(item => item.sku))
176
- )
177
- .map(sku => {
178
- return {
179
- sku: sku,
180
- type: recommendedProducts.find(item => item.sku === sku).type
181
- };
182
- })
183
- .filter(item => !cartSkus.includes(item.sku));
184
-
185
- this.localSkus = unique.map(recommendation => recommendation.sku);
186
- }
187
- } catch (err) {
188
- console.log(err);
189
- this.localSkus = [];
190
- }
191
- },
192
154
  async setSkusWithPopularProducts() {
193
155
  const popularProducts = await PopularProductsService.getPopularProducts();
194
156
  if (popularProducts) {
package/docs/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- # [3.18.0](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.17.22...v3.18.0) (2025-03-31)
1
+ # [4.0.0-cx15-11969.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v4.0.0-cx15-11969.1...v4.0.0-cx15-11969.2) (2025-04-14)