@daffodil/cart 0.38.9 → 0.39.3

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 (430) hide show
  1. package/bundles/daffodil-cart-driver-in-memory.umd.js +111 -1202
  2. package/bundles/daffodil-cart-driver-in-memory.umd.js.map +1 -1
  3. package/bundles/daffodil-cart-driver-in-memory.umd.min.js +1 -1
  4. package/bundles/daffodil-cart-driver-in-memory.umd.min.js.map +1 -1
  5. package/bundles/daffodil-cart-driver-magento-testing.umd.js +12 -177
  6. package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +1 -1
  7. package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +1 -1
  8. package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +1 -1
  9. package/bundles/daffodil-cart-driver-magento.umd.js +164 -1661
  10. package/bundles/daffodil-cart-driver-magento.umd.js.map +1 -1
  11. package/bundles/daffodil-cart-driver-magento.umd.min.js +1 -1
  12. package/bundles/daffodil-cart-driver-magento.umd.min.js.map +1 -1
  13. package/bundles/daffodil-cart-driver-testing.umd.js +23 -375
  14. package/bundles/daffodil-cart-driver-testing.umd.js.map +1 -1
  15. package/bundles/daffodil-cart-driver-testing.umd.min.js +1 -1
  16. package/bundles/daffodil-cart-driver-testing.umd.min.js.map +1 -1
  17. package/bundles/daffodil-cart-driver.umd.js +29 -466
  18. package/bundles/daffodil-cart-driver.umd.js.map +1 -1
  19. package/bundles/daffodil-cart-driver.umd.min.js +16 -1
  20. package/bundles/daffodil-cart-driver.umd.min.js.map +1 -1
  21. package/bundles/daffodil-cart-routing.umd.js +43 -518
  22. package/bundles/daffodil-cart-routing.umd.js.map +1 -1
  23. package/bundles/daffodil-cart-routing.umd.min.js +1 -1
  24. package/bundles/daffodil-cart-routing.umd.min.js.map +1 -1
  25. package/bundles/daffodil-cart-state-testing.umd.js +6 -241
  26. package/bundles/daffodil-cart-state-testing.umd.js.map +1 -1
  27. package/bundles/daffodil-cart-state-testing.umd.min.js +2 -2
  28. package/bundles/daffodil-cart-state-testing.umd.min.js.map +1 -1
  29. package/bundles/daffodil-cart-state.umd.js +656 -4198
  30. package/bundles/daffodil-cart-state.umd.js.map +1 -1
  31. package/bundles/daffodil-cart-state.umd.min.js +1 -1
  32. package/bundles/daffodil-cart-state.umd.min.js.map +1 -1
  33. package/bundles/daffodil-cart-testing.umd.js +13 -187
  34. package/bundles/daffodil-cart-testing.umd.js.map +1 -1
  35. package/bundles/daffodil-cart-testing.umd.min.js +1 -1
  36. package/bundles/daffodil-cart-testing.umd.min.js.map +1 -1
  37. package/bundles/daffodil-cart.umd.js +43 -271
  38. package/bundles/daffodil-cart.umd.js.map +1 -1
  39. package/bundles/daffodil-cart.umd.min.js +3 -2
  40. package/bundles/daffodil-cart.umd.min.js.map +1 -1
  41. package/driver/in-memory/package.json +1 -1
  42. package/driver/magento/package.json +1 -1
  43. package/driver/magento/testing/package.json +1 -1
  44. package/driver/package.json +1 -1
  45. package/driver/testing/package.json +1 -1
  46. package/esm2015/daffodil-cart.js +2 -7
  47. package/esm2015/driver/daffodil-cart-driver.js +2 -7
  48. package/esm2015/driver/errors/cart-not-found.js +1 -13
  49. package/esm2015/driver/errors/codes.enum.js +12 -18
  50. package/esm2015/driver/errors/expired-payment-token.js +1 -15
  51. package/esm2015/driver/errors/invalid-api-response.js +1 -15
  52. package/esm2015/driver/errors/invalid-country.js +1 -13
  53. package/esm2015/driver/errors/invalid-coupon-code.js +1 -16
  54. package/esm2015/driver/errors/invalid-region.js +1 -13
  55. package/esm2015/driver/errors/map.js +1 -7
  56. package/esm2015/driver/errors/product-not-found.js +1 -13
  57. package/esm2015/driver/errors/product-out-of-stock.js +1 -13
  58. package/esm2015/driver/errors/public_api.js +1 -6
  59. package/esm2015/driver/in-memory/backend/cart/cart.service.js +7 -65
  60. package/esm2015/driver/in-memory/backend/cart-address/cart-address.service.js +5 -39
  61. package/esm2015/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.js +7 -53
  62. package/esm2015/driver/in-memory/backend/cart-coupon/cart-coupon.service.js +10 -85
  63. package/esm2015/driver/in-memory/backend/cart-items/cart-items.service.js +21 -169
  64. package/esm2015/driver/in-memory/backend/cart-order/cart-order.service.js +5 -22
  65. package/esm2015/driver/in-memory/backend/cart-payment/cart-payment.service.js +9 -67
  66. package/esm2015/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.js +5 -27
  67. package/esm2015/driver/in-memory/backend/cart-root.service.js +4 -119
  68. package/esm2015/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.js +7 -53
  69. package/esm2015/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.js +9 -68
  70. package/esm2015/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.js +5 -38
  71. package/esm2015/driver/in-memory/backend/public_api.js +1 -6
  72. package/esm2015/driver/in-memory/daffodil-cart-driver-in-memory.js +2 -7
  73. package/esm2015/driver/in-memory/drivers/cart/cart.service.js +4 -48
  74. package/esm2015/driver/in-memory/drivers/cart-address/cart-address.service.js +3 -28
  75. package/esm2015/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.js +3 -32
  76. package/esm2015/driver/in-memory/drivers/cart-coupon/cart-coupon.service.js +3 -41
  77. package/esm2015/driver/in-memory/drivers/cart-driver.module.js +1 -9
  78. package/esm2015/driver/in-memory/drivers/cart-item/cart-item.service.js +3 -48
  79. package/esm2015/driver/in-memory/drivers/cart-order/cart-order.service.js +3 -28
  80. package/esm2015/driver/in-memory/drivers/cart-payment/cart-payment.service.js +3 -42
  81. package/esm2015/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -27
  82. package/esm2015/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -32
  83. package/esm2015/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -36
  84. package/esm2015/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -27
  85. package/esm2015/driver/in-memory/drivers/public_api.js +1 -6
  86. package/esm2015/driver/in-memory/index.js +2 -7
  87. package/esm2015/driver/in-memory/injection-tokens/extra-attributes-hook.token.js +2 -16
  88. package/esm2015/driver/in-memory/injection-tokens/public_api.js +1 -6
  89. package/esm2015/driver/in-memory/public_api.js +4 -9
  90. package/esm2015/driver/index.js +2 -7
  91. package/esm2015/driver/interfaces/cart-address-service.interface.js +1 -22
  92. package/esm2015/driver/interfaces/cart-billing-address-service.interface.js +1 -28
  93. package/esm2015/driver/interfaces/cart-coupon-service.interface.js +1 -41
  94. package/esm2015/driver/interfaces/cart-item-service.interface.js +1 -50
  95. package/esm2015/driver/interfaces/cart-order-service.interface.js +1 -22
  96. package/esm2015/driver/interfaces/cart-payment-methods-service.interface.js +1 -21
  97. package/esm2015/driver/interfaces/cart-payment-service.interface.js +1 -42
  98. package/esm2015/driver/interfaces/cart-service.interface.js +1 -42
  99. package/esm2015/driver/interfaces/cart-shipping-address-service.interface.js +1 -28
  100. package/esm2015/driver/interfaces/cart-shipping-information-service.interface.js +1 -36
  101. package/esm2015/driver/interfaces/cart-shipping-methods-service.interface.js +1 -21
  102. package/esm2015/driver/interfaces/public_api.js +1 -6
  103. package/esm2015/driver/magento/cart-address.service.js +5 -71
  104. package/esm2015/driver/magento/cart-billing-address.service.js +7 -93
  105. package/esm2015/driver/magento/cart-coupon.service.js +6 -75
  106. package/esm2015/driver/magento/cart-driver.module.js +1 -9
  107. package/esm2015/driver/magento/cart-item.service.js +10 -126
  108. package/esm2015/driver/magento/cart-order.service.js +5 -33
  109. package/esm2015/driver/magento/cart-payment-methods.service.js +4 -43
  110. package/esm2015/driver/magento/cart-payment.service.js +7 -115
  111. package/esm2015/driver/magento/cart-shipping-address.service.js +7 -93
  112. package/esm2015/driver/magento/cart-shipping-information.service.js +8 -87
  113. package/esm2015/driver/magento/cart-shipping-methods.service.js +4 -43
  114. package/esm2015/driver/magento/cart.service.js +6 -84
  115. package/esm2015/driver/magento/daffodil-cart-driver-magento.js +2 -7
  116. package/esm2015/driver/magento/errors/codes.js +6 -12
  117. package/esm2015/driver/magento/errors/map.js +1 -8
  118. package/esm2015/driver/magento/errors/transform.js +2 -19
  119. package/esm2015/driver/magento/index.js +2 -7
  120. package/esm2015/driver/magento/injection-tokens/cart-mutation-queue.token.js +2 -11
  121. package/esm2015/driver/magento/injection-tokens/fragments/cart.js +2 -11
  122. package/esm2015/driver/magento/injection-tokens/public_api.js +1 -6
  123. package/esm2015/driver/magento/models/public_api.js +3 -8
  124. package/esm2015/driver/magento/models/requests/billing-address.js +2 -20
  125. package/esm2015/driver/magento/models/requests/cart-address.js +2 -32
  126. package/esm2015/driver/magento/models/requests/cart-item-update.js +2 -16
  127. package/esm2015/driver/magento/models/requests/cart-item.js +2 -32
  128. package/esm2015/driver/magento/models/requests/payment-method.js +2 -16
  129. package/esm2015/driver/magento/models/requests/public_api.js +2 -7
  130. package/esm2015/driver/magento/models/requests/shipping-address.js +2 -18
  131. package/esm2015/driver/magento/models/requests/shipping-method.js +2 -16
  132. package/esm2015/driver/magento/models/responses/cart-address.js +2 -32
  133. package/esm2015/driver/magento/models/responses/cart-coupon.js +2 -14
  134. package/esm2015/driver/magento/models/responses/cart-item.js +7 -70
  135. package/esm2015/driver/magento/models/responses/cart-payment-method.js +2 -20
  136. package/esm2015/driver/magento/models/responses/cart-shipping-method.js +2 -22
  137. package/esm2015/driver/magento/models/responses/cart.js +2 -31
  138. package/esm2015/driver/magento/models/responses/public_api.js +2 -7
  139. package/esm2015/driver/magento/models/responses/shipping-address.js +2 -16
  140. package/esm2015/driver/magento/public_api.js +5 -10
  141. package/esm2015/driver/magento/queries/add-cart-item.js +3 -13
  142. package/esm2015/driver/magento/queries/apply-coupon.js +3 -13
  143. package/esm2015/driver/magento/queries/create-cart.js +1 -7
  144. package/esm2015/driver/magento/queries/fragments/available-payment-method.js +1 -7
  145. package/esm2015/driver/magento/queries/fragments/available-shipping-method.js +1 -7
  146. package/esm2015/driver/magento/queries/fragments/cart-address.js +1 -7
  147. package/esm2015/driver/magento/queries/fragments/cart-coupon.js +1 -7
  148. package/esm2015/driver/magento/queries/fragments/cart-item.js +1 -8
  149. package/esm2015/driver/magento/queries/fragments/cart-totals.js +1 -7
  150. package/esm2015/driver/magento/queries/fragments/cart.js +1 -7
  151. package/esm2015/driver/magento/queries/fragments/money.js +1 -7
  152. package/esm2015/driver/magento/queries/fragments/prices.js +1 -7
  153. package/esm2015/driver/magento/queries/fragments/public_api.js +1 -6
  154. package/esm2015/driver/magento/queries/fragments/selected-payment-method.js +1 -7
  155. package/esm2015/driver/magento/queries/fragments/selected-shipping-method.js +1 -7
  156. package/esm2015/driver/magento/queries/get-billing-address.js +3 -13
  157. package/esm2015/driver/magento/queries/get-cart.js +3 -13
  158. package/esm2015/driver/magento/queries/get-selected-payment-method.js +3 -13
  159. package/esm2015/driver/magento/queries/get-selected-shipping-method.js +3 -13
  160. package/esm2015/driver/magento/queries/get-shipping-address.js +3 -13
  161. package/esm2015/driver/magento/queries/list-cart-coupons.js +3 -13
  162. package/esm2015/driver/magento/queries/list-cart-items.js +3 -13
  163. package/esm2015/driver/magento/queries/list-payment-methods.js +3 -13
  164. package/esm2015/driver/magento/queries/list-shipping-methods.js +3 -13
  165. package/esm2015/driver/magento/queries/place-order.js +1 -7
  166. package/esm2015/driver/magento/queries/public_api.js +3 -8
  167. package/esm2015/driver/magento/queries/remove-all-coupons.js +3 -13
  168. package/esm2015/driver/magento/queries/remove-cart-item.js +3 -13
  169. package/esm2015/driver/magento/queries/responses/add-cart-item.js +2 -14
  170. package/esm2015/driver/magento/queries/responses/apply-coupon.js +2 -14
  171. package/esm2015/driver/magento/queries/responses/create-cart.js +2 -14
  172. package/esm2015/driver/magento/queries/responses/get-billing-address.js +2 -14
  173. package/esm2015/driver/magento/queries/responses/get-cart.js +2 -16
  174. package/esm2015/driver/magento/queries/responses/get-selected-payment-method.js +2 -14
  175. package/esm2015/driver/magento/queries/responses/get-selected-shipping-method.js +2 -14
  176. package/esm2015/driver/magento/queries/responses/get-shipping-address.js +2 -14
  177. package/esm2015/driver/magento/queries/responses/list-cart-coupons.js +2 -14
  178. package/esm2015/driver/magento/queries/responses/list-cart-items.js +2 -14
  179. package/esm2015/driver/magento/queries/responses/list-payment-methods.js +2 -14
  180. package/esm2015/driver/magento/queries/responses/list-shipping-methods.js +2 -14
  181. package/esm2015/driver/magento/queries/responses/place-order.js +2 -14
  182. package/esm2015/driver/magento/queries/responses/public_api.js +2 -7
  183. package/esm2015/driver/magento/queries/responses/remove-all-coupons.js +2 -14
  184. package/esm2015/driver/magento/queries/responses/remove-cart-item.js +2 -14
  185. package/esm2015/driver/magento/queries/responses/set-guest-email.js +2 -14
  186. package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing-and-email.js +2 -18
  187. package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing.js +2 -16
  188. package/esm2015/driver/magento/queries/responses/set-selected-payment-method.js +2 -14
  189. package/esm2015/driver/magento/queries/responses/set-selected-shipping-method.js +2 -14
  190. package/esm2015/driver/magento/queries/responses/update-address-with-email.js +2 -18
  191. package/esm2015/driver/magento/queries/responses/update-address.js +2 -16
  192. package/esm2015/driver/magento/queries/responses/update-billing-address-with-email.js +2 -16
  193. package/esm2015/driver/magento/queries/responses/update-billing-address.js +2 -14
  194. package/esm2015/driver/magento/queries/responses/update-cart-item.js +2 -14
  195. package/esm2015/driver/magento/queries/responses/update-shipping-address-with-email.js +2 -16
  196. package/esm2015/driver/magento/queries/responses/update-shipping-address.js +2 -14
  197. package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing-and-email.js +3 -13
  198. package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing.js +3 -13
  199. package/esm2015/driver/magento/queries/set-selected-payment-method.js +3 -13
  200. package/esm2015/driver/magento/queries/set-selected-shipping-method.js +3 -13
  201. package/esm2015/driver/magento/queries/update-address-with-email.js +3 -13
  202. package/esm2015/driver/magento/queries/update-address.js +3 -13
  203. package/esm2015/driver/magento/queries/update-billing-address-with-email.js +3 -13
  204. package/esm2015/driver/magento/queries/update-billing-address.js +3 -13
  205. package/esm2015/driver/magento/queries/update-cart-item.js +3 -13
  206. package/esm2015/driver/magento/queries/update-shipping-address-with-email.js +3 -13
  207. package/esm2015/driver/magento/queries/update-shipping-address.js +3 -13
  208. package/esm2015/driver/magento/testing/daffodil-cart-driver-magento-testing.js +2 -7
  209. package/esm2015/driver/magento/testing/factories/cart-address-input.factory.js +2 -29
  210. package/esm2015/driver/magento/testing/factories/cart-address.factory.js +2 -31
  211. package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +2 -11
  212. package/esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js +2 -13
  213. package/esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js +2 -32
  214. package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
  215. package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +2 -15
  216. package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +2 -23
  217. package/esm2015/driver/magento/testing/factories/cart.factory.js +2 -33
  218. package/esm2015/driver/magento/testing/factories/public_api.js +1 -6
  219. package/esm2015/driver/magento/testing/factories/shipping-address.factory.js +2 -15
  220. package/esm2015/driver/magento/testing/index.js +2 -7
  221. package/esm2015/driver/magento/testing/public_api.js +2 -7
  222. package/esm2015/driver/magento/transforms/inputs/billing-address.service.js +2 -21
  223. package/esm2015/driver/magento/transforms/inputs/cart-address.service.js +2 -11
  224. package/esm2015/driver/magento/transforms/inputs/cart-item-input-transformers.js +2 -23
  225. package/esm2015/driver/magento/transforms/inputs/cart-item-update.service.js +2 -11
  226. package/esm2015/driver/magento/transforms/inputs/payment-method.service.js +2 -11
  227. package/esm2015/driver/magento/transforms/inputs/shipping-address.service.js +2 -21
  228. package/esm2015/driver/magento/transforms/inputs/shipping-method.service.js +2 -11
  229. package/esm2015/driver/magento/transforms/outputs/billing-address.service.js +3 -19
  230. package/esm2015/driver/magento/transforms/outputs/cart-address.service.js +3 -9
  231. package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +3 -24
  232. package/esm2015/driver/magento/transforms/outputs/cart-coupon.js +1 -10
  233. package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +2 -12
  234. package/esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js +4 -10
  235. package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +2 -12
  236. package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +4 -14
  237. package/esm2015/driver/magento/transforms/outputs/cart-payment.service.js +3 -9
  238. package/esm2015/driver/magento/transforms/outputs/cart-shipping-information.service.js +6 -20
  239. package/esm2015/driver/magento/transforms/outputs/cart-shipping-rate.service.js +3 -9
  240. package/esm2015/driver/magento/transforms/outputs/cart-totals-transformer.js +4 -31
  241. package/esm2015/driver/magento/transforms/outputs/cart.service.js +5 -98
  242. package/esm2015/driver/magento/transforms/outputs/shipping-address.service.js +3 -19
  243. package/esm2015/driver/magento/transforms/public_api.js +1 -6
  244. package/esm2015/driver/public_api.js +3 -8
  245. package/esm2015/driver/testing/daffodil-cart-driver-testing.js +2 -7
  246. package/esm2015/driver/testing/drivers/cart/cart.service.js +3 -34
  247. package/esm2015/driver/testing/drivers/cart-address/cart-address.service.js +3 -29
  248. package/esm2015/driver/testing/drivers/cart-billing-address/cart-billing-address.service.js +3 -33
  249. package/esm2015/driver/testing/drivers/cart-coupon/cart-coupon.service.js +3 -42
  250. package/esm2015/driver/testing/drivers/cart-driver.module.js +1 -9
  251. package/esm2015/driver/testing/drivers/cart-item/cart-item.service.js +3 -49
  252. package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +3 -13
  253. package/esm2015/driver/testing/drivers/cart-payment/cart-payment.service.js +3 -43
  254. package/esm2015/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -22
  255. package/esm2015/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -33
  256. package/esm2015/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -37
  257. package/esm2015/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -22
  258. package/esm2015/driver/testing/drivers/public_api.js +1 -6
  259. package/esm2015/driver/testing/index.js +2 -7
  260. package/esm2015/driver/testing/public_api.js +2 -7
  261. package/esm2015/errors/codes.enum.js +10 -12
  262. package/esm2015/errors/map.js +1 -7
  263. package/esm2015/errors/public_api.js +2 -7
  264. package/esm2015/errors/resolution/cart-not-found-or-created-resolution.js +2 -14
  265. package/esm2015/errors/resolution/cart-resolution.js +2 -14
  266. package/esm2015/errors/resolution/cart-server-side-resolution.js +2 -14
  267. package/esm2015/errors/resolution/cart-storage-resolution.js +2 -14
  268. package/esm2015/errors/resolution/public_api.js +1 -6
  269. package/esm2015/index.js +2 -7
  270. package/esm2015/injection-tokens/error-matcher.token.js +2 -11
  271. package/esm2015/injection-tokens/payment-method-map.js +3 -12
  272. package/esm2015/injection-tokens/public_api.js +1 -6
  273. package/esm2015/models/cart-address.js +2 -23
  274. package/esm2015/models/cart-coupon.js +2 -31
  275. package/esm2015/models/cart-item-input.js +10 -93
  276. package/esm2015/models/cart-item.js +2 -88
  277. package/esm2015/models/cart-order-result.js +2 -29
  278. package/esm2015/models/cart-payment.js +2 -25
  279. package/esm2015/models/cart-shipping-info.js +2 -14
  280. package/esm2015/models/cart-shipping-rate.js +2 -43
  281. package/esm2015/models/cart-total.js +13 -41
  282. package/esm2015/models/cart.js +2 -76
  283. package/esm2015/models/composite-cart-item.js +2 -40
  284. package/esm2015/models/configurable-cart-item.js +2 -35
  285. package/esm2015/models/public_api.js +7 -12
  286. package/esm2015/public_api.js +4 -9
  287. package/esm2015/routing/cart-routing.module.js +2 -11
  288. package/esm2015/routing/config/config.js +4 -23
  289. package/esm2015/routing/config/resolution/config.js +1 -21
  290. package/esm2015/routing/daffodil-cart-routing.js +2 -7
  291. package/esm2015/routing/guards/billing-address/billing-address-guard-redirect.token.js +1 -7
  292. package/esm2015/routing/guards/billing-address/billing-address.guard.js +5 -39
  293. package/esm2015/routing/guards/cart-items/cart-items-guard-redirect.token.js +2 -8
  294. package/esm2015/routing/guards/cart-items/cart-items.guard.js +6 -44
  295. package/esm2015/routing/guards/order-result/order-result-guard-redirect.token.js +1 -7
  296. package/esm2015/routing/guards/order-result/order-result.guard.js +4 -38
  297. package/esm2015/routing/guards/payment-method/payment-method-guard-redirect.token.js +1 -7
  298. package/esm2015/routing/guards/payment-method/payment-method.guard.js +5 -39
  299. package/esm2015/routing/guards/public_api.js +1 -6
  300. package/esm2015/routing/guards/resolved-cart/resolved-cart.guard.js +7 -49
  301. package/esm2015/routing/guards/shipping-address/shipping-address-guard-redirect.token.js +1 -7
  302. package/esm2015/routing/guards/shipping-address/shipping-address.guard.js +5 -39
  303. package/esm2015/routing/guards/shipping-method/shipping-method-guard-redirect.token.js +1 -7
  304. package/esm2015/routing/guards/shipping-method/shipping-method.guard.js +5 -39
  305. package/esm2015/routing/index.js +2 -7
  306. package/esm2015/routing/public_api.js +3 -8
  307. package/esm2015/routing/resolvers/cart-resolver.service.js +5 -49
  308. package/esm2015/routing/resolvers/empty-cart-resolver.service.js +4 -42
  309. package/esm2015/routing/resolvers/public_api.js +1 -6
  310. package/esm2015/routing/resolvers/tokens/cart-resolver-redirect.token.js +1 -7
  311. package/esm2015/routing/resolvers/tokens/empty-cart-resolver-redirect.token.js +1 -7
  312. package/esm2015/state/actions/cart-address.actions.js +8 -40
  313. package/esm2015/state/actions/cart-billing-address.actions.js +11 -66
  314. package/esm2015/state/actions/cart-coupon.actions.js +17 -124
  315. package/esm2015/state/actions/cart-item.actions.js +22 -186
  316. package/esm2015/state/actions/cart-order.actions.js +8 -40
  317. package/esm2015/state/actions/cart-payment-methods.actions.js +8 -34
  318. package/esm2015/state/actions/cart-payment.actions.js +19 -133
  319. package/esm2015/state/actions/cart-shipping-address.actions.js +11 -66
  320. package/esm2015/state/actions/cart-shipping-information.actions.js +14 -100
  321. package/esm2015/state/actions/cart-shipping-methods.actions.js +8 -36
  322. package/esm2015/state/actions/cart.actions.js +22 -162
  323. package/esm2015/state/actions/public_api.js +12 -17
  324. package/esm2015/state/cart-state.module.js +1 -6
  325. package/esm2015/state/daffodil-cart-state.js +2 -7
  326. package/esm2015/state/effects/cart-address.effects.js +3 -60
  327. package/esm2015/state/effects/cart-billing-address.effects.js +3 -67
  328. package/esm2015/state/effects/cart-coupon.effects.js +9 -129
  329. package/esm2015/state/effects/cart-item.effects.js +6 -120
  330. package/esm2015/state/effects/cart-order.effects.js +3 -62
  331. package/esm2015/state/effects/cart-payment-methods.effects.js +2 -52
  332. package/esm2015/state/effects/cart-payment.effects.js +5 -93
  333. package/esm2015/state/effects/cart-resolver.effects.js +4 -80
  334. package/esm2015/state/effects/cart-shipping-address.effects.js +3 -67
  335. package/esm2015/state/effects/cart-shipping-information.effects.js +4 -82
  336. package/esm2015/state/effects/cart-shipping-methods.effects.js +2 -52
  337. package/esm2015/state/effects/cart.effects.js +9 -128
  338. package/esm2015/state/facades/cart/cart-facade.interface.js +2 -355
  339. package/esm2015/state/facades/cart/cart.facade.js +10 -275
  340. package/esm2015/state/index.js +2 -7
  341. package/esm2015/state/injection-tokens/cart-item-state-debounce-time.js +1 -7
  342. package/esm2015/state/injection-tokens/public_api.js +1 -6
  343. package/esm2015/state/models/public_api.js +4 -9
  344. package/esm2015/state/models/stateful-cart-item.js +9 -27
  345. package/esm2015/state/models/stateful-composite-cart-item.js +2 -10
  346. package/esm2015/state/models/stateful-configurable-cart-item.js +2 -10
  347. package/esm2015/state/public_api.js +6 -11
  348. package/esm2015/state/reducers/action-types.type.js +2 -6
  349. package/esm2015/state/reducers/cart/cart.reducer.js +1 -15
  350. package/esm2015/state/reducers/cart-billing-address/cart-billing-address.reducer.js +1 -15
  351. package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +1 -15
  352. package/esm2015/state/reducers/cart-initial-state.js +1 -7
  353. package/esm2015/state/reducers/cart-item/cart-item.reducer.js +3 -21
  354. package/esm2015/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.js +4 -22
  355. package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +12 -58
  356. package/esm2015/state/reducers/cart-operation-type.enum.js +16 -17
  357. package/esm2015/state/reducers/cart-order/cart-order-initial-state.js +1 -7
  358. package/esm2015/state/reducers/cart-order/cart-order-state.interface.js +2 -19
  359. package/esm2015/state/reducers/cart-order/cart-order.reducer.js +1 -12
  360. package/esm2015/state/reducers/cart-payment/cart-payment.reducer.js +1 -15
  361. package/esm2015/state/reducers/cart-payment-methods/cart-payment-methods.reducer.js +1 -15
  362. package/esm2015/state/reducers/cart-reducers-state.interface.js +1 -28
  363. package/esm2015/state/reducers/cart-reducers.js +1 -7
  364. package/esm2015/state/reducers/cart-resolve/cart-resolve-state.enum.js +9 -15
  365. package/esm2015/state/reducers/cart-resolve/cart-resolve.reducer.js +1 -12
  366. package/esm2015/state/reducers/cart-shipping-address/cart-shipping-address.reducer.js +1 -15
  367. package/esm2015/state/reducers/cart-shipping-information/cart-shipping-information.reducer.js +7 -17
  368. package/esm2015/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.js +1 -15
  369. package/esm2015/state/reducers/cart-state.interface.js +2 -21
  370. package/esm2015/state/reducers/cart-store-feature-key.js +1 -7
  371. package/esm2015/state/reducers/cart.reducer.js +1 -11
  372. package/esm2015/state/reducers/errors/cart-errors.type.js +2 -6
  373. package/esm2015/state/reducers/errors/error-state-helpers.js +5 -29
  374. package/esm2015/state/reducers/loading/cart-loading.type.js +3 -42
  375. package/esm2015/state/reducers/public_api.js +3 -8
  376. package/esm2015/state/reducers/token/extra.token.js +5 -21
  377. package/esm2015/state/reducers/token/public_api.js +1 -6
  378. package/esm2015/state/reducers/token/reducers.token.js +4 -13
  379. package/esm2015/state/selectors/cart/cart.selector.js +98 -811
  380. package/esm2015/state/selectors/cart-feature.selector.js +5 -28
  381. package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +29 -229
  382. package/esm2015/state/selectors/cart-order/cart-order.selector.js +15 -104
  383. package/esm2015/state/selectors/cart.selector.js +6 -30
  384. package/esm2015/state/selectors/public_api.js +2 -7
  385. package/esm2015/state/testing/cart-testing.module.js +1 -6
  386. package/esm2015/state/testing/daffodil-cart-state-testing.js +2 -7
  387. package/esm2015/state/testing/factories/stateful-cart-item.factory.js +2 -11
  388. package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +2 -11
  389. package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +2 -11
  390. package/esm2015/state/testing/index.js +2 -7
  391. package/esm2015/state/testing/mock-cart-facade.js +2 -206
  392. package/esm2015/state/testing/public_api.js +4 -9
  393. package/esm2015/storage/cart-storage.service.js +2 -36
  394. package/esm2015/testing/daffodil-cart-testing.js +2 -7
  395. package/esm2015/testing/factories/cart-address.factory.js +2 -41
  396. package/esm2015/testing/factories/cart-coupon.factory.js +2 -17
  397. package/esm2015/testing/factories/cart-item/cart-item.factory.js +5 -51
  398. package/esm2015/testing/factories/cart-item/composite-cart-item.factory.js +2 -23
  399. package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
  400. package/esm2015/testing/factories/cart-payment.factory.js +2 -11
  401. package/esm2015/testing/factories/cart-shipping-rate.factory.js +2 -23
  402. package/esm2015/testing/factories/cart.factory.js +2 -35
  403. package/esm2015/testing/factories/public_api.js +4 -9
  404. package/esm2015/testing/index.js +2 -7
  405. package/esm2015/testing/public_api.js +2 -7
  406. package/fesm2015/daffodil-cart-driver-in-memory.js +108 -1228
  407. package/fesm2015/daffodil-cart-driver-in-memory.js.map +1 -1
  408. package/fesm2015/daffodil-cart-driver-magento-testing.js +12 -227
  409. package/fesm2015/daffodil-cart-driver-magento-testing.js.map +1 -1
  410. package/fesm2015/daffodil-cart-driver-magento.js +161 -1844
  411. package/fesm2015/daffodil-cart-driver-magento.js.map +1 -1
  412. package/fesm2015/daffodil-cart-driver-testing.js +24 -376
  413. package/fesm2015/daffodil-cart-driver-testing.js.map +1 -1
  414. package/fesm2015/daffodil-cart-driver.js +13 -493
  415. package/fesm2015/daffodil-cart-driver.js.map +1 -1
  416. package/fesm2015/daffodil-cart-routing.js +44 -498
  417. package/fesm2015/daffodil-cart-routing.js.map +1 -1
  418. package/fesm2015/daffodil-cart-state-testing.js +6 -256
  419. package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
  420. package/fesm2015/daffodil-cart-state.js +403 -3921
  421. package/fesm2015/daffodil-cart-state.js.map +1 -1
  422. package/fesm2015/daffodil-cart-testing.js +13 -228
  423. package/fesm2015/daffodil-cart-testing.js.map +1 -1
  424. package/fesm2015/daffodil-cart.js +39 -532
  425. package/fesm2015/daffodil-cart.js.map +1 -1
  426. package/package.json +5 -5
  427. package/routing/package.json +1 -1
  428. package/state/package.json +1 -1
  429. package/state/testing/package.json +1 -1
  430. package/testing/package.json +1 -1
