@onecx/angular-integration-interface 8.0.0-rc.1 → 8.0.0-rc.10

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.
Files changed (33) hide show
  1. package/README.md +13 -4
  2. package/fesm2022/onecx-angular-integration-interface-mocks.mjs +23 -26
  3. package/fesm2022/onecx-angular-integration-interface-mocks.mjs.map +1 -1
  4. package/fesm2022/onecx-angular-integration-interface.mjs +152 -68
  5. package/fesm2022/onecx-angular-integration-interface.mjs.map +1 -1
  6. package/package.json +7 -12
  7. package/{mocks/index.d.ts → types/onecx-angular-integration-interface-mocks.d.ts} +0 -1
  8. package/{index.d.ts → types/onecx-angular-integration-interface.d.ts} +60 -19
  9. package/migrations/index.d.ts +0 -5
  10. package/migrations/index.js +0 -9
  11. package/migrations/index.js.map +0 -1
  12. package/migrations/test-utils/test-setup.d.ts +0 -1
  13. package/migrations/test-utils/test-setup.js +0 -6
  14. package/migrations/test-utils/test-setup.js.map +0 -1
  15. package/migrations/v6/migrate-onecx-to-v6.d.ts +0 -2
  16. package/migrations/v6/migrate-onecx-to-v6.js +0 -8
  17. package/migrations/v6/migrate-onecx-to-v6.js.map +0 -1
  18. package/migrations/v6/remove-add-initialize-module-guard.d.ts +0 -2
  19. package/migrations/v6/remove-add-initialize-module-guard.js +0 -29
  20. package/migrations/v6/remove-add-initialize-module-guard.js.map +0 -1
  21. package/migrations/v6/remove-auth-service.d.ts +0 -2
  22. package/migrations/v6/remove-auth-service.js +0 -28
  23. package/migrations/v6/remove-auth-service.js.map +0 -1
  24. package/migrations/v6/replace-provide-app-service-mock.d.ts +0 -2
  25. package/migrations/v6/replace-provide-app-service-mock.js +0 -14
  26. package/migrations/v6/replace-provide-app-service-mock.js.map +0 -1
  27. package/migrations/v6/utils/remove-and-track-import.d.ts +0 -2
  28. package/migrations/v6/utils/remove-and-track-import.js +0 -14
  29. package/migrations/v6/utils/remove-and-track-import.js.map +0 -1
  30. package/migrations/v6/warn-removed-properties-from-theme-service.d.ts +0 -3
  31. package/migrations/v6/warn-removed-properties-from-theme-service.js +0 -24
  32. package/migrations/v6/warn-removed-properties-from-theme-service.js.map +0 -1
  33. package/migrations.json +0 -58
@@ -3,14 +3,19 @@ import { HttpClient } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
4
  import { inject, Injectable, InjectionToken } from '@angular/core';
5
5
  import { BehaviorSubject, firstValueFrom, map, combineLatest, of, first } from 'rxjs';
6
- import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentLocationTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, PermissionsTopic, UserProfileTopic, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic, ImageRepositoryService as ImageRepositoryService$1 } from '@onecx/integration-interface';
6
+ import { createLoggerFactory, getNormalizedBrowserLocales } from '@onecx/accelerator';
7
+ import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentLocationTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, PermissionsTopic, UserProfileTopic, ParametersTopic, ShellCapability, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic, ImageRepositoryService as ImageRepositoryService$1, IconService as IconService$1, DynamicTranslationService as DynamicTranslationService$1 } from '@onecx/integration-interface';
8
+ export { ShellCapability as Capability } from '@onecx/integration-interface';
7
9
  import Semaphore from 'ts-semaphore';
8
- import { getNormalizedBrowserLocales } from '@onecx/accelerator';
9
10
  import { TranslateService } from '@ngx-translate/core';
10
11
 
12
+ // This file is not planned to be in the index.ts so it is private to this lib
13
+ const createLogger = createLoggerFactory('@onecx/angular-integration-interface');
14
+
11
15
  class AppConfigService {
12
16
  constructor() {
13
17
  this.http = inject(HttpClient);
18
+ this.logger = createLogger('AppConfigService');
14
19
  this.config$ = new BehaviorSubject({});
15
20
  }
16
21
  init(baseUrl) {
@@ -24,7 +29,7 @@ class AppConfigService {
24
29
  }
25
30
  })
