@daffodil/cart 0.38.9 → 0.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/daffodil-cart-driver-in-memory.umd.js +111 -1202
- package/bundles/daffodil-cart-driver-in-memory.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-in-memory.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-in-memory.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.js +12 -177
- package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.js +164 -1661
- package/bundles/daffodil-cart-driver-magento.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.js +23 -375
- package/bundles/daffodil-cart-driver-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.js +29 -466
- package/bundles/daffodil-cart-driver.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.min.js +16 -1
- package/bundles/daffodil-cart-driver.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.js +43 -518
- package/bundles/daffodil-cart-routing.umd.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.js +6 -241
- package/bundles/daffodil-cart-state-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-state-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.js +656 -4198
- package/bundles/daffodil-cart-state.umd.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.min.js +1 -1
- package/bundles/daffodil-cart-state.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.js +13 -187
- package/bundles/daffodil-cart-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart.umd.js +43 -271
- package/bundles/daffodil-cart.umd.js.map +1 -1
- package/bundles/daffodil-cart.umd.min.js +3 -2
- package/bundles/daffodil-cart.umd.min.js.map +1 -1
- package/driver/in-memory/package.json +1 -1
- package/driver/magento/package.json +1 -1
- package/driver/magento/testing/package.json +1 -1
- package/driver/package.json +1 -1
- package/driver/testing/package.json +1 -1
- package/esm2015/daffodil-cart.js +2 -7
- package/esm2015/driver/daffodil-cart-driver.js +2 -7
- package/esm2015/driver/errors/cart-not-found.js +1 -13
- package/esm2015/driver/errors/codes.enum.js +12 -18
- package/esm2015/driver/errors/expired-payment-token.js +1 -15
- package/esm2015/driver/errors/invalid-api-response.js +1 -15
- package/esm2015/driver/errors/invalid-country.js +1 -13
- package/esm2015/driver/errors/invalid-coupon-code.js +1 -16
- package/esm2015/driver/errors/invalid-region.js +1 -13
- package/esm2015/driver/errors/map.js +1 -7
- package/esm2015/driver/errors/product-not-found.js +1 -13
- package/esm2015/driver/errors/product-out-of-stock.js +1 -13
- package/esm2015/driver/errors/public_api.js +1 -6
- package/esm2015/driver/in-memory/backend/cart/cart.service.js +7 -65
- package/esm2015/driver/in-memory/backend/cart-address/cart-address.service.js +5 -39
- package/esm2015/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.js +7 -53
- package/esm2015/driver/in-memory/backend/cart-coupon/cart-coupon.service.js +10 -85
- package/esm2015/driver/in-memory/backend/cart-items/cart-items.service.js +21 -169
- package/esm2015/driver/in-memory/backend/cart-order/cart-order.service.js +5 -22
- package/esm2015/driver/in-memory/backend/cart-payment/cart-payment.service.js +9 -67
- package/esm2015/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.js +5 -27
- package/esm2015/driver/in-memory/backend/cart-root.service.js +4 -119
- package/esm2015/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.js +7 -53
- package/esm2015/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.js +9 -68
- package/esm2015/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.js +5 -38
- package/esm2015/driver/in-memory/backend/public_api.js +1 -6
- package/esm2015/driver/in-memory/daffodil-cart-driver-in-memory.js +2 -7
- package/esm2015/driver/in-memory/drivers/cart/cart.service.js +4 -48
- package/esm2015/driver/in-memory/drivers/cart-address/cart-address.service.js +3 -28
- package/esm2015/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.js +3 -32
- package/esm2015/driver/in-memory/drivers/cart-coupon/cart-coupon.service.js +3 -41
- package/esm2015/driver/in-memory/drivers/cart-driver.module.js +1 -9
- package/esm2015/driver/in-memory/drivers/cart-item/cart-item.service.js +3 -48
- package/esm2015/driver/in-memory/drivers/cart-order/cart-order.service.js +3 -28
- package/esm2015/driver/in-memory/drivers/cart-payment/cart-payment.service.js +3 -42
- package/esm2015/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -27
- package/esm2015/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -32
- package/esm2015/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -36
- package/esm2015/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -27
- package/esm2015/driver/in-memory/drivers/public_api.js +1 -6
- package/esm2015/driver/in-memory/index.js +2 -7
- package/esm2015/driver/in-memory/injection-tokens/extra-attributes-hook.token.js +2 -16
- package/esm2015/driver/in-memory/injection-tokens/public_api.js +1 -6
- package/esm2015/driver/in-memory/public_api.js +4 -9
- package/esm2015/driver/index.js +2 -7
- package/esm2015/driver/interfaces/cart-address-service.interface.js +1 -22
- package/esm2015/driver/interfaces/cart-billing-address-service.interface.js +1 -28
- package/esm2015/driver/interfaces/cart-coupon-service.interface.js +1 -41
- package/esm2015/driver/interfaces/cart-item-service.interface.js +1 -50
- package/esm2015/driver/interfaces/cart-order-service.interface.js +1 -22
- package/esm2015/driver/interfaces/cart-payment-methods-service.interface.js +1 -21
- package/esm2015/driver/interfaces/cart-payment-service.interface.js +1 -42
- package/esm2015/driver/interfaces/cart-service.interface.js +1 -42
- package/esm2015/driver/interfaces/cart-shipping-address-service.interface.js +1 -28
- package/esm2015/driver/interfaces/cart-shipping-information-service.interface.js +1 -36
- package/esm2015/driver/interfaces/cart-shipping-methods-service.interface.js +1 -21
- package/esm2015/driver/interfaces/public_api.js +1 -6
- package/esm2015/driver/magento/cart-address.service.js +5 -71
- package/esm2015/driver/magento/cart-billing-address.service.js +7 -93
- package/esm2015/driver/magento/cart-coupon.service.js +6 -75
- package/esm2015/driver/magento/cart-driver.module.js +1 -9
- package/esm2015/driver/magento/cart-item.service.js +10 -126
- package/esm2015/driver/magento/cart-order.service.js +5 -33
- package/esm2015/driver/magento/cart-payment-methods.service.js +4 -43
- package/esm2015/driver/magento/cart-payment.service.js +7 -115
- package/esm2015/driver/magento/cart-shipping-address.service.js +7 -93
- package/esm2015/driver/magento/cart-shipping-information.service.js +8 -87
- package/esm2015/driver/magento/cart-shipping-methods.service.js +4 -43
- package/esm2015/driver/magento/cart.service.js +6 -84
- package/esm2015/driver/magento/daffodil-cart-driver-magento.js +2 -7
- package/esm2015/driver/magento/errors/codes.js +6 -12
- package/esm2015/driver/magento/errors/map.js +1 -8
- package/esm2015/driver/magento/errors/transform.js +2 -19
- package/esm2015/driver/magento/index.js +2 -7
- package/esm2015/driver/magento/injection-tokens/cart-mutation-queue.token.js +2 -11
- package/esm2015/driver/magento/injection-tokens/fragments/cart.js +2 -11
- package/esm2015/driver/magento/injection-tokens/public_api.js +1 -6
- package/esm2015/driver/magento/models/public_api.js +3 -8
- package/esm2015/driver/magento/models/requests/billing-address.js +2 -20
- package/esm2015/driver/magento/models/requests/cart-address.js +2 -32
- package/esm2015/driver/magento/models/requests/cart-item-update.js +2 -16
- package/esm2015/driver/magento/models/requests/cart-item.js +2 -32
- package/esm2015/driver/magento/models/requests/payment-method.js +2 -16
- package/esm2015/driver/magento/models/requests/public_api.js +2 -7
- package/esm2015/driver/magento/models/requests/shipping-address.js +2 -18
- package/esm2015/driver/magento/models/requests/shipping-method.js +2 -16
- package/esm2015/driver/magento/models/responses/cart-address.js +2 -32
- package/esm2015/driver/magento/models/responses/cart-coupon.js +2 -14
- package/esm2015/driver/magento/models/responses/cart-item.js +7 -70
- package/esm2015/driver/magento/models/responses/cart-payment-method.js +2 -20
- package/esm2015/driver/magento/models/responses/cart-shipping-method.js +2 -22
- package/esm2015/driver/magento/models/responses/cart.js +2 -31
- package/esm2015/driver/magento/models/responses/public_api.js +2 -7
- package/esm2015/driver/magento/models/responses/shipping-address.js +2 -16
- package/esm2015/driver/magento/public_api.js +5 -10
- package/esm2015/driver/magento/queries/add-cart-item.js +3 -13
- package/esm2015/driver/magento/queries/apply-coupon.js +3 -13
- package/esm2015/driver/magento/queries/create-cart.js +1 -7
- package/esm2015/driver/magento/queries/fragments/available-payment-method.js +1 -7
- package/esm2015/driver/magento/queries/fragments/available-shipping-method.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart-address.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart-coupon.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart-item.js +1 -8
- package/esm2015/driver/magento/queries/fragments/cart-totals.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart.js +1 -7
- package/esm2015/driver/magento/queries/fragments/money.js +1 -7
- package/esm2015/driver/magento/queries/fragments/prices.js +1 -7
- package/esm2015/driver/magento/queries/fragments/public_api.js +1 -6
- package/esm2015/driver/magento/queries/fragments/selected-payment-method.js +1 -7
- package/esm2015/driver/magento/queries/fragments/selected-shipping-method.js +1 -7
- package/esm2015/driver/magento/queries/get-billing-address.js +3 -13
- package/esm2015/driver/magento/queries/get-cart.js +3 -13
- package/esm2015/driver/magento/queries/get-selected-payment-method.js +3 -13
- package/esm2015/driver/magento/queries/get-selected-shipping-method.js +3 -13
- package/esm2015/driver/magento/queries/get-shipping-address.js +3 -13
- package/esm2015/driver/magento/queries/list-cart-coupons.js +3 -13
- package/esm2015/driver/magento/queries/list-cart-items.js +3 -13
- package/esm2015/driver/magento/queries/list-payment-methods.js +3 -13
- package/esm2015/driver/magento/queries/list-shipping-methods.js +3 -13
- package/esm2015/driver/magento/queries/place-order.js +1 -7
- package/esm2015/driver/magento/queries/public_api.js +3 -8
- package/esm2015/driver/magento/queries/remove-all-coupons.js +3 -13
- package/esm2015/driver/magento/queries/remove-cart-item.js +3 -13
- package/esm2015/driver/magento/queries/responses/add-cart-item.js +2 -14
- package/esm2015/driver/magento/queries/responses/apply-coupon.js +2 -14
- package/esm2015/driver/magento/queries/responses/create-cart.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-billing-address.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-cart.js +2 -16
- package/esm2015/driver/magento/queries/responses/get-selected-payment-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-selected-shipping-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-shipping-address.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-cart-coupons.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-cart-items.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-payment-methods.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-shipping-methods.js +2 -14
- package/esm2015/driver/magento/queries/responses/place-order.js +2 -14
- package/esm2015/driver/magento/queries/responses/public_api.js +2 -7
- package/esm2015/driver/magento/queries/responses/remove-all-coupons.js +2 -14
- package/esm2015/driver/magento/queries/responses/remove-cart-item.js +2 -14
- package/esm2015/driver/magento/queries/responses/set-guest-email.js +2 -14
- package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing-and-email.js +2 -18
- package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing.js +2 -16
- package/esm2015/driver/magento/queries/responses/set-selected-payment-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/set-selected-shipping-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/update-address-with-email.js +2 -18
- package/esm2015/driver/magento/queries/responses/update-address.js +2 -16
- package/esm2015/driver/magento/queries/responses/update-billing-address-with-email.js +2 -16
- package/esm2015/driver/magento/queries/responses/update-billing-address.js +2 -14
- package/esm2015/driver/magento/queries/responses/update-cart-item.js +2 -14
- package/esm2015/driver/magento/queries/responses/update-shipping-address-with-email.js +2 -16
- package/esm2015/driver/magento/queries/responses/update-shipping-address.js +2 -14
- package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing-and-email.js +3 -13
- package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing.js +3 -13
- package/esm2015/driver/magento/queries/set-selected-payment-method.js +3 -13
- package/esm2015/driver/magento/queries/set-selected-shipping-method.js +3 -13
- package/esm2015/driver/magento/queries/update-address-with-email.js +3 -13
- package/esm2015/driver/magento/queries/update-address.js +3 -13
- package/esm2015/driver/magento/queries/update-billing-address-with-email.js +3 -13
- package/esm2015/driver/magento/queries/update-billing-address.js +3 -13
- package/esm2015/driver/magento/queries/update-cart-item.js +3 -13
- package/esm2015/driver/magento/queries/update-shipping-address-with-email.js +3 -13
- package/esm2015/driver/magento/queries/update-shipping-address.js +3 -13
- package/esm2015/driver/magento/testing/daffodil-cart-driver-magento-testing.js +2 -7
- package/esm2015/driver/magento/testing/factories/cart-address-input.factory.js +2 -29
- package/esm2015/driver/magento/testing/factories/cart-address.factory.js +2 -31
- package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +2 -11
- package/esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js +2 -13
- package/esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js +2 -32
- package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
- package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +2 -15
- package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +2 -23
- package/esm2015/driver/magento/testing/factories/cart.factory.js +2 -33
- package/esm2015/driver/magento/testing/factories/public_api.js +1 -6
- package/esm2015/driver/magento/testing/factories/shipping-address.factory.js +2 -15
- package/esm2015/driver/magento/testing/index.js +2 -7
- package/esm2015/driver/magento/testing/public_api.js +2 -7
- package/esm2015/driver/magento/transforms/inputs/billing-address.service.js +2 -21
- package/esm2015/driver/magento/transforms/inputs/cart-address.service.js +2 -11
- package/esm2015/driver/magento/transforms/inputs/cart-item-input-transformers.js +2 -23
- package/esm2015/driver/magento/transforms/inputs/cart-item-update.service.js +2 -11
- package/esm2015/driver/magento/transforms/inputs/payment-method.service.js +2 -11
- package/esm2015/driver/magento/transforms/inputs/shipping-address.service.js +2 -21
- package/esm2015/driver/magento/transforms/inputs/shipping-method.service.js +2 -11
- package/esm2015/driver/magento/transforms/outputs/billing-address.service.js +3 -19
- package/esm2015/driver/magento/transforms/outputs/cart-address.service.js +3 -9
- package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +3 -24
- package/esm2015/driver/magento/transforms/outputs/cart-coupon.js +1 -10
- package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +2 -12
- package/esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js +4 -10
- package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +2 -12
- package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +4 -14
- package/esm2015/driver/magento/transforms/outputs/cart-payment.service.js +3 -9
- package/esm2015/driver/magento/transforms/outputs/cart-shipping-information.service.js +6 -20
- package/esm2015/driver/magento/transforms/outputs/cart-shipping-rate.service.js +3 -9
- package/esm2015/driver/magento/transforms/outputs/cart-totals-transformer.js +4 -31
- package/esm2015/driver/magento/transforms/outputs/cart.service.js +5 -98
- package/esm2015/driver/magento/transforms/outputs/shipping-address.service.js +3 -19
- package/esm2015/driver/magento/transforms/public_api.js +1 -6
- package/esm2015/driver/public_api.js +3 -8
- package/esm2015/driver/testing/daffodil-cart-driver-testing.js +2 -7
- package/esm2015/driver/testing/drivers/cart/cart.service.js +3 -34
- package/esm2015/driver/testing/drivers/cart-address/cart-address.service.js +3 -29
- package/esm2015/driver/testing/drivers/cart-billing-address/cart-billing-address.service.js +3 -33
- package/esm2015/driver/testing/drivers/cart-coupon/cart-coupon.service.js +3 -42
- package/esm2015/driver/testing/drivers/cart-driver.module.js +1 -9
- package/esm2015/driver/testing/drivers/cart-item/cart-item.service.js +3 -49
- package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +3 -13
- package/esm2015/driver/testing/drivers/cart-payment/cart-payment.service.js +3 -43
- package/esm2015/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -22
- package/esm2015/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -33
- package/esm2015/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -37
- package/esm2015/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -22
- package/esm2015/driver/testing/drivers/public_api.js +1 -6
- package/esm2015/driver/testing/index.js +2 -7
- package/esm2015/driver/testing/public_api.js +2 -7
- package/esm2015/errors/codes.enum.js +10 -12
- package/esm2015/errors/map.js +1 -7
- package/esm2015/errors/public_api.js +2 -7
- package/esm2015/errors/resolution/cart-not-found-or-created-resolution.js +2 -14
- package/esm2015/errors/resolution/cart-resolution.js +2 -14
- package/esm2015/errors/resolution/cart-server-side-resolution.js +2 -14
- package/esm2015/errors/resolution/cart-storage-resolution.js +2 -14
- package/esm2015/errors/resolution/public_api.js +1 -6
- package/esm2015/index.js +2 -7
- package/esm2015/injection-tokens/error-matcher.token.js +2 -11
- package/esm2015/injection-tokens/payment-method-map.js +3 -12
- package/esm2015/injection-tokens/public_api.js +1 -6
- package/esm2015/models/cart-address.js +2 -23
- package/esm2015/models/cart-coupon.js +2 -31
- package/esm2015/models/cart-item-input.js +10 -93
- package/esm2015/models/cart-item.js +2 -88
- package/esm2015/models/cart-order-result.js +2 -29
- package/esm2015/models/cart-payment.js +2 -25
- package/esm2015/models/cart-shipping-info.js +2 -14
- package/esm2015/models/cart-shipping-rate.js +2 -43
- package/esm2015/models/cart-total.js +13 -41
- package/esm2015/models/cart.js +2 -76
- package/esm2015/models/composite-cart-item.js +2 -40
- package/esm2015/models/configurable-cart-item.js +2 -35
- package/esm2015/models/public_api.js +7 -12
- package/esm2015/public_api.js +4 -9
- package/esm2015/routing/cart-routing.module.js +2 -11
- package/esm2015/routing/config/config.js +4 -23
- package/esm2015/routing/config/resolution/config.js +1 -21
- package/esm2015/routing/daffodil-cart-routing.js +2 -7
- package/esm2015/routing/guards/billing-address/billing-address-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/billing-address/billing-address.guard.js +5 -39
- package/esm2015/routing/guards/cart-items/cart-items-guard-redirect.token.js +2 -8
- package/esm2015/routing/guards/cart-items/cart-items.guard.js +6 -44
- package/esm2015/routing/guards/order-result/order-result-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/order-result/order-result.guard.js +4 -38
- package/esm2015/routing/guards/payment-method/payment-method-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/payment-method/payment-method.guard.js +5 -39
- package/esm2015/routing/guards/public_api.js +1 -6
- package/esm2015/routing/guards/resolved-cart/resolved-cart.guard.js +7 -49
- package/esm2015/routing/guards/shipping-address/shipping-address-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/shipping-address/shipping-address.guard.js +5 -39
- package/esm2015/routing/guards/shipping-method/shipping-method-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/shipping-method/shipping-method.guard.js +5 -39
- package/esm2015/routing/index.js +2 -7
- package/esm2015/routing/public_api.js +3 -8
- package/esm2015/routing/resolvers/cart-resolver.service.js +5 -49
- package/esm2015/routing/resolvers/empty-cart-resolver.service.js +4 -42
- package/esm2015/routing/resolvers/public_api.js +1 -6
- package/esm2015/routing/resolvers/tokens/cart-resolver-redirect.token.js +1 -7
- package/esm2015/routing/resolvers/tokens/empty-cart-resolver-redirect.token.js +1 -7
- package/esm2015/state/actions/cart-address.actions.js +8 -40
- package/esm2015/state/actions/cart-billing-address.actions.js +11 -66
- package/esm2015/state/actions/cart-coupon.actions.js +17 -124
- package/esm2015/state/actions/cart-item.actions.js +22 -186
- package/esm2015/state/actions/cart-order.actions.js +8 -40
- package/esm2015/state/actions/cart-payment-methods.actions.js +8 -34
- package/esm2015/state/actions/cart-payment.actions.js +19 -133
- package/esm2015/state/actions/cart-shipping-address.actions.js +11 -66
- package/esm2015/state/actions/cart-shipping-information.actions.js +14 -100
- package/esm2015/state/actions/cart-shipping-methods.actions.js +8 -36
- package/esm2015/state/actions/cart.actions.js +22 -162
- package/esm2015/state/actions/public_api.js +12 -17
- package/esm2015/state/cart-state.module.js +1 -6
- package/esm2015/state/daffodil-cart-state.js +2 -7
- package/esm2015/state/effects/cart-address.effects.js +3 -60
- package/esm2015/state/effects/cart-billing-address.effects.js +3 -67
- package/esm2015/state/effects/cart-coupon.effects.js +9 -129
- package/esm2015/state/effects/cart-item.effects.js +6 -120
- package/esm2015/state/effects/cart-order.effects.js +3 -62
- package/esm2015/state/effects/cart-payment-methods.effects.js +2 -52
- package/esm2015/state/effects/cart-payment.effects.js +5 -93
- package/esm2015/state/effects/cart-resolver.effects.js +4 -80
- package/esm2015/state/effects/cart-shipping-address.effects.js +3 -67
- package/esm2015/state/effects/cart-shipping-information.effects.js +4 -82
- package/esm2015/state/effects/cart-shipping-methods.effects.js +2 -52
- package/esm2015/state/effects/cart.effects.js +9 -128
- package/esm2015/state/facades/cart/cart-facade.interface.js +2 -355
- package/esm2015/state/facades/cart/cart.facade.js +10 -275
- package/esm2015/state/index.js +2 -7
- package/esm2015/state/injection-tokens/cart-item-state-debounce-time.js +1 -7
- package/esm2015/state/injection-tokens/public_api.js +1 -6
- package/esm2015/state/models/public_api.js +4 -9
- package/esm2015/state/models/stateful-cart-item.js +9 -27
- package/esm2015/state/models/stateful-composite-cart-item.js +2 -10
- package/esm2015/state/models/stateful-configurable-cart-item.js +2 -10
- package/esm2015/state/public_api.js +6 -11
- package/esm2015/state/reducers/action-types.type.js +2 -6
- package/esm2015/state/reducers/cart/cart.reducer.js +1 -15
- package/esm2015/state/reducers/cart-billing-address/cart-billing-address.reducer.js +1 -15
- package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +1 -15
- package/esm2015/state/reducers/cart-initial-state.js +1 -7
- package/esm2015/state/reducers/cart-item/cart-item.reducer.js +3 -21
- package/esm2015/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.js +4 -22
- package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +12 -58
- package/esm2015/state/reducers/cart-operation-type.enum.js +16 -17
- package/esm2015/state/reducers/cart-order/cart-order-initial-state.js +1 -7
- package/esm2015/state/reducers/cart-order/cart-order-state.interface.js +2 -19
- package/esm2015/state/reducers/cart-order/cart-order.reducer.js +1 -12
- package/esm2015/state/reducers/cart-payment/cart-payment.reducer.js +1 -15
- package/esm2015/state/reducers/cart-payment-methods/cart-payment-methods.reducer.js +1 -15
- package/esm2015/state/reducers/cart-reducers-state.interface.js +1 -28
- package/esm2015/state/reducers/cart-reducers.js +1 -7
- package/esm2015/state/reducers/cart-resolve/cart-resolve-state.enum.js +9 -15
- package/esm2015/state/reducers/cart-resolve/cart-resolve.reducer.js +1 -12
- package/esm2015/state/reducers/cart-shipping-address/cart-shipping-address.reducer.js +1 -15
- package/esm2015/state/reducers/cart-shipping-information/cart-shipping-information.reducer.js +7 -17
- package/esm2015/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.js +1 -15
- package/esm2015/state/reducers/cart-state.interface.js +2 -21
- package/esm2015/state/reducers/cart-store-feature-key.js +1 -7
- package/esm2015/state/reducers/cart.reducer.js +1 -11
- package/esm2015/state/reducers/errors/cart-errors.type.js +2 -6
- package/esm2015/state/reducers/errors/error-state-helpers.js +5 -29
- package/esm2015/state/reducers/loading/cart-loading.type.js +3 -42
- package/esm2015/state/reducers/public_api.js +3 -8
- package/esm2015/state/reducers/token/extra.token.js +5 -21
- package/esm2015/state/reducers/token/public_api.js +1 -6
- package/esm2015/state/reducers/token/reducers.token.js +4 -13
- package/esm2015/state/selectors/cart/cart.selector.js +98 -811
- package/esm2015/state/selectors/cart-feature.selector.js +5 -28
- package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +29 -229
- package/esm2015/state/selectors/cart-order/cart-order.selector.js +15 -104
- package/esm2015/state/selectors/cart.selector.js +6 -30
- package/esm2015/state/selectors/public_api.js +2 -7
- package/esm2015/state/testing/cart-testing.module.js +1 -6
- package/esm2015/state/testing/daffodil-cart-state-testing.js +2 -7
- package/esm2015/state/testing/factories/stateful-cart-item.factory.js +2 -11
- package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +2 -11
- package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +2 -11
- package/esm2015/state/testing/index.js +2 -7
- package/esm2015/state/testing/mock-cart-facade.js +2 -206
- package/esm2015/state/testing/public_api.js +4 -9
- package/esm2015/storage/cart-storage.service.js +2 -36
- package/esm2015/testing/daffodil-cart-testing.js +2 -7
- package/esm2015/testing/factories/cart-address.factory.js +2 -41
- package/esm2015/testing/factories/cart-coupon.factory.js +2 -17
- package/esm2015/testing/factories/cart-item/cart-item.factory.js +5 -51
- package/esm2015/testing/factories/cart-item/composite-cart-item.factory.js +2 -23
- package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
- package/esm2015/testing/factories/cart-payment.factory.js +2 -11
- package/esm2015/testing/factories/cart-shipping-rate.factory.js +2 -23
- package/esm2015/testing/factories/cart.factory.js +2 -35
- package/esm2015/testing/factories/public_api.js +4 -9
- package/esm2015/testing/index.js +2 -7
- package/esm2015/testing/public_api.js +2 -7
- package/fesm2015/daffodil-cart-driver-in-memory.js +108 -1228
- package/fesm2015/daffodil-cart-driver-in-memory.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento-testing.js +12 -227
- package/fesm2015/daffodil-cart-driver-magento-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento.js +161 -1844
- package/fesm2015/daffodil-cart-driver-magento.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-testing.js +24 -376
- package/fesm2015/daffodil-cart-driver-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver.js +13 -493
- package/fesm2015/daffodil-cart-driver.js.map +1 -1
- package/fesm2015/daffodil-cart-routing.js +44 -498
- package/fesm2015/daffodil-cart-routing.js.map +1 -1
- package/fesm2015/daffodil-cart-state-testing.js +6 -256
- package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-state.js +403 -3921
- package/fesm2015/daffodil-cart-state.js.map +1 -1
- package/fesm2015/daffodil-cart-testing.js +13 -228
- package/fesm2015/daffodil-cart-testing.js.map +1 -1
- package/fesm2015/daffodil-cart.js +39 -532
- package/fesm2015/daffodil-cart.js.map +1 -1
- package/package.json +5 -5
- package/routing/package.json +1 -1
- package/state/package.json +1 -1
- package/state/testing/package.json +1 -1
- package/testing/package.json +1 -1
|
@@ -4,392 +4,40 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.cart = global.daffodil.cart || {}, global.daffodil.cart.driver = {}), global.ng.core, global.core$1));
|
|
5
5
|
}(this, (function (exports, core, core$1) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @fileoverview added by tsickle
|
|
9
|
-
* Generated from: interfaces/cart-service.interface.ts
|
|
10
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* The interface responsible for managing a customer's cart.
|
|
14
|
-
* @record
|
|
15
|
-
* @template T
|
|
16
|
-
*/
|
|
17
|
-
function DaffCartServiceInterface() { }
|
|
18
|
-
if (false) {
|
|
19
|
-
/**
|
|
20
|
-
* Retrieve a cart
|
|
21
|
-
* @param {?} id
|
|
22
|
-
* @return {?}
|
|
23
|
-
*/
|
|
24
|
-
DaffCartServiceInterface.prototype.get = function (id) { };
|
|
25
|
-
/**
|
|
26
|
-
* Creates a cart.
|
|
27
|
-
* @return {?}
|
|
28
|
-
*/
|
|
29
|
-
DaffCartServiceInterface.prototype.create = function () { };
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated
|
|
32
|
-
* Prefer DaffCartItemServiceInterface.add
|
|
33
|
-
*
|
|
34
|
-
* Add an item to the cart.
|
|
35
|
-
* @param {?} productId
|
|
36
|
-
* @param {?} qty
|
|
37
|
-
* @return {?}
|
|
38
|
-
*/
|
|
39
|
-
DaffCartServiceInterface.prototype.addToCart = function (productId, qty) { };
|
|
40
|
-
/**
|
|
41
|
-
* Remove all items from a cart.
|
|
42
|
-
* @param {?} id
|
|
43
|
-
* @return {?}
|
|
44
|
-
*/
|
|
45
|
-
DaffCartServiceInterface.prototype.clear = function (id) { };
|
|
46
|
-
}
|
|
47
|
-
/** @type {?} */
|
|
48
7
|
var DaffCartDriver = new core.InjectionToken('DaffCartDriver');
|
|
49
8
|
|
|
50
|
-
/**
|
|
51
|
-
* @fileoverview added by tsickle
|
|
52
|
-
* Generated from: interfaces/cart-billing-address-service.interface.ts
|
|
53
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* The interface responsible for managing the billing address of a cart.
|
|
57
|
-
* @record
|
|
58
|
-
* @template T, V
|
|
59
|
-
*/
|
|
60
|
-
function DaffCartBillingAddressServiceInterface() { }
|
|
61
|
-
if (false) {
|
|
62
|
-
/**
|
|
63
|
-
* Retrieve the billing address of a cart
|
|
64
|
-
* @param {?} cartId
|
|
65
|
-
* @return {?}
|
|
66
|
-
*/
|
|
67
|
-
DaffCartBillingAddressServiceInterface.prototype.get = function (cartId) { };
|
|
68
|
-
/**
|
|
69
|
-
* Update the billing address of a cart
|
|
70
|
-
* @param {?} cartId
|
|
71
|
-
* @param {?} address
|
|
72
|
-
* @return {?}
|
|
73
|
-
*/
|
|
74
|
-
DaffCartBillingAddressServiceInterface.prototype.update = function (cartId, address) { };
|
|
75
|
-
}
|
|
76
|
-
/** @type {?} */
|
|
77
9
|
var DaffCartBillingAddressDriver = new core.InjectionToken('DaffCartBillingAddressDriver');
|
|
78
10
|
|
|
79
|
-
/**
|
|
80
|
-
* @fileoverview added by tsickle
|
|
81
|
-
* Generated from: interfaces/cart-address-service.interface.ts
|
|
82
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
83
|
-
*/
|
|
84
|
-
/**
|
|
85
|
-
* The interface responsible for managing the address of a cart.
|
|
86
|
-
* @record
|
|
87
|
-
* @template T, V
|
|
88
|
-
*/
|
|
89
|
-
function DaffCartAddressServiceInterface() { }
|
|
90
|
-
if (false) {
|
|
91
|
-
/**
|
|
92
|
-
* Update the billing and shipping address of a cart
|
|
93
|
-
* @param {?} cartId
|
|
94
|
-
* @param {?} address
|
|
95
|
-
* @return {?}
|
|
96
|
-
*/
|
|
97
|
-
DaffCartAddressServiceInterface.prototype.update = function (cartId, address) { };
|
|
98
|
-
}
|
|
99
|
-
/** @type {?} */
|
|
100
11
|
var DaffCartAddressDriver = new core.InjectionToken('DaffCartAddressDriver');
|
|
101
12
|
|
|
102
|
-
/**
|
|
103
|
-
* @fileoverview added by tsickle
|
|
104
|
-
* Generated from: interfaces/cart-coupon-service.interface.ts
|
|
105
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
106
|
-
*/
|
|
107
|
-
/**
|
|
108
|
-
* The interface responsible for applying a coupon to a cart.
|
|
109
|
-
* @record
|
|
110
|
-
* @template T, V
|
|
111
|
-
*/
|
|
112
|
-
function DaffCartCouponServiceInterface() { }
|
|
113
|
-
if (false) {
|
|
114
|
-
/**
|
|
115
|
-
* Apply a coupon to the cart and return a partial of the cart.
|
|
116
|
-
* @param {?} cartId
|
|
117
|
-
* @param {?} coupon
|
|
118
|
-
* @return {?}
|
|
119
|
-
*/
|
|
120
|
-
DaffCartCouponServiceInterface.prototype.apply = function (cartId, coupon) { };
|
|
121
|
-
/**
|
|
122
|
-
* List coupon codes applied to a cart.
|
|
123
|
-
* @param {?} cartId
|
|
124
|
-
* @return {?}
|
|
125
|
-
*/
|
|
126
|
-
DaffCartCouponServiceInterface.prototype.list = function (cartId) { };
|
|
127
|
-
/**
|
|
128
|
-
* Remove a coupon from the cart and return a partial of the cart.
|
|
129
|
-
* @param {?} cartId
|
|
130
|
-
* @param {?} coupon
|
|
131
|
-
* @return {?}
|
|
132
|
-
*/
|
|
133
|
-
DaffCartCouponServiceInterface.prototype.remove = function (cartId, coupon) { };
|
|
134
|
-
/**
|
|
135
|
-
* Remove all coupons from the cart and return a partial of the cart.
|
|
136
|
-
* @param {?} cartId
|
|
137
|
-
* @return {?}
|
|
138
|
-
*/
|
|
139
|
-
DaffCartCouponServiceInterface.prototype.removeAll = function (cartId) { };
|
|
140
|
-
}
|
|
141
|
-
/** @type {?} */
|
|
142
13
|
var DaffCartCouponDriver = new core.InjectionToken('DaffCartCouponDriver');
|
|
143
14
|
|
|
144
|
-
/**
|
|
145
|
-
* @fileoverview added by tsickle
|
|
146
|
-
* Generated from: interfaces/cart-item-service.interface.ts
|
|
147
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
148
|
-
*/
|
|
149
|
-
/**
|
|
150
|
-
* The interface responsible for managing the items of a cart.
|
|
151
|
-
* @record
|
|
152
|
-
* @template T, U, V
|
|
153
|
-
*/
|
|
154
|
-
function DaffCartItemServiceInterface() { }
|
|
155
|
-
if (false) {
|
|
156
|
-
/**
|
|
157
|
-
* List all of the available items of a cart
|
|
158
|
-
* @param {?} cartId
|
|
159
|
-
* @return {?}
|
|
160
|
-
*/
|
|
161
|
-
DaffCartItemServiceInterface.prototype.list = function (cartId) { };
|
|
162
|
-
/**
|
|
163
|
-
* Get a specific cart item of a cart.
|
|
164
|
-
* @param {?} cartId
|
|
165
|
-
* @param {?} item_id
|
|
166
|
-
* @return {?}
|
|
167
|
-
*/
|
|
168
|
-
DaffCartItemServiceInterface.prototype.get = function (cartId, item_id) { };
|
|
169
|
-
/**
|
|
170
|
-
* Add something to a cart.
|
|
171
|
-
* @param {?} id
|
|
172
|
-
* @param {?} product
|
|
173
|
-
* @return {?}
|
|
174
|
-
*/
|
|
175
|
-
DaffCartItemServiceInterface.prototype.add = function (id, product) { };
|
|
176
|
-
/**
|
|
177
|
-
* Update an existing item in a cart
|
|
178
|
-
* @param {?} cartId
|
|
179
|
-
* @param {?} itemId
|
|
180
|
-
* @param {?} changes
|
|
181
|
-
* @return {?}
|
|
182
|
-
*/
|
|
183
|
-
DaffCartItemServiceInterface.prototype.update = function (cartId, itemId, changes) { };
|
|
184
|
-
/**
|
|
185
|
-
* Remove an item from a cart.
|
|
186
|
-
* @param {?} cartId
|
|
187
|
-
* @param {?} itemId
|
|
188
|
-
* @return {?}
|
|
189
|
-
*/
|
|
190
|
-
DaffCartItemServiceInterface.prototype.delete = function (cartId, itemId) { };
|
|
191
|
-
}
|
|
192
|
-
/** @type {?} */
|
|
193
15
|
var DaffCartItemDriver = new core.InjectionToken('DaffCartItemDriver');
|
|
194
16
|
|
|
195
|
-
/**
|
|
196
|
-
* @fileoverview added by tsickle
|
|
197
|
-
* Generated from: interfaces/cart-payment-methods-service.interface.ts
|
|
198
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
199
|
-
*/
|
|
200
|
-
/**
|
|
201
|
-
* The interface responsible for retrieving the available payment methods of a cart.
|
|
202
|
-
* @record
|
|
203
|
-
* @template T
|
|
204
|
-
*/
|
|
205
|
-
function DaffCartPaymentMethodsServiceInterface() { }
|
|
206
|
-
if (false) {
|
|
207
|
-
/**
|
|
208
|
-
* List the available payment methods of a cart.
|
|
209
|
-
* @param {?} cartId
|
|
210
|
-
* @return {?}
|
|
211
|
-
*/
|
|
212
|
-
DaffCartPaymentMethodsServiceInterface.prototype.list = function (cartId) { };
|
|
213
|
-
}
|
|
214
|
-
/** @type {?} */
|
|
215
17
|
var DaffCartPaymentMethodsDriver = new core.InjectionToken('DaffCartPaymentMethodsDriver');
|
|
216
18
|
|
|
217
|
-
/**
|
|
218
|
-
* @fileoverview added by tsickle
|
|
219
|
-
* Generated from: interfaces/cart-payment-service.interface.ts
|
|
220
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
221
|
-
*/
|
|
222
|
-
/**
|
|
223
|
-
* The interface responsible for managing the selected payment method of a cart.
|
|
224
|
-
* @record
|
|
225
|
-
* @template T, V, R
|
|
226
|
-
*/
|
|
227
|
-
function DaffCartPaymentServiceInterface() { }
|
|
228
|
-
if (false) {
|
|
229
|
-
/**
|
|
230
|
-
* Get the currently applied payment method of a cart.
|
|
231
|
-
* @param {?} cartId
|
|
232
|
-
* @return {?}
|
|
233
|
-
*/
|
|
234
|
-
DaffCartPaymentServiceInterface.prototype.get = function (cartId) { };
|
|
235
|
-
/**
|
|
236
|
-
* Update the payment method applied to a cart.
|
|
237
|
-
* @param {?} cartId
|
|
238
|
-
* @param {?} payment
|
|
239
|
-
* @return {?}
|
|
240
|
-
*/
|
|
241
|
-
DaffCartPaymentServiceInterface.prototype.update = function (cartId, payment) { };
|
|
242
|
-
/**
|
|
243
|
-
* Update the billing address and payment method applied to a cart.
|
|
244
|
-
* @param {?} cartId
|
|
245
|
-
* @param {?} payment
|
|
246
|
-
* @param {?} address
|
|
247
|
-
* @return {?}
|
|
248
|
-
*/
|
|
249
|
-
DaffCartPaymentServiceInterface.prototype.updateWithBilling = function (cartId, payment, address) { };
|
|
250
|
-
/**
|
|
251
|
-
* Remove the payment method applied to a cart.
|
|
252
|
-
* @param {?} cartId
|
|
253
|
-
* @return {?}
|
|
254
|
-
*/
|
|
255
|
-
DaffCartPaymentServiceInterface.prototype.remove = function (cartId) { };
|
|
256
|
-
}
|
|
257
|
-
/** @type {?} */
|
|
258
19
|
var DaffCartPaymentDriver = new core.InjectionToken('DaffCartPaymentDriver');
|
|
259
20
|
|
|
260
|
-
/**
|
|
261
|
-
* @fileoverview added by tsickle
|
|
262
|
-
* Generated from: interfaces/cart-shipping-address-service.interface.ts
|
|
263
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
264
|
-
*/
|
|
265
|
-
/**
|
|
266
|
-
* The interface responsible for managing the shipping address of a cart.
|
|
267
|
-
* @record
|
|
268
|
-
* @template T, V
|
|
269
|
-
*/
|
|
270
|
-
function DaffCartShippingAddressServiceInterface() { }
|
|
271
|
-
if (false) {
|
|
272
|
-
/**
|
|
273
|
-
* Retrieve the shipping address of a cart.
|
|
274
|
-
* @param {?} cartId
|
|
275
|
-
* @return {?}
|
|
276
|
-
*/
|
|
277
|
-
DaffCartShippingAddressServiceInterface.prototype.get = function (cartId) { };
|
|
278
|
-
/**
|
|
279
|
-
* Update the shipping address of a cart.
|
|
280
|
-
* @param {?} cartId
|
|
281
|
-
* @param {?} address
|
|
282
|
-
* @return {?}
|
|
283
|
-
*/
|
|
284
|
-
DaffCartShippingAddressServiceInterface.prototype.update = function (cartId, address) { };
|
|
285
|
-
}
|
|
286
|
-
/** @type {?} */
|
|
287
21
|
var DaffCartShippingAddressDriver = new core.InjectionToken('DaffCartShippingAddressDriver');
|
|
288
22
|
|
|
289
|
-
/**
|
|
290
|
-
* @fileoverview added by tsickle
|
|
291
|
-
* Generated from: interfaces/cart-shipping-information-service.interface.ts
|
|
292
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
293
|
-
*/
|
|
294
|
-
/**
|
|
295
|
-
* The interface responsible for mediating the interaction of the shipping
|
|
296
|
-
* information of a cart with a given platform.
|
|
297
|
-
* @record
|
|
298
|
-
* @template T, V
|
|
299
|
-
*/
|
|
300
|
-
function DaffCartShippingInformationServiceInterface() { }
|
|
301
|
-
if (false) {
|
|
302
|
-
/**
|
|
303
|
-
* Get the currently selected shipping method of a cart.
|
|
304
|
-
* @param {?} cartId
|
|
305
|
-
* @return {?}
|
|
306
|
-
*/
|
|
307
|
-
DaffCartShippingInformationServiceInterface.prototype.get = function (cartId) { };
|
|
308
|
-
/**
|
|
309
|
-
* Update the currently selected shipping method of a cart.
|
|
310
|
-
* @param {?} cartId
|
|
311
|
-
* @param {?} shippingInfo
|
|
312
|
-
* @return {?}
|
|
313
|
-
*/
|
|
314
|
-
DaffCartShippingInformationServiceInterface.prototype.update = function (cartId, shippingInfo) { };
|
|
315
|
-
/**
|
|
316
|
-
* Remove the currently selected shipping method from a cart.
|
|
317
|
-
* @param {?} cartId
|
|
318
|
-
* @param {?=} id
|
|
319
|
-
* @return {?}
|
|
320
|
-
*/
|
|
321
|
-
DaffCartShippingInformationServiceInterface.prototype.delete = function (cartId, id) { };
|
|
322
|
-
}
|
|
323
|
-
/** @type {?} */
|
|
324
23
|
var DaffCartShippingInformationDriver = new core.InjectionToken('DaffCartShippingInformationDriver');
|
|
325
24
|
|
|
326
|
-
/**
|
|
327
|
-
* @fileoverview added by tsickle
|
|
328
|
-
* Generated from: interfaces/cart-shipping-methods-service.interface.ts
|
|
329
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
330
|
-
*/
|
|
331
|
-
/**
|
|
332
|
-
* The interface responsible for retrieving the available shipping methods of a cart.
|
|
333
|
-
* @record
|
|
334
|
-
* @template T
|
|
335
|
-
*/
|
|
336
|
-
function DaffCartShippingMethodsServiceInterface() { }
|
|
337
|
-
if (false) {
|
|
338
|
-
/**
|
|
339
|
-
* List the available shipping methods for a cart.
|
|
340
|
-
* @param {?} cartId
|
|
341
|
-
* @return {?}
|
|
342
|
-
*/
|
|
343
|
-
DaffCartShippingMethodsServiceInterface.prototype.list = function (cartId) { };
|
|
344
|
-
}
|
|
345
|
-
/** @type {?} */
|
|
346
25
|
var DaffCartShippingMethodsDriver = new core.InjectionToken('DaffCartShippingMethodsDriver');
|
|
347
26
|
|
|
348
|
-
/**
|
|
349
|
-
* @fileoverview added by tsickle
|
|
350
|
-
* Generated from: interfaces/cart-order-service.interface.ts
|
|
351
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
352
|
-
*/
|
|
353
|
-
/**
|
|
354
|
-
* The interface responsible for placing an order for the customer's cart.
|
|
355
|
-
* @record
|
|
356
|
-
* @template T, V, R
|
|
357
|
-
*/
|
|
358
|
-
function DaffCartOrderServiceInterface() { }
|
|
359
|
-
if (false) {
|
|
360
|
-
/**
|
|
361
|
-
* Place an order and return the order ID.
|
|
362
|
-
* @param {?} id
|
|
363
|
-
* @param {?=} payment
|
|
364
|
-
* @return {?}
|
|
365
|
-
*/
|
|
366
|
-
DaffCartOrderServiceInterface.prototype.placeOrder = function (id, payment) { };
|
|
367
|
-
}
|
|
368
|
-
/** @type {?} */
|
|
369
27
|
var DaffCartOrderDriver = new core.InjectionToken('DaffCartOrderDriver');
|
|
370
28
|
|
|
371
|
-
|
|
372
|
-
* @fileoverview added by tsickle
|
|
373
|
-
* Generated from: interfaces/public_api.ts
|
|
374
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
375
|
-
*/
|
|
29
|
+
// Drivers
|
|
376
30
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
INVALID_COUPON_CODE: "DAFF_INVALID_COUPON_CODE",
|
|
388
|
-
INVALID_COUNTRY: "DAFF_INVALID_COUNTRY",
|
|
389
|
-
INVALID_REGION: "DAFF_INVALID_REGION",
|
|
390
|
-
INVALID_API_RESPONSE: "DAFF_INVALID_API_RESPONSE",
|
|
391
|
-
EXPIRED_PAYMENT_METHOD: "DAFF_EXPIRED_PAYMENT_METHOD",
|
|
392
|
-
};
|
|
31
|
+
(function (DaffCartDriverErrorCodes) {
|
|
32
|
+
DaffCartDriverErrorCodes["CART_NOT_FOUND"] = "DAFF_CART_NOT_FOUND";
|
|
33
|
+
DaffCartDriverErrorCodes["PRODUCT_NOT_FOUND"] = "DAFF_PRODUCT_NOT_FOUND";
|
|
34
|
+
DaffCartDriverErrorCodes["PRODUCT_OUT_OF_STOCK"] = "DAFF_PRODUCT_OUT_OF_STOCK";
|
|
35
|
+
DaffCartDriverErrorCodes["INVALID_COUPON_CODE"] = "DAFF_INVALID_COUPON_CODE";
|
|
36
|
+
DaffCartDriverErrorCodes["INVALID_COUNTRY"] = "DAFF_INVALID_COUNTRY";
|
|
37
|
+
DaffCartDriverErrorCodes["INVALID_REGION"] = "DAFF_INVALID_REGION";
|
|
38
|
+
DaffCartDriverErrorCodes["INVALID_API_RESPONSE"] = "DAFF_INVALID_API_RESPONSE";
|
|
39
|
+
DaffCartDriverErrorCodes["EXPIRED_PAYMENT_METHOD"] = "DAFF_EXPIRED_PAYMENT_METHOD";
|
|
40
|
+
})(exports.DaffCartDriverErrorCodes || (exports.DaffCartDriverErrorCodes = {}));
|
|
393
41
|
|
|
394
42
|
/*! *****************************************************************************
|
|
395
43
|
Copyright (c) Microsoft Corporation.
|
|
@@ -626,7 +274,7 @@
|
|
|
626
274
|
ar[i] = from[i];
|
|
627
275
|
}
|
|
628
276
|
}
|
|
629
|
-
return to.concat(ar || from);
|
|
277
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
630
278
|
}
|
|
631
279
|
function __await(v) {
|
|
632
280
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -715,20 +363,13 @@
|
|
|
715
363
|
*/
|
|
716
364
|
var DaffCartNotFoundError = /** @class */ (function (_super) {
|
|
717
365
|
__extends(DaffCartNotFoundError, _super);
|
|
718
|
-
/**
|
|
719
|
-
* @param {?=} message
|
|
720
|
-
*/
|
|
721
366
|
function DaffCartNotFoundError(message) {
|
|
722
367
|
var _this = _super.call(this, message) || this;
|
|
723
|
-
_this.code = DaffCartDriverErrorCodes.CART_NOT_FOUND;
|
|
368
|
+
_this.code = exports.DaffCartDriverErrorCodes.CART_NOT_FOUND;
|
|
724
369
|
return _this;
|
|
725
370
|
}
|
|
726
371
|
return DaffCartNotFoundError;
|
|
727
372
|
}(core$1.DaffInheritableError));
|
|
728
|
-
if (false) {
|
|
729
|
-
/** @type {?} */
|
|
730
|
-
DaffCartNotFoundError.prototype.code;
|
|
731
|
-
}
|
|
732
373
|
|
|
733
374
|
/**
|
|
734
375
|
* An error thrown when the payment token used for the payment method update has expired.
|
|
@@ -737,23 +378,14 @@
|
|
|
737
378
|
*/
|
|
738
379
|
var DaffCartExpiredPaymentTokenError = /** @class */ (function (_super) {
|
|
739
380
|
__extends(DaffCartExpiredPaymentTokenError, _super);
|
|
740
|
-
/**
|
|
741
|
-
* @param {?} message
|
|
742
|
-
*/
|
|
743
381
|
function DaffCartExpiredPaymentTokenError(message) {
|
|
744
382
|
var _this = _super.call(this, message) || this;
|
|
745
383
|
_this.message = message;
|
|
746
|
-
_this.code = DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD;
|
|
384
|
+
_this.code = exports.DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD;
|
|
747
385
|
return _this;
|
|
748
386
|
}
|
|
749
387
|
return DaffCartExpiredPaymentTokenError;
|
|
750
388
|
}(core$1.DaffInheritableError));
|
|
751
|
-
if (false) {
|
|
752
|
-
/** @type {?} */
|
|
753
|
-
DaffCartExpiredPaymentTokenError.prototype.code;
|
|
754
|
-
/** @type {?} */
|
|
755
|
-
DaffCartExpiredPaymentTokenError.prototype.message;
|
|
756
|
-
}
|
|
757
389
|
|
|
758
390
|
/**
|
|
759
391
|
* An error thrown when the platform's API response is missing required information
|
|
@@ -761,23 +393,14 @@
|
|
|
761
393
|
*/
|
|
762
394
|
var DaffCartInvalidAPIResponseError = /** @class */ (function (_super) {
|
|
763
395
|
__extends(DaffCartInvalidAPIResponseError, _super);
|
|
764
|
-
/**
|
|
765
|
-
* @param {?} message
|
|
766
|
-
*/
|
|
767
396
|
function DaffCartInvalidAPIResponseError(message) {
|
|
768
397
|
var _this = _super.call(this, message) || this;
|
|
769
398
|
_this.message = message;
|
|
770
|
-
_this.code = DaffCartDriverErrorCodes.INVALID_API_RESPONSE;
|
|
399
|
+
_this.code = exports.DaffCartDriverErrorCodes.INVALID_API_RESPONSE;
|
|
771
400
|
return _this;
|
|
772
401
|
}
|
|
773
402
|
return DaffCartInvalidAPIResponseError;
|
|
774
403
|
}(core$1.DaffInheritableError));
|
|
775
|
-
if (false) {
|
|
776
|
-
/** @type {?} */
|
|
777
|
-
DaffCartInvalidAPIResponseError.prototype.code;
|
|
778
|
-
/** @type {?} */
|
|
779
|
-
DaffCartInvalidAPIResponseError.prototype.message;
|
|
780
|
-
}
|
|
781
404
|
|
|
782
405
|
/**
|
|
783
406
|
* An error thrown when the specified country is invalid for the specified address
|
|
@@ -785,20 +408,13 @@
|
|
|
785
408
|
*/
|
|
786
409
|
var DaffInvalidCountryError = /** @class */ (function (_super) {
|
|
787
410
|
__extends(DaffInvalidCountryError, _super);
|
|
788
|
-
/**
|
|
789
|
-
* @param {?=} message
|
|
790
|
-
*/
|
|
791
411
|
function DaffInvalidCountryError(message) {
|
|
792
412
|
var _this = _super.call(this, message) || this;
|
|
793
|
-
_this.code = DaffCartDriverErrorCodes.INVALID_COUNTRY;
|
|
413
|
+
_this.code = exports.DaffCartDriverErrorCodes.INVALID_COUNTRY;
|
|
794
414
|
return _this;
|
|
795
415
|
}
|
|
796
416
|
return DaffInvalidCountryError;
|
|
797
417
|
}(core$1.DaffInheritableError));
|
|
798
|
-
if (false) {
|
|
799
|
-
/** @type {?} */
|
|
800
|
-
DaffInvalidCountryError.prototype.code;
|
|
801
|
-
}
|
|
802
418
|
|
|
803
419
|
/**
|
|
804
420
|
* An error thrown when the specified coupon code cannot be applied to the cart.
|
|
@@ -806,24 +422,14 @@
|
|
|
806
422
|
*/
|
|
807
423
|
var DaffInvalidCouponCodeError = /** @class */ (function (_super) {
|
|
808
424
|
__extends(DaffInvalidCouponCodeError, _super);
|
|
809
|
-
/**
|
|
810
|
-
* @param {?=} message
|
|
811
|
-
* @param {?=} coupon
|
|
812
|
-
*/
|
|
813
425
|
function DaffInvalidCouponCodeError(message, coupon) {
|
|
814
426
|
var _this = _super.call(this, message) || this;
|
|
815
427
|
_this.coupon = coupon;
|
|
816
|
-
_this.code = DaffCartDriverErrorCodes.INVALID_COUPON_CODE;
|
|
428
|
+
_this.code = exports.DaffCartDriverErrorCodes.INVALID_COUPON_CODE;
|
|
817
429
|
return _this;
|
|
818
430
|
}
|
|
819
431
|
return DaffInvalidCouponCodeError;
|
|
820
432
|
}(core$1.DaffInheritableError));
|
|
821
|
-
if (false) {
|
|
822
|
-
/** @type {?} */
|
|
823
|
-
DaffInvalidCouponCodeError.prototype.code;
|
|
824
|
-
/** @type {?} */
|
|
825
|
-
DaffInvalidCouponCodeError.prototype.coupon;
|
|
826
|
-
}
|
|
827
433
|
|
|
828
434
|
/**
|
|
829
435
|
* An error thrown when the specified region is invalid for the specified address
|
|
@@ -831,20 +437,13 @@
|
|
|
831
437
|
*/
|
|
832
438
|
var DaffInvalidRegionError = /** @class */ (function (_super) {
|
|
833
439
|
__extends(DaffInvalidRegionError, _super);
|
|
834
|
-
/**
|
|
835
|
-
* @param {?=} message
|
|
836
|
-
*/
|
|
837
440
|
function DaffInvalidRegionError(message) {
|
|
838
441
|
var _this = _super.call(this, message) || this;
|
|
839
|
-
_this.code = DaffCartDriverErrorCodes.INVALID_REGION;
|
|
442
|
+
_this.code = exports.DaffCartDriverErrorCodes.INVALID_REGION;
|
|
840
443
|
return _this;
|
|
841
444
|
}
|
|
842
445
|
return DaffInvalidRegionError;
|
|
843
446
|
}(core$1.DaffInheritableError));
|
|
844
|
-
if (false) {
|
|
845
|
-
/** @type {?} */
|
|
846
|
-
DaffInvalidRegionError.prototype.code;
|
|
847
|
-
}
|
|
848
447
|
|
|
849
448
|
/**
|
|
850
449
|
* An error thrown when an add to cart request is sent
|
|
@@ -852,20 +451,13 @@
|
|
|
852
451
|
*/
|
|
853
452
|
var DaffProductNotFoundError = /** @class */ (function (_super) {
|
|
854
453
|
__extends(DaffProductNotFoundError, _super);
|
|
855
|
-
/**
|
|
856
|
-
* @param {?=} message
|
|
857
|
-
*/
|
|
858
454
|
function DaffProductNotFoundError(message) {
|
|
859
455
|
var _this = _super.call(this, message) || this;
|
|
860
|
-
_this.code = DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND;
|
|
456
|
+
_this.code = exports.DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND;
|
|
861
457
|
return _this;
|
|
862
458
|
}
|
|
863
459
|
return DaffProductNotFoundError;
|
|
864
460
|
}(core$1.DaffInheritableError));
|
|
865
|
-
if (false) {
|
|
866
|
-
/** @type {?} */
|
|
867
|
-
DaffProductNotFoundError.prototype.code;
|
|
868
|
-
}
|
|
869
461
|
|
|
870
462
|
/**
|
|
871
463
|
* An error thrown when a cart item's requested quantity
|
|
@@ -873,66 +465,37 @@
|
|
|
873
465
|
*/
|
|
874
466
|
var DaffProductOutOfStockError = /** @class */ (function (_super) {
|
|
875
467
|
__extends(DaffProductOutOfStockError, _super);
|
|
876
|
-
/**
|
|
877
|
-
* @param {?=} message
|
|
878
|
-
*/
|
|
879
468
|
function DaffProductOutOfStockError(message) {
|
|
880
469
|
var _this = _super.call(this, message) || this;
|
|
881
|
-
_this.code = DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK;
|
|
470
|
+
_this.code = exports.DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK;
|
|
882
471
|
return _this;
|
|
883
472
|
}
|
|
884
473
|
return DaffProductOutOfStockError;
|
|
885
474
|
}(core$1.DaffInheritableError));
|
|
886
|
-
if (false) {
|
|
887
|
-
/** @type {?} */
|
|
888
|
-
DaffProductOutOfStockError.prototype.code;
|
|
889
|
-
}
|
|
890
475
|
|
|
891
476
|
var _a;
|
|
892
477
|
/**
|
|
893
478
|
* A mapping from error codes to error class constructors.
|
|
894
|
-
* @type {?}
|
|
895
479
|
*/
|
|
896
480
|
var DaffCartDriverErrorMap = (_a = {},
|
|
897
|
-
_a[DaffCartDriverErrorCodes.CART_NOT_FOUND] = DaffCartNotFoundError,
|
|
898
|
-
_a[DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND] = DaffProductNotFoundError,
|
|
899
|
-
_a[DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK] = DaffProductOutOfStockError,
|
|
900
|
-
_a[DaffCartDriverErrorCodes.INVALID_COUPON_CODE] = DaffInvalidCouponCodeError,
|
|
901
|
-
_a[DaffCartDriverErrorCodes.INVALID_COUNTRY] = DaffInvalidCountryError,
|
|
902
|
-
_a[DaffCartDriverErrorCodes.INVALID_REGION] = DaffInvalidRegionError,
|
|
903
|
-
_a[DaffCartDriverErrorCodes.INVALID_API_RESPONSE] = DaffCartInvalidAPIResponseError,
|
|
904
|
-
_a[DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD] = DaffCartExpiredPaymentTokenError,
|
|
481
|
+
_a[exports.DaffCartDriverErrorCodes.CART_NOT_FOUND] = DaffCartNotFoundError,
|
|
482
|
+
_a[exports.DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND] = DaffProductNotFoundError,
|
|
483
|
+
_a[exports.DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK] = DaffProductOutOfStockError,
|
|
484
|
+
_a[exports.DaffCartDriverErrorCodes.INVALID_COUPON_CODE] = DaffInvalidCouponCodeError,
|
|
485
|
+
_a[exports.DaffCartDriverErrorCodes.INVALID_COUNTRY] = DaffInvalidCountryError,
|
|
486
|
+
_a[exports.DaffCartDriverErrorCodes.INVALID_REGION] = DaffInvalidRegionError,
|
|
487
|
+
_a[exports.DaffCartDriverErrorCodes.INVALID_API_RESPONSE] = DaffCartInvalidAPIResponseError,
|
|
488
|
+
_a[exports.DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD] = DaffCartExpiredPaymentTokenError,
|
|
905
489
|
_a);
|
|
906
490
|
|
|
907
491
|
/**
|
|
908
|
-
*
|
|
909
|
-
* Generated from: errors/public_api.ts
|
|
910
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
911
|
-
*/
|
|
912
|
-
|
|
913
|
-
/**
|
|
914
|
-
* @fileoverview added by tsickle
|
|
915
|
-
* Generated from: public_api.ts
|
|
916
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
917
|
-
*/
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* @fileoverview added by tsickle
|
|
921
|
-
* Generated from: index.ts
|
|
922
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
923
|
-
*/
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* @fileoverview added by tsickle
|
|
927
|
-
* Generated from: daffodil-cart-driver.ts
|
|
928
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
492
|
+
* Generated bundle index. Do not edit.
|
|
929
493
|
*/
|
|
930
494
|
|
|
931
495
|
exports.DaffCartAddressDriver = DaffCartAddressDriver;
|
|
932
496
|
exports.DaffCartBillingAddressDriver = DaffCartBillingAddressDriver;
|
|
933
497
|
exports.DaffCartCouponDriver = DaffCartCouponDriver;
|
|
934
498
|
exports.DaffCartDriver = DaffCartDriver;
|
|
935
|
-
exports.DaffCartDriverErrorCodes = DaffCartDriverErrorCodes;
|
|
936
499
|
exports.DaffCartDriverErrorMap = DaffCartDriverErrorMap;
|
|
937
500
|
exports.DaffCartExpiredPaymentTokenError = DaffCartExpiredPaymentTokenError;
|
|
938
501
|
exports.DaffCartInvalidAPIResponseError = DaffCartInvalidAPIResponseError;
|