@@ -4,55 +4,31 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.cart = global.daffodil.cart || {}, global.daffodil.cart.routing = {}), global.ng.core, global.ng.router, global.rxjs.operators, global.daffodil.cart.state, global.i1$1));
5
5
  }(this, (function (exports, i0, i2, operators, i1, i1$1) { 'use strict';
6
6
 
7
- /**
8
- * @fileoverview added by tsickle
9
- * Generated from: guards/billing-address/billing-address-guard-redirect.token.ts
10
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11
- */
12
- /** @type {?} */
13
7
  var DaffCartBillingAddressGuardRedirectUrl = new i0.InjectionToken('DaffCartBillingAddressGuardRedirectUrl');
14
8
 
15
- /**
16
- * @fileoverview added by tsickle
17
- * Generated from: guards/billing-address/billing-address.guard.ts
18
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
19
- */
20
9
  /**
21
10
  * A routing guard that will redirect to a given url if the billing address on the cart is not defined.
22
11
  * The url is `/` by default, but can be overridden with the DaffCartBillingAddressGuardRedirectUrl injection token.
23
12
  * The guard will not wait until the cart has been resolved before performing the check and emitting.
24
- * Ensure that the cart is resolved prior to running this guard with the {\@link DaffResolvedCartGuard}.
13
+ * Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
25
14
  */
26
15
  var DaffBillingAddressGuard = /** @class */ (function () {
27
- /**
28
- * @param {?} facade
29
- * @param {?} router
30
- * @param {?} redirectUrl
31
- */
32
16
  function DaffBillingAddressGuard(facade, router, redirectUrl) {
33
17
  this.facade = facade;
34
18
  this.router = router;
35
19
  this.redirectUrl = redirectUrl;
36
20
  }
37
- /**
38
- * @return {?}
39
- */
40
21
  DaffBillingAddressGuard.prototype.canActivate = function () {
41
22
  var _this = this;
42
- return this.facade.hasBillingAddress$.pipe(operators.take(1), operators.tap(( /**
43
- * @param {?} hasBillingAddress
44
- * @return {?}
45
- */function (/**
46
- * @param {?} hasBillingAddress
47
- * @return {?}
48
- */ hasBillingAddress) {
23
+ return this.facade.hasBillingAddress$.pipe(operators.take(1), operators.tap(function (hasBillingAddress) {
49
24
  if (!hasBillingAddress) {
50
25
  _this.router.navigateByUrl(_this.redirectUrl);
51
26
  }
52
- })));
27
+ }));
53
28
  };
54
29
  return DaffBillingAddressGuard;
55
30
  }());
31
+ /** @nocollapse */ DaffBillingAddressGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffBillingAddressGuard_Factory() { return new DaffBillingAddressGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartBillingAddressGuardRedirectUrl)); }, token: DaffBillingAddressGuard, providedIn: "root" });
56
32
  DaffBillingAddressGuard.decorators = [
57
33
  { type: i0.Injectable, args: [{
58
34
  providedIn: 'root',
@@ -64,141 +40,55 @@
64
40
  { type: i2.Router },
65
41
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartBillingAddressGuardRedirectUrl,] }] }
66
42
  ]; };
