@daffodil/product 0.38.9 → 0.39.0

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 (257) hide show
  1. package/bundles/daffodil-product-driver-in-memory.umd.js +77 -160
  2. package/bundles/daffodil-product-driver-in-memory.umd.js.map +1 -1
  3. package/bundles/daffodil-product-driver-in-memory.umd.min.js +1 -1
  4. package/bundles/daffodil-product-driver-in-memory.umd.min.js.map +1 -1
  5. package/bundles/daffodil-product-driver-magento-testing.umd.js +12 -140
  6. package/bundles/daffodil-product-driver-magento-testing.umd.js.map +1 -1
  7. package/bundles/daffodil-product-driver-magento-testing.umd.min.js +1 -1
  8. package/bundles/daffodil-product-driver-magento-testing.umd.min.js.map +1 -1
  9. package/bundles/daffodil-product-driver-magento.umd.js +87 -676
  10. package/bundles/daffodil-product-driver-magento.umd.js.map +1 -1
  11. package/bundles/daffodil-product-driver-magento.umd.min.js +2 -2
  12. package/bundles/daffodil-product-driver-magento.umd.min.js.map +1 -1
  13. package/bundles/daffodil-product-driver-shopify.umd.js +14 -160
  14. package/bundles/daffodil-product-driver-shopify.umd.js.map +1 -1
  15. package/bundles/daffodil-product-driver-shopify.umd.min.js +1 -1
  16. package/bundles/daffodil-product-driver-shopify.umd.min.js.map +1 -1
  17. package/bundles/daffodil-product-driver-testing.umd.js +4 -62
  18. package/bundles/daffodil-product-driver-testing.umd.js.map +1 -1
  19. package/bundles/daffodil-product-driver-testing.umd.min.js +1 -1
  20. package/bundles/daffodil-product-driver-testing.umd.min.js.map +1 -1
  21. package/bundles/daffodil-product-driver.umd.js +12 -64
  22. package/bundles/daffodil-product-driver.umd.js.map +1 -1
  23. package/bundles/daffodil-product-routing.umd.js +4 -112
  24. package/bundles/daffodil-product-routing.umd.js.map +1 -1
  25. package/bundles/daffodil-product-routing.umd.min.js +1 -1
  26. package/bundles/daffodil-product-routing.umd.min.js.map +1 -1
  27. package/bundles/daffodil-product-state-testing.umd.js +15 -240
  28. package/bundles/daffodil-product-state-testing.umd.js.map +1 -1
  29. package/bundles/daffodil-product-state-testing.umd.min.js +1 -1
  30. package/bundles/daffodil-product-state-testing.umd.min.js.map +1 -1
  31. package/bundles/daffodil-product-state.umd.js +347 -2359
  32. package/bundles/daffodil-product-state.umd.js.map +1 -1
  33. package/bundles/daffodil-product-state.umd.min.js +1 -1
  34. package/bundles/daffodil-product-state.umd.min.js.map +1 -1
  35. package/bundles/daffodil-product-testing.umd.js +20 -230
  36. package/bundles/daffodil-product-testing.umd.js.map +1 -1
  37. package/bundles/daffodil-product-testing.umd.min.js +1 -1
  38. package/bundles/daffodil-product-testing.umd.min.js.map +1 -1
  39. package/bundles/daffodil-product.umd.js +21 -209
  40. package/bundles/daffodil-product.umd.js.map +1 -1
  41. package/bundles/daffodil-product.umd.min.js +1 -1
  42. package/bundles/daffodil-product.umd.min.js.map +1 -1
  43. package/driver/in-memory/backend/product.service.d.ts +3 -2
  44. package/driver/in-memory/daffodil-product-driver-in-memory.metadata.json +1 -1
  45. package/driver/in-memory/package.json +1 -1
  46. package/driver/magento/package.json +1 -1
  47. package/driver/magento/testing/package.json +1 -1
  48. package/driver/package.json +1 -1
  49. package/driver/shopify/package.json +1 -1
  50. package/driver/testing/package.json +1 -1
  51. package/esm2015/daffodil-product.js +2 -7
  52. package/esm2015/driver/daffodil-product-driver.js +2 -7
  53. package/esm2015/driver/in-memory/backend/product.service.js +62 -83
  54. package/esm2015/driver/in-memory/daffodil-product-driver-in-memory.js +2 -7
  55. package/esm2015/driver/in-memory/driver/product-driver.module.js +1 -9
  56. package/esm2015/driver/in-memory/driver/product.service.js +11 -53
  57. package/esm2015/driver/in-memory/index.js +2 -7
  58. package/esm2015/driver/in-memory/public_api.js +1 -6
  59. package/esm2015/driver/index.js +2 -7
  60. package/esm2015/driver/interfaces/product-service.interface.js +1 -39
  61. package/esm2015/driver/magento/config/default.js +2 -8
  62. package/esm2015/driver/magento/config/public_api.js +1 -6
  63. package/esm2015/driver/magento/daffodil-product-driver-magento.js +2 -7
  64. package/esm2015/driver/magento/index.js +2 -7
  65. package/esm2015/driver/magento/injection-tokens/fragments/product-preview.token.js +7 -22
  66. package/esm2015/driver/magento/injection-tokens/fragments/product.token.js +5 -20
  67. package/esm2015/driver/magento/injection-tokens/public_api.js +1 -6
  68. package/esm2015/driver/magento/injection-tokens/transforms/product-preview/preview-extra.token.js +6 -21
  69. package/esm2015/driver/magento/injection-tokens/transforms/product-preview/preview.token.js +4 -24
  70. package/esm2015/driver/magento/injection-tokens/transforms/product-response/response-extra.token.js +5 -20
  71. package/esm2015/driver/magento/injection-tokens/transforms/product-response/response.token.js +4 -25
  72. package/esm2015/driver/magento/interfaces/config.interface.js +3 -38
  73. package/esm2015/driver/magento/interfaces/product-preview-extra-transform.type.js +2 -6
  74. package/esm2015/driver/magento/interfaces/product-preview-transform.type.js +2 -6
  75. package/esm2015/driver/magento/interfaces/product-response-extra-transform.type.js +2 -6
  76. package/esm2015/driver/magento/interfaces/product-response-transform.type.js +2 -6
  77. package/esm2015/driver/magento/interfaces/public_api.js +6 -11
  78. package/esm2015/driver/magento/models/bundled-product.js +9 -65
  79. package/esm2015/driver/magento/models/configurable-product.js +2 -72
  80. package/esm2015/driver/magento/models/get-product-response.interface.js +2 -16
  81. package/esm2015/driver/magento/models/magento-product.js +7 -38
  82. package/esm2015/driver/magento/models/product-preview.interface.js +6 -40
  83. package/esm2015/driver/magento/models/public_api.js +4 -9
  84. package/esm2015/driver/magento/models/simple-product.js +2 -18
  85. package/esm2015/driver/magento/product-driver.module.js +3 -12
  86. package/esm2015/driver/magento/product.service.js +7 -78
  87. package/esm2015/driver/magento/public_api.js +7 -12
  88. package/esm2015/driver/magento/queries/fragments/bundled-product.js +2 -8
  89. package/esm2015/driver/magento/queries/fragments/configurable-product.js +1 -7
  90. package/esm2015/driver/magento/queries/fragments/product-preview.js +1 -7
  91. package/esm2015/driver/magento/queries/fragments/product.js +1 -7
  92. package/esm2015/driver/magento/queries/fragments/simple-product.js +1 -7
  93. package/esm2015/driver/magento/queries/get-all-products.js +3 -14
  94. package/esm2015/driver/magento/queries/get-product-by-url.js +3 -14
  95. package/esm2015/driver/magento/queries/get-product.js +3 -14
  96. package/esm2015/driver/magento/queries/public_api.js +4 -9
  97. package/esm2015/driver/magento/testing/daffodil-product-driver-magento-testing.js +2 -7
  98. package/esm2015/driver/magento/testing/factories/bundle/bundle.factory.js +4 -15
  99. package/esm2015/driver/magento/testing/factories/configurable/configurable.factory.js +3 -46
  100. package/esm2015/driver/magento/testing/factories/core/product-preview.factory.js +2 -29
  101. package/esm2015/driver/magento/testing/factories/core/product.factory.js +3 -46
  102. package/esm2015/driver/magento/testing/factories/public_api.js +6 -11
  103. package/esm2015/driver/magento/testing/factories/simple/simple.factory.js +3 -12
  104. package/esm2015/driver/magento/testing/index.js +2 -7
  105. package/esm2015/driver/magento/testing/public_api.js +2 -7
  106. package/esm2015/driver/magento/transforms/bundled-product-transformers.js +4 -25
  107. package/esm2015/driver/magento/transforms/configurable-product-transformers.js +4 -38
  108. package/esm2015/driver/magento/transforms/product-preview.js +5 -35
  109. package/esm2015/driver/magento/transforms/product-response.js +2 -23
  110. package/esm2015/driver/magento/transforms/product-transformers.js +5 -32
  111. package/esm2015/driver/magento/transforms/public_api.js +7 -12
  112. package/esm2015/driver/magento/transforms/simple-product-transformers.js +3 -31
  113. package/esm2015/driver/magento/transforms/truncate-url.js +2 -12
  114. package/esm2015/driver/models/public_api.js +2 -6
  115. package/esm2015/driver/models/response.interface.js +2 -28
  116. package/esm2015/driver/public_api.js +2 -7
  117. package/esm2015/driver/shopify/daffodil-product-driver-shopify.js +2 -7
  118. package/esm2015/driver/shopify/index.js +2 -7
  119. package/esm2015/driver/shopify/product-driver.module.js +2 -10
  120. package/esm2015/driver/shopify/product.service.js +12 -132
  121. package/esm2015/driver/shopify/public_api.js +1 -6
  122. package/esm2015/driver/testing/daffodil-product-driver-testing.js +2 -7
  123. package/esm2015/driver/testing/drivers/product-driver.module.js +2 -10
  124. package/esm2015/driver/testing/drivers/product.service.js +3 -39
  125. package/esm2015/driver/testing/index.js +2 -7
  126. package/esm2015/driver/testing/public_api.js +1 -6
  127. package/esm2015/helpers.js +7 -22
  128. package/esm2015/index.js +2 -7
  129. package/esm2015/injection-tokens/error-matcher.token.js +3 -12
  130. package/esm2015/injection-tokens/public_api.js +1 -6
  131. package/esm2015/models/composite-configuration-item.js +2 -25
  132. package/esm2015/models/composite-product-item.js +8 -62
  133. package/esm2015/models/composite-product.js +2 -25
  134. package/esm2015/models/configurable-product.js +2 -125
  135. package/esm2015/models/prices.js +2 -45
  136. package/esm2015/models/product-image.js +2 -18
  137. package/esm2015/models/product.js +8 -105
  138. package/esm2015/public_api.js +10 -15
  139. package/esm2015/routing/daffodil-product-routing.js +2 -7
  140. package/esm2015/routing/index.js +2 -7
  141. package/esm2015/routing/public_api.js +2 -7
  142. package/esm2015/routing/resolvers/product-page/product-page.resolver.js +2 -21
  143. package/esm2015/routing/resolvers/product-page-id/product-page-id.resolver.js +2 -33
  144. package/esm2015/routing/resolvers/product-page-url/product-page-url.resolver.js +2 -40
  145. package/esm2015/routing/resolvers/public_api.js +1 -6
  146. package/esm2015/state/actions/best-sellers.actions.js +9 -39
  147. package/esm2015/state/actions/composite-product.actions.js +9 -29
  148. package/esm2015/state/actions/configurable-product.actions.js +8 -56
  149. package/esm2015/state/actions/product-grid.actions.js +9 -39
  150. package/esm2015/state/actions/product-page.actions.js +10 -60
  151. package/esm2015/state/actions/product.actions.js +8 -39
  152. package/esm2015/state/actions/public_api.js +7 -12
  153. package/esm2015/state/daffodil-product-state.js +2 -7
  154. package/esm2015/state/effects/best-seller.effects.js +4 -52
  155. package/esm2015/state/effects/product-grid.effects.js +4 -52
  156. package/esm2015/state/effects/product-page.effects.js +6 -68
  157. package/esm2015/state/effects/product.effects.js +4 -52
  158. package/esm2015/state/effects/public_api.js +1 -6
  159. package/esm2015/state/facades/best-sellers/best-sellers.facade.js +4 -31
  160. package/esm2015/state/facades/composite-product/composite-product-facade.interface.js +2 -86
  161. package/esm2015/state/facades/composite-product/composite-product.facade.js +4 -61
  162. package/esm2015/state/facades/configurable-product/configurable-product-facade.interface.js +2 -108
  163. package/esm2015/state/facades/configurable-product/configurable-product.facade.js +4 -78
  164. package/esm2015/state/facades/product/product-facade.interface.js +2 -70
  165. package/esm2015/state/facades/product/product.facade.js +3 -58
  166. package/esm2015/state/facades/product-grid/product-grid-facade.interface.js +2 -23
  167. package/esm2015/state/facades/product-grid/product-grid.facade.js +3 -27
  168. package/esm2015/state/facades/product-page/facade.interface.js +2 -24
  169. package/esm2015/state/facades/product-page/facade.js +3 -32
  170. package/esm2015/state/facades/public_api.js +1 -6
  171. package/esm2015/state/index.js +2 -7
  172. package/esm2015/state/product-state.module.js +1 -6
  173. package/esm2015/state/public_api.js +6 -11
  174. package/esm2015/state/reducers/best-sellers/best-sellers-reducer-state.interface.js +2 -28
  175. package/esm2015/state/reducers/best-sellers/best-sellers.reducer.js +3 -24
  176. package/esm2015/state/reducers/composite-product-entities/composite-product-entities-reducer-adapter.js +5 -18
  177. package/esm2015/state/reducers/composite-product-entities/composite-product-entities.reducer.js +12 -46
  178. package/esm2015/state/reducers/composite-product-entities/composite-product-entity.js +2 -25
  179. package/esm2015/state/reducers/configurable-product-entities/configurable-product-entities-reducer-adapter.js +4 -17
  180. package/esm2015/state/reducers/configurable-product-entities/configurable-product-entities.reducer.js +11 -67
  181. package/esm2015/state/reducers/configurable-product-entities/configurable-product-entity.js +2 -40
  182. package/esm2015/state/reducers/injection-tokens/config.token.js +4 -13
  183. package/esm2015/state/reducers/injection-tokens/meta.token.js +5 -21
  184. package/esm2015/state/reducers/injection-tokens/public_api.js +1 -6
  185. package/esm2015/state/reducers/product/product-reducer-state.interface.js +2 -33
  186. package/esm2015/state/reducers/product/product.reducer.js +4 -11
  187. package/esm2015/state/reducers/product-entities/product-entities-reducer-adapter.js +4 -18
  188. package/esm2015/state/reducers/product-entities/product-entities.reducer.js +4 -11
  189. package/esm2015/state/reducers/product-grid/product-grid-reducer-state.interface.js +2 -29
  190. package/esm2015/state/reducers/product-grid/product-grid.reducer.js +4 -11
  191. package/esm2015/state/reducers/product-reducers-state.interface.js +1 -35
  192. package/esm2015/state/reducers/product-reducers.js +1 -7
  193. package/esm2015/state/reducers/product-store-feature-key.js +1 -7
  194. package/esm2015/state/reducers/public_api.js +3 -8
  195. package/esm2015/state/selectors/all-selectors.selectors.js +3 -19
  196. package/esm2015/state/selectors/best-sellers/best-sellers.selectors.js +12 -84
  197. package/esm2015/state/selectors/composite-product/composite-product.selectors.js +48 -254
  198. package/esm2015/state/selectors/composite-product-entities/composite-product-entities.selectors.js +16 -122
  199. package/esm2015/state/selectors/configurable-product/configurable-product.selectors.js +41 -387
  200. package/esm2015/state/selectors/configurable-product-entities/configurable-product-entities.selectors.js +12 -106
  201. package/esm2015/state/selectors/product/product.selectors.js +12 -80
  202. package/esm2015/state/selectors/product-entities/product-entities.selectors.js +16 -191
  203. package/esm2015/state/selectors/product-feature.selector.js +5 -29
  204. package/esm2015/state/selectors/product-grid/product-grid.selectors.js +10 -57
  205. package/esm2015/state/selectors/public_api.js +11 -16
  206. package/esm2015/state/testing/daffodil-product-state-testing.js +2 -7
  207. package/esm2015/state/testing/index.js +2 -7
  208. package/esm2015/state/testing/mock-best-sellers.facade.js +3 -18
  209. package/esm2015/state/testing/mock-composite-product-facade.js +4 -52
  210. package/esm2015/state/testing/mock-configurable-product-facade.js +4 -65
  211. package/esm2015/state/testing/mock-product-facade.js +3 -53
  212. package/esm2015/state/testing/mock-product-grid-facade.js +3 -19
  213. package/esm2015/state/testing/mock-product-page-facade.js +3 -19
  214. package/esm2015/state/testing/product-testing.module.js +1 -6
  215. package/esm2015/state/testing/public_api.js +1 -6
  216. package/esm2015/testing/daffodil-product-testing.js +2 -7
  217. package/esm2015/testing/factories/composite-product.factory.js +3 -14
  218. package/esm2015/testing/factories/configurable-product.factory.js +2 -45
  219. package/esm2015/testing/factories/default-product.factory.js +2 -53
  220. package/esm2015/testing/factories/extension.factory.js +3 -30
  221. package/esm2015/testing/factories/kind.factory.js +2 -23
  222. package/esm2015/testing/factories/product-image.factory.js +2 -16
  223. package/esm2015/testing/factories/public_api.js +7 -12
  224. package/esm2015/testing/helpers.js +2 -8
  225. package/esm2015/testing/index.js +2 -7
  226. package/esm2015/testing/injection-tokens/factories/extra.token.js +6 -22
  227. package/esm2015/testing/injection-tokens/factories/type.token.js +5 -21
  228. package/esm2015/testing/injection-tokens/public_api.js +1 -6
  229. package/esm2015/testing/public_api.js +4 -9
  230. package/esm2015/testing/testing.module.js +1 -6
  231. package/fesm2015/daffodil-product-driver-in-memory.js +73 -158
  232. package/fesm2015/daffodil-product-driver-in-memory.js.map +1 -1
  233. package/fesm2015/daffodil-product-driver-magento-testing.js +12 -165
  234. package/fesm2015/daffodil-product-driver-magento-testing.js.map +1 -1
  235. package/fesm2015/daffodil-product-driver-magento.js +81 -801
  236. package/fesm2015/daffodil-product-driver-magento.js.map +1 -1
  237. package/fesm2015/daffodil-product-driver-shopify.js +14 -156
  238. package/fesm2015/daffodil-product-driver-shopify.js.map +1 -1
  239. package/fesm2015/daffodil-product-driver-testing.js +5 -63
  240. package/fesm2015/daffodil-product-driver-testing.js.map +1 -1
  241. package/fesm2015/daffodil-product-driver.js +1 -59
  242. package/fesm2015/daffodil-product-driver.js.map +1 -1
  243. package/fesm2015/daffodil-product-routing.js +5 -113
  244. package/fesm2015/daffodil-product-routing.js.map +1 -1
  245. package/fesm2015/daffodil-product-state-testing.js +16 -241
  246. package/fesm2015/daffodil-product-state-testing.js.map +1 -1
  247. package/fesm2015/daffodil-product-state.js +294 -2412
  248. package/fesm2015/daffodil-product-state.js.map +1 -1
  249. package/fesm2015/daffodil-product-testing.js +20 -256
  250. package/fesm2015/daffodil-product-testing.js.map +1 -1
  251. package/fesm2015/daffodil-product.js +23 -454
  252. package/fesm2015/daffodil-product.js.map +1 -1
  253. package/package.json +3 -3
  254. package/routing/package.json +1 -1
  255. package/state/package.json +1 -1
  256. package/state/testing/package.json +1 -1
  257. package/testing/package.json +1 -1
