@onecx/angular-integration-interface 9.0.0-rc.13 → 9.0.0-rc.15
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/onecx-angular-integration-interface-mocks.mjs +373 -213
- package/fesm2022/onecx-angular-integration-interface-mocks.mjs.map +1 -1
- package/fesm2022/onecx-angular-integration-interface.mjs +804 -549
- package/fesm2022/onecx-angular-integration-interface.mjs.map +1 -1
- package/package.json +7 -6
- package/types/onecx-angular-integration-interface-mocks.d.ts +93 -103
- package/types/onecx-angular-integration-interface.d.ts +247 -268
|
@@ -1,228 +1,388 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Injectable } from
|
|
3
|
-
import { BehaviorSubject } from
|
|
4
|
-
import { AppConfigService, AppStateService, ConfigurationService, PortalMessageService, RemoteComponentsService,
|
|
5
|
-
import { FakeTopic } from
|
|
6
|
-
import { firstValueFrom } from
|
|
7
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import { BehaviorSubject } from "rxjs";
|
|
4
|
+
import { AppConfigService, AppStateService, ConfigurationService, PortalMessageService, RemoteComponentsService, ShellCapabilityService, UserService } from "@onecx/angular-integration-interface";
|
|
5
|
+
import { FakeTopic } from "@onecx/accelerator";
|
|
6
|
+
import { firstValueFrom } from "rxjs/internal/firstValueFrom";
|
|
8
7
|
function provideAppConfigServiceMock() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.config$ = new BehaviorSubject({});
|
|
14
|
-
}
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
-
init(baseUrl) {
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
const mockConfig = { key: 'config' };
|
|
19
|
-
this.config$.next(mockConfig);
|
|
20
|
-
resolve();
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
getProperty(key) {
|
|
24
|
-
return this.config$.getValue()?.[key];
|
|
25
|
-
}
|
|
26
|
-
setProperty(key, val) {
|
|
27
|
-
this.config$.next({ ...this.config$.value, [key]: val });
|
|
28
|
-
}
|
|
29
|
-
getConfig() {
|
|
30
|
-
return this.config$.getValue();
|
|
31
|
-
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
33
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigServiceMock }); }
|
|
8
|
+
return [AppConfigServiceMock, {
|
|
9
|
+
provide: AppConfigService,
|
|
10
|
+
useExisting: AppConfigServiceMock
|
|
11
|
+
}];
|
|
34
12
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
var AppConfigServiceMock = class AppConfigServiceMock {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.config$ = new BehaviorSubject({});
|
|
16
|
+
}
|
|
17
|
+
init(baseUrl) {
|
|
18
|
+
return new Promise((resolve) => {
|
|
19
|
+
this.config$.next({ key: "config" });
|
|
20
|
+
resolve();
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getProperty(key) {
|
|
24
|
+
return this.config$.getValue()?.[key];
|
|
25
|
+
}
|
|
26
|
+
setProperty(key, val) {
|
|
27
|
+
this.config$.next({
|
|
28
|
+
...this.config$.value,
|
|
29
|
+
[key]: val
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
getConfig() {
|
|
33
|
+
return this.config$.getValue();
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
37
|
+
minVersion: "12.0.0",
|
|
38
|
+
version: "22.2.0",
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
type: AppConfigServiceMock,
|
|
41
|
+
deps: [],
|
|
42
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
47
|
+
minVersion: "12.0.0",
|
|
48
|
+
version: "22.2.0",
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
type: AppConfigServiceMock
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
55
|
+
minVersion: "12.0.0",
|
|
56
|
+
version: "22.2.0",
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
type: AppConfigServiceMock,
|
|
59
|
+
decorators: [{ type: Injectable }]
|
|
60
|
+
});
|
|
39
61
|
function provideAppStateServiceMock() {
|
|
40
|
-
|
|
62
|
+
return [AppStateServiceMock, {
|
|
63
|
+
provide: AppStateService,
|
|
64
|
+
useExisting: AppStateServiceMock
|
|
65
|
+
}];
|
|
41
66
|
}
|
|
42
|
-
class AppStateServiceMock {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
67
|
+
var AppStateServiceMock = class AppStateServiceMock {
|
|
68
|
+
constructor() {
|
|
69
|
+
this.globalError$ = new FakeTopic();
|
|
70
|
+
this.globalLoading$ = new FakeTopic(false);
|
|
71
|
+
this.currentMfe$ = new FakeTopic({
|
|
72
|
+
mountPath: "/",
|
|
73
|
+
remoteBaseUrl: ".",
|
|
74
|
+
baseHref: "/",
|
|
75
|
+
shellName: "test",
|
|
76
|
+
appId: "test",
|
|
77
|
+
productName: "test"
|
|
78
|
+
});
|
|
79
|
+
this.currentPage$ = new FakeTopic(void 0);
|
|
80
|
+
this.currentPortal$ = new FakeTopic({
|
|
81
|
+
baseUrl: "/",
|
|
82
|
+
microfrontendRegistrations: [],
|
|
83
|
+
portalName: "Test portal",
|
|
84
|
+
workspaceName: "Test portal"
|
|
85
|
+
});
|
|
86
|
+
this.currentWorkspace$ = new FakeTopic({
|
|
87
|
+
baseUrl: "/",
|
|
88
|
+
microfrontendRegistrations: [],
|
|
89
|
+
portalName: "Test workspace",
|
|
90
|
+
workspaceName: "Test workspace"
|
|
91
|
+
});
|
|
92
|
+
this.currentLocation$ = new FakeTopic({
|
|
93
|
+
url: "/",
|
|
94
|
+
isFirst: true
|
|
95
|
+
});
|
|
96
|
+
this.isAuthenticated$ = new FakeTopic(null);
|
|
97
|
+
}
|
|
98
|
+
static {
|
|
99
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.2.0",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: AppStateServiceMock,
|
|
104
|
+
deps: [],
|
|
105
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
static {
|
|
109
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
110
|
+
minVersion: "12.0.0",
|
|
111
|
+
version: "22.2.0",
|
|
112
|
+
ngImport: i0,
|
|
113
|
+
type: AppStateServiceMock
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
118
|
+
minVersion: "12.0.0",
|
|
119
|
+
version: "22.2.0",
|
|
120
|
+
ngImport: i0,
|
|
121
|
+
type: AppStateServiceMock,
|
|
122
|
+
decorators: [{ type: Injectable }]
|
|
123
|
+
});
|
|
80
124
|
function provideConfigurationServiceMock() {
|
|
81
|
-
|
|
125
|
+
return [ConfigurationServiceMock, {
|
|
126
|
+
provide: ConfigurationService,
|
|
127
|
+
useExisting: ConfigurationServiceMock
|
|
128
|
+
}];
|
|
82
129
|
}
|
|
83
|
-
class ConfigurationServiceMock {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
130
|
+
var ConfigurationServiceMock = class ConfigurationServiceMock {
|
|
131
|
+
constructor() {
|
|
132
|
+
this.config$ = new FakeTopic({});
|
|
133
|
+
this.isInitializedPromise = new Promise((resolve) => {
|
|
134
|
+
this.resolveInitPromise = resolve;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
init(config) {
|
|
138
|
+
return this.config$.publish(config ?? {}).then(() => {
|
|
139
|
+
this.resolveInitPromise();
|
|
140
|
+
return true;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
get isInitialized() {
|
|
144
|
+
return this.isInitializedPromise;
|
|
145
|
+
}
|
|
146
|
+
getProperty(key) {
|
|
147
|
+
return firstValueFrom(this.config$.asObservable()).then((config) => config[key]);
|
|
148
|
+
}
|
|
149
|
+
async setProperty(key, val) {
|
|
150
|
+
const currentValues = await firstValueFrom(this.config$.asObservable());
|
|
151
|
+
currentValues[key] = val;
|
|
152
|
+
await this.config$.publish(currentValues);
|
|
153
|
+
}
|
|
154
|
+
getConfig() {
|
|
155
|
+
return firstValueFrom(this.config$.asObservable());
|
|
156
|
+
}
|
|
157
|
+
static {
|
|
158
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
159
|
+
minVersion: "12.0.0",
|
|
160
|
+
version: "22.2.0",
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
type: ConfigurationServiceMock,
|
|
163
|
+
deps: [],
|
|
164
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
static {
|
|
168
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
169
|
+
minVersion: "12.0.0",
|
|
170
|
+
version: "22.2.0",
|
|
171
|
+
ngImport: i0,
|
|
172
|
+
type: ConfigurationServiceMock,
|
|
173
|
+
providedIn: "root"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
178
|
+
minVersion: "12.0.0",
|
|
179
|
+
version: "22.2.0",
|
|
180
|
+
ngImport: i0,
|
|
181
|
+
type: ConfigurationServiceMock,
|
|
182
|
+
decorators: [{
|
|
183
|
+
type: Injectable,
|
|
184
|
+
args: [{ providedIn: "root" }]
|
|
185
|
+
}],
|
|
186
|
+
ctorParameters: () => []
|
|
187
|
+
});
|
|
118
188
|
function providePortalMessageServiceMock() {
|
|
119
|
-
|
|
189
|
+
return [PortalMessageServiceMock, {
|
|
190
|
+
provide: PortalMessageService,
|
|
191
|
+
useExisting: PortalMessageServiceMock
|
|
192
|
+
}];
|
|
120
193
|
}
|
|
121
|
-
class PortalMessageServiceMock {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
194
|
+
var PortalMessageServiceMock = class PortalMessageServiceMock {
|
|
195
|
+
constructor() {
|
|
196
|
+
this.message$ = new FakeTopic();
|
|
197
|
+
}
|
|
198
|
+
success(msg) {
|
|
199
|
+
this.addTranslated("success", msg);
|
|
200
|
+
}
|
|
201
|
+
info(msg) {
|
|
202
|
+
this.addTranslated("info", msg);
|
|
203
|
+
}
|
|
204
|
+
error(msg) {
|
|
205
|
+
this.addTranslated("error", msg);
|
|
206
|
+
}
|
|
207
|
+
warning(msg) {
|
|
208
|
+
this.addTranslated("warning", msg);
|
|
209
|
+
}
|
|
210
|
+
addTranslated(severity, msg) {
|
|
211
|
+
this.message$.publish({
|
|
212
|
+
...msg,
|
|
213
|
+
severity
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
static {
|
|
217
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
218
|
+
minVersion: "12.0.0",
|
|
219
|
+
version: "22.2.0",
|
|
220
|
+
ngImport: i0,
|
|
221
|
+
type: PortalMessageServiceMock,
|
|
222
|
+
deps: [],
|
|
223
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
static {
|
|
227
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
228
|
+
minVersion: "12.0.0",
|
|
229
|
+
version: "22.2.0",
|
|
230
|
+
ngImport: i0,
|
|
231
|
+
type: PortalMessageServiceMock,
|
|
232
|
+
providedIn: "any"
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
237
|
+
minVersion: "12.0.0",
|
|
238
|
+
version: "22.2.0",
|
|
239
|
+
ngImport: i0,
|
|
240
|
+
type: PortalMessageServiceMock,
|
|
241
|
+
decorators: [{
|
|
242
|
+
type: Injectable,
|
|
243
|
+
args: [{ providedIn: "any" }]
|
|
244
|
+
}]
|
|
245
|
+
});
|
|
152
246
|
function provideRemoteComponentsServiceMock() {
|
|
153
|
-
|
|
247
|
+
return [RemoteComponentsServiceMock, {
|
|
248
|
+
provide: RemoteComponentsService,
|
|
249
|
+
useExisting: RemoteComponentsServiceMock
|
|
250
|
+
}];
|
|
154
251
|
}
|
|
155
|
-
class RemoteComponentsServiceMock {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
252
|
+
var RemoteComponentsServiceMock = class RemoteComponentsServiceMock {
|
|
253
|
+
constructor() {
|
|
254
|
+
this.remoteComponents$ = new FakeTopic();
|
|
255
|
+
}
|
|
256
|
+
static {
|
|
257
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
258
|
+
minVersion: "12.0.0",
|
|
259
|
+
version: "22.2.0",
|
|
260
|
+
ngImport: i0,
|
|
261
|
+
type: RemoteComponentsServiceMock,
|
|
262
|
+
deps: [],
|
|
263
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
static {
|
|
267
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
268
|
+
minVersion: "12.0.0",
|
|
269
|
+
version: "22.2.0",
|
|
270
|
+
ngImport: i0,
|
|
271
|
+
type: RemoteComponentsServiceMock,
|
|
272
|
+
providedIn: "root"
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
277
|
+
minVersion: "12.0.0",
|
|
278
|
+
version: "22.2.0",
|
|
279
|
+
ngImport: i0,
|
|
280
|
+
type: RemoteComponentsServiceMock,
|
|
281
|
+
decorators: [{
|
|
282
|
+
type: Injectable,
|
|
283
|
+
args: [{ providedIn: "root" }]
|
|
284
|
+
}]
|
|
285
|
+
});
|
|
167
286
|
function provideUserServiceMock() {
|
|
168
|
-
|
|
287
|
+
return [UserServiceMock, {
|
|
288
|
+
provide: UserService,
|
|
289
|
+
useExisting: UserServiceMock
|
|
290
|
+
}];
|
|
169
291
|
}
|
|
170
|
-
class UserServiceMock {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
292
|
+
var UserServiceMock = class UserServiceMock {
|
|
293
|
+
constructor() {
|
|
294
|
+
this.profile$ = new FakeTopic();
|
|
295
|
+
this.permissionsTopic$ = new FakeTopic(["mocked-permission"]);
|
|
296
|
+
this.lang$ = new BehaviorSubject("en");
|
|
297
|
+
}
|
|
298
|
+
async hasPermission(permissionKey) {
|
|
299
|
+
if (Array.isArray(permissionKey)) return (await Promise.all(permissionKey.map((key) => this.hasPermission(key)))).every(Boolean);
|
|
300
|
+
return !!this.permissionsTopic$.getValue()?.includes(permissionKey);
|
|
301
|
+
}
|
|
302
|
+
getPermissions() {
|
|
303
|
+
return this.permissionsTopic$.asObservable();
|
|
304
|
+
}
|
|
305
|
+
determineLanguage() {
|
|
306
|
+
return "mocked-lang";
|
|
307
|
+
}
|
|
308
|
+
extractPermissions(userProfile) {
|
|
309
|
+
return ["mocked-permission"];
|
|
310
|
+
}
|
|
311
|
+
get isInitialized() {
|
|
312
|
+
return Promise.resolve();
|
|
313
|
+
}
|
|
314
|
+
static {
|
|
315
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
316
|
+
minVersion: "12.0.0",
|
|
317
|
+
version: "22.2.0",
|
|
318
|
+
ngImport: i0,
|
|
319
|
+
type: UserServiceMock,
|
|
320
|
+
deps: [],
|
|
321
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
static {
|
|
325
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
326
|
+
minVersion: "12.0.0",
|
|
327
|
+
version: "22.2.0",
|
|
328
|
+
ngImport: i0,
|
|
329
|
+
type: UserServiceMock,
|
|
330
|
+
providedIn: "root"
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
335
|
+
minVersion: "12.0.0",
|
|
336
|
+
version: "22.2.0",
|
|
337
|
+
ngImport: i0,
|
|
338
|
+
type: UserServiceMock,
|
|
339
|
+
decorators: [{
|
|
340
|
+
type: Injectable,
|
|
341
|
+
args: [{ providedIn: "root" }]
|
|
342
|
+
}]
|
|
343
|
+
});
|
|
205
344
|
function provideShellCapabilityServiceMock() {
|
|
206
|
-
|
|
345
|
+
return [ShellCapabilityServiceMock, {
|
|
346
|
+
provide: ShellCapabilityService,
|
|
347
|
+
useExisting: ShellCapabilityServiceMock
|
|
348
|
+
}];
|
|
207
349
|
}
|
|
208
|
-
class ShellCapabilityServiceMock {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
i0.ɵɵ
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
350
|
+
var ShellCapabilityServiceMock = class ShellCapabilityServiceMock {
|
|
351
|
+
static {
|
|
352
|
+
this.capabilities = [];
|
|
353
|
+
}
|
|
354
|
+
static setCapabilities(capabilities) {
|
|
355
|
+
ShellCapabilityServiceMock.capabilities = capabilities;
|
|
356
|
+
}
|
|
357
|
+
hasCapability(capability) {
|
|
358
|
+
return ShellCapabilityServiceMock.capabilities?.includes(capability) ?? false;
|
|
359
|
+
}
|
|
360
|
+
static {
|
|
361
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
362
|
+
minVersion: "12.0.0",
|
|
363
|
+
version: "22.2.0",
|
|
364
|
+
ngImport: i0,
|
|
365
|
+
type: ShellCapabilityServiceMock,
|
|
366
|
+
deps: [],
|
|
367
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
static {
|
|
371
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
372
|
+
minVersion: "12.0.0",
|
|
373
|
+
version: "22.2.0",
|
|
374
|
+
ngImport: i0,
|
|
375
|
+
type: ShellCapabilityServiceMock
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
380
|
+
minVersion: "12.0.0",
|
|
381
|
+
version: "22.2.0",
|
|
382
|
+
ngImport: i0,
|
|
383
|
+
type: ShellCapabilityServiceMock,
|
|
384
|
+
decorators: [{ type: Injectable }]
|
|
385
|
+
});
|
|
227
386
|
export { AppConfigServiceMock, AppStateServiceMock, ConfigurationServiceMock, PortalMessageServiceMock, RemoteComponentsServiceMock, ShellCapabilityServiceMock, UserServiceMock, provideAppConfigServiceMock, provideAppStateServiceMock, provideConfigurationServiceMock, providePortalMessageServiceMock, provideRemoteComponentsServiceMock, provideShellCapabilityServiceMock, provideUserServiceMock };
|
|
228
|
-
|
|
387
|
+
|
|
388
|
+
//# sourceMappingURL=onecx-angular-integration-interface-mocks.mjs.map
|