@daffodil/cart 0.39.12 → 0.41.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 (771) hide show
  1. package/daffodil-cart.d.ts +1 -1
  2. package/driver/daffodil-cart-driver.d.ts +1 -0
  3. package/driver/errors/map.d.ts +0 -1
  4. package/driver/in-memory/backend/cart/cart.service.d.ts +3 -0
  5. package/driver/in-memory/backend/cart-address/cart-address.service.d.ts +3 -0
  6. package/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.d.ts +3 -0
  7. package/driver/in-memory/backend/cart-coupon/cart-coupon.service.d.ts +3 -0
  8. package/driver/in-memory/backend/cart-items/cart-items.service.d.ts +3 -0
  9. package/driver/in-memory/backend/cart-order/cart-order.service.d.ts +3 -0
  10. package/driver/in-memory/backend/cart-payment/cart-payment.service.d.ts +3 -0
  11. package/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.d.ts +3 -0
  12. package/driver/in-memory/backend/cart-root.service.d.ts +3 -0
  13. package/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.d.ts +3 -0
  14. package/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.d.ts +3 -0
  15. package/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.d.ts +3 -0
  16. package/driver/in-memory/daffodil-cart-driver-in-memory.d.ts +1 -1
  17. package/driver/in-memory/drivers/cart/cart.service.d.ts +3 -0
  18. package/driver/in-memory/drivers/cart-address/cart-address.service.d.ts +3 -0
  19. package/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.d.ts +3 -0
  20. package/driver/in-memory/drivers/cart-coupon/cart-coupon.service.d.ts +3 -0
  21. package/driver/in-memory/drivers/cart-driver.module.d.ts +5 -0
  22. package/driver/in-memory/drivers/cart-item/cart-item.service.d.ts +3 -0
  23. package/driver/in-memory/drivers/cart-order/cart-order.service.d.ts +3 -0
  24. package/driver/in-memory/drivers/cart-payment/cart-payment.service.d.ts +3 -0
  25. package/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.d.ts +3 -0
  26. package/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +3 -0
  27. package/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +3 -0
  28. package/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.d.ts +3 -0
  29. package/driver/in-memory/package.json +5 -6
  30. package/driver/magento/cart-address.service.d.ts +3 -0
  31. package/driver/magento/cart-billing-address.service.d.ts +3 -0
  32. package/driver/magento/cart-coupon.service.d.ts +3 -0
  33. package/driver/magento/cart-driver.module.d.ts +5 -0
  34. package/driver/magento/cart-item.service.d.ts +3 -0
  35. package/driver/magento/cart-order.service.d.ts +3 -0
  36. package/driver/magento/cart-payment-methods.service.d.ts +3 -0
  37. package/driver/magento/cart-payment.service.d.ts +3 -0
  38. package/driver/magento/cart-shipping-address.service.d.ts +3 -0
  39. package/driver/magento/cart-shipping-information.service.d.ts +3 -0
  40. package/driver/magento/cart-shipping-methods.service.d.ts +3 -0
  41. package/driver/magento/cart.service.d.ts +3 -0
  42. package/driver/magento/daffodil-cart-driver-magento.d.ts +1 -5
  43. package/driver/magento/errors/map.d.ts +0 -1
  44. package/driver/magento/injection-tokens/transforms/cart-item/token.d.ts +1 -1
  45. package/driver/magento/package.json +5 -6
  46. package/driver/magento/queries/add-cart-item.d.ts +1 -1
  47. package/driver/magento/queries/apply-coupon.d.ts +1 -1
  48. package/driver/magento/queries/create-cart.d.ts +1 -1
  49. package/driver/magento/queries/fragments/available-payment-method.d.ts +1 -1
  50. package/driver/magento/queries/fragments/available-shipping-method.d.ts +1 -1
  51. package/driver/magento/queries/fragments/cart-address.d.ts +1 -1
  52. package/driver/magento/queries/fragments/cart-coupon.d.ts +1 -1
  53. package/driver/magento/queries/fragments/cart-item.d.ts +2 -2
  54. package/driver/magento/queries/fragments/cart-totals.d.ts +1 -1
  55. package/driver/magento/queries/fragments/cart.d.ts +1 -1
  56. package/driver/magento/queries/fragments/money.d.ts +1 -1
  57. package/driver/magento/queries/fragments/prices.d.ts +1 -1
  58. package/driver/magento/queries/fragments/selected-payment-method.d.ts +1 -1
  59. package/driver/magento/queries/fragments/selected-shipping-method.d.ts +1 -1
  60. package/driver/magento/queries/get-billing-address.d.ts +1 -1
  61. package/driver/magento/queries/get-cart.d.ts +1 -1
  62. package/driver/magento/queries/get-selected-payment-method.d.ts +1 -1
  63. package/driver/magento/queries/get-selected-shipping-method.d.ts +1 -1
  64. package/driver/magento/queries/get-shipping-address.d.ts +1 -1
  65. package/driver/magento/queries/list-cart-coupons.d.ts +1 -1
  66. package/driver/magento/queries/list-cart-items.d.ts +1 -1
  67. package/driver/magento/queries/list-payment-methods.d.ts +1 -1
  68. package/driver/magento/queries/list-shipping-methods.d.ts +1 -1
  69. package/driver/magento/queries/place-order.d.ts +1 -1
  70. package/driver/magento/queries/remove-all-coupons.d.ts +1 -1
  71. package/driver/magento/queries/remove-cart-item.d.ts +1 -1
  72. package/driver/magento/queries/set-selected-payment-method-with-billing-and-email.d.ts +1 -1
  73. package/driver/magento/queries/set-selected-payment-method-with-billing.d.ts +1 -1
  74. package/driver/magento/queries/set-selected-payment-method.d.ts +1 -1
  75. package/driver/magento/queries/set-selected-shipping-method.d.ts +1 -1
  76. package/driver/magento/queries/update-address-with-email.d.ts +1 -1
  77. package/driver/magento/queries/update-address.d.ts +1 -1
  78. package/driver/magento/queries/update-billing-address-with-email.d.ts +1 -1
  79. package/driver/magento/queries/update-billing-address.d.ts +1 -1
  80. package/driver/magento/queries/update-cart-item.d.ts +1 -1
  81. package/driver/magento/queries/update-shipping-address-with-email.d.ts +1 -1
  82. package/driver/magento/queries/update-shipping-address.d.ts +1 -1
  83. package/driver/magento/testing/daffodil-cart-driver-magento-testing.d.ts +1 -0
  84. package/driver/magento/testing/factories/cart-address-input.factory.d.ts +3 -0
  85. package/driver/magento/testing/factories/cart-address.factory.d.ts +3 -0
  86. package/driver/magento/testing/factories/cart-coupon.factory.d.ts +3 -0
  87. package/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.d.ts +3 -0
  88. package/driver/magento/testing/factories/cart-item/cart-item.factory.d.ts +3 -0
  89. package/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.d.ts +3 -0
  90. package/driver/magento/testing/factories/cart-payment-method.factory.d.ts +3 -0
  91. package/driver/magento/testing/factories/cart-shipping-method.factory.d.ts +3 -0
  92. package/driver/magento/testing/factories/cart.factory.d.ts +3 -0
  93. package/driver/magento/testing/factories/shipping-address.factory.d.ts +3 -0
  94. package/driver/magento/testing/package.json +5 -6
  95. package/driver/magento/transforms/inputs/billing-address.service.d.ts +3 -0
  96. package/driver/magento/transforms/inputs/cart-address.service.d.ts +3 -0
  97. package/driver/magento/transforms/inputs/cart-item-update.service.d.ts +3 -0
  98. package/driver/magento/transforms/inputs/payment-method.service.d.ts +3 -0
  99. package/driver/magento/transforms/inputs/shipping-address.service.d.ts +3 -0
  100. package/driver/magento/transforms/inputs/shipping-method.service.d.ts +3 -0
  101. package/driver/magento/transforms/outputs/billing-address.service.d.ts +3 -0
  102. package/driver/magento/transforms/outputs/cart-address.service.d.ts +3 -0
  103. package/driver/magento/transforms/outputs/cart-coupon-response.service.d.ts +3 -0
  104. package/driver/magento/transforms/outputs/cart-payment.service.d.ts +3 -0
  105. package/driver/magento/transforms/outputs/cart-shipping-information.service.d.ts +3 -0
  106. package/driver/magento/transforms/outputs/cart-shipping-rate.service.d.ts +3 -0
  107. package/driver/magento/transforms/outputs/cart.service.d.ts +3 -0
  108. package/driver/magento/transforms/outputs/shipping-address.service.d.ts +3 -0
  109. package/driver/package.json +5 -6
  110. package/driver/testing/daffodil-cart-driver-testing.d.ts +1 -0
  111. package/driver/testing/drivers/cart/cart.service.d.ts +3 -0
  112. package/driver/testing/drivers/cart-address/cart-address.service.d.ts +3 -0
  113. package/driver/testing/drivers/cart-billing-address/cart-billing-address.service.d.ts +3 -0
  114. package/driver/testing/drivers/cart-coupon/cart-coupon.service.d.ts +3 -0
  115. package/driver/testing/drivers/cart-driver.module.d.ts +5 -0
  116. package/driver/testing/drivers/cart-item/cart-item.service.d.ts +3 -0
  117. package/driver/testing/drivers/cart-order/cart-order.service.d.ts +3 -0
  118. package/driver/testing/drivers/cart-payment/cart-payment.service.d.ts +3 -0
  119. package/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.d.ts +3 -0
  120. package/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +3 -0
  121. package/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +3 -0
  122. package/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.d.ts +3 -0
  123. package/driver/testing/package.json +5 -6
  124. package/errors/map.d.ts +0 -1
  125. package/esm2020/daffodil-cart.mjs +5 -0
  126. package/{esm2015/driver/daffodil-cart-driver.js → esm2020/driver/daffodil-cart-driver.mjs} +0 -0
  127. package/{esm2015/driver/errors/cart-not-found.js → esm2020/driver/errors/cart-not-found.mjs} +0 -0
  128. package/{esm2015/driver/errors/codes.enum.js → esm2020/driver/errors/codes.enum.mjs} +0 -0
  129. package/{esm2015/driver/errors/expired-payment-token.js → esm2020/driver/errors/expired-payment-token.mjs} +0 -0
  130. package/{esm2015/driver/errors/invalid-api-response.js → esm2020/driver/errors/invalid-api-response.mjs} +0 -0
  131. package/{esm2015/driver/errors/invalid-country.js → esm2020/driver/errors/invalid-country.mjs} +0 -0
  132. package/{esm2015/driver/errors/invalid-coupon-code.js → esm2020/driver/errors/invalid-coupon-code.mjs} +0 -0
  133. package/{esm2015/driver/errors/invalid-email.js → esm2020/driver/errors/invalid-email.mjs} +0 -0
  134. package/{esm2015/driver/errors/invalid-region.js → esm2020/driver/errors/invalid-region.mjs} +0 -0
  135. package/{esm2015/driver/errors/item-exceeds-max-qty.js → esm2020/driver/errors/item-exceeds-max-qty.mjs} +0 -0
  136. package/{esm2015/driver/errors/map.js → esm2020/driver/errors/map.mjs} +0 -0
  137. package/{esm2015/driver/errors/product-not-found.js → esm2020/driver/errors/product-not-found.mjs} +0 -0
  138. package/{esm2015/driver/errors/product-out-of-stock.js → esm2020/driver/errors/product-out-of-stock.mjs} +0 -0
  139. package/{esm2015/driver/errors/public_api.js → esm2020/driver/errors/public_api.mjs} +0 -0
  140. package/esm2020/driver/in-memory/backend/cart/cart.service.mjs +81 -0
  141. package/esm2020/driver/in-memory/backend/cart-address/cart-address.service.mjs +43 -0
  142. package/esm2020/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.mjs +51 -0
  143. package/esm2020/driver/in-memory/backend/cart-coupon/cart-coupon.service.mjs +89 -0
  144. package/{esm2015/driver/in-memory/backend/cart-items/cart-items.service.js → esm2020/driver/in-memory/backend/cart-items/cart-items.service.mjs} +45 -20
  145. package/esm2020/driver/in-memory/backend/cart-order/cart-order.service.mjs +30 -0
  146. package/esm2020/driver/in-memory/backend/cart-payment/cart-payment.service.mjs +68 -0
  147. package/esm2020/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.mjs +29 -0
  148. package/{esm2015/driver/in-memory/backend/cart-root.service.js → esm2020/driver/in-memory/backend/cart-root.service.mjs} +9 -21
  149. package/esm2020/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.mjs +51 -0
  150. package/esm2020/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.mjs +65 -0
  151. package/esm2020/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.mjs +43 -0
  152. package/{esm2015/driver/in-memory/backend/public_api.js → esm2020/driver/in-memory/backend/public_api.mjs} +0 -0
  153. package/esm2020/driver/in-memory/daffodil-cart-driver-in-memory.mjs +5 -0
  154. package/esm2020/driver/in-memory/drivers/cart/cart.service.mjs +43 -0
  155. package/esm2020/driver/in-memory/drivers/cart-address/cart-address.service.mjs +28 -0
  156. package/esm2020/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.mjs +31 -0
  157. package/esm2020/driver/in-memory/drivers/cart-coupon/cart-coupon.service.mjs +37 -0
  158. package/esm2020/driver/in-memory/drivers/cart-driver.module.mjs +82 -0
  159. package/esm2020/driver/in-memory/drivers/cart-item/cart-item.service.mjs +40 -0
  160. package/esm2020/driver/in-memory/drivers/cart-order/cart-order.service.mjs +28 -0
  161. package/esm2020/driver/in-memory/drivers/cart-payment/cart-payment.service.mjs +37 -0
  162. package/esm2020/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.mjs +28 -0
  163. package/esm2020/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.mjs +31 -0
  164. package/esm2020/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.mjs +34 -0
  165. package/esm2020/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.mjs +28 -0
  166. package/{esm2015/driver/in-memory/drivers/public_api.js → esm2020/driver/in-memory/drivers/public_api.mjs} +0 -0
  167. package/{esm2015/driver/in-memory/index.js → esm2020/driver/in-memory/index.mjs} +0 -0
  168. package/{esm2015/driver/in-memory/injection-tokens/extra-attributes-hook.token.js → esm2020/driver/in-memory/injection-tokens/extra-attributes-hook.token.mjs} +0 -0
  169. package/{esm2015/driver/in-memory/injection-tokens/public_api.js → esm2020/driver/in-memory/injection-tokens/public_api.mjs} +0 -0
  170. package/{esm2015/driver/in-memory/public_api.js → esm2020/driver/in-memory/public_api.mjs} +0 -0
  171. package/{esm2015/driver/index.js → esm2020/driver/index.mjs} +0 -0
  172. package/{esm2015/driver/interfaces/cart-address-service.interface.js → esm2020/driver/interfaces/cart-address-service.interface.mjs} +0 -0
  173. package/{esm2015/driver/interfaces/cart-billing-address-service.interface.js → esm2020/driver/interfaces/cart-billing-address-service.interface.mjs} +0 -0
  174. package/{esm2015/driver/interfaces/cart-coupon-service.interface.js → esm2020/driver/interfaces/cart-coupon-service.interface.mjs} +0 -0
  175. package/{esm2015/driver/interfaces/cart-item-service.interface.js → esm2020/driver/interfaces/cart-item-service.interface.mjs} +0 -0
  176. package/{esm2015/driver/interfaces/cart-order-service.interface.js → esm2020/driver/interfaces/cart-order-service.interface.mjs} +0 -0
  177. package/{esm2015/driver/interfaces/cart-payment-methods-service.interface.js → esm2020/driver/interfaces/cart-payment-methods-service.interface.mjs} +0 -0
  178. package/{esm2015/driver/interfaces/cart-payment-service.interface.js → esm2020/driver/interfaces/cart-payment-service.interface.mjs} +0 -0
  179. package/{esm2015/driver/interfaces/cart-service.interface.js → esm2020/driver/interfaces/cart-service.interface.mjs} +0 -0
  180. package/{esm2015/driver/interfaces/cart-shipping-address-service.interface.js → esm2020/driver/interfaces/cart-shipping-address-service.interface.mjs} +0 -0
  181. package/{esm2015/driver/interfaces/cart-shipping-information-service.interface.js → esm2020/driver/interfaces/cart-shipping-information-service.interface.mjs} +0 -0
  182. package/{esm2015/driver/interfaces/cart-shipping-methods-service.interface.js → esm2020/driver/interfaces/cart-shipping-methods-service.interface.mjs} +0 -0
  183. package/{esm2015/driver/interfaces/public_api.js → esm2020/driver/interfaces/public_api.mjs} +0 -0
  184. package/esm2020/driver/magento/cart-address.service.mjs +64 -0
  185. package/esm2020/driver/magento/cart-billing-address.service.mjs +84 -0
  186. package/esm2020/driver/magento/cart-coupon.service.mjs +68 -0
  187. package/esm2020/driver/magento/cart-driver.module.mjs +112 -0
  188. package/esm2020/driver/magento/cart-item.service.mjs +111 -0
  189. package/esm2020/driver/magento/cart-order.service.mjs +43 -0
  190. package/esm2020/driver/magento/cart-payment-methods.service.mjs +39 -0
  191. package/esm2020/driver/magento/cart-payment.service.mjs +101 -0
  192. package/esm2020/driver/magento/cart-shipping-address.service.mjs +84 -0
  193. package/esm2020/driver/magento/cart-shipping-information.service.mjs +86 -0
  194. package/esm2020/driver/magento/cart-shipping-methods.service.mjs +39 -0
  195. package/esm2020/driver/magento/cart.service.mjs +75 -0
  196. package/esm2020/driver/magento/daffodil-cart-driver-magento.mjs +5 -0
  197. package/{esm2015/driver/magento/errors/codes.js → esm2020/driver/magento/errors/codes.mjs} +0 -0
  198. package/{esm2015/driver/magento/errors/map.js → esm2020/driver/magento/errors/map.mjs} +0 -0
  199. package/esm2020/driver/magento/errors/transform.mjs +37 -0
  200. package/{esm2015/driver/magento/index.js → esm2020/driver/magento/index.mjs} +0 -0
  201. package/{esm2015/driver/magento/injection-tokens/cart-mutation-queue.token.js → esm2020/driver/magento/injection-tokens/cart-mutation-queue.token.mjs} +0 -0
  202. package/{esm2015/driver/magento/injection-tokens/fragments/cart.js → esm2020/driver/magento/injection-tokens/fragments/cart.mjs} +0 -0
  203. package/{esm2015/driver/magento/injection-tokens/public_api.js → esm2020/driver/magento/injection-tokens/public_api.mjs} +0 -0
  204. package/{esm2015/driver/magento/injection-tokens/transforms/cart-item/token.js → esm2020/driver/magento/injection-tokens/transforms/cart-item/token.mjs} +0 -0
  205. package/{esm2015/driver/magento/interfaces/cart-item-transform.type.js → esm2020/driver/magento/interfaces/cart-item-transform.type.mjs} +0 -0
  206. package/{esm2015/driver/magento/interfaces/public_api.js → esm2020/driver/magento/interfaces/public_api.mjs} +0 -0
  207. package/{esm2015/driver/magento/models/public_api.js → esm2020/driver/magento/models/public_api.mjs} +0 -0
  208. package/{esm2015/driver/magento/models/requests/billing-address.js → esm2020/driver/magento/models/requests/billing-address.mjs} +0 -0
  209. package/{esm2015/driver/magento/models/requests/cart-address.js → esm2020/driver/magento/models/requests/cart-address.mjs} +0 -0
  210. package/{esm2015/driver/magento/models/requests/cart-item-update.js → esm2020/driver/magento/models/requests/cart-item-update.mjs} +0 -0
  211. package/{esm2015/driver/magento/models/requests/cart-item.js → esm2020/driver/magento/models/requests/cart-item.mjs} +0 -0
  212. package/{esm2015/driver/magento/models/requests/payment-method.js → esm2020/driver/magento/models/requests/payment-method.mjs} +0 -0
  213. package/{esm2015/driver/magento/models/requests/public_api.js → esm2020/driver/magento/models/requests/public_api.mjs} +0 -0
  214. package/{esm2015/driver/magento/models/requests/shipping-address.js → esm2020/driver/magento/models/requests/shipping-address.mjs} +0 -0
  215. package/{esm2015/driver/magento/models/requests/shipping-method.js → esm2020/driver/magento/models/requests/shipping-method.mjs} +0 -0
  216. package/{esm2015/driver/magento/models/responses/cart-address.js → esm2020/driver/magento/models/responses/cart-address.mjs} +0 -0
  217. package/{esm2015/driver/magento/models/responses/cart-coupon.js → esm2020/driver/magento/models/responses/cart-coupon.mjs} +0 -0
  218. package/{esm2015/driver/magento/models/responses/cart-item.js → esm2020/driver/magento/models/responses/cart-item.mjs} +0 -0
  219. package/{esm2015/driver/magento/models/responses/cart-payment-method.js → esm2020/driver/magento/models/responses/cart-payment-method.mjs} +0 -0
  220. package/{esm2015/driver/magento/models/responses/cart-shipping-method.js → esm2020/driver/magento/models/responses/cart-shipping-method.mjs} +0 -0
  221. package/{esm2015/driver/magento/models/responses/cart.js → esm2020/driver/magento/models/responses/cart.mjs} +0 -0
  222. package/{esm2015/driver/magento/models/responses/public_api.js → esm2020/driver/magento/models/responses/public_api.mjs} +0 -0
  223. package/{esm2015/driver/magento/models/responses/shipping-address.js → esm2020/driver/magento/models/responses/shipping-address.mjs} +0 -0
  224. package/{esm2015/driver/magento/public_api.js → esm2020/driver/magento/public_api.mjs} +0 -0
  225. package/{esm2015/driver/magento/queries/add-cart-item.js → esm2020/driver/magento/queries/add-cart-item.mjs} +0 -0
  226. package/{esm2015/driver/magento/queries/apply-coupon.js → esm2020/driver/magento/queries/apply-coupon.mjs} +0 -0
  227. package/{esm2015/driver/magento/queries/create-cart.js → esm2020/driver/magento/queries/create-cart.mjs} +0 -0
  228. package/{esm2015/driver/magento/queries/fragments/available-payment-method.js → esm2020/driver/magento/queries/fragments/available-payment-method.mjs} +0 -0
  229. package/{esm2015/driver/magento/queries/fragments/available-shipping-method.js → esm2020/driver/magento/queries/fragments/available-shipping-method.mjs} +0 -0
  230. package/{esm2015/driver/magento/queries/fragments/cart-address.js → esm2020/driver/magento/queries/fragments/cart-address.mjs} +0 -0
  231. package/{esm2015/driver/magento/queries/fragments/cart-coupon.js → esm2020/driver/magento/queries/fragments/cart-coupon.mjs} +0 -0
  232. package/{esm2015/driver/magento/queries/fragments/cart-item.js → esm2020/driver/magento/queries/fragments/cart-item.mjs} +0 -0
  233. package/{esm2015/driver/magento/queries/fragments/cart-totals.js → esm2020/driver/magento/queries/fragments/cart-totals.mjs} +0 -0
  234. package/{esm2015/driver/magento/queries/fragments/cart.js → esm2020/driver/magento/queries/fragments/cart.mjs} +0 -0
  235. package/{esm2015/driver/magento/queries/fragments/money.js → esm2020/driver/magento/queries/fragments/money.mjs} +0 -0
  236. package/{esm2015/driver/magento/queries/fragments/prices.js → esm2020/driver/magento/queries/fragments/prices.mjs} +0 -0
  237. package/{esm2015/driver/magento/queries/fragments/public_api.js → esm2020/driver/magento/queries/fragments/public_api.mjs} +0 -0
  238. package/{esm2015/driver/magento/queries/fragments/selected-payment-method.js → esm2020/driver/magento/queries/fragments/selected-payment-method.mjs} +0 -0
  239. package/{esm2015/driver/magento/queries/fragments/selected-shipping-method.js → esm2020/driver/magento/queries/fragments/selected-shipping-method.mjs} +0 -0
  240. package/{esm2015/driver/magento/queries/get-billing-address.js → esm2020/driver/magento/queries/get-billing-address.mjs} +0 -0
  241. package/{esm2015/driver/magento/queries/get-cart.js → esm2020/driver/magento/queries/get-cart.mjs} +0 -0
  242. package/{esm2015/driver/magento/queries/get-selected-payment-method.js → esm2020/driver/magento/queries/get-selected-payment-method.mjs} +0 -0
  243. package/{esm2015/driver/magento/queries/get-selected-shipping-method.js → esm2020/driver/magento/queries/get-selected-shipping-method.mjs} +0 -0
  244. package/{esm2015/driver/magento/queries/get-shipping-address.js → esm2020/driver/magento/queries/get-shipping-address.mjs} +0 -0
  245. package/{esm2015/driver/magento/queries/list-cart-coupons.js → esm2020/driver/magento/queries/list-cart-coupons.mjs} +0 -0
  246. package/{esm2015/driver/magento/queries/list-cart-items.js → esm2020/driver/magento/queries/list-cart-items.mjs} +0 -0
  247. package/{esm2015/driver/magento/queries/list-payment-methods.js → esm2020/driver/magento/queries/list-payment-methods.mjs} +0 -0
  248. package/{esm2015/driver/magento/queries/list-shipping-methods.js → esm2020/driver/magento/queries/list-shipping-methods.mjs} +0 -0
  249. package/{esm2015/driver/magento/queries/place-order.js → esm2020/driver/magento/queries/place-order.mjs} +0 -0
  250. package/{esm2015/driver/magento/queries/public_api.js → esm2020/driver/magento/queries/public_api.mjs} +0 -0
  251. package/{esm2015/driver/magento/queries/remove-all-coupons.js → esm2020/driver/magento/queries/remove-all-coupons.mjs} +0 -0
  252. package/{esm2015/driver/magento/queries/remove-cart-item.js → esm2020/driver/magento/queries/remove-cart-item.mjs} +0 -0
  253. package/{esm2015/driver/magento/queries/responses/add-cart-item.js → esm2020/driver/magento/queries/responses/add-cart-item.mjs} +0 -0
  254. package/{esm2015/driver/magento/queries/responses/apply-coupon.js → esm2020/driver/magento/queries/responses/apply-coupon.mjs} +0 -0
  255. package/{esm2015/driver/magento/queries/responses/create-cart.js → esm2020/driver/magento/queries/responses/create-cart.mjs} +0 -0
  256. package/{esm2015/driver/magento/queries/responses/get-billing-address.js → esm2020/driver/magento/queries/responses/get-billing-address.mjs} +0 -0
  257. package/{esm2015/driver/magento/queries/responses/get-cart.js → esm2020/driver/magento/queries/responses/get-cart.mjs} +0 -0
  258. package/{esm2015/driver/magento/queries/responses/get-selected-payment-method.js → esm2020/driver/magento/queries/responses/get-selected-payment-method.mjs} +0 -0
  259. package/{esm2015/driver/magento/queries/responses/get-selected-shipping-method.js → esm2020/driver/magento/queries/responses/get-selected-shipping-method.mjs} +0 -0
  260. package/{esm2015/driver/magento/queries/responses/get-shipping-address.js → esm2020/driver/magento/queries/responses/get-shipping-address.mjs} +0 -0
  261. package/{esm2015/driver/magento/queries/responses/list-cart-coupons.js → esm2020/driver/magento/queries/responses/list-cart-coupons.mjs} +0 -0
  262. package/{esm2015/driver/magento/queries/responses/list-cart-items.js → esm2020/driver/magento/queries/responses/list-cart-items.mjs} +0 -0
  263. package/{esm2015/driver/magento/queries/responses/list-payment-methods.js → esm2020/driver/magento/queries/responses/list-payment-methods.mjs} +0 -0
  264. package/{esm2015/driver/magento/queries/responses/list-shipping-methods.js → esm2020/driver/magento/queries/responses/list-shipping-methods.mjs} +0 -0
  265. package/{esm2015/driver/magento/queries/responses/place-order.js → esm2020/driver/magento/queries/responses/place-order.mjs} +0 -0
  266. package/{esm2015/driver/magento/queries/responses/public_api.js → esm2020/driver/magento/queries/responses/public_api.mjs} +0 -0
  267. package/{esm2015/driver/magento/queries/responses/remove-all-coupons.js → esm2020/driver/magento/queries/responses/remove-all-coupons.mjs} +0 -0
  268. package/{esm2015/driver/magento/queries/responses/remove-cart-item.js → esm2020/driver/magento/queries/responses/remove-cart-item.mjs} +0 -0
  269. package/{esm2015/driver/magento/queries/responses/set-guest-email.js → esm2020/driver/magento/queries/responses/set-guest-email.mjs} +0 -0
  270. package/{esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing-and-email.js → esm2020/driver/magento/queries/responses/set-selected-payment-method-with-billing-and-email.mjs} +0 -0
  271. package/{esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing.js → esm2020/driver/magento/queries/responses/set-selected-payment-method-with-billing.mjs} +0 -0
  272. package/{esm2015/driver/magento/queries/responses/set-selected-payment-method.js → esm2020/driver/magento/queries/responses/set-selected-payment-method.mjs} +0 -0
  273. package/{esm2015/driver/magento/queries/responses/set-selected-shipping-method.js → esm2020/driver/magento/queries/responses/set-selected-shipping-method.mjs} +0 -0
  274. package/{esm2015/driver/magento/queries/responses/update-address-with-email.js → esm2020/driver/magento/queries/responses/update-address-with-email.mjs} +0 -0
  275. package/{esm2015/driver/magento/queries/responses/update-address.js → esm2020/driver/magento/queries/responses/update-address.mjs} +0 -0
  276. package/{esm2015/driver/magento/queries/responses/update-billing-address-with-email.js → esm2020/driver/magento/queries/responses/update-billing-address-with-email.mjs} +0 -0
  277. package/{esm2015/driver/magento/queries/responses/update-billing-address.js → esm2020/driver/magento/queries/responses/update-billing-address.mjs} +0 -0
  278. package/{esm2015/driver/magento/queries/responses/update-cart-item.js → esm2020/driver/magento/queries/responses/update-cart-item.mjs} +0 -0
  279. package/{esm2015/driver/magento/queries/responses/update-shipping-address-with-email.js → esm2020/driver/magento/queries/responses/update-shipping-address-with-email.mjs} +0 -0
  280. package/{esm2015/driver/magento/queries/responses/update-shipping-address.js → esm2020/driver/magento/queries/responses/update-shipping-address.mjs} +0 -0
  281. package/{esm2015/driver/magento/queries/set-selected-payment-method-with-billing-and-email.js → esm2020/driver/magento/queries/set-selected-payment-method-with-billing-and-email.mjs} +0 -0
  282. package/{esm2015/driver/magento/queries/set-selected-payment-method-with-billing.js → esm2020/driver/magento/queries/set-selected-payment-method-with-billing.mjs} +0 -0
  283. package/{esm2015/driver/magento/queries/set-selected-payment-method.js → esm2020/driver/magento/queries/set-selected-payment-method.mjs} +0 -0
  284. package/{esm2015/driver/magento/queries/set-selected-shipping-method.js → esm2020/driver/magento/queries/set-selected-shipping-method.mjs} +0 -0
  285. package/{esm2015/driver/magento/queries/update-address-with-email.js → esm2020/driver/magento/queries/update-address-with-email.mjs} +0 -0
  286. package/{esm2015/driver/magento/queries/update-address.js → esm2020/driver/magento/queries/update-address.mjs} +0 -0
  287. package/{esm2015/driver/magento/queries/update-billing-address-with-email.js → esm2020/driver/magento/queries/update-billing-address-with-email.mjs} +0 -0
  288. package/{esm2015/driver/magento/queries/update-billing-address.js → esm2020/driver/magento/queries/update-billing-address.mjs} +0 -0
  289. package/{esm2015/driver/magento/queries/update-cart-item.js → esm2020/driver/magento/queries/update-cart-item.mjs} +0 -0
  290. package/{esm2015/driver/magento/queries/update-shipping-address-with-email.js → esm2020/driver/magento/queries/update-shipping-address-with-email.mjs} +0 -0
  291. package/{esm2015/driver/magento/queries/update-shipping-address.js → esm2020/driver/magento/queries/update-shipping-address.mjs} +0 -0
  292. package/{esm2015/driver/magento/testing/daffodil-cart-driver-magento-testing.js → esm2020/driver/magento/testing/daffodil-cart-driver-magento-testing.mjs} +0 -0
  293. package/{esm2015/driver/magento/testing/factories/cart-address-input.factory.js → esm2020/driver/magento/testing/factories/cart-address-input.factory.mjs} +9 -9
  294. package/{esm2015/driver/magento/testing/factories/cart-address.factory.js → esm2020/driver/magento/testing/factories/cart-address.factory.mjs} +9 -9
  295. package/esm2020/driver/magento/testing/factories/cart-coupon.factory.mjs +24 -0
  296. package/{esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js → esm2020/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.mjs} +9 -9
  297. package/{esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js → esm2020/driver/magento/testing/factories/cart-item/cart-item.factory.mjs} +9 -9
  298. package/esm2020/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.mjs +35 -0
  299. package/esm2020/driver/magento/testing/factories/cart-payment-method.factory.mjs +25 -0
  300. package/esm2020/driver/magento/testing/factories/cart-shipping-method.factory.mjs +31 -0
  301. package/{esm2015/driver/magento/testing/factories/cart.factory.js → esm2020/driver/magento/testing/factories/cart.factory.mjs} +9 -9
  302. package/{esm2015/driver/magento/testing/factories/public_api.js → esm2020/driver/magento/testing/factories/public_api.mjs} +0 -0
  303. package/esm2020/driver/magento/testing/factories/shipping-address.factory.mjs +26 -0
  304. package/{esm2015/driver/magento/testing/index.js → esm2020/driver/magento/testing/index.mjs} +0 -0
  305. package/{esm2015/driver/magento/testing/public_api.js → esm2020/driver/magento/testing/public_api.mjs} +0 -0
  306. package/esm2020/driver/magento/transforms/inputs/billing-address.service.mjs +29 -0
  307. package/esm2020/driver/magento/transforms/inputs/cart-address.service.mjs +26 -0
  308. package/esm2020/driver/magento/transforms/inputs/cart-item-input-transformers.mjs +20 -0
  309. package/esm2020/driver/magento/transforms/inputs/cart-item-update.service.mjs +19 -0
  310. package/esm2020/driver/magento/transforms/inputs/payment-method.service.mjs +18 -0
  311. package/esm2020/driver/magento/transforms/inputs/shipping-address.service.mjs +29 -0
  312. package/esm2020/driver/magento/transforms/inputs/shipping-method.service.mjs +19 -0
  313. package/esm2020/driver/magento/transforms/outputs/billing-address.service.mjs +32 -0
  314. package/esm2020/driver/magento/transforms/outputs/cart-address.service.mjs +43 -0
  315. package/esm2020/driver/magento/transforms/outputs/cart-coupon-response.service.mjs +59 -0
  316. package/{esm2015/driver/magento/transforms/outputs/cart-coupon.js → esm2020/driver/magento/transforms/outputs/cart-coupon.mjs} +0 -0
  317. package/esm2020/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.mjs +23 -0
  318. package/{esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js → esm2020/driver/magento/transforms/outputs/cart-item/cart-item-transformer.mjs} +0 -0
  319. package/esm2020/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.mjs +21 -0
  320. package/esm2020/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.mjs +35 -0
  321. package/esm2020/driver/magento/transforms/outputs/cart-payment.service.mjs +26 -0
  322. package/esm2020/driver/magento/transforms/outputs/cart-shipping-information.service.mjs +33 -0
  323. package/esm2020/driver/magento/transforms/outputs/cart-shipping-rate.service.mjs +33 -0
  324. package/{esm2015/driver/magento/transforms/outputs/cart-totals-transformer.js → esm2020/driver/magento/transforms/outputs/cart-totals-transformer.mjs} +2 -3
  325. package/esm2020/driver/magento/transforms/outputs/cart.service.mjs +125 -0
  326. package/esm2020/driver/magento/transforms/outputs/shipping-address.service.mjs +32 -0
  327. package/{esm2015/driver/magento/transforms/public_api.js → esm2020/driver/magento/transforms/public_api.mjs} +0 -0
  328. package/{esm2015/driver/public_api.js → esm2020/driver/public_api.mjs} +0 -0
  329. package/{esm2015/driver/testing/daffodil-cart-driver-testing.js → esm2020/driver/testing/daffodil-cart-driver-testing.mjs} +0 -0
  330. package/esm2020/driver/testing/drivers/cart/cart.service.mjs +39 -0
  331. package/esm2020/driver/testing/drivers/cart-address/cart-address.service.mjs +26 -0
  332. package/esm2020/driver/testing/drivers/cart-billing-address/cart-billing-address.service.mjs +29 -0
  333. package/esm2020/driver/testing/drivers/cart-coupon/cart-coupon.service.mjs +35 -0
  334. package/esm2020/driver/testing/drivers/cart-driver.module.mjs +82 -0
  335. package/esm2020/driver/testing/drivers/cart-item/cart-item.service.mjs +38 -0
  336. package/esm2020/driver/testing/drivers/cart-order/cart-order.service.mjs +25 -0
  337. package/esm2020/driver/testing/drivers/cart-payment/cart-payment.service.mjs +35 -0
  338. package/esm2020/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.mjs +25 -0
  339. package/esm2020/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.mjs +29 -0
  340. package/esm2020/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.mjs +32 -0
  341. package/esm2020/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.mjs +25 -0
  342. package/{esm2015/driver/testing/drivers/public_api.js → esm2020/driver/testing/drivers/public_api.mjs} +0 -0
  343. package/{esm2015/driver/testing/index.js → esm2020/driver/testing/index.mjs} +0 -0
  344. package/{esm2015/driver/testing/public_api.js → esm2020/driver/testing/public_api.mjs} +0 -0
  345. package/{esm2015/errors/codes.enum.js → esm2020/errors/codes.enum.mjs} +0 -0
  346. package/{esm2015/errors/map.js → esm2020/errors/map.mjs} +0 -0
  347. package/{esm2015/errors/public_api.js → esm2020/errors/public_api.mjs} +0 -0
  348. package/{esm2015/errors/resolution/cart-not-found-or-created-resolution.js → esm2020/errors/resolution/cart-not-found-or-created-resolution.mjs} +0 -0
  349. package/{esm2015/errors/resolution/cart-resolution.js → esm2020/errors/resolution/cart-resolution.mjs} +0 -0
  350. package/{esm2015/errors/resolution/cart-server-side-resolution.js → esm2020/errors/resolution/cart-server-side-resolution.mjs} +0 -0
  351. package/{esm2015/errors/resolution/cart-storage-resolution.js → esm2020/errors/resolution/cart-storage-resolution.mjs} +0 -0
  352. package/{esm2015/errors/resolution/public_api.js → esm2020/errors/resolution/public_api.mjs} +0 -0
  353. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  354. package/{esm2015/injection-tokens/error-matcher.token.js → esm2020/injection-tokens/error-matcher.token.mjs} +0 -0
  355. package/{esm2015/injection-tokens/payment-method-map.js → esm2020/injection-tokens/payment-method-map.mjs} +0 -0
  356. package/{esm2015/injection-tokens/public_api.js → esm2020/injection-tokens/public_api.mjs} +0 -0
  357. package/{esm2015/models/cart-address.js → esm2020/models/cart-address.mjs} +0 -0
  358. package/{esm2015/models/cart-coupon.js → esm2020/models/cart-coupon.mjs} +0 -0
  359. package/{esm2015/models/cart-item-input.js → esm2020/models/cart-item-input.mjs} +0 -0
  360. package/{esm2015/models/cart-item.js → esm2020/models/cart-item.mjs} +0 -0
  361. package/{esm2015/models/cart-order-result.js → esm2020/models/cart-order-result.mjs} +0 -0
  362. package/{esm2015/models/cart-payment.js → esm2020/models/cart-payment.mjs} +0 -0
  363. package/{esm2015/models/cart-shipping-info.js → esm2020/models/cart-shipping-info.mjs} +0 -0
  364. package/{esm2015/models/cart-shipping-rate.js → esm2020/models/cart-shipping-rate.mjs} +0 -0
  365. package/{esm2015/models/cart-total.js → esm2020/models/cart-total.mjs} +0 -0
  366. package/{esm2015/models/cart.js → esm2020/models/cart.mjs} +0 -0
  367. package/{esm2015/models/composite-cart-item.js → esm2020/models/composite-cart-item.mjs} +0 -0
  368. package/{esm2015/models/configurable-cart-item.js → esm2020/models/configurable-cart-item.mjs} +0 -0
  369. package/{esm2015/models/public_api.js → esm2020/models/public_api.mjs} +0 -0
  370. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  371. package/esm2020/routing/cart-routing.module.mjs +49 -0
  372. package/esm2020/routing/config/config.mjs +19 -0
  373. package/{esm2015/routing/config/resolution/config.js → esm2020/routing/config/resolution/config.mjs} +0 -0
  374. package/{esm2015/routing/daffodil-cart-routing.js → esm2020/routing/daffodil-cart-routing.mjs} +0 -0
  375. package/{esm2015/routing/guards/billing-address/billing-address-guard-redirect.token.js → esm2020/routing/guards/billing-address/billing-address-guard-redirect.token.mjs} +0 -0
  376. package/esm2020/routing/guards/billing-address/billing-address.guard.mjs +40 -0
  377. package/{esm2015/routing/guards/cart-items/cart-items-guard-redirect.token.js → esm2020/routing/guards/cart-items/cart-items-guard-redirect.token.mjs} +0 -0
  378. package/esm2020/routing/guards/cart-items/cart-items.guard.mjs +41 -0
  379. package/{esm2015/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.js → esm2020/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.mjs} +0 -0
  380. package/esm2020/routing/guards/in-stock-items/in-stock-items.guard.mjs +41 -0
  381. package/{esm2015/routing/guards/order-result/order-result-guard-redirect.token.js → esm2020/routing/guards/order-result/order-result-guard-redirect.token.mjs} +0 -0
  382. package/esm2020/routing/guards/order-result/order-result.guard.mjs +38 -0
  383. package/{esm2015/routing/guards/payment-method/payment-method-guard-redirect.token.js → esm2020/routing/guards/payment-method/payment-method-guard-redirect.token.mjs} +0 -0
  384. package/esm2020/routing/guards/payment-method/payment-method.guard.mjs +40 -0
  385. package/{esm2015/routing/guards/public_api.js → esm2020/routing/guards/public_api.mjs} +0 -0
  386. package/esm2020/routing/guards/resolved-cart/resolved-cart.guard.mjs +42 -0
  387. package/{esm2015/routing/guards/shipping-address/shipping-address-guard-redirect.token.js → esm2020/routing/guards/shipping-address/shipping-address-guard-redirect.token.mjs} +0 -0
  388. package/esm2020/routing/guards/shipping-address/shipping-address.guard.mjs +40 -0
  389. package/{esm2015/routing/guards/shipping-method/shipping-method-guard-redirect.token.js → esm2020/routing/guards/shipping-method/shipping-method-guard-redirect.token.mjs} +0 -0
  390. package/esm2020/routing/guards/shipping-method/shipping-method.guard.mjs +40 -0
  391. package/{esm2015/routing/index.js → esm2020/routing/index.mjs} +0 -0
  392. package/{esm2015/routing/public_api.js → esm2020/routing/public_api.mjs} +0 -0
  393. package/esm2020/routing/resolvers/cart-resolver.service.mjs +45 -0
  394. package/esm2020/routing/resolvers/empty-cart-resolver.service.mjs +42 -0
  395. package/{esm2015/routing/resolvers/public_api.js → esm2020/routing/resolvers/public_api.mjs} +0 -0
  396. package/{esm2015/routing/resolvers/tokens/cart-resolver-redirect.token.js → esm2020/routing/resolvers/tokens/cart-resolver-redirect.token.mjs} +0 -0
  397. package/{esm2015/routing/resolvers/tokens/empty-cart-resolver-redirect.token.js → esm2020/routing/resolvers/tokens/empty-cart-resolver-redirect.token.mjs} +0 -0
  398. package/{esm2015/state/actions/cart-address.actions.js → esm2020/state/actions/cart-address.actions.mjs} +0 -0
  399. package/{esm2015/state/actions/cart-billing-address.actions.js → esm2020/state/actions/cart-billing-address.actions.mjs} +0 -0
  400. package/{esm2015/state/actions/cart-coupon.actions.js → esm2020/state/actions/cart-coupon.actions.mjs} +0 -0
  401. package/{esm2015/state/actions/cart-item.actions.js → esm2020/state/actions/cart-item.actions.mjs} +0 -0
  402. package/{esm2015/state/actions/cart-order.actions.js → esm2020/state/actions/cart-order.actions.mjs} +0 -0
  403. package/{esm2015/state/actions/cart-payment-methods.actions.js → esm2020/state/actions/cart-payment-methods.actions.mjs} +0 -0
  404. package/{esm2015/state/actions/cart-payment.actions.js → esm2020/state/actions/cart-payment.actions.mjs} +0 -0
  405. package/{esm2015/state/actions/cart-shipping-address.actions.js → esm2020/state/actions/cart-shipping-address.actions.mjs} +0 -0
  406. package/{esm2015/state/actions/cart-shipping-information.actions.js → esm2020/state/actions/cart-shipping-information.actions.mjs} +0 -0
  407. package/{esm2015/state/actions/cart-shipping-methods.actions.js → esm2020/state/actions/cart-shipping-methods.actions.mjs} +0 -0
  408. package/{esm2015/state/actions/cart.actions.js → esm2020/state/actions/cart.actions.mjs} +0 -0
  409. package/{esm2015/state/actions/public_api.js → esm2020/state/actions/public_api.mjs} +0 -0
  410. package/esm2020/state/cart-state.module.mjs +70 -0
  411. package/esm2020/state/daffodil-cart-state.mjs +5 -0
  412. package/esm2020/state/effects/cart-address.effects.mjs +34 -0
  413. package/esm2020/state/effects/cart-billing-address.effects.mjs +32 -0
  414. package/esm2020/state/effects/cart-coupon.effects.mjs +43 -0
  415. package/esm2020/state/effects/cart-item.effects.mjs +52 -0
  416. package/esm2020/state/effects/cart-order.effects.mjs +35 -0
  417. package/esm2020/state/effects/cart-payment-methods.effects.mjs +31 -0
  418. package/esm2020/state/effects/cart-payment.effects.mjs +34 -0
  419. package/esm2020/state/effects/cart-resolver.effects.mjs +69 -0
  420. package/esm2020/state/effects/cart-shipping-address.effects.mjs +32 -0
  421. package/esm2020/state/effects/cart-shipping-information.effects.mjs +33 -0
  422. package/esm2020/state/effects/cart-shipping-methods.effects.mjs +31 -0
  423. package/esm2020/state/effects/cart.effects.mjs +51 -0
  424. package/{esm2015/state/facades/cart/cart-facade.interface.js → esm2020/state/facades/cart/cart-facade.interface.mjs} +0 -0
  425. package/{esm2015/state/facades/cart/cart.facade.js → esm2020/state/facades/cart/cart.facade.mjs} +12 -13
  426. package/{esm2015/state/index.js → esm2020/state/index.mjs} +0 -0
  427. package/{esm2015/state/injection-tokens/cart-item-state-debounce-time.js → esm2020/state/injection-tokens/cart-item-state-debounce-time.mjs} +0 -0
  428. package/{esm2015/state/injection-tokens/public_api.js → esm2020/state/injection-tokens/public_api.mjs} +0 -0
  429. package/{esm2015/state/models/public_api.js → esm2020/state/models/public_api.mjs} +0 -0
  430. package/{esm2015/state/models/stateful-cart-item.js → esm2020/state/models/stateful-cart-item.mjs} +0 -0
  431. package/{esm2015/state/models/stateful-composite-cart-item.js → esm2020/state/models/stateful-composite-cart-item.mjs} +0 -0
  432. package/{esm2015/state/models/stateful-configurable-cart-item.js → esm2020/state/models/stateful-configurable-cart-item.mjs} +0 -0
  433. package/{esm2015/state/public_api.js → esm2020/state/public_api.mjs} +0 -0
  434. package/{esm2015/state/reducers/action-types.type.js → esm2020/state/reducers/action-types.type.mjs} +0 -0
  435. package/esm2020/state/reducers/cart/cart.reducer.mjs +78 -0
  436. package/esm2020/state/reducers/cart-billing-address/cart-billing-address.reducer.mjs +55 -0
  437. package/esm2020/state/reducers/cart-coupon/cart-coupon.reducer.mjs +63 -0
  438. package/{esm2015/state/reducers/cart-initial-state.js → esm2020/state/reducers/cart-initial-state.mjs} +0 -0
  439. package/esm2020/state/reducers/cart-item/cart-item.reducer.mjs +94 -0
  440. package/esm2020/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.mjs +9 -0
  441. package/esm2020/state/reducers/cart-item-entities/cart-item-entities.reducer.mjs +87 -0
  442. package/{esm2015/state/reducers/cart-operation-type.enum.js → esm2020/state/reducers/cart-operation-type.enum.mjs} +0 -0
  443. package/{esm2015/state/reducers/cart-order/cart-order-initial-state.js → esm2020/state/reducers/cart-order/cart-order-initial-state.mjs} +0 -0
  444. package/{esm2015/state/reducers/cart-order/cart-order-state.interface.js → esm2020/state/reducers/cart-order/cart-order-state.interface.mjs} +0 -0
  445. package/esm2020/state/reducers/cart-order/cart-order.reducer.mjs +30 -0
  446. package/esm2020/state/reducers/cart-payment/cart-payment.reducer.mjs +83 -0
  447. package/esm2020/state/reducers/cart-payment-methods/cart-payment-methods.reducer.mjs +36 -0
  448. package/{esm2015/state/reducers/cart-reducers-state.interface.js → esm2020/state/reducers/cart-reducers-state.interface.mjs} +0 -0
  449. package/{esm2015/state/reducers/cart-reducers.js → esm2020/state/reducers/cart-reducers.mjs} +0 -0
  450. package/{esm2015/state/reducers/cart-resolve/cart-resolve-state.enum.js → esm2020/state/reducers/cart-resolve/cart-resolve-state.enum.mjs} +0 -0
  451. package/esm2020/state/reducers/cart-resolve/cart-resolve.reducer.mjs +30 -0
  452. package/esm2020/state/reducers/cart-shipping-address/cart-shipping-address.reducer.mjs +55 -0
  453. package/esm2020/state/reducers/cart-shipping-information/cart-shipping-information.reducer.mjs +58 -0
  454. package/esm2020/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.mjs +36 -0
  455. package/{esm2015/state/reducers/cart-state.interface.js → esm2020/state/reducers/cart-state.interface.mjs} +0 -0
  456. package/{esm2015/state/reducers/cart-store-feature-key.js → esm2020/state/reducers/cart-store-feature-key.mjs} +0 -0
  457. package/{esm2015/state/reducers/cart.reducer.js → esm2020/state/reducers/cart.reducer.mjs} +0 -0
  458. package/{esm2015/state/reducers/errors/cart-errors.type.js → esm2020/state/reducers/errors/cart-errors.type.mjs} +0 -0
  459. package/esm2020/state/reducers/errors/error-state-helpers.mjs +13 -0
  460. package/esm2020/state/reducers/loading/cart-loading.type.mjs +8 -0
  461. package/{esm2015/state/reducers/public_api.js → esm2020/state/reducers/public_api.mjs} +0 -0
  462. package/{esm2015/state/reducers/token/extra.token.js → esm2020/state/reducers/token/extra.token.mjs} +0 -0
  463. package/{esm2015/state/reducers/token/public_api.js → esm2020/state/reducers/token/public_api.mjs} +0 -0
  464. package/{esm2015/state/reducers/token/reducers.token.js → esm2020/state/reducers/token/reducers.token.mjs} +0 -0
  465. package/esm2020/state/selectors/cart/cart.selector.mjs +219 -0
  466. package/{esm2015/state/selectors/cart-feature.selector.js → esm2020/state/selectors/cart-feature.selector.mjs} +3 -5
  467. package/esm2020/state/selectors/cart-item-entities/cart-item-entities.selectors.mjs +95 -0
  468. package/esm2020/state/selectors/cart-order/cart-order.selector.mjs +30 -0
  469. package/esm2020/state/selectors/cart.selector.mjs +17 -0
  470. package/{esm2015/state/selectors/public_api.js → esm2020/state/selectors/public_api.mjs} +0 -0
  471. package/esm2020/state/testing/cart-testing.module.mjs +20 -0
  472. package/{esm2015/state/testing/daffodil-cart-state-testing.js → esm2020/state/testing/daffodil-cart-state-testing.mjs} +0 -0
  473. package/esm2020/state/testing/factories/stateful-cart-item.factory.mjs +26 -0
  474. package/esm2020/state/testing/factories/stateful-composite-cart-item.factory.mjs +24 -0
  475. package/esm2020/state/testing/factories/stateful-configurable-cart-item.factory.mjs +24 -0
  476. package/{esm2015/state/testing/index.js → esm2020/state/testing/index.mjs} +0 -0
  477. package/{esm2015/state/testing/mock-cart-facade.js → esm2020/state/testing/mock-cart-facade.mjs} +7 -5
  478. package/{esm2015/state/testing/public_api.js → esm2020/state/testing/public_api.mjs} +0 -0
  479. package/esm2020/storage/cart-storage.service.mjs +49 -0
  480. package/{esm2015/testing/daffodil-cart-testing.js → esm2020/testing/daffodil-cart-testing.mjs} +0 -0
  481. package/{esm2015/testing/factories/cart-address.factory.js → esm2020/testing/factories/cart-address.factory.mjs} +9 -9
  482. package/esm2020/testing/factories/cart-coupon.factory.mjs +27 -0
  483. package/{esm2015/testing/factories/cart-item/cart-item.factory.js → esm2020/testing/factories/cart-item/cart-item.factory.mjs} +9 -9
  484. package/{esm2015/testing/factories/cart-item/composite-cart-item.factory.js → esm2020/testing/factories/cart-item/composite-cart-item.factory.mjs} +9 -9
  485. package/esm2020/testing/factories/cart-item/configurable-cart-item.factory.mjs +35 -0
  486. package/esm2020/testing/factories/cart-payment.factory.mjs +22 -0
  487. package/esm2020/testing/factories/cart-shipping-rate.factory.mjs +29 -0
  488. package/{esm2015/testing/factories/cart.factory.js → esm2020/testing/factories/cart.factory.mjs} +9 -9
  489. package/{esm2015/testing/factories/public_api.js → esm2020/testing/factories/public_api.mjs} +0 -0
  490. package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
  491. package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
  492. package/fesm2015/{daffodil-cart-driver-in-memory.js → daffodil-cart-driver-in-memory.mjs} +419 -422
  493. package/fesm2015/daffodil-cart-driver-in-memory.mjs.map +1 -0
  494. package/fesm2015/daffodil-cart-driver-magento-testing.mjs +331 -0
  495. package/fesm2015/daffodil-cart-driver-magento-testing.mjs.map +1 -0
  496. package/fesm2015/{daffodil-cart-driver-magento.js → daffodil-cart-driver-magento.mjs} +436 -399
  497. package/fesm2015/daffodil-cart-driver-magento.mjs.map +1 -0
  498. package/fesm2015/daffodil-cart-driver-testing.mjs +365 -0
  499. package/fesm2015/daffodil-cart-driver-testing.mjs.map +1 -0
  500. package/fesm2015/{daffodil-cart-driver.js → daffodil-cart-driver.mjs} +1 -1
  501. package/fesm2015/daffodil-cart-driver.mjs.map +1 -0
  502. package/fesm2015/daffodil-cart-routing.mjs +449 -0
  503. package/fesm2015/daffodil-cart-routing.mjs.map +1 -0
  504. package/fesm2015/{daffodil-cart-state-testing.js → daffodil-cart-state-testing.mjs} +46 -37
  505. package/fesm2015/daffodil-cart-state-testing.mjs.map +1 -0
  506. package/fesm2015/{daffodil-cart-state.js → daffodil-cart-state.mjs} +382 -461
  507. package/fesm2015/daffodil-cart-state.mjs.map +1 -0
  508. package/fesm2015/daffodil-cart-testing.mjs +292 -0
  509. package/fesm2015/daffodil-cart-testing.mjs.map +1 -0
  510. package/fesm2015/{daffodil-cart.js → daffodil-cart.mjs} +18 -19
  511. package/fesm2015/daffodil-cart.mjs.map +1 -0
  512. package/fesm2020/daffodil-cart-driver-in-memory.mjs +1168 -0
  513. package/fesm2020/daffodil-cart-driver-in-memory.mjs.map +1 -0
  514. package/fesm2020/daffodil-cart-driver-magento-testing.mjs +331 -0
  515. package/fesm2020/daffodil-cart-driver-magento-testing.mjs.map +1 -0
  516. package/fesm2020/daffodil-cart-driver-magento.mjs +2219 -0
  517. package/fesm2020/daffodil-cart-driver-magento.mjs.map +1 -0
  518. package/fesm2020/daffodil-cart-driver-testing.mjs +365 -0
  519. package/fesm2020/daffodil-cart-driver-testing.mjs.map +1 -0
  520. package/fesm2020/daffodil-cart-driver.mjs +176 -0
  521. package/fesm2020/daffodil-cart-driver.mjs.map +1 -0
  522. package/fesm2020/daffodil-cart-routing.mjs +434 -0
  523. package/fesm2020/daffodil-cart-routing.mjs.map +1 -0
  524. package/fesm2020/daffodil-cart-state-testing.mjs +218 -0
  525. package/fesm2020/daffodil-cart-state-testing.mjs.map +1 -0
  526. package/fesm2020/daffodil-cart-state.mjs +2803 -0
  527. package/fesm2020/daffodil-cart-state.mjs.map +1 -0
  528. package/fesm2020/daffodil-cart-testing.mjs +292 -0
  529. package/fesm2020/daffodil-cart-testing.mjs.map +1 -0
  530. package/fesm2020/daffodil-cart.mjs +174 -0
  531. package/fesm2020/daffodil-cart.mjs.map +1 -0
  532. package/package.json +104 -20
  533. package/routing/cart-routing.module.d.ts +4 -0
  534. package/routing/daffodil-cart-routing.d.ts +1 -0
  535. package/routing/guards/billing-address/billing-address.guard.d.ts +3 -0
  536. package/routing/guards/cart-items/cart-items.guard.d.ts +3 -0
  537. package/routing/guards/in-stock-items/in-stock-items.guard.d.ts +3 -0
  538. package/routing/guards/order-result/order-result.guard.d.ts +3 -0
  539. package/routing/guards/payment-method/payment-method.guard.d.ts +3 -0
  540. package/routing/guards/resolved-cart/resolved-cart.guard.d.ts +3 -0
  541. package/routing/guards/shipping-address/shipping-address.guard.d.ts +3 -0
  542. package/routing/guards/shipping-method/shipping-method.guard.d.ts +3 -0
  543. package/routing/package.json +5 -6
  544. package/routing/resolvers/cart-resolver.service.d.ts +3 -0
  545. package/routing/resolvers/empty-cart-resolver.service.d.ts +3 -0
  546. package/state/cart-state.module.d.ts +6 -0
  547. package/state/daffodil-cart-state.d.ts +1 -24
  548. package/state/effects/cart-address.effects.d.ts +11 -8
  549. package/state/effects/cart-billing-address.effects.d.ts +12 -9
  550. package/state/effects/cart-coupon.effects.d.ts +7 -4
  551. package/state/effects/cart-item.effects.d.ts +37 -34
  552. package/state/effects/cart-order.effects.d.ts +5 -2
  553. package/state/effects/cart-payment-methods.effects.d.ts +4 -1
  554. package/state/effects/cart-payment.effects.d.ts +12 -9
  555. package/state/effects/cart-resolver.effects.d.ts +4 -1
  556. package/state/effects/cart-shipping-address.effects.d.ts +12 -9
  557. package/state/effects/cart-shipping-information.effects.d.ts +22 -19
  558. package/state/effects/cart-shipping-methods.effects.d.ts +4 -1
  559. package/state/effects/cart.effects.d.ts +17 -14
  560. package/state/facades/cart/cart.facade.d.ts +3 -0
  561. package/state/package.json +5 -6
  562. package/state/reducers/token/reducers.token.d.ts +1 -1
  563. package/state/testing/cart-testing.module.d.ts +4 -0
  564. package/state/testing/daffodil-cart-state-testing.d.ts +1 -0
  565. package/state/testing/factories/stateful-cart-item.factory.d.ts +3 -0
  566. package/state/testing/factories/stateful-composite-cart-item.factory.d.ts +3 -0
  567. package/state/testing/factories/stateful-configurable-cart-item.factory.d.ts +3 -0
  568. package/state/testing/mock-cart-facade.d.ts +3 -0
  569. package/state/testing/package.json +5 -6
  570. package/storage/cart-storage.service.d.ts +3 -0
  571. package/testing/daffodil-cart-testing.d.ts +1 -0
  572. package/testing/factories/cart-address.factory.d.ts +3 -0
  573. package/testing/factories/cart-coupon.factory.d.ts +3 -0
  574. package/testing/factories/cart-item/cart-item.factory.d.ts +3 -0
  575. package/testing/factories/cart-item/composite-cart-item.factory.d.ts +3 -0
  576. package/testing/factories/cart-item/configurable-cart-item.factory.d.ts +3 -0
  577. package/testing/factories/cart-payment.factory.d.ts +3 -0
  578. package/testing/factories/cart-shipping-rate.factory.d.ts +3 -0
  579. package/testing/factories/cart.factory.d.ts +3 -0
  580. package/testing/package.json +5 -6
  581. package/bundles/daffodil-cart-driver-in-memory.umd.js +0 -1530
  582. package/bundles/daffodil-cart-driver-in-memory.umd.js.map +0 -1
  583. package/bundles/daffodil-cart-driver-in-memory.umd.min.js +0 -2
  584. package/bundles/daffodil-cart-driver-in-memory.umd.min.js.map +0 -1
  585. package/bundles/daffodil-cart-driver-magento-testing.umd.js +0 -707
  586. package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +0 -1
  587. package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +0 -16
  588. package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +0 -1
  589. package/bundles/daffodil-cart-driver-magento.umd.js +0 -2079
  590. package/bundles/daffodil-cart-driver-magento.umd.js.map +0 -1
  591. package/bundles/daffodil-cart-driver-magento.umd.min.js +0 -2
  592. package/bundles/daffodil-cart-driver-magento.umd.min.js.map +0 -1
  593. package/bundles/daffodil-cart-driver-testing.umd.js +0 -413
  594. package/bundles/daffodil-cart-driver-testing.umd.js.map +0 -1
  595. package/bundles/daffodil-cart-driver-testing.umd.min.js +0 -2
  596. package/bundles/daffodil-cart-driver-testing.umd.min.js.map +0 -1
  597. package/bundles/daffodil-cart-driver.umd.js +0 -552
  598. package/bundles/daffodil-cart-driver.umd.js.map +0 -1
  599. package/bundles/daffodil-cart-driver.umd.min.js +0 -17
  600. package/bundles/daffodil-cart-driver.umd.min.js.map +0 -1
  601. package/bundles/daffodil-cart-routing.umd.js +0 -473
  602. package/bundles/daffodil-cart-routing.umd.js.map +0 -1
  603. package/bundles/daffodil-cart-routing.umd.min.js +0 -2
  604. package/bundles/daffodil-cart-routing.umd.min.js.map +0 -1
  605. package/bundles/daffodil-cart-state-testing.umd.js +0 -557
  606. package/bundles/daffodil-cart-state-testing.umd.js.map +0 -1
  607. package/bundles/daffodil-cart-state-testing.umd.min.js +0 -17
  608. package/bundles/daffodil-cart-state-testing.umd.min.js.map +0 -1
  609. package/bundles/daffodil-cart-state.umd.js +0 -3191
  610. package/bundles/daffodil-cart-state.umd.js.map +0 -1
  611. package/bundles/daffodil-cart-state.umd.min.js +0 -2
  612. package/bundles/daffodil-cart-state.umd.min.js.map +0 -1
  613. package/bundles/daffodil-cart-testing.umd.js +0 -653
  614. package/bundles/daffodil-cart-testing.umd.js.map +0 -1
  615. package/bundles/daffodil-cart-testing.umd.min.js +0 -16
  616. package/bundles/daffodil-cart-testing.umd.min.js.map +0 -1
  617. package/bundles/daffodil-cart.umd.js +0 -516
  618. package/bundles/daffodil-cart.umd.js.map +0 -1
  619. package/bundles/daffodil-cart.umd.min.js +0 -17
  620. package/bundles/daffodil-cart.umd.min.js.map +0 -1
  621. package/daffodil-cart.metadata.json +0 -1
  622. package/driver/daffodil-cart-driver.metadata.json +0 -1
  623. package/driver/in-memory/daffodil-cart-driver-in-memory.metadata.json +0 -1
  624. package/driver/magento/daffodil-cart-driver-magento.metadata.json +0 -1
  625. package/driver/magento/testing/daffodil-cart-driver-magento-testing.metadata.json +0 -1
  626. package/driver/testing/daffodil-cart-driver-testing.metadata.json +0 -1
  627. package/esm2015/daffodil-cart.js +0 -6
  628. package/esm2015/driver/in-memory/backend/cart/cart.service.js +0 -76
  629. package/esm2015/driver/in-memory/backend/cart-address/cart-address.service.js +0 -40
  630. package/esm2015/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.js +0 -48
  631. package/esm2015/driver/in-memory/backend/cart-coupon/cart-coupon.service.js +0 -80
  632. package/esm2015/driver/in-memory/backend/cart-order/cart-order.service.js +0 -28
  633. package/esm2015/driver/in-memory/backend/cart-payment/cart-payment.service.js +0 -62
  634. package/esm2015/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.js +0 -27
  635. package/esm2015/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.js +0 -48
  636. package/esm2015/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.js +0 -59
  637. package/esm2015/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.js +0 -46
  638. package/esm2015/driver/in-memory/daffodil-cart-driver-in-memory.js +0 -6
  639. package/esm2015/driver/in-memory/drivers/cart/cart.service.js +0 -45
  640. package/esm2015/driver/in-memory/drivers/cart-address/cart-address.service.js +0 -30
  641. package/esm2015/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.js +0 -33
  642. package/esm2015/driver/in-memory/drivers/cart-coupon/cart-coupon.service.js +0 -39
  643. package/esm2015/driver/in-memory/drivers/cart-driver.module.js +0 -75
  644. package/esm2015/driver/in-memory/drivers/cart-item/cart-item.service.js +0 -42
  645. package/esm2015/driver/in-memory/drivers/cart-order/cart-order.service.js +0 -30
  646. package/esm2015/driver/in-memory/drivers/cart-payment/cart-payment.service.js +0 -39
  647. package/esm2015/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.js +0 -30
  648. package/esm2015/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.js +0 -33
  649. package/esm2015/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.js +0 -36
  650. package/esm2015/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.js +0 -30
  651. package/esm2015/driver/magento/cart-address.service.js +0 -64
  652. package/esm2015/driver/magento/cart-billing-address.service.js +0 -80
  653. package/esm2015/driver/magento/cart-coupon.service.js +0 -67
  654. package/esm2015/driver/magento/cart-driver.module.js +0 -105
  655. package/esm2015/driver/magento/cart-item.service.js +0 -108
  656. package/esm2015/driver/magento/cart-order.service.js +0 -42
  657. package/esm2015/driver/magento/cart-payment-methods.service.js +0 -41
  658. package/esm2015/driver/magento/cart-payment.service.js +0 -104
  659. package/esm2015/driver/magento/cart-shipping-address.service.js +0 -80
  660. package/esm2015/driver/magento/cart-shipping-information.service.js +0 -85
  661. package/esm2015/driver/magento/cart-shipping-methods.service.js +0 -41
  662. package/esm2015/driver/magento/cart.service.js +0 -74
  663. package/esm2015/driver/magento/daffodil-cart-driver-magento.js +0 -10
  664. package/esm2015/driver/magento/errors/transform.js +0 -39
  665. package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +0 -24
  666. package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +0 -35
  667. package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +0 -25
  668. package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +0 -31
  669. package/esm2015/driver/magento/testing/factories/shipping-address.factory.js +0 -26
  670. package/esm2015/driver/magento/transforms/inputs/billing-address.service.js +0 -31
  671. package/esm2015/driver/magento/transforms/inputs/cart-address.service.js +0 -24
  672. package/esm2015/driver/magento/transforms/inputs/cart-item-input-transformers.js +0 -18
  673. package/esm2015/driver/magento/transforms/inputs/cart-item-update.service.js +0 -17
  674. package/esm2015/driver/magento/transforms/inputs/payment-method.service.js +0 -14
  675. package/esm2015/driver/magento/transforms/inputs/shipping-address.service.js +0 -31
  676. package/esm2015/driver/magento/transforms/inputs/shipping-method.service.js +0 -17
  677. package/esm2015/driver/magento/transforms/outputs/billing-address.service.js +0 -31
  678. package/esm2015/driver/magento/transforms/outputs/cart-address.service.js +0 -41
  679. package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +0 -53
  680. package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +0 -19
  681. package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +0 -17
  682. package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +0 -39
  683. package/esm2015/driver/magento/transforms/outputs/cart-payment.service.js +0 -24
  684. package/esm2015/driver/magento/transforms/outputs/cart-shipping-information.service.js +0 -33
  685. package/esm2015/driver/magento/transforms/outputs/cart-shipping-rate.service.js +0 -31
  686. package/esm2015/driver/magento/transforms/outputs/cart.service.js +0 -111
  687. package/esm2015/driver/magento/transforms/outputs/shipping-address.service.js +0 -31
  688. package/esm2015/driver/testing/drivers/cart/cart.service.js +0 -41
  689. package/esm2015/driver/testing/drivers/cart-address/cart-address.service.js +0 -29
  690. package/esm2015/driver/testing/drivers/cart-billing-address/cart-billing-address.service.js +0 -32
  691. package/esm2015/driver/testing/drivers/cart-coupon/cart-coupon.service.js +0 -38
  692. package/esm2015/driver/testing/drivers/cart-driver.module.js +0 -75
  693. package/esm2015/driver/testing/drivers/cart-item/cart-item.service.js +0 -41
  694. package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +0 -23
  695. package/esm2015/driver/testing/drivers/cart-payment/cart-payment.service.js +0 -38
  696. package/esm2015/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.js +0 -27
  697. package/esm2015/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.js +0 -32
  698. package/esm2015/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.js +0 -35
  699. package/esm2015/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.js +0 -27
  700. package/esm2015/routing/cart-routing.module.js +0 -32
  701. package/esm2015/routing/config/config.js +0 -17
  702. package/esm2015/routing/guards/billing-address/billing-address.guard.js +0 -42
  703. package/esm2015/routing/guards/cart-items/cart-items.guard.js +0 -43
  704. package/esm2015/routing/guards/in-stock-items/in-stock-items.guard.js +0 -43
  705. package/esm2015/routing/guards/order-result/order-result.guard.js +0 -40
  706. package/esm2015/routing/guards/payment-method/payment-method.guard.js +0 -42
  707. package/esm2015/routing/guards/resolved-cart/resolved-cart.guard.js +0 -44
  708. package/esm2015/routing/guards/shipping-address/shipping-address.guard.js +0 -42
  709. package/esm2015/routing/guards/shipping-method/shipping-method.guard.js +0 -42
  710. package/esm2015/routing/resolvers/cart-resolver.service.js +0 -48
  711. package/esm2015/routing/resolvers/empty-cart-resolver.service.js +0 -44
  712. package/esm2015/state/cart-state.module.js +0 -45
  713. package/esm2015/state/daffodil-cart-state.js +0 -29
  714. package/esm2015/state/effects/cart-address.effects.js +0 -35
  715. package/esm2015/state/effects/cart-billing-address.effects.js +0 -37
  716. package/esm2015/state/effects/cart-coupon.effects.js +0 -56
  717. package/esm2015/state/effects/cart-item.effects.js +0 -75
  718. package/esm2015/state/effects/cart-order.effects.js +0 -40
  719. package/esm2015/state/effects/cart-payment-methods.effects.js +0 -32
  720. package/esm2015/state/effects/cart-payment.effects.js +0 -47
  721. package/esm2015/state/effects/cart-resolver.effects.js +0 -70
  722. package/esm2015/state/effects/cart-shipping-address.effects.js +0 -37
  723. package/esm2015/state/effects/cart-shipping-information.effects.js +0 -42
  724. package/esm2015/state/effects/cart-shipping-methods.effects.js +0 -32
  725. package/esm2015/state/effects/cart.effects.js +0 -68
  726. package/esm2015/state/reducers/cart/cart.reducer.js +0 -41
  727. package/esm2015/state/reducers/cart-billing-address/cart-billing-address.reducer.js +0 -29
  728. package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +0 -34
  729. package/esm2015/state/reducers/cart-item/cart-item.reducer.js +0 -46
  730. package/esm2015/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.js +0 -11
  731. package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +0 -65
  732. package/esm2015/state/reducers/cart-order/cart-order.reducer.js +0 -18
  733. package/esm2015/state/reducers/cart-payment/cart-payment.reducer.js +0 -41
  734. package/esm2015/state/reducers/cart-payment-methods/cart-payment-methods.reducer.js +0 -21
  735. package/esm2015/state/reducers/cart-resolve/cart-resolve.reducer.js +0 -18
  736. package/esm2015/state/reducers/cart-shipping-address/cart-shipping-address.reducer.js +0 -29
  737. package/esm2015/state/reducers/cart-shipping-information/cart-shipping-information.reducer.js +0 -33
  738. package/esm2015/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.js +0 -21
  739. package/esm2015/state/reducers/errors/error-state-helpers.js +0 -7
  740. package/esm2015/state/reducers/loading/cart-loading.type.js +0 -5
  741. package/esm2015/state/selectors/cart/cart.selector.js +0 -222
  742. package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +0 -98
  743. package/esm2015/state/selectors/cart-order/cart-order.selector.js +0 -33
  744. package/esm2015/state/selectors/cart.selector.js +0 -15
  745. package/esm2015/state/testing/cart-testing.module.js +0 -13
  746. package/esm2015/state/testing/factories/stateful-cart-item.factory.js +0 -26
  747. package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +0 -24
  748. package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +0 -24
  749. package/esm2015/storage/cart-storage.service.js +0 -52
  750. package/esm2015/testing/factories/cart-coupon.factory.js +0 -27
  751. package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +0 -35
  752. package/esm2015/testing/factories/cart-payment.factory.js +0 -22
  753. package/esm2015/testing/factories/cart-shipping-rate.factory.js +0 -29
  754. package/fesm2015/daffodil-cart-driver-in-memory.js.map +0 -1
  755. package/fesm2015/daffodil-cart-driver-magento-testing.js +0 -330
  756. package/fesm2015/daffodil-cart-driver-magento-testing.js.map +0 -1
  757. package/fesm2015/daffodil-cart-driver-magento.js.map +0 -1
  758. package/fesm2015/daffodil-cart-driver-testing.js +0 -383
  759. package/fesm2015/daffodil-cart-driver-testing.js.map +0 -1
  760. package/fesm2015/daffodil-cart-driver.js.map +0 -1
  761. package/fesm2015/daffodil-cart-routing.js +0 -425
  762. package/fesm2015/daffodil-cart-routing.js.map +0 -1
  763. package/fesm2015/daffodil-cart-state-testing.js.map +0 -1
  764. package/fesm2015/daffodil-cart-state.js.map +0 -1
  765. package/fesm2015/daffodil-cart-testing.js +0 -291
  766. package/fesm2015/daffodil-cart-testing.js.map +0 -1
  767. package/fesm2015/daffodil-cart.js.map +0 -1
  768. package/routing/daffodil-cart-routing.metadata.json +0 -1
  769. package/state/daffodil-cart-state.metadata.json +0 -1
  770. package/state/testing/daffodil-cart-state-testing.metadata.json +0 -1
  771. package/testing/daffodil-cart-testing.metadata.json +0 -1