26
31
  .catch((e) => {
27
- console.log(`Failed to load env configuration`);
32
+ this.logger.error('Failed to load env configuration', e);
28
33
  reject(e);
29
34
  });
30
35
  });
@@ -38,10 +43,10 @@ class AppConfigService {
38
43
  getConfig() {
39
44
  return this.config$.getValue();
40
45
  }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
42
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigService }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
47
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigService }); }
43
48
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigService, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigService, decorators: [{
45
50
  type: Injectable
46
51
  }] });
47
52
 
@@ -108,10 +113,10 @@ class AppStateService {
108
113
  this._currentWorkspace$?.destroy();
109
114
  this._isAuthenticated$?.destroy();
110
115
  }
111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
112
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateService, providedIn: 'root' }); }
116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
117
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppStateService, providedIn: 'root' }); }
113
118
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateService, decorators: [{
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppStateService, decorators: [{
115
120
  type: Injectable,
116
121
  args: [{ providedIn: 'root' }]
117
122
  }] });
@@ -150,6 +155,7 @@ var CONFIG_KEY;
150
155
  CONFIG_KEY["AUTH_SERVICE_CUSTOM_URL"] = "AUTH_SERVICE_CUSTOM_URL";
151
156
  CONFIG_KEY["AUTH_SERVICE_CUSTOM_MODULE_NAME"] = "AUTH_SERVICE_CUSTOM_MODULE_NAME";
152
157
  CONFIG_KEY["POLYFILL_SCOPE_MODE"] = "POLYFILL_SCOPE_MODE";
158
+ CONFIG_KEY["KEYBOARD_FOCUSABLE_SELECTOR"] = "KEYBOARD_FOCUSABLE_SELECTOR";
153
159
  })(CONFIG_KEY || (CONFIG_KEY = {}));
154
160
  var POLYFILL_SCOPE_MODE;
155
161
  (function (POLYFILL_SCOPE_MODE) {
@@ -160,6 +166,7 @@ var POLYFILL_SCOPE_MODE;
160
166
  class ConfigurationService {
161
167
  constructor() {
162
168
  this.http = inject(HttpClient);
169
+ this.logger = createLogger('ConfigurationService');
163
170
  this.defaultConfig = inject(APP_CONFIG, { optional: true });
164
171
  this.semaphore = new Semaphore(1);
165
172
  }
@@ -179,12 +186,12 @@ class ConfigurationService {
179
186
  let loadConfigPromise;
180
187
  const inlinedConfig = window['APP_CONFIG'];
181
188
  if (inlinedConfig) {
182
- console.log(`ENV resolved from injected config`);
189
+ this.logger.info('ENV resolved from injected config');
183
190
  loadConfigPromise = Promise.resolve(inlinedConfig);
184
191
  }
185
192
  else {
186
193
  if (skipRemoteConfigLoad) {
187
- console.log('📢 TKA001: Remote config load is disabled. To enable it, remove the "skipRemoteConfigLoad" key in your environment.json');
194
+ this.logger.info('📢 TKA001: Remote config load is disabled. To enable it, remove the "skipRemoteConfigLoad" key in your environment.json');
188
195
  loadConfigPromise = Promise.resolve(this.defaultConfig || {});
189
196
  }
190
197
  else {
@@ -198,7 +205,7 @@ class ConfigurationService {
198
205
  });
199
206
  })
200
207
  .catch((e) => {
201
- console.log(`Failed to load env configuration`);
208
+ this.logger.error('Failed to load env configuration', e);
202
209
  reject(e);
203
210
  });
204
211
  });
@@ -208,7 +215,7 @@ class ConfigurationService {
208
215
  }
209
216
  async getProperty(key) {
210
217
  if (!Object.values(CONFIG_KEY).includes(key)) {
211
- console.error('Invalid config key ', key);
218
+ this.logger.error('Invalid config key ', key);
212
219
  }
213
220
  return firstValueFrom(this.config$.pipe(map((config) => config[key])));
214
221
  }
@@ -222,10 +229,10 @@ class ConfigurationService {
222
229
  async getConfig() {
223
230
  return firstValueFrom(this.config$.asObservable());
224
231
  }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
226
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationService, providedIn: 'root' }); }
232
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
233
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConfigurationService, providedIn: 'root' }); }
227
234
  }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationService, decorators: [{
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConfigurationService, decorators: [{
229
236
  type: Injectable,
230
237
  args: [{ providedIn: 'root' }]
231
238
  }] });
