@daffodil/order 0.38.6 → 0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/daffodil-order-driver-in-memory.umd.js +10 -101
- package/bundles/daffodil-order-driver-in-memory.umd.js.map +1 -1
- package/bundles/daffodil-order-driver-in-memory.umd.min.js +1 -1
- package/bundles/daffodil-order-driver-in-memory.umd.min.js.map +1 -1
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.js +19 -198
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.js.map +1 -1
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.min.js +2 -2
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.min.js.map +1 -1
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.js +46 -412
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.js.map +1 -1
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.min.js +1 -15
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.min.js.map +1 -1
- package/bundles/daffodil-order-driver-testing.umd.js +3 -53
- package/bundles/daffodil-order-driver-testing.umd.js.map +1 -1
- package/bundles/daffodil-order-driver-testing.umd.min.js +1 -1
- package/bundles/daffodil-order-driver-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-order-driver.umd.js +2 -61
- package/bundles/daffodil-order-driver.umd.js.map +1 -1
- package/bundles/daffodil-order-driver.umd.min.js +2 -3
- package/bundles/daffodil-order-driver.umd.min.js.map +1 -1
- package/bundles/daffodil-order-routing.umd.js +4 -71
- package/bundles/daffodil-order-routing.umd.js.map +1 -1
- package/bundles/daffodil-order-routing.umd.min.js +1 -1
- package/bundles/daffodil-order-routing.umd.min.js.map +1 -1
- package/bundles/daffodil-order-state-testing.umd.js +3 -120
- package/bundles/daffodil-order-state-testing.umd.js.map +1 -1
- package/bundles/daffodil-order-state-testing.umd.min.js +1 -1
- package/bundles/daffodil-order-state-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-order-state.umd.js +82 -876
- package/bundles/daffodil-order-state.umd.js.map +1 -1
- package/bundles/daffodil-order-state.umd.min.js +2 -2
- package/bundles/daffodil-order-state.umd.min.js.map +1 -1
- package/bundles/daffodil-order-testing.umd.js +16 -260
- package/bundles/daffodil-order-testing.umd.js.map +1 -1
- package/bundles/daffodil-order-testing.umd.min.js +1 -1
- package/bundles/daffodil-order-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-order.umd.js +14 -133
- package/bundles/daffodil-order.umd.js.map +1 -1
- package/bundles/daffodil-order.umd.min.js +1 -1
- package/bundles/daffodil-order.umd.min.js.map +1 -1
- package/driver/in-memory/package.json +1 -1
- package/driver/magento/2.4.0/package.json +1 -1
- package/driver/magento/2.4.1/package.json +1 -1
- package/driver/package.json +1 -1
- package/driver/testing/package.json +1 -1
- package/esm2015/daffodil-order.js +2 -7
- package/esm2015/driver/daffodil-order-driver.js +2 -7
- package/esm2015/driver/errors/invalid-api-response.js +1 -15
- package/esm2015/driver/errors/order-not-found.js +1 -15
- package/esm2015/driver/errors/public_api.js +1 -6
- package/esm2015/driver/in-memory/backend/order.service.js +8 -46
- package/esm2015/driver/in-memory/daffodil-order-driver-in-memory.js +2 -7
- package/esm2015/driver/in-memory/drivers/order-driver.module.js +1 -9
- package/esm2015/driver/in-memory/drivers/order.service.js +3 -27
- package/esm2015/driver/in-memory/drivers/public_api.js +1 -6
- package/esm2015/driver/in-memory/index.js +2 -7
- package/esm2015/driver/in-memory/public_api.js +2 -7
- package/esm2015/driver/index.js +2 -7
- package/esm2015/driver/interfaces/order-service.interface.js +1 -28
- package/esm2015/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.js +2 -7
- package/esm2015/driver/magento/2.4.0/errors/codes.js +5 -11
- package/esm2015/driver/magento/2.4.0/errors/map.js +1 -7
- package/esm2015/driver/magento/2.4.0/errors/transform.js +1 -10
- package/esm2015/driver/magento/2.4.0/index.js +2 -7
- package/esm2015/driver/magento/2.4.0/injection-tokens/fragments/order.js +2 -11
- package/esm2015/driver/magento/2.4.0/injection-tokens/public_api.js +1 -6
- package/esm2015/driver/magento/2.4.0/models/responses/order-address.js +2 -42
- package/esm2015/driver/magento/2.4.0/models/responses/order-invoice.js +2 -32
- package/esm2015/driver/magento/2.4.0/models/responses/order-item.js +2 -56
- package/esm2015/driver/magento/2.4.0/models/responses/order-payment.js +2 -30
- package/esm2015/driver/magento/2.4.0/models/responses/order-shipment-item.js +2 -18
- package/esm2015/driver/magento/2.4.0/models/responses/order-shipment-tracking.js +2 -20
- package/esm2015/driver/magento/2.4.0/models/responses/order-shipment.js +2 -18
- package/esm2015/driver/magento/2.4.0/models/responses/order.js +2 -52
- package/esm2015/driver/magento/2.4.0/models/responses/public_api.js +2 -6
- package/esm2015/driver/magento/2.4.0/order-driver.module.js +1 -9
- package/esm2015/driver/magento/2.4.0/order.service.js +6 -45
- package/esm2015/driver/magento/2.4.0/public_api.js +4 -9
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-address.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-invoice.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-item.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-payment.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-shipment-item.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-shipment.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/order.js +1 -7
- package/esm2015/driver/magento/2.4.0/queries/fragments/public_api.js +1 -6
- package/esm2015/driver/magento/2.4.0/queries/get-guest-orders.js +3 -13
- package/esm2015/driver/magento/2.4.0/queries/public_api.js +3 -8
- package/esm2015/driver/magento/2.4.0/queries/responses/get-guest-orders.js +2 -14
- package/esm2015/driver/magento/2.4.0/queries/responses/public_api.js +2 -6
- package/esm2015/driver/magento/2.4.0/transforms/responses/order.js +2 -45
- package/esm2015/driver/magento/2.4.0/validators/get-orders.js +5 -20
- package/esm2015/driver/magento/2.4.0/validators/public_api.js +1 -6
- package/esm2015/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.js +2 -7
- package/esm2015/driver/magento/2.4.1/errors/codes.js +5 -11
- package/esm2015/driver/magento/2.4.1/errors/map.js +1 -7
- package/esm2015/driver/magento/2.4.1/errors/transform.js +1 -10
- package/esm2015/driver/magento/2.4.1/index.js +2 -7
- package/esm2015/driver/magento/2.4.1/injection-tokens/fragments/order.js +2 -11
- package/esm2015/driver/magento/2.4.1/injection-tokens/public_api.js +1 -6
- package/esm2015/driver/magento/2.4.1/models/responses/discount.js +2 -18
- package/esm2015/driver/magento/2.4.1/models/responses/order-address.js +2 -42
- package/esm2015/driver/magento/2.4.1/models/responses/order-credit-item.js +2 -18
- package/esm2015/driver/magento/2.4.1/models/responses/order-credit.js +2 -18
- package/esm2015/driver/magento/2.4.1/models/responses/order-invoice-item.js +2 -26
- package/esm2015/driver/magento/2.4.1/models/responses/order-invoice.js +2 -18
- package/esm2015/driver/magento/2.4.1/models/responses/order-item.js +7 -97
- package/esm2015/driver/magento/2.4.1/models/responses/order-payment.js +2 -32
- package/esm2015/driver/magento/2.4.1/models/responses/order-shipment-item.js +2 -26
- package/esm2015/driver/magento/2.4.1/models/responses/order-shipment-tracking.js +2 -20
- package/esm2015/driver/magento/2.4.1/models/responses/order-shipment.js +2 -18
- package/esm2015/driver/magento/2.4.1/models/responses/order-total.js +2 -24
- package/esm2015/driver/magento/2.4.1/models/responses/order.js +2 -42
- package/esm2015/driver/magento/2.4.1/models/responses/public_api.js +4 -9
- package/esm2015/driver/magento/2.4.1/order-driver.module.js +1 -9
- package/esm2015/driver/magento/2.4.1/order.service.js +6 -45
- package/esm2015/driver/magento/2.4.1/public_api.js +4 -9
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-address.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-credit-item.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-credit-total.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-credit.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-invoice-item.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-invoice-total.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-invoice.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-item.js +1 -8
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-payment.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-shipment-item.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-shipment.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order-total.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/order.js +1 -7
- package/esm2015/driver/magento/2.4.1/queries/fragments/public_api.js +1 -6
- package/esm2015/driver/magento/2.4.1/queries/get-guest-orders.js +3 -13
- package/esm2015/driver/magento/2.4.1/queries/public_api.js +3 -8
- package/esm2015/driver/magento/2.4.1/queries/responses/get-guest-orders.js +2 -14
- package/esm2015/driver/magento/2.4.1/queries/responses/public_api.js +2 -6
- package/esm2015/driver/magento/2.4.1/transforms/responses/order.js +14 -144
- package/esm2015/driver/magento/2.4.1/validators/get-orders.js +5 -20
- package/esm2015/driver/magento/2.4.1/validators/public_api.js +1 -6
- package/esm2015/driver/testing/daffodil-order-driver-testing.js +2 -7
- package/esm2015/driver/testing/drivers/order-driver.module.js +1 -9
- package/esm2015/driver/testing/drivers/order.service.js +3 -25
- package/esm2015/driver/testing/drivers/public_api.js +1 -6
- package/esm2015/driver/testing/index.js +2 -7
- package/esm2015/driver/testing/public_api.js +2 -7
- package/esm2015/index.js +2 -7
- package/esm2015/injection-tokens/error-matcher.token.js +2 -11
- package/esm2015/injection-tokens/public_api.js +1 -6
- package/esm2015/models/composite-order-item.js +2 -24
- package/esm2015/models/configurable-order-item.js +2 -24
- package/esm2015/models/order-address.js +2 -14
- package/esm2015/models/order-coupon.js +2 -16
- package/esm2015/models/order-credit.js +2 -6
- package/esm2015/models/order-invoice.js +2 -24
- package/esm2015/models/order-item.js +7 -70
- package/esm2015/models/order-payment.js +2 -35
- package/esm2015/models/order-shipment-item.js +2 -16
- package/esm2015/models/order-shipment-tracking.js +2 -22
- package/esm2015/models/order-shipment.js +2 -26
- package/esm2015/models/order-shipping-method.js +2 -30
- package/esm2015/models/order-total.js +9 -29
- package/esm2015/models/order.js +2 -44
- package/esm2015/models/public_api.js +1 -6
- package/esm2015/public_api.js +3 -8
- package/esm2015/routing/daffodil-order-routing.js +2 -7
- package/esm2015/routing/guards/placed-order/placed-order-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/placed-order/placed-order.guard.js +4 -38
- package/esm2015/routing/guards/public_api.js +1 -6
- package/esm2015/routing/index.js +2 -7
- package/esm2015/routing/order-routing.module.js +1 -6
- package/esm2015/routing/public_api.js +2 -7
- package/esm2015/state/actions/order.actions.js +10 -81
- package/esm2015/state/daffodil-order-state.js +2 -7
- package/esm2015/state/effects/order.effects.js +3 -67
- package/esm2015/state/facades/order/order-facade.interface.js +2 -115
- package/esm2015/state/facades/order/order.facade.js +3 -141
- package/esm2015/state/facades/public_api.js +1 -6
- package/esm2015/state/index.js +2 -7
- package/esm2015/state/order-state.module.js +1 -6
- package/esm2015/state/public_api.js +5 -10
- package/esm2015/state/reducers/order/order-initial-state.js +1 -7
- package/esm2015/state/reducers/order/order-reducer.interface.js +2 -16
- package/esm2015/state/reducers/order/order.reducer.js +1 -12
- package/esm2015/state/reducers/order/public_api.js +1 -6
- package/esm2015/state/reducers/order-entities/order-entities-adapter.js +4 -18
- package/esm2015/state/reducers/order-entities/order-entities-initial-state.js +1 -7
- package/esm2015/state/reducers/order-entities/order-entities-state.interface.js +2 -6
- package/esm2015/state/reducers/order-entities/order-entities.reducer.js +1 -11
- package/esm2015/state/reducers/order-entities/public_api.js +1 -6
- package/esm2015/state/reducers/order-reducers.interface.js +1 -26
- package/esm2015/state/reducers/order-reducers.js +1 -7
- package/esm2015/state/reducers/order-store-feature-key.js +1 -7
- package/esm2015/state/reducers/public_api.js +3 -8
- package/esm2015/state/selectors/order-all.selector.js +4 -23
- package/esm2015/state/selectors/order-entities.selector.js +36 -375
- package/esm2015/state/selectors/order-feature.selector.js +5 -28
- package/esm2015/state/selectors/order.selector.js +9 -55
- package/esm2015/state/selectors/public_api.js +2 -7
- package/esm2015/state/testing/daffodil-order-state-testing.js +2 -7
- package/esm2015/state/testing/index.js +2 -7
- package/esm2015/state/testing/mock-order-facade.js +3 -101
- package/esm2015/state/testing/order-testing.module.js +1 -6
- package/esm2015/state/testing/public_api.js +1 -6
- package/esm2015/testing/daffodil-order-testing.js +2 -7
- package/esm2015/testing/factories/composite-order-item.factory.js +2 -13
- package/esm2015/testing/factories/configurable-order-item.factory.js +2 -13
- package/esm2015/testing/factories/order-address.factory.js +2 -11
- package/esm2015/testing/factories/order-coupon.factory.js +2 -11
- package/esm2015/testing/factories/order-invoice.factory.js +2 -21
- package/esm2015/testing/factories/order-item.factory.js +2 -59
- package/esm2015/testing/factories/order-payment.factory.js +2 -31
- package/esm2015/testing/factories/order-shipment-item.factory.js +2 -13
- package/esm2015/testing/factories/order-shipment-tracking.factory.js +2 -19
- package/esm2015/testing/factories/order-shipment.factory.js +2 -23
- package/esm2015/testing/factories/order-shipping-rate.factory.js +2 -35
- package/esm2015/testing/factories/order-total.factory.js +2 -17
- package/esm2015/testing/factories/order.factory.js +2 -37
- package/esm2015/testing/factories/public_api.js +1 -6
- package/esm2015/testing/helpers/order-helper.js +2 -8
- package/esm2015/testing/helpers/public_api.js +1 -6
- package/esm2015/testing/index.js +2 -7
- package/esm2015/testing/public_api.js +3 -8
- package/fesm2015/daffodil-order-driver-in-memory.js +11 -101
- package/fesm2015/daffodil-order-driver-in-memory.js.map +1 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.0.js +19 -261
- package/fesm2015/daffodil-order-driver-magento-2.4.0.js.map +1 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.1.js +37 -542
- package/fesm2015/daffodil-order-driver-magento-2.4.1.js.map +1 -1
- package/fesm2015/daffodil-order-driver-testing.js +4 -54
- package/fesm2015/daffodil-order-driver-testing.js.map +1 -1
- package/fesm2015/daffodil-order-driver.js +1 -70
- package/fesm2015/daffodil-order-driver.js.map +1 -1
- package/fesm2015/daffodil-order-routing.js +5 -70
- package/fesm2015/daffodil-order-routing.js.map +1 -1
- package/fesm2015/daffodil-order-state-testing.js +4 -121
- package/fesm2015/daffodil-order-state-testing.js.map +1 -1
- package/fesm2015/daffodil-order-state.js +69 -871
- package/fesm2015/daffodil-order-state.js.map +1 -1
- package/fesm2015/daffodil-order-testing.js +16 -325
- package/fesm2015/daffodil-order-testing.js.map +1 -1
- package/fesm2015/daffodil-order.js +17 -133
- package/fesm2015/daffodil-order.js.map +1 -1
- package/package.json +5 -5
- package/routing/package.json +1 -1
- package/state/package.json +1 -1
- package/state/testing/package.json +1 -1
- package/testing/package.json +1 -1
|
@@ -4,204 +4,99 @@
|
|
|
4
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
5
|
}(this, (function (exports, entity, i1, state, order, i0, effects, rxjs, operators, driver) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
OrderLoadSuccessAction: "[Order] Order Load Success Action",
|
|
16
|
-
OrderLoadFailureAction: "[Order] Order Load Failure Action",
|
|
17
|
-
OrderListAction: "[Order] Order List Action",
|
|
18
|
-
OrderListSuccessAction: "[Order] Order List Success Action",
|
|
19
|
-
OrderListFailureAction: "[Order] Order List Failure Action",
|
|
20
|
-
};
|
|
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 = {}));
|
|
21
15
|
/**
|
|
22
16
|
* Triggers the loading of the specified order.
|
|
23
17
|
*
|
|
24
18
|
* @param orderId The order ID.
|
|
25
19
|
* @param cartId The optional guest cart ID.
|
|
26
|
-
* @template T, V
|
|
27
20
|
*/
|
|
28
21
|
var DaffOrderLoad = /** @class */ (function () {
|
|
29
|
-
/**
|
|
30
|
-
* @param {?} orderId
|
|
31
|
-
* @param {?=} cartId
|
|
32
|
-
*/
|
|
33
22
|
function DaffOrderLoad(orderId, cartId) {
|
|
34
23
|
this.orderId = orderId;
|
|
35
24
|
this.cartId = cartId;
|
|
36
|
-
this.type = DaffOrderActionTypes.OrderLoadAction;
|
|
25
|
+
this.type = exports.DaffOrderActionTypes.OrderLoadAction;
|
|
37
26
|
}
|
|
38
27
|
return DaffOrderLoad;
|
|
39
28
|
}());
|
|
40
|
-
if (false) {
|
|
41
|
-
/** @type {?} */
|
|
42
|
-
DaffOrderLoad.prototype.type;
|
|
43
|
-
/** @type {?} */
|
|
44
|
-
DaffOrderLoad.prototype.orderId;
|
|
45
|
-
/** @type {?} */
|
|
46
|
-
DaffOrderLoad.prototype.cartId;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @template T
|
|
50
|
-
*/
|
|
51
29
|
var DaffOrderLoadSuccess = /** @class */ (function () {
|
|
52
|
-
/**
|
|
53
|
-
* @param {?} payload
|
|
54
|
-
*/
|
|
55
30
|
function DaffOrderLoadSuccess(payload) {
|
|
56
31
|
this.payload = payload;
|
|
57
|
-
this.type = DaffOrderActionTypes.OrderLoadSuccessAction;
|
|
32
|
+
this.type = exports.DaffOrderActionTypes.OrderLoadSuccessAction;
|
|
58
33
|
}
|
|
59
34
|
return DaffOrderLoadSuccess;
|
|
60
35
|
}());
|
|
61
|
-
if (false) {
|
|
62
|
-
/** @type {?} */
|
|
63
|
-
DaffOrderLoadSuccess.prototype.type;
|
|
64
|
-
/** @type {?} */
|
|
65
|
-
DaffOrderLoadSuccess.prototype.payload;
|
|
66
|
-
}
|
|
67
36
|
var DaffOrderLoadFailure = /** @class */ (function () {
|
|
68
|
-
/**
|
|
69
|
-
* @param {?} payload
|
|
70
|
-
*/
|
|
71
37
|
function DaffOrderLoadFailure(payload) {
|
|
72
38
|
this.payload = payload;
|
|
73
|
-
this.type = DaffOrderActionTypes.OrderLoadFailureAction;
|
|
39
|
+
this.type = exports.DaffOrderActionTypes.OrderLoadFailureAction;
|
|
74
40
|
}
|
|
75
41
|
return DaffOrderLoadFailure;
|
|
76
42
|
}());
|
|
77
|
-
if (false) {
|
|
78
|
-
/** @type {?} */
|
|
79
|
-
DaffOrderLoadFailure.prototype.type;
|
|
80
|
-
/** @type {?} */
|
|
81
|
-
DaffOrderLoadFailure.prototype.payload;
|
|
82
|
-
}
|
|
83
43
|
/**
|
|
84
44
|
* Triggers the loading of the orders for either the currently logged-in user or the specified guest cart.
|
|
85
45
|
*
|
|
86
46
|
* @param payload The guest cart ID.
|
|
87
|
-
* @template T
|
|
88
47
|
*/
|
|
89
48
|
var DaffOrderList = /** @class */ (function () {
|
|
90
|
-
/**
|
|
91
|
-
* @param {?=} payload
|
|
92
|
-
*/
|
|
93
49
|
function DaffOrderList(payload) {
|
|
94
50
|
this.payload = payload;
|
|
95
|
-
this.type = DaffOrderActionTypes.OrderListAction;
|
|
51
|
+
this.type = exports.DaffOrderActionTypes.OrderListAction;
|
|
96
52
|
}
|
|
97
53
|
return DaffOrderList;
|
|
98
54
|
}());
|
|
99
|
-
if (false) {
|
|
100
|
-
/** @type {?} */
|
|
101
|
-
DaffOrderList.prototype.type;
|
|
102
|
-
/** @type {?} */
|
|
103
|
-
DaffOrderList.prototype.payload;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @template T
|
|
107
|
-
*/
|
|
108
55
|
var DaffOrderListSuccess = /** @class */ (function () {
|
|
109
|
-
/**
|
|
110
|
-
* @param {?} payload
|
|
111
|
-
*/
|
|
112
56
|
function DaffOrderListSuccess(payload) {
|
|
113
57
|
this.payload = payload;
|
|
114
|
-
this.type = DaffOrderActionTypes.OrderListSuccessAction;
|
|
58
|
+
this.type = exports.DaffOrderActionTypes.OrderListSuccessAction;
|
|
115
59
|
}
|
|
116
60
|
return DaffOrderListSuccess;
|
|
117
61
|
}());
|
|
118
|
-
if (false) {
|
|
119
|
-
/** @type {?} */
|
|
120
|
-
DaffOrderListSuccess.prototype.type;
|
|
121
|
-
/** @type {?} */
|
|
122
|
-
DaffOrderListSuccess.prototype.payload;
|
|
123
|
-
}
|
|
124
62
|
var DaffOrderListFailure = /** @class */ (function () {
|
|
125
|
-
/**
|
|
126
|
-
* @param {?} payload
|
|
127
|
-
*/
|
|
128
63
|
function DaffOrderListFailure(payload) {
|
|
129
64
|
this.payload = payload;
|
|
130
|
-
this.type = DaffOrderActionTypes.OrderListFailureAction;
|
|
65
|
+
this.type = exports.DaffOrderActionTypes.OrderListFailureAction;
|
|
131
66
|
}
|
|
132
67
|
return DaffOrderListFailure;
|
|
133
68
|
}());
|
|
134
|
-
if (false) {
|
|
135
|
-
/** @type {?} */
|
|
136
|
-
DaffOrderListFailure.prototype.type;
|
|
137
|
-
/** @type {?} */
|
|
138
|
-
DaffOrderListFailure.prototype.payload;
|
|
139
|
-
}
|
|
140
69
|
|
|
141
|
-
|
|
142
|
-
* @fileoverview added by tsickle
|
|
143
|
-
* Generated from: reducers/order-entities/order-entities-adapter.ts
|
|
144
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
145
|
-
*/
|
|
146
|
-
var ɵ0 = /**
|
|
147
|
-
* @return {?}
|
|
148
|
-
*/ function () {
|
|
149
|
-
/** @type {?} */
|
|
70
|
+
var ɵ0 = function () {
|
|
150
71
|
var cache;
|
|
151
|
-
return (
|
|
152
|
-
* @template T
|
|
153
|
-
* @return {?}
|
|
154
|
-
*/function () { return cache = cache || entity.createEntityAdapter(); });
|
|
72
|
+
return function () { return cache = cache || entity.createEntityAdapter(); };
|
|
155
73
|
};
|
|
156
74
|
/**
|
|
157
75
|
* Order Adapter for changing/overwriting entity state.
|
|
158
|
-
* @type {?}
|
|
159
76
|
*/
|
|
160
|
-
var daffGetOrderAdapter = (
|
|
77
|
+
var daffGetOrderAdapter = (ɵ0)();
|
|
161
78
|
|
|
162
|
-
/**
|
|
163
|
-
* @fileoverview added by tsickle
|
|
164
|
-
* Generated from: reducers/order-entities/order-entities-initial-state.ts
|
|
165
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
166
|
-
*/
|
|
167
79
|
/**
|
|
168
80
|
* Initial state for order entity state.
|
|
169
|
-
* @type {?}
|
|
170
81
|
*/
|
|
171
82
|
var daffOrderEntitiesInitialState = daffGetOrderAdapter().getInitialState();
|
|
172
83
|
|
|
173
|
-
/**
|
|
174
|
-
* @fileoverview added by tsickle
|
|
175
|
-
* Generated from: reducers/order-entities/order-entities.reducer.ts
|
|
176
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
177
|
-
*/
|
|
178
84
|
/**
|
|
179
85
|
* Reducer function that catches actions and changes/overwrites order entities state.
|
|
180
|
-
* @template T
|
|
181
|
-
* @param {?=} state
|
|
182
|
-
* @param {?=} action
|
|
183
|
-
* @return {?}
|
|
184
86
|
*/
|
|
185
87
|
function daffOrderEntitiesReducer(state, action) {
|
|
186
88
|
if (state === void 0) { state = daffOrderEntitiesInitialState; }
|
|
187
|
-
/** @type {?} */
|
|
188
89
|
var adapter = daffGetOrderAdapter();
|
|
189
90
|
switch (action.type) {
|
|
190
|
-
case DaffOrderActionTypes.OrderLoadSuccessAction:
|
|
91
|
+
case exports.DaffOrderActionTypes.OrderLoadSuccessAction:
|
|
191
92
|
return adapter.upsertOne(action.payload, state);
|
|
192
|
-
case DaffOrderActionTypes.OrderListSuccessAction:
|
|
93
|
+
case exports.DaffOrderActionTypes.OrderListSuccessAction:
|
|
193
94
|
return adapter.upsertMany(action.payload, state);
|
|
194
95
|
default:
|
|
195
96
|
return state;
|
|
196
97
|
}
|
|
197
98
|
}
|
|
198
99
|
|
|
199
|
-
/**
|
|
200
|
-
* @fileoverview added by tsickle
|
|
201
|
-
* Generated from: reducers/order-entities/public_api.ts
|
|
202
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
203
|
-
*/
|
|
204
|
-
|
|
205
100
|
/*! *****************************************************************************
|
|
206
101
|
Copyright (c) Microsoft Corporation.
|
|
207
102
|
|
|
@@ -437,7 +332,7 @@
|
|
|
437
332
|
ar[i] = from[i];
|
|
438
333
|
}
|
|
439
334
|
}
|
|
440
|
-
return to.concat(ar || from);
|
|
335
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
441
336
|
}
|
|
442
337
|
function __await(v) {
|
|
443
338
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -520,34 +415,22 @@
|
|
|
520
415
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
521
416
|
}
|
|
522
417
|
|
|
523
|
-
/**
|
|
524
|
-
* @fileoverview added by tsickle
|
|
525
|
-
* Generated from: reducers/order/order-initial-state.ts
|
|
526
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
527
|
-
*/
|
|
528
|
-
/** @type {?} */
|
|
529
418
|
var daffOrderInitialState = {
|
|
530
419
|
loading: false,
|
|
531
420
|
errors: [],
|
|
532
421
|
};
|
|
533
422
|
|
|
534
|
-
/**
|
|
535
|
-
* @template T
|
|
536
|
-
* @param {?=} state
|
|
537
|
-
* @param {?=} action
|
|
538
|
-
* @return {?}
|
|
539
|
-
*/
|
|
540
423
|
function daffOrderReducer(state, action) {
|
|
541
424
|
if (state === void 0) { state = daffOrderInitialState; }
|
|
542
425
|
switch (action.type) {
|
|
543
|
-
case DaffOrderActionTypes.OrderListAction:
|
|
544
|
-
case DaffOrderActionTypes.OrderLoadAction:
|
|
426
|
+
case exports.DaffOrderActionTypes.OrderListAction:
|
|
427
|
+
case exports.DaffOrderActionTypes.OrderLoadAction:
|
|
545
428
|
return Object.assign(Object.assign({}, state), { loading: true });
|
|
546
|
-
case DaffOrderActionTypes.OrderListSuccessAction:
|
|
547
|
-
case DaffOrderActionTypes.OrderLoadSuccessAction:
|
|
429
|
+
case exports.DaffOrderActionTypes.OrderListSuccessAction:
|
|
430
|
+
case exports.DaffOrderActionTypes.OrderLoadSuccessAction:
|
|
548
431
|
return Object.assign(Object.assign({}, state), { loading: false, errors: [] });
|
|
549
|
-
case DaffOrderActionTypes.OrderListFailureAction:
|
|
550
|
-
case DaffOrderActionTypes.OrderLoadFailureAction:
|
|
432
|
+
case exports.DaffOrderActionTypes.OrderListFailureAction:
|
|
433
|
+
case exports.DaffOrderActionTypes.OrderLoadFailureAction:
|
|
551
434
|
return Object.assign(Object.assign({}, state), { errors: __spread(state.errors, [
|
|
552
435
|
action.payload,
|
|
553
436
|
]), loading: false });
|
|
@@ -556,436 +439,60 @@
|
|
|
556
439
|
}
|
|
557
440
|
}
|
|
558
441
|
|
|
559
|
-
/**
|
|
560
|
-
* @fileoverview added by tsickle
|
|
561
|
-
* Generated from: reducers/order-reducers.ts
|
|
562
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
563
|
-
*/
|
|
564
|
-
/** @type {?} */
|
|
565
442
|
var daffOrderReducers = {
|
|
566
443
|
order: daffOrderReducer,
|
|
567
444
|
orders: daffOrderEntitiesReducer,
|
|
568
445
|
};
|
|
569
446
|
|
|
570
|
-
/**
|
|
571
|
-
* @fileoverview added by tsickle
|
|
572
|
-
* Generated from: reducers/order-store-feature-key.ts
|
|
573
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
574
|
-
*/
|
|
575
|
-
/** @type {?} */
|
|
576
447
|
var DAFF_ORDER_STORE_FEATURE_KEY = 'daffOrder';
|
|
577
448
|
|
|
578
|
-
|
|
579
|
-
* @fileoverview added by tsickle
|
|
580
|
-
* Generated from: reducers/order/public_api.ts
|
|
581
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
582
|
-
*/
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* @fileoverview added by tsickle
|
|
586
|
-
* Generated from: reducers/public_api.ts
|
|
587
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
588
|
-
*/
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* @fileoverview added by tsickle
|
|
592
|
-
* Generated from: selectors/order-feature.selector.ts
|
|
593
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
594
|
-
*/
|
|
595
|
-
/**
|
|
596
|
-
* @record
|
|
597
|
-
* @template T
|
|
598
|
-
*/
|
|
599
|
-
function DaffOrderFeatureSelector() { }
|
|
600
|
-
if (false) {
|
|
601
|
-
/** @type {?} */
|
|
602
|
-
DaffOrderFeatureSelector.prototype.selectOrderFeatureState;
|
|
603
|
-
}
|
|
604
|
-
var ɵ0$1 = /**
|
|
605
|
-
* @return {?}
|
|
606
|
-
*/ function () {
|
|
607
|
-
/** @type {?} */
|
|
449
|
+
var ɵ0$1 = function () {
|
|
608
450
|
var cache;
|
|
609
|
-
return (
|
|
610
|
-
* @template T
|
|
611
|
-
* @return {?}
|
|
612
|
-
*/function () { return cache = cache || {
|
|
451
|
+
return function () { return cache = cache || {
|
|
613
452
|
selectOrderFeatureState: i1.createFeatureSelector(DAFF_ORDER_STORE_FEATURE_KEY),
|
|
614
|
-
}; }
|
|
453
|
+
}; };
|
|
615
454
|
};
|
|
616
|
-
|
|
617
|
-
var getDaffOrderReducersStateSelector = ((ɵ0$1))();
|
|
455
|
+
var getDaffOrderReducersStateSelector = (ɵ0$1)();
|
|
618
456
|
|
|
619
|
-
|
|
620
|
-
* @fileoverview added by tsickle
|
|
621
|
-
* Generated from: selectors/order-entities.selector.ts
|
|
622
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
623
|
-
*/
|
|
624
|
-
/**
|
|
625
|
-
* @record
|
|
626
|
-
* @template T
|
|
627
|
-
*/
|
|
628
|
-
function DaffOrderEntitySelectors() { }
|
|
629
|
-
if (false) {
|
|
630
|
-
/** @type {?} */
|
|
631
|
-
DaffOrderEntitySelectors.prototype.selectOrderEntitiesState;
|
|
632
|
-
/**
|
|
633
|
-
* Selector for order IDs.
|
|
634
|
-
* @type {?}
|
|
635
|
-
*/
|
|
636
|
-
DaffOrderEntitySelectors.prototype.selectOrderIds;
|
|
637
|
-
/**
|
|
638
|
-
* Selector for order entities.
|
|
639
|
-
* @type {?}
|
|
640
|
-
*/
|
|
641
|
-
DaffOrderEntitySelectors.prototype.selectOrderEntities;
|
|
642
|
-
/**
|
|
643
|
-
* Selector for all orders.
|
|
644
|
-
* @type {?}
|
|
645
|
-
*/
|
|
646
|
-
DaffOrderEntitySelectors.prototype.selectAllOrders;
|
|
647
|
-
/**
|
|
648
|
-
* Selector for total number of orders.
|
|
649
|
-
* @type {?}
|
|
650
|
-
*/
|
|
651
|
-
DaffOrderEntitySelectors.prototype.selectOrderTotal;
|
|
652
|
-
/** @type {?} */
|
|
653
|
-
DaffOrderEntitySelectors.prototype.selectOrder;
|
|
654
|
-
/**
|
|
655
|
-
* Selector for the most recently placed order (if any).
|
|
656
|
-
* @type {?}
|
|
657
|
-
*/
|
|
658
|
-
DaffOrderEntitySelectors.prototype.selectPlacedOrder;
|
|
659
|
-
/**
|
|
660
|
-
* Selector for the existence of the most recently placed order.
|
|
661
|
-
* @type {?}
|
|
662
|
-
*/
|
|
663
|
-
DaffOrderEntitySelectors.prototype.selectHasPlacedOrder;
|
|
664
|
-
/**
|
|
665
|
-
* Selects the specified order's totals.
|
|
666
|
-
* @type {?}
|
|
667
|
-
*/
|
|
668
|
-
DaffOrderEntitySelectors.prototype.selectOrderTotals;
|
|
669
|
-
/**
|
|
670
|
-
* Selects the specified order's applied coupon codes.
|
|
671
|
-
* @type {?}
|
|
672
|
-
*/
|
|
673
|
-
DaffOrderEntitySelectors.prototype.selectOrderAppliedCodes;
|
|
674
|
-
/**
|
|
675
|
-
* Selects the specified order's items.
|
|
676
|
-
* @type {?}
|
|
677
|
-
*/
|
|
678
|
-
DaffOrderEntitySelectors.prototype.selectOrderItems;
|
|
679
|
-
/**
|
|
680
|
-
* Selects the specified order's billing addresses.
|
|
681
|
-
* @type {?}
|
|
682
|
-
*/
|
|
683
|
-
DaffOrderEntitySelectors.prototype.selectOrderBillingAddresses;
|
|
684
|
-
/**
|
|
685
|
-
* Selects the specified order's shipping addresses.
|
|
686
|
-
* @type {?}
|
|
687
|
-
*/
|
|
688
|
-
DaffOrderEntitySelectors.prototype.selectOrderShippingTotalAddresses;
|
|
689
|
-
/**
|
|
690
|
-
* Selects the specified order's shipments.
|
|
691
|
-
* @type {?}
|
|
692
|
-
*/
|
|
693
|
-
DaffOrderEntitySelectors.prototype.selectOrderShipments;
|
|
694
|
-
/**
|
|
695
|
-
* Selects the specified order's payment.
|
|
696
|
-
* @type {?}
|
|
697
|
-
*/
|
|
698
|
-
DaffOrderEntitySelectors.prototype.selectOrderPayment;
|
|
699
|
-
/**
|
|
700
|
-
* Selects the specified order's invoices.
|
|
701
|
-
* @type {?}
|
|
702
|
-
*/
|
|
703
|
-
DaffOrderEntitySelectors.prototype.selectOrderInvoices;
|
|
704
|
-
/**
|
|
705
|
-
* Selects the specified order's credits.
|
|
706
|
-
* @type {?}
|
|
707
|
-
*/
|
|
708
|
-
DaffOrderEntitySelectors.prototype.selectOrderCredits;
|
|
709
|
-
/**
|
|
710
|
-
* Selects the specified order's specified item.
|
|
711
|
-
* @type {?}
|
|
712
|
-
*/
|
|
713
|
-
DaffOrderEntitySelectors.prototype.selectOrderItem;
|
|
714
|
-
/**
|
|
715
|
-
* Selects the specified order's grand total.
|
|
716
|
-
* @type {?}
|
|
717
|
-
*/
|
|
718
|
-
DaffOrderEntitySelectors.prototype.selectOrderGrandTotal;
|
|
719
|
-
/**
|
|
720
|
-
* Selects the specified order's subtotal.
|
|
721
|
-
* @type {?}
|
|
722
|
-
*/
|
|
723
|
-
DaffOrderEntitySelectors.prototype.selectOrderSubtotal;
|
|
724
|
-
/**
|
|
725
|
-
* Selects the specified order's shipping total.
|
|
726
|
-
* @type {?}
|
|
727
|
-
*/
|
|
728
|
-
DaffOrderEntitySelectors.prototype.selectOrderShippingTotal;
|
|
729
|
-
/**
|
|
730
|
-
* Selects the specified order's discount total.
|
|
731
|
-
* @type {?}
|
|
732
|
-
*/
|
|
733
|
-
DaffOrderEntitySelectors.prototype.selectOrderDiscountTotal;
|
|
734
|
-
/**
|
|
735
|
-
* Selects whether the specified order has a discount.
|
|
736
|
-
* @type {?}
|
|
737
|
-
*/
|
|
738
|
-
DaffOrderEntitySelectors.prototype.selectOrderHasDiscount;
|
|
739
|
-
/**
|
|
740
|
-
* Selects the specified order's tax total.
|
|
741
|
-
* @type {?}
|
|
742
|
-
*/
|
|
743
|
-
DaffOrderEntitySelectors.prototype.selectOrderTaxTotal;
|
|
744
|
-
}
|
|
745
|
-
/** @type {?} */
|
|
746
|
-
var createOrderEntitySelectors = ( /**
|
|
747
|
-
* @template T
|
|
748
|
-
* @return {?}
|
|
749
|
-
*/function () {
|
|
457
|
+
var createOrderEntitySelectors = function () {
|
|
750
458
|
var selectOrderFeatureState = getDaffOrderReducersStateSelector().selectOrderFeatureState;
|
|
751
|
-
|
|
752
|
-
var selectOrderEntitiesState = i1.createSelector(selectOrderFeatureState, ( /**
|
|
753
|
-
* @param {?} state
|
|
754
|
-
* @return {?}
|
|
755
|
-
*/function (/**
|
|
756
|
-
* @param {?} state
|
|
757
|
-
* @return {?}
|
|
758
|
-
*/ state) { return state.orders; }));
|
|
459
|
+
var selectOrderEntitiesState = i1.createSelector(selectOrderFeatureState, function (state) { return state.orders; });
|
|
759
460
|
var _a = daffGetOrderAdapter().getSelectors(selectOrderEntitiesState), selectIds = _a.selectIds, selectEntities = _a.selectEntities, selectAll = _a.selectAll, selectTotal = _a.selectTotal;
|
|
760
461
|
var selectCartOrderId = state.getDaffCartSelectors().selectCartOrderId;
|
|
761
|
-
|
|
762
|
-
var
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
var
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
/** @type {?} */
|
|
776
|
-
var selectHasPlacedOrder = i1.createSelector(selectPlacedOrder, ( /**
|
|
777
|
-
* @param {?} placedOrder
|
|
778
|
-
* @return {?}
|
|
779
|
-
*/function (/**
|
|
780
|
-
* @param {?} placedOrder
|
|
781
|
-
* @return {?}
|
|
782
|
-
*/ placedOrder) { return !!placedOrder; }));
|
|
783
|
-
/** @type {?} */
|
|
784
|
-
var selectOrderTotals = i1.defaultMemoize(( /**
|
|
785
|
-
* @param {?} orderId
|
|
786
|
-
* @return {?}
|
|
787
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
788
|
-
* @param {?} order
|
|
789
|
-
* @return {?}
|
|
790
|
-
*/function (order) { return (order && order.totals) || []; })); })).memoized;
|
|
791
|
-
/** @type {?} */
|
|
792
|
-
var selectOrderAppliedCodes = i1.defaultMemoize(( /**
|
|
793
|
-
* @param {?} orderId
|
|
794
|
-
* @return {?}
|
|
795
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
796
|
-
* @param {?} order
|
|
797
|
-
* @return {?}
|
|
798
|
-
*/function (order) { return (order && order.applied_codes) || []; })); })).memoized;
|
|
799
|
-
/** @type {?} */
|
|
800
|
-
var selectOrderItems = i1.defaultMemoize(( /**
|
|
801
|
-
* @param {?} orderId
|
|
802
|
-
* @return {?}
|
|
803
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
804
|
-
* @param {?} order
|
|
805
|
-
* @return {?}
|
|
806
|
-
*/function (order) { return (order && order.items) || []; })); })).memoized;
|
|
807
|
-
/** @type {?} */
|
|
808
|
-
var selectOrderBillingAddresses = i1.defaultMemoize(( /**
|
|
809
|
-
* @param {?} orderId
|
|
810
|
-
* @return {?}
|
|
811
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
812
|
-
* @param {?} order
|
|
813
|
-
* @return {?}
|
|
814
|
-
*/function (order) { return (order && order.billing_addresses) || []; })); })).memoized;
|
|
815
|
-
/** @type {?} */
|
|
816
|
-
var selectOrderShippingTotalAddresses = i1.defaultMemoize(( /**
|
|
817
|
-
* @param {?} orderId
|
|
818
|
-
* @return {?}
|
|
819
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
820
|
-
* @param {?} order
|
|
821
|
-
* @return {?}
|
|
822
|
-
*/function (order) { return (order && order.shipping_addresses) || []; })); })).memoized;
|
|
823
|
-
/** @type {?} */
|
|
824
|
-
var selectOrderShipments = i1.defaultMemoize(( /**
|
|
825
|
-
* @param {?} orderId
|
|
826
|
-
* @return {?}
|
|
827
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
828
|
-
* @param {?} order
|
|
829
|
-
* @return {?}
|
|
830
|
-
*/function (order) { return (order && order.shipments) || []; })); })).memoized;
|
|
831
|
-
/** @type {?} */
|
|
832
|
-
var selectOrderPayment = i1.defaultMemoize(( /**
|
|
833
|
-
* @param {?} orderId
|
|
834
|
-
* @return {?}
|
|
835
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
836
|
-
* @param {?} order
|
|
837
|
-
* @return {?}
|
|
838
|
-
*/function (order) { return (order && order.payment) || null; })); })).memoized;
|
|
839
|
-
/** @type {?} */
|
|
840
|
-
var selectOrderInvoices = i1.defaultMemoize(( /**
|
|
841
|
-
* @param {?} orderId
|
|
842
|
-
* @return {?}
|
|
843
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
844
|
-
* @param {?} order
|
|
845
|
-
* @return {?}
|
|
846
|
-
*/function (order) { return (order && order.invoices) || []; })); })).memoized;
|
|
847
|
-
/** @type {?} */
|
|
848
|
-
var selectOrderCredits = i1.defaultMemoize(( /**
|
|
849
|
-
* @param {?} orderId
|
|
850
|
-
* @return {?}
|
|
851
|
-
*/function (orderId) { return i1.createSelector(selectOrder(orderId), ( /**
|
|
852
|
-
* @param {?} order
|
|
853
|
-
* @return {?}
|
|
854
|
-
*/function (order) { return (order && order.credits) || []; })); })).memoized;
|
|
855
|
-
/** @type {?} */
|
|
856
|
-
var selectOrderGrandTotal = i1.defaultMemoize(( /**
|
|
857
|
-
* @param {?} orderId
|
|
858
|
-
* @return {?}
|
|
859
|
-
*/function (orderId) { return i1.createSelector(selectOrderTotals(orderId), ( /**
|
|
860
|
-
* @param {?} totals
|
|
861
|
-
* @return {?}
|
|
862
|
-
*/function (/**
|
|
863
|
-
* @param {?} totals
|
|
864
|
-
* @return {?}
|
|
865
|
-
*/ totals) {
|
|
866
|
-
/** @type {?} */
|
|
867
|
-
var index = totals.findIndex(( /**
|
|
868
|
-
* @param {?} total
|
|
869
|
-
* @return {?}
|
|
870
|
-
*/function (/**
|
|
871
|
-
* @param {?} total
|
|
872
|
-
* @return {?}
|
|
873
|
-
*/ total) { return total.type === order.DaffOrderTotalTypeEnum.GrandTotal; }));
|
|
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; });
|
|
874
476
|
return index > -1 ? totals[index] : null;
|
|
875
|
-
})
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
* @param {?} orderId
|
|
879
|
-
* @return {?}
|
|
880
|
-
*/function (orderId) { return i1.createSelector(selectOrderTotals(orderId), ( /**
|
|
881
|
-
* @param {?} totals
|
|
882
|
-
* @return {?}
|
|
883
|
-
*/function (/**
|
|
884
|
-
* @param {?} totals
|
|
885
|
-
* @return {?}
|
|
886
|
-
*/ totals) {
|
|
887
|
-
/** @type {?} */
|
|
888
|
-
var index = totals.findIndex(( /**
|
|
889
|
-
* @param {?} total
|
|
890
|
-
* @return {?}
|
|
891
|
-
*/function (/**
|
|
892
|
-
* @param {?} total
|
|
893
|
-
* @return {?}
|
|
894
|
-
*/ total) { return total.type === order.DaffOrderTotalTypeEnum.Subtotal; }));
|
|
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; });
|
|
895
480
|
return index > -1 ? totals[index] : null;
|
|
896
|
-
})
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
* @param {?} orderId
|
|
900
|
-
* @return {?}
|
|
901
|
-
*/function (orderId) { return i1.createSelector(selectOrderTotals(orderId), ( /**
|
|
902
|
-
* @param {?} totals
|
|
903
|
-
* @return {?}
|
|
904
|
-
*/function (/**
|
|
905
|
-
* @param {?} totals
|
|
906
|
-
* @return {?}
|
|
907
|
-
*/ totals) {
|
|
908
|
-
/** @type {?} */
|
|
909
|
-
var index = totals.findIndex(( /**
|
|
910
|
-
* @param {?} total
|
|
911
|
-
* @return {?}
|
|
912
|
-
*/function (/**
|
|
913
|
-
* @param {?} total
|
|
914
|
-
* @return {?}
|
|
915
|
-
*/ total) { return total.type === order.DaffOrderTotalTypeEnum.Shipping; }));
|
|
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; });
|
|
916
484
|
return index > -1 ? totals[index] : null;
|
|
917
|
-
})
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
* @param {?} orderId
|
|
921
|
-
* @return {?}
|
|
922
|
-
*/function (orderId) { return i1.createSelector(selectOrderTotals(orderId), ( /**
|
|
923
|
-
* @param {?} totals
|
|
924
|
-
* @return {?}
|
|
925
|
-
*/function (/**
|
|
926
|
-
* @param {?} totals
|
|
927
|
-
* @return {?}
|
|
928
|
-
*/ totals) {
|
|
929
|
-
/** @type {?} */
|
|
930
|
-
var index = totals.findIndex(( /**
|
|
931
|
-
* @param {?} total
|
|
932
|
-
* @return {?}
|
|
933
|
-
*/function (/**
|
|
934
|
-
* @param {?} total
|
|
935
|
-
* @return {?}
|
|
936
|
-
*/ total) { return total.type === order.DaffOrderTotalTypeEnum.Discount; }));
|
|
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; });
|
|
937
488
|
return index > -1 ? totals[index] : null;
|
|
938
|
-
})
|
|
939
|
-
|
|
940
|
-
var
|
|
941
|
-
|
|
942
|
-
* @return {?}
|
|
943
|
-
*/function (orderId) { return i1.createSelector(selectOrderDiscountTotal(orderId), ( /**
|
|
944
|
-
* @param {?} discountTotal
|
|
945
|
-
* @return {?}
|
|
946
|
-
*/function (/**
|
|
947
|
-
* @param {?} discountTotal
|
|
948
|
-
* @return {?}
|
|
949
|
-
*/ discountTotal) { return (discountTotal === null || discountTotal === void 0 ? void 0 : discountTotal.value) > 0; })); })).memoized;
|
|
950
|
-
/** @type {?} */
|
|
951
|
-
var selectOrderTaxTotal = i1.defaultMemoize(( /**
|
|
952
|
-
* @param {?} orderId
|
|
953
|
-
* @return {?}
|
|
954
|
-
*/function (orderId) { return i1.createSelector(selectOrderTotals(orderId), ( /**
|
|
955
|
-
* @param {?} totals
|
|
956
|
-
* @return {?}
|
|
957
|
-
*/function (/**
|
|
958
|
-
* @param {?} totals
|
|
959
|
-
* @return {?}
|
|
960
|
-
*/ totals) {
|
|
961
|
-
/** @type {?} */
|
|
962
|
-
var index = totals.findIndex(( /**
|
|
963
|
-
* @param {?} total
|
|
964
|
-
* @return {?}
|
|
965
|
-
*/function (/**
|
|
966
|
-
* @param {?} total
|
|
967
|
-
* @return {?}
|
|
968
|
-
*/ total) { return total.type === order.DaffOrderTotalTypeEnum.Tax; }));
|
|
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; });
|
|
969
493
|
return index > -1 ? totals[index] : null;
|
|
970
|
-
})
|
|
971
|
-
|
|
972
|
-
var selectOrderItem = i1.defaultMemoize(( /**
|
|
973
|
-
* @param {?} orderId
|
|
974
|
-
* @param {?} itemId
|
|
975
|
-
* @return {?}
|
|
976
|
-
*/function (orderId, itemId) { return i1.createSelector(selectOrderItems(orderId), ( /**
|
|
977
|
-
* @param {?} items
|
|
978
|
-
* @return {?}
|
|
979
|
-
*/function (/**
|
|
980
|
-
* @param {?} items
|
|
981
|
-
* @return {?}
|
|
982
|
-
*/ items) { return items.find(( /**
|
|
983
|
-
* @param {?} item
|
|
984
|
-
* @return {?}
|
|
985
|
-
*/function (/**
|
|
986
|
-
* @param {?} item
|
|
987
|
-
* @return {?}
|
|
988
|
-
*/ item) { return item.id === itemId; })) || null; })); })).memoized;
|
|
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;
|
|
989
496
|
return {
|
|
990
497
|
selectOrderEntitiesState: selectOrderEntitiesState,
|
|
991
498
|
selectOrderIds: selectIds,
|
|
@@ -1012,130 +519,42 @@
|
|
|
1012
519
|
selectOrderHasDiscount: selectOrderHasDiscount,
|
|
1013
520
|
selectOrderTaxTotal: selectOrderTaxTotal,
|
|
1014
521
|
};
|
|
1015
|
-
}
|
|
522
|
+
};
|
|
1016
523
|
var ɵ0$2 = createOrderEntitySelectors;
|
|
1017
|
-
var ɵ1 =
|
|
1018
|
-
* @return {?}
|
|
1019
|
-
*/ function () {
|
|
1020
|
-
/** @type {?} */
|
|
524
|
+
var ɵ1 = function () {
|
|
1021
525
|
var cache;
|
|
1022
|
-
return (
|
|
1023
|
-
* @template T
|
|
1024
|
-
* @return {?}
|
|
1025
|
-
*/function () { return cache = cache || createOrderEntitySelectors(); });
|
|
526
|
+
return function () { return cache = cache || createOrderEntitySelectors(); };
|
|
1026
527
|
};
|
|
1027
|
-
|
|
1028
|
-
var getDaffOrderEntitySelectors = ((ɵ1))();
|
|
528
|
+
var getDaffOrderEntitySelectors = (ɵ1)();
|
|
1029
529
|
|
|
1030
|
-
|
|
1031
|
-
* @fileoverview added by tsickle
|
|
1032
|
-
* Generated from: selectors/order.selector.ts
|
|
1033
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1034
|
-
*/
|
|
1035
|
-
/**
|
|
1036
|
-
* @record
|
|
1037
|
-
*/
|
|
1038
|
-
function DaffOrderSelectors() { }
|
|
1039
|
-
if (false) {
|
|
1040
|
-
/** @type {?} */
|
|
1041
|
-
DaffOrderSelectors.prototype.selectOrderState;
|
|
1042
|
-
/** @type {?} */
|
|
1043
|
-
DaffOrderSelectors.prototype.selectOrderLoading;
|
|
1044
|
-
/** @type {?} */
|
|
1045
|
-
DaffOrderSelectors.prototype.selectOrderErrors;
|
|
1046
|
-
}
|
|
1047
|
-
/** @type {?} */
|
|
1048
|
-
var createOrderSelectors = ( /**
|
|
1049
|
-
* @template T
|
|
1050
|
-
* @return {?}
|
|
1051
|
-
*/function () {
|
|
530
|
+
var createOrderSelectors = function () {
|
|
1052
531
|
var selectOrderFeatureState = getDaffOrderReducersStateSelector().selectOrderFeatureState;
|
|
1053
|
-
|
|
1054
|
-
var
|
|
1055
|
-
|
|
1056
|
-
* @return {?}
|
|
1057
|
-
*/function (/**
|
|
1058
|
-
* @param {?} state
|
|
1059
|
-
* @return {?}
|
|
1060
|
-
*/ state) { return state.order; }));
|
|
1061
|
-
/** @type {?} */
|
|
1062
|
-
var selectOrderLoading = i1.createSelector(selectOrderState, ( /**
|
|
1063
|
-
* @param {?} state
|
|
1064
|
-
* @return {?}
|
|
1065
|
-
*/function (/**
|
|
1066
|
-
* @param {?} state
|
|
1067
|
-
* @return {?}
|
|
1068
|
-
*/ state) { return state.loading; }));
|
|
1069
|
-
/** @type {?} */
|
|
1070
|
-
var selectOrderErrors = i1.createSelector(selectOrderState, ( /**
|
|
1071
|
-
* @param {?} state
|
|
1072
|
-
* @return {?}
|
|
1073
|
-
*/function (/**
|
|
1074
|
-
* @param {?} state
|
|
1075
|
-
* @return {?}
|
|
1076
|
-
*/ state) { return state.errors; }));
|
|
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; });
|
|
1077
535
|
return {
|
|
1078
536
|
selectOrderState: selectOrderState,
|
|
1079
537
|
selectOrderLoading: selectOrderLoading,
|
|
1080
538
|
selectOrderErrors: selectOrderErrors,
|
|
1081
539
|
};
|
|
1082
|
-
}
|
|
540
|
+
};
|
|
1083
541
|
var ɵ0$3 = createOrderSelectors;
|
|
1084
|
-
var ɵ1$1 =
|
|
1085
|
-
* @return {?}
|
|
1086
|
-
*/ function () {
|
|
1087
|
-
/** @type {?} */
|
|
542
|
+
var ɵ1$1 = function () {
|
|
1088
543
|
var cache;
|
|
1089
|
-
return (
|
|
1090
|
-
* @template T
|
|
1091
|
-
* @return {?}
|
|
1092
|
-
*/function () { return cache = cache || createOrderSelectors(); });
|
|
544
|
+
return function () { return cache = cache || createOrderSelectors(); };
|
|
1093
545
|
};
|
|
1094
|
-
|
|
1095
|
-
var getOrderSelectors = ((ɵ1$1))();
|
|
546
|
+
var getOrderSelectors = (ɵ1$1)();
|
|
1096
547
|
|
|
1097
|
-
|
|
1098
|
-
* @fileoverview added by tsickle
|
|
1099
|
-
* Generated from: selectors/order-all.selector.ts
|
|
1100
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1101
|
-
*/
|
|
1102
|
-
/**
|
|
1103
|
-
* @record
|
|
1104
|
-
* @template T
|
|
1105
|
-
*/
|
|
1106
|
-
function DaffOrderAllSelectors() { }
|
|
1107
|
-
var ɵ0$4 = /**
|
|
1108
|
-
* @return {?}
|
|
1109
|
-
*/ function () {
|
|
1110
|
-
/** @type {?} */
|
|
548
|
+
var ɵ0$4 = function () {
|
|
1111
549
|
var cache;
|
|
1112
|
-
return (
|
|
1113
|
-
* @template T
|
|
1114
|
-
* @return {?}
|
|
1115
|
-
*/function () { return cache = cache || Object.assign(Object.assign(Object.assign({}, getOrderSelectors()), getDaffOrderEntitySelectors()), getDaffOrderReducersStateSelector()); });
|
|
550
|
+
return function () { return cache = cache || Object.assign(Object.assign(Object.assign({}, getOrderSelectors()), getDaffOrderEntitySelectors()), getDaffOrderReducersStateSelector()); };
|
|
1116
551
|
};
|
|
1117
|
-
|
|
1118
|
-
var getDaffOrderSelectors = ((ɵ0$4))();
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* @fileoverview added by tsickle
|
|
1122
|
-
* Generated from: selectors/public_api.ts
|
|
1123
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1124
|
-
*/
|
|
552
|
+
var getDaffOrderSelectors = (ɵ0$4)();
|
|
1125
553
|
|
|
1126
554
|
/**
|
|
1127
|
-
* @
|
|
1128
|
-
* Generated from: facades/order/order.facade.ts
|
|
1129
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1130
|
-
*/
|
|
1131
|
-
/**
|
|
1132
|
-
* \@inheritdoc
|
|
1133
|
-
* @template T
|
|
555
|
+
* @inheritdoc
|
|
1134
556
|
*/
|
|
1135
557
|
var DaffOrderFacade = /** @class */ (function () {
|
|
1136
|
-
/**
|
|
1137
|
-
* @param {?} store
|
|
1138
|
-
*/
|
|
1139
558
|
function DaffOrderFacade(store) {
|
|
1140
559
|
this.store = store;
|
|
1141
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;
|
|
@@ -1164,133 +583,66 @@
|
|
|
1164
583
|
this._hasDiscount = selectOrderHasDiscount;
|
|
1165
584
|
this._tax = selectOrderTaxTotal;
|
|
1166
585
|
}
|
|
1167
|
-
/**
|
|
1168
|
-
* @param {?} orderId
|
|
1169
|
-
* @return {?}
|
|
1170
|
-
*/
|
|
1171
586
|
DaffOrderFacade.prototype.getOrder$ = function (orderId) {
|
|
1172
587
|
return this.store.pipe(i1.select(this._order(orderId)));
|
|
1173
588
|
};
|
|
1174
|
-
/**
|
|
1175
|
-
* @param {?} orderId
|
|
1176
|
-
* @return {?}
|
|
1177
|
-
*/
|
|
1178
589
|
DaffOrderFacade.prototype.getTotals$ = function (orderId) {
|
|
1179
590
|
return this.store.pipe(i1.select(this._totals(orderId)));
|
|
1180
591
|
};
|
|
1181
|
-
/**
|
|
1182
|
-
* @param {?} orderId
|
|
1183
|
-
* @return {?}
|
|
1184
|
-
*/
|
|
1185
592
|
DaffOrderFacade.prototype.getAppliedCodes$ = function (orderId) {
|
|
1186
593
|
return this.store.pipe(i1.select(this._appliedCodes(orderId)));
|
|
1187
594
|
};
|
|
1188
|
-
/**
|
|
1189
|
-
* @param {?} orderId
|
|
1190
|
-
* @return {?}
|
|
1191
|
-
*/
|
|
1192
595
|
DaffOrderFacade.prototype.getItems$ = function (orderId) {
|
|
1193
596
|
return this.store.pipe(i1.select(this._items(orderId)));
|
|
1194
597
|
};
|
|
1195
|
-
/**
|
|
1196
|
-
* @param {?} orderId
|
|
1197
|
-
* @return {?}
|
|
1198
|
-
*/
|
|
1199
598
|
DaffOrderFacade.prototype.getBillingAddresses$ = function (orderId) {
|
|
1200
599
|
return this.store.pipe(i1.select(this._billingAddresses(orderId)));
|
|
1201
600
|
};
|
|
1202
|
-
/**
|
|
1203
|
-
* @param {?} orderId
|
|
1204
|
-
* @return {?}
|
|
1205
|
-
*/
|
|
1206
601
|
DaffOrderFacade.prototype.getShippingAddresses$ = function (orderId) {
|
|
1207
602
|
return this.store.pipe(i1.select(this._shippingAddresses(orderId)));
|
|
1208
603
|
};
|
|
1209
|
-
/**
|
|
1210
|
-
* @param {?} orderId
|
|
1211
|
-
* @return {?}
|
|
1212
|
-
*/
|
|
1213
604
|
DaffOrderFacade.prototype.getShipments$ = function (orderId) {
|
|
1214
605
|
return this.store.pipe(i1.select(this._shipments(orderId)));
|
|
1215
606
|
};
|
|
1216
|
-
/**
|
|
1217
|
-
* @param {?} orderId
|
|
1218
|
-
* @return {?}
|
|
1219
|
-
*/
|
|
1220
607
|
DaffOrderFacade.prototype.getPayment$ = function (orderId) {
|
|
1221
608
|
return this.store.pipe(i1.select(this._payment(orderId)));
|
|
1222
609
|
};
|
|
1223
|
-
/**
|
|
1224
|
-
* @param {?} orderId
|
|
1225
|
-
* @return {?}
|
|
1226
|
-
*/
|
|
1227
610
|
DaffOrderFacade.prototype.getInvoices$ = function (orderId) {
|
|
1228
611
|
return this.store.pipe(i1.select(this._invoices(orderId)));
|
|
1229
612
|
};
|
|
1230
|
-
/**
|
|
1231
|
-
* @param {?} orderId
|
|
1232
|
-
* @return {?}
|
|
1233
|
-
*/
|
|
1234
613
|
DaffOrderFacade.prototype.getCredits$ = function (orderId) {
|
|
1235
614
|
return this.store.pipe(i1.select(this._credits(orderId)));
|
|
1236
615
|
};
|
|
1237
|
-
/**
|
|
1238
|
-
* @param {?} orderId
|
|
1239
|
-
* @return {?}
|
|
1240
|
-
*/
|
|
1241
616
|
DaffOrderFacade.prototype.getGrandTotal$ = function (orderId) {
|
|
1242
617
|
return this.store.pipe(i1.select(this._grandTotal(orderId)));
|
|
1243
618
|
};
|
|
1244
619
|
;
|
|
1245
|
-
/**
|
|
1246
|
-
* @param {?} orderId
|
|
1247
|
-
* @return {?}
|
|
1248
|
-
*/
|
|
1249
620
|
DaffOrderFacade.prototype.getSubtotal$ = function (orderId) {
|
|
1250
621
|
return this.store.pipe(i1.select(this._subtotal(orderId)));
|
|
1251
622
|
};
|
|
1252
623
|
;
|
|
1253
|
-
/**
|
|
1254
|
-
* @param {?} orderId
|
|
1255
|
-
* @return {?}
|
|
1256
|
-
*/
|
|
1257
624
|
DaffOrderFacade.prototype.getShippingTotal$ = function (orderId) {
|
|
1258
625
|
return this.store.pipe(i1.select(this._shipping(orderId)));
|
|
1259
626
|
};
|
|
1260
627
|
;
|
|
1261
|
-
/**
|
|
1262
|
-
* @param {?} orderId
|
|
1263
|
-
* @return {?}
|
|
1264
|
-
*/
|
|
1265
628
|
DaffOrderFacade.prototype.getDiscountTotal$ = function (orderId) {
|
|
1266
629
|
return this.store.pipe(i1.select(this._discount(orderId)));
|
|
1267
630
|
};
|
|
1268
631
|
;
|
|
1269
|
-
/**
|
|
1270
|
-
* @param {?} orderId
|
|
1271
|
-
* @return {?}
|
|
1272
|
-
*/
|
|
1273
632
|
DaffOrderFacade.prototype.hasDiscount$ = function (orderId) {
|
|
1274
633
|
return this.store.pipe(i1.select(this._hasDiscount(orderId)));
|
|
1275
634
|
};
|
|
1276
635
|
;
|
|
1277
|
-
/**
|
|
1278
|
-
* @param {?} orderId
|
|
1279
|
-
* @return {?}
|
|
1280
|
-
*/
|
|
1281
636
|
DaffOrderFacade.prototype.getTaxTotal$ = function (orderId) {
|
|
1282
637
|
return this.store.pipe(i1.select(this._tax(orderId)));
|
|
1283
638
|
};
|
|
1284
639
|
;
|
|
1285
|
-
/**
|
|
1286
|
-
* @param {?} action
|
|
1287
|
-
* @return {?}
|
|
1288
|
-
*/
|
|
1289
640
|
DaffOrderFacade.prototype.dispatch = function (action) {
|
|
1290
641
|
this.store.dispatch(action);
|
|
1291
642
|
};
|
|
1292
643
|
return DaffOrderFacade;
|
|
1293
644
|
}());
|
|
645
|
+
/** @nocollapse */ DaffOrderFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderFacade_Factory() { return new DaffOrderFacade(i0.ɵɵinject(i1.Store)); }, token: DaffOrderFacade, providedIn: "root" });
|
|
1294
646
|
DaffOrderFacade.decorators = [
|
|
1295
647
|
{ type: i0.Injectable, args: [{
|
|
1296
648
|
providedIn: 'root',
|
|
@@ -1300,74 +652,6 @@
|
|
|
1300
652
|
DaffOrderFacade.ctorParameters = function () { return [
|
|
1301
653
|
{ type: i1.Store }
|
|
1302
654
|
]; };
|
|
1303
|
-
/** @nocollapse */ DaffOrderFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderFacade_Factory() { return new DaffOrderFacade(i0.ɵɵinject(i1.Store)); }, token: DaffOrderFacade, providedIn: "root" });
|
|
1304
|
-
if (false) {
|
|
1305
|
-
/** @type {?} */
|
|
1306
|
-
DaffOrderFacade.prototype.loading$;
|
|
1307
|
-
/** @type {?} */
|
|
1308
|
-
DaffOrderFacade.prototype.errors$;
|
|
1309
|
-
/** @type {?} */
|
|
1310
|
-
DaffOrderFacade.prototype.orders$;
|
|
1311
|
-
/** @type {?} */
|
|
1312
|
-
DaffOrderFacade.prototype.orderIds$;
|
|
1313
|
-
/** @type {?} */
|
|
1314
|
-
DaffOrderFacade.prototype.orderCount$;
|
|
1315
|
-
/** @type {?} */
|
|
1316
|
-
DaffOrderFacade.prototype.orderEntities$;
|
|
1317
|
-
/** @type {?} */
|
|
1318
|
-
DaffOrderFacade.prototype.placedOrder$;
|
|
1319
|
-
/** @type {?} */
|
|
1320
|
-
DaffOrderFacade.prototype.hasPlacedOrder$;
|
|
1321
|
-
/** @type {?} */
|
|
1322
|
-
DaffOrderFacade.prototype._order;
|
|
1323
|
-
/** @type {?} */
|
|
1324
|
-
DaffOrderFacade.prototype._totals;
|
|
1325
|
-
/** @type {?} */
|
|
1326
|
-
DaffOrderFacade.prototype._appliedCodes;
|
|
1327
|
-
/** @type {?} */
|
|
1328
|
-
DaffOrderFacade.prototype._items;
|
|
1329
|
-
/** @type {?} */
|
|
1330
|
-
DaffOrderFacade.prototype._billingAddresses;
|
|
1331
|
-
/** @type {?} */
|
|
1332
|
-
DaffOrderFacade.prototype._shippingAddresses;
|
|
1333
|
-
/** @type {?} */
|
|
1334
|
-
DaffOrderFacade.prototype._shipments;
|
|
1335
|
-
/** @type {?} */
|
|
1336
|
-
DaffOrderFacade.prototype._payment;
|
|
1337
|
-
/** @type {?} */
|
|
1338
|
-
DaffOrderFacade.prototype._invoices;
|
|
1339
|
-
/** @type {?} */
|
|
1340
|
-
DaffOrderFacade.prototype._credits;
|
|
1341
|
-
/** @type {?} */
|
|
1342
|
-
DaffOrderFacade.prototype._grandTotal;
|
|
1343
|
-
/** @type {?} */
|
|
1344
|
-
DaffOrderFacade.prototype._subtotal;
|
|
1345
|
-
/** @type {?} */
|
|
1346
|
-
DaffOrderFacade.prototype._shipping;
|
|
1347
|
-
/** @type {?} */
|
|
1348
|
-
DaffOrderFacade.prototype._discount;
|
|
1349
|
-
/** @type {?} */
|
|
1350
|
-
DaffOrderFacade.prototype._hasDiscount;
|
|
1351
|
-
/** @type {?} */
|
|
1352
|
-
DaffOrderFacade.prototype._tax;
|
|
1353
|
-
/**
|
|
1354
|
-
* @type {?}
|
|
1355
|
-
* @private
|
|
1356
|
-
*/
|
|
1357
|
-
DaffOrderFacade.prototype.store;
|
|
1358
|
-
/* Skipping unhandled member: ;*/
|
|
1359
|
-
/* Skipping unhandled member: ;*/
|
|
1360
|
-
/* Skipping unhandled member: ;*/
|
|
1361
|
-
/* Skipping unhandled member: ;*/
|
|
1362
|
-
/* Skipping unhandled member: ;*/
|
|
1363
|
-
/* Skipping unhandled member: ;*/
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* @fileoverview added by tsickle
|
|
1368
|
-
* Generated from: facades/public_api.ts
|
|
1369
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1370
|
-
*/
|
|
1371
655
|
|
|
1372
656
|
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1373
657
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1383,15 +667,7 @@
|
|
|
1383
667
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1384
668
|
return Reflect.metadata(k, v);
|
|
1385
669
|
};
|
|
1386
|
-
/**
|
|
1387
|
-
* @template T, V
|
|
1388
|
-
*/
|
|
1389
670
|
var DaffOrderEffects = /** @class */ (function () {
|
|
1390
|
-
/**
|
|
1391
|
-
* @param {?} actions$
|
|
1392
|
-
* @param {?} driver
|
|
1393
|
-
* @param {?} errorMatcher
|
|
1394
|
-
*/
|
|
1395
671
|
function DaffOrderEffects(actions$, driver, errorMatcher) {
|
|
1396
672
|
var _this = this;
|
|
1397
673
|
this.actions$ = actions$;
|
|
@@ -1400,35 +676,11 @@
|
|
|
1400
676
|
/**
|
|
1401
677
|
* An effect for the loading of an order.
|
|
1402
678
|
*/
|
|
1403
|
-
this.get$ = this.actions$.pipe(effects.ofType(DaffOrderActionTypes.OrderLoadAction), operators.switchMap((
|
|
1404
|
-
* @param {?} action
|
|
1405
|
-
* @return {?}
|
|
1406
|
-
*/function (action) { return _this.driver.get(action.orderId, action.cartId).pipe(operators.map(( /**
|
|
1407
|
-
* @param {?} resp
|
|
1408
|
-
* @return {?}
|
|
1409
|
-
*/function (/**
|
|
1410
|
-
* @param {?} resp
|
|
1411
|
-
* @return {?}
|
|
1412
|
-
*/ resp) { return new DaffOrderLoadSuccess(resp); })), operators.catchError(( /**
|
|
1413
|
-
* @param {?} error
|
|
1414
|
-
* @return {?}
|
|
1415
|
-
*/function (error) { return rxjs.of(new DaffOrderLoadFailure(_this.errorMatcher(error))); }))); })));
|
|
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))); })); }));
|
|
1416
680
|
/**
|
|
1417
681
|
* An effect for the listing of orders.
|
|
1418
682
|
*/
|
|
1419
|
-
this.list$ = this.actions$.pipe(effects.ofType(DaffOrderActionTypes.OrderListAction), operators.switchMap((
|
|
1420
|
-
* @param {?} action
|
|
1421
|
-
* @return {?}
|
|
1422
|
-
*/function (action) { return _this.driver.list(action.payload).pipe(operators.map(( /**
|
|
1423
|
-
* @param {?} resp
|
|
1424
|
-
* @return {?}
|
|
1425
|
-
*/function (/**
|
|
1426
|
-
* @param {?} resp
|
|
1427
|
-
* @return {?}
|
|
1428
|
-
*/ resp) { return new DaffOrderListSuccess(resp); })), operators.catchError(( /**
|
|
1429
|
-
* @param {?} error
|
|
1430
|
-
* @return {?}
|
|
1431
|
-
*/function (error) { return rxjs.of(new DaffOrderListFailure(_this.errorMatcher(error))); }))); })));
|
|
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))); })); }));
|
|
1432
684
|
}
|
|
1433
685
|
return DaffOrderEffects;
|
|
1434
686
|
}());
|
|
@@ -1449,39 +701,7 @@
|
|
|
1449
701
|
effects.Effect(),
|
|
1450
702
|
__metadata$1("design:type", Object)
|
|
1451
703
|
], DaffOrderEffects.prototype, "list$", void 0);
|
|
1452
|
-
if (false) {
|
|
1453
|
-
/**
|
|
1454
|
-
* An effect for the loading of an order.
|
|
1455
|
-
* @type {?}
|
|
1456
|
-
*/
|
|
1457
|
-
DaffOrderEffects.prototype.get$;
|
|
1458
|
-
/**
|
|
1459
|
-
* An effect for the listing of orders.
|
|
1460
|
-
* @type {?}
|
|
1461
|
-
*/
|
|
1462
|
-
DaffOrderEffects.prototype.list$;
|
|
1463
|
-
/**
|
|
1464
|
-
* @type {?}
|
|
1465
|
-
* @private
|
|
1466
|
-
*/
|
|
1467
|
-
DaffOrderEffects.prototype.actions$;
|
|
1468
|
-
/**
|
|
1469
|
-
* @type {?}
|
|
1470
|
-
* @private
|
|
1471
|
-
*/
|
|
1472
|
-
DaffOrderEffects.prototype.driver;
|
|
1473
|
-
/**
|
|
1474
|
-
* @type {?}
|
|
1475
|
-
* @private
|
|
1476
|
-
*/
|
|
1477
|
-
DaffOrderEffects.prototype.errorMatcher;
|
|
1478
|
-
}
|
|
1479
704
|
|
|
1480
|
-
/**
|
|
1481
|
-
* @fileoverview added by tsickle
|
|
1482
|
-
* Generated from: order-state.module.ts
|
|
1483
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1484
|
-
*/
|
|
1485
705
|
var DaffOrderStateModule = /** @class */ (function () {
|
|
1486
706
|
function DaffOrderStateModule() {
|
|
1487
707
|
}
|
|
@@ -1500,25 +720,10 @@
|
|
|
1500
720
|
];
|
|
1501
721
|
|
|
1502
722
|
/**
|
|
1503
|
-
*
|
|
1504
|
-
* Generated from: public_api.ts
|
|
1505
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1506
|
-
*/
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* @fileoverview added by tsickle
|
|
1510
|
-
* Generated from: index.ts
|
|
1511
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1512
|
-
*/
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* @fileoverview added by tsickle
|
|
1516
|
-
* Generated from: daffodil-order-state.ts
|
|
1517
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
723
|
+
* Generated bundle index. Do not edit.
|
|
1518
724
|
*/
|
|
1519
725
|
|
|
1520
726
|
exports.DAFF_ORDER_STORE_FEATURE_KEY = DAFF_ORDER_STORE_FEATURE_KEY;
|
|
1521
|
-
exports.DaffOrderActionTypes = DaffOrderActionTypes;
|
|
1522
727
|
exports.DaffOrderFacade = DaffOrderFacade;
|
|
1523
728
|
exports.DaffOrderList = DaffOrderList;
|
|
1524
729
|
exports.DaffOrderListFailure = DaffOrderListFailure;
|
|
@@ -1534,6 +739,7 @@
|
|
|
1534
739
|
exports.daffOrderReducer = daffOrderReducer;
|
|
1535
740
|
exports.daffOrderReducers = daffOrderReducers;
|
|
1536
741
|
exports.getDaffOrderSelectors = getDaffOrderSelectors;
|
|
742
|
+
exports.ɵ0 = ɵ0$4;
|
|
1537
743
|
exports.ɵa = DaffOrderEffects;
|
|
1538
744
|
|
|
1539
745
|
Object.defineProperty(exports, '__esModule', { value: true });
|