@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.
Files changed (315) hide show
  1. package/cart/action-creators/addCouponsToCart.js +9 -2
  2. package/cart/action-creators/addProductsToCart.js +9 -2
  3. package/cart/action-creators/deleteCouponsFromCart.js +9 -2
  4. package/cart/action-creators/deleteProductsFromCart.js +9 -2
  5. package/cart/action-creators/errorAddCouponsToCart.js +10 -2
  6. package/cart/action-creators/errorAddProductsToCart.js +10 -2
  7. package/cart/action-creators/errorCart.js +8 -2
  8. package/cart/action-creators/errorDeleteCouponsFromCart.js +10 -2
  9. package/cart/action-creators/errorDeleteProductsFromCart.js +10 -2
  10. package/cart/action-creators/errorUpdateProductsInCart.js +10 -2
  11. package/cart/action-creators/receiveCart.js +9 -2
  12. package/cart/action-creators/requestCart.js +8 -2
  13. package/cart/action-creators/setCartProductPendingCount.js +9 -2
  14. package/cart/action-creators/setCouponFieldError.js +9 -2
  15. package/cart/action-creators/setCouponFieldValue.js +9 -2
  16. package/cart/action-creators/setFulfillmentSlot.js +9 -2
  17. package/cart/action-creators/successAddCouponsToCart.js +10 -2
  18. package/cart/action-creators/successAddProductsToCart.js +8 -2
  19. package/cart/action-creators/successDeleteCouponsFromCart.js +8 -2
  20. package/cart/action-creators/successDeleteProductsFromCart.js +8 -2
  21. package/cart/action-creators/successUpdateProductsInCart.js +8 -2
  22. package/cart/action-creators/updateProductsInCart.js +9 -2
  23. package/cart/actions/addCouponsToCart.js +52 -8
  24. package/cart/actions/addProductsToCart.js +80 -11
  25. package/cart/actions/deleteCouponsFromCart.js +39 -6
  26. package/cart/actions/deleteProductsFromCart.js +38 -6
  27. package/cart/actions/fetchCart.js +52 -8
  28. package/cart/actions/updateProductsInCart.js +44 -6
  29. package/cart/constants/PipelineErrors.js +6 -1
  30. package/cart/constants/Pipelines.js +6 -1
  31. package/cart/constants/Portals.js +85 -1
  32. package/cart/constants/index.js +39 -2
  33. package/cart/helpers/config.js +47 -2
  34. package/cart/helpers/createPipelineErrorList.js +30 -4
  35. package/cart/helpers/fulfillmentSlots.js +37 -4
  36. package/cart/helpers/index.js +14 -3
  37. package/cart/helpers/quantity.js +23 -4
  38. package/cart/helpers/shipping.js +57 -2
  39. package/cart/helpers/tax.js +26 -2
  40. package/cart/index.js +25 -5
  41. package/cart/mock.js +130 -1
  42. package/cart/reducers/couponField.js +30 -2
  43. package/cart/reducers/data.js +98 -6
  44. package/cart/reducers/index.js +7 -1
  45. package/cart/selectors/index.js +181 -31
  46. package/cart/selectors/spec.js +189 -2
  47. package/cart/streams/index.js +176 -29
  48. package/cart/subscriptions/index.js +307 -30
  49. package/category/action-creators/errorCategory.js +10 -2
  50. package/category/action-creators/errorCategoryChildren.js +9 -2
  51. package/category/action-creators/errorRootCategories.js +8 -2
  52. package/category/action-creators/receiveCategory.js +12 -2
  53. package/category/action-creators/receiveCategoryChildren.js +10 -2
  54. package/category/action-creators/receiveRootCategories.js +9 -2
  55. package/category/action-creators/requestCategory.js +9 -2
  56. package/category/action-creators/requestCategoryChildren.js +9 -2
  57. package/category/action-creators/requestRootCategories.js +8 -2
  58. package/category/actions/fetchCategory.js +47 -5
  59. package/category/actions/fetchCategoryChildren.js +30 -2
  60. package/category/actions/fetchCategoryOrRootCategories.js +16 -2
  61. package/category/actions/fetchCategoryProducts.js +36 -2
  62. package/category/actions/fetchRootCategories.js +31 -2
  63. package/category/actions/getCategory.js +10 -2
  64. package/category/constants/Pipelines.js +3 -1
  65. package/category/constants/Portals.js +56 -3
  66. package/category/constants/index.js +17 -2
  67. package/category/helpers/index.js +27 -3
  68. package/category/index.js +19 -5
  69. package/category/mock.js +176 -1
  70. package/category/reducers/categoriesById.js +65 -3
  71. package/category/reducers/childrenByCategoryId.js +55 -4
  72. package/category/reducers/helpers/handleCategoryCollection.js +24 -3
  73. package/category/reducers/helpers/handleReceivedCategories.js +3 -1
  74. package/category/reducers/index.js +12 -2
  75. package/category/reducers/rootCategories.js +31 -2
  76. package/category/selectors/index.js +115 -16
  77. package/category/streams/index.js +82 -4
  78. package/category/subscriptions/index.js +96 -3
  79. package/checkout/action-creators/successCheckout.js +9 -2
  80. package/checkout/actions/fetchCheckoutUrl.js +28 -3
  81. package/checkout/constants/Pipelines.js +1 -1
  82. package/checkout/constants/index.js +3 -2
  83. package/checkout/index.js +11 -4
  84. package/checkout/selectors/index.js +7 -2
  85. package/checkout/streams/index.js +8 -2
  86. package/checkout/subscriptions/index.js +35 -6
  87. package/favorites/action-creators/index.js +206 -24
  88. package/favorites/actions/addFavorites.js +41 -3
  89. package/favorites/actions/addFavoritesList.js +27 -2
  90. package/favorites/actions/fetchFavoriteIds.js +49 -5
  91. package/favorites/actions/fetchFavorites.js +60 -5
  92. package/favorites/actions/fetchFavoritesList.js +47 -3
  93. package/favorites/actions/fetchFavoritesListsWithItems.js +32 -3
  94. package/favorites/actions/getFavorites.js +6 -2
  95. package/favorites/actions/removeFavorites.js +32 -3
  96. package/favorites/actions/removeFavoritesList.js +24 -2
  97. package/favorites/actions/toggleFavorites.js +68 -10
  98. package/favorites/actions/updateFavorites.js +39 -3
  99. package/favorites/actions/updateFavoritesList.js +26 -2
  100. package/favorites/constants/Pipelines.js +9 -1
  101. package/favorites/constants/Portals.js +32 -4
  102. package/favorites/constants/index.js +37 -5
  103. package/favorites/index.js +14 -4
  104. package/favorites/mock.js +89 -4
  105. package/favorites/reducers/index.js +7 -1
  106. package/favorites/reducers/lists.js +74 -2
  107. package/favorites/reducers/products.js +231 -24
  108. package/favorites/selectors/index.js +188 -24
  109. package/favorites/streams/index.js +135 -23
  110. package/favorites/streams/spec.js +517 -8
  111. package/favorites/subscriptions/index.js +260 -25
  112. package/favorites/subscriptions/spec.js +701 -28
  113. package/filter/action-creators/errorFilters.js +9 -2
  114. package/filter/action-creators/index.js +4 -1
  115. package/filter/action-creators/receiveFilters.js +10 -2
  116. package/filter/action-creators/requestFilters.js +9 -2
  117. package/filter/action-creators/updateFilters.js +8 -2
  118. package/filter/actions/fetchFilters.js +46 -3
  119. package/filter/actions/getFilters.js +6 -2
  120. package/filter/actions/helpers/buildFilterParams.js +34 -2
  121. package/filter/actions/helpers/buildRequestFilters.js +35 -2
  122. package/filter/actions/helpers/processFilters.js +10 -2
  123. package/filter/actions/helpers/processParams.js +26 -2
  124. package/filter/constants/Pipelines.js +1 -1
  125. package/filter/constants/Portals.js +39 -3
  126. package/filter/constants/index.js +8 -1
  127. package/filter/index.js +12 -4
  128. package/filter/reducers/helpers/enrichFilters.js +11 -3
  129. package/filter/reducers/index.js +5 -1
  130. package/filter/reducers/resultsByHash.js +43 -3
  131. package/filter/selectors/index.js +47 -6
  132. package/filter/streams/index.js +30 -1
  133. package/filter/subscriptions/index.js +34 -2
  134. package/market/constants/Portals.js +22 -4
  135. package/market/constants/index.js +2 -1
  136. package/market/helpers/showReturnPolicy.js +3 -1
  137. package/market/helpers/showTaxDisclaimer.js +3 -1
  138. package/market/index.js +6 -2
  139. package/orders/constants.js +2 -1
  140. package/package.json +3 -3
  141. package/product/action-creators/deleteProductsByIds.js +10 -2
  142. package/product/action-creators/errorProduct.js +10 -2
  143. package/product/action-creators/errorProductDescription.js +10 -2
  144. package/product/action-creators/errorProductImages.js +10 -2
  145. package/product/action-creators/errorProductMedia.js +10 -2
  146. package/product/action-creators/errorProductOptions.js +10 -2
  147. package/product/action-creators/errorProductProperties.js +10 -2
  148. package/product/action-creators/errorProductRelations.js +9 -2
  149. package/product/action-creators/errorProductShipping.js +10 -2
  150. package/product/action-creators/errorProductVariants.js +10 -2
  151. package/product/action-creators/errorProducts.js +9 -2
  152. package/product/action-creators/expireProductById.js +10 -2
  153. package/product/action-creators/expireProductData.js +11 -2
  154. package/product/action-creators/expireProductsByHash.js +9 -2
  155. package/product/action-creators/productNotAvailable.js +10 -2
  156. package/product/action-creators/provideProduct.js +9 -2
  157. package/product/action-creators/receiveProduct.js +10 -2
  158. package/product/action-creators/receiveProductCached.js +9 -2
  159. package/product/action-creators/receiveProductDescription.js +10 -2
  160. package/product/action-creators/receiveProductImages.js +10 -2
  161. package/product/action-creators/receiveProductMedia.js +10 -2
  162. package/product/action-creators/receiveProductOptions.js +10 -2
  163. package/product/action-creators/receiveProductProperties.js +10 -2
  164. package/product/action-creators/receiveProductRelations.js +12 -2
  165. package/product/action-creators/receiveProductShipping.js +10 -2
  166. package/product/action-creators/receiveProductVariants.js +10 -2
  167. package/product/action-creators/receiveProducts.js +16 -2
  168. package/product/action-creators/receiveProductsCached.js +9 -2
  169. package/product/action-creators/refreshExpiredPDPData.js +8 -2
  170. package/product/action-creators/requestProduct.js +10 -2
  171. package/product/action-creators/requestProductDescription.js +9 -2
  172. package/product/action-creators/requestProductImages.js +9 -2
  173. package/product/action-creators/requestProductMedia.js +9 -2
  174. package/product/action-creators/requestProductOptions.js +9 -2
  175. package/product/action-creators/requestProductProperties.js +9 -2
  176. package/product/action-creators/requestProductRelations.js +10 -2
  177. package/product/action-creators/requestProductShipping.js +9 -2
  178. package/product/action-creators/requestProductVariants.js +9 -2
  179. package/product/action-creators/requestProducts.js +9 -2
  180. package/product/action-creators/setProductId.js +9 -2
  181. package/product/action-creators/setProductQuantity.js +9 -2
  182. package/product/action-creators/setProductVariantId.js +9 -2
  183. package/product/actions/changeSortOrder.js +21 -2
  184. package/product/actions/fetchHighlightProducts.js +18 -2
  185. package/product/actions/fetchLiveshoppingProducts.js +14 -2
  186. package/product/actions/fetchProduct.js +52 -3
  187. package/product/actions/fetchProductDescription.js +30 -2
  188. package/product/actions/fetchProductImages.js +31 -2
  189. package/product/actions/fetchProductMedia.js +35 -2
  190. package/product/actions/fetchProductOptions.js +31 -2
  191. package/product/actions/fetchProductProperties.js +30 -2
  192. package/product/actions/fetchProductRelations.js +63 -2
  193. package/product/actions/fetchProductShipping.js +31 -2
  194. package/product/actions/fetchProductVariants.js +31 -2
  195. package/product/actions/fetchProducts.js +189 -17
  196. package/product/actions/fetchProductsById.js +68 -8
  197. package/product/actions/fetchProductsByQuery.js +102 -18
  198. package/product/actions/getHighlightProducts.js +6 -2
  199. package/product/actions/getLiveshoppingProducts.js +6 -2
  200. package/product/actions/getProduct.js +6 -2
  201. package/product/actions/getProductDescription.js +6 -2
  202. package/product/actions/getProductImages.js +6 -2
  203. package/product/actions/getProductOptions.js +6 -2
  204. package/product/actions/getProductProperties.js +6 -2
  205. package/product/actions/getProductRelations.js +6 -2
  206. package/product/actions/getProductShipping.js +6 -2
  207. package/product/actions/getProductVariants.js +6 -2
  208. package/product/actions/getProducts.js +6 -2
  209. package/product/actions/getProductsById.js +6 -2
  210. package/product/actions/getProductsByQuery.js +6 -2
  211. package/product/actions/processProductFlags.js +35 -3
  212. package/product/actions/updateMetadata.js +17 -2
  213. package/product/collections/ProductImageFormats.js +48 -8
  214. package/product/collections/index.js +1 -1
  215. package/product/constants/Pipelines.js +12 -1
  216. package/product/constants/Portals.js +200 -33
  217. package/product/constants/index.js +90 -18
  218. package/product/helpers/index.js +61 -8
  219. package/product/index.js +36 -6
  220. package/product/mock.js +1002 -2
  221. package/product/reducers/descriptionsByProductId.js +54 -5
  222. package/product/reducers/helpers/formatOptions.js +17 -2
  223. package/product/reducers/helpers/handleProductCollection.js +19 -2
  224. package/product/reducers/imagesByProductId.js +51 -4
  225. package/product/reducers/index.js +23 -1
  226. package/product/reducers/mediaByProductId.js +55 -3
  227. package/product/reducers/optionsByProductId.js +41 -2
  228. package/product/reducers/productRelationsByHash.js +43 -2
  229. package/product/reducers/productsById.js +122 -7
  230. package/product/reducers/propertiesByProductId.js +48 -2
  231. package/product/reducers/resultsByHash.js +125 -9
  232. package/product/reducers/shippingByProductId.js +37 -2
  233. package/product/reducers/variantsByProductId.js +56 -2
  234. package/product/selectors/options.js +90 -13
  235. package/product/selectors/page.js +62 -13
  236. package/product/selectors/price.js +81 -18
  237. package/product/selectors/product.js +549 -59
  238. package/product/selectors/product.mock.js +327 -12
  239. package/product/selectors/relations.js +35 -5
  240. package/product/selectors/variants.js +91 -15
  241. package/product/streams/index.js +167 -13
  242. package/product/subscriptions/index.js +210 -4
  243. package/reviews/action-creators/errorProductReviews.js +9 -2
  244. package/reviews/action-creators/errorReviews.js +9 -2
  245. package/reviews/action-creators/errorSubmitReview.js +9 -2
  246. package/reviews/action-creators/errorUserReview.js +9 -2
  247. package/reviews/action-creators/flushUserReview.js +8 -2
  248. package/reviews/action-creators/receiveProductReviews.js +11 -2
  249. package/reviews/action-creators/receiveReviews.js +12 -2
  250. package/reviews/action-creators/receiveSubmitReview.js +9 -2
  251. package/reviews/action-creators/receiveUserReview.js +10 -2
  252. package/reviews/action-creators/requestProductReviews.js +10 -2
  253. package/reviews/action-creators/requestReviews.js +9 -2
  254. package/reviews/action-creators/requestSubmitReview.js +9 -2
  255. package/reviews/action-creators/requestUserReview.js +9 -2
  256. package/reviews/action-creators/resetSubmittedReview.js +9 -2
  257. package/reviews/action-creators/spec.js +40 -1
  258. package/reviews/actions/fetchProductReviews.js +37 -2
  259. package/reviews/actions/fetchReviews.js +38 -2
  260. package/reviews/actions/fetchUserReview.js +31 -2
  261. package/reviews/actions/flushUserReview.js +5 -1
  262. package/reviews/actions/getProductReviews.js +6 -2
  263. package/reviews/actions/getUserReview.js +6 -2
  264. package/reviews/actions/spec.js +241 -4
  265. package/reviews/actions/submitReview.js +63 -3
  266. package/reviews/constants/Pipelines.js +4 -1
  267. package/reviews/constants/Portals.js +4 -1
  268. package/reviews/constants/index.js +26 -7
  269. package/reviews/index.js +15 -4
  270. package/reviews/mock.js +172 -11
  271. package/reviews/reducers/index.js +11 -1
  272. package/reviews/reducers/mock.js +14 -2
  273. package/reviews/reducers/reviewsByHash.js +52 -6
  274. package/reviews/reducers/reviewsById.js +27 -2
  275. package/reviews/reducers/reviewsByProductId.js +47 -2
  276. package/reviews/reducers/spec.js +211 -2
  277. package/reviews/reducers/userReviewsByProductId.js +68 -2
  278. package/reviews/selectors/index.js +123 -19
  279. package/reviews/selectors/mock.js +100 -1
  280. package/reviews/selectors/spec.js +100 -1
  281. package/reviews/streams/index.js +37 -5
  282. package/reviews/streams/spec.js +25 -1
  283. package/reviews/subscriptions/index.js +27 -2
  284. package/scanner/action-creators/errorHandleScanner.js +11 -2
  285. package/scanner/action-creators/scannerFinished.js +11 -2
  286. package/scanner/action-creators/startScanner.js +8 -2
  287. package/scanner/action-creators/successHandleScanner.js +11 -2
  288. package/scanner/actions/handleBarCode.js +22 -2
  289. package/scanner/actions/handleNoResults.js +23 -2
  290. package/scanner/actions/handleQrCode.js +116 -6
  291. package/scanner/actions/handleSearch.js +33 -2
  292. package/scanner/constants/Portals.js +22 -1
  293. package/scanner/constants/index.js +17 -1
  294. package/scanner/helpers/index.js +115 -5
  295. package/scanner/index.js +19 -5
  296. package/scanner/streams/index.js +36 -1
  297. package/scanner/subscriptions/index.js +78 -8
  298. package/search/action-creators/errorSearchResults.js +10 -2
  299. package/search/action-creators/receiveSearchResults.js +11 -2
  300. package/search/action-creators/receiveSearchSuggestions.js +10 -2
  301. package/search/action-creators/requestSearchResults.js +10 -2
  302. package/search/action-creators/requestSearchSuggestions.js +9 -2
  303. package/search/actions/fetchSearchResults.js +66 -8
  304. package/search/actions/fetchSearchSuggestions.js +36 -2
  305. package/search/constants/Pipelines.js +1 -1
  306. package/search/constants/Portals.js +9 -2
  307. package/search/constants/index.js +10 -2
  308. package/search/helpers/index.js +5 -2
  309. package/search/helpers/removeHighlightingPlaceholders.js +4 -1
  310. package/search/helpers/spec.js +19 -1
  311. package/search/index.js +17 -5
  312. package/search/reducers/index.js +38 -2
  313. package/search/selectors/index.js +23 -4
  314. package/search/streams/index.js +51 -3
  315. package/search/subscriptions/index.js +132 -5