67
- /** @nocollapse */ DaffBillingAddressGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffBillingAddressGuard_Factory() { return new DaffBillingAddressGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartBillingAddressGuardRedirectUrl)); }, token: DaffBillingAddressGuard, providedIn: "root" });
68
- if (false) {
69
- /**
70
- * @type {?}
71
- * @private
72
- */
73
- DaffBillingAddressGuard.prototype.facade;
74
- /**
75
- * @type {?}
76
- * @private
77
- */
78
- DaffBillingAddressGuard.prototype.router;
79
- /**
80
- * @type {?}
81
- * @private
82
- */
83
- DaffBillingAddressGuard.prototype.redirectUrl;
84
- }
85
43
 
86
- /**
87
- * @fileoverview added by tsickle
88
- * Generated from: config/resolution/config.ts
89
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
90
- */
91
- /**
92
- * An object that describes the resolution configuration of the cart state package.
93
- * @record
94
- */
95
- function DaffCartRoutingResolutionConfiguration() { }
96
- if (false) {
97
- /**
98
- * When Daffodil fails to resolve a cart, you should navigate your users to
99
- * a page that is outside the scope of resolution. The `failedResolutionPath` allows you
100
- * to control where to navigate your users to when resolution fails.
101
- * @type {?}
102
- */
103
- DaffCartRoutingResolutionConfiguration.prototype.failedResolutionPath;
104
- }
105
44
  ;
