@daffodil/cart 0.64.1 → 0.66.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/cart.service.d.ts +3 -1
- package/driver/in-memory/backend/cart-items/cart-items.service.d.ts +3 -1
- package/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.d.ts +3 -1
- package/driver/in-memory/helpers/compute-cart-item-prices.d.ts +3 -0
- package/driver/in-memory/helpers/compute-cart-totals.d.ts +3 -0
- package/driver/magento/models/responses/cart.d.ts +1 -1
- package/esm2020/driver/in-memory/backend/cart/cart.service.mjs +9 -5
- package/esm2020/driver/in-memory/backend/cart-items/cart-items.service.mjs +21 -16
- package/esm2020/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.mjs +10 -6
- package/esm2020/driver/in-memory/helpers/compute-cart-item-prices.mjs +7 -0
- package/esm2020/driver/in-memory/helpers/compute-cart-totals.mjs +46 -0
- package/esm2020/driver/magento/models/responses/cart.mjs +1 -1
- package/esm2020/driver/magento/transforms/outputs/cart-totals-transformer.mjs +23 -18
- package/esm2020/injection-tokens/public_api.mjs +1 -2
- package/esm2020/models/cart-total.mjs +1 -1
- package/esm2020/models/cart.mjs +1 -1
- package/esm2020/state/actions/cart-address.actions.mjs +1 -1
- package/esm2020/state/actions/cart-billing-address.actions.mjs +1 -1
- package/esm2020/state/actions/cart-coupon.actions.mjs +1 -1
- package/esm2020/state/actions/cart-item.actions.mjs +1 -1
- package/esm2020/state/actions/cart-order.actions.mjs +1 -1
- package/esm2020/state/actions/cart-payment-methods.actions.mjs +1 -1
- package/esm2020/state/actions/cart-payment.actions.mjs +1 -1
- package/esm2020/state/actions/cart-retrieval.mjs +71 -0
- package/esm2020/state/actions/cart-shipping-address.actions.mjs +1 -1
- package/esm2020/state/actions/cart-shipping-information.actions.mjs +1 -1
- package/esm2020/state/actions/cart-shipping-methods.actions.mjs +1 -1
- package/esm2020/state/actions/cart.actions.mjs +1 -1
- package/esm2020/state/actions/public_api.mjs +2 -1
- package/esm2020/state/cart-retrieval/get-response.mjs +12 -0
- package/esm2020/state/cart-retrieval/public_api.mjs +4 -0
- package/esm2020/state/cart-retrieval/token.mjs +14 -0
- package/esm2020/state/cart-retrieval/type.mjs +2 -0
- package/esm2020/state/cart-state.module.mjs +8 -3
- package/esm2020/state/effects/cart-address.effects.mjs +8 -7
- package/esm2020/state/effects/cart-billing-address.effects.mjs +7 -5
- package/esm2020/state/effects/cart-coupon.effects.mjs +17 -16
- package/esm2020/state/effects/cart-item.effects.mjs +12 -10
- package/esm2020/state/effects/cart-order.effects.mjs +8 -7
- package/esm2020/state/effects/cart-payment-methods.effects.mjs +6 -4
- package/esm2020/state/effects/cart-payment-processor.effects.mjs +7 -6
- package/esm2020/state/effects/cart-payment.effects.mjs +9 -7
- package/esm2020/state/effects/cart-resolver.effects.mjs +20 -15
- package/esm2020/state/effects/cart-shipping-address.effects.mjs +7 -5
- package/esm2020/state/effects/cart-shipping-information.effects.mjs +8 -6
- package/esm2020/state/effects/cart-shipping-methods.effects.mjs +6 -4
- package/esm2020/state/effects/cart.effects.mjs +16 -15
- package/esm2020/state/injection-tokens/error-matcher.token.mjs +8 -0
- package/esm2020/state/injection-tokens/public_api.mjs +2 -1
- package/esm2020/state/models/public_api.mjs +2 -1
- package/esm2020/state/models/stateful-cart.mjs +2 -0
- package/esm2020/state/public_api.mjs +2 -1
- package/esm2020/state/reducers/cart/cart.reducer.mjs +3 -16
- package/esm2020/state/reducers/cart/retrieval-actions.reducer.mjs +21 -0
- package/esm2020/state/reducers/cart-billing-address/cart-billing-address.reducer.mjs +2 -6
- package/esm2020/state/reducers/cart-coupon/cart-coupon.reducer.mjs +2 -6
- package/esm2020/state/reducers/cart-item/cart-item.reducer.mjs +2 -10
- package/esm2020/state/reducers/cart-item-entities/cart-item-entities.reducer.mjs +2 -35
- package/esm2020/state/reducers/cart-item-entities/retrieval-actions.reducer.mjs +20 -0
- package/esm2020/state/reducers/cart-item-entities/set-state.meta-reducer.mjs +46 -0
- package/esm2020/state/reducers/cart-order/cart-order.reducer.mjs +2 -5
- package/esm2020/state/reducers/cart-payment/cart-payment.reducer.mjs +2 -6
- package/esm2020/state/reducers/cart-payment/payment.reducer.mjs +2 -2
- package/esm2020/state/reducers/cart-payment-methods/cart-payment-methods.reducer.mjs +2 -2
- package/esm2020/state/reducers/cart-shipping-address/cart-shipping-address.reducer.mjs +2 -6
- package/esm2020/state/reducers/cart-shipping-information/cart-shipping-information.reducer.mjs +2 -8
- package/esm2020/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.mjs +2 -2
- package/esm2020/state/reducers/public_api.mjs +3 -1
- package/esm2020/state/reducers/token/config.token.mjs +18 -0
- package/esm2020/state/reducers/token/meta.token.mjs +27 -0
- package/esm2020/state/reducers/token/public_api.mjs +2 -1
- package/esm2020/state/reducers/token/reducers.token.mjs +20 -6
- package/esm2020/state/selectors/cart/cart.selector.mjs +11 -11
- package/esm2020/state/testing/cart-testing.module.mjs +6 -6
- package/esm2020/state/testing/mock-cart-facade.mjs +2 -2
- package/esm2020/state/testing/public_api.mjs +2 -2
- package/esm2020/testing/factories/cart-shipping-information.factory.mjs +25 -0
- package/esm2020/testing/factories/cart-total.factory.mjs +97 -0
- package/esm2020/testing/factories/cart.factory.mjs +14 -50
- package/esm2020/testing/factories/public_api.mjs +3 -1
- package/fesm2015/daffodil-cart-driver-in-memory.mjs +44 -18
- package/fesm2015/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento.mjs +22 -17
- package/fesm2015/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-cart-state-testing.mjs +7 -7
- package/fesm2015/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2015/daffodil-cart-state.mjs +326 -141
- package/fesm2015/daffodil-cart-state.mjs.map +1 -1
- package/fesm2015/daffodil-cart-testing.mjs +148 -75
- package/fesm2015/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2015/daffodil-cart.mjs +1 -8
- package/fesm2015/daffodil-cart.mjs.map +1 -1
- package/fesm2020/daffodil-cart-driver-in-memory.mjs +81 -24
- package/fesm2020/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2020/daffodil-cart-driver-magento.mjs +22 -17
- package/fesm2020/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-cart-state-testing.mjs +7 -7
- package/fesm2020/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2020/daffodil-cart-state.mjs +330 -178
- package/fesm2020/daffodil-cart-state.mjs.map +1 -1
- package/fesm2020/daffodil-cart-testing.mjs +148 -75
- package/fesm2020/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2020/daffodil-cart.mjs +1 -8
- package/fesm2020/daffodil-cart.mjs.map +1 -1
- package/injection-tokens/public_api.d.ts +0 -1
- package/models/cart-total.d.ts +4 -0
- package/models/cart.d.ts +1 -1
- package/package.json +1 -1
- package/state/actions/cart-address.actions.d.ts +6 -5
- package/state/actions/cart-billing-address.actions.d.ts +9 -8
- package/state/actions/cart-coupon.actions.d.ts +17 -16
- package/state/actions/cart-item.actions.d.ts +18 -17
- package/state/actions/cart-order.actions.d.ts +4 -4
- package/state/actions/cart-payment-methods.actions.d.ts +4 -4
- package/state/actions/cart-payment.actions.d.ts +16 -15
- package/state/actions/cart-retrieval.d.ts +5 -0
- package/state/actions/cart-shipping-address.actions.d.ts +9 -8
- package/state/actions/cart-shipping-information.actions.d.ts +13 -12
- package/state/actions/cart-shipping-methods.actions.d.ts +4 -4
- package/state/actions/cart.actions.d.ts +25 -28
- package/state/actions/public_api.d.ts +1 -0
- package/state/cart-retrieval/get-response.d.ts +8 -0
- package/state/cart-retrieval/public_api.d.ts +3 -0
- package/state/cart-retrieval/token.d.ts +10 -0
- package/state/cart-retrieval/type.d.ts +40 -0
- package/state/effects/cart-address.effects.d.ts +2 -16
- package/state/effects/cart-billing-address.effects.d.ts +3 -17
- package/state/effects/cart-coupon.effects.d.ts +5 -5
- package/state/effects/cart-item.effects.d.ts +7 -49
- package/state/effects/cart-order.effects.d.ts +2 -2
- package/state/effects/cart-payment-methods.effects.d.ts +2 -2
- package/state/effects/cart-payment-processor.effects.d.ts +1 -16
- package/state/effects/cart-payment.effects.d.ts +5 -19
- package/state/effects/cart-shipping-address.effects.d.ts +3 -17
- package/state/effects/cart-shipping-information.effects.d.ts +4 -32
- package/state/effects/cart-shipping-methods.effects.d.ts +2 -2
- package/state/effects/cart.effects.d.ts +5 -19
- package/state/injection-tokens/public_api.d.ts +1 -0
- package/state/models/public_api.d.ts +1 -0
- package/state/models/stateful-cart.d.ts +8 -0
- package/state/public_api.d.ts +1 -0
- package/state/reducers/cart/retrieval-actions.reducer.d.ts +9 -0
- package/state/reducers/cart-item-entities/retrieval-actions.reducer.d.ts +10 -0
- package/state/reducers/cart-item-entities/set-state.meta-reducer.d.ts +11 -0
- package/state/reducers/public_api.d.ts +2 -0
- package/state/reducers/token/config.token.d.ts +10 -0
- package/state/reducers/token/meta.token.d.ts +23 -0
- package/state/reducers/token/public_api.d.ts +1 -0
- package/state/selectors/cart/cart.selector.d.ts +1 -0
- package/state/testing/cart-testing.module.d.ts +4 -4
- package/state/testing/public_api.d.ts +1 -1
- package/testing/factories/cart-shipping-information.factory.d.ts +12 -0
- package/testing/factories/cart-total.factory.d.ts +23 -0
- package/testing/factories/cart.factory.d.ts +9 -8
- package/testing/factories/public_api.d.ts +2 -0
- package/esm2020/injection-tokens/error-matcher.token.mjs +0 -8
- /package/{injection-tokens → state/injection-tokens}/error-matcher.token.d.ts +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Action } from '@ngrx/store';
|
|
2
|
+
import { DaffCart } from '@daffodil/cart';
|
|
3
|
+
/**
|
|
4
|
+
* Represents an action that loads a portion of the cart.
|
|
5
|
+
*/
|
|
6
|
+
export interface DaffCartRetrievalAction<T extends DaffCart = DaffCart> extends Action {
|
|
7
|
+
readonly payload: Partial<T>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Represents an injection of a retrieval action that implements the {@link DaffCartRetrievalAction} interface
|
|
11
|
+
* and therefore does not need transformation.
|
|
12
|
+
* If the injected action needs transformation, use {@link DaffCartRetrievalActionTransformedInjection}
|
|
13
|
+
*/
|
|
14
|
+
export interface DaffCartRetrievalActionDirectInjection<T extends DaffCartRetrievalAction = DaffCartRetrievalAction> {
|
|
15
|
+
/**
|
|
16
|
+
* The action type.
|
|
17
|
+
*/
|
|
18
|
+
type: T['type'];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents an injection of a retrieval action that doesn't implement the {@link DaffCartRetrievalAction} interface.
|
|
22
|
+
* Contains a way to get the cart from the action.
|
|
23
|
+
*/
|
|
24
|
+
export interface DaffCartRetrievalActionTransformedInjection<T extends Action = Action> {
|
|
25
|
+
/**
|
|
26
|
+
* The action type.
|
|
27
|
+
*/
|
|
28
|
+
type: T['type'];
|
|
29
|
+
/**
|
|
30
|
+
* A function that gets the retrieved cart from the action.
|
|
31
|
+
*/
|
|
32
|
+
transform: <TCart extends DaffCart = DaffCart>(action: T) => Partial<TCart>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Represents an injection of a cart retrieval action.
|
|
36
|
+
* These actions are typically dispatched when an operation that mutates or loads the cart completes.
|
|
37
|
+
* Actions provided to {@link DAFF_CART_RETRIEVAL_ACTIONS} are natively understood by Daffodil reducers and will automatically
|
|
38
|
+
* populate the appropriate pieces of state when they are dispatched.
|
|
39
|
+
*/
|
|
40
|
+
export declare type DaffCartRetrievalActionInjection = DaffCartRetrievalActionDirectInjection | DaffCartRetrievalActionTransformedInjection;
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartAddress, DaffCart, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartAddressServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartAddressUpdateFailure, DaffCartStorageFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartAddressEffects<T extends DaffCartAddress, V extends DaffCart> {
|
|
8
8
|
private actions$;
|
|
@@ -10,21 +10,7 @@ export declare class DaffCartAddressEffects<T extends DaffCartAddress, V extends
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartAddressServiceInterface<T, V>, storage: DaffCartStorageService);
|
|
13
|
-
update$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartAddressUpdateFailure
|
|
14
|
-
subtotal: number;
|
|
15
|
-
grand_total: number;
|
|
16
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
17
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
18
|
-
billing_address: DaffCartAddress;
|
|
19
|
-
shipping_address: DaffCartAddress;
|
|
20
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
21
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
22
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
23
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
24
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
25
|
-
extra_attributes: any;
|
|
26
|
-
id: string;
|
|
27
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
+
update$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartAddressUpdateFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
28
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartAddressEffects<any, any>, never>;
|
|
29
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartAddressEffects<any, any>>;
|
|
30
16
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartAddress, DaffCart, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartBillingAddressServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartBillingAddressLoadFailure, DaffCartBillingAddressUpdateFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartBillingAddressEffects<T extends DaffCartAddress, V extends DaffCart> {
|
|
8
8
|
private actions$;
|
|
@@ -10,22 +10,8 @@ export declare class DaffCartBillingAddressEffects<T extends DaffCartAddress, V
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartBillingAddressServiceInterface<T, V>, storage: DaffCartStorageService);
|
|
13
|
-
get$: import("rxjs").Observable<DaffCartBillingAddressLoadFailure
|
|
14
|
-
update$: import("rxjs").Observable<DaffCartBillingAddressUpdateFailure
|
|
15
|
-
subtotal: number;
|
|
16
|
-
grand_total: number;
|
|
17
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
18
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
19
|
-
billing_address: DaffCartAddress;
|
|
20
|
-
shipping_address: DaffCartAddress;
|
|
21
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
22
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
23
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
24
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
25
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
26
|
-
extra_attributes: any;
|
|
27
|
-
id: string;
|
|
28
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
+
get$: import("rxjs").Observable<DaffCartBillingAddressLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
|
+
update$: import("rxjs").Observable<DaffCartBillingAddressUpdateFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
29
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartBillingAddressEffects<any, any>, never>;
|
|
30
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartBillingAddressEffects<any, any>>;
|
|
31
17
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCart, DaffCartCoupon, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartCouponServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartCouponListFailure, DaffCartCouponRemoveFailure, DaffCartCouponRemoveAllFailure, DaffCartCouponApplyFailure, DaffCartStorageFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartCouponEffects<T extends DaffCart = DaffCart, V extends DaffCartCoupon = DaffCartCoupon> {
|
|
8
8
|
private actions$;
|
|
@@ -10,10 +10,10 @@ export declare class DaffCartCouponEffects<T extends DaffCart = DaffCart, V exte
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartCouponServiceInterface<T, V>, storage: DaffCartStorageService);
|
|
13
|
-
apply$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponApplyFailure
|
|
14
|
-
list$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponListFailure
|
|
15
|
-
remove$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponRemoveFailure
|
|
16
|
-
removeAll$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponRemoveAllFailure
|
|
13
|
+
apply$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponApplyFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
|
+
list$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponListFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
|
+
remove$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponRemoveFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
16
|
+
removeAll$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartCouponRemoveAllFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartCouponEffects<any, any>, never>;
|
|
18
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartCouponEffects<any, any>>;
|
|
19
19
|
}
|
|
@@ -3,7 +3,7 @@ import { Store } from '@ngrx/store';
|
|
|
3
3
|
import { DaffCartItemInput, DaffCart, DaffCartStorageService } from '@daffodil/cart';
|
|
4
4
|
import { DaffCartDriverResolveService, DaffCartItemServiceInterface } from '@daffodil/cart/driver';
|
|
5
5
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
6
|
-
import {
|
|
6
|
+
import { DaffCartItemLoadFailure, DaffCartItemDeleteFailure, DaffCartItemUpdateFailure, DaffCartItemListFailure, DaffCartItemAddFailure, DaffCartItemStateReset, DaffCartItemDeleteOutOfStockFailure, DaffCartItemActions } from '../actions/public_api';
|
|
7
7
|
import { DaffStatefulCartItem } from '../models/public_api';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class DaffCartItemEffects<T extends DaffStatefulCartItem, U extends DaffCartItemInput, V extends DaffCart> {
|
|
@@ -15,56 +15,14 @@ export declare class DaffCartItemEffects<T extends DaffStatefulCartItem, U exten
|
|
|
15
15
|
private store;
|
|
16
16
|
private cartResolver;
|
|
17
17
|
constructor(actions$: Actions<DaffCartItemActions<T, U, V>>, errorMatcher: ErrorTransformer, driver: DaffCartItemServiceInterface<T, U, V>, storage: DaffCartStorageService, cartItemStateDebounceTime: number, store: Store, cartResolver: DaffCartDriverResolveService);
|
|
18
|
-
list$: import("rxjs").Observable<DaffCartItemListFailure
|
|
19
|
-
get$: import("rxjs").Observable<
|
|
18
|
+
list$: import("rxjs").Observable<DaffCartItemListFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
19
|
+
get$: import("rxjs").Observable<DaffCartItemLoadFailure<T>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
20
20
|
private addCartItem$;
|
|
21
|
-
add$: import("rxjs").Observable<DaffCartItemAddFailure
|
|
22
|
-
|
|
23
|
-
grand_total: number;
|
|
24
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
25
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
26
|
-
billing_address: import("@daffodil/cart").DaffCartAddress;
|
|
27
|
-
shipping_address: import("@daffodil/cart").DaffCartAddress;
|
|
28
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
29
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
30
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
31
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
32
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
33
|
-
extra_attributes: any;
|
|
34
|
-
id: string;
|
|
35
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
36
|
-
update$: import("rxjs").Observable<DaffCartItemUpdateFailure<T> | DaffCartItemUpdateSuccess<{
|
|
37
|
-
subtotal: number;
|
|
38
|
-
grand_total: number;
|
|
39
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
40
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
41
|
-
billing_address: import("@daffodil/cart").DaffCartAddress;
|
|
42
|
-
shipping_address: import("@daffodil/cart").DaffCartAddress;
|
|
43
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
44
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
45
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
46
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
47
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
48
|
-
extra_attributes: any;
|
|
49
|
-
id: string;
|
|
50
|
-
}, T>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
21
|
+
add$: import("rxjs").Observable<DaffCartItemAddFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
22
|
+
update$: import("rxjs").Observable<DaffCartItemUpdateFailure<T>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
51
23
|
resetCartItemStateAfterChange$: import("rxjs").Observable<DaffCartItemStateReset> & import("@ngrx/effects").CreateEffectMetadata;
|
|
52
|
-
delete$: import("rxjs").Observable<DaffCartItemDeleteFailure<T
|
|
53
|
-
|
|
54
|
-
grand_total: number;
|
|
55
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
56
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
57
|
-
billing_address: import("@daffodil/cart").DaffCartAddress;
|
|
58
|
-
shipping_address: import("@daffodil/cart").DaffCartAddress;
|
|
59
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
60
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
61
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
62
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
63
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
64
|
-
extra_attributes: any;
|
|
65
|
-
id: string;
|
|
66
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
67
|
-
removeOutOfStock$: import("rxjs").Observable<DaffCartItemDeleteOutOfStockFailure | DaffCartItemDeleteOutOfStockSuccess<DaffCart>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
24
|
+
delete$: import("rxjs").Observable<DaffCartItemDeleteFailure<T>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
25
|
+
removeOutOfStock$: import("rxjs").Observable<DaffCartItemDeleteOutOfStockFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
68
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartItemEffects<any, any, any>, never>;
|
|
69
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartItemEffects<any, any, any>>;
|
|
70
28
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCart, DaffCartPaymentMethod, DaffCartOrderResult, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartOrderServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartPlaceOrderFailure, DaffCartStorageFailure, DaffCartCreate } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartOrderEffects<T extends DaffCart = DaffCart, V extends DaffCartPaymentMethod = DaffCartPaymentMethod, R extends DaffCartOrderResult = DaffCartOrderResult> {
|
|
8
8
|
private actions$;
|
|
@@ -10,7 +10,7 @@ export declare class DaffCartOrderEffects<T extends DaffCart = DaffCart, V exten
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartOrderServiceInterface<T, V, R>, storage: DaffCartStorageService);
|
|
13
|
-
placeOrder$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartPlaceOrderFailure
|
|
13
|
+
placeOrder$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartPlaceOrderFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
14
|
resetCart$: import("rxjs").Observable<DaffCartCreate> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartOrderEffects<any, any, any>, never>;
|
|
16
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartOrderEffects<any, any, any>>;
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartPaymentMethod, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartPaymentMethodsServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartPaymentMethodsLoadFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartPaymentMethodsEffects<T extends DaffCartPaymentMethod> {
|
|
8
8
|
private actions$;
|
|
@@ -10,7 +10,7 @@ export declare class DaffCartPaymentMethodsEffects<T extends DaffCartPaymentMeth
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartPaymentMethodsServiceInterface<T>, storage: DaffCartStorageService);
|
|
13
|
-
list$: import("rxjs").Observable<DaffCartPaymentMethodsLoadFailure
|
|
13
|
+
list$: import("rxjs").Observable<DaffCartPaymentMethodsLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartPaymentMethodsEffects<any>, never>;
|
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartPaymentMethodsEffects<any>>;
|
|
16
16
|
}
|
|
@@ -4,7 +4,6 @@ import { DaffCartPaymentMethod, DaffCart, DaffCartAddress, DaffCartStorageServic
|
|
|
4
4
|
import { DaffCartPaymentServiceInterface } from '@daffodil/cart/driver';
|
|
5
5
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
6
6
|
import { DaffPaymentProcessorCollection, DaffPaymentGenerateTokenFailure } from '@daffodil/payment/state';
|
|
7
|
-
import { DaffCartPaymentUpdateFailure, DaffCartPaymentUpdateSuccess } from '../actions/public_api';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class DaffCartPaymentProcessorEffects<T extends DaffCartPaymentMethod = DaffCartPaymentMethod, V extends DaffCart = DaffCart, R extends DaffCartAddress = DaffCartAddress> {
|
|
10
9
|
private actions$;
|
|
@@ -15,21 +14,7 @@ export declare class DaffCartPaymentProcessorEffects<T extends DaffCartPaymentMe
|
|
|
15
14
|
private storage;
|
|
16
15
|
private injector;
|
|
17
16
|
constructor(actions$: Actions, processors: DaffPaymentProcessorCollection, errorMatcher: ErrorTransformer, paymentErrorMatcher: ErrorTransformer, driver: DaffCartPaymentServiceInterface<T, V, R>, storage: DaffCartStorageService, injector: Injector);
|
|
18
|
-
update$: import("rxjs").Observable<
|
|
19
|
-
subtotal: number;
|
|
20
|
-
grand_total: number;
|
|
21
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
22
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
23
|
-
billing_address: DaffCartAddress;
|
|
24
|
-
shipping_address: DaffCartAddress;
|
|
25
|
-
payment: DaffCartPaymentMethod;
|
|
26
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
27
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
28
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
29
|
-
available_payment_methods: DaffCartPaymentMethod[];
|
|
30
|
-
extra_attributes: any;
|
|
31
|
-
id: string;
|
|
32
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
17
|
+
update$: import("rxjs").Observable<DaffPaymentGenerateTokenFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
33
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartPaymentProcessorEffects<any, any, any>, never>;
|
|
34
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartPaymentProcessorEffects<any, any, any>>;
|
|
35
20
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartPaymentMethod, DaffCart, DaffCartAddress, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartPaymentServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartPaymentLoadFailure, DaffCartPaymentRemoveFailure, DaffCartPaymentUpdateFailure, DaffCartPaymentUpdateWithBillingFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartPaymentEffects<T extends DaffCartPaymentMethod = DaffCartPaymentMethod, V extends DaffCart = DaffCart, R extends DaffCartAddress = DaffCartAddress> {
|
|
8
8
|
private actions$;
|
|
@@ -10,24 +10,10 @@ export declare class DaffCartPaymentEffects<T extends DaffCartPaymentMethod = Da
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartPaymentServiceInterface<T, V, R>, storage: DaffCartStorageService);
|
|
13
|
-
get$: import("rxjs").Observable<DaffCartPaymentLoadFailure
|
|
14
|
-
update$: import("rxjs").Observable<DaffCartPaymentUpdateFailure
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
18
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
19
|
-
billing_address: DaffCartAddress;
|
|
20
|
-
shipping_address: DaffCartAddress;
|
|
21
|
-
payment: DaffCartPaymentMethod;
|
|
22
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
23
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
24
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
25
|
-
available_payment_methods: DaffCartPaymentMethod[];
|
|
26
|
-
extra_attributes: any;
|
|
27
|
-
id: string;
|
|
28
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
29
|
-
updateWithBilling$: import("rxjs").Observable<DaffCartPaymentUpdateWithBillingFailure | DaffCartPaymentUpdateWithBillingSuccess<V>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
30
|
-
remove$: import("rxjs").Observable<DaffCartPaymentRemoveSuccess | DaffCartPaymentRemoveFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
+
get$: import("rxjs").Observable<DaffCartPaymentLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
|
+
update$: import("rxjs").Observable<DaffCartPaymentUpdateFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
|
+
updateWithBilling$: import("rxjs").Observable<DaffCartPaymentUpdateWithBillingFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
16
|
+
remove$: import("rxjs").Observable<DaffCartPaymentRemoveFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
31
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartPaymentEffects<any, any, any>, never>;
|
|
32
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartPaymentEffects<any, any, any>>;
|
|
33
19
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartAddress, DaffCart, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartShippingAddressServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartShippingAddressLoadFailure, DaffCartShippingAddressUpdateFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartShippingAddressEffects<T extends DaffCartAddress, V extends DaffCart> {
|
|
8
8
|
private actions$;
|
|
@@ -10,22 +10,8 @@ export declare class DaffCartShippingAddressEffects<T extends DaffCartAddress, V
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartShippingAddressServiceInterface<T, V>, storage: DaffCartStorageService);
|
|
13
|
-
get$: import("rxjs").Observable<DaffCartShippingAddressLoadFailure
|
|
14
|
-
update$: import("rxjs").Observable<DaffCartShippingAddressUpdateFailure
|
|
15
|
-
subtotal: number;
|
|
16
|
-
grand_total: number;
|
|
17
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
18
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
19
|
-
billing_address: DaffCartAddress;
|
|
20
|
-
shipping_address: DaffCartAddress;
|
|
21
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
22
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
23
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
24
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
25
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
26
|
-
extra_attributes: any;
|
|
27
|
-
id: string;
|
|
28
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
+
get$: import("rxjs").Observable<DaffCartShippingAddressLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
|
+
update$: import("rxjs").Observable<DaffCartShippingAddressUpdateFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
29
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartShippingAddressEffects<any, any>, never>;
|
|
30
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartShippingAddressEffects<any, any>>;
|
|
31
17
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartShippingInformation, DaffCart, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartShippingInformationServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartShippingInformationLoadFailure, DaffCartShippingInformationDeleteFailure, DaffCartShippingInformationUpdateFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartShippingInformationEffects<T extends DaffCartShippingInformation, V extends DaffCart> {
|
|
8
8
|
private actions$;
|
|
@@ -10,37 +10,9 @@ export declare class DaffCartShippingInformationEffects<T extends DaffCartShippi
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartShippingInformationServiceInterface<T, V>, storage: DaffCartStorageService);
|
|
13
|
-
get$: import("rxjs").Observable<DaffCartShippingInformationLoadFailure
|
|
14
|
-
update$: import("rxjs").Observable<DaffCartShippingInformationUpdateFailure
|
|
15
|
-
|
|
16
|
-
grand_total: number;
|
|
17
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
18
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
19
|
-
billing_address: import("@daffodil/cart").DaffCartAddress;
|
|
20
|
-
shipping_address: import("@daffodil/cart").DaffCartAddress;
|
|
21
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
22
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
23
|
-
shipping_information: DaffCartShippingInformation;
|
|
24
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
25
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
26
|
-
extra_attributes: any;
|
|
27
|
-
id: string;
|
|
28
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
29
|
-
delete$: import("rxjs").Observable<DaffCartShippingInformationDeleteFailure | DaffCartShippingInformationDeleteSuccess<{
|
|
30
|
-
subtotal: number;
|
|
31
|
-
grand_total: number;
|
|
32
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
33
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
34
|
-
billing_address: import("@daffodil/cart").DaffCartAddress;
|
|
35
|
-
shipping_address: import("@daffodil/cart").DaffCartAddress;
|
|
36
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
37
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
38
|
-
shipping_information: DaffCartShippingInformation;
|
|
39
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
40
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
41
|
-
extra_attributes: any;
|
|
42
|
-
id: string;
|
|
43
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
+
get$: import("rxjs").Observable<DaffCartShippingInformationLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
|
+
update$: import("rxjs").Observable<DaffCartShippingInformationUpdateFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
|
+
delete$: import("rxjs").Observable<DaffCartShippingInformationDeleteFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
44
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartShippingInformationEffects<any, any>, never>;
|
|
45
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartShippingInformationEffects<any, any>>;
|
|
46
18
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCartShippingRate, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartShippingMethodsServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartShippingMethodsLoadFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartShippingMethodsEffects<T extends DaffCartShippingRate> {
|
|
8
8
|
private actions$;
|
|
@@ -10,7 +10,7 @@ export declare class DaffCartShippingMethodsEffects<T extends DaffCartShippingRa
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartShippingMethodsServiceInterface<T>, storage: DaffCartStorageService);
|
|
13
|
-
list$: import("rxjs").Observable<DaffCartShippingMethodsLoadFailure
|
|
13
|
+
list$: import("rxjs").Observable<DaffCartShippingMethodsLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartShippingMethodsEffects<any>, never>;
|
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartShippingMethodsEffects<any>>;
|
|
16
16
|
}
|
|
@@ -2,7 +2,7 @@ import { Actions } from '@ngrx/effects';
|
|
|
2
2
|
import { DaffCart, DaffCartStorageService } from '@daffodil/cart';
|
|
3
3
|
import { DaffCartServiceInterface } from '@daffodil/cart/driver';
|
|
4
4
|
import { ErrorTransformer } from '@daffodil/core/state';
|
|
5
|
-
import {
|
|
5
|
+
import { DaffCartLoadFailure, DaffAddToCartFailure, DaffCartClearFailure, DaffCartCreateFailure, DaffCartStorageFailure } from '../actions/public_api';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DaffCartEffects<T extends DaffCart> {
|
|
8
8
|
private actions$;
|
|
@@ -10,25 +10,11 @@ export declare class DaffCartEffects<T extends DaffCart> {
|
|
|
10
10
|
private driver;
|
|
11
11
|
private storage;
|
|
12
12
|
constructor(actions$: Actions, errorMatcher: ErrorTransformer, driver: DaffCartServiceInterface<T>, storage: DaffCartStorageService);
|
|
13
|
-
create$: import("rxjs").Observable<DaffCartCreateFailure
|
|
13
|
+
create$: import("rxjs").Observable<DaffCartCreateFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
14
|
storeId$: import("rxjs").Observable<DaffCartStorageFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
|
-
get$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartLoadFailure
|
|
16
|
-
addToCart$: import("rxjs").Observable<
|
|
17
|
-
clear$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartClearFailure
|
|
18
|
-
subtotal: number;
|
|
19
|
-
grand_total: number;
|
|
20
|
-
coupons: import("@daffodil/cart").DaffCartCoupon[];
|
|
21
|
-
items: import("@daffodil/cart").DaffCartItem[];
|
|
22
|
-
billing_address: import("@daffodil/cart").DaffCartAddress;
|
|
23
|
-
shipping_address: import("@daffodil/cart").DaffCartAddress;
|
|
24
|
-
payment: import("@daffodil/cart").DaffCartPaymentMethod;
|
|
25
|
-
totals: import("@daffodil/cart").DaffCartTotal[];
|
|
26
|
-
shipping_information: import("@daffodil/cart").DaffCartShippingInformation;
|
|
27
|
-
available_shipping_methods: import("@daffodil/cart").DaffCartShippingRate[];
|
|
28
|
-
available_payment_methods: import("@daffodil/cart").DaffCartPaymentMethod[];
|
|
29
|
-
extra_attributes: any;
|
|
30
|
-
id: string;
|
|
31
|
-
}>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
|
+
get$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartLoadFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
16
|
+
addToCart$: import("rxjs").Observable<DaffAddToCartFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
17
|
+
clear$: import("rxjs").Observable<DaffCartStorageFailure | DaffCartClearFailure> & import("@ngrx/effects").CreateEffectMetadata;
|
|
32
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartEffects<any>, never>;
|
|
33
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartEffects<any>>;
|
|
34
20
|
}
|
package/state/public_api.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionReducer } from '@ngrx/store';
|
|
2
|
+
import { DaffCart } from '@daffodil/cart';
|
|
3
|
+
import { DaffCartRetrievalActionInjection } from '../../cart-retrieval/public_api';
|
|
4
|
+
import { DaffCartReducerState } from '../cart-state.interface';
|
|
5
|
+
/**
|
|
6
|
+
* Reducer function factory that updates cart state according to a list of passed cart retrieval actions.
|
|
7
|
+
* See {@link DaffCartRetrievalActionInjection}.
|
|
8
|
+
*/
|
|
9
|
+
export declare function daffCartRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): ActionReducer<DaffCartReducerState<T>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EntityState } from '@ngrx/entity';
|
|
2
|
+
import { Action } from '@ngrx/store';
|
|
3
|
+
import { DaffCart } from '@daffodil/cart';
|
|
4
|
+
import { DaffCartRetrievalActionInjection } from '../../cart-retrieval/public_api';
|
|
5
|
+
import { DaffStatefulCartItem } from '../../models/stateful-cart-item';
|
|
6
|
+
/**
|
|
7
|
+
* Reducer function factory that updates cart item entities according to a list of passed cart retrieval actions.
|
|
8
|
+
* See {@link DaffCartRetrievalActionInjection}.
|
|
9
|
+
*/
|
|
10
|
+
export declare function daffCartItemEntitiesRetrievalActionsReducerFactory<T extends DaffStatefulCartItem = DaffStatefulCartItem, V extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): (state: EntityState<T>, action: Action) => EntityState<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ActionReducer } from '@ngrx/store';
|
|
2
|
+
import { DaffCart, DaffCartOrderResult } from '@daffodil/cart';
|
|
3
|
+
import { DaffCartItemActions } from '../../actions/public_api';
|
|
4
|
+
import { DaffStatefulCartItem } from '../../models/public_api';
|
|
5
|
+
import { DaffCartReducersState } from '../cart-reducers-state.interface';
|
|
6
|
+
declare type Reducer<T extends DaffStatefulCartItem = DaffStatefulCartItem> = ActionReducer<DaffCartReducersState<DaffCart, DaffCartOrderResult, T>, DaffCartItemActions<T>>;
|
|
7
|
+
/**
|
|
8
|
+
* A meta reducer for determining and setting the correct `daffState` values on cart items.
|
|
9
|
+
*/
|
|
10
|
+
export declare function daffCartSetItemStateMetaReducer<T extends DaffStatefulCartItem = DaffStatefulCartItem>(reducer: Reducer<T>): Reducer<T>;
|
|
11
|
+
export {};
|
|
@@ -12,4 +12,6 @@ export { DaffCartOrderReducerState } from './cart-order/cart-order-state.interfa
|
|
|
12
12
|
export { daffCartOrderInitialState } from './cart-order/cart-order-initial-state';
|
|
13
13
|
export { DAFF_CART_STORE_FEATURE_KEY } from './cart-store-feature-key';
|
|
14
14
|
export { daffCartItemEntitiesAdapter } from './cart-item-entities/cart-item-entities-reducer-adapter';
|
|
15
|
+
export { daffCartItemEntitiesRetrievalActionsReducerFactory } from './cart-item-entities/retrieval-actions.reducer';
|
|
16
|
+
export { daffCartRetrievalActionsReducerFactory } from './cart/retrieval-actions.reducer';
|
|
15
17
|
export * from './token/public_api';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { StoreConfig } from '@ngrx/store';
|
|
3
|
+
import { DaffCart } from '@daffodil/cart';
|
|
4
|
+
import { DaffCartReducersState } from '../cart-reducers-state.interface';
|
|
5
|
+
/**
|
|
6
|
+
* An internal token to hold the Daffodil cart feature store config.
|
|
7
|
+
*
|
|
8
|
+
* @docs-private
|
|
9
|
+
*/
|
|
10
|
+
export declare const DAFF_CART_STORE_CONFIG: InjectionToken<StoreConfig<DaffCartReducersState<DaffCart, import("@daffodil/cart").DaffCartOrderResult, import("@daffodil/cart/state").DaffStatefulCartItem>, import("@ngrx/store").Action>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import { MetaReducer } from '@ngrx/store';
|
|
3
|
+
import { DaffCart } from '@daffodil/cart';
|
|
4
|
+
import { DaffCartReducersState } from '../cart-reducers-state.interface';
|
|
5
|
+
/**
|
|
6
|
+
* A token to hold the injectable extra meta-reducers.
|
|
7
|
+
*
|
|
8
|
+
* Prefer using {@link daffCartProvideMetaReducers}.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DAFF_CART_META_REDUCERS: InjectionToken<MetaReducer<DaffCartReducersState<DaffCart, import("@daffodil/cart").DaffCartOrderResult, import("@daffodil/cart/state").DaffStatefulCartItem>, import("@ngrx/store").Action>[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Provides additional meta-reducers that run after the standard Daffodil cart meta-reducers.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* providers: [
|
|
16
|
+
* ...daffCartProvideMetaReducers(
|
|
17
|
+
* myMetaReducer1,
|
|
18
|
+
* myMetaReducer2
|
|
19
|
+
* )
|
|
20
|
+
* ]
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function daffCartProvideMetaReducers<T extends DaffCart = DaffCart>(...metaReducers: MetaReducer<DaffCartReducersState<T>>[]): Provider[];
|
|
@@ -167,6 +167,7 @@ export interface DaffCartStateMemoizedSelectors<T extends DaffCart = DaffCart, V
|
|
|
167
167
|
selectCartTotalTax: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartTotal['value']>;
|
|
168
168
|
/**
|
|
169
169
|
* Selects the DaffCartTotals for cart discounts. These are discounts associated with coupon codes.
|
|
170
|
+
* @deprecated use {@link DaffCart#discounts} instead.
|
|
170
171
|
*/
|
|
171
172
|
selectCartDiscountTotals: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartTotal[]>;
|
|
172
173
|
selectCartShippingTotal: MemoizedSelector<DaffCartStateRootSlice<T, V, U>, DaffCartTotal['value']>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
4
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<
|
|
5
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<
|
|
2
|
+
export declare class DaffCartStateTestingModule {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartStateTestingModule, never>;
|
|
4
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCartStateTestingModule, never, never, never>;
|
|
5
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCartStateTestingModule>;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { DaffCartStateTestingModule } from './cart-testing.module';
|
|
2
2
|
export { MockDaffCartFacade } from './mock-cart-facade';
|
|
3
3
|
export * from './factories/stateful-cart-item.factory';
|
|
4
4
|
export * from './factories/stateful-composite-cart-item.factory';
|