@@ -1 +1,3 @@
1
- import appConfig from'@shopgate/pwa-common/helpers/config';import{MARKET_GERMANY}from"../constants";export default[MARKET_GERMANY].includes(appConfig.marketId);
1
+ import appConfig from '@shopgate/pwa-common/helpers/config';
2
+ import { MARKET_GERMANY } from "../constants";
3
+ export default [MARKET_GERMANY].includes(appConfig.marketId);
@@ -1 +1,3 @@
1
- import appConfig from'@shopgate/pwa-common/helpers/config';import{MARKET_AUSTRIA,MARKET_GERMANY}from"../constants";export default[MARKET_AUSTRIA,MARKET_GERMANY].includes(appConfig.marketId);
1
+ import appConfig from '@shopgate/pwa-common/helpers/config';
2
+ import { MARKET_AUSTRIA, MARKET_GERMANY } from "../constants";
3
+ export default [MARKET_AUSTRIA, MARKET_GERMANY].includes(appConfig.marketId);
package/market/index.js CHANGED
@@ -1,3 +1,7 @@
1
1
  // CONSTANTS
2
- export*from"./constants/index";export*from"./constants/Portals";// HELPERS
3
- export{default as showReturnPolicy}from"./helpers/showReturnPolicy";export{default as showTaxDisclaimer}from"./helpers/showTaxDisclaimer";
2
+ export * from "./constants/index";
3
+ export * from "./constants/Portals";
4
+
5
+ // HELPERS
6
+ export { default as showReturnPolicy } from "./helpers/showReturnPolicy";
7
+ export { default as showTaxDisclaimer } from "./helpers/showTaxDisclaimer";
@@ -1 +1,2 @@
1
- export var LEGACY_URL='/orders_legacy';export var ORDERS_PATH='/orders';
1
+ export const LEGACY_URL = '/orders_legacy';
2
+ export const ORDERS_PATH = '/orders';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common-commerce",
3
- "version": "7.30.0-alpha.6",
3
+ "version": "7.30.0-alpha.8",
4
4
  "description": "Commerce library for the Shopgate Connect PWA.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -19,8 +19,8 @@
