@daffodil/order 0.39.11 → 0.40.1
Sign up to get free protection for your applications and to get access to all the features.
- package/daffodil-order.d.ts +1 -0
- package/driver/daffodil-order-driver.d.ts +1 -0
- package/driver/in-memory/backend/order.service.d.ts +3 -0
- package/driver/in-memory/daffodil-order-driver-in-memory.d.ts +1 -0
- package/driver/in-memory/drivers/order-driver.module.d.ts +5 -0
- package/driver/in-memory/drivers/order.service.d.ts +3 -0
- package/driver/in-memory/package.json +5 -6
- package/driver/magento/2.4.0/README.md +5 -0
- package/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.d.ts +1 -0
- package/driver/magento/2.4.0/errors/transform.d.ts +1 -1
- package/driver/magento/2.4.0/order-driver.module.d.ts +5 -0
- package/driver/magento/2.4.0/order.service.d.ts +4 -1
- package/driver/magento/2.4.0/package.json +5 -6
- package/driver/magento/2.4.0/queries/fragments/order-address.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-invoice.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-item.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-payment.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-shipment-item.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-shipment.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order.d.ts +1 -1
- package/driver/magento/2.4.0/queries/get-guest-orders.d.ts +1 -1
- package/driver/magento/2.4.1/README.md +5 -0
- package/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.d.ts +1 -0
- package/driver/magento/2.4.1/errors/transform.d.ts +1 -1
- package/driver/magento/2.4.1/models/responses/order-address.d.ts +1 -1
- package/driver/magento/2.4.1/order-driver.module.d.ts +5 -0
- package/driver/magento/2.4.1/order.service.d.ts +4 -1
- package/driver/magento/2.4.1/package.json +5 -6
- package/driver/magento/2.4.1/queries/fragments/order-address.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-credit-item.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-credit-total.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-credit.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-invoice-item.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-invoice-total.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-invoice.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-item.d.ts +2 -2
- package/driver/magento/2.4.1/queries/fragments/order-payment.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-shipment-item.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-shipment.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-total.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order.d.ts +1 -1
- package/driver/magento/2.4.1/queries/get-guest-orders.d.ts +1 -1
- package/driver/package.json +5 -6
- package/driver/testing/daffodil-order-driver-testing.d.ts +1 -0
- package/driver/testing/drivers/order-driver.module.d.ts +5 -0
- package/driver/testing/drivers/order.service.d.ts +3 -0
- package/driver/testing/package.json +5 -6
- package/{esm2015/daffodil-order.js → esm2020/daffodil-order.mjs} +0 -0
- package/{esm2015/driver/daffodil-order-driver.js → esm2020/driver/daffodil-order-driver.mjs} +0 -0
- package/{esm2015/driver/errors/invalid-api-response.js → esm2020/driver/errors/invalid-api-response.mjs} +0 -0
- package/{esm2015/driver/errors/order-not-found.js → esm2020/driver/errors/order-not-found.mjs} +0 -0
- package/{esm2015/driver/errors/public_api.js → esm2020/driver/errors/public_api.mjs} +0 -0
- package/esm2020/driver/in-memory/backend/order.service.mjs +57 -0
- package/{esm2015/driver/in-memory/daffodil-order-driver-in-memory.js → esm2020/driver/in-memory/daffodil-order-driver-in-memory.mjs} +0 -0
- package/esm2020/driver/in-memory/drivers/order-driver.module.mjs +32 -0
- package/esm2020/driver/in-memory/drivers/order.service.mjs +28 -0
- package/{esm2015/driver/in-memory/drivers/public_api.js → esm2020/driver/in-memory/drivers/public_api.mjs} +0 -0
- package/{esm2015/driver/in-memory/index.js → esm2020/driver/in-memory/index.mjs} +0 -0
- package/{esm2015/driver/in-memory/public_api.js → esm2020/driver/in-memory/public_api.mjs} +0 -0
- package/{esm2015/driver/index.js → esm2020/driver/index.mjs} +0 -0
- package/{esm2015/driver/interfaces/order-service.interface.js → esm2020/driver/interfaces/order-service.interface.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.js → esm2020/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/errors/codes.js → esm2020/driver/magento/2.4.0/errors/codes.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/errors/map.js → esm2020/driver/magento/2.4.0/errors/map.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/errors/transform.js → esm2020/driver/magento/2.4.0/errors/transform.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/index.js → esm2020/driver/magento/2.4.0/index.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/injection-tokens/fragments/order.js → esm2020/driver/magento/2.4.0/injection-tokens/fragments/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/injection-tokens/public_api.js → esm2020/driver/magento/2.4.0/injection-tokens/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-address.js → esm2020/driver/magento/2.4.0/models/responses/order-address.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-invoice.js → esm2020/driver/magento/2.4.0/models/responses/order-invoice.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-item.js → esm2020/driver/magento/2.4.0/models/responses/order-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-payment.js → esm2020/driver/magento/2.4.0/models/responses/order-payment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-shipment-item.js → esm2020/driver/magento/2.4.0/models/responses/order-shipment-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-shipment-tracking.js → esm2020/driver/magento/2.4.0/models/responses/order-shipment-tracking.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-shipment.js → esm2020/driver/magento/2.4.0/models/responses/order-shipment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order.js → esm2020/driver/magento/2.4.0/models/responses/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/public_api.js → esm2020/driver/magento/2.4.0/models/responses/public_api.mjs} +0 -0
- package/esm2020/driver/magento/2.4.0/order-driver.module.mjs +32 -0
- package/esm2020/driver/magento/2.4.0/order.service.mjs +54 -0
- package/{esm2015/driver/magento/2.4.0/public_api.js → esm2020/driver/magento/2.4.0/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-address.js → esm2020/driver/magento/2.4.0/queries/fragments/order-address.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-invoice.js → esm2020/driver/magento/2.4.0/queries/fragments/order-invoice.mjs} +2 -2
- package/esm2020/driver/magento/2.4.0/queries/fragments/order-item.mjs +27 -0
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-payment.js → esm2020/driver/magento/2.4.0/queries/fragments/order-payment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-shipment-item.js → esm2020/driver/magento/2.4.0/queries/fragments/order-shipment-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.js → esm2020/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-shipment.js → esm2020/driver/magento/2.4.0/queries/fragments/order-shipment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order.js → esm2020/driver/magento/2.4.0/queries/fragments/order.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/public_api.js → esm2020/driver/magento/2.4.0/queries/fragments/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/get-guest-orders.js → esm2020/driver/magento/2.4.0/queries/get-guest-orders.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/public_api.js → esm2020/driver/magento/2.4.0/queries/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/responses/get-guest-orders.js → esm2020/driver/magento/2.4.0/queries/responses/get-guest-orders.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/responses/public_api.js → esm2020/driver/magento/2.4.0/queries/responses/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/transforms/responses/order.js → esm2020/driver/magento/2.4.0/transforms/responses/order.mjs} +0 -0
- package/esm2020/driver/magento/2.4.0/validators/get-orders.mjs +17 -0
- package/{esm2015/driver/magento/2.4.0/validators/public_api.js → esm2020/driver/magento/2.4.0/validators/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.js → esm2020/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/errors/codes.js → esm2020/driver/magento/2.4.1/errors/codes.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/errors/map.js → esm2020/driver/magento/2.4.1/errors/map.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/errors/transform.js → esm2020/driver/magento/2.4.1/errors/transform.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/index.js → esm2020/driver/magento/2.4.1/index.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/injection-tokens/fragments/order.js → esm2020/driver/magento/2.4.1/injection-tokens/fragments/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/injection-tokens/public_api.js → esm2020/driver/magento/2.4.1/injection-tokens/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/discount.js → esm2020/driver/magento/2.4.1/models/responses/discount.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-address.js → esm2020/driver/magento/2.4.1/models/responses/order-address.mjs} +1 -1
- package/{esm2015/driver/magento/2.4.1/models/responses/order-credit-item.js → esm2020/driver/magento/2.4.1/models/responses/order-credit-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-credit.js → esm2020/driver/magento/2.4.1/models/responses/order-credit.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-invoice-item.js → esm2020/driver/magento/2.4.1/models/responses/order-invoice-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-invoice.js → esm2020/driver/magento/2.4.1/models/responses/order-invoice.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-item.js → esm2020/driver/magento/2.4.1/models/responses/order-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-payment.js → esm2020/driver/magento/2.4.1/models/responses/order-payment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-shipment-item.js → esm2020/driver/magento/2.4.1/models/responses/order-shipment-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-shipment-tracking.js → esm2020/driver/magento/2.4.1/models/responses/order-shipment-tracking.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-shipment.js → esm2020/driver/magento/2.4.1/models/responses/order-shipment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-total.js → esm2020/driver/magento/2.4.1/models/responses/order-total.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order.js → esm2020/driver/magento/2.4.1/models/responses/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/public_api.js → esm2020/driver/magento/2.4.1/models/responses/public_api.mjs} +0 -0
- package/esm2020/driver/magento/2.4.1/order-driver.module.mjs +32 -0
- package/esm2020/driver/magento/2.4.1/order.service.mjs +54 -0
- package/{esm2015/driver/magento/2.4.1/public_api.js → esm2020/driver/magento/2.4.1/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-address.js → esm2020/driver/magento/2.4.1/queries/fragments/order-address.mjs} +3 -3
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-credit-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-credit-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-credit-total.js → esm2020/driver/magento/2.4.1/queries/fragments/order-credit-total.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-credit.js → esm2020/driver/magento/2.4.1/queries/fragments/order-credit.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-invoice-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-invoice-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-invoice-total.js → esm2020/driver/magento/2.4.1/queries/fragments/order-invoice-total.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-invoice.js → esm2020/driver/magento/2.4.1/queries/fragments/order-invoice.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-payment.js → esm2020/driver/magento/2.4.1/queries/fragments/order-payment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-shipment-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-shipment-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.js → esm2020/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-shipment.js → esm2020/driver/magento/2.4.1/queries/fragments/order-shipment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-total.js → esm2020/driver/magento/2.4.1/queries/fragments/order-total.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order.js → esm2020/driver/magento/2.4.1/queries/fragments/order.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/public_api.js → esm2020/driver/magento/2.4.1/queries/fragments/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/get-guest-orders.js → esm2020/driver/magento/2.4.1/queries/get-guest-orders.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/public_api.js → esm2020/driver/magento/2.4.1/queries/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/responses/get-guest-orders.js → esm2020/driver/magento/2.4.1/queries/responses/get-guest-orders.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/responses/public_api.js → esm2020/driver/magento/2.4.1/queries/responses/public_api.mjs} +0 -0
- package/esm2020/driver/magento/2.4.1/transforms/responses/order.mjs +234 -0
- package/esm2020/driver/magento/2.4.1/validators/get-orders.mjs +17 -0
- package/{esm2015/driver/magento/2.4.1/validators/public_api.js → esm2020/driver/magento/2.4.1/validators/public_api.mjs} +0 -0
- package/{esm2015/driver/testing/daffodil-order-driver-testing.js → esm2020/driver/testing/daffodil-order-driver-testing.mjs} +0 -0
- package/esm2020/driver/testing/drivers/order-driver.module.mjs +32 -0
- package/esm2020/driver/testing/drivers/order.service.mjs +28 -0
- package/{esm2015/driver/testing/drivers/public_api.js → esm2020/driver/testing/drivers/public_api.mjs} +0 -0
- package/{esm2015/driver/testing/index.js → esm2020/driver/testing/index.mjs} +0 -0
- package/{esm2015/driver/testing/public_api.js → esm2020/driver/testing/public_api.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/injection-tokens/error-matcher.token.js → esm2020/injection-tokens/error-matcher.token.mjs} +0 -0
- package/{esm2015/injection-tokens/public_api.js → esm2020/injection-tokens/public_api.mjs} +0 -0
- package/{esm2015/models/composite-order-item.js → esm2020/models/composite-order-item.mjs} +0 -0
- package/{esm2015/models/configurable-order-item.js → esm2020/models/configurable-order-item.mjs} +0 -0
- package/{esm2015/models/order-address.js → esm2020/models/order-address.mjs} +0 -0
- package/{esm2015/models/order-coupon.js → esm2020/models/order-coupon.mjs} +0 -0
- package/{esm2015/models/order-credit.js → esm2020/models/order-credit.mjs} +0 -0
- package/{esm2015/models/order-invoice.js → esm2020/models/order-invoice.mjs} +0 -0
- package/{esm2015/models/order-item.js → esm2020/models/order-item.mjs} +0 -0
- package/{esm2015/models/order-payment.js → esm2020/models/order-payment.mjs} +0 -0
- package/{esm2015/models/order-shipment-item.js → esm2020/models/order-shipment-item.mjs} +0 -0
- package/{esm2015/models/order-shipment-tracking.js → esm2020/models/order-shipment-tracking.mjs} +0 -0
- package/{esm2015/models/order-shipment.js → esm2020/models/order-shipment.mjs} +0 -0
- package/{esm2015/models/order-shipping-method.js → esm2020/models/order-shipping-method.mjs} +0 -0
- package/{esm2015/models/order-total.js → esm2020/models/order-total.mjs} +0 -0
- package/{esm2015/models/order.js → esm2020/models/order.mjs} +0 -0
- package/{esm2015/models/public_api.js → esm2020/models/public_api.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/{esm2015/routing/daffodil-order-routing.js → esm2020/routing/daffodil-order-routing.mjs} +0 -0
- package/{esm2015/routing/guards/placed-order/placed-order-guard-redirect.token.js → esm2020/routing/guards/placed-order/placed-order-guard-redirect.token.mjs} +0 -0
- package/esm2020/routing/guards/placed-order/placed-order.guard.mjs +38 -0
- package/{esm2015/routing/guards/public_api.js → esm2020/routing/guards/public_api.mjs} +0 -0
- package/{esm2015/routing/index.js → esm2020/routing/index.mjs} +0 -0
- package/esm2020/routing/order-routing.module.mjs +19 -0
- package/{esm2015/routing/public_api.js → esm2020/routing/public_api.mjs} +0 -0
- package/{esm2015/state/actions/order.actions.js → esm2020/state/actions/order.actions.mjs} +0 -0
- package/esm2020/state/daffodil-order-state.mjs +5 -0
- package/esm2020/state/effects/order.effects.mjs +36 -0
- package/{esm2015/state/facades/order/order-facade.interface.js → esm2020/state/facades/order/order-facade.interface.mjs} +0 -0
- package/{esm2015/state/facades/order/order.facade.js → esm2020/state/facades/order/order.facade.mjs} +9 -11
- package/{esm2015/state/facades/public_api.js → esm2020/state/facades/public_api.mjs} +0 -0
- package/{esm2015/state/index.js → esm2020/state/index.mjs} +0 -0
- package/esm2020/state/order-state.module.mjs +33 -0
- package/{esm2015/state/public_api.js → esm2020/state/public_api.mjs} +0 -0
- package/{esm2015/state/reducers/order/order-initial-state.js → esm2020/state/reducers/order/order-initial-state.mjs} +0 -0
- package/{esm2015/state/reducers/order/order-reducer.interface.js → esm2020/state/reducers/order/order-reducer.interface.mjs} +0 -0
- package/esm2020/state/reducers/order/order.reducer.mjs +32 -0
- package/{esm2015/state/reducers/order/public_api.js → esm2020/state/reducers/order/public_api.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/order-entities-adapter.js → esm2020/state/reducers/order-entities/order-entities-adapter.mjs} +5 -7
- package/{esm2015/state/reducers/order-entities/order-entities-initial-state.js → esm2020/state/reducers/order-entities/order-entities-initial-state.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/order-entities-state.interface.js → esm2020/state/reducers/order-entities/order-entities-state.interface.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/order-entities.reducer.js → esm2020/state/reducers/order-entities/order-entities.reducer.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/public_api.js → esm2020/state/reducers/order-entities/public_api.mjs} +0 -0
- package/{esm2015/state/reducers/order-reducers.interface.js → esm2020/state/reducers/order-reducers.interface.mjs} +0 -0
- package/{esm2015/state/reducers/order-reducers.js → esm2020/state/reducers/order-reducers.mjs} +0 -0
- package/{esm2015/state/reducers/order-store-feature-key.js → esm2020/state/reducers/order-store-feature-key.mjs} +0 -0
- package/{esm2015/state/reducers/public_api.js → esm2020/state/reducers/public_api.mjs} +0 -0
- package/esm2020/state/selectors/order-all.selector.mjs +12 -0
- package/esm2020/state/selectors/order-entities.selector.mjs +76 -0
- package/esm2020/state/selectors/order-feature.selector.mjs +9 -0
- package/esm2020/state/selectors/order.selector.mjs +18 -0
- package/{esm2015/state/selectors/public_api.js → esm2020/state/selectors/public_api.mjs} +0 -0
- package/{esm2015/state/testing/daffodil-order-state-testing.js → esm2020/state/testing/daffodil-order-state-testing.mjs} +0 -0
- package/{esm2015/state/testing/index.js → esm2020/state/testing/index.mjs} +0 -0
- package/esm2020/state/testing/mock-order-facade.mjs +81 -0
- package/esm2020/state/testing/order-testing.module.mjs +20 -0
- package/{esm2015/state/testing/public_api.js → esm2020/state/testing/public_api.mjs} +0 -0
- package/{esm2015/testing/daffodil-order-testing.js → esm2020/testing/daffodil-order-testing.mjs} +0 -0
- package/esm2020/testing/factories/composite-order-item.factory.mjs +36 -0
- package/esm2020/testing/factories/configurable-order-item.factory.mjs +35 -0
- package/esm2020/testing/factories/order-address.factory.mjs +25 -0
- package/esm2020/testing/factories/order-coupon.factory.mjs +24 -0
- package/esm2020/testing/factories/order-invoice.factory.mjs +28 -0
- package/{esm2015/testing/factories/order-item.factory.js → esm2020/testing/factories/order-item.factory.mjs} +9 -9
- package/{esm2015/testing/factories/order-payment.factory.js → esm2020/testing/factories/order-payment.factory.mjs} +9 -9
- package/esm2020/testing/factories/order-shipment-item.factory.mjs +25 -0
- package/esm2020/testing/factories/order-shipment-tracking.factory.mjs +28 -0
- package/esm2020/testing/factories/order-shipment.factory.mjs +30 -0
- package/{esm2015/testing/factories/order-shipping-rate.factory.js → esm2020/testing/factories/order-shipping-rate.factory.mjs} +9 -9
- package/esm2020/testing/factories/order-total.factory.mjs +28 -0
- package/{esm2015/testing/factories/order.factory.js → esm2020/testing/factories/order.factory.mjs} +9 -9
- package/{esm2015/testing/factories/public_api.js → esm2020/testing/factories/public_api.mjs} +0 -0
- package/{esm2015/testing/helpers/order-helper.js → esm2020/testing/helpers/order-helper.mjs} +0 -0
- package/{esm2015/testing/helpers/public_api.js → esm2020/testing/helpers/public_api.mjs} +0 -0
- package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
- package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
- package/fesm2015/daffodil-order-driver-in-memory.mjs +117 -0
- package/fesm2015/daffodil-order-driver-in-memory.mjs.map +1 -0
- package/fesm2015/{daffodil-order-driver-magento-2.4.0.js → daffodil-order-driver-magento-2.4.0.mjs} +31 -21
- package/fesm2015/daffodil-order-driver-magento-2.4.0.mjs.map +1 -0
- package/fesm2015/{daffodil-order-driver-magento-2.4.1.js → daffodil-order-driver-magento-2.4.1.mjs} +33 -23
- package/fesm2015/daffodil-order-driver-magento-2.4.1.mjs.map +1 -0
- package/fesm2015/daffodil-order-driver-testing.mjs +63 -0
- package/fesm2015/daffodil-order-driver-testing.mjs.map +1 -0
- package/fesm2015/{daffodil-order-driver.js → daffodil-order-driver.mjs} +1 -1
- package/fesm2015/daffodil-order-driver.mjs.map +1 -0
- package/fesm2015/daffodil-order-routing.mjs +62 -0
- package/fesm2015/daffodil-order-routing.mjs.map +1 -0
- package/fesm2015/{daffodil-order-state-testing.js → daffodil-order-state-testing.mjs} +22 -13
- package/fesm2015/daffodil-order-state-testing.mjs.map +1 -0
- package/fesm2015/{daffodil-order-state.js → daffodil-order-state.mjs} +64 -73
- package/fesm2015/daffodil-order-state.mjs.map +1 -0
- package/fesm2015/daffodil-order-testing.mjs +387 -0
- package/fesm2015/daffodil-order-testing.mjs.map +1 -0
- package/fesm2015/{daffodil-order.js → daffodil-order.mjs} +1 -1
- package/fesm2015/daffodil-order.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-in-memory.mjs +117 -0
- package/fesm2020/daffodil-order-driver-in-memory.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.0.mjs +459 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.0.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.1.mjs +646 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.1.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-testing.mjs +63 -0
- package/fesm2020/daffodil-order-driver-testing.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver.mjs +27 -0
- package/fesm2020/daffodil-order-driver.mjs.map +1 -0
- package/fesm2020/daffodil-order-routing.mjs +60 -0
- package/fesm2020/daffodil-order-routing.mjs.map +1 -0
- package/fesm2020/daffodil-order-state-testing.mjs +105 -0
- package/fesm2020/daffodil-order-state-testing.mjs.map +1 -0
- package/fesm2020/daffodil-order-state.mjs +400 -0
- package/fesm2020/daffodil-order-state.mjs.map +1 -0
- package/fesm2020/daffodil-order-testing.mjs +387 -0
- package/fesm2020/daffodil-order-testing.mjs.map +1 -0
- package/fesm2020/daffodil-order.mjs +31 -0
- package/fesm2020/daffodil-order.mjs.map +1 -0
- package/package.json +98 -14
- package/routing/daffodil-order-routing.d.ts +1 -0
- package/routing/guards/placed-order/placed-order.guard.d.ts +3 -0
- package/routing/order-routing.module.d.ts +4 -0
- package/routing/package.json +5 -6
- package/state/daffodil-order-state.d.ts +1 -1
- package/state/effects/order.effects.d.ts +5 -2
- package/state/facades/order/order.facade.d.ts +3 -0
- package/state/order-state.module.d.ts +7 -0
- package/state/package.json +5 -6
- package/state/testing/daffodil-order-state-testing.d.ts +1 -0
- package/state/testing/mock-order-facade.d.ts +3 -0
- package/state/testing/order-testing.module.d.ts +4 -0
- package/state/testing/package.json +5 -6
- package/testing/daffodil-order-testing.d.ts +1 -0
- package/testing/factories/composite-order-item.factory.d.ts +3 -0
- package/testing/factories/configurable-order-item.factory.d.ts +3 -0
- package/testing/factories/order-address.factory.d.ts +3 -0
- package/testing/factories/order-coupon.factory.d.ts +3 -0
- package/testing/factories/order-invoice.factory.d.ts +3 -0
- package/testing/factories/order-item.factory.d.ts +3 -0
- package/testing/factories/order-payment.factory.d.ts +3 -0
- package/testing/factories/order-shipment-item.factory.d.ts +3 -0
- package/testing/factories/order-shipment-tracking.factory.d.ts +3 -0
- package/testing/factories/order-shipment.factory.d.ts +3 -0
- package/testing/factories/order-shipping-rate.factory.d.ts +3 -0
- package/testing/factories/order-total.factory.d.ts +3 -0
- package/testing/factories/order.factory.d.ts +3 -0
- package/testing/package.json +5 -6
- package/bundles/daffodil-order-driver-in-memory.umd.js +0 -125
- package/bundles/daffodil-order-driver-in-memory.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-in-memory.umd.min.js +0 -2
- package/bundles/daffodil-order-driver-in-memory.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.js +0 -657
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.min.js +0 -16
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.js +0 -737
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.min.js +0 -2
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver-testing.umd.js +0 -67
- package/bundles/daffodil-order-driver-testing.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-testing.umd.min.js +0 -2
- package/bundles/daffodil-order-driver-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver.umd.js +0 -360
- package/bundles/daffodil-order-driver.umd.js.map +0 -1
- package/bundles/daffodil-order-driver.umd.min.js +0 -16
- package/bundles/daffodil-order-driver.umd.min.js.map +0 -1
- package/bundles/daffodil-order-routing.umd.js +0 -66
- package/bundles/daffodil-order-routing.umd.js.map +0 -1
- package/bundles/daffodil-order-routing.umd.min.js +0 -2
- package/bundles/daffodil-order-routing.umd.min.js.map +0 -1
- package/bundles/daffodil-order-state-testing.umd.js +0 -107
- package/bundles/daffodil-order-state-testing.umd.js.map +0 -1
- package/bundles/daffodil-order-state-testing.umd.min.js +0 -2
- package/bundles/daffodil-order-state-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-order-state.umd.js +0 -748
- package/bundles/daffodil-order-state.umd.js.map +0 -1
- package/bundles/daffodil-order-state.umd.min.js +0 -16
- package/bundles/daffodil-order-state.umd.min.js.map +0 -1
- package/bundles/daffodil-order-testing.umd.js +0 -766
- package/bundles/daffodil-order-testing.umd.js.map +0 -1
- package/bundles/daffodil-order-testing.umd.min.js +0 -16
- package/bundles/daffodil-order-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-order.umd.js +0 -36
- package/bundles/daffodil-order.umd.js.map +0 -1
- package/bundles/daffodil-order.umd.min.js +0 -2
- package/bundles/daffodil-order.umd.min.js.map +0 -1
- package/daffodil-order.metadata.json +0 -1
- package/driver/daffodil-order-driver.metadata.json +0 -1
- package/driver/in-memory/daffodil-order-driver-in-memory.metadata.json +0 -1
- package/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.metadata.json +0 -1
- package/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.metadata.json +0 -1
- package/driver/testing/daffodil-order-driver-testing.metadata.json +0 -1
- package/esm2015/driver/in-memory/backend/order.service.js +0 -59
- package/esm2015/driver/in-memory/drivers/order-driver.module.js +0 -25
- package/esm2015/driver/in-memory/drivers/order.service.js +0 -30
- package/esm2015/driver/magento/2.4.0/order-driver.module.js +0 -25
- package/esm2015/driver/magento/2.4.0/order.service.js +0 -55
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-item.js +0 -27
- package/esm2015/driver/magento/2.4.0/validators/get-orders.js +0 -18
- package/esm2015/driver/magento/2.4.1/order-driver.module.js +0 -25
- package/esm2015/driver/magento/2.4.1/order.service.js +0 -55
- package/esm2015/driver/magento/2.4.1/transforms/responses/order.js +0 -207
- package/esm2015/driver/magento/2.4.1/validators/get-orders.js +0 -18
- package/esm2015/driver/testing/drivers/order-driver.module.js +0 -25
- package/esm2015/driver/testing/drivers/order.service.js +0 -30
- package/esm2015/routing/guards/placed-order/placed-order.guard.js +0 -40
- package/esm2015/routing/order-routing.module.js +0 -12
- package/esm2015/state/daffodil-order-state.js +0 -6
- package/esm2015/state/effects/order.effects.js +0 -49
- package/esm2015/state/order-state.module.js +0 -20
- package/esm2015/state/reducers/order/order.reducer.js +0 -21
- package/esm2015/state/selectors/order-all.selector.js +0 -10
- package/esm2015/state/selectors/order-entities.selector.js +0 -79
- package/esm2015/state/selectors/order-feature.selector.js +0 -11
- package/esm2015/state/selectors/order.selector.js +0 -21
- package/esm2015/state/testing/mock-order-facade.js +0 -79
- package/esm2015/state/testing/order-testing.module.js +0 -13
- package/esm2015/testing/factories/composite-order-item.factory.js +0 -36
- package/esm2015/testing/factories/configurable-order-item.factory.js +0 -35
- package/esm2015/testing/factories/order-address.factory.js +0 -25
- package/esm2015/testing/factories/order-coupon.factory.js +0 -24
- package/esm2015/testing/factories/order-invoice.factory.js +0 -28
- package/esm2015/testing/factories/order-shipment-item.factory.js +0 -25
- package/esm2015/testing/factories/order-shipment-tracking.factory.js +0 -28
- package/esm2015/testing/factories/order-shipment.factory.js +0 -30
- package/esm2015/testing/factories/order-total.factory.js +0 -28
- package/fesm2015/daffodil-order-driver-in-memory.js +0 -114
- package/fesm2015/daffodil-order-driver-in-memory.js.map +0 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.0.js.map +0 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.1.js.map +0 -1
- package/fesm2015/daffodil-order-driver-testing.js +0 -58
- package/fesm2015/daffodil-order-driver-testing.js.map +0 -1
- package/fesm2015/daffodil-order-driver.js.map +0 -1
- package/fesm2015/daffodil-order-routing.js +0 -54
- package/fesm2015/daffodil-order-routing.js.map +0 -1
- package/fesm2015/daffodil-order-state-testing.js.map +0 -1
- package/fesm2015/daffodil-order-state.js.map +0 -1
- package/fesm2015/daffodil-order-testing.js +0 -386
- package/fesm2015/daffodil-order-testing.js.map +0 -1
- package/fesm2015/daffodil-order.js.map +0 -1
- package/routing/daffodil-order-routing.metadata.json +0 -1
- package/state/daffodil-order-state.metadata.json +0 -1
- package/state/testing/daffodil-order-state-testing.metadata.json +0 -1
- package/testing/daffodil-order-testing.metadata.json +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"daffodil-order-state.umd.js","sources":["../../../libs/order/state/src/actions/order.actions.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-adapter.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-initial-state.ts","../../../libs/order/state/src/reducers/order-entities/order-entities.reducer.ts","../../../node_modules/tslib/tslib.es6.js","../../../libs/order/state/src/reducers/order/order-initial-state.ts","../../../libs/order/state/src/reducers/order/order.reducer.ts","../../../libs/order/state/src/reducers/order-reducers.ts","../../../libs/order/state/src/reducers/order-store-feature-key.ts","../../../libs/order/state/src/selectors/order-feature.selector.ts","../../../libs/order/state/src/selectors/order-entities.selector.ts","../../../libs/order/state/src/selectors/order.selector.ts","../../../libs/order/state/src/selectors/order-all.selector.ts","../../../libs/order/state/src/facades/order/order.facade.ts","../../../libs/order/state/src/effects/order.effects.ts","../../../libs/order/state/src/order-state.module.ts","../../../libs/order/state/src/daffodil-order-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nexport enum DaffOrderActionTypes {\n OrderLoadAction = '[Order] Order Load Action',\n OrderLoadSuccessAction = '[Order] Order Load Success Action',\n OrderLoadFailureAction = '[Order] Order Load Failure Action',\n OrderListAction = '[Order] Order List Action',\n OrderListSuccessAction = '[Order] Order List Success Action',\n OrderListFailureAction = '[Order] Order List Failure Action'\n}\n\n/**\n * Triggers the loading of the specified order.\n *\n * @param orderId The order ID.\n * @param cartId The optional guest cart ID.\n */\nexport class DaffOrderLoad<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadAction;\n\n constructor(public orderId: T['id'], public cartId?: V['id']) {}\n}\n\nexport class DaffOrderLoadSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\nexport class DaffOrderLoadFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * Triggers the loading of the orders for either the currently logged-in user or the specified guest cart.\n *\n * @param payload The guest cart ID.\n */\nexport class DaffOrderList<T extends DaffCart = DaffCart> implements Action {\n readonly type = DaffOrderActionTypes.OrderListAction;\n\n constructor(public payload?: T['id']) {}\n}\n\nexport class DaffOrderListSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderListSuccessAction;\n\n constructor(public payload: T[]) {}\n}\n\nexport class DaffOrderListFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderListFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport type DaffOrderActions<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> =\n | DaffOrderLoad<T, V>\n | DaffOrderLoadSuccess<T>\n | DaffOrderLoadFailure\n | DaffOrderList\n | DaffOrderListSuccess<T>\n | DaffOrderListFailure;\n","import {\n EntityAdapter,\n createEntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffOrder } from '@daffodil/order';\n\n/**\n * Order Adapter for changing/overwriting entity state.\n */\nexport const daffGetOrderAdapter = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): EntityAdapter<T> =>\n cache = cache || createEntityAdapter<T>();\n})();\n","import { daffGetOrderAdapter } from './order-entities-adapter';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Initial state for order entity state.\n */\nexport const daffOrderEntitiesInitialState: DaffOrderEntityState<any> = daffGetOrderAdapter().getInitialState();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffGetOrderAdapter } from './order-entities-adapter';\nimport { daffOrderEntitiesInitialState } from './order-entities-initial-state';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Reducer function that catches actions and changes/overwrites order entities state.\n */\nexport function daffOrderEntitiesReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderEntitiesInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderEntityState<T> {\n const adapter = daffGetOrderAdapter<T>();\n\n switch (action.type) {\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return adapter.upsertOne(action.payload, state);\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n return adapter.upsertMany(action.payload, state);\n\n default:\n return state;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { DaffOrderReducerState } from './order-reducer.interface';\n\nexport const daffOrderInitialState: DaffOrderReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffOrderInitialState } from './order-initial-state';\nimport { DaffOrderReducerState } from './order-reducer.interface';\n\nexport function daffOrderReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderReducerState {\n switch (action.type) {\n case DaffOrderActionTypes.OrderListAction:\n case DaffOrderActionTypes.OrderLoadAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffOrderActionTypes.OrderListFailureAction:\n case DaffOrderActionTypes.OrderLoadFailureAction:\n return {\n ...state,\n errors: [\n ...state.errors,\n action.payload,\n ],\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffOrderEntitiesReducer } from './order-entities/public_api';\nimport { DaffOrderReducersState } from './order-reducers.interface';\nimport { daffOrderReducer } from './order/order.reducer';\n\nexport const daffOrderReducers: ActionReducerMap<DaffOrderReducersState> = {\n order: daffOrderReducer,\n orders: daffOrderEntitiesReducer,\n};\n","export const DAFF_ORDER_STORE_FEATURE_KEY = 'daffOrder';\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducersState,\n DAFF_ORDER_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\nexport interface DaffOrderFeatureSelector<T extends DaffOrder = DaffOrder> {\n selectOrderFeatureState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderReducersState<T>>;\n}\n\nexport const getDaffOrderReducersStateSelector = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderFeatureSelector<T> =>\n cache = cache || {\n selectOrderFeatureState: createFeatureSelector<DaffOrderReducersState<T>>(DAFF_ORDER_STORE_FEATURE_KEY),\n };\n})();\n","import { Dictionary } from '@ngrx/entity';\nimport {\n createSelector,\n defaultMemoize,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n getDaffCartSelectors,\n DaffCartStateRootSlice,\n} from '@daffodil/cart/state';\nimport {\n DaffOrder,\n DaffOrderItem,\n DaffOrderTotal,\n DaffOrderTotalTypeEnum,\n} from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n daffGetOrderAdapter,\n DaffOrderEntityState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderEntitySelectors<T extends DaffOrder = DaffOrder> {\n selectOrderEntitiesState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderEntityState<T>>;\n /**\n * Selector for order IDs.\n */\n selectOrderIds: MemoizedSelector<DaffOrderStateRootSlice<T>, T['id'][]>;\n /**\n * Selector for order entities.\n */\n selectOrderEntities: MemoizedSelector<DaffOrderStateRootSlice<T>, Dictionary<T>>;\n /**\n * Selector for all orders.\n */\n selectAllOrders: MemoizedSelector<DaffOrderStateRootSlice<T>, T[]>;\n /**\n * Selector for total number of orders.\n */\n selectOrderTotal: MemoizedSelector<DaffOrderStateRootSlice<T>, number>;\n selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n\n /**\n * Selector for the most recently placed order (if any).\n */\n selectPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n /**\n * Selector for the existence of the most recently placed order.\n */\n selectHasPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n\n /**\n * Selects the specified order's totals.\n */\n selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']>;\n /**\n * Selects the specified order's applied coupon codes.\n */\n selectOrderAppliedCodes: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['applied_codes']>;\n /**\n * Selects the specified order's items.\n */\n selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']>;\n /**\n * Selects the specified order's billing addresses.\n */\n selectOrderBillingAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['billing_addresses']>;\n /**\n * Selects the specified order's shipping addresses.\n */\n selectOrderShippingTotalAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipping_addresses']>;\n /**\n * Selects the specified order's shipments.\n */\n selectOrderShipments: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipments']>;\n /**\n * Selects the specified order's payment.\n */\n selectOrderPayment: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['payment']>;\n /**\n * Selects the specified order's invoices.\n */\n selectOrderInvoices: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['invoices']>;\n /**\n * Selects the specified order's credits.\n */\n selectOrderCredits: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['credits']>;\n\n /**\n * Selects the specified order's specified item.\n */\n selectOrderItem: (orderId: T['id'], itemId: T['items'][0]['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderItem>;\n\n /**\n * Selects the specified order's grand total.\n */\n selectOrderGrandTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's subtotal.\n */\n selectOrderSubtotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's shipping total.\n */\n selectOrderShippingTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's discount total.\n */\n\tselectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n\t/**\n\t * Selects whether the specified order has a discount.\n\t */\n\tselectOrderHasDiscount: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n /**\n * Selects the specified order's tax total.\n */\n selectOrderTaxTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n}\n\nconst createOrderEntitySelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderEntitiesState = createSelector(\n selectOrderFeatureState,\n state => state.orders,\n );\n const { selectIds, selectEntities, selectAll, selectTotal } = daffGetOrderAdapter<T>().getSelectors(selectOrderEntitiesState);\n const { selectCartOrderId } = getDaffCartSelectors();\n\n const selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectEntities,\n (orders: Dictionary<T>) => orders[orderId] || null,\n )).memoized;\n\n const selectPlacedOrder = createSelector(\n selectEntities,\n selectCartOrderId,\n (orders, orderId) => orderId ? selectOrder(orderId).projector(orders) : null,\n );\n\n const selectHasPlacedOrder = createSelector(\n selectPlacedOrder,\n placedOrder => !!placedOrder,\n );\n\n const selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.totals) || [],\n )).memoized;\n\n const selectOrderAppliedCodes = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.applied_codes) || [],\n )).memoized;\n\n const selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.items) || [],\n )).memoized;\n\n const selectOrderBillingAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.billing_addresses) || [],\n )).memoized;\n\n const selectOrderShippingTotalAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipping_addresses) || [],\n )).memoized;\n\n const selectOrderShipments = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipments) || [],\n )).memoized;\n\n const selectOrderPayment = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.payment) || null,\n )).memoized;\n\n const selectOrderInvoices = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.invoices) || [],\n )).memoized;\n\n const selectOrderCredits = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.credits) || [],\n )).memoized;\n\n const selectOrderGrandTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.GrandTotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderSubtotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Subtotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderShippingTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Shipping);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Discount);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderHasDiscount = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderDiscountTotal(orderId),\n discountTotal => discountTotal?.value > 0,\n )).memoized;\n\n const selectOrderTaxTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Tax);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderItem = defaultMemoize((orderId: T['id'], itemId: T['items'][0]['id']) => createSelector(\n selectOrderItems(orderId),\n items => items.find(item => item.id === itemId) || null,\n )).memoized;\n\n return {\n selectOrderEntitiesState,\n selectOrderIds: selectIds,\n selectOrderEntities: selectEntities,\n selectAllOrders: selectAll,\n selectOrderTotal: selectTotal,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n selectOrderItem,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n };\n};\n\nexport const getDaffOrderEntitySelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderEntitySelectors<T> =>\n cache = cache || createOrderEntitySelectors<T>();\n})();\n\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducerState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderSelectors {\n selectOrderState: MemoizedSelector<DaffOrderStateRootSlice, DaffOrderReducerState>;\n selectOrderLoading: MemoizedSelector<DaffOrderStateRootSlice, boolean>;\n selectOrderErrors: MemoizedSelector<DaffOrderStateRootSlice, DaffStateError[]>;\n}\n\nconst createOrderSelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderState = createSelector(\n selectOrderFeatureState,\n state => state.order,\n );\n\n const selectOrderLoading = createSelector(\n selectOrderState,\n state => state.loading,\n );\n\n const selectOrderErrors = createSelector(\n selectOrderState,\n state => state.errors,\n );\n\n return {\n selectOrderState,\n selectOrderLoading,\n selectOrderErrors,\n };\n};\n\nexport const getOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderSelectors =>\n cache = cache || createOrderSelectors<T>();\n})();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderEntitySelectors,\n getDaffOrderEntitySelectors,\n} from './order-entities.selector';\nimport {\n DaffOrderFeatureSelector,\n getDaffOrderReducersStateSelector,\n} from './order-feature.selector';\nimport {\n DaffOrderSelectors,\n getOrderSelectors,\n} from './order.selector';\n\nexport interface DaffOrderAllSelectors<T extends DaffOrder = DaffOrder> extends\n DaffOrderEntitySelectors<T>,\n DaffOrderSelectors,\n DaffOrderFeatureSelector<T> {}\n\nexport const getDaffOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderAllSelectors<T> =>\n cache = cache || {\n ...getOrderSelectors<T>(),\n ...getDaffOrderEntitySelectors<T>(),\n ...getDaffOrderReducersStateSelector<T>(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DaffOrderTotal,\n} from '@daffodil/order';\n\nimport { DaffOrderStateRootSlice } from '../../reducers/public_api';\nimport { DaffOrderEntitySelectors } from '../../selectors/order-entities.selector';\nimport { getDaffOrderSelectors } from '../../selectors/public_api';\nimport { DaffOrderFacadeInterface } from './order-facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderFacade<T extends DaffOrder = DaffOrder> implements DaffOrderFacadeInterface<T> {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n orders$: Observable<T[]>;\n orderIds$: Observable<T['id'][]>;\n orderCount$: Observable<number>;\n orderEntities$: Observable<Dictionary<T>>;\n\n placedOrder$: Observable<T>;\n hasPlacedOrder$: Observable<boolean>;\n\n _order: DaffOrderEntitySelectors<T>['selectOrder'];\n _totals: DaffOrderEntitySelectors<T>['selectOrderTotals'];\n _appliedCodes: DaffOrderEntitySelectors<T>['selectOrderAppliedCodes'];\n _items: DaffOrderEntitySelectors<T>['selectOrderItems'];\n _billingAddresses: DaffOrderEntitySelectors<T>['selectOrderBillingAddresses'];\n _shippingAddresses: DaffOrderEntitySelectors<T>['selectOrderShippingTotalAddresses'];\n _shipments: DaffOrderEntitySelectors<T>['selectOrderShipments'];\n _payment: DaffOrderEntitySelectors<T>['selectOrderPayment'];\n _invoices: DaffOrderEntitySelectors<T>['selectOrderInvoices'];\n _credits: DaffOrderEntitySelectors<T>['selectOrderCredits'];\n _grandTotal: DaffOrderEntitySelectors<T>['selectOrderGrandTotal'];\n _subtotal: DaffOrderEntitySelectors<T>['selectOrderSubtotal'];\n _shipping: DaffOrderEntitySelectors<T>['selectOrderShippingTotal'];\n _discount: DaffOrderEntitySelectors<T>['selectOrderDiscountTotal'];\n _hasDiscount: DaffOrderEntitySelectors<T>['selectOrderHasDiscount'];\n _tax: DaffOrderEntitySelectors<T>['selectOrderTaxTotal'];\n\n constructor(private store: Store<DaffOrderStateRootSlice<T>>) {\n const {\n selectOrderIds,\n selectOrderEntities,\n selectAllOrders,\n selectOrderTotal,\n selectOrderLoading,\n selectOrderErrors,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n } = getDaffOrderSelectors<T>();\n\n this.loading$ = this.store.pipe(select(selectOrderLoading));\n this.errors$ = this.store.pipe(select(selectOrderErrors));\n\n this.orders$ = this.store.pipe(select(selectAllOrders));\n this.orderIds$ = this.store.pipe(select(selectOrderIds));\n this.orderCount$ = this.store.pipe(select(selectOrderTotal));\n this.orderEntities$ = this.store.pipe(select(selectOrderEntities));\n\n this.placedOrder$ = this.store.pipe(select(selectPlacedOrder));\n this.hasPlacedOrder$ = this.store.pipe(select(selectHasPlacedOrder));\n\n this._order = selectOrder;\n this._totals = selectOrderTotals;\n this._appliedCodes = selectOrderAppliedCodes;\n this._items = selectOrderItems;\n this._billingAddresses = selectOrderBillingAddresses;\n this._shippingAddresses = selectOrderShippingTotalAddresses;\n this._shipments = selectOrderShipments;\n this._payment = selectOrderPayment;\n this._invoices = selectOrderInvoices;\n this._credits = selectOrderCredits;\n this._grandTotal = selectOrderGrandTotal;\n this._subtotal = selectOrderSubtotal;\n this._shipping = selectOrderShippingTotal;\n this._discount = selectOrderDiscountTotal;\n this._hasDiscount = selectOrderHasDiscount;\n this._tax = selectOrderTaxTotal;\n }\n\n getOrder$(orderId: T['id']): Observable<T> {\n return this.store.pipe(select(this._order(orderId)));\n }\n\n getTotals$(orderId: T['id']): Observable<T['totals']> {\n return this.store.pipe(select(this._totals(orderId)));\n }\n\n getAppliedCodes$(orderId: T['id']): Observable<T['applied_codes']> {\n return this.store.pipe(select(this._appliedCodes(orderId)));\n }\n\n getItems$(orderId: T['id']): Observable<T['items']> {\n return this.store.pipe(select(this._items(orderId)));\n }\n\n getBillingAddresses$(orderId: T['id']): Observable<T['billing_addresses']> {\n return this.store.pipe(select(this._billingAddresses(orderId)));\n }\n\n getShippingAddresses$(orderId: T['id']): Observable<T['shipping_addresses']> {\n return this.store.pipe(select(this._shippingAddresses(orderId)));\n }\n\n getShipments$(orderId: T['id']): Observable<T['shipments']> {\n return this.store.pipe(select(this._shipments(orderId)));\n }\n\n getPayment$(orderId: T['id']): Observable<T['payment']> {\n return this.store.pipe(select(this._payment(orderId)));\n }\n\n getInvoices$(orderId: T['id']): Observable<T['invoices']> {\n return this.store.pipe(select(this._invoices(orderId)));\n }\n\n getCredits$(orderId: T['id']): Observable<T['credits']> {\n return this.store.pipe(select(this._credits(orderId)));\n }\n\n getGrandTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._grandTotal(orderId)));\n };\n getSubtotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._subtotal(orderId)));\n };\n getShippingTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._shipping(orderId)));\n };\n getDiscountTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._discount(orderId)));\n };\n hasDiscount$(orderId: T['id']): Observable<boolean> {\n return this.store.pipe(select(this._hasDiscount(orderId)));\n };\n getTaxTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._tax(orderId)));\n };\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n Effect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DAFF_ORDER_ERROR_MATCHER,\n} from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderDriver,\n} from '@daffodil/order/driver';\n\nimport {\n DaffOrderActionTypes,\n DaffOrderLoad,\n DaffOrderLoadSuccess,\n DaffOrderLoadFailure,\n DaffOrderList,\n DaffOrderListSuccess,\n DaffOrderListFailure,\n} from '../actions/order.actions';\n\n@Injectable()\nexport class DaffOrderEffects<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffOrderDriver) private driver: DaffOrderServiceInterface<T>,\n\t\t@Inject(DAFF_ORDER_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n /**\n * An effect for the loading of an order.\n */\n @Effect()\n get$ = this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderLoadAction),\n switchMap((action: DaffOrderLoad<T, V>) =>\n this.driver.get(action.orderId, action.cartId).pipe(\n map(resp => new DaffOrderLoadSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderLoadFailure(this.errorMatcher(error)))),\n ),\n ),\n );\n\n /**\n * An effect for the listing of orders.\n */\n @Effect()\n list$ = this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderListAction),\n switchMap((action: DaffOrderList) =>\n this.driver.list(action.payload).pipe(\n map(resp => new DaffOrderListSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderListFailure(this.errorMatcher(error)))),\n ),\n ),\n );\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffCartStateModule } from '@daffodil/cart/state';\n\nimport { DaffOrderEffects } from './effects/order.effects';\nimport {\n DAFF_ORDER_STORE_FEATURE_KEY,\n daffOrderReducers,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n DaffCartStateModule,\n EffectsModule.forFeature([\n DaffOrderEffects,\n ]),\n StoreModule.forFeature(DAFF_ORDER_STORE_FEATURE_KEY, daffOrderReducers),\n ],\n})\nexport class DaffOrderStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {DaffOrderEffects as ɵa} from './effects/order.effects';"],"names":["DaffOrderActionTypes","createEntityAdapter","createFeatureSelector","createSelector","getDaffCartSelectors","defaultMemoize","DaffOrderTotalTypeEnum","select","Injectable","Store","ofType","switchMap","map","catchError","of","Actions","Inject","DaffOrderDriver","DAFF_ORDER_ERROR_MATCHER","__decorate","Effect","NgModule","DaffCartStateModule","EffectsModule","StoreModule"],"mappings":";;;;;;IAMA,WAAY,oBAAoB;QAC9B,qEAA6C,CAAA;QAC7C,oFAA4D,CAAA;QAC5D,oFAA4D,CAAA;QAC5D,qEAA6C,CAAA;QAC7C,oFAA4D,CAAA;QAC5D,oFAA4D,CAAA;IAC9D,CAAC,EAPWA,4BAAoB,KAApBA,4BAAoB,QAO/B;IAED;;;;;;;QAYE,uBAAmB,OAAgB,EAAS,MAAgB;YAAzC,YAAO,GAAP,OAAO,CAAS;YAAS,WAAM,GAAN,MAAM,CAAU;YAFnD,SAAI,GAAGA,4BAAoB,CAAC,eAAe,CAAC;SAEW;4BACjE;KAAA,IAAA;;QAKC,8BAAmB,OAAU;YAAV,YAAO,GAAP,OAAO,CAAG;YAFpB,SAAI,GAAGA,4BAAoB,CAAC,sBAAsB,CAAC;SAE3B;mCAClC;KAAA,IAAA;;QAKC,8BAAmB,OAAuB;YAAvB,YAAO,GAAP,OAAO,CAAgB;YAFjC,SAAI,GAAGA,4BAAoB,CAAC,sBAAsB,CAAC;SAEd;mCAC/C;KAAA,IAAA;IAED;;;;;;QAQE,uBAAmB,OAAiB;YAAjB,YAAO,GAAP,OAAO,CAAU;YAF3B,SAAI,GAAGA,4BAAoB,CAAC,eAAe,CAAC;SAEb;4BACzC;KAAA,IAAA;;QAKC,8BAAmB,OAAY;YAAZ,YAAO,GAAP,OAAO,CAAK;YAFtB,SAAI,GAAGA,4BAAoB,CAAC,sBAAsB,CAAC;SAEzB;mCACpC;KAAA,IAAA;;QAKC,8BAAmB,OAAuB;YAAvB,YAAO,GAAP,OAAO,CAAgB;YAFjC,SAAI,GAAGA,4BAAoB,CAAC,sBAAsB,CAAC;SAEd;mCAC/C;KAAA;;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,IAC9B,OAAA,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CACnCC,aAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,oBAAoB,CAAI,IAAI,CAAC,GAAA,CAAC,EAC9CC,oBAAU,CAAC,UAAC,KAAgB,IAAK,OAAAC,OAAE,CAAC,IAAI,oBAAoB,CAAC,KAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,GAAA,CAAC,CACzF,GAAA,CACF,CACF,CAAC;SA5BE;;;;gBATLN,aAAU;;;;gBAjCTO,eAAO;gDAwCJC,SAAM,SAACC,sBAAe;gDACxBD,SAAM,SAACE,8BAAwB;;AAOhCC;QADCC,cAAM,EAAE;;kDASP;AAMFD;QADCC,cAAM,EAAE;;mDASP;;;QCtDJ;;;;;gBATCC,WAAQ,SAAC;oBACR,OAAO,EAAE;wBACPC,yBAAmB;wBACnBC,qBAAa,CAAC,UAAU,CAAC;4BACvB,gBAAgB;yBACjB,CAAC;wBACFC,cAAW,CAAC,UAAU,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;qBACxE;iBACF;;;ICpBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ngrx/entity"),require("@ngrx/store"),require("@daffodil/cart/state"),require("@daffodil/order"),require("@angular/core"),require("@ngrx/effects"),require("rxjs"),require("rxjs/operators"),require("@daffodil/order/driver")):"function"==typeof define&&define.amd?define("@daffodil/order/state",["exports","@ngrx/entity","@ngrx/store","@daffodil/cart/state","@daffodil/order","@angular/core","@ngrx/effects","rxjs","rxjs/operators","@daffodil/order/driver"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).daffodil=e.daffodil||{},e.daffodil.order=e.daffodil.order||{},e.daffodil.order.state={}),e.entity,e.i1,e.state,e.daffodil.order,e.ng.core,e.effects,e.rxjs,e.rxjs.operators,e.daffodil.order.driver)}(this,(function(e,t,r,i,o,n,s,c,d,a){"use strict";var u;(u=e.DaffOrderActionTypes||(e.DaffOrderActionTypes={})).OrderLoadAction="[Order] Order Load Action",u.OrderLoadSuccessAction="[Order] Order Load Success Action",u.OrderLoadFailureAction="[Order] Order Load Failure Action",u.OrderListAction="[Order] Order List Action",u.OrderListSuccessAction="[Order] Order List Success Action",u.OrderListFailureAction="[Order] Order List Failure Action";var l,f=function(t,r){this.orderId=t,this.cartId=r,this.type=e.DaffOrderActionTypes.OrderLoadAction},p=function(t){this.payload=t,this.type=e.DaffOrderActionTypes.OrderLoadSuccessAction},O=function(t){this.payload=t,this.type=e.DaffOrderActionTypes.OrderLoadFailureAction},h=function(t){this.payload=t,this.type=e.DaffOrderActionTypes.OrderListAction},y=function(t){this.payload=t,this.type=e.DaffOrderActionTypes.OrderListSuccessAction},m=function(t){this.payload=t,this.type=e.DaffOrderActionTypes.OrderListFailureAction},g=function(){return l=l||t.createEntityAdapter()},A=g().getInitialState();function S(t,r){void 0===t&&(t=A);var i=g();switch(r.type){case e.DaffOrderActionTypes.OrderLoadSuccessAction:return i.upsertOne(r.payload,t);case e.DaffOrderActionTypes.OrderListSuccessAction:return i.upsertMany(r.payload,t);default:return t}}
|
2
|
-
/*! *****************************************************************************
|
3
|
-
Copyright (c) Microsoft Corporation.
|
4
|
-
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
-
purpose with or without fee is hereby granted.
|
7
|
-
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
15
|
-
***************************************************************************** */Object.create;function T(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,o,n=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(T(arguments[t]));return e}Object.create;var D={loading:!1,errors:[]};function _(t,r){switch(void 0===t&&(t=D),r.type){case e.DaffOrderActionTypes.OrderListAction:case e.DaffOrderActionTypes.OrderLoadAction:return Object.assign(Object.assign({},t),{loading:!0});case e.DaffOrderActionTypes.OrderListSuccessAction:case e.DaffOrderActionTypes.OrderLoadSuccessAction:return Object.assign(Object.assign({},t),{loading:!1,errors:[]});case e.DaffOrderActionTypes.OrderListFailureAction:case e.DaffOrderActionTypes.OrderLoadFailureAction:return Object.assign(Object.assign({},t),{errors:v(t.errors,[r.payload]),loading:!1});default:return t}}var L={order:_,orders:S},b="daffOrder",z=function(){var e;return function(){return e=e||{selectOrderFeatureState:r.createFeatureSelector(b)}}}(),j=function(){var e=z().selectOrderFeatureState,t=r.createSelector(e,(function(e){return e.orders})),n=g().getSelectors(t),s=n.selectIds,c=n.selectEntities,d=n.selectAll,a=n.selectTotal,u=i.getDaffCartSelectors().selectCartOrderId,l=r.defaultMemoize((function(e){return r.createSelector(c,(function(t){return t[e]||null}))})).memoized,f=r.createSelector(c,u,(function(e,t){return t?l(t).projector(e):null})),p=r.createSelector(f,(function(e){return!!e})),O=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.totals||[]}))})).memoized,h=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.applied_codes||[]}))})).memoized,y=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.items||[]}))})).memoized,m=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.billing_addresses||[]}))})).memoized,A=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.shipping_addresses||[]}))})).memoized,S=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.shipments||[]}))})).memoized,T=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.payment||null}))})).memoized,v=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.invoices||[]}))})).memoized,D=r.defaultMemoize((function(e){return r.createSelector(l(e),(function(e){return e&&e.credits||[]}))})).memoized,_=r.defaultMemoize((function(e){return r.createSelector(O(e),(function(e){var t=e.findIndex((function(e){return e.type===o.DaffOrderTotalTypeEnum.GrandTotal}));return t>-1?e[t]:null}))})).memoized,L=r.defaultMemoize((function(e){return r.createSelector(O(e),(function(e){var t=e.findIndex((function(e){return e.type===o.DaffOrderTotalTypeEnum.Subtotal}));return t>-1?e[t]:null}))})).memoized,b=r.defaultMemoize((function(e){return r.createSelector(O(e),(function(e){var t=e.findIndex((function(e){return e.type===o.DaffOrderTotalTypeEnum.Shipping}));return t>-1?e[t]:null}))})).memoized,j=r.defaultMemoize((function(e){return r.createSelector(O(e),(function(e){var t=e.findIndex((function(e){return e.type===o.DaffOrderTotalTypeEnum.Discount}));return t>-1?e[t]:null}))})).memoized,I=r.defaultMemoize((function(e){return r.createSelector(j(e),(function(e){return(null==e?void 0:e.value)>0}))})).memoized,$=r.defaultMemoize((function(e){return r.createSelector(O(e),(function(e){var t=e.findIndex((function(e){return e.type===o.DaffOrderTotalTypeEnum.Tax}));return t>-1?e[t]:null}))})).memoized,M=r.defaultMemoize((function(e,t){return r.createSelector(y(e),(function(e){return e.find((function(e){return e.id===t}))||null}))})).memoized;return{selectOrderEntitiesState:t,selectOrderIds:s,selectOrderEntities:c,selectAllOrders:d,selectOrderTotal:a,selectPlacedOrder:f,selectHasPlacedOrder:p,selectOrder:l,selectOrderTotals:O,selectOrderAppliedCodes:h,selectOrderItems:y,selectOrderBillingAddresses:m,selectOrderShippingTotalAddresses:A,selectOrderShipments:S,selectOrderPayment:T,selectOrderInvoices:v,selectOrderCredits:D,selectOrderItem:M,selectOrderGrandTotal:_,selectOrderSubtotal:L,selectOrderShippingTotal:b,selectOrderDiscountTotal:j,selectOrderHasDiscount:I,selectOrderTaxTotal:$}},I=function(){var e;return function(){return e=e||j()}}(),$=function(){var e=z().selectOrderFeatureState,t=r.createSelector(e,(function(e){return e.order}));return{selectOrderState:t,selectOrderLoading:r.createSelector(t,(function(e){return e.loading})),selectOrderErrors:r.createSelector(t,(function(e){return e.errors}))}},M=function(){var e;return function(){return e=e||$()}}(),E=function(){var e;return function(){return e=e||Object.assign(Object.assign(Object.assign({},M()),I()),z())}},x=E(),F=function(){function e(e){this.store=e;var t=x(),i=t.selectOrderIds,o=t.selectOrderEntities,n=t.selectAllOrders,s=t.selectOrderTotal,c=t.selectOrderLoading,d=t.selectOrderErrors,a=t.selectPlacedOrder,u=t.selectHasPlacedOrder,l=t.selectOrder,f=t.selectOrderTotals,p=t.selectOrderAppliedCodes,O=t.selectOrderItems,h=t.selectOrderBillingAddresses,y=t.selectOrderShippingTotalAddresses,m=t.selectOrderShipments,g=t.selectOrderPayment,A=t.selectOrderInvoices,S=t.selectOrderCredits,T=t.selectOrderGrandTotal,v=t.selectOrderSubtotal,D=t.selectOrderShippingTotal,_=t.selectOrderDiscountTotal,L=t.selectOrderHasDiscount,b=t.selectOrderTaxTotal;this.loading$=this.store.pipe(r.select(c)),this.errors$=this.store.pipe(r.select(d)),this.orders$=this.store.pipe(r.select(n)),this.orderIds$=this.store.pipe(r.select(i)),this.orderCount$=this.store.pipe(r.select(s)),this.orderEntities$=this.store.pipe(r.select(o)),this.placedOrder$=this.store.pipe(r.select(a)),this.hasPlacedOrder$=this.store.pipe(r.select(u)),this._order=l,this._totals=f,this._appliedCodes=p,this._items=O,this._billingAddresses=h,this._shippingAddresses=y,this._shipments=m,this._payment=g,this._invoices=A,this._credits=S,this._grandTotal=T,this._subtotal=v,this._shipping=D,this._discount=_,this._hasDiscount=L,this._tax=b}return e.prototype.getOrder$=function(e){return this.store.pipe(r.select(this._order(e)))},e.prototype.getTotals$=function(e){return this.store.pipe(r.select(this._totals(e)))},e.prototype.getAppliedCodes$=function(e){return this.store.pipe(r.select(this._appliedCodes(e)))},e.prototype.getItems$=function(e){return this.store.pipe(r.select(this._items(e)))},e.prototype.getBillingAddresses$=function(e){return this.store.pipe(r.select(this._billingAddresses(e)))},e.prototype.getShippingAddresses$=function(e){return this.store.pipe(r.select(this._shippingAddresses(e)))},e.prototype.getShipments$=function(e){return this.store.pipe(r.select(this._shipments(e)))},e.prototype.getPayment$=function(e){return this.store.pipe(r.select(this._payment(e)))},e.prototype.getInvoices$=function(e){return this.store.pipe(r.select(this._invoices(e)))},e.prototype.getCredits$=function(e){return this.store.pipe(r.select(this._credits(e)))},e.prototype.getGrandTotal$=function(e){return this.store.pipe(r.select(this._grandTotal(e)))},e.prototype.getSubtotal$=function(e){return this.store.pipe(r.select(this._subtotal(e)))},e.prototype.getShippingTotal$=function(e){return this.store.pipe(r.select(this._shipping(e)))},e.prototype.getDiscountTotal$=function(e){return this.store.pipe(r.select(this._discount(e)))},e.prototype.hasDiscount$=function(e){return this.store.pipe(r.select(this._hasDiscount(e)))},e.prototype.getTaxTotal$=function(e){return this.store.pipe(r.select(this._tax(e)))},e.prototype.dispatch=function(e){this.store.dispatch(e)},e}();F.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new F(n.ɵɵinject(r.Store))},token:F,providedIn:"root"}),F.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],F.ctorParameters=function(){return[{type:r.Store}]};var R=this&&this.__decorate||function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},C=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},P=function(t,r,i){var o=this;this.actions$=t,this.driver=r,this.errorMatcher=i,this.get$=this.actions$.pipe(s.ofType(e.DaffOrderActionTypes.OrderLoadAction),d.switchMap((function(e){return o.driver.get(e.orderId,e.cartId).pipe(d.map((function(e){return new p(e)})),d.catchError((function(e){return c.of(new O(o.errorMatcher(e)))})))}))),this.list$=this.actions$.pipe(s.ofType(e.DaffOrderActionTypes.OrderListAction),d.switchMap((function(e){return o.driver.list(e.payload).pipe(d.map((function(e){return new y(e)})),d.catchError((function(e){return c.of(new m(o.errorMatcher(e)))})))})))};P.decorators=[{type:n.Injectable}],P.ctorParameters=function(){return[{type:s.Actions},{type:void 0,decorators:[{type:n.Inject,args:[a.DaffOrderDriver]}]},{type:void 0,decorators:[{type:n.Inject,args:[o.DAFF_ORDER_ERROR_MATCHER]}]}]},R([s.Effect(),C("design:type",Object)],P.prototype,"get$",void 0),R([s.Effect(),C("design:type",Object)],P.prototype,"list$",void 0);var w=function(){};w.decorators=[{type:n.NgModule,args:[{imports:[i.DaffCartStateModule,s.EffectsModule.forFeature([P]),r.StoreModule.forFeature(b,L)]}]}],e.DAFF_ORDER_STORE_FEATURE_KEY=b,e.DaffOrderFacade=F,e.DaffOrderList=h,e.DaffOrderListFailure=m,e.DaffOrderListSuccess=y,e.DaffOrderLoad=f,e.DaffOrderLoadFailure=O,e.DaffOrderLoadSuccess=p,e.DaffOrderStateModule=w,e.daffGetOrderAdapter=g,e.daffOrderEntitiesInitialState=A,e.daffOrderEntitiesReducer=S,e.daffOrderInitialState=D,e.daffOrderReducer=_,e.daffOrderReducers=L,e.getDaffOrderSelectors=x,e.ɵ0=E,e.ɵa=P,Object.defineProperty(e,"__esModule",{value:!0})}));
|
16
|
-
//# sourceMappingURL=daffodil-order-state.umd.min.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../libs/order/state/src/actions/order.actions.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-adapter.ts","../../../libs/order/state/src/reducers/order-entities/order-entities-initial-state.ts","../../../libs/order/state/src/reducers/order-entities/order-entities.reducer.ts","../../../node_modules/tslib/tslib.es6.js","../../../libs/order/state/src/reducers/order/order-initial-state.ts","../../../libs/order/state/src/reducers/order/order.reducer.ts","../../../libs/order/state/src/reducers/order-reducers.ts","../../../libs/order/state/src/reducers/order-store-feature-key.ts","../../../libs/order/state/src/selectors/order-feature.selector.ts","../../../libs/order/state/src/selectors/order-entities.selector.ts","../../../libs/order/state/src/selectors/order.selector.ts","../../../libs/order/state/src/selectors/order-all.selector.ts","../../../libs/order/state/src/facades/order/order.facade.ts","../../../libs/order/state/src/effects/order.effects.ts","../../../libs/order/state/src/order-state.module.ts"],"names":["DaffOrderActionTypes","cache","orderId","cartId","this","type","OrderLoadAction","payload","OrderLoadSuccessAction","OrderLoadFailureAction","OrderListAction","OrderListSuccessAction","OrderListFailureAction","daffGetOrderAdapter","createEntityAdapter","daffOrderEntitiesInitialState","getInitialState","daffOrderEntitiesReducer","state","action","adapter","upsertOne","upsertMany","Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","daffOrderInitialState","loading","errors","daffOrderReducer","assign","daffOrderReducers","order","orders","DAFF_ORDER_STORE_FEATURE_KEY","getDaffOrderReducersStateSelector","selectOrderFeatureState","createFeatureSelector","createOrderEntitySelectors","selectOrderEntitiesState","createSelector","_a","getSelectors","selectIds","selectEntities","selectAll","selectTotal","selectCartOrderId","getDaffCartSelectors","selectOrder","defaultMemoize","memoized","selectPlacedOrder","projector","selectHasPlacedOrder","placedOrder","selectOrderTotals","totals","selectOrderAppliedCodes","applied_codes","selectOrderItems","items","selectOrderBillingAddresses","billing_addresses","selectOrderShippingTotalAddresses","shipping_addresses","selectOrderShipments","shipments","selectOrderPayment","payment","selectOrderInvoices","invoices","selectOrderCredits","credits","selectOrderGrandTotal","index","findIndex","total","DaffOrderTotalTypeEnum","GrandTotal","selectOrderSubtotal","Subtotal","selectOrderShippingTotal","Shipping","selectOrderDiscountTotal","Discount","selectOrderHasDiscount","discountTotal","selectOrderTaxTotal","Tax","selectOrderItem","itemId","find","item","id","selectOrderIds","selectOrderEntities","selectAllOrders","selectOrderTotal","getDaffOrderEntitySelectors","createOrderSelectors","selectOrderState","selectOrderLoading","selectOrderErrors","getOrderSelectors","getDaffOrderSelectors","DaffOrderFacade","store","loading$","pipe","select","errors$","orders$","orderIds$","orderCount$","orderEntities$","placedOrder$","hasPlacedOrder$","_order","_totals","_appliedCodes","_items","_billingAddresses","_shippingAddresses","_shipments","_payment","_invoices","_credits","_grandTotal","_subtotal","_shipping","_discount","_hasDiscount","_tax","prototype","getOrder$","getTotals$","getAppliedCodes$","getItems$","getBillingAddresses$","getShippingAddresses$","getShipments$","getPayment$","getInvoices$","getCredits$","getGrandTotal$","getSubtotal$","getShippingTotal$","getDiscountTotal$","hasDiscount$","getTaxTotal$","dispatch","Injectable","args","providedIn","Store","actions$","driver","errorMatcher","_this","get$","ofType","switchMap","get","map","resp","DaffOrderLoadSuccess","catchError","of","DaffOrderLoadFailure","list$","list","DaffOrderListSuccess","DaffOrderListFailure","Actions","Inject","DaffOrderDriver","DAFF_ORDER_ERROR_MATCHER","__decorate","Effect","NgModule","imports","DaffCartStateModule","EffectsModule","forFeature","DaffOrderEffects","StoreModule"],"mappings":"k1BAMA,IAAYA,GAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,qBAAoB,KAC9B,gBAAA,4BACAA,EAAA,uBAAA,oCACAA,EAAA,uBAAA,oCACAA,EAAA,gBAAA,4BACAA,EAAA,uBAAA,o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\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nexport enum DaffOrderActionTypes {\n OrderLoadAction = '[Order] Order Load Action',\n OrderLoadSuccessAction = '[Order] Order Load Success Action',\n OrderLoadFailureAction = '[Order] Order Load Failure Action',\n OrderListAction = '[Order] Order List Action',\n OrderListSuccessAction = '[Order] Order List Success Action',\n OrderListFailureAction = '[Order] Order List Failure Action'\n}\n\n/**\n * Triggers the loading of the specified order.\n *\n * @param orderId The order ID.\n * @param cartId The optional guest cart ID.\n */\nexport class DaffOrderLoad<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadAction;\n\n constructor(public orderId: T['id'], public cartId?: V['id']) {}\n}\n\nexport class DaffOrderLoadSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\nexport class DaffOrderLoadFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * Triggers the loading of the orders for either the currently logged-in user or the specified guest cart.\n *\n * @param payload The guest cart ID.\n */\nexport class DaffOrderList<T extends DaffCart = DaffCart> implements Action {\n readonly type = DaffOrderActionTypes.OrderListAction;\n\n constructor(public payload?: T['id']) {}\n}\n\nexport class DaffOrderListSuccess<T extends DaffOrder = DaffOrder> implements Action {\n readonly type = DaffOrderActionTypes.OrderListSuccessAction;\n\n constructor(public payload: T[]) {}\n}\n\nexport class DaffOrderListFailure implements Action {\n readonly type = DaffOrderActionTypes.OrderListFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport type DaffOrderActions<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> =\n | DaffOrderLoad<T, V>\n | DaffOrderLoadSuccess<T>\n | DaffOrderLoadFailure\n | DaffOrderList\n | DaffOrderListSuccess<T>\n | DaffOrderListFailure;\n","import {\n EntityAdapter,\n createEntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffOrder } from '@daffodil/order';\n\n/**\n * Order Adapter for changing/overwriting entity state.\n */\nexport const daffGetOrderAdapter = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): EntityAdapter<T> =>\n cache = cache || createEntityAdapter<T>();\n})();\n","import { daffGetOrderAdapter } from './order-entities-adapter';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Initial state for order entity state.\n */\nexport const daffOrderEntitiesInitialState: DaffOrderEntityState<any> = daffGetOrderAdapter().getInitialState();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffGetOrderAdapter } from './order-entities-adapter';\nimport { daffOrderEntitiesInitialState } from './order-entities-initial-state';\nimport { DaffOrderEntityState } from './order-entities-state.interface';\n\n/**\n * Reducer function that catches actions and changes/overwrites order entities state.\n */\nexport function daffOrderEntitiesReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderEntitiesInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderEntityState<T> {\n const adapter = daffGetOrderAdapter<T>();\n\n switch (action.type) {\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return adapter.upsertOne(action.payload, state);\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n return adapter.upsertMany(action.payload, state);\n\n default:\n return state;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { DaffOrderReducerState } from './order-reducer.interface';\n\nexport const daffOrderInitialState: DaffOrderReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderActions,\n DaffOrderActionTypes,\n} from '../../actions/order.actions';\nimport { daffOrderInitialState } from './order-initial-state';\nimport { DaffOrderReducerState } from './order-reducer.interface';\n\nexport function daffOrderReducer<T extends DaffOrder = DaffOrder>(\n state = daffOrderInitialState,\n action: DaffOrderActions<T>,\n): DaffOrderReducerState {\n switch (action.type) {\n case DaffOrderActionTypes.OrderListAction:\n case DaffOrderActionTypes.OrderLoadAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffOrderActionTypes.OrderListSuccessAction:\n case DaffOrderActionTypes.OrderLoadSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffOrderActionTypes.OrderListFailureAction:\n case DaffOrderActionTypes.OrderLoadFailureAction:\n return {\n ...state,\n errors: [\n ...state.errors,\n action.payload,\n ],\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffOrderEntitiesReducer } from './order-entities/public_api';\nimport { DaffOrderReducersState } from './order-reducers.interface';\nimport { daffOrderReducer } from './order/order.reducer';\n\nexport const daffOrderReducers: ActionReducerMap<DaffOrderReducersState> = {\n order: daffOrderReducer,\n orders: daffOrderEntitiesReducer,\n};\n","export const DAFF_ORDER_STORE_FEATURE_KEY = 'daffOrder';\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducersState,\n DAFF_ORDER_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\nexport interface DaffOrderFeatureSelector<T extends DaffOrder = DaffOrder> {\n selectOrderFeatureState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderReducersState<T>>;\n}\n\nexport const getDaffOrderReducersStateSelector = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderFeatureSelector<T> =>\n cache = cache || {\n selectOrderFeatureState: createFeatureSelector<DaffOrderReducersState<T>>(DAFF_ORDER_STORE_FEATURE_KEY),\n };\n})();\n","import { Dictionary } from '@ngrx/entity';\nimport {\n createSelector,\n defaultMemoize,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n getDaffCartSelectors,\n DaffCartStateRootSlice,\n} from '@daffodil/cart/state';\nimport {\n DaffOrder,\n DaffOrderItem,\n DaffOrderTotal,\n DaffOrderTotalTypeEnum,\n} from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n daffGetOrderAdapter,\n DaffOrderEntityState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderEntitySelectors<T extends DaffOrder = DaffOrder> {\n selectOrderEntitiesState: MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderEntityState<T>>;\n /**\n * Selector for order IDs.\n */\n selectOrderIds: MemoizedSelector<DaffOrderStateRootSlice<T>, T['id'][]>;\n /**\n * Selector for order entities.\n */\n selectOrderEntities: MemoizedSelector<DaffOrderStateRootSlice<T>, Dictionary<T>>;\n /**\n * Selector for all orders.\n */\n selectAllOrders: MemoizedSelector<DaffOrderStateRootSlice<T>, T[]>;\n /**\n * Selector for total number of orders.\n */\n selectOrderTotal: MemoizedSelector<DaffOrderStateRootSlice<T>, number>;\n selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n\n /**\n * Selector for the most recently placed order (if any).\n */\n selectPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, T>;\n /**\n * Selector for the existence of the most recently placed order.\n */\n selectHasPlacedOrder: MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n\n /**\n * Selects the specified order's totals.\n */\n selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']>;\n /**\n * Selects the specified order's applied coupon codes.\n */\n selectOrderAppliedCodes: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['applied_codes']>;\n /**\n * Selects the specified order's items.\n */\n selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']>;\n /**\n * Selects the specified order's billing addresses.\n */\n selectOrderBillingAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['billing_addresses']>;\n /**\n * Selects the specified order's shipping addresses.\n */\n selectOrderShippingTotalAddresses: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipping_addresses']>;\n /**\n * Selects the specified order's shipments.\n */\n selectOrderShipments: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['shipments']>;\n /**\n * Selects the specified order's payment.\n */\n selectOrderPayment: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['payment']>;\n /**\n * Selects the specified order's invoices.\n */\n selectOrderInvoices: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['invoices']>;\n /**\n * Selects the specified order's credits.\n */\n selectOrderCredits: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['credits']>;\n\n /**\n * Selects the specified order's specified item.\n */\n selectOrderItem: (orderId: T['id'], itemId: T['items'][0]['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderItem>;\n\n /**\n * Selects the specified order's grand total.\n */\n selectOrderGrandTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's subtotal.\n */\n selectOrderSubtotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's shipping total.\n */\n selectOrderShippingTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n /**\n * Selects the specified order's discount total.\n */\n\tselectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n\t/**\n\t * Selects whether the specified order has a discount.\n\t */\n\tselectOrderHasDiscount: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, boolean>;\n /**\n * Selects the specified order's tax total.\n */\n selectOrderTaxTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal>;\n}\n\nconst createOrderEntitySelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderEntitiesState = createSelector(\n selectOrderFeatureState,\n state => state.orders,\n );\n const { selectIds, selectEntities, selectAll, selectTotal } = daffGetOrderAdapter<T>().getSelectors(selectOrderEntitiesState);\n const { selectCartOrderId } = getDaffCartSelectors();\n\n const selectOrder: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectEntities,\n (orders: Dictionary<T>) => orders[orderId] || null,\n )).memoized;\n\n const selectPlacedOrder = createSelector(\n selectEntities,\n selectCartOrderId,\n (orders, orderId) => orderId ? selectOrder(orderId).projector(orders) : null,\n );\n\n const selectHasPlacedOrder = createSelector(\n selectPlacedOrder,\n placedOrder => !!placedOrder,\n );\n\n const selectOrderTotals: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['totals']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.totals) || [],\n )).memoized;\n\n const selectOrderAppliedCodes = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.applied_codes) || [],\n )).memoized;\n\n const selectOrderItems: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, T['items']> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.items) || [],\n )).memoized;\n\n const selectOrderBillingAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.billing_addresses) || [],\n )).memoized;\n\n const selectOrderShippingTotalAddresses = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipping_addresses) || [],\n )).memoized;\n\n const selectOrderShipments = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.shipments) || [],\n )).memoized;\n\n const selectOrderPayment = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.payment) || null,\n )).memoized;\n\n const selectOrderInvoices = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.invoices) || [],\n )).memoized;\n\n const selectOrderCredits = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrder(orderId),\n (order) => (order && order.credits) || [],\n )).memoized;\n\n const selectOrderGrandTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.GrandTotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderSubtotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Subtotal);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderShippingTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Shipping);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderDiscountTotal: (orderId: T['id']) => MemoizedSelector<DaffOrderStateRootSlice<T>, DaffOrderTotal> =\n defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Discount);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderHasDiscount = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderDiscountTotal(orderId),\n discountTotal => discountTotal?.value > 0,\n )).memoized;\n\n const selectOrderTaxTotal = defaultMemoize((orderId: T['id']) => createSelector(\n selectOrderTotals(orderId),\n totals => {\n const index = totals.findIndex(total => total.type === DaffOrderTotalTypeEnum.Tax);\n\n return index > -1 ? totals[index] : null;\n },\n )).memoized;\n\n const selectOrderItem = defaultMemoize((orderId: T['id'], itemId: T['items'][0]['id']) => createSelector(\n selectOrderItems(orderId),\n items => items.find(item => item.id === itemId) || null,\n )).memoized;\n\n return {\n selectOrderEntitiesState,\n selectOrderIds: selectIds,\n selectOrderEntities: selectEntities,\n selectAllOrders: selectAll,\n selectOrderTotal: selectTotal,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n selectOrderItem,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n };\n};\n\nexport const getDaffOrderEntitySelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderEntitySelectors<T> =>\n cache = cache || createOrderEntitySelectors<T>();\n})();\n\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderStateRootSlice,\n DaffOrderReducerState,\n} from '../reducers/public_api';\nimport { getDaffOrderReducersStateSelector } from './order-feature.selector';\n\nexport interface DaffOrderSelectors {\n selectOrderState: MemoizedSelector<DaffOrderStateRootSlice, DaffOrderReducerState>;\n selectOrderLoading: MemoizedSelector<DaffOrderStateRootSlice, boolean>;\n selectOrderErrors: MemoizedSelector<DaffOrderStateRootSlice, DaffStateError[]>;\n}\n\nconst createOrderSelectors = <T extends DaffOrder = DaffOrder>() => {\n const { selectOrderFeatureState } = getDaffOrderReducersStateSelector<T>();\n const selectOrderState = createSelector(\n selectOrderFeatureState,\n state => state.order,\n );\n\n const selectOrderLoading = createSelector(\n selectOrderState,\n state => state.loading,\n );\n\n const selectOrderErrors = createSelector(\n selectOrderState,\n state => state.errors,\n );\n\n return {\n selectOrderState,\n selectOrderLoading,\n selectOrderErrors,\n };\n};\n\nexport const getOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderSelectors =>\n cache = cache || createOrderSelectors<T>();\n})();\n","import { DaffOrder } from '@daffodil/order';\n\nimport {\n DaffOrderEntitySelectors,\n getDaffOrderEntitySelectors,\n} from './order-entities.selector';\nimport {\n DaffOrderFeatureSelector,\n getDaffOrderReducersStateSelector,\n} from './order-feature.selector';\nimport {\n DaffOrderSelectors,\n getOrderSelectors,\n} from './order.selector';\n\nexport interface DaffOrderAllSelectors<T extends DaffOrder = DaffOrder> extends\n DaffOrderEntitySelectors<T>,\n DaffOrderSelectors,\n DaffOrderFeatureSelector<T> {}\n\nexport const getDaffOrderSelectors = (() => {\n let cache;\n return <T extends DaffOrder = DaffOrder>(): DaffOrderAllSelectors<T> =>\n cache = cache || {\n ...getOrderSelectors<T>(),\n ...getDaffOrderEntitySelectors<T>(),\n ...getDaffOrderReducersStateSelector<T>(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DaffOrderTotal,\n} from '@daffodil/order';\n\nimport { DaffOrderStateRootSlice } from '../../reducers/public_api';\nimport { DaffOrderEntitySelectors } from '../../selectors/order-entities.selector';\nimport { getDaffOrderSelectors } from '../../selectors/public_api';\nimport { DaffOrderFacadeInterface } from './order-facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderFacade<T extends DaffOrder = DaffOrder> implements DaffOrderFacadeInterface<T> {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n orders$: Observable<T[]>;\n orderIds$: Observable<T['id'][]>;\n orderCount$: Observable<number>;\n orderEntities$: Observable<Dictionary<T>>;\n\n placedOrder$: Observable<T>;\n hasPlacedOrder$: Observable<boolean>;\n\n _order: DaffOrderEntitySelectors<T>['selectOrder'];\n _totals: DaffOrderEntitySelectors<T>['selectOrderTotals'];\n _appliedCodes: DaffOrderEntitySelectors<T>['selectOrderAppliedCodes'];\n _items: DaffOrderEntitySelectors<T>['selectOrderItems'];\n _billingAddresses: DaffOrderEntitySelectors<T>['selectOrderBillingAddresses'];\n _shippingAddresses: DaffOrderEntitySelectors<T>['selectOrderShippingTotalAddresses'];\n _shipments: DaffOrderEntitySelectors<T>['selectOrderShipments'];\n _payment: DaffOrderEntitySelectors<T>['selectOrderPayment'];\n _invoices: DaffOrderEntitySelectors<T>['selectOrderInvoices'];\n _credits: DaffOrderEntitySelectors<T>['selectOrderCredits'];\n _grandTotal: DaffOrderEntitySelectors<T>['selectOrderGrandTotal'];\n _subtotal: DaffOrderEntitySelectors<T>['selectOrderSubtotal'];\n _shipping: DaffOrderEntitySelectors<T>['selectOrderShippingTotal'];\n _discount: DaffOrderEntitySelectors<T>['selectOrderDiscountTotal'];\n _hasDiscount: DaffOrderEntitySelectors<T>['selectOrderHasDiscount'];\n _tax: DaffOrderEntitySelectors<T>['selectOrderTaxTotal'];\n\n constructor(private store: Store<DaffOrderStateRootSlice<T>>) {\n const {\n selectOrderIds,\n selectOrderEntities,\n selectAllOrders,\n selectOrderTotal,\n selectOrderLoading,\n selectOrderErrors,\n\n selectPlacedOrder,\n selectHasPlacedOrder,\n\n selectOrder,\n selectOrderTotals,\n selectOrderAppliedCodes,\n selectOrderItems,\n selectOrderBillingAddresses,\n selectOrderShippingTotalAddresses,\n selectOrderShipments,\n selectOrderPayment,\n selectOrderInvoices,\n selectOrderCredits,\n\n selectOrderGrandTotal,\n selectOrderSubtotal,\n selectOrderShippingTotal,\n selectOrderDiscountTotal,\n selectOrderHasDiscount,\n selectOrderTaxTotal,\n } = getDaffOrderSelectors<T>();\n\n this.loading$ = this.store.pipe(select(selectOrderLoading));\n this.errors$ = this.store.pipe(select(selectOrderErrors));\n\n this.orders$ = this.store.pipe(select(selectAllOrders));\n this.orderIds$ = this.store.pipe(select(selectOrderIds));\n this.orderCount$ = this.store.pipe(select(selectOrderTotal));\n this.orderEntities$ = this.store.pipe(select(selectOrderEntities));\n\n this.placedOrder$ = this.store.pipe(select(selectPlacedOrder));\n this.hasPlacedOrder$ = this.store.pipe(select(selectHasPlacedOrder));\n\n this._order = selectOrder;\n this._totals = selectOrderTotals;\n this._appliedCodes = selectOrderAppliedCodes;\n this._items = selectOrderItems;\n this._billingAddresses = selectOrderBillingAddresses;\n this._shippingAddresses = selectOrderShippingTotalAddresses;\n this._shipments = selectOrderShipments;\n this._payment = selectOrderPayment;\n this._invoices = selectOrderInvoices;\n this._credits = selectOrderCredits;\n this._grandTotal = selectOrderGrandTotal;\n this._subtotal = selectOrderSubtotal;\n this._shipping = selectOrderShippingTotal;\n this._discount = selectOrderDiscountTotal;\n this._hasDiscount = selectOrderHasDiscount;\n this._tax = selectOrderTaxTotal;\n }\n\n getOrder$(orderId: T['id']): Observable<T> {\n return this.store.pipe(select(this._order(orderId)));\n }\n\n getTotals$(orderId: T['id']): Observable<T['totals']> {\n return this.store.pipe(select(this._totals(orderId)));\n }\n\n getAppliedCodes$(orderId: T['id']): Observable<T['applied_codes']> {\n return this.store.pipe(select(this._appliedCodes(orderId)));\n }\n\n getItems$(orderId: T['id']): Observable<T['items']> {\n return this.store.pipe(select(this._items(orderId)));\n }\n\n getBillingAddresses$(orderId: T['id']): Observable<T['billing_addresses']> {\n return this.store.pipe(select(this._billingAddresses(orderId)));\n }\n\n getShippingAddresses$(orderId: T['id']): Observable<T['shipping_addresses']> {\n return this.store.pipe(select(this._shippingAddresses(orderId)));\n }\n\n getShipments$(orderId: T['id']): Observable<T['shipments']> {\n return this.store.pipe(select(this._shipments(orderId)));\n }\n\n getPayment$(orderId: T['id']): Observable<T['payment']> {\n return this.store.pipe(select(this._payment(orderId)));\n }\n\n getInvoices$(orderId: T['id']): Observable<T['invoices']> {\n return this.store.pipe(select(this._invoices(orderId)));\n }\n\n getCredits$(orderId: T['id']): Observable<T['credits']> {\n return this.store.pipe(select(this._credits(orderId)));\n }\n\n getGrandTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._grandTotal(orderId)));\n };\n getSubtotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._subtotal(orderId)));\n };\n getShippingTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._shipping(orderId)));\n };\n getDiscountTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._discount(orderId)));\n };\n hasDiscount$(orderId: T['id']): Observable<boolean> {\n return this.store.pipe(select(this._hasDiscount(orderId)));\n };\n getTaxTotal$(orderId: T['id']): Observable<DaffOrderTotal> {\n return this.store.pipe(select(this._tax(orderId)));\n };\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n Effect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DAFF_ORDER_ERROR_MATCHER,\n} from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderDriver,\n} from '@daffodil/order/driver';\n\nimport {\n DaffOrderActionTypes,\n DaffOrderLoad,\n DaffOrderLoadSuccess,\n DaffOrderLoadFailure,\n DaffOrderList,\n DaffOrderListSuccess,\n DaffOrderListFailure,\n} from '../actions/order.actions';\n\n@Injectable()\nexport class DaffOrderEffects<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffOrderDriver) private driver: DaffOrderServiceInterface<T>,\n\t\t@Inject(DAFF_ORDER_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n /**\n * An effect for the loading of an order.\n */\n @Effect()\n get$ = this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderLoadAction),\n switchMap((action: DaffOrderLoad<T, V>) =>\n this.driver.get(action.orderId, action.cartId).pipe(\n map(resp => new DaffOrderLoadSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderLoadFailure(this.errorMatcher(error)))),\n ),\n ),\n );\n\n /**\n * An effect for the listing of orders.\n */\n @Effect()\n list$ = this.actions$.pipe(\n ofType(DaffOrderActionTypes.OrderListAction),\n switchMap((action: DaffOrderList) =>\n this.driver.list(action.payload).pipe(\n map(resp => new DaffOrderListSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffOrderListFailure(this.errorMatcher(error)))),\n ),\n ),\n );\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffCartStateModule } from '@daffodil/cart/state';\n\nimport { DaffOrderEffects } from './effects/order.effects';\nimport {\n DAFF_ORDER_STORE_FEATURE_KEY,\n daffOrderReducers,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n DaffCartStateModule,\n EffectsModule.forFeature([\n DaffOrderEffects,\n ]),\n StoreModule.forFeature(DAFF_ORDER_STORE_FEATURE_KEY, daffOrderReducers),\n ],\n})\nexport class DaffOrderStateModule {}\n"]}
|