@@ -5,204 +5,122 @@
5
5
  }(this, (function (exports, i0, effects, rxjs, operators, product, driver, i1, core, entity) { 'use strict';
6
6
 
7
7
  /**
8
- * @fileoverview added by tsickle
9
- * Generated from: actions/best-sellers.actions.ts
10
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11
- */
12
- /** @enum {string} */
13
- var DaffBestSellersActionTypes = {
14
- BestSellersLoadAction: "[BestSellers] Load Action",
15
- BestSellersLoadSuccessAction: "[BestSellers] Load Success Action",
16
- BestSellersLoadFailureAction: "[BestSellers] Load Failure Action",
17
- BestSellersResetAction: "[BestSellers] Reset Action",
18
- };
8
+ * Action types for Best Seller Actions.
9
+ */
10
+ (function (DaffBestSellersActionTypes) {
11
+ DaffBestSellersActionTypes["BestSellersLoadAction"] = "[BestSellers] Load Action";
12
+ DaffBestSellersActionTypes["BestSellersLoadSuccessAction"] = "[BestSellers] Load Success Action";
13
+ DaffBestSellersActionTypes["BestSellersLoadFailureAction"] = "[BestSellers] Load Failure Action";
14
+ DaffBestSellersActionTypes["BestSellersResetAction"] = "[BestSellers] Reset Action";
15
+ })(exports.DaffBestSellersActionTypes || (exports.DaffBestSellersActionTypes = {}));
19
16
  /**
20
17
  * Triggers a request for best selling products.
21
18
  */
22
19
  var DaffBestSellersLoad = /** @class */ (function () {
23
20
  function DaffBestSellersLoad() {
24
- this.type = DaffBestSellersActionTypes.BestSellersLoadAction;
21
+ this.type = exports.DaffBestSellersActionTypes.BestSellersLoadAction;
25
22
  }
26
23
  return DaffBestSellersLoad;
27
24
  }());
28
- if (false) {
29
- /** @type {?} */
30
- DaffBestSellersLoad.prototype.type;
31
- }
32
25
  /**
33
26
  * An action called when a request for best selling products succeeded.
34
27
  *
35
28
  * @param payload - An array of Products
36
- * @template T
37
29
  */
38
30
  var DaffBestSellersLoadSuccess = /** @class */ (function () {
39
- /**
40
- * @param {?} payload
41
- */
42
31
  function DaffBestSellersLoadSuccess(payload) {
43
32
  this.payload = payload;
44
- this.type = DaffBestSellersActionTypes.BestSellersLoadSuccessAction;
33
+ this.type = exports.DaffBestSellersActionTypes.BestSellersLoadSuccessAction;
45
34
  }
46
35
  return DaffBestSellersLoadSuccess;
47
36
  }());
48
- if (false) {
49
- /** @type {?} */
50
- DaffBestSellersLoadSuccess.prototype.type;
51
- /** @type {?} */
52
- DaffBestSellersLoadSuccess.prototype.payload;
53
- }
54
37
  /**
55
38
  * An action called when a request for best selling products failed.
56
39
  *
57
40
  * @param payload - An error message
58
41
  */
59
42
  var DaffBestSellersLoadFailure = /** @class */ (function () {
60
- /**
61
- * @param {?} payload
62
- */
63
43
  function DaffBestSellersLoadFailure(payload) {
64
44
  this.payload = payload;
65
- this.type = DaffBestSellersActionTypes.BestSellersLoadFailureAction;
45
+ this.type = exports.DaffBestSellersActionTypes.BestSellersLoadFailureAction;
66
46
  }
67
47
  return DaffBestSellersLoadFailure;
68
48
  }());
69
- if (false) {
70
- /** @type {?} */
71
- DaffBestSellersLoadFailure.prototype.type;
72
- /** @type {?} */
73
- DaffBestSellersLoadFailure.prototype.payload;
74
- }
75
49
  /**
76
50
  * Resets the state of the best sellers redux store to its initial state.
77
51
  */
78
52
  var DaffBestSellersReset = /** @class */ (function () {
79
53
  function DaffBestSellersReset() {
80
- this.type = DaffBestSellersActionTypes.BestSellersResetAction;
54
+ this.type = exports.DaffBestSellersActionTypes.BestSellersResetAction;
81
55
  }
82
56
  return DaffBestSellersReset;
83
57
  }());
84
- if (false) {
85
- /** @type {?} */
86
- DaffBestSellersReset.prototype.type;
87
- }
88
58
 
89
59
  /**
90
- * @fileoverview added by tsickle
91
- * Generated from: actions/composite-product.actions.ts
92
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
60
+ * Action types for Composite Product Actions.
61
+ *
62
+ * @deprecated import from @daffodil/composite-product/state instead.
93
63
  */
94
- /** @enum {string} */
95
- var DaffCompositeProductActionTypes = {
96
- CompositeProductApplyOptionAction: "[Composite Product] Composite Product Apply Option Action",
97
- };
64
+ (function (DaffCompositeProductActionTypes) {
65
+ DaffCompositeProductActionTypes["CompositeProductApplyOptionAction"] = "[Composite Product] Composite Product Apply Option Action";
66
+ })(exports.DaffCompositeProductActionTypes || (exports.DaffCompositeProductActionTypes = {}));
98
67
  /**
99
68
  * Applies a product option to a particular composite product.
100
69
  *
101
70
  * @param id - Id of the Composite Product
102
71
  * @param itemId - Id of the product item.
103
72
  * @param optionId - Id of the option of the product item that is chosen.
104
- * @deprecated import from \@daffodil/composite-product/state instead.
105
- * @template T
73
+ * @deprecated import from @daffodil/composite-product/state instead.
106
74
  */
107
75
  var DaffCompositeProductApplyOption = /** @class */ (function () {
108
- /**
109
- * @param {?} id
110
- * @param {?} itemId
111
- * @param {?} optionId
112
- * @param {?=} qty
113
- */
114
76
  function DaffCompositeProductApplyOption(id, itemId, optionId, qty) {
115
77
  this.id = id;
116
78
  this.itemId = itemId;
117
79
  this.optionId = optionId;
118
80
  this.qty = qty;
119
- this.type = DaffCompositeProductActionTypes.CompositeProductApplyOptionAction;
81
+ this.type = exports.DaffCompositeProductActionTypes.CompositeProductApplyOptionAction;
120
82
  }
121
83
  return DaffCompositeProductApplyOption;
122
84
  }());
123
- if (false) {
124
- /** @type {?} */
125
- DaffCompositeProductApplyOption.prototype.type;
126
- /** @type {?} */
127
- DaffCompositeProductApplyOption.prototype.id;
128
- /** @type {?} */
129
- DaffCompositeProductApplyOption.prototype.itemId;
130
- /** @type {?} */
131
- DaffCompositeProductApplyOption.prototype.optionId;
132
- /** @type {?} */
133
- DaffCompositeProductApplyOption.prototype.qty;
134
- }
135
85
 
136
86
  /**
137
- * @fileoverview added by tsickle
138
- * Generated from: actions/configurable-product.actions.ts
139
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
87
+ * Action types for Configurable Product Actions.
140
88
  */
141
- /** @enum {string} */
142
- var DaffConfigurableProductActionTypes = {
143
- ConfigurableProductApplyAttributeAction: "[Configurable Product] Configurable Product Apply Attribute Action",
144
- ConfigurableProductRemoveAttributeAction: "[Configurable Product] Configurable Product Remove Attribute Action",
145
- ConfigurableProductToggleAttributeAction: "[Configurable Product] Configurable Product Toggle Attribute Action",
146
- };
89
+ (function (DaffConfigurableProductActionTypes) {
90
+ DaffConfigurableProductActionTypes["ConfigurableProductApplyAttributeAction"] = "[Configurable Product] Configurable Product Apply Attribute Action";
91
+ DaffConfigurableProductActionTypes["ConfigurableProductRemoveAttributeAction"] = "[Configurable Product] Configurable Product Remove Attribute Action";
92
+ DaffConfigurableProductActionTypes["ConfigurableProductToggleAttributeAction"] = "[Configurable Product] Configurable Product Toggle Attribute Action";
93
+ })(exports.DaffConfigurableProductActionTypes || (exports.DaffConfigurableProductActionTypes = {}));
147
94
  /**
148
95
  * Applies an attribute to a particular configurable product.
149
96
  *
150
97
  * @param id - Id of the Configurable Product
151
98
  * @param attributeId - Id of the attribute to be applied
152
99
  * @param attributeValue - Value of the attribute to be applied
153
- * @template T
154
100
  */
155
101
  var DaffConfigurableProductApplyAttribute = /** @class */ (function () {
156
- /**
157
- * @param {?} id
158
- * @param {?} attributeId
159
- * @param {?} attributeValue
160
- */
161
102
  function DaffConfigurableProductApplyAttribute(id, attributeId, attributeValue) {
162
103
  this.id = id;
163
104
  this.attributeId = attributeId;
164
105
  this.attributeValue = attributeValue;
165
- this.type = DaffConfigurableProductActionTypes.ConfigurableProductApplyAttributeAction;
106
+ this.type = exports.DaffConfigurableProductActionTypes.ConfigurableProductApplyAttributeAction;
166
107
  }
167
108
  return DaffConfigurableProductApplyAttribute;
168
109
  }());
169
- if (false) {
170
- /** @type {?} */
171
- DaffConfigurableProductApplyAttribute.prototype.type;
172
- /** @type {?} */
173
- DaffConfigurableProductApplyAttribute.prototype.id;
174
- /** @type {?} */
175
- DaffConfigurableProductApplyAttribute.prototype.attributeId;
176
- /** @type {?} */
177
- DaffConfigurableProductApplyAttribute.prototype.attributeValue;
178
- }
179
110
  /**
180
111
  * Removes an applied attribute from a particular configurable product.
181
112
  *
182
113
  * @param id - Id of the Configurable Product
183
114
  * @param attributeId - Id of the attribute to be removed
184
- * @template T
185
115
  */
186
116
  var DaffConfigurableProductRemoveAttribute = /** @class */ (function () {
187
- /**
188
- * @param {?} id
189
- * @param {?} attributeId
190
- */
191
117
  function DaffConfigurableProductRemoveAttribute(id, attributeId) {
192
118
  this.id = id;
193
119
  this.attributeId = attributeId;
194
- this.type = DaffConfigurableProductActionTypes.ConfigurableProductRemoveAttributeAction;
120
+ this.type = exports.DaffConfigurableProductActionTypes.ConfigurableProductRemoveAttributeAction;
195
121
  }
196
122
  return DaffConfigurableProductRemoveAttribute;
197
123
  }());
198
- if (false) {
199
- /** @type {?} */
200
- DaffConfigurableProductRemoveAttribute.prototype.type;
201
- /** @type {?} */
202
- DaffConfigurableProductRemoveAttribute.prototype.id;
203
- /** @type {?} */
204
- DaffConfigurableProductRemoveAttribute.prototype.attributeId;
205
- }
206
124
  /**
207
125
  * Toggles an attribute of a particular configurable product. If the attribute type of the configurable product already has
208
126
  * a different value than the one provided in the action, the attribute value in state will be overwritten by the value provided
@@ -211,227 +129,137 @@
211
129
  * @param id - Id of the Configurable Product
212
130
  * @param attributeId - Id of the attribute to be toggled
213
131
  * @param attributeValue - Value of the attribute to be toggled
214
- * @template T
215
132
  */
216
133
  var DaffConfigurableProductToggleAttribute = /** @class */ (function () {
217
- /**
218
- * @param {?} id
219
- * @param {?} attributeId
220
- * @param {?} attributeValue
221
- */
222
134
  function DaffConfigurableProductToggleAttribute(id, attributeId, attributeValue) {
223
135
  this.id = id;
224
136
  this.attributeId = attributeId;
225
137
  this.attributeValue = attributeValue;
226
- this.type = DaffConfigurableProductActionTypes.ConfigurableProductToggleAttributeAction;
138
+ this.type = exports.DaffConfigurableProductActionTypes.ConfigurableProductToggleAttributeAction;
227
139
  }
228
140
  return DaffConfigurableProductToggleAttribute;
229
141
  }());
230
- if (false) {
231
- /** @type {?} */
232
- DaffConfigurableProductToggleAttribute.prototype.type;
233
- /** @type {?} */
234
- DaffConfigurableProductToggleAttribute.prototype.id;
235
- /** @type {?} */
236
- DaffConfigurableProductToggleAttribute.prototype.attributeId;
237
- /** @type {?} */
238
- DaffConfigurableProductToggleAttribute.prototype.attributeValue;
239
- }
240
142
 
241
143
  /**
242
- * @fileoverview added by tsickle
243
- * Generated from: actions/product-grid.actions.ts
244
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
144
+ * Action types for Product Grid Actions.
245
145
  */
246
- /** @enum {string} */
247
- var DaffProductGridActionTypes = {
248
- ProductGridLoadAction: "[ProductGrid] Load Action",
249
- ProductGridLoadSuccessAction: "[ProductGrid] Load Success Action",
250
- ProductGridLoadFailureAction: "[ProductGrid] Load Failure Action",
251
- ProductGridResetAction: "[ProductGrid] Reset Action",
252
- };
146
+ (function (DaffProductGridActionTypes) {
147
+ DaffProductGridActionTypes["ProductGridLoadAction"] = "[ProductGrid] Load Action";
148
+ DaffProductGridActionTypes["ProductGridLoadSuccessAction"] = "[ProductGrid] Load Success Action";
149
+ DaffProductGridActionTypes["ProductGridLoadFailureAction"] = "[ProductGrid] Load Failure Action";
150
+ DaffProductGridActionTypes["ProductGridResetAction"] = "[ProductGrid] Reset Action";
151
+ })(exports.DaffProductGridActionTypes || (exports.DaffProductGridActionTypes = {}));
253
152
  /**
254
153
  * Triggers a request for an array of products.
255
154
  */
256
155
  var DaffProductGridLoad = /** @class */ (function () {
257
156
  function DaffProductGridLoad() {
258
- this.type = DaffProductGridActionTypes.ProductGridLoadAction;
157
+ this.type = exports.DaffProductGridActionTypes.ProductGridLoadAction;
259
158
  }
260
159
  return DaffProductGridLoad;
261
160
  }());
262
- if (false) {
263
- /** @type {?} */
264
- DaffProductGridLoad.prototype.type;
265
- }
266
161
  /**
267
162
  * An action called when a request for of an array of products succeeded.
268
163
  *
269
164
  * @param payload - An array of Products
270
- * @template T
271
165
  */
272
166
  var DaffProductGridLoadSuccess = /** @class */ (function () {
273
- /**
274
- * @param {?} payload
275
- */
276
167
  function DaffProductGridLoadSuccess(payload) {
277
168
  this.payload = payload;
278
- this.type = DaffProductGridActionTypes.ProductGridLoadSuccessAction;
169
+ this.type = exports.DaffProductGridActionTypes.ProductGridLoadSuccessAction;
279
170
  }
280
171
  return DaffProductGridLoadSuccess;
281
172
  }());
282
- if (false) {
283
- /** @type {?} */
284
- DaffProductGridLoadSuccess.prototype.type;
285
- /** @type {?} */
286
- DaffProductGridLoadSuccess.prototype.payload;
287
- }
288
173
  /**
289
174
  * An action called when a request for an array of products failed.
290
175
  *
291
176
  * @param payload - An error message
292
177
  */
293
178
  var DaffProductGridLoadFailure = /** @class */ (function () {
294
- /**
295
- * @param {?} payload
296
- */
297
179
  function DaffProductGridLoadFailure(payload) {
298
180
  this.payload = payload;
299
- this.type = DaffProductGridActionTypes.ProductGridLoadFailureAction;
181
+ this.type = exports.DaffProductGridActionTypes.ProductGridLoadFailureAction;
300
182
  }
301
183
  return DaffProductGridLoadFailure;
302
184
  }());
303
- if (false) {
304
- /** @type {?} */
305
- DaffProductGridLoadFailure.prototype.type;
306
- /** @type {?} */
307
- DaffProductGridLoadFailure.prototype.payload;
308
- }
309
185
  /**
310
186
  * Resets the state of the product grid redux store to its initial state.
311
187
  */
312
188
  var DaffProductGridReset = /** @class */ (function () {
313
189
  function DaffProductGridReset() {
314
- this.type = DaffProductGridActionTypes.ProductGridResetAction;
190
+ this.type = exports.DaffProductGridActionTypes.ProductGridResetAction;
315
191
  }
316
192
  return DaffProductGridReset;
317
193
  }());
318
- if (false) {
319
- /** @type {?} */
320
- DaffProductGridReset.prototype.type;
321
- }
322
194
 
323
195
  /**
324
- * @fileoverview added by tsickle
325
- * Generated from: actions/product.actions.ts
326
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
196
+ * Action types for Product Actions.
327
197
  */
328
- /** @enum {string} */
329
- var DaffProductActionTypes = {
330
- ProductLoadAction: "[Product] Load Action",
331
- ProductLoadSuccessAction: "[Product] Load Success Action",
332
- ProductLoadFailureAction: "[Product] Load Failure Action",
333
- };
198
+ (function (DaffProductActionTypes) {
199
+ DaffProductActionTypes["ProductLoadAction"] = "[Product] Load Action";
200
+ DaffProductActionTypes["ProductLoadSuccessAction"] = "[Product] Load Success Action";
201
+ DaffProductActionTypes["ProductLoadFailureAction"] = "[Product] Load Failure Action";
202
+ })(exports.DaffProductActionTypes || (exports.DaffProductActionTypes = {}));
334
203
  /**
335
204
  * Triggers a request for a Product.
336
205
  *
337
206
  * @param payload - Id of requested Product
338
207
  */
339
208
  var DaffProductLoad = /** @class */ (function () {
340
- /**
341
- * @param {?} payload
342
- */
343
209
  function DaffProductLoad(payload) {
344
210
  this.payload = payload;
345
- this.type = DaffProductActionTypes.ProductLoadAction;
211
+ this.type = exports.DaffProductActionTypes.ProductLoadAction;
346
212
  }
347
213
  return DaffProductLoad;
348
214
  }());
349
- if (false) {
350
- /** @type {?} */
351
- DaffProductLoad.prototype.type;
352
- /** @type {?} */
353
- DaffProductLoad.prototype.payload;
354
- }
355
215
  /**
356
216
  * An action called when a request for a Product succeeded.
357
217
  *
358
218
  * @param payload - A Product
359
- * @template T
360
219
  */
361
220
  var DaffProductLoadSuccess = /** @class */ (function () {
362
- /**
363
- * @param {?} payload
364
- */
365
221
  function DaffProductLoadSuccess(payload) {
366
222
  this.payload = payload;
367
- this.type = DaffProductActionTypes.ProductLoadSuccessAction;
223
+ this.type = exports.DaffProductActionTypes.ProductLoadSuccessAction;
368
224
  }
369
225
  return DaffProductLoadSuccess;
370
226
  }());
371
- if (false) {
372
- /** @type {?} */
373
- DaffProductLoadSuccess.prototype.type;
374
- /** @type {?} */
375
- DaffProductLoadSuccess.prototype.payload;
376
- }
377
227
  /**
378
228
  * An action called when a request for a Product failed.
379
229
  *
380
230
  * @param payload - An error message
381
231
  */
382
232
  var DaffProductLoadFailure = /** @class */ (function () {
383
- /**
384
- * @param {?} payload
385
- */
386
233
  function DaffProductLoadFailure(payload) {
387
234
  this.payload = payload;
388
- this.type = DaffProductActionTypes.ProductLoadFailureAction;
235
+ this.type = exports.DaffProductActionTypes.ProductLoadFailureAction;
389
236
  }
390
237
  return DaffProductLoadFailure;
391
238
  }());
392
- if (false) {
393
- /** @type {?} */
394
- DaffProductLoadFailure.prototype.type;
395
- /** @type {?} */
396
- DaffProductLoadFailure.prototype.payload;
397
- }
398
239
 
399
240
  /**
400
- * @fileoverview added by tsickle
401
- * Generated from: actions/product-page.actions.ts
402
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
403
- */
404
- /** @enum {string} */
405
- var DaffProductPageActionTypes = {
406
- ProductPageLoadByUrlAction: "[Product Page] Load By URL Action",
407
- ProductPageLoadAction: "[Product Page] Load Action",
408
- ProductPageLoadSuccessAction: "[Product Page] Load Success Action",
409
- ProductPageLoadFailureAction: "[Product Page] Load Failure Action",
410
- UpdateQtyAction: "[Product Page] Update Qty Action",
411
- };
241
+ * Action types for Product Page Actions.
242
+ */
243
+ (function (DaffProductPageActionTypes) {
244
+ DaffProductPageActionTypes["ProductPageLoadByUrlAction"] = "[Product Page] Load By URL Action";
245
+ DaffProductPageActionTypes["ProductPageLoadAction"] = "[Product Page] Load Action";
246
+ DaffProductPageActionTypes["ProductPageLoadSuccessAction"] = "[Product Page] Load Success Action";
247
+ DaffProductPageActionTypes["ProductPageLoadFailureAction"] = "[Product Page] Load Failure Action";
248
+ DaffProductPageActionTypes["UpdateQtyAction"] = "[Product Page] Update Qty Action";
249
+ })(exports.DaffProductPageActionTypes || (exports.DaffProductPageActionTypes = {}));
412
250
  /**
413
251
  * An action triggered to initialize a product page load.
414
252
  * This is intended to be used for loading a product page rather than only a product.
415
253
  *
416
254
  * @param payload - URL of the requested product
417
- * @template T
418
255
  */
419
256
  var DaffProductPageLoadByUrl = /** @class */ (function () {
420
- /**
421
- * @param {?} payload
422
- */
423
257
  function DaffProductPageLoadByUrl(payload) {
424
258
  this.payload = payload;
425
- this.type = DaffProductPageActionTypes.ProductPageLoadByUrlAction;
259
+ this.type = exports.DaffProductPageActionTypes.ProductPageLoadByUrlAction;
426
260
  }
427
261
  return DaffProductPageLoadByUrl;
428
262
  }());
429
- if (false) {
430
- /** @type {?} */
431
- DaffProductPageLoadByUrl.prototype.type;
432
- /** @type {?} */
433
- DaffProductPageLoadByUrl.prototype.payload;
434
- }
435
263
  /**
436
264
  * An action triggered to initialize a product page load.
437
265
  * This is intended to be used for loading a product page rather than only a product.
@@ -439,91 +267,48 @@
439
267
  * @param payload - Id of the requested product
440
268
  */
441
269
  var DaffProductPageLoad = /** @class */ (function () {
442
- /**
443
- * @param {?} payload
444
- */
445
270
  function DaffProductPageLoad(payload) {
446
271
  this.payload = payload;
447
- this.type = DaffProductPageActionTypes.ProductPageLoadAction;
272
+ this.type = exports.DaffProductPageActionTypes.ProductPageLoadAction;
448
273
  }
449
274
  return DaffProductPageLoad;
450
275
  }());
451
- if (false) {
452
- /** @type {?} */
453
- DaffProductPageLoad.prototype.type;
454
- /** @type {?} */
455
- DaffProductPageLoad.prototype.payload;
456
- }
457
276
  /**
458
277
  * An action triggered upon a successful product page request.
459
278
  *
460
279
  * @param payload - A DaffProduct
461
- * @template T
462
280
  */
463
281
  var DaffProductPageLoadSuccess = /** @class */ (function () {
464
- /**
465
- * @param {?} payload
466
- */
467
282
  function DaffProductPageLoadSuccess(payload) {
468
283
  this.payload = payload;
469
- this.type = DaffProductPageActionTypes.ProductPageLoadSuccessAction;
284
+ this.type = exports.DaffProductPageActionTypes.ProductPageLoadSuccessAction;
470
285
  }
471
286
  return DaffProductPageLoadSuccess;
472
287
  }());
473
- if (false) {
474
- /** @type {?} */
475
- DaffProductPageLoadSuccess.prototype.type;
476
- /** @type {?} */
477
- DaffProductPageLoadSuccess.prototype.payload;
478
- }
479
288
  /**
480
289
  * An action triggered upon a failed product page request.
481
290
  *
482
291
  * @param payload - an error message
483
292
  */
484
293
  var DaffProductPageLoadFailure = /** @class */ (function () {
485
- /**
486
- * @param {?} payload
487
- */
488
294
  function DaffProductPageLoadFailure(payload) {
489
295
  this.payload = payload;
490
- this.type = DaffProductPageActionTypes.ProductPageLoadFailureAction;
296
+ this.type = exports.DaffProductPageActionTypes.ProductPageLoadFailureAction;
491
297
  }
492
298
  return DaffProductPageLoadFailure;
493
299
  }());
494
- if (false) {
495
- /** @type {?} */
496
- DaffProductPageLoadFailure.prototype.type;
497
- /** @type {?} */
498
- DaffProductPageLoadFailure.prototype.payload;
499
- }
500
300
  /**
501
301
  * Update the qty of the current product.
502
302
  *
503
303
  * @param payload - The qty of the product.
504
304
  */
505
305
  var DaffProductPageUpdateQty = /** @class */ (function () {
506
- /**
507
- * @param {?} payload
508
- */
509
306
  function DaffProductPageUpdateQty(payload) {
510
307
  this.payload = payload;
511
- this.type = DaffProductPageActionTypes.UpdateQtyAction;
308
+ this.type = exports.DaffProductPageActionTypes.UpdateQtyAction;
512
309
  }
513
310
  return DaffProductPageUpdateQty;
514
311
  }());
515
- if (false) {
516
- /** @type {?} */
517
- DaffProductPageUpdateQty.prototype.type;
518
- /** @type {?} */
519
- DaffProductPageUpdateQty.prototype.payload;
520
- }
521
-
522
- /**
523
- * @fileoverview added by tsickle
524
- * Generated from: actions/public_api.ts
525
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
526
- */
527
312
 
528
313
  /*! *****************************************************************************
529
314
  Copyright (c) Microsoft Corporation.
@@ -760,7 +545,7 @@
760
545
  ar[i] = from[i];
761
546
  }
762
547
  }
763
- return to.concat(ar || from);
548
+ return to.concat(ar || Array.prototype.slice.call(from));
764
549
  }
765
550
  function __await(v) {
766
551
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -843,24 +628,13 @@
843
628
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
844
629
  }
845
630
 
846
- /**
847
- * @fileoverview added by tsickle
848
- * Generated from: effects/best-seller.effects.ts
849
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
850
- */
851
631
  /**
852
632
  * Effects for handling best seller actions and best seller service requests.
853
633
  *
854
634
  * @param action$ - Redux action object
855
635
  * @param driver - A product service driver
856
- * @template T
857
636
  */
858
637
  var DaffBestSellersEffects = /** @class */ (function () {
859
- /**
860
- * @param {?} actions$
861
- * @param {?} driver
862
- * @param {?} errorMatcher
863
- */
864
638
  function DaffBestSellersEffects(actions$, driver, errorMatcher) {
865
639
  var _this = this;
866
640
  this.actions$ = actions$;
@@ -870,19 +644,10 @@
870
644
  * Handles BestSellersLoadAction by making a service call for best selling products and returning a success or failure action
871
645
  * to the action stream.
872
646
  *
873
- * @return An Observable of a BestSellersLoad action
647
+ * @returns An Observable of a BestSellersLoad action
874
648
  */
875
- this.loadBestSellers$ = this.actions$.pipe(effects.ofType(DaffBestSellersActionTypes.BestSellersLoadAction), operators.switchMap(( /**
876
- * @param {?} action
877
- * @return {?}
878
- */function (action) { return _this.driver.getBestSellers()
879
- .pipe(operators.map(( /**
880
- * @param {?} resp
881
- * @return {?}
882
- */function (resp) { return new DaffBestSellersLoadSuccess(resp); })), operators.catchError(( /**
883
- * @param {?} error
884
- * @return {?}
885
- */function (error) { return rxjs.of(new DaffBestSellersLoadFailure(_this.errorMatcher(error))); }))); })));
649
+ this.loadBestSellers$ = this.actions$.pipe(effects.ofType(exports.DaffBestSellersActionTypes.BestSellersLoadAction), operators.switchMap(function (action) { return _this.driver.getBestSellers()
650
+ .pipe(operators.map(function (resp) { return new DaffBestSellersLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffBestSellersLoadFailure(_this.errorMatcher(error))); })); }));
886
651
  }
887
652
  return DaffBestSellersEffects;
888
653
  }());
@@ -899,50 +664,14 @@
899
664
  effects.Effect(),
900
665
  __metadata("design:type", rxjs.Observable)
901
666
  ], DaffBestSellersEffects.prototype, "loadBestSellers$", void 0);
902
- if (false) {
903
- /**
904
- * Handles BestSellersLoadAction by making a service call for best selling products and returning a success or failure action
905
- * to the action stream.
906
- *
907
- * \@return An Observable of a BestSellersLoad action
908
- * @type {?}
909
- */
910
- DaffBestSellersEffects.prototype.loadBestSellers$;
911
- /**
912
- * @type {?}
913
- * @private
914
- */
915
- DaffBestSellersEffects.prototype.actions$;
916
- /**
917
- * @type {?}
918
- * @private
919
- */
920
- DaffBestSellersEffects.prototype.driver;
921
- /**
922
- * @type {?}
923
- * @private
924
- */
925
- DaffBestSellersEffects.prototype.errorMatcher;
926
- }
927
667
 
928
- /**
929
- * @fileoverview added by tsickle
930
- * Generated from: effects/product-grid.effects.ts
931
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
932
- */
933
668
  /**
934
669
  * Effects for handling product grid actions and for triggering corresponding service requests.
935
670
  *
936
671
  * @param action$ - Redux action object
937
672
  * @param driver - A product service driver
938
- * @template T
939
673
  */
940
674
  var DaffProductGridEffects = /** @class */ (function () {
941
- /**
942
- * @param {?} actions$
943
- * @param {?} driver
944
- * @param {?} errorMatcher
945
- */
946
675
  function DaffProductGridEffects(actions$, driver, errorMatcher) {
947
676
  var _this = this;
948
677
  this.actions$ = actions$;
@@ -952,19 +681,10 @@
952
681
  * Handles ProductGridLoadAction by making a service call for products and returning a success or failure action
953
682
  * to the action stream.
954
683
  *
955
- * @return An Observable of a DaffProductGridAction
684
+ * @returns An Observable of a DaffProductGridAction
956
685
  */
957
- this.loadAll$ = this.actions$.pipe(effects.ofType(DaffProductGridActionTypes.ProductGridLoadAction), operators.switchMap(( /**
958
- * @param {?} action
959
- * @return {?}
960
- */function (action) { return _this.driver.getAll()
961
- .pipe(operators.map(( /**
962
- * @param {?} resp
963
- * @return {?}
964
- */function (resp) { return new DaffProductGridLoadSuccess(resp); })), operators.catchError(( /**
965
- * @param {?} error
966
- * @return {?}
967
- */function (error) { return rxjs.of(new DaffProductGridLoadFailure(_this.errorMatcher(error))); }))); })));
686
+ this.loadAll$ = this.actions$.pipe(effects.ofType(exports.DaffProductGridActionTypes.ProductGridLoadAction), operators.switchMap(function (action) { return _this.driver.getAll()
687
+ .pipe(operators.map(function (resp) { return new DaffProductGridLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffProductGridLoadFailure(_this.errorMatcher(error))); })); }));
968
688
  }
969
689
  return DaffProductGridEffects;
970
690
  }());