@@ -233,6 +240,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
233
240
  const API_PREFIX = 'portal-api';
234
241
  const DEFAULT_LANG = 'en';
235
242
 
243
+ const logger = createLogger('UserService');
236
244
  class UserService {
237
245
  get permissionsTopic$() {
238
246
  this._permissionsTopic$ ??= new PermissionsTopic();
@@ -281,7 +289,7 @@ class UserService {
281
289
  return firstValueFrom(this.permissionsTopic$.pipe(map((permissions) => {
282
290
  const result = permissions.includes(permissionKey);
283
291
  if (!result) {
284
- console.log(`👮‍♀️ No permission for: ${permissionKey}`);
292
+ logger.debug(`No permission for: ${permissionKey}`);
285
293
  }
286
294
  return !!result;
287
295
  })));
@@ -310,14 +318,71 @@ class UserService {
310
318
  // eslint-disable-next-line @typescript-eslint/no-empty-function
311
319
  ]).then(() => { });
312
320
  }
313
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
314
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserService, providedIn: 'root' }); }
321
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
322
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UserService, providedIn: 'root' }); }
315
323
  }
316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserService, decorators: [{
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UserService, decorators: [{
317
325
  type: Injectable,
318
326
  args: [{ providedIn: 'root' }]
319
327
  }], ctorParameters: () => [] });
320
328
 
329
+ class ShellCapabilityService {
330
+ static setCapabilities(capabilities) {
331
+ window['onecx-shell-capabilities'] = capabilities;
332
+ }
333
+ hasCapability(capability) {
334
+ return window['onecx-shell-capabilities']?.includes(capability) ?? false;
335
+ }
336
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ShellCapabilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
337
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ShellCapabilityService, providedIn: 'root' }); }
338
+ }
339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ShellCapabilityService, decorators: [{
340
+ type: Injectable,
341
+ args: [{ providedIn: 'root' }]
342
+ }] });
343
+
344
+ class ParametersService {
345
+ constructor() {
346
+ this.shellCapabilityService = inject(ShellCapabilityService);
347
+ this.appStateService = inject(AppStateService);
348
+ }
349
+ get parameters$() {
350
+ this._parameters$ ??= new ParametersTopic();
351
+ return this._parameters$;
352
+ }
353
+ set parameters$(source) {
354
+ this._parameters$ = source;
355
+ }
356
+ ngOnDestroy() {
357
+ this._parameters$?.destroy();
358
+ }
359
+ async get(key, defaultValue, productName = undefined, appId = undefined) {
360
+ if (!this.shellCapabilityService.hasCapability(ShellCapability.PARAMETERS_TOPIC)) {
361
+ return Promise.resolve(defaultValue);
362
+ }
363
+ if (!productName) {
364
+ productName = await firstValueFrom(this.appStateService.currentMfe$.pipe(map((mfe) => mfe.productName)));
365
+ }
366
+ if (!appId) {
367
+ appId = await firstValueFrom(this.appStateService.currentMfe$.pipe(map((mfe) => mfe.appId)));
368
+ }
369
+ return firstValueFrom(this.parameters$.pipe(map((payload) => payload.parameters.find((p) => p.productName === productName && p.appId === appId)?.parameters[key]))).then((value) => {
370
+ if (value === undefined) {
371
+ return Promise.resolve(defaultValue);
372
+ }
373
+ else {
374
+ return Promise.resolve(value);
375
+ }
376
+ });
377
+ }
378
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ParametersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
379
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ParametersService, providedIn: 'root' }); }
380
+ }
381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ParametersService, decorators: [{
382
+ type: Injectable,
383
+ args: [{ providedIn: 'root' }]
384
+ }] });
385
+
321
386
  class PortalMessageService {
322
387
  constructor() {
323
388
  this.translateService = inject(TranslateService);
@@ -359,10 +424,10 @@ class PortalMessageService {
359
424
  ngOnDestroy() {
360
425
  this._message$?.destroy();
361
426
  }
362
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
363
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageService, providedIn: 'any' }); }
427
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PortalMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
428
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PortalMessageService, providedIn: 'any' }); }
364
429
  }
365
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageService, decorators: [{
430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PortalMessageService, decorators: [{
366
431
  type: Injectable,
367
432
  args: [{ providedIn: 'any' }]
368
433
  }] });
