@daffodil/checkout 0.39.13 → 0.42.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/billing/billing-state.module.d.ts +5 -0
- package/billing/billing.module.d.ts +7 -0
- package/billing/containers/billing.component.d.ts +3 -0
- package/billing/facades/billing.facade.d.ts +3 -0
- package/checkout.module.d.ts +9 -0
- package/daffodil-checkout.d.ts +1 -7
- package/{esm2015/billing/actions/billing.actions.js → esm2020/billing/actions/billing.actions.mjs} +0 -0
- package/esm2020/billing/billing-state.module.mjs +21 -0
- package/esm2020/billing/billing.module.mjs +39 -0
- package/esm2020/billing/containers/billing.component.mjs +36 -0
- package/esm2020/billing/facades/billing.facade.mjs +34 -0
- package/{esm2015/billing/reducers/billing/billing-reducer.interface.js → esm2020/billing/reducers/billing/billing-reducer.interface.mjs} +0 -0
- package/esm2020/billing/reducers/billing/billing.reducer.mjs +19 -0
- package/{esm2015/billing/reducers/billing-reducers.interface.js → esm2020/billing/reducers/billing-reducers.interface.mjs} +0 -0
- package/{esm2015/billing/reducers/billing-reducers.js → esm2020/billing/reducers/billing-reducers.mjs} +0 -0
- package/{esm2015/billing/selectors/billing.selector.js → esm2020/billing/selectors/billing.selector.mjs} +5 -10
- package/esm2020/checkout.module.mjs +47 -0
- package/esm2020/daffodil-checkout.mjs +5 -0
- package/{esm2015/drivers/injection-tokens/driver-checkout.token.js → esm2020/drivers/injection-tokens/driver-checkout.token.mjs} +0 -0
- package/{esm2015/drivers/injection-tokens/payment-driver.token.js → esm2020/drivers/injection-tokens/payment-driver.token.mjs} +0 -0
- package/{esm2015/drivers/injection-tokens/payment-transformer.token.js → esm2020/drivers/injection-tokens/payment-transformer.token.mjs} +0 -0
- package/{esm2015/drivers/interfaces/checkout-service.interface.js → esm2020/drivers/interfaces/checkout-service.interface.mjs} +0 -0
- package/{esm2015/drivers/interfaces/order-service.interface.js → esm2020/drivers/interfaces/order-service.interface.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/models/cart-process-request.js → esm2020/models/cart-process-request.mjs} +1 -1
- package/{esm2015/models/order/order-address.js → esm2020/models/order/order-address.mjs} +0 -0
- package/{esm2015/models/order/order-item.js → esm2020/models/order/order-item.mjs} +0 -0
- package/{esm2015/models/order/order-payment.js → esm2020/models/order/order-payment.mjs} +0 -0
- package/{esm2015/models/order/order-shipping-rate.js → esm2020/models/order/order-shipping-rate.mjs} +0 -0
- package/{esm2015/models/order/order.js → esm2020/models/order/order.mjs} +0 -0
- package/{esm2015/models/payment/payment-info.js → esm2020/models/payment/payment-info.mjs} +1 -1
- package/{esm2015/models/shipping/shipping-option.js → esm2020/models/shipping/shipping-option.mjs} +1 -1
- package/{esm2015/models/shipping/shipping-rate.js → esm2020/models/shipping/shipping-rate.mjs} +1 -1
- package/{esm2015/order/actions/order.actions.js → esm2020/order/actions/order.actions.mjs} +0 -0
- package/esm2020/order/containers/order.component.mjs +28 -0
- package/esm2020/order/effects/order.effects.mjs +28 -0
- package/esm2020/order/facades/order.facade.mjs +37 -0
- package/esm2020/order/order-state.module.mjs +33 -0
- package/esm2020/order/order.module.mjs +42 -0
- package/{esm2015/order/reducers/order/order-reducer.interface.js → esm2020/order/reducers/order/order-reducer.interface.mjs} +0 -0
- package/esm2020/order/reducers/order/order.reducer.mjs +25 -0
- package/{esm2015/order/reducers/order-reducers.interface.js → esm2020/order/reducers/order-reducers.interface.mjs} +0 -0
- package/{esm2015/order/reducers/order-reducers.js → esm2020/order/reducers/order-reducers.mjs} +0 -0
- package/{esm2015/order/selectors/order.selector.js → esm2020/order/selectors/order.selector.mjs} +5 -10
- package/{esm2015/payment/actions/payment.actions.js → esm2020/payment/actions/payment.actions.mjs} +0 -0
- package/esm2020/payment/facades/payment.facade.mjs +32 -0
- package/esm2020/payment/payment-state.module.mjs +21 -0
- package/esm2020/payment/payment.module.mjs +32 -0
- package/{esm2015/payment/reducers/payment/payment-reducer.interface.js → esm2020/payment/reducers/payment/payment-reducer.interface.mjs} +0 -0
- package/esm2020/payment/reducers/payment/payment.reducer.mjs +13 -0
- package/{esm2015/payment/reducers/payment-reducers.interface.js → esm2020/payment/reducers/payment-reducers.interface.mjs} +0 -0
- package/{esm2015/payment/reducers/payment-reducers.js → esm2020/payment/reducers/payment-reducers.mjs} +0 -0
- package/{esm2015/payment/selectors/payment.selector.js → esm2020/payment/selectors/payment.selector.mjs} +3 -6
- package/{esm2015/shipping/actions/shipping.actions.js → esm2020/shipping/actions/shipping.actions.mjs} +0 -0
- package/esm2020/shipping/containers/shipping.component.mjs +33 -0
- package/esm2020/shipping/facades/shipping.facade.mjs +34 -0
- package/{esm2015/shipping/reducers/shipping/shipping-reducer.interface.js → esm2020/shipping/reducers/shipping/shipping-reducer.interface.mjs} +0 -0
- package/esm2020/shipping/reducers/shipping/shipping.reducer.mjs +16 -0
- package/{esm2015/shipping/reducers/shipping-reducers.interface.js → esm2020/shipping/reducers/shipping-reducers.interface.mjs} +0 -0
- package/{esm2015/shipping/reducers/shipping-reducers.js → esm2020/shipping/reducers/shipping-reducers.mjs} +0 -0
- package/{esm2015/shipping/selectors/shipping.selectors.js → esm2020/shipping/selectors/shipping.selectors.mjs} +5 -10
- package/esm2020/shipping/shipping-state.module.mjs +21 -0
- package/esm2020/shipping/shipping.module.mjs +39 -0
- package/{esm2015/testing/daffodil-checkout-testing.js → esm2020/testing/daffodil-checkout-testing.mjs} +0 -0
- package/esm2020/testing/drivers/in-memory/checkout-driver.module.mjs +32 -0
- package/esm2020/testing/drivers/in-memory/checkout.service.mjs +22 -0
- package/esm2020/testing/drivers/testing/checkout-driver.module.mjs +32 -0
- package/esm2020/testing/drivers/testing/checkout.service.mjs +25 -0
- package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
- package/{esm2015/testing/inmemory-backend/checkout.service.js → esm2020/testing/inmemory-backend/checkout.service.mjs} +9 -13
- package/{esm2015/testing/order/factories/order-address.factory.js → esm2020/testing/order/factories/order-address.factory.mjs} +9 -9
- package/{esm2015/testing/order/factories/order-item.factory.js → esm2020/testing/order/factories/order-item.factory.mjs} +9 -9
- package/{esm2015/testing/order/factories/order-payment.factory.js → esm2020/testing/order/factories/order-payment.factory.mjs} +9 -9
- package/{esm2015/testing/order/factories/order-shipping-rate.factory.js → esm2020/testing/order/factories/order-shipping-rate.factory.mjs} +9 -9
- package/{esm2015/testing/order/factories/order.factory.js → esm2020/testing/order/factories/order.factory.mjs} +9 -9
- package/esm2020/testing/payment/factories/payment.factory.mjs +26 -0
- package/esm2020/testing/shipping/factories/shipping-option.factory.mjs +24 -0
- package/esm2020/testing/shipping/factories/shipping-rate.factory.mjs +29 -0
- package/fesm2015/daffodil-checkout-testing.mjs +429 -0
- package/fesm2015/daffodil-checkout-testing.mjs.map +1 -0
- package/fesm2015/daffodil-checkout.mjs +740 -0
- package/fesm2015/daffodil-checkout.mjs.map +1 -0
- package/fesm2020/daffodil-checkout-testing.mjs +429 -0
- package/fesm2020/daffodil-checkout-testing.mjs.map +1 -0
- package/fesm2020/daffodil-checkout.mjs +738 -0
- package/fesm2020/daffodil-checkout.mjs.map +1 -0
- package/order/containers/order.component.d.ts +3 -0
- package/order/effects/order.effects.d.ts +3 -0
- package/order/facades/order.facade.d.ts +3 -0
- package/order/order-state.module.d.ts +6 -0
- package/order/order.module.d.ts +7 -0
- package/package.json +38 -18
- package/payment/facades/payment.facade.d.ts +3 -0
- package/payment/payment-state.module.d.ts +5 -0
- package/payment/payment.module.d.ts +6 -0
- package/payment/selectors/payment.selector.d.ts +1 -1
- package/shipping/containers/shipping.component.d.ts +3 -0
- package/shipping/facades/shipping.facade.d.ts +3 -0
- package/shipping/shipping-state.module.d.ts +5 -0
- package/shipping/shipping.module.d.ts +7 -0
- package/testing/daffodil-checkout-testing.d.ts +1 -0
- package/testing/drivers/in-memory/checkout-driver.module.d.ts +5 -0
- package/testing/drivers/in-memory/checkout.service.d.ts +3 -0
- package/testing/drivers/testing/checkout-driver.module.d.ts +5 -0
- package/testing/drivers/testing/checkout.service.d.ts +3 -0
- package/testing/inmemory-backend/checkout.service.d.ts +3 -0
- package/testing/order/factories/order-address.factory.d.ts +3 -0
- package/testing/order/factories/order-item.factory.d.ts +3 -0
- package/testing/order/factories/order-payment.factory.d.ts +3 -0
- package/testing/order/factories/order-shipping-rate.factory.d.ts +3 -0
- package/testing/order/factories/order.factory.d.ts +3 -0
- package/testing/package.json +5 -6
- package/testing/payment/factories/payment.factory.d.ts +3 -0
- package/testing/shipping/factories/shipping-option.factory.d.ts +3 -0
- package/testing/shipping/factories/shipping-rate.factory.d.ts +3 -0
- package/bundles/daffodil-checkout-testing.umd.js +0 -789
- package/bundles/daffodil-checkout-testing.umd.js.map +0 -1
- package/bundles/daffodil-checkout-testing.umd.min.js +0 -16
- package/bundles/daffodil-checkout-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-checkout.umd.js +0 -1078
- package/bundles/daffodil-checkout.umd.js.map +0 -1
- package/bundles/daffodil-checkout.umd.min.js +0 -16
- package/bundles/daffodil-checkout.umd.min.js.map +0 -1
- package/daffodil-checkout.metadata.json +0 -1
- package/esm2015/billing/billing-state.module.js +0 -13
- package/esm2015/billing/billing.module.js +0 -24
- package/esm2015/billing/containers/billing.component.js +0 -35
- package/esm2015/billing/facades/billing.facade.js +0 -37
- package/esm2015/billing/reducers/billing/billing.reducer.js +0 -19
- package/esm2015/checkout.module.js +0 -26
- package/esm2015/daffodil-checkout.js +0 -11
- package/esm2015/order/containers/order.component.js +0 -27
- package/esm2015/order/effects/order.effects.js +0 -31
- package/esm2015/order/facades/order.facade.js +0 -40
- package/esm2015/order/order-state.module.js +0 -21
- package/esm2015/order/order.module.js +0 -27
- package/esm2015/order/reducers/order/order.reducer.js +0 -25
- package/esm2015/payment/facades/payment.facade.js +0 -35
- package/esm2015/payment/payment-state.module.js +0 -13
- package/esm2015/payment/payment.module.js +0 -17
- package/esm2015/payment/reducers/payment/payment.reducer.js +0 -13
- package/esm2015/shipping/containers/shipping.component.js +0 -32
- package/esm2015/shipping/facades/shipping.facade.js +0 -37
- package/esm2015/shipping/reducers/shipping/shipping.reducer.js +0 -16
- package/esm2015/shipping/shipping-state.module.js +0 -13
- package/esm2015/shipping/shipping.module.js +0 -24
- package/esm2015/testing/drivers/in-memory/checkout-driver.module.js +0 -25
- package/esm2015/testing/drivers/in-memory/checkout.service.js +0 -24
- package/esm2015/testing/drivers/testing/checkout-driver.module.js +0 -25
- package/esm2015/testing/drivers/testing/checkout.service.js +0 -28
- package/esm2015/testing/payment/factories/payment.factory.js +0 -26
- package/esm2015/testing/shipping/factories/shipping-option.factory.js +0 -24
- package/esm2015/testing/shipping/factories/shipping-rate.factory.js +0 -29
- package/fesm2015/daffodil-checkout-testing.js +0 -425
- package/fesm2015/daffodil-checkout-testing.js.map +0 -1
- package/fesm2015/daffodil-checkout.js +0 -662
- package/fesm2015/daffodil-checkout.js.map +0 -1
- package/testing/daffodil-checkout-testing.metadata.json +0 -1
@@ -1,789 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@faker-js/faker/locale/en_US'), require('@daffodil/core/testing'), require('rxjs'), require('@angular/common/http'), require('@angular/common'), require('@daffodil/checkout'), require('angular-in-memory-web-api'), require('@daffodil/product/testing')) :
|
3
|
-
typeof define === 'function' && define.amd ? define('@daffodil/checkout/testing', ['exports', '@angular/core', '@faker-js/faker/locale/en_US', '@daffodil/core/testing', 'rxjs', '@angular/common/http', '@angular/common', '@daffodil/checkout', 'angular-in-memory-web-api', '@daffodil/product/testing'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.checkout = global.daffodil.checkout || {}, global.daffodil.checkout.testing = {}), global.ng.core, global.faker, global.testing, global.rxjs, global.ng.common.http, global.ng.common, global.daffodil.checkout, global.angularInMemoryWebApi, global.i3));
|
5
|
-
}(this, (function (exports, i0, faker, testing, rxjs, i1, common, checkout, angularInMemoryWebApi, i3) { 'use strict';
|
6
|
-
|
7
|
-
/*! *****************************************************************************
|
8
|
-
Copyright (c) Microsoft Corporation.
|
9
|
-
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
11
|
-
purpose with or without fee is hereby granted.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
20
|
-
***************************************************************************** */
|
21
|
-
/* global Reflect, Promise */
|
22
|
-
var extendStatics = function (d, b) {
|
23
|
-
extendStatics = Object.setPrototypeOf ||
|
24
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
25
|
-
function (d, b) { for (var p in b)
|
26
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
27
|
-
d[p] = b[p]; };
|
28
|
-
return extendStatics(d, b);
|
29
|
-
};
|
30
|
-
function __extends(d, b) {
|
31
|
-
if (typeof b !== "function" && b !== null)
|
32
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
33
|
-
extendStatics(d, b);
|
34
|
-
function __() { this.constructor = d; }
|
35
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
36
|
-
}
|
37
|
-
var __assign = function () {
|
38
|
-
__assign = Object.assign || function __assign(t) {
|
39
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
40
|
-
s = arguments[i];
|
41
|
-
for (var p in s)
|
42
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
43
|
-
t[p] = s[p];
|
44
|
-
}
|
45
|
-
return t;
|
46
|
-
};
|
47
|
-
return __assign.apply(this, arguments);
|
48
|
-
};
|
49
|
-
function __rest(s, e) {
|
50
|
-
var t = {};
|
51
|
-
for (var p in s)
|
52
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
53
|
-
t[p] = s[p];
|
54
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
55
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
56
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
57
|
-
t[p[i]] = s[p[i]];
|
58
|
-
}
|
59
|
-
return t;
|
60
|
-
}
|
61
|
-
function __decorate(decorators, target, key, desc) {
|
62
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
63
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
64
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
65
|
-
else
|
66
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
67
|
-
if (d = decorators[i])
|
68
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
69
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
70
|
-
}
|
71
|
-
function __param(paramIndex, decorator) {
|
72
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
73
|
-
}
|
74
|
-
function __metadata(metadataKey, metadataValue) {
|
75
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
76
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
77
|
-
}
|
78
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
79
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
80
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
81
|
-
function fulfilled(value) { try {
|
82
|
-
step(generator.next(value));
|
83
|
-
}
|
84
|
-
catch (e) {
|
85
|
-
reject(e);
|
86
|
-
} }
|
87
|
-
function rejected(value) { try {
|
88
|
-
step(generator["throw"](value));
|
89
|
-
}
|
90
|
-
catch (e) {
|
91
|
-
reject(e);
|
92
|
-
} }
|
93
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
94
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
95
|
-
});
|
96
|
-
}
|
97
|
-
function __generator(thisArg, body) {
|
98
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
99
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
100
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
101
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
102
|
-
function step(op) {
|
103
|
-
if (f)
|
104
|
-
throw new TypeError("Generator is already executing.");
|
105
|
-
while (_)
|
106
|
-
try {
|
107
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
108
|
-
return t;
|
109
|
-
if (y = 0, t)
|
110
|
-
op = [op[0] & 2, t.value];
|
111
|
-
switch (op[0]) {
|
112
|
-
case 0:
|
113
|
-
case 1:
|
114
|
-
t = op;
|
115
|
-
break;
|
116
|
-
case 4:
|
117
|
-
_.label++;
|
118
|
-
return { value: op[1], done: false };
|
119
|
-
case 5:
|
120
|
-
_.label++;
|
121
|
-
y = op[1];
|
122
|
-
op = [0];
|
123
|
-
continue;
|
124
|
-
case 7:
|
125
|
-
op = _.ops.pop();
|
126
|
-
_.trys.pop();
|
127
|
-
continue;
|
128
|
-
default:
|
129
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
130
|
-
_ = 0;
|
131
|
-
continue;
|
132
|
-
}
|
133
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
134
|
-
_.label = op[1];
|
135
|
-
break;
|
136
|
-
}
|
137
|
-
if (op[0] === 6 && _.label < t[1]) {
|
138
|
-
_.label = t[1];
|
139
|
-
t = op;
|
140
|
-
break;
|
141
|
-
}
|
142
|
-
if (t && _.label < t[2]) {
|
143
|
-
_.label = t[2];
|
144
|
-
_.ops.push(op);
|
145
|
-
break;
|
146
|
-
}
|
147
|
-
if (t[2])
|
148
|
-
_.ops.pop();
|
149
|
-
_.trys.pop();
|
150
|
-
continue;
|
151
|
-
}
|
152
|
-
op = body.call(thisArg, _);
|
153
|
-
}
|
154
|
-
catch (e) {
|
155
|
-
op = [6, e];
|
156
|
-
y = 0;
|
157
|
-
}
|
158
|
-
finally {
|
159
|
-
f = t = 0;
|
160
|
-
}
|
161
|
-
if (op[0] & 5)
|
162
|
-
throw op[1];
|
163
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
164
|
-
}
|
165
|
-
}
|
166
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
167
|
-
if (k2 === undefined)
|
168
|
-
k2 = k;
|
169
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
170
|
-
}) : (function (o, m, k, k2) {
|
171
|
-
if (k2 === undefined)
|
172
|
-
k2 = k;
|
173
|
-
o[k2] = m[k];
|
174
|
-
});
|
175
|
-
function __exportStar(m, o) {
|
176
|
-
for (var p in m)
|
177
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
178
|
-
__createBinding(o, m, p);
|
179
|
-
}
|
180
|
-
function __values(o) {
|
181
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
182
|
-
if (m)
|
183
|
-
return m.call(o);
|
184
|
-
if (o && typeof o.length === "number")
|
185
|
-
return {
|
186
|
-
next: function () {
|
187
|
-
if (o && i >= o.length)
|
188
|
-
o = void 0;
|
189
|
-
return { value: o && o[i++], done: !o };
|
190
|
-
}
|
191
|
-
};
|
192
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
193
|
-
}
|
194
|
-
function __read(o, n) {
|
195
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
196
|
-
if (!m)
|
197
|
-
return o;
|
198
|
-
var i = m.call(o), r, ar = [], e;
|
199
|
-
try {
|
200
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
201
|
-
ar.push(r.value);
|
202
|
-
}
|
203
|
-
catch (error) {
|
204
|
-
e = { error: error };
|
205
|
-
}
|
206
|
-
finally {
|
207
|
-
try {
|
208
|
-
if (r && !r.done && (m = i["return"]))
|
209
|
-
m.call(i);
|
210
|
-
}
|
211
|
-
finally {
|
212
|
-
if (e)
|
213
|
-
throw e.error;
|
214
|
-
}
|
215
|
-
}
|
216
|
-
return ar;
|
217
|
-
}
|
218
|
-
/** @deprecated */
|
219
|
-
function __spread() {
|
220
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
221
|
-
ar = ar.concat(__read(arguments[i]));
|
222
|
-
return ar;
|
223
|
-
}
|
224
|
-
/** @deprecated */
|
225
|
-
function __spreadArrays() {
|
226
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
227
|
-
s += arguments[i].length;
|
228
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
229
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
230
|
-
r[k] = a[j];
|
231
|
-
return r;
|
232
|
-
}
|
233
|
-
function __spreadArray(to, from, pack) {
|
234
|
-
if (pack || arguments.length === 2)
|
235
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
236
|
-
if (ar || !(i in from)) {
|
237
|
-
if (!ar)
|
238
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
239
|
-
ar[i] = from[i];
|
240
|
-
}
|
241
|
-
}
|
242
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
243
|
-
}
|
244
|
-
function __await(v) {
|
245
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
246
|
-
}
|
247
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
248
|
-
if (!Symbol.asyncIterator)
|
249
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
250
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
251
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
252
|
-
function verb(n) { if (g[n])
|
253
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
254
|
-
function resume(n, v) { try {
|
255
|
-
step(g[n](v));
|
256
|
-
}
|
257
|
-
catch (e) {
|
258
|
-
settle(q[0][3], e);
|
259
|
-
} }
|
260
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
261
|
-
function fulfill(value) { resume("next", value); }
|
262
|
-
function reject(value) { resume("throw", value); }
|
263
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
264
|
-
resume(q[0][0], q[0][1]); }
|
265
|
-
}
|
266
|
-
function __asyncDelegator(o) {
|
267
|
-
var i, p;
|
268
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
269
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
270
|
-
}
|
271
|
-
function __asyncValues(o) {
|
272
|
-
if (!Symbol.asyncIterator)
|
273
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
274
|
-
var m = o[Symbol.asyncIterator], i;
|
275
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
276
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
277
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
278
|
-
}
|
279
|
-
function __makeTemplateObject(cooked, raw) {
|
280
|
-
if (Object.defineProperty) {
|
281
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
282
|
-
}
|
283
|
-
else {
|
284
|
-
cooked.raw = raw;
|
285
|
-
}
|
286
|
-
return cooked;
|
287
|
-
}
|
288
|
-
;
|
289
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
290
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
291
|
-
}) : function (o, v) {
|
292
|
-
o["default"] = v;
|
293
|
-
};
|
294
|
-
function __importStar(mod) {
|
295
|
-
if (mod && mod.__esModule)
|
296
|
-
return mod;
|
297
|
-
var result = {};
|
298
|
-
if (mod != null)
|
299
|
-
for (var k in mod)
|
300
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
301
|
-
__createBinding(result, mod, k);
|
302
|
-
__setModuleDefault(result, mod);
|
303
|
-
return result;
|
304
|
-
}
|
305
|
-
function __importDefault(mod) {
|
306
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
307
|
-
}
|
308
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
309
|
-
if (kind === "a" && !f)
|
310
|
-
throw new TypeError("Private accessor was defined without a getter");
|
311
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
312
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
313
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
314
|
-
}
|
315
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
316
|
-
if (kind === "m")
|
317
|
-
throw new TypeError("Private method is not writable");
|
318
|
-
if (kind === "a" && !f)
|
319
|
-
throw new TypeError("Private accessor was defined without a setter");
|
320
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
321
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
322
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
323
|
-
}
|
324
|
-
|
325
|
-
/**
|
326
|
-
* @deprecated
|
327
|
-
*/
|
328
|
-
var MockOrderAddress = /** @class */ (function () {
|
329
|
-
function MockOrderAddress() {
|
330
|
-
this.address_id = faker.datatype.number({ min: 1, max: 1000 });
|
331
|
-
this.quote_id = faker.datatype.number({ min: 1, max: 1000 });
|
332
|
-
this.created_at = new Date();
|
333
|
-
this.updated_at = new Date();
|
334
|
-
this.customer_id = faker.datatype.number({ min: 1, max: 1000 });
|
335
|
-
this.customer_address_id = faker.datatype.number({ min: 1, max: 1000 });
|
336
|
-
this.address_type = 'apartment';
|
337
|
-
this.email = 'email@email.com';
|
338
|
-
this.prefix = 'prefix';
|
339
|
-
this.firstname = 'first';
|
340
|
-
this.middlename = 'middle';
|
341
|
-
this.lastname = 'last';
|
342
|
-
this.suffix = 'suffix';
|
343
|
-
this.company = 'company';
|
344
|
-
this.street = 'street';
|
345
|
-
this.city = 'city';
|
346
|
-
this.state = 'state';
|
347
|
-
this.region = 'region';
|
348
|
-
this.region_id = faker.datatype.number({ min: 1, max: 1000 });
|
349
|
-
this.postcode = 'postcode';
|
350
|
-
this.country_id = 'ISO';
|
351
|
-
this.telephone = 'telephone';
|
352
|
-
this.fax = 'fax';
|
353
|
-
this.shipping_method = 'swallow';
|
354
|
-
this.shipping_description = 'flight';
|
355
|
-
this.shipping_rate = null;
|
356
|
-
}
|
357
|
-
return MockOrderAddress;
|
358
|
-
}());
|
359
|
-
/**
|
360
|
-
* @deprecated
|
361
|
-
*/
|
362
|
-
var DaffOrderAddressFactory = /** @class */ (function (_super) {
|
363
|
-
__extends(DaffOrderAddressFactory, _super);
|
364
|
-
function DaffOrderAddressFactory() {
|
365
|
-
return _super.call(this, MockOrderAddress) || this;
|
366
|
-
}
|
367
|
-
return DaffOrderAddressFactory;
|
368
|
-
}(testing.DaffModelFactory));
|
369
|
-
/** @nocollapse */ DaffOrderAddressFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderAddressFactory_Factory() { return new DaffOrderAddressFactory(); }, token: DaffOrderAddressFactory, providedIn: "root" });
|
370
|
-
DaffOrderAddressFactory.decorators = [
|
371
|
-
{ type: i0.Injectable, args: [{
|
372
|
-
providedIn: 'root',
|
373
|
-
},] }
|
374
|
-
];
|
375
|
-
/** @nocollapse */
|
376
|
-
DaffOrderAddressFactory.ctorParameters = function () { return []; };
|
377
|
-
|
378
|
-
/**
|
379
|
-
* @deprecated
|
380
|
-
*/
|
381
|
-
var MockOrderItem = /** @class */ (function () {
|
382
|
-
function MockOrderItem() {
|
383
|
-
this.item_id = faker.datatype.number({ min: 1, max: 1000 });
|
384
|
-
this.image = null;
|
385
|
-
this.quote_id = faker.datatype.number({ min: 1, max: 1000 });
|
386
|
-
this.created_at = new Date();
|
387
|
-
this.updated_at = new Date();
|
388
|
-
this.product_id = faker.datatype.number({ min: 1, max: 1000 });
|
389
|
-
this.parent_item_id = faker.datatype.number({ min: 1, max: 1000 });
|
390
|
-
this.sku = 'sku';
|
391
|
-
this.name = 'Product Name';
|
392
|
-
this.description = 'description';
|
393
|
-
this.weight = faker.datatype.number({ min: 1, max: 1000 });
|
394
|
-
this.qty = faker.datatype.number({ min: 1, max: 100 });
|
395
|
-
this.price = faker.datatype.number({ min: 1, max: 1000 });
|
396
|
-
this.discount_percent = faker.datatype.number({ min: 1, max: 10 });
|
397
|
-
this.discount_amount = faker.datatype.number({ min: 1, max: 100 });
|
398
|
-
this.tax_percent = faker.datatype.number({ min: 1, max: 10 });
|
399
|
-
this.tax_amount = faker.datatype.number({ min: 1, max: 10 });
|
400
|
-
this.row_total = faker.datatype.number({ min: 1, max: 1000 });
|
401
|
-
this.row_total_with_discount = faker.datatype.number({ min: 1, max: 1000 });
|
402
|
-
this.row_weight = faker.datatype.number({ min: 1, max: 100 });
|
403
|
-
this.tax_before_discount = faker.datatype.number({ min: 1, max: 100 });
|
404
|
-
}
|
405
|
-
return MockOrderItem;
|
406
|
-
}());
|
407
|
-
/**
|
408
|
-
* @deprecated
|
409
|
-
*/
|
410
|
-
var DaffOrderItemFactory = /** @class */ (function (_super) {
|
411
|
-
__extends(DaffOrderItemFactory, _super);
|
412
|
-
function DaffOrderItemFactory() {
|
413
|
-
return _super.call(this, MockOrderItem) || this;
|
414
|
-
}
|
415
|
-
return DaffOrderItemFactory;
|
416
|
-
}(testing.DaffModelFactory));
|
417
|
-
/** @nocollapse */ DaffOrderItemFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderItemFactory_Factory() { return new DaffOrderItemFactory(); }, token: DaffOrderItemFactory, providedIn: "root" });
|
418
|
-
DaffOrderItemFactory.decorators = [
|
419
|
-
{ type: i0.Injectable, args: [{
|
420
|
-
providedIn: 'root',
|
421
|
-
},] }
|
422
|
-
];
|
423
|
-
/** @nocollapse */
|
424
|
-
DaffOrderItemFactory.ctorParameters = function () { return []; };
|
425
|
-
|
426
|
-
/**
|
427
|
-
* @deprecated
|
428
|
-
*/
|
429
|
-
var MockOrderPayment = /** @class */ (function () {
|
430
|
-
function MockOrderPayment() {
|
431
|
-
this.id = faker.datatype.number({ min: 1, max: 1000 });
|
432
|
-
this.payment_id = this.id;
|
433
|
-
this.quote_id = faker.datatype.number({ min: 1, max: 1000 });
|
434
|
-
this.created_at = new Date();
|
435
|
-
this.updated_at = new Date();
|
436
|
-
this.method = 'card';
|
437
|
-
this.cc_type = 'visa';
|
438
|
-
this.cc_number_enc = faker.datatype.number({ min: 1000, max: 9999 }).toString();
|
439
|
-
this.cc_last4 = faker.datatype.number({ min: 1000, max: 9999 }).toString();
|
440
|
-
this.cc_cid_enc = faker.datatype.number({ min: 1, max: 1000 }).toString();
|
441
|
-
this.cc_owner = 'owner';
|
442
|
-
this.cc_exp_month = 'month';
|
443
|
-
this.cc_exp_year = 'year';
|
444
|
-
this.cc_ss_owner = 'owner';
|
445
|
-
this.cc_ss_start_month = 'start month';
|
446
|
-
this.cc_ss_start_year = 'start year';
|
447
|
-
this.po_number = 'po';
|
448
|
-
this.cc_ss_issue = 'issue';
|
449
|
-
}
|
450
|
-
return MockOrderPayment;
|
451
|
-
}());
|
452
|
-
/**
|
453
|
-
* @deprecated
|
454
|
-
*/
|
455
|
-
var DaffOrderPaymentFactory = /** @class */ (function (_super) {
|
456
|
-
__extends(DaffOrderPaymentFactory, _super);
|
457
|
-
function DaffOrderPaymentFactory() {
|
458
|
-
return _super.call(this, MockOrderPayment) || this;
|
459
|
-
}
|
460
|
-
return DaffOrderPaymentFactory;
|
461
|
-
}(testing.DaffModelFactory));
|
462
|
-
/** @nocollapse */ DaffOrderPaymentFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderPaymentFactory_Factory() { return new DaffOrderPaymentFactory(); }, token: DaffOrderPaymentFactory, providedIn: "root" });
|
463
|
-
DaffOrderPaymentFactory.decorators = [
|
464
|
-
{ type: i0.Injectable, args: [{
|
465
|
-
providedIn: 'root',
|
466
|
-
},] }
|
467
|
-
];
|
468
|
-
/** @nocollapse */
|
469
|
-
DaffOrderPaymentFactory.ctorParameters = function () { return []; };
|
470
|
-
|
471
|
-
/**
|
472
|
-
* @deprecated
|
473
|
-
*/
|
474
|
-
var MockOrderShippingRate = /** @class */ (function () {
|
475
|
-
function MockOrderShippingRate() {
|
476
|
-
this.rate_id = faker.datatype.number({ min: 1, max: 1000 });
|
477
|
-
this.address_id = faker.datatype.number({ min: 1, max: 1000 });
|
478
|
-
this.created_at = new Date();
|
479
|
-
this.updated_at = new Date();
|
480
|
-
this.carrier = 'Birds Inc.';
|
481
|
-
this.carrier_title = 'laden';
|
482
|
-
this.code = 'code';
|
483
|
-
this.method = 'swallow';
|
484
|
-
this.method_description = 'efficient';
|
485
|
-
this.price = faker.datatype.number({ min: 1, max: 1000 });
|
486
|
-
this.error_message = 'error message';
|
487
|
-
this.method_title = 'laden';
|
488
|
-
}
|
489
|
-
return MockOrderShippingRate;
|
490
|
-
}());
|
491
|
-
/**
|
492
|
-
* @deprecated
|
493
|
-
*/
|
494
|
-
var DaffOrderShippingRateFactory = /** @class */ (function (_super) {
|
495
|
-
__extends(DaffOrderShippingRateFactory, _super);
|
496
|
-
function DaffOrderShippingRateFactory() {
|
497
|
-
return _super.call(this, MockOrderShippingRate) || this;
|
498
|
-
}
|
499
|
-
return DaffOrderShippingRateFactory;
|
500
|
-
}(testing.DaffModelFactory));
|
501
|
-
/** @nocollapse */ DaffOrderShippingRateFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderShippingRateFactory_Factory() { return new DaffOrderShippingRateFactory(); }, token: DaffOrderShippingRateFactory, providedIn: "root" });
|
502
|
-
DaffOrderShippingRateFactory.decorators = [
|
503
|
-
{ type: i0.Injectable, args: [{
|
504
|
-
providedIn: 'root',
|
505
|
-
},] }
|
506
|
-
];
|
507
|
-
/** @nocollapse */
|
508
|
-
DaffOrderShippingRateFactory.ctorParameters = function () { return []; };
|
509
|
-
|
510
|
-
/**
|
511
|
-
* @deprecated
|
512
|
-
*/
|
513
|
-
var MockOrder = /** @class */ (function () {
|
514
|
-
function MockOrder() {
|
515
|
-
this.id = faker.datatype.uuid();
|
516
|
-
this.created_at = new Date();
|
517
|
-
this.updated_at = new Date();
|
518
|
-
this.store_to_base_rate = faker.datatype.number({ min: 1, max: 1000 });
|
519
|
-
this.grand_total = faker.datatype.number({ min: 1, max: 1000 });
|
520
|
-
this.checkout_method = 'card';
|
521
|
-
this.customer_id = faker.datatype.number({ min: 1, max: 1000 });
|
522
|
-
this.coupon_code = faker.datatype.number({ min: 1, max: 100000 }).toString();
|
523
|
-
this.subtotal = faker.datatype.number({ min: 1, max: 1000 });
|
524
|
-
this.subtotal_with_discount = faker.datatype.number({ min: 1, max: 1000 });
|
525
|
-
this.items = [];
|
526
|
-
this.addresses = [];
|
527
|
-
this.payment = null;
|
528
|
-
}
|
529
|
-
return MockOrder;
|
530
|
-
}());
|
531
|
-
;
|
532
|
-
/**
|
533
|
-
* @deprecated
|
534
|
-
*/
|
535
|
-
var DaffOrderFactory = /** @class */ (function (_super) {
|
536
|
-
__extends(DaffOrderFactory, _super);
|
537
|
-
function DaffOrderFactory() {
|
538
|
-
return _super.call(this, MockOrder) || this;
|
539
|
-
}
|
540
|
-
return DaffOrderFactory;
|
541
|
-
}(testing.DaffModelFactory));
|
542
|
-
/** @nocollapse */ DaffOrderFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderFactory_Factory() { return new DaffOrderFactory(); }, token: DaffOrderFactory, providedIn: "root" });
|
543
|
-
DaffOrderFactory.decorators = [
|
544
|
-
{ type: i0.Injectable, args: [{
|
545
|
-
providedIn: 'root',
|
546
|
-
},] }
|
547
|
-
];
|
548
|
-
/** @nocollapse */
|
549
|
-
DaffOrderFactory.ctorParameters = function () { return []; };
|
550
|
-
|
551
|
-
var MockPaymentInfo = /** @class */ (function () {
|
552
|
-
function MockPaymentInfo() {
|
553
|
-
this.name = 'name';
|
554
|
-
this.cardnumber = 1234123412341234;
|
555
|
-
this.month = 10;
|
556
|
-
this.year = 2021;
|
557
|
-
this.securitycode = 123;
|
558
|
-
}
|
559
|
-
return MockPaymentInfo;
|
560
|
-
}());
|
561
|
-
var DaffPaymentFactory = /** @class */ (function (_super) {
|
562
|
-
__extends(DaffPaymentFactory, _super);
|
563
|
-
function DaffPaymentFactory() {
|
564
|
-
return _super.call(this, MockPaymentInfo) || this;
|
565
|
-
}
|
566
|
-
return DaffPaymentFactory;
|
567
|
-
}(testing.DaffModelFactory));
|
568
|
-
/** @nocollapse */ DaffPaymentFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffPaymentFactory_Factory() { return new DaffPaymentFactory(); }, token: DaffPaymentFactory, providedIn: "root" });
|
569
|
-
DaffPaymentFactory.decorators = [
|
570
|
-
{ type: i0.Injectable, args: [{
|
571
|
-
providedIn: 'root',
|
572
|
-
},] }
|
573
|
-
];
|
574
|
-
/** @nocollapse */
|
575
|
-
DaffPaymentFactory.ctorParameters = function () { return []; };
|
576
|
-
|
577
|
-
var MockShippingOption = /** @class */ (function () {
|
578
|
-
function MockShippingOption() {
|
579
|
-
this.id = faker.datatype.uuid();
|
580
|
-
this.text = faker.company.companyName() + ' ' + faker.commerce.productAdjective() + ' Shipping';
|
581
|
-
}
|
582
|
-
return MockShippingOption;
|
583
|
-
}());
|
584
|
-
var DaffShippingOptionFactory = /** @class */ (function (_super) {
|
585
|
-
__extends(DaffShippingOptionFactory, _super);
|
586
|
-
function DaffShippingOptionFactory() {
|
587
|
-
return _super.call(this, MockShippingOption) || this;
|
588
|
-
}
|
589
|
-
return DaffShippingOptionFactory;
|
590
|
-
}(testing.DaffModelFactory));
|
591
|
-
/** @nocollapse */ DaffShippingOptionFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffShippingOptionFactory_Factory() { return new DaffShippingOptionFactory(); }, token: DaffShippingOptionFactory, providedIn: "root" });
|
592
|
-
DaffShippingOptionFactory.decorators = [
|
593
|
-
{ type: i0.Injectable, args: [{
|
594
|
-
providedIn: 'root',
|
595
|
-
},] }
|
596
|
-
];
|
597
|
-
/** @nocollapse */
|
598
|
-
DaffShippingOptionFactory.ctorParameters = function () { return []; };
|
599
|
-
|
600
|
-
var MockShippingRate = /** @class */ (function () {
|
601
|
-
function MockShippingRate() {
|
602
|
-
this.rate_id = faker.datatype.number({ min: 1, max: 1000 });
|
603
|
-
this.price = faker.datatype.number({ min: 1, max: 1000 });
|
604
|
-
this.carrier = 'Birds Inc.';
|
605
|
-
this.code = 'code';
|
606
|
-
this.method = 'swallow';
|
607
|
-
this.method_description = 'efficient';
|
608
|
-
this.method_title = 'laden';
|
609
|
-
}
|
610
|
-
return MockShippingRate;
|
611
|
-
}());
|
612
|
-
var DaffShippingRateFactory = /** @class */ (function (_super) {
|
613
|
-
__extends(DaffShippingRateFactory, _super);
|
614
|
-
function DaffShippingRateFactory() {
|
615
|
-
return _super.call(this, MockShippingRate) || this;
|
616
|
-
}
|
617
|
-
return DaffShippingRateFactory;
|
618
|
-
}(testing.DaffModelFactory));
|
619
|
-
/** @nocollapse */ DaffShippingRateFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffShippingRateFactory_Factory() { return new DaffShippingRateFactory(); }, token: DaffShippingRateFactory, providedIn: "root" });
|
620
|
-
DaffShippingRateFactory.decorators = [
|
621
|
-
{ type: i0.Injectable, args: [{
|
622
|
-
providedIn: 'root',
|
623
|
-
},] }
|
624
|
-
];
|
625
|
-
/** @nocollapse */
|
626
|
-
DaffShippingRateFactory.ctorParameters = function () { return []; };
|
627
|
-
|
628
|
-
var DaffTestingCheckoutService = /** @class */ (function () {
|
629
|
-
function DaffTestingCheckoutService(orderFactory, orderItemFactory) {
|
630
|
-
this.orderFactory = orderFactory;
|
631
|
-
this.orderItemFactory = orderItemFactory;
|
632
|
-
}
|
633
|
-
DaffTestingCheckoutService.prototype.placeOrder = function (cartId) {
|
634
|
-
return rxjs.of(this.orderFactory.create({ items: this.orderItemFactory.createMany(2) }));
|
635
|
-
};
|
636
|
-
return DaffTestingCheckoutService;
|
637
|
-
}());
|
638
|
-
/** @nocollapse */ DaffTestingCheckoutService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffTestingCheckoutService_Factory() { return new DaffTestingCheckoutService(i0.ɵɵinject(DaffOrderFactory), i0.ɵɵinject(DaffOrderItemFactory)); }, token: DaffTestingCheckoutService, providedIn: "root" });
|
639
|
-
DaffTestingCheckoutService.decorators = [
|
640
|
-
{ type: i0.Injectable, args: [{
|
641
|
-
providedIn: 'root',
|
642
|
-
},] }
|
643
|
-
];
|
644
|
-
/** @nocollapse */
|
645
|
-
DaffTestingCheckoutService.ctorParameters = function () { return [
|
646
|
-
{ type: DaffOrderFactory },
|
647
|
-
{ type: DaffOrderItemFactory }
|
648
|
-
]; };
|
649
|
-
|
650
|
-
var DaffInMemoryCheckoutService = /** @class */ (function () {
|
651
|
-
function DaffInMemoryCheckoutService(http) {
|
652
|
-
this.http = http;
|
653
|
-
this.url = '/api/checkout';
|
654
|
-
}
|
655
|
-
DaffInMemoryCheckoutService.prototype.placeOrder = function (cartId) {
|
656
|
-
return this.http.post(this.url + '/placeOrder', { cartId: cartId });
|
657
|
-
};
|
658
|
-
return DaffInMemoryCheckoutService;
|
659
|
-
}());
|
660
|
-
/** @nocollapse */ DaffInMemoryCheckoutService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCheckoutService_Factory() { return new DaffInMemoryCheckoutService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCheckoutService, providedIn: "root" });
|
661
|
-
DaffInMemoryCheckoutService.decorators = [
|
662
|
-
{ type: i0.Injectable, args: [{
|
663
|
-
providedIn: 'root',
|
664
|
-
},] }
|
665
|
-
];
|
666
|
-
/** @nocollapse */
|
667
|
-
DaffInMemoryCheckoutService.ctorParameters = function () { return [
|
668
|
-
{ type: i1.HttpClient }
|
669
|
-
]; };
|
670
|
-
|
671
|
-
var DaffCheckoutInMemoryDriverModule = /** @class */ (function () {
|
672
|
-
function DaffCheckoutInMemoryDriverModule() {
|
673
|
-
}
|
674
|
-
DaffCheckoutInMemoryDriverModule.forRoot = function () {
|
675
|
-
return {
|
676
|
-
ngModule: DaffCheckoutInMemoryDriverModule,
|
677
|
-
providers: [
|
678
|
-
{
|
679
|
-
provide: checkout.DaffCheckoutDriver,
|
680
|
-
useExisting: DaffInMemoryCheckoutService,
|
681
|
-
},
|
682
|
-
],
|
683
|
-
};
|
684
|
-
};
|
685
|
-
return DaffCheckoutInMemoryDriverModule;
|
686
|
-
}());
|
687
|
-
DaffCheckoutInMemoryDriverModule.decorators = [
|
688
|
-
{ type: i0.NgModule, args: [{
|
689
|
-
imports: [
|
690
|
-
common.CommonModule,
|
691
|
-
],
|
692
|
-
},] }
|
693
|
-
];
|
694
|
-
|
695
|
-
var DaffCheckoutTestingDriverModule = /** @class */ (function () {
|
696
|
-
function DaffCheckoutTestingDriverModule() {
|
697
|
-
}
|
698
|
-
DaffCheckoutTestingDriverModule.forRoot = function () {
|
699
|
-
return {
|
700
|
-
ngModule: DaffCheckoutTestingDriverModule,
|
701
|
-
providers: [
|
702
|
-
{
|
703
|
-
provide: checkout.DaffCheckoutDriver,
|
704
|
-
useExisting: DaffTestingCheckoutService,
|
705
|
-
},
|
706
|
-
],
|
707
|
-
};
|
708
|
-
};
|
709
|
-
return DaffCheckoutTestingDriverModule;
|
710
|
-
}());
|
711
|
-
DaffCheckoutTestingDriverModule.decorators = [
|
712
|
-
{ type: i0.NgModule, args: [{
|
713
|
-
imports: [
|
714
|
-
common.CommonModule,
|
715
|
-
],
|
716
|
-
},] }
|
717
|
-
];
|
718
|
-
|
719
|
-
var DaffInMemoryBackendCheckoutService = /** @class */ (function () {
|
720
|
-
function DaffInMemoryBackendCheckoutService(orderFactory, orderItemFactory, productImageFactory) {
|
721
|
-
this.orderFactory = orderFactory;
|
722
|
-
this.orderItemFactory = orderItemFactory;
|
723
|
-
this.productImageFactory = productImageFactory;
|
724
|
-
}
|
725
|
-
DaffInMemoryBackendCheckoutService.prototype.post = function (reqInfo) {
|
726
|
-
var _this = this;
|
727
|
-
return reqInfo.utils.createResponse$(function () {
|
728
|
-
if (reqInfo.id === 'placeOrder') {
|
729
|
-
//should make a service call to clear cart here.
|
730
|
-
// this.driver.cartService.clear(reqInfo.req.body.orderId).subscribe();
|
731
|
-
_this.populateOrder();
|
732
|
-
}
|
733
|
-
return {
|
734
|
-
body: _this.order,
|
735
|
-
status: angularInMemoryWebApi.STATUS.OK,
|
736
|
-
};
|
737
|
-
});
|
738
|
-
};
|
739
|
-
DaffInMemoryBackendCheckoutService.prototype.createDb = function () {
|
740
|
-
return {
|
741
|
-
order: null,
|
742
|
-
};
|
743
|
-
};
|
744
|
-
DaffInMemoryBackendCheckoutService.prototype.populateOrder = function () {
|
745
|
-
this.order = this.orderFactory.create({
|
746
|
-
items: this.orderItemFactory.createMany(2, {
|
747
|
-
image: this.productImageFactory.create(),
|
748
|
-
}),
|
749
|
-
});
|
750
|
-
};
|
751
|
-
return DaffInMemoryBackendCheckoutService;
|
752
|
-
}());
|
753
|
-
/** @nocollapse */ DaffInMemoryBackendCheckoutService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCheckoutService_Factory() { return new DaffInMemoryBackendCheckoutService(i0.ɵɵinject(DaffOrderFactory), i0.ɵɵinject(DaffOrderItemFactory), i0.ɵɵinject(i3.DaffProductImageFactory)); }, token: DaffInMemoryBackendCheckoutService, providedIn: "root" });
|
754
|
-
DaffInMemoryBackendCheckoutService.decorators = [
|
755
|
-
{ type: i0.Injectable, args: [{
|
756
|
-
providedIn: 'root',
|
757
|
-
},] }
|
758
|
-
];
|
759
|
-
/** @nocollapse */
|
760
|
-
DaffInMemoryBackendCheckoutService.ctorParameters = function () { return [
|
761
|
-
{ type: DaffOrderFactory },
|
762
|
-
{ type: DaffOrderItemFactory },
|
763
|
-
{ type: i3.DaffProductImageFactory }
|
764
|
-
]; };
|
765
|
-
|
766
|
-
// Order
|
767
|
-
|
768
|
-
/**
|
769
|
-
* Generated bundle index. Do not edit.
|
770
|
-
*/
|
771
|
-
|
772
|
-
exports.DaffCheckoutInMemoryDriverModule = DaffCheckoutInMemoryDriverModule;
|
773
|
-
exports.DaffCheckoutTestingDriverModule = DaffCheckoutTestingDriverModule;
|
774
|
-
exports.DaffInMemoryBackendCheckoutService = DaffInMemoryBackendCheckoutService;
|
775
|
-
exports.DaffInMemoryCheckoutService = DaffInMemoryCheckoutService;
|
776
|
-
exports.DaffOrderAddressFactory = DaffOrderAddressFactory;
|
777
|
-
exports.DaffOrderFactory = DaffOrderFactory;
|
778
|
-
exports.DaffOrderItemFactory = DaffOrderItemFactory;
|
779
|
-
exports.DaffOrderPaymentFactory = DaffOrderPaymentFactory;
|
780
|
-
exports.DaffOrderShippingRateFactory = DaffOrderShippingRateFactory;
|
781
|
-
exports.DaffPaymentFactory = DaffPaymentFactory;
|
782
|
-
exports.DaffShippingOptionFactory = DaffShippingOptionFactory;
|
783
|
-
exports.DaffShippingRateFactory = DaffShippingRateFactory;
|
784
|
-
exports.DaffTestingCheckoutService = DaffTestingCheckoutService;
|
785
|
-
|
786
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
787
|
-
|
788
|
-
})));
|
789
|
-
//# sourceMappingURL=daffodil-checkout-testing.umd.js.map
|