106
45
  /**
107
46
  * The default values of the resolution slice of the cart state configuration.
108
- * @type {?}
109
47
  */
110
48
  var daffCartRoutingResolutionConfigurationDefault = {
111
49
  failedResolutionPath: null,
112
50
  };
113
51
 
114
52
  /**
115
- * @fileoverview added by tsickle
116
- * Generated from: config/config.ts
117
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
118
- */
119
- /**
120
- * An object that describes the configuration of the`\@daffodil/cart/state` package.
121
- * @record
122
- */
123
- function DaffCartRoutingConfiguration() { }
124
- if (false) {
125
- /** @type {?} */
126
- DaffCartRoutingConfiguration.prototype.resolution;
127
- }
128
- /**
129
- * The default values of the `\@daffodil/cart/state` state configuration.
130
- * @type {?}
53
+ * The default values of the `@daffodil/cart/state` state configuration.
131
54
  */
132
55
  var daffCartRoutingConfigurationDefault = {
133
56
  resolution: Object.assign({}, daffCartRoutingResolutionConfigurationDefault),
134
57
  };
135
58
  /**
136
59
  * The token holding the runtime configuration for the behavior of the
137
- * `\@daffodil/cart/state` package.
138
- * @type {?}
60
+ * `@daffodil/cart/state` package.
139
61
  */
