@daffodil/cart 0.69.0 → 0.71.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.
- package/driver/in-memory/drivers/cart-address/cart-address.service.d.ts +1 -1
- package/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.d.ts +1 -1
- package/driver/in-memory/drivers/cart-item/cart-item.service.d.ts +1 -1
- package/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +1 -1
- package/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +1 -1
- package/driver/interfaces/cart-address-service.interface.d.ts +4 -4
- package/driver/interfaces/cart-billing-address-service.interface.d.ts +5 -5
- package/driver/interfaces/cart-coupon-service.interface.d.ts +6 -6
- package/driver/interfaces/cart-item-service.interface.d.ts +7 -7
- package/driver/interfaces/cart-order-service.interface.d.ts +4 -4
- package/driver/interfaces/cart-payment-service.interface.d.ts +7 -7
- package/driver/interfaces/cart-shipping-address-service.interface.d.ts +5 -5
- package/driver/interfaces/cart-shipping-information-service.interface.d.ts +6 -6
- package/driver/magento/cart.service.d.ts +2 -2
- package/driver/magento/transforms/outputs/cart.service.d.ts +1 -3
- package/driver/magento/transforms/public_api.d.ts +0 -1
- package/esm2022/driver/in-memory/backend/cart/cart.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-address/cart-address.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-coupon/cart-coupon.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-items/cart-items.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-order/cart-order.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-payment/cart-payment.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-root.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.mjs +4 -4
- package/esm2022/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart/cart.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-address/cart-address.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-coupon/cart-coupon.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-driver.module.mjs +5 -5
- package/esm2022/driver/in-memory/drivers/cart-item/cart-item.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-order/cart-order.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-payment/cart-payment.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.mjs +4 -4
- package/esm2022/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.mjs +4 -4
- package/esm2022/driver/interfaces/cart-address-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-billing-address-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-coupon-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-item-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-order-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-payment-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-shipping-address-service.interface.mjs +1 -1
- package/esm2022/driver/interfaces/cart-shipping-information-service.interface.mjs +1 -1
- package/esm2022/driver/magento/cart-address.service.mjs +4 -4
- package/esm2022/driver/magento/cart-billing-address.service.mjs +4 -4
- package/esm2022/driver/magento/cart-coupon.service.mjs +4 -4
- package/esm2022/driver/magento/cart-driver.module.mjs +5 -7
- package/esm2022/driver/magento/cart-item.service.mjs +4 -4
- package/esm2022/driver/magento/cart-order.service.mjs +4 -4
- package/esm2022/driver/magento/cart-payment-methods.service.mjs +4 -4
- package/esm2022/driver/magento/cart-payment.service.mjs +4 -4
- package/esm2022/driver/magento/cart-shipping-address.service.mjs +4 -4
- package/esm2022/driver/magento/cart-shipping-information.service.mjs +4 -4
- package/esm2022/driver/magento/cart-shipping-methods.service.mjs +4 -4
- package/esm2022/driver/magento/cart.service.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/cart-address-input.factory.mjs +7 -7
- package/esm2022/driver/magento/testing/factories/cart-address.factory.mjs +8 -8
- package/esm2022/driver/magento/testing/factories/cart-coupon.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.mjs +6 -6
- package/esm2022/driver/magento/testing/factories/cart-item/cart-item.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/cart-payment-method.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/cart-shipping-method.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/cart.factory.mjs +4 -4
- package/esm2022/driver/magento/testing/factories/shipping-address.factory.mjs +4 -4
- package/esm2022/driver/magento/transforms/inputs/billing-address.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/inputs/cart-address.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/inputs/cart-item-update.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/inputs/payment-method.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/inputs/shipping-address.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/inputs/shipping-method.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/outputs/billing-address.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/outputs/cart-address.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/outputs/cart-coupon-response.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/outputs/cart-payment.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/outputs/cart-shipping-rate.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/outputs/cart.service.mjs +8 -11
- package/esm2022/driver/magento/transforms/outputs/shipping-address.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/public_api.mjs +1 -2
- package/esm2022/driver/services/resolve.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart/cart.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-address/cart-address.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-billing-address/cart-billing-address.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-coupon/cart-coupon.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-driver.module.mjs +5 -5
- package/esm2022/driver/testing/drivers/cart-item/cart-item.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-order/cart-order.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-payment/cart-payment.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.mjs +4 -4
- package/esm2022/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.mjs +4 -4
- package/esm2022/helpers/get-affected-item.mjs +13 -0
- package/esm2022/helpers/get-item-total-discount.mjs +8 -0
- package/esm2022/helpers/input-to-item-transform.mjs +19 -0
- package/esm2022/helpers/public_api.mjs +4 -0
- package/esm2022/models/cart.mjs +1 -1
- package/esm2022/models/public_api.mjs +1 -1
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/routing/cart-routing.module.mjs +5 -5
- package/esm2022/routing/guards/billing-address/billing-address-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/billing-address/billing-address.guard.mjs +4 -4
- package/esm2022/routing/guards/cart-items/cart-items-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/cart-items/cart-items.guard.mjs +4 -4
- package/esm2022/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/in-stock-items/in-stock-items.guard.mjs +4 -4
- package/esm2022/routing/guards/order-result/order-result-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/order-result/order-result.guard.mjs +4 -4
- package/esm2022/routing/guards/payment-method/payment-method-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/payment-method/payment-method.guard.mjs +4 -4
- package/esm2022/routing/guards/resolve-cart/redirect.token.mjs +2 -2
- package/esm2022/routing/guards/resolve-cart/resolve-cart.guard.mjs +4 -4
- package/esm2022/routing/guards/resolved-cart/resolved-cart.guard.mjs +4 -4
- package/esm2022/routing/guards/shipping-address/shipping-address-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/shipping-address/shipping-address.guard.mjs +4 -4
- package/esm2022/routing/guards/shipping-method/shipping-method-guard-redirect.token.mjs +2 -2
- package/esm2022/routing/guards/shipping-method/shipping-method.guard.mjs +4 -4
- package/esm2022/routing/resolvers/cart-resolver.service.mjs +4 -4
- package/esm2022/routing/resolvers/empty-cart-resolver.service.mjs +4 -4
- package/esm2022/routing/resolvers/tokens/cart-resolver-redirect.token.mjs +2 -2
- package/esm2022/routing/resolvers/tokens/empty-cart-resolver-redirect.token.mjs +2 -2
- package/esm2022/state/actions/cart-address.actions.mjs +1 -1
- package/esm2022/state/actions/cart-billing-address.actions.mjs +1 -1
- package/esm2022/state/actions/cart-coupon.actions.mjs +1 -1
- package/esm2022/state/actions/cart-item.actions.mjs +9 -5
- package/esm2022/state/actions/cart-order.actions.mjs +1 -1
- package/esm2022/state/actions/cart-payment.actions.mjs +1 -1
- package/esm2022/state/actions/cart-shipping-address.actions.mjs +1 -1
- package/esm2022/state/actions/cart-shipping-information.actions.mjs +1 -1
- package/esm2022/state/cart-state.module.mjs +5 -5
- package/esm2022/state/effects/cart-address.effects.mjs +4 -4
- package/esm2022/state/effects/cart-billing-address.effects.mjs +4 -4
- package/esm2022/state/effects/cart-coupon.effects.mjs +4 -4
- package/esm2022/state/effects/cart-item.effects.mjs +20 -21
- package/esm2022/state/effects/cart-order.effects.mjs +4 -4
- package/esm2022/state/effects/cart-payment-methods.effects.mjs +4 -4
- package/esm2022/state/effects/cart-payment-processor.effects.mjs +37 -17
- package/esm2022/state/effects/cart-payment.effects.mjs +5 -5
- package/esm2022/state/effects/cart-resolver.effects.mjs +4 -4
- package/esm2022/state/effects/cart-shipping-address.effects.mjs +4 -4
- package/esm2022/state/effects/cart-shipping-information.effects.mjs +4 -4
- package/esm2022/state/effects/cart-shipping-methods.effects.mjs +4 -4
- package/esm2022/state/effects/cart.effects.mjs +4 -4
- package/esm2022/state/effects/public_api.mjs +2 -0
- package/esm2022/state/facades/cart/cart-facade.interface.mjs +1 -1
- package/esm2022/state/facades/cart/cart.facade.mjs +6 -54
- package/esm2022/state/helpers/cart-items-entity-transform.mjs +24 -0
- package/esm2022/state/helpers/public_api.mjs +2 -0
- package/esm2022/state/models/public_api.mjs +1 -4
- package/esm2022/state/models/stateful-cart.mjs +1 -1
- package/esm2022/state/public_api.mjs +3 -2
- package/esm2022/state/reducers/action-types.type.mjs +1 -1
- package/esm2022/state/reducers/cart/cart.reducer.mjs +2 -2
- package/esm2022/state/reducers/cart-billing-address/cart-billing-address.reducer.mjs +2 -2
- package/esm2022/state/reducers/cart-coupon/cart-coupon.reducer.mjs +2 -2
- package/esm2022/state/reducers/cart-item/cart-item.reducer.mjs +2 -2
- package/esm2022/state/reducers/cart-item-entities/adapter.mjs +10 -0
- package/esm2022/state/reducers/cart-item-entities/cart-item-entities.reducer.mjs +17 -30
- package/esm2022/state/reducers/cart-item-entities/retrieval-actions.reducer.mjs +3 -7
- package/esm2022/state/reducers/cart-item-entities/set-state-meta-reducer.mjs +23 -0
- package/esm2022/state/reducers/cart-order/cart-order.reducer.mjs +2 -2
- package/esm2022/state/reducers/cart-payment/cart-payment.reducer.mjs +2 -2
- package/esm2022/state/reducers/cart-payment-methods/cart-payment-methods.reducer.mjs +1 -1
- package/esm2022/state/reducers/cart-reducers-state.interface.mjs +1 -1
- package/esm2022/state/reducers/cart-resolve/cart-resolve.reducer.mjs +1 -1
- package/esm2022/state/reducers/cart-shipping-address/cart-shipping-address.reducer.mjs +1 -1
- package/esm2022/state/reducers/cart-shipping-information/cart-shipping-information.reducer.mjs +3 -4
- package/esm2022/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.mjs +1 -1
- package/esm2022/state/reducers/public_api.mjs +2 -2
- package/esm2022/state/reducers/token/config.token.mjs +2 -2
- package/esm2022/state/reducers/token/extra.token.mjs +1 -1
- package/esm2022/state/selectors/cart/cart.selector.mjs +12 -74
- package/esm2022/state/selectors/cart-feature.selector.mjs +1 -1
- package/esm2022/state/selectors/cart-item-entities/cart-item-entities.selectors.mjs +7 -28
- package/esm2022/state/selectors/cart-order/cart-order.selector.mjs +2 -2
- package/esm2022/state/selectors/cart.selector.mjs +1 -1
- package/esm2022/state/testing/cart-testing.module.mjs +5 -5
- package/esm2022/state/testing/factories/stateful-cart-item.factory.mjs +6 -6
- package/esm2022/state/testing/factories/stateful-composite-cart-item.factory.mjs +6 -4
- package/esm2022/state/testing/factories/stateful-configurable-cart-item.factory.mjs +6 -4
- package/esm2022/state/testing/mock-cart-facade.mjs +5 -45
- package/esm2022/storage/cart-storage.service.mjs +4 -4
- package/esm2022/testing/factories/cart-address.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-coupon.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-item/cart-item.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-item/composite-cart-item.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-item/configurable-cart-item.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-payment.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-shipping-rate.factory.mjs +4 -4
- package/esm2022/testing/factories/cart-total.factory.mjs +4 -4
- package/esm2022/testing/factories/cart.factory.mjs +7 -7
- package/esm2022/testing/factories/public_api.mjs +1 -2
- package/fesm2022/daffodil-cart-driver-in-memory.mjs +73 -73
- package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs +39 -39
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento.mjs +80 -111
- package/fesm2022/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-testing.mjs +37 -37
- package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver.mjs +3 -3
- package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
- package/fesm2022/daffodil-cart-routing.mjs +47 -47
- package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state-testing.mjs +23 -58
- package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state.mjs +319 -457
- package/fesm2022/daffodil-cart-state.mjs.map +1 -1
- package/fesm2022/daffodil-cart-testing.mjs +29 -49
- package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart.mjs +44 -5
- package/fesm2022/daffodil-cart.mjs.map +1 -1
- package/helpers/get-affected-item.d.ts +5 -0
- package/helpers/get-item-total-discount.d.ts +5 -0
- package/helpers/input-to-item-transform.d.ts +5 -0
- package/helpers/public_api.d.ts +3 -0
- package/models/cart.d.ts +1 -2
- package/models/public_api.d.ts +0 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/state/actions/cart-address.actions.d.ts +1 -1
- package/state/actions/cart-billing-address.actions.d.ts +8 -8
- package/state/actions/cart-coupon.actions.d.ts +1 -1
- package/state/actions/cart-item.actions.d.ts +27 -23
- package/state/actions/cart-order.actions.d.ts +2 -2
- package/state/actions/cart-payment.actions.d.ts +15 -15
- package/state/actions/cart-shipping-address.actions.d.ts +8 -8
- package/state/actions/cart-shipping-information.actions.d.ts +4 -4
- package/state/effects/cart-address.effects.d.ts +6 -6
- package/state/effects/cart-billing-address.effects.d.ts +6 -6
- package/state/effects/cart-coupon.effects.d.ts +6 -6
- package/state/effects/cart-item.effects.d.ts +9 -11
- package/state/effects/cart-order.effects.d.ts +6 -6
- package/state/effects/cart-payment-processor.effects.d.ts +29 -9
- package/state/effects/cart-payment.effects.d.ts +6 -6
- package/state/effects/cart-shipping-address.effects.d.ts +6 -6
- package/state/effects/cart-shipping-information.effects.d.ts +6 -6
- package/state/effects/cart.effects.d.ts +1 -1
- package/state/effects/public_api.d.ts +1 -0
- package/state/facades/cart/cart-facade.interface.d.ts +10 -69
- package/state/facades/cart/cart.facade.d.ts +13 -47
- package/state/helpers/cart-items-entity-transform.d.ts +12 -0
- package/state/helpers/public_api.d.ts +1 -0
- package/state/models/public_api.d.ts +0 -3
- package/state/models/stateful-cart.d.ts +3 -3
- package/state/public_api.d.ts +2 -1
- package/state/reducers/action-types.type.d.ts +2 -3
- package/state/reducers/cart/cart.reducer.d.ts +1 -1
- package/state/reducers/cart-billing-address/cart-billing-address.reducer.d.ts +1 -1
- package/state/reducers/cart-coupon/cart-coupon.reducer.d.ts +1 -1
- package/state/reducers/cart-item/cart-item.reducer.d.ts +1 -1
- package/state/reducers/cart-item-entities/adapter.d.ts +6 -0
- package/state/reducers/cart-item-entities/cart-item-entities.reducer.d.ts +2 -3
- package/state/reducers/cart-item-entities/retrieval-actions.reducer.d.ts +2 -3
- package/state/reducers/cart-item-entities/set-state-meta-reducer.d.ts +10 -0
- package/state/reducers/cart-order/cart-order.reducer.d.ts +2 -3
- package/state/reducers/cart-payment/cart-payment.reducer.d.ts +1 -1
- package/state/reducers/cart-payment-methods/cart-payment-methods.reducer.d.ts +1 -1
- package/state/reducers/cart-reducers-state.interface.d.ts +5 -6
- package/state/reducers/cart-resolve/cart-resolve.reducer.d.ts +1 -1
- package/state/reducers/cart-shipping-information/cart-shipping-information.reducer.d.ts +1 -1
- package/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.d.ts +1 -1
- package/state/reducers/public_api.d.ts +1 -1
- package/state/reducers/token/config.token.d.ts +1 -1
- package/state/reducers/token/extra.token.d.ts +2 -3
- package/state/reducers/token/meta.token.d.ts +1 -1
- package/state/reducers/token/reducers.token.d.ts +1 -1
- package/state/selectors/cart/cart.selector.d.ts +59 -80
- package/state/selectors/cart-feature.selector.d.ts +3 -4
- package/state/selectors/cart-item-entities/cart-item-entities.selectors.d.ts +17 -52
- package/state/selectors/cart-order/cart-order.selector.d.ts +10 -11
- package/state/selectors/cart.selector.d.ts +2 -3
- package/state/testing/factories/stateful-cart-item.factory.d.ts +6 -4
- package/state/testing/factories/stateful-composite-cart-item.factory.d.ts +6 -4
- package/state/testing/factories/stateful-configurable-cart-item.factory.d.ts +6 -4
- package/state/testing/mock-cart-facade.d.ts +7 -33
- package/testing/factories/cart.factory.d.ts +5 -5
- package/testing/factories/public_api.d.ts +0 -1
- package/driver/magento/transforms/outputs/cart-shipping-information.service.d.ts +0 -19
- package/esm2022/driver/magento/transforms/outputs/cart-shipping-information.service.mjs +0 -33
- package/esm2022/models/cart-shipping-info.mjs +0 -2
- package/esm2022/state/models/stateful-cart-item.mjs +0 -9
- package/esm2022/state/models/stateful-composite-cart-item.mjs +0 -2
- package/esm2022/state/models/stateful-configurable-cart-item.mjs +0 -2
- package/esm2022/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.mjs +0 -9
- package/esm2022/state/reducers/cart-item-entities/set-state.meta-reducer.mjs +0 -56
- package/esm2022/testing/factories/cart-shipping-information.factory.mjs +0 -25
- package/models/cart-shipping-info.d.ts +0 -5
- package/state/models/stateful-cart-item.d.ts +0 -18
- package/state/models/stateful-composite-cart-item.d.ts +0 -4
- package/state/models/stateful-configurable-cart-item.d.ts +0 -4
- package/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.d.ts +0 -6
- package/state/reducers/cart-item-entities/set-state.meta-reducer.d.ts +0 -11
- package/testing/factories/cart-shipping-information.factory.d.ts +0 -12
|
@@ -1,199 +1,178 @@
|
|
|
1
1
|
import { MemoizedSelector, DefaultProjectorFn } from '@ngrx/store';
|
|
2
|
-
import { DaffCart,
|
|
2
|
+
import { DaffCart, DaffCartOrderResult } from '@daffodil/cart';
|
|
3
3
|
import { DaffStateError } from '@daffodil/core/state';
|
|
4
|
-
import { DaffStatefulCartItem } from '../../models/stateful-cart-item';
|
|
5
4
|
import { DaffCartResolveState } from '../../reducers/cart-resolve/cart-resolve-state.enum';
|
|
6
5
|
import { DaffCartReducerState, DaffCartStateRootSlice } from '../../reducers/public_api';
|
|
7
|
-
export interface DaffCartStateMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
8
|
-
selectCartState: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
9
|
-
selectCartValue: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
10
|
-
selectCartResolved: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
6
|
+
export interface DaffCartStateMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
7
|
+
selectCartState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>>;
|
|
8
|
+
selectCartValue: MemoizedSelector<DaffCartStateRootSlice<T, V>, T>;
|
|
9
|
+
selectCartResolved: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartResolveState>;
|
|
11
10
|
/**
|
|
12
11
|
* The object that holds all the loading states for cart operations.
|
|
13
12
|
*/
|
|
14
|
-
selectCartLoadingObject: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
13
|
+
selectCartLoadingObject: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>['loading']>;
|
|
15
14
|
/**
|
|
16
15
|
* Selects whether there is any cart operation in progress.
|
|
17
16
|
* This includes operations specifically for cart subfields.
|
|
18
17
|
*/
|
|
19
|
-
selectCartFeatureLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
18
|
+
selectCartFeatureLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
20
19
|
/**
|
|
21
20
|
* Selects whether there is any cart resolve operation in progress.
|
|
22
21
|
* This includes operations for cart subfields.
|
|
23
22
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
24
23
|
*/
|
|
25
|
-
selectCartFeatureResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
24
|
+
selectCartFeatureResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
26
25
|
/**
|
|
27
26
|
* Selects whether there is any cart mutate operation in progress.
|
|
28
27
|
* This includes operations for cart subfields.
|
|
29
28
|
* This pertains only to requests that mutate data such as "update".
|
|
30
29
|
*/
|
|
31
|
-
selectCartFeatureMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
30
|
+
selectCartFeatureMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
32
31
|
/**
|
|
33
32
|
* Selects whether there is a cart operation in progress.
|
|
34
33
|
* This does not include operations specifically for cart subfields.
|
|
35
34
|
*/
|
|
36
|
-
selectCartLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
35
|
+
selectCartLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
37
36
|
/**
|
|
38
37
|
* Selects whether there is a cart resolve operation in progress.
|
|
39
38
|
* This does not include operations specifically for cart subfields.
|
|
40
39
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
41
40
|
*/
|
|
42
|
-
selectCartResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
41
|
+
selectCartResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
43
42
|
/**
|
|
44
43
|
* Selects whether there is a cart mutate operation in progress.
|
|
45
44
|
* This does not include operations specifically for cart subfields.
|
|
46
45
|
* This pertains only to requests that mutate data such as "update".
|
|
47
46
|
*/
|
|
48
|
-
selectCartMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
47
|
+
selectCartMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
49
48
|
/**
|
|
50
49
|
* Selects whether there is a cart billing address operation in progress.
|
|
51
50
|
*/
|
|
52
|
-
selectBillingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
51
|
+
selectBillingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
53
52
|
/**
|
|
54
53
|
* Selects whether there is a cart billing address resolve operation in progress.
|
|
55
54
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
56
55
|
*/
|
|
57
|
-
selectBillingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
56
|
+
selectBillingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
58
57
|
/**
|
|
59
58
|
* Selects whether there is a cart billing address mutate operation in progress.
|
|
60
59
|
* This pertains only to requests that mutate data such as "update".
|
|
61
60
|
*/
|
|
62
|
-
selectBillingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
61
|
+
selectBillingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
63
62
|
/**
|
|
64
63
|
* Selects whether there is a cart shipping address operation in progress.
|
|
65
64
|
*/
|
|
66
|
-
selectShippingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
65
|
+
selectShippingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
67
66
|
/**
|
|
68
67
|
* Selects whether there is a cart shipping address resolve operation in progress.
|
|
69
68
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
70
69
|
*/
|
|
71
|
-
selectShippingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
70
|
+
selectShippingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
72
71
|
/**
|
|
73
72
|
* Selects whether there is a cart shipping address mutate operation in progress.
|
|
74
73
|
* This pertains only to requests that mutate data such as "update".
|
|
75
74
|
*/
|
|
76
|
-
selectShippingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
75
|
+
selectShippingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
77
76
|
/**
|
|
78
77
|
* Selects whether there is a cart shipping information operation in progress.
|
|
79
78
|
*/
|
|
80
|
-
selectShippingInformationLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
79
|
+
selectShippingInformationLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
81
80
|
/**
|
|
82
81
|
* Selects whether there is a cart shipping information resolve operation in progress.
|
|
83
82
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
84
83
|
*/
|
|
85
|
-
selectShippingInformationResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
84
|
+
selectShippingInformationResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
86
85
|
/**
|
|
87
86
|
* Selects whether there is a cart shipping information mutate operation in progress.
|
|
88
87
|
* This pertains only to requests that mutate data such as "update".
|
|
89
88
|
*/
|
|
90
|
-
selectShippingInformationMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
89
|
+
selectShippingInformationMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
91
90
|
/**
|
|
92
91
|
* Selects whether there is a cart shipping methods operation in progress.
|
|
93
92
|
*/
|
|
94
|
-
selectShippingMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
93
|
+
selectShippingMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
95
94
|
/**
|
|
96
95
|
* Selects whether there is a cart shipping methods resolve operation in progress.
|
|
97
96
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
98
97
|
*/
|
|
99
|
-
selectShippingMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
98
|
+
selectShippingMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
100
99
|
/**
|
|
101
100
|
* Selects whether there is a cart payment operation in progress.
|
|
102
101
|
*/
|
|
103
|
-
selectPaymentLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
102
|
+
selectPaymentLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
104
103
|
/**
|
|
105
104
|
* Selects whether there is a cart payment resolve operation in progress.
|
|
106
105
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
107
106
|
*/
|
|
108
|
-
selectPaymentResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
107
|
+
selectPaymentResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
109
108
|
/**
|
|
110
109
|
* Selects whether there is a cart payment mutate operation in progress.
|
|
111
110
|
* This pertains only to requests that mutate data such as "update".
|
|
112
111
|
*/
|
|
113
|
-
selectPaymentMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
112
|
+
selectPaymentMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
114
113
|
/**
|
|
115
114
|
* Selects whether there is a cart payment methods operation in progress.
|
|
116
115
|
*/
|
|
117
|
-
selectPaymentMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
116
|
+
selectPaymentMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
118
117
|
/**
|
|
119
118
|
* Selects whether there is a cart payment methods resolve operation in progress.
|
|
120
119
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
121
120
|
*/
|
|
122
|
-
selectPaymentMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
121
|
+
selectPaymentMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
123
122
|
/**
|
|
124
123
|
* Selects whether there is a cart coupon operation in progress.
|
|
125
124
|
*/
|
|
126
|
-
selectCouponLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
125
|
+
selectCouponLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
127
126
|
/**
|
|
128
127
|
* Selects whether there is a cart coupon resolve operation in progress.
|
|
129
128
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
130
129
|
*/
|
|
131
|
-
selectCouponResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
130
|
+
selectCouponResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
132
131
|
/**
|
|
133
132
|
* Selects whether there is a cart coupon mutate operation in progress.
|
|
134
133
|
* This pertains only to requests that mutate data such as "update".
|
|
135
134
|
*/
|
|
136
|
-
selectCouponMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
135
|
+
selectCouponMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
137
136
|
/**
|
|
138
137
|
* Selects whether there is a cart item operation in progress.
|
|
139
138
|
*/
|
|
140
|
-
selectItemLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
139
|
+
selectItemLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
141
140
|
/**
|
|
142
141
|
* Selects whether there is a cart item add operation in progress.
|
|
143
142
|
*/
|
|
144
|
-
selectItemAdding: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
143
|
+
selectItemAdding: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
145
144
|
/**
|
|
146
145
|
* Selects whether there is a cart item resolve operation in progress.
|
|
147
146
|
* This pertains only to requests that do not mutate data such as "load" or "list".
|
|
148
147
|
*/
|
|
149
|
-
selectItemResolving: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Selects the DaffCartTotals for cart discounts. These are discounts associated with coupon codes.
|
|
170
|
-
* @deprecated use {@link DaffCart#discounts} instead.
|
|
171
|
-
*/
|
|
172
|
-
selectCartDiscountTotals: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartTotal[]>;
|
|
173
|
-
selectCartShippingTotal: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartTotal['value']>;
|
|
174
|
-
selectCartCoupons: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['coupons']>;
|
|
175
|
-
/**
|
|
176
|
-
* @deprecated use getDaffCartItemEntitiesSelectors().selectAllCartItems instead.
|
|
177
|
-
*/
|
|
178
|
-
selectCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['items']>;
|
|
179
|
-
selectCartHasOutOfStockItems: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, boolean>;
|
|
180
|
-
selectCartBillingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['billing_address']>;
|
|
181
|
-
selectCartShippingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['shipping_address']>;
|
|
182
|
-
selectCartPayment: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['payment']>;
|
|
183
|
-
selectCartTotals: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['totals']>;
|
|
184
|
-
selectCartShippingInformation: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['shipping_information']>;
|
|
185
|
-
selectCartAvailableShippingMethods: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['available_shipping_methods']>;
|
|
186
|
-
selectCartAvailablePaymentMethods: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, T['available_payment_methods']>;
|
|
187
|
-
selectIsCartEmpty: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, boolean>;
|
|
148
|
+
selectItemResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* Selects whether there is a cart item mutate operation in progress.
|
|
151
|
+
* This pertains only to requests that mutate existing data such as update.
|
|
152
|
+
* This does not apply to add requests. see {@link selectItemAdding} for that.
|
|
153
|
+
*/
|
|
154
|
+
selectItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
155
|
+
selectCartErrorsObject: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>['errors']>;
|
|
156
|
+
selectCartErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
157
|
+
selectBillingAddressErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
158
|
+
selectShippingAddressErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
159
|
+
selectShippingInformationErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
160
|
+
selectShippingMethodsErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
161
|
+
selectPaymentErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
162
|
+
selectPaymentMethodsErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
163
|
+
selectCouponErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
164
|
+
selectItemErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
|
|
165
|
+
selectCartHasOutOfStockItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
166
|
+
selectIsCartEmpty: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
188
167
|
/**
|
|
189
168
|
* Selects whether the cart's shipping address equals the billing address.
|
|
190
169
|
* Returns false if either address is null or undefined.
|
|
191
170
|
*/
|
|
192
|
-
selectIsBillingSameAsShipping: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
193
|
-
selectHasBillingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
194
|
-
selectHasShippingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
195
|
-
selectHasShippingMethod: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
196
|
-
selectHasPaymentMethod: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
197
|
-
selectCanPlaceOrder: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
171
|
+
selectIsBillingSameAsShipping: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
172
|
+
selectHasBillingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
173
|
+
selectHasShippingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
174
|
+
selectHasShippingMethod: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
175
|
+
selectHasPaymentMethod: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
176
|
+
selectCanPlaceOrder: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean, DefaultProjectorFn<boolean>>;
|
|
198
177
|
}
|
|
199
|
-
export declare const getCartSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
178
|
+
export declare const getCartSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartStateMemoizedSelectors<T, DaffCartOrderResult>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { MemoizedSelector } from '@ngrx/store';
|
|
2
2
|
import { DaffCart, DaffCartOrderResult } from '@daffodil/cart';
|
|
3
|
-
import { DaffStatefulCartItem } from '../models/stateful-cart-item';
|
|
4
3
|
import { DaffCartStateRootSlice, DaffCartReducersState } from '../reducers/public_api';
|
|
5
|
-
export interface DaffCartFeatureMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
6
|
-
selectCartFeatureState: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
4
|
+
export interface DaffCartFeatureMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
5
|
+
selectCartFeatureState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducersState<T, V>>;
|
|
7
6
|
}
|
|
8
|
-
export declare const getDaffCartFeatureSelector: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
7
|
+
export declare const getDaffCartFeatureSelector: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartFeatureMemoizedSelectors<T, V>;
|
|
@@ -1,61 +1,26 @@
|
|
|
1
|
-
import { EntityState } from '@ngrx/entity';
|
|
2
1
|
import { MemoizedSelector } from '@ngrx/store';
|
|
3
|
-
import { DaffConfigurableCartItemAttribute, DaffCompositeCartItemOption, DaffCart, DaffCartOrderResult
|
|
4
|
-
import {
|
|
5
|
-
import { DaffCartItemStateEnum, DaffStatefulCartItem } from '../../models/stateful-cart-item';
|
|
2
|
+
import { DaffConfigurableCartItemAttribute, DaffCompositeCartItemOption, DaffCart, DaffCartOrderResult } from '@daffodil/cart';
|
|
3
|
+
import { DaffOperationEntity, DaffOperationEntityState } from '@daffodil/core/state';
|
|
6
4
|
import { DaffCartStateRootSlice } from '../../reducers/public_api';
|
|
7
|
-
export interface DaffCartItemEntitiesMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
8
|
-
selectCartItemEntitiesState: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
9
|
-
selectCartItemIds: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
10
|
-
selectCartItemEntities: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
11
|
-
selectAllCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
12
|
-
selectCartItemTotal: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
13
|
-
selectCartItem: (id:
|
|
14
|
-
selectTotalNumberOfCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
15
|
-
selectCartItemConfiguredAttributes: (id:
|
|
16
|
-
selectCartItemCompositeOptions: (id:
|
|
17
|
-
selectIsCartItemOutOfStock: (id:
|
|
5
|
+
export interface DaffCartItemEntitiesMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
6
|
+
selectCartItemEntitiesState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>>;
|
|
7
|
+
selectCartItemIds: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>['ids']>;
|
|
8
|
+
selectCartItemEntities: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>['entities']>;
|
|
9
|
+
selectAllCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
|
|
10
|
+
selectCartItemTotal: MemoizedSelector<DaffCartStateRootSlice<T, V>, number>;
|
|
11
|
+
selectCartItem: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>>;
|
|
12
|
+
selectTotalNumberOfCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, number>;
|
|
13
|
+
selectCartItemConfiguredAttributes: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffConfigurableCartItemAttribute[]>;
|
|
14
|
+
selectCartItemCompositeOptions: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCompositeCartItemOption[]>;
|
|
15
|
+
selectIsCartItemOutOfStock: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
18
16
|
/**
|
|
19
17
|
* Selects all cart items that are out of stock.
|
|
20
18
|
*/
|
|
21
|
-
selectOutOfStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
19
|
+
selectOutOfStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
|
|
22
20
|
/**
|
|
23
21
|
* Selects all cart items that are in stock.
|
|
24
22
|
*/
|
|
25
|
-
selectInStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
26
|
-
selectCartItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
27
|
-
selectCartItemState: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartItemStateEnum>;
|
|
28
|
-
/**
|
|
29
|
-
* Selects the specified item's price.
|
|
30
|
-
* Zero by default.
|
|
31
|
-
* This includes any discounts and sales that apply to the product or category.
|
|
32
|
-
* This excludes cart discounts.
|
|
33
|
-
*/
|
|
34
|
-
selectCartItemPrice: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, number>;
|
|
35
|
-
/**
|
|
36
|
-
* Selects the specified item's quantity.
|
|
37
|
-
* Zero by default.
|
|
38
|
-
*/
|
|
39
|
-
selectCartItemQuantity: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, number>;
|
|
40
|
-
/**
|
|
41
|
-
* Selects the specified item's row total.
|
|
42
|
-
* Zero by default.
|
|
43
|
-
* This includes any discounts and sales that apply to the product or category.
|
|
44
|
-
* This excludes cart discounts.
|
|
45
|
-
*/
|
|
46
|
-
selectCartItemRowTotal: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, number>;
|
|
47
|
-
/**
|
|
48
|
-
* Selects the specified item's array of cart (not product) discounts for the entire row.
|
|
49
|
-
*/
|
|
50
|
-
selectCartItemDiscounts: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartItemDiscount[]>;
|
|
51
|
-
/**
|
|
52
|
-
* Selects the specified item's sum of all cart (not product) discounts for the entire row.
|
|
53
|
-
* Zero by default.
|
|
54
|
-
*/
|
|
55
|
-
selectCartItemTotalDiscount: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, number>;
|
|
56
|
-
/**
|
|
57
|
-
* Selects the specified item's errors.
|
|
58
|
-
*/
|
|
59
|
-
selectCartItemErrors: (id: U['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffStateError[]>;
|
|
23
|
+
selectInStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
|
|
24
|
+
selectCartItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
60
25
|
}
|
|
61
|
-
export declare const getDaffCartItemEntitiesSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
26
|
+
export declare const getDaffCartItemEntitiesSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartItemEntitiesMemoizedSelectors<T, V>;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { MemoizedSelector } from '@ngrx/store';
|
|
2
2
|
import { DaffCartOrderResult, DaffCart } from '@daffodil/cart';
|
|
3
|
-
import { DaffStatefulCartItem } from '../../models/stateful-cart-item';
|
|
4
3
|
import { DaffCartOrderReducerState, DaffCartStateRootSlice } from '../../reducers/public_api';
|
|
5
|
-
export interface DaffCartOrderMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
6
|
-
selectCartOrderState: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
4
|
+
export interface DaffCartOrderMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
5
|
+
selectCartOrderState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>>;
|
|
7
6
|
/**
|
|
8
7
|
* Selects whether there is a cart order operation in progress.
|
|
9
8
|
*/
|
|
10
|
-
selectCartOrderLoading: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
9
|
+
selectCartOrderLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
11
10
|
/**
|
|
12
11
|
* Selects whether there is a place order operation in progress.
|
|
13
12
|
*/
|
|
14
|
-
selectCartOrderMutating: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
15
|
-
selectCartOrderErrors: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
16
|
-
selectCartOrderValue: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
17
|
-
selectCartOrderId: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
18
|
-
selectCartOrderCartId: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
19
|
-
selectHasOrderResult: MemoizedSelector<DaffCartStateRootSlice<T, V
|
|
13
|
+
selectCartOrderMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
14
|
+
selectCartOrderErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['errors']>;
|
|
15
|
+
selectCartOrderValue: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']>;
|
|
16
|
+
selectCartOrderId: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']['orderId']>;
|
|
17
|
+
selectCartOrderCartId: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']['cartId']>;
|
|
18
|
+
selectHasOrderResult: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
|
|
20
19
|
}
|
|
21
|
-
export declare const getCartOrderSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
20
|
+
export declare const getCartOrderSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartOrderMemoizedSelectors<T, V>;
|
|
@@ -3,7 +3,6 @@ import { DaffCartStateMemoizedSelectors } from './cart/cart.selector';
|
|
|
3
3
|
import { DaffCartFeatureMemoizedSelectors } from './cart-feature.selector';
|
|
4
4
|
import { DaffCartItemEntitiesMemoizedSelectors } from './cart-item-entities/cart-item-entities.selectors';
|
|
5
5
|
import { DaffCartOrderMemoizedSelectors } from './cart-order/cart-order.selector';
|
|
6
|
-
|
|
7
|
-
export interface DaffCartMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult, U extends DaffStatefulCartItem = DaffStatefulCartItem> extends DaffCartFeatureMemoizedSelectors<T, V>, DaffCartOrderMemoizedSelectors<T, V, U>, DaffCartStateMemoizedSelectors<T>, DaffCartItemEntitiesMemoizedSelectors<T, V, U> {
|
|
6
|
+
export interface DaffCartMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> extends DaffCartFeatureMemoizedSelectors<T, V>, DaffCartOrderMemoizedSelectors<T, V>, DaffCartStateMemoizedSelectors<T>, DaffCartItemEntitiesMemoizedSelectors<T, V> {
|
|
8
7
|
}
|
|
9
|
-
export declare const getDaffCartSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult
|
|
8
|
+
export declare const getDaffCartSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartMemoizedSelectors<T, V>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DaffCartItem } from '@daffodil/cart';
|
|
2
2
|
import { DaffMockCartItem } from '@daffodil/cart/testing';
|
|
3
|
+
import { DaffOperationEntity, DaffState } from '@daffodil/core/state';
|
|
3
4
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DaffMockStatefulCartItem extends DaffMockCartItem implements
|
|
6
|
-
daffState:
|
|
6
|
+
export declare class DaffMockStatefulCartItem extends DaffMockCartItem implements DaffOperationEntity<DaffCartItem> {
|
|
7
|
+
daffState: DaffState;
|
|
7
8
|
daffErrors: any[];
|
|
9
|
+
daffTemp: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare class DaffStatefulCartItemFactory extends DaffModelFactory<
|
|
11
|
+
export declare class DaffStatefulCartItemFactory extends DaffModelFactory<DaffOperationEntity<DaffCartItem>> {
|
|
10
12
|
constructor();
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffStatefulCartItemFactory, never>;
|
|
12
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffStatefulCartItemFactory>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DaffCompositeCartItem } from '@daffodil/cart';
|
|
2
2
|
import { DaffMockCompositeCartItem } from '@daffodil/cart/testing';
|
|
3
|
+
import { DaffOperationEntity, DaffState } from '@daffodil/core/state';
|
|
3
4
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DaffMockStatefulCompositeCartItem extends DaffMockCompositeCartItem implements
|
|
6
|
-
daffState:
|
|
6
|
+
export declare class DaffMockStatefulCompositeCartItem extends DaffMockCompositeCartItem implements DaffOperationEntity<DaffCompositeCartItem> {
|
|
7
|
+
daffState: DaffState;
|
|
7
8
|
daffErrors: any[];
|
|
9
|
+
daffTemp: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare class DaffStatefulCompositeCartItemFactory extends DaffModelFactory<
|
|
11
|
+
export declare class DaffStatefulCompositeCartItemFactory extends DaffModelFactory<DaffOperationEntity<DaffCompositeCartItem>> {
|
|
10
12
|
constructor();
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffStatefulCompositeCartItemFactory, never>;
|
|
12
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffStatefulCompositeCartItemFactory>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DaffConfigurableCartItem } from '@daffodil/cart';
|
|
2
2
|
import { DaffMockConfigurableCartItem } from '@daffodil/cart/testing';
|
|
3
|
+
import { DaffOperationEntity, DaffState } from '@daffodil/core/state';
|
|
3
4
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DaffMockStatefulConfigurableCartItem extends DaffMockConfigurableCartItem implements
|
|
6
|
-
daffState:
|
|
6
|
+
export declare class DaffMockStatefulConfigurableCartItem extends DaffMockConfigurableCartItem implements DaffOperationEntity<DaffConfigurableCartItem> {
|
|
7
|
+
daffState: DaffState;
|
|
7
8
|
daffErrors: any[];
|
|
9
|
+
daffTemp: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare class DaffStatefulConfigurableCartItemFactory extends DaffModelFactory<
|
|
11
|
+
export declare class DaffStatefulConfigurableCartItemFactory extends DaffModelFactory<DaffOperationEntity<DaffConfigurableCartItem>> {
|
|
10
12
|
constructor();
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffStatefulConfigurableCartItemFactory, never>;
|
|
12
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffStatefulConfigurableCartItemFactory>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Dictionary } from '@ngrx/entity';
|
|
2
2
|
import { Action } from '@ngrx/store';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { DaffCart,
|
|
5
|
-
import { DaffCartFacadeInterface, DaffCartErrors, DaffCartOperationType, DaffCartLoading,
|
|
6
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
4
|
+
import { DaffCart, DaffCartItem, DaffCartOrderResult, DaffConfigurableCartItemAttribute, DaffCompositeCartItemOption } from '@daffodil/cart';
|
|
5
|
+
import { DaffCartFacadeInterface, DaffCartErrors, DaffCartOperationType, DaffCartLoading, DaffCartResolveState } from '@daffodil/cart/state';
|
|
6
|
+
import { DaffOperationEntity, DaffStateError } from '@daffodil/core/state';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class MockDaffCartFacade implements DaffCartFacadeInterface {
|
|
9
9
|
cart$: BehaviorSubject<DaffCart>;
|
|
@@ -48,31 +48,12 @@ export declare class MockDaffCartFacade implements DaffCartFacadeInterface {
|
|
|
48
48
|
paymentErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.Payment]>;
|
|
49
49
|
paymentMethodsErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.PaymentMethods]>;
|
|
50
50
|
couponErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.Coupon]>;
|
|
51
|
-
|
|
52
|
-
subtotal$: BehaviorSubject<DaffCartTotal['value']>;
|
|
53
|
-
grandTotal$: BehaviorSubject<DaffCartTotal['value']>;
|
|
54
|
-
subtotalExcludingTax$: BehaviorSubject<DaffCartTotal['value']>;
|
|
55
|
-
subtotalIncludingTax$: BehaviorSubject<DaffCartTotal['value']>;
|
|
56
|
-
subtotalWithDiscountExcludingTax$: BehaviorSubject<DaffCartTotal['value']>;
|
|
57
|
-
subtotalWithDiscountIncludingTax$: BehaviorSubject<DaffCartTotal['value']>;
|
|
58
|
-
discountTotals$: BehaviorSubject<DaffCartTotal[]>;
|
|
59
|
-
totalTax$: BehaviorSubject<DaffCartTotal['value']>;
|
|
60
|
-
shippingTotal$: BehaviorSubject<DaffCartTotal['value']>;
|
|
61
|
-
coupons$: BehaviorSubject<DaffCart['coupons']>;
|
|
62
|
-
items$: BehaviorSubject<DaffCart['items']>;
|
|
63
|
-
itemEntities$: BehaviorSubject<DaffStatefulCartItem[]>;
|
|
51
|
+
itemEntities$: BehaviorSubject<DaffOperationEntity<DaffCartItem>[]>;
|
|
64
52
|
totalItems$: BehaviorSubject<number>;
|
|
65
53
|
hasOutOfStockItems$: BehaviorSubject<boolean>;
|
|
66
|
-
outOfStockItems$: BehaviorSubject<
|
|
67
|
-
inStockItems$: BehaviorSubject<
|
|
68
|
-
itemDictionary$: BehaviorSubject<Dictionary<
|
|
69
|
-
billingAddress$: BehaviorSubject<DaffCart['billing_address']>;
|
|
70
|
-
shippingAddress$: BehaviorSubject<DaffCart['shipping_address']>;
|
|
71
|
-
payment$: BehaviorSubject<DaffCart['payment']>;
|
|
72
|
-
totals$: BehaviorSubject<DaffCart['totals']>;
|
|
73
|
-
shippingInformation$: BehaviorSubject<DaffCart['shipping_information']>;
|
|
74
|
-
availableShippingMethods$: BehaviorSubject<DaffCart['available_shipping_methods']>;
|
|
75
|
-
availablePaymentMethods$: BehaviorSubject<DaffCart['available_payment_methods']>;
|
|
54
|
+
outOfStockItems$: BehaviorSubject<DaffOperationEntity<DaffCartItem>[]>;
|
|
55
|
+
inStockItems$: BehaviorSubject<DaffOperationEntity<DaffCartItem>[]>;
|
|
56
|
+
itemDictionary$: BehaviorSubject<Dictionary<DaffOperationEntity<DaffCartItem>>>;
|
|
76
57
|
paymentId$: BehaviorSubject<any>;
|
|
77
58
|
isCartEmpty$: BehaviorSubject<boolean>;
|
|
78
59
|
isBillingSameAsShipping$: BehaviorSubject<boolean>;
|
|
@@ -87,16 +68,9 @@ export declare class MockDaffCartFacade implements DaffCartFacadeInterface {
|
|
|
87
68
|
orderResultId$: BehaviorSubject<string>;
|
|
88
69
|
orderResultCartId$: BehaviorSubject<string>;
|
|
89
70
|
hasOrderResult$: BehaviorSubject<boolean>;
|
|
90
|
-
getCartItemPrice(itemId: DaffCartItem['id']): BehaviorSubject<number>;
|
|
91
|
-
getCartItemQuantity(itemId: DaffCartItem['id']): BehaviorSubject<number>;
|
|
92
|
-
getCartItemRowTotal(itemId: DaffCartItem['id']): BehaviorSubject<number>;
|
|
93
71
|
getConfiguredCartItemAttributes(itemId: DaffCartItem['id']): BehaviorSubject<DaffConfigurableCartItemAttribute[]>;
|
|
94
72
|
getCompositeCartItemOptions(itemId: DaffCartItem['id']): BehaviorSubject<DaffCompositeCartItemOption[]>;
|
|
95
73
|
isCartItemOutOfStock(itemId: DaffCartItem['id']): BehaviorSubject<boolean>;
|
|
96
|
-
getCartItemState(itemId: DaffCartItem['id']): BehaviorSubject<DaffCartItemStateEnum>;
|
|
97
|
-
getCartItemDiscounts(itemId: DaffCartItem['id']): BehaviorSubject<DaffCartItemDiscount[]>;
|
|
98
|
-
getCartItemTotalDiscount(itemId: DaffCartItem['id']): BehaviorSubject<number>;
|
|
99
|
-
getCartItemErrors(itemId: DaffCartItem['id']): BehaviorSubject<DaffStateError[]>;
|
|
100
74
|
dispatch(action: Action): void;
|
|
101
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffCartFacade, never>;
|
|
102
76
|
static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffCartFacade>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DaffCart } from '@daffodil/cart';
|
|
2
2
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
3
|
-
import {
|
|
3
|
+
import { DaffCartShippingRateFactory } from './cart-shipping-rate.factory';
|
|
4
4
|
import { DaffCartTotalFactory } from './cart-total.factory';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class MockCart implements DaffCart {
|
|
7
7
|
protected totalFactory: DaffCartTotalFactory;
|
|
8
|
-
protected shippingInformationFactory:
|
|
8
|
+
protected shippingInformationFactory: DaffCartShippingRateFactory;
|
|
9
9
|
id: string;
|
|
10
10
|
subtotal: number;
|
|
11
11
|
grand_total: number;
|
|
@@ -13,16 +13,16 @@ export declare class MockCart implements DaffCart {
|
|
|
13
13
|
items: any[];
|
|
14
14
|
billing_address: any;
|
|
15
15
|
shipping_address: any;
|
|
16
|
-
shipping_information: import("@daffodil/cart").
|
|
16
|
+
shipping_information: import("@daffodil/cart").DaffCartShippingRate;
|
|
17
17
|
totals: Record<import("@daffodil/cart").DaffCartTotalTypeEnum, import("@daffodil/cart").DaffCartTotal>;
|
|
18
18
|
payment: any;
|
|
19
19
|
available_shipping_methods: any[];
|
|
20
20
|
available_payment_methods: any[];
|
|
21
21
|
extra_attributes: {};
|
|
22
|
-
constructor(totalFactory: DaffCartTotalFactory, shippingInformationFactory:
|
|
22
|
+
constructor(totalFactory: DaffCartTotalFactory, shippingInformationFactory: DaffCartShippingRateFactory);
|
|
23
23
|
}
|
|
24
24
|
export declare class DaffCartFactory extends DaffModelFactory<DaffCart> {
|
|
25
|
-
constructor(totalFactory: DaffCartTotalFactory, shippingInformationFactory:
|
|
25
|
+
constructor(totalFactory: DaffCartTotalFactory, shippingInformationFactory: DaffCartShippingRateFactory);
|
|
26
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartFactory, never>;
|
|
27
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartFactory>;
|
|
28
28
|
}
|
|
@@ -5,6 +5,5 @@ export * from './cart-item/composite-cart-item.factory';
|
|
|
5
5
|
export * from './cart-address.factory';
|
|
6
6
|
export * from './cart-payment.factory';
|
|
7
7
|
export * from './cart-shipping-rate.factory';
|
|
8
|
-
export * from './cart-shipping-information.factory';
|
|
9
8
|
export * from './cart-coupon.factory';
|
|
10
9
|
export * from './cart-total.factory';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DaffCartShippingInformation } from '@daffodil/cart';
|
|
2
|
-
import { DaffMagentoCartShippingRateTransformer } from './cart-shipping-rate.service';
|
|
3
|
-
import { MagentoCartShippingMethod } from '../../models/responses/cart-shipping-method';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Transforms magento cart shipping methods into an object usable by daffodil.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffMagentoCartShippingInformationTransformer {
|
|
9
|
-
private shippingRateTransformer;
|
|
10
|
-
constructor(shippingRateTransformer: DaffMagentoCartShippingRateTransformer);
|
|
11
|
-
/**
|
|
12
|
-
* Transforms the magento shipping method from the magento cart query into a DaffCartShippingInformation.
|
|
13
|
-
*
|
|
14
|
-
* @param shippingMethod the shippingMethod from a magento cart query.
|
|
15
|
-
*/
|
|
16
|
-
transform(shippingMethod: MagentoCartShippingMethod): DaffCartShippingInformation;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCartShippingInformationTransformer, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCartShippingInformationTransformer>;
|
|
19
|
-
}
|