19
19
  "reselect": "^4.1.8"
20
20
  },
21
21
  "devDependencies": {
22
- "@shopgate/pwa-common": "7.30.0-alpha.6",
23
- "@shopgate/pwa-core": "7.30.0-alpha.6",
22
+ "@shopgate/pwa-common": "7.30.0-alpha.8",
23
+ "@shopgate/pwa-core": "7.30.0-alpha.8",
24
24
  "lodash": "^4.17.21",
25
25
  "react": "~16.14.0",
26
26
  "react-dom": "~16.14.0"
@@ -1,6 +1,14 @@
1
- import{DELETE_PRODUCTS_BY_IDS}from"../constants";/**
1
+ import { DELETE_PRODUCTS_BY_IDS } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched DELETE_PRODUCTS_BY_IDS action object.
3
5
  * @param {string[]} productIds Ids of the products to be set as expired.
4
6
  * @param {boolean} [complete=false] if product should be removed from lists.
5
7
  * @returns {Object} The dispatched action object.
6
- */var deleteProductsByIds=function deleteProductsByIds(){var productIds=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var complete=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return{type:DELETE_PRODUCTS_BY_IDS,productIds:productIds,complete:complete};};export default deleteProductsByIds;
8
+ */
9
+ const deleteProductsByIds = (productIds = [], complete = false) => ({
10
+ type: DELETE_PRODUCTS_BY_IDS,
11
+ productIds,
12
+ complete
13
+ });
14
+ export default deleteProductsByIds;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT}from"../constants";/**
1
+ import { ERROR_PRODUCT } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT action object.
3
5
  * @param {string} productId The ID of the received product.
4
6
  * @param {string} errorCode error
5
7
  * @return {Object} The ERROR_PRODUCT action.
6
- */var errorProduct=function errorProduct(productId,errorCode){return{type:ERROR_PRODUCT,productId:productId,errorCode:errorCode};};export default errorProduct;
8
+ */
9
+ const errorProduct = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProduct;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_DESCRIPTION}from"../constants";/**
1
+ import { ERROR_PRODUCT_DESCRIPTION } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_DESCRIPTION action object.
3
5
  * @param {string} productId The ID of the product that received description.
4
6
  * @param {string} errorCode errorCode
5
7
  * @return {Object} The ERROR_PRODUCT_DESCRIPTION action.
6
- */var errorProductDescription=function errorProductDescription(productId,errorCode){return{type:ERROR_PRODUCT_DESCRIPTION,productId:productId,errorCode:errorCode};};export default errorProductDescription;
8
+ */
9
+ const errorProductDescription = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_DESCRIPTION,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductDescription;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_IMAGES}from"../constants";/**
1
+ import { ERROR_PRODUCT_IMAGES } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_IMAGES action object.
3
5
  * @param {string} productId The ID of the product.
4
6
  * @param {string} errorCode errorCode
5
7
  * @return {Object} The ERROR_PRODUCT_IMAGES action.
6
- */var errorProductImages=function errorProductImages(productId,errorCode){return{type:ERROR_PRODUCT_IMAGES,productId:productId,errorCode:errorCode};};export default errorProductImages;
8
+ */
9
+ const errorProductImages = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_IMAGES,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductImages;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_MEDIA}from"../constants";/**
1
+ import { ERROR_PRODUCT_MEDIA } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_MEDIA action.
3
5
  * @param {string} productId The ID of the product for which the options are requested.
4
6
  * @param {string} errorCode error code
5
7
  * @return {Object}
6
- */var errorProductMedia=function errorProductMedia(productId,errorCode){return{type:ERROR_PRODUCT_MEDIA,productId:productId,errorCode:errorCode};};export default errorProductMedia;
8
+ */
9
+ const errorProductMedia = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_MEDIA,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductMedia;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_OPTIONS}from"../constants";/**
1
+ import { ERROR_PRODUCT_OPTIONS } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_OPTIONS action.
3
5
  * @param {string} productId The ID of the product for which the options are requested.
4
6
  * @param {string} errorCode errorCode
5
7
  * @return {Object} The ERROR_PRODUCT_OPTIONS action.
6
- */var errorProductOptions=function errorProductOptions(productId,errorCode){return{type:ERROR_PRODUCT_OPTIONS,productId:productId,errorCode:errorCode};};export default errorProductOptions;
8
+ */
9
+ const errorProductOptions = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_OPTIONS,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductOptions;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_PROPERTIES}from"../constants";/**
1
+ import { ERROR_PRODUCT_PROPERTIES } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_PROPERTIES action object.
3
5
  * @param {string} productId The ID of the product that received properties.
4
6
  * @param {string} errorCode errorCode
5
7
  * @return {Object} The ERROR_PRODUCT_PROPERTIES action.
6
- */var errorProductProperties=function errorProductProperties(productId,errorCode){return{type:ERROR_PRODUCT_PROPERTIES,productId:productId,errorCode:errorCode};};export default errorProductProperties;
8
+ */
9
+ const errorProductProperties = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_PROPERTIES,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductProperties;
@@ -1,6 +1,13 @@
1
- import{ERROR_PRODUCT_RELATIONS}from"../constants";/**
1
+ import { ERROR_PRODUCT_RELATIONS } from "../constants";
2
+ /**
2
3
  * Error product relations action.
3
4
  * @param {Object} params Params.
4
5
  * @param {string} params.hash Query hash.
5
6
  * @returns {Object}
6
- */export default(function(_ref){var hash=_ref.hash;return{type:ERROR_PRODUCT_RELATIONS,hash:hash};});
7
+ */
8
+ export default ({
9
+ hash
10
+ }) => ({
11
+ type: ERROR_PRODUCT_RELATIONS,
12
+ hash
13
+ });
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_SHIPPING}from"../constants";/**
1
+ import { ERROR_PRODUCT_SHIPPING } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_SHIPPING action.
3
5
  * @param {string} productId The ID of the product for which the shipping is requested.
4
6
  * @param {string} errorCode errorCode
5
7
  * @return {Object} The ERROR_PRODUCT_SHIPPING action.
6
- */var errorProductShipping=function errorProductShipping(productId,errorCode){return{type:ERROR_PRODUCT_SHIPPING,productId:productId,errorCode:errorCode};};export default errorProductShipping;
8
+ */
9
+ const errorProductShipping = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_SHIPPING,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductShipping;
@@ -1,6 +1,14 @@
1
- import{ERROR_PRODUCT_VARIANTS}from"../constants";/**
1
+ import { ERROR_PRODUCT_VARIANTS } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCT_VARIANTS action.
3
5
  * @param {string} productId The ID of the product for which the variants are requested.
4
6
  * @param {string} errorCode errorCode
5
7
  * @return {Object} The ERROR_PRODUCT_VARIANTS action.
6
- */var errorProductVariants=function errorProductVariants(productId,errorCode){return{type:ERROR_PRODUCT_VARIANTS,productId:productId,errorCode:errorCode};};export default errorProductVariants;
8
+ */
9
+ const errorProductVariants = (productId, errorCode) => ({
10
+ type: ERROR_PRODUCT_VARIANTS,
11
+ productId,
12
+ errorCode
13
+ });
14
+ export default errorProductVariants;
@@ -1,8 +1,15 @@
1
- function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{ERROR_PRODUCTS}from"../constants";/**
1
+ import { ERROR_PRODUCTS } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the ERROR_PRODUCTS action object.
3
5
  * @param {Object} payload The action payload.
4
6
  * @param {string} payload.hash The store hash.
5
7
  * @param {Object} payload.params The criteria of the products received.
6
8
  * @param {string} payload.errorCode The error code.
7
9
  * @return {Object} The ERROR_PRODUCTS action.
8
- */var errorProducts=function errorProducts(payload){return _extends({type:ERROR_PRODUCTS},payload);};export default errorProducts;
10
+ */
11
+ const errorProducts = payload => ({
12
+ type: ERROR_PRODUCTS,
13
+ ...payload
14
+ });
15
+ export default errorProducts;
@@ -1,6 +1,14 @@
1
- import{EXPIRE_PRODUCT_BY_ID}from"../constants";/**
1
+ import { EXPIRE_PRODUCT_BY_ID } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched EXPIRE_PRODUCT_BY_ID action object.
3
5
  * @param {string|string[]} productId Ids of the products to be set as expired.
4
6
  * @param {boolean} [complete=false] if product should be removed from lists.
5
7
  * @returns {Object} The dispatched action object.
6
- */var expireProductById=function expireProductById(productId){var complete=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return{type:EXPIRE_PRODUCT_BY_ID,productId:productId,complete:complete};};export default expireProductById;
8
+ */
9
+ const expireProductById = (productId, complete = false) => ({
10
+ type: EXPIRE_PRODUCT_BY_ID,
11
+ productId,
12
+ complete
13
+ });
14
+ export default expireProductById;
@@ -1,8 +1,17 @@
1
- import{EXPIRE_PRODUCT_DATA}from"../constants";/**
1
+ import { EXPIRE_PRODUCT_DATA } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the EXPIRE_PRODUCT_DATA action object.
3
5
  * Depending on the provided scopes, it will mark different types of product data as expired which
4
6
  * will trigger a refetch of that data when needed.
5
7
  * @param {Object} [options] The options object.
6
8
  * @param {("price"|"media"|"description")[]} [options.scopes=[]] The scopes to apply the action to.
7
9
  * @return {Object} The EXPIRE_PRODUCT_DATA action.
8
- */var expireProductData=function expireProductData(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref$scopes=_ref.scopes,scopes=_ref$scopes===void 0?[]:_ref$scopes;return{type:EXPIRE_PRODUCT_DATA,scopes:scopes};};export default expireProductData;
10
+ */
11
+ const expireProductData = ({
12
+ scopes = []
13
+ } = {}) => ({
14
+ type: EXPIRE_PRODUCT_DATA,
15
+ scopes
16
+ });
17
+ export default expireProductData;
@@ -1,5 +1,12 @@
1
- import{EXPIRE_PRODUCTS_BY_HASH}from"../constants";/**
1
+ import { EXPIRE_PRODUCTS_BY_HASH } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched EXPIRE_PRODUCTS_BY_HASH action object.
3
5
  * @param {string|string[]} hash The hash
4
6
  * @returns {Object} The dispatched action object.
5
- */var expireProductsByHash=function expireProductsByHash(hash){return{type:EXPIRE_PRODUCTS_BY_HASH,hash:hash};};export default expireProductsByHash;
7
+ */
8
+ const expireProductsByHash = hash => ({
9
+ type: EXPIRE_PRODUCTS_BY_HASH,
10
+ hash
11
+ });
12
+ export default expireProductsByHash;
@@ -1,6 +1,14 @@
1
- import{PRODUCT_NOT_AVAILABLE}from"../constants";/**
1
+ import { PRODUCT_NOT_AVAILABLE } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched PRODUCT_NOT_AVAILABLE action object.
3
5
  * @param {string} productId Ids of the products to be set as expired.
4
6
  * @param {string|Symbol} reason unavailable reason.
5
7
  * @returns {Object} The dispatched action object.
6
- */var productNotAvailable=function productNotAvailable(productId,reason){return{type:PRODUCT_NOT_AVAILABLE,productId:productId,reason:reason};};export default productNotAvailable;
8
+ */
9
+ const productNotAvailable = (productId, reason) => ({
10
+ type: PRODUCT_NOT_AVAILABLE,
11
+ productId,
12
+ reason
13
+ });
14
+ export default productNotAvailable;
@@ -1,4 +1,11 @@
1
- import{PROVIDE_PRODUCT}from"../constants";/**
1
+ import { PROVIDE_PRODUCT } from "../constants";
2
+
3
+ /**
2
4
  * @param {string} productId .
3
5
  * @return {Object}.
4
- */var provideProduct=function provideProduct(productId){return{type:PROVIDE_PRODUCT,productId:productId};};export default provideProduct;
6
+ */
7
+ const provideProduct = productId => ({
8
+ type: PROVIDE_PRODUCT,
9
+ productId
10
+ });
11
+ export default provideProduct;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT}from"../constants";/**
1
+ import { RECEIVE_PRODUCT } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCT action object.
3
5
  * @param {string} productId The ID of the received product.
4
6
  * @param {Object} productData The data of the received product.
5
7
  * @return {Object} The RECEIVE_PRODUCT action.
6
- */var receiveProduct=function receiveProduct(productId,productData){return{type:RECEIVE_PRODUCT,productId:productId,productData:productData};};export default receiveProduct;
8
+ */
9
+ const receiveProduct = (productId, productData) => ({
10
+ type: RECEIVE_PRODUCT,
11
+ productId,
12
+ productData
13
+ });
14
+ export default receiveProduct;
@@ -1,5 +1,12 @@
1
- import{RECEIVE_PRODUCT_CACHED}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_CACHED } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCT_CACHED action object.
3
5
  * @param {Object} productData The product data.