140
62
  var DAFF_CART_ROUTING_CONFIG = new i0.InjectionToken('DAFF_CART_ROUTING_CONFIG', {
141
63
  providedIn: 'root',
142
- factory: ( /**
143
- * @return {?}
144
- */function () { return daffCartRoutingConfigurationDefault; }),
64
+ factory: function () { return daffCartRoutingConfigurationDefault; },
145
65
  });
146
66
 
147
- /**
148
- * @fileoverview added by tsickle
149
- * Generated from: guards/resolved-cart/resolved-cart.guard.ts
150
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
151
- */
152
67
  /**
153
68
  * A routing guard that will optionally redirect to a given url if the cart is not properly resolved.
154
69
  * It will initiate cart resolution.
155
70
  * The url has no default and the guard will not redirect if no value is specified.
156
- * Specify a redirect path with the {\@link DaffResolvedCartGuardRedirectUrl} injection token.
71
+ * Specify a redirect path with the {@link DaffResolvedCartGuardRedirectUrl} injection token.
157
72
  * The guard will wait until the cart has been resolved before performing the check and emitting.
158
73
  */
159
74
  var DaffResolvedCartGuard = /** @class */ (function () {
160
- /**
161
- * @param {?} facade
162
- * @param {?} router
163
- * @param {?} config
164
- */
165
75
  function DaffResolvedCartGuard(facade, router, config) {
166
76
  this.facade = facade;
167
77
  this.router = router;
168
78
  this.config = config;
169
79
  }
170
- /**
171
- * @return {?}
172
- */
173
80
  DaffResolvedCartGuard.prototype.canActivate = function () {
174
81
  var _this = this;
175
- return this.facade.resolved$.pipe(operators.filter(( /**
176
- * @param {?} resolvedState
177
- * @return {?}
178
- */function (/**
179
- * @param {?} resolvedState
180
- * @return {?}
181
- */ resolvedState) { return resolvedState === i1.DaffCartResolveState.Succeeded ||
82
+ return this.facade.resolved$.pipe(operators.filter(function (resolvedState) { return resolvedState === i1.DaffCartResolveState.Succeeded ||
182
83
  resolvedState === i1.DaffCartResolveState.ServerSide ||
183
- resolvedState === i1.DaffCartResolveState.Failed; })), operators.map(( /**
184
- * @param {?} resolvedState
185
- * @return {?}
186
- */function (/**
187
- * @param {?} resolvedState
188
- * @return {?}
189
- */ resolvedState) { return resolvedState === i1.DaffCartResolveState.Succeeded ||
190
- resolvedState === i1.DaffCartResolveState.ServerSide; })), operators.take(1), operators.map(( /**
191
- * @param {?} success
192
- * @return {?}
193
- */function (/**
194
- * @param {?} success
195
- * @return {?}
196
- */ success) { return !success && _this.config.resolution.failedResolutionPath
84
+ resolvedState === i1.DaffCartResolveState.Failed; }), operators.map(function (resolvedState) { return resolvedState === i1.DaffCartResolveState.Succeeded ||
85
+ resolvedState === i1.DaffCartResolveState.ServerSide; }), operators.take(1), operators.map(function (success) { return !success && _this.config.resolution.failedResolutionPath
197
86
  ? _this.router.parseUrl(_this.config.resolution.failedResolutionPath)
198
- : success; })));
87
+ : success; }));
199
88
  };
200
89
  return DaffResolvedCartGuard;
201
90
  }());
91
+ /** @nocollapse */ DaffResolvedCartGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffResolvedCartGuard_Factory() { return new DaffResolvedCartGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DAFF_CART_ROUTING_CONFIG)); }, token: DaffResolvedCartGuard, providedIn: "root" });
202
92
  DaffResolvedCartGuard.decorators = [
203
93
  { type: i0.Injectable, args: [{
204
94
  providedIn: 'root',
@@ -210,84 +100,36 @@
210
100
  { type: i2.Router },
211
101
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_ROUTING_CONFIG,] }] }
212
102
  ]; };
213
- /** @nocollapse */ DaffResolvedCartGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffResolvedCartGuard_Factory() { return new DaffResolvedCartGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DAFF_CART_ROUTING_CONFIG)); }, token: DaffResolvedCartGuard, providedIn: "root" });
214
- if (false) {
215
- /**
216
- * @type {?}
217
- * @private
218
- */
219
- DaffResolvedCartGuard.prototype.facade;
220
- /**
221
- * @type {?}
222
- * @private
223
- */
224
- DaffResolvedCartGuard.prototype.router;
225
- /**
226
- * @type {?}
227
- * @private
228
- */
229
- DaffResolvedCartGuard.prototype.config;
230
- }
231
103
 
232
104
  /**
233
- * @fileoverview added by tsickle
234
- * Generated from: guards/cart-items/cart-items-guard-redirect.token.ts
235
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
236
- */
237
- /**
238
- * The path to which the user should be redirected if the cart has no items when {\@link DaffCartItemsGuard} is invoked.
239
- * @type {?}
105
+ * The path to which the user should be redirected if the cart has no items when {@link DaffCartItemsGuard} is invoked.
240
106
  */
241
107
  var DaffCartItemsGuardRedirectUrl = new i0.InjectionToken('DaffCartItemsGuardRedirectUrl');
242
108
 