@@ -1,1530 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@daffodil/cart/driver'), require('@angular/common'), require('angular-in-memory-web-api'), require('@daffodil/cart/testing')) :
3
- typeof define === 'function' && define.amd ? define('@daffodil/cart/driver/in-memory', ['exports', '@angular/common/http', '@angular/core', 'rxjs', 'rxjs/operators', '@daffodil/cart/driver', '@angular/common', 'angular-in-memory-web-api', '@daffodil/cart/testing'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.cart = global.daffodil.cart || {}, global.daffodil.cart.driver = global.daffodil.cart.driver || {}, global.daffodil.cart.driver['in-memory'] = {}), global.ng.common.http, global.ng.core, global.rxjs, global.rxjs.operators, global.daffodil.cart.driver, global.ng.common, global.angularInMemoryWebApi, global.daffodil.cart.testing));
5
- }(this, (function (exports, i1, i0, rxjs, operators, driver, common, angularInMemoryWebApi, i1$1) { 'use strict';
6
-
7
- /**
8
- * @inheritdoc
9
- */
10
- var DaffInMemoryCartService = /** @class */ (function () {
11
- function DaffInMemoryCartService(http) {
12
- this.http = http;
13
- /**
14
- * The URL with which the driver makes calls to the backend.
15
- */
16
- this.url = '/api/cart';
17
- }
18
- DaffInMemoryCartService.prototype.get = function (cartId) {
19
- return this.http.get(this.url + "/" + cartId).pipe(operators.catchError(function (error) { return rxjs.throwError(new driver.DaffCartNotFoundError(error.message)); }), operators.map(function (result) { return ({
20
- response: result,
21
- errors: [],
22
- }); }));
23
- };
24
- DaffInMemoryCartService.prototype.addToCart = function (productId, qty) {
25
- return this.http.post(this.url + '/addToCart', { productId: productId, qty: qty });
26
- };
27
- DaffInMemoryCartService.prototype.clear = function (cartId) {
28
- return this.http.post(this.url + "/" + cartId + "/clear", {});
29
- };
30
- DaffInMemoryCartService.prototype.create = function () {
31
- return this.http.post(this.url, {});
32
- };
33
- return DaffInMemoryCartService;
34
- }());
35
- /** @nocollapse */ DaffInMemoryCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartService_Factory() { return new DaffInMemoryCartService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartService, providedIn: "root" });
36
- DaffInMemoryCartService.decorators = [
37
- { type: i0.Injectable, args: [{
38
- providedIn: 'root',
39
- },] }
40
- ];
41
- /** @nocollapse */
42
- DaffInMemoryCartService.ctorParameters = function () { return [
43
- { type: i1.HttpClient }
44
- ]; };
45
-
46
- /**
47
- * @inheritdoc
48
- */
49
- var DaffInMemoryCartItemService = /** @class */ (function () {
50
- function DaffInMemoryCartItemService(http) {
51
- this.http = http;
52
- /**
53
- * The URL with which the driver makes calls to the backend.
54
- */
55
- this.url = '/api/cart-items';
56
- }
57
- DaffInMemoryCartItemService.prototype.list = function (cartId) {
58
- return this.http.get(this.url + "/" + cartId + "/");
59
- };
60
- DaffInMemoryCartItemService.prototype.get = function (cartId, itemId) {
61
- return this.http.get(this.url + "/" + cartId + "/" + itemId);
62
- };
63
- DaffInMemoryCartItemService.prototype.add = function (cartId, input) {
64
- return this.http.post(this.url + "/" + cartId + "/", input);
65
- };
66
- DaffInMemoryCartItemService.prototype.update = function (cartId, itemId, item) {
67
- return this.http.put(this.url + "/" + cartId + "/" + itemId, item);
68
- };
69
- DaffInMemoryCartItemService.prototype.delete = function (cartId, itemId) {
70
- return this.http.delete(this.url + "/" + cartId + "/" + itemId);
71
- };
72
- return DaffInMemoryCartItemService;
73
- }());
74
- /** @nocollapse */ DaffInMemoryCartItemService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartItemService_Factory() { return new DaffInMemoryCartItemService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartItemService, providedIn: "root" });
75
- DaffInMemoryCartItemService.decorators = [
76
- { type: i0.Injectable, args: [{
77
- providedIn: 'root',
78
- },] }
79
- ];
80
- /** @nocollapse */
81
- DaffInMemoryCartItemService.ctorParameters = function () { return [
82
- { type: i1.HttpClient }
83
- ]; };
84
-
85
- /**
86
- * @inheritdoc
87
- */
88
- var DaffInMemoryCartBillingAddressService = /** @class */ (function () {
89
- function DaffInMemoryCartBillingAddressService(http) {
90
- this.http = http;
91
- /**
92
- * The URL with which the driver makes calls to the backend.
93
- */
94
- this.url = '/api/cart-billing-address';
95
- }
96
- DaffInMemoryCartBillingAddressService.prototype.get = function (cartId) {
97
- return this.http.get(this.url + "/" + cartId);
98
- };
99
- DaffInMemoryCartBillingAddressService.prototype.update = function (cartId, address) {
100
- return this.http.put(this.url + "/" + cartId, address);
101
- };
102
- return DaffInMemoryCartBillingAddressService;
103
- }());
104
- /** @nocollapse */ DaffInMemoryCartBillingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartBillingAddressService_Factory() { return new DaffInMemoryCartBillingAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartBillingAddressService, providedIn: "root" });
105
- DaffInMemoryCartBillingAddressService.decorators = [
106
- { type: i0.Injectable, args: [{
107
- providedIn: 'root',
108
- },] }
109
- ];
110
- /** @nocollapse */
111
- DaffInMemoryCartBillingAddressService.ctorParameters = function () { return [
112
- { type: i1.HttpClient }
113
- ]; };
114
-
115
- /**
116
- * @inheritdoc
117
- */
118
- var DaffInMemoryCartPaymentService = /** @class */ (function () {
119
- function DaffInMemoryCartPaymentService(http) {
120
- this.http = http;
121
- /**
122
- * The URL with which the driver makes calls to the backend.
123
- */
124
- this.url = '/api/cart-payment';
125
- }
126
- DaffInMemoryCartPaymentService.prototype.get = function (cartId) {
127
- return this.http.get(this.url + "/" + cartId);
128
- };
129
- DaffInMemoryCartPaymentService.prototype.update = function (cartId, payment) {
130
- return this.http.put(this.url + "/" + cartId, { payment: payment });
131
- };
132
- DaffInMemoryCartPaymentService.prototype.updateWithBilling = function (cartId, payment, address) {
133
- return this.http.put(this.url + "/" + cartId, { payment: payment, address: address });
134
- };
135
- DaffInMemoryCartPaymentService.prototype.remove = function (cartId) {
136
- return this.http.delete(this.url + "/" + cartId);
137
- };
138
- return DaffInMemoryCartPaymentService;
139
- }());
140
- /** @nocollapse */ DaffInMemoryCartPaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentService_Factory() { return new DaffInMemoryCartPaymentService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartPaymentService, providedIn: "root" });
141
- DaffInMemoryCartPaymentService.decorators = [
142
- { type: i0.Injectable, args: [{
143
- providedIn: 'root',
144
- },] }
145
- ];
146
- /** @nocollapse */
147
- DaffInMemoryCartPaymentService.ctorParameters = function () { return [
148
- { type: i1.HttpClient }
149
- ]; };
150
-
151
- /**
152
- * @inheritdoc
153
- */
154
- var DaffInMemoryCartPaymentMethodsService = /** @class */ (function () {
155
- function DaffInMemoryCartPaymentMethodsService(http) {
156
- this.http = http;
157
- /**
158
- * The URL with which the driver makes calls to the backend.
159
- */
160
- this.url = '/api/cart-payment-methods';
161
- }
162
- DaffInMemoryCartPaymentMethodsService.prototype.list = function (cartId) {
163
- return this.http.get(this.url + "/" + cartId);
164
- };
165
- return DaffInMemoryCartPaymentMethodsService;
166
- }());
167
- /** @nocollapse */ DaffInMemoryCartPaymentMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentMethodsService_Factory() { return new DaffInMemoryCartPaymentMethodsService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartPaymentMethodsService, providedIn: "root" });
168
- DaffInMemoryCartPaymentMethodsService.decorators = [
169
- { type: i0.Injectable, args: [{
170
- providedIn: 'root',
171
- },] }
172
- ];
173
- /** @nocollapse */
174
- DaffInMemoryCartPaymentMethodsService.ctorParameters = function () { return [
175
- { type: i1.HttpClient }
176
- ]; };
177
-
178
- /**
179
- * @inheritdoc
180
- */
181
- var DaffInMemoryCartShippingAddressService = /** @class */ (function () {
182
- function DaffInMemoryCartShippingAddressService(http) {
183
- this.http = http;
184
- /**
185
- * The URL with which the driver makes calls to the backend.
186
- */
187
- this.url = '/api/cart-shipping-address';
188
- }
189
- DaffInMemoryCartShippingAddressService.prototype.get = function (cartId) {
190
- return this.http.get(this.url + "/" + cartId);
191
- };
192
- DaffInMemoryCartShippingAddressService.prototype.update = function (cartId, address) {
193
- return this.http.put(this.url + "/" + cartId, address);
194
- };
195
- return DaffInMemoryCartShippingAddressService;
196
- }());
197
- /** @nocollapse */ DaffInMemoryCartShippingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingAddressService_Factory() { return new DaffInMemoryCartShippingAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingAddressService, providedIn: "root" });
198
- DaffInMemoryCartShippingAddressService.decorators = [
199
- { type: i0.Injectable, args: [{
200
- providedIn: 'root',
201
- },] }
202
- ];
203
- /** @nocollapse */
204
- DaffInMemoryCartShippingAddressService.ctorParameters = function () { return [
205
- { type: i1.HttpClient }
206
- ]; };
207
-
208
- /**
209
- * @inheritdoc
210
- */
211
- var DaffInMemoryCartShippingInformationService = /** @class */ (function () {
212
- function DaffInMemoryCartShippingInformationService(http) {
213
- this.http = http;
214
- /**
215
- * The URL with which the driver makes calls to the backend.
216
- */
217
- this.url = '/api/cart-shipping-information';
218
- }
219
- DaffInMemoryCartShippingInformationService.prototype.get = function (cartId) {
220
- return this.http.get(this.url + "/" + cartId);
221
- };
222
- DaffInMemoryCartShippingInformationService.prototype.update = function (cartId, info) {
223
- return this.http.put(this.url + "/" + cartId, info);
224
- };
225
- DaffInMemoryCartShippingInformationService.prototype.delete = function (cartId) {
226
- return this.http.delete(this.url + "/" + cartId);
227
- };
228
- return DaffInMemoryCartShippingInformationService;
229
- }());
230
- /** @nocollapse */ DaffInMemoryCartShippingInformationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingInformationService_Factory() { return new DaffInMemoryCartShippingInformationService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingInformationService, providedIn: "root" });
231
- DaffInMemoryCartShippingInformationService.decorators = [
232
- { type: i0.Injectable, args: [{
233
- providedIn: 'root',
234
- },] }
235
- ];
236
- /** @nocollapse */
237
- DaffInMemoryCartShippingInformationService.ctorParameters = function () { return [
238
- { type: i1.HttpClient }
239
- ]; };
240
-
241
- /**
242
- * @inheritdoc
243
- */
244
- var DaffInMemoryCartShippingMethodsService = /** @class */ (function () {
245
- function DaffInMemoryCartShippingMethodsService(http) {
246
- this.http = http;
247
- /**
248
- * The URL with which the driver makes calls to the backend.
249
- */
250
- this.url = '/api/cart-shipping-methods';
251
- }
252
- DaffInMemoryCartShippingMethodsService.prototype.list = function (cartId) {
253
- return this.http.get(this.url + "/" + cartId);
254
- };
255
- return DaffInMemoryCartShippingMethodsService;
256
- }());
257
- /** @nocollapse */ DaffInMemoryCartShippingMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingMethodsService_Factory() { return new DaffInMemoryCartShippingMethodsService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingMethodsService, providedIn: "root" });
258
- DaffInMemoryCartShippingMethodsService.decorators = [
259
- { type: i0.Injectable, args: [{
260
- providedIn: 'root',
261
- },] }
262
- ];
263
- /** @nocollapse */
264
- DaffInMemoryCartShippingMethodsService.ctorParameters = function () { return [
265
- { type: i1.HttpClient }
266
- ]; };
267
-
268
- /**
269
- * @inheritdoc
270
- */
271
- var DaffInMemoryCartOrderService = /** @class */ (function () {
272
- function DaffInMemoryCartOrderService(http) {
273
- this.http = http;
274
- /**
275
- * The URL with which the driver makes calls to the backend.
276
- */
277
- this.url = '/api/cart-order';
278
- }
279
- DaffInMemoryCartOrderService.prototype.placeOrder = function (cartId, payment) {
280
- return this.http.post(this.url + "/" + cartId + "/", { payment: payment });
281
- };
282
- return DaffInMemoryCartOrderService;
283
- }());
284
- /** @nocollapse */ DaffInMemoryCartOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartOrderService_Factory() { return new DaffInMemoryCartOrderService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartOrderService, providedIn: "root" });
285
- DaffInMemoryCartOrderService.decorators = [
286
- { type: i0.Injectable, args: [{
287
- providedIn: 'root',
288
- },] }
289
- ];
290
- /** @nocollapse */
291
- DaffInMemoryCartOrderService.ctorParameters = function () { return [
292
- { type: i1.HttpClient }
293
- ]; };
294
-
295
- /**
296
- * @inheritdoc
297
- */
298
- var DaffInMemoryCartCouponService = /** @class */ (function () {
299
- function DaffInMemoryCartCouponService(http) {
300
- this.http = http;
301
- /**
302
- * The URL with which the driver makes calls to the backend.
303
- */
304
- this.url = '/api/cart-coupon';
305
- }
306
- DaffInMemoryCartCouponService.prototype.list = function (cartId) {
307
- return this.http.get(this.url + "/" + cartId + "/");
308
- };
309
- DaffInMemoryCartCouponService.prototype.apply = function (cartId, coupon) {
310
- return this.http.post(this.url + "/" + cartId + "/", coupon);
311
- };
312
- DaffInMemoryCartCouponService.prototype.remove = function (cartId, coupon) {
313
- return this.http.delete(this.url + "/" + cartId + "/" + coupon.code);
314
- };
315
- DaffInMemoryCartCouponService.prototype.removeAll = function (cartId) {
316
- return this.http.delete(this.url + "/" + cartId + "/");
317
- };
318
- return DaffInMemoryCartCouponService;
319
- }());
320
- /** @nocollapse */ DaffInMemoryCartCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartCouponService_Factory() { return new DaffInMemoryCartCouponService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartCouponService, providedIn: "root" });
321
- DaffInMemoryCartCouponService.decorators = [
322
- { type: i0.Injectable, args: [{
323
- providedIn: 'root',
324
- },] }
325
- ];
326
- /** @nocollapse */
327
- DaffInMemoryCartCouponService.ctorParameters = function () { return [
328
- { type: i1.HttpClient }
329
- ]; };
330
-
331
- /**
332
- * @inheritdoc
333
- */
334
- var DaffInMemoryCartAddressService = /** @class */ (function () {
335
- function DaffInMemoryCartAddressService(http) {
336
- this.http = http;
337
- /**
338
- * The URL with which the driver makes calls to the backend.
339
- */
340
- this.url = '/api/cart-address';
341
- }
342
- DaffInMemoryCartAddressService.prototype.update = function (cartId, address) {
343
- return this.http.put(this.url + "/" + cartId, address);
344
- };
345
- return DaffInMemoryCartAddressService;
346
- }());
347
- /** @nocollapse */ DaffInMemoryCartAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartAddressService_Factory() { return new DaffInMemoryCartAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartAddressService, providedIn: "root" });
348
- DaffInMemoryCartAddressService.decorators = [
349
- { type: i0.Injectable, args: [{
350
- providedIn: 'root',
351
- },] }
352
- ];
353
- /** @nocollapse */
354
- DaffInMemoryCartAddressService.ctorParameters = function () { return [
355
- { type: i1.HttpClient }
356
- ]; };
357
-
358
- var DaffCartInMemoryDriverModule = /** @class */ (function () {
359
- function DaffCartInMemoryDriverModule() {
360
- }
361
- DaffCartInMemoryDriverModule.forRoot = function () {
362
- return {
363
- ngModule: DaffCartInMemoryDriverModule,
364
- providers: [
365
- {
366
- provide: driver.DaffCartDriver,
367
- useExisting: DaffInMemoryCartService,
368
- },
369
- {
370
- provide: driver.DaffCartAddressDriver,
371
- useExisting: DaffInMemoryCartAddressService,
372
- },
373
- {
374
- provide: driver.DaffCartBillingAddressDriver,
375
- useExisting: DaffInMemoryCartBillingAddressService,
376
- },
377
- {
378
- provide: driver.DaffCartItemDriver,
379
- useExisting: DaffInMemoryCartItemService,
380
- },
381
- {
382
- provide: driver.DaffCartPaymentDriver,
383
- useExisting: DaffInMemoryCartPaymentService,
384
- },
385
- {
386
- provide: driver.DaffCartPaymentMethodsDriver,
387
- useExisting: DaffInMemoryCartPaymentMethodsService,
388
- },
389
- {
390
- provide: driver.DaffCartShippingAddressDriver,
391
- useExisting: DaffInMemoryCartShippingAddressService,
392
- },
393
- {
394
- provide: driver.DaffCartShippingInformationDriver,
395
- useExisting: DaffInMemoryCartShippingInformationService,
396
- },
397
- {
398
- provide: driver.DaffCartShippingMethodsDriver,
399
- useExisting: DaffInMemoryCartShippingMethodsService,
400
- },
401
- {
402
- provide: driver.DaffCartOrderDriver,
403
- useExisting: DaffInMemoryCartOrderService,
404
- },
405
- {
406
- provide: driver.DaffCartCouponDriver,
407
- useExisting: DaffInMemoryCartCouponService,
408
- },
409
- ],
410
- };
411
- };
412
- return DaffCartInMemoryDriverModule;
413
- }());
414
- DaffCartInMemoryDriverModule.decorators = [
415
- { type: i0.NgModule, args: [{
416
- imports: [
417
- common.CommonModule,
418
- ],
419
- },] }
420
- ];
421
-
422
- /**
423
- * Allows an app dev to generate extra fields in the in-memory backend.
424
- * This enables the in-memory drivers to return responses similar to what the
425
- * frontend would expect from the production platform.
426
- *
427
- * The value returned by the hook function will be set to the returned cart's `extra_attributes` field
428
- * for driver calls that return a cart.
429
- *
430
- * The following example demonstrates adding the `numberOfCartItems` field to `extra_attributes`:
431
- * ```ts
432
- * (reqInfo: RequestInfo, cart: DaffCart) => ({
433
- * numberOfCartItems: cart.items.length
434
- * })
435
- * ```
436
- *
437
- * Note that this and any `extra_attributes` features are for advanced users
438
- * and should be used with care.
439
- */
440
- var DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK = new i0.InjectionToken('DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK', {
441
- factory: function () { return function (reqInfo, cart) { return ({}); }; },
442
- });
443
-
444
- /**
445
- * @inheritdoc
446
- */
447
- var DaffInMemoryBackendCartAddressService = /** @class */ (function () {
448
- function DaffInMemoryBackendCartAddressService(extraFieldsHook) {
449
- this.extraFieldsHook = extraFieldsHook;
450
- }
451
- DaffInMemoryBackendCartAddressService.prototype.put = function (reqInfo) {
452
- var _this = this;
453
- return reqInfo.utils.createResponse$(function () { return ({
454
- body: _this.updateAddress(reqInfo),
455
- status: angularInMemoryWebApi.STATUS.OK,
456
- }); });
457
- };
458
- DaffInMemoryBackendCartAddressService.prototype.getCart = function (reqInfo) {
459
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
460
- };
461
- DaffInMemoryBackendCartAddressService.prototype.updateAddress = function (reqInfo) {
462
- var cart = this.getCart(reqInfo);
463
- var address = reqInfo.utils.getJsonBody(reqInfo.req);
464
- cart.billing_address = address;
465
- cart.shipping_address = address;
466
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
467
- };
468
- return DaffInMemoryBackendCartAddressService;
469
- }());
470
- /** @nocollapse */ DaffInMemoryBackendCartAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartAddressService_Factory() { return new DaffInMemoryBackendCartAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartAddressService, providedIn: "root" });
471
- DaffInMemoryBackendCartAddressService.decorators = [
472
- { type: i0.Injectable, args: [{
473
- providedIn: 'root',
474
- },] }
475
- ];
476
- /** @nocollapse */
477
- DaffInMemoryBackendCartAddressService.ctorParameters = function () { return [
478
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
479
- ]; };
480
-
481
- /**
482
- * @inheritdoc
483
- */
484
- var DaffInMemoryBackendCartBillingAddressService = /** @class */ (function () {
485
- function DaffInMemoryBackendCartBillingAddressService(extraFieldsHook) {
486
- this.extraFieldsHook = extraFieldsHook;
487
- }
488
- DaffInMemoryBackendCartBillingAddressService.prototype.get = function (reqInfo) {
489
- var _this = this;
490
- return reqInfo.utils.createResponse$(function () { return ({
491
- body: _this.getBillingAddress(reqInfo),
492
- status: angularInMemoryWebApi.STATUS.OK,
493
- }); });
494
- };
495
- DaffInMemoryBackendCartBillingAddressService.prototype.put = function (reqInfo) {
496
- var _this = this;
497
- return reqInfo.utils.createResponse$(function () { return ({
498
- body: _this.updateBillingAddress(reqInfo),
499
- status: angularInMemoryWebApi.STATUS.OK,
500
- }); });
501
- };
502
- DaffInMemoryBackendCartBillingAddressService.prototype.getCart = function (reqInfo) {
503
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
504
- };
505
- DaffInMemoryBackendCartBillingAddressService.prototype.getBillingAddress = function (reqInfo) {
506
- return this.getCart(reqInfo).billing_address;
507
- };
508
- DaffInMemoryBackendCartBillingAddressService.prototype.updateBillingAddress = function (reqInfo) {
509
- var cart = this.getCart(reqInfo);
510
- var address = reqInfo.utils.getJsonBody(reqInfo.req);
511
- cart.billing_address = address;
512
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
513
- };
514
- return DaffInMemoryBackendCartBillingAddressService;
515
- }());
516
- /** @nocollapse */ DaffInMemoryBackendCartBillingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartBillingAddressService_Factory() { return new DaffInMemoryBackendCartBillingAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartBillingAddressService, providedIn: "root" });
517
- DaffInMemoryBackendCartBillingAddressService.decorators = [
518
- { type: i0.Injectable, args: [{
519
- providedIn: 'root',
520
- },] }
521
- ];
522
- /** @nocollapse */
523
- DaffInMemoryBackendCartBillingAddressService.ctorParameters = function () { return [
524
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
525
- ]; };
526
-
527
- /**
528
- * @inheritdoc
529
- */
530
- var DaffInMemoryBackendCartCouponService = /** @class */ (function () {
531
- function DaffInMemoryBackendCartCouponService(extraFieldsHook) {
532
- this.extraFieldsHook = extraFieldsHook;
533
- }
534
- DaffInMemoryBackendCartCouponService.prototype.get = function (reqInfo) {
535
- var _this = this;
536
- return reqInfo.utils.createResponse$(function () { return ({
537
- body: _this.listCoupons(reqInfo),
538
- status: angularInMemoryWebApi.STATUS.OK,
539
- }); });
540
- };
541
- DaffInMemoryBackendCartCouponService.prototype.post = function (reqInfo) {
542
- var _this = this;
543
- return reqInfo.utils.createResponse$(function () { return ({
544
- body: _this.applyCoupon(reqInfo),
545
- status: angularInMemoryWebApi.STATUS.OK,
546
- }); });
547
- };
548
- DaffInMemoryBackendCartCouponService.prototype.delete = function (reqInfo) {
549
- var _this = this;
550
- return reqInfo.utils.createResponse$(function () {
551
- var body;
552
- var action = _this.getAction(reqInfo);
553
- if (action) {
554
- body = _this.removeCoupon(reqInfo, action);
555
- }
556
- else {
557
- body = _this.removeAllCoupons(reqInfo);
558
- }
559
- return {
560
- body: body,
561
- status: angularInMemoryWebApi.STATUS.OK,
562
- };
563
- });
564
- };
565
- /**
566
- * Gets whatever follows the cart ID section of the request URL.
567
- */
568
- DaffInMemoryBackendCartCouponService.prototype.getAction = function (reqInfo) {
569
- return reqInfo.url.replace("/" + reqInfo.resourceUrl + reqInfo.id + "/", '');
570
- };
571
- DaffInMemoryBackendCartCouponService.prototype.getCart = function (reqInfo) {
572
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
573
- };
574
- DaffInMemoryBackendCartCouponService.prototype.listCoupons = function (reqInfo) {
575
- return this.getCart(reqInfo).coupons;
576
- };
577
- DaffInMemoryBackendCartCouponService.prototype.applyCoupon = function (reqInfo) {
578
- var cart = this.getCart(reqInfo);
579
- var coupon = reqInfo.utils.getJsonBody(reqInfo.req);
580
- cart.coupons.push(coupon);
581
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
582
- };
583
- DaffInMemoryBackendCartCouponService.prototype.removeCoupon = function (reqInfo, couponCode) {
584
- var cart = this.getCart(reqInfo);
585
- cart.coupons = cart.coupons.filter(function (_a) {
586
- var code = _a.code;
587
- return code !== couponCode;
588
- });
589
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
590
- };
591
- DaffInMemoryBackendCartCouponService.prototype.removeAllCoupons = function (reqInfo) {
592
- var cart = this.getCart(reqInfo);
593
- cart.coupons = [];
594
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
595
- };
596
- return DaffInMemoryBackendCartCouponService;
597
- }());
598
- /** @nocollapse */ DaffInMemoryBackendCartCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartCouponService_Factory() { return new DaffInMemoryBackendCartCouponService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartCouponService, providedIn: "root" });
599
- DaffInMemoryBackendCartCouponService.decorators = [
600
- { type: i0.Injectable, args: [{
601
- providedIn: 'root',
602
- },] }
603
- ];
604
- /** @nocollapse */
605
- DaffInMemoryBackendCartCouponService.ctorParameters = function () { return [
606
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
607
- ]; };
608
-
609
- /*! *****************************************************************************
610
- Copyright (c) Microsoft Corporation.
611
-
612
- Permission to use, copy, modify, and/or distribute this software for any
613
- purpose with or without fee is hereby granted.
614
-
615
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
616
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
617
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
618
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
619
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
620
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
621
- PERFORMANCE OF THIS SOFTWARE.
622
- ***************************************************************************** */
623
- /* global Reflect, Promise */
624
- var extendStatics = function (d, b) {
625
- extendStatics = Object.setPrototypeOf ||
626
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
627
- function (d, b) { for (var p in b)
628
- if (Object.prototype.hasOwnProperty.call(b, p))
629
- d[p] = b[p]; };
630
- return extendStatics(d, b);
631
- };
632
- function __extends(d, b) {
633
- if (typeof b !== "function" && b !== null)
634
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
635
- extendStatics(d, b);
636
- function __() { this.constructor = d; }
637
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
638
- }
639
- var __assign = function () {
640
- __assign = Object.assign || function __assign(t) {
641
- for (var s, i = 1, n = arguments.length; i < n; i++) {
642
- s = arguments[i];
643
- for (var p in s)
644
- if (Object.prototype.hasOwnProperty.call(s, p))
645
- t[p] = s[p];
646
- }
647
- return t;
648
- };
649
- return __assign.apply(this, arguments);
650
- };
651
- function __rest(s, e) {
652
- var t = {};
653
- for (var p in s)
654
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
655
- t[p] = s[p];
656
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
657
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
658
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
659
- t[p[i]] = s[p[i]];
660
- }
661
- return t;
662
- }
663
- function __decorate(decorators, target, key, desc) {
664
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
665
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
666
- r = Reflect.decorate(decorators, target, key, desc);
667
- else
668
- for (var i = decorators.length - 1; i >= 0; i--)
669
- if (d = decorators[i])
670
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
671
- return c > 3 && r && Object.defineProperty(target, key, r), r;
672
- }
673
- function __param(paramIndex, decorator) {
674
- return function (target, key) { decorator(target, key, paramIndex); };
675
- }
676
- function __metadata(metadataKey, metadataValue) {
677
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
678
- return Reflect.metadata(metadataKey, metadataValue);
679
- }
680
- function __awaiter(thisArg, _arguments, P, generator) {
681
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
682
- return new (P || (P = Promise))(function (resolve, reject) {
683
- function fulfilled(value) { try {
684
- step(generator.next(value));
685
- }
686
- catch (e) {
687
- reject(e);
688
- } }
689
- function rejected(value) { try {
690
- step(generator["throw"](value));
691
- }
692
- catch (e) {
693
- reject(e);
694
- } }
695
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
696
- step((generator = generator.apply(thisArg, _arguments || [])).next());
697
- });
698
- }
699
- function __generator(thisArg, body) {
700
- var _ = { label: 0, sent: function () { if (t[0] & 1)
701
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
702
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
703
- function verb(n) { return function (v) { return step([n, v]); }; }
704
- function step(op) {
705
- if (f)
706
- throw new TypeError("Generator is already executing.");
707
- while (_)
708
- try {
709
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
710
- return t;
711
- if (y = 0, t)
712
- op = [op[0] & 2, t.value];
713
- switch (op[0]) {
714
- case 0:
715
- case 1:
716
- t = op;
717
- break;
718
- case 4:
719
- _.label++;
720
- return { value: op[1], done: false };
721
- case 5:
722
- _.label++;
723
- y = op[1];
724
- op = [0];
725
- continue;
726
- case 7:
727
- op = _.ops.pop();
728
- _.trys.pop();
729
- continue;
730
- default:
731
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
732
- _ = 0;
733
- continue;
734
- }
735
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
736
- _.label = op[1];
737
- break;
738
- }
739
- if (op[0] === 6 && _.label < t[1]) {
740
- _.label = t[1];
741
- t = op;
742
- break;
743
- }
744
- if (t && _.label < t[2]) {
745
- _.label = t[2];
746
- _.ops.push(op);
747
- break;
748
- }
749
- if (t[2])
750
- _.ops.pop();
751
- _.trys.pop();
752
- continue;
753
- }
754
- op = body.call(thisArg, _);
755
- }
756
- catch (e) {
757
- op = [6, e];
758
- y = 0;
759
- }
760
- finally {
761
- f = t = 0;
762
- }
763
- if (op[0] & 5)
764
- throw op[1];
765
- return { value: op[0] ? op[1] : void 0, done: true };
766
- }
767
- }
768
- var __createBinding = Object.create ? (function (o, m, k, k2) {
769
- if (k2 === undefined)
770
- k2 = k;
771
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
772
- }) : (function (o, m, k, k2) {
773
- if (k2 === undefined)
774
- k2 = k;
775
- o[k2] = m[k];
776
- });
777
- function __exportStar(m, o) {
778
- for (var p in m)
779
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
780
- __createBinding(o, m, p);
781
- }
782
- function __values(o) {
783
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
784
- if (m)
785
- return m.call(o);
786
- if (o && typeof o.length === "number")
787
- return {
788
- next: function () {
789
- if (o && i >= o.length)
790
- o = void 0;
791
- return { value: o && o[i++], done: !o };
792
- }
793
- };
794
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
795
- }
796
- function __read(o, n) {
797
- var m = typeof Symbol === "function" && o[Symbol.iterator];
798
- if (!m)
799
- return o;
800
- var i = m.call(o), r, ar = [], e;
801
- try {
802
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
803
- ar.push(r.value);
804
- }
805
- catch (error) {
806
- e = { error: error };
807
- }
808
- finally {
809
- try {
810
- if (r && !r.done && (m = i["return"]))
811
- m.call(i);
812
- }
813
- finally {
814
- if (e)
815
- throw e.error;
816
- }
817
- }
818
- return ar;
819
- }
820
- /** @deprecated */
821
- function __spread() {
822
- for (var ar = [], i = 0; i < arguments.length; i++)
823
- ar = ar.concat(__read(arguments[i]));
824
- return ar;
825
- }
826
- /** @deprecated */
827
- function __spreadArrays() {
828
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
829
- s += arguments[i].length;
830
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
831
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
832
- r[k] = a[j];
833
- return r;
834
- }
835
- function __spreadArray(to, from, pack) {
836
- if (pack || arguments.length === 2)
837
- for (var i = 0, l = from.length, ar; i < l; i++) {
838
- if (ar || !(i in from)) {
839
- if (!ar)
840
- ar = Array.prototype.slice.call(from, 0, i);
841
- ar[i] = from[i];
842
- }
843
- }
844
- return to.concat(ar || Array.prototype.slice.call(from));
845
- }
846
- function __await(v) {
847
- return this instanceof __await ? (this.v = v, this) : new __await(v);
848
- }
849
- function __asyncGenerator(thisArg, _arguments, generator) {
850
- if (!Symbol.asyncIterator)
851
- throw new TypeError("Symbol.asyncIterator is not defined.");
852
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
853
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
854
- function verb(n) { if (g[n])
855
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
856
- function resume(n, v) { try {
857
- step(g[n](v));
858
- }
859
- catch (e) {
860
- settle(q[0][3], e);
861
- } }
862
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
863
- function fulfill(value) { resume("next", value); }
864
- function reject(value) { resume("throw", value); }
865
- function settle(f, v) { if (f(v), q.shift(), q.length)
866
- resume(q[0][0], q[0][1]); }
867
- }
868
- function __asyncDelegator(o) {
869
- var i, p;
870
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
871
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
872
- }
873
- function __asyncValues(o) {
874
- if (!Symbol.asyncIterator)
875
- throw new TypeError("Symbol.asyncIterator is not defined.");
876
- var m = o[Symbol.asyncIterator], i;
877
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
878
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
879
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
880
- }
881
- function __makeTemplateObject(cooked, raw) {
882
- if (Object.defineProperty) {
883
- Object.defineProperty(cooked, "raw", { value: raw });
884
- }
885
- else {
886
- cooked.raw = raw;
887
- }
888
- return cooked;
889
- }
890
- ;
891
- var __setModuleDefault = Object.create ? (function (o, v) {
892
- Object.defineProperty(o, "default", { enumerable: true, value: v });
893
- }) : function (o, v) {
894
- o["default"] = v;
895
- };
896
- function __importStar(mod) {
897
- if (mod && mod.__esModule)
898
- return mod;
899
- var result = {};
900
- if (mod != null)
901
- for (var k in mod)
902
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
903
- __createBinding(result, mod, k);
904
- __setModuleDefault(result, mod);
905
- return result;
906
- }
907
- function __importDefault(mod) {
908
- return (mod && mod.__esModule) ? mod : { default: mod };
909
- }
910
- function __classPrivateFieldGet(receiver, state, kind, f) {
911
- if (kind === "a" && !f)
912
- throw new TypeError("Private accessor was defined without a getter");
913
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
914
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
915
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
916
- }
917
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
918
- if (kind === "m")
919
- throw new TypeError("Private method is not writable");
920
- if (kind === "a" && !f)
921
- throw new TypeError("Private accessor was defined without a setter");
922
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
923
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
924
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
925
- }
926
-
927
- /**
928
- * @inheritdoc
929
- */
930
- var DaffInMemoryBackendCartItemsService = /** @class */ (function () {
931
- function DaffInMemoryBackendCartItemsService(cartItemFactory, extraFieldsHook) {
932
- this.cartItemFactory = cartItemFactory;
933
- this.extraFieldsHook = extraFieldsHook;
934
- }
935
- DaffInMemoryBackendCartItemsService.prototype.get = function (reqInfo) {
936
- var _this = this;
937
- return reqInfo.utils.createResponse$(function () {
938
- var body;
939
- var action = _this.getAction(reqInfo);
940
- if (action) {
941
- body = _this.getItem(reqInfo, action);
942
- }
943
- else {
944
- body = _this.listItems(reqInfo);
945
- }
946
- return {
947
- body: body,
948
- status: angularInMemoryWebApi.STATUS.OK,
949
- };
950
- });
951
- };
952
- DaffInMemoryBackendCartItemsService.prototype.put = function (reqInfo) {
953
- var _this = this;
954
- return reqInfo.utils.createResponse$(function () { return ({
955
- body: _this.updateItem(reqInfo, _this.getAction(reqInfo)),
956
- status: angularInMemoryWebApi.STATUS.OK,
957
- }); });
958
- };
959
- DaffInMemoryBackendCartItemsService.prototype.post = function (reqInfo) {
960
- var _this = this;
961
- return reqInfo.utils.createResponse$(function () { return ({
962
- body: _this.addItem(reqInfo),
963
- status: angularInMemoryWebApi.STATUS.OK,
964
- }); });
965
- };
966
- DaffInMemoryBackendCartItemsService.prototype.delete = function (reqInfo) {
967
- var _this = this;
968
- return reqInfo.utils.createResponse$(function () { return ({
969
- body: _this.deleteItem(reqInfo, _this.getAction(reqInfo)),
970
- status: angularInMemoryWebApi.STATUS.OK,
971
- }); });
972
- };
973
- /**
974
- * Gets whatever follows the cart ID section of the request URL.
975
- */
976
- DaffInMemoryBackendCartItemsService.prototype.getAction = function (reqInfo) {
977
- return reqInfo.url.replace("/" + reqInfo.resourceUrl + reqInfo.id + "/", '');
978
- };
979
- DaffInMemoryBackendCartItemsService.prototype.getCart = function (reqInfo) {
980
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
981
- };
982
- DaffInMemoryBackendCartItemsService.prototype.transformItemInput = function (itemInput) {
983
- return Object.assign(Object.assign(Object.assign({}, this.cartItemFactory.create()), itemInput), { product_id: itemInput.productId });
984
- };
985
- DaffInMemoryBackendCartItemsService.prototype.listItems = function (reqInfo) {
986
- return this.getCart(reqInfo).items;
987
- };
988
- DaffInMemoryBackendCartItemsService.prototype.getItem = function (reqInfo, itemId) {
989
- var cart = this.getCart(reqInfo);
990
- return cart.items.find(function (_a) {
991
- var id = _a.id;
992
- return itemId === id;
993
- });
994
- };
995
- DaffInMemoryBackendCartItemsService.prototype.updateItem = function (reqInfo, itemId) {
996
- var cart = this.getCart(reqInfo);
997
- var cartIndex = reqInfo.collection.findIndex(function (c) { return c.id === reqInfo.id; });
998
- var itemChanges = reqInfo.utils.getJsonBody(reqInfo.req);
999
- var itemIndex = cart.items.findIndex(function (item) { return itemId === item.id; });
1000
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map(function (item, index) { return index === itemIndex ? Object.assign(Object.assign({}, cart.items[itemIndex]), itemChanges) : item; }), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1001
- return reqInfo.collection[cartIndex];
1002
- };
1003
- DaffInMemoryBackendCartItemsService.prototype.addItem = function (reqInfo) {
1004
- var cart = this.getCart(reqInfo);
1005
- var cartIndex = reqInfo.collection.findIndex(function (c) { return c.id === reqInfo.id; });
1006
- var itemInput = reqInfo.utils.getJsonBody(reqInfo.req);
1007
- var existingCartItemIndex = cart.items.findIndex(function (item) { return item.product_id === itemInput.productId; });
1008
- if (existingCartItemIndex > -1) {
1009
- var updatedCartItem_1 = Object.assign(Object.assign({}, cart.items[existingCartItemIndex]), { qty: cart.items[existingCartItemIndex].qty + itemInput.qty });
1010
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map(function (item, index) { return index === existingCartItemIndex ? updatedCartItem_1 : item; }), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1011
- }
1012
- else {
1013
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: __spread(cart.items, [
1014
- this.transformItemInput(itemInput),
1015
- ]), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1016
- }
1017
- return reqInfo.collection[cartIndex];
1018
- };
1019
- DaffInMemoryBackendCartItemsService.prototype.deleteItem = function (reqInfo, itemId) {
1020
- var cart = this.getCart(reqInfo);
1021
- var itemIndex = cart.items.findIndex(function (_a) {
1022
- var id = _a.id;
1023
- return itemId === id;
1024
- });
1025
- var cartIndex = reqInfo.collection.findIndex(function (c) { return c.id === reqInfo.id; });
1026
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.filter(function (item, index) { return index !== itemIndex; }), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1027
- return reqInfo.collection[cartIndex];
1028
- };
1029
- return DaffInMemoryBackendCartItemsService;
1030
- }());
1031
- /** @nocollapse */ DaffInMemoryBackendCartItemsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartItemsService_Factory() { return new DaffInMemoryBackendCartItemsService(i0.ɵɵinject(i1$1.DaffCartItemFactory), i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartItemsService, providedIn: "root" });
1032
- DaffInMemoryBackendCartItemsService.decorators = [
1033
- { type: i0.Injectable, args: [{
1034
- providedIn: 'root',
1035
- },] }
1036
- ];
1037
- /** @nocollapse */
1038
- DaffInMemoryBackendCartItemsService.ctorParameters = function () { return [
1039
- { type: i1$1.DaffCartItemFactory },
1040
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1041
- ]; };
1042
-
1043
- /**
1044
- * @inheritdoc
1045
- */
1046
- var DaffInMemoryBackendCartOrderService = /** @class */ (function () {
1047
- function DaffInMemoryBackendCartOrderService() {
1048
- }
1049
- DaffInMemoryBackendCartOrderService.prototype.post = function (reqInfo) {
1050
- var _this = this;
1051
- return reqInfo.utils.createResponse$(function () { return ({
1052
- body: _this.placeOrder(reqInfo),
1053
- status: angularInMemoryWebApi.STATUS.OK,
1054
- }); });
1055
- };
1056
- DaffInMemoryBackendCartOrderService.prototype.placeOrder = function (reqInfo) {
1057
- return {
1058
- id: '8235422034',
1059
- cartId: '89fdsa8sadf',
1060
- orderId: '8235422034',
1061
- };
1062
- };
1063
- return DaffInMemoryBackendCartOrderService;
1064
- }());
1065
- /** @nocollapse */ DaffInMemoryBackendCartOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartOrderService_Factory() { return new DaffInMemoryBackendCartOrderService(); }, token: DaffInMemoryBackendCartOrderService, providedIn: "root" });
1066
- DaffInMemoryBackendCartOrderService.decorators = [
1067
- { type: i0.Injectable, args: [{
1068
- providedIn: 'root',
1069
- },] }
1070
- ];
1071
-
1072
- /**
1073
- * @inheritdoc
1074
- */
1075
- var DaffInMemoryBackendCartPaymentMethodsService = /** @class */ (function () {
1076
- function DaffInMemoryBackendCartPaymentMethodsService() {
1077
- }
1078
- DaffInMemoryBackendCartPaymentMethodsService.prototype.get = function (reqInfo) {
1079
- var _this = this;
1080
- return reqInfo.utils.createResponse$(function () { return ({
1081
- body: _this.listPaymentMethods(reqInfo),
1082
- status: angularInMemoryWebApi.STATUS.OK,
1083
- }); });
1084
- };
1085
- DaffInMemoryBackendCartPaymentMethodsService.prototype.getCart = function (reqInfo) {
1086
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1087
- };
1088
- DaffInMemoryBackendCartPaymentMethodsService.prototype.listPaymentMethods = function (reqInfo) {
1089
- return this.getCart(reqInfo).available_payment_methods;
1090
- };
1091
- return DaffInMemoryBackendCartPaymentMethodsService;
1092
- }());
1093
- /** @nocollapse */ DaffInMemoryBackendCartPaymentMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentMethodsService_Factory() { return new DaffInMemoryBackendCartPaymentMethodsService(); }, token: DaffInMemoryBackendCartPaymentMethodsService, providedIn: "root" });
1094
- DaffInMemoryBackendCartPaymentMethodsService.decorators = [
1095
- { type: i0.Injectable, args: [{
1096
- providedIn: 'root',
1097
- },] }
1098
- ];
1099
-
1100
- /**
1101
- * @inheritdoc
1102
- */
1103
- var DaffInMemoryBackendCartPaymentService = /** @class */ (function () {
1104
- function DaffInMemoryBackendCartPaymentService(extraFieldsHook) {
1105
- this.extraFieldsHook = extraFieldsHook;
1106
- }
1107
- DaffInMemoryBackendCartPaymentService.prototype.get = function (reqInfo) {
1108
- var _this = this;
1109
- return reqInfo.utils.createResponse$(function () { return ({
1110
- body: _this.getPayment(reqInfo),
1111
- status: angularInMemoryWebApi.STATUS.OK,
1112
- }); });
1113
- };
1114
- DaffInMemoryBackendCartPaymentService.prototype.put = function (reqInfo) {
1115
- var _this = this;
1116
- return reqInfo.utils.createResponse$(function () { return ({
1117
- body: _this.updatePayment(reqInfo),
1118
- status: angularInMemoryWebApi.STATUS.OK,
1119
- }); });
1120
- };
1121
- DaffInMemoryBackendCartPaymentService.prototype.delete = function (reqInfo) {
1122
- var _this = this;
1123
- return reqInfo.utils.createResponse$(function () { return ({
1124
- body: _this.removePayment(reqInfo),
1125
- status: angularInMemoryWebApi.STATUS.OK,
1126
- }); });
1127
- };
1128
- DaffInMemoryBackendCartPaymentService.prototype.getCart = function (reqInfo) {
1129
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1130
- };
1131
- DaffInMemoryBackendCartPaymentService.prototype.getPayment = function (reqInfo) {
1132
- return this.getCart(reqInfo).payment;
1133
- };
1134
- DaffInMemoryBackendCartPaymentService.prototype.updatePayment = function (reqInfo) {
1135
- var cart = this.getCart(reqInfo);
1136
- var _a = reqInfo.utils.getJsonBody(reqInfo.req), payment = _a.payment, address = _a.address;
1137
- cart.payment = payment;
1138
- if (address) {
1139
- cart.billing_address = address;
1140
- }
1141
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1142
- };
1143
- DaffInMemoryBackendCartPaymentService.prototype.removePayment = function (reqInfo) {
1144
- var cart = this.getCart(reqInfo);
1145
- cart.payment = null;
1146
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1147
- };
1148
- return DaffInMemoryBackendCartPaymentService;
1149
- }());
1150
- /** @nocollapse */ DaffInMemoryBackendCartPaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentService_Factory() { return new DaffInMemoryBackendCartPaymentService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartPaymentService, providedIn: "root" });
1151
- DaffInMemoryBackendCartPaymentService.decorators = [
1152
- { type: i0.Injectable, args: [{
1153
- providedIn: 'root',
1154
- },] }
1155
- ];
1156
- /** @nocollapse */
1157
- DaffInMemoryBackendCartPaymentService.ctorParameters = function () { return [
1158
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1159
- ]; };
1160
-
1161
- /**
1162
- * @inheritdoc
1163
- */
1164
- var DaffInMemoryBackendCartShippingAddressService = /** @class */ (function () {
1165
- function DaffInMemoryBackendCartShippingAddressService(extraFieldsHook) {
1166
- this.extraFieldsHook = extraFieldsHook;
1167
- }
1168
- DaffInMemoryBackendCartShippingAddressService.prototype.get = function (reqInfo) {
1169
- var _this = this;
1170
- return reqInfo.utils.createResponse$(function () { return ({
1171
- body: _this.getShippingAddress(reqInfo),
1172
- status: angularInMemoryWebApi.STATUS.OK,
1173
- }); });
1174
- };
1175
- DaffInMemoryBackendCartShippingAddressService.prototype.put = function (reqInfo) {
1176
- var _this = this;
1177
- return reqInfo.utils.createResponse$(function () { return ({
1178
- body: _this.updateShippingAddress(reqInfo),
1179
- status: angularInMemoryWebApi.STATUS.OK,
1180
- }); });
1181
- };
1182
- DaffInMemoryBackendCartShippingAddressService.prototype.getCart = function (reqInfo) {
1183
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1184
- };
1185
- DaffInMemoryBackendCartShippingAddressService.prototype.getShippingAddress = function (reqInfo) {
1186
- return this.getCart(reqInfo).shipping_address;
1187
- };
1188
- DaffInMemoryBackendCartShippingAddressService.prototype.updateShippingAddress = function (reqInfo) {
1189
- var cart = this.getCart(reqInfo);
1190
- var address = reqInfo.utils.getJsonBody(reqInfo.req);
1191
- cart.shipping_address = address;
1192
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1193
- };
1194
- return DaffInMemoryBackendCartShippingAddressService;
1195
- }());
1196
- /** @nocollapse */ DaffInMemoryBackendCartShippingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingAddressService_Factory() { return new DaffInMemoryBackendCartShippingAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingAddressService, providedIn: "root" });
1197
- DaffInMemoryBackendCartShippingAddressService.decorators = [
1198
- { type: i0.Injectable, args: [{
1199
- providedIn: 'root',
1200
- },] }
1201
- ];
1202
- /** @nocollapse */
1203
- DaffInMemoryBackendCartShippingAddressService.ctorParameters = function () { return [
1204
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1205
- ]; };
1206
-
1207
- /**
1208
- * @inheritdoc
1209
- */
1210
- var DaffInMemoryBackendCartShippingInformationService = /** @class */ (function () {
1211
- function DaffInMemoryBackendCartShippingInformationService(extraFieldsHook) {
1212
- this.extraFieldsHook = extraFieldsHook;
1213
- }
1214
- DaffInMemoryBackendCartShippingInformationService.prototype.get = function (reqInfo) {
1215
- var _this = this;
1216
- return reqInfo.utils.createResponse$(function () { return ({
1217
- body: _this.getShippingInformation(reqInfo),
1218
- status: angularInMemoryWebApi.STATUS.OK,
1219
- }); });
1220
- };
1221
- DaffInMemoryBackendCartShippingInformationService.prototype.put = function (reqInfo) {
1222
- var _this = this;
1223
- return reqInfo.utils.createResponse$(function () { return ({
1224
- body: _this.updateShippingInformation(reqInfo),
1225
- status: angularInMemoryWebApi.STATUS.OK,
1226
- }); });
1227
- };
1228
- DaffInMemoryBackendCartShippingInformationService.prototype.delete = function (reqInfo) {
1229
- var _this = this;
1230
- return reqInfo.utils.createResponse$(function () { return ({
1231
- body: _this.removeShippingInformation(reqInfo),
1232
- status: angularInMemoryWebApi.STATUS.OK,
1233
- }); });
1234
- };
1235
- DaffInMemoryBackendCartShippingInformationService.prototype.getCart = function (reqInfo) {
1236
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1237
- };
1238
- DaffInMemoryBackendCartShippingInformationService.prototype.getShippingInformation = function (reqInfo) {
1239
- return this.getCart(reqInfo).shipping_information;
1240
- };
1241
- DaffInMemoryBackendCartShippingInformationService.prototype.updateShippingInformation = function (reqInfo) {
1242
- var cart = this.getCart(reqInfo);
1243
- var shippingInformation = reqInfo.utils.getJsonBody(reqInfo.req);
1244
- cart.shipping_information = shippingInformation;
1245
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1246
- };
1247
- DaffInMemoryBackendCartShippingInformationService.prototype.removeShippingInformation = function (reqInfo) {
1248
- var cart = this.getCart(reqInfo);
1249
- cart.shipping_information = null;
1250
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1251
- };
1252
- return DaffInMemoryBackendCartShippingInformationService;
1253
- }());
1254
- /** @nocollapse */ DaffInMemoryBackendCartShippingInformationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingInformationService_Factory() { return new DaffInMemoryBackendCartShippingInformationService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingInformationService, providedIn: "root" });
1255
- DaffInMemoryBackendCartShippingInformationService.decorators = [
1256
- { type: i0.Injectable, args: [{
1257
- providedIn: 'root',
1258
- },] }
1259
- ];
1260
- /** @nocollapse */
1261
- DaffInMemoryBackendCartShippingInformationService.ctorParameters = function () { return [
1262
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1263
- ]; };
1264
-
1265
- /**
1266
- * @inheritdoc
1267
- */
1268
- var DaffInMemoryBackendCartShippingMethodsService = /** @class */ (function () {
1269
- function DaffInMemoryBackendCartShippingMethodsService(shippingMethodFactory) {
1270
- this.shippingMethodFactory = shippingMethodFactory;
1271
- }
1272
- DaffInMemoryBackendCartShippingMethodsService.prototype.get = function (reqInfo) {
1273
- var _this = this;
1274
- return reqInfo.utils.createResponse$(function () { return ({
1275
- body: _this.listShippingMethods(reqInfo),
1276
- status: angularInMemoryWebApi.STATUS.OK,
1277
- }); });
1278
- };
1279
- DaffInMemoryBackendCartShippingMethodsService.prototype.getCart = function (reqInfo) {
1280
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1281
- };
1282
- DaffInMemoryBackendCartShippingMethodsService.prototype.listShippingMethods = function (reqInfo) {
1283
- var _a;
1284
- var cart = this.getCart(reqInfo);
1285
- if (cart.shipping_address) {
1286
- if (((_a = cart.available_shipping_methods) === null || _a === void 0 ? void 0 : _a.length) === 0) {
1287
- cart.available_shipping_methods = this.shippingMethodFactory.createMany(3);
1288
- }
1289
- }
1290
- else {
1291
- cart.available_shipping_methods = [];
1292
- }
1293
- return cart.available_shipping_methods;
1294
- };
1295
- return DaffInMemoryBackendCartShippingMethodsService;
1296
- }());
1297
- /** @nocollapse */ DaffInMemoryBackendCartShippingMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingMethodsService_Factory() { return new DaffInMemoryBackendCartShippingMethodsService(i0.ɵɵinject(i1$1.DaffCartShippingRateFactory)); }, token: DaffInMemoryBackendCartShippingMethodsService, providedIn: "root" });
1298
- DaffInMemoryBackendCartShippingMethodsService.decorators = [
1299
- { type: i0.Injectable, args: [{
1300
- providedIn: 'root',
1301
- },] }
1302
- ];
1303
- /** @nocollapse */
1304
- DaffInMemoryBackendCartShippingMethodsService.ctorParameters = function () { return [
1305
- { type: i1$1.DaffCartShippingRateFactory }
1306
- ]; };
1307
-
1308
- /**
1309
- * @inheritdoc
1310
- */
1311
- var DaffInMemoryBackendCartService = /** @class */ (function () {
1312
- function DaffInMemoryBackendCartService(cartFactory, extraFieldsHook) {
1313
- this.cartFactory = cartFactory;
1314
- this.extraFieldsHook = extraFieldsHook;
1315
- }
1316
- DaffInMemoryBackendCartService.prototype.get = function (reqInfo) {
1317
- var _this = this;
1318
- var cart = this.getCart(reqInfo);
1319
- return reqInfo.utils.createResponse$(function () { return ({
1320
- body: cart ? Object.assign(Object.assign({}, cart), { extra_attributes: _this.extraFieldsHook(reqInfo, cart) }) : cart,
1321
- status: cart ? angularInMemoryWebApi.STATUS.OK : angularInMemoryWebApi.STATUS.NOT_FOUND,
1322
- }); });
1323
- };
1324
- DaffInMemoryBackendCartService.prototype.post = function (reqInfo) {
1325
- var _this = this;
1326
- return reqInfo.utils.createResponse$(function () {
1327
- var body;
1328
- var action = _this.getAction(reqInfo);
1329
- if (reqInfo.id === 'addToCart') {
1330
- // deprecated
1331
- body = {};
1332
- }
1333
- else if (action === 'clear') {
1334
- body = _this.clear(reqInfo);
1335
- }
1336
- else {
1337
- body = _this.create(reqInfo);
1338
- }
1339
- return {
1340
- body: body,
1341
- status: angularInMemoryWebApi.STATUS.OK,
1342
- };
1343
- });
1344
- };
1345
- /**
1346
- * Gets whatever follows the cart ID section of the request URL.
1347
- */
1348
- DaffInMemoryBackendCartService.prototype.getAction = function (reqInfo) {
1349
- return reqInfo.url.replace("/" + reqInfo.resourceUrl + reqInfo.id + "/", '');
1350
- };
1351
- DaffInMemoryBackendCartService.prototype.clear = function (reqInfo) {
1352
- var cart = this.getCart(reqInfo);
1353
- cart.items = [];
1354
- return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1355
- };
1356
- DaffInMemoryBackendCartService.prototype.create = function (reqInfo) {
1357
- var cart = this.cartFactory.create();
1358
- reqInfo.collection.push(cart);
1359
- return {
1360
- id: cart.id,
1361
- };
1362
- };
1363
- DaffInMemoryBackendCartService.prototype.getCart = function (reqInfo) {
1364
- return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1365
- };
1366
- return DaffInMemoryBackendCartService;
1367
- }());
1368
- /** @nocollapse */ DaffInMemoryBackendCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartService_Factory() { return new DaffInMemoryBackendCartService(i0.ɵɵinject(i1$1.DaffCartFactory), i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartService, providedIn: "root" });
1369
- DaffInMemoryBackendCartService.decorators = [
1370
- { type: i0.Injectable, args: [{
1371
- providedIn: 'root',
1372
- },] }
1373
- ];
1374
- /** @nocollapse */
1375
- DaffInMemoryBackendCartService.ctorParameters = function () { return [
1376
- { type: i1$1.DaffCartFactory },
1377
- { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1378
- ]; };
1379
-
1380
- /**
1381
- * The root cart in-memory backend.
1382
- * Creates the database and delegates requests to child backends.
1383
- */
1384
- var DaffInMemoryBackendCartRootService = /** @class */ (function () {
1385
- function DaffInMemoryBackendCartRootService(cartService, cartItemsService, cartOrderService, cartCouponService, cartAddressService, cartShippingAddressService, cartBillingAddressService, cartPaymentMethodsService, cartShippingMethodsService, cartPaymentService, cartShippingInformationService) {
1386
- this.cartService = cartService;
1387
- this.cartItemsService = cartItemsService;
1388
- this.cartOrderService = cartOrderService;
1389
- this.cartCouponService = cartCouponService;
1390
- this.cartAddressService = cartAddressService;
1391
- this.cartShippingAddressService = cartShippingAddressService;
1392
- this.cartBillingAddressService = cartBillingAddressService;
1393
- this.cartPaymentMethodsService = cartPaymentMethodsService;
1394
- this.cartShippingMethodsService = cartShippingMethodsService;
1395
- this.cartPaymentService = cartPaymentService;
1396
- this.cartShippingInformationService = cartShippingInformationService;
1397
- /**
1398
- * The collection of carts in the backend.
1399
- */
1400
- this.carts = [];
1401
- }
1402
- DaffInMemoryBackendCartRootService.prototype.createDb = function (reqInfo) {
1403
- if (reqInfo) {
1404
- var seedData = reqInfo.utils.getJsonBody(reqInfo.req).carts;
1405
- if (seedData) {
1406
- this.carts = seedData;
1407
- }
1408
- }
1409
- return {
1410
- cart: this.carts,
1411
- };
1412
- };
1413
- DaffInMemoryBackendCartRootService.prototype.get = function (reqInfo) {
1414
- return this.delegateRequest(reqInfo);
1415
- };
1416
- DaffInMemoryBackendCartRootService.prototype.post = function (reqInfo) {
1417
- return this.delegateRequest(reqInfo);
1418
- };
1419
- DaffInMemoryBackendCartRootService.prototype.put = function (reqInfo) {
1420
- return this.delegateRequest(reqInfo);
1421
- };
1422
- DaffInMemoryBackendCartRootService.prototype.delete = function (reqInfo) {
1423
- return this.delegateRequest(reqInfo);
1424
- };
1425
- DaffInMemoryBackendCartRootService.prototype.delegateRequest = function (reqInfo) {
1426
- reqInfo.collection = this.carts;
1427
- switch (reqInfo.collectionName) {
1428
- case 'cart':
1429
- return this.cartService[reqInfo.method](reqInfo);
1430
- case 'cart-items':
1431
- return this.cartItemsService[reqInfo.method](reqInfo);
1432
- case 'cart-order':
1433
- return this.cartOrderService[reqInfo.method](reqInfo);
1434
- case 'cart-coupon':
1435
- return this.cartCouponService[reqInfo.method](reqInfo);
1436
- case 'cart-address':
1437
- return this.cartAddressService[reqInfo.method](reqInfo);
1438
- case 'cart-shipping-address':
1439
- return this.cartShippingAddressService[reqInfo.method](reqInfo);
1440
- case 'cart-billing-address':
1441
- return this.cartBillingAddressService[reqInfo.method](reqInfo);
1442
- case 'cart-payment-methods':
1443
- return this.cartPaymentMethodsService[reqInfo.method](reqInfo);
1444
- case 'cart-shipping-methods':
1445
- return this.cartShippingMethodsService[reqInfo.method](reqInfo);
1446
- case 'cart-payment':
1447
- return this.cartPaymentService[reqInfo.method](reqInfo);
1448
- case 'cart-shipping-information':
1449
- return this.cartShippingInformationService[reqInfo.method](reqInfo);
1450
- default:
1451
- return reqInfo.utils.createResponse$(function () { return ({
1452
- body: {},
1453
- status: angularInMemoryWebApi.STATUS.OK,
1454
- }); });
1455
- }
1456
- };
1457
- return DaffInMemoryBackendCartRootService;
1458
- }());
1459
- /**
1460
- * The collections that the root service manages.
1461
- * Useful for a higher-level backend that delegates to this one based on collection name.
1462
- */
1463
- DaffInMemoryBackendCartRootService.COLLECTION_NAMES = [
1464
- 'cart',
1465
- 'cart-items',
1466
- 'cart-order',
1467
- 'cart-coupon',
1468
- 'cart-address',
1469
- 'cart-shipping-address',
1470
- 'cart-billing-address',
1471
- 'cart-payment-methods',
1472
- 'cart-shipping-methods',
1473
- 'cart-payment',
1474
- 'cart-shipping-information',
1475
- ];
1476
- /** @nocollapse */ DaffInMemoryBackendCartRootService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartRootService_Factory() { return new DaffInMemoryBackendCartRootService(i0.ɵɵinject(DaffInMemoryBackendCartService), i0.ɵɵinject(DaffInMemoryBackendCartItemsService), i0.ɵɵinject(DaffInMemoryBackendCartOrderService), i0.ɵɵinject(DaffInMemoryBackendCartCouponService), i0.ɵɵinject(DaffInMemoryBackendCartAddressService), i0.ɵɵinject(DaffInMemoryBackendCartShippingAddressService), i0.ɵɵinject(DaffInMemoryBackendCartBillingAddressService), i0.ɵɵinject(DaffInMemoryBackendCartPaymentMethodsService), i0.ɵɵinject(DaffInMemoryBackendCartShippingMethodsService), i0.ɵɵinject(DaffInMemoryBackendCartPaymentService), i0.ɵɵinject(DaffInMemoryBackendCartShippingInformationService)); }, token: DaffInMemoryBackendCartRootService, providedIn: "root" });
1477
- DaffInMemoryBackendCartRootService.decorators = [
1478
- { type: i0.Injectable, args: [{
1479
- providedIn: 'root',
1480
- },] }
1481
- ];
1482
- /** @nocollapse */
1483
- DaffInMemoryBackendCartRootService.ctorParameters = function () { return [
1484
- { type: DaffInMemoryBackendCartService },
1485
- { type: DaffInMemoryBackendCartItemsService },
1486
- { type: DaffInMemoryBackendCartOrderService },
1487
- { type: DaffInMemoryBackendCartCouponService },
1488
- { type: DaffInMemoryBackendCartAddressService },
1489
- { type: DaffInMemoryBackendCartShippingAddressService },
1490
- { type: DaffInMemoryBackendCartBillingAddressService },
1491
- { type: DaffInMemoryBackendCartPaymentMethodsService },
1492
- { type: DaffInMemoryBackendCartShippingMethodsService },
1493
- { type: DaffInMemoryBackendCartPaymentService },
1494
- { type: DaffInMemoryBackendCartShippingInformationService }
1495
- ]; };
1496
-
1497
- /**
1498
- * Generated bundle index. Do not edit.
1499
- */
1500
-
1501
- exports.DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK = DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK;
1502
- exports.DaffCartInMemoryDriverModule = DaffCartInMemoryDriverModule;
1503
- exports.DaffInMemoryBackendCartAddressService = DaffInMemoryBackendCartAddressService;
1504
- exports.DaffInMemoryBackendCartBillingAddressService = DaffInMemoryBackendCartBillingAddressService;
1505
- exports.DaffInMemoryBackendCartCouponService = DaffInMemoryBackendCartCouponService;
1506
- exports.DaffInMemoryBackendCartItemsService = DaffInMemoryBackendCartItemsService;
1507
- exports.DaffInMemoryBackendCartOrderService = DaffInMemoryBackendCartOrderService;
1508
- exports.DaffInMemoryBackendCartPaymentMethodsService = DaffInMemoryBackendCartPaymentMethodsService;
1509
- exports.DaffInMemoryBackendCartPaymentService = DaffInMemoryBackendCartPaymentService;
1510
- exports.DaffInMemoryBackendCartRootService = DaffInMemoryBackendCartRootService;
1511
- exports.DaffInMemoryBackendCartService = DaffInMemoryBackendCartService;
1512
- exports.DaffInMemoryBackendCartShippingAddressService = DaffInMemoryBackendCartShippingAddressService;
1513
- exports.DaffInMemoryBackendCartShippingInformationService = DaffInMemoryBackendCartShippingInformationService;
1514
- exports.DaffInMemoryBackendCartShippingMethodsService = DaffInMemoryBackendCartShippingMethodsService;
1515
- exports.DaffInMemoryCartBillingAddressService = DaffInMemoryCartBillingAddressService;
1516
- exports.DaffInMemoryCartCouponService = DaffInMemoryCartCouponService;
1517
- exports.DaffInMemoryCartItemService = DaffInMemoryCartItemService;
1518
- exports.DaffInMemoryCartOrderService = DaffInMemoryCartOrderService;
1519
- exports.DaffInMemoryCartPaymentMethodsService = DaffInMemoryCartPaymentMethodsService;
1520
- exports.DaffInMemoryCartPaymentService = DaffInMemoryCartPaymentService;
1521
- exports.DaffInMemoryCartService = DaffInMemoryCartService;
1522
- exports.DaffInMemoryCartShippingAddressService = DaffInMemoryCartShippingAddressService;
1523
- exports.DaffInMemoryCartShippingInformationService = DaffInMemoryCartShippingInformationService;
1524
- exports.DaffInMemoryCartShippingMethodsService = DaffInMemoryCartShippingMethodsService;
1525
- exports.ɵa = DaffInMemoryCartAddressService;
1526
-
1527
- Object.defineProperty(exports, '__esModule', { value: true });
1528
-
1529
- })));
1530
- //# sourceMappingURL=daffodil-cart-driver-in-memory.umd.js.map