@daffodil/cart 0.94.1 → 0.95.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/fesm2022/daffodil-cart-driver-in-memory.mjs +1618 -1198
- package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento-2.4.7-testing.mjs +546 -0
- package/fesm2022/daffodil-cart-driver-magento-2.4.7-testing.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-magento-2.4.7.mjs +2607 -0
- package/fesm2022/daffodil-cart-driver-magento-2.4.7.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-magento-auto-testing.mjs +7 -0
- package/fesm2022/daffodil-cart-driver-magento-auto-testing.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-magento-auto.mjs +7 -0
- package/fesm2022/daffodil-cart-driver-magento-auto.mjs.map +1 -0
- package/fesm2022/daffodil-cart-driver-testing.mjs +553 -335
- package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver.mjs +167 -292
- package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
- package/fesm2022/daffodil-cart-routing.mjs +741 -542
- package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state-testing.mjs +288 -193
- package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state.mjs +2571 -2800
- package/fesm2022/daffodil-cart-state.mjs.map +1 -1
- package/fesm2022/daffodil-cart-testing.mjs +542 -357
- package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart.mjs +131 -200
- package/fesm2022/daffodil-cart.mjs.map +1 -1
- package/package.json +1 -1
- package/types/daffodil-cart-driver-in-memory.d.ts +273 -292
- package/types/daffodil-cart-driver-magento-2.4.7-testing.d.ts +176 -0
- package/types/daffodil-cart-driver-magento-2.4.7.d.ts +860 -0
- package/types/daffodil-cart-driver-magento-auto-testing.d.ts +1 -0
- package/types/daffodil-cart-driver-magento-auto.d.ts +1 -0
- package/types/daffodil-cart-driver-testing.d.ts +111 -118
- package/types/daffodil-cart-driver.d.ts +219 -262
- package/types/daffodil-cart-routing.d.ts +130 -149
- package/types/daffodil-cart-state-testing.d.ts +115 -114
- package/types/daffodil-cart-state.d.ts +1126 -1173
- package/types/daffodil-cart-testing.d.ts +146 -158
- package/types/daffodil-cart.d.ts +302 -321
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs +0 -332
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +0 -1
- package/fesm2022/daffodil-cart-driver-magento.mjs +0 -2273
- package/fesm2022/daffodil-cart-driver-magento.mjs.map +0 -1
- package/types/daffodil-cart-driver-magento-testing.d.ts +0 -188
- package/types/daffodil-cart-driver-magento.d.ts +0 -999
|
@@ -1,336 +1,554 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Injectable, NgModule } from
|
|
3
|
-
import { of } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { faker } from
|
|
6
|
-
import { CommonModule } from
|
|
7
|
-
import {
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, NgModule, makeEnvironmentProviders } from "@angular/core";
|
|
3
|
+
import { of } from "rxjs";
|
|
4
|
+
import * as i1 from "@daffodil/cart/testing";
|
|
5
|
+
import { faker } from "@faker-js/faker/locale/en_US";
|
|
6
|
+
import { CommonModule } from "@angular/common";
|
|
7
|
+
import { provideDaffCartAddressDriver, provideDaffCartBillingAddressDriver, provideDaffCartCouponDriver, provideDaffCartDriver, provideDaffCartItemDriver, provideDaffCartOrderDriver, provideDaffCartPaymentDriver, provideDaffCartPaymentMethodsDriver, provideDaffCartShippingAddressDriver, provideDaffCartShippingInformationDriver, provideDaffCartShippingMethodsDriver } from "@daffodil/cart/driver";
|
|
8
|
+
var DaffTestingCartService = class DaffTestingCartService {
|
|
9
|
+
constructor(cartFactory) {
|
|
10
|
+
this.cartFactory = cartFactory;
|
|
11
|
+
}
|
|
12
|
+
get(id) {
|
|
13
|
+
return of({
|
|
14
|
+
response: this.cartFactory.create(),
|
|
15
|
+
errors: []
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
addToCart(productId, qty) {
|
|
19
|
+
return of(this.cartFactory.create());
|
|
20
|
+
}
|
|
21
|
+
clear(id) {
|
|
22
|
+
return of(this.cartFactory.create());
|
|
23
|
+
}
|
|
24
|
+
create() {
|
|
25
|
+
return of({ id: this.cartFactory.create().id });
|
|
26
|
+
}
|
|
27
|
+
merge(guestCart, customerCart) {
|
|
28
|
+
return of({
|
|
29
|
+
response: this.cartFactory.create(),
|
|
30
|
+
errors: []
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
static {
|
|
34
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
35
|
+
minVersion: "12.0.0",
|
|
36
|
+
version: "22.2.4",
|
|
37
|
+
ngImport: i0,
|
|
38
|
+
type: DaffTestingCartService,
|
|
39
|
+
deps: [{ token: i1.DaffCartFactory }],
|
|
40
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
static {
|
|
44
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
45
|
+
minVersion: "12.0.0",
|
|
46
|
+
version: "22.2.4",
|
|
47
|
+
ngImport: i0,
|
|
48
|
+
type: DaffTestingCartService,
|
|
49
|
+
providedIn: "root"
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.4",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: DaffTestingCartService,
|
|
58
|
+
decorators: [{
|
|
59
|
+
type: Injectable,
|
|
60
|
+
args: [{ providedIn: "root" }]
|
|
61
|
+
}],
|
|
62
|
+
ctorParameters: () => [{ type: i1.DaffCartFactory }]
|
|
63
|
+
});
|
|
64
|
+
var DaffTestingCartItemService = class DaffTestingCartItemService {
|
|
65
|
+
constructor(cartItemFactory, cartFactory) {
|
|
66
|
+
this.cartItemFactory = cartItemFactory;
|
|
67
|
+
this.cartFactory = cartFactory;
|
|
68
|
+
}
|
|
69
|
+
list(cartId) {
|
|
70
|
+
return of(this.cartItemFactory.createMany(3));
|
|
71
|
+
}
|
|
72
|
+
get(cartId, itemId) {
|
|
73
|
+
return of(this.cartItemFactory.create());
|
|
74
|
+
}
|
|
75
|
+
add(cartId, input) {
|
|
76
|
+
return of(this.cartFactory.create());
|
|
77
|
+
}
|
|
78
|
+
update(cartId, itemId, item) {
|
|
79
|
+
return of(this.cartFactory.create());
|
|
80
|
+
}
|
|
81
|
+
delete(cartId, itemId) {
|
|
82
|
+
return of(this.cartFactory.create());
|
|
83
|
+
}
|
|
84
|
+
static {
|
|
85
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
86
|
+
minVersion: "12.0.0",
|
|
87
|
+
version: "22.2.4",
|
|
88
|
+
ngImport: i0,
|
|
89
|
+
type: DaffTestingCartItemService,
|
|
90
|
+
deps: [{ token: i1.DaffCartItemFactory }, { token: i1.DaffCartFactory }],
|
|
91
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
static {
|
|
95
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
96
|
+
minVersion: "12.0.0",
|
|
97
|
+
version: "22.2.4",
|
|
98
|
+
ngImport: i0,
|
|
99
|
+
type: DaffTestingCartItemService,
|
|
100
|
+
providedIn: "root"
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
105
|
+
minVersion: "12.0.0",
|
|
106
|
+
version: "22.2.4",
|
|
107
|
+
ngImport: i0,
|
|
108
|
+
type: DaffTestingCartItemService,
|
|
109
|
+
decorators: [{
|
|
110
|
+
type: Injectable,
|
|
111
|
+
args: [{ providedIn: "root" }]
|
|
112
|
+
}],
|
|
113
|
+
ctorParameters: () => [{ type: i1.DaffCartItemFactory }, { type: i1.DaffCartFactory }]
|
|
114
|
+
});
|
|
115
|
+
var DaffTestingCartAddressService = class DaffTestingCartAddressService {
|
|
116
|
+
constructor(addressFactory, cartFactory) {
|
|
117
|
+
this.addressFactory = addressFactory;
|
|
118
|
+
this.cartFactory = cartFactory;
|
|
119
|
+
}
|
|
120
|
+
update(cartId, address) {
|
|
121
|
+
return of(this.cartFactory.create());
|
|
122
|
+
}
|
|
123
|
+
static {
|
|
124
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.2.4",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: DaffTestingCartAddressService,
|
|
129
|
+
deps: [{ token: i1.DaffCartAddressFactory }, { token: i1.DaffCartFactory }],
|
|
130
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
static {
|
|
134
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
135
|
+
minVersion: "12.0.0",
|
|
136
|
+
version: "22.2.4",
|
|
137
|
+
ngImport: i0,
|
|
138
|
+
type: DaffTestingCartAddressService,
|
|
139
|
+
providedIn: "root"
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
144
|
+
minVersion: "12.0.0",
|
|
145
|
+
version: "22.2.4",
|
|
146
|
+
ngImport: i0,
|
|
147
|
+
type: DaffTestingCartAddressService,
|
|
148
|
+
decorators: [{
|
|
149
|
+
type: Injectable,
|
|
150
|
+
args: [{ providedIn: "root" }]
|
|
151
|
+
}],
|
|
152
|
+
ctorParameters: () => [{ type: i1.DaffCartAddressFactory }, { type: i1.DaffCartFactory }]
|
|
153
|
+
});
|
|
154
|
+
var DaffTestingCartBillingAddressService = class DaffTestingCartBillingAddressService {
|
|
155
|
+
constructor(addressFactory, cartFactory) {
|
|
156
|
+
this.addressFactory = addressFactory;
|
|
157
|
+
this.cartFactory = cartFactory;
|
|
158
|
+
}
|
|
159
|
+
get(cartId) {
|
|
160
|
+
return of(this.addressFactory.create());
|
|
161
|
+
}
|
|
162
|
+
update(cartId, address) {
|
|
163
|
+
return of(this.cartFactory.create());
|
|
164
|
+
}
|
|
165
|
+
static {
|
|
166
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
167
|
+
minVersion: "12.0.0",
|
|
168
|
+
version: "22.2.4",
|
|
169
|
+
ngImport: i0,
|
|
170
|
+
type: DaffTestingCartBillingAddressService,
|
|
171
|
+
deps: [{ token: i1.DaffCartAddressFactory }, { token: i1.DaffCartFactory }],
|
|
172
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
static {
|
|
176
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
177
|
+
minVersion: "12.0.0",
|
|
178
|
+
version: "22.2.4",
|
|
179
|
+
ngImport: i0,
|
|
180
|
+
type: DaffTestingCartBillingAddressService,
|
|
181
|
+
providedIn: "root"
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
186
|
+
minVersion: "12.0.0",
|
|
187
|
+
version: "22.2.4",
|
|
188
|
+
ngImport: i0,
|
|
189
|
+
type: DaffTestingCartBillingAddressService,
|
|
190
|
+
decorators: [{
|
|
191
|
+
type: Injectable,
|
|
192
|
+
args: [{ providedIn: "root" }]
|
|
193
|
+
}],
|
|
194
|
+
ctorParameters: () => [{ type: i1.DaffCartAddressFactory }, { type: i1.DaffCartFactory }]
|
|
195
|
+
});
|
|
196
|
+
var DaffTestingCartPaymentService = class DaffTestingCartPaymentService {
|
|
197
|
+
constructor(paymentFactory, cartFactory) {
|
|
198
|
+
this.paymentFactory = paymentFactory;
|
|
199
|
+
this.cartFactory = cartFactory;
|
|
200
|
+
}
|
|
201
|
+
get(cartId) {
|
|
202
|
+
return of(this.paymentFactory.create());
|
|
203
|
+
}
|
|
204
|
+
update(cartId, payment) {
|
|
205
|
+
return of(this.cartFactory.create());
|
|
206
|
+
}
|
|
207
|
+
updateWithBilling(cartId, payment, address) {
|
|
208
|
+
return of(this.cartFactory.create());
|
|
209
|
+
}
|
|
210
|
+
remove(cartId) {
|
|
211
|
+
return of(void 0);
|
|
212
|
+
}
|
|
213
|
+
static {
|
|
214
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
215
|
+
minVersion: "12.0.0",
|
|
216
|
+
version: "22.2.4",
|
|
217
|
+
ngImport: i0,
|
|
218
|
+
type: DaffTestingCartPaymentService,
|
|
219
|
+
deps: [{ token: i1.DaffCartPaymentFactory }, { token: i1.DaffCartFactory }],
|
|
220
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
static {
|
|
224
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
225
|
+
minVersion: "12.0.0",
|
|
226
|
+
version: "22.2.4",
|
|
227
|
+
ngImport: i0,
|
|
228
|
+
type: DaffTestingCartPaymentService,
|
|
229
|
+
providedIn: "root"
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
234
|
+
minVersion: "12.0.0",
|
|
235
|
+
version: "22.2.4",
|
|
236
|
+
ngImport: i0,
|
|
237
|
+
type: DaffTestingCartPaymentService,
|
|
238
|
+
decorators: [{
|
|
239
|
+
type: Injectable,
|
|
240
|
+
args: [{ providedIn: "root" }]
|
|
241
|
+
}],
|
|
242
|
+
ctorParameters: () => [{ type: i1.DaffCartPaymentFactory }, { type: i1.DaffCartFactory }]
|
|
243
|
+
});
|
|
244
|
+
var DaffTestingCartPaymentMethodsService = class DaffTestingCartPaymentMethodsService {
|
|
245
|
+
constructor(paymentFactory) {
|
|
246
|
+
this.paymentFactory = paymentFactory;
|
|
247
|
+
}
|
|
248
|
+
list(cartId) {
|
|
249
|
+
return of(this.paymentFactory.createMany(3));
|
|
250
|
+
}
|
|
251
|
+
static {
|
|
252
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
253
|
+
minVersion: "12.0.0",
|
|
254
|
+
version: "22.2.4",
|
|
255
|
+
ngImport: i0,
|
|
256
|
+
type: DaffTestingCartPaymentMethodsService,
|
|
257
|
+
deps: [{ token: i1.DaffCartPaymentFactory }],
|
|
258
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
static {
|
|
262
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
263
|
+
minVersion: "12.0.0",
|
|
264
|
+
version: "22.2.4",
|
|
265
|
+
ngImport: i0,
|
|
266
|
+
type: DaffTestingCartPaymentMethodsService,
|
|
267
|
+
providedIn: "root"
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
272
|
+
minVersion: "12.0.0",
|
|
273
|
+
version: "22.2.4",
|
|
274
|
+
ngImport: i0,
|
|
275
|
+
type: DaffTestingCartPaymentMethodsService,
|
|
276
|
+
decorators: [{
|
|
277
|
+
type: Injectable,
|
|
278
|
+
args: [{ providedIn: "root" }]
|
|
279
|
+
}],
|
|
280
|
+
ctorParameters: () => [{ type: i1.DaffCartPaymentFactory }]
|
|
281
|
+
});
|
|
282
|
+
var DaffTestingCartShippingAddressService = class DaffTestingCartShippingAddressService {
|
|
283
|
+
constructor(addressFactory, cartFactory) {
|
|
284
|
+
this.addressFactory = addressFactory;
|
|
285
|
+
this.cartFactory = cartFactory;
|
|
286
|
+
}
|
|
287
|
+
get(cartId) {
|
|
288
|
+
return of(this.addressFactory.create());
|
|
289
|
+
}
|
|
290
|
+
update(cartId, address) {
|
|
291
|
+
return of(this.cartFactory.create());
|
|
292
|
+
}
|
|
293
|
+
static {
|
|
294
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
295
|
+
minVersion: "12.0.0",
|
|
296
|
+
version: "22.2.4",
|
|
297
|
+
ngImport: i0,
|
|
298
|
+
type: DaffTestingCartShippingAddressService,
|
|
299
|
+
deps: [{ token: i1.DaffCartAddressFactory }, { token: i1.DaffCartFactory }],
|
|
300
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
static {
|
|
304
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
305
|
+
minVersion: "12.0.0",
|
|
306
|
+
version: "22.2.4",
|
|
307
|
+
ngImport: i0,
|
|
308
|
+
type: DaffTestingCartShippingAddressService,
|
|
309
|
+
providedIn: "root"
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
314
|
+
minVersion: "12.0.0",
|
|
315
|
+
version: "22.2.4",
|
|
316
|
+
ngImport: i0,
|
|
317
|
+
type: DaffTestingCartShippingAddressService,
|
|
318
|
+
decorators: [{
|
|
319
|
+
type: Injectable,
|
|
320
|
+
args: [{ providedIn: "root" }]
|
|
321
|
+
}],
|
|
322
|
+
ctorParameters: () => [{ type: i1.DaffCartAddressFactory }, { type: i1.DaffCartFactory }]
|
|
323
|
+
});
|
|
324
|
+
var DaffTestingCartShippingInformationService = class DaffTestingCartShippingInformationService {
|
|
325
|
+
constructor(shippingInfoFactory, cartFactory) {
|
|
326
|
+
this.shippingInfoFactory = shippingInfoFactory;
|
|
327
|
+
this.cartFactory = cartFactory;
|
|
328
|
+
}
|
|
329
|
+
get(cartId) {
|
|
330
|
+
return of(this.shippingInfoFactory.create());
|
|
331
|
+
}
|
|
332
|
+
update(cartId, info) {
|
|
333
|
+
return of(this.cartFactory.create());
|
|
334
|
+
}
|
|
335
|
+
delete(cartId) {
|
|
336
|
+
return of(this.cartFactory.create());
|
|
337
|
+
}
|
|
338
|
+
static {
|
|
339
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
340
|
+
minVersion: "12.0.0",
|
|
341
|
+
version: "22.2.4",
|
|
342
|
+
ngImport: i0,
|
|
343
|
+
type: DaffTestingCartShippingInformationService,
|
|
344
|
+
deps: [{ token: i1.DaffCartShippingRateFactory }, { token: i1.DaffCartFactory }],
|
|
345
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
static {
|
|
349
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
350
|
+
minVersion: "12.0.0",
|
|
351
|
+
version: "22.2.4",
|
|
352
|
+
ngImport: i0,
|
|
353
|
+
type: DaffTestingCartShippingInformationService,
|
|
354
|
+
providedIn: "root"
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
359
|
+
minVersion: "12.0.0",
|
|
360
|
+
version: "22.2.4",
|
|
361
|
+
ngImport: i0,
|
|
362
|
+
type: DaffTestingCartShippingInformationService,
|
|
363
|
+
decorators: [{
|
|
364
|
+
type: Injectable,
|
|
365
|
+
args: [{ providedIn: "root" }]
|
|
366
|
+
}],
|
|
367
|
+
ctorParameters: () => [{ type: i1.DaffCartShippingRateFactory }, { type: i1.DaffCartFactory }]
|
|
368
|
+
});
|
|
369
|
+
var DaffTestingCartShippingMethodsService = class DaffTestingCartShippingMethodsService {
|
|
370
|
+
constructor(shippingInfoFactory) {
|
|
371
|
+
this.shippingInfoFactory = shippingInfoFactory;
|
|
372
|
+
}
|
|
373
|
+
list(cartId) {
|
|
374
|
+
return of(this.shippingInfoFactory.createMany(3));
|
|
375
|
+
}
|
|
376
|
+
static {
|
|
377
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
378
|
+
minVersion: "12.0.0",
|
|
379
|
+
version: "22.2.4",
|
|
380
|
+
ngImport: i0,
|
|
381
|
+
type: DaffTestingCartShippingMethodsService,
|
|
382
|
+
deps: [{ token: i1.DaffCartShippingRateFactory }],
|
|
383
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
static {
|
|
387
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
388
|
+
minVersion: "12.0.0",
|
|
389
|
+
version: "22.2.4",
|
|
390
|
+
ngImport: i0,
|
|
391
|
+
type: DaffTestingCartShippingMethodsService,
|
|
392
|
+
providedIn: "root"
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
397
|
+
minVersion: "12.0.0",
|
|
398
|
+
version: "22.2.4",
|
|
399
|
+
ngImport: i0,
|
|
400
|
+
type: DaffTestingCartShippingMethodsService,
|
|
401
|
+
decorators: [{
|
|
402
|
+
type: Injectable,
|
|
403
|
+
args: [{ providedIn: "root" }]
|
|
404
|
+
}],
|
|
405
|
+
ctorParameters: () => [{ type: i1.DaffCartShippingRateFactory }]
|
|
406
|
+
});
|
|
407
|
+
var DaffTestingCartOrderService = class DaffTestingCartOrderService {
|
|
408
|
+
placeOrder(cartId, payment) {
|
|
409
|
+
return of({
|
|
410
|
+
id: faker.string.uuid(),
|
|
411
|
+
orderId: faker.string.uuid(),
|
|
412
|
+
cartId
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
static {
|
|
416
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
417
|
+
minVersion: "12.0.0",
|
|
418
|
+
version: "22.2.4",
|
|
419
|
+
ngImport: i0,
|
|
420
|
+
type: DaffTestingCartOrderService,
|
|
421
|
+
deps: [],
|
|
422
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
static {
|
|
426
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
427
|
+
minVersion: "12.0.0",
|
|
428
|
+
version: "22.2.4",
|
|
429
|
+
ngImport: i0,
|
|
430
|
+
type: DaffTestingCartOrderService,
|
|
431
|
+
providedIn: "root"
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
436
|
+
minVersion: "12.0.0",
|
|
437
|
+
version: "22.2.4",
|
|
438
|
+
ngImport: i0,
|
|
439
|
+
type: DaffTestingCartOrderService,
|
|
440
|
+
decorators: [{
|
|
441
|
+
type: Injectable,
|
|
442
|
+
args: [{ providedIn: "root" }]
|
|
443
|
+
}]
|
|
444
|
+
});
|
|
445
|
+
var DaffTestingCartCouponService = class DaffTestingCartCouponService {
|
|
446
|
+
constructor(couponFactory, cartFactory) {
|
|
447
|
+
this.couponFactory = couponFactory;
|
|
448
|
+
this.cartFactory = cartFactory;
|
|
449
|
+
}
|
|
450
|
+
list(cartId) {
|
|
451
|
+
return of(this.couponFactory.createMany(3));
|
|
452
|
+
}
|
|
453
|
+
apply(cartId, coupon) {
|
|
454
|
+
return of(this.cartFactory.create());
|
|
455
|
+
}
|
|
456
|
+
remove(cartId, coupon) {
|
|
457
|
+
return of(this.cartFactory.create());
|
|
458
|
+
}
|
|
459
|
+
removeAll(cartId) {
|
|
460
|
+
return of(this.cartFactory.create());
|
|
461
|
+
}
|
|
462
|
+
static {
|
|
463
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
464
|
+
minVersion: "12.0.0",
|
|
465
|
+
version: "22.2.4",
|
|
466
|
+
ngImport: i0,
|
|
467
|
+
type: DaffTestingCartCouponService,
|
|
468
|
+
deps: [{ token: i1.DaffCartCouponFactory }, { token: i1.DaffCartFactory }],
|
|
469
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
static {
|
|
473
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
474
|
+
minVersion: "12.0.0",
|
|
475
|
+
version: "22.2.4",
|
|
476
|
+
ngImport: i0,
|
|
477
|
+
type: DaffTestingCartCouponService,
|
|
478
|
+
providedIn: "root"
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
483
|
+
minVersion: "12.0.0",
|
|
484
|
+
version: "22.2.4",
|
|
485
|
+
ngImport: i0,
|
|
486
|
+
type: DaffTestingCartCouponService,
|
|
487
|
+
decorators: [{
|
|
488
|
+
type: Injectable,
|
|
489
|
+
args: [{ providedIn: "root" }]
|
|
490
|
+
}],
|
|
491
|
+
ctorParameters: () => [{ type: i1.DaffCartCouponFactory }, { type: i1.DaffCartFactory }]
|
|
492
|
+
});
|
|
493
|
+
const provideDaffCartTestingDriver = () => makeEnvironmentProviders([
|
|
494
|
+
provideDaffCartDriver(DaffTestingCartService),
|
|
495
|
+
provideDaffCartItemDriver(DaffTestingCartItemService),
|
|
496
|
+
provideDaffCartAddressDriver(DaffTestingCartAddressService),
|
|
497
|
+
provideDaffCartBillingAddressDriver(DaffTestingCartBillingAddressService),
|
|
498
|
+
provideDaffCartShippingAddressDriver(DaffTestingCartShippingAddressService),
|
|
499
|
+
provideDaffCartCouponDriver(DaffTestingCartCouponService),
|
|
500
|
+
provideDaffCartOrderDriver(DaffTestingCartOrderService),
|
|
501
|
+
provideDaffCartPaymentDriver(DaffTestingCartPaymentService),
|
|
502
|
+
provideDaffCartShippingInformationDriver(DaffTestingCartShippingInformationService),
|
|
503
|
+
provideDaffCartShippingMethodsDriver(DaffTestingCartShippingMethodsService),
|
|
504
|
+
provideDaffCartPaymentMethodsDriver(DaffTestingCartPaymentMethodsService)
|
|
505
|
+
]);
|
|
506
|
+
var DaffTestingCartDriverModule = class DaffTestingCartDriverModule {
|
|
507
|
+
static forRoot() {
|
|
508
|
+
return {
|
|
509
|
+
ngModule: DaffTestingCartDriverModule,
|
|
510
|
+
providers: [provideDaffCartTestingDriver()]
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
static {
|
|
514
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
515
|
+
minVersion: "12.0.0",
|
|
516
|
+
version: "22.2.4",
|
|
517
|
+
ngImport: i0,
|
|
518
|
+
type: DaffTestingCartDriverModule,
|
|
519
|
+
deps: [],
|
|
520
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
static {
|
|
524
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
525
|
+
minVersion: "14.0.0",
|
|
526
|
+
version: "22.2.4",
|
|
527
|
+
ngImport: i0,
|
|
528
|
+
type: DaffTestingCartDriverModule,
|
|
529
|
+
imports: [CommonModule]
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
static {
|
|
533
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
534
|
+
minVersion: "12.0.0",
|
|
535
|
+
version: "22.2.4",
|
|
536
|
+
ngImport: i0,
|
|
537
|
+
type: DaffTestingCartDriverModule,
|
|
538
|
+
imports: [CommonModule]
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
543
|
+
minVersion: "12.0.0",
|
|
544
|
+
version: "22.2.4",
|
|
545
|
+
ngImport: i0,
|
|
546
|
+
type: DaffTestingCartDriverModule,
|
|
547
|
+
decorators: [{
|
|
548
|
+
type: NgModule,
|
|
549
|
+
args: [{ imports: [CommonModule] }]
|
|
550
|
+
}]
|
|
551
|
+
});
|
|
552
|
+
export { DaffTestingCartAddressService, DaffTestingCartBillingAddressService, DaffTestingCartCouponService, DaffTestingCartDriverModule, DaffTestingCartItemService, DaffTestingCartOrderService, DaffTestingCartPaymentMethodsService, DaffTestingCartPaymentService, DaffTestingCartService, DaffTestingCartShippingAddressService, DaffTestingCartShippingInformationService, DaffTestingCartShippingMethodsService, provideDaffCartTestingDriver };
|
|
8
553
|
|
|
9
|
-
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
class DaffTestingCartService {
|
|
13
|
-
constructor(cartFactory) {
|
|
14
|
-
this.cartFactory = cartFactory;
|
|
15
|
-
}
|
|
16
|
-
get(id) {
|
|
17
|
-
return of({
|
|
18
|
-
response: this.cartFactory.create(),
|
|
19
|
-
errors: [],
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
addToCart(productId, qty) {
|
|
23
|
-
return of(this.cartFactory.create());
|
|
24
|
-
}
|
|
25
|
-
clear(id) {
|
|
26
|
-
return of(this.cartFactory.create());
|
|
27
|
-
}
|
|
28
|
-
create() {
|
|
29
|
-
return of({
|
|
30
|
-
id: this.cartFactory.create().id,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
merge(guestCart, customerCart) {
|
|
34
|
-
return of({
|
|
35
|
-
response: this.cartFactory.create(),
|
|
36
|
-
errors: [],
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartService, deps: [{ token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
40
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartService, providedIn: 'root' }); }
|
|
41
|
-
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartService, decorators: [{
|
|
43
|
-
type: Injectable,
|
|
44
|
-
args: [{
|
|
45
|
-
providedIn: 'root',
|
|
46
|
-
}]
|
|
47
|
-
}], ctorParameters: () => [{ type: i1.DaffCartFactory }] });
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @inheritdoc
|
|
51
|
-
*/
|
|
52
|
-
class DaffTestingCartItemService {
|
|
53
|
-
constructor(cartItemFactory, cartFactory) {
|
|
54
|
-
this.cartItemFactory = cartItemFactory;
|
|
55
|
-
this.cartFactory = cartFactory;
|
|
56
|
-
}
|
|
57
|
-
list(cartId) {
|
|
58
|
-
return of(this.cartItemFactory.createMany(3));
|
|
59
|
-
}
|
|
60
|
-
get(cartId, itemId) {
|
|
61
|
-
return of(this.cartItemFactory.create());
|
|
62
|
-
}
|
|
63
|
-
add(cartId, input) {
|
|
64
|
-
return of(this.cartFactory.create());
|
|
65
|
-
}
|
|
66
|
-
update(cartId, itemId, item) {
|
|
67
|
-
return of(this.cartFactory.create());
|
|
68
|
-
}
|
|
69
|
-
delete(cartId, itemId) {
|
|
70
|
-
return of(this.cartFactory.create());
|
|
71
|
-
}
|
|
72
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartItemService, deps: [{ token: i1.DaffCartItemFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
73
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartItemService, providedIn: 'root' }); }
|
|
74
|
-
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartItemService, decorators: [{
|
|
76
|
-
type: Injectable,
|
|
77
|
-
args: [{
|
|
78
|
-
providedIn: 'root',
|
|
79
|
-
}]
|
|
80
|
-
}], ctorParameters: () => [{ type: i1.DaffCartItemFactory }, { type: i1.DaffCartFactory }] });
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @inheritdoc
|
|
84
|
-
*/
|
|
85
|
-
class DaffTestingCartAddressService {
|
|
86
|
-
constructor(addressFactory, cartFactory) {
|
|
87
|
-
this.addressFactory = addressFactory;
|
|
88
|
-
this.cartFactory = cartFactory;
|
|
89
|
-
}
|
|
90
|
-
update(cartId, address) {
|
|
91
|
-
return of(this.cartFactory.create());
|
|
92
|
-
}
|
|
93
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartAddressService, deps: [{ token: i1.DaffCartAddressFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
94
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartAddressService, providedIn: 'root' }); }
|
|
95
|
-
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartAddressService, decorators: [{
|
|
97
|
-
type: Injectable,
|
|
98
|
-
args: [{
|
|
99
|
-
providedIn: 'root',
|
|
100
|
-
}]
|
|
101
|
-
}], ctorParameters: () => [{ type: i1.DaffCartAddressFactory }, { type: i1.DaffCartFactory }] });
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @inheritdoc
|
|
105
|
-
*/
|
|
106
|
-
class DaffTestingCartBillingAddressService {
|
|
107
|
-
constructor(addressFactory, cartFactory) {
|
|
108
|
-
this.addressFactory = addressFactory;
|
|
109
|
-
this.cartFactory = cartFactory;
|
|
110
|
-
}
|
|
111
|
-
get(cartId) {
|
|
112
|
-
return of(this.addressFactory.create());
|
|
113
|
-
}
|
|
114
|
-
update(cartId, address) {
|
|
115
|
-
return of(this.cartFactory.create());
|
|
116
|
-
}
|
|
117
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartBillingAddressService, deps: [{ token: i1.DaffCartAddressFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
118
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartBillingAddressService, providedIn: 'root' }); }
|
|
119
|
-
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartBillingAddressService, decorators: [{
|
|
121
|
-
type: Injectable,
|
|
122
|
-
args: [{
|
|
123
|
-
providedIn: 'root',
|
|
124
|
-
}]
|
|
125
|
-
}], ctorParameters: () => [{ type: i1.DaffCartAddressFactory }, { type: i1.DaffCartFactory }] });
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @inheritdoc
|
|
129
|
-
*/
|
|
130
|
-
class DaffTestingCartPaymentService {
|
|
131
|
-
constructor(paymentFactory, cartFactory) {
|
|
132
|
-
this.paymentFactory = paymentFactory;
|
|
133
|
-
this.cartFactory = cartFactory;
|
|
134
|
-
}
|
|
135
|
-
get(cartId) {
|
|
136
|
-
return of(this.paymentFactory.create());
|
|
137
|
-
}
|
|
138
|
-
update(cartId, payment) {
|
|
139
|
-
return of(this.cartFactory.create());
|
|
140
|
-
}
|
|
141
|
-
updateWithBilling(cartId, payment, address) {
|
|
142
|
-
return of(this.cartFactory.create());
|
|
143
|
-
}
|
|
144
|
-
remove(cartId) {
|
|
145
|
-
return of(undefined);
|
|
146
|
-
}
|
|
147
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartPaymentService, deps: [{ token: i1.DaffCartPaymentFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
148
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartPaymentService, providedIn: 'root' }); }
|
|
149
|
-
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartPaymentService, decorators: [{
|
|
151
|
-
type: Injectable,
|
|
152
|
-
args: [{
|
|
153
|
-
providedIn: 'root',
|
|
154
|
-
}]
|
|
155
|
-
}], ctorParameters: () => [{ type: i1.DaffCartPaymentFactory }, { type: i1.DaffCartFactory }] });
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* @inheritdoc
|
|
159
|
-
*/
|
|
160
|
-
class DaffTestingCartPaymentMethodsService {
|
|
161
|
-
constructor(paymentFactory) {
|
|
162
|
-
this.paymentFactory = paymentFactory;
|
|
163
|
-
}
|
|
164
|
-
list(cartId) {
|
|
165
|
-
return of(this.paymentFactory.createMany(3));
|
|
166
|
-
}
|
|
167
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartPaymentMethodsService, deps: [{ token: i1.DaffCartPaymentFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
168
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartPaymentMethodsService, providedIn: 'root' }); }
|
|
169
|
-
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartPaymentMethodsService, decorators: [{
|
|
171
|
-
type: Injectable,
|
|
172
|
-
args: [{
|
|
173
|
-
providedIn: 'root',
|
|
174
|
-
}]
|
|
175
|
-
}], ctorParameters: () => [{ type: i1.DaffCartPaymentFactory }] });
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* @inheritdoc
|
|
179
|
-
*/
|
|
180
|
-
class DaffTestingCartShippingAddressService {
|
|
181
|
-
constructor(addressFactory, cartFactory) {
|
|
182
|
-
this.addressFactory = addressFactory;
|
|
183
|
-
this.cartFactory = cartFactory;
|
|
184
|
-
}
|
|
185
|
-
get(cartId) {
|
|
186
|
-
return of(this.addressFactory.create());
|
|
187
|
-
}
|
|
188
|
-
update(cartId, address) {
|
|
189
|
-
return of(this.cartFactory.create());
|
|
190
|
-
}
|
|
191
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingAddressService, deps: [{ token: i1.DaffCartAddressFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
192
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingAddressService, providedIn: 'root' }); }
|
|
193
|
-
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingAddressService, decorators: [{
|
|
195
|
-
type: Injectable,
|
|
196
|
-
args: [{
|
|
197
|
-
providedIn: 'root',
|
|
198
|
-
}]
|
|
199
|
-
}], ctorParameters: () => [{ type: i1.DaffCartAddressFactory }, { type: i1.DaffCartFactory }] });
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* @inheritdoc
|
|
203
|
-
*/
|
|
204
|
-
class DaffTestingCartShippingInformationService {
|
|
205
|
-
constructor(shippingInfoFactory, cartFactory) {
|
|
206
|
-
this.shippingInfoFactory = shippingInfoFactory;
|
|
207
|
-
this.cartFactory = cartFactory;
|
|
208
|
-
}
|
|
209
|
-
get(cartId) {
|
|
210
|
-
return of(this.shippingInfoFactory.create());
|
|
211
|
-
}
|
|
212
|
-
update(cartId, info) {
|
|
213
|
-
return of(this.cartFactory.create());
|
|
214
|
-
}
|
|
215
|
-
delete(cartId) {
|
|
216
|
-
return of(this.cartFactory.create());
|
|
217
|
-
}
|
|
218
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingInformationService, deps: [{ token: i1.DaffCartShippingRateFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
219
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingInformationService, providedIn: 'root' }); }
|
|
220
|
-
}
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingInformationService, decorators: [{
|
|
222
|
-
type: Injectable,
|
|
223
|
-
args: [{
|
|
224
|
-
providedIn: 'root',
|
|
225
|
-
}]
|
|
226
|
-
}], ctorParameters: () => [{ type: i1.DaffCartShippingRateFactory }, { type: i1.DaffCartFactory }] });
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* @inheritdoc
|
|
230
|
-
*/
|
|
231
|
-
class DaffTestingCartShippingMethodsService {
|
|
232
|
-
constructor(shippingInfoFactory) {
|
|
233
|
-
this.shippingInfoFactory = shippingInfoFactory;
|
|
234
|
-
}
|
|
235
|
-
list(cartId) {
|
|
236
|
-
return of(this.shippingInfoFactory.createMany(3));
|
|
237
|
-
}
|
|
238
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingMethodsService, deps: [{ token: i1.DaffCartShippingRateFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
239
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingMethodsService, providedIn: 'root' }); }
|
|
240
|
-
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartShippingMethodsService, decorators: [{
|
|
242
|
-
type: Injectable,
|
|
243
|
-
args: [{
|
|
244
|
-
providedIn: 'root',
|
|
245
|
-
}]
|
|
246
|
-
}], ctorParameters: () => [{ type: i1.DaffCartShippingRateFactory }] });
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @inheritdoc
|
|
250
|
-
*/
|
|
251
|
-
class DaffTestingCartOrderService {
|
|
252
|
-
placeOrder(cartId, payment) {
|
|
253
|
-
return of({
|
|
254
|
-
id: faker.string.uuid(),
|
|
255
|
-
orderId: faker.string.uuid(),
|
|
256
|
-
cartId,
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartOrderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
260
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartOrderService, providedIn: 'root' }); }
|
|
261
|
-
}
|
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartOrderService, decorators: [{
|
|
263
|
-
type: Injectable,
|
|
264
|
-
args: [{
|
|
265
|
-
providedIn: 'root',
|
|
266
|
-
}]
|
|
267
|
-
}] });
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* @inheritdoc
|
|
271
|
-
*/
|
|
272
|
-
class DaffTestingCartCouponService {
|
|
273
|
-
constructor(couponFactory, cartFactory) {
|
|
274
|
-
this.couponFactory = couponFactory;
|
|
275
|
-
this.cartFactory = cartFactory;
|
|
276
|
-
}
|
|
277
|
-
list(cartId) {
|
|
278
|
-
return of(this.couponFactory.createMany(3));
|
|
279
|
-
}
|
|
280
|
-
apply(cartId, coupon) {
|
|
281
|
-
return of(this.cartFactory.create());
|
|
282
|
-
}
|
|
283
|
-
remove(cartId, coupon) {
|
|
284
|
-
return of(this.cartFactory.create());
|
|
285
|
-
}
|
|
286
|
-
removeAll(cartId) {
|
|
287
|
-
return of(this.cartFactory.create());
|
|
288
|
-
}
|
|
289
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartCouponService, deps: [{ token: i1.DaffCartCouponFactory }, { token: i1.DaffCartFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
290
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartCouponService, providedIn: 'root' }); }
|
|
291
|
-
}
|
|
292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartCouponService, decorators: [{
|
|
293
|
-
type: Injectable,
|
|
294
|
-
args: [{
|
|
295
|
-
providedIn: 'root',
|
|
296
|
-
}]
|
|
297
|
-
}], ctorParameters: () => [{ type: i1.DaffCartCouponFactory }, { type: i1.DaffCartFactory }] });
|
|
298
|
-
|
|
299
|
-
class DaffTestingCartDriverModule {
|
|
300
|
-
static forRoot() {
|
|
301
|
-
return {
|
|
302
|
-
ngModule: DaffTestingCartDriverModule,
|
|
303
|
-
providers: [
|
|
304
|
-
provideDaffCartDriver(DaffTestingCartService),
|
|
305
|
-
provideDaffCartItemDriver(DaffTestingCartItemService),
|
|
306
|
-
provideDaffCartAddressDriver(DaffTestingCartAddressService),
|
|
307
|
-
provideDaffCartBillingAddressDriver(DaffTestingCartBillingAddressService),
|
|
308
|
-
provideDaffCartShippingAddressDriver(DaffTestingCartShippingAddressService),
|
|
309
|
-
provideDaffCartCouponDriver(DaffTestingCartCouponService),
|
|
310
|
-
provideDaffCartOrderDriver(DaffTestingCartOrderService),
|
|
311
|
-
provideDaffCartPaymentDriver(DaffTestingCartPaymentService),
|
|
312
|
-
provideDaffCartShippingInformationDriver(DaffTestingCartShippingInformationService),
|
|
313
|
-
provideDaffCartShippingMethodsDriver(DaffTestingCartShippingMethodsService),
|
|
314
|
-
provideDaffCartPaymentMethodsDriver(DaffTestingCartPaymentMethodsService),
|
|
315
|
-
],
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
319
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartDriverModule, imports: [CommonModule] }); }
|
|
320
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartDriverModule, imports: [CommonModule] }); }
|
|
321
|
-
}
|
|
322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTestingCartDriverModule, decorators: [{
|
|
323
|
-
type: NgModule,
|
|
324
|
-
args: [{
|
|
325
|
-
imports: [
|
|
326
|
-
CommonModule,
|
|
327
|
-
],
|
|
328
|
-
}]
|
|
329
|
-
}] });
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Generated bundle index. Do not edit.
|
|
333
|
-
*/
|
|
334
|
-
|
|
335
|
-
export { DaffTestingCartAddressService, DaffTestingCartBillingAddressService, DaffTestingCartCouponService, DaffTestingCartDriverModule, DaffTestingCartItemService, DaffTestingCartOrderService, DaffTestingCartPaymentMethodsService, DaffTestingCartPaymentService, DaffTestingCartService, DaffTestingCartShippingAddressService, DaffTestingCartShippingInformationService, DaffTestingCartShippingMethodsService };
|
|
336
|
-
//# sourceMappingURL=daffodil-cart-driver-testing.mjs.map
|
|
554
|
+
//# sourceMappingURL=daffodil-cart-driver-testing.mjs.map
|