@onecx/angular-integration-interface 9.0.0-rc.13 → 9.0.0-rc.14
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,554 +1,809 @@
|
|
|
1
|
-
import { Location } from
|
|
2
|
-
import { HttpClient } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import { BehaviorSubject,
|
|
6
|
-
import { createLoggerFactory, getNormalizedBrowserLocales } from
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
i0.ɵɵ
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
1
|
+
import { Location } from "@angular/common";
|
|
2
|
+
import { HttpClient } from "@angular/common/http";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Injectable, InjectionToken, inject } from "@angular/core";
|
|
5
|
+
import { BehaviorSubject, combineLatest, first, firstValueFrom, map, of } from "rxjs";
|
|
6
|
+
import { createLoggerFactory, getNormalizedBrowserLocales } from "@onecx/accelerator";
|
|
7
|
+
import { ConfigurationTopic, CurrentLocationTopic, CurrentMfeTopic, CurrentPageTopic, CurrentThemeTopic, CurrentWorkspaceTopic, DynamicTranslationService as DynamicTranslationService$1, GlobalErrorTopic, GlobalLoadingTopic, IconService as IconService$1, ImageRepositoryService as ImageRepositoryService$1, IsAuthenticatedTopic, MessageTopic, NotificationService as NotificationService$1, ParametersTopic, PermissionsTopic, RemoteComponentsTopic, ShellCapability, ShellCapability as Capability, UserProfileTopic, buildPortalMessagePayload, constructRouteUrl, determineBrowserLanguage, doesUrlExistForWorkspace, findParameterValue, hasShellCapability, resolveConfigPayload, resolveLegacyLanguage, resolveProfileLanguage, setShellCapabilities } from "@onecx/integration-interface";
|
|
8
|
+
import Semaphore from "ts-semaphore";
|
|
9
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
10
|
+
const createLogger = createLoggerFactory("@onecx/angular-integration-interface");
|
|
11
|
+
var AppConfigService = class AppConfigService {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.http = inject(HttpClient);
|
|
14
|
+
this.logger = createLogger("AppConfigService");
|
|
15
|
+
this.config$ = new BehaviorSubject({});
|
|
16
|
+
}
|
|
17
|
+
init(baseUrl) {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
firstValueFrom(this.http.get(Location.joinWithSlash(baseUrl, "assets/env.json"))).then(async (config) => {
|
|
20
|
+
if (config) {
|
|
21
|
+
this.config$.next(config);
|
|
22
|
+
resolve();
|
|
23
|
+
}
|
|
24
|
+
}).catch((e) => {
|
|
25
|
+
this.logger.error("Failed to load env configuration", e);
|
|
26
|
+
reject(e);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
getProperty(key) {
|
|
31
|
+
return this.config$.getValue()?.[key];
|
|
32
|
+
}
|
|
33
|
+
setProperty(key, val) {
|
|
34
|
+
this.config$.next({
|
|
35
|
+
...this.config$.value,
|
|
36
|
+
[key]: val
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
getConfig() {
|
|
40
|
+
return this.config$.getValue();
|
|
41
|
+
}
|
|
42
|
+
static {
|
|
43
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
44
|
+
minVersion: "12.0.0",
|
|
45
|
+
version: "22.2.0",
|
|
46
|
+
ngImport: i0,
|
|
47
|
+
type: AppConfigService,
|
|
48
|
+
deps: [],
|
|
49
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
static {
|
|
53
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.0",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: AppConfigService
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
62
|
+
minVersion: "12.0.0",
|
|
63
|
+
version: "22.2.0",
|
|
64
|
+
ngImport: i0,
|
|
65
|
+
type: AppConfigService,
|
|
66
|
+
decorators: [{ type: Injectable }]
|
|
67
|
+
});
|
|
68
|
+
var AppStateService = class AppStateService {
|
|
69
|
+
get globalError$() {
|
|
70
|
+
this._globalError$ ??= new GlobalErrorTopic();
|
|
71
|
+
return this._globalError$;
|
|
72
|
+
}
|
|
73
|
+
set globalError$(source) {
|
|
74
|
+
this._globalError$ = source;
|
|
75
|
+
}
|
|
76
|
+
get globalLoading$() {
|
|
77
|
+
this._globalLoading$ ??= new GlobalLoadingTopic();
|
|
78
|
+
return this._globalLoading$;
|
|
79
|
+
}
|
|
80
|
+
set globalLoading$(source) {
|
|
81
|
+
this._globalLoading$ = source;
|
|
82
|
+
}
|
|
83
|
+
get currentMfe$() {
|
|
84
|
+
this._currentMfe$ ??= new CurrentMfeTopic();
|
|
85
|
+
return this._currentMfe$;
|
|
86
|
+
}
|
|
87
|
+
set currentMfe$(source) {
|
|
88
|
+
this._currentMfe$ = source;
|
|
89
|
+
}
|
|
90
|
+
get currentLocation$() {
|
|
91
|
+
this._currentLocation$ ??= new CurrentLocationTopic();
|
|
92
|
+
return this._currentLocation$;
|
|
93
|
+
}
|
|
94
|
+
set currentLocation$(source) {
|
|
95
|
+
this._currentLocation$ = source;
|
|
96
|
+
}
|
|
97
|
+
get currentPage$() {
|
|
98
|
+
this._currentPage$ ??= new CurrentPageTopic();
|
|
99
|
+
return this._currentPage$;
|
|
100
|
+
}
|
|
101
|
+
set currentPage$(source) {
|
|
102
|
+
this._currentPage$ = source;
|
|
103
|
+
}
|
|
104
|
+
get currentWorkspace$() {
|
|
105
|
+
this._currentWorkspace$ ??= new CurrentWorkspaceTopic();
|
|
106
|
+
return this._currentWorkspace$;
|
|
107
|
+
}
|
|
108
|
+
set currentWorkspace$(source) {
|
|
109
|
+
this._currentWorkspace$ = source;
|
|
110
|
+
}
|
|
111
|
+
get isAuthenticated$() {
|
|
112
|
+
this._isAuthenticated$ ??= new IsAuthenticatedTopic();
|
|
113
|
+
return this._isAuthenticated$;
|
|
114
|
+
}
|
|
115
|
+
set isAuthenticated$(source) {
|
|
116
|
+
this._isAuthenticated$ = source;
|
|
117
|
+
}
|
|
118
|
+
ngOnDestroy() {
|
|
119
|
+
this._globalError$?.destroy();
|
|
120
|
+
this._globalLoading$?.destroy();
|
|
121
|
+
this._currentMfe$?.destroy();
|
|
122
|
+
this._currentPage$?.destroy();
|
|
123
|
+
this._currentLocation$?.destroy();
|
|
124
|
+
this._currentWorkspace$?.destroy();
|
|
125
|
+
this._isAuthenticated$?.destroy();
|
|
126
|
+
}
|
|
127
|
+
static {
|
|
128
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
129
|
+
minVersion: "12.0.0",
|
|
130
|
+
version: "22.2.0",
|
|
131
|
+
ngImport: i0,
|
|
132
|
+
type: AppStateService,
|
|
133
|
+
deps: [],
|
|
134
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
static {
|
|
138
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
139
|
+
minVersion: "12.0.0",
|
|
140
|
+
version: "22.2.0",
|
|
141
|
+
ngImport: i0,
|
|
142
|
+
type: AppStateService,
|
|
143
|
+
providedIn: "root"
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
148
|
+
minVersion: "12.0.0",
|
|
149
|
+
version: "22.2.0",
|
|
150
|
+
ngImport: i0,
|
|
151
|
+
type: AppStateService,
|
|
152
|
+
decorators: [{
|
|
153
|
+
type: Injectable,
|
|
154
|
+
args: [{ providedIn: "root" }]
|
|
155
|
+
}]
|
|
156
|
+
});
|
|
157
|
+
const APP_CONFIG = new InjectionToken("APP_CONFIG");
|
|
158
|
+
const SANITY_CHECK = new InjectionToken("OCXSANITY_CHECK");
|
|
159
|
+
const APPLICATION_NAME = new InjectionToken("APPLICATION_NAME");
|
|
160
|
+
const DYNAMIC_CONTAINER = new InjectionToken("DYNAMIC_CONTAINER");
|
|
129
161
|
var CONFIG_KEY;
|
|
130
|
-
(function
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
(function(CONFIG_KEY) {
|
|
163
|
+
CONFIG_KEY["TKIT_PORTAL_DEFAULT_THEME"] = "TKIT_PORTAL_DEFAULT_THEME";
|
|
164
|
+
CONFIG_KEY["TKIT_PORTAL_DISABLE_THEME_MANAGEMENT"] = "TKIT_PORTAL_DISABLE_THEME_MANAGEMENT";
|
|
165
|
+
CONFIG_KEY["TKIT_PORTAL_THEME_SERVER_URL"] = "TKIT_PORTAL_THEME_SERVER_URL";
|
|
166
|
+
CONFIG_KEY["TKIT_TOKEN_ROLE_CLAIM_NAME"] = "TKIT_TOKEN_ROLE_CLAIM_NAME";
|
|
167
|
+
CONFIG_KEY["TKIT_PORTAL_ID"] = "TKIT_PORTAL_ID";
|
|
168
|
+
CONFIG_KEY["TKIT_SUPPORTED_LANGUAGES"] = "TKIT_SUPPORTED_LANGUAGES";
|
|
169
|
+
CONFIG_KEY["TKIT_SEARCH_BASE_URL"] = "TKIT_SEARCH_BASE_URL";
|
|
170
|
+
CONFIG_KEY["APP_BASE_HREF"] = "APP_BASE_HREF";
|
|
171
|
+
CONFIG_KEY["KEYCLOAK_REALM"] = "KEYCLOAK_REALM";
|
|
172
|
+
CONFIG_KEY["KEYCLOAK_ENABLE_SILENT_SSO"] = "KEYCLOAK_ENABLE_SILENT_SSO";
|
|
173
|
+
CONFIG_KEY["KEYCLOAK_URL"] = "KEYCLOAK_URL";
|
|
174
|
+
CONFIG_KEY["KEYCLOAK_CLIENT_ID"] = "KEYCLOAK_CLIENT_ID";
|
|
175
|
+
CONFIG_KEY["KEYCLOAK_TIME_SKEW"] = "KEYCLOAK_TIME_SKEW";
|
|
176
|
+
CONFIG_KEY["KEYCLOAK_UPDATE_TOKEN_MIN_VALIDITY"] = "KEYCLOAK_UPDATE_TOKEN_MIN_VALIDITY";
|
|
177
|
+
CONFIG_KEY["KEYCLOAK_ON_TOKEN_EXPIRED_ENABLED"] = "KEYCLOAK_ON_TOKEN_EXPIRED_ENABLED";
|
|
178
|
+
CONFIG_KEY["KEYCLOAK_ON_AUTH_REFRESH_ERROR_ENABLED"] = "KEYCLOAK_ON_AUTH_REFRESH_ERROR_ENABLED";
|
|
179
|
+
CONFIG_KEY["ONECX_PORTAL_FAVORITES_DISABLED"] = "ONECX_PORTAL_FAVORITES_DISABLED";
|
|
180
|
+
CONFIG_KEY["ONECX_PORTAL_FEEDBACK_DISABLED"] = "ONECX_PORTAL_FEEDBACK_DISABLED";
|
|
181
|
+
CONFIG_KEY["ONECX_PORTAL_SEARCH_DISABLED"] = "ONECX_PORTAL_SEARCH_DISABLED";
|
|
182
|
+
CONFIG_KEY["ONECX_PORTAL_SUPPORT_TICKET_DISABLED"] = "ONECX_PORTAL_SUPPORT_TICKET_DISABLED";
|
|
183
|
+
CONFIG_KEY["ONECX_PORTAL_ANNOUNCEMENTS_DISABLED"] = "ONECX_PORTAL_ANNOUNCEMENTS_DISABLED";
|
|
184
|
+
CONFIG_KEY["ONECX_PORTAL_PASSWORD_CHANGE_DISABLED"] = "ONECX_PORTAL_PASSWORD_CHANGE_DISABLED";
|
|
185
|
+
CONFIG_KEY["ONECX_PORTAL_SETTINGS_DISABLED"] = "ONECX_PORTAL_SETTINGS_DISABLED";
|
|
186
|
+
CONFIG_KEY["ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED"] = "ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED";
|
|
187
|
+
CONFIG_KEY["ONECX_PORTAL_HELP_DISABLED"] = "ONECX_PORTAL_HELP_DISABLED";
|
|
188
|
+
CONFIG_KEY["ONECX_PORTAL_SEARCH_BUTTONS_REVERSED"] = "ONECX_PORTAL_SEARCH_BUTTONS_REVERSED";
|
|
189
|
+
CONFIG_KEY["APP_VERSION"] = "APP_VERSION";
|
|
190
|
+
CONFIG_KEY["IS_SHELL"] = "IS_SHELL";
|
|
191
|
+
CONFIG_KEY["AUTH_SERVICE"] = "AUTH_SERVICE";
|
|
192
|
+
CONFIG_KEY["AUTH_SERVICE_CUSTOM_URL"] = "AUTH_SERVICE_CUSTOM_URL";
|
|
193
|
+
CONFIG_KEY["AUTH_SERVICE_CUSTOM_MODULE_NAME"] = "AUTH_SERVICE_CUSTOM_MODULE_NAME";
|
|
194
|
+
CONFIG_KEY["POLYFILL_SCOPE_MODE"] = "POLYFILL_SCOPE_MODE";
|
|
195
|
+
CONFIG_KEY["KEYBOARD_FOCUSABLE_SELECTOR"] = "KEYBOARD_FOCUSABLE_SELECTOR";
|
|
196
|
+
CONFIG_KEY["CUSTOM_AUTH_SHARE_SCOPE"] = "CUSTOM_AUTH_SHARE_SCOPE";
|
|
165
197
|
})(CONFIG_KEY || (CONFIG_KEY = {}));
|
|
166
198
|
var POLYFILL_SCOPE_MODE;
|
|
167
|
-
(function
|
|
168
|
-
|
|
169
|
-
|
|
199
|
+
(function(POLYFILL_SCOPE_MODE) {
|
|
200
|
+
POLYFILL_SCOPE_MODE["PERFORMANCE"] = "PERFORMANCE";
|
|
201
|
+
POLYFILL_SCOPE_MODE["PRECISION"] = "PRECISION";
|
|
170
202
|
})(POLYFILL_SCOPE_MODE || (POLYFILL_SCOPE_MODE = {}));
|
|
203
|
+
var ConfigurationService = class ConfigurationService {
|
|
204
|
+
constructor() {
|
|
205
|
+
this.http = inject(HttpClient);
|
|
206
|
+
this.logger = createLogger("ConfigurationService");
|
|
207
|
+
this.defaultConfig = inject(APP_CONFIG, { optional: true });
|
|
208
|
+
this.semaphore = new Semaphore(1);
|
|
209
|
+
}
|
|
210
|
+
get config$() {
|
|
211
|
+
this._config$ ??= new ConfigurationTopic();
|
|
212
|
+
return this._config$;
|
|
213
|
+
}
|
|
214
|
+
set config$(source) {
|
|
215
|
+
this._config$ = source;
|
|
216
|
+
}
|
|
217
|
+
ngOnDestroy() {
|
|
218
|
+
this._config$?.destroy();
|
|
219
|
+
}
|
|
220
|
+
init() {
|
|
221
|
+
return new Promise((resolve, reject) => {
|
|
222
|
+
const skipRemoteConfigLoad = this.defaultConfig?.["skipRemoteConfigLoad"];
|
|
223
|
+
const remoteConfigURL = this.defaultConfig?.["remoteConfigURL"] ?? void 0;
|
|
224
|
+
resolveConfigPayload({
|
|
225
|
+
defaultConfig: this.defaultConfig ?? {},
|
|
226
|
+
skipRemoteConfigLoad: !!skipRemoteConfigLoad,
|
|
227
|
+
remoteConfigURL,
|
|
228
|
+
loadRemoteConfig: (url) => firstValueFrom(this.http.get(url))
|
|
229
|
+
}).then(async ({ config, source }) => {
|
|
230
|
+
if (source === "inlined") this.logger.info("ENV resolved from injected config");
|
|
231
|
+
if (source === "default" && skipRemoteConfigLoad) this.logger.info("📢 TKA001: Remote config load is disabled. To enable it, remove the \"skipRemoteConfigLoad\" key in your environment.json");
|
|
232
|
+
await this.config$.publish({
|
|
233
|
+
...this.defaultConfig,
|
|
234
|
+
...config ?? {}
|
|
235
|
+
}).then(() => {
|
|
236
|
+
resolve(true);
|
|
237
|
+
});
|
|
238
|
+
}).catch((e) => {
|
|
239
|
+
this.logger.error("Failed to load env configuration", e);
|
|
240
|
+
reject(e);
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
get isInitialized() {
|
|
245
|
+
return this.config$.isInitialized;
|
|
246
|
+
}
|
|
247
|
+
async getProperty(key) {
|
|
248
|
+
if (!Object.values(CONFIG_KEY).includes(key)) this.logger.error("Invalid config key ", key);
|
|
249
|
+
return firstValueFrom(this.config$.pipe(map((config) => config[key])));
|
|
250
|
+
}
|
|
251
|
+
async setProperty(key, val) {
|
|
252
|
+
return this.semaphore.use(async () => {
|
|
253
|
+
const currentValues = await firstValueFrom(this.config$.asObservable());
|
|
254
|
+
currentValues[key] = val;
|
|
255
|
+
await this.config$.publish(currentValues);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
async getConfig() {
|
|
259
|
+
return firstValueFrom(this.config$.asObservable());
|
|
260
|
+
}
|
|
261
|
+
static {
|
|
262
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
263
|
+
minVersion: "12.0.0",
|
|
264
|
+
version: "22.2.0",
|
|
265
|
+
ngImport: i0,
|
|
266
|
+
type: ConfigurationService,
|
|
267
|
+
deps: [],
|
|
268
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
static {
|
|
272
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
273
|
+
minVersion: "12.0.0",
|
|
274
|
+
version: "22.2.0",
|
|
275
|
+
ngImport: i0,
|
|
276
|
+
type: ConfigurationService,
|
|
277
|
+
providedIn: "root"
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
282
|
+
minVersion: "12.0.0",
|
|
283
|
+
version: "22.2.0",
|
|
284
|
+
ngImport: i0,
|
|
285
|
+
type: ConfigurationService,
|
|
286
|
+
decorators: [{
|
|
287
|
+
type: Injectable,
|
|
288
|
+
args: [{ providedIn: "root" }]
|
|
289
|
+
}]
|
|
290
|
+
});
|
|
291
|
+
const logger = createLogger("UserService");
|
|
292
|
+
var UserService = class UserService {
|
|
293
|
+
get permissionsTopic$() {
|
|
294
|
+
this._permissionsTopic$ ??= new PermissionsTopic();
|
|
295
|
+
return this._permissionsTopic$;
|
|
296
|
+
}
|
|
297
|
+
set permissionsTopic$(source) {
|
|
298
|
+
this._permissionsTopic$ = source;
|
|
299
|
+
}
|
|
300
|
+
constructor() {
|
|
301
|
+
this.profile$ = new UserProfileTopic();
|
|
302
|
+
this.lang$ = new BehaviorSubject(determineBrowserLanguage() ?? "en");
|
|
303
|
+
this.profile$.pipe(map((profile) => {
|
|
304
|
+
return resolveProfileLanguage(profile, "en", getNormalizedBrowserLocales);
|
|
305
|
+
})).subscribe(this.lang$);
|
|
306
|
+
}
|
|
307
|
+
ngOnDestroy() {
|
|
308
|
+
this.profile$.destroy();
|
|
309
|
+
this._permissionsTopic$?.destroy();
|
|
310
|
+
}
|
|
311
|
+
useOldLangSetting(profile) {
|
|
312
|
+
return resolveLegacyLanguage(profile, "en", determineBrowserLanguage);
|
|
313
|
+
}
|
|
314
|
+
getPermissions() {
|
|
315
|
+
return this.permissionsTopic$.asObservable();
|
|
316
|
+
}
|
|
317
|
+
async hasPermission(permissionKey) {
|
|
318
|
+
if (!permissionKey) return true;
|
|
319
|
+
if (Array.isArray(permissionKey)) return (await Promise.all(permissionKey.map((key) => this.hasPermission(key)))).every((hasPermission) => hasPermission);
|
|
320
|
+
return firstValueFrom(this.permissionsTopic$.pipe(map((permissions) => {
|
|
321
|
+
const result = permissions.includes(permissionKey);
|
|
322
|
+
if (!result) logger.debug(`No permission for: ${permissionKey}`);
|
|
323
|
+
return !!result;
|
|
324
|
+
})));
|
|
325
|
+
}
|
|
326
|
+
get isInitialized() {
|
|
327
|
+
return Promise.all([this.permissionsTopic$.isInitialized, this.profile$.isInitialized]).then(() => {});
|
|
328
|
+
}
|
|
329
|
+
static {
|
|
330
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
331
|
+
minVersion: "12.0.0",
|
|
332
|
+
version: "22.2.0",
|
|
333
|
+
ngImport: i0,
|
|
334
|
+
type: UserService,
|
|
335
|
+
deps: [],
|
|
336
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
static {
|
|
340
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
341
|
+
minVersion: "12.0.0",
|
|
342
|
+
version: "22.2.0",
|
|
343
|
+
ngImport: i0,
|
|
344
|
+
type: UserService,
|
|
345
|
+
providedIn: "root"
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
350
|
+
minVersion: "12.0.0",
|
|
351
|
+
version: "22.2.0",
|
|
352
|
+
ngImport: i0,
|
|
353
|
+
type: UserService,
|
|
354
|
+
decorators: [{
|
|
355
|
+
type: Injectable,
|
|
356
|
+
args: [{ providedIn: "root" }]
|
|
357
|
+
}],
|
|
358
|
+
ctorParameters: () => []
|
|
359
|
+
});
|
|
360
|
+
var ShellCapabilityService = class ShellCapabilityService {
|
|
361
|
+
static setCapabilities(capabilities) {
|
|
362
|
+
setShellCapabilities(capabilities);
|
|
363
|
+
}
|
|
364
|
+
hasCapability(capability) {
|
|
365
|
+
return hasShellCapability(capability);
|
|
366
|
+
}
|
|
367
|
+
static {
|
|
368
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
369
|
+
minVersion: "12.0.0",
|
|
370
|
+
version: "22.2.0",
|
|
371
|
+
ngImport: i0,
|
|
372
|
+
type: ShellCapabilityService,
|
|
373
|
+
deps: [],
|
|
374
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
static {
|
|
378
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
379
|
+
minVersion: "12.0.0",
|
|
380
|
+
version: "22.2.0",
|
|
381
|
+
ngImport: i0,
|
|
382
|
+
type: ShellCapabilityService,
|
|
383
|
+
providedIn: "root"
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
388
|
+
minVersion: "12.0.0",
|
|
389
|
+
version: "22.2.0",
|
|
390
|
+
ngImport: i0,
|
|
391
|
+
type: ShellCapabilityService,
|
|
392
|
+
decorators: [{
|
|
393
|
+
type: Injectable,
|
|
394
|
+
args: [{ providedIn: "root" }]
|
|
395
|
+
}]
|
|
396
|
+
});
|
|
397
|
+
var ParametersService = class ParametersService {
|
|
398
|
+
constructor() {
|
|
399
|
+
this.shellCapabilityService = inject(ShellCapabilityService);
|
|
400
|
+
this.appStateService = inject(AppStateService);
|
|
401
|
+
}
|
|
402
|
+
get parameters$() {
|
|
403
|
+
this._parameters$ ??= new ParametersTopic();
|
|
404
|
+
return this._parameters$;
|
|
405
|
+
}
|
|
406
|
+
set parameters$(source) {
|
|
407
|
+
this._parameters$ = source;
|
|
408
|
+
}
|
|
409
|
+
ngOnDestroy() {
|
|
410
|
+
this._parameters$?.destroy();
|
|
411
|
+
}
|
|
412
|
+
async get(key, defaultValue, productName = void 0, appId = void 0) {
|
|
413
|
+
if (!this.shellCapabilityService.hasCapability(ShellCapability.PARAMETERS_TOPIC)) return defaultValue;
|
|
414
|
+
if (!productName) productName = await firstValueFrom(this.appStateService.currentMfe$.pipe(map((mfe) => mfe.productName)));
|
|
415
|
+
if (!appId) appId = await firstValueFrom(this.appStateService.currentMfe$.pipe(map((mfe) => mfe.appId)));
|
|
416
|
+
return firstValueFrom(this.parameters$.pipe(map((payload) => findParameterValue(payload, key, productName, appId)))).then((value) => value ?? defaultValue);
|
|
417
|
+
}
|
|
418
|
+
static {
|
|
419
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
420
|
+
minVersion: "12.0.0",
|
|
421
|
+
version: "22.2.0",
|
|
422
|
+
ngImport: i0,
|
|
423
|
+
type: ParametersService,
|
|
424
|
+
deps: [],
|
|
425
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
static {
|
|
429
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
430
|
+
minVersion: "12.0.0",
|
|
431
|
+
version: "22.2.0",
|
|
432
|
+
ngImport: i0,
|
|
433
|
+
type: ParametersService,
|
|
434
|
+
providedIn: "root"
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
439
|
+
minVersion: "12.0.0",
|
|
440
|
+
version: "22.2.0",
|
|
441
|
+
ngImport: i0,
|
|
442
|
+
type: ParametersService,
|
|
443
|
+
decorators: [{
|
|
444
|
+
type: Injectable,
|
|
445
|
+
args: [{ providedIn: "root" }]
|
|
446
|
+
}]
|
|
447
|
+
});
|
|
448
|
+
var PortalMessageService = class PortalMessageService {
|
|
449
|
+
constructor() {
|
|
450
|
+
this.translateService = inject(TranslateService);
|
|
451
|
+
}
|
|
452
|
+
get message$() {
|
|
453
|
+
this._message$ ??= new MessageTopic();
|
|
454
|
+
return this._message$;
|
|
455
|
+
}
|
|
456
|
+
set message$(source) {
|
|
457
|
+
this._message$ = source;
|
|
458
|
+
}
|
|
459
|
+
success(msg) {
|
|
460
|
+
this.addTranslated("success", msg);
|
|
461
|
+
}
|
|
462
|
+
info(msg) {
|
|
463
|
+
this.addTranslated("info", msg);
|
|
464
|
+
}
|
|
465
|
+
error(msg) {
|
|
466
|
+
this.addTranslated("error", msg);
|
|
467
|
+
}
|
|
468
|
+
warning(msg) {
|
|
469
|
+
this.addTranslated("warn", msg);
|
|
470
|
+
}
|
|
471
|
+
addTranslated(severity, msg) {
|
|
472
|
+
combineLatest([msg.summaryKey ? this.translateService.get(msg.summaryKey || "", msg.summaryParameters) : of(void 0), msg.detailKey ? this.translateService.get(msg.detailKey, msg.detailParameters) : of(void 0)]).pipe(first()).subscribe(([summaryTranslation, detailTranslation]) => {
|
|
473
|
+
this.message$.publish(buildPortalMessagePayload(severity, msg, summaryTranslation, detailTranslation));
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
ngOnDestroy() {
|
|
477
|
+
this._message$?.destroy();
|
|
478
|
+
}
|
|
479
|
+
static {
|
|
480
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
481
|
+
minVersion: "12.0.0",
|
|
482
|
+
version: "22.2.0",
|
|
483
|
+
ngImport: i0,
|
|
484
|
+
type: PortalMessageService,
|
|
485
|
+
deps: [],
|
|
486
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
static {
|
|
490
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
491
|
+
minVersion: "12.0.0",
|
|
492
|
+
version: "22.2.0",
|
|
493
|
+
ngImport: i0,
|
|
494
|
+
type: PortalMessageService,
|
|
495
|
+
providedIn: "any"
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
500
|
+
minVersion: "12.0.0",
|
|
501
|
+
version: "22.2.0",
|
|
502
|
+
ngImport: i0,
|
|
503
|
+
type: PortalMessageService,
|
|
504
|
+
decorators: [{
|
|
505
|
+
type: Injectable,
|
|
506
|
+
args: [{ providedIn: "any" }]
|
|
507
|
+
}]
|
|
508
|
+
});
|
|
509
|
+
var ThemeService = class ThemeService {
|
|
510
|
+
get currentTheme$() {
|
|
511
|
+
this._currentTheme$ ??= new CurrentThemeTopic();
|
|
512
|
+
return this._currentTheme$;
|
|
513
|
+
}
|
|
514
|
+
set currentTheme$(source) {
|
|
515
|
+
this._currentTheme$ = source;
|
|
516
|
+
}
|
|
517
|
+
ngOnDestroy() {
|
|
518
|
+
this._currentTheme$?.destroy();
|
|
519
|
+
}
|
|
520
|
+
static {
|
|
521
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
522
|
+
minVersion: "12.0.0",
|
|
523
|
+
version: "22.2.0",
|
|
524
|
+
ngImport: i0,
|
|
525
|
+
type: ThemeService,
|
|
526
|
+
deps: [],
|
|
527
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
static {
|
|
531
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
532
|
+
minVersion: "12.0.0",
|
|
533
|
+
version: "22.2.0",
|
|
534
|
+
ngImport: i0,
|
|
535
|
+
type: ThemeService,
|
|
536
|
+
providedIn: "root"
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
541
|
+
minVersion: "12.0.0",
|
|
542
|
+
version: "22.2.0",
|
|
543
|
+
ngImport: i0,
|
|
544
|
+
type: ThemeService,
|
|
545
|
+
decorators: [{
|
|
546
|
+
type: Injectable,
|
|
547
|
+
args: [{ providedIn: "root" }]
|
|
548
|
+
}]
|
|
549
|
+
});
|
|
550
|
+
var RemoteComponentsService = class RemoteComponentsService {
|
|
551
|
+
get remoteComponents$() {
|
|
552
|
+
this._remoteComponents$ ??= new RemoteComponentsTopic();
|
|
553
|
+
return this._remoteComponents$;
|
|
554
|
+
}
|
|
555
|
+
set remoteComponents$(source) {
|
|
556
|
+
this._remoteComponents$ = source;
|
|
557
|
+
}
|
|
558
|
+
ngOnDestroy() {
|
|
559
|
+
this._remoteComponents$?.destroy();
|
|
560
|
+
}
|
|
561
|
+
static {
|
|
562
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
563
|
+
minVersion: "12.0.0",
|
|
564
|
+
version: "22.2.0",
|
|
565
|
+
ngImport: i0,
|
|
566
|
+
type: RemoteComponentsService,
|
|
567
|
+
deps: [],
|
|
568
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
static {
|
|
572
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
573
|
+
minVersion: "12.0.0",
|
|
574
|
+
version: "22.2.0",
|
|
575
|
+
ngImport: i0,
|
|
576
|
+
type: RemoteComponentsService,
|
|
577
|
+
providedIn: "root"
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
582
|
+
minVersion: "12.0.0",
|
|
583
|
+
version: "22.2.0",
|
|
584
|
+
ngImport: i0,
|
|
585
|
+
type: RemoteComponentsService,
|
|
586
|
+
decorators: [{
|
|
587
|
+
type: Injectable,
|
|
588
|
+
args: [{ providedIn: "root" }]
|
|
589
|
+
}]
|
|
590
|
+
});
|
|
591
|
+
var WorkspaceService = class WorkspaceService {
|
|
592
|
+
constructor() {
|
|
593
|
+
this.appStateService = inject(AppStateService);
|
|
594
|
+
this.logger = createLogger("WorkspaceService");
|
|
595
|
+
}
|
|
596
|
+
getUrl(productName, appId, endpointName, endpointParameters) {
|
|
597
|
+
return this.appStateService.currentWorkspace$.pipe(map((workspace) => {
|
|
598
|
+
return constructRouteUrl(workspace, appId, productName, endpointName, endpointParameters, this.logger.warn);
|
|
599
|
+
}));
|
|
600
|
+
}
|
|
601
|
+
doesUrlExistFor(productName, appId, endpointName) {
|
|
602
|
+
return this.appStateService.currentWorkspace$.pipe(map((workspace) => doesUrlExistForWorkspace(workspace, productName, appId, endpointName, this.logger.warn)));
|
|
603
|
+
}
|
|
604
|
+
static {
|
|
605
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
606
|
+
minVersion: "12.0.0",
|
|
607
|
+
version: "22.2.0",
|
|
608
|
+
ngImport: i0,
|
|
609
|
+
type: WorkspaceService,
|
|
610
|
+
deps: [],
|
|
611
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
static {
|
|
615
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
616
|
+
minVersion: "12.0.0",
|
|
617
|
+
version: "22.2.0",
|
|
618
|
+
ngImport: i0,
|
|
619
|
+
type: WorkspaceService,
|
|
620
|
+
providedIn: "root"
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
625
|
+
minVersion: "12.0.0",
|
|
626
|
+
version: "22.2.0",
|
|
627
|
+
ngImport: i0,
|
|
628
|
+
type: WorkspaceService,
|
|
629
|
+
decorators: [{
|
|
630
|
+
type: Injectable,
|
|
631
|
+
args: [{ providedIn: "root" }]
|
|
632
|
+
}]
|
|
633
|
+
});
|
|
634
|
+
var ImageRepositoryService = class ImageRepositoryService {
|
|
635
|
+
constructor() {
|
|
636
|
+
this.imageRepositoryInterface = new ImageRepositoryService$1();
|
|
637
|
+
}
|
|
638
|
+
get imageRepositoryTopic() {
|
|
639
|
+
return this.imageRepositoryInterface.imageRepositoryTopic;
|
|
640
|
+
}
|
|
641
|
+
async getUrl(names, fallbackUrl) {
|
|
642
|
+
if (fallbackUrl) return this.imageRepositoryInterface.getUrl(names, fallbackUrl);
|
|
643
|
+
return this.imageRepositoryInterface.getUrl(names);
|
|
644
|
+
}
|
|
645
|
+
ngOnDestroy() {
|
|
646
|
+
this.imageRepositoryInterface.destroy();
|
|
647
|
+
}
|
|
648
|
+
static {
|
|
649
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
650
|
+
minVersion: "12.0.0",
|
|
651
|
+
version: "22.2.0",
|
|
652
|
+
ngImport: i0,
|
|
653
|
+
type: ImageRepositoryService,
|
|
654
|
+
deps: [],
|
|
655
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
static {
|
|
659
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
660
|
+
minVersion: "12.0.0",
|
|
661
|
+
version: "22.2.0",
|
|
662
|
+
ngImport: i0,
|
|
663
|
+
type: ImageRepositoryService,
|
|
664
|
+
providedIn: "root"
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
669
|
+
minVersion: "12.0.0",
|
|
670
|
+
version: "22.2.0",
|
|
671
|
+
ngImport: i0,
|
|
672
|
+
type: ImageRepositoryService,
|
|
673
|
+
decorators: [{
|
|
674
|
+
type: Injectable,
|
|
675
|
+
args: [{ providedIn: "root" }]
|
|
676
|
+
}]
|
|
677
|
+
});
|
|
678
|
+
var IconService = class IconService {
|
|
679
|
+
constructor() {
|
|
680
|
+
this.iconServiceInterface = new IconService$1();
|
|
681
|
+
}
|
|
682
|
+
get iconTopic() {
|
|
683
|
+
return this.iconServiceInterface.iconTopic;
|
|
684
|
+
}
|
|
685
|
+
requestIcon(name, type) {
|
|
686
|
+
return this.iconServiceInterface.requestIcon(name, type);
|
|
687
|
+
}
|
|
688
|
+
requestIconAsync(name, type, fallbackClass) {
|
|
689
|
+
return this.iconServiceInterface.requestIconAsync(name, type, fallbackClass);
|
|
690
|
+
}
|
|
691
|
+
ngOnDestroy() {
|
|
692
|
+
this.iconServiceInterface.destroy();
|
|
693
|
+
}
|
|
694
|
+
static {
|
|
695
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
696
|
+
minVersion: "12.0.0",
|
|
697
|
+
version: "22.2.0",
|
|
698
|
+
ngImport: i0,
|
|
699
|
+
type: IconService,
|
|
700
|
+
deps: [],
|
|
701
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
static {
|
|
705
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
706
|
+
minVersion: "12.0.0",
|
|
707
|
+
version: "22.2.0",
|
|
708
|
+
ngImport: i0,
|
|
709
|
+
type: IconService,
|
|
710
|
+
providedIn: "root"
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
715
|
+
minVersion: "12.0.0",
|
|
716
|
+
version: "22.2.0",
|
|
717
|
+
ngImport: i0,
|
|
718
|
+
type: IconService,
|
|
719
|
+
decorators: [{
|
|
720
|
+
type: Injectable,
|
|
721
|
+
args: [{ providedIn: "root" }]
|
|
722
|
+
}]
|
|
723
|
+
});
|
|
724
|
+
var DynamicTranslationService = class DynamicTranslationService {
|
|
725
|
+
constructor() {
|
|
726
|
+
this.dynamicTranslationInterface = new DynamicTranslationService$1();
|
|
727
|
+
}
|
|
728
|
+
get dynamicTranslationsTopic$() {
|
|
729
|
+
return this.dynamicTranslationInterface.dynamicTranslationsTopic$;
|
|
730
|
+
}
|
|
731
|
+
getTranslations(lang, contexts) {
|
|
732
|
+
return this.dynamicTranslationInterface.getTranslations(lang, contexts);
|
|
733
|
+
}
|
|
734
|
+
ngOnDestroy() {
|
|
735
|
+
this.dynamicTranslationInterface.destroy();
|
|
736
|
+
}
|
|
737
|
+
static {
|
|
738
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
739
|
+
minVersion: "12.0.0",
|
|
740
|
+
version: "22.2.0",
|
|
741
|
+
ngImport: i0,
|
|
742
|
+
type: DynamicTranslationService,
|
|
743
|
+
deps: [],
|
|
744
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
static {
|
|
748
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
749
|
+
minVersion: "12.0.0",
|
|
750
|
+
version: "22.2.0",
|
|
751
|
+
ngImport: i0,
|
|
752
|
+
type: DynamicTranslationService,
|
|
753
|
+
providedIn: "root"
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
758
|
+
minVersion: "12.0.0",
|
|
759
|
+
version: "22.2.0",
|
|
760
|
+
ngImport: i0,
|
|
761
|
+
type: DynamicTranslationService,
|
|
762
|
+
decorators: [{
|
|
763
|
+
type: Injectable,
|
|
764
|
+
args: [{ providedIn: "root" }]
|
|
765
|
+
}]
|
|
766
|
+
});
|
|
767
|
+
var NotificationService = class NotificationService {
|
|
768
|
+
constructor() {
|
|
769
|
+
this.notificationService = new NotificationService$1();
|
|
770
|
+
}
|
|
771
|
+
get notificationTopic() {
|
|
772
|
+
return this.notificationService.notificationTopic;
|
|
773
|
+
}
|
|
774
|
+
ngOnDestroy() {
|
|
775
|
+
this.notificationService.destroy();
|
|
776
|
+
}
|
|
777
|
+
static {
|
|
778
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
779
|
+
minVersion: "12.0.0",
|
|
780
|
+
version: "22.2.0",
|
|
781
|
+
ngImport: i0,
|
|
782
|
+
type: NotificationService,
|
|
783
|
+
deps: [],
|
|
784
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
static {
|
|
788
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
789
|
+
minVersion: "12.0.0",
|
|
790
|
+
version: "22.2.0",
|
|
791
|
+
ngImport: i0,
|
|
792
|
+
type: NotificationService,
|
|
793
|
+
providedIn: "root"
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
798
|
+
minVersion: "12.0.0",
|
|
799
|
+
version: "22.2.0",
|
|
800
|
+
ngImport: i0,
|
|
801
|
+
type: NotificationService,
|
|
802
|
+
decorators: [{
|
|
803
|
+
type: Injectable,
|
|
804
|
+
args: [{ providedIn: "root" }]
|
|
805
|
+
}]
|
|
806
|
+
});
|
|
807
|
+
export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, Capability, ConfigurationService, DYNAMIC_CONTAINER, DynamicTranslationService, IconService, ImageRepositoryService, NotificationService, POLYFILL_SCOPE_MODE, ParametersService, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService };
|
|
171
808
|
|
|
172
|
-
|
|
173
|
-
constructor() {
|
|
174
|
-
this.http = inject(HttpClient);
|
|
175
|
-
this.logger = createLogger('ConfigurationService');
|
|
176
|
-
this.defaultConfig = inject(APP_CONFIG, { optional: true });
|
|
177
|
-
this.semaphore = new Semaphore(1);
|
|
178
|
-
}
|
|
179
|
-
get config$() {
|
|
180
|
-
this._config$ ??= new ConfigurationTopic();
|
|
181
|
-
return this._config$;
|
|
182
|
-
}
|
|
183
|
-
set config$(source) {
|
|
184
|
-
this._config$ = source;
|
|
185
|
-
}
|
|
186
|
-
ngOnDestroy() {
|
|
187
|
-
this._config$?.destroy();
|
|
188
|
-
}
|
|
189
|
-
init() {
|
|
190
|
-
return new Promise((resolve, reject) => {
|
|
191
|
-
const skipRemoteConfigLoad = this.defaultConfig?.['skipRemoteConfigLoad'];
|
|
192
|
-
const remoteConfigURL = this.defaultConfig?.['remoteConfigURL'] ?? undefined;
|
|
193
|
-
resolveConfigPayload({
|
|
194
|
-
defaultConfig: this.defaultConfig ?? {},
|
|
195
|
-
skipRemoteConfigLoad: !!skipRemoteConfigLoad,
|
|
196
|
-
remoteConfigURL,
|
|
197
|
-
loadRemoteConfig: (url) => firstValueFrom(this.http.get(url)),
|
|
198
|
-
})
|
|
199
|
-
.then(async ({ config, source }) => {
|
|
200
|
-
if (source === 'inlined') {
|
|
201
|
-
this.logger.info('ENV resolved from injected config');
|
|
202
|
-
}
|
|
203
|
-
if (source === 'default' && skipRemoteConfigLoad) {
|
|
204
|
-
this.logger.info('📢 TKA001: Remote config load is disabled. To enable it, remove the "skipRemoteConfigLoad" key in your environment.json');
|
|
205
|
-
}
|
|
206
|
-
await this.config$.publish({ ...this.defaultConfig, ...(config ?? {}) }).then(() => {
|
|
207
|
-
resolve(true);
|
|
208
|
-
});
|
|
209
|
-
})
|
|
210
|
-
.catch((e) => {
|
|
211
|
-
this.logger.error('Failed to load env configuration', e);
|
|
212
|
-
reject(e);
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
get isInitialized() {
|
|
217
|
-
return this.config$.isInitialized;
|
|
218
|
-
}
|
|
219
|
-
async getProperty(key) {
|
|
220
|
-
if (!Object.values(CONFIG_KEY).includes(key)) {
|
|
221
|
-
this.logger.error('Invalid config key ', key);
|
|
222
|
-
}
|
|
223
|
-
return firstValueFrom(this.config$.pipe(map((config) => config[key])));
|
|
224
|
-
}
|
|
225
|
-
async setProperty(key, val) {
|
|
226
|
-
return this.semaphore.use(async () => {
|
|
227
|
-
const currentValues = await firstValueFrom(this.config$.asObservable());
|
|
228
|
-
currentValues[key] = val;
|
|
229
|
-
await this.config$.publish(currentValues);
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
async getConfig() {
|
|
233
|
-
return firstValueFrom(this.config$.asObservable());
|
|
234
|
-
}
|
|
235
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
236
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConfigurationService, providedIn: 'root' }); }
|
|
237
|
-
}
|
|
238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConfigurationService, decorators: [{
|
|
239
|
-
type: Injectable,
|
|
240
|
-
args: [{ providedIn: 'root' }]
|
|
241
|
-
}] });
|
|
242
|
-
|
|
243
|
-
const API_PREFIX = 'portal-api';
|
|
244
|
-
const DEFAULT_LANG = 'en';
|
|
245
|
-
|
|
246
|
-
const logger = createLogger('UserService');
|
|
247
|
-
class UserService {
|
|
248
|
-
get permissionsTopic$() {
|
|
249
|
-
this._permissionsTopic$ ??= new PermissionsTopic();
|
|
250
|
-
return this._permissionsTopic$;
|
|
251
|
-
}
|
|
252
|
-
set permissionsTopic$(source) {
|
|
253
|
-
this._permissionsTopic$ = source;
|
|
254
|
-
}
|
|
255
|
-
constructor() {
|
|
256
|
-
this.profile$ = new UserProfileTopic();
|
|
257
|
-
this.lang$ = new BehaviorSubject(determineBrowserLanguage() ?? DEFAULT_LANG);
|
|
258
|
-
this.profile$
|
|
259
|
-
.pipe(map((profile) => {
|
|
260
|
-
return resolveProfileLanguage(profile, DEFAULT_LANG, getNormalizedBrowserLocales);
|
|
261
|
-
}))
|
|
262
|
-
.subscribe(this.lang$);
|
|
263
|
-
}
|
|
264
|
-
ngOnDestroy() {
|
|
265
|
-
this.profile$.destroy();
|
|
266
|
-
this._permissionsTopic$?.destroy();
|
|
267
|
-
}
|
|
268
|
-
useOldLangSetting(profile) {
|
|
269
|
-
return resolveLegacyLanguage(profile, DEFAULT_LANG, determineBrowserLanguage);
|
|
270
|
-
}
|
|
271
|
-
getPermissions() {
|
|
272
|
-
return this.permissionsTopic$.asObservable();
|
|
273
|
-
}
|
|
274
|
-
async hasPermission(permissionKey) {
|
|
275
|
-
if (!permissionKey)
|
|
276
|
-
return true;
|
|
277
|
-
if (Array.isArray(permissionKey)) {
|
|
278
|
-
const permissions = await Promise.all(permissionKey.map((key) => this.hasPermission(key)));
|
|
279
|
-
return permissions.every((hasPermission) => hasPermission);
|
|
280
|
-
}
|
|
281
|
-
return firstValueFrom(this.permissionsTopic$.pipe(map((permissions) => {
|
|
282
|
-
const result = permissions.includes(permissionKey);
|
|
283
|
-
if (!result) {
|
|
284
|
-
logger.debug(`No permission for: ${permissionKey}`);
|
|
285
|
-
}
|
|
286
|
-
return !!result;
|
|
287
|
-
})));
|
|
288
|
-
}
|
|
289
|
-
get isInitialized() {
|
|
290
|
-
return Promise.all([
|
|
291
|
-
this.permissionsTopic$.isInitialized,
|
|
292
|
-
this.profile$.isInitialized,
|
|
293
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
294
|
-
]).then(() => { });
|
|
295
|
-
}
|
|
296
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
297
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UserService, providedIn: 'root' }); }
|
|
298
|
-
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UserService, decorators: [{
|
|
300
|
-
type: Injectable,
|
|
301
|
-
args: [{ providedIn: 'root' }]
|
|
302
|
-
}], ctorParameters: () => [] });
|
|
303
|
-
|
|
304
|
-
class ShellCapabilityService {
|
|
305
|
-
static setCapabilities(capabilities) {
|
|
306
|
-
setShellCapabilities(capabilities);
|
|
307
|
-
}
|
|
308
|
-
hasCapability(capability) {
|
|
309
|
-
return hasShellCapability(capability);
|
|
310
|
-
}
|
|
311
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ShellCapabilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
312
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ShellCapabilityService, providedIn: 'root' }); }
|
|
313
|
-
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ShellCapabilityService, decorators: [{
|
|
315
|
-
type: Injectable,
|
|
316
|
-
args: [{ providedIn: 'root' }]
|
|
317
|
-
}] });
|
|
318
|
-
|
|
319
|
-
class ParametersService {
|
|
320
|
-
constructor() {
|
|
321
|
-
this.shellCapabilityService = inject(ShellCapabilityService);
|
|
322
|
-
this.appStateService = inject(AppStateService);
|
|
323
|
-
}
|
|
324
|
-
get parameters$() {
|
|
325
|
-
this._parameters$ ??= new ParametersTopic();
|
|
326
|
-
return this._parameters$;
|
|
327
|
-
}
|
|
328
|
-
set parameters$(source) {
|
|
329
|
-
this._parameters$ = source;
|
|
330
|
-
}
|
|
331
|
-
ngOnDestroy() {
|
|
332
|
-
this._parameters$?.destroy();
|
|
333
|
-
}
|
|
334
|
-
async get(key, defaultValue, productName = undefined, appId = undefined) {
|
|
335
|
-
if (!this.shellCapabilityService.hasCapability(ShellCapability.PARAMETERS_TOPIC)) {
|
|
336
|
-
return defaultValue;
|
|
337
|
-
}
|
|
338
|
-
if (!productName) {
|
|
339
|
-
productName = await firstValueFrom(this.appStateService.currentMfe$.pipe(map((mfe) => mfe.productName)));
|
|
340
|
-
}
|
|
341
|
-
if (!appId) {
|
|
342
|
-
appId = await firstValueFrom(this.appStateService.currentMfe$.pipe(map((mfe) => mfe.appId)));
|
|
343
|
-
}
|
|
344
|
-
return firstValueFrom(this.parameters$.pipe(map((payload) => findParameterValue(payload, key, productName, appId)))).then((value) => value ?? defaultValue);
|
|
345
|
-
}
|
|
346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ParametersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
347
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ParametersService, providedIn: 'root' }); }
|
|
348
|
-
}
|
|
349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ParametersService, decorators: [{
|
|
350
|
-
type: Injectable,
|
|
351
|
-
args: [{ providedIn: 'root' }]
|
|
352
|
-
}] });
|
|
353
|
-
|
|
354
|
-
class PortalMessageService {
|
|
355
|
-
constructor() {
|
|
356
|
-
this.translateService = inject(TranslateService);
|
|
357
|
-
}
|
|
358
|
-
get message$() {
|
|
359
|
-
this._message$ ??= new MessageTopic();
|
|
360
|
-
return this._message$;
|
|
361
|
-
}
|
|
362
|
-
set message$(source) {
|
|
363
|
-
this._message$ = source;
|
|
364
|
-
}
|
|
365
|
-
success(msg) {
|
|
366
|
-
this.addTranslated('success', msg);
|
|
367
|
-
}
|
|
368
|
-
info(msg) {
|
|
369
|
-
this.addTranslated('info', msg);
|
|
370
|
-
}
|
|
371
|
-
error(msg) {
|
|
372
|
-
this.addTranslated('error', msg);
|
|
373
|
-
}
|
|
374
|
-
warning(msg) {
|
|
375
|
-
this.addTranslated('warning', msg);
|
|
376
|
-
}
|
|
377
|
-
addTranslated(severity, msg) {
|
|
378
|
-
combineLatest([
|
|
379
|
-
msg.summaryKey ? this.translateService.get(msg.summaryKey || '', msg.summaryParameters) : of(undefined),
|
|
380
|
-
msg.detailKey ? this.translateService.get(msg.detailKey, msg.detailParameters) : of(undefined),
|
|
381
|
-
])
|
|
382
|
-
.pipe(first())
|
|
383
|
-
.subscribe(([summaryTranslation, detailTranslation]) => {
|
|
384
|
-
this.message$.publish(buildPortalMessagePayload(severity, msg, summaryTranslation, detailTranslation));
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
ngOnDestroy() {
|
|
388
|
-
this._message$?.destroy();
|
|
389
|
-
}
|
|
390
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PortalMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
391
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PortalMessageService, providedIn: 'any' }); }
|
|
392
|
-
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PortalMessageService, decorators: [{
|
|
394
|
-
type: Injectable,
|
|
395
|
-
args: [{ providedIn: 'any' }]
|
|
396
|
-
}] });
|
|
397
|
-
|
|
398
|
-
class ThemeService {
|
|
399
|
-
get currentTheme$() {
|
|
400
|
-
this._currentTheme$ ??= new CurrentThemeTopic();
|
|
401
|
-
return this._currentTheme$;
|
|
402
|
-
}
|
|
403
|
-
set currentTheme$(source) {
|
|
404
|
-
this._currentTheme$ = source;
|
|
405
|
-
}
|
|
406
|
-
ngOnDestroy() {
|
|
407
|
-
this._currentTheme$?.destroy();
|
|
408
|
-
}
|
|
409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
410
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
|
|
411
|
-
}
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, decorators: [{
|
|
413
|
-
type: Injectable,
|
|
414
|
-
args: [{ providedIn: 'root' }]
|
|
415
|
-
}] });
|
|
416
|
-
|
|
417
|
-
class RemoteComponentsService {
|
|
418
|
-
get remoteComponents$() {
|
|
419
|
-
this._remoteComponents$ ??= new RemoteComponentsTopic();
|
|
420
|
-
return this._remoteComponents$;
|
|
421
|
-
}
|
|
422
|
-
set remoteComponents$(source) {
|
|
423
|
-
this._remoteComponents$ = source;
|
|
424
|
-
}
|
|
425
|
-
ngOnDestroy() {
|
|
426
|
-
this._remoteComponents$?.destroy();
|
|
427
|
-
}
|
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
429
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' }); }
|
|
430
|
-
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RemoteComponentsService, decorators: [{
|
|
432
|
-
type: Injectable,
|
|
433
|
-
args: [{ providedIn: 'root' }]
|
|
434
|
-
}] });
|
|
435
|
-
|
|
436
|
-
class WorkspaceService {
|
|
437
|
-
constructor() {
|
|
438
|
-
this.appStateService = inject(AppStateService);
|
|
439
|
-
this.logger = createLogger('WorkspaceService');
|
|
440
|
-
}
|
|
441
|
-
getUrl(productName, appId, endpointName, endpointParameters) {
|
|
442
|
-
return this.appStateService.currentWorkspace$.pipe(map((workspace) => {
|
|
443
|
-
const finalUrl = constructRouteUrl(workspace, appId, productName, endpointName, endpointParameters, this.logger.warn);
|
|
444
|
-
return finalUrl;
|
|
445
|
-
}));
|
|
446
|
-
}
|
|
447
|
-
doesUrlExistFor(productName, appId, endpointName) {
|
|
448
|
-
return this.appStateService.currentWorkspace$.pipe(map((workspace) => doesUrlExistForWorkspace(workspace, productName, appId, endpointName, this.logger.warn)));
|
|
449
|
-
}
|
|
450
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WorkspaceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
451
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WorkspaceService, providedIn: 'root' }); }
|
|
452
|
-
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WorkspaceService, decorators: [{
|
|
454
|
-
type: Injectable,
|
|
455
|
-
args: [{
|
|
456
|
-
providedIn: 'root',
|
|
457
|
-
}]
|
|
458
|
-
}] });
|
|
459
|
-
|
|
460
|
-
class ImageRepositoryService {
|
|
461
|
-
constructor() {
|
|
462
|
-
this.imageRepositoryInterface = new ImageRepositoryService$1();
|
|
463
|
-
}
|
|
464
|
-
get imageRepositoryTopic() {
|
|
465
|
-
return this.imageRepositoryInterface.imageRepositoryTopic;
|
|
466
|
-
}
|
|
467
|
-
async getUrl(names, fallbackUrl) {
|
|
468
|
-
if (fallbackUrl) {
|
|
469
|
-
return this.imageRepositoryInterface.getUrl(names, fallbackUrl);
|
|
470
|
-
}
|
|
471
|
-
return this.imageRepositoryInterface.getUrl(names);
|
|
472
|
-
}
|
|
473
|
-
ngOnDestroy() {
|
|
474
|
-
this.imageRepositoryInterface.destroy();
|
|
475
|
-
}
|
|
476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ImageRepositoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
477
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ImageRepositoryService, providedIn: 'root' }); }
|
|
478
|
-
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ImageRepositoryService, decorators: [{
|
|
480
|
-
type: Injectable,
|
|
481
|
-
args: [{ providedIn: 'root' }]
|
|
482
|
-
}] });
|
|
483
|
-
|
|
484
|
-
class IconService {
|
|
485
|
-
constructor() {
|
|
486
|
-
this.iconServiceInterface = new IconService$1();
|
|
487
|
-
}
|
|
488
|
-
get iconTopic() {
|
|
489
|
-
return this.iconServiceInterface.iconTopic;
|
|
490
|
-
}
|
|
491
|
-
requestIcon(name, type) {
|
|
492
|
-
return this.iconServiceInterface.requestIcon(name, type);
|
|
493
|
-
}
|
|
494
|
-
requestIconAsync(name, type, fallbackClass) {
|
|
495
|
-
return this.iconServiceInterface.requestIconAsync(name, type, fallbackClass);
|
|
496
|
-
}
|
|
497
|
-
ngOnDestroy() {
|
|
498
|
-
this.iconServiceInterface.destroy();
|
|
499
|
-
}
|
|
500
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
501
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, providedIn: 'root' }); }
|
|
502
|
-
}
|
|
503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, decorators: [{
|
|
504
|
-
type: Injectable,
|
|
505
|
-
args: [{ providedIn: 'root' }]
|
|
506
|
-
}] });
|
|
507
|
-
|
|
508
|
-
class DynamicTranslationService {
|
|
509
|
-
constructor() {
|
|
510
|
-
this.dynamicTranslationInterface = new DynamicTranslationService$1();
|
|
511
|
-
}
|
|
512
|
-
get dynamicTranslationsTopic$() {
|
|
513
|
-
return this.dynamicTranslationInterface.dynamicTranslationsTopic$;
|
|
514
|
-
}
|
|
515
|
-
getTranslations(lang, contexts) {
|
|
516
|
-
return this.dynamicTranslationInterface.getTranslations(lang, contexts);
|
|
517
|
-
}
|
|
518
|
-
ngOnDestroy() {
|
|
519
|
-
this.dynamicTranslationInterface.destroy();
|
|
520
|
-
}
|
|
521
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
522
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicTranslationService, providedIn: 'root' }); }
|
|
523
|
-
}
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicTranslationService, decorators: [{
|
|
525
|
-
type: Injectable,
|
|
526
|
-
args: [{ providedIn: 'root' }]
|
|
527
|
-
}] });
|
|
528
|
-
|
|
529
|
-
class NotificationService {
|
|
530
|
-
constructor() {
|
|
531
|
-
this.notificationService = new NotificationService$1();
|
|
532
|
-
}
|
|
533
|
-
get notificationTopic() {
|
|
534
|
-
return this.notificationService.notificationTopic;
|
|
535
|
-
}
|
|
536
|
-
ngOnDestroy() {
|
|
537
|
-
this.notificationService.destroy();
|
|
538
|
-
}
|
|
539
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
540
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
|
|
541
|
-
}
|
|
542
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, decorators: [{
|
|
543
|
-
type: Injectable,
|
|
544
|
-
args: [{ providedIn: 'root' }]
|
|
545
|
-
}] });
|
|
546
|
-
|
|
547
|
-
// services
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Generated bundle index. Do not edit.
|
|
551
|
-
*/
|
|
552
|
-
|
|
553
|
-
export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, ConfigurationService, DYNAMIC_CONTAINER, DynamicTranslationService, IconService, ImageRepositoryService, NotificationService, POLYFILL_SCOPE_MODE, ParametersService, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService };
|
|
554
|
-
//# sourceMappingURL=onecx-angular-integration-interface.mjs.map
|
|
809
|
+
//# sourceMappingURL=onecx-angular-integration-interface.mjs.map
|