@@ -378,10 +443,10 @@ class ThemeService {
378
443
  ngOnDestroy() {
379
444
  this._currentTheme$?.destroy();
380
445
  }
381
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
382
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
446
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
447
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
383
448
  }
384
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ThemeService, decorators: [{
449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, decorators: [{
385
450
  type: Injectable,
386
451
  args: [{ providedIn: 'root' }]
387
452
  }] });
@@ -397,10 +462,10 @@ class RemoteComponentsService {
397
462
  ngOnDestroy() {
398
463
  this._remoteComponents$?.destroy();
399
464
  }
400
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
401
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' }); }
465
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
466
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' }); }
402
467
  }
403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsService, decorators: [{
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RemoteComponentsService, decorators: [{
404
469
  type: Injectable,
405
470
  args: [{ providedIn: 'root' }]
406
471
  }] });
@@ -408,6 +473,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
408
473
  class WorkspaceService {
409
474
  constructor() {
410
475
  this.appStateService = inject(AppStateService);
476
+ this.logger = createLogger('WorkspaceService');
411
477
  this.aliasStart = '[[';
412
478
  this.aliasEnd = ']]';
413
479
  this.paramStart = '{';
@@ -440,7 +506,7 @@ class WorkspaceService {
440
506
  }
441
507
  constructBaseUrlFromWorkspace(workspace) {
442
508
  if (workspace.baseUrl === undefined) {
443
- console.log('WARNING: There was no baseUrl for received workspace.');
509
+ this.logger.warn('There was no baseUrl for received workspace.');
444
510
  return '';
445
511
  }
446
512
  return workspace.baseUrl;
@@ -449,7 +515,7 @@ class WorkspaceService {
449
515
  const route = this.filterRouteFromList(workspace.routes, appId, productName);
450
516
  let url = this.constructBaseUrlFromWorkspace(workspace);
451
517
  if (!route) {
452
- console.log(`WARNING: No route.baseUrl could be found for given appId "${appId}" and productName "${productName}"`);
518
+ this.logger.warn(`No route.baseUrl could be found for given appId "${appId}" and productName "${productName}"`);
453
519
  return url;
454
520
  }
455
521
  if (route.baseUrl !== undefined && route.baseUrl.length > 0) {
@@ -467,12 +533,12 @@ class WorkspaceService {
467
533
  }
468
534
  const finalEndpoint = this.dissolveEndpoint(endpointName, route.endpoints);
469
535
  if (!finalEndpoint || finalEndpoint.path === undefined) {
470
- console.log('WARNING: No endpoint or endpoint.path could be found');
536
+ this.logger.warn('No endpoint or endpoint.path could be found');
471
537
  return '';
472
538
  }
473
539
  const paramsFilled = this.fillParamsForPath(finalEndpoint.path, endpointParameters);
474
540
  if (paramsFilled === undefined) {
475
- console.log('WARNING: Params could not be filled correctly');
541
+ this.logger.warn('Params could not be filled correctly');
476
542
  return '';
477
543
  }
478
544
  return paramsFilled;
@@ -486,7 +552,7 @@ class WorkspaceService {
486
552
  return undefined;
487
553
  }
488
554
  if (productRoutes.length > 1) {
489
- console.log('WARNING: There were more than one route. First route has been used.');
555
+ this.logger.warn('There were more than one route. First route has been used.');
490
556
  }
491
557
  return productRoutes[0];
492
558
  }
@@ -518,7 +584,7 @@ class WorkspaceService {
518
584
  path = path.replace(this.paramStart.concat(paramName).concat(this.paramEnd), paramValue);
519
585
  }
520
586
  else {
521
- console.log(`WARNING: Searched param "${paramName}" was not found in given param list `);
587
+ this.logger.warn(`Searched param "${paramName}" was not found in given param list `);
522
588
  return '';
523
589
  }
524
590
  }
@@ -535,37 +601,16 @@ class WorkspaceService {
535
601
  return String(value);
536
602
  }
537
603
  }
538
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WorkspaceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
539
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WorkspaceService, providedIn: 'root' }); }
604
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WorkspaceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
605
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WorkspaceService, providedIn: 'root' }); }
540
606
  }
541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WorkspaceService, decorators: [{
607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WorkspaceService, decorators: [{
542
608
  type: Injectable,
543
609
  args: [{
544
610
  providedIn: 'root',
545
611
  }]
546
612
  }] });