@@ -981,50 +701,14 @@
981
701
  effects.Effect(),
982
702
  __metadata("design:type", rxjs.Observable)
983
703
  ], DaffProductGridEffects.prototype, "loadAll$", void 0);
984
- if (false) {
985
- /**
986
- * Handles ProductGridLoadAction by making a service call for products and returning a success or failure action
987
- * to the action stream.
988
- *
989
- * \@return An Observable of a DaffProductGridAction
990
- * @type {?}
991
- */
992
- DaffProductGridEffects.prototype.loadAll$;
993
- /**
994
- * @type {?}
995
- * @private
996
- */
997
- DaffProductGridEffects.prototype.actions$;
998
- /**
999
- * @type {?}
1000
- * @private
1001
- */
1002
- DaffProductGridEffects.prototype.driver;
1003
- /**
1004
- * @type {?}
1005
- * @private
1006
- */
1007
- DaffProductGridEffects.prototype.errorMatcher;
1008
- }
1009
704
 
1010
- /**
1011
- * @fileoverview added by tsickle
1012
- * Generated from: effects/product.effects.ts
1013
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1014
- */
1015
705
  /**
1016
706
  * Effects for handling product actions and for triggering corresponding service requests.
1017
707
  *
1018
708
  * @param action$ - Redux action object
1019
709
  * @param driver - A product service driver
1020
- * @template T
1021
710
  */
1022
711
  var DaffProductEffects = /** @class */ (function () {
1023
- /**
1024
- * @param {?} actions$
1025
- * @param {?} driver
1026
- * @param {?} errorMatcher
1027
- */
1028
712
  function DaffProductEffects(actions$, driver, errorMatcher) {
1029
713
  var _this = this;
1030
714
  this.actions$ = actions$;
@@ -1034,19 +718,10 @@
1034
718
  * Handles ProductLoadAction by making a service call for a product and returning a success or
1035
719
  * failure action to the action stream.
1036
720
  *
1037
- * @return An Observable of a ProductLoadAction
721
+ * @returns An Observable of a ProductLoadAction
1038
722
  */
1039
- this.load$ = this.actions$.pipe(effects.ofType(DaffProductActionTypes.ProductLoadAction), operators.switchMap(( /**
1040
- * @param {?} action
1041
- * @return {?}
1042
- */function (action) { return _this.driver.get(action.payload)
1043
- .pipe(operators.map(( /**
1044
- * @param {?} resp
1045
- * @return {?}
1046
- */function (resp) { return new DaffProductLoadSuccess(resp); })), operators.catchError(( /**
1047
- * @param {?} error
1048
- * @return {?}
1049
- */function (error) { return rxjs.of(new DaffProductLoadFailure(_this.errorMatcher(error))); }))); })));
723
+ this.load$ = this.actions$.pipe(effects.ofType(exports.DaffProductActionTypes.ProductLoadAction), operators.switchMap(function (action) { return _this.driver.get(action.payload)
724
+ .pipe(operators.map(function (resp) { return new DaffProductLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffProductLoadFailure(_this.errorMatcher(error))); })); }));
1050
725
  }
1051
726
  return DaffProductEffects;
1052
727
  }());
@@ -1063,279 +738,55 @@
1063
738
  effects.Effect(),
1064
739
  __metadata("design:type", rxjs.Observable)
1065
740
  ], DaffProductEffects.prototype, "load$", void 0);
1066
- if (false) {
1067
- /**
1068
- * Handles ProductLoadAction by making a service call for a product and returning a success or
1069
- * failure action to the action stream.
1070
- *
1071
- * \@return An Observable of a ProductLoadAction
1072
- * @type {?}
1073
- */
1074
- DaffProductEffects.prototype.load$;
1075
- /**
1076
- * @type {?}
1077
- * @private
1078
- */
1079
- DaffProductEffects.prototype.actions$;
1080
- /**
1081
- * @type {?}
1082
- * @private
1083
- */
1084
- DaffProductEffects.prototype.driver;
1085
- /**
1086
- * @type {?}
1087
- * @private
1088
- */
1089
- DaffProductEffects.prototype.errorMatcher;
1090
- }
1091
-
1092
- /**
1093
- * @fileoverview added by tsickle
1094
- * Generated from: effects/public_api.ts
1095
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1096
- */
1097
741
 
1098
- /**
1099
- * @fileoverview added by tsickle
1100
- * Generated from: reducers/product-entities/product-entities-reducer-adapter.ts
1101
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1102
- */
1103
- var ɵ0 = /**
1104
- * @return {?}
1105
- */ function () {
1106
- /** @type {?} */
742
+ var ɵ0 = function () {
1107
743
  var cache;
1108
- return ( /**
1109
- * @template T
1110
- * @return {?}
1111
- */function () { return cache = cache || entity.createEntityAdapter(); });
744
+ return function () { return cache = cache || entity.createEntityAdapter(); };
1112
745
  };
1113
746
  /**
1114
747
  * Product Adapter for changing/overwriting entity state.
1115
- * @type {?}
1116
748
  */
1117
- var daffProductEntitiesAdapter = ((ɵ0))();
749
+ var daffProductEntitiesAdapter = (ɵ0)();
1118
750
 
1119
- /**
1120
- * @fileoverview added by tsickle
1121
- * Generated from: reducers/product-store-feature-key.ts
1122
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1123
- */
1124
- /** @type {?} */
1125
751
  var DAFF_PRODUCT_STORE_FEATURE_KEY = 'daffProduct';
1126
752
 
1127
- /**
1128
- * @fileoverview added by tsickle
1129
- * Generated from: selectors/product-feature.selector.ts
1130
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1131
- */
1132
- /**
1133
- * An interface for the entire product feature state.
1134
- * @record
1135
- * @template T
1136
- */
1137
- function DaffProductFeatureMemoizedSelector() { }
1138
- if (false) {
1139
- /** @type {?} */
1140
- DaffProductFeatureMemoizedSelector.prototype.selectProductState;
1141
- }
1142
- var ɵ0$1 = /**
1143
- * @return {?}
1144
- */ function () {
1145
- /** @type {?} */
753
+ var ɵ0$1 = function () {
1146
754
  var cache;
1147
- return ( /**
1148
- * @template T
1149
- * @return {?}
1150
- */function () { return cache = cache
755
+ return function () { return cache = cache
1151
756
  ? cache
1152
- : { selectProductState: i1.createFeatureSelector(DAFF_PRODUCT_STORE_FEATURE_KEY) }; });
757
+ : { selectProductState: i1.createFeatureSelector(DAFF_PRODUCT_STORE_FEATURE_KEY) }; };
1153
758
  };
1154
759
  /**
1155
760
  * A function that returns a selector for the entire product feature state.
1156
- * @type {?}
1157
761
  */
1158
- var getDaffProductFeatureSelector = ((ɵ0$1))();
762
+ var getDaffProductFeatureSelector = (ɵ0$1)();
1159
763
 
1160
- /**
1161
- * @fileoverview added by tsickle
1162
- * Generated from: selectors/product-entities/product-entities.selectors.ts
1163
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1164
- */
1165
- /**
1166
- * An interface for selectors related to product entities and prices for simple products.
1167
- * @record
1168
- * @template T
1169
- */
1170
- function DaffProductEntitiesMemoizedSelectors() { }
1171
- if (false) {
1172
- /**
1173
- * Selects the ngrx entities state for products.
1174
- * @type {?}
1175
- */
1176
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductEntitiesState;
1177
- /**
1178
- * Selects all ids for products in state.
1179
- * @type {?}
1180
- */
1181
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductIds;
1182
- /**
1183
- * Selects the ngrx entities for all products in state.
1184
- * @type {?}
1185
- */
1186
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductEntities;
1187
- /**
1188
- * Selects all products in state as an array.
1189
- * @type {?}
1190
- */
1191
- DaffProductEntitiesMemoizedSelectors.prototype.selectAllProducts;
1192
- /**
1193
- * Selects the total number of products in state.
1194
- * @type {?}
1195
- */
1196
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductTotal;
1197
- /**
1198
- * Selects a product by id.
1199
- *
1200
- * \@param productId the id of the product.
1201
- * @type {?}
1202
- */
1203
- DaffProductEntitiesMemoizedSelectors.prototype.selectProduct;
1204
- /**
1205
- * Selects the price of a product.
1206
- *
1207
- * \@param productId the id of the product.
1208
- * @type {?}
1209
- */
1210
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductPrice;
1211
- /**
1212
- * Selects the discount of a product as some amount of currency.
1213
- *
1214
- * \@param productId the id of the product.
1215
- * @type {?}
1216
- */
1217
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductDiscountAmount;
1218
- /**
1219
- * Selects the discounted price of a product.
1220
- *
1221
- * \@param productId the id of the product.
1222
- * @type {?}
1223
- */
1224
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductDiscountedPrice;
1225
- /**
1226
- * Selects the discount of a product as a percent of the original price.
1227
- *
1228
- * \@param productId the id of the product.
1229
- * @type {?}
1230
- */
1231
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductDiscountPercent;
1232
- /**
1233
- * Selects whether or not the product has a discount.
1234
- *
1235
- * \@param productId the id of the product.
1236
- * @type {?}
1237
- */
1238
- DaffProductEntitiesMemoizedSelectors.prototype.selectProductHasDiscount;
1239
- /**
1240
- * Selects whether or not a product is out of stock.
1241
- *
1242
- * \@param productId the id of the product.
1243
- * @type {?}
1244
- */
1245
- DaffProductEntitiesMemoizedSelectors.prototype.selectIsProductOutOfStock;
1246
- }
1247
- /** @type {?} */
1248
- var createProductEntitiesSelectors = ( /**
1249
- * @template T
1250
- * @return {?}
1251
- */function () {
764
+ var createProductEntitiesSelectors = function () {
1252
765
  var selectProductState = getDaffProductFeatureSelector().selectProductState;
1253
- /** @type {?} */
1254
766
  var adapterSelectors = daffProductEntitiesAdapter().getSelectors();
1255
767
  /**
1256
768
  * Product Entities State
1257
- * @type {?}
1258
769
  */
1259
- var selectProductEntitiesState = i1.createSelector(selectProductState, ( /**
1260
- * @param {?} state
1261
- * @return {?}
1262
- */function (state) { return state.products; }));
770
+ var selectProductEntitiesState = i1.createSelector(selectProductState, function (state) { return state.products; });
1263
771
  /**
1264
- * Adapters created with \@ngrx/entity generate
772
+ * Adapters created with @ngrx/entity generate
1265
773
  * commonly used selector functions including
1266
774
  * getting all ids in the record set, a dictionary
1267
775
  * of the records by id, an array of records and
1268
776
  * the total number of records. This reduces boilerplate
1269
777
  * in selecting records from the entity state.
1270
- * @type {?}
1271
778
  */
1272
779
  var selectProductIds = i1.createSelector(selectProductEntitiesState, adapterSelectors.selectIds);
1273
- /** @type {?} */
1274
780
  var selectProductEntities = i1.createSelector(selectProductEntitiesState, adapterSelectors.selectEntities);
1275
- /** @type {?} */
1276
781
  var selectAllProducts = i1.createSelector(selectProductEntitiesState, adapterSelectors.selectAll);
1277
- /** @type {?} */
1278
782
  var selectProductTotal = i1.createSelector(selectProductEntitiesState, adapterSelectors.selectTotal);
1279
- /** @type {?} */
1280
- var selectProduct = i1.defaultMemoize(( /**
1281
- * @param {?} productId
1282
- * @return {?}
1283
- */function (productId) { return i1.createSelector(selectProductEntities, ( /**
1284
- * @param {?} products
1285
- * @return {?}
1286
- */function (/**
1287
- * @param {?} products
1288
- * @return {?}
1289
- */ products) { return products[productId]; })); })).memoized;
1290
- /** @type {?} */
1291
- var selectProductPrice = i1.defaultMemoize(( /**
1292
- * @param {?} productId
1293
- * @return {?}
1294
- */function (productId) { return i1.createSelector(selectProduct(productId), ( /**
1295
- * @param {?} product
1296
- * @return {?}
1297
- */function (product) { return (product === null || product === void 0 ? void 0 : product.price) || null; })); })).memoized;
1298
- /** @type {?} */
1299
- var selectProductDiscountAmount = i1.defaultMemoize(( /**
1300
- * @param {?} productId
1301
- * @return {?}
1302
- */function (productId) { return i1.createSelector(selectProduct(productId), ( /**
1303
- * @param {?} product
1304
- * @return {?}
1305
- */function (product) { var _a; return ((_a = product === null || product === void 0 ? void 0 : product.discount) === null || _a === void 0 ? void 0 : _a.amount) || 0; })); })).memoized;
1306
- /** @type {?} */
1307
- var selectProductDiscountedPrice = i1.defaultMemoize(( /**
1308
- * @param {?} productId
1309
- * @return {?}
1310
- */function (productId) { return i1.createSelector(selectProductPrice(productId), selectProductDiscountAmount(productId), ( /**
1311
- * @param {?} price
1312
- * @param {?} discountAmount
1313
- * @return {?}
1314
- */function (price, discountAmount) { return core.daffSubtract(price, discountAmount); })); })).memoized;
1315
- /** @type {?} */
1316
- var selectProductDiscountPercent = i1.defaultMemoize(( /**
1317
- * @param {?} productId
1318
- * @return {?}
1319
- */function (productId) { return i1.createSelector(selectProduct(productId), ( /**
1320
- * @param {?} product
1321
- * @return {?}
1322
- */function (product) { var _a; return ((_a = product.discount) === null || _a === void 0 ? void 0 : _a.percent) || 0; })); })).memoized;
1323
- /** @type {?} */
1324
- var selectProductHasDiscount = i1.defaultMemoize(( /**
1325
- * @param {?} productId
1326
- * @return {?}
1327
- */function (productId) { return i1.createSelector(selectProductDiscountAmount(productId), ( /**
1328
- * @param {?} discountAmount
1329
- * @return {?}
1330
- */function (discountAmount) { return !!discountAmount; })); })).memoized;
1331
- /** @type {?} */
1332
- var selectIsProductOutOfStock = i1.defaultMemoize(( /**
1333
- * @param {?} productId
1334
- * @return {?}
1335
- */function (productId) { return i1.createSelector(selectProduct(productId), ( /**
1336
- * @param {?} product
1337
- * @return {?}
1338
- */function (product) { return product ? !product.in_stock : null; })); })).memoized;
783
+ var selectProduct = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProductEntities, function (products) { return products[productId]; }); }).memoized;
784
+ var selectProductPrice = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), function (product) { return (product === null || product === void 0 ? void 0 : product.price) || null; }); }).memoized;
785
+ var selectProductDiscountAmount = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), function (product) { var _a; return ((_a = product === null || product === void 0 ? void 0 : product.discount) === null || _a === void 0 ? void 0 : _a.amount) || 0; }); }).memoized;
786
+ var selectProductDiscountedPrice = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProductPrice(productId), selectProductDiscountAmount(productId), function (price, discountAmount) { return core.daffSubtract(price, discountAmount); }); }).memoized;
787
+ var selectProductDiscountPercent = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), function (product) { var _a; return ((_a = product.discount) === null || _a === void 0 ? void 0 : _a.percent) || 0; }); }).memoized;
788
+ var selectProductHasDiscount = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProductDiscountAmount(productId), function (discountAmount) { return !!discountAmount; }); }).memoized;
789
+ var selectIsProductOutOfStock = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), function (product) { return product ? !product.in_stock : null; }); }).memoized;
1339
790
  return {
1340
791
  selectProductEntitiesState: selectProductEntitiesState,
1341
792
  selectProductIds: selectProductIds,
@@ -1350,261 +801,82 @@
1350
801
  selectProductHasDiscount: selectProductHasDiscount,
1351
802
  selectIsProductOutOfStock: selectIsProductOutOfStock,
1352
803
  };
1353
- });
804
+ };
1354
805
  var ɵ0$2 = createProductEntitiesSelectors;
1355
- var ɵ1 = /**
1356
- * @return {?}
1357
- */ function () {
1358
- /** @type {?} */
806
+ var ɵ1 = function () {
1359
807
  var cache;
1360
- return ( /**
1361
- * @template T
1362
- * @return {?}
1363
- */function () { return cache = cache
808
+ return function () { return cache = cache
1364
809
  ? cache
1365
- : createProductEntitiesSelectors(); });
810
+ : createProductEntitiesSelectors(); };
1366
811
  };
1367
812
  /**
1368
813
  * A function that returns all selectors related to product entities and simple product prices.
1369
- * @type {?}
1370
814
  */
1371
- var getDaffProductEntitiesSelectors = ((ɵ1))();
815
+ var getDaffProductEntitiesSelectors = (ɵ1)();
1372
816
 
1373
- /**
1374
- * @fileoverview added by tsickle
1375
- * Generated from: selectors/best-sellers/best-sellers.selectors.ts
1376
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1377
- */
1378
- /**
1379
- * An interface for the available best sellers selectors.
1380
- * @record
1381
- * @template T
1382
- */
1383
- function DaffBestSellersMemoizedSelectors() { }
1384
- if (false) {
1385
- /**
1386
- * Selector for best sellers feature state
1387
- * @type {?}
1388
- */
1389
- DaffBestSellersMemoizedSelectors.prototype.selectBestSellersState;
1390
- /**
1391
- * Selector for the loading state of best selling products.
1392
- * @type {?}
1393
- */
1394
- DaffBestSellersMemoizedSelectors.prototype.selectBestSellersLoadingState;
1395
- /**
1396
- * Selector for the IDs of best selling products.
1397
- * @type {?}
1398
- */
1399
- DaffBestSellersMemoizedSelectors.prototype.selectBestSellersIdsState;
1400
- /**
1401
- * Selector for the best selling products.
1402
- * @type {?}
1403
- */
1404
- DaffBestSellersMemoizedSelectors.prototype.selectBestSellersProducts;
1405
- }
1406
- /** @type {?} */
1407
- var createBestSellersSelectors = ( /**
1408
- * @template T
1409
- * @return {?}
1410
- */function () {
817
+ var createBestSellersSelectors = function () {
1411
818
  var selectAllProducts = getDaffProductEntitiesSelectors().selectAllProducts;
1412
819
  var selectProductState = getDaffProductFeatureSelector().selectProductState;
1413
- /** @type {?} */
1414
- var selectBestSellersState = i1.createSelector(selectProductState, ( /**
1415
- * @param {?} state
1416
- * @return {?}
1417
- */function (state) { return state.bestSellers; }));
1418
- /** @type {?} */
1419
- var selectBestSellersLoadingState = i1.createSelector(selectBestSellersState, ( /**
1420
- * @param {?} state
1421
- * @return {?}
1422
- */function (state) { return state.loading; }));
1423
- /** @type {?} */
1424
- var selectBestSellersIdsState = i1.createSelector(selectBestSellersState, ( /**
1425
- * @param {?} state
1426
- * @return {?}
1427
- */function (state) { return state.productIds; }));
1428
- /** @type {?} */
1429
- var selectBestSellersProducts = i1.createSelector(selectBestSellersIdsState, selectAllProducts, ( /**
1430
- * @param {?} ids
1431
- * @param {?} products
1432
- * @return {?}
1433
- */function (ids, products) { return products.filter(( /**
1434
- * @param {?} product
1435
- * @return {?}
1436
- */function (/**
1437
- * @param {?} product
1438
- * @return {?}
1439
- */ product) { return ids.indexOf(product.id) > -1; })); }));
820
+ var selectBestSellersState = i1.createSelector(selectProductState, function (state) { return state.bestSellers; });
821
+ var selectBestSellersLoadingState = i1.createSelector(selectBestSellersState, function (state) { return state.loading; });
822
+ var selectBestSellersIdsState = i1.createSelector(selectBestSellersState, function (state) { return state.productIds; });
823
+ var selectBestSellersProducts = i1.createSelector(selectBestSellersIdsState, selectAllProducts, function (ids, products) { return products.filter(function (product) { return ids.indexOf(product.id) > -1; }); });
1440
824
  return {
1441
825
  selectBestSellersState: selectBestSellersState,
1442
826
  selectBestSellersLoadingState: selectBestSellersLoadingState,
1443
827
  selectBestSellersIdsState: selectBestSellersIdsState,
1444
828
  selectBestSellersProducts: selectBestSellersProducts,
1445
829
  };
1446
- });
830
+ };
1447
831
  var ɵ0$3 = createBestSellersSelectors;
1448
- var ɵ1$1 = /**
1449
- * @return {?}
1450
- */ function () {
1451
- /** @type {?} */
832
+ var ɵ1$1 = function () {
1452
833
  var cache;
1453
- return ( /**
1454
- * @template T
1455
- * @return {?}
1456
- */function () { return cache = cache
834
+ return function () { return cache = cache
1457
835
  ? cache
1458
- : createBestSellersSelectors(); });
836
+ : createBestSellersSelectors(); };
1459
837
  };
1460
838
  /**
1461
839
  * A function that returns all selectors related to best sellers state.
1462
840
  *
1463
- * Returns {\@link DaffBestSellersMemoizedSelectors}.
1464
- * @type {?}
841
+ * Returns {@link DaffBestSellersMemoizedSelectors}.
1465
842
  */
1466
- var getDaffBestSellersSelectors = ((ɵ1$1))();
843
+ var getDaffBestSellersSelectors = (ɵ1$1)();
1467
844
 
1468
- /**
1469
- * @fileoverview added by tsickle
1470
- * Generated from: reducers/composite-product-entities/composite-product-entities-reducer-adapter.ts
1471
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1472
- */
1473
- var ɵ0$4 = /**
1474
- * @return {?}
1475
- */ function () {
1476
- /** @type {?} */
845
+ var ɵ0$4 = function () {
1477
846
  var cache;
1478
- return ( /**
1479
- * @return {?}
1480
- */function () { return cache = cache || entity.createEntityAdapter(); });
847
+ return function () { return cache = cache || entity.createEntityAdapter(); };
1481
848
  };
1482
849
  /**
1483
850
  * Composite Product Item Options Adapter for changing/overwriting entity state.
1484
851
  *
1485
- * @deprecated import from \@daffodil/composite-product/state instead.
1486
- * @type {?}
852
+ * @deprecated import from @daffodil/composite-product/state instead.
1487
853
  */
1488
- var daffCompositeProductAppliedOptionsEntitiesAdapter = ((ɵ0$4))();
854
+ var daffCompositeProductAppliedOptionsEntitiesAdapter = (ɵ0$4)();
1489
855
 
1490
- /**
1491
- * @fileoverview added by tsickle
1492
- * Generated from: selectors/composite-product-entities/composite-product-entities.selectors.ts
1493
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1494
- */
1495
- /**
1496
- * An interface for selectors related to the composite product applied options.
1497
- *
1498
- * @deprecated import from \@daffodil/composite-product/state instead.
1499
- * @record
1500
- */
1501
- function DaffCompositeProductEntitiesMemoizedSelectors() { }
1502
- if (false) {
1503
- /**
1504
- * The ngrx entities state for composite product applied options.
1505
- * @type {?}
1506
- */
1507
- DaffCompositeProductEntitiesMemoizedSelectors.prototype.selectCompositeProductAppliedOptionsEntitiesState;
1508
- /**
1509
- * A selector for all composite product ids in state.
1510
- * @type {?}
1511
- */
1512
- DaffCompositeProductEntitiesMemoizedSelectors.prototype.selectCompositeProductIds;
1513
- /**
1514
- * The ngrx entities for the composite product appllied options.
1515
- * @type {?}
1516
- */
1517
- DaffCompositeProductEntitiesMemoizedSelectors.prototype.selectCompositeProductAppliedOptionsEntities;
1518
- /**
1519
- * The total number of composite products in state.
1520
- * @type {?}
1521
- */
1522
- DaffCompositeProductEntitiesMemoizedSelectors.prototype.selectCompositeProductTotal;
1523
- /**
1524
- * Selects the applied options for a composite product.
1525
- *
1526
- * \@param id the id of the composite product.
1527
- * @type {?}
1528
- */
1529
- DaffCompositeProductEntitiesMemoizedSelectors.prototype.selectCompositeProductAppliedOptions;
1530
- /**
1531
- * Selects whether the particular item of a composite product is required in order for the product to be valid, i.e. addable to the cart.
1532
- *
1533
- * \@param id the id of the composite product.
1534
- * \@param item_id the id of the composite product item.
1535
- * @type {?}
1536
- */
1537
- DaffCompositeProductEntitiesMemoizedSelectors.prototype.selectIsCompositeProductItemRequired;
1538
- }
1539
- /** @type {?} */
1540
- var createCompositeProductAppliedOptionsEntitiesSelectors = ( /**
1541
- * @template T
1542
- * @return {?}
1543
- */function () {
856
+ var createCompositeProductAppliedOptionsEntitiesSelectors = function () {
1544
857
  var selectProductState = getDaffProductFeatureSelector().selectProductState;
1545
858
  var _a = getDaffProductEntitiesSelectors(), selectProductEntities = _a.selectProductEntities, selectProduct = _a.selectProduct;
1546
- /** @type {?} */
1547
859
  var adapterSelectors = daffCompositeProductAppliedOptionsEntitiesAdapter().getSelectors();
1548
- /** @type {?} */
1549
- var selectCompositeProductAppliedOptionsEntitiesState = i1.createSelector(selectProductState, ( /**
1550
- * @param {?} state
1551
- * @return {?}
1552
- */function (state) { return state.compositeProductOptions; }));
1553
- /** @type {?} */
860
+ var selectCompositeProductAppliedOptionsEntitiesState = i1.createSelector(selectProductState, function (state) { return state.compositeProductOptions; });
1554
861
  var selectCompositeProductIds = i1.createSelector(selectCompositeProductAppliedOptionsEntitiesState, adapterSelectors.selectIds);
1555
- /** @type {?} */
1556
862
  var selectCompositeProductAppliedOptionsEntities = i1.createSelector(selectCompositeProductAppliedOptionsEntitiesState, adapterSelectors.selectEntities);
1557
- /** @type {?} */
1558
863
  var selectCompositeProductTotal = i1.createSelector(selectCompositeProductAppliedOptionsEntitiesState, adapterSelectors.selectTotal);
1559
- /** @type {?} */
1560
- var selectCompositeProductAppliedOptions = i1.defaultMemoize(( /**
1561
- * @param {?} id
1562
- * @return {?}
1563
- */function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntitiesState, ( /**
1564
- * @param {?} product
1565
- * @param {?} appliedOptions
1566
- * @return {?}
1567
- */function (product$1, appliedOptions) {
864
+ var selectCompositeProductAppliedOptions = i1.defaultMemoize(function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntitiesState, function (product$1, appliedOptions) {
1568
865
  if (product$1.type !== product.DaffProductTypeEnum.Composite) {
1569
866
  return undefined;
1570
867
  }
1571
- return product$1.items.reduce(( /**
1572
- * @param {?} acc
1573
- * @param {?} item
1574
- * @return {?}
1575
- */function (acc, item) {
868
+ return product$1.items.reduce(function (acc, item) {
1576
869
  var _a;
1577
- return (Object.assign(Object.assign({}, acc), (_a = {}, _a[item.id] = appliedOptions.entities[product$1.id].items[item.id].value ? Object.assign(Object.assign({}, item.options.find(( /**
1578
- * @param {?} option
1579
- * @return {?}
1580
- */function (/**
1581
- * @param {?} option
1582
- * @return {?}
1583
- */ option) { return option.id === appliedOptions.entities[product$1.id].items[item.id].value; }))), { quantity: appliedOptions.entities[product$1.id].items[item.id].qty }) : null, _a)));
1584
- }), {});
1585
- })); })).memoized;
1586
- /** @type {?} */
1587
- var selectIsCompositeProductItemRequired = i1.defaultMemoize(( /**
1588
- * @param {?} id
1589
- * @param {?} item_id
1590
- * @return {?}
1591
- */function (id, item_id) { return i1.createSelector(selectProduct(id), ( /**
1592
- * @param {?} product
1593
- * @return {?}
1594
- */function (product$1) {
870
+ return (Object.assign(Object.assign({}, acc), (_a = {}, _a[item.id] = appliedOptions.entities[product$1.id].items[item.id].value ? Object.assign(Object.assign({}, item.options.find(function (option) { return option.id === appliedOptions.entities[product$1.id].items[item.id].value; })), { quantity: appliedOptions.entities[product$1.id].items[item.id].qty }) : null, _a)));
871
+ }, {});
872
+ }); }).memoized;
873
+ var selectIsCompositeProductItemRequired = i1.defaultMemoize(function (id, item_id) { return i1.createSelector(selectProduct(id), function (product$1) {
1595
874
  if (product$1.type !== product.DaffProductTypeEnum.Composite) {
1596
875
  return undefined;
1597
876
  }
1598
- /** @type {?} */
1599
- var productItem = product$1.items.find(( /**
1600
- * @param {?} item
1601
- * @return {?}
1602
- */function (/**
1603
- * @param {?} item
1604
- * @return {?}
1605
- */ item) { return item.id === item_id; }));
877
+ var productItem = product$1.items.find(function (item) { return item.id === item_id; });
1606
878
  return productItem ? productItem.required : null;
1607
- })); })).memoized;
879
+ }); }).memoized;
1608
880
  return {
1609
881
  selectCompositeProductAppliedOptionsEntitiesState: selectCompositeProductAppliedOptionsEntitiesState,
1610
882
  selectCompositeProductIds: selectCompositeProductIds,
@@ -1613,176 +885,68 @@
1613
885
  selectCompositeProductAppliedOptions: selectCompositeProductAppliedOptions,
1614
886
  selectIsCompositeProductItemRequired: selectIsCompositeProductItemRequired,
1615
887
  };
1616
- });
888
+ };
1617
889
  var ɵ0$5 = createCompositeProductAppliedOptionsEntitiesSelectors;
