@shopgate/pwa-common-commerce 7.30.0-alpha.7 → 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,4 +1,6 @@
|
|
|
1
|
-
import fetchProducts from"./fetchProducts"
|
|
1
|
+
import fetchProducts from "./fetchProducts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
2
4
|
* Retrieves a product from the Redux store.
|
|
3
5
|
* @param {Object} options The options for the getProducts request.
|
|
4
6
|
* @param {Object} options.params The params for the getProduct pipeline.
|
|
@@ -13,4 +15,6 @@ import fetchProducts from"./fetchProducts";/**
|
|
|
13
15
|
* will be returned.
|
|
14
16
|
* @return {Function} A Redux Thunk
|
|
15
17
|
* @deprecated
|
|
16
|
-
*/
|
|
18
|
+
*/
|
|
19
|
+
const getProducts = fetchProducts;
|
|
20
|
+
export default getProducts;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import fetchProductsById from"./fetchProductsById"
|
|
1
|
+
import fetchProductsById from "./fetchProductsById";
|
|
2
|
+
|
|
3
|
+
/**
|
|
2
4
|
* Retrieves products by id from the store.
|
|
3
5
|
* @param {Array} productIds The product id's to request.
|
|
4
6
|
* @param {string} [componentId=null] A unique id for the component that is using this action.
|
|
5
7
|
* @return {Function} A Redux Thunk
|
|
6
8
|
* @deprecated
|
|
7
|
-
*/
|
|
9
|
+
*/
|
|
10
|
+
const getProductsById = fetchProductsById;
|
|
11
|
+
export default getProductsById;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import fetchProductsByQuery from"./fetchProductsByQuery"
|
|
1
|
+
import fetchProductsByQuery from "./fetchProductsByQuery";
|
|
2
|
+
|
|
3
|
+
/**
|
|
2
4
|
* Dispatches other actions based on the query type.
|
|
3
5
|
* @param {string} type The query type.
|
|
4
6
|
* @param {string} value The value to use with the query.
|
|
@@ -6,4 +8,6 @@ import fetchProductsByQuery from"./fetchProductsByQuery";/**
|
|
|
6
8
|
* @param {string} [id=null] A unique id for the component that is using this action.
|
|
7
9
|
* @return {Function} A Redux Thunk
|
|
8
10
|
* @deprecated
|
|
9
|
-
*/
|
|
11
|
+
*/
|
|
12
|
+
const getProductsByQuery = fetchProductsByQuery;
|
|
13
|
+
export default getProductsByQuery;
|
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "core-js/modules/es.regexp.flags.js";
|
|
2
|
+
import fetchProductVariants from "./fetchProductVariants";
|
|
3
|
+
import fetchProductOptions from "./fetchProductOptions";
|
|
4
|
+
import fetchProduct from "./fetchProduct";
|
|
5
|
+
import setProductId from "../action-creators/setProductId";
|
|
6
|
+
import setProductVariantId from "../action-creators/setProductVariantId";
|
|
7
|
+
|
|
8
|
+
/**
|
|
2
9
|
* Processes the flags of a product and requests additional data if necessary.
|
|
3
10
|
* @param {Object} product A single product.
|
|
4
11
|
* @returns {Function} A redux thunk.
|
|
5
12
|
* @deprecated
|
|
6
|
-
*/
|
|
7
|
-
|
|
13
|
+
*/
|
|
14
|
+
const processProductFlags = product => dispatch => new Promise(resolve => {
|
|
15
|
+
const {
|
|
16
|
+
id,
|
|
17
|
+
flags = {},
|
|
18
|
+
baseProductId
|
|
19
|
+
} = product;
|
|
20
|
+
const {
|
|
21
|
+
hasVariants = false,
|
|
22
|
+
hasOptions = false
|
|
23
|
+
} = flags;
|
|
24
|
+
|
|
25
|
+
// We requested data for a child product. So we have to request also the parent product
|
|
26
|
+
if (baseProductId) {
|
|
27
|
+
dispatch(fetchProduct(baseProductId));
|
|
28
|
+
dispatch(setProductId(baseProductId));
|
|
29
|
+
dispatch(setProductVariantId(id));
|
|
30
|
+
}
|
|
31
|
+
if (hasVariants) {
|
|
32
|
+
dispatch(fetchProductVariants(id));
|
|
33
|
+
}
|
|
34
|
+
if (hasOptions) {
|
|
35
|
+
dispatch(fetchProductOptions(id));
|
|
36
|
+
}
|
|
37
|
+
resolve();
|
|
38
|
+
});
|
|
39
|
+
export default processProductFlags;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import{logger}from'@shopgate/pwa-core';
|
|
1
|
+
import { logger } from '@shopgate/pwa-core';
|
|
2
|
+
import { UPDATE_METADATA } from "../constants";
|
|
3
|
+
|
|
4
|
+
/**
|
|
2
5
|
* Changes the metadata of an existing product in the store.
|
|
3
6
|
* @param {string} productId The product ID to change the metadata for.
|
|
4
7
|
* @param {Object} [metadata=null] The metadata to update.
|
|
5
8
|
* @returns {Function} A redux thunk.
|
|
6
9
|
* @deprecated
|
|
7
|
-
*/
|
|
10
|
+
*/
|
|
11
|
+
const updateMetaData = (productId, metadata = null) => dispatch => {
|
|
12
|
+
if (!metadata) {
|
|
13
|
+
logger.warn('updateMetaData was called without new metadata!');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
dispatch({
|
|
17
|
+
type: UPDATE_METADATA,
|
|
18
|
+
productId,
|
|
19
|
+
metadata
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export default updateMetaData;
|
|
@@ -1,22 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
import "core-js/modules/es.array.reduce.js";
|
|
2
|
+
/**
|
|
2
3
|
* Class to maintain the image formats
|
|
3
4
|
* @deprecated not used anymore. Kept for backwards compatibility.
|
|
4
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
class ProductImageFormats {
|
|
7
|
+
/**
|
|
5
8
|
* Constructor.
|
|
6
|
-
*/
|
|
9
|
+
*/
|
|
10
|
+
constructor() {
|
|
11
|
+
this.formats = [];
|
|
12
|
+
this.map = new Map();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
7
16
|
* Returns all formats.
|
|
8
17
|
* @returns {Array}
|
|
9
|
-
*/
|
|
18
|
+
*/
|
|
19
|
+
getAllUniqueFormats() {
|
|
20
|
+
const hashes = [];
|
|
21
|
+
return Array.from(this.map.values()).reduce((prev, val) => [...prev, ...val], []).filter(val => {
|
|
22
|
+
const hash = JSON.stringify(val);
|
|
23
|
+
if (hashes.indexOf(hash) === -1) {
|
|
24
|
+
hashes.push(hash);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
10
32
|
* @param {string} key key of format to get
|
|
11
33
|
* @returns {Object} format
|
|
12
|
-
*/
|
|
34
|
+
*/
|
|
35
|
+
get(key) {
|
|
36
|
+
return this.map.get(key);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
13
40
|
* @param {string} key key of format
|
|
14
41
|
* @param {Object} value value of format
|
|
15
42
|
* @returns {Object}
|
|
16
|
-
*/
|
|
43
|
+
*/
|
|
44
|
+
set(key, value) {
|
|
45
|
+
return this.map.set(key, value);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
17
49
|
* Removes a format from the list of persisted formats.
|
|
18
50
|
* @param {string} key The key of the format to remove.
|
|
19
51
|
* @returns {ProductImageFormats}
|
|
20
|
-
*/
|
|
52
|
+
*/
|
|
53
|
+
remove(key) {
|
|
54
|
+
this.map.remove(key);
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
21
60
|
* @deprecated
|
|
22
|
-
*/
|
|
61
|
+
*/
|
|
62
|
+
export default new ProductImageFormats();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as productImageFormats}from"./ProductImageFormats";
|
|
1
|
+
export { default as productImageFormats } from "./ProductImageFormats";
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const SHOPGATE_CATALOG_GET_HIGHLIGHT_PRODUCTS = 'shopgate.catalog.getHighlightProducts';
|
|
2
|
+
export const SHOPGATE_CATALOG_GET_LIVESHOPPING_PRODUCTS = 'shopgate.catalog.getLiveshoppingProducts';
|
|
3
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT = 'shopgate.catalog.getProduct';
|
|
4
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_DESCRIPTION = 'shopgate.catalog.getProductDescription';
|
|
5
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_IMAGES = 'shopgate.catalog.getProductImages';
|
|
6
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_OPTIONS = 'shopgate.catalog.getProductOptions';
|
|
7
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_PROPERTIES = 'shopgate.catalog.getProductProperties';
|
|
8
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_RELATIONS = 'shopgate.catalog.getProductRelations';
|
|
9
|
+
export const SHOPGATE_CATALOG_GET_PRODUCTS = 'shopgate.catalog.getProducts';
|
|
10
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_SHIPPING = 'shopgate.catalog.getProductShipping';
|
|
11
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_VARIANTS = 'shopgate.catalog.getProductVariants';
|
|
12
|
+
export const SHOPGATE_CATALOG_GET_PRODUCT_MEDIA = 'shopgate.catalog.getProductMedia';
|
|
@@ -1,34 +1,201 @@
|
|
|
1
1
|
// FEATURES
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
export const PRODUCT = 'product';
|
|
3
|
+
|
|
4
|
+
// CONTENTS
|
|
5
|
+
const IMAGE = 'image';
|
|
6
|
+
const IMAGES = 'images';
|
|
7
|
+
const GALLERY = 'gallery';
|
|
8
|
+
const MEDIA = 'media';
|
|
9
|
+
const HEADER = 'header';
|
|
10
|
+
const VARIANT_SELECT = 'variant-select';
|
|
11
|
+
const PICKER = 'picker';
|
|
12
|
+
const OPTIONS = 'options';
|
|
13
|
+
const SWATCHES = 'swatches';
|
|
14
|
+
const SWATCH = 'swatch';
|
|
15
|
+
const DESCRIPTION = 'description';
|
|
16
|
+
const PROPERTIES = 'properties';
|
|
17
|
+
const REVIEWS = 'reviews';
|
|
18
|
+
const TAX_DISCLAIMER = 'tax-disclaimer';
|
|
19
|
+
const CTAS = 'ctas';
|
|
20
|
+
const FAVORITES = 'favorites';
|
|
21
|
+
const ADD_TO_CART = 'add-to-cart';
|
|
22
|
+
const RATING = 'rating';
|
|
23
|
+
const NAME = 'name';
|
|
24
|
+
const INFO = 'info';
|
|
25
|
+
const MANUFACTURER = 'manufacturer';
|
|
26
|
+
const SHIPPING = 'shipping';
|
|
27
|
+
const AVAILABILITY = 'availability';
|
|
28
|
+
const STOCK_INFO = 'stock-info';
|
|
29
|
+
const PRICE_STRIKED = 'price-striked';
|
|
30
|
+
const PRICE = 'price';
|
|
31
|
+
const PRICE_INFO = 'price-info';
|
|
32
|
+
const MAP_PRICE = 'map-price';
|
|
33
|
+
const ORDER_QUANTITY = 'order-quantity';
|
|
34
|
+
const EFFECTIVITY_DATES = 'effectivity-dates';
|
|
35
|
+
const UNIT_QUANTITY_PICKER = 'unit-quantity-picker';
|
|
36
|
+
const TIERS = 'tiers';
|
|
37
|
+
const ADD_TO_CART_BAR = 'add-to-cart-bar';
|
|
38
|
+
const DISCOUNT = 'discount';
|
|
39
|
+
|
|
40
|
+
// POSITIONS
|
|
41
|
+
export const BEFORE = 'before';
|
|
42
|
+
export const AFTER = 'after';
|
|
43
|
+
const ROW1 = 'row1';
|
|
44
|
+
const ROW2 = 'row2';
|
|
45
|
+
|
|
46
|
+
/* PRODUCT DETAILS */
|
|
47
|
+
|
|
48
|
+
// IMAGE
|
|
49
|
+
export const PRODUCT_IMAGE_BEFORE = `${PRODUCT}.${IMAGE}.${BEFORE}`;
|
|
50
|
+
export const PRODUCT_IMAGE = `${PRODUCT}.${IMAGE}`;
|
|
51
|
+
export const PRODUCT_IMAGE_AFTER = `${PRODUCT}.${IMAGE}.${AFTER}`;
|
|
52
|
+
|
|
53
|
+
// IMAGE GALLERY
|
|
54
|
+
export const PRODUCT_GALLERY_IMAGES_BEFORE = `${PRODUCT}.${GALLERY}.${IMAGES}.${BEFORE}`;
|
|
55
|
+
export const PRODUCT_GALLERY_IMAGES = `${PRODUCT}.${GALLERY}.${IMAGES}`;
|
|
56
|
+
export const PRODUCT_GALLERY_IMAGES_AFTER = `${PRODUCT}.${GALLERY}.${IMAGES}.${AFTER}`;
|
|
57
|
+
|
|
58
|
+
// MEDIA
|
|
59
|
+
export const PRODUCT_MEDIA_BEFORE = `${PRODUCT}.${MEDIA}.${BEFORE}`;
|
|
60
|
+
export const PRODUCT_MEDIA = `${PRODUCT}.${MEDIA}`;
|
|
61
|
+
export const PRODUCT_MEDIA_AFTER = `${PRODUCT}.${MEDIA}.${AFTER}`;
|
|
62
|
+
|
|
63
|
+
// HEADER
|
|
64
|
+
export const PRODUCT_HEADER_BEFORE = `${PRODUCT}.${HEADER}.${BEFORE}`;
|
|
65
|
+
export const PRODUCT_HEADER = `${PRODUCT}.${HEADER}`;
|
|
66
|
+
export const PRODUCT_HEADER_AFTER = `${PRODUCT}.${HEADER}.${AFTER}`;
|
|
67
|
+
|
|
68
|
+
// CTAs
|
|
69
|
+
export const PRODUCT_CTAS_BEFORE = `${PRODUCT}.${CTAS}.${BEFORE}`;
|
|
70
|
+
export const PRODUCT_CTAS = `${PRODUCT}.${CTAS}`;
|
|
71
|
+
export const PRODUCT_CTAS_AFTER = `${PRODUCT}.${CTAS}.${AFTER}`;
|
|
72
|
+
export const PRODUCT_CTAS_FAVORITES_BEFORE = `${PRODUCT}.${CTAS}.${FAVORITES}.${BEFORE}`;
|
|
73
|
+
export const PRODUCT_CTAS_FAVORITES = `${PRODUCT}.${CTAS}.${FAVORITES}`;
|
|
74
|
+
export const PRODUCT_CTAS_FAVORITES_AFTER = `${PRODUCT}.${CTAS}.${FAVORITES}.${AFTER}`;
|
|
75
|
+
export const PRODUCT_CTAS_ADD_TO_CART_BEFORE = `${PRODUCT}.${CTAS}.${ADD_TO_CART}.${BEFORE}`;
|
|
76
|
+
export const PRODUCT_CTAS_ADD_TO_CART = `${PRODUCT}.${CTAS}.${ADD_TO_CART}`;
|
|
77
|
+
export const PRODUCT_CTAS_ADD_TO_CART_AFTER = `${PRODUCT}.${CTAS}.${ADD_TO_CART}.${AFTER}`;
|
|
78
|
+
|
|
79
|
+
// RATING
|
|
80
|
+
export const PRODUCT_RATING_BEFORE = `${PRODUCT}.${RATING}.${BEFORE}`;
|
|
81
|
+
export const PRODUCT_RATING = `${PRODUCT}.${RATING}`;
|
|
82
|
+
export const PRODUCT_RATING_AFTER = `${PRODUCT}.${RATING}.${AFTER}`;
|
|
83
|
+
|
|
84
|
+
// NAME
|
|
85
|
+
export const PRODUCT_NAME_BEFORE = `${PRODUCT}.${NAME}.${BEFORE}`;
|
|
86
|
+
export const PRODUCT_NAME = `${PRODUCT}.${NAME}`;
|
|
87
|
+
export const PRODUCT_NAME_AFTER = `${PRODUCT}.${NAME}.${AFTER}`;
|
|
88
|
+
|
|
89
|
+
// INFO
|
|
90
|
+
export const PRODUCT_INFO_BEFORE = `${PRODUCT}.${INFO}.${BEFORE}`;
|
|
91
|
+
export const PRODUCT_INFO = `${PRODUCT}.${INFO}`;
|
|
92
|
+
export const PRODUCT_INFO_ROW1 = `${PRODUCT}.${INFO}.${ROW1}`;
|
|
93
|
+
export const PRODUCT_INFO_ROW2 = `${PRODUCT}.${INFO}.${ROW2}`;
|
|
94
|
+
export const PRODUCT_INFO_AFTER = `${PRODUCT}.${INFO}.${AFTER}`;
|
|
95
|
+
|
|
96
|
+
// MANUFACTURER
|
|
97
|
+
export const PRODUCT_MANUFACTURER_BEFORE = `${PRODUCT}.${MANUFACTURER}.${BEFORE}`;
|
|
98
|
+
export const PRODUCT_MANUFACTURER = `${PRODUCT}.${MANUFACTURER}`;
|
|
99
|
+
export const PRODUCT_MANUFACTURER_AFTER = `${PRODUCT}.${MANUFACTURER}.${AFTER}`;
|
|
100
|
+
|
|
101
|
+
// SHIPPING
|
|
102
|
+
export const PRODUCT_SHIPPING_BEFORE = `${PRODUCT}.${SHIPPING}.${BEFORE}`;
|
|
103
|
+
export const PRODUCT_SHIPPING = `${PRODUCT}.${SHIPPING}`;
|
|
104
|
+
export const PRODUCT_SHIPPING_AFTER = `${PRODUCT}.${SHIPPING}.${AFTER}`;
|
|
105
|
+
|
|
106
|
+
// AVAILABILITY
|
|
107
|
+
export const PRODUCT_AVAILABILITY_BEFORE = `${PRODUCT}.${AVAILABILITY}.${BEFORE}`;
|
|
108
|
+
export const PRODUCT_AVAILABILITY = `${PRODUCT}.${AVAILABILITY}`;
|
|
109
|
+
export const PRODUCT_AVAILABILITY_AFTER = `${PRODUCT}.${AVAILABILITY}.${AFTER}`;
|
|
110
|
+
|
|
111
|
+
// STOCK INFO
|
|
112
|
+
export const PRODUCT_STOCK_INFO_BEFORE = `${PRODUCT}.${STOCK_INFO}.${BEFORE}`;
|
|
113
|
+
export const PRODUCT_STOCK_INFO = `${PRODUCT}.${STOCK_INFO}`;
|
|
114
|
+
export const PRODUCT_STOCK_INFO_AFTER = `${PRODUCT}.${STOCK_INFO}.${AFTER}`;
|
|
115
|
+
|
|
116
|
+
// PRICE STRIKED
|
|
117
|
+
export const PRODUCT_PRICE_STRIKED_BEFORE = `${PRODUCT}.${PRICE_STRIKED}.${BEFORE}`;
|
|
118
|
+
export const PRODUCT_PRICE_STRIKED = `${PRODUCT}.${PRICE_STRIKED}`;
|
|
119
|
+
export const PRODUCT_PRICE_STRIKED_AFTER = `${PRODUCT}.${PRICE_STRIKED}.${AFTER}`;
|
|
120
|
+
|
|
121
|
+
// PRICE
|
|
122
|
+
export const PRODUCT_PRICE_BEFORE = `${PRODUCT}.${PRICE}.${BEFORE}`;
|
|
123
|
+
export const PRODUCT_PRICE = `${PRODUCT}.${PRICE}`;
|
|
124
|
+
export const PRODUCT_PRICE_AFTER = `${PRODUCT}.${PRICE}.${AFTER}`;
|
|
125
|
+
|
|
126
|
+
// PRICE INFO
|
|
127
|
+
export const PRODUCT_PRICE_INFO_BEFORE = `${PRODUCT}.${PRICE_INFO}.${BEFORE}`;
|
|
128
|
+
export const PRODUCT_PRICE_INFO = `${PRODUCT}.${PRICE_INFO}`;
|
|
129
|
+
export const PRODUCT_PRICE_INFO_AFTER = `${PRODUCT}.${PRICE_INFO}.${AFTER}`;
|
|
130
|
+
|
|
131
|
+
// TIERS
|
|
132
|
+
export const PRODUCT_TIERS_BEFORE = `${PRODUCT}.${TIERS}.${BEFORE}`;
|
|
133
|
+
export const PRODUCT_TIERS = `${PRODUCT}.${TIERS}`;
|
|
134
|
+
export const PRODUCT_TIERS_AFTER = `${PRODUCT}.${TIERS}.${AFTER}`;
|
|
135
|
+
|
|
136
|
+
// VARIANT SELECT
|
|
137
|
+
export const PRODUCT_VARIANT_SELECT_BEFORE = `${PRODUCT}.${VARIANT_SELECT}.${BEFORE}`;
|
|
138
|
+
export const PRODUCT_VARIANT_SELECT = `${PRODUCT}.${VARIANT_SELECT}`;
|
|
139
|
+
export const PRODUCT_VARIANT_SELECT_AFTER = `${PRODUCT}.${VARIANT_SELECT}.${AFTER}`;
|
|
140
|
+
|
|
141
|
+
// VARIANT SELECT PICKER AVAILABILITY
|
|
142
|
+
export const PRODUCT_VARIANT_SELECT_PICKER_AVAILABILITY_BEFORE = `${PRODUCT}.${VARIANT_SELECT}.${PICKER}.${AVAILABILITY}.${BEFORE}`;
|
|
143
|
+
export const PRODUCT_VARIANT_SELECT_PICKER_AVAILABILITY = `${PRODUCT}.${VARIANT_SELECT}.${PICKER}.${AVAILABILITY}`;
|
|
144
|
+
export const PRODUCT_VARIANT_SELECT_PICKER_AVAILABILITY_AFTER = `${PRODUCT}.${VARIANT_SELECT}.${PICKER}.${AVAILABILITY}.${AFTER}`;
|
|
145
|
+
|
|
146
|
+
// OPTIONS
|
|
147
|
+
export const PRODUCT_OPTIONS_BEFORE = `${PRODUCT}.${OPTIONS}.${BEFORE}`;
|
|
148
|
+
export const PRODUCT_OPTIONS = `${PRODUCT}.${OPTIONS}`;
|
|
149
|
+
export const PRODUCT_OPTIONS_AFTER = `${PRODUCT}.${OPTIONS}.${AFTER}`;
|
|
150
|
+
|
|
151
|
+
// SWATCHES
|
|
152
|
+
export const PRODUCT_SWATCHES_BEFORE = `${PRODUCT}.${SWATCHES}.${BEFORE}`;
|
|
153
|
+
export const PRODUCT_SWATCHES = `${PRODUCT}.${SWATCHES}`;
|
|
154
|
+
export const PRODUCT_SWATCHES_AFTER = `${PRODUCT}.${SWATCHES}.${AFTER}`;
|
|
155
|
+
|
|
156
|
+
// SWATCH
|
|
157
|
+
export const PRODUCT_SWATCH_BEFORE = `${PRODUCT}.${SWATCH}.${BEFORE}`;
|
|
158
|
+
export const PRODUCT_SWATCH = `${PRODUCT}.${SWATCH}`;
|
|
159
|
+
export const PRODUCT_SWATCH_AFTER = `${PRODUCT}.${SWATCH}.${AFTER}`;
|
|
160
|
+
|
|
161
|
+
// DESCRIPTION
|
|
162
|
+
export const PRODUCT_DESCRIPTION_BEFORE = `${PRODUCT}.${DESCRIPTION}.${BEFORE}`;
|
|
163
|
+
export const PRODUCT_DESCRIPTION = `${PRODUCT}.${DESCRIPTION}`;
|
|
164
|
+
export const PRODUCT_DESCRIPTION_AFTER = `${PRODUCT}.${DESCRIPTION}.${AFTER}`;
|
|
165
|
+
|
|
166
|
+
// PROPERTIES
|
|
167
|
+
export const PRODUCT_PROPERTIES_BEFORE = `${PRODUCT}.${PROPERTIES}.${BEFORE}`;
|
|
168
|
+
export const PRODUCT_PROPERTIES = `${PRODUCT}.${PROPERTIES}`;
|
|
169
|
+
export const PRODUCT_PROPERTIES_AFTER = `${PRODUCT}.${PROPERTIES}.${AFTER}`;
|
|
170
|
+
|
|
171
|
+
// REVIEWS
|
|
172
|
+
export const PRODUCT_REVIEWS_BEFORE = `${PRODUCT}.${REVIEWS}.${BEFORE}`;
|
|
173
|
+
export const PRODUCT_REVIEWS = `${PRODUCT}.${REVIEWS}`;
|
|
174
|
+
export const PRODUCT_REVIEWS_AFTER = `${PRODUCT}.${REVIEWS}.${AFTER}`;
|
|
175
|
+
// Single review
|
|
176
|
+
export const PRODUCT_REVIEWS_ENTRY = `${PRODUCT}.${REVIEWS}.entry`;
|
|
177
|
+
|
|
178
|
+
// TAX DISCLAIMER
|
|
179
|
+
export const PRODUCT_TAX_DISCLAIMER_BEFORE = `${PRODUCT}.${TAX_DISCLAIMER}.${BEFORE}`;
|
|
180
|
+
export const PRODUCT_TAX_DISCLAIMER = `${PRODUCT}.${TAX_DISCLAIMER}`;
|
|
181
|
+
export const PRODUCT_TAX_DISCLAIMER_AFTER = `${PRODUCT}.${TAX_DISCLAIMER}.${AFTER}`;
|
|
182
|
+
|
|
183
|
+
// ADD TO CART BAR
|
|
184
|
+
export const PRODUCT_ADD_TO_CART_BAR_BEFORE = `${PRODUCT}.${ADD_TO_CART_BAR}.${BEFORE}`;
|
|
185
|
+
export const PRODUCT_ADD_TO_CART_BAR = `${PRODUCT}.${ADD_TO_CART_BAR}`;
|
|
186
|
+
export const PRODUCT_ADD_TO_CART_BAR_AFTER = `${PRODUCT}.${ADD_TO_CART_BAR}.${AFTER}`;
|
|
187
|
+
|
|
188
|
+
// MAP PRICE
|
|
189
|
+
export const PRODUCT_MAP_PRICE_BEFORE = `${PRODUCT}.${MAP_PRICE}.${BEFORE}`;
|
|
190
|
+
export const PRODUCT_MAP_PRICE = `${PRODUCT}.${MAP_PRICE}`;
|
|
191
|
+
export const PRODUCT_MAP_PRICE_AFTER = `${PRODUCT}.${MAP_PRICE}.${AFTER}`;
|
|
192
|
+
|
|
193
|
+
// ORDER QUANTITY HINT
|
|
194
|
+
export const PRODUCT_ORDER_QUANTITY_BEFORE = `${PRODUCT}.${ORDER_QUANTITY}.${BEFORE}`;
|
|
195
|
+
export const PRODUCT_ORDER_QUANTITY = `${PRODUCT}.${ORDER_QUANTITY}`;
|
|
196
|
+
export const PRODUCT_EFFECTIVITY_DATES = `${PRODUCT}.${EFFECTIVITY_DATES}`;
|
|
197
|
+
export const PRODUCT_ORDER_QUANTITY_AFTER = `${PRODUCT}.${ORDER_QUANTITY}.${AFTER}`;
|
|
198
|
+
export const PRODUCT_UNIT_QUANTITY_PICKER = `${PRODUCT}.${UNIT_QUANTITY_PICKER}`;
|
|
199
|
+
|
|
200
|
+
// PRODUCT DISCOUNT BADGE
|
|
201
|
+
export const PRODUCT_DISCOUNT = `${PRODUCT}.${DISCOUNT}`;
|
|
@@ -1,18 +1,90 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
1
|
+
export const ITEM_PATH = '/item';
|
|
2
|
+
export const ITEM_PATTERN = `${ITEM_PATH}/:productId`;
|
|
3
|
+
export const ITEM_GALLERY_PATTERN = `${ITEM_PATH}/:productId/gallery/:slide`;
|
|
4
|
+
export const ITEM_REVIEWS_PATTERN = `${ITEM_PATH}/:productId/reviews`;
|
|
5
|
+
export const ITEM_WRITE_REVIEW_PATTERN = `${ITEM_PATH}/:productId/write_review`;
|
|
6
|
+
|
|
7
|
+
// TODO was 3600000 (1 hour in milliseconds) in PWA 6
|
|
8
|
+
export const PRODUCT_LIFETIME = 59000; // 59 seconds in milliseconds
|
|
9
|
+
|
|
10
|
+
export const PROVIDE_PRODUCT_BUFFER_TIME = 200;
|
|
11
|
+
export const PROVIDE_PRODUCT = 'PROVIDE_PRODUCT';
|
|
12
|
+
|
|
13
|
+
// PRODUCT
|
|
14
|
+
export const REQUEST_PRODUCT = 'REQUEST_PRODUCT';
|
|
15
|
+
export const RECEIVE_PRODUCT = 'RECEIVE_PRODUCT';
|
|
16
|
+
export const RECEIVE_PRODUCT_CACHED = 'RECEIVE_PRODUCT_CACHED';
|
|
17
|
+
export const RECEIVE_PRODUCTS_CACHED = 'RECEIVE_PRODUCTS_CACHED';
|
|
18
|
+
export const ERROR_PRODUCT = 'ERROR_PRODUCT';
|
|
19
|
+
// PRODUCTS
|
|
20
|
+
export const REQUEST_PRODUCTS = 'REQUEST_PRODUCTS';
|
|
21
|
+
export const RECEIVE_PRODUCTS = 'RECEIVE_PRODUCTS';
|
|
22
|
+
export const ERROR_PRODUCTS = 'ERROR_PRODUCTS';
|
|
23
|
+
// PRODUCT VARIANTS
|
|
24
|
+
export const REQUEST_PRODUCT_VARIANTS = 'REQUEST_PRODUCT_VARIANTS';
|
|
25
|
+
export const RECEIVE_PRODUCT_VARIANTS = 'RECEIVE_PRODUCT_VARIANTS';
|
|
26
|
+
export const ERROR_PRODUCT_VARIANTS = 'ERROR_PRODUCT_VARIANTS';
|
|
27
|
+
// PRODUCT OPTIONS
|
|
28
|
+
export const REQUEST_PRODUCT_OPTIONS = 'REQUEST_PRODUCT_OPTIONS';
|
|
29
|
+
export const RECEIVE_PRODUCT_OPTIONS = 'RECEIVE_PRODUCT_OPTIONS';
|
|
30
|
+
export const ERROR_PRODUCT_OPTIONS = 'ERROR_PRODUCT_OPTIONS';
|
|
31
|
+
// PRODUCT DESCRIPTION
|
|
32
|
+
export const REQUEST_PRODUCT_DESCRIPTION = 'REQUEST_PRODUCT_DESCRIPTION';
|
|
33
|
+
export const RECEIVE_PRODUCT_DESCRIPTION = 'RECEIVE_PRODUCT_DESCRIPTION';
|
|
34
|
+
export const ERROR_PRODUCT_DESCRIPTION = 'ERROR_PRODUCT_DESCRIPTION';
|
|
35
|
+
// PRODUCT PROPERTIES
|
|
36
|
+
export const REQUEST_PRODUCT_PROPERTIES = 'REQUEST_PRODUCT_PROPERTIES';
|
|
37
|
+
export const RECEIVE_PRODUCT_PROPERTIES = 'RECEIVE_PRODUCT_PROPERTIES';
|
|
38
|
+
export const ERROR_PRODUCT_PROPERTIES = 'ERROR_PRODUCT_PROPERTIES';
|
|
39
|
+
// PRODUCT SHIPPING
|
|
40
|
+
export const REQUEST_PRODUCT_SHIPPING = 'REQUEST_PRODUCT_SHIPPING';
|
|
41
|
+
export const RECEIVE_PRODUCT_SHIPPING = 'RECEIVE_PRODUCT_SHIPPING';
|
|
42
|
+
export const ERROR_PRODUCT_SHIPPING = 'ERROR_PRODUCT_SHIPPING';
|
|
43
|
+
// PRODUCT IMAGES
|
|
44
|
+
export const REQUEST_PRODUCT_IMAGES = 'REQUEST_PRODUCT_IMAGES';
|
|
45
|
+
export const RECEIVE_PRODUCT_IMAGES = 'RECEIVE_PRODUCT_IMAGES';
|
|
46
|
+
export const ERROR_PRODUCT_IMAGES = 'ERROR_PRODUCT_IMAGES';
|
|
47
|
+
// PRODUCT MEDIA
|
|
48
|
+
export const REQUEST_PRODUCT_MEDIA = 'REQUEST_PRODUCT_MEDIA';
|
|
49
|
+
export const RECEIVE_PRODUCT_MEDIA = 'RECEIVE_PRODUCT_MEDIA';
|
|
50
|
+
export const ERROR_PRODUCT_MEDIA = 'ERROR_PRODUCT_MEDIA';
|
|
51
|
+
// CURRENT PRODUCT
|
|
52
|
+
export const RESET_CURRENT_PRODUCT = 'RESET_CURRENT_PRODUCT';
|
|
53
|
+
export const EXPIRE_PRODUCT_BY_ID = 'EXPIRE_PRODUCT_BY_ID';
|
|
54
|
+
export const EXPIRE_PRODUCTS_BY_HASH = 'EXPIRE_PRODUCTS_BY_HASH';
|
|
55
|
+
export const EXPIRE_PRODUCT_DATA = 'EXPIRE_PRODUCT_DATA';
|
|
56
|
+
export const DELETE_PRODUCTS_BY_IDS = 'DELETE_PRODUCTS_BY_IDS';
|
|
57
|
+
export const SET_PRODUCT_ID = 'SET_PRODUCT_ID';
|
|
58
|
+
export const SET_PRODUCT_VARIANT_ID = 'SET_PRODUCT_VARIANT_ID';
|
|
59
|
+
export const SET_PRODUCT_QUANTITY = 'SET_PRODUCT_QUANTITY';
|
|
60
|
+
export const SET_PRODUCT_OPTION = 'SET_PRODUCT_OPTION';
|
|
61
|
+
|
|
62
|
+
// PRODUCT AVAILABILITY STATES
|
|
63
|
+
export const AVAILABILITY_STATE_OK = 'ok';
|
|
64
|
+
export const AVAILABILITY_STATE_WARNING = 'warning';
|
|
65
|
+
export const AVAILABILITY_STATE_ALERT = 'alert';
|
|
66
|
+
export const OPTION_TYPE_SELECT = 'select';
|
|
67
|
+
export const OPTION_TYPE_TEXT = 'text';
|
|
68
|
+
export const PROPERTIES_FILTER_WHITELIST = 'whitelist';
|
|
69
|
+
export const PROPERTIES_FILTER_BLACKLIST = 'blacklist';
|
|
70
|
+
|
|
71
|
+
// PRODUCT RELATIONS
|
|
72
|
+
export const REQUEST_PRODUCT_RELATIONS = 'REQUEST_PRODUCT_RELATIONS';
|
|
73
|
+
export const RECEIVE_PRODUCT_RELATIONS = 'RECEIVE_PRODUCT_RELATIONS';
|
|
74
|
+
export const ERROR_PRODUCT_RELATIONS = 'ERROR_PRODUCT_RELATIONS';
|
|
75
|
+
export const PRODUCT_RELATIONS_DEFAULT_LIMIT = 20;
|
|
76
|
+
|
|
77
|
+
// PRODUCT RELATIONS TYPES
|
|
78
|
+
export const PRODUCT_RELATIONS_TYPE_CROSS_SELLING = 'crossSelling';
|
|
79
|
+
export const PRODUCT_RELATIONS_TYPE_UPSELLING = 'upselling';
|
|
80
|
+
export const PRODUCT_RELATIONS_TYPE_BONUS = 'bonus';
|
|
81
|
+
export const PRODUCT_RELATIONS_TYPE_BOUGHT_WITH = 'boughtWith';
|
|
82
|
+
export const PRODUCT_RELATIONS_TYPE_CUSTOM = 'custom';
|
|
83
|
+
|
|
84
|
+
// PRODUCT METADATA
|
|
85
|
+
export const UPDATE_METADATA = 'UPDATE_METADATA';
|
|
86
|
+
|
|
87
|
+
// PRODUCT NOT AVAILABLE + REASONS
|
|
88
|
+
export const PRODUCT_NOT_AVAILABLE = 'PRODUCT_NOT_AVAILABLE';
|
|
89
|
+
export const NOT_AVAILABLE_EFFECTIVITY_DATES = 'EFFECTIVITY_DATES';
|
|
90
|
+
export const REFRESH_EXPIRED_PDP_DATA = 'REFRESH_EXPIRED_PDP_DATA';
|