243
- /**
244
- * @fileoverview added by tsickle
245
- * Generated from: guards/cart-items/cart-items.guard.ts
246
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
247
- */
248
109
  /**
249
110
  * A routing guard that will ensure that the cart is not empty before allowing activation of a route.
250
111
  * If the cart has items in it, then `canActivate` will emit true. If not, it will emit false and redirect to a specific path.
251
- * The url is `/` by default but can be overridden with the {\@link DaffCartItemsGuardRedirectUrl} injection token.
112
+ * The url is `/` by default but can be overridden with the {@link DaffCartItemsGuardRedirectUrl} injection token.
252
113
  * The guard will not wait until the cart has been resolved before performing the check and emitting.
253
- * Ensure that the cart is resolved prior to running this guard with the {\@link DaffResolvedCartGuard}.
114
+ * Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
254
115
  */
255
116
  var DaffCartItemsGuard = /** @class */ (function () {
256
- /**
257
- * @param {?} facade
258
- * @param {?} router
259
- * @param {?} redirectUrl
260
- */
261
117
  function DaffCartItemsGuard(facade, router, redirectUrl) {
262
118
  this.facade = facade;
263
119
  this.router = router;
264
120
  this.redirectUrl = redirectUrl;
265
121
  }
266
- /**
267
- * @return {?}
268
- */
269
122
  DaffCartItemsGuard.prototype.canActivate = function () {
270
123
  var _this = this;
271
- return this.facade.isCartEmpty$.pipe(operators.map(( /**
272
- * @param {?} isCartEmpty
273
- * @return {?}
274
- */function (/**
275
- * @param {?} isCartEmpty
276
- * @return {?}
277
- */ isCartEmpty) { return !isCartEmpty; })), operators.take(1), operators.tap(( /**
278
- * @param {?} hasNonEmptyCart
279
- * @return {?}
280
- */function (/**
281
- * @param {?} hasNonEmptyCart
282
- * @return {?}
283
- */ hasNonEmptyCart) {
124
+ return this.facade.isCartEmpty$.pipe(operators.map(function (isCartEmpty) { return !isCartEmpty; }), operators.take(1), operators.tap(function (hasNonEmptyCart) {
284
125
  if (!hasNonEmptyCart) {
285
126
  _this.router.navigateByUrl(_this.redirectUrl);
286
127
  }
287
- })));
128
+ }));
288
129
  };
289
130
  return DaffCartItemsGuard;
290
131
  }());
132
+ /** @nocollapse */ DaffCartItemsGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffCartItemsGuard_Factory() { return new DaffCartItemsGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartItemsGuardRedirectUrl)); }, token: DaffCartItemsGuard, providedIn: "root" });
291
133
  DaffCartItemsGuard.decorators = [
292
134
  { type: i0.Injectable, args: [{
293
135
  providedIn: 'root',
@@ -299,74 +141,32 @@
299
141
  { type: i2.Router },
300
142
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartItemsGuardRedirectUrl,] }] }
301
143
  ]; };
302
- /** @nocollapse */ DaffCartItemsGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffCartItemsGuard_Factory() { return new DaffCartItemsGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartItemsGuardRedirectUrl)); }, token: DaffCartItemsGuard, providedIn: "root" });
303
- if (false) {
304
- /**
305
- * @type {?}
306
- * @private
307
- */
308
- DaffCartItemsGuard.prototype.facade;
309
- /**
310
- * @type {?}
311
- * @private
312
- */
313
- DaffCartItemsGuard.prototype.router;
314
- /**
315
- * @type {?}
316
- * @private
317
- */
318
- DaffCartItemsGuard.prototype.redirectUrl;
319
- }
320
144
 
321
- /**
322
- * @fileoverview added by tsickle
323
- * Generated from: guards/payment-method/payment-method-guard-redirect.token.ts
324
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
325
- */
326
- /** @type {?} */
327
145
  var DaffCartPaymentMethodGuardRedirectUrl = new i0.InjectionToken('DaffCartPaymentMethodGuardRedirectUrl');
328
146
 
329
- /**
330
- * @fileoverview added by tsickle
331
- * Generated from: guards/payment-method/payment-method.guard.ts
332
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
333
- */
334
147
  /**
335
148
  * A routing guard that will redirect to a given url if the payment method on the cart is not defined.
336
149
  * The url is `/` by default, but can be overridden with the DaffCartPaymentMethodGuardRedirectUrl injection token.
337
150
  * The guard will not wait until the cart has been resolved before performing the check and emitting.
338
- * Ensure that the cart is resolved prior to running this guard with the {\@link DaffResolvedCartGuard}.
151
+ * Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
339
152
  */
340
153
  var DaffPaymentMethodGuard = /** @class */ (function () {
341
- /**
342
- * @param {?} facade
343
- * @param {?} router
344
- * @param {?} redirectUrl
345
- */
346
154
  function DaffPaymentMethodGuard(facade, router, redirectUrl) {
347
155
  this.facade = facade;
348
156
  this.router = router;
349
157
  this.redirectUrl = redirectUrl;
350
158
  }
351
- /**
352
- * @return {?}
353
- */
354
159
  DaffPaymentMethodGuard.prototype.canActivate = function () {
355
160
  var _this = this;
356
- return this.facade.hasPaymentMethod$.pipe(operators.take(1), operators.tap(( /**
357
- * @param {?} hasPaymentMethod
358
- * @return {?}
359
- */function (/**
360
- * @param {?} hasPaymentMethod
361
- * @return {?}
362
- */ hasPaymentMethod) {
161
+ return this.facade.hasPaymentMethod$.pipe(operators.take(1), operators.tap(function (hasPaymentMethod) {
363
162
  if (!hasPaymentMethod) {
364
163
  _this.router.navigateByUrl(_this.redirectUrl);
365
164
  }
366
- })));
165
+ }));
367
166
  };
368
167
  return DaffPaymentMethodGuard;
369
168
  }());
169
+ /** @nocollapse */ DaffPaymentMethodGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffPaymentMethodGuard_Factory() { return new DaffPaymentMethodGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartPaymentMethodGuardRedirectUrl)); }, token: DaffPaymentMethodGuard, providedIn: "root" });
370
170
  DaffPaymentMethodGuard.decorators = [
371
171
  { type: i0.Injectable, args: [{
372
172
  providedIn: 'root',
@@ -378,74 +178,32 @@
378
178
  { type: i2.Router },
379
179
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartPaymentMethodGuardRedirectUrl,] }] }
380
180
  ]; };
381
- /** @nocollapse */ DaffPaymentMethodGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffPaymentMethodGuard_Factory() { return new DaffPaymentMethodGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartPaymentMethodGuardRedirectUrl)); }, token: DaffPaymentMethodGuard, providedIn: "root" });
382
- if (false) {
383
- /**
384
- * @type {?}
385
- * @private
386
- */
387
- DaffPaymentMethodGuard.prototype.facade;
388
- /**
389
- * @type {?}
390
- * @private
391
- */
392
- DaffPaymentMethodGuard.prototype.router;
393
- /**
394
- * @type {?}
395
- * @private
396
- */
397
- DaffPaymentMethodGuard.prototype.redirectUrl;
398
- }
399
181
 
400
- /**
401
- * @fileoverview added by tsickle
402
- * Generated from: guards/shipping-address/shipping-address-guard-redirect.token.ts
403
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
404
- */
405
- /** @type {?} */
406
182
  var DaffCartShippingAddressGuardRedirectUrl = new i0.InjectionToken('DaffCartShippingAddressGuardRedirectUrl');
407
183
 
408
- /**
409
- * @fileoverview added by tsickle
410
- * Generated from: guards/shipping-address/shipping-address.guard.ts
411
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
412
- */
413
184
  /**
414
185
  * A routing guard that will redirect to a given url if the shipping address on the cart is not defined.
415
186
  * The url is `/` by default, but can be overridden with the DaffCartShippingAddressGuardRedirectUrl injection token.
416
187
  * The guard will not wait until the cart has been resolved before performing the check and emitting.
417
- * Ensure that the cart is resolved prior to running this guard with the {\@link DaffResolvedCartGuard}.
188
+ * Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
418
189
  */
419
190
  var DaffShippingAddressGuard = /** @class */ (function () {
420
- /**
421
- * @param {?} facade
422
- * @param {?} router
423
- * @param {?} redirectUrl
424
- */
425
191
  function DaffShippingAddressGuard(facade, router, redirectUrl) {
426
192
  this.facade = facade;
427
193
  this.router = router;
428
194
  this.redirectUrl = redirectUrl;
429
195
  }
430
- /**
431
- * @return {?}
432
- */
433
196
  DaffShippingAddressGuard.prototype.canActivate = function () {
434
197
  var _this = this;
435
- return this.facade.hasShippingAddress$.pipe(operators.take(1), operators.tap(( /**
436
- * @param {?} hasShippingAddress
437
- * @return {?}
438
- */function (/**
439
- * @param {?} hasShippingAddress
440
- * @return {?}
441
- */ hasShippingAddress) {
198
+ return this.facade.hasShippingAddress$.pipe(operators.take(1), operators.tap(function (hasShippingAddress) {
442
199
  if (!hasShippingAddress) {
443
200
  _this.router.navigateByUrl(_this.redirectUrl);
444
201
  }
445
- })));
202
+ }));
446
203
  };
447
204
  return DaffShippingAddressGuard;
448
205
  }());
