@onecx/angular-integration-interface 4.15.2 → 4.15.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,13 +13,17 @@ export class UserService {
13
13
  .pipe(map((profile) => profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG))
14
14
  .subscribe(this.lang$);
15
15
  this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$);
16
- this.permissionsTopic$.subscribe(this.permissions$);
17
16
  }
18
17
  ngOnDestroy() {
19
18
  this.profile$.destroy();
20
19
  }
21
20
  hasPermission(permissionKey) {
22
- const result = this.permissions$.getValue() ? this.permissions$.getValue()?.includes(permissionKey) : false;
21
+ const oldConceptResult = this.permissions$.getValue()
22
+ ? this.permissions$.getValue()?.includes(permissionKey)
23
+ : false;
24
+ const result = this.permissionsTopic$.getValue()
25
+ ? this.permissionsTopic$.getValue()?.includes(permissionKey)
26
+ : oldConceptResult;
23
27
  if (!result) {
24
28
  console.log(`👮‍♀️ No permission for: ${permissionKey}`);
25
29
  }
@@ -61,6 +65,10 @@ export class UserService {
61
65
  }
62
66
  return permissions;
63
67
  }
68
+ get isInitialized() {
69
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
70
+ return Promise.all([this.permissionsTopic$.isInitialized, this.profile$.isInitialized]).then(() => { });
71
+ }
64
72
  }
65
73
  UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
66
74
  UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, providedIn: 'root' });
@@ -68,4 +76,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
68
76
  type: Injectable,
69
77
  args: [{ providedIn: 'root' }]
70
78
  }], ctorParameters: function () { return []; } });
71
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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FjaCgocikgPT4ge1xuICAgICAgICAgICAgci5wZXJtaXNzaW9ucz8uZm9yRWFjaCgocCkgPT4ge1xuICAgICAgICAgICAgICBpZiAocCkge1xuICAgICAgICAgICAgICAgIGlmIChwLmtleSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBwZXJtaXNzaW9ucy5wdXNoKHAua2V5KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gcGVybWlzc2lvbnNcbiAgfVxuXG4gIGdldCBpc0luaXRpYWxpemVkKCk6IFByb21pc2U8dm9pZD4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZW1wdHktZnVuY3Rpb25cbiAgICByZXR1cm4gUHJvbWlzZS5hbGwoW3RoaXMucGVybWlzc2lvbnNUb3BpYyQuaXNJbml0aWFsaXplZCwgdGhpcy5wcm9maWxlJC5pc0luaXRpYWxpemVkXSkudGhlbigoKSA9PiB7fSlcbiAgfVxufVxuIl19
@@ -170,14 +170,18 @@ class UserService {
170
170
  .pipe(map((profile) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = profile.accountSettings) === null || _a === void 0 ? void 0 : _a.localeAndTimeSettings) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : this.determineLanguage()) !== null && _d !== void 0 ? _d : DEFAULT_LANG; }))
171
171
  .subscribe(this.lang$);
172
172
  this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$);
173
- this.permissionsTopic$.subscribe(this.permissions$);
174
173
  }
175
174
  ngOnDestroy() {
176
175
  this.profile$.destroy();
177
176
  }
178
177
  hasPermission(permissionKey) {
179
- var _a;
180
- const result = this.permissions$.getValue() ? (_a = this.permissions$.getValue()) === null || _a === void 0 ? void 0 : _a.includes(permissionKey) : false;
178
+ var _a, _b;
179
+ const oldConceptResult = this.permissions$.getValue()
180
+ ? (_a = this.permissions$.getValue()) === null || _a === void 0 ? void 0 : _a.includes(permissionKey)
181
+ : false;
182
+ const result = this.permissionsTopic$.getValue()
183
+ ? (_b = this.permissionsTopic$.getValue()) === null || _b === void 0 ? void 0 : _b.includes(permissionKey)
184
+ : oldConceptResult;
181
185
  if (!result) {
182
186
  console.log(`👮‍♀️ No permission for: ${permissionKey}`);
183
187
  }
@@ -221,6 +225,10 @@ class UserService {
221
225
  }
222
226
  return permissions;
223
227
  }
228
+ get isInitialized() {
229
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
230
+ return Promise.all([this.permissionsTopic$.isInitialized, this.profile$.isInitialized]).then(() => { });
231
+ }
224
232
  }
225
233
  UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
226
234
  UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, providedIn: 'root' });