4
6
  * @return {Object} The RECEIVE_PRODUCT_CACHED action.
5
- */var receiveProductCached=function receiveProductCached(productData){return{type:RECEIVE_PRODUCT_CACHED,productData:productData};};export default receiveProductCached;
7
+ */
8
+ const receiveProductCached = productData => ({
9
+ type: RECEIVE_PRODUCT_CACHED,
10
+ productData
11
+ });
12
+ export default receiveProductCached;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_DESCRIPTION}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_DESCRIPTION } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCT_DESCRIPTION action object.
3
5
  * @param {string} productId The ID of the product that received description.
4
6
  * @param {string} description The description for the product.
5
7
  * @return {Object} The RECEIVE_PRODUCT_DESCRIPTION action.
6
- */var receiveProductDescription=function receiveProductDescription(productId,description){return{type:RECEIVE_PRODUCT_DESCRIPTION,productId:productId,description:description};};export default receiveProductDescription;
8
+ */
9
+ const receiveProductDescription = (productId, description) => ({
10
+ type: RECEIVE_PRODUCT_DESCRIPTION,
11
+ productId,
12
+ description
13
+ });
14
+ export default receiveProductDescription;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_IMAGES}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_IMAGES } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCT_IMAGES action object.
3
5
  * @param {string} productId The ID of the product.