206
+ /** @nocollapse */ DaffShippingAddressGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffShippingAddressGuard_Factory() { return new DaffShippingAddressGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartShippingAddressGuardRedirectUrl)); }, token: DaffShippingAddressGuard, providedIn: "root" });
449
207
  DaffShippingAddressGuard.decorators = [
450
208
  { type: i0.Injectable, args: [{
451
209
  providedIn: 'root',
@@ -457,74 +215,32 @@
457
215
  { type: i2.Router },
458
216
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartShippingAddressGuardRedirectUrl,] }] }
459
217
  ]; };
460
- /** @nocollapse */ DaffShippingAddressGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffShippingAddressGuard_Factory() { return new DaffShippingAddressGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartShippingAddressGuardRedirectUrl)); }, token: DaffShippingAddressGuard, providedIn: "root" });
461
- if (false) {
462
- /**
463
- * @type {?}
464
- * @private
465
- */
466
- DaffShippingAddressGuard.prototype.facade;
467
- /**
468
- * @type {?}
469
- * @private
470
- */
471
- DaffShippingAddressGuard.prototype.router;
472
- /**
473
- * @type {?}
474
- * @private
475
- */
476
- DaffShippingAddressGuard.prototype.redirectUrl;
477
- }
478
218
 
479
- /**
480
- * @fileoverview added by tsickle
481
- * Generated from: guards/shipping-method/shipping-method-guard-redirect.token.ts
482
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
483
- */
484
- /** @type {?} */
485
219
  var DaffCartShippingMethodGuardRedirectUrl = new i0.InjectionToken('DaffCartShippingMethodGuardRedirectUrl');
486
220
 
487
- /**
488
- * @fileoverview added by tsickle
489
- * Generated from: guards/shipping-method/shipping-method.guard.ts
490
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
491
- */
492
221
  /**
493
222
  * A routing guard that will redirect to a given url if the shipping method on the cart is not defined.
494
223
  * The url is `/` by default, but can be overridden with the DaffCartShippingMethodGuardRedirectUrl injection token.
495
224
  * The guard will not wait until the cart has been resolved before performing the check and emitting.
496
- * Ensure that the cart is resolved prior to running this guard with the {\@link DaffResolvedCartGuard}.
225
+ * Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
497
226
  */
498
227
  var DaffShippingMethodGuard = /** @class */ (function () {
499
- /**
500
- * @param {?} facade
501
- * @param {?} router
502
- * @param {?} redirectUrl
503
- */
504
228
  function DaffShippingMethodGuard(facade, router, redirectUrl) {
505
229
  this.facade = facade;
506
230
  this.router = router;
507
231
  this.redirectUrl = redirectUrl;
508
232
  }
509
- /**
510
- * @return {?}
511
- */
512
233
  DaffShippingMethodGuard.prototype.canActivate = function () {
513
234
  var _this = this;
514
- return this.facade.hasShippingMethod$.pipe(operators.take(1), operators.tap(( /**
515
- * @param {?} hasShippingMethod
516
- * @return {?}
517
- */function (/**
518
- * @param {?} hasShippingMethod
519
- * @return {?}
520
- */ hasShippingMethod) {
235
+ return this.facade.hasShippingMethod$.pipe(operators.take(1), operators.tap(function (hasShippingMethod) {
521
236
  if (!hasShippingMethod) {
522
237
  _this.router.navigateByUrl(_this.redirectUrl);
523
238
  }
524
- })));
239
+ }));
525
240
  };
526
241
  return DaffShippingMethodGuard;
527
242
  }());
243
+ /** @nocollapse */ DaffShippingMethodGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffShippingMethodGuard_Factory() { return new DaffShippingMethodGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartShippingMethodGuardRedirectUrl)); }, token: DaffShippingMethodGuard, providedIn: "root" });
528
244
  DaffShippingMethodGuard.decorators = [
529
245
  { type: i0.Injectable, args: [{
530
246
  providedIn: 'root',
@@ -536,72 +252,30 @@
536
252
  { type: i2.Router },
537
253
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartShippingMethodGuardRedirectUrl,] }] }
538
254
  ]; };
539
- /** @nocollapse */ DaffShippingMethodGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffShippingMethodGuard_Factory() { return new DaffShippingMethodGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartShippingMethodGuardRedirectUrl)); }, token: DaffShippingMethodGuard, providedIn: "root" });
540
- if (false) {
541
- /**
542
- * @type {?}
543
- * @private
544
- */
545
- DaffShippingMethodGuard.prototype.facade;
546
- /**
547
- * @type {?}
548
- * @private
549
- */
550
- DaffShippingMethodGuard.prototype.router;
551
- /**
552
- * @type {?}
553
- * @private
554
- */
555
- DaffShippingMethodGuard.prototype.redirectUrl;
556
- }
557
255
 
558
- /**
559
- * @fileoverview added by tsickle
560
- * Generated from: guards/order-result/order-result-guard-redirect.token.ts
561
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
562
- */
563
- /** @type {?} */
564
256
  var DaffCartOrderResultGuardRedirectUrl = new i0.InjectionToken('DaffCartOrderResultGuardRedirectUrl');
565
257
 
566
- /**
567
- * @fileoverview added by tsickle
568
- * Generated from: guards/order-result/order-result.guard.ts
569
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
570
- */
571
258
  /**
572
259
  * A routing guard that will redirect to a given url if the cart order result is not defined.
573
260
  * The url is `/` by default, but can be overridden with the DaffCartOrderResultGuardRedirectUrl injection token.
574
261
  */
575
262
  var DaffOrderResultGuard = /** @class */ (function () {
576
- /**
577
- * @param {?} facade
578
- * @param {?} router
579
- * @param {?} redirectUrl
580
- */
581
263
  function DaffOrderResultGuard(facade, router, redirectUrl) {
582
264
  this.facade = facade;
583
265
  this.router = router;
584
266
  this.redirectUrl = redirectUrl;
585
267
  }
586
- /**
587
- * @return {?}
588
- */
589
268
  DaffOrderResultGuard.prototype.canActivate = function () {
590
269
  var _this = this;
591
- return this.facade.hasOrderResult$.pipe(operators.tap(( /**
592
- * @param {?} hasOrderResult
593
- * @return {?}
594
- */function (/**
595
- * @param {?} hasOrderResult
596
- * @return {?}
597
- */ hasOrderResult) {
270
+ return this.facade.hasOrderResult$.pipe(operators.tap(function (hasOrderResult) {
598
271
  if (!hasOrderResult) {
599
272
  _this.router.navigateByUrl(_this.redirectUrl);
600
273
  }
601
- })));
274
+ }));
602
275
  };
603
276
  return DaffOrderResultGuard;
604
277
  }());
278
+ /** @nocollapse */ DaffOrderResultGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderResultGuard_Factory() { return new DaffOrderResultGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartOrderResultGuardRedirectUrl)); }, token: DaffOrderResultGuard, providedIn: "root" });
605
279
  DaffOrderResultGuard.decorators = [
606
280
  { type: i0.Injectable, args: [{
607
281
  providedIn: 'root',
@@ -613,88 +287,36 @@
613
287
  { type: i2.Router },
614
288
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartOrderResultGuardRedirectUrl,] }] }
615
289
  ]; };
616
- /** @nocollapse */ DaffOrderResultGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderResultGuard_Factory() { return new DaffOrderResultGuard(i0.ɵɵinject(i1.DaffCartFacade), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartOrderResultGuardRedirectUrl)); }, token: DaffOrderResultGuard, providedIn: "root" });
617
- if (false) {
618
- /**
619
- * @type {?}
620
- * @private
621
- */
622
- DaffOrderResultGuard.prototype.facade;
623
- /**
624
- * @type {?}
625
- * @private
626
- */
627
- DaffOrderResultGuard.prototype.router;
628
- /**
629
- * @type {?}
630
- * @private
631
- */
632
- DaffOrderResultGuard.prototype.redirectUrl;
633
- }
634
290
 
635
- /**
636
- * @fileoverview added by tsickle
637
- * Generated from: guards/public_api.ts
638
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
639
- */
640
-
641
- /**
642
- * @fileoverview added by tsickle
643
- * Generated from: resolvers/tokens/cart-resolver-redirect.token.ts
644
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
645
- */
646
- /** @type {?} */
647
291
  var DaffCartResolverRedirectUrl = new i0.InjectionToken('DaffCartResolverRedirectUrl');
648
292
 
649
- /**
650
- * @fileoverview added by tsickle
651
- * Generated from: resolvers/cart-resolver.service.ts
652
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
653
- */
654
293
  /**
655
294
  * Resolves the cart before navigation. Redirects to a given url when a failure occurs during Cart Load.
656
295
  * This url is `/` by default but can be overridden with the DaffCartResolverRedirectUrl injection token.
657
296
  */
