@shopgate/pwa-common-commerce 7.30.0-alpha.6 → 7.30.0-alpha.8
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/cart/action-creators/addCouponsToCart.js +9 -2
- package/cart/action-creators/addProductsToCart.js +9 -2
- package/cart/action-creators/deleteCouponsFromCart.js +9 -2
- package/cart/action-creators/deleteProductsFromCart.js +9 -2
- package/cart/action-creators/errorAddCouponsToCart.js +10 -2
- package/cart/action-creators/errorAddProductsToCart.js +10 -2
- package/cart/action-creators/errorCart.js +8 -2
- package/cart/action-creators/errorDeleteCouponsFromCart.js +10 -2
- package/cart/action-creators/errorDeleteProductsFromCart.js +10 -2
- package/cart/action-creators/errorUpdateProductsInCart.js +10 -2
- package/cart/action-creators/receiveCart.js +9 -2
- package/cart/action-creators/requestCart.js +8 -2
- package/cart/action-creators/setCartProductPendingCount.js +9 -2
- package/cart/action-creators/setCouponFieldError.js +9 -2
- package/cart/action-creators/setCouponFieldValue.js +9 -2
- package/cart/action-creators/setFulfillmentSlot.js +9 -2
- package/cart/action-creators/successAddCouponsToCart.js +10 -2
- package/cart/action-creators/successAddProductsToCart.js +8 -2
- package/cart/action-creators/successDeleteCouponsFromCart.js +8 -2
- package/cart/action-creators/successDeleteProductsFromCart.js +8 -2
- package/cart/action-creators/successUpdateProductsInCart.js +8 -2
- package/cart/action-creators/updateProductsInCart.js +9 -2
- package/cart/actions/addCouponsToCart.js +52 -8
- package/cart/actions/addProductsToCart.js +80 -11
- package/cart/actions/deleteCouponsFromCart.js +39 -6
- package/cart/actions/deleteProductsFromCart.js +38 -6
- package/cart/actions/fetchCart.js +52 -8
- package/cart/actions/updateProductsInCart.js +44 -6
- package/cart/constants/PipelineErrors.js +6 -1
- package/cart/constants/Pipelines.js +6 -1
- package/cart/constants/Portals.js +85 -1
- package/cart/constants/index.js +39 -2
- package/cart/helpers/config.js +47 -2
- package/cart/helpers/createPipelineErrorList.js +30 -4
- package/cart/helpers/fulfillmentSlots.js +37 -4
- package/cart/helpers/index.js +14 -3
- package/cart/helpers/quantity.js +23 -4
- package/cart/helpers/shipping.js +57 -2
- package/cart/helpers/tax.js +26 -2
- package/cart/index.js +25 -5
- package/cart/mock.js +130 -1
- package/cart/reducers/couponField.js +30 -2
- package/cart/reducers/data.js +98 -6
- package/cart/reducers/index.js +7 -1
- package/cart/selectors/index.js +181 -31
- package/cart/selectors/spec.js +189 -2
- package/cart/streams/index.js +176 -29
- package/cart/subscriptions/index.js +307 -30
- package/category/action-creators/errorCategory.js +10 -2
- package/category/action-creators/errorCategoryChildren.js +9 -2
- package/category/action-creators/errorRootCategories.js +8 -2
- package/category/action-creators/receiveCategory.js +12 -2
- package/category/action-creators/receiveCategoryChildren.js +10 -2
- package/category/action-creators/receiveRootCategories.js +9 -2
- package/category/action-creators/requestCategory.js +9 -2
- package/category/action-creators/requestCategoryChildren.js +9 -2
- package/category/action-creators/requestRootCategories.js +8 -2
- package/category/actions/fetchCategory.js +47 -5
- package/category/actions/fetchCategoryChildren.js +30 -2
- package/category/actions/fetchCategoryOrRootCategories.js +16 -2
- package/category/actions/fetchCategoryProducts.js +36 -2
- package/category/actions/fetchRootCategories.js +31 -2
- package/category/actions/getCategory.js +10 -2
- package/category/constants/Pipelines.js +3 -1
- package/category/constants/Portals.js +56 -3
- package/category/constants/index.js +17 -2
- package/category/helpers/index.js +27 -3
- package/category/index.js +19 -5
- package/category/mock.js +176 -1
- package/category/reducers/categoriesById.js +65 -3
- package/category/reducers/childrenByCategoryId.js +55 -4
- package/category/reducers/helpers/handleCategoryCollection.js +24 -3
- package/category/reducers/helpers/handleReceivedCategories.js +3 -1
- package/category/reducers/index.js +12 -2
- package/category/reducers/rootCategories.js +31 -2
- package/category/selectors/index.js +115 -16
- package/category/streams/index.js +82 -4
- package/category/subscriptions/index.js +96 -3
- package/checkout/action-creators/successCheckout.js +9 -2
- package/checkout/actions/fetchCheckoutUrl.js +28 -3
- package/checkout/constants/Pipelines.js +1 -1
- package/checkout/constants/index.js +3 -2
- package/checkout/index.js +11 -4
- package/checkout/selectors/index.js +7 -2
- package/checkout/streams/index.js +8 -2
- package/checkout/subscriptions/index.js +35 -6
- package/favorites/action-creators/index.js +206 -24
- package/favorites/actions/addFavorites.js +41 -3
- package/favorites/actions/addFavoritesList.js +27 -2
- package/favorites/actions/fetchFavoriteIds.js +49 -5
- package/favorites/actions/fetchFavorites.js +60 -5
- package/favorites/actions/fetchFavoritesList.js +47 -3
- package/favorites/actions/fetchFavoritesListsWithItems.js +32 -3
- package/favorites/actions/getFavorites.js +6 -2
- package/favorites/actions/removeFavorites.js +32 -3
- package/favorites/actions/removeFavoritesList.js +24 -2
- package/favorites/actions/toggleFavorites.js +68 -10
- package/favorites/actions/updateFavorites.js +39 -3
- package/favorites/actions/updateFavoritesList.js +26 -2
- package/favorites/constants/Pipelines.js +9 -1
- package/favorites/constants/Portals.js +32 -4
- package/favorites/constants/index.js +37 -5
- package/favorites/index.js +14 -4
- package/favorites/mock.js +89 -4
- package/favorites/reducers/index.js +7 -1
- package/favorites/reducers/lists.js +74 -2
- package/favorites/reducers/products.js +231 -24
- package/favorites/selectors/index.js +188 -24
- package/favorites/streams/index.js +135 -23
- package/favorites/streams/spec.js +517 -8
- package/favorites/subscriptions/index.js +260 -25
- package/favorites/subscriptions/spec.js +701 -28
- package/filter/action-creators/errorFilters.js +9 -2
- package/filter/action-creators/index.js +4 -1
- package/filter/action-creators/receiveFilters.js +10 -2
- package/filter/action-creators/requestFilters.js +9 -2
- package/filter/action-creators/updateFilters.js +8 -2
- package/filter/actions/fetchFilters.js +46 -3
- package/filter/actions/getFilters.js +6 -2
- package/filter/actions/helpers/buildFilterParams.js +34 -2
- package/filter/actions/helpers/buildRequestFilters.js +35 -2
- package/filter/actions/helpers/processFilters.js +10 -2
- package/filter/actions/helpers/processParams.js +26 -2
- package/filter/constants/Pipelines.js +1 -1
- package/filter/constants/Portals.js +39 -3
- package/filter/constants/index.js +8 -1
- package/filter/index.js +12 -4
- package/filter/reducers/helpers/enrichFilters.js +11 -3
- package/filter/reducers/index.js +5 -1
- package/filter/reducers/resultsByHash.js +43 -3
- package/filter/selectors/index.js +47 -6
- package/filter/streams/index.js +30 -1
- package/filter/subscriptions/index.js +34 -2
- package/market/constants/Portals.js +22 -4
- package/market/constants/index.js +2 -1
- package/market/helpers/showReturnPolicy.js +3 -1
- package/market/helpers/showTaxDisclaimer.js +3 -1
- package/market/index.js +6 -2
- package/orders/constants.js +2 -1
- package/package.json +3 -3
- package/product/action-creators/deleteProductsByIds.js +10 -2
- package/product/action-creators/errorProduct.js +10 -2
- package/product/action-creators/errorProductDescription.js +10 -2
- package/product/action-creators/errorProductImages.js +10 -2
- package/product/action-creators/errorProductMedia.js +10 -2
- package/product/action-creators/errorProductOptions.js +10 -2
- package/product/action-creators/errorProductProperties.js +10 -2
- package/product/action-creators/errorProductRelations.js +9 -2
- package/product/action-creators/errorProductShipping.js +10 -2
- package/product/action-creators/errorProductVariants.js +10 -2
- package/product/action-creators/errorProducts.js +9 -2
- package/product/action-creators/expireProductById.js +10 -2
- package/product/action-creators/expireProductData.js +11 -2
- package/product/action-creators/expireProductsByHash.js +9 -2
- package/product/action-creators/productNotAvailable.js +10 -2
- package/product/action-creators/provideProduct.js +9 -2
- package/product/action-creators/receiveProduct.js +10 -2
- package/product/action-creators/receiveProductCached.js +9 -2
- package/product/action-creators/receiveProductDescription.js +10 -2
- package/product/action-creators/receiveProductImages.js +10 -2
- package/product/action-creators/receiveProductMedia.js +10 -2
- package/product/action-creators/receiveProductOptions.js +10 -2
- package/product/action-creators/receiveProductProperties.js +10 -2
- package/product/action-creators/receiveProductRelations.js +12 -2
- package/product/action-creators/receiveProductShipping.js +10 -2
- package/product/action-creators/receiveProductVariants.js +10 -2
- package/product/action-creators/receiveProducts.js +16 -2
- package/product/action-creators/receiveProductsCached.js +9 -2
- package/product/action-creators/refreshExpiredPDPData.js +8 -2
- package/product/action-creators/requestProduct.js +10 -2
- package/product/action-creators/requestProductDescription.js +9 -2
- package/product/action-creators/requestProductImages.js +9 -2
- package/product/action-creators/requestProductMedia.js +9 -2
- package/product/action-creators/requestProductOptions.js +9 -2
- package/product/action-creators/requestProductProperties.js +9 -2
- package/product/action-creators/requestProductRelations.js +10 -2
- package/product/action-creators/requestProductShipping.js +9 -2
- package/product/action-creators/requestProductVariants.js +9 -2
- package/product/action-creators/requestProducts.js +9 -2
- package/product/action-creators/setProductId.js +9 -2
- package/product/action-creators/setProductQuantity.js +9 -2
- package/product/action-creators/setProductVariantId.js +9 -2
- package/product/actions/changeSortOrder.js +21 -2
- package/product/actions/fetchHighlightProducts.js +18 -2
- package/product/actions/fetchLiveshoppingProducts.js +14 -2
- package/product/actions/fetchProduct.js +52 -3
- package/product/actions/fetchProductDescription.js +30 -2
- package/product/actions/fetchProductImages.js +31 -2
- package/product/actions/fetchProductMedia.js +35 -2
- package/product/actions/fetchProductOptions.js +31 -2
- package/product/actions/fetchProductProperties.js +30 -2
- package/product/actions/fetchProductRelations.js +63 -2
- package/product/actions/fetchProductShipping.js +31 -2
- package/product/actions/fetchProductVariants.js +31 -2
- package/product/actions/fetchProducts.js +189 -17
- package/product/actions/fetchProductsById.js +68 -8
- package/product/actions/fetchProductsByQuery.js +102 -18
- package/product/actions/getHighlightProducts.js +6 -2
- package/product/actions/getLiveshoppingProducts.js +6 -2
- package/product/actions/getProduct.js +6 -2
- package/product/actions/getProductDescription.js +6 -2
- package/product/actions/getProductImages.js +6 -2
- package/product/actions/getProductOptions.js +6 -2
- package/product/actions/getProductProperties.js +6 -2
- package/product/actions/getProductRelations.js +6 -2
- package/product/actions/getProductShipping.js +6 -2
- package/product/actions/getProductVariants.js +6 -2
- package/product/actions/getProducts.js +6 -2
- package/product/actions/getProductsById.js +6 -2
- package/product/actions/getProductsByQuery.js +6 -2
- package/product/actions/processProductFlags.js +35 -3
- package/product/actions/updateMetadata.js +17 -2
- package/product/collections/ProductImageFormats.js +48 -8
- package/product/collections/index.js +1 -1
- package/product/constants/Pipelines.js +12 -1
- package/product/constants/Portals.js +200 -33
- package/product/constants/index.js +90 -18
- package/product/helpers/index.js +61 -8
- package/product/index.js +36 -6
- package/product/mock.js +1002 -2
- package/product/reducers/descriptionsByProductId.js +54 -5
- package/product/reducers/helpers/formatOptions.js +17 -2
- package/product/reducers/helpers/handleProductCollection.js +19 -2
- package/product/reducers/imagesByProductId.js +51 -4
- package/product/reducers/index.js +23 -1
- package/product/reducers/mediaByProductId.js +55 -3
- package/product/reducers/optionsByProductId.js +41 -2
- package/product/reducers/productRelationsByHash.js +43 -2
- package/product/reducers/productsById.js +122 -7
- package/product/reducers/propertiesByProductId.js +48 -2
- package/product/reducers/resultsByHash.js +125 -9
- package/product/reducers/shippingByProductId.js +37 -2
- package/product/reducers/variantsByProductId.js +56 -2
- package/product/selectors/options.js +90 -13
- package/product/selectors/page.js +62 -13
- package/product/selectors/price.js +81 -18
- package/product/selectors/product.js +549 -59
- package/product/selectors/product.mock.js +327 -12
- package/product/selectors/relations.js +35 -5
- package/product/selectors/variants.js +91 -15
- package/product/streams/index.js +167 -13
- package/product/subscriptions/index.js +210 -4
- package/reviews/action-creators/errorProductReviews.js +9 -2
- package/reviews/action-creators/errorReviews.js +9 -2
- package/reviews/action-creators/errorSubmitReview.js +9 -2
- package/reviews/action-creators/errorUserReview.js +9 -2
- package/reviews/action-creators/flushUserReview.js +8 -2
- package/reviews/action-creators/receiveProductReviews.js +11 -2
- package/reviews/action-creators/receiveReviews.js +12 -2
- package/reviews/action-creators/receiveSubmitReview.js +9 -2
- package/reviews/action-creators/receiveUserReview.js +10 -2
- package/reviews/action-creators/requestProductReviews.js +10 -2
- package/reviews/action-creators/requestReviews.js +9 -2
- package/reviews/action-creators/requestSubmitReview.js +9 -2
- package/reviews/action-creators/requestUserReview.js +9 -2
- package/reviews/action-creators/resetSubmittedReview.js +9 -2
- package/reviews/action-creators/spec.js +40 -1
- package/reviews/actions/fetchProductReviews.js +37 -2
- package/reviews/actions/fetchReviews.js +38 -2
- package/reviews/actions/fetchUserReview.js +31 -2
- package/reviews/actions/flushUserReview.js +5 -1
- package/reviews/actions/getProductReviews.js +6 -2
- package/reviews/actions/getUserReview.js +6 -2
- package/reviews/actions/spec.js +241 -4
- package/reviews/actions/submitReview.js +63 -3
- package/reviews/constants/Pipelines.js +4 -1
- package/reviews/constants/Portals.js +4 -1
- package/reviews/constants/index.js +26 -7
- package/reviews/index.js +15 -4
- package/reviews/mock.js +172 -11
- package/reviews/reducers/index.js +11 -1
- package/reviews/reducers/mock.js +14 -2
- package/reviews/reducers/reviewsByHash.js +52 -6
- package/reviews/reducers/reviewsById.js +27 -2
- package/reviews/reducers/reviewsByProductId.js +47 -2
- package/reviews/reducers/spec.js +211 -2
- package/reviews/reducers/userReviewsByProductId.js +68 -2
- package/reviews/selectors/index.js +123 -19
- package/reviews/selectors/mock.js +100 -1
- package/reviews/selectors/spec.js +100 -1
- package/reviews/streams/index.js +37 -5
- package/reviews/streams/spec.js +25 -1
- package/reviews/subscriptions/index.js +27 -2
- package/scanner/action-creators/errorHandleScanner.js +11 -2
- package/scanner/action-creators/scannerFinished.js +11 -2
- package/scanner/action-creators/startScanner.js +8 -2
- package/scanner/action-creators/successHandleScanner.js +11 -2
- package/scanner/actions/handleBarCode.js +22 -2
- package/scanner/actions/handleNoResults.js +23 -2
- package/scanner/actions/handleQrCode.js +116 -6
- package/scanner/actions/handleSearch.js +33 -2
- package/scanner/constants/Portals.js +22 -1
- package/scanner/constants/index.js +17 -1
- package/scanner/helpers/index.js +115 -5
- package/scanner/index.js +19 -5
- package/scanner/streams/index.js +36 -1
- package/scanner/subscriptions/index.js +78 -8
- package/search/action-creators/errorSearchResults.js +10 -2
- package/search/action-creators/receiveSearchResults.js +11 -2
- package/search/action-creators/receiveSearchSuggestions.js +10 -2
- package/search/action-creators/requestSearchResults.js +10 -2
- package/search/action-creators/requestSearchSuggestions.js +9 -2
- package/search/actions/fetchSearchResults.js +66 -8
- package/search/actions/fetchSearchSuggestions.js +36 -2
- package/search/constants/Pipelines.js +1 -1
- package/search/constants/Portals.js +9 -2
- package/search/constants/index.js +10 -2
- package/search/helpers/index.js +5 -2
- package/search/helpers/removeHighlightingPlaceholders.js +4 -1
- package/search/helpers/spec.js +19 -1
- package/search/index.js +17 -5
- package/search/reducers/index.js +38 -2
- package/search/selectors/index.js +23 -4
- package/search/streams/index.js +51 -3
- package/search/subscriptions/index.js +132 -5
|
@@ -1,6 +1,78 @@
|
|
|
1
|
-
import{produce}from'immer';
|
|
1
|
+
import { produce } from 'immer';
|
|
2
|
+
import { RECEIVE_FAVORITES_LISTS, SUCCESS_ADD_FAVORITES_LIST, SUCCESS_UPDATE_FAVORITES_LIST, SUCCESS_REMOVE_FAVORITES_LIST, OPEN_FAVORITE_LIST_CHOOSER, CLOSE_FAVORITE_LIST_CHOOSER, FAVORITES_LIFETIME, OPEN_FAVORITE_COMMENT_DIALOG, CLOSE_FAVORITE_COMMENT_DIALOG } from "../constants";
|
|
3
|
+
|
|
4
|
+
/**
|
|
2
5
|
* Favorites lists reducer.
|
|
3
6
|
* @param {Object} state Current state.
|
|
4
7
|
* @param {Object} action Dispatched action.
|
|
5
8
|
* @returns {Object} New state.
|
|
6
|
-
*/
|
|
9
|
+
*/
|
|
10
|
+
const lists = (state = {
|
|
11
|
+
expires: 0,
|
|
12
|
+
lists: [],
|
|
13
|
+
chooser: null,
|
|
14
|
+
commentDialog: null
|
|
15
|
+
}, action) => {
|
|
16
|
+
/* eslint-disable no-param-reassign */
|
|
17
|
+
const newState = produce(state, draft => {
|
|
18
|
+
switch (action.type) {
|
|
19
|
+
case OPEN_FAVORITE_LIST_CHOOSER:
|
|
20
|
+
{
|
|
21
|
+
draft.chooser = {
|
|
22
|
+
productId: action.productId,
|
|
23
|
+
withRelatives: action.withRelatives
|
|
24
|
+
};
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case CLOSE_FAVORITE_LIST_CHOOSER:
|
|
28
|
+
{
|
|
29
|
+
draft.chooser = null;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case OPEN_FAVORITE_COMMENT_DIALOG:
|
|
33
|
+
{
|
|
34
|
+
draft.commentDialog = {
|
|
35
|
+
productId: action.productId,
|
|
36
|
+
listId: action.listId
|
|
37
|
+
};
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case CLOSE_FAVORITE_COMMENT_DIALOG:
|
|
41
|
+
{
|
|
42
|
+
draft.commentDialog = null;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case RECEIVE_FAVORITES_LISTS:
|
|
46
|
+
{
|
|
47
|
+
draft.expires = Date.now() + FAVORITES_LIFETIME;
|
|
48
|
+
draft.lists = action.favoritesLists;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
case SUCCESS_ADD_FAVORITES_LIST:
|
|
52
|
+
{
|
|
53
|
+
draft.lists.push({
|
|
54
|
+
id: action.listId,
|
|
55
|
+
name: action.name
|
|
56
|
+
});
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case SUCCESS_UPDATE_FAVORITES_LIST:
|
|
60
|
+
{
|
|
61
|
+
const list = draft.lists.find(l => l.id === action.listId);
|
|
62
|
+
list.name = action.name;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case SUCCESS_REMOVE_FAVORITES_LIST:
|
|
66
|
+
{
|
|
67
|
+
const listIndex = draft.lists.findIndex(l => l.id === action.listId);
|
|
68
|
+
draft.lists.splice(listIndex, 1);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
default:
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
/* eslint-enable no-param-reassign */
|
|
76
|
+
return newState;
|
|
77
|
+
};
|
|
78
|
+
export default lists;
|
|
@@ -1,28 +1,235 @@
|
|
|
1
|
-
import{produce}
|
|
1
|
+
import { produce } from 'immer';
|
|
2
|
+
import isNumber from 'lodash/isNumber';
|
|
3
|
+
import isString from 'lodash/isString';
|
|
4
|
+
import { REQUEST_ADD_FAVORITES, SUCCESS_ADD_FAVORITES, CANCEL_REQUEST_SYNC_FAVORITES, ERROR_ADD_FAVORITES, REQUEST_REMOVE_FAVORITES, SUCCESS_REMOVE_FAVORITES, ERROR_REMOVE_FAVORITES, REQUEST_FAVORITES, ERROR_FETCH_FAVORITES, SUCCESS_REMOVE_FAVORITES_LIST, SUCCESS_ADD_FAVORITES_LIST, RECEIVE_FAVORITES, FAVORITES_LIFETIME, SUCCESS_UPDATE_FAVORITES, REQUEST_UPDATE_FAVORITES, ERROR_UPDATE_FAVORITES, RECEIVE_FAVORITES_LISTS } from "../constants";
|
|
5
|
+
|
|
6
|
+
/**
|
|
2
7
|
* Favorites reducer.
|
|
3
8
|
* @param {Object} state Current state.
|
|
4
9
|
* @param {Object} action Dispatched action.
|
|
5
10
|
* @returns {Object} New state.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
*/
|
|
12
|
+
const products = (state = {
|
|
13
|
+
byList: {}
|
|
14
|
+
}, action) => {
|
|
15
|
+
/* eslint-disable no-param-reassign */
|
|
16
|
+
const producedState = produce(state, draft => {
|
|
17
|
+
switch (action.type) {
|
|
18
|
+
// Handle a new favorites request.
|
|
19
|
+
case REQUEST_FAVORITES:
|
|
20
|
+
{
|
|
21
|
+
const existingList = draft.byList[action.listId];
|
|
22
|
+
if (!existingList) {
|
|
23
|
+
draft.byList[action.listId] = {
|
|
24
|
+
isFetching: true,
|
|
25
|
+
lastChange: 0,
|
|
26
|
+
lastFetch: 0,
|
|
27
|
+
expires: 0,
|
|
28
|
+
items: [],
|
|
29
|
+
syncCount: 0
|
|
30
|
+
};
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
existingList.isFetching = true;
|
|
34
|
+
existingList.expires = 0;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Handle incoming favorite products.
|
|
39
|
+
case RECEIVE_FAVORITES:
|
|
40
|
+
{
|
|
41
|
+
const list = draft.byList[action.listId];
|
|
42
|
+
const isSynching = list.syncCount > 0;
|
|
43
|
+
const isOngoing = state.lastChange > action.requestTimestamp;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Note: When favorites are received, an add or remove request can be in progress. In this
|
|
47
|
+
* case only fetching state will be updated and the received data will be discarded.
|
|
48
|
+
* A new fetch request will be queued as soon as the sync is done, which will recover
|
|
49
|
+
* discarded data.
|
|
50
|
+
*/
|
|
51
|
+
list.isFetching = false;
|
|
52
|
+
if (list.ready && (isSynching || isOngoing)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
list.expires = Date.now() + FAVORITES_LIFETIME;
|
|
56
|
+
list.items = action.items.map(({
|
|
57
|
+
quantity,
|
|
58
|
+
notes,
|
|
59
|
+
product
|
|
60
|
+
}) => ({
|
|
61
|
+
quantity,
|
|
62
|
+
notes,
|
|
63
|
+
productId: product.id
|
|
64
|
+
}));
|
|
65
|
+
list.ready = true;
|
|
66
|
+
// `syncCount` stays untouched because this is not considered to be a sync.
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Handle failed fetching
|
|
71
|
+
case ERROR_FETCH_FAVORITES:
|
|
72
|
+
{
|
|
73
|
+
const list = draft.byList[action.listId];
|
|
74
|
+
list.isFetching = false;
|
|
75
|
+
list.expires = 0;
|
|
76
|
+
list.ready = true;
|
|
77
|
+
// `syncCount` stays untouched because this is not considered to be a sync.
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Handle adding favorite list products.
|
|
82
|
+
case REQUEST_ADD_FAVORITES:
|
|
83
|
+
{
|
|
84
|
+
const list = draft.byList[action.listId];
|
|
85
|
+
const matchingItem = list.items.find(({
|
|
86
|
+
productId
|
|
87
|
+
}) => productId === action.productId);
|
|
88
|
+
if (matchingItem) {
|
|
89
|
+
matchingItem.notes = typeof action.notes === 'string' ? action.notes : matchingItem.notes;
|
|
90
|
+
matchingItem.quantity = typeof action.quantity === 'number' ? matchingItem.quantity + action.quantity : matchingItem.quantity + 1;
|
|
91
|
+
} else {
|
|
92
|
+
list.items.push({
|
|
93
|
+
notes: action.notes || '',
|
|
94
|
+
quantity: action.quantity || 1,
|
|
95
|
+
productId: action.productId
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
list.lastChange = Date.now();
|
|
99
|
+
list.syncCount += 1;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case REQUEST_UPDATE_FAVORITES:
|
|
103
|
+
{
|
|
104
|
+
const list = draft.byList[action.listId];
|
|
105
|
+
const matchingItem = list.items.find(({
|
|
106
|
+
productId
|
|
107
|
+
}) => productId === action.productId);
|
|
108
|
+
if (matchingItem) {
|
|
109
|
+
if (isNumber(action.quantity)) {
|
|
110
|
+
matchingItem.quantity = action.quantity;
|
|
111
|
+
}
|
|
112
|
+
if (isString(action.notes)) {
|
|
113
|
+
matchingItem.notes = action.notes;
|
|
114
|
+
}
|
|
115
|
+
list.lastChange = Date.now();
|
|
116
|
+
list.syncCount += 1;
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Handle removing favorite list products.
|
|
122
|
+
case REQUEST_REMOVE_FAVORITES:
|
|
123
|
+
{
|
|
124
|
+
const list = draft.byList[action.listId];
|
|
125
|
+
const matchingItemIndex = list.items.findIndex(({
|
|
126
|
+
productId
|
|
127
|
+
}) => productId === action.productId);
|
|
128
|
+
if (matchingItemIndex > -1) {
|
|
129
|
+
list.items.splice(matchingItemIndex, 1);
|
|
130
|
+
}
|
|
131
|
+
list.lastChange = Date.now();
|
|
132
|
+
list.syncCount += 1;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
// Handle cancellation of synchronization.
|
|
136
|
+
// Sync count needs to be updated, when an add or a remove favorites action is cancelled
|
|
137
|
+
// This recovers from invalid sync states when a backend call is detected to be redundant
|
|
138
|
+
case CANCEL_REQUEST_SYNC_FAVORITES:
|
|
139
|
+
{
|
|
140
|
+
const list = draft.byList[action.listId];
|
|
141
|
+
list.syncCount -= action.count;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Handle success of adding favorite list products.
|
|
146
|
+
case SUCCESS_ADD_FAVORITES:
|
|
147
|
+
case SUCCESS_UPDATE_FAVORITES:
|
|
148
|
+
case SUCCESS_REMOVE_FAVORITES:
|
|
149
|
+
{
|
|
150
|
+
const list = draft.byList[action.listId];
|
|
151
|
+
list.lastChange = Date.now();
|
|
152
|
+
list.syncCount -= 1;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Handle deletion failure by adding the product back in to the list.
|
|
157
|
+
case ERROR_REMOVE_FAVORITES:
|
|
158
|
+
{
|
|
159
|
+
const list = draft.byList[action.listId];
|
|
160
|
+
list.items.push({
|
|
161
|
+
productId: action.productId,
|
|
162
|
+
quantity: action.quantity || 1,
|
|
163
|
+
notes: action.notes || ''
|
|
164
|
+
});
|
|
165
|
+
list.lastChange = Date.now();
|
|
166
|
+
list.syncCount -= 1;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Handle adding failure by removing the product from the list.
|
|
171
|
+
case ERROR_ADD_FAVORITES:
|
|
172
|
+
{
|
|
173
|
+
const list = draft.byList[action.listId];
|
|
174
|
+
const matchingItemIndex = list.items.findIndex(({
|
|
175
|
+
productId
|
|
176
|
+
}) => productId === action.productId);
|
|
177
|
+
if (matchingItemIndex > -1) {
|
|
178
|
+
list.items.splice(matchingItemIndex, 1);
|
|
179
|
+
}
|
|
180
|
+
list.lastChange = Date.now();
|
|
181
|
+
list.syncCount -= 1;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case ERROR_UPDATE_FAVORITES:
|
|
185
|
+
{
|
|
186
|
+
const list = draft.byList[action.listId];
|
|
187
|
+
list.lastChange = Date.now();
|
|
188
|
+
list.syncCount -= 1;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Handle cleanup after deletion of a list.
|
|
193
|
+
case SUCCESS_REMOVE_FAVORITES_LIST:
|
|
194
|
+
{
|
|
195
|
+
delete draft.byList[action.listId];
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Handle adding new lists.
|
|
200
|
+
case SUCCESS_ADD_FAVORITES_LIST:
|
|
201
|
+
{
|
|
202
|
+
draft.byList[action.listId] = {
|
|
203
|
+
isFetching: true,
|
|
204
|
+
lastChange: 0,
|
|
205
|
+
lastFetch: 0,
|
|
206
|
+
expires: 0,
|
|
207
|
+
items: [],
|
|
208
|
+
syncCount: 0,
|
|
209
|
+
ready: true
|
|
210
|
+
};
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Handle cleanup after lists are updated
|
|
215
|
+
case RECEIVE_FAVORITES_LISTS:
|
|
216
|
+
{
|
|
217
|
+
const listIds = action.favoritesLists.map(({
|
|
218
|
+
id
|
|
219
|
+
}) => id);
|
|
220
|
+
Object.keys(draft.byList).forEach(id => {
|
|
221
|
+
if (!listIds.includes(id)) {
|
|
222
|
+
// Remove list items that don't have a list anymore
|
|
223
|
+
delete draft.byList[id];
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
default:
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
/* eslint-enable no-param-reassign */
|
|
233
|
+
return producedState;
|
|
234
|
+
};
|
|
235
|
+
export default products;
|
|
@@ -1,95 +1,259 @@
|
|
|
1
|
-
|
|
1
|
+
import "core-js/modules/es.array.reduce.js";
|
|
2
|
+
import { createSelector } from 'reselect';
|
|
3
|
+
import uniq from 'lodash/uniq';
|
|
4
|
+
import appConfig from '@shopgate/pwa-common/helpers/config';
|
|
5
|
+
import { hasNewServices } from '@shopgate/engage/core/helpers';
|
|
6
|
+
import { getProducts, getProductId } from "../../product/selectors/product";
|
|
7
|
+
import { getKnownRelatives } from "../../product/selectors/variants";
|
|
8
|
+
const defaultIds = [];
|
|
9
|
+
|
|
10
|
+
/**
|
|
2
11
|
* @param {Object} state The global state.
|
|
3
12
|
* @return {Object}
|
|
4
|
-
*/
|
|
13
|
+
*/
|
|
14
|
+
export const getFavoritesState = state => state.favorites || {};
|
|
15
|
+
|
|
16
|
+
/**
|
|
5
17
|
* @param {Object} state The global state.
|
|
6
18
|
* @return {Object}
|
|
7
|
-
*/
|
|
19
|
+
*/
|
|
20
|
+
export const getFavoritesListState = state => state.favorites?.lists || {};
|
|
21
|
+
|
|
22
|
+
/**
|
|
8
23
|
* Returns a list of available wishlists to the user.
|
|
9
24
|
* @param {Object} state The global state.
|
|
10
25
|
* @return {Object}
|
|
11
|
-
*/
|
|
26
|
+
*/
|
|
27
|
+
export const getFavoritesLists = state => getFavoritesListState(state)?.lists || [];
|
|
28
|
+
|
|
29
|
+
/**
|
|
12
30
|
* @param {Object} state The global state.
|
|
13
31
|
* @return {Object|null}
|
|
14
|
-
*/
|
|
32
|
+
*/
|
|
33
|
+
export const getFavoritesProducts = createSelector(getFavoritesState, state => {
|
|
34
|
+
if (!state.products) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return state.products;
|
|
38
|
+
});
|
|
39
|
+
export const getFavoritesDefaultList = createSelector(getFavoritesLists, lists => lists.find(list => list.id === 'DEFAULT') ?? {
|
|
40
|
+
id: 'DEFAULT'
|
|
41
|
+
});
|
|
42
|
+
export const hasMultipleFavoritesList = createSelector(getFavoritesLists, lists => lists.length > 1);
|
|
43
|
+
|
|
44
|
+
/**
|
|
15
45
|
* A selector that gets the id of the favorites list by the given name
|
|
16
46
|
* @param {Object} state The current application state.
|
|
17
47
|
* @param {Object} props The component props.
|
|
18
48
|
* @returns {string} the id of the favorites list
|
|
19
|
-
*/
|
|
49
|
+
*/
|
|
50
|
+
export const getFavoritesListIdByName = createSelector(getFavoritesLists, (state, props) => props.listName, (favLists, listName) => {
|
|
51
|
+
const {
|
|
52
|
+
id
|
|
53
|
+
} = favLists.find(list => list.name === listName) || {};
|
|
54
|
+
return id;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
20
58
|
* @param {Object} state The global state.
|
|
21
59
|
* @returns {Array}
|
|
22
60
|
* @deprecated
|
|
23
|
-
*/
|
|
61
|
+
*/
|
|
62
|
+
export const getFavoritesProductsIds = createSelector(getFavoritesProducts, products => {
|
|
63
|
+
if (!products || !products.byList) {
|
|
64
|
+
return defaultIds;
|
|
65
|
+
}
|
|
66
|
+
return uniq(Object.values(products.byList).map(l => l.items.map(({
|
|
67
|
+
productId
|
|
68
|
+
}) => productId)).flat());
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
24
72
|
* @param {Object} state The global state.
|
|
25
73
|
* @deprecated
|
|
26
|
-
*/
|
|
74
|
+
*/
|
|
75
|
+
export const getFavorites = createSelector(getFavoritesProductsIds, getProducts, (productIds, products) => productIds.filter(id => !!products[id] && products[id].productData).map(id => products[id].productData));
|
|
76
|
+
|
|
77
|
+
/**
|
|
27
78
|
* Creates a selector that selects all ids that belong
|
|
28
79
|
* to the given favorite list.
|
|
29
80
|
* @param {Function} getListCode Selects the list code.
|
|
30
81
|
* @returns {Function}
|
|
31
|
-
*/
|
|
82
|
+
*/
|
|
83
|
+
export const makeGetFavoritesIdsByList = getListCode => createSelector(getFavoritesProducts, getListCode, (favProducts, listId) => favProducts?.byList[listId]?.items.map(({
|
|
84
|
+
productId
|
|
85
|
+
}) => productId) || []);
|
|
86
|
+
|
|
87
|
+
/**
|
|
32
88
|
* Creates a selector that selects all products that belong
|
|
33
89
|
* to the given favorite list.
|
|
34
90
|
* @param {Function} getListCode Selects the list code.
|
|
35
91
|
* @returns {Function}
|
|
36
|
-
*/
|
|
92
|
+
*/
|
|
93
|
+
export const makeGetFavorites = getListCode => createSelector(getFavoritesProducts, getListCode, getProducts, (favItems, listId, products) => {
|
|
94
|
+
const items = favItems?.byList[listId]?.items || [];
|
|
95
|
+
return items.map(item => ({
|
|
96
|
+
...item,
|
|
97
|
+
product: products[item.productId]?.productData
|
|
98
|
+
}));
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/**
|
|
37
102
|
* Creates a selector that retrieves the amount of items on a specific favorites list
|
|
38
103
|
* to the given favorite list.
|
|
39
104
|
* @param {Function} getListCode Selects the list code.
|
|
40
105
|
* @returns {Function}
|
|
41
|
-
*/
|
|
106
|
+
*/
|
|
107
|
+
export const makeGetFavoritesCountByList = getListCode => {
|
|
108
|
+
const getFavoritesIdsByList = makeGetFavoritesIdsByList(getListCode);
|
|
109
|
+
return createSelector(getFavoritesIdsByList, favorites => favorites.length);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
42
113
|
* True when favorites where not yet fetched for the first time.
|
|
43
114
|
* @param {Object} state The global state.
|
|
44
115
|
* @returns {boolean}
|
|
45
|
-
*/
|
|
116
|
+
*/
|
|
117
|
+
export const isInitialLoading = createSelector(getFavoritesProducts, products => {
|
|
118
|
+
if (!products) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
return !Object.values(products?.byList).every(l => l.ready);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/**
|
|
46
125
|
* @param {Object} state The global state.
|
|
47
126
|
* @param {Object} props The selector props
|
|
48
127
|
* @param {boolean} [props.useItemQuantity=false] Whether to consider item quantity at calculation
|
|
49
128
|
* @return {Function}
|
|
50
|
-
*/
|
|
129
|
+
*/
|
|
130
|
+
export const getFavoritesCount = createSelector(getFavoritesProducts, (_, props) => props?.useItemQuantity || false, (products, useItemQuantity) => {
|
|
131
|
+
if (!products?.byList) {
|
|
132
|
+
return 0;
|
|
133
|
+
}
|
|
134
|
+
return Object.values(products.byList).reduce((prev, list) => prev + list.items.reduce((acc, {
|
|
135
|
+
quantity = 1
|
|
136
|
+
}) => {
|
|
137
|
+
if (useItemQuantity) {
|
|
138
|
+
return acc + quantity;
|
|
139
|
+
}
|
|
140
|
+
return acc + 1;
|
|
141
|
+
}, 0), 0);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/**
|
|
51
145
|
* @param {Object} state The global state.
|
|
52
146
|
* @return {boolean}
|
|
53
|
-
*/
|
|
147
|
+
*/
|
|
148
|
+
export const hasFavorites = createSelector(getFavoritesCount, count => !!count);
|
|
149
|
+
|
|
150
|
+
/**
|
|
54
151
|
* @param {Object} state The global state.
|
|
55
152
|
* @return {boolean}
|
|
56
|
-
*/
|
|
153
|
+
*/
|
|
154
|
+
export const isFetching = createSelector(getFavoritesProducts, products => {
|
|
155
|
+
if (!products) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
return Object.values(products.byList).some(l => l.isFetching);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
/**
|
|
57
162
|
* @param {Function} getProductCode Reads the product id.
|
|
58
163
|
* @param {Function} getListCode Reads the list id.
|
|
59
164
|
* @return {boolean}
|
|
60
|
-
*/
|
|
165
|
+
*/
|
|
166
|
+
export const makeIsProductOnSpecificFavoriteList = (getProductCode, getListCode) => createSelector(getProductCode, getListCode, getFavoritesProducts, (productId, listId, products) => !!products.byList[listId]?.items.some(({
|
|
167
|
+
productId: itemProductId
|
|
168
|
+
}) => itemProductId === productId));
|
|
169
|
+
|
|
170
|
+
/**
|
|
61
171
|
* @param {Function} getProductCode Reads the product id.
|
|
62
172
|
* @return {boolean}
|
|
63
|
-
*/
|
|
173
|
+
*/
|
|
174
|
+
export const makeIsProductOnFavoriteList = getProductCode => createSelector(getProductCode, getFavoritesProducts, (productId, products) => !!Object.values(products.byList).find(list => !!list?.items?.find(({
|
|
175
|
+
productId: itemProductId
|
|
176
|
+
}) => itemProductId === productId)));
|
|
177
|
+
/**
|
|
64
178
|
* @param {Object} state The global state.
|
|
65
179
|
* @return {boolean}
|
|
66
|
-
*/
|
|
180
|
+
*/
|
|
181
|
+
export const isCurrentProductOnFavoriteList = makeIsProductOnFavoriteList(getProductId);
|
|
182
|
+
|
|
183
|
+
/**
|
|
67
184
|
* Returns all relatives which are on favorites.
|
|
68
185
|
* @param {Object} state Current state.
|
|
69
186
|
* @param {string} productId
|
|
70
187
|
* @returns {Array}
|
|
71
|
-
*/
|
|
188
|
+
*/
|
|
189
|
+
export const getProductRelativesOnFavorites = createSelector(getKnownRelatives, getFavoritesProducts, (productRelativesIds, products) => productRelativesIds.filter(id => !!Object.values(products.byList).find(list => !!list.items.find(({
|
|
190
|
+
productId
|
|
191
|
+
}) => id === productId))));
|
|
192
|
+
|
|
193
|
+
/**
|
|
72
194
|
* Returns all relatives which are on a specific favorites list.
|
|
73
195
|
* @param {Function} getListCode Gets the list code.
|
|
74
196
|
* @returns {Function}
|
|
75
|
-
*/
|
|
197
|
+
*/
|
|
198
|
+
export const makeGetProductRelativesOnFavorites = getListCode => createSelector(getListCode, getKnownRelatives, getFavoritesProducts, (listId, productRelativesIds, products) => productRelativesIds.filter(id => products.byList[listId]?.items.map(({
|
|
199
|
+
productId
|
|
200
|
+
}) => productId).find(p => id === p)));
|
|
201
|
+
|
|
202
|
+
/**
|
|
76
203
|
* Checks if product or any relative is on favorites list.
|
|
77
204
|
* @param {Object} state Current state.
|
|
78
205
|
* @param {string} productId Product id.
|
|
79
206
|
* @return {boolean}
|
|
80
|
-
*/
|
|
207
|
+
*/
|
|
208
|
+
export const isRelativeProductOnList = createSelector(getProductRelativesOnFavorites, relativesOnFavorites => relativesOnFavorites.length > 0);
|
|
209
|
+
export const getCommentDialogSettings = createSelector(getFavoritesListState, getFavoritesProducts, getProducts, ({
|
|
210
|
+
commentDialog
|
|
211
|
+
}, favItems, products) => {
|
|
212
|
+
const {
|
|
213
|
+
listId,
|
|
214
|
+
productId
|
|
215
|
+
} = commentDialog || {};
|
|
216
|
+
if (!listId || !productId) {
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
const items = favItems.byList[listId]?.items || [];
|
|
220
|
+
const item = items.find(({
|
|
221
|
+
productId: itemProductId
|
|
222
|
+
}) => productId === itemProductId);
|
|
223
|
+
if (!item) {
|
|
224
|
+
return undefined;
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
listId,
|
|
228
|
+
productId,
|
|
229
|
+
item,
|
|
230
|
+
product: products[item.productId]?.productData
|
|
231
|
+
};
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
/**
|
|
81
235
|
* Creates a selector that selects all products that belong
|
|
82
236
|
* to the given favorite list.
|
|
83
237
|
* @param {Function} getListCode Callback that's supposed to return a favorites list code
|
|
84
238
|
* @returns {Function}
|
|
85
|
-
*/
|
|
239
|
+
*/
|
|
240
|
+
export const makeGetFavoritesProductsByList = getListCode => createSelector(getFavoritesProducts, getListCode, (favProducts, listId) => {
|
|
241
|
+
const products = favProducts.byList[listId] || {};
|
|
242
|
+
return products;
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
/**
|
|
86
246
|
* Creates a selector to check if the app has support for multiple favorites list.
|
|
87
247
|
* @returns {Function}
|
|
88
|
-
*/
|
|
248
|
+
*/
|
|
249
|
+
export const getHasMultipleFavoritesListsSupport = () => hasNewServices() || appConfig?.favoritesMode?.hasMultipleFavoritesLists;
|
|
250
|
+
|
|
251
|
+
/**
|
|
89
252
|
* Creates a selector the determine if the PWA is supposed to fetch favorite list entries via the
|
|
90
253
|
* "getFavoriteIds" pipeline instead of "getFavorites".
|
|
91
254
|
*
|
|
92
255
|
* This pipeline was introduced in PWA6 when support for more than 100 items per favorite list was
|
|
93
256
|
* requested. PWA-1877
|
|
94
257
|
* @returns {Function}
|
|
95
|
-
*/
|
|
258
|
+
*/
|
|
259
|
+
export const getUseGetFavoriteIdsPipeline = () => !hasNewServices();
|