4
6
  * @param {Array} productImages List of product images.
5
7
  * @return {Object} The RECEIVE_PRODUCT_IMAGES action.
6
- */var receiveProductImages=function receiveProductImages(productId,productImages){return{type:RECEIVE_PRODUCT_IMAGES,productId:productId,productImages:productImages};};export default receiveProductImages;
8
+ */
9
+ const receiveProductImages = (productId, productImages) => ({
10
+ type: RECEIVE_PRODUCT_IMAGES,
11
+ productId,
12
+ productImages
13
+ });
14
+ export default receiveProductImages;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_MEDIA}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_MEDIA } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the RECEIVE_PRODUCT_MEDIA action.
3
5
  * @param {string} productId The ID of the product for which the options are requested.
4
6
  * @param {Object[]} media collection
5
7
  * @return {Object}
6
- */var receiveProductMedia=function receiveProductMedia(productId,media){return{type:RECEIVE_PRODUCT_MEDIA,productId:productId,media:media};};export default receiveProductMedia;
8
+ */
9
+ const receiveProductMedia = (productId, media) => ({
10
+ type: RECEIVE_PRODUCT_MEDIA,
11
+ productId,
12
+ media
13
+ });
14
+ export default receiveProductMedia;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_OPTIONS}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_OPTIONS } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the RECEIVE_PRODUCT_OPTIONS action.
3
5
  * @param {string} productId The ID of the product for which the options are requested.
