@faststore/api 1.9.1 → 1.9.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/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.9.5](https://github.com/vtex/faststore/compare/v1.9.4...v1.9.5) (2022-06-10)
7
+
8
+ **Note:** Version bump only for package @faststore/api
9
+
10
+
11
+
12
+
13
+
14
+ ## 1.9.4 (2022-06-10)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * codesandbox ci ([#1357](https://github.com/vtex/faststore/issues/1357)) ([db07e1f](https://github.com/vtex/faststore/commit/db07e1fb02f28b0f082c361cb2c28250a687b760))
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.9.3](https://github.com/vtex/faststore/compare/v1.9.2...v1.9.3) (2022-06-09)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * Spot pricing sort for lowPrice/highPrice ([#1350](https://github.com/vtex/faststore/issues/1350)) ([6836c6f](https://github.com/vtex/faststore/commit/6836c6f36a14e22eed3564e48a3eae63997b85b8))
31
+
32
+
33
+
34
+
35
+
6
36
  ## 1.9.1 (2022-06-09)
7
37
 
8
38
  **Note:** Version bump only for package @faststore/api
@@ -197,7 +197,7 @@ const IntelligentSearch = ({
197
197
  sort = '',
198
198
  selectedFacets = [],
199
199
  type,
200
- fuzzy = '0'
200
+ fuzzy = 'auto'
201
201
  }) => {
202
202
  const params = new URLSearchParams({
203
203
  page: (page + 1).toString(),
@@ -457,7 +457,7 @@ const sellingPrice = offer => {
457
457
 
458
458
  return (_offer$Price = offer.Price) != null ? _offer$Price : 0;
459
459
  };
460
- const availability = available => available ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'; // Smallest Available Selling Price First
460
+ const availability = available => available ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'; // Smallest Available Spot Price First
461
461
 
462
462
  const bestOfferFirst = (a, b) => {
463
463
  if (inStock(a) && !inStock(b)) {
@@ -474,16 +474,13 @@ const inStockOrderFormItem = itemAvailability => itemAvailability === 'available
474
474
 
475
475
  const StoreAggregateOffer = {
476
476
  highPrice: offers => {
477
- var _availableOffers$Pric, _availableOffers;
478
-
479
477
  const availableOffers = offers.filter(inStock);
480
- return (_availableOffers$Pric = (_availableOffers = availableOffers[availableOffers.length - 1]) == null ? void 0 : _availableOffers.Price) != null ? _availableOffers$Pric : 0;
478
+ const highOffer = availableOffers[availableOffers.length - 1];
479
+ return highOffer != null ? price(highOffer) : 0;
481
480
  },
482
481
  lowPrice: offers => {
483
- var _availableOffers$0$Pr, _availableOffers$;
484
-
485
- const availableOffers = offers.filter(inStock);
486
- return (_availableOffers$0$Pr = (_availableOffers$ = availableOffers[0]) == null ? void 0 : _availableOffers$.Price) != null ? _availableOffers$0$Pr : 0;
482
+ const [lowOffer] = offers.filter(inStock);
483
+ return lowOffer ? price(lowOffer) : 0;
487
484
  },
488
485
  offerCount: offers => offers.length,
489
486
  priceCurrency: () => '',