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