4
6
  * @param {Object} options The data of the received product options.
5
7
  * @return {Object} The RECEIVE_PRODUCT_OPTIONS action.
6
- */var receiveProductOptions=function receiveProductOptions(productId,options){return{type:RECEIVE_PRODUCT_OPTIONS,productId:productId,options:options};};export default receiveProductOptions;
8
+ */
9
+ const receiveProductOptions = (productId, options) => ({
10
+ type: RECEIVE_PRODUCT_OPTIONS,
11
+ productId,
12
+ options
13
+ });
14
+ export default receiveProductOptions;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_PROPERTIES}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_PROPERTIES } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCT_PROPERTIES action object.
3
5
  * @param {string} productId The ID of the product that received properties.
4
6
  * @param {Object} properties Key-value list of properties.
5
7
  * @return {Object} The RECEIVE_PRODUCT_PROPERTIES action.
6
- */var receiveProductProperties=function receiveProductProperties(productId,properties){return{type:RECEIVE_PRODUCT_PROPERTIES,productId:productId,properties:properties};};export default receiveProductProperties;
8
+ */
9
+ const receiveProductProperties = (productId, properties) => ({
10
+ type: RECEIVE_PRODUCT_PROPERTIES,
11
+ productId,
12
+ properties
13
+ });
14
+ export default receiveProductProperties;
@@ -1,7 +1,17 @@
1
- import{RECEIVE_PRODUCT_RELATIONS}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_RELATIONS } from "../constants";
2
+
3
+ /**
2
4
  * Receive product relations action.
3
5
  * @param {Object} params Params.
4
6
  * @param {string} params.hash Query hash.
5
7
  * @param {Object} params.payload Pipeline payload.
6
8
  * @returns {Object}
7
- */export default(function(_ref){var hash=_ref.hash,payload=_ref.payload;return{type:RECEIVE_PRODUCT_RELATIONS,hash:hash,payload:payload};});
9
+ */
10
+ export default ({
11
+ hash,
12
+ payload
13
+ }) => ({
14
+ type: RECEIVE_PRODUCT_RELATIONS,
15
+ hash,
16
+ payload
17
+ });
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_SHIPPING}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_SHIPPING } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the RECEIVE_PRODUCT_SHIPPING action.
3
5
  * @param {string} productId The ID of the product for which the shipping is requested.
