@daffodil/checkout 0.70.0 → 0.72.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/esm2022/index.mjs +2 -32
- package/esm2022/state/checkout-state.module.mjs +5 -5
- package/esm2022/state/facades/placed-order/placed-order.facade.mjs +4 -4
- package/esm2022/state/testing/checkout-testing.module.mjs +6 -6
- package/esm2022/state/testing/mock-placed-order-facade.mjs +4 -4
- package/esm2022/state/testing/public_api.mjs +2 -2
- package/fesm2022/daffodil-checkout-state-testing.mjs +9 -9
- package/fesm2022/daffodil-checkout-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-checkout-state.mjs +7 -7
- package/fesm2022/daffodil-checkout-state.mjs.map +1 -1
- package/fesm2022/daffodil-checkout.mjs +0 -716
- package/fesm2022/daffodil-checkout.mjs.map +1 -1
- package/index.d.ts +1 -47
- package/package.json +1 -1
- package/state/testing/checkout-testing.module.d.ts +4 -4
- package/state/testing/public_api.d.ts +1 -1
- package/billing/actions/billing.actions.d.ts +0 -22
- package/billing/billing-state.module.d.ts +0 -7
- package/billing/billing.module.d.ts +0 -9
- package/billing/containers/billing.component.d.ts +0 -20
- package/billing/facades/billing.facade.d.ts +0 -34
- package/billing/reducers/billing/billing-reducer.interface.d.ts +0 -7
- package/billing/reducers/billing/billing.reducer.d.ts +0 -4
- package/billing/reducers/billing-reducers.d.ts +0 -3
- package/billing/reducers/billing-reducers.interface.d.ts +0 -4
- package/billing/selectors/billing.selector.d.ts +0 -16
- package/checkout.module.d.ts +0 -11
- package/drivers/injection-tokens/driver-checkout.token.d.ts +0 -2
- package/drivers/injection-tokens/payment-driver.token.d.ts +0 -2
- package/drivers/injection-tokens/payment-transformer.token.d.ts +0 -2
- package/drivers/interfaces/checkout-service.interface.d.ts +0 -5
- package/drivers/interfaces/order-service.interface.d.ts +0 -19
- package/esm2022/billing/actions/billing.actions.mjs +0 -24
- package/esm2022/billing/billing-state.module.mjs +0 -19
- package/esm2022/billing/billing.module.mjs +0 -37
- package/esm2022/billing/containers/billing.component.mjs +0 -36
- package/esm2022/billing/facades/billing.facade.mjs +0 -34
- package/esm2022/billing/reducers/billing/billing-reducer.interface.mjs +0 -2
- package/esm2022/billing/reducers/billing/billing.reducer.mjs +0 -19
- package/esm2022/billing/reducers/billing-reducers.interface.mjs +0 -2
- package/esm2022/billing/reducers/billing-reducers.mjs +0 -5
- package/esm2022/billing/selectors/billing.selector.mjs +0 -13
- package/esm2022/checkout.module.mjs +0 -45
- package/esm2022/drivers/injection-tokens/driver-checkout.token.mjs +0 -3
- package/esm2022/drivers/injection-tokens/payment-driver.token.mjs +0 -3
- package/esm2022/drivers/injection-tokens/payment-transformer.token.mjs +0 -3
- package/esm2022/drivers/interfaces/checkout-service.interface.mjs +0 -2
- package/esm2022/drivers/interfaces/order-service.interface.mjs +0 -3
- package/esm2022/models/cart-process-request.mjs +0 -2
- package/esm2022/models/order/order-address.mjs +0 -2
- package/esm2022/models/order/order-item.mjs +0 -2
- package/esm2022/models/order/order-payment.mjs +0 -2
- package/esm2022/models/order/order-shipping-rate.mjs +0 -2
- package/esm2022/models/order/order.mjs +0 -2
- package/esm2022/models/payment/payment-info.mjs +0 -2
- package/esm2022/models/shipping/shipping-option.mjs +0 -2
- package/esm2022/models/shipping/shipping-rate.mjs +0 -2
- package/esm2022/order/actions/order.actions.mjs +0 -55
- package/esm2022/order/containers/order.component.mjs +0 -28
- package/esm2022/order/effects/order.effects.mjs +0 -28
- package/esm2022/order/facades/order.facade.mjs +0 -37
- package/esm2022/order/order-state.module.mjs +0 -31
- package/esm2022/order/order.module.mjs +0 -40
- package/esm2022/order/reducers/order/order-reducer.interface.mjs +0 -2
- package/esm2022/order/reducers/order/order.reducer.mjs +0 -25
- package/esm2022/order/reducers/order-reducers.interface.mjs +0 -2
- package/esm2022/order/reducers/order-reducers.mjs +0 -8
- package/esm2022/order/selectors/order.selector.mjs +0 -26
- package/esm2022/payment/actions/payment.actions.mjs +0 -11
- package/esm2022/payment/facades/payment.facade.mjs +0 -32
- package/esm2022/payment/payment-state.module.mjs +0 -19
- package/esm2022/payment/payment.module.mjs +0 -30
- package/esm2022/payment/reducers/payment/payment-reducer.interface.mjs +0 -2
- package/esm2022/payment/reducers/payment/payment.reducer.mjs +0 -13
- package/esm2022/payment/reducers/payment-reducers.interface.mjs +0 -2
- package/esm2022/payment/reducers/payment-reducers.mjs +0 -5
- package/esm2022/payment/selectors/payment.selector.mjs +0 -11
- package/esm2022/shipping/actions/shipping.actions.mjs +0 -18
- package/esm2022/shipping/containers/shipping.component.mjs +0 -33
- package/esm2022/shipping/facades/shipping.facade.mjs +0 -34
- package/esm2022/shipping/reducers/shipping/shipping-reducer.interface.mjs +0 -2
- package/esm2022/shipping/reducers/shipping/shipping.reducer.mjs +0 -16
- package/esm2022/shipping/reducers/shipping-reducers.interface.mjs +0 -2
- package/esm2022/shipping/reducers/shipping-reducers.mjs +0 -5
- package/esm2022/shipping/selectors/shipping.selectors.mjs +0 -13
- package/esm2022/shipping/shipping-state.module.mjs +0 -19
- package/esm2022/shipping/shipping.module.mjs +0 -37
- package/esm2022/testing/daffodil-checkout-testing.mjs +0 -5
- package/esm2022/testing/drivers/in-memory/checkout-driver.module.mjs +0 -30
- package/esm2022/testing/drivers/in-memory/checkout.service.mjs +0 -22
- package/esm2022/testing/drivers/testing/checkout-driver.module.mjs +0 -30
- package/esm2022/testing/drivers/testing/checkout.service.mjs +0 -25
- package/esm2022/testing/index.mjs +0 -19
- package/esm2022/testing/inmemory-backend/checkout.service.mjs +0 -50
- package/esm2022/testing/order/factories/order-address.factory.mjs +0 -54
- package/esm2022/testing/order/factories/order-item.factory.mjs +0 -49
- package/esm2022/testing/order/factories/order-payment.factory.mjs +0 -46
- package/esm2022/testing/order/factories/order-shipping-rate.factory.mjs +0 -40
- package/esm2022/testing/order/factories/order.factory.mjs +0 -42
- package/esm2022/testing/payment/factories/payment.factory.mjs +0 -26
- package/esm2022/testing/shipping/factories/shipping-option.factory.mjs +0 -24
- package/esm2022/testing/shipping/factories/shipping-rate.factory.mjs +0 -29
- package/fesm2022/daffodil-checkout-testing.mjs +0 -425
- package/fesm2022/daffodil-checkout-testing.mjs.map +0 -1
- package/models/cart-process-request.d.ts +0 -7
- package/models/order/order-address.d.ts +0 -32
- package/models/order/order-item.d.ts +0 -27
- package/models/order/order-payment.d.ts +0 -22
- package/models/order/order-shipping-rate.d.ts +0 -17
- package/models/order/order.d.ts +0 -21
- package/models/payment/payment-info.d.ts +0 -7
- package/models/shipping/shipping-option.d.ts +0 -4
- package/models/shipping/shipping-rate.d.ts +0 -6
- package/order/actions/order.actions.d.ts +0 -55
- package/order/containers/order.component.d.ts +0 -18
- package/order/effects/order.effects.d.ts +0 -15
- package/order/facades/order.facade.d.ts +0 -36
- package/order/order-state.module.d.ts +0 -11
- package/order/order.module.d.ts +0 -12
- package/order/reducers/order/order-reducer.interface.d.ts +0 -9
- package/order/reducers/order/order.reducer.d.ts +0 -10
- package/order/reducers/order-reducers.d.ts +0 -6
- package/order/reducers/order-reducers.interface.d.ts +0 -7
- package/order/selectors/order.selector.d.ts +0 -28
- package/payment/actions/payment.actions.d.ts +0 -11
- package/payment/facades/payment.facade.d.ts +0 -25
- package/payment/payment-state.module.d.ts +0 -7
- package/payment/payment.module.d.ts +0 -8
- package/payment/reducers/payment/payment-reducer.interface.d.ts +0 -4
- package/payment/reducers/payment/payment.reducer.d.ts +0 -4
- package/payment/reducers/payment-reducers.d.ts +0 -3
- package/payment/reducers/payment-reducers.interface.d.ts +0 -4
- package/payment/selectors/payment.selector.d.ts +0 -11
- package/shipping/actions/shipping.actions.d.ts +0 -17
- package/shipping/containers/shipping.component.d.ts +0 -19
- package/shipping/facades/shipping.facade.d.ts +0 -33
- package/shipping/reducers/shipping/shipping-reducer.interface.d.ts +0 -5
- package/shipping/reducers/shipping/shipping.reducer.d.ts +0 -4
- package/shipping/reducers/shipping-reducers.d.ts +0 -3
- package/shipping/reducers/shipping-reducers.interface.d.ts +0 -4
- package/shipping/selectors/shipping.selectors.d.ts +0 -15
- package/shipping/shipping-state.module.d.ts +0 -7
- package/shipping/shipping.module.d.ts +0 -9
- package/testing/drivers/in-memory/checkout-driver.module.d.ts +0 -9
- package/testing/drivers/in-memory/checkout.service.d.ts +0 -12
- package/testing/drivers/testing/checkout-driver.module.d.ts +0 -9
- package/testing/drivers/testing/checkout.service.d.ts +0 -13
- package/testing/index.d.ts +0 -13
- package/testing/inmemory-backend/checkout.service.d.ts +0 -19
- package/testing/order/factories/order-address.factory.d.ts +0 -42
- package/testing/order/factories/order-item.factory.d.ts +0 -37
- package/testing/order/factories/order-payment.factory.d.ts +0 -34
- package/testing/order/factories/order-shipping-rate.factory.d.ts +0 -28
- package/testing/order/factories/order.factory.d.ts +0 -29
- package/testing/payment/factories/payment.factory.d.ts +0 -15
- package/testing/shipping/factories/shipping-option.factory.d.ts +0 -12
- package/testing/shipping/factories/shipping-rate.factory.d.ts +0 -17
@@ -1,720 +1,4 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { Component, NgModule, Injectable, InjectionToken, Inject } from '@angular/core';
|
3
|
-
import * as i1 from '@ngrx/store';
|
4
|
-
import { createFeatureSelector, createSelector, select, StoreModule } from '@ngrx/store';
|
5
|
-
import { CommonModule } from '@angular/common';
|
6
|
-
import * as i1$1 from '@ngrx/effects';
|
7
|
-
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
8
|
-
import { of } from 'rxjs';
|
9
|
-
import { switchMap, map, catchError } from 'rxjs/operators';
|
10
|
-
|
11
|
-
var DaffShippingActionTypes;
|
12
|
-
(function (DaffShippingActionTypes) {
|
13
|
-
DaffShippingActionTypes["UpdateShippingAddressAction"] = "[Shipping] Update Shipping Address Action";
|
14
|
-
DaffShippingActionTypes["SelectShippingOptionAction"] = "[Shipping] Select Shipping Option Action";
|
15
|
-
})(DaffShippingActionTypes || (DaffShippingActionTypes = {}));
|
16
|
-
class DaffUpdateShippingAddress {
|
17
|
-
constructor(payload) {
|
18
|
-
this.payload = payload;
|
19
|
-
this.type = DaffShippingActionTypes.UpdateShippingAddressAction;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
class DaffSelectShippingOption {
|
23
|
-
constructor(payload) {
|
24
|
-
this.payload = payload;
|
25
|
-
this.type = DaffShippingActionTypes.SelectShippingOptionAction;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
/**
|
30
|
-
* Shipping Feature State
|
31
|
-
*/
|
32
|
-
const selectShippingFeatureState = createFeatureSelector('shipping');
|
33
|
-
/**
|
34
|
-
* Shipping State
|
35
|
-
*/
|
36
|
-
const selectShippingState = createSelector(selectShippingFeatureState, (state) => state.shipping);
|
37
|
-
const selectShippingAddress = createSelector(selectShippingState, (state) => state.shippingAddress);
|
38
|
-
const selectShippingOptionId = createSelector(selectShippingState, (state) => state.selectedShippingOptionId);
|
39
|
-
const selectIsShippingAddressValid = createSelector(selectShippingAddress, (state) => !!state);
|
40
|
-
|
41
|
-
class ShippingContainer {
|
42
|
-
constructor(store) {
|
43
|
-
this.store = store;
|
44
|
-
}
|
45
|
-
ngOnInit() {
|
46
|
-
this.shippingAddress$ = this.store.pipe(select(selectShippingAddress));
|
47
|
-
this.selectedShippingOptionId$ = this.store.pipe(select(selectShippingOptionId));
|
48
|
-
this.isShippingAddressValid$ = this.store.pipe(select(selectIsShippingAddressValid));
|
49
|
-
}
|
50
|
-
updateShippingAddress(address) {
|
51
|
-
this.store.dispatch(new DaffUpdateShippingAddress(address));
|
52
|
-
}
|
53
|
-
selectShippingOption(optionId) {
|
54
|
-
this.store.dispatch(new DaffSelectShippingOption(optionId));
|
55
|
-
}
|
56
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: ShippingContainer, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
57
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: ShippingContainer, selector: "[shipping-container]", exportAs: ["ShippingContainer"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
58
|
-
}
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: ShippingContainer, decorators: [{
|
60
|
-
type: Component,
|
61
|
-
args: [{
|
62
|
-
selector: '[shipping-container]',
|
63
|
-
template: '<ng-content></ng-content>',
|
64
|
-
exportAs: 'ShippingContainer',
|
65
|
-
}]
|
66
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Order Feature State
|
70
|
-
*
|
71
|
-
* @deprecated
|
72
|
-
*/
|
73
|
-
const selectOrderFeatureState = createFeatureSelector('order');
|
74
|
-
/**
|
75
|
-
* Order State
|
76
|
-
*
|
77
|
-
* @deprecated
|
78
|
-
*/
|
79
|
-
const selectOrderState = createSelector(selectOrderFeatureState, (state) => state.order);
|
80
|
-
/**
|
81
|
-
* @deprecated
|
82
|
-
*/
|
83
|
-
const selectOrder = createSelector(selectOrderState, (state) => state.order);
|
84
|
-
/**
|
85
|
-
* @deprecated
|
86
|
-
*/
|
87
|
-
const selectLoading = createSelector(selectOrderState, (state) => state.loading);
|
88
|
-
/**
|
89
|
-
* @deprecated
|
90
|
-
*/
|
91
|
-
const selectErrors = createSelector(selectOrderState, (state) => state.errors);
|
92
|
-
|
93
|
-
/**
|
94
|
-
* @deprecated
|
95
|
-
*/
|
96
|
-
class OrderContainer {
|
97
|
-
constructor(store) {
|
98
|
-
this.store = store;
|
99
|
-
}
|
100
|
-
ngOnInit() {
|
101
|
-
this.order$ = this.store.pipe(select(selectOrder));
|
102
|
-
this.loading$ = this.store.pipe(select(selectLoading));
|
103
|
-
}
|
104
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: OrderContainer, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
105
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: OrderContainer, selector: "[order-container]", exportAs: ["OrderContainer"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
106
|
-
}
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: OrderContainer, decorators: [{
|
108
|
-
type: Component,
|
109
|
-
args: [{
|
110
|
-
selector: '[order-container]',
|
111
|
-
template: '<ng-content></ng-content>',
|
112
|
-
exportAs: 'OrderContainer',
|
113
|
-
}]
|
114
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
115
|
-
|
116
|
-
var DaffPaymentActionTypes;
|
117
|
-
(function (DaffPaymentActionTypes) {
|
118
|
-
DaffPaymentActionTypes["UpdatePaymentInfoAction"] = "[Payment] Update Payment Info Action";
|
119
|
-
})(DaffPaymentActionTypes || (DaffPaymentActionTypes = {}));
|
120
|
-
let DaffUpdatePaymentInfo$1 = class DaffUpdatePaymentInfo {
|
121
|
-
constructor(payload) {
|
122
|
-
this.payload = payload;
|
123
|
-
this.type = DaffPaymentActionTypes.UpdatePaymentInfoAction;
|
124
|
-
}
|
125
|
-
};
|
126
|
-
|
127
|
-
const initialState$3 = {
|
128
|
-
paymentInfo: null,
|
129
|
-
};
|
130
|
-
function daffPaymentReducer(state = initialState$3, action) {
|
131
|
-
switch (action.type) {
|
132
|
-
case DaffPaymentActionTypes.UpdatePaymentInfoAction:
|
133
|
-
return { ...state, paymentInfo: action.payload };
|
134
|
-
default:
|
135
|
-
return state;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
const daffPaymentReducers = {
|
140
|
-
payment: daffPaymentReducer,
|
141
|
-
};
|
142
|
-
|
143
|
-
class DaffPaymentStateModule {
|
144
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
145
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentStateModule, imports: [i1.StoreFeatureModule] }); }
|
146
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentStateModule, imports: [StoreModule.forFeature('payment', daffPaymentReducers)] }); }
|
147
|
-
}
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentStateModule, decorators: [{
|
149
|
-
type: NgModule,
|
150
|
-
args: [{
|
151
|
-
imports: [
|
152
|
-
StoreModule.forFeature('payment', daffPaymentReducers),
|
153
|
-
],
|
154
|
-
}]
|
155
|
-
}] });
|
156
|
-
|
157
|
-
class DaffPaymentModule {
|
158
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
159
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentModule, imports: [CommonModule,
|
160
|
-
/**
|
161
|
-
* Ngrx/store
|
162
|
-
*/
|
163
|
-
DaffPaymentStateModule] }); }
|
164
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentModule, imports: [CommonModule,
|
165
|
-
/**
|
166
|
-
* Ngrx/store
|
167
|
-
*/
|
168
|
-
DaffPaymentStateModule] }); }
|
169
|
-
}
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentModule, decorators: [{
|
171
|
-
type: NgModule,
|
172
|
-
args: [{
|
173
|
-
imports: [
|
174
|
-
CommonModule,
|
175
|
-
/**
|
176
|
-
* Ngrx/store
|
177
|
-
*/
|
178
|
-
DaffPaymentStateModule,
|
179
|
-
],
|
180
|
-
}]
|
181
|
-
}] });
|
182
|
-
|
183
|
-
/**
|
184
|
-
* Payment Feature State
|
185
|
-
*/
|
186
|
-
const selectPaymentFeatureState = createFeatureSelector('payment');
|
187
|
-
/**
|
188
|
-
* Payment State
|
189
|
-
*/
|
190
|
-
const selectPaymentState = createSelector(selectPaymentFeatureState, (state) => state.payment);
|
191
|
-
const selectPaymentInfo$1 = createSelector(selectPaymentState, (state) => state.paymentInfo);
|
192
|
-
|
193
|
-
/**
|
194
|
-
* A facade for accessing state for customer payment information.
|
195
|
-
*/
|
196
|
-
class DaffPaymentFacade {
|
197
|
-
constructor(store) {
|
198
|
-
this.store = store;
|
199
|
-
this.paymentInfo$ = this.store.pipe(select(selectPaymentInfo$1));
|
200
|
-
}
|
201
|
-
/**
|
202
|
-
* Dispatches the given action.
|
203
|
-
*
|
204
|
-
* @param action action to dispatch.
|
205
|
-
*/
|
206
|
-
dispatch(action) {
|
207
|
-
this.store.dispatch(action);
|
208
|
-
}
|
209
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
210
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentFacade, providedIn: DaffPaymentModule }); }
|
211
|
-
}
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffPaymentFacade, decorators: [{
|
213
|
-
type: Injectable,
|
214
|
-
args: [{
|
215
|
-
providedIn: DaffPaymentModule,
|
216
|
-
}]
|
217
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
218
|
-
|
219
|
-
const DaffPaymentDriver = new InjectionToken('DaffPaymentDriver');
|
220
|
-
|
221
|
-
const DaffOrderDriver = new InjectionToken('DaffOrderDriver');
|
222
|
-
|
223
|
-
const DaffPaymentTransformer = new InjectionToken('DaffPaymentTransformer');
|
224
|
-
|
225
|
-
var DaffBillingActionTypes;
|
226
|
-
(function (DaffBillingActionTypes) {
|
227
|
-
DaffBillingActionTypes["UpdateBillingAddressAction"] = "[Billing] Update Billing Address Action";
|
228
|
-
DaffBillingActionTypes["UpdatePaymentInfoAction"] = "[Billing] Update Payment Info Action";
|
229
|
-
DaffBillingActionTypes["ToggleBillingAddressIsShippingAddressAction"] = "[Billing] Billing Address Is Shipping Address Action";
|
230
|
-
})(DaffBillingActionTypes || (DaffBillingActionTypes = {}));
|
231
|
-
class DaffUpdateBillingAddress {
|
232
|
-
constructor(payload) {
|
233
|
-
this.payload = payload;
|
234
|
-
this.type = DaffBillingActionTypes.UpdateBillingAddressAction;
|
235
|
-
}
|
236
|
-
}
|
237
|
-
class DaffUpdatePaymentInfo {
|
238
|
-
constructor(payload) {
|
239
|
-
this.payload = payload;
|
240
|
-
this.type = DaffBillingActionTypes.UpdatePaymentInfoAction;
|
241
|
-
}
|
242
|
-
}
|
243
|
-
class DaffToggleBillingAddressIsShippingAddress {
|
244
|
-
constructor() {
|
245
|
-
this.type = DaffBillingActionTypes.ToggleBillingAddressIsShippingAddressAction;
|
246
|
-
}
|
247
|
-
}
|
248
|
-
|
249
|
-
/**
|
250
|
-
* Billing Feature State
|
251
|
-
*/
|
252
|
-
const selectBillingFeatureState = createFeatureSelector('billing');
|
253
|
-
/**
|
254
|
-
* Billing State
|
255
|
-
*/
|
256
|
-
const selectBillingState = createSelector(selectBillingFeatureState, (state) => state.billing);
|
257
|
-
const selectBillingAddress = createSelector(selectBillingState, (state) => state.billingAddress);
|
258
|
-
const selectBillingAddressIsShippingAddress = createSelector(selectBillingState, (state) => state.billingAddressIsShippingAddress);
|
259
|
-
const selectPaymentInfo = createSelector(selectBillingState, (state) => state.paymentInfo);
|
260
|
-
|
261
|
-
const initialState$2 = {
|
262
|
-
billingAddress: null,
|
263
|
-
billingAddressIsShippingAddress: false,
|
264
|
-
paymentInfo: null,
|
265
|
-
};
|
266
|
-
function daffBillingReducer(state = initialState$2, action) {
|
267
|
-
switch (action.type) {
|
268
|
-
case DaffBillingActionTypes.UpdateBillingAddressAction:
|
269
|
-
return { ...state, billingAddress: action.payload };
|
270
|
-
case DaffBillingActionTypes.ToggleBillingAddressIsShippingAddressAction:
|
271
|
-
return { ...state, billingAddress: null, billingAddressIsShippingAddress: !state.billingAddressIsShippingAddress };
|
272
|
-
case DaffBillingActionTypes.UpdatePaymentInfoAction:
|
273
|
-
return { ...state, paymentInfo: action.payload };
|
274
|
-
default:
|
275
|
-
return state;
|
276
|
-
}
|
277
|
-
}
|
278
|
-
|
279
|
-
const daffBillingReducers = {
|
280
|
-
billing: daffBillingReducer,
|
281
|
-
};
|
282
|
-
|
283
|
-
class DaffBillingStateModule {
|
284
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
285
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingStateModule, imports: [i1.StoreFeatureModule] }); }
|
286
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingStateModule, imports: [StoreModule.forFeature('billing', daffBillingReducers)] }); }
|
287
|
-
}
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingStateModule, decorators: [{
|
289
|
-
type: NgModule,
|
290
|
-
args: [{
|
291
|
-
imports: [
|
292
|
-
StoreModule.forFeature('billing', daffBillingReducers),
|
293
|
-
],
|
294
|
-
}]
|
295
|
-
}] });
|
296
|
-
|
297
|
-
class BillingContainer {
|
298
|
-
constructor(store) {
|
299
|
-
this.store = store;
|
300
|
-
}
|
301
|
-
ngOnInit() {
|
302
|
-
this.billingAddress$ = this.store.pipe(select(selectBillingAddress));
|
303
|
-
this.billingAddressIsShippingAddress$ = this.store.pipe(select(selectBillingAddressIsShippingAddress));
|
304
|
-
this.paymentInfo$ = this.store.pipe(select(selectPaymentInfo));
|
305
|
-
}
|
306
|
-
updateBillingAddress(address) {
|
307
|
-
this.store.dispatch(new DaffUpdateBillingAddress(address));
|
308
|
-
}
|
309
|
-
toggleBillingAddressIsShippingAddress() {
|
310
|
-
this.store.dispatch(new DaffToggleBillingAddressIsShippingAddress());
|
311
|
-
}
|
312
|
-
updatePaymentInfo(info) {
|
313
|
-
this.store.dispatch(new DaffUpdatePaymentInfo(info));
|
314
|
-
}
|
315
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: BillingContainer, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
316
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: BillingContainer, selector: "[billing-container]", exportAs: ["BillingContainer"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
317
|
-
}
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: BillingContainer, decorators: [{
|
319
|
-
type: Component,
|
320
|
-
args: [{
|
321
|
-
selector: '[billing-container]',
|
322
|
-
template: '<ng-content></ng-content>',
|
323
|
-
exportAs: 'BillingContainer',
|
324
|
-
}]
|
325
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
326
|
-
|
327
|
-
class DaffBillingModule {
|
328
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
329
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingModule, declarations: [BillingContainer], imports: [CommonModule,
|
330
|
-
/**
|
331
|
-
* Ngrx/store
|
332
|
-
*/
|
333
|
-
DaffBillingStateModule], exports: [BillingContainer] }); }
|
334
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingModule, imports: [CommonModule,
|
335
|
-
/**
|
336
|
-
* Ngrx/store
|
337
|
-
*/
|
338
|
-
DaffBillingStateModule] }); }
|
339
|
-
}
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingModule, decorators: [{
|
341
|
-
type: NgModule,
|
342
|
-
args: [{
|
343
|
-
imports: [
|
344
|
-
CommonModule,
|
345
|
-
/**
|
346
|
-
* Ngrx/store
|
347
|
-
*/
|
348
|
-
DaffBillingStateModule,
|
349
|
-
],
|
350
|
-
declarations: [
|
351
|
-
BillingContainer,
|
352
|
-
],
|
353
|
-
exports: [
|
354
|
-
BillingContainer,
|
355
|
-
],
|
356
|
-
}]
|
357
|
-
}] });
|
358
|
-
|
359
|
-
/**
|
360
|
-
* A facade for accessing state for the billing information of a customer
|
361
|
-
*/
|
362
|
-
class DaffBillingFacade {
|
363
|
-
constructor(store) {
|
364
|
-
this.store = store;
|
365
|
-
this.billingAddress$ = this.store.pipe(select(selectBillingAddress));
|
366
|
-
this.billingAddressIsShippingAddress$ = this.store.pipe(select(selectBillingAddressIsShippingAddress));
|
367
|
-
this.paymentInfo$ = this.store.pipe(select(selectPaymentInfo));
|
368
|
-
}
|
369
|
-
/**
|
370
|
-
* Dispatches the given action.
|
371
|
-
*
|
372
|
-
* @param action action to dispatch.
|
373
|
-
*/
|
374
|
-
dispatch(action) {
|
375
|
-
this.store.dispatch(action);
|
376
|
-
}
|
377
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
378
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingFacade, providedIn: DaffBillingModule }); }
|
379
|
-
}
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffBillingFacade, decorators: [{
|
381
|
-
type: Injectable,
|
382
|
-
args: [{
|
383
|
-
providedIn: DaffBillingModule,
|
384
|
-
}]
|
385
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
386
|
-
|
387
|
-
const initialState$1 = {
|
388
|
-
shippingAddress: null,
|
389
|
-
selectedShippingOptionId: null,
|
390
|
-
};
|
391
|
-
function daffShippingReducer(state = initialState$1, action) {
|
392
|
-
switch (action.type) {
|
393
|
-
case DaffShippingActionTypes.UpdateShippingAddressAction:
|
394
|
-
return { ...state, shippingAddress: action.payload };
|
395
|
-
case DaffShippingActionTypes.SelectShippingOptionAction:
|
396
|
-
return { ...state, selectedShippingOptionId: action.payload };
|
397
|
-
default:
|
398
|
-
return state;
|
399
|
-
}
|
400
|
-
}
|
401
|
-
|
402
|
-
const daffShippingReducers = {
|
403
|
-
shipping: daffShippingReducer,
|
404
|
-
};
|
405
|
-
|
406
|
-
class DaffShippingStateModule {
|
407
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
408
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingStateModule, imports: [i1.StoreFeatureModule] }); }
|
409
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingStateModule, imports: [StoreModule.forFeature('shipping', daffShippingReducers)] }); }
|
410
|
-
}
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingStateModule, decorators: [{
|
412
|
-
type: NgModule,
|
413
|
-
args: [{
|
414
|
-
imports: [
|
415
|
-
StoreModule.forFeature('shipping', daffShippingReducers),
|
416
|
-
],
|
417
|
-
}]
|
418
|
-
}] });
|
419
|
-
|
420
|
-
class DaffShippingModule {
|
421
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
422
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingModule, declarations: [ShippingContainer], imports: [CommonModule,
|
423
|
-
/**
|
424
|
-
* Ngrx/store
|
425
|
-
*/
|
426
|
-
DaffShippingStateModule], exports: [ShippingContainer] }); }
|
427
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingModule, imports: [CommonModule,
|
428
|
-
/**
|
429
|
-
* Ngrx/store
|
430
|
-
*/
|
431
|
-
DaffShippingStateModule] }); }
|
432
|
-
}
|
433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingModule, decorators: [{
|
434
|
-
type: NgModule,
|
435
|
-
args: [{
|
436
|
-
imports: [
|
437
|
-
CommonModule,
|
438
|
-
/**
|
439
|
-
* Ngrx/store
|
440
|
-
*/
|
441
|
-
DaffShippingStateModule,
|
442
|
-
],
|
443
|
-
declarations: [
|
444
|
-
ShippingContainer,
|
445
|
-
],
|
446
|
-
exports: [
|
447
|
-
ShippingContainer,
|
448
|
-
],
|
449
|
-
}]
|
450
|
-
}] });
|
451
|
-
|
452
|
-
/**
|
453
|
-
* A facade for accessing state for shipping information.
|
454
|
-
*/
|
455
|
-
class DaffShippingFacade {
|
456
|
-
constructor(store) {
|
457
|
-
this.store = store;
|
458
|
-
this.shippingAddress$ = this.store.pipe(select(selectShippingAddress));
|
459
|
-
this.selectedShippingOptionId$ = this.store.pipe(select(selectShippingOptionId));
|
460
|
-
this.isShippingAddressValid$ = this.store.pipe(select(selectIsShippingAddressValid));
|
461
|
-
}
|
462
|
-
/**
|
463
|
-
* Dispatches the given action.
|
464
|
-
*
|
465
|
-
* @param action action to dispatch.
|
466
|
-
*/
|
467
|
-
dispatch(action) {
|
468
|
-
this.store.dispatch(action);
|
469
|
-
}
|
470
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
471
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingFacade, providedIn: DaffShippingModule }); }
|
472
|
-
}
|
473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffShippingFacade, decorators: [{
|
474
|
-
type: Injectable,
|
475
|
-
args: [{
|
476
|
-
providedIn: DaffShippingModule,
|
477
|
-
}]
|
478
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
479
|
-
|
480
|
-
/**
|
481
|
-
* @deprecated
|
482
|
-
*/
|
483
|
-
var DaffOrderActionTypes;
|
484
|
-
(function (DaffOrderActionTypes) {
|
485
|
-
DaffOrderActionTypes["PlaceOrderAction"] = "[Order] Place Order Action";
|
486
|
-
DaffOrderActionTypes["PlaceOrderSuccessAction"] = "[Order] Place Order Success Action";
|
487
|
-
DaffOrderActionTypes["PlaceOrderFailureAction"] = "[Order] Place Order Failure Action";
|
488
|
-
})(DaffOrderActionTypes || (DaffOrderActionTypes = {}));
|
489
|
-
/**
|
490
|
-
* @deprecated
|
491
|
-
*/
|
492
|
-
var OrderActionTypes;
|
493
|
-
(function (OrderActionTypes) {
|
494
|
-
OrderActionTypes["PlaceOrderAction"] = "[Order] Place Order Action";
|
495
|
-
OrderActionTypes["PlaceOrderSuccessAction"] = "[Order] Place Order Success Action";
|
496
|
-
OrderActionTypes["PlaceOrderFailureAction"] = "[Order] Place Order Failure Action";
|
497
|
-
})(OrderActionTypes || (OrderActionTypes = {}));
|
498
|
-
/**
|
499
|
-
* @deprecated
|
500
|
-
*/
|
501
|
-
class PlaceOrder {
|
502
|
-
constructor(payload) {
|
503
|
-
this.payload = payload;
|
504
|
-
this.type = DaffOrderActionTypes.PlaceOrderAction;
|
505
|
-
}
|
506
|
-
}
|
507
|
-
/**
|
508
|
-
* @deprecated
|
509
|
-
*/
|
510
|
-
class DaffPlaceOrder {
|
511
|
-
constructor(payload) {
|
512
|
-
this.payload = payload;
|
513
|
-
this.type = DaffOrderActionTypes.PlaceOrderAction;
|
514
|
-
}
|
515
|
-
}
|
516
|
-
/**
|
517
|
-
* @deprecated
|
518
|
-
*/
|
519
|
-
class DaffPlaceOrderSuccess {
|
520
|
-
constructor(payload) {
|
521
|
-
this.payload = payload;
|
522
|
-
this.type = DaffOrderActionTypes.PlaceOrderSuccessAction;
|
523
|
-
}
|
524
|
-
}
|
525
|
-
/**
|
526
|
-
* @deprecated
|
527
|
-
*/
|
528
|
-
class DaffPlaceOrderFailure {
|
529
|
-
constructor(payload) {
|
530
|
-
this.payload = payload;
|
531
|
-
this.type = DaffOrderActionTypes.PlaceOrderFailureAction;
|
532
|
-
}
|
533
|
-
}
|
534
|
-
|
535
|
-
/**
|
536
|
-
* @deprecated
|
537
|
-
*/
|
538
|
-
const initialState = {
|
539
|
-
order: null,
|
540
|
-
loading: false,
|
541
|
-
errors: [],
|
542
|
-
};
|
543
|
-
/**
|
544
|
-
* @deprecated
|
545
|
-
*/
|
546
|
-
function daffOrderReducer(state = initialState, action) {
|
547
|
-
switch (action.type) {
|
548
|
-
case DaffOrderActionTypes.PlaceOrderAction:
|
549
|
-
return { ...state, loading: true };
|
550
|
-
case DaffOrderActionTypes.PlaceOrderSuccessAction:
|
551
|
-
return { ...state, order: action.payload, loading: false };
|
552
|
-
case DaffOrderActionTypes.PlaceOrderFailureAction:
|
553
|
-
return { ...state, errors: [action.payload], loading: false };
|
554
|
-
default:
|
555
|
-
return state;
|
556
|
-
}
|
557
|
-
}
|
558
|
-
|
559
|
-
/**
|
560
|
-
* @deprecated
|
561
|
-
*/
|
562
|
-
const daffOrderReducers = {
|
563
|
-
order: daffOrderReducer,
|
564
|
-
};
|
565
|
-
|
566
|
-
const DaffCheckoutDriver = new InjectionToken('DaffCheckoutDriver');
|
567
|
-
|
568
|
-
/**
|
569
|
-
* @deprecated
|
570
|
-
*/
|
571
|
-
class OrderEffects {
|
572
|
-
constructor(actions$, checkoutDriver) {
|
573
|
-
this.actions$ = actions$;
|
574
|
-
this.checkoutDriver = checkoutDriver;
|
575
|
-
this.onPlaceOrder$ = createEffect(() => this.actions$.pipe(ofType(DaffOrderActionTypes.PlaceOrderAction), switchMap((action) => this.checkoutDriver.placeOrder(action.payload.id.toString())
|
576
|
-
.pipe(map((resp) => new DaffPlaceOrderSuccess(resp)), catchError(error => of(new DaffPlaceOrderFailure('Failed to place order')))))));
|
577
|
-
}
|
578
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: OrderEffects, deps: [{ token: i1$1.Actions }, { token: DaffCheckoutDriver }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
579
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: OrderEffects }); }
|
580
|
-
}
|
581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: OrderEffects, decorators: [{
|
582
|
-
type: Injectable
|
583
|
-
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
584
|
-
type: Inject,
|
585
|
-
args: [DaffCheckoutDriver]
|
586
|
-
}] }] });
|
587
|
-
|
588
|
-
/**
|
589
|
-
* @deprecated
|
590
|
-
*/
|
591
|
-
class DaffOrderStateModule {
|
592
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
593
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] }); }
|
594
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderStateModule, imports: [StoreModule.forFeature('order', daffOrderReducers),
|
595
|
-
EffectsModule.forFeature([
|
596
|
-
OrderEffects,
|
597
|
-
])] }); }
|
598
|
-
}
|
599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderStateModule, decorators: [{
|
600
|
-
type: NgModule,
|
601
|
-
args: [{
|
602
|
-
imports: [
|
603
|
-
StoreModule.forFeature('order', daffOrderReducers),
|
604
|
-
EffectsModule.forFeature([
|
605
|
-
OrderEffects,
|
606
|
-
]),
|
607
|
-
],
|
608
|
-
}]
|
609
|
-
}] });
|
610
|
-
|
611
|
-
/**
|
612
|
-
* @deprecated
|
613
|
-
*/
|
614
|
-
class DaffOrderModule {
|
615
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
616
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderModule, declarations: [OrderContainer], imports: [CommonModule,
|
617
|
-
/**
|
618
|
-
* Ngrx/store
|
619
|
-
*/
|
620
|
-
DaffOrderStateModule], exports: [OrderContainer] }); }
|
621
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderModule, imports: [CommonModule,
|
622
|
-
/**
|
623
|
-
* Ngrx/store
|
624
|
-
*/
|
625
|
-
DaffOrderStateModule] }); }
|
626
|
-
}
|
627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderModule, decorators: [{
|
628
|
-
type: NgModule,
|
629
|
-
args: [{
|
630
|
-
imports: [
|
631
|
-
CommonModule,
|
632
|
-
/**
|
633
|
-
* Ngrx/store
|
634
|
-
*/
|
635
|
-
DaffOrderStateModule,
|
636
|
-
],
|
637
|
-
declarations: [
|
638
|
-
OrderContainer,
|
639
|
-
],
|
640
|
-
exports: [
|
641
|
-
OrderContainer,
|
642
|
-
],
|
643
|
-
}]
|
644
|
-
}] });
|
645
|
-
|
646
|
-
/**
|
647
|
-
* A facade for accessing state for the currently selected category.
|
648
|
-
*/
|
649
|
-
/**
|
650
|
-
* @deprecated
|
651
|
-
*/
|
652
|
-
class DaffOrderFacade {
|
653
|
-
constructor(store) {
|
654
|
-
this.store = store;
|
655
|
-
this.order$ = this.store.pipe(select(selectOrder));
|
656
|
-
this.loading$ = this.store.pipe(select(selectLoading));
|
657
|
-
this.errors$ = this.store.pipe(select(selectErrors));
|
658
|
-
}
|
659
|
-
/**
|
660
|
-
* Dispatches the given action.
|
661
|
-
*
|
662
|
-
* @param action action to dispatch.
|
663
|
-
*/
|
664
|
-
dispatch(action) {
|
665
|
-
this.store.dispatch(action);
|
666
|
-
}
|
667
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
668
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderFacade, providedIn: DaffOrderModule }); }
|
669
|
-
}
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DaffOrderFacade, decorators: [{
|
671
|
-
type: Injectable,
|
672
|
-
args: [{
|
673
|
-
providedIn: DaffOrderModule,
|
674
|
-
}]
|
675
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
676
|
-
|
677
|
-
class StateCheckoutModule {
|
678
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: StateCheckoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
679
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: StateCheckoutModule, imports: [CommonModule,
|
680
|
-
DaffShippingModule,
|
681
|
-
DaffPaymentModule,
|
682
|
-
DaffBillingModule,
|
683
|
-
DaffOrderModule], exports: [DaffShippingModule,
|
684
|
-
DaffPaymentModule,
|
685
|
-
DaffBillingModule,
|
686
|
-
DaffOrderModule] }); }
|
687
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: StateCheckoutModule, imports: [CommonModule,
|
688
|
-
DaffShippingModule,
|
689
|
-
DaffPaymentModule,
|
690
|
-
DaffBillingModule,
|
691
|
-
DaffOrderModule, DaffShippingModule,
|
692
|
-
DaffPaymentModule,
|
693
|
-
DaffBillingModule,
|
694
|
-
DaffOrderModule] }); }
|
695
|
-
}
|
696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: StateCheckoutModule, decorators: [{
|
697
|
-
type: NgModule,
|
698
|
-
args: [{
|
699
|
-
imports: [
|
700
|
-
CommonModule,
|
701
|
-
DaffShippingModule,
|
702
|
-
DaffPaymentModule,
|
703
|
-
DaffBillingModule,
|
704
|
-
DaffOrderModule,
|
705
|
-
],
|
706
|
-
exports: [
|
707
|
-
DaffShippingModule,
|
708
|
-
DaffPaymentModule,
|
709
|
-
DaffBillingModule,
|
710
|
-
DaffOrderModule,
|
711
|
-
],
|
712
|
-
}]
|
713
|
-
}] });
|
714
|
-
|
715
1
|
/**
|
716
2
|
* Generated bundle index. Do not edit.
|
717
3
|
*/
|
718
|
-
|
719
|
-
export { BillingContainer, DaffBillingActionTypes, DaffBillingFacade, DaffBillingModule, DaffCheckoutDriver, DaffOrderActionTypes, DaffOrderDriver, DaffOrderFacade, DaffOrderModule, DaffPaymentActionTypes, DaffPaymentDriver, DaffPaymentFacade, DaffPaymentModule, DaffPaymentTransformer, DaffPlaceOrder, DaffPlaceOrderFailure, DaffPlaceOrderSuccess, DaffSelectShippingOption, DaffShippingActionTypes, DaffShippingFacade, DaffShippingModule, DaffToggleBillingAddressIsShippingAddress, DaffUpdateBillingAddress, DaffUpdatePaymentInfo$1 as DaffUpdatePaymentInfo, DaffUpdateShippingAddress, OrderActionTypes, OrderContainer, PlaceOrder, ShippingContainer, StateCheckoutModule, daffBillingReducer, daffBillingReducers, daffOrderReducer, daffOrderReducers, daffPaymentReducers, daffShippingReducer, daffShippingReducers, selectBillingAddress, selectBillingAddressIsShippingAddress, selectBillingFeatureState, selectBillingState, selectErrors, selectIsShippingAddressValid, selectLoading, selectOrder, selectOrderFeatureState, selectOrderState, selectPaymentFeatureState, selectPaymentInfo$1 as selectPaymentInfo, selectPaymentState, selectShippingAddress, selectShippingFeatureState, selectShippingOptionId, selectShippingState };
|
720
4
|
//# sourceMappingURL=daffodil-checkout.mjs.map
|