1618
- var ɵ1$2 = /**
1619
- * @return {?}
1620
- */ function () {
1621
- /** @type {?} */
890
+ var ɵ1$2 = function () {
1622
891
  var cache;
1623
- return ( /**
1624
- * @template T
1625
- * @return {?}
1626
- */function () { return cache = cache
892
+ return function () { return cache = cache
1627
893
  ? cache
1628
- : createCompositeProductAppliedOptionsEntitiesSelectors(); });
894
+ : createCompositeProductAppliedOptionsEntitiesSelectors(); };
1629
895
  };
1630
896
  /**
1631
897
  * A function that returns all selectors related to composite product applied option entities.
1632
- * Returns {\@link DaffCompositeProductEntitiesMemoizedSelectors}.
898
+ * Returns {@link DaffCompositeProductEntitiesMemoizedSelectors}.
1633
899
  *
1634
- * @deprecated import from \@daffodil/composite-product/state instead.
1635
- * @type {?}
900
+ * @deprecated import from @daffodil/composite-product/state instead.
1636
901
  */
1637
- var getDaffCompositeProductEntitiesSelectors = ((ɵ1$2))();
902
+ var getDaffCompositeProductEntitiesSelectors = (ɵ1$2)();
1638
903
 
1639
- /**
1640
- * An interface describing selectors unique to the composite product, such as pricing and discounts.
1641
- *
1642
- * @deprecated import from \@daffodil/composite-product/state instead.
1643
- * @record
1644
- */
1645
- function DaffCompositeProductMemoizedSelectors() { }
1646
- if (false) {
1647
- /**
1648
- * Get a DaffPriceRange for a composite product based on the configuration provided excluding unselected, optional item prices.
1649
- * @type {?}
1650
- */
1651
- DaffCompositeProductMemoizedSelectors.prototype.selectCompositeProductRequiredItemPricesForConfiguration;
1652
- /**
1653
- * Get the broadest possible DaffPriceRange for a composite product based on the configuration provided including optional item prices.
1654
- * @type {?}
1655
- */
1656
- DaffCompositeProductMemoizedSelectors.prototype.selectCompositeProductOptionalItemPricesForConfiguration;
1657
- /**
1658
- * Get the DaffPriceRange for a composite product based on the current configuration of selected item options in redux state and
1659
- * excluding unselected, optional item prices.
1660
- * @type {?}
1661
- */
1662
- DaffCompositeProductMemoizedSelectors.prototype.selectCompositeProductPricesAsCurrentlyConfigured;
1663
- /**
1664
- * Get the discount amount for a composite product. This value will be undefined if all required options are not chosen.
1665
- * @type {?}
1666
- */
1667
- DaffCompositeProductMemoizedSelectors.prototype.selectCompositeProductDiscountAmount;
1668
- /**
1669
- * Get the discount percent for a composite product. This value will be undefined if all required options are not chosen.
1670
- * Note: this percent is computed client-side and should be treated as an estimate rather than an exact value.
1671
- * @type {?}
1672
- */
1673
- DaffCompositeProductMemoizedSelectors.prototype.selectCompositeProductDiscountPercent;
1674
- }
1675
- /** @type {?} */
1676
- var createCompositeProductSelectors = ( /**
1677
- * @return {?}
1678
- */function () {
904
+ var createCompositeProductSelectors = function () {
1679
905
  var selectProduct = getDaffProductEntitiesSelectors().selectProduct;
1680
906
  var selectCompositeProductAppliedOptionsEntities = getDaffCompositeProductEntitiesSelectors().selectCompositeProductAppliedOptionsEntities;
1681
- /** @type {?} */
1682
- var selectCompositeProductRequiredItemPricesForConfiguration = i1.defaultMemoize(( /**
1683
- * @param {?} id
1684
- * @param {?=} configuration
1685
- * @return {?}
1686
- */function (id, configuration) { return i1.createSelector(selectProduct(id), ( /**
1687
- * @param {?} product
1688
- * @return {?}
1689
- */function (product$1) {
907
+ var selectCompositeProductRequiredItemPricesForConfiguration = i1.defaultMemoize(function (id, configuration) { return i1.createSelector(selectProduct(id), function (product$1) {
1690
908
  if (product$1.type !== product.DaffProductTypeEnum.Composite) {
1691
909
  return undefined;
1692
910
  }
1693
- /** @type {?} */
1694
911
  var appliedOptions = configuration ? getAppliedOptionsForConfiguration(product$1, configuration) : {};
1695
912
  return {
1696
913
  minPrice: getMinPricesForConfiguration(product$1, appliedOptions),
1697
914
  maxPrice: getMaxPricesForConfiguration(product$1, appliedOptions),
1698
915
  };
1699
- })); })).memoized;
1700
- /** @type {?} */
1701
- var selectCompositeProductOptionalItemPricesForConfiguration = i1.defaultMemoize(( /**
1702
- * @param {?} id
1703
- * @param {?=} configuration
1704
- * @return {?}
1705
- */function (id, configuration) { return i1.createSelector(selectProduct(id), ( /**
1706
- * @param {?} product
1707
- * @return {?}
1708
- */function (product$1) {
916
+ }); }).memoized;
917
+ var selectCompositeProductOptionalItemPricesForConfiguration = i1.defaultMemoize(function (id, configuration) { return i1.createSelector(selectProduct(id), function (product$1) {
1709
918
  if (product$1.type !== product.DaffProductTypeEnum.Composite) {
1710
919
  return undefined;
1711
920
  }
1712
- /** @type {?} */
1713
921
  var appliedOptions = configuration ? getAppliedOptionsForConfiguration(product$1, configuration) : {};
1714
922
  return {
1715
923
  minPrice: getMinPricesForConfiguration(product$1, appliedOptions),
1716
924
  maxPrice: getMaxPricesForConfigurationIncludingOptionalItems(product$1, appliedOptions),
1717
925
  };
1718
- })); })).memoized;
1719
- /** @type {?} */
1720
- var selectCompositeProductPricesAsCurrentlyConfigured = i1.defaultMemoize(( /**
1721
- * @param {?} id
1722
- * @return {?}
1723
- */function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntities, ( /**
1724
- * @param {?} product
1725
- * @param {?} appliedOptionsEntities
1726
- * @return {?}
1727
- */function (product, appliedOptionsEntities) { var _a; return selectCompositeProductRequiredItemPricesForConfiguration(id, ((_a = appliedOptionsEntities[id]) === null || _a === void 0 ? void 0 : _a.items) || null).projector(product); })); })).memoized;
1728
- /** @type {?} */
1729
- var selectCompositeProductDiscountAmount = i1.defaultMemoize(( /**
1730
- * @param {?} id
1731
- * @return {?}
1732
- */function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntities, ( /**
1733
- * @param {?} product
1734
- * @param {?} appliedOptionsEntities
1735
- * @return {?}
1736
- */function (product$1, appliedOptionsEntities) {
926
+ }); }).memoized;
927
+ var selectCompositeProductPricesAsCurrentlyConfigured = i1.defaultMemoize(function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntities, function (product, appliedOptionsEntities) { var _a; return selectCompositeProductRequiredItemPricesForConfiguration(id, ((_a = appliedOptionsEntities[id]) === null || _a === void 0 ? void 0 : _a.items) || null).projector(product); }); }).memoized;
928
+ var selectCompositeProductDiscountAmount = i1.defaultMemoize(function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntities, function (product$1, appliedOptionsEntities) {
1737
929
  if (product$1.type !== product.DaffProductTypeEnum.Composite) {
1738
930
  return undefined;
1739
931
  }
1740
- /** @type {?} */
1741
932
  var appliedConfigurationItem = appliedOptionsEntities[product$1.id].items;
1742
- if (product$1.items.filter(( /**
1743
- * @param {?} item
1744
- * @return {?}
1745
- */function (/**
1746
- * @param {?} item
1747
- * @return {?}
1748
- */ item) { return item.required && appliedConfigurationItem[item.id].value === null; })).length > 0) {
933
+ if (product$1.items.filter(function (item) { return item.required && appliedConfigurationItem[item.id].value === null; }).length > 0) {
1749
934
  return undefined;
1750
935
  }
1751
- /** @type {?} */
1752
936
  var appliedOptions = getAppliedOptionsForConfiguration(product$1, appliedConfigurationItem);
1753
- return product$1.items.reduce(( /**
1754
- * @param {?} acc
1755
- * @param {?} item
1756
- * @return {?}
1757
- */function (acc, item) { var _a, _b; return ((_b = (_a = appliedOptions[item.id]) === null || _a === void 0 ? void 0 : _a.discount) === null || _b === void 0 ? void 0 : _b.amount) ? core.daffAdd(acc, core.daffMultiply(appliedOptions[item.id].discount.amount, appliedOptions[item.id].quantity)) : acc; }), product$1.discount.amount);
1758
- })); })).memoized;
1759
- /** @type {?} */
1760
- var selectCompositeProductDiscountPercent = i1.defaultMemoize(( /**
1761
- * @param {?} id
1762
- * @return {?}
1763
- */function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntities, ( /**
1764
- * @param {?} product
1765
- * @param {?} appliedOptionsEntities
1766
- * @return {?}
1767
- */function (product$1, appliedOptionsEntities) {
937
+ return product$1.items.reduce(function (acc, item) { var _a, _b; return ((_b = (_a = appliedOptions[item.id]) === null || _a === void 0 ? void 0 : _a.discount) === null || _b === void 0 ? void 0 : _b.amount) ? core.daffAdd(acc, core.daffMultiply(appliedOptions[item.id].discount.amount, appliedOptions[item.id].quantity)) : acc; }, product$1.discount.amount);
938
+ }); }).memoized;
939
+ var selectCompositeProductDiscountPercent = i1.defaultMemoize(function (id) { return i1.createSelector(selectProduct(id), selectCompositeProductAppliedOptionsEntities, function (product$1, appliedOptionsEntities) {
1768
940
  if (product$1.type !== product.DaffProductTypeEnum.Composite) {
1769
941
  return undefined;
1770
942
  }
1771
- /** @type {?} */
1772
943
  var appliedOptions = appliedOptionsEntities[product$1.id].items;
1773
- if (product$1.items.filter(( /**
1774
- * @param {?} item
1775
- * @return {?}
1776
- */function (/**
1777
- * @param {?} item
1778
- * @return {?}
1779
- */ item) { return item.required && appliedOptions[item.id].value === null; })).length > 0) {
944
+ if (product$1.items.filter(function (item) { return item.required && appliedOptions[item.id].value === null; }).length > 0) {
1780
945
  return undefined;
1781
946
  }
1782
- /** @type {?} */
1783
947
  var prices = getMinPricesForConfiguration(product$1, getAppliedOptionsForConfiguration(product$1, appliedOptions));
1784
948
  return core.daffMultiply(core.daffDivide(core.daffSubtract(prices.originalPrice, prices.discountedPrice), prices.originalPrice), 100);
1785
- })); })).memoized;
949
+ }); }).memoized;
1786
950
  return {
1787
951
  selectCompositeProductRequiredItemPricesForConfiguration: selectCompositeProductRequiredItemPricesForConfiguration,
1788
952
  selectCompositeProductOptionalItemPricesForConfiguration: selectCompositeProductOptionalItemPricesForConfiguration,
@@ -1790,66 +954,42 @@
1790
954
  selectCompositeProductDiscountAmount: selectCompositeProductDiscountAmount,
1791
955
  selectCompositeProductDiscountPercent: selectCompositeProductDiscountPercent,
1792
956
  };
1793
- });
957
+ };
1794
958
  var ɵ0$6 = createCompositeProductSelectors;
1795
- var ɵ1$3 = /**
1796
- * @return {?}
1797
- */ function () {
1798
- /** @type {?} */
959
+ var ɵ1$3 = function () {
1799
960
  var cache;
1800
- return ( /**
1801
- * @return {?}
1802
- */function () { return cache = cache
961
+ return function () { return cache = cache
1803
962
  ? cache
1804
- : createCompositeProductSelectors(); });
963
+ : createCompositeProductSelectors(); };
1805
964
  };
1806
965
  /**
1807
966
  * A function that returns all selectors related to the composite product feature.
1808
967
  *
1809
- * Returns {\@link DaffCompositeProductMemoizedSelectors}.
968
+ * Returns {@link DaffCompositeProductMemoizedSelectors}.
1810
969
  *
1811
- * @deprecated import from \@daffodil/composite-product/state instead.
1812
- * @type {?}
970
+ * @deprecated import from @daffodil/composite-product/state instead.
1813
971
  */
1814
- var getDaffCompositeProductSelectors = ((ɵ1$3))();
972
+ var getDaffCompositeProductSelectors = (ɵ1$3)();
1815
973
  /**
1816
974
  * The minimum price of an item is zero if the item is optional.
1817
975
  *
1818
- * @param {?} item DaffCompositeProductItem
1819
- * @param {?} qty
1820
- * @return {?}
976
+ * @param item DaffCompositeProductItem
1821
977
  */
1822
978
  function getMinimumRequiredCompositeItemPrice(item, qty) {
1823
- return item.required ? core.daffMultiply(Math.min.apply(Math, __spread(item.options.map(( /**
1824
- * @param {?} option
1825
- * @return {?}
1826
- */function (/**
1827
- * @param {?} option
1828
- * @return {?}
1829
- */ option) { return option.price; })))), qty) : 0;
979
+ return item.required ? core.daffMultiply(Math.min.apply(Math, __spread(item.options.map(function (option) { return option.price; }))), qty) : 0;
1830
980
  }
1831
981
  /**
1832
982
  * The maximum price for an item is zero if the item is optional.
1833
983
  *
1834
- * @param {?} item DaffCompositeProductItem
1835
- * @param {?} qty
1836
- * @return {?}
984
+ * @param item DaffCompositeProductItem
1837
985
  */
1838
986
  function getMaximumRequiredCompositeItemPrice(item, qty) {
1839
- return item.required ? core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(( /**
1840
- * @param {?} option
1841
- * @return {?}
1842
- */function (/**
1843
- * @param {?} option
1844
- * @return {?}
1845
- */ option) { return option.price; })))), qty) : 0;
987
+ return item.required ? core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(function (option) { return option.price; }))), qty) : 0;
1846
988
  }
1847
989
  /**
1848
990
  * The minimum discounted price of an item is zero if the item is optional.
1849
991
  *
1850
- * @param {?} item DaffCompositeProductItem
1851
- * @param {?} qty
1852
- * @return {?}
992
+ * @param item DaffCompositeProductItem
1853
993
  */
1854
994
  function getMinimumRequiredCompositeItemDiscountedPrice(item, qty) {
1855
995
  return item.required ? core.daffMultiply(Math.min.apply(Math, __spread(item.options.map(getDiscountedPrice))), qty) : 0;
@@ -1857,9 +997,7 @@
1857
997
  /**
1858
998
  * The maximum discounted price of an item is zero if the item is optional.
1859
999
  *
1860
- * @param {?} item DaffCompositeProductItem
1861
- * @param {?} qty
1862
- * @return {?}
1000
+ * @param item DaffCompositeProductItem
1863
1001
  */
1864
1002
  function getMaximumRequiredCompositeItemDiscountedPrice(item, qty) {
1865
1003
  return item.required ? core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(getDiscountedPrice))), qty) : 0;
@@ -1867,260 +1005,101 @@
1867
1005
  /**
1868
1006
  * Gets the minimum prices of a composite product for the configuration provided excluding unselected, optional item prices.
1869
1007
  *
1870
- * @param {?} product a DaffCompositeProduct
1871
- * @param {?} appliedOptions a Dictionary<DaffCompositeProductItemOption> that determines the current configuration of the composite product.
1872
- * @return {?}
1008
+ * @param product a DaffCompositeProduct
1009
+ * @param appliedOptions a Dictionary<DaffCompositeProductItemOption> that determines the current configuration of the composite product.
1873
1010
  */
1874
1011
  function getMinPricesForConfiguration(product, appliedOptions) {
1875
1012
  return {
1876
- discountedPrice: product.items.reduce(( /**
1877
- * @param {?} acc
1878
- * @param {?} item
1879
- * @return {?}
1880
- */function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1013
+ discountedPrice: product.items.reduce(function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1881
1014
  core.daffMultiply(getDiscountedPrice(appliedOptions[item.id]), appliedOptions[item.id].quantity) :
1882
- getMinimumRequiredCompositeItemDiscountedPrice(item, getOptionQty(appliedOptions[item.id]))); }), getDiscountedPrice(product)),
1015
+ getMinimumRequiredCompositeItemDiscountedPrice(item, getOptionQty(appliedOptions[item.id]))); }, getDiscountedPrice(product)),
1883
1016
  discount: { amount: null, percent: null },
1884
- originalPrice: product.items.reduce(( /**
1885
- * @param {?} acc
1886
- * @param {?} item
1887
- * @return {?}
1888
- */function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1017
+ originalPrice: product.items.reduce(function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1889
1018
  core.daffMultiply(appliedOptions[item.id].price, appliedOptions[item.id].quantity) :
1890
- getMinimumRequiredCompositeItemPrice(item, getOptionQty(appliedOptions[item.id]))); }), product.price),
1019
+ getMinimumRequiredCompositeItemPrice(item, getOptionQty(appliedOptions[item.id]))); }, product.price),
1891
1020
  };
1892
1021
  }
1893
1022
  /**
1894
1023
  * Gets the maximum prices of a composite product for the configuration provided excluding unselected, optional item prices.
1895
1024
  *
1896
- * @param {?} product a DaffCompositeProduct
1897
- * @param {?} appliedOptions a Dictionary<DaffCompositeProductItemOption> that determines the current configuration of the composite product.
1898
- * @return {?}
1025
+ * @param product a DaffCompositeProduct
1026
+ * @param appliedOptions a Dictionary<DaffCompositeProductItemOption> that determines the current configuration of the composite product.
1899
1027
  */
1900
1028
  function getMaxPricesForConfiguration(product, appliedOptions) {
1901
1029
  return {
1902
- discountedPrice: product.items.reduce(( /**
1903
- * @param {?} acc
1904
- * @param {?} item
1905
- * @return {?}
1906
- */function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1030
+ discountedPrice: product.items.reduce(function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1907
1031
  core.daffMultiply(getDiscountedPrice(appliedOptions[item.id]), appliedOptions[item.id].quantity) :
1908
- getMaximumRequiredCompositeItemDiscountedPrice(item, getOptionQty(appliedOptions[item.id]))); }), getDiscountedPrice(product)),
1032
+ getMaximumRequiredCompositeItemDiscountedPrice(item, getOptionQty(appliedOptions[item.id]))); }, getDiscountedPrice(product)),
1909
1033
  discount: { amount: null, percent: null },
1910
- originalPrice: product.items.reduce(( /**
1911
- * @param {?} acc
1912
- * @param {?} item
1913
- * @return {?}
1914
- */function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1034
+ originalPrice: product.items.reduce(function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1915
1035
  core.daffMultiply(appliedOptions[item.id].price, appliedOptions[item.id].quantity) :
1916
- getMaximumRequiredCompositeItemPrice(item, getOptionQty(appliedOptions[item.id]))); }), product.price),
1036
+ getMaximumRequiredCompositeItemPrice(item, getOptionQty(appliedOptions[item.id]))); }, product.price),
1917
1037
  };
1918
1038
  }
1919
- /**
1920
- * @param {?} product
1921
- * @return {?}
1922
- */
1923
1039
  function getDiscountedPrice(product) {
1924
1040
  return product.discount ? core.daffSubtract(product.price, product.discount.amount) : product.price;
1925
1041
  }
1926
1042
  /**
1927
1043
  * Gets the maximum prices of a composite product including optional item prices.
1928
1044
  *
1929
- * @param {?} product a DaffCompositeProduct
1930
- * @param {?} appliedOptions
1931
- * @return {?}
1045
+ * @param product a DaffCompositeProduct
1932
1046
  */
1933
1047
  function getMaxPricesForConfigurationIncludingOptionalItems(product, appliedOptions) {
1934
1048
  return {
1935
- discountedPrice: product.items.reduce(( /**
1936
- * @param {?} acc
1937
- * @param {?} item
1938
- * @return {?}
1939
- */function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1049
+ discountedPrice: product.items.reduce(function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1940
1050
  core.daffMultiply(getDiscountedPrice(appliedOptions[item.id]), appliedOptions[item.id].quantity) :
1941
1051
  appliedOptionHasQty(appliedOptions[item.id]) ?
1942
- core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(getDiscountedPrice))), appliedOptions[item.id].quantity) : Math.max.apply(Math, __spread(item.options.map(getDiscountedPrice)))); }), getDiscountedPrice(product)),
1052
+ core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(getDiscountedPrice))), appliedOptions[item.id].quantity) : Math.max.apply(Math, __spread(item.options.map(getDiscountedPrice)))); }, getDiscountedPrice(product)),
1943
1053
  discount: { amount: null, percent: null },
