@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,748 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(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')) :
|
3
|
-
typeof define === 'function' && 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'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.order = global.daffodil.order || {}, global.daffodil.order.state = {}), global.entity, global.i1, global.state, global.daffodil.order, global.ng.core, global.effects, global.rxjs, global.rxjs.operators, global.daffodil.order.driver));
|
5
|
-
}(this, (function (exports, entity, i1, state, order, i0, effects, rxjs, operators, driver) { 'use strict';
|
6
|
-
|
7
|
-
(function (DaffOrderActionTypes) {
|
8
|
-
DaffOrderActionTypes["OrderLoadAction"] = "[Order] Order Load Action";
|
9
|
-
DaffOrderActionTypes["OrderLoadSuccessAction"] = "[Order] Order Load Success Action";
|
10
|
-
DaffOrderActionTypes["OrderLoadFailureAction"] = "[Order] Order Load Failure Action";
|
11
|
-
DaffOrderActionTypes["OrderListAction"] = "[Order] Order List Action";
|
12
|
-
DaffOrderActionTypes["OrderListSuccessAction"] = "[Order] Order List Success Action";
|
13
|
-
DaffOrderActionTypes["OrderListFailureAction"] = "[Order] Order List Failure Action";
|
14
|
-
})(exports.DaffOrderActionTypes || (exports.DaffOrderActionTypes = {}));
|
15
|
-
/**
|
16
|
-
* Triggers the loading of the specified order.
|
17
|
-
*
|
18
|
-
* @param orderId The order ID.
|
19
|
-
* @param cartId The optional guest cart ID.
|
20
|
-
*/
|
21
|
-
var DaffOrderLoad = /** @class */ (function () {
|
22
|
-
function DaffOrderLoad(orderId, cartId) {
|
23
|
-
this.orderId = orderId;
|
24
|
-
this.cartId = cartId;
|
25
|
-
this.type = exports.DaffOrderActionTypes.OrderLoadAction;
|
26
|
-
}
|
27
|
-
return DaffOrderLoad;
|
28
|
-
}());
|
29
|
-
var DaffOrderLoadSuccess = /** @class */ (function () {
|
30
|
-
function DaffOrderLoadSuccess(payload) {
|
31
|
-
this.payload = payload;
|
32
|
-
this.type = exports.DaffOrderActionTypes.OrderLoadSuccessAction;
|
33
|
-
}
|
34
|
-
return DaffOrderLoadSuccess;
|
35
|
-
}());
|
36
|
-
var DaffOrderLoadFailure = /** @class */ (function () {
|
37
|
-
function DaffOrderLoadFailure(payload) {
|
38
|
-
this.payload = payload;
|
39
|
-
this.type = exports.DaffOrderActionTypes.OrderLoadFailureAction;
|
40
|
-
}
|
41
|
-
return DaffOrderLoadFailure;
|
42
|
-
}());
|
43
|
-
/**
|
44
|
-
* Triggers the loading of the orders for either the currently logged-in user or the specified guest cart.
|
45
|
-
*
|
46
|
-
* @param payload The guest cart ID.
|
47
|
-
*/
|
48
|
-
var DaffOrderList = /** @class */ (function () {
|
49
|
-
function DaffOrderList(payload) {
|
50
|
-
this.payload = payload;
|
51
|
-
this.type = exports.DaffOrderActionTypes.OrderListAction;
|
52
|
-
}
|
53
|
-
return DaffOrderList;
|
54
|
-
}());
|
55
|
-
var DaffOrderListSuccess = /** @class */ (function () {
|
56
|
-
function DaffOrderListSuccess(payload) {
|
57
|
-
this.payload = payload;
|
58
|
-
this.type = exports.DaffOrderActionTypes.OrderListSuccessAction;
|
59
|
-
}
|
60
|
-
return DaffOrderListSuccess;
|
61
|
-
}());
|
62
|
-
var DaffOrderListFailure = /** @class */ (function () {
|
63
|
-
function DaffOrderListFailure(payload) {
|
64
|
-
this.payload = payload;
|
65
|
-
this.type = exports.DaffOrderActionTypes.OrderListFailureAction;
|
66
|
-
}
|
67
|
-
return DaffOrderListFailure;
|
68
|
-
}());
|
69
|
-
|
70
|
-
var ɵ0 = function () {
|
71
|
-
var cache;
|
72
|
-
return function () { return cache = cache || entity.createEntityAdapter(); };
|
73
|
-
};
|
74
|
-
/**
|
75
|
-
* Order Adapter for changing/overwriting entity state.
|
76
|
-
*/
|
77
|
-
var daffGetOrderAdapter = (ɵ0)();
|
78
|
-
|
79
|
-
/**
|
80
|
-
* Initial state for order entity state.
|
81
|
-
*/
|
82
|
-
var daffOrderEntitiesInitialState = daffGetOrderAdapter().getInitialState();
|
83
|
-
|
84
|
-
/**
|
85
|
-
* Reducer function that catches actions and changes/overwrites order entities state.
|
86
|
-
*/
|
87
|
-
function daffOrderEntitiesReducer(state, action) {
|
88
|
-
if (state === void 0) { state = daffOrderEntitiesInitialState; }
|
89
|
-
var adapter = daffGetOrderAdapter();
|
90
|
-
switch (action.type) {
|
91
|
-
case exports.DaffOrderActionTypes.OrderLoadSuccessAction:
|
92
|
-
return adapter.upsertOne(action.payload, state);
|
93
|
-
case exports.DaffOrderActionTypes.OrderListSuccessAction:
|
94
|
-
return adapter.upsertMany(action.payload, state);
|
95
|
-
default:
|
96
|
-
return state;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
|
100
|
-
/*! *****************************************************************************
|
101
|
-
Copyright (c) Microsoft Corporation.
|
102
|
-
|
103
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
104
|
-
purpose with or without fee is hereby granted.
|
105
|
-
|
106
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
107
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
108
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
109
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
110
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
111
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
112
|
-
PERFORMANCE OF THIS SOFTWARE.
|
113
|
-
***************************************************************************** */
|
114
|
-
/* global Reflect, Promise */
|
115
|
-
var extendStatics = function (d, b) {
|
116
|
-
extendStatics = Object.setPrototypeOf ||
|
117
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
118
|
-
function (d, b) { for (var p in b)
|
119
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
120
|
-
d[p] = b[p]; };
|
121
|
-
return extendStatics(d, b);
|
122
|
-
};
|
123
|
-
function __extends(d, b) {
|
124
|
-
if (typeof b !== "function" && b !== null)
|
125
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
126
|
-
extendStatics(d, b);
|
127
|
-
function __() { this.constructor = d; }
|
128
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
129
|
-
}
|
130
|
-
var __assign = function () {
|
131
|
-
__assign = Object.assign || function __assign(t) {
|
132
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
133
|
-
s = arguments[i];
|
134
|
-
for (var p in s)
|
135
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
136
|
-
t[p] = s[p];
|
137
|
-
}
|
138
|
-
return t;
|
139
|
-
};
|
140
|
-
return __assign.apply(this, arguments);
|
141
|
-
};
|
142
|
-
function __rest(s, e) {
|
143
|
-
var t = {};
|
144
|
-
for (var p in s)
|
145
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
146
|
-
t[p] = s[p];
|
147
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
148
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
149
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
150
|
-
t[p[i]] = s[p[i]];
|
151
|
-
}
|
152
|
-
return t;
|
153
|
-
}
|
154
|
-
function __decorate(decorators, target, key, desc) {
|
155
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
156
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
157
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
158
|
-
else
|
159
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
160
|
-
if (d = decorators[i])
|
161
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
162
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
163
|
-
}
|
164
|
-
function __param(paramIndex, decorator) {
|
165
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
166
|
-
}
|
167
|
-
function __metadata(metadataKey, metadataValue) {
|
168
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
169
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
170
|
-
}
|
171
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
172
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
173
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
174
|
-
function fulfilled(value) { try {
|
175
|
-
step(generator.next(value));
|
176
|
-
}
|
177
|
-
catch (e) {
|
178
|
-
reject(e);
|
179
|
-
} }
|
180
|
-
function rejected(value) { try {
|
181
|
-
step(generator["throw"](value));
|
182
|
-
}
|
183
|
-
catch (e) {
|
184
|
-
reject(e);
|
185
|
-
} }
|
186
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
187
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
188
|
-
});
|
189
|
-
}
|
190
|
-
function __generator(thisArg, body) {
|
191
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
192
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
193
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
194
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
195
|
-
function step(op) {
|
196
|
-
if (f)
|
197
|
-
throw new TypeError("Generator is already executing.");
|
198
|
-
while (_)
|
199
|
-
try {
|
200
|
-
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)
|
201
|
-
return t;
|
202
|
-
if (y = 0, t)
|
203
|
-
op = [op[0] & 2, t.value];
|
204
|
-
switch (op[0]) {
|
205
|
-
case 0:
|
206
|
-
case 1:
|
207
|
-
t = op;
|
208
|
-
break;
|
209
|
-
case 4:
|
210
|
-
_.label++;
|
211
|
-
return { value: op[1], done: false };
|
212
|
-
case 5:
|
213
|
-
_.label++;
|
214
|
-
y = op[1];
|
215
|
-
op = [0];
|
216
|
-
continue;
|
217
|
-
case 7:
|
218
|
-
op = _.ops.pop();
|
219
|
-
_.trys.pop();
|
220
|
-
continue;
|
221
|
-
default:
|
222
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
223
|
-
_ = 0;
|
224
|
-
continue;
|
225
|
-
}
|
226
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
227
|
-
_.label = op[1];
|
228
|
-
break;
|
229
|
-
}
|
230
|
-
if (op[0] === 6 && _.label < t[1]) {
|
231
|
-
_.label = t[1];
|
232
|
-
t = op;
|
233
|
-
break;
|
234
|
-
}
|
235
|
-
if (t && _.label < t[2]) {
|
236
|
-
_.label = t[2];
|
237
|
-
_.ops.push(op);
|
238
|
-
break;
|
239
|
-
}
|
240
|
-
if (t[2])
|
241
|
-
_.ops.pop();
|
242
|
-
_.trys.pop();
|
243
|
-
continue;
|
244
|
-
}
|
245
|
-
op = body.call(thisArg, _);
|
246
|
-
}
|
247
|
-
catch (e) {
|
248
|
-
op = [6, e];
|
249
|
-
y = 0;
|
250
|
-
}
|
251
|
-
finally {
|
252
|
-
f = t = 0;
|
253
|
-
}
|
254
|
-
if (op[0] & 5)
|
255
|
-
throw op[1];
|
256
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
257
|
-
}
|
258
|
-
}
|
259
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
260
|
-
if (k2 === undefined)
|
261
|
-
k2 = k;
|
262
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
263
|
-
}) : (function (o, m, k, k2) {
|
264
|
-
if (k2 === undefined)
|
265
|
-
k2 = k;
|
266
|
-
o[k2] = m[k];
|
267
|
-
});
|
268
|
-
function __exportStar(m, o) {
|
269
|
-
for (var p in m)
|
270
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
271
|
-
__createBinding(o, m, p);
|
272
|
-
}
|
273
|
-
function __values(o) {
|
274
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
275
|
-
if (m)
|
276
|
-
return m.call(o);
|
277
|
-
if (o && typeof o.length === "number")
|
278
|
-
return {
|
279
|
-
next: function () {
|
280
|
-
if (o && i >= o.length)
|
281
|
-
o = void 0;
|
282
|
-
return { value: o && o[i++], done: !o };
|
283
|
-
}
|
284
|
-
};
|
285
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
286
|
-
}
|
287
|
-
function __read(o, n) {
|
288
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
289
|
-
if (!m)
|
290
|
-
return o;
|
291
|
-
var i = m.call(o), r, ar = [], e;
|
292
|
-
try {
|
293
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
294
|
-
ar.push(r.value);
|
295
|
-
}
|
296
|
-
catch (error) {
|
297
|
-
e = { error: error };
|
298
|
-
}
|
299
|
-
finally {
|
300
|
-
try {
|
301
|
-
if (r && !r.done && (m = i["return"]))
|
302
|
-
m.call(i);
|
303
|
-
}
|
304
|
-
finally {
|
305
|
-
if (e)
|
306
|
-
throw e.error;
|
307
|
-
}
|
308
|
-
}
|
309
|
-
return ar;
|
310
|
-
}
|
311
|
-
/** @deprecated */
|
312
|
-
function __spread() {
|
313
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
314
|
-
ar = ar.concat(__read(arguments[i]));
|
315
|
-
return ar;
|
316
|
-
}
|
317
|
-
/** @deprecated */
|
318
|
-
function __spreadArrays() {
|
319
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
320
|
-
s += arguments[i].length;
|
321
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
322
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
323
|
-
r[k] = a[j];
|
324
|
-
return r;
|
325
|
-
}
|
326
|
-
function __spreadArray(to, from, pack) {
|
327
|
-
if (pack || arguments.length === 2)
|
328
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
329
|
-
if (ar || !(i in from)) {
|
330
|
-
if (!ar)
|
331
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
332
|
-
ar[i] = from[i];
|
333
|
-
}
|
334
|
-
}
|
335
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
336
|
-
}
|
337
|
-
function __await(v) {
|
338
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
339
|
-
}
|
340
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
341
|
-
if (!Symbol.asyncIterator)
|
342
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
343
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
344
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
345
|
-
function verb(n) { if (g[n])
|
346
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
347
|
-
function resume(n, v) { try {
|
348
|
-
step(g[n](v));
|
349
|
-
}
|
350
|
-
catch (e) {
|
351
|
-
settle(q[0][3], e);
|
352
|
-
} }
|
353
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
354
|
-
function fulfill(value) { resume("next", value); }
|
355
|
-
function reject(value) { resume("throw", value); }
|
356
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
357
|
-
resume(q[0][0], q[0][1]); }
|
358
|
-
}
|
359
|
-
function __asyncDelegator(o) {
|
360
|
-
var i, p;
|
361
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
362
|
-
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; }
|
363
|
-
}
|
364
|
-
function __asyncValues(o) {
|
365
|
-
if (!Symbol.asyncIterator)
|
366
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
367
|
-
var m = o[Symbol.asyncIterator], i;
|
368
|
-
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);
|
369
|
-
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); }); }; }
|
370
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
371
|
-
}
|
372
|
-
function __makeTemplateObject(cooked, raw) {
|
373
|
-
if (Object.defineProperty) {
|
374
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
375
|
-
}
|
376
|
-
else {
|
377
|
-
cooked.raw = raw;
|
378
|
-
}
|
379
|
-
return cooked;
|
380
|
-
}
|
381
|
-
;
|
382
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
383
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
384
|
-
}) : function (o, v) {
|
385
|
-
o["default"] = v;
|
386
|
-
};
|
387
|
-
function __importStar(mod) {
|
388
|
-
if (mod && mod.__esModule)
|
389
|
-
return mod;
|
390
|
-
var result = {};
|
391
|
-
if (mod != null)
|
392
|
-
for (var k in mod)
|
393
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
394
|
-
__createBinding(result, mod, k);
|
395
|
-
__setModuleDefault(result, mod);
|
396
|
-
return result;
|
397
|
-
}
|
398
|
-
function __importDefault(mod) {
|
399
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
400
|
-
}
|
401
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
402
|
-
if (kind === "a" && !f)
|
403
|
-
throw new TypeError("Private accessor was defined without a getter");
|
404
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
405
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
406
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
407
|
-
}
|
408
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
409
|
-
if (kind === "m")
|
410
|
-
throw new TypeError("Private method is not writable");
|
411
|
-
if (kind === "a" && !f)
|
412
|
-
throw new TypeError("Private accessor was defined without a setter");
|
413
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
414
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
415
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
416
|
-
}
|
417
|
-
|
418
|
-
var daffOrderInitialState = {
|
419
|
-
loading: false,
|
420
|
-
errors: [],
|
421
|
-
};
|
422
|
-
|
423
|
-
function daffOrderReducer(state, action) {
|
424
|
-
if (state === void 0) { state = daffOrderInitialState; }
|
425
|
-
switch (action.type) {
|
426
|
-
case exports.DaffOrderActionTypes.OrderListAction:
|
427
|
-
case exports.DaffOrderActionTypes.OrderLoadAction:
|
428
|
-
return Object.assign(Object.assign({}, state), { loading: true });
|
429
|
-
case exports.DaffOrderActionTypes.OrderListSuccessAction:
|
430
|
-
case exports.DaffOrderActionTypes.OrderLoadSuccessAction:
|
431
|
-
return Object.assign(Object.assign({}, state), { loading: false, errors: [] });
|
432
|
-
case exports.DaffOrderActionTypes.OrderListFailureAction:
|
433
|
-
case exports.DaffOrderActionTypes.OrderLoadFailureAction:
|
434
|
-
return Object.assign(Object.assign({}, state), { errors: __spread(state.errors, [
|
435
|
-
action.payload,
|
436
|
-
]), loading: false });
|
437
|
-
default:
|
438
|
-
return state;
|
439
|
-
}
|
440
|
-
}
|
441
|
-
|
442
|
-
var daffOrderReducers = {
|
443
|
-
order: daffOrderReducer,
|
444
|
-
orders: daffOrderEntitiesReducer,
|
445
|
-
};
|
446
|
-
|
447
|
-
var DAFF_ORDER_STORE_FEATURE_KEY = 'daffOrder';
|
448
|
-
|
449
|
-
var ɵ0$1 = function () {
|
450
|
-
var cache;
|
451
|
-
return function () { return cache = cache || {
|
452
|
-
selectOrderFeatureState: i1.createFeatureSelector(DAFF_ORDER_STORE_FEATURE_KEY),
|
453
|
-
}; };
|
454
|
-
};
|
455
|
-
var getDaffOrderReducersStateSelector = (ɵ0$1)();
|
456
|
-
|
457
|
-
var createOrderEntitySelectors = function () {
|
458
|
-
var selectOrderFeatureState = getDaffOrderReducersStateSelector().selectOrderFeatureState;
|
459
|
-
var selectOrderEntitiesState = i1.createSelector(selectOrderFeatureState, function (state) { return state.orders; });
|
460
|
-
var _a = daffGetOrderAdapter().getSelectors(selectOrderEntitiesState), selectIds = _a.selectIds, selectEntities = _a.selectEntities, selectAll = _a.selectAll, selectTotal = _a.selectTotal;
|
461
|
-
var selectCartOrderId = state.getDaffCartSelectors().selectCartOrderId;
|
462
|
-
var selectOrder = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectEntities, function (orders) { return orders[orderId] || null; }); }).memoized;
|
463
|
-
var selectPlacedOrder = i1.createSelector(selectEntities, selectCartOrderId, function (orders, orderId) { return orderId ? selectOrder(orderId).projector(orders) : null; });
|
464
|
-
var selectHasPlacedOrder = i1.createSelector(selectPlacedOrder, function (placedOrder) { return !!placedOrder; });
|
465
|
-
var selectOrderTotals = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.totals) || []; }); }).memoized;
|
466
|
-
var selectOrderAppliedCodes = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.applied_codes) || []; }); }).memoized;
|
467
|
-
var selectOrderItems = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.items) || []; }); }).memoized;
|
468
|
-
var selectOrderBillingAddresses = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.billing_addresses) || []; }); }).memoized;
|
469
|
-
var selectOrderShippingTotalAddresses = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.shipping_addresses) || []; }); }).memoized;
|
470
|
-
var selectOrderShipments = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.shipments) || []; }); }).memoized;
|
471
|
-
var selectOrderPayment = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.payment) || null; }); }).memoized;
|
472
|
-
var selectOrderInvoices = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.invoices) || []; }); }).memoized;
|
473
|
-
var selectOrderCredits = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrder(orderId), function (order) { return (order && order.credits) || []; }); }).memoized;
|
474
|
-
var selectOrderGrandTotal = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrderTotals(orderId), function (totals) {
|
475
|
-
var index = totals.findIndex(function (total) { return total.type === order.DaffOrderTotalTypeEnum.GrandTotal; });
|
476
|
-
return index > -1 ? totals[index] : null;
|
477
|
-
}); }).memoized;
|
478
|
-
var selectOrderSubtotal = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrderTotals(orderId), function (totals) {
|
479
|
-
var index = totals.findIndex(function (total) { return total.type === order.DaffOrderTotalTypeEnum.Subtotal; });
|
480
|
-
return index > -1 ? totals[index] : null;
|
481
|
-
}); }).memoized;
|
482
|
-
var selectOrderShippingTotal = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrderTotals(orderId), function (totals) {
|
483
|
-
var index = totals.findIndex(function (total) { return total.type === order.DaffOrderTotalTypeEnum.Shipping; });
|
484
|
-
return index > -1 ? totals[index] : null;
|
485
|
-
}); }).memoized;
|
486
|
-
var selectOrderDiscountTotal = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrderTotals(orderId), function (totals) {
|
487
|
-
var index = totals.findIndex(function (total) { return total.type === order.DaffOrderTotalTypeEnum.Discount; });
|
488
|
-
return index > -1 ? totals[index] : null;
|
489
|
-
}); }).memoized;
|
490
|
-
var selectOrderHasDiscount = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrderDiscountTotal(orderId), function (discountTotal) { return (discountTotal === null || discountTotal === void 0 ? void 0 : discountTotal.value) > 0; }); }).memoized;
|
491
|
-
var selectOrderTaxTotal = i1.defaultMemoize(function (orderId) { return i1.createSelector(selectOrderTotals(orderId), function (totals) {
|
492
|
-
var index = totals.findIndex(function (total) { return total.type === order.DaffOrderTotalTypeEnum.Tax; });
|
493
|
-
return index > -1 ? totals[index] : null;
|
494
|
-
}); }).memoized;
|
495
|
-
var selectOrderItem = i1.defaultMemoize(function (orderId, itemId) { return i1.createSelector(selectOrderItems(orderId), function (items) { return items.find(function (item) { return item.id === itemId; }) || null; }); }).memoized;
|
496
|
-
return {
|
497
|
-
selectOrderEntitiesState: selectOrderEntitiesState,
|
498
|
-
selectOrderIds: selectIds,
|
499
|
-
selectOrderEntities: selectEntities,
|
500
|
-
selectAllOrders: selectAll,
|
501
|
-
selectOrderTotal: selectTotal,
|
502
|
-
selectPlacedOrder: selectPlacedOrder,
|
503
|
-
selectHasPlacedOrder: selectHasPlacedOrder,
|
504
|
-
selectOrder: selectOrder,
|
505
|
-
selectOrderTotals: selectOrderTotals,
|
506
|
-
selectOrderAppliedCodes: selectOrderAppliedCodes,
|
507
|
-
selectOrderItems: selectOrderItems,
|
508
|
-
selectOrderBillingAddresses: selectOrderBillingAddresses,
|
509
|
-
selectOrderShippingTotalAddresses: selectOrderShippingTotalAddresses,
|
510
|
-
selectOrderShipments: selectOrderShipments,
|
511
|
-
selectOrderPayment: selectOrderPayment,
|
512
|
-
selectOrderInvoices: selectOrderInvoices,
|
513
|
-
selectOrderCredits: selectOrderCredits,
|
514
|
-
selectOrderItem: selectOrderItem,
|
515
|
-
selectOrderGrandTotal: selectOrderGrandTotal,
|
516
|
-
selectOrderSubtotal: selectOrderSubtotal,
|
517
|
-
selectOrderShippingTotal: selectOrderShippingTotal,
|
518
|
-
selectOrderDiscountTotal: selectOrderDiscountTotal,
|
519
|
-
selectOrderHasDiscount: selectOrderHasDiscount,
|
520
|
-
selectOrderTaxTotal: selectOrderTaxTotal,
|
521
|
-
};
|
522
|
-
};
|
523
|
-
var ɵ0$2 = createOrderEntitySelectors;
|
524
|
-
var ɵ1 = function () {
|
525
|
-
var cache;
|
526
|
-
return function () { return cache = cache || createOrderEntitySelectors(); };
|
527
|
-
};
|
528
|
-
var getDaffOrderEntitySelectors = (ɵ1)();
|
529
|
-
|
530
|
-
var createOrderSelectors = function () {
|
531
|
-
var selectOrderFeatureState = getDaffOrderReducersStateSelector().selectOrderFeatureState;
|
532
|
-
var selectOrderState = i1.createSelector(selectOrderFeatureState, function (state) { return state.order; });
|
533
|
-
var selectOrderLoading = i1.createSelector(selectOrderState, function (state) { return state.loading; });
|
534
|
-
var selectOrderErrors = i1.createSelector(selectOrderState, function (state) { return state.errors; });
|
535
|
-
return {
|
536
|
-
selectOrderState: selectOrderState,
|
537
|
-
selectOrderLoading: selectOrderLoading,
|
538
|
-
selectOrderErrors: selectOrderErrors,
|
539
|
-
};
|
540
|
-
};
|
541
|
-
var ɵ0$3 = createOrderSelectors;
|
542
|
-
var ɵ1$1 = function () {
|
543
|
-
var cache;
|
544
|
-
return function () { return cache = cache || createOrderSelectors(); };
|
545
|
-
};
|
546
|
-
var getOrderSelectors = (ɵ1$1)();
|
547
|
-
|
548
|
-
var ɵ0$4 = function () {
|
549
|
-
var cache;
|
550
|
-
return function () { return cache = cache || Object.assign(Object.assign(Object.assign({}, getOrderSelectors()), getDaffOrderEntitySelectors()), getDaffOrderReducersStateSelector()); };
|
551
|
-
};
|
552
|
-
var getDaffOrderSelectors = (ɵ0$4)();
|
553
|
-
|
554
|
-
/**
|
555
|
-
* @inheritdoc
|
556
|
-
*/
|
557
|
-
var DaffOrderFacade = /** @class */ (function () {
|
558
|
-
function DaffOrderFacade(store) {
|
559
|
-
this.store = store;
|
560
|
-
var _a = getDaffOrderSelectors(), selectOrderIds = _a.selectOrderIds, selectOrderEntities = _a.selectOrderEntities, selectAllOrders = _a.selectAllOrders, selectOrderTotal = _a.selectOrderTotal, selectOrderLoading = _a.selectOrderLoading, selectOrderErrors = _a.selectOrderErrors, selectPlacedOrder = _a.selectPlacedOrder, selectHasPlacedOrder = _a.selectHasPlacedOrder, selectOrder = _a.selectOrder, selectOrderTotals = _a.selectOrderTotals, selectOrderAppliedCodes = _a.selectOrderAppliedCodes, selectOrderItems = _a.selectOrderItems, selectOrderBillingAddresses = _a.selectOrderBillingAddresses, selectOrderShippingTotalAddresses = _a.selectOrderShippingTotalAddresses, selectOrderShipments = _a.selectOrderShipments, selectOrderPayment = _a.selectOrderPayment, selectOrderInvoices = _a.selectOrderInvoices, selectOrderCredits = _a.selectOrderCredits, selectOrderGrandTotal = _a.selectOrderGrandTotal, selectOrderSubtotal = _a.selectOrderSubtotal, selectOrderShippingTotal = _a.selectOrderShippingTotal, selectOrderDiscountTotal = _a.selectOrderDiscountTotal, selectOrderHasDiscount = _a.selectOrderHasDiscount, selectOrderTaxTotal = _a.selectOrderTaxTotal;
|
561
|
-
this.loading$ = this.store.pipe(i1.select(selectOrderLoading));
|
562
|
-
this.errors$ = this.store.pipe(i1.select(selectOrderErrors));
|
563
|
-
this.orders$ = this.store.pipe(i1.select(selectAllOrders));
|
564
|
-
this.orderIds$ = this.store.pipe(i1.select(selectOrderIds));
|
565
|
-
this.orderCount$ = this.store.pipe(i1.select(selectOrderTotal));
|
566
|
-
this.orderEntities$ = this.store.pipe(i1.select(selectOrderEntities));
|
567
|
-
this.placedOrder$ = this.store.pipe(i1.select(selectPlacedOrder));
|
568
|
-
this.hasPlacedOrder$ = this.store.pipe(i1.select(selectHasPlacedOrder));
|
569
|
-
this._order = selectOrder;
|
570
|
-
this._totals = selectOrderTotals;
|
571
|
-
this._appliedCodes = selectOrderAppliedCodes;
|
572
|
-
this._items = selectOrderItems;
|
573
|
-
this._billingAddresses = selectOrderBillingAddresses;
|
574
|
-
this._shippingAddresses = selectOrderShippingTotalAddresses;
|
575
|
-
this._shipments = selectOrderShipments;
|
576
|
-
this._payment = selectOrderPayment;
|
577
|
-
this._invoices = selectOrderInvoices;
|
578
|
-
this._credits = selectOrderCredits;
|
579
|
-
this._grandTotal = selectOrderGrandTotal;
|
580
|
-
this._subtotal = selectOrderSubtotal;
|
581
|
-
this._shipping = selectOrderShippingTotal;
|
582
|
-
this._discount = selectOrderDiscountTotal;
|
583
|
-
this._hasDiscount = selectOrderHasDiscount;
|
584
|
-
this._tax = selectOrderTaxTotal;
|
585
|
-
}
|
586
|
-
DaffOrderFacade.prototype.getOrder$ = function (orderId) {
|
587
|
-
return this.store.pipe(i1.select(this._order(orderId)));
|
588
|
-
};
|
589
|
-
DaffOrderFacade.prototype.getTotals$ = function (orderId) {
|
590
|
-
return this.store.pipe(i1.select(this._totals(orderId)));
|
591
|
-
};
|
592
|
-
DaffOrderFacade.prototype.getAppliedCodes$ = function (orderId) {
|
593
|
-
return this.store.pipe(i1.select(this._appliedCodes(orderId)));
|
594
|
-
};
|
595
|
-
DaffOrderFacade.prototype.getItems$ = function (orderId) {
|
596
|
-
return this.store.pipe(i1.select(this._items(orderId)));
|
597
|
-
};
|
598
|
-
DaffOrderFacade.prototype.getBillingAddresses$ = function (orderId) {
|
599
|
-
return this.store.pipe(i1.select(this._billingAddresses(orderId)));
|
600
|
-
};
|
601
|
-
DaffOrderFacade.prototype.getShippingAddresses$ = function (orderId) {
|
602
|
-
return this.store.pipe(i1.select(this._shippingAddresses(orderId)));
|
603
|
-
};
|
604
|
-
DaffOrderFacade.prototype.getShipments$ = function (orderId) {
|
605
|
-
return this.store.pipe(i1.select(this._shipments(orderId)));
|
606
|
-
};
|
607
|
-
DaffOrderFacade.prototype.getPayment$ = function (orderId) {
|
608
|
-
return this.store.pipe(i1.select(this._payment(orderId)));
|
609
|
-
};
|
610
|
-
DaffOrderFacade.prototype.getInvoices$ = function (orderId) {
|
611
|
-
return this.store.pipe(i1.select(this._invoices(orderId)));
|
612
|
-
};
|
613
|
-
DaffOrderFacade.prototype.getCredits$ = function (orderId) {
|
614
|
-
return this.store.pipe(i1.select(this._credits(orderId)));
|
615
|
-
};
|
616
|
-
DaffOrderFacade.prototype.getGrandTotal$ = function (orderId) {
|
617
|
-
return this.store.pipe(i1.select(this._grandTotal(orderId)));
|
618
|
-
};
|
619
|
-
;
|
620
|
-
DaffOrderFacade.prototype.getSubtotal$ = function (orderId) {
|
621
|
-
return this.store.pipe(i1.select(this._subtotal(orderId)));
|
622
|
-
};
|
623
|
-
;
|
624
|
-
DaffOrderFacade.prototype.getShippingTotal$ = function (orderId) {
|
625
|
-
return this.store.pipe(i1.select(this._shipping(orderId)));
|
626
|
-
};
|
627
|
-
;
|
628
|
-
DaffOrderFacade.prototype.getDiscountTotal$ = function (orderId) {
|
629
|
-
return this.store.pipe(i1.select(this._discount(orderId)));
|
630
|
-
};
|
631
|
-
;
|
632
|
-
DaffOrderFacade.prototype.hasDiscount$ = function (orderId) {
|
633
|
-
return this.store.pipe(i1.select(this._hasDiscount(orderId)));
|
634
|
-
};
|
635
|
-
;
|
636
|
-
DaffOrderFacade.prototype.getTaxTotal$ = function (orderId) {
|
637
|
-
return this.store.pipe(i1.select(this._tax(orderId)));
|
638
|
-
};
|
639
|
-
;
|
640
|
-
DaffOrderFacade.prototype.dispatch = function (action) {
|
641
|
-
this.store.dispatch(action);
|
642
|
-
};
|
643
|
-
return DaffOrderFacade;
|
644
|
-
}());
|
645
|
-
/** @nocollapse */ DaffOrderFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderFacade_Factory() { return new DaffOrderFacade(i0.ɵɵinject(i1.Store)); }, token: DaffOrderFacade, providedIn: "root" });
|
646
|
-
DaffOrderFacade.decorators = [
|
647
|
-
{ type: i0.Injectable, args: [{
|
648
|
-
providedIn: 'root',
|
649
|
-
},] }
|
650
|
-
];
|
651
|
-
/** @nocollapse */
|
652
|
-
DaffOrderFacade.ctorParameters = function () { return [
|
653
|
-
{ type: i1.Store }
|
654
|
-
]; };
|
655
|
-
|
656
|
-
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
657
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
658
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
659
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
660
|
-
else
|
661
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
662
|
-
if (d = decorators[i])
|
663
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
664
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
665
|
-
};
|
666
|
-
var __metadata$1 = (this && this.__metadata) || function (k, v) {
|
667
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
668
|
-
return Reflect.metadata(k, v);
|
669
|
-
};
|
670
|
-
var DaffOrderEffects = /** @class */ (function () {
|
671
|
-
function DaffOrderEffects(actions$, driver, errorMatcher) {
|
672
|
-
var _this = this;
|
673
|
-
this.actions$ = actions$;
|
674
|
-
this.driver = driver;
|
675
|
-
this.errorMatcher = errorMatcher;
|
676
|
-
/**
|
677
|
-
* An effect for the loading of an order.
|
678
|
-
*/
|
679
|
-
this.get$ = this.actions$.pipe(effects.ofType(exports.DaffOrderActionTypes.OrderLoadAction), operators.switchMap(function (action) { return _this.driver.get(action.orderId, action.cartId).pipe(operators.map(function (resp) { return new DaffOrderLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffOrderLoadFailure(_this.errorMatcher(error))); })); }));
|
680
|
-
/**
|
681
|
-
* An effect for the listing of orders.
|
682
|
-
*/
|
683
|
-
this.list$ = this.actions$.pipe(effects.ofType(exports.DaffOrderActionTypes.OrderListAction), operators.switchMap(function (action) { return _this.driver.list(action.payload).pipe(operators.map(function (resp) { return new DaffOrderListSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffOrderListFailure(_this.errorMatcher(error))); })); }));
|
684
|
-
}
|
685
|
-
return DaffOrderEffects;
|
686
|
-
}());
|
687
|
-
DaffOrderEffects.decorators = [
|
688
|
-
{ type: i0.Injectable }
|
689
|
-
];
|
690
|
-
/** @nocollapse */
|
691
|
-
DaffOrderEffects.ctorParameters = function () { return [
|
692
|
-
{ type: effects.Actions },
|
693
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [driver.DaffOrderDriver,] }] },
|
694
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [order.DAFF_ORDER_ERROR_MATCHER,] }] }
|
695
|
-
]; };
|
696
|
-
__decorate$1([
|
697
|
-
effects.Effect(),
|
698
|
-
__metadata$1("design:type", Object)
|
699
|
-
], DaffOrderEffects.prototype, "get$", void 0);
|
700
|
-
__decorate$1([
|
701
|
-
effects.Effect(),
|
702
|
-
__metadata$1("design:type", Object)
|
703
|
-
], DaffOrderEffects.prototype, "list$", void 0);
|
704
|
-
|
705
|
-
var DaffOrderStateModule = /** @class */ (function () {
|
706
|
-
function DaffOrderStateModule() {
|
707
|
-
}
|
708
|
-
return DaffOrderStateModule;
|
709
|
-
}());
|
710
|
-
DaffOrderStateModule.decorators = [
|
711
|
-
{ type: i0.NgModule, args: [{
|
712
|
-
imports: [
|
713
|
-
state.DaffCartStateModule,
|
714
|
-
effects.EffectsModule.forFeature([
|
715
|
-
DaffOrderEffects,
|
716
|
-
]),
|
717
|
-
i1.StoreModule.forFeature(DAFF_ORDER_STORE_FEATURE_KEY, daffOrderReducers),
|
718
|
-
],
|
719
|
-
},] }
|
720
|
-
];
|
721
|
-
|
722
|
-
/**
|
723
|
-
* Generated bundle index. Do not edit.
|
724
|
-
*/
|
725
|
-
|
726
|
-
exports.DAFF_ORDER_STORE_FEATURE_KEY = DAFF_ORDER_STORE_FEATURE_KEY;
|
727
|
-
exports.DaffOrderFacade = DaffOrderFacade;
|
728
|
-
exports.DaffOrderList = DaffOrderList;
|
729
|
-
exports.DaffOrderListFailure = DaffOrderListFailure;
|
730
|
-
exports.DaffOrderListSuccess = DaffOrderListSuccess;
|
731
|
-
exports.DaffOrderLoad = DaffOrderLoad;
|
732
|
-
exports.DaffOrderLoadFailure = DaffOrderLoadFailure;
|
733
|
-
exports.DaffOrderLoadSuccess = DaffOrderLoadSuccess;
|
734
|
-
exports.DaffOrderStateModule = DaffOrderStateModule;
|
735
|
-
exports.daffGetOrderAdapter = daffGetOrderAdapter;
|
736
|
-
exports.daffOrderEntitiesInitialState = daffOrderEntitiesInitialState;
|
737
|
-
exports.daffOrderEntitiesReducer = daffOrderEntitiesReducer;
|
738
|
-
exports.daffOrderInitialState = daffOrderInitialState;
|
739
|
-
exports.daffOrderReducer = daffOrderReducer;
|
740
|
-
exports.daffOrderReducers = daffOrderReducers;
|
741
|
-
exports.getDaffOrderSelectors = getDaffOrderSelectors;
|
742
|
-
exports.ɵ0 = ɵ0$4;
|
743
|
-
exports.ɵa = DaffOrderEffects;
|
744
|
-
|
745
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
746
|
-
|
747
|
-
})));
|
748
|
-
//# sourceMappingURL=daffodil-order-state.umd.js.map
|