658
297
  var DaffCartResolver = /** @class */ (function () {
659
- /**
660
- * @param {?} store
661
- * @param {?} dispatcher
662
- * @param {?} router
663
- * @param {?} redirectUrl
664
- */
665
298
  function DaffCartResolver(store, dispatcher, router, redirectUrl) {
666
299
  this.store = store;
667
300
  this.dispatcher = dispatcher;
668
301
  this.router = router;
669
302
  this.redirectUrl = redirectUrl;
670
303
  }
671
- /**
672
- * @return {?}
673
- */
674
304
  DaffCartResolver.prototype.resolve = function () {
675
305
  var _this = this;
676
306
  this.store.dispatch(new i1.DaffResolveCart());
677
- return this.dispatcher.pipe(operators.filter(( /**
678
- * @param {?} action
679
- * @return {?}
680
- */function (/**
681
- * @param {?} action
682
- * @return {?}
683
- */ action) { return action.type === i1.DaffCartActionTypes.CartLoadSuccessAction
307
+ return this.dispatcher.pipe(operators.filter(function (action) { return action.type === i1.DaffCartActionTypes.CartLoadSuccessAction
684
308
  || action.type === i1.DaffCartActionTypes.CartLoadFailureAction
685
309
  || action.type === i1.DaffCartActionTypes.CartCreateFailureAction
686
- || action.type === i1.DaffCartActionTypes.CartStorageFailureAction; })), operators.map(( /**
687
- * @param {?} action
688
- * @return {?}
689
- */function (action) {
310
+ || action.type === i1.DaffCartActionTypes.CartStorageFailureAction; }), operators.map(function (action) {
690
311
  if (action.type !== i1.DaffCartActionTypes.CartLoadSuccessAction) {
691
312
  _this.router.navigateByUrl(_this.redirectUrl);
692
313
  }
693
314
  return action;
694
- })), operators.take(1));
315
+ }), operators.take(1));
695
316
  };
696
317
  return DaffCartResolver;
697
318
  }());
319
+ /** @nocollapse */ DaffCartResolver.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffCartResolver_Factory() { return new DaffCartResolver(i0.ɵɵinject(i1$1.Store), i0.ɵɵinject(i1$1.ActionsSubject), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartResolverRedirectUrl)); }, token: DaffCartResolver, providedIn: "root" });
698
320
  DaffCartResolver.decorators = [
699
321
  { type: i0.Injectable, args: [{
700
322
  providedIn: 'root',
@@ -707,43 +329,9 @@
707
329
  { type: i2.Router },
708
330
  { type: String, decorators: [{ type: i0.Inject, args: [DaffCartResolverRedirectUrl,] }] }
709
331
  ]; };
710
- /** @nocollapse */ DaffCartResolver.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffCartResolver_Factory() { return new DaffCartResolver(i0.ɵɵinject(i1$1.Store), i0.ɵɵinject(i1$1.ActionsSubject), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffCartResolverRedirectUrl)); }, token: DaffCartResolver, providedIn: "root" });
711
- if (false) {
712
- /**
713
- * @type {?}
714
- * @private
715
- */
716
- DaffCartResolver.prototype.store;
717
- /**
718
- * @type {?}
719
- * @private
720
- */
721
- DaffCartResolver.prototype.dispatcher;
722
- /**
723
- * @type {?}
724
- * @private
725
- */
726
- DaffCartResolver.prototype.router;
727
- /**
728
- * @type {?}
729
- * @private
730
- */
731
- DaffCartResolver.prototype.redirectUrl;
732
- }
733
332
 
734
- /**
735
- * @fileoverview added by tsickle
736
- * Generated from: resolvers/tokens/empty-cart-resolver-redirect.token.ts
737
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
738
- */
739
- /** @type {?} */
740
333
  var DaffEmptyCartResolverRedirectUrl = new i0.InjectionToken('DaffEmptyCartResolverRedirectUrl');
741
334
 
742
- /**
743
- * @fileoverview added by tsickle
744
- * Generated from: resolvers/empty-cart-resolver.service.ts
745
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
746
- */
747
335
  /**
748
336
  * Resolves the cart before navigation. Redirects to a given url when a failure occurs during Cart Load.
749
337
  * This url is `/` by default but can be overridden with the DaffCartResolverRedirectUrl injection token.
@@ -751,39 +339,23 @@
751
339
  * This url is also `/` by default, but can be overridden with the DaffEmptyCartResolverRedirectUrl
752
340
  */
753
341
  var DaffEmptyCartResolver = /** @class */ (function () {
754
- /**
755
- * @param {?} cartResolver
756
- * @param {?} router
757
- * @param {?} redirectUrl
758
- */
759
342
  function DaffEmptyCartResolver(cartResolver, router, redirectUrl) {
760
343
  this.cartResolver = cartResolver;
761
344
  this.router = router;
762
345
  this.redirectUrl = redirectUrl;
763
346
  }
764
- /**
765
- * @return {?}
766
- */
767
347
  DaffEmptyCartResolver.prototype.resolve = function () {
768
348
  var _this = this;
769
- return this.cartResolver.resolve().pipe(operators.filter(( /**
770
- * @param {?} action
771
- * @return {?}
772
- */function (/**
773
- * @param {?} action
774
- * @return {?}
775
- */ action) { return action.type === i1.DaffCartActionTypes.CartLoadSuccessAction; })), operators.map(( /**
776
- * @param {?} action
777
- * @return {?}
778
- */function (action) {
349
+ return this.cartResolver.resolve().pipe(operators.filter(function (action) { return action.type === i1.DaffCartActionTypes.CartLoadSuccessAction; }), operators.map(function (action) {
779
350
  if (!action.payload || action.payload.items.length === 0) {
780
351
  _this.router.navigateByUrl(_this.redirectUrl);
781
352
  }
782
353
  return action;
783
- })));
354
+ }));
784
355
  };
785
356
  return DaffEmptyCartResolver;
786
357
  }());
358
+ /** @nocollapse */ DaffEmptyCartResolver.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffEmptyCartResolver_Factory() { return new DaffEmptyCartResolver(i0.ɵɵinject(DaffCartResolver), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffEmptyCartResolverRedirectUrl)); }, token: DaffEmptyCartResolver, providedIn: "root" });
787
359
  DaffEmptyCartResolver.decorators = [
788
360
  { type: i0.Injectable, args: [{
789
361
  providedIn: 'root',
@@ -795,45 +367,12 @@
795
367
  { type: i2.Router },
796
368
  { type: String, decorators: [{ type: i0.Inject, args: [DaffEmptyCartResolverRedirectUrl,] }] }
797
369
  ]; };
798
- /** @nocollapse */ DaffEmptyCartResolver.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffEmptyCartResolver_Factory() { return new DaffEmptyCartResolver(i0.ɵɵinject(DaffCartResolver), i0.ɵɵinject(i2.Router), i0.ɵɵinject(DaffEmptyCartResolverRedirectUrl)); }, token: DaffEmptyCartResolver, providedIn: "root" });
799
- if (false) {
800
- /**
801
- * @type {?}
802
- * @private
803
- */
804
- DaffEmptyCartResolver.prototype.cartResolver;
805
- /**
806
- * @type {?}
807
- * @private
808
- */
809
- DaffEmptyCartResolver.prototype.router;
810
- /**
811
- * @type {?}
812
- * @private
813
- */
814
- DaffEmptyCartResolver.prototype.redirectUrl;
815
- }
816
-
817
- /**
818
- * @fileoverview added by tsickle
819
- * Generated from: resolvers/public_api.ts
820
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
821
- */
822
370
 
823
- /**
824
- * @fileoverview added by tsickle
825
- * Generated from: cart-routing.module.ts
826
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
827
- */
828
371
  var DaffCartRoutingModule = /** @class */ (function () {
829
372
  function DaffCartRoutingModule() {
830
373
  }
831
- /**
832
- * @param {?=} config
833
- * @return {?}
834
- */
835
374
  DaffCartRoutingModule.forRoot = function (config) {
836
- if (config === void 0) { config = ( /** @type {?} */({})); }
375
+ if (config === void 0) { config = {}; }
837
376
  return {
838
377
  ngModule: DaffCartRoutingModule,
839
378
  providers: [
@@ -862,21 +401,7 @@
862
401
  ];
863
402
 
864
403
  /**
865
- * @fileoverview added by tsickle
866
- * Generated from: public_api.ts
867
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
868
- */
869
-
870
- /**
871
- * @fileoverview added by tsickle
872
- * Generated from: index.ts
873
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
874
- */
875
-
876
- /**
877
- * @fileoverview added by tsickle
878
- * Generated from: daffodil-cart-routing.ts
879
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
404
+ * Generated bundle index. Do not edit.
880
405
  */
881
406
 
882
407
  exports.DAFF_CART_ROUTING_CONFIG = DAFF_CART_ROUTING_CONFIG;