@daffodil/cart 0.63.2 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/in-memory/backend/cart-root.service.d.ts +2 -2
- package/driver/magento/transforms/inputs/billing-address.service.d.ts +1 -1
- package/driver/magento/transforms/inputs/shipping-address.service.d.ts +1 -1
- package/driver/magento/transforms/outputs/billing-address.service.d.ts +1 -1
- package/driver/magento/transforms/outputs/cart-shipping-information.service.d.ts +1 -1
- package/driver/magento/transforms/outputs/cart.service.d.ts +2 -2
- package/driver/magento/transforms/outputs/shipping-address.service.d.ts +1 -1
- package/esm2020/driver/in-memory/backend/cart/cart.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-address/cart-address.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-coupon/cart-coupon.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-items/cart-items.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-order/cart-order.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-payment/cart-payment.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-root.service.mjs +6 -6
- package/esm2020/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.mjs +3 -3
- package/esm2020/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart/cart.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-address/cart-address.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-coupon/cart-coupon.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-driver.module.mjs +7 -9
- package/esm2020/driver/in-memory/drivers/cart-item/cart-item.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-order/cart-order.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-payment/cart-payment.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.mjs +3 -3
- package/esm2020/driver/magento/cart-address.service.mjs +3 -3
- package/esm2020/driver/magento/cart-billing-address.service.mjs +3 -3
- package/esm2020/driver/magento/cart-coupon.service.mjs +3 -3
- package/esm2020/driver/magento/cart-driver.module.mjs +5 -7
- package/esm2020/driver/magento/cart-item.service.mjs +3 -3
- package/esm2020/driver/magento/cart-order.service.mjs +3 -3
- package/esm2020/driver/magento/cart-payment-methods.service.mjs +3 -3
- package/esm2020/driver/magento/cart-payment.service.mjs +3 -3
- package/esm2020/driver/magento/cart-shipping-address.service.mjs +3 -3
- package/esm2020/driver/magento/cart-shipping-information.service.mjs +3 -3
- package/esm2020/driver/magento/cart-shipping-methods.service.mjs +3 -3
- package/esm2020/driver/magento/cart.service.mjs +3 -3
- package/esm2020/driver/magento/errors/map.mjs +2 -2
- package/esm2020/driver/magento/errors/transform.mjs +1 -1
- package/esm2020/driver/magento/queries/add-item/query.mjs +1 -1
- package/esm2020/driver/magento/queries/apply-coupon/query.mjs +1 -1
- package/esm2020/driver/magento/queries/get-billing-address/query.mjs +1 -1
- package/esm2020/driver/magento/queries/get-cart/query.mjs +1 -1
- package/esm2020/driver/magento/queries/get-selected-payment-method/query.mjs +1 -1
- package/esm2020/driver/magento/queries/get-selected-shipping-method/query.mjs +1 -1
- package/esm2020/driver/magento/queries/get-shipping-address/query.mjs +1 -1
- package/esm2020/driver/magento/queries/list-coupons/query.mjs +1 -1
- package/esm2020/driver/magento/queries/list-items/query.mjs +1 -1
- package/esm2020/driver/magento/queries/list-payment-methods/query.mjs +1 -1
- package/esm2020/driver/magento/queries/merge-carts/query.mjs +1 -1
- package/esm2020/driver/magento/queries/remove-all-coupons/query.mjs +1 -1
- package/esm2020/driver/magento/queries/remove-item/query.mjs +1 -1
- package/esm2020/driver/magento/queries/set-selected-payment-method/query.mjs +1 -1
- package/esm2020/driver/magento/queries/set-selected-payment-method-with-billing/query.mjs +1 -1
- package/esm2020/driver/magento/queries/set-selected-payment-method-with-billing-and-email/query.mjs +1 -1
- package/esm2020/driver/magento/queries/set-selected-shipping-method/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-address/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-address-with-email/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-billing-address/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-billing-address-with-email/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-item/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-shipping-address/query.mjs +1 -1
- package/esm2020/driver/magento/queries/update-shipping-address-with-email/query.mjs +1 -1
- package/esm2020/driver/magento/testing/factories/cart-address-input.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-address.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-coupon.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-item/cart-item.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-payment-method.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart-shipping-method.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/cart.factory.mjs +3 -3
- package/esm2020/driver/magento/testing/factories/shipping-address.factory.mjs +3 -3
- package/esm2020/driver/magento/transforms/inputs/billing-address.service.mjs +4 -4
- package/esm2020/driver/magento/transforms/inputs/cart-address.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/inputs/cart-item-update.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/inputs/payment-method.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/inputs/shipping-address.service.mjs +4 -4
- package/esm2020/driver/magento/transforms/inputs/shipping-method.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/outputs/billing-address.service.mjs +4 -4
- package/esm2020/driver/magento/transforms/outputs/cart-address.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/outputs/cart-coupon-response.service.mjs +5 -5
- package/esm2020/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.mjs +1 -1
- package/esm2020/driver/magento/transforms/outputs/cart-item/cart-item-transformer.mjs +2 -2
- package/esm2020/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.mjs +1 -1
- package/esm2020/driver/magento/transforms/outputs/cart-payment.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/outputs/cart-shipping-information.service.mjs +4 -4
- package/esm2020/driver/magento/transforms/outputs/cart-shipping-rate.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/outputs/cart.service.mjs +5 -5
- package/esm2020/driver/magento/transforms/outputs/shipping-address.service.mjs +4 -4
- package/esm2020/driver/services/resolve.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart/cart.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-address/cart-address.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-billing-address/cart-billing-address.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-coupon/cart-coupon.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-driver.module.mjs +7 -9
- package/esm2020/driver/testing/drivers/cart-item/cart-item.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-order/cart-order.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-payment/cart-payment.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.mjs +3 -3
- package/esm2020/routing/cart-routing.module.mjs +4 -4
- package/esm2020/routing/guards/billing-address/billing-address.guard.mjs +3 -3
- package/esm2020/routing/guards/cart-items/cart-items.guard.mjs +3 -3
- package/esm2020/routing/guards/in-stock-items/in-stock-items.guard.mjs +3 -3
- package/esm2020/routing/guards/order-result/order-result.guard.mjs +3 -3
- package/esm2020/routing/guards/payment-method/payment-method.guard.mjs +3 -3
- package/esm2020/routing/guards/resolve-cart/resolve-cart.guard.mjs +3 -3
- package/esm2020/routing/guards/resolved-cart/resolved-cart.guard.mjs +3 -3
- package/esm2020/routing/guards/shipping-address/shipping-address.guard.mjs +3 -3
- package/esm2020/routing/guards/shipping-method/shipping-method.guard.mjs +3 -3
- package/esm2020/routing/resolvers/cart-resolver.service.mjs +3 -3
- package/esm2020/routing/resolvers/empty-cart-resolver.service.mjs +3 -3
- package/esm2020/state/cart-state.module.mjs +21 -23
- package/esm2020/state/effects/cart-address.effects.mjs +3 -3
- package/esm2020/state/effects/cart-billing-address.effects.mjs +3 -3
- package/esm2020/state/effects/cart-coupon.effects.mjs +3 -3
- package/esm2020/state/effects/cart-item.effects.mjs +3 -3
- package/esm2020/state/effects/cart-order.effects.mjs +3 -3
- package/esm2020/state/effects/cart-payment-methods.effects.mjs +3 -3
- package/esm2020/state/effects/cart-payment-processor.effects.mjs +3 -3
- package/esm2020/state/effects/cart-payment.effects.mjs +3 -3
- package/esm2020/state/effects/cart-resolver.effects.mjs +3 -3
- package/esm2020/state/effects/cart-shipping-address.effects.mjs +3 -3
- package/esm2020/state/effects/cart-shipping-information.effects.mjs +3 -3
- package/esm2020/state/effects/cart-shipping-methods.effects.mjs +3 -3
- package/esm2020/state/effects/cart.effects.mjs +3 -3
- package/esm2020/state/facades/cart/cart.facade.mjs +4 -4
- package/esm2020/state/reducers/cart/cart.reducer.mjs +8 -8
- package/esm2020/state/reducers/cart-billing-address/cart-billing-address.reducer.mjs +6 -6
- package/esm2020/state/reducers/cart-coupon/cart-coupon.reducer.mjs +6 -6
- package/esm2020/state/reducers/cart-initial-state.mjs +11 -10
- package/esm2020/state/reducers/cart-item/cart-item.reducer.mjs +10 -10
- package/esm2020/state/reducers/cart-item-entities/cart-item-entities.reducer.mjs +2 -2
- package/esm2020/state/reducers/cart-order/cart-order-initial-state.mjs +2 -2
- package/esm2020/state/reducers/cart-order/cart-order.reducer.mjs +5 -5
- package/esm2020/state/reducers/cart-payment/cart-payment.reducer.mjs +7 -7
- package/esm2020/state/reducers/cart-payment-methods/cart-payment-methods.reducer.mjs +4 -4
- package/esm2020/state/reducers/cart-reducers-state.interface.mjs +1 -1
- package/esm2020/state/reducers/cart-resolve/cart-resolve.reducer.mjs +2 -2
- package/esm2020/state/reducers/cart-shipping-address/cart-shipping-address.reducer.mjs +6 -6
- package/esm2020/state/reducers/cart-shipping-information/cart-shipping-information.reducer.mjs +6 -6
- package/esm2020/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.mjs +4 -4
- package/esm2020/state/reducers/cart.reducer.mjs +3 -3
- package/esm2020/state/reducers/errors/error-state-helpers.mjs +1 -1
- package/esm2020/state/reducers/token/reducers.token.mjs +2 -2
- package/esm2020/state/selectors/cart/cart.selector.mjs +26 -26
- package/esm2020/state/selectors/cart-order/cart-order.selector.mjs +3 -3
- package/esm2020/state/selectors/cart.selector.mjs +2 -2
- package/esm2020/state/testing/cart-testing.module.mjs +4 -4
- package/esm2020/state/testing/factories/stateful-cart-item.factory.mjs +3 -3
- package/esm2020/state/testing/factories/stateful-composite-cart-item.factory.mjs +3 -3
- package/esm2020/state/testing/factories/stateful-configurable-cart-item.factory.mjs +3 -3
- package/esm2020/state/testing/mock-cart-facade.mjs +3 -3
- package/esm2020/storage/cart-storage.service.mjs +3 -3
- package/esm2020/testing/factories/cart-address.factory.mjs +3 -3
- package/esm2020/testing/factories/cart-coupon.factory.mjs +3 -3
- package/esm2020/testing/factories/cart-item/cart-item.factory.mjs +3 -3
- package/esm2020/testing/factories/cart-item/composite-cart-item.factory.mjs +3 -3
- package/esm2020/testing/factories/cart-item/configurable-cart-item.factory.mjs +3 -3
- package/esm2020/testing/factories/cart-payment.factory.mjs +3 -3
- package/esm2020/testing/factories/cart-shipping-rate.factory.mjs +3 -3
- package/esm2020/testing/factories/cart.factory.mjs +3 -3
- package/fesm2015/daffodil-cart-driver-in-memory.mjs +73 -75
- package/fesm2015/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento-testing.mjs +30 -30
- package/fesm2015/daffodil-cart-driver-magento.mjs +152 -154
- package/fesm2015/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-cart-driver-testing.mjs +37 -39
- package/fesm2015/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2015/daffodil-cart-driver.mjs +3 -3
- package/fesm2015/daffodil-cart-routing.mjs +37 -37
- package/fesm2015/daffodil-cart-state-testing.mjs +16 -16
- package/fesm2015/daffodil-cart-state.mjs +252 -253
- package/fesm2015/daffodil-cart-state.mjs.map +1 -1
- package/fesm2015/daffodil-cart-testing.mjs +24 -24
- package/fesm2015/daffodil-cart.mjs +3 -3
- package/fesm2020/daffodil-cart-driver-in-memory.mjs +205 -207
- package/fesm2020/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2020/daffodil-cart-driver-magento-testing.mjs +30 -30
- package/fesm2020/daffodil-cart-driver-magento.mjs +153 -155
- package/fesm2020/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-cart-driver-testing.mjs +37 -39
- package/fesm2020/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2020/daffodil-cart-driver.mjs +3 -3
- package/fesm2020/daffodil-cart-routing.mjs +37 -37
- package/fesm2020/daffodil-cart-state-testing.mjs +16 -16
- package/fesm2020/daffodil-cart-state.mjs +319 -320
- package/fesm2020/daffodil-cart-state.mjs.map +1 -1
- package/fesm2020/daffodil-cart-testing.mjs +24 -24
- package/fesm2020/daffodil-cart.mjs +3 -3
- package/package.json +1 -1
- package/state/facades/cart/cart.facade.d.ts +1 -1
- package/state/reducers/cart-order/cart-order.reducer.d.ts +1 -1
- package/state/reducers/cart-reducers-state.interface.d.ts +1 -1
- package/state/reducers/errors/error-state-helpers.d.ts +1 -1
- package/state/selectors/cart.selector.d.ts +2 -2
- package/daffodil-cart.d.ts +0 -5
- package/driver/daffodil-cart-driver.d.ts +0 -5
- package/driver/in-memory/daffodil-cart-driver-in-memory.d.ts +0 -5
- package/driver/in-memory/package.json +0 -1
- package/driver/magento/daffodil-cart-driver-magento.d.ts +0 -5
- package/driver/magento/package.json +0 -1
- package/driver/magento/testing/daffodil-cart-driver-magento-testing.d.ts +0 -5
- package/driver/magento/testing/package.json +0 -1
- package/driver/package.json +0 -1
- package/driver/testing/daffodil-cart-driver-testing.d.ts +0 -5
- package/driver/testing/package.json +0 -1
- package/routing/daffodil-cart-routing.d.ts +0 -5
- package/routing/package.json +0 -1
- package/state/daffodil-cart-state.d.ts +0 -5
- package/state/package.json +0 -1
- package/state/testing/daffodil-cart-state-testing.d.ts +0 -5
- package/state/testing/package.json +0 -1
- package/testing/daffodil-cart-testing.d.ts +0 -5
- package/testing/package.json +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as i1$1 from '@ngrx/store';
|
|
2
2
|
import { createFeatureSelector, createSelector, defaultMemoize, select, combineReducers, StoreModule } from '@ngrx/store';
|
|
3
|
+
import * as i2 from '@daffodil/cart';
|
|
4
|
+
import { DaffCartItemInputType, DaffCartTotalTypeEnum, DAFF_CART_ERROR_MATCHER, DaffCartResolutionError, DaffCartStorageResolutionError, DaffCartServerSideResolutionError, DaffCartPaymentMethodIdMap } from '@daffodil/cart';
|
|
5
|
+
import { daffComparePersonalAddresses } from '@daffodil/geography';
|
|
3
6
|
import { createEntityAdapter } from '@ngrx/entity';
|
|
4
7
|
import { daffComposeReducers } from '@daffodil/core/state';
|
|
5
8
|
import * as i4 from '@daffodil/cart/driver';
|
|
6
9
|
import { DaffCartDriverErrorCodes, DaffCartAddressDriver, DaffCartBillingAddressDriver, DaffCartCouponDriver, daffCartDriverHandleCartNotFound, DaffCartItemDriver, DaffCartOrderDriver, DaffCartPaymentMethodsDriver, DaffCartPaymentDriver, DaffCartShippingAddressDriver, DaffCartShippingInformationDriver, DaffCartShippingMethodsDriver, DaffCartDriver } from '@daffodil/cart/driver';
|
|
7
10
|
import * as i0 from '@angular/core';
|
|
8
11
|
import { InjectionToken, Injectable, Inject, PLATFORM_ID, inject, NgModule } from '@angular/core';
|
|
9
|
-
import * as i2 from '@daffodil/cart';
|
|
10
|
-
import { DaffCartItemInputType, DaffCartTotalTypeEnum, DAFF_CART_ERROR_MATCHER, DaffCartResolutionError, DaffCartStorageResolutionError, DaffCartServerSideResolutionError, DaffCartPaymentMethodIdMap } from '@daffodil/cart';
|
|
11
12
|
import { daffAdd, DaffStorageServiceError, DaffInheritableError, DaffServerSideStorageError } from '@daffodil/core';
|
|
12
|
-
import { daffComparePersonalAddresses } from '@daffodil/geography';
|
|
13
13
|
import * as i1 from '@ngrx/effects';
|
|
14
14
|
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
15
|
-
import { DaffPaymentGenerateTokenFailure, DAFF_PAYMENT_PROCESSOR_COLLECTION,
|
|
15
|
+
import { DaffPaymentGenerateTokenFailure, DAFF_PAYMENT_PROCESSOR_COLLECTION, DaffPaymentStateReducerAdapter, daffPaymentInitialState, daffPaymentProvideExtraReducers } from '@daffodil/payment/state';
|
|
16
16
|
import { defer, of, combineLatest, iif, EMPTY } from 'rxjs';
|
|
17
17
|
import { switchMap, map, catchError, concatMap, mergeMap, debounceTime, take, tap } from 'rxjs/operators';
|
|
18
18
|
import { DAFF_PAYMENT_ERROR_MATCHER } from '@daffodil/payment';
|
|
@@ -1055,6 +1055,14 @@ class DaffCartCouponClearErrors {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
|
+
/**
|
|
1059
|
+
* Cart Item Entities Adapter for changing/overwriting entity state.
|
|
1060
|
+
*/
|
|
1061
|
+
const daffCartItemEntitiesAdapter = (() => {
|
|
1062
|
+
let cache;
|
|
1063
|
+
return () => cache = cache || createEntityAdapter({ selectId: item => item.id });
|
|
1064
|
+
})();
|
|
1065
|
+
|
|
1058
1066
|
var DaffCartItemStateEnum;
|
|
1059
1067
|
(function (DaffCartItemStateEnum) {
|
|
1060
1068
|
DaffCartItemStateEnum["New"] = "new";
|
|
@@ -1064,14 +1072,6 @@ var DaffCartItemStateEnum;
|
|
|
1064
1072
|
DaffCartItemStateEnum["Default"] = "default";
|
|
1065
1073
|
})(DaffCartItemStateEnum || (DaffCartItemStateEnum = {}));
|
|
1066
1074
|
|
|
1067
|
-
/**
|
|
1068
|
-
* Cart Item Entities Adapter for changing/overwriting entity state.
|
|
1069
|
-
*/
|
|
1070
|
-
const daffCartItemEntitiesAdapter = (() => {
|
|
1071
|
-
let cache;
|
|
1072
|
-
return () => cache = cache || createEntityAdapter({ selectId: item => item.id });
|
|
1073
|
-
})();
|
|
1074
|
-
|
|
1075
1075
|
/**
|
|
1076
1076
|
* Reducer function that catches actions and changes/overwrites product entities state.
|
|
1077
1077
|
*
|
|
@@ -1162,7 +1162,7 @@ const daffCartOrderInitialState = {
|
|
|
1162
1162
|
orderId: null,
|
|
1163
1163
|
cartId: null,
|
|
1164
1164
|
},
|
|
1165
|
-
loading: "Stable" /* Complete */,
|
|
1165
|
+
loading: "Stable" /* DaffState.Complete */,
|
|
1166
1166
|
errors: [],
|
|
1167
1167
|
};
|
|
1168
1168
|
|
|
@@ -1171,19 +1171,19 @@ function daffCartOrderReducer(state = daffCartOrderInitialState, action) {
|
|
|
1171
1171
|
case DaffCartOrderActionTypes.CartPlaceOrderAction:
|
|
1172
1172
|
return {
|
|
1173
1173
|
...state,
|
|
1174
|
-
loading: "Mutating" /* Mutating */,
|
|
1174
|
+
loading: "Mutating" /* DaffState.Mutating */,
|
|
1175
1175
|
};
|
|
1176
1176
|
case DaffCartOrderActionTypes.CartPlaceOrderSuccessAction:
|
|
1177
1177
|
return {
|
|
1178
1178
|
...state,
|
|
1179
1179
|
errors: [],
|
|
1180
|
-
loading: "Stable" /* Complete */,
|
|
1180
|
+
loading: "Stable" /* DaffState.Complete */,
|
|
1181
1181
|
cartOrderResult: action.payload,
|
|
1182
1182
|
};
|
|
1183
1183
|
case DaffCartOrderActionTypes.CartPlaceOrderFailureAction:
|
|
1184
1184
|
return {
|
|
1185
1185
|
...state,
|
|
1186
|
-
loading: "Stable" /* Complete */,
|
|
1186
|
+
loading: "Stable" /* DaffState.Complete */,
|
|
1187
1187
|
errors: [
|
|
1188
1188
|
...state.errors,
|
|
1189
1189
|
action.payload,
|
|
@@ -1259,15 +1259,16 @@ const daffCartReducerInitialState = Object.freeze({
|
|
|
1259
1259
|
available_payment_methods: [],
|
|
1260
1260
|
},
|
|
1261
1261
|
loading: {
|
|
1262
|
-
|
|
1263
|
-
[DaffCartOperationType.
|
|
1264
|
-
[DaffCartOperationType.
|
|
1265
|
-
[DaffCartOperationType.
|
|
1266
|
-
[DaffCartOperationType.
|
|
1267
|
-
[DaffCartOperationType.
|
|
1268
|
-
[DaffCartOperationType.
|
|
1269
|
-
[DaffCartOperationType.
|
|
1270
|
-
[DaffCartOperationType.
|
|
1262
|
+
// TODO: replace const casts with const type in TS5
|
|
1263
|
+
[DaffCartOperationType.Cart]: "Stable" /* DaffState.Stable */,
|
|
1264
|
+
[DaffCartOperationType.Item]: "Stable" /* DaffState.Stable */,
|
|
1265
|
+
[DaffCartOperationType.ShippingAddress]: "Stable" /* DaffState.Stable */,
|
|
1266
|
+
[DaffCartOperationType.BillingAddress]: "Stable" /* DaffState.Stable */,
|
|
1267
|
+
[DaffCartOperationType.ShippingInformation]: "Stable" /* DaffState.Stable */,
|
|
1268
|
+
[DaffCartOperationType.ShippingMethods]: "Stable" /* DaffState.Stable */,
|
|
1269
|
+
[DaffCartOperationType.Payment]: "Stable" /* DaffState.Stable */,
|
|
1270
|
+
[DaffCartOperationType.PaymentMethods]: "Stable" /* DaffState.Stable */,
|
|
1271
|
+
[DaffCartOperationType.Coupon]: "Stable" /* DaffState.Stable */,
|
|
1271
1272
|
},
|
|
1272
1273
|
errors: {
|
|
1273
1274
|
[DaffCartOperationType.Cart]: [],
|
|
@@ -1303,99 +1304,172 @@ const initializeLoadingSetter = (loadingSpace) => (loadingObj, loading) => ({
|
|
|
1303
1304
|
},
|
|
1304
1305
|
});
|
|
1305
1306
|
|
|
1306
|
-
const addError$8 = initializeErrorAdder(DaffCartOperationType.
|
|
1307
|
-
const resetErrors$8 = initializeErrorResetter(DaffCartOperationType.
|
|
1308
|
-
const setLoading$8 = initializeLoadingSetter(DaffCartOperationType.
|
|
1307
|
+
const addError$8 = initializeErrorAdder(DaffCartOperationType.Cart);
|
|
1308
|
+
const resetErrors$8 = initializeErrorResetter(DaffCartOperationType.Cart);
|
|
1309
|
+
const setLoading$8 = initializeLoadingSetter(DaffCartOperationType.Cart);
|
|
1310
|
+
function cartReducer(state = daffCartReducerInitialState, action) {
|
|
1311
|
+
switch (action.type) {
|
|
1312
|
+
case DaffCartActionTypes.ResolveCartAction:
|
|
1313
|
+
case DaffCartActionTypes.CartLoadAction:
|
|
1314
|
+
return {
|
|
1315
|
+
...state,
|
|
1316
|
+
...setLoading$8(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1317
|
+
};
|
|
1318
|
+
case DaffCartActionTypes.CartClearAction:
|
|
1319
|
+
case DaffCartActionTypes.AddToCartAction:
|
|
1320
|
+
case DaffCartActionTypes.CartCreateAction:
|
|
1321
|
+
return {
|
|
1322
|
+
...state,
|
|
1323
|
+
...setLoading$8(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1324
|
+
};
|
|
1325
|
+
case DaffCartActionTypes.CartLoadSuccessAction:
|
|
1326
|
+
case DaffCartActionTypes.CartClearSuccessAction:
|
|
1327
|
+
case DaffCartActionTypes.AddToCartSuccessAction:
|
|
1328
|
+
case DaffCartActionTypes.ResolveCartSuccessAction:
|
|
1329
|
+
return {
|
|
1330
|
+
...state,
|
|
1331
|
+
...resetErrors$8(state.errors),
|
|
1332
|
+
cart: {
|
|
1333
|
+
...state.cart,
|
|
1334
|
+
...action.payload,
|
|
1335
|
+
},
|
|
1336
|
+
...setLoading$8(state.loading, "Stable" /* DaffState.Complete */),
|
|
1337
|
+
};
|
|
1338
|
+
case DaffCartActionTypes.CartCreateSuccessAction:
|
|
1339
|
+
return {
|
|
1340
|
+
...state,
|
|
1341
|
+
...resetErrors$8(state.errors),
|
|
1342
|
+
cart: {
|
|
1343
|
+
...daffCartReducerInitialState.cart,
|
|
1344
|
+
...action.payload,
|
|
1345
|
+
},
|
|
1346
|
+
...setLoading$8(state.loading, "Stable" /* DaffState.Complete */),
|
|
1347
|
+
};
|
|
1348
|
+
case DaffCartActionTypes.CartClearFailureAction:
|
|
1349
|
+
case DaffCartActionTypes.AddToCartFailureAction:
|
|
1350
|
+
case DaffCartActionTypes.CartCreateFailureAction:
|
|
1351
|
+
case DaffCartActionTypes.CartStorageFailureAction:
|
|
1352
|
+
return {
|
|
1353
|
+
...state,
|
|
1354
|
+
...addError$8(state.errors, action.payload),
|
|
1355
|
+
...setLoading$8(state.loading, "Stable" /* DaffState.Complete */),
|
|
1356
|
+
};
|
|
1357
|
+
case DaffCartActionTypes.CartLoadFailureAction:
|
|
1358
|
+
case DaffCartActionTypes.ResolveCartFailureAction:
|
|
1359
|
+
return {
|
|
1360
|
+
...state,
|
|
1361
|
+
...addError$8(state.errors, ...action.payload),
|
|
1362
|
+
...setLoading$8(state.loading, "Stable" /* DaffState.Stable */),
|
|
1363
|
+
};
|
|
1364
|
+
case DaffCartActionTypes.ResolveCartPartialSuccessAction:
|
|
1365
|
+
case DaffCartActionTypes.CartLoadPartialSuccessAction:
|
|
1366
|
+
return {
|
|
1367
|
+
...state,
|
|
1368
|
+
cart: {
|
|
1369
|
+
...state.cart,
|
|
1370
|
+
...action.payload,
|
|
1371
|
+
},
|
|
1372
|
+
...addError$8(state.errors, ...action.errors),
|
|
1373
|
+
...setLoading$8(state.loading, "Stable" /* DaffState.Stable */),
|
|
1374
|
+
};
|
|
1375
|
+
default:
|
|
1376
|
+
return state;
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
const addError$7 = initializeErrorAdder(DaffCartOperationType.BillingAddress);
|
|
1381
|
+
const resetErrors$7 = initializeErrorResetter(DaffCartOperationType.BillingAddress);
|
|
1382
|
+
const setLoading$7 = initializeLoadingSetter(DaffCartOperationType.BillingAddress);
|
|
1309
1383
|
function cartBillingAddressReducer(state = daffCartReducerInitialState, action) {
|
|
1310
1384
|
switch (action.type) {
|
|
1311
1385
|
case DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction:
|
|
1312
1386
|
return {
|
|
1313
1387
|
...state,
|
|
1314
|
-
...setLoading$
|
|
1388
|
+
...setLoading$7(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1315
1389
|
};
|
|
1316
1390
|
case DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction:
|
|
1317
1391
|
case DaffCartAddressActionTypes.CartAddressUpdateAction:
|
|
1318
1392
|
return {
|
|
1319
1393
|
...state,
|
|
1320
|
-
...setLoading$
|
|
1394
|
+
...setLoading$7(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1321
1395
|
};
|
|
1322
1396
|
case DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction:
|
|
1323
1397
|
return {
|
|
1324
1398
|
...state,
|
|
1325
|
-
...resetErrors$
|
|
1399
|
+
...resetErrors$7(state.errors),
|
|
1326
1400
|
cart: {
|
|
1327
1401
|
...state.cart,
|
|
1328
1402
|
billing_address: action.payload,
|
|
1329
1403
|
},
|
|
1330
|
-
...setLoading$
|
|
1404
|
+
...setLoading$7(state.loading, "Stable" /* DaffState.Complete */),
|
|
1331
1405
|
};
|
|
1332
1406
|
case DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction:
|
|
1333
1407
|
case DaffCartAddressActionTypes.CartAddressUpdateSuccessAction:
|
|
1334
1408
|
return {
|
|
1335
1409
|
...state,
|
|
1336
|
-
...resetErrors$
|
|
1410
|
+
...resetErrors$7(state.errors),
|
|
1337
1411
|
cart: {
|
|
1338
1412
|
...state.cart,
|
|
1339
1413
|
...action.payload,
|
|
1340
1414
|
},
|
|
1341
|
-
...setLoading$
|
|
1415
|
+
...setLoading$7(state.loading, "Stable" /* DaffState.Complete */),
|
|
1342
1416
|
};
|
|
1343
1417
|
case DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction:
|
|
1344
1418
|
case DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction:
|
|
1345
1419
|
case DaffCartAddressActionTypes.CartAddressUpdateFailureAction:
|
|
1346
1420
|
return {
|
|
1347
1421
|
...state,
|
|
1348
|
-
...addError$
|
|
1349
|
-
...setLoading$
|
|
1422
|
+
...addError$7(state.errors, action.payload),
|
|
1423
|
+
...setLoading$7(state.loading, "Stable" /* DaffState.Complete */),
|
|
1350
1424
|
};
|
|
1351
1425
|
default:
|
|
1352
1426
|
return state;
|
|
1353
1427
|
}
|
|
1354
1428
|
}
|
|
1355
1429
|
|
|
1356
|
-
const addError$
|
|
1357
|
-
const resetErrors$
|
|
1358
|
-
const setLoading$
|
|
1430
|
+
const addError$6 = initializeErrorAdder(DaffCartOperationType.Coupon);
|
|
1431
|
+
const resetErrors$6 = initializeErrorResetter(DaffCartOperationType.Coupon);
|
|
1432
|
+
const setLoading$6 = initializeLoadingSetter(DaffCartOperationType.Coupon);
|
|
1359
1433
|
function cartCouponReducer(state = daffCartReducerInitialState, action) {
|
|
1360
1434
|
switch (action.type) {
|
|
1361
1435
|
case DaffCartCouponActionTypes.CartCouponListAction:
|
|
1362
1436
|
return {
|
|
1363
1437
|
...state,
|
|
1364
|
-
...setLoading$
|
|
1438
|
+
...setLoading$6(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1365
1439
|
};
|
|
1366
1440
|
case DaffCartCouponActionTypes.CartCouponApplyAction:
|
|
1367
1441
|
case DaffCartCouponActionTypes.CartCouponRemoveAction:
|
|
1368
1442
|
case DaffCartCouponActionTypes.CartCouponRemoveAllAction:
|
|
1369
1443
|
return {
|
|
1370
1444
|
...state,
|
|
1371
|
-
...setLoading$
|
|
1445
|
+
...setLoading$6(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1372
1446
|
};
|
|
1373
1447
|
case DaffCartCouponActionTypes.CartCouponApplySuccessAction:
|
|
1374
1448
|
case DaffCartCouponActionTypes.CartCouponRemoveSuccessAction:
|
|
1375
1449
|
case DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction:
|
|
1376
1450
|
return {
|
|
1377
1451
|
...state,
|
|
1378
|
-
...resetErrors$
|
|
1452
|
+
...resetErrors$6(state.errors),
|
|
1379
1453
|
cart: {
|
|
1380
1454
|
...state.cart,
|
|
1381
1455
|
...action.payload,
|
|
1382
1456
|
},
|
|
1383
|
-
...setLoading$
|
|
1457
|
+
...setLoading$6(state.loading, "Stable" /* DaffState.Complete */),
|
|
1384
1458
|
};
|
|
1385
1459
|
case DaffCartCouponActionTypes.CartCouponClearErrorsAction:
|
|
1386
1460
|
return {
|
|
1387
1461
|
...state,
|
|
1388
|
-
...resetErrors$
|
|
1462
|
+
...resetErrors$6(state.errors),
|
|
1389
1463
|
};
|
|
1390
1464
|
case DaffCartCouponActionTypes.CartCouponListSuccessAction:
|
|
1391
1465
|
return {
|
|
1392
1466
|
...state,
|
|
1393
|
-
...resetErrors$
|
|
1467
|
+
...resetErrors$6(state.errors),
|
|
1394
1468
|
cart: {
|
|
1395
1469
|
...state.cart,
|
|
1396
1470
|
coupons: action.payload,
|
|
1397
1471
|
},
|
|
1398
|
-
...setLoading$
|
|
1472
|
+
...setLoading$6(state.loading, "Stable" /* DaffState.Complete */),
|
|
1399
1473
|
};
|
|
1400
1474
|
case DaffCartCouponActionTypes.CartCouponApplyFailureAction:
|
|
1401
1475
|
case DaffCartCouponActionTypes.CartCouponListFailureAction:
|
|
@@ -1403,70 +1477,70 @@ function cartCouponReducer(state = daffCartReducerInitialState, action) {
|
|
|
1403
1477
|
case DaffCartCouponActionTypes.CartCouponRemoveFailureAction:
|
|
1404
1478
|
return {
|
|
1405
1479
|
...state,
|
|
1406
|
-
...addError$
|
|
1407
|
-
...setLoading$
|
|
1480
|
+
...addError$6(state.errors, action.payload),
|
|
1481
|
+
...setLoading$6(state.loading, "Stable" /* DaffState.Complete */),
|
|
1408
1482
|
};
|
|
1409
1483
|
default:
|
|
1410
1484
|
return state;
|
|
1411
1485
|
}
|
|
1412
1486
|
}
|
|
1413
1487
|
|
|
1414
|
-
const addError$
|
|
1415
|
-
const resetErrors$
|
|
1416
|
-
const setLoading$
|
|
1488
|
+
const addError$5 = initializeErrorAdder(DaffCartOperationType.Item);
|
|
1489
|
+
const resetErrors$5 = initializeErrorResetter(DaffCartOperationType.Item);
|
|
1490
|
+
const setLoading$5 = initializeLoadingSetter(DaffCartOperationType.Item);
|
|
1417
1491
|
function cartItemReducer(state = daffCartReducerInitialState, action) {
|
|
1418
1492
|
switch (action.type) {
|
|
1419
1493
|
case DaffCartItemActionTypes.CartItemListAction:
|
|
1420
1494
|
case DaffCartItemActionTypes.CartItemLoadAction:
|
|
1421
1495
|
return {
|
|
1422
1496
|
...state,
|
|
1423
|
-
...setLoading$
|
|
1497
|
+
...setLoading$5(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1424
1498
|
};
|
|
1425
1499
|
case DaffCartItemActionTypes.CartItemUpdateAction:
|
|
1426
1500
|
case DaffCartItemActionTypes.CartItemDeleteAction:
|
|
1427
1501
|
case DaffCartItemActionTypes.CartItemDeleteOutOfStockAction:
|
|
1428
1502
|
return {
|
|
1429
1503
|
...state,
|
|
1430
|
-
...setLoading$
|
|
1504
|
+
...setLoading$5(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1431
1505
|
};
|
|
1432
1506
|
case DaffCartItemActionTypes.CartItemAddAction:
|
|
1433
1507
|
return {
|
|
1434
1508
|
...state,
|
|
1435
|
-
...setLoading$
|
|
1509
|
+
...setLoading$5(state.loading, "Adding" /* DaffState.Adding */),
|
|
1436
1510
|
};
|
|
1437
1511
|
case DaffCartItemActionTypes.CartItemListSuccessAction:
|
|
1438
1512
|
return {
|
|
1439
1513
|
...state,
|
|
1440
|
-
...resetErrors$
|
|
1514
|
+
...resetErrors$5(state.errors),
|
|
1441
1515
|
cart: {
|
|
1442
1516
|
...state.cart,
|
|
1443
1517
|
items: action.payload,
|
|
1444
1518
|
},
|
|
1445
|
-
...setLoading$
|
|
1519
|
+
...setLoading$5(state.loading, "Stable" /* DaffState.Complete */),
|
|
1446
1520
|
};
|
|
1447
1521
|
case DaffCartItemActionTypes.CartItemLoadSuccessAction:
|
|
1448
1522
|
return {
|
|
1449
1523
|
...state,
|
|
1450
|
-
...resetErrors$
|
|
1524
|
+
...resetErrors$5(state.errors),
|
|
1451
1525
|
cart: {
|
|
1452
1526
|
...state.cart,
|
|
1453
1527
|
items: state.cart.items.map(item => item.id === action.payload.id
|
|
1454
1528
|
? action.payload
|
|
1455
1529
|
: item),
|
|
1456
1530
|
},
|
|
1457
|
-
...setLoading$
|
|
1531
|
+
...setLoading$5(state.loading, "Stable" /* DaffState.Complete */),
|
|
1458
1532
|
};
|
|
1459
1533
|
case DaffCartItemActionTypes.CartItemUpdateSuccessAction:
|
|
1460
1534
|
case DaffCartItemActionTypes.CartItemAddSuccessAction:
|
|
1461
1535
|
case DaffCartItemActionTypes.CartItemDeleteSuccessAction:
|
|
1462
1536
|
return {
|
|
1463
1537
|
...state,
|
|
1464
|
-
...resetErrors$
|
|
1538
|
+
...resetErrors$5(state.errors),
|
|
1465
1539
|
cart: {
|
|
1466
1540
|
...state.cart,
|
|
1467
1541
|
...action.payload,
|
|
1468
1542
|
},
|
|
1469
|
-
...setLoading$
|
|
1543
|
+
...setLoading$5(state.loading, "Stable" /* DaffState.Complete */),
|
|
1470
1544
|
};
|
|
1471
1545
|
case DaffCartItemActionTypes.CartItemDeleteOutOfStockSuccessAction:
|
|
1472
1546
|
return {
|
|
@@ -1481,7 +1555,7 @@ function cartItemReducer(state = daffCartReducerInitialState, action) {
|
|
|
1481
1555
|
...state.cart,
|
|
1482
1556
|
...action.payload,
|
|
1483
1557
|
},
|
|
1484
|
-
...setLoading$
|
|
1558
|
+
...setLoading$5(state.loading, "Stable" /* DaffState.Complete */),
|
|
1485
1559
|
};
|
|
1486
1560
|
case DaffCartItemActionTypes.CartItemListFailureAction:
|
|
1487
1561
|
case DaffCartItemActionTypes.CartItemLoadFailureAction:
|
|
@@ -1489,45 +1563,14 @@ function cartItemReducer(state = daffCartReducerInitialState, action) {
|
|
|
1489
1563
|
case DaffCartItemActionTypes.CartItemDeleteOutOfStockFailureAction:
|
|
1490
1564
|
return {
|
|
1491
1565
|
...state,
|
|
1492
|
-
...addError$
|
|
1493
|
-
...setLoading$
|
|
1566
|
+
...addError$5(state.errors, action.payload),
|
|
1567
|
+
...setLoading$5(state.loading, "Stable" /* DaffState.Complete */),
|
|
1494
1568
|
};
|
|
1495
1569
|
case DaffCartItemActionTypes.CartItemUpdateFailureAction:
|
|
1496
1570
|
case DaffCartItemActionTypes.CartItemDeleteFailureAction:
|
|
1497
1571
|
return {
|
|
1498
1572
|
...state,
|
|
1499
|
-
...setLoading$
|
|
1500
|
-
};
|
|
1501
|
-
default:
|
|
1502
|
-
return state;
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
const addError$5 = initializeErrorAdder(DaffCartOperationType.PaymentMethods);
|
|
1507
|
-
const resetErrors$5 = initializeErrorResetter(DaffCartOperationType.PaymentMethods);
|
|
1508
|
-
const setLoading$5 = initializeLoadingSetter(DaffCartOperationType.PaymentMethods);
|
|
1509
|
-
function cartPaymentMethodsReducer(state = daffCartReducerInitialState, action) {
|
|
1510
|
-
switch (action.type) {
|
|
1511
|
-
case DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction:
|
|
1512
|
-
return {
|
|
1513
|
-
...state,
|
|
1514
|
-
...setLoading$5(state.loading, "Resolving" /* Resolving */),
|
|
1515
|
-
};
|
|
1516
|
-
case DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction:
|
|
1517
|
-
return {
|
|
1518
|
-
...state,
|
|
1519
|
-
...resetErrors$5(state.errors),
|
|
1520
|
-
cart: {
|
|
1521
|
-
...state.cart,
|
|
1522
|
-
available_payment_methods: action.payload,
|
|
1523
|
-
},
|
|
1524
|
-
...setLoading$5(state.loading, "Stable" /* Complete */),
|
|
1525
|
-
};
|
|
1526
|
-
case DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction:
|
|
1527
|
-
return {
|
|
1528
|
-
...state,
|
|
1529
|
-
...addError$5(state.errors, action.payload),
|
|
1530
|
-
...setLoading$5(state.loading, "Stable" /* Complete */),
|
|
1573
|
+
...setLoading$5(state.loading, "Stable" /* DaffState.Complete */),
|
|
1531
1574
|
};
|
|
1532
1575
|
default:
|
|
1533
1576
|
return state;
|
|
@@ -1542,14 +1585,14 @@ function cartPaymentReducer(state = daffCartReducerInitialState, action) {
|
|
|
1542
1585
|
case DaffCartPaymentActionTypes.CartPaymentLoadAction:
|
|
1543
1586
|
return {
|
|
1544
1587
|
...state,
|
|
1545
|
-
...setLoading$4(state.loading, "Resolving" /* Resolving */),
|
|
1588
|
+
...setLoading$4(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1546
1589
|
};
|
|
1547
1590
|
case DaffCartPaymentActionTypes.CartPaymentUpdateAction:
|
|
1548
1591
|
case DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction:
|
|
1549
1592
|
case DaffCartPaymentActionTypes.CartPaymentRemoveAction:
|
|
1550
1593
|
return {
|
|
1551
1594
|
...state,
|
|
1552
|
-
...setLoading$4(state.loading, "Mutating" /* Mutating */),
|
|
1595
|
+
...setLoading$4(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1553
1596
|
};
|
|
1554
1597
|
case DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction:
|
|
1555
1598
|
return {
|
|
@@ -1559,7 +1602,7 @@ function cartPaymentReducer(state = daffCartReducerInitialState, action) {
|
|
|
1559
1602
|
...state.cart,
|
|
1560
1603
|
payment: action.payload,
|
|
1561
1604
|
},
|
|
1562
|
-
...setLoading$4(state.loading, "Stable" /* Complete */),
|
|
1605
|
+
...setLoading$4(state.loading, "Stable" /* DaffState.Complete */),
|
|
1563
1606
|
};
|
|
1564
1607
|
case DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction:
|
|
1565
1608
|
return {
|
|
@@ -1569,7 +1612,7 @@ function cartPaymentReducer(state = daffCartReducerInitialState, action) {
|
|
|
1569
1612
|
...state.cart,
|
|
1570
1613
|
payment: null,
|
|
1571
1614
|
},
|
|
1572
|
-
...setLoading$4(state.loading, "Stable" /* Complete */),
|
|
1615
|
+
...setLoading$4(state.loading, "Stable" /* DaffState.Complete */),
|
|
1573
1616
|
};
|
|
1574
1617
|
case DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction:
|
|
1575
1618
|
case DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction:
|
|
@@ -1580,7 +1623,7 @@ function cartPaymentReducer(state = daffCartReducerInitialState, action) {
|
|
|
1580
1623
|
...state.cart,
|
|
1581
1624
|
...action.payload,
|
|
1582
1625
|
},
|
|
1583
|
-
...setLoading$4(state.loading, "Stable" /* Complete */),
|
|
1626
|
+
...setLoading$4(state.loading, "Stable" /* DaffState.Complete */),
|
|
1584
1627
|
};
|
|
1585
1628
|
case DaffCartPaymentActionTypes.CartPaymentLoadFailureAction:
|
|
1586
1629
|
case DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction:
|
|
@@ -1589,7 +1632,7 @@ function cartPaymentReducer(state = daffCartReducerInitialState, action) {
|
|
|
1589
1632
|
return {
|
|
1590
1633
|
...state,
|
|
1591
1634
|
...addError$4(state.errors, action.payload),
|
|
1592
|
-
...setLoading$4(state.loading, "Stable" /* Complete */),
|
|
1635
|
+
...setLoading$4(state.loading, "Stable" /* DaffState.Complete */),
|
|
1593
1636
|
};
|
|
1594
1637
|
/**
|
|
1595
1638
|
* This reducer is temporary until custom reducers can be injected by the @daffodil/paymentSource modules. Right now,
|
|
@@ -1612,6 +1655,37 @@ function cartPaymentReducer(state = daffCartReducerInitialState, action) {
|
|
|
1612
1655
|
}
|
|
1613
1656
|
}
|
|
1614
1657
|
|
|
1658
|
+
const addError$3 = initializeErrorAdder(DaffCartOperationType.PaymentMethods);
|
|
1659
|
+
const resetErrors$3 = initializeErrorResetter(DaffCartOperationType.PaymentMethods);
|
|
1660
|
+
const setLoading$3 = initializeLoadingSetter(DaffCartOperationType.PaymentMethods);
|
|
1661
|
+
function cartPaymentMethodsReducer(state = daffCartReducerInitialState, action) {
|
|
1662
|
+
switch (action.type) {
|
|
1663
|
+
case DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction:
|
|
1664
|
+
return {
|
|
1665
|
+
...state,
|
|
1666
|
+
...setLoading$3(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1667
|
+
};
|
|
1668
|
+
case DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction:
|
|
1669
|
+
return {
|
|
1670
|
+
...state,
|
|
1671
|
+
...resetErrors$3(state.errors),
|
|
1672
|
+
cart: {
|
|
1673
|
+
...state.cart,
|
|
1674
|
+
available_payment_methods: action.payload,
|
|
1675
|
+
},
|
|
1676
|
+
...setLoading$3(state.loading, "Stable" /* DaffState.Complete */),
|
|
1677
|
+
};
|
|
1678
|
+
case DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction:
|
|
1679
|
+
return {
|
|
1680
|
+
...state,
|
|
1681
|
+
...addError$3(state.errors, action.payload),
|
|
1682
|
+
...setLoading$3(state.loading, "Stable" /* DaffState.Complete */),
|
|
1683
|
+
};
|
|
1684
|
+
default:
|
|
1685
|
+
return state;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1615
1689
|
function cartResolveReducer(state = daffCartReducerInitialState, action) {
|
|
1616
1690
|
switch (action.type) {
|
|
1617
1691
|
case DaffCartActionTypes.ResolveCartAction:
|
|
@@ -1641,207 +1715,134 @@ function cartResolveReducer(state = daffCartReducerInitialState, action) {
|
|
|
1641
1715
|
}
|
|
1642
1716
|
}
|
|
1643
1717
|
|
|
1644
|
-
const addError$
|
|
1645
|
-
const resetErrors$
|
|
1646
|
-
const setLoading$
|
|
1718
|
+
const addError$2 = initializeErrorAdder(DaffCartOperationType.ShippingAddress);
|
|
1719
|
+
const resetErrors$2 = initializeErrorResetter(DaffCartOperationType.ShippingAddress);
|
|
1720
|
+
const setLoading$2 = initializeLoadingSetter(DaffCartOperationType.ShippingAddress);
|
|
1647
1721
|
function cartShippingAddressReducer(state = daffCartReducerInitialState, action) {
|
|
1648
1722
|
switch (action.type) {
|
|
1649
1723
|
case DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction:
|
|
1650
1724
|
return {
|
|
1651
1725
|
...state,
|
|
1652
|
-
...setLoading$
|
|
1726
|
+
...setLoading$2(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1653
1727
|
};
|
|
1654
1728
|
case DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction:
|
|
1655
1729
|
case DaffCartAddressActionTypes.CartAddressUpdateAction:
|
|
1656
1730
|
return {
|
|
1657
1731
|
...state,
|
|
1658
|
-
...setLoading$
|
|
1732
|
+
...setLoading$2(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1659
1733
|
};
|
|
1660
1734
|
case DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction:
|
|
1661
1735
|
return {
|
|
1662
1736
|
...state,
|
|
1663
|
-
...resetErrors$
|
|
1737
|
+
...resetErrors$2(state.errors),
|
|
1664
1738
|
cart: {
|
|
1665
1739
|
...state.cart,
|
|
1666
1740
|
shipping_address: action.payload,
|
|
1667
1741
|
},
|
|
1668
|
-
...setLoading$
|
|
1742
|
+
...setLoading$2(state.loading, "Stable" /* DaffState.Complete */),
|
|
1669
1743
|
};
|
|
1670
1744
|
case DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction:
|
|
1671
1745
|
case DaffCartAddressActionTypes.CartAddressUpdateSuccessAction:
|
|
1672
1746
|
return {
|
|
1673
1747
|
...state,
|
|
1674
|
-
...resetErrors$
|
|
1748
|
+
...resetErrors$2(state.errors),
|
|
1675
1749
|
cart: {
|
|
1676
1750
|
...state.cart,
|
|
1677
1751
|
...action.payload,
|
|
1678
1752
|
},
|
|
1679
|
-
...setLoading$
|
|
1753
|
+
...setLoading$2(state.loading, "Stable" /* DaffState.Complete */),
|
|
1680
1754
|
};
|
|
1681
1755
|
case DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction:
|
|
1682
1756
|
case DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction:
|
|
1683
1757
|
case DaffCartAddressActionTypes.CartAddressUpdateFailureAction:
|
|
1684
1758
|
return {
|
|
1685
1759
|
...state,
|
|
1686
|
-
...addError$
|
|
1687
|
-
...setLoading$
|
|
1760
|
+
...addError$2(state.errors, action.payload),
|
|
1761
|
+
...setLoading$2(state.loading, "Stable" /* DaffState.Complete */),
|
|
1688
1762
|
};
|
|
1689
1763
|
default:
|
|
1690
1764
|
return state;
|
|
1691
1765
|
}
|
|
1692
1766
|
}
|
|
1693
1767
|
|
|
1694
|
-
const addError$
|
|
1695
|
-
const resetErrors$
|
|
1696
|
-
const setLoading$
|
|
1768
|
+
const addError$1 = initializeErrorAdder(DaffCartOperationType.ShippingInformation);
|
|
1769
|
+
const resetErrors$1 = initializeErrorResetter(DaffCartOperationType.ShippingInformation);
|
|
1770
|
+
const setLoading$1 = initializeLoadingSetter(DaffCartOperationType.ShippingInformation);
|
|
1697
1771
|
function cartShippingInformationReducer(state = daffCartReducerInitialState, action) {
|
|
1698
1772
|
switch (action.type) {
|
|
1699
1773
|
case DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction:
|
|
1700
1774
|
return {
|
|
1701
1775
|
...state,
|
|
1702
|
-
...setLoading$
|
|
1776
|
+
...setLoading$1(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1703
1777
|
};
|
|
1704
1778
|
case DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction:
|
|
1705
1779
|
case DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction:
|
|
1706
1780
|
return {
|
|
1707
1781
|
...state,
|
|
1708
|
-
...setLoading$
|
|
1782
|
+
...setLoading$1(state.loading, "Mutating" /* DaffState.Mutating */),
|
|
1709
1783
|
};
|
|
1710
1784
|
case DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction:
|
|
1711
1785
|
return {
|
|
1712
1786
|
...state,
|
|
1713
|
-
...resetErrors$
|
|
1787
|
+
...resetErrors$1(state.errors),
|
|
1714
1788
|
cart: {
|
|
1715
1789
|
...state.cart,
|
|
1716
1790
|
// TODO: remove workaround
|
|
1717
1791
|
shipping_information: { ...action.payload, address_id: null },
|
|
1718
1792
|
},
|
|
1719
|
-
...setLoading$
|
|
1793
|
+
...setLoading$1(state.loading, "Stable" /* DaffState.Complete */),
|
|
1720
1794
|
};
|
|
1721
1795
|
case DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction:
|
|
1722
1796
|
case DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction:
|
|
1723
1797
|
return {
|
|
1724
1798
|
...state,
|
|
1725
|
-
...resetErrors$
|
|
1799
|
+
...resetErrors$1(state.errors),
|
|
1726
1800
|
cart: {
|
|
1727
1801
|
...state.cart,
|
|
1728
1802
|
// ensure that shipping_information is set to null in case its not included in action.payload
|
|
1729
1803
|
shipping_information: null,
|
|
1730
1804
|
...action.payload,
|
|
1731
1805
|
},
|
|
1732
|
-
...setLoading$
|
|
1806
|
+
...setLoading$1(state.loading, "Stable" /* DaffState.Complete */),
|
|
1733
1807
|
};
|
|
1734
1808
|
case DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction:
|
|
1735
1809
|
case DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction:
|
|
1736
1810
|
case DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction:
|
|
1737
1811
|
return {
|
|
1738
1812
|
...state,
|
|
1739
|
-
...addError$
|
|
1740
|
-
...setLoading$
|
|
1813
|
+
...addError$1(state.errors, action.payload),
|
|
1814
|
+
...setLoading$1(state.loading, "Stable" /* DaffState.Complete */),
|
|
1741
1815
|
};
|
|
1742
1816
|
default:
|
|
1743
1817
|
return state;
|
|
1744
1818
|
}
|
|
1745
1819
|
}
|
|
1746
1820
|
|
|
1747
|
-
const addError
|
|
1748
|
-
const resetErrors
|
|
1749
|
-
const setLoading
|
|
1821
|
+
const addError = initializeErrorAdder(DaffCartOperationType.ShippingMethods);
|
|
1822
|
+
const resetErrors = initializeErrorResetter(DaffCartOperationType.ShippingMethods);
|
|
1823
|
+
const setLoading = initializeLoadingSetter(DaffCartOperationType.ShippingMethods);
|
|
1750
1824
|
function cartShippingMethodsReducer(state = daffCartReducerInitialState, action) {
|
|
1751
1825
|
switch (action.type) {
|
|
1752
1826
|
case DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction:
|
|
1753
1827
|
return {
|
|
1754
1828
|
...state,
|
|
1755
|
-
...setLoading
|
|
1829
|
+
...setLoading(state.loading, "Resolving" /* DaffState.Resolving */),
|
|
1756
1830
|
};
|
|
1757
1831
|
case DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction:
|
|
1758
1832
|
return {
|
|
1759
1833
|
...state,
|
|
1760
|
-
...resetErrors
|
|
1834
|
+
...resetErrors(state.errors),
|
|
1761
1835
|
cart: {
|
|
1762
1836
|
...state.cart,
|
|
1763
1837
|
available_shipping_methods: action.payload,
|
|
1764
1838
|
},
|
|
1765
|
-
...setLoading
|
|
1839
|
+
...setLoading(state.loading, "Stable" /* DaffState.Complete */),
|
|
1766
1840
|
};
|
|
1767
1841
|
case DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction:
|
|
1768
|
-
return {
|
|
1769
|
-
...state,
|
|
1770
|
-
...addError$1(state.errors, action.payload),
|
|
1771
|
-
...setLoading$1(state.loading, "Stable" /* Complete */),
|
|
1772
|
-
};
|
|
1773
|
-
default:
|
|
1774
|
-
return state;
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
const addError = initializeErrorAdder(DaffCartOperationType.Cart);
|
|
1779
|
-
const resetErrors = initializeErrorResetter(DaffCartOperationType.Cart);
|
|
1780
|
-
const setLoading = initializeLoadingSetter(DaffCartOperationType.Cart);
|
|
1781
|
-
function cartReducer(state = daffCartReducerInitialState, action) {
|
|
1782
|
-
switch (action.type) {
|
|
1783
|
-
case DaffCartActionTypes.ResolveCartAction:
|
|
1784
|
-
case DaffCartActionTypes.CartLoadAction:
|
|
1785
|
-
return {
|
|
1786
|
-
...state,
|
|
1787
|
-
...setLoading(state.loading, "Resolving" /* Resolving */),
|
|
1788
|
-
};
|
|
1789
|
-
case DaffCartActionTypes.CartClearAction:
|
|
1790
|
-
case DaffCartActionTypes.AddToCartAction:
|
|
1791
|
-
case DaffCartActionTypes.CartCreateAction:
|
|
1792
|
-
return {
|
|
1793
|
-
...state,
|
|
1794
|
-
...setLoading(state.loading, "Mutating" /* Mutating */),
|
|
1795
|
-
};
|
|
1796
|
-
case DaffCartActionTypes.CartLoadSuccessAction:
|
|
1797
|
-
case DaffCartActionTypes.CartClearSuccessAction:
|
|
1798
|
-
case DaffCartActionTypes.AddToCartSuccessAction:
|
|
1799
|
-
case DaffCartActionTypes.ResolveCartSuccessAction:
|
|
1800
|
-
return {
|
|
1801
|
-
...state,
|
|
1802
|
-
...resetErrors(state.errors),
|
|
1803
|
-
cart: {
|
|
1804
|
-
...state.cart,
|
|
1805
|
-
...action.payload,
|
|
1806
|
-
},
|
|
1807
|
-
...setLoading(state.loading, "Stable" /* Complete */),
|
|
1808
|
-
};
|
|
1809
|
-
case DaffCartActionTypes.CartCreateSuccessAction:
|
|
1810
|
-
return {
|
|
1811
|
-
...state,
|
|
1812
|
-
...resetErrors(state.errors),
|
|
1813
|
-
cart: {
|
|
1814
|
-
...daffCartReducerInitialState.cart,
|
|
1815
|
-
...action.payload,
|
|
1816
|
-
},
|
|
1817
|
-
...setLoading(state.loading, "Stable" /* Complete */),
|
|
1818
|
-
};
|
|
1819
|
-
case DaffCartActionTypes.CartClearFailureAction:
|
|
1820
|
-
case DaffCartActionTypes.AddToCartFailureAction:
|
|
1821
|
-
case DaffCartActionTypes.CartCreateFailureAction:
|
|
1822
|
-
case DaffCartActionTypes.CartStorageFailureAction:
|
|
1823
1842
|
return {
|
|
1824
1843
|
...state,
|
|
1825
1844
|
...addError(state.errors, action.payload),
|
|
1826
|
-
...setLoading(state.loading, "Stable" /* Complete */),
|
|
1827
|
-
};
|
|
1828
|
-
case DaffCartActionTypes.CartLoadFailureAction:
|
|
1829
|
-
case DaffCartActionTypes.ResolveCartFailureAction:
|
|
1830
|
-
return {
|
|
1831
|
-
...state,
|
|
1832
|
-
...addError(state.errors, ...action.payload),
|
|
1833
|
-
...setLoading(state.loading, "Stable" /* Stable */),
|
|
1834
|
-
};
|
|
1835
|
-
case DaffCartActionTypes.ResolveCartPartialSuccessAction:
|
|
1836
|
-
case DaffCartActionTypes.CartLoadPartialSuccessAction:
|
|
1837
|
-
return {
|
|
1838
|
-
...state,
|
|
1839
|
-
cart: {
|
|
1840
|
-
...state.cart,
|
|
1841
|
-
...action.payload,
|
|
1842
|
-
},
|
|
1843
|
-
...addError(state.errors, ...action.errors),
|
|
1844
|
-
...setLoading(state.loading, "Stable" /* Stable */),
|
|
1845
|
+
...setLoading(state.loading, "Stable" /* DaffState.Complete */),
|
|
1845
1846
|
};
|
|
1846
1847
|
default:
|
|
1847
1848
|
return state;
|
|
@@ -2000,34 +2001,6 @@ const getDaffCartItemEntitiesSelectors = (() => {
|
|
|
2000
2001
|
: createCartItemEntitiesSelectors();
|
|
2001
2002
|
})();
|
|
2002
2003
|
|
|
2003
|
-
const createCartOrderSelectors = () => {
|
|
2004
|
-
const selectCartFeatureState = getDaffCartFeatureSelector().selectCartFeatureState;
|
|
2005
|
-
const selectCartOrderState = createSelector(selectCartFeatureState, (state) => state.order);
|
|
2006
|
-
const selectCartOrderValue = createSelector(selectCartOrderState, (state) => state.cartOrderResult);
|
|
2007
|
-
const selectCartOrderId = createSelector(selectCartOrderValue, (state) => state.orderId);
|
|
2008
|
-
const selectCartOrderCartId = createSelector(selectCartOrderValue, (state) => state.cartId);
|
|
2009
|
-
const selectCartOrderLoading = createSelector(selectCartOrderState, (state) => state.loading !== "Stable" /* Complete */);
|
|
2010
|
-
const selectCartOrderMutating = createSelector(selectCartOrderState, (state) => state.loading === "Mutating" /* Mutating */);
|
|
2011
|
-
const selectCartOrderErrors = createSelector(selectCartOrderState, (state) => state.errors);
|
|
2012
|
-
const selectHasOrderResult = createSelector(selectCartOrderValue, orderResult => !!(orderResult && orderResult.orderId && orderResult.cartId));
|
|
2013
|
-
return {
|
|
2014
|
-
selectCartOrderState,
|
|
2015
|
-
selectCartOrderLoading,
|
|
2016
|
-
selectCartOrderMutating,
|
|
2017
|
-
selectCartOrderErrors,
|
|
2018
|
-
selectCartOrderValue,
|
|
2019
|
-
selectCartOrderId,
|
|
2020
|
-
selectCartOrderCartId,
|
|
2021
|
-
selectHasOrderResult,
|
|
2022
|
-
};
|
|
2023
|
-
};
|
|
2024
|
-
const getCartOrderSelectors = (() => {
|
|
2025
|
-
let cache;
|
|
2026
|
-
return () => cache = cache
|
|
2027
|
-
? cache
|
|
2028
|
-
: createCartOrderSelectors();
|
|
2029
|
-
})();
|
|
2030
|
-
|
|
2031
2004
|
const createCartSelectors$1 = () => {
|
|
2032
2005
|
const selectCartFeatureState = getDaffCartFeatureSelector().selectCartFeatureState;
|
|
2033
2006
|
const { selectCartItemMutating } = getDaffCartItemEntitiesSelectors();
|
|
@@ -2035,31 +2008,31 @@ const createCartSelectors$1 = () => {
|
|
|
2035
2008
|
const selectCartValue = createSelector(selectCartState, (state) => state.cart);
|
|
2036
2009
|
const selectCartResolved = createSelector(selectCartState, (state) => state.resolved);
|
|
2037
2010
|
const selectCartLoadingObject = createSelector(selectCartState, state => state.loading);
|
|
2038
|
-
const selectCartLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Cart] !== "Stable" /* Complete */);
|
|
2039
|
-
const selectCartResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Cart] === "Resolving" /* Resolving */);
|
|
2040
|
-
const selectCartMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Cart] === "Mutating" /* Mutating */);
|
|
2041
|
-
const selectBillingAddressLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.BillingAddress] !== "Stable" /* Complete */);
|
|
2042
|
-
const selectBillingAddressResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.BillingAddress] === "Resolving" /* Resolving */);
|
|
2043
|
-
const selectBillingAddressMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.BillingAddress] === "Mutating" /* Mutating */);
|
|
2044
|
-
const selectShippingAddressLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingAddress] !== "Stable" /* Complete */);
|
|
2045
|
-
const selectShippingAddressResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingAddress] === "Resolving" /* Resolving */);
|
|
2046
|
-
const selectShippingAddressMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingAddress] === "Mutating" /* Mutating */);
|
|
2047
|
-
const selectShippingInformationLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingInformation] !== "Stable" /* Complete */);
|
|
2048
|
-
const selectShippingInformationResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingInformation] === "Resolving" /* Resolving */);
|
|
2049
|
-
const selectShippingInformationMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingInformation] === "Mutating" /* Mutating */);
|
|
2050
|
-
const selectShippingMethodsLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingMethods] !== "Stable" /* Complete */);
|
|
2051
|
-
const selectShippingMethodsResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingMethods] === "Resolving" /* Resolving */);
|
|
2052
|
-
const selectPaymentLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Payment] !== "Stable" /* Complete */);
|
|
2053
|
-
const selectPaymentResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Payment] === "Resolving" /* Resolving */);
|
|
2054
|
-
const selectPaymentMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Payment] === "Mutating" /* Mutating */);
|
|
2055
|
-
const selectPaymentMethodsLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.PaymentMethods] !== "Stable" /* Complete */);
|
|
2056
|
-
const selectPaymentMethodsResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.PaymentMethods] === "Resolving" /* Resolving */);
|
|
2057
|
-
const selectItemLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Item] !== "Stable" /* Complete */);
|
|
2058
|
-
const selectItemAdding = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Item] === "Adding" /* Adding */);
|
|
2059
|
-
const selectItemResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Item] === "Resolving" /* Resolving */);
|
|
2060
|
-
const selectCouponLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Coupon] !== "Stable" /* Complete */);
|
|
2061
|
-
const selectCouponResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Coupon] === "Resolving" /* Resolving */);
|
|
2062
|
-
const selectCouponMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Coupon] === "Mutating" /* Mutating */);
|
|
2011
|
+
const selectCartLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Cart] !== "Stable" /* DaffState.Complete */);
|
|
2012
|
+
const selectCartResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Cart] === "Resolving" /* DaffState.Resolving */);
|
|
2013
|
+
const selectCartMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Cart] === "Mutating" /* DaffState.Mutating */);
|
|
2014
|
+
const selectBillingAddressLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.BillingAddress] !== "Stable" /* DaffState.Complete */);
|
|
2015
|
+
const selectBillingAddressResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.BillingAddress] === "Resolving" /* DaffState.Resolving */);
|
|
2016
|
+
const selectBillingAddressMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.BillingAddress] === "Mutating" /* DaffState.Mutating */);
|
|
2017
|
+
const selectShippingAddressLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingAddress] !== "Stable" /* DaffState.Complete */);
|
|
2018
|
+
const selectShippingAddressResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingAddress] === "Resolving" /* DaffState.Resolving */);
|
|
2019
|
+
const selectShippingAddressMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingAddress] === "Mutating" /* DaffState.Mutating */);
|
|
2020
|
+
const selectShippingInformationLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingInformation] !== "Stable" /* DaffState.Complete */);
|
|
2021
|
+
const selectShippingInformationResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingInformation] === "Resolving" /* DaffState.Resolving */);
|
|
2022
|
+
const selectShippingInformationMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingInformation] === "Mutating" /* DaffState.Mutating */);
|
|
2023
|
+
const selectShippingMethodsLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingMethods] !== "Stable" /* DaffState.Complete */);
|
|
2024
|
+
const selectShippingMethodsResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.ShippingMethods] === "Resolving" /* DaffState.Resolving */);
|
|
2025
|
+
const selectPaymentLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Payment] !== "Stable" /* DaffState.Complete */);
|
|
2026
|
+
const selectPaymentResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Payment] === "Resolving" /* DaffState.Resolving */);
|
|
2027
|
+
const selectPaymentMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Payment] === "Mutating" /* DaffState.Mutating */);
|
|
2028
|
+
const selectPaymentMethodsLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.PaymentMethods] !== "Stable" /* DaffState.Complete */);
|
|
2029
|
+
const selectPaymentMethodsResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.PaymentMethods] === "Resolving" /* DaffState.Resolving */);
|
|
2030
|
+
const selectItemLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Item] !== "Stable" /* DaffState.Complete */);
|
|
2031
|
+
const selectItemAdding = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Item] === "Adding" /* DaffState.Adding */);
|
|
2032
|
+
const selectItemResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Item] === "Resolving" /* DaffState.Resolving */);
|
|
2033
|
+
const selectCouponLoading = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Coupon] !== "Stable" /* DaffState.Complete */);
|
|
2034
|
+
const selectCouponResolving = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Coupon] === "Resolving" /* DaffState.Resolving */);
|
|
2035
|
+
const selectCouponMutating = createSelector(selectCartLoadingObject, loadingObject => loadingObject[DaffCartOperationType.Coupon] === "Mutating" /* DaffState.Mutating */);
|
|
2063
2036
|
const selectCartFeatureLoading = createSelector(selectCartLoadingObject, loadingObject => [
|
|
2064
2037
|
selectCartLoading,
|
|
2065
2038
|
selectBillingAddressLoading,
|
|
@@ -2243,6 +2216,34 @@ const getCartSelectors = (() => {
|
|
|
2243
2216
|
: createCartSelectors$1();
|
|
2244
2217
|
})();
|
|
2245
2218
|
|
|
2219
|
+
const createCartOrderSelectors = () => {
|
|
2220
|
+
const selectCartFeatureState = getDaffCartFeatureSelector().selectCartFeatureState;
|
|
2221
|
+
const selectCartOrderState = createSelector(selectCartFeatureState, (state) => state.order);
|
|
2222
|
+
const selectCartOrderValue = createSelector(selectCartOrderState, (state) => state.cartOrderResult);
|
|
2223
|
+
const selectCartOrderId = createSelector(selectCartOrderValue, (state) => state.orderId);
|
|
2224
|
+
const selectCartOrderCartId = createSelector(selectCartOrderValue, (state) => state.cartId);
|
|
2225
|
+
const selectCartOrderLoading = createSelector(selectCartOrderState, (state) => state.loading !== "Stable" /* DaffState.Complete */);
|
|
2226
|
+
const selectCartOrderMutating = createSelector(selectCartOrderState, (state) => state.loading === "Mutating" /* DaffState.Mutating */);
|
|
2227
|
+
const selectCartOrderErrors = createSelector(selectCartOrderState, (state) => state.errors);
|
|
2228
|
+
const selectHasOrderResult = createSelector(selectCartOrderValue, orderResult => !!(orderResult && orderResult.orderId && orderResult.cartId));
|
|
2229
|
+
return {
|
|
2230
|
+
selectCartOrderState,
|
|
2231
|
+
selectCartOrderLoading,
|
|
2232
|
+
selectCartOrderMutating,
|
|
2233
|
+
selectCartOrderErrors,
|
|
2234
|
+
selectCartOrderValue,
|
|
2235
|
+
selectCartOrderId,
|
|
2236
|
+
selectCartOrderCartId,
|
|
2237
|
+
selectHasOrderResult,
|
|
2238
|
+
};
|
|
2239
|
+
};
|
|
2240
|
+
const getCartOrderSelectors = (() => {
|
|
2241
|
+
let cache;
|
|
2242
|
+
return () => cache = cache
|
|
2243
|
+
? cache
|
|
2244
|
+
: createCartOrderSelectors();
|
|
2245
|
+
})();
|
|
2246
|
+
|
|
2246
2247
|
const createCartSelectors = () => ({
|
|
2247
2248
|
...getDaffCartFeatureSelector(),
|
|
2248
2249
|
...getCartOrderSelectors(),
|
|
@@ -2275,9 +2276,9 @@ class DaffCartAddressEffects {
|
|
|
2275
2276
|
: new DaffCartAddressUpdateFailure(this.errorMatcher(error))))))));
|
|
2276
2277
|
}
|
|
2277
2278
|
}
|
|
2278
|
-
/** @nocollapse */ DaffCartAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2279
|
-
/** @nocollapse */ DaffCartAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2279
|
+
/** @nocollapse */ DaffCartAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartAddressEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartAddressDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2280
|
+
/** @nocollapse */ DaffCartAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartAddressEffects });
|
|
2281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartAddressEffects, decorators: [{
|
|
2281
2282
|
type: Injectable
|
|
2282
2283
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2283
2284
|
type: Inject,
|
|
@@ -2297,9 +2298,9 @@ class DaffCartBillingAddressEffects {
|
|
|
2297
2298
|
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction), switchMap((action) => this.driver.update(this.storage.getCartId(), action.payload).pipe(map((resp) => new DaffCartBillingAddressUpdateSuccess(resp)), catchError(error => of(new DaffCartBillingAddressUpdateFailure(this.errorMatcher(error))))))));
|
|
2298
2299
|
}
|
|
2299
2300
|
}
|
|
2300
|
-
/** @nocollapse */ DaffCartBillingAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2301
|
-
/** @nocollapse */ DaffCartBillingAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2301
|
+
/** @nocollapse */ DaffCartBillingAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartBillingAddressEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartBillingAddressDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2302
|
+
/** @nocollapse */ DaffCartBillingAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartBillingAddressEffects });
|
|
2303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartBillingAddressEffects, decorators: [{
|
|
2303
2304
|
type: Injectable
|
|
2304
2305
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2305
2306
|
type: Inject,
|
|
@@ -2329,9 +2330,9 @@ class DaffCartCouponEffects {
|
|
|
2329
2330
|
: new DaffCartCouponRemoveAllFailure(this.errorMatcher(error))))))));
|
|
2330
2331
|
}
|
|
2331
2332
|
}
|
|
2332
|
-
/** @nocollapse */ DaffCartCouponEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2333
|
-
/** @nocollapse */ DaffCartCouponEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2333
|
+
/** @nocollapse */ DaffCartCouponEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartCouponEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartCouponDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2334
|
+
/** @nocollapse */ DaffCartCouponEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartCouponEffects });
|
|
2335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartCouponEffects, decorators: [{
|
|
2335
2336
|
type: Injectable
|
|
2336
2337
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2337
2338
|
type: Inject,
|
|
@@ -2371,9 +2372,9 @@ class DaffCartItemEffects {
|
|
|
2371
2372
|
return this.driver.add(cartId, input).pipe(map((resp) => new DaffCartItemAddSuccess(resp)), catchError(error => of(new DaffCartItemAddFailure(this.errorMatcher(error)))));
|
|
2372
2373
|
}
|
|
2373
2374
|
}
|
|
2374
|
-
/** @nocollapse */ DaffCartItemEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2375
|
-
/** @nocollapse */ DaffCartItemEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2375
|
+
/** @nocollapse */ DaffCartItemEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartItemEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartItemDriver }, { token: i2.DaffCartStorageService }, { token: DaffCartItemStateDebounceTime }, { token: i1$1.Store }, { token: i4.DaffCartDriverResolveService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2376
|
+
/** @nocollapse */ DaffCartItemEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartItemEffects });
|
|
2377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartItemEffects, decorators: [{
|
|
2377
2378
|
type: Injectable
|
|
2378
2379
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2379
2380
|
type: Inject,
|
|
@@ -2398,9 +2399,9 @@ class DaffCartOrderEffects {
|
|
|
2398
2399
|
this.resetCart$ = createEffect(() => this.actions$.pipe(ofType(DaffCartOrderActionTypes.CartPlaceOrderSuccessAction), map(() => new DaffCartCreate())));
|
|
2399
2400
|
}
|
|
2400
2401
|
}
|
|
2401
|
-
/** @nocollapse */ DaffCartOrderEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2402
|
-
/** @nocollapse */ DaffCartOrderEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2402
|
+
/** @nocollapse */ DaffCartOrderEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartOrderEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartOrderDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2403
|
+
/** @nocollapse */ DaffCartOrderEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartOrderEffects });
|
|
2404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartOrderEffects, decorators: [{
|
|
2404
2405
|
type: Injectable
|
|
2405
2406
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2406
2407
|
type: Inject,
|
|
@@ -2419,9 +2420,9 @@ class DaffCartPaymentMethodsEffects {
|
|
|
2419
2420
|
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction), switchMap((action) => this.driver.list(this.storage.getCartId()).pipe(map((resp) => new DaffCartPaymentMethodsLoadSuccess(resp)), catchError(error => of(new DaffCartPaymentMethodsLoadFailure(this.errorMatcher(error))))))));
|
|
2420
2421
|
}
|
|
2421
2422
|
}
|
|
2422
|
-
/** @nocollapse */ DaffCartPaymentMethodsEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2423
|
-
/** @nocollapse */ DaffCartPaymentMethodsEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2423
|
+
/** @nocollapse */ DaffCartPaymentMethodsEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentMethodsEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartPaymentMethodsDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2424
|
+
/** @nocollapse */ DaffCartPaymentMethodsEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentMethodsEffects });
|
|
2425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentMethodsEffects, decorators: [{
|
|
2425
2426
|
type: Injectable
|
|
2426
2427
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2427
2428
|
type: Inject,
|
|
@@ -2449,9 +2450,9 @@ class DaffCartPaymentProcessorEffects {
|
|
|
2449
2450
|
}, act.address).pipe(map((resp) => new DaffCartPaymentUpdateSuccess(resp)), catchError(error => of(new DaffCartPaymentUpdateFailure(this.errorMatcher(error)))))), catchError(error => of(new DaffPaymentGenerateTokenFailure(this.paymentErrorMatcher(error)))))))));
|
|
2450
2451
|
}
|
|
2451
2452
|
}
|
|
2452
|
-
/** @nocollapse */ DaffCartPaymentProcessorEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2453
|
-
/** @nocollapse */ DaffCartPaymentProcessorEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2453
|
+
/** @nocollapse */ DaffCartPaymentProcessorEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentProcessorEffects, deps: [{ token: i1.Actions }, { token: DAFF_PAYMENT_PROCESSOR_COLLECTION }, { token: DAFF_CART_ERROR_MATCHER }, { token: DAFF_PAYMENT_ERROR_MATCHER }, { token: DaffCartPaymentDriver }, { token: i2.DaffCartStorageService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2454
|
+
/** @nocollapse */ DaffCartPaymentProcessorEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentProcessorEffects });
|
|
2455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentProcessorEffects, decorators: [{
|
|
2455
2456
|
type: Injectable
|
|
2456
2457
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2457
2458
|
type: Inject,
|
|
@@ -2479,9 +2480,9 @@ class DaffCartPaymentEffects {
|
|
|
2479
2480
|
this.remove$ = createEffect(() => this.actions$.pipe(ofType(DaffCartPaymentActionTypes.CartPaymentRemoveAction), switchMap((action) => this.driver.remove(this.storage.getCartId()).pipe(map(() => new DaffCartPaymentRemoveSuccess()), catchError(error => of(new DaffCartPaymentRemoveFailure(this.errorMatcher(error))))))));
|
|
2480
2481
|
}
|
|
2481
2482
|
}
|
|
2482
|
-
/** @nocollapse */ DaffCartPaymentEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2483
|
-
/** @nocollapse */ DaffCartPaymentEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2483
|
+
/** @nocollapse */ DaffCartPaymentEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartPaymentDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2484
|
+
/** @nocollapse */ DaffCartPaymentEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentEffects });
|
|
2485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartPaymentEffects, decorators: [{
|
|
2485
2486
|
type: Injectable
|
|
2486
2487
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2487
2488
|
type: Inject,
|
|
@@ -2530,9 +2531,9 @@ class DaffCartResolverEffects {
|
|
|
2530
2531
|
return isPlatformBrowser(this.platformId) && this.cartStorage.getCartId() ? new DaffResolveCart() : { type: '' };
|
|
2531
2532
|
}
|
|
2532
2533
|
}
|
|
2533
|
-
/** @nocollapse */ DaffCartResolverEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2534
|
-
/** @nocollapse */ DaffCartResolverEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2534
|
+
/** @nocollapse */ DaffCartResolverEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartResolverEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: i2.DaffCartStorageService }, { token: i4.DaffCartDriverResolveService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2535
|
+
/** @nocollapse */ DaffCartResolverEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartResolverEffects });
|
|
2536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartResolverEffects, decorators: [{
|
|
2536
2537
|
type: Injectable
|
|
2537
2538
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2538
2539
|
type: Inject,
|
|
@@ -2552,9 +2553,9 @@ class DaffCartShippingAddressEffects {
|
|
|
2552
2553
|
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction), switchMap((action) => this.driver.update(this.storage.getCartId(), action.payload).pipe(map((resp) => new DaffCartShippingAddressUpdateSuccess(resp)), catchError(error => of(new DaffCartShippingAddressUpdateFailure(this.errorMatcher(error))))))));
|
|
2553
2554
|
}
|
|
2554
2555
|
}
|
|
2555
|
-
/** @nocollapse */ DaffCartShippingAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2556
|
-
/** @nocollapse */ DaffCartShippingAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2557
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2556
|
+
/** @nocollapse */ DaffCartShippingAddressEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingAddressEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartShippingAddressDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2557
|
+
/** @nocollapse */ DaffCartShippingAddressEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingAddressEffects });
|
|
2558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingAddressEffects, decorators: [{
|
|
2558
2559
|
type: Injectable
|
|
2559
2560
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2560
2561
|
type: Inject,
|
|
@@ -2575,9 +2576,9 @@ class DaffCartShippingInformationEffects {
|
|
|
2575
2576
|
this.delete$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction), switchMap((action) => this.driver.delete(this.storage.getCartId()).pipe(map((resp) => new DaffCartShippingInformationDeleteSuccess(resp)), catchError(error => of(new DaffCartShippingInformationDeleteFailure(this.errorMatcher(error))))))));
|
|
2576
2577
|
}
|
|
2577
2578
|
}
|
|
2578
|
-
/** @nocollapse */ DaffCartShippingInformationEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2579
|
-
/** @nocollapse */ DaffCartShippingInformationEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2579
|
+
/** @nocollapse */ DaffCartShippingInformationEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingInformationEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartShippingInformationDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2580
|
+
/** @nocollapse */ DaffCartShippingInformationEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingInformationEffects });
|
|
2581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingInformationEffects, decorators: [{
|
|
2581
2582
|
type: Injectable
|
|
2582
2583
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2583
2584
|
type: Inject,
|
|
@@ -2596,9 +2597,9 @@ class DaffCartShippingMethodsEffects {
|
|
|
2596
2597
|
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction), switchMap((action) => this.driver.list(this.storage.getCartId()).pipe(map((resp) => new DaffCartShippingMethodsLoadSuccess(resp)), catchError(error => of(new DaffCartShippingMethodsLoadFailure(this.errorMatcher(error))))))));
|
|
2597
2598
|
}
|
|
2598
2599
|
}
|
|
2599
|
-
/** @nocollapse */ DaffCartShippingMethodsEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2600
|
-
/** @nocollapse */ DaffCartShippingMethodsEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2600
|
+
/** @nocollapse */ DaffCartShippingMethodsEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingMethodsEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartShippingMethodsDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2601
|
+
/** @nocollapse */ DaffCartShippingMethodsEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingMethodsEffects });
|
|
2602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartShippingMethodsEffects, decorators: [{
|
|
2602
2603
|
type: Injectable
|
|
2603
2604
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2604
2605
|
type: Inject,
|
|
@@ -2636,9 +2637,9 @@ class DaffCartEffects {
|
|
|
2636
2637
|
: new DaffCartClearFailure(this.errorMatcher(error))))))));
|
|
2637
2638
|
}
|
|
2638
2639
|
}
|
|
2639
|
-
/** @nocollapse */ DaffCartEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2640
|
-
/** @nocollapse */ DaffCartEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2640
|
+
/** @nocollapse */ DaffCartEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartDriver }, { token: i2.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2641
|
+
/** @nocollapse */ DaffCartEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartEffects });
|
|
2642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartEffects, decorators: [{
|
|
2642
2643
|
type: Injectable
|
|
2643
2644
|
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2644
2645
|
type: Inject,
|
|
@@ -2677,32 +2678,30 @@ const DAFF_CART_REDUCERS = new InjectionToken('DAFF_CART_REDUCERS', {
|
|
|
2677
2678
|
|
|
2678
2679
|
class DaffCartStateModule {
|
|
2679
2680
|
}
|
|
2680
|
-
/** @nocollapse */ DaffCartStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2681
|
-
/** @nocollapse */ DaffCartStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2682
|
-
/** @nocollapse */ DaffCartStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2681
|
+
/** @nocollapse */ DaffCartStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2682
|
+
/** @nocollapse */ DaffCartStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffCartStateModule, imports: [i1$1.StoreFeatureModule, i1.EffectsFeatureModule] });
|
|
2683
|
+
/** @nocollapse */ DaffCartStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartStateModule, providers: [
|
|
2683
2684
|
{ provide: DaffCartItemStateDebounceTime, useValue: 4000 },
|
|
2684
2685
|
...daffPaymentProvideExtraReducers(combineReducers({
|
|
2685
2686
|
payment: daffCartPaymentReducer,
|
|
2686
2687
|
})),
|
|
2687
|
-
], imports: [
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
]] });
|
|
2705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCartStateModule, decorators: [{
|
|
2688
|
+
], imports: [StoreModule.forFeature(DAFF_CART_STORE_FEATURE_KEY, DAFF_CART_REDUCERS),
|
|
2689
|
+
EffectsModule.forFeature([
|
|
2690
|
+
DaffCartEffects,
|
|
2691
|
+
DaffCartItemEffects,
|
|
2692
|
+
DaffCartBillingAddressEffects,
|
|
2693
|
+
DaffCartShippingAddressEffects,
|
|
2694
|
+
DaffCartAddressEffects,
|
|
2695
|
+
DaffCartShippingInformationEffects,
|
|
2696
|
+
DaffCartShippingMethodsEffects,
|
|
2697
|
+
DaffCartPaymentEffects,
|
|
2698
|
+
DaffCartPaymentProcessorEffects,
|
|
2699
|
+
DaffCartPaymentMethodsEffects,
|
|
2700
|
+
DaffCartOrderEffects,
|
|
2701
|
+
DaffCartCouponEffects,
|
|
2702
|
+
DaffCartResolverEffects,
|
|
2703
|
+
])] });
|
|
2704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartStateModule, decorators: [{
|
|
2706
2705
|
type: NgModule,
|
|
2707
2706
|
args: [{
|
|
2708
2707
|
imports: [
|
|
@@ -2875,9 +2874,9 @@ class DaffCartFacade {
|
|
|
2875
2874
|
this.store.dispatch(action);
|
|
2876
2875
|
}
|
|
2877
2876
|
}
|
|
2878
|
-
/** @nocollapse */ DaffCartFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2879
|
-
/** @nocollapse */ DaffCartFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2877
|
+
/** @nocollapse */ DaffCartFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartFacade, deps: [{ token: i1$1.Store }, { token: DaffCartPaymentMethodIdMap }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2878
|
+
/** @nocollapse */ DaffCartFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartFacade, providedIn: 'root' });
|
|
2879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffCartFacade, decorators: [{
|
|
2881
2880
|
type: Injectable,
|
|
2882
2881
|
args: [{
|
|
2883
2882
|
providedIn: 'root',
|