4
6
  * @param {Object} shipping The data of the received product shipping.
5
7
  * @return {Object} The RECEIVE_PRODUCT_SHIPPING action.
6
- */var receiveProductShipping=function receiveProductShipping(productId,shipping){return{type:RECEIVE_PRODUCT_SHIPPING,productId:productId,shipping:shipping};};export default receiveProductShipping;
8
+ */
9
+ const receiveProductShipping = (productId, shipping) => ({
10
+ type: RECEIVE_PRODUCT_SHIPPING,
11
+ productId,
12
+ shipping
13
+ });
14
+ export default receiveProductShipping;
@@ -1,6 +1,14 @@
1
- import{RECEIVE_PRODUCT_VARIANTS}from"../constants";/**
1
+ import { RECEIVE_PRODUCT_VARIANTS } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the RECEIVE_PRODUCT_VARIANTS action.
3
5
  * @param {string} productId The ID of the product for which the variants are requested.
4
6
  * @param {Object} variants The data of the received product variants.
5
7
  * @return {Object} The RECEIVE_PRODUCT_VARIANTS action.
6
- */var receiveProductVariants=function receiveProductVariants(productId,variants){return{type:RECEIVE_PRODUCT_VARIANTS,productId:productId,variants:variants};};export default receiveProductVariants;
8
+ */
9
+ const receiveProductVariants = (productId, variants) => ({
10
+ type: RECEIVE_PRODUCT_VARIANTS,
11
+ productId,
12
+ variants
13
+ });
14
+ export default receiveProductVariants;
@@ -1,4 +1,6 @@
1
- var _excluded=["fetchInventory"];function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}import{RECEIVE_PRODUCTS}from"../constants";/**
1
+ import { RECEIVE_PRODUCTS } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCTS action object.
3
5
  * @param {Object} payload The action payload.
4
6
  * @param {string} payload.hash The store hash.
@@ -8,4 +10,16 @@ var _excluded=["fetchInventory"];function _extends(){_extends=Object.assign||fun
8
10
  * @param {boolean} [payload.fetchInventory=true] If the inventory needs to be fetched after
9
11
  * products where received.
10
12
  * @return {Object} The RECEIVE_PRODUCTS action.
11
- */var receiveProducts=function receiveProducts(payload){var _payload$fetchInvento=payload.fetchInventory,fetchInventory=_payload$fetchInvento===void 0?true:_payload$fetchInvento,rest=_objectWithoutProperties(payload,_excluded);return _extends({type:RECEIVE_PRODUCTS},rest,{fetchInventory:fetchInventory});};export default receiveProducts;
13
+ */
14
+ const receiveProducts = payload => {
15
+ const {
16
+ fetchInventory = true,
17
+ ...rest
18
+ } = payload;
19
+ return {
20
+ type: RECEIVE_PRODUCTS,
21
+ ...rest,
22
+ fetchInventory
23
+ };
24
+ };
25
+ export default receiveProducts;
@@ -1,8 +1,15 @@
1
- function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{RECEIVE_PRODUCTS_CACHED}from"../constants";/**
1
+ import { RECEIVE_PRODUCTS_CACHED } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched RECEIVE_PRODUCTS_CACHED action object.
3
5
  * @param {Object} payload The action payload.
4
6
  * @param {string} payload.hash The store hash.
5
7
  * @param {Object} payload.params The criteria of the products received.
6
8
  * @param {Object} payload.products The data of the received products.
7
9
  * @return {Object} The RECEIVE_PRODUCTS_CACHED action.
8
- */var receiveProductsCached=function receiveProductsCached(payload){return _extends({type:RECEIVE_PRODUCTS_CACHED},payload);};export default receiveProductsCached;
10
+ */
11
+ const receiveProductsCached = payload => ({
12
+ type: RECEIVE_PRODUCTS_CACHED,
13
+ ...payload
14
+ });
15
+ export default receiveProductsCached;
@@ -1,5 +1,11 @@
1
- import{REFRESH_EXPIRED_PDP_DATA}from"../constants";/**
1
+ import { REFRESH_EXPIRED_PDP_DATA } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched REFRESH_EXPIRED_PDP_DATA action object.
3
5
  * When this action is dispatched, PDP subscriptions to fetch basic product data are re-triggered.
4
6
  * @return {Object} The REFRESH_EXPIRED_PDP_DATA action.
5
- */var refreshExpiredPDPData=function refreshExpiredPDPData(){return{type:REFRESH_EXPIRED_PDP_DATA};};export default refreshExpiredPDPData;
7
+ */
8
+ const refreshExpiredPDPData = () => ({
9
+ type: REFRESH_EXPIRED_PDP_DATA
10
+ });
11
+ export default refreshExpiredPDPData;
@@ -1,6 +1,14 @@
1
- import{REQUEST_PRODUCT}from"../constants";/**
1
+ import { REQUEST_PRODUCT } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched REQUEST_PRODUCT action object.
3
5
  * @param {string} productId The ID of the product to request.
4
6
  * @param {boolean} forceFetch flag
5
7
  * @return {Object} The REQUEST_PRODUCT action.
6
- */var requestProduct=function requestProduct(productId){var forceFetch=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return{type:REQUEST_PRODUCT,productId:productId,forceFetch:forceFetch};};export default requestProduct;
8
+ */
9
+ const requestProduct = (productId, forceFetch = false) => ({
10
+ type: REQUEST_PRODUCT,
11
+ productId,
12
+ forceFetch
13
+ });
14
+ export default requestProduct;
@@ -1,5 +1,12 @@
1
- import{REQUEST_PRODUCT_DESCRIPTION}from"../constants";/**
1
+ import { REQUEST_PRODUCT_DESCRIPTION } from "../constants";
2
+
3
+ /**
2
4
  * Creates the dispatched REQUEST_PRODUCT_DESCRIPTION action object.
3
5
  * @param {string} productId The ID of the product that requests description.
4
6
  * @return {Object} The REQUEST_PRODUCT_DESCRIPTION action.
5
- */var requestProductDescription=function requestProductDescription(productId){return{type:REQUEST_PRODUCT_DESCRIPTION,productId:productId};};export default requestProductDescription;
7
+ */
8
+ const requestProductDescription = productId => ({
9
+ type: REQUEST_PRODUCT_DESCRIPTION,
10
+ productId
11
+ });
12
+ export default requestProductDescription;
@@ -1,5 +1,12 @@
1
- import{REQUEST_PRODUCT_IMAGES}from"../constants";/**
1
+ import { REQUEST_PRODUCT_IMAGES } from "../constants";
2
+
3
+ /**
2
4
  * Dispatches the REQUEST_PRODUCT_IMAGES action.
3
5
  * @param {string} productId The ID of the product to request the images.
4
6
  * @return {Object} The REQUEST_PRODUCT_IMAGES action.
5
- */var requestProductImages=function requestProductImages(productId){return{type:REQUEST_PRODUCT_IMAGES,productId:productId};};export default requestProductImages;
7
+ */
8
+ const requestProductImages = productId => ({
9
+ type: REQUEST_PRODUCT_IMAGES,
10
+ productId
11
+ });
12
+ export default requestProductImages;