1944
- originalPrice: product.items.reduce(( /**
1945
- * @param {?} acc
1946
- * @param {?} item
1947
- * @return {?}
1948
- */function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1054
+ originalPrice: product.items.reduce(function (acc, item) { return core.daffAdd(acc, appliedOptionHasId(appliedOptions[item.id]) ?
1949
1055
  core.daffMultiply(appliedOptions[item.id].price, appliedOptions[item.id].quantity) :
1950
1056
  appliedOptionHasQty(appliedOptions[item.id]) ?
1951
- core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(( /**
1952
- * @param {?} option
1953
- * @return {?}
1954
- */function (/**
1955
- * @param {?} option
1956
- * @return {?}
1957
- */ option) { return option.price; })))), appliedOptions[item.id].quantity) : Math.max.apply(Math, __spread(item.options.map(( /**
1958
- * @param {?} option
1959
- * @return {?}
1960
- */function (/**
1961
- * @param {?} option
1962
- * @return {?}
1963
- */ option) { return option.price; }))))); }), product.price),
1057
+ core.daffMultiply(Math.max.apply(Math, __spread(item.options.map(function (option) { return option.price; }))), appliedOptions[item.id].quantity) : Math.max.apply(Math, __spread(item.options.map(function (option) { return option.price; })))); }, product.price),
1964
1058
  };
1965
1059
  }
1966
1060
  /**
1967
1061
  * Takes a product and a set of option configurations and convert it into a dictionary of the full option objects.
1968
1062
  *
1969
- * @param {?} product a DaffCompositeProduct
1970
- * @param {?} configuration a Dictionary<DaffCompositeConfigurationItem> used to build the appliedOptions object.
1971
- * @return {?}
1063
+ * @param product a DaffCompositeProduct
1064
+ * @param configuration a Dictionary<DaffCompositeConfigurationItem> used to build the appliedOptions object.
1972
1065
  */
1973
1066
  function getAppliedOptionsForConfiguration(product, configuration) {
1974
- return product.items.reduce(( /**
1975
- * @param {?} acc
1976
- * @param {?} item
1977
- * @return {?}
1978
- */function (acc, item) {
1067
+ return product.items.reduce(function (acc, item) {
1979
1068
  var _c;
1980
- return (Object.assign(Object.assign({}, acc), (_c = {}, _c[item.id] = configuration[item.id] ? Object.assign(Object.assign({}, item.options.find(( /**
1981
- * @param {?} option
1982
- * @return {?}
1983
- */function (/**
1984
- * @param {?} option
1985
- * @return {?}
1986
- */ option) { return option.id === configuration[item.id].value; }))), { quantity: (configuration[item.id].qty === null || configuration[item.id].qty === undefined) ? 1 : configuration[item.id].qty }) : null, _c)));
1987
- }), {});
1069
+ return (Object.assign(Object.assign({}, acc), (_c = {}, _c[item.id] = configuration[item.id] ? Object.assign(Object.assign({}, item.options.find(function (option) { return option.id === configuration[item.id].value; })), { quantity: (configuration[item.id].qty === null || configuration[item.id].qty === undefined) ? 1 : configuration[item.id].qty }) : null, _c)));
1070
+ }, {});
1988
1071
  }
1989
- /**
1990
- * @param {?} appliedOption
1991
- * @return {?}
1992
- */
1993
1072
  function appliedOptionHasId(appliedOption) {
1994
1073
  return !!(appliedOption === null || appliedOption === void 0 ? void 0 : appliedOption.id);
1995
1074
  }
1996
- /**
1997
- * @param {?} appliedOption
1998
- * @return {?}
1999
- */
2000
1075
  function getOptionQty(appliedOption) {
2001
1076
  return appliedOptionHasQty(appliedOption) ? appliedOption.quantity : 1;
2002
1077
  }
2003
- /**
2004
- * @param {?} appliedOption
2005
- * @return {?}
2006
- */
2007
1078
  function appliedOptionHasQty(appliedOption) {
2008
1079
  return (appliedOption === null || appliedOption === void 0 ? void 0 : appliedOption.quantity) !== null && (appliedOption === null || appliedOption === void 0 ? void 0 : appliedOption.quantity) !== undefined;
2009
1080
  }
2010
1081
 
2011
- /**
2012
- * @fileoverview added by tsickle
2013
- * Generated from: reducers/configurable-product-entities/configurable-product-entities-reducer-adapter.ts
2014
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2015
- */
2016
- var ɵ0$7 = /**
2017
- * @return {?}
2018
- */ function () {
2019
- /** @type {?} */
1082
+ var ɵ0$7 = function () {
2020
1083
  var cache;
2021
- return ( /**
2022
- * @return {?}
2023
- */function () { return cache = cache || entity.createEntityAdapter(); });
1084
+ return function () { return cache = cache || entity.createEntityAdapter(); };
2024
1085
  };
2025
1086
  /**
2026
1087
  * Configurable Product Applied Attributes Adapter for changing/overwriting entity state.
2027
- * @type {?}
2028
1088
  */
2029
- var daffConfigurableProductAppliedAttributesEntitiesAdapter = ((ɵ0$7))();
1089
+ var daffConfigurableProductAppliedAttributesEntitiesAdapter = (ɵ0$7)();
2030
1090
 
2031
- /**
2032
- * @fileoverview added by tsickle
2033
- * Generated from: selectors/configurable-product-entities/configurable-product-entities.selectors.ts
2034
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2035
- */
2036
- /**
2037
- * An interface for selectors related to the configurable product applied attributes.
2038
- *
2039
- * @deprecated import from \@daffodil/configurable-product/state instead.
2040
- * @record
2041
- */
2042
- function DaffConfigurableProductEntitiesMemoizedSelectors() { }
2043
- if (false) {
2044
- /**
2045
- * Selects the configurable product applied attributes entities state.
2046
- * @type {?}
2047
- */
2048
- DaffConfigurableProductEntitiesMemoizedSelectors.prototype.selectConfigurableProductAppliedAttributesEntitiesState;
2049
- /**
2050
- * Selects all ids for configurable products in state.
2051
- * @type {?}
2052
- */
2053
- DaffConfigurableProductEntitiesMemoizedSelectors.prototype.selectConfigurableProductIds;
2054
- /**
2055
- * Selects the configurable product applied attributes as ngrx entities.
2056
- * @type {?}
2057
- */
2058
- DaffConfigurableProductEntitiesMemoizedSelectors.prototype.selectConfigurableProductAppliedAttributesEntities;
2059
- /**
2060
- * Selects the total number of configurable products in state.
2061
- * @type {?}
2062
- */
2063
- DaffConfigurableProductEntitiesMemoizedSelectors.prototype.selectConfigurableProductTotal;
2064
- /**
2065
- * Selects the applied attributes of a configurable product.
2066
- *
2067
- * \@param productId the id of the configurable product.
2068
- * @type {?}
2069
- */
2070
- DaffConfigurableProductEntitiesMemoizedSelectors.prototype.selectConfigurableProductAppliedAttributes;
2071
- /**
2072
- * Selects the applied attributes of a configurable product as a dictionary.
2073
- *
2074
- * \@param productId the id of the configurable product.
2075
- * @type {?}
2076
- */
2077
- DaffConfigurableProductEntitiesMemoizedSelectors.prototype.selectConfigurableProductAppliedAttributesAsDictionary;
2078
- }
2079
- /** @type {?} */
2080
- var createConfigurableProductAppliedAttributesEntitiesSelectors = ( /**
2081
- * @template T
2082
- * @return {?}
2083
- */function () {
1091
+ var createConfigurableProductAppliedAttributesEntitiesSelectors = function () {
2084
1092
  var selectProductState = getDaffProductFeatureSelector().selectProductState;
2085
- /** @type {?} */
2086
1093
  var adapterSelectors = daffConfigurableProductAppliedAttributesEntitiesAdapter().getSelectors();
2087
- /** @type {?} */
2088
- var selectConfigurableProductAppliedAttributesEntitiesState = i1.createSelector(selectProductState, ( /**
2089
- * @param {?} state
2090
- * @return {?}
2091
- */function (state) { return state.configurableProductAttributes; }));
2092
- /** @type {?} */
1094
+ var selectConfigurableProductAppliedAttributesEntitiesState = i1.createSelector(selectProductState, function (state) { return state.configurableProductAttributes; });
2093
1095
  var selectConfigurableProductIds = i1.createSelector(selectConfigurableProductAppliedAttributesEntitiesState, adapterSelectors.selectIds);
2094
- /** @type {?} */
2095
1096
  var selectConfigurableProductAppliedAttributesEntities = i1.createSelector(selectConfigurableProductAppliedAttributesEntitiesState, adapterSelectors.selectEntities);
2096
- /** @type {?} */
2097
1097
  var selectConfigurableProductTotal = i1.createSelector(selectConfigurableProductAppliedAttributesEntitiesState, adapterSelectors.selectTotal);
2098
- /** @type {?} */
2099
- var selectConfigurableProductAppliedAttributes = i1.defaultMemoize(( /**
2100
- * @param {?} productId
2101
- * @return {?}
2102
- */function (productId) { return i1.createSelector(selectConfigurableProductAppliedAttributesEntitiesState, ( /**
2103
- * @param {?} products
2104
- * @return {?}
2105
- */function (/**
2106
- * @param {?} products
2107
- * @return {?}
2108
- */ products) { return products.entities[productId].attributes; })); })).memoized;
2109
- /** @type {?} */
2110
- var selectConfigurableProductAppliedAttributesAsDictionary = i1.defaultMemoize(( /**
2111
- * @param {?} productId
2112
- * @return {?}
2113
- */function (productId) { return i1.createSelector(selectConfigurableProductAppliedAttributes(productId), ( /**
2114
- * @param {?} attributes
2115
- * @return {?}
2116
- */function (attributes) { return attributes.reduce(( /**
2117
- * @param {?} acc
2118
- * @param {?} attribute
2119
- * @return {?}
2120
- */function (acc, attribute) {
1098
+ var selectConfigurableProductAppliedAttributes = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductAppliedAttributesEntitiesState, function (products) { return products.entities[productId].attributes; }); }).memoized;
1099
+ var selectConfigurableProductAppliedAttributesAsDictionary = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductAppliedAttributes(productId), function (attributes) { return attributes.reduce(function (acc, attribute) {
2121
1100
  var _a;
2122
1101
  return (Object.assign(Object.assign({}, acc), (_a = {}, _a[attribute.code] = attribute.value, _a)));
2123
- }), {}); })); })).memoized;
1102
+ }, {}); }); }).memoized;
2124
1103
  return {
2125
1104
  selectConfigurableProductAppliedAttributesEntitiesState: selectConfigurableProductAppliedAttributesEntitiesState,
2126
1105
  selectConfigurableProductIds: selectConfigurableProductIds,
@@ -2129,352 +1108,77 @@
2129
1108
  selectConfigurableProductAppliedAttributes: selectConfigurableProductAppliedAttributes,
2130
1109
  selectConfigurableProductAppliedAttributesAsDictionary: selectConfigurableProductAppliedAttributesAsDictionary,
2131
1110
  };
2132
- });
1111
+ };
2133
1112
  var ɵ0$8 = createConfigurableProductAppliedAttributesEntitiesSelectors;
2134
- var ɵ1$4 = /**
2135
- * @return {?}
2136
- */ function () {
2137
- /** @type {?} */
1113
+ var ɵ1$4 = function () {
2138
1114
  var cache;
2139
- return ( /**
2140
- * @template T
2141
- * @return {?}
2142
- */function () { return cache = cache
1115
+ return function () { return cache = cache
2143
1116
  ? cache
2144
- : createConfigurableProductAppliedAttributesEntitiesSelectors(); });
1117
+ : createConfigurableProductAppliedAttributesEntitiesSelectors(); };
2145
1118
  };
2146
1119
  /**
2147
1120
  * A function that returns all selectors related to configurable product applied attributes.
2148
- * Returns {\@link DaffConfigurableProductEntitiesMemoizedSelectors}.
1121
+ * Returns {@link DaffConfigurableProductEntitiesMemoizedSelectors}.
2149
1122
  *
2150
- * @deprecated import from \@daffodil/configurable-product/state instead.
2151
- * @type {?}
1123
+ * @deprecated import from @daffodil/configurable-product/state instead.
2152
1124
  */
2153
- var getDaffConfigurableProductEntitiesSelectors = ((ɵ1$4))();
1125
+ var getDaffConfigurableProductEntitiesSelectors = (ɵ1$4)();
2154
1126
 
2155
- /**
2156
- * An interface describing all selectors unique to configurable products including ranged pricing, configurable attributes, and product variants.
2157
- *
2158
- * @deprecated import from \@daffodil/configurable-product/state instead.
2159
- * @record
2160
- */
2161
- function DaffConfigurableProductMemoizedSelectors() { }
2162
- if (false) {
2163
- /**
2164
- * Selects all possible attributes of a configurable product.
2165
- *
2166
- * \@param productId the id of the configurable product.
2167
- * @type {?}
2168
- */
2169
- DaffConfigurableProductMemoizedSelectors.prototype.selectAllConfigurableProductAttributes;
2170
- /**
2171
- * Selects all variants of the configurable product.
2172
- *
2173
- * \@param productId the id of the configurable product.
2174
- * @type {?}
2175
- */
2176
- DaffConfigurableProductMemoizedSelectors.prototype.selectAllConfigurableProductVariants;
2177
- /**
2178
- * Selects the configurable product variants that match the currently applied attributes.
2179
- *
2180
- * \@param productId the id of the configurable product.
2181
- * @type {?}
2182
- */
2183
- DaffConfigurableProductMemoizedSelectors.prototype.selectMatchingConfigurableProductVariants;
2184
- /**
2185
- * Selects all prices for the configurable product variants that match the currently applied attributes.
2186
- *
2187
- * \@param productId the id of the configurable product.
2188
- * @type {?}
2189
- */
2190
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductPrices;
2191
- /**
2192
- * Selects all discounted prices for the configurable product variant that match the currently applied attributes.
2193
- *
2194
- * \@param productId the id of the configurable product.
2195
- * @type {?}
2196
- */
2197
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductDiscountedPrices;
2198
- /**
2199
- * Selects all percent discounts for the configurable product variants that match the currently applied attributes.
2200
- *
2201
- * \@param productId the id of the configurable product.
2202
- * @type {?}
2203
- */
2204
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductPercentDiscounts;
2205
- /**
2206
- * Selects whether or not any variants that match the currently applied attributes have a discount.
2207
- *
2208
- * \@param productId the id of the configurable product.
2209
- * @type {?}
2210
- */
2211
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductHasDiscount;
2212
- /**
2213
- * Selects the minimum possible price of the configurable product variants that match the currently applied attributes.
2214
- *
2215
- * \@param productId the id of the configurable product.
2216
- * @type {?}
2217
- */
2218
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductMinimumPrice;
2219
- /**
2220
- * Selects the maximum possible price of the configurable product variants that match the currently applied attributes.
2221
- *
2222
- * \@param productId the id of the configurable product.
2223
- * @type {?}
2224
- */
2225
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductMaximumPrice;
2226
- /**
2227
- * Selects the minimum possible discounted price of the configurable product variants that match the currently applied attributes.
2228
- * @type {?}
2229
- */
2230
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductMinimumDiscountedPrice;
2231
- /**
2232
- * Selects the maximum possible discounted price of the configurable product variants that match the currently applied attributes.
2233
- *
2234
- * \@param productId the id of the configurable product.
2235
- * @type {?}
2236
- */
2237
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductMaximumDiscountedPrice;
2238
- /**
2239
- * Selects the minimum possible percent discount of the configurable product variants that match the currently applied attributes.
2240
- *
2241
- * \@param productId the id of the configurable product.
2242
- * @type {?}
2243
- */
2244
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductMinimumPercentDiscount;
2245
- /**
2246
- * Selects the maximum possible percent discount of the configurable product variants that match the currently applied attributes.
2247
- *
2248
- * \@param productId the id of the configurable product.
2249
- * @type {?}
2250
- */
2251
- DaffConfigurableProductMemoizedSelectors.prototype.selectConfigurableProductMaximumPercentDiscount;
2252
- /**
2253
- * Selects whether or not the currently applied attributes result in more than one possible price.
2254
- *
2255
- * \@param productId the id of the configurable product.
2256
- * @type {?}
2257
- */
2258
- DaffConfigurableProductMemoizedSelectors.prototype.isConfigurablePriceRanged;
2259
- /**
2260
- * Selects the available/selectable configurable product attributes derived from the order of currently applied attributes and the remaining variants
2261
- * (determined by the currently applied attributes). An attribute might not be selectable if none of the matching variants have that particular attribute.
2262
- * @type {?}
2263
- */
2264
- DaffConfigurableProductMemoizedSelectors.prototype.selectSelectableConfigurableProductAttributes;
2265
- }
2266
- /** @type {?} */
2267
- var createConfigurableProductSelectors = ( /**
2268
- * @return {?}
2269
- */function () {
1127
+ var createConfigurableProductSelectors = function () {
2270
1128
  var selectConfigurableProductAppliedAttributes = getDaffConfigurableProductEntitiesSelectors().selectConfigurableProductAppliedAttributes;
2271
1129
  var selectProduct = getDaffProductEntitiesSelectors().selectProduct;
2272
- /** @type {?} */
2273
- var selectAllConfigurableProductVariants = i1.defaultMemoize(( /**
2274
- * @param {?} productId
2275
- * @return {?}
2276
- */function (productId) { return i1.createSelector(selectProduct(productId), ( /**
2277
- * @param {?} product
2278
- * @return {?}
2279
- */function (product$1) {
1130
+ var selectAllConfigurableProductVariants = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), function (product$1) {
2280
1131
  if (!product$1 || product$1.type !== product.DaffProductTypeEnum.Configurable) {
2281
1132
  return [];
2282
1133
  }
2283
1134
  return product$1.variants;
2284
- })); })).memoized;
2285
- /** @type {?} */
2286
- var selectMatchingConfigurableProductVariants = i1.defaultMemoize(( /**
2287
- * @param {?} productId
2288
- * @return {?}
2289
- */function (productId) { return i1.createSelector(selectProduct(productId), selectConfigurableProductAppliedAttributes(productId), ( /**
2290
- * @param {?} product
2291
- * @param {?} appliedAttributes
2292
- * @return {?}
2293
- */function (product$1, appliedAttributes) {
1135
+ }); }).memoized;
1136
+ var selectMatchingConfigurableProductVariants = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), selectConfigurableProductAppliedAttributes(productId), function (product$1, appliedAttributes) {
2294
1137
  if (!product$1 || product$1.type !== product.DaffProductTypeEnum.Configurable) {
2295
1138
  return [];
2296
1139
  }
2297
- return product$1.variants.filter(( /**
2298
- * @param {?} variant
2299
- * @return {?}
2300
- */function (/**
2301
- * @param {?} variant
2302
- * @return {?}
2303
- */ variant) { return isVariantAvailable(appliedAttributes, variant); }));
2304
- })); })).memoized;
2305
- /** @type {?} */
2306
- var selectConfigurableProductPrices = i1.defaultMemoize(( /**
2307
- * @param {?} productId
2308
- * @return {?}
2309
- */function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), ( /**
2310
- * @param {?} variants
2311
- * @return {?}
2312
- */function (variants) { return variants.map(( /**
2313
- * @param {?} variant
2314
- * @return {?}
2315
- */function (/**
2316
- * @param {?} variant
2317
- * @return {?}
2318
- */ variant) { return variant.price; })); })); })).memoized;
2319
- /** @type {?} */
2320
- var selectConfigurableProductDiscountedPrices = i1.defaultMemoize(( /**
2321
- * @param {?} productId
2322
- * @return {?}
2323
- */function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), ( /**
2324
- * @param {?} variants
2325
- * @return {?}
2326
- */function (variants) { return variants.map(( /**
2327
- * @param {?} variant
2328
- * @return {?}
2329
- */function (/**
2330
- * @param {?} variant
2331
- * @return {?}
2332
- */ variant) { return variant.discount ? core.daffSubtract(variant.price, variant.discount.amount) : variant.price; })); })); })).memoized;
2333
- /** @type {?} */
2334
- var selectConfigurableProductPercentDiscounts = i1.defaultMemoize(( /**
2335
- * @param {?} productId
2336
- * @return {?}
2337
- */function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), ( /**
2338
- * @param {?} variants
2339
- * @return {?}
2340
- */function (variants) { return variants.map(( /**
2341
- * @param {?} variant
2342
- * @return {?}
2343
- */function (/**
2344
- * @param {?} variant
2345
- * @return {?}
2346
- */ variant) { var _a; return (_a = variant.discount) === null || _a === void 0 ? void 0 : _a.percent; })); })); })).memoized;
2347
- /** @type {?} */
2348
- var selectConfigurableProductHasDiscount = i1.defaultMemoize(( /**
2349
- * @param {?} productId
2350
- * @return {?}
2351
- */function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), ( /**
2352
- * @param {?} variants
2353
- * @return {?}
2354
- */function (variants) { return variants.reduce(( /**
2355
- * @param {?} acc
2356
- * @param {?} variant
2357
- * @return {?}
2358
- */function (acc, variant) { var _a; return acc || (((_a = variant.discount) === null || _a === void 0 ? void 0 : _a.amount) > 0); }), false); })); })).memoized;
2359
- /** @type {?} */
2360
- var selectConfigurableProductMinimumPrice = i1.defaultMemoize(( /**
2361
- * @param {?} productId
2362
- * @return {?}
2363
- */function (productId) { return i1.createSelector(selectConfigurableProductPrices(productId), getMinimumPrice); })).memoized;
2364
- /** @type {?} */
2365
- var selectConfigurableProductMaximumPrice = i1.defaultMemoize(( /**
2366
- * @param {?} productId
2367
- * @return {?}
2368
- */function (productId) { return i1.createSelector(selectConfigurableProductPrices(productId), getMaximumPrice); })).memoized;
2369
- /** @type {?} */
2370
- var selectConfigurableProductMinimumDiscountedPrice = i1.defaultMemoize(( /**
2371
- * @param {?} productId
2372
- * @return {?}
2373
- */function (productId) { return i1.createSelector(selectConfigurableProductDiscountedPrices(productId), getMinimumPrice); })).memoized;
2374
- /** @type {?} */
2375
- var selectConfigurableProductMaximumDiscountedPrice = i1.defaultMemoize(( /**
2376
- * @param {?} productId
2377
- * @return {?}
2378
- */function (productId) { return i1.createSelector(selectConfigurableProductDiscountedPrices(productId), getMaximumPrice); })).memoized;
2379
- /** @type {?} */
2380
- var selectConfigurableProductMinimumPercentDiscount = i1.defaultMemoize(( /**
2381
- * @param {?} productId
2382
- * @return {?}
2383
- */function (productId) { return i1.createSelector(selectConfigurableProductPercentDiscounts(productId), getMinimumPrice); })).memoized;
2384
- /** @type {?} */
2385
- var selectConfigurableProductMaximumPercentDiscount = i1.defaultMemoize(( /**
2386
- * @param {?} productId
2387
- * @return {?}
2388
- */function (productId) { return i1.createSelector(selectConfigurableProductPercentDiscounts(productId), getMaximumPrice); })).memoized;
2389
- /** @type {?} */
2390
- var isConfigurablePriceRanged = i1.defaultMemoize(( /**
2391
- * @param {?} productId
2392
- * @return {?}
2393
- */function (productId) { return i1.createSelector(selectConfigurableProductMinimumPrice(productId), selectConfigurableProductMaximumPrice(productId), ( /**
2394
- * @param {?} minPrice
2395
- * @param {?} maxPrice
2396
- * @return {?}
2397
- */function (minPrice, maxPrice) { return minPrice !== maxPrice; })); })).memoized;
2398
- /** @type {?} */
2399
- var selectAllConfigurableProductAttributes = i1.defaultMemoize(( /**
2400
- * @param {?} productId
2401
- * @return {?}
2402
- */function (productId) { return i1.createSelector(selectProduct(productId), ( /**
2403
- * @param {?} product
2404
- * @return {?}
2405
- */function (product$1) {
1140
+ return product$1.variants.filter(function (variant) { return isVariantAvailable(appliedAttributes, variant); });
1141
+ }); }).memoized;
1142
+ var selectConfigurableProductPrices = i1.defaultMemoize(function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), function (variants) { return variants.map(function (variant) { return variant.price; }); }); }).memoized;
1143
+ var selectConfigurableProductDiscountedPrices = i1.defaultMemoize(function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), function (variants) { return variants.map(function (variant) { return variant.discount ? core.daffSubtract(variant.price, variant.discount.amount) : variant.price; }); }); }).memoized;
1144
+ var selectConfigurableProductPercentDiscounts = i1.defaultMemoize(function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), function (variants) { return variants.map(function (variant) { var _a; return (_a = variant.discount) === null || _a === void 0 ? void 0 : _a.percent; }); }); }).memoized;
1145
+ var selectConfigurableProductHasDiscount = i1.defaultMemoize(function (productId) { return i1.createSelector(selectMatchingConfigurableProductVariants(productId), function (variants) { return variants.reduce(function (acc, variant) { var _a; return acc || (((_a = variant.discount) === null || _a === void 0 ? void 0 : _a.amount) > 0); }, false); }); }).memoized;
1146
+ var selectConfigurableProductMinimumPrice = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductPrices(productId), getMinimumPrice); }).memoized;
1147
+ var selectConfigurableProductMaximumPrice = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductPrices(productId), getMaximumPrice); }).memoized;
1148
+ var selectConfigurableProductMinimumDiscountedPrice = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductDiscountedPrices(productId), getMinimumPrice); }).memoized;
1149
+ var selectConfigurableProductMaximumDiscountedPrice = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductDiscountedPrices(productId), getMaximumPrice); }).memoized;
1150
+ var selectConfigurableProductMinimumPercentDiscount = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductPercentDiscounts(productId), getMinimumPrice); }).memoized;
1151
+ var selectConfigurableProductMaximumPercentDiscount = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductPercentDiscounts(productId), getMaximumPrice); }).memoized;
1152
+ var isConfigurablePriceRanged = i1.defaultMemoize(function (productId) { return i1.createSelector(selectConfigurableProductMinimumPrice(productId), selectConfigurableProductMaximumPrice(productId), function (minPrice, maxPrice) { return minPrice !== maxPrice; }); }).memoized;
1153
+ var selectAllConfigurableProductAttributes = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), function (product$1) {
2406
1154
  if (product$1.type !== product.DaffProductTypeEnum.Configurable) {
2407
1155
  return {};
2408
1156
  }
2409
- return product$1.configurableAttributes.reduce(( /**
2410
- * @param {?} acc
2411
- * @param {?} attribute
2412
- * @return {?}
2413
- */function (acc, attribute) {
1157
+ return product$1.configurableAttributes.reduce(function (acc, attribute) {
2414
1158
  var _b;
2415
- return (Object.assign(Object.assign({}, acc), (_b = {}, _b[attribute.code] = attribute.values.map(( /**
2416
- * @param {?} value
2417
- * @return {?}
2418
- */function (/**
2419
- * @param {?} value
2420
- * @return {?}
2421
- */ value) { return value.value; })), _b)));
2422
- }), {});
2423
- })); })).memoized;
2424
- /** @type {?} */
2425
- var selectSelectableConfigurableProductAttributes = i1.defaultMemoize(( /**
2426
- * @param {?} productId
2427
- * @return {?}
2428
- */function (productId) { return i1.createSelector(selectProduct(productId), selectConfigurableProductAppliedAttributes(productId), ( /**
2429
- * @param {?} product
2430
- * @param {?} appliedAttributes
2431
- * @return {?}
2432
- */function (product$1, appliedAttributes) {
1159
+ return (Object.assign(Object.assign({}, acc), (_b = {}, _b[attribute.code] = attribute.values.map(function (value) { return value.value; }), _b)));
1160
+ }, {});
1161
+ }); }).memoized;
1162
+ var selectSelectableConfigurableProductAttributes = i1.defaultMemoize(function (productId) { return i1.createSelector(selectProduct(productId), selectConfigurableProductAppliedAttributes(productId), function (product$1, appliedAttributes) {
2433
1163
  if (product$1.type !== product.DaffProductTypeEnum.Configurable) {
2434
1164
  return {};
2435
1165
  }
2436
- /** @type {?} */
2437
1166
  var selectableAttributes = initializeSelectableAttributes(product$1.configurableAttributes);
2438
1167
  // Set which values of applied attribute codes should be set as selectable based on the order that they were selected
2439
- /** @type {?} */
2440
- var matchedVariants = appliedAttributes.reduce(( /**
2441
- * @param {?} matchingVariants
2442
- * @param {?} appliedAttribute
2443
- * @param {?} i
2444
- * @return {?}
2445
- */function (matchingVariants, appliedAttribute, i) {
2446
- /** @type {?} */
2447
- var filteredVariants = matchingVariants.filter(( /**
2448
- * @param {?} variant
2449
- * @return {?}
2450
- */function (/**
2451
- * @param {?} variant
2452
- * @return {?}
2453
- */ variant) { return isVariantAvailable(appliedAttributes.slice(0, i), variant); }));
1168
+ var matchedVariants = appliedAttributes.reduce(function (matchingVariants, appliedAttribute, i) {
1169
+ var filteredVariants = matchingVariants.filter(function (variant) { return isVariantAvailable(appliedAttributes.slice(0, i), variant); });
2454
1170
  selectableAttributes[appliedAttribute.code] = getSelectableAttributesFromVariants(selectableAttributes, filteredVariants, appliedAttribute.code);
2455
1171
  return filteredVariants;
2456
- }), product$1.variants).filter(( /**
2457
- * @param {?} variant
2458
- * @return {?}
2459
- */function (/**
2460
- * @param {?} variant
2461
- * @return {?}
2462
- */ variant) { return isVariantAvailable(appliedAttributes, variant); }));
1172
+ }, product$1.variants).filter(function (variant) { return isVariantAvailable(appliedAttributes, variant); });
2463
1173
  // Set which values of the unapplied attribute codes should be set as selectable based on the matching variants of all
2464
1174
  // applied attributes.
2465
- product$1.configurableAttributes.forEach(( /**
2466
- * @param {?} attribute
2467
- * @return {?}
2468
- */function (/**
2469
- * @param {?} attribute
2470
- * @return {?}
2471
- */ attribute) {
1175
+ product$1.configurableAttributes.forEach(function (attribute) {
2472
1176
  if (!selectableAttributes[attribute.code].length) {
2473
1177
  selectableAttributes[attribute.code] = getSelectableAttributesFromVariants(selectableAttributes, matchedVariants, attribute.code);
2474
1178
  }
2475
- }));
1179
+ });
2476
1180
  return selectableAttributes;
2477
- })); })).memoized;
1181
+ }); }).memoized;
2478
1182
  return {
2479
1183
  selectAllConfigurableProductAttributes: selectAllConfigurableProductAttributes,
2480
1184
  selectAllConfigurableProductVariants: selectAllConfigurableProductVariants,
@@ -2492,295 +1196,108 @@
2492
1196
  selectMatchingConfigurableProductVariants: selectMatchingConfigurableProductVariants,
2493
1197
  selectSelectableConfigurableProductAttributes: selectSelectableConfigurableProductAttributes,
2494
1198
  };
