@daffodil/cart 0.91.0 → 0.92.3-rc.1
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/fesm2022/daffodil-cart-driver-in-memory.mjs +73 -73
- package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs +34 -34
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento.mjs +82 -85
- package/fesm2022/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-testing.mjs +37 -37
- package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver.mjs +3 -3
- package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
- package/fesm2022/daffodil-cart-routing.mjs +37 -37
- package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state-testing.mjs +16 -16
- package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state.mjs +54 -79
- package/fesm2022/daffodil-cart-state.mjs.map +1 -1
- package/fesm2022/daffodil-cart-testing.mjs +27 -28
- package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart.mjs +3 -3
- package/fesm2022/daffodil-cart.mjs.map +1 -1
- package/index.d.ts +0 -5
- package/package.json +1 -1
- package/testing/index.d.ts +0 -1
|
@@ -10,7 +10,7 @@ import { DaffCartPaymentDriver, DaffCartDriverErrorCodes, DaffCartAddressDriver,
|
|
|
10
10
|
import { DaffPaymentGenerateTokenFailure, DAFF_PAYMENT_PROCESSOR_COLLECTION, DAFF_PAYMENT_ERROR_MATCHER, daffPaymentInitialState, DaffPaymentStateReducerAdapter, daffPaymentProvideExtraReducers } from '@daffodil/payment/state';
|
|
11
11
|
import { daffTransformErrorToStateError, daffCreateOperationEntityStateAdapter, daffComposeReducers, daffIdentityReducer } from '@daffodil/core/state';
|
|
12
12
|
import * as i1$1 from '@ngrx/store';
|
|
13
|
-
import { createFeatureSelector, createSelector,
|
|
13
|
+
import { defaultMemoize, createFeatureSelector, createSelector, select, combineReducers, StoreModule } from '@ngrx/store';
|
|
14
14
|
import { daffComparePersonalAddresses } from '@daffodil/geography';
|
|
15
15
|
import * as i2$1 from '@daffodil/cart';
|
|
16
16
|
import { daffCartItemInputToItemTransform, DaffCartItemInputType, DaffCartPaymentMethodIdMap, daffCartGetAffectedItems, DaffCartResolutionError, DaffCartStorageResolutionError, DaffCartServerSideResolutionError } from '@daffodil/cart';
|
|
@@ -1221,10 +1221,10 @@ class DaffCartPaymentProcessorEffects {
|
|
|
1221
1221
|
updateFailure: (errors) => of(new DaffCartPaymentUpdateFailure(errors.map(this.errorMatcher))),
|
|
1222
1222
|
}))));
|
|
1223
1223
|
}
|
|
1224
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1225
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1224
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", 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.DaffCartDriverResolveService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1225
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentProcessorEffects }); }
|
|
1226
1226
|
}
|
|
1227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentProcessorEffects, decorators: [{
|
|
1228
1228
|
type: Injectable
|
|
1229
1229
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
1230
1230
|
type: Inject,
|
|
@@ -2036,14 +2036,9 @@ token: DAFF_CART_META_REDUCERS,
|
|
|
2036
2036
|
*/
|
|
2037
2037
|
provider: daffCartProvideMetaReducers, } = createMultiInjectionToken('DAFF_CART_META_REDUCERS');
|
|
2038
2038
|
|
|
2039
|
-
const getDaffCartFeatureSelector = (() => {
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
? cache
|
|
2043
|
-
: {
|
|
2044
|
-
selectCartFeatureState: createFeatureSelector(DAFF_CART_STORE_FEATURE_KEY),
|
|
2045
|
-
};
|
|
2046
|
-
})();
|
|
2039
|
+
const getDaffCartFeatureSelector = defaultMemoize(() => ({
|
|
2040
|
+
selectCartFeatureState: createFeatureSelector(DAFF_CART_STORE_FEATURE_KEY),
|
|
2041
|
+
})).memoized;
|
|
2047
2042
|
|
|
2048
2043
|
const createCartItemEntitiesSelectors = () => {
|
|
2049
2044
|
const { selectCartFeatureState, } = getDaffCartFeatureSelector();
|
|
@@ -2108,12 +2103,7 @@ const createCartItemEntitiesSelectors = () => {
|
|
|
2108
2103
|
selectCartItemMutating,
|
|
2109
2104
|
};
|
|
2110
2105
|
};
|
|
2111
|
-
const getDaffCartItemEntitiesSelectors = (() =>
|
|
2112
|
-
let cache;
|
|
2113
|
-
return () => cache = cache
|
|
2114
|
-
? cache
|
|
2115
|
-
: createCartItemEntitiesSelectors();
|
|
2116
|
-
})();
|
|
2106
|
+
const getDaffCartItemEntitiesSelectors = defaultMemoize(() => createCartItemEntitiesSelectors()).memoized;
|
|
2117
2107
|
|
|
2118
2108
|
const createCartSelectors$1 = () => {
|
|
2119
2109
|
const selectCartFeatureState = getDaffCartFeatureSelector().selectCartFeatureState;
|
|
@@ -2262,12 +2252,7 @@ const createCartSelectors$1 = () => {
|
|
|
2262
2252
|
selectCanPlaceOrder,
|
|
2263
2253
|
};
|
|
2264
2254
|
};
|
|
2265
|
-
const getCartSelectors = (() =>
|
|
2266
|
-
let cache;
|
|
2267
|
-
return () => cache = cache
|
|
2268
|
-
? cache
|
|
2269
|
-
: createCartSelectors$1();
|
|
2270
|
-
})();
|
|
2255
|
+
const getCartSelectors = defaultMemoize(() => createCartSelectors$1()).memoized;
|
|
2271
2256
|
|
|
2272
2257
|
const createCartOrderSelectors = () => {
|
|
2273
2258
|
const selectCartFeatureState = getDaffCartFeatureSelector().selectCartFeatureState;
|
|
@@ -2290,12 +2275,7 @@ const createCartOrderSelectors = () => {
|
|
|
2290
2275
|
selectHasOrderResult,
|
|
2291
2276
|
};
|
|
2292
2277
|
};
|
|
2293
|
-
const getCartOrderSelectors = (() =>
|
|
2294
|
-
let cache;
|
|
2295
|
-
return () => cache = cache
|
|
2296
|
-
? cache
|
|
2297
|
-
: createCartOrderSelectors();
|
|
2298
|
-
})();
|
|
2278
|
+
const getCartOrderSelectors = defaultMemoize(() => createCartOrderSelectors()).memoized;
|
|
2299
2279
|
|
|
2300
2280
|
const createCartSelectors = () => ({
|
|
2301
2281
|
...getDaffCartFeatureSelector(),
|
|
@@ -2303,12 +2283,7 @@ const createCartSelectors = () => ({
|
|
|
2303
2283
|
...getCartSelectors(),
|
|
2304
2284
|
...getDaffCartItemEntitiesSelectors(),
|
|
2305
2285
|
});
|
|
2306
|
-
const getDaffCartSelectors = (() =>
|
|
2307
|
-
let cache;
|
|
2308
|
-
return () => cache = cache
|
|
2309
|
-
? cache
|
|
2310
|
-
: createCartSelectors();
|
|
2311
|
-
})();
|
|
2286
|
+
const getDaffCartSelectors = defaultMemoize(() => createCartSelectors()).memoized;
|
|
2312
2287
|
|
|
2313
2288
|
class DaffCartAddressEffects {
|
|
2314
2289
|
constructor(actions$, errorMatcher, driver, storage) {
|
|
@@ -2320,10 +2295,10 @@ class DaffCartAddressEffects {
|
|
|
2320
2295
|
? new DaffCartStorageFailure(error.map(this.errorMatcher))
|
|
2321
2296
|
: new DaffCartAddressUpdateFailure(error.map(this.errorMatcher))))))));
|
|
2322
2297
|
}
|
|
2323
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2324
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2298
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartAddressEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartAddressDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2299
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartAddressEffects }); }
|
|
2325
2300
|
}
|
|
2326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartAddressEffects, decorators: [{
|
|
2327
2302
|
type: Injectable
|
|
2328
2303
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2329
2304
|
type: Inject,
|
|
@@ -2342,10 +2317,10 @@ class DaffCartBillingAddressEffects {
|
|
|
2342
2317
|
this.get$ = createEffect(() => this.actions$.pipe(ofType(DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction), switchMap((action) => this.driver.get(this.storage.getCartId()).pipe(map((resp) => new DaffCartBillingAddressLoadSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartBillingAddressLoadFailure(error.map(this.errorMatcher))))))));
|
|
2343
2318
|
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)), catchAndArrayifyErrors(error => of(new DaffCartBillingAddressUpdateFailure(error.map(this.errorMatcher))))))));
|
|
2344
2319
|
}
|
|
2345
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2346
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2320
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartBillingAddressEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartBillingAddressDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2321
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartBillingAddressEffects }); }
|
|
2347
2322
|
}
|
|
2348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartBillingAddressEffects, decorators: [{
|
|
2349
2324
|
type: Injectable
|
|
2350
2325
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2351
2326
|
type: Inject,
|
|
@@ -2374,10 +2349,10 @@ class DaffCartCouponEffects {
|
|
|
2374
2349
|
? new DaffCartStorageFailure(error.map(this.errorMatcher))
|
|
2375
2350
|
: new DaffCartCouponRemoveAllFailure(error.map(this.errorMatcher))))))));
|
|
2376
2351
|
}
|
|
2377
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2378
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2352
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartCouponEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartCouponDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2353
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartCouponEffects }); }
|
|
2379
2354
|
}
|
|
2380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartCouponEffects, decorators: [{
|
|
2381
2356
|
type: Injectable
|
|
2382
2357
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2383
2358
|
type: Inject,
|
|
@@ -2480,10 +2455,10 @@ class DaffCartFacade {
|
|
|
2480
2455
|
dispatch(action) {
|
|
2481
2456
|
this.store.dispatch(action);
|
|
2482
2457
|
}
|
|
2483
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2484
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2458
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartFacade, deps: [{ token: i1$1.Store }, { token: DaffCartPaymentMethodIdMap }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2459
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartFacade, providedIn: 'root' }); }
|
|
2485
2460
|
}
|
|
2486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartFacade, decorators: [{
|
|
2487
2462
|
type: Injectable,
|
|
2488
2463
|
args: [{
|
|
2489
2464
|
providedIn: 'root',
|
|
@@ -2522,10 +2497,10 @@ class DaffCartItemEffects {
|
|
|
2522
2497
|
? combineLatest(items.map(item => this.driver.delete(this.storage.getCartId(), item.id))).pipe(map(partialCarts => Object.assign({}, ...partialCarts)))
|
|
2523
2498
|
: this.cartFacade.cart$.pipe(take(1))), map((cart) => new DaffCartItemDeleteOutOfStockSuccess(cart)), catchAndArrayifyErrors(error => of(new DaffCartItemDeleteOutOfStockFailure(error.map(this.errorMatcher))))));
|
|
2524
2499
|
}
|
|
2525
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2526
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2500
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartItemEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartItemDriver }, { token: i2$1.DaffCartStorageService }, { token: DaffCartItemStateDebounceTime }, { token: i2.DaffCartDriverResolveService }, { token: DaffCartFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2501
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartItemEffects }); }
|
|
2527
2502
|
}
|
|
2528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartItemEffects, decorators: [{
|
|
2529
2504
|
type: Injectable
|
|
2530
2505
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2531
2506
|
type: Inject,
|
|
@@ -2554,10 +2529,10 @@ class DaffCartOrderEffects {
|
|
|
2554
2529
|
: of(new DaffCartPlaceOrderFailure(error.map(this.errorMatcher))))))));
|
|
2555
2530
|
this.resetCart$ = createEffect(() => this.actions$.pipe(ofType(DaffCartOrderActionTypes.CartPlaceOrderSuccessAction), map(() => new DaffCartCreate())));
|
|
2556
2531
|
}
|
|
2557
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2558
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2532
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartOrderEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: i2.DaffCartDriverResolveService }, { token: DaffCartOrderDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2533
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartOrderEffects }); }
|
|
2559
2534
|
}
|
|
2560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartOrderEffects, decorators: [{
|
|
2561
2536
|
type: Injectable
|
|
2562
2537
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2563
2538
|
type: Inject,
|
|
@@ -2575,10 +2550,10 @@ class DaffCartPaymentMethodsEffects {
|
|
|
2575
2550
|
this.storage = storage;
|
|
2576
2551
|
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction), switchMap((action) => this.driver.list(this.storage.getCartId()).pipe(map((resp) => new DaffCartPaymentMethodsLoadSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartPaymentMethodsLoadFailure(error.map(this.errorMatcher))))))));
|
|
2577
2552
|
}
|
|
2578
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2579
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2553
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentMethodsEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartPaymentMethodsDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2554
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentMethodsEffects }); }
|
|
2580
2555
|
}
|
|
2581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentMethodsEffects, decorators: [{
|
|
2582
2557
|
type: Injectable
|
|
2583
2558
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2584
2559
|
type: Inject,
|
|
@@ -2599,10 +2574,10 @@ class DaffCartPaymentEffects {
|
|
|
2599
2574
|
this.updateWithBilling$ = createEffect(() => this.actions$.pipe(ofType(DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction), switchMap((action) => this.driver.update(this.storage.getCartId(), action.payment, action.address).pipe(map(resp => new DaffCartPaymentUpdateWithBillingSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartPaymentUpdateWithBillingFailure(error.map(this.errorMatcher))))))));
|
|
2600
2575
|
this.remove$ = createEffect(() => this.actions$.pipe(ofType(DaffCartPaymentActionTypes.CartPaymentRemoveAction), switchMap((action) => this.driver.remove(this.storage.getCartId()).pipe(map(() => new DaffCartPaymentRemoveSuccess()), catchAndArrayifyErrors(error => of(new DaffCartPaymentRemoveFailure(error.map(this.errorMatcher))))))));
|
|
2601
2576
|
}
|
|
2602
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2603
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2577
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartPaymentDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2578
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentEffects }); }
|
|
2604
2579
|
}
|
|
2605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartPaymentEffects, decorators: [{
|
|
2606
2581
|
type: Injectable
|
|
2607
2582
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2608
2583
|
type: Inject,
|
|
@@ -2654,10 +2629,10 @@ class DaffCartResolverEffects {
|
|
|
2654
2629
|
ngrxOnInitEffects() {
|
|
2655
2630
|
return isPlatformBrowser(this.platformId) && this.cartStorage.getCartId() ? new DaffResolveCart() : { type: '' };
|
|
2656
2631
|
}
|
|
2657
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2658
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2632
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartResolverEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: i2$1.DaffCartStorageService }, { token: i2.DaffCartDriverResolveService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2633
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartResolverEffects }); }
|
|
2659
2634
|
}
|
|
2660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartResolverEffects, decorators: [{
|
|
2661
2636
|
type: Injectable
|
|
2662
2637
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2663
2638
|
type: Inject,
|
|
@@ -2676,10 +2651,10 @@ class DaffCartShippingAddressEffects {
|
|
|
2676
2651
|
this.get$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction), switchMap((action) => this.driver.get(this.storage.getCartId()).pipe(map((resp) => new DaffCartShippingAddressLoadSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartShippingAddressLoadFailure(error.map(this.errorMatcher))))))));
|
|
2677
2652
|
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)), catchAndArrayifyErrors(error => of(new DaffCartShippingAddressUpdateFailure(error.map(this.errorMatcher))))))));
|
|
2678
2653
|
}
|
|
2679
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2680
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2654
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingAddressEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartShippingAddressDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2655
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingAddressEffects }); }
|
|
2681
2656
|
}
|
|
2682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingAddressEffects, decorators: [{
|
|
2683
2658
|
type: Injectable
|
|
2684
2659
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2685
2660
|
type: Inject,
|
|
@@ -2699,10 +2674,10 @@ class DaffCartShippingInformationEffects {
|
|
|
2699
2674
|
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction), switchMap((action) => this.driver.update(this.storage.getCartId(), action.payload).pipe(map((resp) => new DaffCartShippingInformationUpdateSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartShippingInformationUpdateFailure(error.map(this.errorMatcher))))))));
|
|
2700
2675
|
this.delete$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction), switchMap((action) => this.driver.delete(this.storage.getCartId()).pipe(map((resp) => new DaffCartShippingInformationDeleteSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartShippingInformationDeleteFailure(error.map(this.errorMatcher))))))));
|
|
2701
2676
|
}
|
|
2702
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2703
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2677
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingInformationEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartShippingInformationDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2678
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingInformationEffects }); }
|
|
2704
2679
|
}
|
|
2705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingInformationEffects, decorators: [{
|
|
2706
2681
|
type: Injectable
|
|
2707
2682
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2708
2683
|
type: Inject,
|
|
@@ -2720,10 +2695,10 @@ class DaffCartShippingMethodsEffects {
|
|
|
2720
2695
|
this.storage = storage;
|
|
2721
2696
|
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction), switchMap((action) => this.driver.list(this.storage.getCartId()).pipe(map((resp) => new DaffCartShippingMethodsLoadSuccess(resp)), catchAndArrayifyErrors(error => of(new DaffCartShippingMethodsLoadFailure(error.map(this.errorMatcher))))))));
|
|
2722
2697
|
}
|
|
2723
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2724
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2698
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingMethodsEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartShippingMethodsDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2699
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingMethodsEffects }); }
|
|
2725
2700
|
}
|
|
2726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartShippingMethodsEffects, decorators: [{
|
|
2727
2702
|
type: Injectable
|
|
2728
2703
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2729
2704
|
type: Inject,
|
|
@@ -2759,10 +2734,10 @@ class DaffCartEffects {
|
|
|
2759
2734
|
? new DaffCartStorageFailure(error.map(this.errorMatcher))
|
|
2760
2735
|
: new DaffCartClearFailure(error.map(this.errorMatcher))))))));
|
|
2761
2736
|
}
|
|
2762
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2763
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2737
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartEffects, deps: [{ token: i1.Actions }, { token: DAFF_CART_ERROR_MATCHER }, { token: DaffCartDriver }, { token: i2$1.DaffCartStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2738
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartEffects }); }
|
|
2764
2739
|
}
|
|
2765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartEffects, decorators: [{
|
|
2766
2741
|
type: Injectable
|
|
2767
2742
|
}], ctorParameters: () => [{ type: i1.Actions }, { type: undefined, decorators: [{
|
|
2768
2743
|
type: Inject,
|
|
@@ -2880,9 +2855,9 @@ provider: provideDaffCartReducers, } = createSingleInjectionToken('DAFF_CART_RED
|
|
|
2880
2855
|
});
|
|
2881
2856
|
|
|
2882
2857
|
class DaffCartStateModule {
|
|
2883
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2884
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2885
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2858
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2859
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCartStateModule, imports: [i1$1.StoreFeatureModule, i1.EffectsFeatureModule] }); }
|
|
2860
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartStateModule, providers: [
|
|
2886
2861
|
provideDaffCartItemStateDebounceTime(4000),
|
|
2887
2862
|
...daffPaymentProvideExtraReducers(combineReducers({
|
|
2888
2863
|
payment: daffCartPaymentReducer,
|
|
@@ -2905,7 +2880,7 @@ class DaffCartStateModule {
|
|
|
2905
2880
|
DaffCartResolverEffects,
|
|
2906
2881
|
])] }); }
|
|
2907
2882
|
}
|
|
2908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCartStateModule, decorators: [{
|
|
2909
2884
|
type: NgModule,
|
|
2910
2885
|
args: [{
|
|
2911
2886
|
imports: [
|