@@ -1 +1 @@
1
- {"version":3,"file":"onecx-angular-integration-interface.mjs","sources":["../../../../libs/angular-integration-interface/src/lib/services/app-state.service.ts","../../../../libs/angular-integration-interface/src/lib/api/injection-tokens.ts","../../../../libs/angular-integration-interface/src/lib/model/config-key.model.ts","../../../../libs/angular-integration-interface/src/lib/services/configuration.service.ts","../../../../libs/angular-integration-interface/src/lib/api/constants.ts","../../../../libs/angular-integration-interface/src/lib/services/user.service.ts","../../../../libs/angular-integration-interface/src/lib/services/portal-message.service.ts","../../../../libs/angular-integration-interface/src/lib/services/theme.service.ts","../../../../libs/angular-integration-interface/src/lib/services/remote-components.service.ts","../../../../libs/angular-integration-interface/src/index.ts","../../../../libs/angular-integration-interface/src/onecx-angular-integration-interface.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core'\nimport {\n GlobalErrorTopic,\n GlobalLoadingTopic,\n CurrentMfeTopic,\n CurrentPageTopic,\n CurrentWorkspaceTopic,\n IsAuthenticatedTopic,\n} from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class AppStateService implements OnDestroy {\n globalError$ = new GlobalErrorTopic()\n globalLoading$ = new GlobalLoadingTopic()\n currentMfe$ = new CurrentMfeTopic()\n\n /**\n * This topic will only fire when pageInfo.path matches document.location.pathname,\n * if not it will fire undefined.\n */\n currentPage$ = new CurrentPageTopic()\n currentWorkspace$ = new CurrentWorkspaceTopic()\n \n /**\n * @deprecated Will be replaced by currentWorkspace$\n */\n get currentPortal$() {\n return this.currentWorkspace$\n }\n set currentPortal$(value: CurrentWorkspaceTopic) {\n this.currentWorkspace$ = value\n }\n\n /**\n * This Topic is initialized as soon as the authentication is done\n */\n isAuthenticated$ = new IsAuthenticatedTopic()\n\n ngOnDestroy(): void {\n this.globalError$.destroy()\n this.globalLoading$.destroy()\n this.currentMfe$.destroy()\n this.currentPage$.destroy()\n this.currentPortal$.destroy()\n this.currentWorkspace$.destroy()\n this.isAuthenticated$.destroy()\n }\n}\n","import { InjectionToken } from '@angular/core'\nimport { IAuthService } from './iauth.service'\n\nexport interface LibConfig {\n appId: string\n portalId: string\n /**\n * If true, the tkit-module will not try to load remote env values from server(GET /assets/env.json)\n */\n skipRemoteConfigLoad: boolean\n /**\n * URL from which the remote config will be loaded, default: '/assets/env.json'\n */\n remoteConfigURL: string\n}\nexport const APP_CONFIG = new InjectionToken<LibConfig>('APP_CONFIG')\n\nexport const AUTH_SERVICE = new InjectionToken<IAuthService>('AUTH_SERVICE')\n\nexport const SANITY_CHECK = new InjectionToken<string>('OCXSANITY_CHECK')\n\nexport const APPLICATION_NAME = new InjectionToken<string>('APPLICATION_NAME')\n","export enum CONFIG_KEY {\n TKIT_PORTAL_DEFAULT_THEME = 'TKIT_PORTAL_DEFAULT_THEME',\n TKIT_PORTAL_DISABLE_THEME_MANAGEMENT = 'TKIT_PORTAL_DISABLE_THEME_MANAGEMENT',\n TKIT_PORTAL_THEME_SERVER_URL = 'TKIT_PORTAL_THEME_SERVER_URL',\n TKIT_TOKEN_ROLE_CLAIM_NAME = 'TKIT_TOKEN_ROLE_CLAIM_NAME',\n TKIT_PORTAL_ID = 'TKIT_PORTAL_ID',\n TKIT_SUPPORTED_LANGUAGES = 'TKIT_SUPPORTED_LANGUAGES',\n TKIT_SEARCH_BASE_URL = 'TKIT_SEARCH_BASE_URL',\n APP_BASE_HREF = 'APP_BASE_HREF',\n KEYCLOAK_REALM = 'KEYCLOAK_REALM',\n KEYCLOAK_ENABLE_SILENT_SSO = 'KEYCLOAK_ENABLE_SILENT_SSO',\n KEYCLOAK_URL = 'KEYCLOAK_URL',\n KEYCLOAK_CLIENT_ID = 'KEYCLOAK_CLIENT_ID',\n ONECX_PORTAL_FAVORITES_DISABLED = 'ONECX_PORTAL_FAVORITES_DISABLED',\n ONECX_PORTAL_FEEDBACK_DISABLED = 'ONECX_PORTAL_FEEDBACK_DISABLED',\n ONECX_PORTAL_SEARCH_DISABLED = 'ONECX_PORTAL_SEARCH_DISABLED',\n ONECX_PORTAL_SUPPORT_TICKET_DISABLED = 'ONECX_PORTAL_SUPPORT_TICKET_DISABLED',\n ONECX_PORTAL_ANNOUNCEMENTS_DISABLED = 'ONECX_PORTAL_ANNOUNCEMENTS_DISABLED',\n ONECX_PORTAL_PASSWORD_CHANGE_DISABLED = 'ONECX_PORTAL_PASSWORD_CHANGE_DISABLED',\n ONECX_PORTAL_SETTINGS_DISABLED = 'ONECX_PORTAL_SETTINGS_DISABLED',\n ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED = 'ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED',\n ONECX_PORTAL_HELP_DISABLED = 'ONECX_PORTAL_HELP_DISABLED',\n APP_VERSION = 'APP_VERSION',\n IS_SHELL = 'IS_SHELL',\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Inject, Injectable, OnDestroy, Optional } from '@angular/core'\nimport { firstValueFrom } from 'rxjs'\nimport { Config, ConfigurationTopic } from '@onecx/integration-interface'\nimport { APP_CONFIG } from '../api/injection-tokens'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigurationService implements OnDestroy {\n config$ = new ConfigurationTopic()\n\n constructor(\n private http: HttpClient,\n @Optional() @Inject(APP_CONFIG) private defaultConfig?: { [key: string]: string }\n ) {}\n\n ngOnDestroy(): void {\n this.config$.destroy()\n }\n\n public init(): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const skipRemoteConfigLoad = this.defaultConfig && this.defaultConfig['skipRemoteConfigLoad']\n let loadConfigPromise: Promise<Config>\n\n const inlinedConfig = (window as typeof window & { APP_CONFIG: Config })['APP_CONFIG']\n if (inlinedConfig) {\n console.log(`ENV resolved from injected config`)\n loadConfigPromise = Promise.resolve(inlinedConfig)\n } else {\n if (skipRemoteConfigLoad) {\n console.log(\n '📢 TKA001: Remote config load is disabled. To enable it, remove the \"skipRemoteConfigLoad\" key in your environment.json'\n )\n loadConfigPromise = Promise.resolve(this.defaultConfig || {})\n } else {\n loadConfigPromise = firstValueFrom(\n this.http.get<Config>((this.defaultConfig && this.defaultConfig['remoteConfigURL']) || 'assets/env.json')\n )\n }\n }\n\n loadConfigPromise\n .then(async (config) => {\n if (config) {\n await this.config$.publish({ ...this.defaultConfig, ...config }).then(() => {\n resolve(true)\n })\n }\n })\n .catch((e) => {\n console.log(`Failed to load env configuration`)\n reject(e)\n })\n })\n }\n\n get isInitialized(): Promise<void> {\n return this.config$.isInitialized\n }\n\n public getProperty(key: CONFIG_KEY): string | undefined {\n if (!Object.values(CONFIG_KEY).includes(key)) {\n console.error('Invalid config key ', key)\n }\n return this.config$.getValue()?.[key]\n }\n\n public async setProperty(key: string, val: string) {\n const currentValues = await firstValueFrom(this.config$.asObservable())\n currentValues[key] = val\n await this.config$.publish(currentValues)\n }\n\n public getConfig(): Config | undefined {\n return this.config$.getValue()\n }\n}\n","export const API_PREFIX = 'portal-api'\n\nexport const DEFAULT_LANG = 'en'\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { BehaviorSubject, map } from 'rxjs'\nimport { PermissionsTopic, UserProfile, UserProfileTopic } from '@onecx/integration-interface'\nimport { DEFAULT_LANG } from '../api/constants'\n\n@Injectable({ providedIn: 'root' })\nexport class UserService implements OnDestroy {\n profile$ = new UserProfileTopic()\n permissions$ = new BehaviorSubject<string[]>([])\n lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG)\n\n private permissionsTopic$ = new PermissionsTopic()\n\n constructor() {\n this.profile$\n .pipe(\n map(\n (profile) =>\n profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG\n )\n )\n .subscribe(this.lang$)\n\n this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$)\n this.permissionsTopic$.subscribe(this.permissions$)\n }\n\n ngOnDestroy(): void {\n this.profile$.destroy()\n }\n\n hasPermission(permissionKey: string): boolean {\n const result = this.permissions$.getValue() ? this.permissions$.getValue()?.includes(permissionKey) : false\n if (!result) {\n console.log(`👮‍♀️ No permission for: ${permissionKey}`)\n }\n return !!result\n }\n\n private determineLanguage(): string | undefined {\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n return undefined\n }\n\n let browserLang: any = window.navigator.languages ? window.navigator.languages[0] : null\n browserLang = browserLang || window.navigator.language\n\n if (typeof browserLang === 'undefined') {\n return undefined\n }\n\n if (browserLang.indexOf('-') !== -1) {\n browserLang = browserLang.split('-')[0]\n }\n\n if (browserLang.indexOf('_') !== -1) {\n browserLang = browserLang.split('_')[0]\n }\n\n return browserLang\n }\n\n private extractPermissions(userProfile: UserProfile) {\n const permissions: string[] = []\n if (userProfile) {\n if (userProfile.memberships) {\n userProfile.memberships.forEach((m) => {\n m.roleMemberships?.forEach((r) => {\n r.permissions?.forEach((p) => {\n if (p) {\n if (p.key !== undefined) {\n permissions.push(p.key)\n }\n }\n })\n })\n })\n }\n }\n return permissions\n }\n}\n","import { Injectable } from '@angular/core'\nimport { TranslateService } from '@ngx-translate/core'\nimport { combineLatest, of } from 'rxjs'\nimport { MessageTopic } from '@onecx/integration-interface'\n\nexport type Message = {\n summaryKey?: string\n summaryParameters?: object\n detailKey?: string\n detailParameters?: object\n id?: any\n key?: string\n life?: number\n sticky?: boolean\n closable?: boolean\n data?: any\n icon?: string\n contentStyleClass?: string\n styleClass?: string\n}\n\n@Injectable({ providedIn: 'any' })\nexport class PortalMessageService {\n constructor(private translateService: TranslateService) {}\n\n message$ = new MessageTopic()\n\n success(msg: Message) {\n this.addTranslated('success', msg)\n }\n\n info(msg: Message) {\n this.addTranslated('info', msg)\n }\n\n error(msg: Message) {\n this.addTranslated('error', msg)\n }\n\n warning(msg: Message) {\n this.addTranslated('warning', msg)\n }\n\n private addTranslated(severity: string, msg: Message) {\n combineLatest([\n msg.summaryKey ? this.translateService.get(msg.summaryKey || '', msg.summaryParameters) : of(undefined),\n msg.detailKey ? this.translateService.get(msg.detailKey, msg.detailParameters) : of(undefined),\n ]).subscribe(([summaryTranslation, detailTranslation]: string[]) => {\n this.message$.publish({\n ...msg,\n severity: severity,\n summary: summaryTranslation,\n detail: detailTranslation,\n })\n })\n }\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Injectable, OnDestroy } from '@angular/core'\nimport { from, map, mergeMap } from 'rxjs'\nimport { CurrentThemeTopic, Theme } from '@onecx/integration-interface'\nimport { ConfigurationService } from './configuration.service'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\nconst defaultThemeServerUrl = 'http://portal-theme-management:8080'\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService implements OnDestroy {\n baseUrlV1 = './portal-api'\n currentTheme$ = new CurrentThemeTopic()\n\n constructor(private configService: ConfigurationService, private http: HttpClient) {}\n\n getThemeHref(themeId: string): string {\n const themeServerUrl =\n this.configService.getProperty(CONFIG_KEY.TKIT_PORTAL_THEME_SERVER_URL) || defaultThemeServerUrl\n return `${themeServerUrl}/themes/${themeId}/${themeId}.min.css`\n }\n\n public loadAndApplyTheme(themeName: string) {\n return this.http.get<Theme>(`${this.baseUrlV1}/internal/themes/${encodeURI(themeName)}`).pipe(\n mergeMap((theme) => {\n return from(this.apply(theme)).pipe(map(() => theme))\n })\n )\n }\n\n public async apply(theme: Theme): Promise<void> {\n console.log(`🎨 Applying theme: ${theme.name}`)\n await this.currentTheme$.publish(theme)\n if (theme.properties) {\n Object.values(theme.properties).forEach((group) => {\n for (const [key, value] of Object.entries(group)) {\n document.documentElement.style.setProperty(`--${key}`, value)\n }\n })\n }\n }\n\n ngOnDestroy(): void {\n this.currentTheme$.destroy()\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { RemoteComponentsTopic } from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteComponentsService implements OnDestroy {\n remoteComponents$ = new RemoteComponentsTopic()\n\n ngOnDestroy(): void {\n this.remoteComponents$.destroy()\n }\n}\n","// services\nexport * from './lib/services/app-state.service'\nexport * from './lib/services/configuration.service'\nexport * from './lib/services/user.service'\nexport * from './lib/services/portal-message.service'\nexport * from './lib/services/theme.service'\nexport * from './lib/services/remote-components.service'\n\n// models\nexport * from './lib/model/config-key.model'\n\n// core\nexport * from './lib/api/iauth.service'\nexport * from './lib/api/injection-tokens'\n\n// utils\n\nexport { MfeInfo, Theme } from '@onecx/integration-interface'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.ConfigurationService","i2"],"mappings":";;;;;;;;MAWa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAA;AACzC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,eAAe,EAAE,CAAA;AAEnC;;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CAAA,CAAA;AAAZ,YAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;MCLrB,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,qBAAqB,EAAE,CAAA;KAKhD;IAHC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAA;KACjC;;qHALU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACHlC;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"onecx-angular-integration-interface.mjs","sources":["../../../../libs/angular-integration-interface/src/lib/services/app-state.service.ts","../../../../libs/angular-integration-interface/src/lib/api/injection-tokens.ts","../../../../libs/angular-integration-interface/src/lib/model/config-key.model.ts","../../../../libs/angular-integration-interface/src/lib/services/configuration.service.ts","../../../../libs/angular-integration-interface/src/lib/api/constants.ts","../../../../libs/angular-integration-interface/src/lib/services/user.service.ts","../../../../libs/angular-integration-interface/src/lib/services/portal-message.service.ts","../../../../libs/angular-integration-interface/src/lib/services/theme.service.ts","../../../../libs/angular-integration-interface/src/lib/services/remote-components.service.ts","../../../../libs/angular-integration-interface/src/index.ts","../../../../libs/angular-integration-interface/src/onecx-angular-integration-interface.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core'\nimport {\n GlobalErrorTopic,\n GlobalLoadingTopic,\n CurrentMfeTopic,\n CurrentPageTopic,\n CurrentWorkspaceTopic,\n IsAuthenticatedTopic,\n} from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class AppStateService implements OnDestroy {\n globalError$ = new GlobalErrorTopic()\n globalLoading$ = new GlobalLoadingTopic()\n currentMfe$ = new CurrentMfeTopic()\n\n /**\n * This topic will only fire when pageInfo.path matches document.location.pathname,\n * if not it will fire undefined.\n */\n currentPage$ = new CurrentPageTopic()\n currentWorkspace$ = new CurrentWorkspaceTopic()\n \n /**\n * @deprecated Will be replaced by currentWorkspace$\n */\n get currentPortal$() {\n return this.currentWorkspace$\n }\n set currentPortal$(value: CurrentWorkspaceTopic) {\n this.currentWorkspace$ = value\n }\n\n /**\n * This Topic is initialized as soon as the authentication is done\n */\n isAuthenticated$ = new IsAuthenticatedTopic()\n\n ngOnDestroy(): void {\n this.globalError$.destroy()\n this.globalLoading$.destroy()\n this.currentMfe$.destroy()\n this.currentPage$.destroy()\n this.currentPortal$.destroy()\n this.currentWorkspace$.destroy()\n this.isAuthenticated$.destroy()\n }\n}\n","import { InjectionToken } from '@angular/core'\nimport { IAuthService } from './iauth.service'\n\nexport interface LibConfig {\n appId: string\n portalId: string\n /**\n * If true, the tkit-module will not try to load remote env values from server(GET /assets/env.json)\n */\n skipRemoteConfigLoad: boolean\n /**\n * URL from which the remote config will be loaded, default: '/assets/env.json'\n */\n remoteConfigURL: string\n}\nexport const APP_CONFIG = new InjectionToken<LibConfig>('APP_CONFIG')\n\nexport const AUTH_SERVICE = new InjectionToken<IAuthService>('AUTH_SERVICE')\n\nexport const SANITY_CHECK = new InjectionToken<string>('OCXSANITY_CHECK')\n\nexport const APPLICATION_NAME = new InjectionToken<string>('APPLICATION_NAME')\n","export enum CONFIG_KEY {\n TKIT_PORTAL_DEFAULT_THEME = 'TKIT_PORTAL_DEFAULT_THEME',\n TKIT_PORTAL_DISABLE_THEME_MANAGEMENT = 'TKIT_PORTAL_DISABLE_THEME_MANAGEMENT',\n TKIT_PORTAL_THEME_SERVER_URL = 'TKIT_PORTAL_THEME_SERVER_URL',\n TKIT_TOKEN_ROLE_CLAIM_NAME = 'TKIT_TOKEN_ROLE_CLAIM_NAME',\n TKIT_PORTAL_ID = 'TKIT_PORTAL_ID',\n TKIT_SUPPORTED_LANGUAGES = 'TKIT_SUPPORTED_LANGUAGES',\n TKIT_SEARCH_BASE_URL = 'TKIT_SEARCH_BASE_URL',\n APP_BASE_HREF = 'APP_BASE_HREF',\n KEYCLOAK_REALM = 'KEYCLOAK_REALM',\n KEYCLOAK_ENABLE_SILENT_SSO = 'KEYCLOAK_ENABLE_SILENT_SSO',\n KEYCLOAK_URL = 'KEYCLOAK_URL',\n KEYCLOAK_CLIENT_ID = 'KEYCLOAK_CLIENT_ID',\n ONECX_PORTAL_FAVORITES_DISABLED = 'ONECX_PORTAL_FAVORITES_DISABLED',\n ONECX_PORTAL_FEEDBACK_DISABLED = 'ONECX_PORTAL_FEEDBACK_DISABLED',\n ONECX_PORTAL_SEARCH_DISABLED = 'ONECX_PORTAL_SEARCH_DISABLED',\n ONECX_PORTAL_SUPPORT_TICKET_DISABLED = 'ONECX_PORTAL_SUPPORT_TICKET_DISABLED',\n ONECX_PORTAL_ANNOUNCEMENTS_DISABLED = 'ONECX_PORTAL_ANNOUNCEMENTS_DISABLED',\n ONECX_PORTAL_PASSWORD_CHANGE_DISABLED = 'ONECX_PORTAL_PASSWORD_CHANGE_DISABLED',\n ONECX_PORTAL_SETTINGS_DISABLED = 'ONECX_PORTAL_SETTINGS_DISABLED',\n ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED = 'ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED',\n ONECX_PORTAL_HELP_DISABLED = 'ONECX_PORTAL_HELP_DISABLED',\n APP_VERSION = 'APP_VERSION',\n IS_SHELL = 'IS_SHELL',\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Inject, Injectable, OnDestroy, Optional } from '@angular/core'\nimport { firstValueFrom } from 'rxjs'\nimport { Config, ConfigurationTopic } from '@onecx/integration-interface'\nimport { APP_CONFIG } from '../api/injection-tokens'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigurationService implements OnDestroy {\n config$ = new ConfigurationTopic()\n\n constructor(\n private http: HttpClient,\n @Optional() @Inject(APP_CONFIG) private defaultConfig?: { [key: string]: string }\n ) {}\n\n ngOnDestroy(): void {\n this.config$.destroy()\n }\n\n public init(): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const skipRemoteConfigLoad = this.defaultConfig && this.defaultConfig['skipRemoteConfigLoad']\n let loadConfigPromise: Promise<Config>\n\n const inlinedConfig = (window as typeof window & { APP_CONFIG: Config })['APP_CONFIG']\n if (inlinedConfig) {\n console.log(`ENV resolved from injected config`)\n loadConfigPromise = Promise.resolve(inlinedConfig)\n } else {\n if (skipRemoteConfigLoad) {\n console.log(\n '📢 TKA001: Remote config load is disabled. To enable it, remove the \"skipRemoteConfigLoad\" key in your environment.json'\n )\n loadConfigPromise = Promise.resolve(this.defaultConfig || {})\n } else {\n loadConfigPromise = firstValueFrom(\n this.http.get<Config>((this.defaultConfig && this.defaultConfig['remoteConfigURL']) || 'assets/env.json')\n )\n }\n }\n\n loadConfigPromise\n .then(async (config) => {\n if (config) {\n await this.config$.publish({ ...this.defaultConfig, ...config }).then(() => {\n resolve(true)\n })\n }\n })\n .catch((e) => {\n console.log(`Failed to load env configuration`)\n reject(e)\n })\n })\n }\n\n get isInitialized(): Promise<void> {\n return this.config$.isInitialized\n }\n\n public getProperty(key: CONFIG_KEY): string | undefined {\n if (!Object.values(CONFIG_KEY).includes(key)) {\n console.error('Invalid config key ', key)\n }\n return this.config$.getValue()?.[key]\n }\n\n public async setProperty(key: string, val: string) {\n const currentValues = await firstValueFrom(this.config$.asObservable())\n currentValues[key] = val\n await this.config$.publish(currentValues)\n }\n\n public getConfig(): Config | undefined {\n return this.config$.getValue()\n }\n}\n","export const API_PREFIX = 'portal-api'\n\nexport const DEFAULT_LANG = 'en'\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { BehaviorSubject, map } from 'rxjs'\nimport { PermissionsTopic, UserProfile, UserProfileTopic } from '@onecx/integration-interface'\nimport { DEFAULT_LANG } from '../api/constants'\n\n@Injectable({ providedIn: 'root' })\nexport class UserService implements OnDestroy {\n profile$ = new UserProfileTopic()\n permissions$ = new BehaviorSubject<string[]>([])\n lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG)\n\n private permissionsTopic$ = new PermissionsTopic()\n\n constructor() {\n this.profile$\n .pipe(\n map(\n (profile) =>\n profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG\n )\n )\n .subscribe(this.lang$)\n\n this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$)\n }\n\n ngOnDestroy(): void {\n this.profile$.destroy()\n }\n\n hasPermission(permissionKey: string): boolean {\n const oldConceptResult = this.permissions$.getValue()\n ? this.permissions$.getValue()?.includes(permissionKey)\n : false\n const result = this.permissionsTopic$.getValue()\n ? this.permissionsTopic$.getValue()?.includes(permissionKey)\n : oldConceptResult\n\n if (!result) {\n console.log(`👮‍♀️ No permission for: ${permissionKey}`)\n }\n return !!result\n }\n\n private determineLanguage(): string | undefined {\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n return undefined\n }\n\n let browserLang: any = window.navigator.languages ? window.navigator.languages[0] : null\n browserLang = browserLang || window.navigator.language\n\n if (typeof browserLang === 'undefined') {\n return undefined\n }\n\n if (browserLang.indexOf('-') !== -1) {\n browserLang = browserLang.split('-')[0]\n }\n\n if (browserLang.indexOf('_') !== -1) {\n browserLang = browserLang.split('_')[0]\n }\n\n return browserLang\n }\n\n private extractPermissions(userProfile: UserProfile) {\n const permissions: string[] = []\n if (userProfile) {\n if (userProfile.memberships) {\n userProfile.memberships.forEach((m) => {\n m.roleMemberships?.forEach((r) => {\n r.permissions?.forEach((p) => {\n if (p) {\n if (p.key !== undefined) {\n permissions.push(p.key)\n }\n }\n })\n })\n })\n }\n }\n return permissions\n }\n\n get isInitialized(): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return Promise.all([this.permissionsTopic$.isInitialized, this.profile$.isInitialized]).then(() => {})\n }\n}\n","import { Injectable } from '@angular/core'\nimport { TranslateService } from '@ngx-translate/core'\nimport { combineLatest, of } from 'rxjs'\nimport { MessageTopic } from '@onecx/integration-interface'\n\nexport type Message = {\n summaryKey?: string\n summaryParameters?: object\n detailKey?: string\n detailParameters?: object\n id?: any\n key?: string\n life?: number\n sticky?: boolean\n closable?: boolean\n data?: any\n icon?: string\n contentStyleClass?: string\n styleClass?: string\n}\n\n@Injectable({ providedIn: 'any' })\nexport class PortalMessageService {\n constructor(private translateService: TranslateService) {}\n\n message$ = new MessageTopic()\n\n success(msg: Message) {\n this.addTranslated('success', msg)\n }\n\n info(msg: Message) {\n this.addTranslated('info', msg)\n }\n\n error(msg: Message) {\n this.addTranslated('error', msg)\n }\n\n warning(msg: Message) {\n this.addTranslated('warning', msg)\n }\n\n private addTranslated(severity: string, msg: Message) {\n combineLatest([\n msg.summaryKey ? this.translateService.get(msg.summaryKey || '', msg.summaryParameters) : of(undefined),\n msg.detailKey ? this.translateService.get(msg.detailKey, msg.detailParameters) : of(undefined),\n ]).subscribe(([summaryTranslation, detailTranslation]: string[]) => {\n this.message$.publish({\n ...msg,\n severity: severity,\n summary: summaryTranslation,\n detail: detailTranslation,\n })\n })\n }\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Injectable, OnDestroy } from '@angular/core'\nimport { from, map, mergeMap } from 'rxjs'\nimport { CurrentThemeTopic, Theme } from '@onecx/integration-interface'\nimport { ConfigurationService } from './configuration.service'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\nconst defaultThemeServerUrl = 'http://portal-theme-management:8080'\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService implements OnDestroy {\n baseUrlV1 = './portal-api'\n currentTheme$ = new CurrentThemeTopic()\n\n constructor(private configService: ConfigurationService, private http: HttpClient) {}\n\n getThemeHref(themeId: string): string {\n const themeServerUrl =\n this.configService.getProperty(CONFIG_KEY.TKIT_PORTAL_THEME_SERVER_URL) || defaultThemeServerUrl\n return `${themeServerUrl}/themes/${themeId}/${themeId}.min.css`\n }\n\n public loadAndApplyTheme(themeName: string) {\n return this.http.get<Theme>(`${this.baseUrlV1}/internal/themes/${encodeURI(themeName)}`).pipe(\n mergeMap((theme) => {\n return from(this.apply(theme)).pipe(map(() => theme))\n })\n )\n }\n\n public async apply(theme: Theme): Promise<void> {\n console.log(`🎨 Applying theme: ${theme.name}`)\n await this.currentTheme$.publish(theme)\n if (theme.properties) {\n Object.values(theme.properties).forEach((group) => {\n for (const [key, value] of Object.entries(group)) {\n document.documentElement.style.setProperty(`--${key}`, value)\n }\n })\n }\n }\n\n ngOnDestroy(): void {\n this.currentTheme$.destroy()\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { RemoteComponentsTopic } from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteComponentsService implements OnDestroy {\n remoteComponents$ = new RemoteComponentsTopic()\n\n ngOnDestroy(): void {\n this.remoteComponents$.destroy()\n }\n}\n","// services\nexport * from './lib/services/app-state.service'\nexport * from './lib/services/configuration.service'\nexport * from './lib/services/user.service'\nexport * from './lib/services/portal-message.service'\nexport * from './lib/services/theme.service'\nexport * from './lib/services/remote-components.service'\n\n// models\nexport * from './lib/model/config-key.model'\n\n// core\nexport * from './lib/api/iauth.service'\nexport * from './lib/api/injection-tokens'\n\n// utils\n\nexport { MfeInfo, Theme } from '@onecx/integration-interface'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.ConfigurationService","i2"],"mappings":";;;;;;;;MAWa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAA;AACzC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,eAAe,EAAE,CAAA;AAEnC;;;AAGG;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACrC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,qBAAqB,EAAE,CAAA;AAY/C;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAA;KAW9C;AAxBC;;AAEG;AACH,IAAA,IAAI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAA;KAC9B;IACD,IAAI,cAAc,CAAC,KAA4B,EAAA;AAC7C,QAAA,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;KAC/B;IAOD,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAA;AAC3B,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAA;AAC7B,QAAA,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAA;AAC1B,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAA;AAC3B,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAA;AAC7B,QAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAA;AAChC,QAAA,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAA;KAChC;;6GAnCU,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,C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CAAA;KACjC;;qHALU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACHlC;;ACAA;;AAEG;;;;"}
@@ -163,13 +163,17 @@ class UserService {
163
163
  .pipe(map((profile) => profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG))
164
164
  .subscribe(this.lang$);
165
165
  this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$);