2495
- });
1199
+ };
2496
1200
  var ɵ0$9 = createConfigurableProductSelectors;
2497
- /**
2498
- * @param {?} selectableAttributes
2499
- * @param {?} variants
2500
- * @param {?} code
2501
- * @return {?}
2502
- */
2503
1201
  function getSelectableAttributesFromVariants(selectableAttributes, variants, code) {
2504
- return variants.reduce(( /**
2505
- * @param {?} selectedAttributes
2506
- * @param {?} variant
2507
- * @return {?}
2508
- */function (selectedAttributes, variant) { return isVariantAttributeMarkedAsSelectable(selectedAttributes, variant.appliedAttributes[code])
1202
+ return variants.reduce(function (selectedAttributes, variant) { return isVariantAttributeMarkedAsSelectable(selectedAttributes, variant.appliedAttributes[code])
2509
1203
  ? selectedAttributes
2510
1204
  : __spread(selectedAttributes, [
2511
1205
  variant.appliedAttributes[code],
2512
- ]); }), selectableAttributes[code]);
1206
+ ]); }, selectableAttributes[code]);
2513
1207
  }
2514
- var ɵ1$5 = /**
2515
- * @return {?}
2516
- */ function () {
2517
- /** @type {?} */
1208
+ var ɵ1$5 = function () {
2518
1209
  var cache;
2519
- return ( /**
2520
- * @return {?}
2521
- */function () { return cache = cache
1210
+ return function () { return cache = cache
2522
1211
  ? cache
2523
- : createConfigurableProductSelectors(); });
1212
+ : createConfigurableProductSelectors(); };
2524
1213
  };
2525
1214
  /**
2526
1215
  * A function that returns all configurable product selectors.
2527
- * Returns {\@link DaffConfigurableProductMemoizedSelectors}.
1216
+ * Returns {@link DaffConfigurableProductMemoizedSelectors}.
2528
1217
  *
2529
- * @deprecated import from \@daffodil/configurable-product/state instead.
2530
- * @type {?}
2531
- */
2532
- var getDaffConfigurableProductSelectors = ((ɵ1$5))();
2533
- /**
2534
- * @param {?} appliedAttributes
2535
- * @param {?} variant
2536
- * @return {?}
1218
+ * @deprecated import from @daffodil/configurable-product/state instead.
2537
1219
  */
1220
+ var getDaffConfigurableProductSelectors = (ɵ1$5)();
2538
1221
  function isVariantAvailable(appliedAttributes, variant) {
2539
1222
  return variant.in_stock &&
2540
- appliedAttributes.reduce(( /**
2541
- * @param {?} acc
2542
- * @param {?} attribute
2543
- * @return {?}
2544
- */function (acc, attribute) { return acc && attribute.value === variant.appliedAttributes[attribute.code]; }), true);
1223
+ appliedAttributes.reduce(function (acc, attribute) { return acc && attribute.value === variant.appliedAttributes[attribute.code]; }, true);
2545
1224
  }
2546
- /**
2547
- * @param {?} prices
2548
- * @return {?}
2549
- */
2550
1225
  function getMinimumPrice(prices) {
2551
- return prices.reduce(( /**
2552
- * @param {?} acc
2553
- * @param {?} price
2554
- * @return {?}
2555
- */function (acc, price) { return price < acc ? price : acc; }), prices[0]);
1226
+ return prices.reduce(function (acc, price) { return price < acc ? price : acc; }, prices[0]);
2556
1227
  }
2557
- /**
2558
- * @param {?} prices
2559
- * @return {?}
2560
- */
2561
1228
  function getMaximumPrice(prices) {
2562
- return prices.reduce(( /**
2563
- * @param {?} acc
2564
- * @param {?} price
2565
- * @return {?}
2566
- */function (acc, price) { return price > acc ? price : acc; }), prices[0]);
1229
+ return prices.reduce(function (acc, price) { return price > acc ? price : acc; }, prices[0]);
2567
1230
  }
2568
- /**
2569
- * @param {?} attributes
2570
- * @return {?}
2571
- */
2572
1231
  function initializeSelectableAttributes(attributes) {
2573
- return attributes.reduce(( /**
2574
- * @param {?} acc
2575
- * @param {?} attribute
2576
- * @return {?}
2577
- */function (acc, attribute) {
1232
+ return attributes.reduce(function (acc, attribute) {
2578
1233
  var _b;
2579
1234
  return (Object.assign(Object.assign({}, acc), (_b = {}, _b[attribute.code] = [], _b)));
2580
- }), {});
1235
+ }, {});
2581
1236
  }
2582
- /**
2583
- * @param {?} attributeArray
2584
- * @param {?} variantValue
2585
- * @return {?}
2586
- */
2587
1237
  function isVariantAttributeMarkedAsSelectable(attributeArray, variantValue) {
2588
1238
  return attributeArray.indexOf(variantValue) > -1;
2589
1239
  }
2590
1240
 
2591
- /**
2592
- * @fileoverview added by tsickle
2593
- * Generated from: selectors/product-grid/product-grid.selectors.ts
2594
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2595
- */
2596
- /**
2597
- * An interface for selectors related to loading a grid of products.
2598
- * @record
2599
- * @template T
2600
- */
2601
- function DaffProductGridMemoizedSelectors() { }
2602
- if (false) {
2603
- /**
2604
- * Selects the redux state for the product grid feature area. Returns {\@link DaffProductGridReducerState}.
2605
- * @type {?}
2606
- */
2607
- DaffProductGridMemoizedSelectors.prototype.selectProductGridState;
2608
- /**
2609
- * Selects whether any product grid requests are loading.
2610
- * @type {?}
2611
- */
2612
- DaffProductGridMemoizedSelectors.prototype.selectProductGridLoadingState;
2613
- }
2614
- /** @type {?} */
2615
- var createProductGridSelectors = ( /**
2616
- * @template T
2617
- * @return {?}
2618
- */function () {
1241
+ var createProductGridSelectors = function () {
2619
1242
  var selectProductState = getDaffProductFeatureSelector().selectProductState;
2620
- /** @type {?} */
2621
- var selectProductGridState = i1.createSelector(selectProductState, ( /**
2622
- * @param {?} state
2623
- * @return {?}
2624
- */function (state) { return state.productGrid; }));
2625
- /** @type {?} */
2626
- var selectProductGridLoadingState = i1.createSelector(selectProductGridState, ( /**
2627
- * @param {?} state
2628
- * @return {?}
2629
- */function (state) { return state.loading; }));
1243
+ var selectProductGridState = i1.createSelector(selectProductState, function (state) { return state.productGrid; });
1244
+ var selectProductGridLoadingState = i1.createSelector(selectProductGridState, function (state) { return state.loading; });
2630
1245
  return {
2631
1246
  selectProductGridState: selectProductGridState,
2632
1247
  selectProductGridLoadingState: selectProductGridLoadingState,
2633
1248
  };
2634
- });
1249
+ };
2635
1250
  var ɵ0$a = createProductGridSelectors;
2636
- var ɵ1$6 = /**
2637
- * @return {?}
2638
- */ function () {
2639
- /** @type {?} */
1251
+ var ɵ1$6 = function () {
2640
1252
  var cache;
2641
- return ( /**
2642
- * @template T
2643
- * @return {?}
2644
- */function () { return cache = cache
1253
+ return function () { return cache = cache
2645
1254
  ? cache
2646
- : createProductGridSelectors(); });
1255
+ : createProductGridSelectors(); };
2647
1256
  };
2648
1257
  /**
2649
1258
  * A function that returns all selectors related to loading a grid of products.
2650
- * Returns {\@link DaffProductGridMemoizedSelectors}.
2651
- * @type {?}
1259
+ * Returns {@link DaffProductGridMemoizedSelectors}.
2652
1260
  */
2653
- var getDaffProductGridSelectors = ((ɵ1$6))();
1261
+ var getDaffProductGridSelectors = (ɵ1$6)();
2654
1262
 
2655
- /**
2656
- * @fileoverview added by tsickle
2657
- * Generated from: selectors/product/product.selectors.ts
2658
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2659
- */
2660
- /**
2661
- * An interface for selectors related to the current product page.
2662
- * @record
2663
- * @template T
2664
- */
2665
- function DaffProductPageMemoizedSelectors() { }
2666
- if (false) {
2667
- /**
2668
- * Selects the entire state object for the product page feature area.
2669
- * @type {?}
2670
- */
2671
- DaffProductPageMemoizedSelectors.prototype.selectCurrentProductState;
2672
- /**
2673
- * Selects the loading state of the current product.
2674
- * @type {?}
2675
- */
2676
- DaffProductPageMemoizedSelectors.prototype.selectCurrentProductLoadingState;
2677
- /**
2678
- * Selects the id of the current product.
2679
- * @type {?}
2680
- */
2681
- DaffProductPageMemoizedSelectors.prototype.selectCurrentProductId;
2682
- /**
2683
- * Selects the current product, which is the product loaded for a product page.
2684
- * @type {?}
2685
- */
2686
- DaffProductPageMemoizedSelectors.prototype.selectCurrentProduct;
2687
- }
2688
- /** @type {?} */
2689
- var createProductPageSelectors = ( /**
2690
- * @template T
2691
- * @return {?}
2692
- */function () {
1263
+ var createProductPageSelectors = function () {
2693
1264
  var selectProductState = getDaffProductFeatureSelector().selectProductState;
2694
- /** @type {?} */
2695
- var selectCurrentProductState = i1.createSelector(selectProductState, ( /**
2696
- * @param {?} state
2697
- * @return {?}
2698
- */function (state) { return state.product; }));
2699
- /** @type {?} */
2700
- var selectCurrentProductLoadingState = i1.createSelector(selectCurrentProductState, ( /**
2701
- * @param {?} state
2702
- * @return {?}
2703
- */function (state) { return state.loading; }));
2704
- /** @type {?} */
2705
- var selectCurrentProductId = i1.createSelector(selectCurrentProductState, ( /**
2706
- * @param {?} state
2707
- * @return {?}
2708
- */function (state) { return state.currentProductId; }));
2709
- /** @type {?} */
2710
- var selectCurrentProduct = i1.createSelector(selectProductState, selectCurrentProductId, ( /**
2711
- * @param {?} state
2712
- * @param {?} id
2713
- * @return {?}
2714
- */function (state, id) { return state.products.entities[id]; }));
1265
+ var selectCurrentProductState = i1.createSelector(selectProductState, function (state) { return state.product; });
1266
+ var selectCurrentProductLoadingState = i1.createSelector(selectCurrentProductState, function (state) { return state.loading; });
1267
+ var selectCurrentProductId = i1.createSelector(selectCurrentProductState, function (state) { return state.currentProductId; });
1268
+ var selectCurrentProduct = i1.createSelector(selectProductState, selectCurrentProductId, function (state, id) { return state.products.entities[id]; });
2715
1269
  return {
2716
1270
  selectCurrentProductState: selectCurrentProductState,
2717
1271
  selectCurrentProductLoadingState: selectCurrentProductLoadingState,
2718
1272
  selectCurrentProductId: selectCurrentProductId,
2719
1273
  selectCurrentProduct: selectCurrentProduct,
2720
1274
  };
2721
- });
1275
+ };
2722
1276
  var ɵ0$b = createProductPageSelectors;
2723
- var ɵ1$7 = /**
2724
- * @return {?}
2725
- */ function () {
2726
- /** @type {?} */
1277
+ var ɵ1$7 = function () {
2727
1278
  var cache;
2728
- return ( /**
2729
- * @template T
2730
- * @return {?}
2731
- */function () { return cache = cache
1279
+ return function () { return cache = cache
2732
1280
  ? cache
2733
- : createProductPageSelectors(); });
1281
+ : createProductPageSelectors(); };
2734
1282
  };
2735
1283
  /**
2736
1284
  * A function that returns all selectors related to the product page.
2737
- * Returns {\@link DaffProductPageMemoizedSelectors}.
2738
- * @type {?}
1285
+ * Returns {@link DaffProductPageMemoizedSelectors}.
2739
1286
  */
2740
- var getDaffProductPageSelectors = ((ɵ1$7))();
1287
+ var getDaffProductPageSelectors = (ɵ1$7)();
2741
1288
 
2742
- /**
2743
- * @fileoverview added by tsickle
2744
- * Generated from: selectors/all-selectors.selectors.ts
2745
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2746
- */
2747
- /**
2748
- * An interface for all selectors in the entire product feature area.
2749
- * @record
2750
- * @template T
2751
- */
2752
- function DaffProductAllSelectors() { }
2753
1289
  /**
2754
1290
  * A function that returns all selectors in the entire product feature area.
2755
- * Returns {\@link DaffProductAllSelectors}.
2756
- * @type {?}
2757
- */
2758
- var getDaffProductSelectors = ( /**
2759
- * @template T
2760
- * @return {?}
2761
- */function () { return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, getDaffBestSellersSelectors()), getDaffProductPageSelectors()), getDaffProductGridSelectors()), getDaffProductEntitiesSelectors()), getDaffProductFeatureSelector()), getDaffConfigurableProductEntitiesSelectors()), getDaffConfigurableProductSelectors()), getDaffCompositeProductEntitiesSelectors()), getDaffCompositeProductSelectors())); });
2762
-
2763
- /**
2764
- * @fileoverview added by tsickle
2765
- * Generated from: selectors/public_api.ts
2766
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1291
+ * Returns {@link DaffProductAllSelectors}.
2767
1292
  */
1293
+ var getDaffProductSelectors = function () { return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, getDaffBestSellersSelectors()), getDaffProductPageSelectors()), getDaffProductGridSelectors()), getDaffProductEntitiesSelectors()), getDaffProductFeatureSelector()), getDaffConfigurableProductEntitiesSelectors()), getDaffConfigurableProductSelectors()), getDaffCompositeProductEntitiesSelectors()), getDaffCompositeProductSelectors())); };
2768
1294
 
2769
- /**
2770
- * @fileoverview added by tsickle
2771
- * Generated from: facades/best-sellers/best-sellers.facade.ts
2772
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2773
- */
2774
1295
  /**
2775
1296
  * A facade for accessing best sellers state from an application component.
2776
1297
  *
2777
- * \@inheritdoc
2778
- * @template T
1298
+ * @inheritdoc
2779
1299
  */
2780
1300
  var DaffBestSellersFacade = /** @class */ (function () {
2781
- /**
2782
- * @param {?} store
2783
- */
2784
1301
  function DaffBestSellersFacade(store) {
2785
1302
  this.store = store;
2786
1303
  var _a = getDaffProductSelectors(), selectBestSellersProducts = _a.selectBestSellersProducts, selectBestSellersLoadingState = _a.selectBestSellersLoadingState;
@@ -2790,14 +1307,14 @@
2790
1307
  /**
2791
1308
  * Dispatches an action to the rxjs action stream.
2792
1309
  *
2793
- * @param {?} action
2794
- * @return {?}
1310
+ * @param action
2795
1311
  */
2796
1312
  DaffBestSellersFacade.prototype.dispatch = function (action) {
2797
1313
  this.store.dispatch(action);
2798
1314
  };
2799
1315
  return DaffBestSellersFacade;
2800
1316
  }());
1317
+ /** @nocollapse */ DaffBestSellersFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffBestSellersFacade_Factory() { return new DaffBestSellersFacade(i0.ɵɵinject(i1.Store)); }, token: DaffBestSellersFacade, providedIn: "root" });
2801
1318
  DaffBestSellersFacade.decorators = [
2802
1319
  { type: i0.Injectable, args: [{
2803
1320
  providedIn: 'root',
@@ -2807,109 +1324,48 @@
2807
1324
  DaffBestSellersFacade.ctorParameters = function () { return [
2808
1325
  { type: i1.Store }
2809
1326
  ]; };
2810
- /** @nocollapse */ DaffBestSellersFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffBestSellersFacade_Factory() { return new DaffBestSellersFacade(i0.ɵɵinject(i1.Store)); }, token: DaffBestSellersFacade, providedIn: "root" });
2811
- if (false) {
2812
- /**
2813
- * The loading state for getting best selling products.
2814
- * @type {?}
2815
- */
2816
- DaffBestSellersFacade.prototype.loading$;
2817
- /**
2818
- * Best selling products.
2819
- * @type {?}
2820
- */
2821
- DaffBestSellersFacade.prototype.bestSellers$;
2822
- /**
2823
- * @type {?}
2824
- * @private
2825
- */
2826
- DaffBestSellersFacade.prototype.store;
2827
- }
2828
1327
 
2829
- /**
2830
- * @fileoverview added by tsickle
2831
- * Generated from: facades/composite-product/composite-product.facade.ts
2832
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2833
- */
2834
1328
  /**
2835
1329
  * A facade for interacting with the composite product state.
2836
1330
  * Exposes many parts of the state for easy access and allows dispatching of actions.
2837
1331
  *
2838
- * \@inheritdoc
2839
- * @deprecated import from \@daffodil/composite-product/state instead.
2840
- * @template T
1332
+ * @inheritdoc
1333
+ * @deprecated import from @daffodil/composite-product/state instead.
2841
1334
  */
2842
1335
  var DaffCompositeProductFacade = /** @class */ (function () {
2843
- /**
2844
- * @param {?} store
2845
- */
2846
1336
  function DaffCompositeProductFacade(store) {
2847
1337
  this.store = store;
2848
1338
  this.selectors = getDaffProductSelectors();
2849
1339
  this.hasDiscount = product.productPriceRangeHasDiscount;
2850
1340
  this.hasPriceRange = product.productPriceRangeHasPriceRange;
2851
1341
  }
2852
- /**
2853
- * @param {?} id
2854
- * @param {?=} configuration
2855
- * @return {?}
2856
- */
2857
1342
  DaffCompositeProductFacade.prototype.getRequiredItemPricesForConfiguration = function (id, configuration) {
2858
1343
  return this.store.pipe(i1.select(this.selectors.selectCompositeProductRequiredItemPricesForConfiguration(id, configuration)));
2859
1344
  };
2860
- /**
2861
- * @param {?} id
2862
- * @param {?=} configuration
2863
- * @return {?}
2864
- */
2865
1345
  DaffCompositeProductFacade.prototype.getOptionalItemPricesForConfiguration = function (id, configuration) {
2866
1346
  return this.store.pipe(i1.select(this.selectors.selectCompositeProductOptionalItemPricesForConfiguration(id, configuration)));
2867
1347
  };
2868
- /**
2869
- * @param {?} id
2870
- * @return {?}
2871
- */
2872
1348
  DaffCompositeProductFacade.prototype.getPricesAsCurrentlyConfigured = function (id) {
2873
1349
  return this.store.pipe(i1.select(this.selectors.selectCompositeProductPricesAsCurrentlyConfigured(id)));
2874
1350
  };
2875
- /**
2876
- * @param {?} id
2877
- * @return {?}
2878
- */
2879
1351
  DaffCompositeProductFacade.prototype.getAppliedOptions = function (id) {
2880
1352
  return this.store.pipe(i1.select(this.selectors.selectCompositeProductAppliedOptions(id)));
2881
1353
  };
2882
- /**
2883
- * @param {?} id
2884
- * @return {?}
2885
- */
2886
1354
  DaffCompositeProductFacade.prototype.getDiscountAmount = function (id) {
2887
1355
  return this.store.pipe(i1.select(this.selectors.selectCompositeProductDiscountAmount(id)));
2888
1356
  };
2889
- /**
2890
- * @param {?} id
2891
- * @return {?}
2892
- */
2893
1357
  DaffCompositeProductFacade.prototype.getDiscountPercent = function (id) {
2894
1358
  return this.store.pipe(i1.select(this.selectors.selectCompositeProductDiscountPercent(id)));
2895
1359
  };
2896
- /**
2897
- * @param {?} id
2898
- * @param {?} item_id
2899
- * @return {?}
2900
- */
2901
1360
  DaffCompositeProductFacade.prototype.isItemRequired = function (id, item_id) {
2902
1361
  return this.store.pipe(i1.select(this.selectors.selectIsCompositeProductItemRequired(id, item_id)));
2903
1362
  };
2904
- /**
2905
- * @param {?} action
2906
- * @return {?}
2907
- */
2908
1363
  DaffCompositeProductFacade.prototype.dispatch = function (action) {
2909
1364
  this.store.dispatch(action);
2910
1365
  };
2911
1366
  return DaffCompositeProductFacade;
2912
1367
  }());
1368
+ /** @nocollapse */ DaffCompositeProductFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffCompositeProductFacade_Factory() { return new DaffCompositeProductFacade(i0.ɵɵinject(i1.Store)); }, token: DaffCompositeProductFacade, providedIn: "root" });
2913
1369
  DaffCompositeProductFacade.decorators = [
2914
1370
  { type: i0.Injectable, args: [{
2915
1371
  providedIn: 'root',
@@ -2919,142 +1375,64 @@
2919
1375
  DaffCompositeProductFacade.ctorParameters = function () { return [
2920
1376
  { type: i1.Store }
2921
1377
  ]; };
2922
- /** @nocollapse */ DaffCompositeProductFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffCompositeProductFacade_Factory() { return new DaffCompositeProductFacade(i0.ɵɵinject(i1.Store)); }, token: DaffCompositeProductFacade, providedIn: "root" });
2923
- if (false) {
2924
- /** @type {?} */
2925
- DaffCompositeProductFacade.prototype.selectors;
2926
- /** @type {?} */
2927
- DaffCompositeProductFacade.prototype.hasDiscount;
2928
- /** @type {?} */
2929
- DaffCompositeProductFacade.prototype.hasPriceRange;
2930
- /**
2931
- * @type {?}
2932
- * @private
2933
- */
2934
- DaffCompositeProductFacade.prototype.store;
2935
- }
2936
1378
 
2937
- /**
2938
- * @fileoverview added by tsickle
2939
- * Generated from: facades/configurable-product/configurable-product.facade.ts
2940
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2941
- */
2942
1379
  /**
2943
1380
  * A facade for interacting with the configurable product state.
2944
1381
  * Exposes many parts of the state for easy access and allows dispatching of actions.
2945
1382
  *
2946
- * \@inheritdoc
2947
- * @deprecated import from \@daffodil/configurable-product/state instead.
2948
- * @template T
1383
+ * @inheritdoc
1384
+ * @deprecated import from @daffodil/configurable-product/state instead.
2949
1385
  */
2950
1386
  var DaffConfigurableProductFacade = /** @class */ (function () {
2951
- /**
2952
- * @param {?} store
2953
- */
2954
1387
  function DaffConfigurableProductFacade(store) {
2955
1388
  this.store = store;
2956
1389
  this.selectors = getDaffProductSelectors();
2957
1390
  }
2958
- /**
2959
- * @param {?} id
2960
- * @return {?}
2961
- */
2962
1391
  DaffConfigurableProductFacade.prototype.getAllAttributes = function (id) {
2963
1392
  return this.store.pipe(i1.select(this.selectors.selectAllConfigurableProductAttributes(id)));
2964
1393
  };
2965
- /**
2966
- * @param {?} id
2967
- * @return {?}
2968
- */
2969
1394
  DaffConfigurableProductFacade.prototype.getAllVariants = function (id) {
2970
1395
  return this.store.pipe(i1.select(this.selectors.selectAllConfigurableProductVariants(id)));
2971
1396
  };
2972
- /**
2973
- * @param {?} id
2974
- * @return {?}
2975
- */
2976
1397
  DaffConfigurableProductFacade.prototype.getAppliedAttributes = function (id) {
2977
1398
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductAppliedAttributesAsDictionary(id)));
2978
1399
  };
2979
- /**
2980
- * @param {?} id
2981
- * @return {?}
2982
- */
2983
1400
  DaffConfigurableProductFacade.prototype.getMinimumPrice = function (id) {
2984
1401
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductMinimumPrice(id)));
2985
1402
  };
