@onecx/angular-integration-interface 4.13.2 → 4.14.1
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/index.mjs +2 -1
- package/esm2020/lib/api/iauth.service.mjs +1 -1
- package/esm2020/lib/services/app-state.service.mjs +13 -3
- package/esm2020/lib/services/configuration.service.mjs +4 -2
- package/esm2020/lib/services/remote-components.service.mjs +18 -0
- package/esm2020/lib/services/user.service.mjs +4 -2
- package/fesm2015/onecx-angular-integration-interface.mjs +33 -4
- package/fesm2015/onecx-angular-integration-interface.mjs.map +1 -1
- package/fesm2020/onecx-angular-integration-interface.mjs +33 -4
- package/fesm2020/onecx-angular-integration-interface.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/api/iauth.service.d.ts +3 -0
- package/lib/services/app-state.service.d.ts +7 -2
- package/lib/services/remote-components.service.d.ts +9 -0
- package/lib/services/user.service.d.ts +1 -0
- package/package.json +1 -1
package/esm2020/index.mjs
CHANGED
@@ -4,9 +4,10 @@ export * from './lib/services/configuration.service';
|
|
4
4
|
export * from './lib/services/user.service';
|
5
5
|
export * from './lib/services/portal-message.service';
|
6
6
|
export * from './lib/services/theme.service';
|
7
|
+
export * from './lib/services/remote-components.service';
|
7
8
|
// models
|
8
9
|
export * from './lib/model/config-key.model';
|
9
10
|
// core
|
10
11
|
export * from './lib/api/iauth.service';
|
11
12
|
export * from './lib/api/injection-tokens';
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItaW50ZWdyYXRpb24taW50ZXJmYWNlL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxXQUFXO0FBQ1gsY0FBYyxrQ0FBa0MsQ0FBQTtBQUNoRCxjQUFjLHNDQUFzQyxDQUFBO0FBQ3BELG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2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWF1dGguc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1pbnRlZ3JhdGlvbi1pbnRlcmZhY2Uvc3JjL2xpYi9hcGkvaWF1dGguc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAZGVwcmVjYXRlZFxuICovXG5leHBvcnQgaW50ZXJmYWNlIElBdXRoU2VydmljZSB7XG4gIGxvZ291dCgpOiB2b2lkXG5cbiAgLyoqXG4gICAqIFVuaXF1ZSBuYW1lIG9mIHRoaXMgYXV0aCBwcm92aWRlcjogZS5nLiBtb2NrQXV0aFByb3ZpZGVyLCBLZXljbG9ha1Byb3ZpZGVyLi5cbiAgICovXG4gIGdldEF1dGhQcm92aWRlck5hbWUoKTogc3RyaW5nXG5cbiAgLyoqXG4gICAqIEluaXRpYWxpemF0aW9uIG1ldGhvZCBvZiB0aGUgQXV0aCBzZXJ2aWNlLiBPbmNlIHJlc29sdmVkLCBhbGwgdXNlciBkYXRhIE1VU1QgYmUgYXZhaWxhYmxlLlxuICAgKi9cbiAgaW5pdCgpOiBQcm9taXNlPGJvb2xlYW4+XG5cbiAgZ2V0SWRUb2tlbigpOiBzdHJpbmcgfCBudWxsXG5cbiAgaGFzUm9sZShfcm9sZTogc3RyaW5nKTogYm9vbGVhblxuXG4gIGdldFVzZXJSb2xlcygpOiBzdHJpbmdbXVxufVxuIl19
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Injectable } from '@angular/core';
|
2
|
-
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic,
|
2
|
+
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, } from '@onecx/integration-interface';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export class AppStateService {
|
5
5
|
constructor() {
|
@@ -11,18 +11,28 @@ export class AppStateService {
|
|
11
11
|
* if not it will fire undefined.
|
12
12
|
*/
|
13
13
|
this.currentPage$ = new CurrentPageTopic();
|
14
|
-
this.
|
14
|
+
this.currentWorkspace$ = new CurrentWorkspaceTopic();
|
15
15
|
/**
|
16
16
|
* This Topic is initialized as soon as the authentication is done
|
17
17
|
*/
|
18
18
|
this.isAuthenticated$ = new IsAuthenticatedTopic();
|
19
19
|
}
|
20
|
+
/**
|
21
|
+
* @deprecated Will be replaced by currentWorkspace$
|
22
|
+
*/
|
23
|
+
get currentPortal$() {
|
24
|
+
return this.currentWorkspace$;
|
25
|
+
}
|
26
|
+
set currentPortal$(value) {
|
27
|
+
this.currentWorkspace$ = value;
|
28
|
+
}
|
20
29
|
ngOnDestroy() {
|
21
30
|
this.globalError$.destroy();
|
22
31
|
this.globalLoading$.destroy();
|
23
32
|
this.currentMfe$.destroy();
|
24
33
|
this.currentPage$.destroy();
|
25
34
|
this.currentPortal$.destroy();
|
35
|
+
this.currentWorkspace$.destroy();
|
26
36
|
this.isAuthenticated$.destroy();
|
27
37
|
}
|
28
38
|
}
|
@@ -32,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
32
42
|
type: Injectable,
|
33
43
|
args: [{ providedIn: 'root' }]
|
34
44
|
}] });
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLXN0YXRlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItaW50ZWdyYXRpb24taW50ZXJmYWNlL3NyYy9saWIvc2VydmljZXMvYXBwLXN0YX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9 @@ export class ConfigurationService {
|
|
57
57
|
return this.config$.getValue()?.[key];
|
58
58
|
}
|
59
59
|
async setProperty(key, val) {
|
60
|
-
await this.config$.
|
60
|
+
const currentValues = await firstValueFrom(this.config$.asObservable());
|
61
|
+
currentValues[key] = val;
|
62
|
+
await this.config$.publish(currentValues);
|
61
63
|
}
|
62
64
|
getConfig() {
|
63
65
|
return this.config$.getValue();
|
@@ -74,4 +76,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
74
76
|
type: Inject,
|
75
77
|
args: [APP_CONFIG]
|
76
78
|
}] }]; } });
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
79
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLWludGVncmF0aW9uLWludGVyZmFjZS9zcmMvbGliL3NlcnZpY2VzL2NvbmZpZ3VyYXRpb24uc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFDakQsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQWEsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ3ZFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFDckMsT0FBTyxFQUFVLGtCQUFrQixFQUFFLE1BQU0sOEJBQThCLENBQUE7QUFDekUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBQ3BELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTs7O0FBR3RELE1BQU0sT0FBTyxvQkFBb0I7SU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cpXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoc2tpcFJlbW90ZUNvbmZpZ0xvYWQpIHtcbiAgICAgICAgICBjb25zb2xlLmxvZyhcbiAgICAgICAgICAgICfwn5OiIFRLQTAwMTogUmVtb3RlIGNvbmZpZyBsb2FkIGlzIGRpc2FibGVkLiBUbyBlbmFibGUgaXQsIHJlbW92ZSB0aGUgXCJza2lwUmVtb3RlQ29uZmlnTG9hZFwiIGtleSBpbiB5b3VyIGVudmlyb25tZW50Lmpzb24nXG4gICAgICAgICAgKVxuICAgICAgICAgIGxvYWRDb25maWdQcm9taXNlID0gUHJvbWlzZS5yZXNvbHZlKHRoaXMuZGVmYXVsdENvbmZpZyB8fCB7fSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBsb2FkQ29uZmlnUHJvbWlzZSA9IGZpcnN0VmFsdWVGcm9tKFxuICAgICAgICAgICAgdGhpcy5odHRwLmdldDxDb25maWc+KCh0aGlzLmRlZmF1bHRDb25maWcgJiYgdGhpcy5kZWZhdWx0Q29uZmlnWydyZW1vdGVDb25maWdVUkwnXSkgfHwgJ2Fzc2V0cy9lbnYuanNvbicpXG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGxvYWRDb25maWdQcm9taXNlXG4gICAgICAgIC50aGVuKGFzeW5jIChjb25maWcpID0+IHtcbiAgICAgICAgICBpZiAoY29uZmlnKSB7XG4gICAgICAgICAgICBhd2FpdCB0aGlzLmNvbmZpZyQucHVibGlzaCh7IC4uLnRoaXMuZGVmYXVsdENvbmZpZywgLi4uY29uZmlnIH0pLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICByZXNvbHZlKHRydWUpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coYEZhaWxlZCB0byBsb2FkIGVudiBjb25maWd1cmF0aW9uYClcbiAgICAgICAgICByZWplY3QoZSlcbiAgICAgICAgfSlcbiAgICB9KVxuICB9XG5cbiAgZ2V0IGlzSW5pdGlhbGl6ZWQoKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgcmV0dXJuIHRoaXMuY29uZmlnJC5pc0luaXRpYWxpemVkXG4gIH1cblxuICBwdWJsaWMgZ2V0UHJvcGVydHkoa2V5OiBDT05GSUdfS0VZKTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICBpZiAoIU9iamVjdC52YWx1ZXMoQ09ORklHX0tFWSkuaW5jbHVkZXMoa2V5KSkge1xuICAgICAgY29uc29sZS5lcnJvcignSW52YWxpZCBjb25maWcga2V5ICcsIGtleSlcbiAgICB9XG4gICAgcmV0dXJuIHRoaXMuY29uZmlnJC5nZXRWYWx1ZSgpPy5ba2V5XVxuICB9XG5cbiAgcHVibGljIGFzeW5jIHNldFByb3BlcnR5KGtleTogc3RyaW5nLCB2YWw6IHN0cmluZykge1xuICAgIGNvbnN0IGN1cnJlbnRWYWx1ZXMgPSBhd2FpdCBmaXJzdFZhbHVlRnJvbSh0aGlzLmNvbmZpZyQuYXNPYnNlcnZhYmxlKCkpXG4gICAgY3VycmVudFZhbHVlc1trZXldID0gdmFsXG4gICAgYXdhaXQgdGhpcy5jb25maWckLnB1Ymxpc2goY3VycmVudFZhbHVlcylcbiAgfVxuXG4gIHB1YmxpYyBnZXRDb25maWcoKTogQ29uZmlnIHwgdW5kZWZpbmVkIHtcbiAgICByZXR1cm4gdGhpcy5jb25maWckLmdldFZhbHVlKClcbiAgfVxufVxuIl19
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Injectable } from '@angular/core';
|
2
|
+
import { RemoteComponentsTopic } from '@onecx/integration-interface';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class RemoteComponentsService {
|
5
|
+
constructor() {
|
6
|
+
this.remoteComponents$ = new RemoteComponentsTopic();
|
7
|
+
}
|
8
|
+
ngOnDestroy() {
|
9
|
+
this.remoteComponents$.destroy();
|
10
|
+
}
|
11
|
+
}
|
12
|
+
RemoteComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
13
|
+
RemoteComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' });
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, decorators: [{
|
15
|
+
type: Injectable,
|
16
|
+
args: [{ providedIn: 'root' }]
|
17
|
+
}] });
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVtb3RlLWNvbXBvbmVudHMuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci1pbnRlZ3JhdGlvbi1pbnRlcmZhY2Uvc3JjL2xpYi9zZXJ2aWNlcy9yZW1vdGUtY29tcG9uZW50cy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQWEsTUFBTSxlQUFlLENBQUE7QUFDckQsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sOEJBQThCLENBQUE7O0FBR3BFLE1BQU0sT0FBTyx1QkFBdUI7SUFEcEM7UUFFRSxzQkFBaUIsR0FBRyxJQUFJLHFCQUFxQixFQUFFLENBQUE7S0FLaEQ7SUFIQyxXQUFXO1FBQ1QsSUFBSSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sRUFBRSxDQUFBO0lBQ2xDLENBQUM7O3FIQUxVLHVCQUF1Qjt5SEFBdkIsdUJBQXVCLGNBRFYsTUFBTTs0RkFDbkIsdUJBQXVCO2tCQURuQyxVQUFVO21CQUFDLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUsIE9uRGVzdHJveSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnXG5pbXBvcnQgeyBSZW1vdGVDb21wb25lbnRzVG9waWMgfSBmcm9tICdAb25lY3gvaW50ZWdyYXRpb24taW50ZXJmYWNlJ1xuXG5ASW5qZWN0YWJsZSh7IHByb3ZpZGVkSW46ICdyb290JyB9KVxuZXhwb3J0IGNsYXNzIFJlbW90ZUNvbXBvbmVudHNTZXJ2aWNlIGltcGxlbWVudHMgT25EZXN0cm95IHtcbiAgcmVtb3RlQ29tcG9uZW50cyQgPSBuZXcgUmVtb3RlQ29tcG9uZW50c1RvcGljKClcblxuICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICB0aGlzLnJlbW90ZUNvbXBvbmVudHMkLmRlc3Ryb3koKVxuICB9XG59XG4iXX0=
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Injectable } from '@angular/core';
|
2
2
|
import { BehaviorSubject, map } from 'rxjs';
|
3
|
-
import { UserProfileTopic } from '@onecx/integration-interface';
|
3
|
+
import { PermissionsTopic, UserProfileTopic } from '@onecx/integration-interface';
|
4
4
|
import { DEFAULT_LANG } from '../api/constants';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export class UserService {
|
@@ -8,10 +8,12 @@ export class UserService {
|
|
8
8
|
this.profile$ = new UserProfileTopic();
|
9
9
|
this.permissions$ = new BehaviorSubject([]);
|
10
10
|
this.lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG);
|
11
|
+
this.permissionsTopic$ = new PermissionsTopic();
|
11
12
|
this.profile$
|
12
13
|
.pipe(map((profile) => profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG))
|
13
14
|
.subscribe(this.lang$);
|
14
15
|
this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$);
|
16
|
+
this.permissionsTopic$.subscribe(this.permissions$);
|
15
17
|
}
|
16
18
|
ngOnDestroy() {
|
17
19
|
this.profile$.destroy();
|
@@ -66,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
66
68
|
type: Injectable,
|
67
69
|
args: [{ providedIn: 'root' }]
|
68
70
|
}], ctorParameters: function () { return []; } });
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLWludGVncmF0aW9uLWludGVyZmFjZS9zcmMvbGliL3NlcnZpY2VzL3VzZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFhLE1BQU0sZUFBZSxDQUFBO0FBQ3JELE9BQU8sRUFBRSxlQUFlLEVBQUUsR0FBRyxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBZSxnQkFBZ0IsRUFBRSxNQUFNLDhCQUE4QixDQUFBO0FBQzlGLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTs7QUFHL0MsTUFBTSxPQUFPLFdBQVc7SUFPdEI7UUFOQSxhQUFRLEdBQUcsSUFBSSxnQkFBZ0IsRUFBRSxDQUFBO1FBQ2pDLGlCQUFZLEdBQUcsSUFBSSxlQUFlLENBQVcsRUFBRSxDQUFDLENBQUE7UUFDaEQsVUFBSyxHQUFHLElBQUksZUFBZSxDQUFDLElBQUksQ0FBQyxpQkFBaUIsRUFBRSxJQUFJLFlBQVksQ0FB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3dzZXJMYW5nLnNwbGl0KCdfJylbMF1cbiAgICB9XG5cbiAgICByZXR1cm4gYnJvd3NlckxhbmdcbiAgfVxuXG4gIHByaXZhdGUgZXh0cmFjdFBlcm1pc3Npb25zKHVzZXJQcm9maWxlOiBVc2VyUHJvZmlsZSkge1xuICAgIGNvbnN0IHBlcm1pc3Npb25zOiBzdHJpbmdbXSA9IFtdXG4gICAgaWYgKHVzZXJQcm9maWxlKSB7XG4gICAgICBpZiAodXNlclByb2ZpbGUubWVtYmVyc2hpcHMpIHtcbiAgICAgICAgdXNlclByb2ZpbGUubWVtYmVyc2hpcHMuZm9yRWFjaCgobSkgPT4ge1xuICAgICAgICAgIG0ucm9sZU1lbWJlcnNoaXBzPy5mb3JFYWNoKChyKSA9PiB7XG4gICAgICAgICAgICByLnBlcm1pc3Npb25zPy5mb3JFYWNoKChwKSA9PiB7XG4gICAgICAgICAgICAgIGlmIChwKSB7XG4gICAgICAgICAgICAgICAgaWYgKHAua2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgIHBlcm1pc3Npb25zLnB1c2gocC5rZXkpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBwZXJtaXNzaW9uc1xuICB9XG59XG4iXX0=
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { Injectable, InjectionToken, Optional, Inject } from '@angular/core';
|
3
|
-
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic,
|
3
|
+
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, UserProfileTopic, PermissionsTopic, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic } from '@onecx/integration-interface';
|
4
4
|
import { __awaiter } from 'tslib';
|
5
5
|
import { firstValueFrom, BehaviorSubject, map, combineLatest, of, mergeMap, from } from 'rxjs';
|
6
6
|
import * as i1 from '@angular/common/http';
|
@@ -16,18 +16,28 @@ class AppStateService {
|
|
16
16
|
* if not it will fire undefined.
|
17
17
|
*/
|
18
18
|
this.currentPage$ = new CurrentPageTopic();
|
19
|
-
this.
|
19
|
+
this.currentWorkspace$ = new CurrentWorkspaceTopic();
|
20
20
|
/**
|
21
21
|
* This Topic is initialized as soon as the authentication is done
|
22
22
|
*/
|
23
23
|
this.isAuthenticated$ = new IsAuthenticatedTopic();
|
24
24
|
}
|
25
|
+
/**
|
26
|
+
* @deprecated Will be replaced by currentWorkspace$
|
27
|
+
*/
|
28
|
+
get currentPortal$() {
|
29
|
+
return this.currentWorkspace$;
|
30
|
+
}
|
31
|
+
set currentPortal$(value) {
|
32
|
+
this.currentWorkspace$ = value;
|
33
|
+
}
|
25
34
|
ngOnDestroy() {
|
26
35
|
this.globalError$.destroy();
|
27
36
|
this.globalLoading$.destroy();
|
28
37
|
this.currentMfe$.destroy();
|
29
38
|
this.currentPage$.destroy();
|
30
39
|
this.currentPortal$.destroy();
|
40
|
+
this.currentWorkspace$.destroy();
|
31
41
|
this.isAuthenticated$.destroy();
|
32
42
|
}
|
33
43
|
}
|
@@ -123,7 +133,9 @@ class ConfigurationService {
|
|
123
133
|
}
|
124
134
|
setProperty(key, val) {
|
125
135
|
return __awaiter(this, void 0, void 0, function* () {
|
126
|
-
yield this.config$.
|
136
|
+
const currentValues = yield firstValueFrom(this.config$.asObservable());
|
137
|
+
currentValues[key] = val;
|
138
|
+
yield this.config$.publish(currentValues);
|
127
139
|
});
|
128
140
|
}
|
129
141
|
getConfig() {
|
@@ -153,10 +165,12 @@ class UserService {
|
|
153
165
|
this.profile$ = new UserProfileTopic();
|
154
166
|
this.permissions$ = new BehaviorSubject([]);
|
155
167
|
this.lang$ = new BehaviorSubject((_a = this.determineLanguage()) !== null && _a !== void 0 ? _a : DEFAULT_LANG);
|
168
|
+
this.permissionsTopic$ = new PermissionsTopic();
|
156
169
|
this.profile$
|
157
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; }))
|
158
171
|
.subscribe(this.lang$);
|
159
172
|
this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$);
|
173
|
+
this.permissionsTopic$.subscribe(this.permissions$);
|
160
174
|
}
|
161
175
|
ngOnDestroy() {
|
162
176
|
this.profile$.destroy();
|
@@ -289,11 +303,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
289
303
|
args: [{ providedIn: 'root' }]
|
290
304
|
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: i1.HttpClient }]; } });
|
291
305
|
|
306
|
+
class RemoteComponentsService {
|
307
|
+
constructor() {
|
308
|
+
this.remoteComponents$ = new RemoteComponentsTopic();
|
309
|
+
}
|
310
|
+
ngOnDestroy() {
|
311
|
+
this.remoteComponents$.destroy();
|
312
|
+
}
|
313
|
+
}
|
314
|
+
RemoteComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
315
|
+
RemoteComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' });
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, decorators: [{
|
317
|
+
type: Injectable,
|
318
|
+
args: [{ providedIn: 'root' }]
|
319
|
+
}] });
|
320
|
+
|
292
321
|
// services
|
293
322
|
|
294
323
|
/**
|
295
324
|
* Generated bundle index. Do not edit.
|
296
325
|
*/
|
297
326
|
|
298
|
-
export { APPLICATION_NAME, APP_CONFIG, AUTH_SERVICE, AppStateService, CONFIG_KEY, ConfigurationService, PortalMessageService, SANITY_CHECK, ThemeService, UserService };
|
327
|
+
export { APPLICATION_NAME, APP_CONFIG, AUTH_SERVICE, AppStateService, CONFIG_KEY, ConfigurationService, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ThemeService, UserService };
|
299
328
|
//# sourceMappingURL=onecx-angular-integration-interface.mjs.map
|
@@ -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/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 CurrentPortalTopic,\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 currentPortal$ = new CurrentPortalTopic()\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.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 await this.config$.publish({ key, val })\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 { 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 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 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","// 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'\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,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAA;AAEzC;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAA;KAU9C;IARC,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,gBAAgB,CAAC,OAAO,EAAE,CAAA;KAChC;;6GAxBU,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA;4FACnB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AAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;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 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;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,QAA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AAA,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,6 +1,6 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { Injectable, InjectionToken, Optional, Inject } from '@angular/core';
|
3
|
-
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic,
|
3
|
+
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, UserProfileTopic, PermissionsTopic, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic } from '@onecx/integration-interface';
|
4
4
|
import * as i1 from '@angular/common/http';
|
5
5
|
import { firstValueFrom, BehaviorSubject, map, combineLatest, of, mergeMap, from } from 'rxjs';
|
6
6
|
import * as i1$1 from '@ngx-translate/core';
|
@@ -15,18 +15,28 @@ class AppStateService {
|
|
15
15
|
* if not it will fire undefined.
|
16
16
|
*/
|
17
17
|
this.currentPage$ = new CurrentPageTopic();
|
18
|
-
this.
|
18
|
+
this.currentWorkspace$ = new CurrentWorkspaceTopic();
|
19
19
|
/**
|
20
20
|
* This Topic is initialized as soon as the authentication is done
|
21
21
|
*/
|
22
22
|
this.isAuthenticated$ = new IsAuthenticatedTopic();
|
23
23
|
}
|
24
|
+
/**
|
25
|
+
* @deprecated Will be replaced by currentWorkspace$
|
26
|
+
*/
|
27
|
+
get currentPortal$() {
|
28
|
+
return this.currentWorkspace$;
|
29
|
+
}
|
30
|
+
set currentPortal$(value) {
|
31
|
+
this.currentWorkspace$ = value;
|
32
|
+
}
|
24
33
|
ngOnDestroy() {
|
25
34
|
this.globalError$.destroy();
|
26
35
|
this.globalLoading$.destroy();
|
27
36
|
this.currentMfe$.destroy();
|
28
37
|
this.currentPage$.destroy();
|
29
38
|
this.currentPortal$.destroy();
|
39
|
+
this.currentWorkspace$.destroy();
|
30
40
|
this.isAuthenticated$.destroy();
|
31
41
|
}
|
32
42
|
}
|
@@ -120,7 +130,9 @@ class ConfigurationService {
|
|
120
130
|
return this.config$.getValue()?.[key];
|
121
131
|
}
|
122
132
|
async setProperty(key, val) {
|
123
|
-
await this.config$.
|
133
|
+
const currentValues = await firstValueFrom(this.config$.asObservable());
|
134
|
+
currentValues[key] = val;
|
135
|
+
await this.config$.publish(currentValues);
|
124
136
|
}
|
125
137
|
getConfig() {
|
126
138
|
return this.config$.getValue();
|
@@ -146,10 +158,12 @@ class UserService {
|
|
146
158
|
this.profile$ = new UserProfileTopic();
|
147
159
|
this.permissions$ = new BehaviorSubject([]);
|
148
160
|
this.lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG);
|
161
|
+
this.permissionsTopic$ = new PermissionsTopic();
|
149
162
|
this.profile$
|
150
163
|
.pipe(map((profile) => profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG))
|
151
164
|
.subscribe(this.lang$);
|
152
165
|
this.profile$.pipe(map((profile) => this.extractPermissions(profile))).subscribe(this.permissions$);
|
166
|
+
this.permissionsTopic$.subscribe(this.permissions$);
|
153
167
|
}
|
154
168
|
ngOnDestroy() {
|
155
169
|
this.profile$.destroy();
|
@@ -282,11 +296,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
282
296
|
args: [{ providedIn: 'root' }]
|
283
297
|
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: i1.HttpClient }]; } });
|
284
298
|
|
299
|
+
class RemoteComponentsService {
|
300
|
+
constructor() {
|
301
|
+
this.remoteComponents$ = new RemoteComponentsTopic();
|
302
|
+
}
|
303
|
+
ngOnDestroy() {
|
304
|
+
this.remoteComponents$.destroy();
|
305
|
+
}
|
306
|
+
}
|
307
|
+
RemoteComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
308
|
+
RemoteComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' });
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoteComponentsService, decorators: [{
|
310
|
+
type: Injectable,
|
311
|
+
args: [{ providedIn: 'root' }]
|
312
|
+
}] });
|
313
|
+
|
285
314
|
// services
|
286
315
|
|
287
316
|
/**
|
288
317
|
* Generated bundle index. Do not edit.
|
289
318
|
*/
|
290
319
|
|
291
|
-
export { APPLICATION_NAME, APP_CONFIG, AUTH_SERVICE, AppStateService, CONFIG_KEY, ConfigurationService, PortalMessageService, SANITY_CHECK, ThemeService, UserService };
|
320
|
+
export { APPLICATION_NAME, APP_CONFIG, AUTH_SERVICE, AppStateService, CONFIG_KEY, ConfigurationService, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ThemeService, UserService };
|
292
321
|
//# sourceMappingURL=onecx-angular-integration-interface.mjs.map
|
@@ -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/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 CurrentPortalTopic,\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 currentPortal$ = new CurrentPortalTopic()\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.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 await this.config$.publish({ key, val })\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 { 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 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 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","// 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'\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,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAA;AAEzC;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAA;AAU9C,KAAA;IARC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO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AK,CAAC,CAAA;QACvC,IAAI,KAAK,CAAC,UAAU,EAAE;AACpB,YAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AAChD,gBAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAChD,oBAAA,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA,EAAA,EAAK,GAAG,CAAA,CAAE,EAAE,KAAK,CAAC,CAAA;AAC9D,iBAAA;AACH,aAAC,CAAC,CAAA;AACH,SAAA;KACF;IAED,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAA;KAC7B;;0GAlCU,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,oBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,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;;;ACTlC;;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 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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A,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;;;;"}
|
package/index.d.ts
CHANGED
@@ -3,6 +3,7 @@ export * from './lib/services/configuration.service';
|
|
3
3
|
export * from './lib/services/user.service';
|
4
4
|
export * from './lib/services/portal-message.service';
|
5
5
|
export * from './lib/services/theme.service';
|
6
|
+
export * from './lib/services/remote-components.service';
|
6
7
|
export * from './lib/model/config-key.model';
|
7
8
|
export * from './lib/api/iauth.service';
|
8
9
|
export * from './lib/api/injection-tokens';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
2
|
-
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic,
|
2
|
+
import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic } from '@onecx/integration-interface';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class AppStateService implements OnDestroy {
|
5
5
|
globalError$: GlobalErrorTopic;
|
@@ -10,7 +10,12 @@ export declare class AppStateService implements OnDestroy {
|
|
10
10
|
* if not it will fire undefined.
|
11
11
|
*/
|
12
12
|
currentPage$: CurrentPageTopic;
|
13
|
-
|
13
|
+
currentWorkspace$: CurrentWorkspaceTopic;
|
14
|
+
/**
|
15
|
+
* @deprecated Will be replaced by currentWorkspace$
|
16
|
+
*/
|
17
|
+
get currentPortal$(): CurrentWorkspaceTopic;
|
18
|
+
set currentPortal$(value: CurrentWorkspaceTopic);
|
14
19
|
/**
|
15
20
|
* This Topic is initialized as soon as the authentication is done
|
16
21
|
*/
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
2
|
+
import { RemoteComponentsTopic } from '@onecx/integration-interface';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class RemoteComponentsService implements OnDestroy {
|
5
|
+
remoteComponents$: RemoteComponentsTopic;
|
6
|
+
ngOnDestroy(): void;
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteComponentsService, never>;
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RemoteComponentsService>;
|
9
|
+
}
|
@@ -6,6 +6,7 @@ export declare class UserService implements OnDestroy {
|
|
6
6
|
profile$: UserProfileTopic;
|
7
7
|
permissions$: BehaviorSubject<string[]>;
|
8
8
|
lang$: BehaviorSubject<string>;
|
9
|
+
private permissionsTopic$;
|
9
10
|
constructor();
|
10
11
|
ngOnDestroy(): void;
|
11
12
|
hasPermission(permissionKey: string): boolean;
|