166
- this.permissionsTopic$.subscribe(this.permissions$);
167
166
  }
168
167
  ngOnDestroy() {
169
168
  this.profile$.destroy();
170
169
  }
171
170
  hasPermission(permissionKey) {
172
- const result = this.permissions$.getValue() ? this.permissions$.getValue()?.includes(permissionKey) : false;
171
+ const oldConceptResult = this.permissions$.getValue()
172
+ ? this.permissions$.getValue()?.includes(permissionKey)
173
+ : false;
174
+ const result = this.permissionsTopic$.getValue()
175
+ ? this.permissionsTopic$.getValue()?.includes(permissionKey)
176
+ : oldConceptResult;
173
177
  if (!result) {
174
178
  console.log(`👮‍♀️ No permission for: ${permissionKey}`);
175
179
  }
@@ -211,6 +215,10 @@ class UserService {
211
215
  }
212
216
  return permissions;
213
217
  }
218
+ get isInitialized() {
219
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
220
+ return Promise.all([this.permissionsTopic$.isInitialized, this.profile$.isInitialized]).then(() => { });
221
+ }
214
222
  }
215
223
  UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
216
224
  UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, providedIn: 'root' });
@@ -1 +1 @@
1
- {"version":3,"file":"onecx-angular-integration-interface.mjs","sources":["../../../../libs/angular-integration-interface/src/lib/services/app-state.service.ts","../../../../libs/angular-integration-interface/src/lib/api/injection-tokens.ts","../../../../libs/angular-integration-interface/src/lib/model/config-key.model.ts","../../../../libs/angular-integration-interface/src/lib/services/configuration.service.ts","../../../../libs/angular-integration-interface/src/lib/api/constants.ts","../../../../libs/angular-integration-interface/src/lib/services/user.service.ts","../../../../libs/angular-integration-interface/src/lib/services/portal-message.service.ts","../../../../libs/angular-integration-interface/src/lib/services/theme.service.ts","../../../../libs/angular-integration-interface/src/lib/services/remote-components.service.ts","../../../../libs/angular-integration-interface/src/index.ts","../../../../libs/angular-integration-interface/src/onecx-angular-integration-interface.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core'\nimport {\n GlobalErrorTopic,\n GlobalLoadingTopic,\n CurrentMfeTopic,\n CurrentPageTopic,\n CurrentWorkspaceTopic,\n IsAuthenticatedTopic,\n} from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class AppStateService implements OnDestroy {\n globalError$ = new GlobalErrorTopic()\n globalLoading$ = new GlobalLoadingTopic()\n currentMfe$ = new CurrentMfeTopic()\n\n /**\n * This topic will only fire when pageInfo.path matches document.location.pathname,\n * if not it will fire undefined.\n */\n currentPage$ = new CurrentPageTopic()\n currentWorkspace$ = new CurrentWorkspaceTopic()\n \n /**\n * @deprecated Will be replaced by currentWorkspace$\n */\n get currentPortal$() {\n return this.currentWorkspace$\n }\n set currentPortal$(value: CurrentWorkspaceTopic) {\n this.currentWorkspace$ = value\n }\n\n /**\n * This Topic is initialized as soon as the authentication is done\n */\n isAuthenticated$ = new IsAuthenticatedTopic()\n\n ngOnDestroy(): void {\n this.globalError$.destroy()\n this.globalLoading$.destroy()\n this.currentMfe$.destroy()\n this.currentPage$.destroy()\n this.currentPortal$.destroy()\n this.currentWorkspace$.destroy()\n this.isAuthenticated$.destroy()\n }\n}\n","import { InjectionToken } from '@angular/core'\nimport { IAuthService } from './iauth.service'\n\nexport interface LibConfig {\n appId: string\n portalId: string\n /**\n * If true, the tkit-module will not try to load remote env values from server(GET /assets/env.json)\n */\n skipRemoteConfigLoad: boolean\n /**\n * URL from which the remote config will be loaded, default: '/assets/env.json'\n */\n remoteConfigURL: string\n}\nexport const APP_CONFIG = new InjectionToken<LibConfig>('APP_CONFIG')\n\nexport const AUTH_SERVICE = new InjectionToken<IAuthService>('AUTH_SERVICE')\n\nexport const SANITY_CHECK = new InjectionToken<string>('OCXSANITY_CHECK')\n\nexport const APPLICATION_NAME = new InjectionToken<string>('APPLICATION_NAME')\n","export enum CONFIG_KEY {\n TKIT_PORTAL_DEFAULT_THEME = 'TKIT_PORTAL_DEFAULT_THEME',\n TKIT_PORTAL_DISABLE_THEME_MANAGEMENT = 'TKIT_PORTAL_DISABLE_THEME_MANAGEMENT',\n TKIT_PORTAL_THEME_SERVER_URL = 'TKIT_PORTAL_THEME_SERVER_URL',\n TKIT_TOKEN_ROLE_CLAIM_NAME = 'TKIT_TOKEN_ROLE_CLAIM_NAME',\n TKIT_PORTAL_ID = 'TKIT_PORTAL_ID',\n TKIT_SUPPORTED_LANGUAGES = 'TKIT_SUPPORTED_LANGUAGES',\n TKIT_SEARCH_BASE_URL = 'TKIT_SEARCH_BASE_URL',\n APP_BASE_HREF = 'APP_BASE_HREF',\n KEYCLOAK_REALM = 'KEYCLOAK_REALM',\n KEYCLOAK_ENABLE_SILENT_SSO = 'KEYCLOAK_ENABLE_SILENT_SSO',\n KEYCLOAK_URL = 'KEYCLOAK_URL',\n KEYCLOAK_CLIENT_ID = 'KEYCLOAK_CLIENT_ID',\n ONECX_PORTAL_FAVORITES_DISABLED = 'ONECX_PORTAL_FAVORITES_DISABLED',\n ONECX_PORTAL_FEEDBACK_DISABLED = 'ONECX_PORTAL_FEEDBACK_DISABLED',\n ONECX_PORTAL_SEARCH_DISABLED = 'ONECX_PORTAL_SEARCH_DISABLED',\n ONECX_PORTAL_SUPPORT_TICKET_DISABLED = 'ONECX_PORTAL_SUPPORT_TICKET_DISABLED',\n ONECX_PORTAL_ANNOUNCEMENTS_DISABLED = 'ONECX_PORTAL_ANNOUNCEMENTS_DISABLED',\n ONECX_PORTAL_PASSWORD_CHANGE_DISABLED = 'ONECX_PORTAL_PASSWORD_CHANGE_DISABLED',\n ONECX_PORTAL_SETTINGS_DISABLED = 'ONECX_PORTAL_SETTINGS_DISABLED',\n ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED = 'ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED',\n ONECX_PORTAL_HELP_DISABLED = 'ONECX_PORTAL_HELP_DISABLED',\n APP_VERSION = 'APP_VERSION',\n IS_SHELL = 'IS_SHELL',\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Inject, Injectable, OnDestroy, Optional } from '@angular/core'\nimport { firstValueFrom } from 'rxjs'\nimport { Config, ConfigurationTopic } from '@onecx/integration-interface'\nimport { APP_CONFIG } from '../api/injection-tokens'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigurationService implements OnDestroy {\n config$ = new ConfigurationTopic()\n\n constructor(\n private http: HttpClient,\n @Optional() @Inject(APP_CONFIG) private defaultConfig?: { [key: string]: string }\n ) {}\n\n ngOnDestroy(): void {\n this.config$.destroy()\n }\n\n public init(): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const skipRemoteConfigLoad = this.defaultConfig && this.defaultConfig['skipRemoteConfigLoad']\n let loadConfigPromise: Promise<Config>\n\n const inlinedConfig = (window as typeof window & { APP_CONFIG: Config })['APP_CONFIG']\n if (inlinedConfig) {\n console.log(`ENV resolved from injected config`)\n loadConfigPromise = Promise.resolve(inlinedConfig)\n } else {\n if (skipRemoteConfigLoad) {\n console.log(\n '📢 TKA001: Remote config load is disabled. To enable it, remove the \"skipRemoteConfigLoad\" key in your environment.json'\n )\n loadConfigPromise = Promise.resolve(this.defaultConfig || {})\n } else {\n loadConfigPromise = firstValueFrom(\n this.http.get<Config>((this.defaultConfig && this.defaultConfig['remoteConfigURL']) || 'assets/env.json')\n )\n }\n }\n\n loadConfigPromise\n .then(async (config) => {\n if (config) {\n await this.config$.publish({ ...this.defaultConfig, ...config }).then(() => {\n resolve(true)\n })\n }\n })\n .catch((e) => {\n console.log(`Failed to load env configuration`)\n reject(e)\n })\n })\n }\n\n get isInitialized(): Promise<void> {\n return this.config$.isInitialized\n }\n\n public getProperty(key: CONFIG_KEY): string | undefined {\n if (!Object.values(CONFIG_KEY).includes(key)) {\n console.error('Invalid config key ', key)\n }\n return this.config$.getValue()?.[key]\n }\n\n public async setProperty(key: string, val: string) {\n const currentValues = await firstValueFrom(this.config$.asObservable())\n currentValues[key] = val\n await this.config$.publish(currentValues)\n }\n\n public getConfig(): Config | undefined {\n return this.config$.getValue()\n }\n}\n","export const API_PREFIX = 'portal-api'\n\nexport const DEFAULT_LANG = 'en'\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { BehaviorSubject, map } from 'rxjs'\nimport { PermissionsTopic, UserProfile, UserProfileTopic } from '@onecx/integration-interface'\nimport { DEFAULT_LANG } from '../api/constants'\n\n@Injectable({ providedIn: 'root' })\nexport class UserService implements OnDestroy {\n profile$ = new UserProfileTopic()\n permissions$ = new BehaviorSubject<string[]>([])\n lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG)\n\n private permissionsTopic$ = new PermissionsTopic()\n\n constructor() {\n this.profile$\n .pipe(\n map(\n (profile) =>\n profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG\n )\n )\n .subscribe(this.lang$)\n\n this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$)\n this.permissionsTopic$.subscribe(this.permissions$)\n }\n\n ngOnDestroy(): void {\n this.profile$.destroy()\n }\n\n hasPermission(permissionKey: string): boolean {\n const result = this.permissions$.getValue() ? this.permissions$.getValue()?.includes(permissionKey) : false\n if (!result) {\n console.log(`👮‍♀️ No permission for: ${permissionKey}`)\n }\n return !!result\n }\n\n private determineLanguage(): string | undefined {\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n return undefined\n }\n\n let browserLang: any = window.navigator.languages ? window.navigator.languages[0] : null\n browserLang = browserLang || window.navigator.language\n\n if (typeof browserLang === 'undefined') {\n return undefined\n }\n\n if (browserLang.indexOf('-') !== -1) {\n browserLang = browserLang.split('-')[0]\n }\n\n if (browserLang.indexOf('_') !== -1) {\n browserLang = browserLang.split('_')[0]\n }\n\n return browserLang\n }\n\n private extractPermissions(userProfile: UserProfile) {\n const permissions: string[] = []\n if (userProfile) {\n if (userProfile.memberships) {\n userProfile.memberships.forEach((m) => {\n m.roleMemberships?.forEach((r) => {\n r.permissions?.forEach((p) => {\n if (p) {\n if (p.key !== undefined) {\n permissions.push(p.key)\n }\n }\n })\n })\n })\n }\n }\n return permissions\n }\n}\n","import { Injectable } from '@angular/core'\nimport { TranslateService } from '@ngx-translate/core'\nimport { combineLatest, of } from 'rxjs'\nimport { MessageTopic } from '@onecx/integration-interface'\n\nexport type Message = {\n summaryKey?: string\n summaryParameters?: object\n detailKey?: string\n detailParameters?: object\n id?: any\n key?: string\n life?: number\n sticky?: boolean\n closable?: boolean\n data?: any\n icon?: string\n contentStyleClass?: string\n styleClass?: string\n}\n\n@Injectable({ providedIn: 'any' })\nexport class PortalMessageService {\n constructor(private translateService: TranslateService) {}\n\n message$ = new MessageTopic()\n\n success(msg: Message) {\n this.addTranslated('success', msg)\n }\n\n info(msg: Message) {\n this.addTranslated('info', msg)\n }\n\n error(msg: Message) {\n this.addTranslated('error', msg)\n }\n\n warning(msg: Message) {\n this.addTranslated('warning', msg)\n }\n\n private addTranslated(severity: string, msg: Message) {\n combineLatest([\n msg.summaryKey ? this.translateService.get(msg.summaryKey || '', msg.summaryParameters) : of(undefined),\n msg.detailKey ? this.translateService.get(msg.detailKey, msg.detailParameters) : of(undefined),\n ]).subscribe(([summaryTranslation, detailTranslation]: string[]) => {\n this.message$.publish({\n ...msg,\n severity: severity,\n summary: summaryTranslation,\n detail: detailTranslation,\n })\n })\n }\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Injectable, OnDestroy } from '@angular/core'\nimport { from, map, mergeMap } from 'rxjs'\nimport { CurrentThemeTopic, Theme } from '@onecx/integration-interface'\nimport { ConfigurationService } from './configuration.service'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\nconst defaultThemeServerUrl = 'http://portal-theme-management:8080'\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService implements OnDestroy {\n baseUrlV1 = './portal-api'\n currentTheme$ = new CurrentThemeTopic()\n\n constructor(private configService: ConfigurationService, private http: HttpClient) {}\n\n getThemeHref(themeId: string): string {\n const themeServerUrl =\n this.configService.getProperty(CONFIG_KEY.TKIT_PORTAL_THEME_SERVER_URL) || defaultThemeServerUrl\n return `${themeServerUrl}/themes/${themeId}/${themeId}.min.css`\n }\n\n public loadAndApplyTheme(themeName: string) {\n return this.http.get<Theme>(`${this.baseUrlV1}/internal/themes/${encodeURI(themeName)}`).pipe(\n mergeMap((theme) => {\n return from(this.apply(theme)).pipe(map(() => theme))\n })\n )\n }\n\n public async apply(theme: Theme): Promise<void> {\n console.log(`🎨 Applying theme: ${theme.name}`)\n await this.currentTheme$.publish(theme)\n if (theme.properties) {\n Object.values(theme.properties).forEach((group) => {\n for (const [key, value] of Object.entries(group)) {\n document.documentElement.style.setProperty(`--${key}`, value)\n }\n })\n }\n }\n\n ngOnDestroy(): void {\n this.currentTheme$.destroy()\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { RemoteComponentsTopic } from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteComponentsService implements OnDestroy {\n remoteComponents$ = new RemoteComponentsTopic()\n\n ngOnDestroy(): void {\n this.remoteComponents$.destroy()\n }\n}\n","// services\nexport * from './lib/services/app-state.service'\nexport * from './lib/services/configuration.service'\nexport * from './lib/services/user.service'\nexport * from './lib/services/portal-message.service'\nexport * from './lib/services/theme.service'\nexport * from './lib/services/remote-components.service'\n\n// models\nexport * from './lib/model/config-key.model'\n\n// core\nexport * from './lib/api/iauth.service'\nexport * from './lib/api/injection-tokens'\n\n// utils\n\nexport { MfeInfo, Theme } from '@onecx/integration-interface'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.ConfigurationService","i2"],"mappings":";;;;;;;MAWa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAA;AACzC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,eAAe,EAAE,CAAA;AAEnC;;;AAGG;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACrC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,qBAAqB,EAAE,CAAA;AAY/C;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAA;AAW9C,KAAA;AAxBC;;AAEG;AACH,IAAA,IAAI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAA;KAC9B;IACD,IAAI,cAAc,CAAC,KAA4B,EAAA;AAC7C,QAAA,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;KAC/B;IAOD,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAA;AAC3B,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAA;AAC7B,QAA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A;AADpC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,qBAAqB,EAAE,CAAA;AAKhD,KAAA;IAHC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAA;KACjC;;qHALU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACHlC;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"onecx-angular-integration-interface.mjs","sources":["../../../../libs/angular-integration-interface/src/lib/services/app-state.service.ts","../../../../libs/angular-integration-interface/src/lib/api/injection-tokens.ts","../../../../libs/angular-integration-interface/src/lib/model/config-key.model.ts","../../../../libs/angular-integration-interface/src/lib/services/configuration.service.ts","../../../../libs/angular-integration-interface/src/lib/api/constants.ts","../../../../libs/angular-integration-interface/src/lib/services/user.service.ts","../../../../libs/angular-integration-interface/src/lib/services/portal-message.service.ts","../../../../libs/angular-integration-interface/src/lib/services/theme.service.ts","../../../../libs/angular-integration-interface/src/lib/services/remote-components.service.ts","../../../../libs/angular-integration-interface/src/index.ts","../../../../libs/angular-integration-interface/src/onecx-angular-integration-interface.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core'\nimport {\n GlobalErrorTopic,\n GlobalLoadingTopic,\n CurrentMfeTopic,\n CurrentPageTopic,\n CurrentWorkspaceTopic,\n IsAuthenticatedTopic,\n} from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class AppStateService implements OnDestroy {\n globalError$ = new GlobalErrorTopic()\n globalLoading$ = new GlobalLoadingTopic()\n currentMfe$ = new CurrentMfeTopic()\n\n /**\n * This topic will only fire when pageInfo.path matches document.location.pathname,\n * if not it will fire undefined.\n */\n currentPage$ = new CurrentPageTopic()\n currentWorkspace$ = new CurrentWorkspaceTopic()\n \n /**\n * @deprecated Will be replaced by currentWorkspace$\n */\n get currentPortal$() {\n return this.currentWorkspace$\n }\n set currentPortal$(value: CurrentWorkspaceTopic) {\n this.currentWorkspace$ = value\n }\n\n /**\n * This Topic is initialized as soon as the authentication is done\n */\n isAuthenticated$ = new IsAuthenticatedTopic()\n\n ngOnDestroy(): void {\n this.globalError$.destroy()\n this.globalLoading$.destroy()\n this.currentMfe$.destroy()\n this.currentPage$.destroy()\n this.currentPortal$.destroy()\n this.currentWorkspace$.destroy()\n this.isAuthenticated$.destroy()\n }\n}\n","import { InjectionToken } from '@angular/core'\nimport { IAuthService } from './iauth.service'\n\nexport interface LibConfig {\n appId: string\n portalId: string\n /**\n * If true, the tkit-module will not try to load remote env values from server(GET /assets/env.json)\n */\n skipRemoteConfigLoad: boolean\n /**\n * URL from which the remote config will be loaded, default: '/assets/env.json'\n */\n remoteConfigURL: string\n}\nexport const APP_CONFIG = new InjectionToken<LibConfig>('APP_CONFIG')\n\nexport const AUTH_SERVICE = new InjectionToken<IAuthService>('AUTH_SERVICE')\n\nexport const SANITY_CHECK = new InjectionToken<string>('OCXSANITY_CHECK')\n\nexport const APPLICATION_NAME = new InjectionToken<string>('APPLICATION_NAME')\n","export enum CONFIG_KEY {\n TKIT_PORTAL_DEFAULT_THEME = 'TKIT_PORTAL_DEFAULT_THEME',\n TKIT_PORTAL_DISABLE_THEME_MANAGEMENT = 'TKIT_PORTAL_DISABLE_THEME_MANAGEMENT',\n TKIT_PORTAL_THEME_SERVER_URL = 'TKIT_PORTAL_THEME_SERVER_URL',\n TKIT_TOKEN_ROLE_CLAIM_NAME = 'TKIT_TOKEN_ROLE_CLAIM_NAME',\n TKIT_PORTAL_ID = 'TKIT_PORTAL_ID',\n TKIT_SUPPORTED_LANGUAGES = 'TKIT_SUPPORTED_LANGUAGES',\n TKIT_SEARCH_BASE_URL = 'TKIT_SEARCH_BASE_URL',\n APP_BASE_HREF = 'APP_BASE_HREF',\n KEYCLOAK_REALM = 'KEYCLOAK_REALM',\n KEYCLOAK_ENABLE_SILENT_SSO = 'KEYCLOAK_ENABLE_SILENT_SSO',\n KEYCLOAK_URL = 'KEYCLOAK_URL',\n KEYCLOAK_CLIENT_ID = 'KEYCLOAK_CLIENT_ID',\n ONECX_PORTAL_FAVORITES_DISABLED = 'ONECX_PORTAL_FAVORITES_DISABLED',\n ONECX_PORTAL_FEEDBACK_DISABLED = 'ONECX_PORTAL_FEEDBACK_DISABLED',\n ONECX_PORTAL_SEARCH_DISABLED = 'ONECX_PORTAL_SEARCH_DISABLED',\n ONECX_PORTAL_SUPPORT_TICKET_DISABLED = 'ONECX_PORTAL_SUPPORT_TICKET_DISABLED',\n ONECX_PORTAL_ANNOUNCEMENTS_DISABLED = 'ONECX_PORTAL_ANNOUNCEMENTS_DISABLED',\n ONECX_PORTAL_PASSWORD_CHANGE_DISABLED = 'ONECX_PORTAL_PASSWORD_CHANGE_DISABLED',\n ONECX_PORTAL_SETTINGS_DISABLED = 'ONECX_PORTAL_SETTINGS_DISABLED',\n ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED = 'ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED',\n ONECX_PORTAL_HELP_DISABLED = 'ONECX_PORTAL_HELP_DISABLED',\n APP_VERSION = 'APP_VERSION',\n IS_SHELL = 'IS_SHELL',\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Inject, Injectable, OnDestroy, Optional } from '@angular/core'\nimport { firstValueFrom } from 'rxjs'\nimport { Config, ConfigurationTopic } from '@onecx/integration-interface'\nimport { APP_CONFIG } from '../api/injection-tokens'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigurationService implements OnDestroy {\n config$ = new ConfigurationTopic()\n\n constructor(\n private http: HttpClient,\n @Optional() @Inject(APP_CONFIG) private defaultConfig?: { [key: string]: string }\n ) {}\n\n ngOnDestroy(): void {\n this.config$.destroy()\n }\n\n public init(): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const skipRemoteConfigLoad = this.defaultConfig && this.defaultConfig['skipRemoteConfigLoad']\n let loadConfigPromise: Promise<Config>\n\n const inlinedConfig = (window as typeof window & { APP_CONFIG: Config })['APP_CONFIG']\n if (inlinedConfig) {\n console.log(`ENV resolved from injected config`)\n loadConfigPromise = Promise.resolve(inlinedConfig)\n } else {\n if (skipRemoteConfigLoad) {\n console.log(\n '📢 TKA001: Remote config load is disabled. To enable it, remove the \"skipRemoteConfigLoad\" key in your environment.json'\n )\n loadConfigPromise = Promise.resolve(this.defaultConfig || {})\n } else {\n loadConfigPromise = firstValueFrom(\n this.http.get<Config>((this.defaultConfig && this.defaultConfig['remoteConfigURL']) || 'assets/env.json')\n )\n }\n }\n\n loadConfigPromise\n .then(async (config) => {\n if (config) {\n await this.config$.publish({ ...this.defaultConfig, ...config }).then(() => {\n resolve(true)\n })\n }\n })\n .catch((e) => {\n console.log(`Failed to load env configuration`)\n reject(e)\n })\n })\n }\n\n get isInitialized(): Promise<void> {\n return this.config$.isInitialized\n }\n\n public getProperty(key: CONFIG_KEY): string | undefined {\n if (!Object.values(CONFIG_KEY).includes(key)) {\n console.error('Invalid config key ', key)\n }\n return this.config$.getValue()?.[key]\n }\n\n public async setProperty(key: string, val: string) {\n const currentValues = await firstValueFrom(this.config$.asObservable())\n currentValues[key] = val\n await this.config$.publish(currentValues)\n }\n\n public getConfig(): Config | undefined {\n return this.config$.getValue()\n }\n}\n","export const API_PREFIX = 'portal-api'\n\nexport const DEFAULT_LANG = 'en'\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { BehaviorSubject, map } from 'rxjs'\nimport { PermissionsTopic, UserProfile, UserProfileTopic } from '@onecx/integration-interface'\nimport { DEFAULT_LANG } from '../api/constants'\n\n@Injectable({ providedIn: 'root' })\nexport class UserService implements OnDestroy {\n profile$ = new UserProfileTopic()\n permissions$ = new BehaviorSubject<string[]>([])\n lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG)\n\n private permissionsTopic$ = new PermissionsTopic()\n\n constructor() {\n this.profile$\n .pipe(\n map(\n (profile) =>\n profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG\n )\n )\n .subscribe(this.lang$)\n\n this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$)\n }\n\n ngOnDestroy(): void {\n this.profile$.destroy()\n }\n\n hasPermission(permissionKey: string): boolean {\n const oldConceptResult = this.permissions$.getValue()\n ? this.permissions$.getValue()?.includes(permissionKey)\n : false\n const result = this.permissionsTopic$.getValue()\n ? this.permissionsTopic$.getValue()?.includes(permissionKey)\n : oldConceptResult\n\n if (!result) {\n console.log(`👮‍♀️ No permission for: ${permissionKey}`)\n }\n return !!result\n }\n\n private determineLanguage(): string | undefined {\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n return undefined\n }\n\n let browserLang: any = window.navigator.languages ? window.navigator.languages[0] : null\n browserLang = browserLang || window.navigator.language\n\n if (typeof browserLang === 'undefined') {\n return undefined\n }\n\n if (browserLang.indexOf('-') !== -1) {\n browserLang = browserLang.split('-')[0]\n }\n\n if (browserLang.indexOf('_') !== -1) {\n browserLang = browserLang.split('_')[0]\n }\n\n return browserLang\n }\n\n private extractPermissions(userProfile: UserProfile) {\n const permissions: string[] = []\n if (userProfile) {\n if (userProfile.memberships) {\n userProfile.memberships.forEach((m) => {\n m.roleMemberships?.forEach((r) => {\n r.permissions?.forEach((p) => {\n if (p) {\n if (p.key !== undefined) {\n permissions.push(p.key)\n }\n }\n })\n })\n })\n }\n }\n return permissions\n }\n\n get isInitialized(): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return Promise.all([this.permissionsTopic$.isInitialized, this.profile$.isInitialized]).then(() => {})\n }\n}\n","import { Injectable } from '@angular/core'\nimport { TranslateService } from '@ngx-translate/core'\nimport { combineLatest, of } from 'rxjs'\nimport { MessageTopic } from '@onecx/integration-interface'\n\nexport type Message = {\n summaryKey?: string\n summaryParameters?: object\n detailKey?: string\n detailParameters?: object\n id?: any\n key?: string\n life?: number\n sticky?: boolean\n closable?: boolean\n data?: any\n icon?: string\n contentStyleClass?: string\n styleClass?: string\n}\n\n@Injectable({ providedIn: 'any' })\nexport class PortalMessageService {\n constructor(private translateService: TranslateService) {}\n\n message$ = new MessageTopic()\n\n success(msg: Message) {\n this.addTranslated('success', msg)\n }\n\n info(msg: Message) {\n this.addTranslated('info', msg)\n }\n\n error(msg: Message) {\n this.addTranslated('error', msg)\n }\n\n warning(msg: Message) {\n this.addTranslated('warning', msg)\n }\n\n private addTranslated(severity: string, msg: Message) {\n combineLatest([\n msg.summaryKey ? this.translateService.get(msg.summaryKey || '', msg.summaryParameters) : of(undefined),\n msg.detailKey ? this.translateService.get(msg.detailKey, msg.detailParameters) : of(undefined),\n ]).subscribe(([summaryTranslation, detailTranslation]: string[]) => {\n this.message$.publish({\n ...msg,\n severity: severity,\n summary: summaryTranslation,\n detail: detailTranslation,\n })\n })\n }\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Injectable, OnDestroy } from '@angular/core'\nimport { from, map, mergeMap } from 'rxjs'\nimport { CurrentThemeTopic, Theme } from '@onecx/integration-interface'\nimport { ConfigurationService } from './configuration.service'\nimport { CONFIG_KEY } from '../model/config-key.model'\n\nconst defaultThemeServerUrl = 'http://portal-theme-management:8080'\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService implements OnDestroy {\n baseUrlV1 = './portal-api'\n currentTheme$ = new CurrentThemeTopic()\n\n constructor(private configService: ConfigurationService, private http: HttpClient) {}\n\n getThemeHref(themeId: string): string {\n const themeServerUrl =\n this.configService.getProperty(CONFIG_KEY.TKIT_PORTAL_THEME_SERVER_URL) || defaultThemeServerUrl\n return `${themeServerUrl}/themes/${themeId}/${themeId}.min.css`\n }\n\n public loadAndApplyTheme(themeName: string) {\n return this.http.get<Theme>(`${this.baseUrlV1}/internal/themes/${encodeURI(themeName)}`).pipe(\n mergeMap((theme) => {\n return from(this.apply(theme)).pipe(map(() => theme))\n })\n )\n }\n\n public async apply(theme: Theme): Promise<void> {\n console.log(`🎨 Applying theme: ${theme.name}`)\n await this.currentTheme$.publish(theme)\n if (theme.properties) {\n Object.values(theme.properties).forEach((group) => {\n for (const [key, value] of Object.entries(group)) {\n document.documentElement.style.setProperty(`--${key}`, value)\n }\n })\n }\n }\n\n ngOnDestroy(): void {\n this.currentTheme$.destroy()\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core'\nimport { RemoteComponentsTopic } from '@onecx/integration-interface'\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteComponentsService implements OnDestroy {\n remoteComponents$ = new RemoteComponentsTopic()\n\n ngOnDestroy(): void {\n this.remoteComponents$.destroy()\n }\n}\n","// services\nexport * from './lib/services/app-state.service'\nexport * from './lib/services/configuration.service'\nexport * from './lib/services/user.service'\nexport * from './lib/services/portal-message.service'\nexport * from './lib/services/theme.service'\nexport * from './lib/services/remote-components.service'\n\n// models\nexport * from './lib/model/config-key.model'\n\n// core\nexport * from './lib/api/iauth.service'\nexport * from './lib/api/injection-tokens'\n\n// utils\n\nexport { MfeInfo, Theme } from '@onecx/integration-interface'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.ConfigurationService","i2"],"mappings":";;;;;;;MAWa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAA;AACzC,QAAA,IAAA,CAA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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACHlC;;ACAA;;AAEG;;;;"}
@@ -12,6 +12,7 @@ export declare class UserService implements OnDestroy {
12
12
  hasPermission(permissionKey: string): boolean;
13
13
  private determineLanguage;
14
14
  private extractPermissions;
15
+ get isInitialized(): Promise<void>;
15
16
  static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
16
17
  static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
17
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onecx/angular-integration-interface",
3
- "version": "4.15.2",
3
+ "version": "4.15.3",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^15.2.7",
6
6
  "@onecx/integration-interface": "^4",