@daffodil/customer 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-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,53 +1,87 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Injectable } from
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import * as i1
|
|
5
|
-
import { DaffCustomerClearErrors, DaffCustomerLoad } from
|
|
6
|
-
import { of } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵ
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import * as i1$1 from "@ngrx/store";
|
|
4
|
+
import * as i1 from "@daffodil/customer/state";
|
|
5
|
+
import { DaffCustomerClearErrors, DaffCustomerLoad } from "@daffodil/customer/state";
|
|
6
|
+
import { of } from "rxjs";
|
|
7
|
+
var DaffCustomerClearErrorsGuard = class DaffCustomerClearErrorsGuard {
|
|
8
|
+
constructor(store) {
|
|
9
|
+
this.store = store;
|
|
10
|
+
}
|
|
11
|
+
canDeactivate() {
|
|
12
|
+
this.store.dispatch(new DaffCustomerClearErrors());
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: "12.0.0",
|
|
18
|
+
version: "22.2.4",
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: DaffCustomerClearErrorsGuard,
|
|
21
|
+
deps: [{ token: i1$1.Store }],
|
|
22
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static {
|
|
26
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
27
|
+
minVersion: "12.0.0",
|
|
28
|
+
version: "22.2.4",
|
|
29
|
+
ngImport: i0,
|
|
30
|
+
type: DaffCustomerClearErrorsGuard,
|
|
31
|
+
providedIn: "root"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
36
|
+
minVersion: "12.0.0",
|
|
37
|
+
version: "22.2.4",
|
|
38
|
+
ngImport: i0,
|
|
39
|
+
type: DaffCustomerClearErrorsGuard,
|
|
40
|
+
decorators: [{
|
|
41
|
+
type: Injectable,
|
|
42
|
+
args: [{ providedIn: "root" }]
|
|
43
|
+
}],
|
|
44
|
+
ctorParameters: () => [{ type: i1$1.Store }]
|
|
45
|
+
});
|
|
46
|
+
var DaffCustomerResolver = class DaffCustomerResolver {
|
|
47
|
+
constructor(facade) {
|
|
48
|
+
this.facade = facade;
|
|
49
|
+
}
|
|
50
|
+
resolve() {
|
|
51
|
+
this.facade.dispatch(new DaffCustomerLoad());
|
|
52
|
+
return of(true);
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
|
+
minVersion: "12.0.0",
|
|
57
|
+
version: "22.2.4",
|
|
58
|
+
ngImport: i0,
|
|
59
|
+
type: DaffCustomerResolver,
|
|
60
|
+
deps: [{ token: i1.DaffCustomerPageFacade }],
|
|
61
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
66
|
+
minVersion: "12.0.0",
|
|
67
|
+
version: "22.2.4",
|
|
68
|
+
ngImport: i0,
|
|
69
|
+
type: DaffCustomerResolver,
|
|
70
|
+
providedIn: "root"
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
75
|
+
minVersion: "12.0.0",
|
|
76
|
+
version: "22.2.4",
|
|
77
|
+
ngImport: i0,
|
|
78
|
+
type: DaffCustomerResolver,
|
|
79
|
+
decorators: [{
|
|
80
|
+
type: Injectable,
|
|
81
|
+
args: [{ providedIn: "root" }]
|
|
82
|
+
}],
|
|
83
|
+
ctorParameters: () => [{ type: i1.DaffCustomerPageFacade }]
|
|
84
|
+
});
|
|
52
85
|
export { DaffCustomerClearErrorsGuard, DaffCustomerResolver };
|
|
53
|
-
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=daffodil-customer-routing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-routing.mjs","sources":["../../../libs/customer/routing/src/guards/clear-errors.guard.ts","../../../libs/customer/routing/src/resolvers/customer.resolver.ts"
|
|
1
|
+
{"version":3,"file":"daffodil-customer-routing.mjs","names":["i1"],"sources":["../../../libs/customer/routing/src/guards/clear-errors.guard.ts","../../../libs/customer/routing/src/resolvers/customer.resolver.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { UrlTree } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomerClearErrors } from '@daffodil/customer/state';\n\n/**\n * A guard that will clear customer state errors before allowing route deactivation.\n */\n@Injectable({ providedIn: 'root' })\nexport class DaffCustomerClearErrorsGuard {\n constructor(private store: Store<any>) {}\n\n canDeactivate(): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {\n this.store.dispatch(new DaffCustomerClearErrors());\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffCustomerLoad,\n DaffCustomerPageFacade,\n} from '@daffodil/customer/state';\n\n/**\n * Dispatches customer load.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerResolver {\n constructor(\n private facade: DaffCustomerPageFacade,\n ) {}\n\n resolve(): Observable<boolean> {\n this.facade.dispatch(new DaffCustomerLoad());\n\n return of(true);\n }\n}\n"],"mappings":";;;;;;AAWA,IAAa,+BAAb,MAAa,6BAA4B;CACvC,YAAoB,OAAiB;EAAjB,KAAA,QAAA;CAAoB;CAExC,gBAAa;EACX,KAAK,MAAM,SAAS,IAAI,wBAAuB,CAAE;EACjD,OAAO;CACT;CANW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA4B,MAAA,CAAA,EAAA,OAAAA,KAAA,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA5B;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA4B,YADf;EAAM,CAAA;CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA4B,YAAA,CAAA;EADxC,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE;;;;ACOlC,IAAa,uBAAb,MAAa,qBAAoB;CAC/B,YACU,QAA8B;EAA9B,KAAA,SAAA;CACP;CAEH,UAAO;EACL,KAAK,OAAO,SAAS,IAAI,iBAAgB,CAAE;EAE3C,OAAO,GAAG,IAAI;CAChB;CATW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA,EAAA,OAAA,GAAA,uBAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,YAFnB;EAAM,CAAA;CAAA;;AAEP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAHhC,MAAA;EAAW,MAAA,CAAA,EACV,YAAY,OACb,CAAA"}
|
|
@@ -1,109 +1,177 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Injectable, NgModule } from
|
|
3
|
-
import { BehaviorSubject, of } from
|
|
4
|
-
import { MockDaffOperationStateFacade } from
|
|
5
|
-
import {
|
|
6
|
-
import { DaffModelFactory } from
|
|
7
|
-
import { MockDaffCustomerAddress } from
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, NgModule, makeEnvironmentProviders } from "@angular/core";
|
|
3
|
+
import { BehaviorSubject, of } from "rxjs";
|
|
4
|
+
import { MockDaffOperationStateFacade } from "@daffodil/core/state/testing";
|
|
5
|
+
import { DaffCustomerAddressPageFacade, DaffCustomerPageFacade } from "@daffodil/customer/state";
|
|
6
|
+
import { DaffModelFactory } from "@daffodil/core/testing";
|
|
7
|
+
import { MockDaffCustomerAddress } from "@daffodil/customer/testing";
|
|
8
|
+
var MockDaffCustomerPageFacade = class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.customer$ = new BehaviorSubject(null);
|
|
12
|
+
this.loading$ = new BehaviorSubject(null);
|
|
13
|
+
this.errors$ = new BehaviorSubject([]);
|
|
14
|
+
}
|
|
15
|
+
dispatch(action) {}
|
|
16
|
+
static {
|
|
17
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
18
|
+
minVersion: "12.0.0",
|
|
19
|
+
version: "22.2.4",
|
|
20
|
+
ngImport: i0,
|
|
21
|
+
type: MockDaffCustomerPageFacade,
|
|
22
|
+
deps: null,
|
|
23
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
static {
|
|
27
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
28
|
+
minVersion: "12.0.0",
|
|
29
|
+
version: "22.2.4",
|
|
30
|
+
ngImport: i0,
|
|
31
|
+
type: MockDaffCustomerPageFacade,
|
|
32
|
+
providedIn: "root"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
37
|
+
minVersion: "12.0.0",
|
|
38
|
+
version: "22.2.4",
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
type: MockDaffCustomerPageFacade,
|
|
41
|
+
decorators: [{
|
|
42
|
+
type: Injectable,
|
|
43
|
+
args: [{ providedIn: "root" }]
|
|
44
|
+
}]
|
|
45
|
+
});
|
|
46
|
+
var MockDaffCustomerAddressPageFacade = class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade {
|
|
47
|
+
constructor() {
|
|
48
|
+
super(...arguments);
|
|
49
|
+
this.addresses$ = new BehaviorSubject([]);
|
|
50
|
+
this.errors$ = new BehaviorSubject([]);
|
|
51
|
+
}
|
|
52
|
+
getAddress() {
|
|
53
|
+
return of(null);
|
|
54
|
+
}
|
|
55
|
+
dispatch(action) {}
|
|
56
|
+
static {
|
|
57
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
58
|
+
minVersion: "12.0.0",
|
|
59
|
+
version: "22.2.4",
|
|
60
|
+
ngImport: i0,
|
|
61
|
+
type: MockDaffCustomerAddressPageFacade,
|
|
62
|
+
deps: null,
|
|
63
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
static {
|
|
67
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
68
|
+
minVersion: "12.0.0",
|
|
69
|
+
version: "22.2.4",
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
type: MockDaffCustomerAddressPageFacade,
|
|
72
|
+
providedIn: "root"
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
77
|
+
minVersion: "12.0.0",
|
|
78
|
+
version: "22.2.4",
|
|
79
|
+
ngImport: i0,
|
|
80
|
+
type: MockDaffCustomerAddressPageFacade,
|
|
81
|
+
decorators: [{
|
|
82
|
+
type: Injectable,
|
|
83
|
+
args: [{ providedIn: "root" }]
|
|
84
|
+
}]
|
|
85
|
+
});
|
|
86
|
+
const provideDaffCustomerStateTesting = () => makeEnvironmentProviders([{
|
|
87
|
+
provide: DaffCustomerPageFacade,
|
|
88
|
+
useExisting: MockDaffCustomerPageFacade
|
|
89
|
+
}, {
|
|
90
|
+
provide: DaffCustomerAddressPageFacade,
|
|
91
|
+
useExisting: MockDaffCustomerAddressPageFacade
|
|
92
|
+
}]);
|
|
93
|
+
var DaffCustomerStateTestingModule = class DaffCustomerStateTestingModule {
|
|
94
|
+
static {
|
|
95
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
96
|
+
minVersion: "12.0.0",
|
|
97
|
+
version: "22.2.4",
|
|
98
|
+
ngImport: i0,
|
|
99
|
+
type: DaffCustomerStateTestingModule,
|
|
100
|
+
deps: [],
|
|
101
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
static {
|
|
105
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
106
|
+
minVersion: "14.0.0",
|
|
107
|
+
version: "22.2.4",
|
|
108
|
+
ngImport: i0,
|
|
109
|
+
type: DaffCustomerStateTestingModule
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
static {
|
|
113
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
114
|
+
minVersion: "12.0.0",
|
|
115
|
+
version: "22.2.4",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: DaffCustomerStateTestingModule,
|
|
118
|
+
providers: [provideDaffCustomerStateTesting()]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
123
|
+
minVersion: "12.0.0",
|
|
124
|
+
version: "22.2.4",
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
type: DaffCustomerStateTestingModule,
|
|
127
|
+
decorators: [{
|
|
128
|
+
type: NgModule,
|
|
129
|
+
args: [{ providers: [provideDaffCustomerStateTesting()] }]
|
|
130
|
+
}]
|
|
131
|
+
});
|
|
132
|
+
var MockDaffCustomerAddressEntity = class extends MockDaffCustomerAddress {
|
|
133
|
+
constructor() {
|
|
134
|
+
super(...arguments);
|
|
135
|
+
this.daffState = "Stable";
|
|
136
|
+
this.daffErrors = [];
|
|
137
|
+
this.daffTemp = false;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
var DaffCustomerAddressEntityFactory = class DaffCustomerAddressEntityFactory extends DaffModelFactory {
|
|
141
|
+
constructor() {
|
|
142
|
+
super(MockDaffCustomerAddressEntity);
|
|
143
|
+
}
|
|
144
|
+
static {
|
|
145
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
146
|
+
minVersion: "12.0.0",
|
|
147
|
+
version: "22.2.4",
|
|
148
|
+
ngImport: i0,
|
|
149
|
+
type: DaffCustomerAddressEntityFactory,
|
|
150
|
+
deps: [],
|
|
151
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
static {
|
|
155
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
156
|
+
minVersion: "12.0.0",
|
|
157
|
+
version: "22.2.4",
|
|
158
|
+
ngImport: i0,
|
|
159
|
+
type: DaffCustomerAddressEntityFactory,
|
|
160
|
+
providedIn: "root"
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
165
|
+
minVersion: "12.0.0",
|
|
166
|
+
version: "22.2.4",
|
|
167
|
+
ngImport: i0,
|
|
168
|
+
type: DaffCustomerAddressEntityFactory,
|
|
169
|
+
decorators: [{
|
|
170
|
+
type: Injectable,
|
|
171
|
+
args: [{ providedIn: "root" }]
|
|
172
|
+
}],
|
|
173
|
+
ctorParameters: () => []
|
|
174
|
+
});
|
|
175
|
+
export { DaffCustomerAddressEntityFactory, DaffCustomerStateTestingModule, MockDaffCustomerAddressEntity, MockDaffCustomerAddressPageFacade, MockDaffCustomerPageFacade, provideDaffCustomerStateTesting };
|
|
8
176
|
|
|
9
|
-
|
|
10
|
-
* Mocks out facade fields and methods for testing purposes.
|
|
11
|
-
*
|
|
12
|
-
* @inheritdoc
|
|
13
|
-
*/
|
|
14
|
-
class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.customer$ = new BehaviorSubject(null);
|
|
18
|
-
this.loading$ = new BehaviorSubject(null);
|
|
19
|
-
this.errors$ = new BehaviorSubject([]);
|
|
20
|
-
}
|
|
21
|
-
dispatch(action) { }
|
|
22
|
-
;
|
|
23
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerPageFacade, providedIn: 'root' }); }
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerPageFacade, decorators: [{
|
|
27
|
-
type: Injectable,
|
|
28
|
-
args: [{ providedIn: 'root' }]
|
|
29
|
-
}] });
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Mocks out facade fields and methods for testing purposes.
|
|
33
|
-
*
|
|
34
|
-
* @inheritdoc
|
|
35
|
-
*/
|
|
36
|
-
class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade {
|
|
37
|
-
constructor() {
|
|
38
|
-
super(...arguments);
|
|
39
|
-
this.addresses$ = new BehaviorSubject([]);
|
|
40
|
-
this.errors$ = new BehaviorSubject([]);
|
|
41
|
-
}
|
|
42
|
-
getAddress() {
|
|
43
|
-
return of(null);
|
|
44
|
-
}
|
|
45
|
-
dispatch(action) { }
|
|
46
|
-
;
|
|
47
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerAddressPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerAddressPageFacade, providedIn: 'root' }); }
|
|
49
|
-
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerAddressPageFacade, decorators: [{
|
|
51
|
-
type: Injectable,
|
|
52
|
-
args: [{ providedIn: 'root' }]
|
|
53
|
-
}] });
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.
|
|
57
|
-
*/
|
|
58
|
-
class DaffCustomerStateTestingModule {
|
|
59
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
60
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateTestingModule }); }
|
|
61
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateTestingModule, providers: [
|
|
62
|
-
{ provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },
|
|
63
|
-
{ provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },
|
|
64
|
-
] }); }
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStateTestingModule, decorators: [{
|
|
67
|
-
type: NgModule,
|
|
68
|
-
args: [{
|
|
69
|
-
providers: [
|
|
70
|
-
{ provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },
|
|
71
|
-
{ provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },
|
|
72
|
-
],
|
|
73
|
-
}]
|
|
74
|
-
}] });
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Mock class for {@link DaffCustomerAddressEntity}.
|
|
78
|
-
*/
|
|
79
|
-
class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress {
|
|
80
|
-
constructor() {
|
|
81
|
-
super(...arguments);
|
|
82
|
-
this.daffState = "Stable" /* DaffState.Stable */;
|
|
83
|
-
this.daffErrors = [];
|
|
84
|
-
this.daffTemp = false;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Model factory for {@link DaffCustomerAddressEntity}.
|
|
89
|
-
*/
|
|
90
|
-
class DaffCustomerAddressEntityFactory extends DaffModelFactory {
|
|
91
|
-
constructor() {
|
|
92
|
-
super(MockDaffCustomerAddressEntity);
|
|
93
|
-
}
|
|
94
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressEntityFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
95
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressEntityFactory, providedIn: 'root' }); }
|
|
96
|
-
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerAddressEntityFactory, decorators: [{
|
|
98
|
-
type: Injectable,
|
|
99
|
-
args: [{
|
|
100
|
-
providedIn: 'root',
|
|
101
|
-
}]
|
|
102
|
-
}], ctorParameters: () => [] });
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Generated bundle index. Do not edit.
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
export { DaffCustomerAddressEntityFactory, DaffCustomerStateTestingModule, MockDaffCustomerAddressEntity, MockDaffCustomerAddressPageFacade, MockDaffCustomerPageFacade };
|
|
109
|
-
//# sourceMappingURL=daffodil-customer-state-testing.mjs.map
|
|
177
|
+
//# sourceMappingURL=daffodil-customer-state-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-customer-state-testing.mjs","sources":["../../../libs/customer/state/testing/src/mock-customer-facade.ts","../../../libs/customer/state/testing/src/mock-address-facade.ts","../../../libs/customer/state/testing/src/
|
|
1
|
+
{"version":3,"file":"daffodil-customer-state-testing.mjs","names":[],"sources":["../../../libs/customer/state/testing/src/mock-customer-facade.ts","../../../libs/customer/state/testing/src/mock-address-facade.ts","../../../libs/customer/state/testing/src/provider.ts","../../../libs/customer/state/testing/src/customer-testing.module.ts","../../../libs/customer/state/testing/src/factories/customer-address.factory.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport { DaffCustomer } from '@daffodil/customer';\nimport { DaffCustomerPageFacadeInterface } from '@daffodil/customer/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerPageFacade extends MockDaffOperationStateFacade implements DaffCustomerPageFacadeInterface {\n customer$ = new BehaviorSubject<DaffCustomer>(null);\n loading$ = new BehaviorSubject<boolean>(null);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport {\n BehaviorSubject,\n of,\n} from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport {\n DaffCustomerAddressEntity,\n DaffCustomerAddressPageFacadeInterface,\n} from '@daffodil/customer/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerAddressPageFacade extends MockDaffOperationStateFacade implements DaffCustomerAddressPageFacadeInterface {\n addresses$ = new BehaviorSubject<DaffCustomerAddressEntity[]>([]);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n getAddress() {\n return of(null);\n }\n dispatch(action: Action) {};\n}\n","import {\n EnvironmentProviders,\n makeEnvironmentProviders,\n} from '@angular/core';\n\nimport {\n DaffCustomerAddressPageFacade,\n DaffCustomerPageFacade,\n} from '@daffodil/customer/state';\n\nimport { MockDaffCustomerAddressPageFacade } from './mock-address-facade';\nimport { MockDaffCustomerPageFacade } from './mock-customer-facade';\n\n/**\n * Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.\n */\nexport const provideDaffCustomerStateTesting = (): EnvironmentProviders => makeEnvironmentProviders([\n { provide: DaffCustomerPageFacade, useExisting: MockDaffCustomerPageFacade },\n { provide: DaffCustomerAddressPageFacade, useExisting: MockDaffCustomerAddressPageFacade },\n]);\n","import { NgModule } from '@angular/core';\n\nimport { provideDaffCustomerStateTesting } from './provider';\n\n/**\n * Provides the {@link MockDaffCustomerPageFacade} for {@link DaffCustomerPageFacade}.\n *\n * @deprecated in favor of {@link provideDaffCustomerStateTesting} Deprecated in version 0.95.0. Will be removed in version 0.98.0.\n */\n@NgModule({\n providers: [\n provideDaffCustomerStateTesting(),\n ],\n})\nexport class DaffCustomerStateTestingModule {}\n","import { Injectable } from '@angular/core';\n\nimport { DaffState } from '@daffodil/core/state';\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffCustomerAddressEntity } from '@daffodil/customer/state';\nimport { MockDaffCustomerAddress } from '@daffodil/customer/testing';\n\n/**\n * Mock class for {@link DaffCustomerAddressEntity}.\n */\nexport class MockDaffCustomerAddressEntity extends MockDaffCustomerAddress implements DaffCustomerAddressEntity {\n daffState = DaffState.Stable;\n daffErrors = [];\n daffTemp = false;\n}\n\n/**\n * Model factory for {@link DaffCustomerAddressEntity}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerAddressEntityFactory extends DaffModelFactory<DaffCustomerAddress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