2986
- /**
2987
- * @param {?} id
2988
- * @return {?}
2989
- */
2990
1403
  DaffConfigurableProductFacade.prototype.getMaximumPrice = function (id) {
2991
1404
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductMaximumPrice(id)));
2992
1405
  };
2993
- /**
2994
- * @param {?} id
2995
- * @return {?}
2996
- */
2997
1406
  DaffConfigurableProductFacade.prototype.getMinimumDiscountedPrice = function (id) {
2998
1407
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductMinimumDiscountedPrice(id)));
2999
1408
  };
3000
- /**
3001
- * @param {?} id
3002
- * @return {?}
3003
- */
3004
1409
  DaffConfigurableProductFacade.prototype.getMaximumDiscountedPrice = function (id) {
3005
1410
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductMaximumDiscountedPrice(id)));
3006
1411
  };
3007
- /**
3008
- * @param {?} id
3009
- * @return {?}
3010
- */
3011
1412
  DaffConfigurableProductFacade.prototype.getMinimumPercentDiscount = function (id) {
3012
1413
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductMinimumPercentDiscount(id)));
3013
1414
  };
3014
- /**
3015
- * @param {?} id
3016
- * @return {?}
3017
- */
3018
1415
  DaffConfigurableProductFacade.prototype.getMaximumPercentDiscount = function (id) {
3019
1416
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductMaximumPercentDiscount(id)));
3020
1417
  };
3021
- /**
3022
- * @param {?} id
3023
- * @return {?}
3024
- */
3025
1418
  DaffConfigurableProductFacade.prototype.isPriceRanged = function (id) {
3026
1419
  return this.store.pipe(i1.select(this.selectors.isConfigurablePriceRanged(id)));
3027
1420
  };
3028
- /**
3029
- * @param {?} id
3030
- * @return {?}
3031
- */
3032
1421
  DaffConfigurableProductFacade.prototype.hasDiscount = function (id) {
3033
1422
  return this.store.pipe(i1.select(this.selectors.selectConfigurableProductHasDiscount(id)));
3034
1423
  };
3035
- /**
3036
- * @param {?} id
3037
- * @return {?}
3038
- */
3039
1424
  DaffConfigurableProductFacade.prototype.getSelectableAttributes = function (id) {
3040
1425
  return this.store.pipe(i1.select(this.selectors.selectSelectableConfigurableProductAttributes(id)));
3041
1426
  };
3042
- /**
3043
- * @param {?} id
3044
- * @return {?}
3045
- */
3046
1427
  DaffConfigurableProductFacade.prototype.getMatchingVariants = function (id) {
3047
1428
  return this.store.pipe(i1.select(this.selectors.selectMatchingConfigurableProductVariants(id)));
3048
1429
  };
3049
- /**
3050
- * @param {?} action
3051
- * @return {?}
3052
- */
3053
1430
  DaffConfigurableProductFacade.prototype.dispatch = function (action) {
3054
1431
  this.store.dispatch(action);
3055
1432
  };
3056
1433
  return DaffConfigurableProductFacade;
3057
1434
  }());