547
613
 
548
- var Capability;
549
- (function (Capability) {
550
- Capability["CURRENT_LOCATION_TOPIC"] = "currentLocationTopic";
551
- Capability["PARAMETERS_TOPIC"] = "parametersTopic";
552
- Capability["ACTIVENESS_AWARE_MENUS"] = "activenessAwareMenus";
553
- })(Capability || (Capability = {}));
554
- class ShellCapabilityService {
555
- static setCapabilities(capabilities) {
556
- window['onecx-shell-capabilities'] = capabilities;
557
- }
558
- hasCapability(capability) {
559
- return window['onecx-shell-capabilities']?.includes(capability) ?? false;
560
- }
561
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
562
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityService, providedIn: 'root' }); }
563
- }
564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityService, decorators: [{
565
- type: Injectable,
566
- args: [{ providedIn: 'root' }]
567
- }] });
568
-
569
614
  class ImageRepositoryService {
570
615
  constructor() {
571
616
  this.imageRepositoryInterface = new ImageRepositoryService$1();
@@ -573,9 +618,6 @@ class ImageRepositoryService {
573
618
  get imageRepositoryTopic() {
574
619
  return this.imageRepositoryInterface.imageRepositoryTopic;
575
620
  }
576
- set imageRepositoryTopic(source) {
577
- this.imageRepositoryInterface.imageRepositoryTopic = source;
578
- }
579
621
  async getUrl(names, fallbackUrl) {
580
622
  if (fallbackUrl) {
581
623
  return this.imageRepositoryInterface.getUrl(names, fallbackUrl);
@@ -585,13 +627,55 @@ class ImageRepositoryService {
585
627
  ngOnDestroy() {
586
628
  this.imageRepositoryInterface.destroy();
587
629
  }
588
- destroy() {
589
- this.ngOnDestroy();
630
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ImageRepositoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
631
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ImageRepositoryService, providedIn: 'root' }); }
632
+ }
633
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ImageRepositoryService, decorators: [{
634
+ type: Injectable,
635
+ args: [{ providedIn: 'root' }]
636
+ }] });
637
+
638
+ class IconService {
639
+ constructor() {
640
+ this.iconServiceInterface = new IconService$1();
641
+ }
642
+ get iconTopic() {
643
+ return this.iconServiceInterface.iconTopic;
644
+ }
645
+ requestIcon(name, type) {
646
+ return this.iconServiceInterface.requestIcon(name, type);
647
+ }
648
+ requestIconAsync(name, type) {
649
+ return this.iconServiceInterface.requestIconAsync(name, type);
650
+ }
651
+ ngOnDestroy() {
652
+ this.iconServiceInterface.destroy();
653
+ }
654
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
655
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, providedIn: 'root' }); }
656
+ }
657
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: IconService, decorators: [{
658
+ type: Injectable,
659
+ args: [{ providedIn: 'root' }]
660
+ }] });
661
+
662
+ class DynamicTranslationService {
663
+ constructor() {
664
+ this.dynamicTranslationInterface = new DynamicTranslationService$1();
665
+ }
666
+ get dynamicTranslationsTopic$() {
667
+ return this.dynamicTranslationInterface.dynamicTranslationsTopic$;
668
+ }
669
+ getTranslations(lang, contexts) {
670
+ return this.dynamicTranslationInterface.getTranslations(lang, contexts);
671
+ }
672
+ ngOnDestroy() {
673
+ this.dynamicTranslationInterface.destroy();
590
674
  }
591
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageRepositoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
592
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageRepositoryService, providedIn: 'root' }); }
675
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
676
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicTranslationService, providedIn: 'root' }); }
593
677
  }
594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageRepositoryService, decorators: [{
678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicTranslationService, decorators: [{
595
679
  type: Injectable,
596
680
  args: [{ providedIn: 'root' }]
597
681
  }] });
@@ -602,5 +686,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
602
686
  * Generated bundle index. Do not edit.
603
687
  */
604
688
 
605
- export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, Capability, ConfigurationService, ImageRepositoryService, POLYFILL_SCOPE_MODE, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService };
689
+ export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, ConfigurationService, DynamicTranslationService, IconService, ImageRepositoryService, POLYFILL_SCOPE_MODE, ParametersService, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService };
606
690
  //# sourceMappingURL=onecx-angular-integration-interface.mjs.map