@daffodil/customer 0.94.1 → 0.95.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-customer-driver-in-memory.mjs +344 -324
- package/fesm2022/daffodil-customer-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver-magento-2.4.7-testing.mjs +116 -0
- package/fesm2022/daffodil-customer-driver-magento-2.4.7-testing.mjs.map +1 -0
- package/fesm2022/daffodil-customer-driver-magento-2.4.7.mjs +399 -0
- package/fesm2022/daffodil-customer-driver-magento-2.4.7.mjs.map +1 -0
- package/fesm2022/daffodil-customer-driver-magento-auto-testing.mjs +7 -0
- package/fesm2022/daffodil-customer-driver-magento-auto-testing.mjs.map +1 -0
- package/fesm2022/daffodil-customer-driver-magento-auto.mjs +7 -0
- package/fesm2022/daffodil-customer-driver-magento-auto.mjs.map +1 -0
- package/fesm2022/daffodil-customer-driver-testing.mjs +152 -105
- package/fesm2022/daffodil-customer-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-driver.mjs +45 -88
- package/fesm2022/daffodil-customer-driver.mjs.map +1 -1
- package/fesm2022/daffodil-customer-routing.mjs +86 -52
- package/fesm2022/daffodil-customer-routing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-state-testing.mjs +176 -108
- package/fesm2022/daffodil-customer-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer-state.mjs +581 -718
- package/fesm2022/daffodil-customer-state.mjs.map +1 -1
- package/fesm2022/daffodil-customer-testing.mjs +102 -75
- package/fesm2022/daffodil-customer-testing.mjs.map +1 -1
- package/fesm2022/daffodil-customer.mjs +0 -4
- package/package.json +1 -1
- package/types/daffodil-customer-driver-in-memory.d.ts +102 -104
- package/types/daffodil-customer-driver-magento-2.4.7-testing.d.ts +33 -0
- package/types/daffodil-customer-driver-magento-2.4.7.d.ts +193 -0
- package/types/daffodil-customer-driver-magento-auto-testing.d.ts +1 -0
- package/types/daffodil-customer-driver-magento-auto.d.ts +1 -0
- package/types/daffodil-customer-driver-testing.d.ts +38 -37
- package/types/daffodil-customer-driver.d.ts +76 -90
- package/types/daffodil-customer-routing.d.ts +18 -22
- package/types/daffodil-customer-state-testing.d.ts +43 -43
- package/types/daffodil-customer-state.d.ts +240 -264
- package/types/daffodil-customer-testing.d.ts +27 -31
- package/types/daffodil-customer.d.ts +33 -37
- package/fesm2022/daffodil-customer-driver-magento-testing.mjs +0 -75
- package/fesm2022/daffodil-customer-driver-magento-testing.mjs.map +0 -1
- package/fesm2022/daffodil-customer-driver-magento.mjs +0 -448
- package/fesm2022/daffodil-customer-driver-magento.mjs.map +0 -1
- package/fesm2022/daffodil-customer.mjs.map +0 -1
- package/types/daffodil-customer-driver-magento-testing.d.ts +0 -37
- package/types/daffodil-customer-driver-magento.d.ts +0 -205
|
@@ -1,744 +1,607 @@
|
|
|
1
|
-
import { createMultiInjectionToken, createSingleInjectionToken } from
|
|
2
|
-
import { daffCompleteOperation,
|
|
3
|
-
import { createEntityAdapter } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import {
|
|
6
|
-
import * as i0 from
|
|
7
|
-
import { Injectable,
|
|
8
|
-
import * as i1
|
|
9
|
-
import { createEffect, ofType,
|
|
10
|
-
import { of } from
|
|
11
|
-
import {
|
|
12
|
-
import { DaffCustomerAddressDriver, DaffCustomerDriver } from
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The customer address action types enum.
|
|
16
|
-
*/
|
|
1
|
+
import { createMultiInjectionToken, createSingleInjectionToken } from "@daffodil/core";
|
|
2
|
+
import { daffClearErrors, daffCompleteOperation, daffComposeReducers, daffCreateOperationEntityStateAdapter, daffOperationFailed, daffOperationInitialState, daffOperationStateSelectorFactory, daffStartMutation, daffStartResolution, daffTransformErrorToStateError } from "@daffodil/core/state";
|
|
3
|
+
import { createEntityAdapter } from "@ngrx/entity";
|
|
4
|
+
import * as i1$1 from "@ngrx/store";
|
|
5
|
+
import { StoreModule, combineReducers, createFeatureSelector, createSelector, defaultMemoize, provideState, select } from "@ngrx/store";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import { Inject, Injectable, NgModule, inject, makeEnvironmentProviders } from "@angular/core";
|
|
8
|
+
import * as i1 from "@ngrx/effects";
|
|
9
|
+
import { EffectsModule, createEffect, ofType, provideEffects } from "@ngrx/effects";
|
|
10
|
+
import { of } from "rxjs";
|
|
11
|
+
import { catchError, map, switchMap } from "rxjs/operators";
|
|
12
|
+
import { DaffCustomerAddressDriver, DaffCustomerDriver } from "@daffodil/customer/driver";
|
|
17
13
|
var DaffCustomerAddressActionTypes;
|
|
18
|
-
(function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
(function(DaffCustomerAddressActionTypes) {
|
|
15
|
+
DaffCustomerAddressActionTypes["AddressListAction"] = "[@daffodil/customer] Address List Action";
|
|
16
|
+
DaffCustomerAddressActionTypes["AddressListSuccessAction"] = "[@daffodil/customer] Address List Success Action";
|
|
17
|
+
DaffCustomerAddressActionTypes["AddressListFailureAction"] = "[@daffodil/customer] Address List Failure Action";
|
|
18
|
+
DaffCustomerAddressActionTypes["AddressLoadAction"] = "[@daffodil/customer] Address Load Action";
|
|
19
|
+
DaffCustomerAddressActionTypes["AddressLoadSuccessAction"] = "[@daffodil/customer] Address Load Success Action";
|
|
20
|
+
DaffCustomerAddressActionTypes["AddressLoadFailureAction"] = "[@daffodil/customer] Address Load Failure Action";
|
|
21
|
+
DaffCustomerAddressActionTypes["AddressAddAction"] = "[@daffodil/customer] Address Add Action";
|
|
22
|
+
DaffCustomerAddressActionTypes["AddressAddSuccessAction"] = "[@daffodil/customer] Address Add Success Action";
|
|
23
|
+
DaffCustomerAddressActionTypes["AddressAddFailureAction"] = "[@daffodil/customer] Address Add Failure Action";
|
|
24
|
+
DaffCustomerAddressActionTypes["AddressUpdateAction"] = "[@daffodil/customer] Address Update Action";
|
|
25
|
+
DaffCustomerAddressActionTypes["AddressUpdateSuccessAction"] = "[@daffodil/customer] Address Update Success Action";
|
|
26
|
+
DaffCustomerAddressActionTypes["AddressUpdateFailureAction"] = "[@daffodil/customer] Address Update Failure Action";
|
|
27
|
+
DaffCustomerAddressActionTypes["AddressDeleteAction"] = "[@daffodil/customer] Address Delete Action";
|
|
28
|
+
DaffCustomerAddressActionTypes["AddressDeleteSuccessAction"] = "[@daffodil/customer] Address Delete Success Action";
|
|
29
|
+
DaffCustomerAddressActionTypes["AddressDeleteFailureAction"] = "[@daffodil/customer] Address Delete Failure Action";
|
|
34
30
|
})(DaffCustomerAddressActionTypes || (DaffCustomerAddressActionTypes = {}));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
class
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
constructor(address, placeholderId) {
|
|
130
|
-
this.address = address;
|
|
131
|
-
this.placeholderId = placeholderId;
|
|
132
|
-
this.type = DaffCustomerAddressActionTypes.AddressAddAction;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Indicates a successful addition of one of the currently logged-in customer's addresses.
|
|
137
|
-
*
|
|
138
|
-
* @param payload The updated list of customer addresses.
|
|
139
|
-
*/
|
|
140
|
-
class DaffCustomerAddressAddSuccess {
|
|
141
|
-
constructor(payload) {
|
|
142
|
-
this.payload = payload;
|
|
143
|
-
this.type = DaffCustomerAddressActionTypes.AddressAddSuccessAction;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* A failed address addition with the error message.
|
|
148
|
-
*/
|
|
149
|
-
class DaffCustomerAddressAddFailure {
|
|
150
|
-
constructor(payload, id) {
|
|
151
|
-
this.payload = payload;
|
|
152
|
-
this.id = id;
|
|
153
|
-
this.type = DaffCustomerAddressActionTypes.AddressAddFailureAction;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Deletes one of the currently logged-in customer's addresses.
|
|
158
|
-
*
|
|
159
|
-
* @param addressId The ID of the address.
|
|
160
|
-
*/
|
|
161
|
-
class DaffCustomerAddressDelete {
|
|
162
|
-
constructor(addressId) {
|
|
163
|
-
this.addressId = addressId;
|
|
164
|
-
this.type = DaffCustomerAddressActionTypes.AddressDeleteAction;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Indicates a successful deletion of one of the currently logged-in customer's addresses.
|
|
169
|
-
*
|
|
170
|
-
* @param payload The updated list of customer addresses.
|
|
171
|
-
*/
|
|
172
|
-
class DaffCustomerAddressDeleteSuccess {
|
|
173
|
-
constructor(payload) {
|
|
174
|
-
this.payload = payload;
|
|
175
|
-
this.type = DaffCustomerAddressActionTypes.AddressDeleteSuccessAction;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* A failed address deletion with the error message.
|
|
180
|
-
*/
|
|
181
|
-
class DaffCustomerAddressDeleteFailure {
|
|
182
|
-
constructor(payload, id) {
|
|
183
|
-
this.payload = payload;
|
|
184
|
-
this.id = id;
|
|
185
|
-
this.type = DaffCustomerAddressActionTypes.AddressDeleteFailureAction;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The customer action types enum.
|
|
191
|
-
*/
|
|
31
|
+
var DaffCustomerAddressList = class {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.type = DaffCustomerAddressActionTypes.AddressListAction;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var DaffCustomerAddressListSuccess = class {
|
|
37
|
+
constructor(payload) {
|
|
38
|
+
this.payload = payload;
|
|
39
|
+
this.type = DaffCustomerAddressActionTypes.AddressListSuccessAction;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var DaffCustomerAddressListFailure = class {
|
|
43
|
+
constructor(payload) {
|
|
44
|
+
this.payload = payload;
|
|
45
|
+
this.type = DaffCustomerAddressActionTypes.AddressListFailureAction;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var DaffCustomerAddressLoad = class {
|
|
49
|
+
constructor(addressId) {
|
|
50
|
+
this.addressId = addressId;
|
|
51
|
+
this.type = DaffCustomerAddressActionTypes.AddressLoadAction;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var DaffCustomerAddressLoadSuccess = class {
|
|
55
|
+
constructor(payload) {
|
|
56
|
+
this.payload = payload;
|
|
57
|
+
this.type = DaffCustomerAddressActionTypes.AddressLoadSuccessAction;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var DaffCustomerAddressLoadFailure = class {
|
|
61
|
+
constructor(payload, id) {
|
|
62
|
+
this.payload = payload;
|
|
63
|
+
this.id = id;
|
|
64
|
+
this.type = DaffCustomerAddressActionTypes.AddressLoadFailureAction;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var DaffCustomerAddressUpdate = class {
|
|
68
|
+
constructor(address) {
|
|
69
|
+
this.address = address;
|
|
70
|
+
this.type = DaffCustomerAddressActionTypes.AddressUpdateAction;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var DaffCustomerAddressUpdateSuccess = class {
|
|
74
|
+
constructor(payload) {
|
|
75
|
+
this.payload = payload;
|
|
76
|
+
this.type = DaffCustomerAddressActionTypes.AddressUpdateSuccessAction;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var DaffCustomerAddressUpdateFailure = class {
|
|
80
|
+
constructor(payload, id) {
|
|
81
|
+
this.payload = payload;
|
|
82
|
+
this.id = id;
|
|
83
|
+
this.type = DaffCustomerAddressActionTypes.AddressUpdateFailureAction;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var DaffCustomerAddressAdd = class {
|
|
87
|
+
constructor(address, placeholderId) {
|
|
88
|
+
this.address = address;
|
|
89
|
+
this.placeholderId = placeholderId;
|
|
90
|
+
this.type = DaffCustomerAddressActionTypes.AddressAddAction;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var DaffCustomerAddressAddSuccess = class {
|
|
94
|
+
constructor(payload) {
|
|
95
|
+
this.payload = payload;
|
|
96
|
+
this.type = DaffCustomerAddressActionTypes.AddressAddSuccessAction;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var DaffCustomerAddressAddFailure = class {
|
|
100
|
+
constructor(payload, id) {
|
|
101
|
+
this.payload = payload;
|
|
102
|
+
this.id = id;
|
|
103
|
+
this.type = DaffCustomerAddressActionTypes.AddressAddFailureAction;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
var DaffCustomerAddressDelete = class {
|
|
107
|
+
constructor(addressId) {
|
|
108
|
+
this.addressId = addressId;
|
|
109
|
+
this.type = DaffCustomerAddressActionTypes.AddressDeleteAction;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var DaffCustomerAddressDeleteSuccess = class {
|
|
113
|
+
constructor(payload) {
|
|
114
|
+
this.payload = payload;
|
|
115
|
+
this.type = DaffCustomerAddressActionTypes.AddressDeleteSuccessAction;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var DaffCustomerAddressDeleteFailure = class {
|
|
119
|
+
constructor(payload, id) {
|
|
120
|
+
this.payload = payload;
|
|
121
|
+
this.id = id;
|
|
122
|
+
this.type = DaffCustomerAddressActionTypes.AddressDeleteFailureAction;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
192
125
|
var DaffCustomerActionTypes;
|
|
193
|
-
(function
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
126
|
+
(function(DaffCustomerActionTypes) {
|
|
127
|
+
DaffCustomerActionTypes["CustomerLoadAction"] = "[@daffodil/customer] Customer Load Action";
|
|
128
|
+
DaffCustomerActionTypes["CustomerLoadSuccessAction"] = "[@daffodil/customer] Customer Load Success Action";
|
|
129
|
+
DaffCustomerActionTypes["CustomerLoadFailureAction"] = "[@daffodil/customer] Customer Load Failure Action";
|
|
130
|
+
DaffCustomerActionTypes["CustomerUpdateAction"] = "[@daffodil/customer] Customer Update Action";
|
|
131
|
+
DaffCustomerActionTypes["CustomerUpdateSuccessAction"] = "[@daffodil/customer] Customer Update Success Action";
|
|
132
|
+
DaffCustomerActionTypes["CustomerUpdateFailureAction"] = "[@daffodil/customer] Customer Update Failure Action";
|
|
133
|
+
DaffCustomerActionTypes["CustomerChangeEmailAction"] = "[@daffodil/customer] Customer Change Email Action";
|
|
134
|
+
DaffCustomerActionTypes["CustomerChangeEmailSuccessAction"] = "[@daffodil/customer] Customer Change Email Success Action";
|
|
135
|
+
DaffCustomerActionTypes["CustomerChangeEmailFailureAction"] = "[@daffodil/customer] Customer Change Email Failure Action";
|
|
136
|
+
DaffCustomerActionTypes["CustomerChangePasswordAction"] = "[@daffodil/customer] Customer Change Password Action";
|
|
137
|
+
DaffCustomerActionTypes["CustomerChangePasswordSuccessAction"] = "[@daffodil/customer] Customer Change Password Success Action";
|
|
138
|
+
DaffCustomerActionTypes["CustomerChangePasswordFailureAction"] = "[@daffodil/customer] Customer Change Password Failure Action";
|
|
139
|
+
DaffCustomerActionTypes["CustomerClearErrorsAction"] = "[@daffodil/customer] Customer Clear Errors Action";
|
|
207
140
|
})(DaffCustomerActionTypes || (DaffCustomerActionTypes = {}));
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
class
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
class
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
class
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
* A failed customer email change with the error message.
|
|
288
|
-
*/
|
|
289
|
-
class DaffCustomerChangeEmailFailure {
|
|
290
|
-
constructor(payload) {
|
|
291
|
-
this.payload = payload;
|
|
292
|
-
this.type = DaffCustomerActionTypes.CustomerChangeEmailFailureAction;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Changes the password of the currently logged-in customer.
|
|
297
|
-
*
|
|
298
|
-
* @param query The customer query.
|
|
299
|
-
*/
|
|
300
|
-
class DaffCustomerChangePassword {
|
|
301
|
-
constructor(newPassword, oldPassword) {
|
|
302
|
-
this.newPassword = newPassword;
|
|
303
|
-
this.oldPassword = oldPassword;
|
|
304
|
-
this.type = DaffCustomerActionTypes.CustomerChangePasswordAction;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Indicates a successful password change of the currently logged-in customer.
|
|
309
|
-
*/
|
|
310
|
-
class DaffCustomerChangePasswordSuccess {
|
|
311
|
-
constructor() {
|
|
312
|
-
this.type = DaffCustomerActionTypes.CustomerChangePasswordSuccessAction;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* A failed customer password change with the error message.
|
|
317
|
-
*/
|
|
318
|
-
class DaffCustomerChangePasswordFailure {
|
|
319
|
-
constructor(payload) {
|
|
320
|
-
this.payload = payload;
|
|
321
|
-
this.type = DaffCustomerActionTypes.CustomerChangePasswordFailureAction;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* An action to clear all customer errors in state.
|
|
326
|
-
*/
|
|
327
|
-
class DaffCustomerClearErrors {
|
|
328
|
-
constructor() {
|
|
329
|
-
this.type = DaffCustomerActionTypes.CustomerClearErrorsAction;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* The key under which the customer feature state will be stored.
|
|
335
|
-
*/
|
|
336
|
-
const DAFF_CUSTOMER_STORE_FEATURE_KEY = 'daffCustomer';
|
|
337
|
-
|
|
338
|
-
const {
|
|
339
|
-
/**
|
|
340
|
-
* A token to hold the injectable extra reducers.
|
|
341
|
-
*
|
|
342
|
-
* Prefer using {@link daffCustomerProvideExtraReducers}.
|
|
343
|
-
*/
|
|
344
|
-
token: DAFF_CUSTOMER_EXTRA_REDUCERS,
|
|
345
|
-
/**
|
|
346
|
-
* Provides additional reducers that run after the standard Daffodil customer reducers.
|
|
347
|
-
*
|
|
348
|
-
* @example
|
|
349
|
-
* ```ts
|
|
350
|
-
* providers: [
|
|
351
|
-
* ...daffCustomerProvideExtraReducers(
|
|
352
|
-
* myReducer1,
|
|
353
|
-
* myReducer2
|
|
354
|
-
* )
|
|
355
|
-
* ]
|
|
356
|
-
* ```
|
|
357
|
-
*/
|
|
358
|
-
provider: daffCustomerProvideExtraReducers, } = createMultiInjectionToken('DAFF_CUSTOMER_EXTRA_REDUCERS', { providedIn: 'any' });
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Stores the customer in state.
|
|
362
|
-
* Sets loading to false and resets errors.
|
|
363
|
-
*/
|
|
141
|
+
var DaffCustomerLoad = class {
|
|
142
|
+
constructor() {
|
|
143
|
+
this.type = DaffCustomerActionTypes.CustomerLoadAction;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var DaffCustomerLoadSuccess = class {
|
|
147
|
+
constructor(payload) {
|
|
148
|
+
this.payload = payload;
|
|
149
|
+
this.type = DaffCustomerActionTypes.CustomerLoadSuccessAction;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
var DaffCustomerLoadFailure = class {
|
|
153
|
+
constructor(payload) {
|
|
154
|
+
this.payload = payload;
|
|
155
|
+
this.type = DaffCustomerActionTypes.CustomerLoadFailureAction;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
var DaffCustomerUpdate = class {
|
|
159
|
+
constructor(customer) {
|
|
160
|
+
this.customer = customer;
|
|
161
|
+
this.type = DaffCustomerActionTypes.CustomerUpdateAction;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var DaffCustomerUpdateSuccess = class {
|
|
165
|
+
constructor(payload) {
|
|
166
|
+
this.payload = payload;
|
|
167
|
+
this.type = DaffCustomerActionTypes.CustomerUpdateSuccessAction;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
var DaffCustomerUpdateFailure = class {
|
|
171
|
+
constructor(payload) {
|
|
172
|
+
this.payload = payload;
|
|
173
|
+
this.type = DaffCustomerActionTypes.CustomerUpdateFailureAction;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
var DaffCustomerChangeEmail = class {
|
|
177
|
+
constructor(email, password) {
|
|
178
|
+
this.email = email;
|
|
179
|
+
this.password = password;
|
|
180
|
+
this.type = DaffCustomerActionTypes.CustomerChangeEmailAction;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var DaffCustomerChangeEmailSuccess = class {
|
|
184
|
+
constructor(payload) {
|
|
185
|
+
this.payload = payload;
|
|
186
|
+
this.type = DaffCustomerActionTypes.CustomerChangeEmailSuccessAction;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
var DaffCustomerChangeEmailFailure = class {
|
|
190
|
+
constructor(payload) {
|
|
191
|
+
this.payload = payload;
|
|
192
|
+
this.type = DaffCustomerActionTypes.CustomerChangeEmailFailureAction;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
var DaffCustomerChangePassword = class {
|
|
196
|
+
constructor(newPassword, oldPassword) {
|
|
197
|
+
this.newPassword = newPassword;
|
|
198
|
+
this.oldPassword = oldPassword;
|
|
199
|
+
this.type = DaffCustomerActionTypes.CustomerChangePasswordAction;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
var DaffCustomerChangePasswordSuccess = class {
|
|
203
|
+
constructor() {
|
|
204
|
+
this.type = DaffCustomerActionTypes.CustomerChangePasswordSuccessAction;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
var DaffCustomerChangePasswordFailure = class {
|
|
208
|
+
constructor(payload) {
|
|
209
|
+
this.payload = payload;
|
|
210
|
+
this.type = DaffCustomerActionTypes.CustomerChangePasswordFailureAction;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
var DaffCustomerClearErrors = class {
|
|
214
|
+
constructor() {
|
|
215
|
+
this.type = DaffCustomerActionTypes.CustomerClearErrorsAction;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
const DAFF_CUSTOMER_STORE_FEATURE_KEY = "daffCustomer";
|
|
219
|
+
const { token: DAFF_CUSTOMER_EXTRA_REDUCERS, provider: daffCustomerProvideExtraReducers } = createMultiInjectionToken("DAFF_CUSTOMER_EXTRA_REDUCERS", { providedIn: "any" });
|
|
364
220
|
function daffCustomerStateStoreCustomer(customer, state) {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
221
|
+
return {
|
|
222
|
+
...state,
|
|
223
|
+
...daffCompleteOperation(state),
|
|
224
|
+
customer
|
|
225
|
+
};
|
|
370
226
|
}
|
|
371
|
-
/**
|
|
372
|
-
* Stores customer addresses.
|
|
373
|
-
* Sets loading to false and resets errors.
|
|
374
|
-
*/
|
|
375
227
|
function daffCustomerStateStoreAddresses(addresses, state) {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
228
|
+
return {
|
|
229
|
+
...state,
|
|
230
|
+
...daffCompleteOperation(state),
|
|
231
|
+
customer: {
|
|
232
|
+
...state.customer,
|
|
233
|
+
addresses
|
|
234
|
+
}
|
|
235
|
+
};
|
|
384
236
|
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* The initial state for the main customer state, see {@link DaffCustomerReducerState}.
|
|
388
|
-
*/
|
|
389
237
|
const daffCustomerInitialState = {
|
|
390
|
-
|
|
391
|
-
|
|
238
|
+
...daffOperationInitialState,
|
|
239
|
+
customer: null
|
|
392
240
|
};
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* The reducer for the customer page state, see {@link DaffCustomerReducerState}.
|
|
396
|
-
*/
|
|
397
241
|
const daffCustomerReducer = (state = daffCustomerInitialState, action) => {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
case DaffCustomerActionTypes.CustomerClearErrorsAction:
|
|
417
|
-
return daffClearErrors(state);
|
|
418
|
-
case DaffCustomerAddressActionTypes.AddressDeleteSuccessAction:
|
|
419
|
-
case DaffCustomerAddressActionTypes.AddressAddSuccessAction:
|
|
420
|
-
return daffCustomerStateStoreAddresses(action.payload, state);
|
|
421
|
-
default:
|
|
422
|
-
return state;
|
|
423
|
-
}
|
|
242
|
+
switch (action.type) {
|
|
243
|
+
case DaffCustomerActionTypes.CustomerLoadAction: return daffStartResolution(state);
|
|
244
|
+
case DaffCustomerActionTypes.CustomerUpdateAction:
|
|
245
|
+
case DaffCustomerActionTypes.CustomerChangeEmailAction:
|
|
246
|
+
case DaffCustomerActionTypes.CustomerChangePasswordAction: return daffStartMutation(state);
|
|
247
|
+
case DaffCustomerActionTypes.CustomerLoadSuccessAction:
|
|
248
|
+
case DaffCustomerActionTypes.CustomerUpdateSuccessAction:
|
|
249
|
+
case DaffCustomerActionTypes.CustomerChangeEmailSuccessAction: return daffCustomerStateStoreCustomer(action.payload, state);
|
|
250
|
+
case DaffCustomerActionTypes.CustomerChangePasswordSuccessAction: return daffCompleteOperation(state);
|
|
251
|
+
case DaffCustomerActionTypes.CustomerLoadFailureAction:
|
|
252
|
+
case DaffCustomerActionTypes.CustomerUpdateFailureAction:
|
|
253
|
+
case DaffCustomerActionTypes.CustomerChangeEmailFailureAction:
|
|
254
|
+
case DaffCustomerActionTypes.CustomerChangePasswordFailureAction: return daffOperationFailed([action.payload], state);
|
|
255
|
+
case DaffCustomerActionTypes.CustomerClearErrorsAction: return daffClearErrors(state);
|
|
256
|
+
case DaffCustomerAddressActionTypes.AddressDeleteSuccessAction:
|
|
257
|
+
case DaffCustomerAddressActionTypes.AddressAddSuccessAction: return daffCustomerStateStoreAddresses(action.payload, state);
|
|
258
|
+
default: return state;
|
|
259
|
+
}
|
|
424
260
|
};
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* The initial state for the main customer state, see {@link DaffCustomerAddressReducerState}.
|
|
428
|
-
*/
|
|
429
261
|
const daffCustomerAddressInitialState = daffOperationInitialState;
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* The reducer for the customer page state, see {@link DaffCustomerAddressReducerState}.
|
|
433
|
-
*/
|
|
434
262
|
const daffCustomerAddressReducer = (state = daffCustomerAddressInitialState, action) => {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
case action.type === DaffCustomerAddressActionTypes.AddressLoadFailureAction:
|
|
454
|
-
return daffOperationFailed([action.payload], state);
|
|
455
|
-
default:
|
|
456
|
-
return state;
|
|
457
|
-
}
|
|
263
|
+
switch (true) {
|
|
264
|
+
case action.type === DaffCustomerAddressActionTypes.AddressListAction:
|
|
265
|
+
case action.type === DaffCustomerAddressActionTypes.AddressLoadAction: return daffStartResolution(state);
|
|
266
|
+
case action.type === DaffCustomerAddressActionTypes.AddressUpdateAction:
|
|
267
|
+
case action.type === DaffCustomerAddressActionTypes.AddressAddAction:
|
|
268
|
+
case action.type === DaffCustomerAddressActionTypes.AddressDeleteAction: return daffStartMutation(state);
|
|
269
|
+
case action.type === DaffCustomerAddressActionTypes.AddressListSuccessAction:
|
|
270
|
+
case action.type === DaffCustomerAddressActionTypes.AddressLoadSuccessAction:
|
|
271
|
+
case action.type === DaffCustomerAddressActionTypes.AddressUpdateSuccessAction:
|
|
272
|
+
case action.type === DaffCustomerAddressActionTypes.AddressAddSuccessAction:
|
|
273
|
+
case action.type === DaffCustomerAddressActionTypes.AddressDeleteSuccessAction:
|
|
274
|
+
case action.type === DaffCustomerAddressActionTypes.AddressUpdateFailureAction:
|
|
275
|
+
case action.type === DaffCustomerAddressActionTypes.AddressAddFailureAction:
|
|
276
|
+
case action.type === DaffCustomerAddressActionTypes.AddressDeleteFailureAction: return daffCompleteOperation(state);
|
|
277
|
+
case action.type === DaffCustomerAddressActionTypes.AddressListFailureAction:
|
|
278
|
+
case action.type === DaffCustomerAddressActionTypes.AddressLoadFailureAction: return daffOperationFailed([action.payload], state);
|
|
279
|
+
default: return state;
|
|
280
|
+
}
|
|
458
281
|
};
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Customer Address Entities Adapter for changing/overwriting entity state.
|
|
462
|
-
*/
|
|
463
282
|
const daffCustomerAddressEntitiesAdapter = (() => {
|
|
464
|
-
|
|
465
|
-
|
|
283
|
+
let cache;
|
|
284
|
+
return () => cache = cache || daffCreateOperationEntityStateAdapter(createEntityAdapter({ selectId: (item) => item.id }));
|
|
466
285
|
})();
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Reducer function that catches actions and changes/overwrites product entities state.
|
|
470
|
-
*
|
|
471
|
-
* @param state current State of the redux store
|
|
472
|
-
* @param action CartItemGrid, BestSellers, or CartItem actions
|
|
473
|
-
* @returns CartItem entities state
|
|
474
|
-
*/
|
|
475
286
|
function daffCustomerAddressEntitiesReducer(state = daffCustomerAddressEntitiesAdapter().getInitialState(), action) {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
case DaffCustomerAddressActionTypes.AddressDeleteFailureAction:
|
|
499
|
-
case DaffCustomerAddressActionTypes.AddressAddFailureAction:
|
|
500
|
-
case DaffCustomerAddressActionTypes.AddressLoadFailureAction:
|
|
501
|
-
case DaffCustomerAddressActionTypes.AddressUpdateFailureAction:
|
|
502
|
-
return adapter.operationFailed(action.id, [action.payload], state);
|
|
503
|
-
default:
|
|
504
|
-
return state;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
const getDaffCustomerReducersStateSelector = defaultMemoize(() => ({
|
|
509
|
-
selectCustomerFeatureState: createFeatureSelector(DAFF_CUSTOMER_STORE_FEATURE_KEY),
|
|
510
|
-
})).memoized;
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Creates a group of selectors for {@link DaffCustomerReducerState} that use the passed state selector as the basis.
|
|
514
|
-
*/
|
|
287
|
+
const adapter = daffCustomerAddressEntitiesAdapter();
|
|
288
|
+
switch (action.type) {
|
|
289
|
+
case DaffCustomerAddressActionTypes.AddressLoadAction: return adapter.preload(action.addressId, state);
|
|
290
|
+
case DaffCustomerAddressActionTypes.AddressAddAction: return adapter.preadd(action.address, state, action.placeholderId);
|
|
291
|
+
case DaffCustomerAddressActionTypes.AddressDeleteAction: return adapter.preremove(action.addressId, state);
|
|
292
|
+
case DaffCustomerAddressActionTypes.AddressUpdateAction: return adapter.preupdate(action.address, state);
|
|
293
|
+
case DaffCustomerAddressActionTypes.AddressLoadSuccessAction: return adapter.load(action.payload, state);
|
|
294
|
+
case DaffCustomerAddressActionTypes.AddressListSuccessAction: return adapter.list(action.payload, state);
|
|
295
|
+
case DaffCustomerActionTypes.CustomerChangeEmailSuccessAction:
|
|
296
|
+
case DaffCustomerActionTypes.CustomerUpdateSuccessAction:
|
|
297
|
+
case DaffCustomerActionTypes.CustomerLoadSuccessAction: return adapter.list(action.payload.addresses, state);
|
|
298
|
+
case DaffCustomerAddressActionTypes.AddressUpdateSuccessAction:
|
|
299
|
+
case DaffCustomerAddressActionTypes.AddressDeleteSuccessAction:
|
|
300
|
+
case DaffCustomerAddressActionTypes.AddressAddSuccessAction: return adapter.list(action.payload, state);
|
|
301
|
+
case DaffCustomerAddressActionTypes.AddressDeleteFailureAction:
|
|
302
|
+
case DaffCustomerAddressActionTypes.AddressAddFailureAction:
|
|
303
|
+
case DaffCustomerAddressActionTypes.AddressLoadFailureAction:
|
|
304
|
+
case DaffCustomerAddressActionTypes.AddressUpdateFailureAction: return adapter.operationFailed(action.id, [action.payload], state);
|
|
305
|
+
default: return state;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const getDaffCustomerReducersStateSelector = defaultMemoize(() => ({ selectCustomerFeatureState: createFeatureSelector(DAFF_CUSTOMER_STORE_FEATURE_KEY) })).memoized;
|
|
515
309
|
const daffCustomerCreateSelectors = () => {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
310
|
+
const { selectCustomerFeatureState } = getDaffCustomerReducersStateSelector();
|
|
311
|
+
const selectCustomerState = createSelector(selectCustomerFeatureState, (state) => state.customer);
|
|
312
|
+
const selectCustomer = createSelector(selectCustomerState, (state) => state.customer);
|
|
313
|
+
return {
|
|
314
|
+
...daffOperationStateSelectorFactory(selectCustomerState),
|
|
315
|
+
selectCustomer
|
|
316
|
+
};
|
|
523
317
|
};
|
|
524
318
|
const daffCustomerGetSelectors = defaultMemoize(() => daffCustomerCreateSelectors()).memoized;
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Creates a group of selectors for {@link DaffCustomerAddressReducerState} that use the passed state selector as the basis.
|
|
528
|
-
*/
|
|
529
319
|
const daffCustomerAddressCreateSelectors = () => {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
320
|
+
const { selectCustomerFeatureState } = getDaffCustomerReducersStateSelector();
|
|
321
|
+
const selectCustomerAddressState = createSelector(selectCustomerFeatureState, (state) => state.address);
|
|
322
|
+
const selectCustomerAddressEntitiesState = createSelector(selectCustomerFeatureState, (state) => state.addressEntities);
|
|
323
|
+
const { selectEntity, selectOptimisticList } = daffCustomerAddressEntitiesAdapter().getSelectors(selectCustomerAddressEntitiesState);
|
|
324
|
+
return {
|
|
325
|
+
...daffOperationStateSelectorFactory(selectCustomerAddressState),
|
|
326
|
+
selectAddress: selectEntity,
|
|
327
|
+
selectAddresses: selectOptimisticList
|
|
328
|
+
};
|
|
539
329
|
};
|
|
540
330
|
const daffCustomerAddressGetSelectors = defaultMemoize(() => daffCustomerAddressCreateSelectors()).memoized;
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
this.loadingState$ = this.store.pipe(select(selectLoadingState));
|
|
587
|
-
this.loading$ = this.store.pipe(select(selectLoading));
|
|
588
|
-
this.resolving$ = this.store.pipe(select(selectResolving));
|
|
589
|
-
this.mutating$ = this.store.pipe(select(selectMutating));
|
|
590
|
-
this.errors$ = this.store.pipe(select(selectErrors));
|
|
591
|
-
this.hasErrors$ = this.store.pipe(select(selectHasErrors));
|
|
592
|
-
}
|
|
593
|
-
getAddress(id) {
|
|
594
|
-
return this.store.pipe(select(this._selectAddress(id)));
|
|
595
|
-
}
|
|
596
|
-
dispatch(action) {
|
|
597
|
-
this.store.dispatch(action);
|
|
598
|
-
}
|
|
599
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
600
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressPageFacade, providedIn: 'root' }); }
|
|
601
|
-
}
|
|
602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressPageFacade, decorators: [{
|
|
603
|
-
type: Injectable,
|
|
604
|
-
args: [{
|
|
605
|
-
providedIn: 'root',
|
|
606
|
-
}]
|
|
607
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
608
|
-
|
|
609
|
-
const {
|
|
610
|
-
/**
|
|
611
|
-
* Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
|
|
612
|
-
* Can be used to further refine Daffodil errors into more specific app errors.
|
|
613
|
-
*/
|
|
614
|
-
token: DAFF_CUSTOMER_ERROR_MATCHER,
|
|
615
|
-
/**
|
|
616
|
-
* Provider function for {@link DAFF_CUSTOMER_ERROR_MATCHER}.
|
|
617
|
-
*/
|
|
618
|
-
provider: provideDaffCustomerErrorMatcher, } = createSingleInjectionToken('DAFF_CUSTOMER_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
|
|
619
|
-
|
|
620
|
-
class DaffCustomerAddressEffects {
|
|
621
|
-
constructor(actions$, driver, errorMatcher) {
|
|
622
|
-
this.actions$ = actions$;
|
|
623
|
-
this.driver = driver;
|
|
624
|
-
this.errorMatcher = errorMatcher;
|
|
625
|
-
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressListAction), switchMap((action) => this.driver.list().pipe(map(resp => new DaffCustomerAddressListSuccess(resp)), catchError((error) => of(new DaffCustomerAddressListFailure(this.errorMatcher(error))))))));
|
|
626
|
-
/**
|
|
627
|
-
* An effect for loading a customer address.
|
|
628
|
-
*/
|
|
629
|
-
this.get$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressLoadAction), switchMap((action) => this.driver.get(action.addressId).pipe(map(resp => new DaffCustomerAddressLoadSuccess(resp)), catchError((error) => of(new DaffCustomerAddressLoadFailure(this.errorMatcher(error), action.addressId)))))));
|
|
630
|
-
/**
|
|
631
|
-
* An effect for updating a customer address.
|
|
632
|
-
*/
|
|
633
|
-
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressUpdateAction), switchMap((action) => this.driver.update(action.address).pipe(map(resp => new DaffCustomerAddressUpdateSuccess(resp)), catchError((error) => of(new DaffCustomerAddressUpdateFailure(this.errorMatcher(error), action.address.id)))))));
|
|
634
|
-
/**
|
|
635
|
-
* An effect for adding a new customer address.
|
|
636
|
-
*/
|
|
637
|
-
this.add$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressAddAction), switchMap((action) => this.driver.add(action.address).pipe(map(resp => new DaffCustomerAddressAddSuccess(resp)), catchError((error) => of(new DaffCustomerAddressAddFailure(this.errorMatcher(error), action.placeholderId)))))));
|
|
638
|
-
/**
|
|
639
|
-
* An effect for adding a new customer address.
|
|
640
|
-
*/
|
|
641
|
-
this.delete$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressDeleteAction), switchMap((action) => this.driver.delete(action.addressId).pipe(map(resp => new DaffCustomerAddressDeleteSuccess(resp)), catchError((error) => of(new DaffCustomerAddressDeleteFailure(this.errorMatcher(error), action.addressId)))))));
|
|
642
|
-
}
|
|
643
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressEffects, deps: [{ token: i1$1.Actions }, { token: DaffCustomerAddressDriver }, { token: DAFF_CUSTOMER_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
644
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressEffects }); }
|
|
645
|
-
}
|
|
646
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressEffects, decorators: [{
|
|
647
|
-
type: Injectable
|
|
648
|
-
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
|
649
|
-
type: Inject,
|
|
650
|
-
args: [DaffCustomerAddressDriver]
|
|
651
|
-
}] }, { type: undefined, decorators: [{
|
|
652
|
-
type: Inject,
|
|
653
|
-
args: [DAFF_CUSTOMER_ERROR_MATCHER]
|
|
654
|
-
}] }] });
|
|
655
|
-
|
|
656
|
-
class DaffCustomerEffects {
|
|
657
|
-
constructor(actions$, driver, errorMatcher) {
|
|
658
|
-
this.actions$ = actions$;
|
|
659
|
-
this.driver = driver;
|
|
660
|
-
this.errorMatcher = errorMatcher;
|
|
661
|
-
/**
|
|
662
|
-
* An effect for the loading of an customer.
|
|
663
|
-
*/
|
|
664
|
-
this.get$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerLoadAction), switchMap((action) => this.driver.get().pipe(map(resp => new DaffCustomerLoadSuccess(resp)), catchError((error) => of(new DaffCustomerLoadFailure(this.errorMatcher(error))))))));
|
|
665
|
-
/**
|
|
666
|
-
* An effect for the updating of an customer.
|
|
667
|
-
*/
|
|
668
|
-
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerUpdateAction), switchMap((action) => this.driver.update(action.customer).pipe(map(resp => new DaffCustomerUpdateSuccess(resp)), catchError((error) => of(new DaffCustomerUpdateFailure(this.errorMatcher(error))))))));
|
|
669
|
-
/**
|
|
670
|
-
* An effect for changing a customer email.
|
|
671
|
-
*/
|
|
672
|
-
this.changeEmail$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerChangeEmailAction), switchMap((action) => this.driver.changeEmail(action.email, action.password).pipe(map(resp => new DaffCustomerChangeEmailSuccess(resp)), catchError((error) => of(new DaffCustomerChangeEmailFailure(this.errorMatcher(error))))))));
|
|
673
|
-
/**
|
|
674
|
-
* An effect for changing a customer password.
|
|
675
|
-
*/
|
|
676
|
-
this.changePassword$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerChangePasswordAction), switchMap((action) => this.driver.changePassword(action.oldPassword, action.newPassword).pipe(map(() => new DaffCustomerChangePasswordSuccess()), catchError((error) => of(new DaffCustomerChangePasswordFailure(this.errorMatcher(error))))))));
|
|
677
|
-
}
|
|
678
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerEffects, deps: [{ token: i1$1.Actions }, { token: DaffCustomerDriver }, { token: DAFF_CUSTOMER_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
679
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerEffects }); }
|
|
680
|
-
}
|
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerEffects, decorators: [{
|
|
682
|
-
type: Injectable
|
|
683
|
-
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
|
|
684
|
-
type: Inject,
|
|
685
|
-
args: [DaffCustomerDriver]
|
|
686
|
-
}] }, { type: undefined, decorators: [{
|
|
687
|
-
type: Inject,
|
|
688
|
-
args: [DAFF_CUSTOMER_ERROR_MATCHER]
|
|
689
|
-
}] }] });
|
|
690
|
-
|
|
691
|
-
const {
|
|
692
|
-
/**
|
|
693
|
-
* An internal token to hold the Daffodil customer reducers.
|
|
694
|
-
* Includes the extra and standard reducers.
|
|
695
|
-
*
|
|
696
|
-
* @docs-private
|
|
697
|
-
*/
|
|
698
|
-
token: DAFF_CUSTOMER_REDUCERS,
|
|
699
|
-
/**
|
|
700
|
-
* Provider function for {@link DAFF_CUSTOMER_REDUCERS}.
|
|
701
|
-
*/
|
|
702
|
-
provider: provideDaffCustomerReducers, } = createSingleInjectionToken('DAFF_CUSTOMER_REDUCERS', {
|
|
703
|
-
providedIn: 'any',
|
|
704
|
-
factory: () => daffComposeReducers([
|
|
705
|
-
combineReducers({
|
|
706
|
-
customer: daffCustomerReducer,
|
|
707
|
-
address: daffCustomerAddressReducer,
|
|
708
|
-
addressEntities: daffCustomerAddressEntitiesReducer,
|
|
709
|
-
}),
|
|
710
|
-
...inject(DAFF_CUSTOMER_EXTRA_REDUCERS),
|
|
711
|
-
]),
|
|
331
|
+
var DaffCustomerPageFacade = class DaffCustomerPageFacade {
|
|
332
|
+
constructor(store) {
|
|
333
|
+
this.store = store;
|
|
334
|
+
const { selectCustomer, selectErrors, selectHasErrors, selectLoading, selectLoadingState, selectMutating, selectResolving } = daffCustomerGetSelectors();
|
|
335
|
+
this.customer$ = this.store.pipe(select(selectCustomer));
|
|
336
|
+
this.loadingState$ = this.store.pipe(select(selectLoadingState));
|
|
337
|
+
this.loading$ = this.store.pipe(select(selectLoading));
|
|
338
|
+
this.resolving$ = this.store.pipe(select(selectResolving));
|
|
339
|
+
this.mutating$ = this.store.pipe(select(selectMutating));
|
|
340
|
+
this.errors$ = this.store.pipe(select(selectErrors));
|
|
341
|
+
this.hasErrors$ = this.store.pipe(select(selectHasErrors));
|
|
342
|
+
}
|
|
343
|
+
dispatch(action) {
|
|
344
|
+
this.store.dispatch(action);
|
|
345
|
+
}
|
|
346
|
+
static {
|
|
347
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
348
|
+
minVersion: "12.0.0",
|
|
349
|
+
version: "22.2.4",
|
|
350
|
+
ngImport: i0,
|
|
351
|
+
type: DaffCustomerPageFacade,
|
|
352
|
+
deps: [{ token: i1$1.Store }],
|
|
353
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
static {
|
|
357
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
358
|
+
minVersion: "12.0.0",
|
|
359
|
+
version: "22.2.4",
|
|
360
|
+
ngImport: i0,
|
|
361
|
+
type: DaffCustomerPageFacade,
|
|
362
|
+
providedIn: "root"
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
367
|
+
minVersion: "12.0.0",
|
|
368
|
+
version: "22.2.4",
|
|
369
|
+
ngImport: i0,
|
|
370
|
+
type: DaffCustomerPageFacade,
|
|
371
|
+
decorators: [{
|
|
372
|
+
type: Injectable,
|
|
373
|
+
args: [{ providedIn: "root" }]
|
|
374
|
+
}],
|
|
375
|
+
ctorParameters: () => [{ type: i1$1.Store }]
|
|
712
376
|
});
|
|
377
|
+
var DaffCustomerAddressPageFacade = class DaffCustomerAddressPageFacade {
|
|
378
|
+
constructor(store) {
|
|
379
|
+
this.store = store;
|
|
380
|
+
const { selectAddress, selectAddresses, selectErrors, selectHasErrors, selectLoading, selectLoadingState, selectMutating, selectResolving } = daffCustomerAddressGetSelectors();
|
|
381
|
+
this._selectAddress = selectAddress;
|
|
382
|
+
this.addresses$ = this.store.pipe(select(selectAddresses));
|
|
383
|
+
this.loadingState$ = this.store.pipe(select(selectLoadingState));
|
|
384
|
+
this.loading$ = this.store.pipe(select(selectLoading));
|
|
385
|
+
this.resolving$ = this.store.pipe(select(selectResolving));
|
|
386
|
+
this.mutating$ = this.store.pipe(select(selectMutating));
|
|
387
|
+
this.errors$ = this.store.pipe(select(selectErrors));
|
|
388
|
+
this.hasErrors$ = this.store.pipe(select(selectHasErrors));
|
|
389
|
+
}
|
|
390
|
+
getAddress(id) {
|
|
391
|
+
return this.store.pipe(select(this._selectAddress(id)));
|
|
392
|
+
}
|
|
393
|
+
dispatch(action) {
|
|
394
|
+
this.store.dispatch(action);
|
|
395
|
+
}
|
|
396
|
+
static {
|
|
397
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
398
|
+
minVersion: "12.0.0",
|
|
399
|
+
version: "22.2.4",
|
|
400
|
+
ngImport: i0,
|
|
401
|
+
type: DaffCustomerAddressPageFacade,
|
|
402
|
+
deps: [{ token: i1$1.Store }],
|
|
403
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
static {
|
|
407
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
408
|
+
minVersion: "12.0.0",
|
|
409
|
+
version: "22.2.4",
|
|
410
|
+
ngImport: i0,
|
|
411
|
+
type: DaffCustomerAddressPageFacade,
|
|
412
|
+
providedIn: "root"
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
417
|
+
minVersion: "12.0.0",
|
|
418
|
+
version: "22.2.4",
|
|
419
|
+
ngImport: i0,
|
|
420
|
+
type: DaffCustomerAddressPageFacade,
|
|
421
|
+
decorators: [{
|
|
422
|
+
type: Injectable,
|
|
423
|
+
args: [{ providedIn: "root" }]
|
|
424
|
+
}],
|
|
425
|
+
ctorParameters: () => [{ type: i1$1.Store }]
|
|
426
|
+
});
|
|
427
|
+
const { token: DAFF_CUSTOMER_ERROR_MATCHER, provider: provideDaffCustomerErrorMatcher } = createSingleInjectionToken("DAFF_CUSTOMER_ERROR_MATCHER", { factory: () => daffTransformErrorToStateError });
|
|
428
|
+
var DaffCustomerAddressEffects = class DaffCustomerAddressEffects {
|
|
429
|
+
constructor(actions$, driver, errorMatcher) {
|
|
430
|
+
this.actions$ = actions$;
|
|
431
|
+
this.driver = driver;
|
|
432
|
+
this.errorMatcher = errorMatcher;
|
|
433
|
+
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressListAction), switchMap((action) => this.driver.list().pipe(map((resp) => new DaffCustomerAddressListSuccess(resp)), catchError((error) => of(new DaffCustomerAddressListFailure(this.errorMatcher(error))))))));
|
|
434
|
+
this.get$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressLoadAction), switchMap((action) => this.driver.get(action.addressId).pipe(map((resp) => new DaffCustomerAddressLoadSuccess(resp)), catchError((error) => of(new DaffCustomerAddressLoadFailure(this.errorMatcher(error), action.addressId)))))));
|
|
435
|
+
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressUpdateAction), switchMap((action) => this.driver.update(action.address).pipe(map((resp) => new DaffCustomerAddressUpdateSuccess(resp)), catchError((error) => of(new DaffCustomerAddressUpdateFailure(this.errorMatcher(error), action.address.id)))))));
|
|
436
|
+
this.add$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressAddAction), switchMap((action) => this.driver.add(action.address).pipe(map((resp) => new DaffCustomerAddressAddSuccess(resp)), catchError((error) => of(new DaffCustomerAddressAddFailure(this.errorMatcher(error), action.placeholderId)))))));
|
|
437
|
+
this.delete$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerAddressActionTypes.AddressDeleteAction), switchMap((action) => this.driver.delete(action.addressId).pipe(map((resp) => new DaffCustomerAddressDeleteSuccess(resp)), catchError((error) => of(new DaffCustomerAddressDeleteFailure(this.errorMatcher(error), action.addressId)))))));
|
|
438
|
+
}
|
|
439
|
+
static {
|
|
440
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
441
|
+
minVersion: "12.0.0",
|
|
442
|
+
version: "22.2.4",
|
|
443
|
+
ngImport: i0,
|
|
444
|
+
type: DaffCustomerAddressEffects,
|
|
445
|
+
deps: [
|
|
446
|
+
{ token: i1.Actions },
|
|
447
|
+
{ token: DaffCustomerAddressDriver },
|
|
448
|
+
{ token: DAFF_CUSTOMER_ERROR_MATCHER }
|
|
449
|
+
],
|
|
450
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
static {
|
|
454
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
455
|
+
minVersion: "12.0.0",
|
|
456
|
+
version: "22.2.4",
|
|
457
|
+
ngImport: i0,
|
|
458
|
+
type: DaffCustomerAddressEffects
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
463
|
+
minVersion: "12.0.0",
|
|
464
|
+
version: "22.2.4",
|
|
465
|
+
ngImport: i0,
|
|
466
|
+
type: DaffCustomerAddressEffects,
|
|
467
|
+
decorators: [{ type: Injectable }],
|
|
468
|
+
ctorParameters: () => [
|
|
469
|
+
{ type: i1.Actions },
|
|
470
|
+
{
|
|
471
|
+
type: void 0,
|
|
472
|
+
decorators: [{
|
|
473
|
+
type: Inject,
|
|
474
|
+
args: [DaffCustomerAddressDriver]
|
|
475
|
+
}]
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
type: void 0,
|
|
479
|
+
decorators: [{
|
|
480
|
+
type: Inject,
|
|
481
|
+
args: [DAFF_CUSTOMER_ERROR_MATCHER]
|
|
482
|
+
}]
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
});
|
|
486
|
+
var DaffCustomerEffects = class DaffCustomerEffects {
|
|
487
|
+
constructor(actions$, driver, errorMatcher) {
|
|
488
|
+
this.actions$ = actions$;
|
|
489
|
+
this.driver = driver;
|
|
490
|
+
this.errorMatcher = errorMatcher;
|
|
491
|
+
this.get$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerLoadAction), switchMap((action) => this.driver.get().pipe(map((resp) => new DaffCustomerLoadSuccess(resp)), catchError((error) => of(new DaffCustomerLoadFailure(this.errorMatcher(error))))))));
|
|
492
|
+
this.update$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerUpdateAction), switchMap((action) => this.driver.update(action.customer).pipe(map((resp) => new DaffCustomerUpdateSuccess(resp)), catchError((error) => of(new DaffCustomerUpdateFailure(this.errorMatcher(error))))))));
|
|
493
|
+
this.changeEmail$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerChangeEmailAction), switchMap((action) => this.driver.changeEmail(action.email, action.password).pipe(map((resp) => new DaffCustomerChangeEmailSuccess(resp)), catchError((error) => of(new DaffCustomerChangeEmailFailure(this.errorMatcher(error))))))));
|
|
494
|
+
this.changePassword$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerActionTypes.CustomerChangePasswordAction), switchMap((action) => this.driver.changePassword(action.oldPassword, action.newPassword).pipe(map(() => new DaffCustomerChangePasswordSuccess()), catchError((error) => of(new DaffCustomerChangePasswordFailure(this.errorMatcher(error))))))));
|
|
495
|
+
}
|
|
496
|
+
static {
|
|
497
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
498
|
+
minVersion: "12.0.0",
|
|
499
|
+
version: "22.2.4",
|
|
500
|
+
ngImport: i0,
|
|
501
|
+
type: DaffCustomerEffects,
|
|
502
|
+
deps: [
|
|
503
|
+
{ token: i1.Actions },
|
|
504
|
+
{ token: DaffCustomerDriver },
|
|
505
|
+
{ token: DAFF_CUSTOMER_ERROR_MATCHER }
|
|
506
|
+
],
|
|
507
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
static {
|
|
511
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
512
|
+
minVersion: "12.0.0",
|
|
513
|
+
version: "22.2.4",
|
|
514
|
+
ngImport: i0,
|
|
515
|
+
type: DaffCustomerEffects
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
520
|
+
minVersion: "12.0.0",
|
|
521
|
+
version: "22.2.4",
|
|
522
|
+
ngImport: i0,
|
|
523
|
+
type: DaffCustomerEffects,
|
|
524
|
+
decorators: [{ type: Injectable }],
|
|
525
|
+
ctorParameters: () => [
|
|
526
|
+
{ type: i1.Actions },
|
|
527
|
+
{
|
|
528
|
+
type: void 0,
|
|
529
|
+
decorators: [{
|
|
530
|
+
type: Inject,
|
|
531
|
+
args: [DaffCustomerDriver]
|
|
532
|
+
}]
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
type: void 0,
|
|
536
|
+
decorators: [{
|
|
537
|
+
type: Inject,
|
|
538
|
+
args: [DAFF_CUSTOMER_ERROR_MATCHER]
|
|
539
|
+
}]
|
|
540
|
+
}
|
|
541
|
+
]
|
|
542
|
+
});
|
|
543
|
+
const { token: DAFF_CUSTOMER_REDUCERS, provider: provideDaffCustomerReducers, factoryProvider: provideDaffCustomerReducersFactory } = createSingleInjectionToken("DAFF_CUSTOMER_REDUCERS");
|
|
544
|
+
var DaffCustomerStateModule = class DaffCustomerStateModule {
|
|
545
|
+
static {
|
|
546
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
547
|
+
minVersion: "12.0.0",
|
|
548
|
+
version: "22.2.4",
|
|
549
|
+
ngImport: i0,
|
|
550
|
+
type: DaffCustomerStateModule,
|
|
551
|
+
deps: [],
|
|
552
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
static {
|
|
556
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
557
|
+
minVersion: "14.0.0",
|
|
558
|
+
version: "22.2.4",
|
|
559
|
+
ngImport: i0,
|
|
560
|
+
type: DaffCustomerStateModule,
|
|
561
|
+
imports: [i1$1.StoreFeatureModule, i1.EffectsFeatureModule]
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
static {
|
|
565
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
566
|
+
minVersion: "12.0.0",
|
|
567
|
+
version: "22.2.4",
|
|
568
|
+
ngImport: i0,
|
|
569
|
+
type: DaffCustomerStateModule,
|
|
570
|
+
providers: [provideDaffCustomerReducersFactory((() => daffComposeReducers([combineReducers({
|
|
571
|
+
customer: daffCustomerReducer,
|
|
572
|
+
address: daffCustomerAddressReducer,
|
|
573
|
+
addressEntities: daffCustomerAddressEntitiesReducer
|
|
574
|
+
}), ...inject(DAFF_CUSTOMER_EXTRA_REDUCERS)])))],
|
|
575
|
+
imports: [StoreModule.forFeature(DAFF_CUSTOMER_STORE_FEATURE_KEY, DAFF_CUSTOMER_REDUCERS), EffectsModule.forFeature([DaffCustomerEffects, DaffCustomerAddressEffects])]
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
580
|
+
minVersion: "12.0.0",
|
|
581
|
+
version: "22.2.4",
|
|
582
|
+
ngImport: i0,
|
|
583
|
+
type: DaffCustomerStateModule,
|
|
584
|
+
decorators: [{
|
|
585
|
+
type: NgModule,
|
|
586
|
+
args: [{
|
|
587
|
+
imports: [StoreModule.forFeature(DAFF_CUSTOMER_STORE_FEATURE_KEY, DAFF_CUSTOMER_REDUCERS), EffectsModule.forFeature([DaffCustomerEffects, DaffCustomerAddressEffects])],
|
|
588
|
+
providers: [provideDaffCustomerReducersFactory((() => daffComposeReducers([combineReducers({
|
|
589
|
+
customer: daffCustomerReducer,
|
|
590
|
+
address: daffCustomerAddressReducer,
|
|
591
|
+
addressEntities: daffCustomerAddressEntitiesReducer
|
|
592
|
+
}), ...inject(DAFF_CUSTOMER_EXTRA_REDUCERS)])))]
|
|
593
|
+
}]
|
|
594
|
+
}]
|
|
595
|
+
});
|
|
596
|
+
const provideDaffCustomerState = () => makeEnvironmentProviders([
|
|
597
|
+
provideState(DAFF_CUSTOMER_STORE_FEATURE_KEY, DAFF_CUSTOMER_REDUCERS),
|
|
598
|
+
provideEffects(DaffCustomerEffects, DaffCustomerAddressEffects),
|
|
599
|
+
provideDaffCustomerReducersFactory(() => daffComposeReducers([combineReducers({
|
|
600
|
+
customer: daffCustomerReducer,
|
|
601
|
+
address: daffCustomerAddressReducer,
|
|
602
|
+
addressEntities: daffCustomerAddressEntitiesReducer
|
|
603
|
+
}), ...inject(DAFF_CUSTOMER_EXTRA_REDUCERS)]))
|
|
604
|
+
]);
|
|
605
|
+
export { DAFF_CUSTOMER_ERROR_MATCHER, DAFF_CUSTOMER_EXTRA_REDUCERS, DAFF_CUSTOMER_STORE_FEATURE_KEY, DaffCustomerActionTypes, DaffCustomerAddressActionTypes, DaffCustomerAddressAdd, DaffCustomerAddressAddFailure, DaffCustomerAddressAddSuccess, DaffCustomerAddressDelete, DaffCustomerAddressDeleteFailure, DaffCustomerAddressDeleteSuccess, DaffCustomerAddressList, DaffCustomerAddressListFailure, DaffCustomerAddressListSuccess, DaffCustomerAddressLoad, DaffCustomerAddressLoadFailure, DaffCustomerAddressLoadSuccess, DaffCustomerAddressPageFacade, DaffCustomerAddressUpdate, DaffCustomerAddressUpdateFailure, DaffCustomerAddressUpdateSuccess, DaffCustomerChangeEmail, DaffCustomerChangeEmailFailure, DaffCustomerChangeEmailSuccess, DaffCustomerChangePassword, DaffCustomerChangePasswordFailure, DaffCustomerChangePasswordSuccess, DaffCustomerClearErrors, DaffCustomerLoad, DaffCustomerLoadFailure, DaffCustomerLoadSuccess, DaffCustomerPageFacade, DaffCustomerStateModule, DaffCustomerUpdate, DaffCustomerUpdateFailure, DaffCustomerUpdateSuccess, daffCustomerAddressEntitiesAdapter, daffCustomerAddressEntitiesReducer, daffCustomerAddressGetSelectors, daffCustomerAddressInitialState, daffCustomerAddressReducer, daffCustomerGetSelectors, daffCustomerInitialState, daffCustomerProvideExtraReducers, daffCustomerReducer, daffCustomerStateStoreCustomer, getDaffCustomerReducersStateSelector, provideDaffCustomerErrorMatcher, provideDaffCustomerState };
|
|
713
606
|
|
|
714
|
-
|
|
715
|
-
* Creates the customer feature store.
|
|
716
|
-
*/
|
|
717
|
-
class DaffCustomerStateModule {
|
|
718
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
719
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] }); }
|
|
720
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateModule, imports: [StoreModule.forFeature(DAFF_CUSTOMER_STORE_FEATURE_KEY, DAFF_CUSTOMER_REDUCERS),
|
|
721
|
-
EffectsModule.forFeature([
|
|
722
|
-
DaffCustomerEffects,
|
|
723
|
-
DaffCustomerAddressEffects,
|
|
724
|
-
])] }); }
|
|
725
|
-
}
|
|
726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateModule, decorators: [{
|
|
727
|
-
type: NgModule,
|
|
728
|
-
args: [{
|
|
729
|
-
imports: [
|
|
730
|
-
StoreModule.forFeature(DAFF_CUSTOMER_STORE_FEATURE_KEY, DAFF_CUSTOMER_REDUCERS),
|
|
731
|
-
EffectsModule.forFeature([
|
|
732
|
-
DaffCustomerEffects,
|
|
733
|
-
DaffCustomerAddressEffects,
|
|
734
|
-
]),
|
|
735
|
-
],
|
|
736
|
-
}]
|
|
737
|
-
}] });
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* Generated bundle index. Do not edit.
|
|
741
|
-
*/
|
|
742
|
-
|
|
743
|
-
export { DAFF_CUSTOMER_ERROR_MATCHER, DAFF_CUSTOMER_EXTRA_REDUCERS, DAFF_CUSTOMER_STORE_FEATURE_KEY, DaffCustomerActionTypes, DaffCustomerAddressActionTypes, DaffCustomerAddressAdd, DaffCustomerAddressAddFailure, DaffCustomerAddressAddSuccess, DaffCustomerAddressDelete, DaffCustomerAddressDeleteFailure, DaffCustomerAddressDeleteSuccess, DaffCustomerAddressList, DaffCustomerAddressListFailure, DaffCustomerAddressListSuccess, DaffCustomerAddressLoad, DaffCustomerAddressLoadFailure, DaffCustomerAddressLoadSuccess, DaffCustomerAddressPageFacade, DaffCustomerAddressUpdate, DaffCustomerAddressUpdateFailure, DaffCustomerAddressUpdateSuccess, DaffCustomerChangeEmail, DaffCustomerChangeEmailFailure, DaffCustomerChangeEmailSuccess, DaffCustomerChangePassword, DaffCustomerChangePasswordFailure, DaffCustomerChangePasswordSuccess, DaffCustomerClearErrors, DaffCustomerLoad, DaffCustomerLoadFailure, DaffCustomerLoadSuccess, DaffCustomerPageFacade, DaffCustomerStateModule, DaffCustomerUpdate, DaffCustomerUpdateFailure, DaffCustomerUpdateSuccess, daffCustomerAddressEntitiesAdapter, daffCustomerAddressEntitiesReducer, daffCustomerAddressGetSelectors, daffCustomerAddressInitialState, daffCustomerAddressReducer, daffCustomerGetSelectors, daffCustomerInitialState, daffCustomerProvideExtraReducers, daffCustomerReducer, daffCustomerStateStoreCustomer, getDaffCustomerReducersStateSelector, provideDaffCustomerErrorMatcher };
|
|
744
|
-
//# sourceMappingURL=daffodil-customer-state.mjs.map
|
|
607
|
+
//# sourceMappingURL=daffodil-customer-state.mjs.map
|