1435
+ /** @nocollapse */ DaffConfigurableProductFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffConfigurableProductFacade_Factory() { return new DaffConfigurableProductFacade(i0.ɵɵinject(i1.Store)); }, token: DaffConfigurableProductFacade, providedIn: "root" });
3058
1436
  DaffConfigurableProductFacade.decorators = [
3059
1437
  { type: i0.Injectable, args: [{
3060
1438
  providedIn: 'root',
@@ -3064,95 +1442,45 @@
3064
1442
  DaffConfigurableProductFacade.ctorParameters = function () { return [
3065
1443
  { type: i1.Store }
3066
1444
  ]; };
3067
- /** @nocollapse */ DaffConfigurableProductFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffConfigurableProductFacade_Factory() { return new DaffConfigurableProductFacade(i0.ɵɵinject(i1.Store)); }, token: DaffConfigurableProductFacade, providedIn: "root" });
3068
- if (false) {
3069
- /** @type {?} */
3070
- DaffConfigurableProductFacade.prototype.selectors;
3071
- /**
3072
- * @type {?}
3073
- * @private
3074
- */
3075
- DaffConfigurableProductFacade.prototype.store;
3076
- }
3077
1445
 
3078
- /**
3079
- * @fileoverview added by tsickle
3080
- * Generated from: facades/product/product.facade.ts
3081
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3082
- */
3083
1446
  /**
3084
1447
  * A facade for getting state about a particular product.
3085
1448
  *
3086
- * \@inheritdoc
3087
- * @template T
1449
+ * @inheritdoc
3088
1450
  */
3089
1451
  var DaffProductFacade = /** @class */ (function () {
3090
- /**
3091
- * @param {?} store
3092
- */
3093
1452
  function DaffProductFacade(store) {
3094
1453
  this.store = store;
3095
1454
  this.selectors = getDaffProductSelectors();
3096
1455
  this.loading$ = this.store.pipe(i1.select(this.selectors.selectCurrentProductLoadingState));
3097
1456
  }
3098
- /**
3099
- * @param {?} id
3100
- * @return {?}
3101
- */
3102
1457
  DaffProductFacade.prototype.getProduct = function (id) {
3103
1458
  return this.store.pipe(i1.select(this.selectors.selectProduct(id)));
3104
1459
  };
3105
- /**
3106
- * @param {?} id
3107
- * @return {?}
3108
- */
3109
1460
  DaffProductFacade.prototype.getPrice = function (id) {
3110
1461
  return this.store.pipe(i1.select(this.selectors.selectProductPrice(id)));
3111
1462
  };
3112
- /**
3113
- * @param {?} id
3114
- * @return {?}
3115
- */
3116
1463
  DaffProductFacade.prototype.hasDiscount = function (id) {
3117
1464
  return this.store.pipe(i1.select(this.selectors.selectProductHasDiscount(id)));
3118
1465
  };
3119
- /**
3120
- * @param {?} id
3121
- * @return {?}
3122
- */
3123
1466
  DaffProductFacade.prototype.getDiscountAmount = function (id) {
3124
1467
  return this.store.pipe(i1.select(this.selectors.selectProductDiscountAmount(id)));
3125
1468
  };
3126
- /**
3127
- * @param {?} id
3128
- * @return {?}
3129
- */
3130
1469
  DaffProductFacade.prototype.getDiscountedPrice = function (id) {
3131
1470
  return this.store.pipe(i1.select(this.selectors.selectProductDiscountedPrice(id)));
3132
1471
  };
3133
- /**
3134
- * @param {?} id
3135
- * @return {?}
3136
- */
3137
1472
  DaffProductFacade.prototype.getDiscountPercent = function (id) {
3138
1473
  return this.store.pipe(i1.select(this.selectors.selectProductDiscountPercent(id)));
3139
1474
  };
3140
- /**
3141
- * @param {?} id
3142
- * @return {?}
3143
- */
3144
1475
  DaffProductFacade.prototype.isOutOfStock = function (id) {
3145
1476
  return this.store.pipe(i1.select(this.selectors.selectIsProductOutOfStock(id)));
3146
1477
  };
3147
- /**
3148
- * @param {?} action
3149
- * @return {?}
3150
- */
3151
1478
  DaffProductFacade.prototype.dispatch = function (action) {
3152
1479
  this.store.dispatch(action);
3153
1480
  };
3154
1481
  return DaffProductFacade;
3155
1482
  }());
1483
+ /** @nocollapse */ DaffProductFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffProductFacade_Factory() { return new DaffProductFacade(i0.ɵɵinject(i1.Store)); }, token: DaffProductFacade, providedIn: "root" });
3156
1484
  DaffProductFacade.decorators = [
3157
1485
  { type: i0.Injectable, args: [{
3158
1486
  providedIn: 'root',
@@ -3162,52 +1490,25 @@
3162
1490
  DaffProductFacade.ctorParameters = function () { return [
3163
1491
  { type: i1.Store }
3164
1492
  ]; };
3165
- /** @nocollapse */ DaffProductFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffProductFacade_Factory() { return new DaffProductFacade(i0.ɵɵinject(i1.Store)); }, token: DaffProductFacade, providedIn: "root" });
3166
- if (false) {
3167
- /** @type {?} */
3168
- DaffProductFacade.prototype.loading$;
3169
- /**
3170
- * @type {?}
3171
- * @private
3172
- */
3173
- DaffProductFacade.prototype.selectors;
3174
- /**
3175
- * @type {?}
3176
- * @private
3177
- */
3178
- DaffProductFacade.prototype.store;
3179
- }
3180
1493
 
3181
- /**
3182
- * @fileoverview added by tsickle
3183
- * Generated from: facades/product-page/facade.ts
3184
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3185
- */
3186
1494
  /**
3187
1495
  * A facade for getting state about a particular product.
3188
1496
  *
3189
- * \@inheritdoc
3190
- * @template T
1497
+ * @inheritdoc
3191
1498
  */
3192
1499
  var DaffProductPageFacade = /** @class */ (function () {
3193
- /**
3194
- * @param {?} store
3195
- */
3196
1500
  function DaffProductPageFacade(store) {
3197
1501
  this.store = store;
3198
1502
  this.selectors = getDaffProductSelectors();
3199
1503
  this.loading$ = this.store.pipe(i1.select(this.selectors.selectCurrentProductLoadingState));
3200
1504
  this.product$ = this.store.pipe(i1.select(this.selectors.selectCurrentProduct));
3201
1505
  }
3202
- /**
3203
- * @param {?} action
3204
- * @return {?}
3205
- */
3206
1506
  DaffProductPageFacade.prototype.dispatch = function (action) {
3207
1507
  this.store.dispatch(action);
3208
1508
  };
3209
1509
  return DaffProductPageFacade;
3210
1510
  }());
1511
+ /** @nocollapse */ DaffProductPageFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffProductPageFacade_Factory() { return new DaffProductPageFacade(i0.ɵɵinject(i1.Store)); }, token: DaffProductPageFacade, providedIn: "root" });
3211
1512
  DaffProductPageFacade.decorators = [
3212
1513
  { type: i0.Injectable, args: [{
3213
1514
  providedIn: 'root',
@@ -3217,54 +1518,25 @@
3217
1518
  DaffProductPageFacade.ctorParameters = function () { return [
3218
1519
  { type: i1.Store }
3219
1520
  ]; };
3220
- /** @nocollapse */ DaffProductPageFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffProductPageFacade_Factory() { return new DaffProductPageFacade(i0.ɵɵinject(i1.Store)); }, token: DaffProductPageFacade, providedIn: "root" });
3221
- if (false) {
3222
- /** @type {?} */
3223
- DaffProductPageFacade.prototype.loading$;
3224
- /** @type {?} */
3225
- DaffProductPageFacade.prototype.product$;
3226
- /**
3227
- * @type {?}
3228
- * @private
3229
- */
3230
- DaffProductPageFacade.prototype.selectors;
3231
- /**
3232
- * @type {?}
3233
- * @private
3234
- */
3235
- DaffProductPageFacade.prototype.store;
3236
- }
3237
1521
 
3238
- /**
3239
- * @fileoverview added by tsickle
3240
- * Generated from: facades/product-grid/product-grid.facade.ts
3241
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3242
- */
3243
1522
  /**
3244
1523
  * A facade for accessing state for a list of products from an application component.
3245
1524
  *
3246
- * \@inheritdoc
3247
- * @template T
1525
+ * @inheritdoc
3248
1526
  */
3249
1527
  var DaffProductGridFacade = /** @class */ (function () {
3250
- /**
3251
- * @param {?} store
3252
- */
3253
1528
  function DaffProductGridFacade(store) {
3254
1529
  this.store = store;
3255
1530
  var _a = getDaffProductSelectors(), selectProductGridLoadingState = _a.selectProductGridLoadingState, selectAllProducts = _a.selectAllProducts;
3256
1531
  this.loading$ = this.store.pipe(i1.select(selectProductGridLoadingState));
3257
1532
  this.products$ = this.store.pipe(i1.select(selectAllProducts));
3258
1533
  }
3259
- /**
3260
- * @param {?} action
3261
- * @return {?}
3262
- */
3263
1534
  DaffProductGridFacade.prototype.dispatch = function (action) {
3264
1535
  this.store.dispatch(action);
3265
1536
  };
3266
1537
  return DaffProductGridFacade;
3267
1538
  }());
1539
+ /** @nocollapse */ DaffProductGridFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffProductGridFacade_Factory() { return new DaffProductGridFacade(i0.ɵɵinject(i1.Store)); }, token: DaffProductGridFacade, providedIn: "root" });
3268
1540
  DaffProductGridFacade.decorators = [
3269
1541
  { type: i0.Injectable, args: [{
3270
1542
  providedIn: 'root',
@@ -3274,108 +1546,60 @@
3274
1546
  DaffProductGridFacade.ctorParameters = function () { return [
3275
1547
  { type: i1.Store }
3276
1548
  ]; };
3277
- /** @nocollapse */ DaffProductGridFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffProductGridFacade_Factory() { return new DaffProductGridFacade(i0.ɵɵinject(i1.Store)); }, token: DaffProductGridFacade, providedIn: "root" });
3278
- if (false) {
3279
- /** @type {?} */
3280
- DaffProductGridFacade.prototype.loading$;
3281
- /** @type {?} */
3282
- DaffProductGridFacade.prototype.products$;
3283
- /**
3284
- * @type {?}
3285
- * @private
3286
- */
3287
- DaffProductGridFacade.prototype.store;
3288
- }
3289
1549
 
3290
- /**
3291
- * @fileoverview added by tsickle
3292
- * Generated from: facades/public_api.ts
3293
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3294
- */
3295
-
3296
- /**
3297
- * @fileoverview added by tsickle
3298
- * Generated from: reducers/best-sellers/best-sellers.reducer.ts
3299
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3300
- */
3301
- /** @type {?} */
3302
1550
  var initialState = {
3303
1551
  productIds: [],
3304
1552
  loading: false,
3305
1553
  errors: [],
3306
1554
  };
3307
- /** @type {?} */
3308
1555
  var resetState = Object.assign({}, initialState);
3309
1556
  /**
3310
1557
  * The default best sellers reducer provided by Daffodil.
3311
- * @template T
3312
- * @param {?=} state
3313
- * @param {?=} action
3314
- * @return {?}
3315
1558
  */
3316
1559
  function daffBestSellersReducer(state, action) {
3317
1560
  if (state === void 0) { state = initialState; }
3318
1561
  switch (action.type) {
3319
- case DaffBestSellersActionTypes.BestSellersLoadAction:
1562
+ case exports.DaffBestSellersActionTypes.BestSellersLoadAction:
3320
1563
  return Object.assign(Object.assign({}, state), { loading: true });
3321
- case DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
1564
+ case exports.DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
3322
1565
  return Object.assign(Object.assign({}, state), { loading: false, productIds: getIds(action.payload) });
3323
- case DaffBestSellersActionTypes.BestSellersLoadFailureAction:
1566
+ case exports.DaffBestSellersActionTypes.BestSellersLoadFailureAction:
3324
1567
  return Object.assign(Object.assign({}, state), { loading: false, errors: state.errors.concat(new Array(action.payload)) });
3325
- case DaffBestSellersActionTypes.BestSellersResetAction:
1568
+ case exports.DaffBestSellersActionTypes.BestSellersResetAction:
3326
1569
  return Object.assign({}, resetState);
3327
1570
  default:
3328
1571
  return state;
3329
1572
  }
3330
1573
  }
3331
- /**
3332
- * @template T
3333
- * @param {?} products
3334
- * @return {?}
3335
- */
3336
1574
  function getIds(products) {
3337
- /** @type {?} */
3338
1575
  var ids = new Array();
3339
- products.forEach(( /**
3340
- * @param {?} product
3341
- * @return {?}
3342
- */function (/**
3343
- * @param {?} product
3344
- * @return {?}
3345
- */ product) {
1576
+ products.forEach(function (product) {
3346
1577
  ids.push(product.id);
3347
- }));
1578
+ });
3348
1579
  return ids;
3349
1580
  }
3350
1581
 
3351
- /**
3352
- * @fileoverview added by tsickle
3353
- * Generated from: reducers/composite-product-entities/composite-product-entities.reducer.ts
3354
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3355
- */
3356
1582
  /**
3357
1583
  * Reducer function that catches actions and changes/overwrites composite product entities state.
3358
1584
  *
3359
- * @deprecated import from \@daffodil/composite-product/state instead.
3360
- * @template T, V
3361
- * @param {?=} state current State of the redux store
3362
- * @param {?=} action ProductGrid, BestSellers, Product, or Composite Product actions
3363
- * @return {?} Product entities state
1585
+ * @param state current State of the redux store
1586
+ * @param action ProductGrid, BestSellers, Product, or Composite Product actions
1587
+ * @returns Product entities state
3364
1588
  *
1589
+ * @deprecated import from @daffodil/composite-product/state instead.
3365
1590
  */
3366
1591
  function daffCompositeProductEntitiesReducer(state, action) {
3367
1592
  var _a;
3368
1593
  if (state === void 0) { state = daffCompositeProductAppliedOptionsEntitiesAdapter().getInitialState(); }
3369
- /** @type {?} */
3370
1594
  var adapter = daffCompositeProductAppliedOptionsEntitiesAdapter();
3371
1595
  switch (action.type) {
3372
- case DaffProductGridActionTypes.ProductGridLoadSuccessAction:
3373
- case DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
3374
- return adapter.upsertMany(mapOptionsEntities(( /** @type {?} */(( /** @type {?} */(action.payload))))), state);
3375
- case DaffProductActionTypes.ProductLoadSuccessAction:
3376
- case DaffProductPageActionTypes.ProductPageLoadSuccessAction:
3377
- return adapter.upsertMany(mapOptionsEntities(( /** @type {?} */(( /** @type {?} */(action.payload.products))))), state);
3378
- case DaffCompositeProductActionTypes.CompositeProductApplyOptionAction:
1596
+ case exports.DaffProductGridActionTypes.ProductGridLoadSuccessAction:
1597
+ case exports.DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
1598
+ return adapter.upsertMany(mapOptionsEntities(action.payload), state);
1599
+ case exports.DaffProductActionTypes.ProductLoadSuccessAction:
1600
+ case exports.DaffProductPageActionTypes.ProductPageLoadSuccessAction:
1601
+ return adapter.upsertMany(mapOptionsEntities(action.payload.products), state);
1602
+ case exports.DaffCompositeProductActionTypes.CompositeProductApplyOptionAction:
3379
1603
  return adapter.upsertOne({
3380
1604
  id: action.id,
3381
1605
  items: Object.assign(Object.assign({}, state.entities[action.id].items), (_a = {}, _a[action.itemId] = {
@@ -3387,41 +1611,17 @@
3387
1611
  return state;
3388
1612
  }
3389
1613
  }
3390
- /**
3391
- * @param {?} products
3392
- * @return {?}
3393
- */
3394
1614
  function mapOptionsEntities(products) {
3395
- return products.filter(( /**
3396
- * @param {?} product
3397
- * @return {?}
3398
- */function (/**
3399
- * @param {?} product
3400
- * @return {?}
3401
- */ product$1) { return product$1.type === product.DaffProductTypeEnum.Composite; }))
3402
- .map(( /**
3403
- * @param {?} product
3404
- * @return {?}
3405
- */function (/**
3406
- * @param {?} product
3407
- * @return {?}
3408
- */ product) { return buildCompositeProductAppliedOptionsEntity(product); }));
1615
+ return products.filter(function (product$1) { return product$1.type === product.DaffProductTypeEnum.Composite; })
1616
+ .map(function (product) { return buildCompositeProductAppliedOptionsEntity(product); });
3409
1617
  }
3410
- /**
3411
- * @param {?} product
3412
- * @return {?}
3413
- */
3414
1618
  function buildCompositeProductAppliedOptionsEntity(product) {
3415
1619
  return {
3416
1620
  id: product.id,
3417
- items: product.items.reduce(( /**
3418
- * @param {?} acc
3419
- * @param {?} item
3420
- * @return {?}
3421
- */function (acc, item) {
1621
+ items: product.items.reduce(function (acc, item) {
3422
1622
  var _a;
3423
1623
  return (Object.assign(Object.assign({}, acc), (_a = {}, _a[item.id] = getDefaultOption(item), _a)));
3424
- }), {}),
1624
+ }, {}),
3425
1625
  };
3426
1626
  }
3427
1627
  /**
@@ -3429,18 +1629,10 @@
3429
1629
  * Does not set a default option if a default is not specified.
3430
1630
  * Does not set a default option but does set a default qty if the default is out of stock.
3431
1631
  *
3432
- * @param {?} item a DaffCompositeProductItem
3433
- * @return {?}
1632
+ * @param item a DaffCompositeProductItem
3434
1633
  */
3435
1634
  function getDefaultOption(item) {
3436
- /** @type {?} */
3437
- var defaultOptionIndex = item.options.findIndex(( /**
3438
- * @param {?} option
3439
- * @return {?}
3440
- */function (/**
3441
- * @param {?} option
3442
- * @return {?}
3443
- */ option) { return option.is_default; }));
1635
+ var defaultOptionIndex = item.options.findIndex(function (option) { return option.is_default; });
3444
1636
  if (defaultOptionIndex > -1) {
3445
1637
  return {
3446
1638
  value: item.options[defaultOptionIndex].in_stock ? item.options[defaultOptionIndex].id : null,
@@ -3455,33 +1647,31 @@
3455
1647
  /**
3456
1648
  * Reducer function that catches actions and changes/overwrites product entities state.
3457
1649
  *
3458
- * @template T, V
3459
- * @param {?=} state current State of the redux store
3460
- * @param {?=} action ProductGrid, BestSellers, Product, or Configurable Product actions
3461
- * @return {?} Product entities state
1650
+ * @param state current State of the redux store
1651
+ * @param action ProductGrid, BestSellers, Product, or Configurable Product actions
1652
+ * @returns Product entities state
3462
1653
  */
3463
1654
  function daffConfigurableProductEntitiesReducer(state, action) {
3464
1655
  if (state === void 0) { state = daffConfigurableProductAppliedAttributesEntitiesAdapter().getInitialState(); }
3465
- /** @type {?} */
3466
1656
  var adapter = daffConfigurableProductAppliedAttributesEntitiesAdapter();
3467
1657
  switch (action.type) {
3468
- case DaffProductGridActionTypes.ProductGridLoadSuccessAction:
3469
- case DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
3470
- return adapter.upsertMany(mapEntities(( /** @type {?} */(( /** @type {?} */(action.payload))))), state);
3471
- case DaffProductActionTypes.ProductLoadSuccessAction:
3472
- case DaffProductPageActionTypes.ProductPageLoadSuccessAction:
3473
- return adapter.upsertMany(mapEntities(( /** @type {?} */(( /** @type {?} */(action.payload.products))))), state);
3474
- case DaffConfigurableProductActionTypes.ConfigurableProductApplyAttributeAction:
1658
+ case exports.DaffProductGridActionTypes.ProductGridLoadSuccessAction:
1659
+ case exports.DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
1660
+ return adapter.upsertMany(mapEntities(action.payload), state);
1661
+ case exports.DaffProductActionTypes.ProductLoadSuccessAction:
1662
+ case exports.DaffProductPageActionTypes.ProductPageLoadSuccessAction:
1663
+ return adapter.upsertMany(mapEntities(action.payload.products), state);
1664
+ case exports.DaffConfigurableProductActionTypes.ConfigurableProductApplyAttributeAction:
3475
1665
  return adapter.upsertOne({
3476
1666
  id: action.id,
3477
1667
  attributes: applyAttribute(state.entities[action.id].attributes, action.attributeId, action.attributeValue),
3478
1668
  }, state);
3479
- case DaffConfigurableProductActionTypes.ConfigurableProductRemoveAttributeAction:
1669
+ case exports.DaffConfigurableProductActionTypes.ConfigurableProductRemoveAttributeAction:
3480
1670
  return adapter.upsertOne({
3481
1671
  id: action.id,
3482
1672
  attributes: removeAttribute(state.entities[action.id].attributes, action.attributeId),
3483
1673
  }, state);
3484
- case DaffConfigurableProductActionTypes.ConfigurableProductToggleAttributeAction:
1674
+ case exports.DaffConfigurableProductActionTypes.ConfigurableProductToggleAttributeAction:
3485
1675
  return adapter.upsertOne({
3486
1676
  id: action.id,
3487
1677
  attributes: isAttributeSelected(state.entities[action.id].attributes, action.attributeId, action.attributeValue) ?
@@ -3492,52 +1682,18 @@
3492
1682
  return state;
3493
1683
  }
3494
1684
  }
3495
- /**
3496
- * @param {?} products
3497
- * @return {?}
3498
- */
3499
1685
  function mapEntities(products) {
3500
- return products.filter(( /**
3501
- * @param {?} product
3502
- * @return {?}
3503
- */function (/**
3504
- * @param {?} product
3505
- * @return {?}
3506
- */ product$1) { return product$1.type === product.DaffProductTypeEnum.Configurable; }))
3507
- .map(( /**
3508
- * @param {?} product
3509
- * @return {?}
3510
- */function (/**
3511
- * @param {?} product
3512
- * @return {?}
3513
- */ product) { return buildConfigurableProductAppliedAttributesEntity(product); }));
1686
+ return products.filter(function (product$1) { return product$1.type === product.DaffProductTypeEnum.Configurable; })
1687
+ .map(function (product) { return buildConfigurableProductAppliedAttributesEntity(product); });
3514
1688
  }
3515
- /**
3516
- * @param {?} product
3517
- * @return {?}
3518
- */
3519
1689
  function buildConfigurableProductAppliedAttributesEntity(product) {
3520
1690
  return {
3521
1691
  id: product.id,
3522
1692
  attributes: [],
3523
1693
  };
3524
1694
  }
3525
- /**
3526
- * @param {?} currentAttributes
3527
- * @param {?} appliedAttributeCode
3528
- * @param {?} appliedAttributeValue
3529
- * @return {?}
3530
- */
3531
1695
  function applyAttribute(currentAttributes, appliedAttributeCode, appliedAttributeValue) {
3532
- /** @type {?} */
3533
- var attributeIndex = currentAttributes.findIndex(( /**
3534
- * @param {?} attribute
3535
- * @return {?}
3536
- */function (/**
3537
- * @param {?} attribute
3538
- * @return {?}
3539
- */ attribute) { return attribute.code === appliedAttributeCode; }));
3540
- /** @type {?} */
1696
+ var attributeIndex = currentAttributes.findIndex(function (attribute) { return attribute.code === appliedAttributeCode; });
3541
1697
  var retainedAttributes = attributeIndex > -1 ? currentAttributes.slice(0, attributeIndex) : currentAttributes;
3542
1698
  return __spread(retainedAttributes, [
3543
1699
  {
@@ -3546,80 +1702,42 @@
3546
1702
  },
3547
1703
  ]);
3548
1704
  }
3549
- /**
3550
- * @param {?} currentAttributes
3551
- * @param {?} appliedAttributeCode
3552
- * @return {?}
3553
- */
3554
1705
  function removeAttribute(currentAttributes, appliedAttributeCode) {
3555
- /** @type {?} */
3556
- var index = currentAttributes.findIndex(( /**
3557
- * @param {?} attribute
3558
- * @return {?}
3559
- */function (/**
3560
- * @param {?} attribute
3561
- * @return {?}
3562
- */ attribute) { return attribute.code === appliedAttributeCode; }));
1706
+ var index = currentAttributes.findIndex(function (attribute) { return attribute.code === appliedAttributeCode; });
3563
1707
  return index > -1 ? currentAttributes.slice(0, index) : currentAttributes;
3564
1708
  }
3565
- /**
3566
- * @param {?} currentAttributes
3567
- * @param {?} attributeCode
3568
- * @param {?} attributeValue
3569
- * @return {?}
3570
- */
3571
1709
  function isAttributeSelected(currentAttributes, attributeCode, attributeValue) {
3572
- /** @type {?} */
3573
- var index = currentAttributes.findIndex(( /**
3574
- * @param {?} attribute
3575
- * @return {?}
3576
- */function (/**
3577
- * @param {?} attribute
3578
- * @return {?}
3579
- */ attribute) { return attribute.code === attributeCode; }));
1710
+ var index = currentAttributes.findIndex(function (attribute) { return attribute.code === attributeCode; });
3580
1711
  return index > -1 && currentAttributes[index].value === attributeValue;
3581
1712
  }
3582
1713
 
3583
- /**
3584
- * @fileoverview added by tsickle
3585
- * Generated from: reducers/product-entities/product-entities.reducer.ts
3586
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3587
- */
3588
1714
  /**
3589
1715
  * Reducer function that catches actions and changes/overwrites product entities state.
3590
1716
  *
3591
- * @template T
3592
- * @param {?=} state current State of the redux store
3593
- * @param {?=} action ProductGrid, BestSellers, or Product actions
3594
- * @return {?} Product entities state
1717
+ * @param state current State of the redux store
1718
+ * @param action ProductGrid, BestSellers, or Product actions
1719
+ * @returns Product entities state
3595
1720
  */
3596
1721
  function daffProductEntitiesReducer(state, action) {
3597
1722
  if (state === void 0) { state = daffProductEntitiesAdapter().getInitialState(); }
3598
- /** @type {?} */
3599
1723
  var adapter = daffProductEntitiesAdapter();
3600
1724
  switch (action.type) {
3601
- case DaffProductGridActionTypes.ProductGridLoadSuccessAction:
1725
+ case exports.DaffProductGridActionTypes.ProductGridLoadSuccessAction:
3602
1726
  return adapter.upsertMany(action.payload, state);
3603
- case DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
1727
+ case exports.DaffBestSellersActionTypes.BestSellersLoadSuccessAction:
3604
1728
  return adapter.upsertMany(action.payload, state);
3605
- case DaffProductPageActionTypes.ProductPageLoadSuccessAction:
3606
- case DaffProductActionTypes.ProductLoadSuccessAction:
1729
+ case exports.DaffProductPageActionTypes.ProductPageLoadSuccessAction:
1730
+ case exports.DaffProductActionTypes.ProductLoadSuccessAction:
3607
1731
  return adapter.upsertMany(action.payload.products, state);
3608
- case DaffProductGridActionTypes.ProductGridResetAction:
1732
+ case exports.DaffProductGridActionTypes.ProductGridResetAction:
3609
1733
  return adapter.removeAll(state);
3610
1734
  default:
3611
1735
  return state;
3612
1736
  }
3613
1737
  }
3614
1738
 
3615
- /**
3616
- * @fileoverview added by tsickle
3617
- * Generated from: reducers/product-grid/product-grid.reducer.ts
3618
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3619
- */
3620
1739
  /**
3621
1740
  * Initial values of the product grid state.
3622
- * @type {?}
3623
1741
  */
3624
1742
  var initialState$1 = {
3625
1743
  products: [],
@@ -3629,33 +1747,26 @@
3629
1747
  /**
3630
1748
  * Reducer function that catches actions and changes/overwrites product grid state.
3631
1749
  *
3632
- * @template T
3633
- * @param {?=} state current State of the redux store
3634
- * @param {?=} action a product grid action
3635
- * @return {?} Product grid state
1750
+ * @param state current State of the redux store
1751
+ * @param action a product grid action
1752
+ * @returns Product grid state
3636
1753
  */
3637
1754
  function daffProductGridReducer(state, action) {
3638
1755
  if (state === void 0) { state = initialState$1; }
3639
1756
  switch (action.type) {
3640
- case DaffProductGridActionTypes.ProductGridLoadAction:
1757
+ case exports.DaffProductGridActionTypes.ProductGridLoadAction:
3641
1758
  return Object.assign(Object.assign({}, state), { loading: true });
3642
- case DaffProductGridActionTypes.ProductGridLoadSuccessAction:
1759
+ case exports.DaffProductGridActionTypes.ProductGridLoadSuccessAction:
3643
1760
  return Object.assign(Object.assign({}, state), { loading: false });
3644
- case DaffProductGridActionTypes.ProductGridLoadFailureAction:
1761
+ case exports.DaffProductGridActionTypes.ProductGridLoadFailureAction:
3645
1762
  return Object.assign(Object.assign({}, state), { loading: false, errors: state.errors.concat(new Array(action.payload)) });
3646
1763
  default:
3647
1764
  return state;
3648
1765
  }
3649
1766
  }
3650
1767
 
3651
- /**
3652
- * @fileoverview added by tsickle
3653
- * Generated from: reducers/product/product.reducer.ts
3654
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3655
- */
3656
1768
  /**
3657
1769
  * Initial values of the product state.
3658
- * @type {?}
3659
1770
  */
3660
1771
  var initialState$2 = {
3661
1772
  currentProductId: null,
@@ -3666,36 +1777,29 @@
3666
1777
  /**
3667
1778
  * Reducer function that catches actions and changes/overwrites product state.
3668
1779
  *
3669
- * @template T
3670
- * @param {?=} state current State of the redux store
3671
- * @param {?=} action a product action
3672
- * @return {?} product state
1780
+ * @param state current State of the redux store
1781
+ * @param action a product action
1782
+ * @returns product state
3673
1783
  */
3674
1784
  function daffProductReducer(state, action) {
3675
1785
  if (state === void 0) { state = initialState$2; }
3676
1786
  switch (action.type) {
3677
- case DaffProductPageActionTypes.ProductPageLoadAction:
3678
- case DaffProductPageActionTypes.ProductPageLoadByUrlAction:
1787
+ case exports.DaffProductPageActionTypes.ProductPageLoadAction:
1788
+ case exports.DaffProductPageActionTypes.ProductPageLoadByUrlAction:
3679
1789
  return Object.assign(Object.assign({}, state), { loading: true, currentProductId: null });
3680
- case DaffProductPageActionTypes.ProductPageLoadSuccessAction:
1790
+ case exports.DaffProductPageActionTypes.ProductPageLoadSuccessAction:
3681
1791
  return Object.assign(Object.assign({}, state), { loading: false, currentProductId: action.payload.id });
3682
- case DaffProductPageActionTypes.ProductPageLoadFailureAction:
1792
+ case exports.DaffProductPageActionTypes.ProductPageLoadFailureAction:
3683
1793
  return Object.assign(Object.assign({}, state), { loading: false, errors: state.errors.concat(new Array(action.payload)) });
3684
- case DaffProductPageActionTypes.UpdateQtyAction:
1794
+ case exports.DaffProductPageActionTypes.UpdateQtyAction:
3685
1795
  return Object.assign(Object.assign({}, state), { qty: action.payload });
3686
1796
  default:
3687
1797
  return state;
3688
1798
  }
3689
1799
  }
3690
1800
 
3691
- /**
3692
- * @fileoverview added by tsickle
3693
- * Generated from: reducers/product-reducers.ts
3694
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3695
- */
3696
1801
  /**
3697
1802
  * Returns state values from all product related reducers.
3698
- * @type {?}
3699
1803
  */
3700
1804
  var daffProductReducers = {
3701
1805
  products: daffProductEntitiesReducer,
@@ -3706,20 +1810,12 @@
3706
1810
  compositeProductOptions: daffCompositeProductEntitiesReducer,
3707
1811
  };
3708
1812
 
3709
- /**
3710
- * @fileoverview added by tsickle
3711
- * Generated from: reducers/injection-tokens/meta.token.ts
3712
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3713
- */
3714
1813
  /**
3715
1814
  * A token to hold the injectable extra meta-reducers.
3716
1815
  *
3717
- * Prefer using {\@link daffProductProvideMetaReducers}.
3718
- * @type {?}
1816
+ * Prefer using {@link daffProductProvideMetaReducers}.
3719
1817
  */
3720
- var DAFF_PRODUCT_META_REDUCERS = new i0.InjectionToken('DAFF_PRODUCT_META_REDUCERS', { factory: ( /**
3721
- * @return {?}
3722
- */function () { return []; }) });
1818
+ var DAFF_PRODUCT_META_REDUCERS = new i0.InjectionToken('DAFF_PRODUCT_META_REDUCERS', { factory: function () { return []; } });
3723
1819
  /**
3724
1820
  * Provides additional meta-reducers that run after the standard Daffodil cart meta-reducers.
3725
1821
  *
@@ -3731,58 +1827,26 @@
3731
1827
  * )
3732
1828
  * ]
3733
1829
  * ```
3734
- * @template T
3735
- * @param {...?} metaReducers
3736
- * @return {?}
3737
1830
  */
3738
1831
  function daffProductProvideMetaReducers() {
3739
1832
  var metaReducers = [];
3740
1833
  for (var _i = 0; _i < arguments.length; _i++) {
3741
1834
  metaReducers[_i] = arguments[_i];
3742
1835
  }
3743
- return metaReducers.map(( /**
3744
- * @param {?} metaReducer
3745
- * @return {?}
3746
- */function (/**
3747
- * @param {?} metaReducer
3748
- * @return {?}
3749
- */ metaReducer) { return ({
1836
+ return metaReducers.map(function (metaReducer) { return ({
3750
1837
  provide: DAFF_PRODUCT_META_REDUCERS,
3751
1838
  useValue: metaReducer,
3752
1839
  multi: true,
3753
- }); }));
1840
+ }); });
3754
1841
  }
3755
1842
 
3756
- /**
3757
- * @fileoverview added by tsickle
3758
- * Generated from: reducers/injection-tokens/public_api.ts
3759
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3760
- */
3761
-
3762
- /**
3763
- * @fileoverview added by tsickle
3764
- * Generated from: reducers/public_api.ts
3765
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3766
- */
3767
-
3768
- /**
3769
- * @fileoverview added by tsickle
3770
- * Generated from: effects/product-page.effects.ts
3771
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3772
- */
3773
1843
  /**
3774
1844
  * Effects for handling product actions and for triggering corresponding service requests.
3775
1845
  *
3776
1846
  * @param action$ - Redux action object
3777
1847
  * @param driver - A product service driver
3778
- * @template T
3779
1848
  */
3780
1849
  var DaffProductPageEffects = /** @class */ (function () {
3781
- /**
3782
- * @param {?} actions$
3783
- * @param {?} driver
3784
- * @param {?} errorMatcher
3785
- */
3786
1850
  function DaffProductPageEffects(actions$, driver, errorMatcher) {
3787
1851
  var _this = this;
3788
1852
  this.actions$ = actions$;
@@ -3792,30 +1856,12 @@
3792
1856
  * Handles ProductPageLoadAction by making a service call for a product and returning a success or
3793
1857
  * failure action to the action stream.
3794
1858
  *
3795
- * @return An Observable of a ProductLoadAction
1859
+ * @returns An Observable of a ProductLoadAction
3796
1860
  */
3797
- this.load$ = this.actions$.pipe(effects.ofType(DaffProductPageActionTypes.ProductPageLoadAction), operators.switchMap(( /**
3798
- * @param {?} action
3799
- * @return {?}
3800
- */function (action) { return _this.driver.get(action.payload)
3801
- .pipe(operators.map(( /**
3802
- * @param {?} resp
3803
- * @return {?}
3804
- */function (resp) { return new DaffProductPageLoadSuccess(resp); })), operators.catchError(( /**
3805
- * @param {?} error
3806
- * @return {?}
3807
- */function (error) { return rxjs.of(new DaffProductPageLoadFailure(_this.errorMatcher(error))); }))); })));
3808
- this.loadByUrl$ = this.actions$.pipe(effects.ofType(DaffProductPageActionTypes.ProductPageLoadByUrlAction), operators.switchMap(( /**
3809
- * @param {?} action
3810
- * @return {?}
3811
- */function (action) { return _this.driver.getByUrl(action.payload)
3812
- .pipe(operators.map(( /**
3813
- * @param {?} resp
3814
- * @return {?}
3815
- */function (resp) { return new DaffProductPageLoadSuccess(resp); })), operators.catchError(( /**
3816
- * @param {?} error
3817
- * @return {?}
3818
- */function (error) { return rxjs.of(new DaffProductPageLoadFailure(_this.errorMatcher(error))); }))); })));
1861
+ this.load$ = this.actions$.pipe(effects.ofType(exports.DaffProductPageActionTypes.ProductPageLoadAction), operators.switchMap(function (action) { return _this.driver.get(action.payload)
1862
+ .pipe(operators.map(function (resp) { return new DaffProductPageLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffProductPageLoadFailure(_this.errorMatcher(error))); })); }));
1863
+ this.loadByUrl$ = this.actions$.pipe(effects.ofType(exports.DaffProductPageActionTypes.ProductPageLoadByUrlAction), operators.switchMap(function (action) { return _this.driver.getByUrl(action.payload)
1864
+ .pipe(operators.map(function (resp) { return new DaffProductPageLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffProductPageLoadFailure(_this.errorMatcher(error))); })); }));
3819
1865
  }
3820
1866
  return DaffProductPageEffects;
3821
1867
  }());
@@ -3836,58 +1882,18 @@
3836
1882
  effects.Effect(),
3837
1883
  __metadata("design:type", rxjs.Observable)
3838
1884
  ], DaffProductPageEffects.prototype, "loadByUrl$", void 0);
3839
- if (false) {
3840
- /**
3841
- * Handles ProductPageLoadAction by making a service call for a product and returning a success or
3842
- * failure action to the action stream.
3843
- *
3844
- * \@return An Observable of a ProductLoadAction
3845
- * @type {?}
3846
- */
3847
- DaffProductPageEffects.prototype.load$;
3848
- /** @type {?} */
3849
- DaffProductPageEffects.prototype.loadByUrl$;
3850
- /**
3851
- * @type {?}
3852
- * @private
3853
- */
3854
- DaffProductPageEffects.prototype.actions$;
3855
- /**
3856
- * @type {?}
3857
- * @private
3858
- */
3859
- DaffProductPageEffects.prototype.driver;
3860
- /**
3861
- * @type {?}
3862
- * @private
3863
- */
3864
- DaffProductPageEffects.prototype.errorMatcher;
3865
- }
3866
1885
 
3867
- /**
3868
- * @fileoverview added by tsickle
3869
- * Generated from: reducers/injection-tokens/config.token.ts
3870
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3871
- */
3872
1886
  /**
3873
1887
  * An internal token to hold the Daffodil product feature store config.
3874
1888
  *
3875
- * \@docs-private
3876
- * @type {?}
1889
+ * @docs-private
3877
1890
  */
3878
1891
  var DAFF_PRODUCT_STORE_CONFIG = new i0.InjectionToken('DAFF_PRODUCT_STORE_CONFIG', {
3879
- factory: ( /**
3880
- * @return {?}
3881
- */function () { return ({
1892
+ factory: function () { return ({
3882
1893
  metaReducers: i0.inject(DAFF_PRODUCT_META_REDUCERS),
3883
- }); }),
1894
+ }); },
3884
1895
  });
3885
1896
 
3886
- /**
3887
- * @fileoverview added by tsickle
3888
- * Generated from: product-state.module.ts
3889
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3890
- */
3891
1897
  /**
3892
1898
  * A module that provides the default reducers and effects for the product redux state.
3893
1899
  */
@@ -3911,44 +1917,25 @@
3911
1917
  ];
3912
1918
 
3913
1919
  /**
3914
- * @fileoverview added by tsickle
3915
- * Generated from: public_api.ts
3916
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3917
- */
3918
-
3919
- /**
3920
- * @fileoverview added by tsickle
3921
- * Generated from: index.ts
3922
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3923
- */
3924
-
3925
- /**
3926
- * @fileoverview added by tsickle
3927
- * Generated from: daffodil-product-state.ts
3928
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1920
+ * Generated bundle index. Do not edit.
3929
1921
  */
3930
1922
 
3931
1923
  exports.DAFF_PRODUCT_META_REDUCERS = DAFF_PRODUCT_META_REDUCERS;
3932
1924
  exports.DAFF_PRODUCT_STORE_FEATURE_KEY = DAFF_PRODUCT_STORE_FEATURE_KEY;
3933
- exports.DaffBestSellersActionTypes = DaffBestSellersActionTypes;
3934
1925
  exports.DaffBestSellersEffects = DaffBestSellersEffects;
3935
1926
  exports.DaffBestSellersFacade = DaffBestSellersFacade;
3936
1927
  exports.DaffBestSellersLoad = DaffBestSellersLoad;
3937
1928
  exports.DaffBestSellersLoadFailure = DaffBestSellersLoadFailure;
3938
1929
  exports.DaffBestSellersLoadSuccess = DaffBestSellersLoadSuccess;
3939
1930
  exports.DaffBestSellersReset = DaffBestSellersReset;
3940
- exports.DaffCompositeProductActionTypes = DaffCompositeProductActionTypes;
3941
1931
  exports.DaffCompositeProductApplyOption = DaffCompositeProductApplyOption;
3942
1932
  exports.DaffCompositeProductFacade = DaffCompositeProductFacade;
3943
- exports.DaffConfigurableProductActionTypes = DaffConfigurableProductActionTypes;
3944
1933
  exports.DaffConfigurableProductApplyAttribute = DaffConfigurableProductApplyAttribute;
3945
1934
  exports.DaffConfigurableProductFacade = DaffConfigurableProductFacade;
3946
1935
  exports.DaffConfigurableProductRemoveAttribute = DaffConfigurableProductRemoveAttribute;
3947
1936
  exports.DaffConfigurableProductToggleAttribute = DaffConfigurableProductToggleAttribute;
3948
- exports.DaffProductActionTypes = DaffProductActionTypes;
3949
1937
  exports.DaffProductEffects = DaffProductEffects;
3950
1938
  exports.DaffProductFacade = DaffProductFacade;
3951
- exports.DaffProductGridActionTypes = DaffProductGridActionTypes;
3952
1939
  exports.DaffProductGridEffects = DaffProductGridEffects;
3953
1940
  exports.DaffProductGridFacade = DaffProductGridFacade;
3954
1941
  exports.DaffProductGridLoad = DaffProductGridLoad;
@@ -3958,7 +1945,6 @@
3958
1945
  exports.DaffProductLoad = DaffProductLoad;
3959
1946
  exports.DaffProductLoadFailure = DaffProductLoadFailure;
3960
1947
  exports.DaffProductLoadSuccess = DaffProductLoadSuccess;
3961
- exports.DaffProductPageActionTypes = DaffProductPageActionTypes;
3962
1948
  exports.DaffProductPageFacade = DaffProductPageFacade;
3963
1949
  exports.DaffProductPageLoad = DaffProductPageLoad;
3964
1950
  exports.DaffProductPageLoadByUrl = DaffProductPageLoadByUrl;
@@ -3983,6 +1969,8 @@
3983
1969
  exports.getDaffProductGridSelectors = getDaffProductGridSelectors;
3984
1970
  exports.getDaffProductPageSelectors = getDaffProductPageSelectors;
3985
1971
  exports.getDaffProductSelectors = getDaffProductSelectors;
1972
+ exports.ɵ0 = ɵ0$3;
1973
+ exports.ɵ1 = ɵ1$1;
3986
1974
  exports.ɵa = daffConfigurableProductEntitiesReducer;
3987
1975
  exports.ɵb = daffCompositeProductEntitiesReducer;
3988
1976
  exports.ɵc = DAFF_PRODUCT_STORE_CONFIG;