aril 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/boot/config/apps/src/apps.service.mjs +4 -2
- package/esm2022/keycloak/index.mjs +1 -2
- package/fesm2022/aril-boot-config-apps.mjs +3 -1
- package/fesm2022/aril-boot-config-apps.mjs.map +1 -1
- package/fesm2022/aril-keycloak.mjs +3 -53
- package/fesm2022/aril-keycloak.mjs.map +1 -1
- package/keycloak/index.d.ts +0 -1
- package/package.json +124 -124
- package/esm2022/keycloak/src/auth.guard.mjs +0 -52
- package/keycloak/src/auth.guard.d.ts +0 -11
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Injectable, inject, isDevMode } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { WebComponentWrapper, startsWith } from '@angular-architects/module-federation-tools';
|
|
4
|
+
import { KeycloakAuthGuard } from 'keycloak-angular';
|
|
4
5
|
import { catchError, of, tap } from 'rxjs';
|
|
5
6
|
import { NotFoundComponent } from 'aril/util/custom_pages';
|
|
6
7
|
import { ShadowDOMWrapperComponent } from './showdowDOMWrapper';
|
|
@@ -26,7 +27,8 @@ export class MicroAppService {
|
|
|
26
27
|
return {
|
|
27
28
|
matcher: startsWith(options.remoteName),
|
|
28
29
|
component: options.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,
|
|
29
|
-
data: options
|
|
30
|
+
data: options,
|
|
31
|
+
canActivate: [KeycloakAuthGuard]
|
|
30
32
|
};
|
|
31
33
|
});
|
|
32
34
|
return routes;
|
|
@@ -44,4 +46,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
44
46
|
type: Injectable,
|
|
45
47
|
args: [{ providedIn: 'root' }]
|
|
46
48
|
}] });
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ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ml0ZW1zXHJcblx0XHRdKTtcclxuXHR9XHJcbn1cclxuIl19
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export * from './src/auth.interceptor';
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9hcmlsL2tleWNsb2FrL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3JjL2F1dGguaW50ZXJjZXB0b3InO1xyXG5leHBvcnQgKiBmcm9tICcuL3NyYy9hdXRoLmd1YXJkJzsiXX0=
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9hcmlsL2tleWNsb2FrL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NyYy9hdXRoLmludGVyY2VwdG9yJzsiXX0=
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, Renderer2, ElementRef, Component, ViewEncapsulation, ViewChild, isDevMode, Injectable } from '@angular/core';
|
|
3
3
|
import { Router, BaseRouteReuseStrategy } from '@angular/router';
|
|
4
4
|
import { WebComponentWrapper, startsWith } from '@angular-architects/module-federation-tools';
|
|
5
|
+
import { KeycloakAuthGuard } from 'keycloak-angular';
|
|
5
6
|
import { tap, catchError, of } from 'rxjs';
|
|
6
7
|
import { NotFoundComponent } from 'aril/util/custom_pages';
|
|
7
8
|
|
|
@@ -58,7 +59,8 @@ class MicroAppService {
|
|
|
58
59
|
return {
|
|
59
60
|
matcher: startsWith(options.remoteName),
|
|
60
61
|
component: options.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,
|
|
61
|
-
data: options
|
|
62
|
+
data: options,
|
|
63
|
+
canActivate: [KeycloakAuthGuard]
|
|
62
64
|
};
|
|
63
65
|
});
|
|
64
66
|
return routes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-boot-config-apps.mjs","sources":["../../projects/aril/boot/config/apps/src/showdowDOMWrapper.ts","../../projects/aril/boot/config/apps/src/apps.service.ts","../../projects/aril/boot/config/apps/src/interfaces.ts","../../projects/aril/boot/config/apps/src/reuse-strategy.ts","../../projects/aril/boot/config/apps/aril-boot-config-apps.ts"],"sourcesContent":["import { Component, ElementRef, OnInit, Renderer2, ViewChild, ViewEncapsulation, inject } from '@angular/core';\r\n\r\nimport { WebComponentWrapper } from '@angular-architects/module-federation-tools';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\ttemplate: '<div #vc></div>',\r\n\tencapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class ShadowDOMWrapperComponent extends WebComponentWrapper implements OnInit {\r\n\t@ViewChild('vc', { read: ElementRef, static: true }) override vc!: ElementRef;\r\n\r\n\tprivate renderer = inject(Renderer2);\r\n\r\n\tngOnInit(): void {\r\n\t\tconst shadowRoot = this.vc.nativeElement.parentNode;\r\n\t\tconst styleUrls = this['route'].snapshot.data.styleUrls || [];\r\n\r\n\t\t// Inject styles into the Shadow DOM\r\n\t\tstyleUrls.forEach((url: string) => {\r\n\t\t\tconst link = this.renderer.createElement('link');\r\n\t\t\tlink.setAttribute('rel', 'stylesheet');\r\n\t\t\tlink.setAttribute('type', 'text/css');\r\n\t\t\tlink.setAttribute('href', url);\r\n\t\t\tthis.renderer.appendChild(shadowRoot, link);\r\n\t\t});\r\n\t}\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject, isDevMode } from '@angular/core';\r\nimport { Router, Routes } from '@angular/router';\r\n\r\nimport {\r\n\tWebComponentWrapper,\r\n\tWebComponentWrapperOptions,\r\n\tstartsWith\r\n} from '@angular-architects/module-federation-tools';\r\nimport { catchError, of, tap } from 'rxjs';\r\n\r\nimport { NotFoundComponent } from 'aril/util/custom_pages';\r\n\r\nimport { AppsDTO, PluginConfig, PluginMenuItem } from './interfaces';\r\nimport { ShadowDOMWrapperComponent } from './showdowDOMWrapper';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class MicroAppService {\r\n\tprivate router = inject(Router);\r\n\r\n\tinit(httpClient: HttpClient, hostAPI: string) {\r\n\t\treturn httpClient\r\n\t\t\t.get<AppsDTO>(isDevMode() ? './assets/local-configs/app.local.json' : hostAPI + '/ui-sidebar-configs')\r\n\t\t\t.pipe(\r\n\t\t\t\ttap((apps) => {\r\n\t\t\t\t\tconst routes = this.buildRoutes([...apps.modules, ...apps.plugins]);\r\n\r\n\t\t\t\t\tthis.router.resetConfig([...this.router.config, ...routes, { path: '**', component: NotFoundComponent }]);\r\n\t\t\t\t\tthis.setMenuItems(apps.menuItems);\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((err) => {\r\n\t\t\t\t\tconsole.log('Error Micro Apps Loading', err);\r\n\t\t\t\t\treturn of();\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\tbuildRoutes(options: PluginConfig[]): Routes {\r\n\t\tconst routes: Routes = options.map((options) => {\r\n\t\t\treturn {\r\n\t\t\t\tmatcher: startsWith(options.remoteName),\r\n\t\t\t\tcomponent: options.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,\r\n\t\t\t\tdata: options as WebComponentWrapperOptions\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\treturn routes;\r\n\t}\r\n\r\n\tsetMenuItems(items: PluginMenuItem[]): void {\r\n\t\t(<any>globalThis).hostMenuItems.set([\r\n\t\t\t{ root: true, label: { tr: 'Anasayfa', en: 'Home' }, icon: 'pi pi-fw pi-home', routerLink: '/' },\r\n\t\t\t...items\r\n\t\t]);\r\n\t}\r\n}\r\n","import { MenuItemCommandEvent } from 'primeng/api';\r\n\r\nimport { WebComponentWrapperOptions } from '@angular-architects/module-federation-tools';\r\n\r\nexport enum Apps {\r\n\tTHOR = 'thor',\r\n\tCRM = 'crm',\r\n\tWDM = 'wdm',\r\n\tBILLING = 'billing',\r\n\tPAYMENT = 'payment',\r\n\tYEAP = 'yeap',\r\n\tMW = 'mw',\r\n\tLENA = 'lena',\r\n\tHES = 'hes',\r\n\tCTS = 'cts',\r\n\tSIS = 'sis',\r\n\tMNG = 'mng',\r\n\tSTATE_MACHINE = 'state-machine'\r\n}\r\n\r\nexport interface AppsDTO {\r\n\tversion: number;\r\n\tmodules: PluginConfig[];\r\n\tplugins: PluginConfig[];\r\n\textensions: PluginConfig[];\r\n\tmenuItems: PluginMenuItem[];\r\n}\r\n\r\nexport type PluginConfig = WebComponentWrapperOptions & {\r\n\tid?: string;\r\n\tremoteName: string;\r\n\tshadowDomPassive: boolean;\r\n};\r\n\r\nexport interface PluginMenuItem {\r\n\trouterLink?: string;\r\n\ticon?: string;\r\n\tlabel: {\r\n\t\t[languageCode: string]: string;\r\n\t};\r\n\titems?: PluginMenuItem[];\r\n\tpermittedRole?: string;\r\n\r\n\t// UI fields\r\n\tseparator?: boolean;\r\n\troot?: boolean;\r\n\tpath?: string;\r\n\tdisabled?: boolean;\r\n\tcommand?(event: MenuItemCommandEvent): void;\r\n}\r\n","import { ActivatedRouteSnapshot, BaseRouteReuseStrategy } from '@angular/router';\r\n\r\nexport class ArilReuseStrategy extends BaseRouteReuseStrategy {\r\n\toverride shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\r\n\t\tif (curr.firstChild?.routeConfig?.data?.['remoteEntry'] === future.firstChild?.routeConfig?.data?.['remoteEntry'])\r\n\t\t\treturn false;\r\n\r\n\t\treturn future?.routeConfig === curr?.routeConfig && JSON.stringify(future?.params) === JSON.stringify(curr?.params);\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aril-boot-config-apps.mjs","sources":["../../projects/aril/boot/config/apps/src/showdowDOMWrapper.ts","../../projects/aril/boot/config/apps/src/apps.service.ts","../../projects/aril/boot/config/apps/src/interfaces.ts","../../projects/aril/boot/config/apps/src/reuse-strategy.ts","../../projects/aril/boot/config/apps/aril-boot-config-apps.ts"],"sourcesContent":["import { Component, ElementRef, OnInit, Renderer2, ViewChild, ViewEncapsulation, inject } from '@angular/core';\r\n\r\nimport { WebComponentWrapper } from '@angular-architects/module-federation-tools';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\ttemplate: '<div #vc></div>',\r\n\tencapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class ShadowDOMWrapperComponent extends WebComponentWrapper implements OnInit {\r\n\t@ViewChild('vc', { read: ElementRef, static: true }) override vc!: ElementRef;\r\n\r\n\tprivate renderer = inject(Renderer2);\r\n\r\n\tngOnInit(): void {\r\n\t\tconst shadowRoot = this.vc.nativeElement.parentNode;\r\n\t\tconst styleUrls = this['route'].snapshot.data.styleUrls || [];\r\n\r\n\t\t// Inject styles into the Shadow DOM\r\n\t\tstyleUrls.forEach((url: string) => {\r\n\t\t\tconst link = this.renderer.createElement('link');\r\n\t\t\tlink.setAttribute('rel', 'stylesheet');\r\n\t\t\tlink.setAttribute('type', 'text/css');\r\n\t\t\tlink.setAttribute('href', url);\r\n\t\t\tthis.renderer.appendChild(shadowRoot, link);\r\n\t\t});\r\n\t}\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject, isDevMode } from '@angular/core';\r\nimport { Router, Routes } from '@angular/router';\r\n\r\nimport {\r\n\tWebComponentWrapper,\r\n\tWebComponentWrapperOptions,\r\n\tstartsWith\r\n} from '@angular-architects/module-federation-tools';\r\nimport { KeycloakAuthGuard } from 'keycloak-angular';\r\nimport { catchError, of, tap } from 'rxjs';\r\n\r\nimport { NotFoundComponent } from 'aril/util/custom_pages';\r\n\r\nimport { AppsDTO, PluginConfig, PluginMenuItem } from './interfaces';\r\nimport { ShadowDOMWrapperComponent } from './showdowDOMWrapper';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class MicroAppService {\r\n\tprivate router = inject(Router);\r\n\r\n\tinit(httpClient: HttpClient, hostAPI: string) {\r\n\t\treturn httpClient\r\n\t\t\t.get<AppsDTO>(isDevMode() ? './assets/local-configs/app.local.json' : hostAPI + '/ui-sidebar-configs')\r\n\t\t\t.pipe(\r\n\t\t\t\ttap((apps) => {\r\n\t\t\t\t\tconst routes = this.buildRoutes([...apps.modules, ...apps.plugins]);\r\n\r\n\t\t\t\t\tthis.router.resetConfig([...this.router.config, ...routes, { path: '**', component: NotFoundComponent }]);\r\n\t\t\t\t\tthis.setMenuItems(apps.menuItems);\r\n\t\t\t\t}),\r\n\t\t\t\tcatchError((err) => {\r\n\t\t\t\t\tconsole.log('Error Micro Apps Loading', err);\r\n\t\t\t\t\treturn of();\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t}\r\n\r\n\tbuildRoutes(options: PluginConfig[]): Routes {\r\n\t\tconst routes: Routes = options.map((options) => {\r\n\t\t\treturn {\r\n\t\t\t\tmatcher: startsWith(options.remoteName),\r\n\t\t\t\tcomponent: options.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,\r\n\t\t\t\tdata: options as WebComponentWrapperOptions,\r\n\t\t\t\tcanActivate: [KeycloakAuthGuard]\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\treturn routes;\r\n\t}\r\n\r\n\tsetMenuItems(items: PluginMenuItem[]): void {\r\n\t\t(<any>globalThis).hostMenuItems.set([\r\n\t\t\t{ root: true, label: { tr: 'Anasayfa', en: 'Home' }, icon: 'pi pi-fw pi-home', routerLink: '/' },\r\n\t\t\t...items\r\n\t\t]);\r\n\t}\r\n}\r\n","import { MenuItemCommandEvent } from 'primeng/api';\r\n\r\nimport { WebComponentWrapperOptions } from '@angular-architects/module-federation-tools';\r\n\r\nexport enum Apps {\r\n\tTHOR = 'thor',\r\n\tCRM = 'crm',\r\n\tWDM = 'wdm',\r\n\tBILLING = 'billing',\r\n\tPAYMENT = 'payment',\r\n\tYEAP = 'yeap',\r\n\tMW = 'mw',\r\n\tLENA = 'lena',\r\n\tHES = 'hes',\r\n\tCTS = 'cts',\r\n\tSIS = 'sis',\r\n\tMNG = 'mng',\r\n\tSTATE_MACHINE = 'state-machine'\r\n}\r\n\r\nexport interface AppsDTO {\r\n\tversion: number;\r\n\tmodules: PluginConfig[];\r\n\tplugins: PluginConfig[];\r\n\textensions: PluginConfig[];\r\n\tmenuItems: PluginMenuItem[];\r\n}\r\n\r\nexport type PluginConfig = WebComponentWrapperOptions & {\r\n\tid?: string;\r\n\tremoteName: string;\r\n\tshadowDomPassive: boolean;\r\n};\r\n\r\nexport interface PluginMenuItem {\r\n\trouterLink?: string;\r\n\ticon?: string;\r\n\tlabel: {\r\n\t\t[languageCode: string]: string;\r\n\t};\r\n\titems?: PluginMenuItem[];\r\n\tpermittedRole?: string;\r\n\r\n\t// UI fields\r\n\tseparator?: boolean;\r\n\troot?: boolean;\r\n\tpath?: string;\r\n\tdisabled?: boolean;\r\n\tcommand?(event: MenuItemCommandEvent): void;\r\n}\r\n","import { ActivatedRouteSnapshot, BaseRouteReuseStrategy } from '@angular/router';\r\n\r\nexport class ArilReuseStrategy extends BaseRouteReuseStrategy {\r\n\toverride shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\r\n\t\tif (curr.firstChild?.routeConfig?.data?.['remoteEntry'] === future.firstChild?.routeConfig?.data?.['remoteEntry'])\r\n\t\t\treturn false;\r\n\r\n\t\treturn future?.routeConfig === curr?.routeConfig && JSON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AAK,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KACpH;AACD;;ACTD;;AAEG;;;;"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { inject, Injectable } from '@angular/core';
|
|
1
|
+
import { inject } from '@angular/core';
|
|
3
2
|
import { Apps } from 'aril/boot/config/apps';
|
|
4
|
-
import
|
|
5
|
-
import { KeycloakBearerInterceptor, KeycloakAuthGuard } from 'keycloak-angular';
|
|
6
|
-
import * as i1 from '@angular/router';
|
|
3
|
+
import { KeycloakBearerInterceptor } from 'keycloak-angular';
|
|
7
4
|
|
|
8
5
|
const getCurrentAppName = (host, mf) => {
|
|
9
6
|
let appName = '';
|
|
@@ -90,56 +87,9 @@ const authInterceptor = (req, next) => {
|
|
|
90
87
|
};
|
|
91
88
|
const keycloakAuthInterceptor = (req, next) => inject(KeycloakBearerInterceptor).intercept(req, { handle: next });
|
|
92
89
|
|
|
93
|
-
class AuthGuard extends KeycloakAuthGuard {
|
|
94
|
-
constructor(router, keycloak) {
|
|
95
|
-
super(router, keycloak);
|
|
96
|
-
this.router = router;
|
|
97
|
-
this.keycloak = keycloak;
|
|
98
|
-
}
|
|
99
|
-
async isAccessAllowed(route, state) {
|
|
100
|
-
try {
|
|
101
|
-
if (this.keycloak.isTokenExpired(5)) {
|
|
102
|
-
console.log("Token expired, updating token");
|
|
103
|
-
await this.keycloak.updateToken(5);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
console.error('Error while updating token', error);
|
|
108
|
-
await this.keycloak.login({
|
|
109
|
-
redirectUri: window.location.origin + state.url
|
|
110
|
-
});
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
if (!this.authenticated) {
|
|
114
|
-
await this.keycloak.login({
|
|
115
|
-
redirectUri: window.location.origin + state.url
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
const requiredRoles = route.data['roles'];
|
|
119
|
-
if (!Array.isArray(requiredRoles) || requiredRoles.length === 0) {
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
const authorized = requiredRoles.every((role) => this.roles.includes(role));
|
|
123
|
-
if (!authorized) {
|
|
124
|
-
console.error('User not authorized to access this route');
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
else
|
|
128
|
-
return true;
|
|
129
|
-
}
|
|
130
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, deps: [{ token: i1.Router }, { token: i2.KeycloakService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
131
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
|
|
132
|
-
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, decorators: [{
|
|
134
|
-
type: Injectable,
|
|
135
|
-
args: [{
|
|
136
|
-
providedIn: 'root'
|
|
137
|
-
}]
|
|
138
|
-
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.KeycloakService }] });
|
|
139
|
-
|
|
140
90
|
/**
|
|
141
91
|
* Generated bundle index. Do not edit.
|
|
142
92
|
*/
|
|
143
93
|
|
|
144
|
-
export {
|
|
94
|
+
export { authInterceptor, keycloakAuthInterceptor };
|
|
145
95
|
//# sourceMappingURL=aril-keycloak.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-keycloak.mjs","sources":["../../projects/aril/keycloak/src/auth.interceptor.ts","../../projects/aril/keycloak/
|
|
1
|
+
{"version":3,"file":"aril-keycloak.mjs","sources":["../../projects/aril/keycloak/src/auth.interceptor.ts","../../projects/aril/keycloak/aril-keycloak.ts"],"sourcesContent":["import { HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http';\r\nimport { inject } from '@angular/core';\r\n\r\nimport { Apps } from 'aril/boot/config/apps';\r\nimport { KeycloakBearerInterceptor } from 'keycloak-angular';\r\n\r\nconst getCurrentAppName = (host: string, mf: string) => {\r\n\tlet appName = '';\r\n\tif (host) {\r\n\t\tswitch (host) {\r\n\t\t\tcase Apps.YEAP:\r\n\t\t\t\tappName = Apps.YEAP;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Apps.LENA:\r\n\t\t\t\tappName = Apps.LENA;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Apps.THOR:\r\n\t\t\t\tappName = Apps.THOR;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else {\r\n\t\tswitch (mf) {\r\n\t\t\tcase Apps.HES:\r\n\t\t\tcase Apps.CTS:\r\n\t\t\tcase Apps.SIS:\r\n\t\t\t\tappName = Apps.LENA;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Apps.CRM:\r\n\t\t\tcase Apps.BILLING:\r\n\t\t\tcase Apps.PAYMENT:\r\n\t\t\tcase Apps.WDM:\r\n\t\t\tcase Apps.MNG:\r\n\t\t\t\tappName = Apps.THOR;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Apps.MW:\r\n\t\t\t\tappName = Apps.YEAP;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tappName = Apps.YEAP;\r\n\t\t}\r\n\t}\r\n\treturn appName;\r\n};\r\n\r\nconst getAppHeader = (appName: string) => {\r\n\tlet appHeader = {};\r\n\tswitch (appName) {\r\n\t\tcase Apps.YEAP:\r\n\t\t\tappHeader = {\r\n\t\t\t\t\"x-yeap-application\": \"yeap\",\r\n\t\t\t\t\"x-application\": \"yeap\",\r\n\t\t\t\t\"x-module\": \"yeap-fe\"\r\n\t\t\t};\r\n\t\t\tbreak;\r\n\t\tcase Apps.LENA:\r\n\t\t\tappHeader = {\r\n\t\t\t\t\"x-yeap-application\": \"lena\",\r\n\t\t\t\t\"x-application\": \"lena\",\r\n\t\t\t\t\"x-module\": \"lena-fe\"\r\n\t\t\t};\r\n\t\t\tbreak;\r\n\t\tcase Apps.THOR:\r\n\t\t\tappHeader = {\r\n\t\t\t\t\"x-yeap-application\": \"thor\",\r\n\t\t\t\t\"x-application\": \"thor\",\r\n\t\t\t\t\"x-module\": \"thor-fe\"\r\n\t\t\t};\r\n\t\t\tbreak;\r\n\t}\r\n\treturn appHeader;\r\n};\r\n\r\nconst getCsrfToken = (): string | undefined => {\r\n\treturn document.cookie\r\n\t .split('; ')\r\n\t .find(row => row.startsWith('csrf_token='))\r\n\t ?.split('=')[1];\r\n };\r\n\r\nexport const authInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => {\r\n\tconst currentApp = getCurrentAppName((<any>globalThis).activeHost, (<any>globalThis).activeMF);\r\n\tconst appNameHeader = getAppHeader(currentApp);\r\n\tconst csrfToken = getCsrfToken();\r\n\r\n\tconst authReq = req.clone({\r\n\t\tsetHeaders: {\r\n\t\t\t'csrf_token': csrfToken || '',\r\n\t\t\t...appNameHeader\r\n\t\t}\r\n\t});\r\n\r\n\treturn next(authReq);\r\n};\r\n\r\nexport const keycloakAuthInterceptor: HttpInterceptorFn = (\r\n\treq: HttpRequest<unknown>,\r\n\tnext: HttpHandlerFn\r\n ) => inject(KeycloakBearerInterceptor).intercept(req, { handle: next });\r\n ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAMA,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAU,KAAI;IACtD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,IAAI,EAAE;QACT,QAAQ,IAAI;YACX,KAAK,IAAI,CAAC,IAAI;AACb,gBAAA,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC;gBACpB,MAAM;YACP,KAAK,IAAI,CAAC,IAAI;AACb,gBAAA,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC;gBACpB,MAAM;YACP,KAAK,IAAI,CAAC,IA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cdk": "~17.1.0",
|
|
6
6
|
"@angular/common": "^17.1.0",
|
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"esm": "./esm2022/http/aril-http.mjs",
|
|
54
54
|
"default": "./fesm2022/aril-http.mjs"
|
|
55
55
|
},
|
|
56
|
+
"./i18n": {
|
|
57
|
+
"types": "./i18n/index.d.ts",
|
|
58
|
+
"esm2022": "./esm2022/i18n/aril-i18n.mjs",
|
|
59
|
+
"esm": "./esm2022/i18n/aril-i18n.mjs",
|
|
60
|
+
"default": "./fesm2022/aril-i18n.mjs"
|
|
61
|
+
},
|
|
56
62
|
"./keycloak": {
|
|
57
63
|
"types": "./keycloak/index.d.ts",
|
|
58
64
|
"esm2022": "./esm2022/keycloak/aril-keycloak.mjs",
|
|
@@ -71,48 +77,90 @@
|
|
|
71
77
|
"esm": "./esm2022/theme/aril-theme.mjs",
|
|
72
78
|
"default": "./fesm2022/aril-theme.mjs"
|
|
73
79
|
},
|
|
74
|
-
"./ui": {
|
|
75
|
-
"types": "./ui/index.d.ts",
|
|
76
|
-
"esm2022": "./esm2022/ui/aril-ui.mjs",
|
|
77
|
-
"esm": "./esm2022/ui/aril-ui.mjs",
|
|
78
|
-
"default": "./fesm2022/aril-ui.mjs"
|
|
79
|
-
},
|
|
80
|
-
"./i18n": {
|
|
81
|
-
"types": "./i18n/index.d.ts",
|
|
82
|
-
"esm2022": "./esm2022/i18n/aril-i18n.mjs",
|
|
83
|
-
"esm": "./esm2022/i18n/aril-i18n.mjs",
|
|
84
|
-
"default": "./fesm2022/aril-i18n.mjs"
|
|
85
|
-
},
|
|
86
80
|
"./ui-business": {
|
|
87
81
|
"types": "./ui-business/index.d.ts",
|
|
88
82
|
"esm2022": "./esm2022/ui-business/aril-ui-business.mjs",
|
|
89
83
|
"esm": "./esm2022/ui-business/aril-ui-business.mjs",
|
|
90
84
|
"default": "./fesm2022/aril-ui-business.mjs"
|
|
91
85
|
},
|
|
86
|
+
"./ui": {
|
|
87
|
+
"types": "./ui/index.d.ts",
|
|
88
|
+
"esm2022": "./esm2022/ui/aril-ui.mjs",
|
|
89
|
+
"esm": "./esm2022/ui/aril-ui.mjs",
|
|
90
|
+
"default": "./fesm2022/aril-ui.mjs"
|
|
91
|
+
},
|
|
92
92
|
"./util": {
|
|
93
93
|
"types": "./util/index.d.ts",
|
|
94
94
|
"esm2022": "./esm2022/util/aril-util.mjs",
|
|
95
95
|
"esm": "./esm2022/util/aril-util.mjs",
|
|
96
96
|
"default": "./fesm2022/aril-util.mjs"
|
|
97
97
|
},
|
|
98
|
-
"./boot/host": {
|
|
99
|
-
"types": "./boot/host/index.d.ts",
|
|
100
|
-
"esm2022": "./esm2022/boot/host/aril-boot-host.mjs",
|
|
101
|
-
"esm": "./esm2022/boot/host/aril-boot-host.mjs",
|
|
102
|
-
"default": "./fesm2022/aril-boot-host.mjs"
|
|
103
|
-
},
|
|
104
98
|
"./boot/mfe": {
|
|
105
99
|
"types": "./boot/mfe/index.d.ts",
|
|
106
100
|
"esm2022": "./esm2022/boot/mfe/aril-boot-mfe.mjs",
|
|
107
101
|
"esm": "./esm2022/boot/mfe/aril-boot-mfe.mjs",
|
|
108
102
|
"default": "./fesm2022/aril-boot-mfe.mjs"
|
|
109
103
|
},
|
|
104
|
+
"./boot/host": {
|
|
105
|
+
"types": "./boot/host/index.d.ts",
|
|
106
|
+
"esm2022": "./esm2022/boot/host/aril-boot-host.mjs",
|
|
107
|
+
"esm": "./esm2022/boot/host/aril-boot-host.mjs",
|
|
108
|
+
"default": "./fesm2022/aril-boot-host.mjs"
|
|
109
|
+
},
|
|
110
110
|
"./theme/layout": {
|
|
111
111
|
"types": "./theme/layout/index.d.ts",
|
|
112
112
|
"esm2022": "./esm2022/theme/layout/aril-theme-layout.mjs",
|
|
113
113
|
"esm": "./esm2022/theme/layout/aril-theme-layout.mjs",
|
|
114
114
|
"default": "./fesm2022/aril-theme-layout.mjs"
|
|
115
115
|
},
|
|
116
|
+
"./ui-business/assetPicker": {
|
|
117
|
+
"types": "./ui-business/assetPicker/index.d.ts",
|
|
118
|
+
"esm2022": "./esm2022/ui-business/assetPicker/aril-ui-business-assetPicker.mjs",
|
|
119
|
+
"esm": "./esm2022/ui-business/assetPicker/aril-ui-business-assetPicker.mjs",
|
|
120
|
+
"default": "./fesm2022/aril-ui-business-assetPicker.mjs"
|
|
121
|
+
},
|
|
122
|
+
"./ui-business/enumPicker": {
|
|
123
|
+
"types": "./ui-business/enumPicker/index.d.ts",
|
|
124
|
+
"esm2022": "./esm2022/ui-business/enumPicker/aril-ui-business-enumPicker.mjs",
|
|
125
|
+
"esm": "./esm2022/ui-business/enumPicker/aril-ui-business-enumPicker.mjs",
|
|
126
|
+
"default": "./fesm2022/aril-ui-business-enumPicker.mjs"
|
|
127
|
+
},
|
|
128
|
+
"./ui-business/multiple-ref-value": {
|
|
129
|
+
"types": "./ui-business/multiple-ref-value/index.d.ts",
|
|
130
|
+
"esm2022": "./esm2022/ui-business/multiple-ref-value/aril-ui-business-multiple-ref-value.mjs",
|
|
131
|
+
"esm": "./esm2022/ui-business/multiple-ref-value/aril-ui-business-multiple-ref-value.mjs",
|
|
132
|
+
"default": "./fesm2022/aril-ui-business-multiple-ref-value.mjs"
|
|
133
|
+
},
|
|
134
|
+
"./ui-business/operation-types-dialog": {
|
|
135
|
+
"types": "./ui-business/operation-types-dialog/index.d.ts",
|
|
136
|
+
"esm2022": "./esm2022/ui-business/operation-types-dialog/aril-ui-business-operation-types-dialog.mjs",
|
|
137
|
+
"esm": "./esm2022/ui-business/operation-types-dialog/aril-ui-business-operation-types-dialog.mjs",
|
|
138
|
+
"default": "./fesm2022/aril-ui-business-operation-types-dialog.mjs"
|
|
139
|
+
},
|
|
140
|
+
"./ui-business/detailed-overlay-panel": {
|
|
141
|
+
"types": "./ui-business/detailed-overlay-panel/index.d.ts",
|
|
142
|
+
"esm2022": "./esm2022/ui-business/detailed-overlay-panel/aril-ui-business-detailed-overlay-panel.mjs",
|
|
143
|
+
"esm": "./esm2022/ui-business/detailed-overlay-panel/aril-ui-business-detailed-overlay-panel.mjs",
|
|
144
|
+
"default": "./fesm2022/aril-ui-business-detailed-overlay-panel.mjs"
|
|
145
|
+
},
|
|
146
|
+
"./ui-business/ref-value": {
|
|
147
|
+
"types": "./ui-business/ref-value/index.d.ts",
|
|
148
|
+
"esm2022": "./esm2022/ui-business/ref-value/aril-ui-business-ref-value.mjs",
|
|
149
|
+
"esm": "./esm2022/ui-business/ref-value/aril-ui-business-ref-value.mjs",
|
|
150
|
+
"default": "./fesm2022/aril-ui-business-ref-value.mjs"
|
|
151
|
+
},
|
|
152
|
+
"./ui-business/rolePicker": {
|
|
153
|
+
"types": "./ui-business/rolePicker/index.d.ts",
|
|
154
|
+
"esm2022": "./esm2022/ui-business/rolePicker/aril-ui-business-rolePicker.mjs",
|
|
155
|
+
"esm": "./esm2022/ui-business/rolePicker/aril-ui-business-rolePicker.mjs",
|
|
156
|
+
"default": "./fesm2022/aril-ui-business-rolePicker.mjs"
|
|
157
|
+
},
|
|
158
|
+
"./ui-business/userPicker": {
|
|
159
|
+
"types": "./ui-business/userPicker/index.d.ts",
|
|
160
|
+
"esm2022": "./esm2022/ui-business/userPicker/aril-ui-business-userPicker.mjs",
|
|
161
|
+
"esm": "./esm2022/ui-business/userPicker/aril-ui-business-userPicker.mjs",
|
|
162
|
+
"default": "./fesm2022/aril-ui-business-userPicker.mjs"
|
|
163
|
+
},
|
|
116
164
|
"./ui/autoComplete": {
|
|
117
165
|
"types": "./ui/autoComplete/index.d.ts",
|
|
118
166
|
"esm2022": "./esm2022/ui/autoComplete/aril-ui-autoComplete.mjs",
|
|
@@ -197,18 +245,18 @@
|
|
|
197
245
|
"esm": "./esm2022/ui/img-viewer/aril-ui-img-viewer.mjs",
|
|
198
246
|
"default": "./fesm2022/aril-ui-img-viewer.mjs"
|
|
199
247
|
},
|
|
200
|
-
"./ui/loader": {
|
|
201
|
-
"types": "./ui/loader/index.d.ts",
|
|
202
|
-
"esm2022": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
203
|
-
"esm": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
204
|
-
"default": "./fesm2022/aril-ui-loader.mjs"
|
|
205
|
-
},
|
|
206
248
|
"./ui/lib": {
|
|
207
249
|
"types": "./ui/lib/index.d.ts",
|
|
208
250
|
"esm2022": "./esm2022/ui/lib/aril-ui-lib.mjs",
|
|
209
251
|
"esm": "./esm2022/ui/lib/aril-ui-lib.mjs",
|
|
210
252
|
"default": "./fesm2022/aril-ui-lib.mjs"
|
|
211
253
|
},
|
|
254
|
+
"./ui/loader": {
|
|
255
|
+
"types": "./ui/loader/index.d.ts",
|
|
256
|
+
"esm2022": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
257
|
+
"esm": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
258
|
+
"default": "./fesm2022/aril-ui-loader.mjs"
|
|
259
|
+
},
|
|
212
260
|
"./ui/mask": {
|
|
213
261
|
"types": "./ui/mask/index.d.ts",
|
|
214
262
|
"esm2022": "./esm2022/ui/mask/aril-ui-mask.mjs",
|
|
@@ -239,41 +287,35 @@
|
|
|
239
287
|
"esm": "./esm2022/ui/overlayPanel/aril-ui-overlayPanel.mjs",
|
|
240
288
|
"default": "./fesm2022/aril-ui-overlayPanel.mjs"
|
|
241
289
|
},
|
|
242
|
-
"./ui/password": {
|
|
243
|
-
"types": "./ui/password/index.d.ts",
|
|
244
|
-
"esm2022": "./esm2022/ui/password/aril-ui-password.mjs",
|
|
245
|
-
"esm": "./esm2022/ui/password/aril-ui-password.mjs",
|
|
246
|
-
"default": "./fesm2022/aril-ui-password.mjs"
|
|
247
|
-
},
|
|
248
290
|
"./ui/panel": {
|
|
249
291
|
"types": "./ui/panel/index.d.ts",
|
|
250
292
|
"esm2022": "./esm2022/ui/panel/aril-ui-panel.mjs",
|
|
251
293
|
"esm": "./esm2022/ui/panel/aril-ui-panel.mjs",
|
|
252
294
|
"default": "./fesm2022/aril-ui-panel.mjs"
|
|
253
295
|
},
|
|
296
|
+
"./ui/password": {
|
|
297
|
+
"types": "./ui/password/index.d.ts",
|
|
298
|
+
"esm2022": "./esm2022/ui/password/aril-ui-password.mjs",
|
|
299
|
+
"esm": "./esm2022/ui/password/aril-ui-password.mjs",
|
|
300
|
+
"default": "./fesm2022/aril-ui-password.mjs"
|
|
301
|
+
},
|
|
254
302
|
"./ui/pdf-viewer": {
|
|
255
303
|
"types": "./ui/pdf-viewer/index.d.ts",
|
|
256
304
|
"esm2022": "./esm2022/ui/pdf-viewer/aril-ui-pdf-viewer.mjs",
|
|
257
305
|
"esm": "./esm2022/ui/pdf-viewer/aril-ui-pdf-viewer.mjs",
|
|
258
306
|
"default": "./fesm2022/aril-ui-pdf-viewer.mjs"
|
|
259
307
|
},
|
|
260
|
-
"./ui/radioButton": {
|
|
261
|
-
"types": "./ui/radioButton/index.d.ts",
|
|
262
|
-
"esm2022": "./esm2022/ui/radioButton/aril-ui-radioButton.mjs",
|
|
263
|
-
"esm": "./esm2022/ui/radioButton/aril-ui-radioButton.mjs",
|
|
264
|
-
"default": "./fesm2022/aril-ui-radioButton.mjs"
|
|
265
|
-
},
|
|
266
308
|
"./ui/progressbar": {
|
|
267
309
|
"types": "./ui/progressbar/index.d.ts",
|
|
268
310
|
"esm2022": "./esm2022/ui/progressbar/aril-ui-progressbar.mjs",
|
|
269
311
|
"esm": "./esm2022/ui/progressbar/aril-ui-progressbar.mjs",
|
|
270
312
|
"default": "./fesm2022/aril-ui-progressbar.mjs"
|
|
271
313
|
},
|
|
272
|
-
"./ui/
|
|
273
|
-
"types": "./ui/
|
|
274
|
-
"esm2022": "./esm2022/ui/
|
|
275
|
-
"esm": "./esm2022/ui/
|
|
276
|
-
"default": "./fesm2022/aril-ui-
|
|
314
|
+
"./ui/radioButton": {
|
|
315
|
+
"types": "./ui/radioButton/index.d.ts",
|
|
316
|
+
"esm2022": "./esm2022/ui/radioButton/aril-ui-radioButton.mjs",
|
|
317
|
+
"esm": "./esm2022/ui/radioButton/aril-ui-radioButton.mjs",
|
|
318
|
+
"default": "./fesm2022/aril-ui-radioButton.mjs"
|
|
277
319
|
},
|
|
278
320
|
"./ui/selectBox": {
|
|
279
321
|
"types": "./ui/selectBox/index.d.ts",
|
|
@@ -281,6 +323,12 @@
|
|
|
281
323
|
"esm": "./esm2022/ui/selectBox/aril-ui-selectBox.mjs",
|
|
282
324
|
"default": "./fesm2022/aril-ui-selectBox.mjs"
|
|
283
325
|
},
|
|
326
|
+
"./ui/relativeDateSelector": {
|
|
327
|
+
"types": "./ui/relativeDateSelector/index.d.ts",
|
|
328
|
+
"esm2022": "./esm2022/ui/relativeDateSelector/aril-ui-relativeDateSelector.mjs",
|
|
329
|
+
"esm": "./esm2022/ui/relativeDateSelector/aril-ui-relativeDateSelector.mjs",
|
|
330
|
+
"default": "./fesm2022/aril-ui-relativeDateSelector.mjs"
|
|
331
|
+
},
|
|
284
332
|
"./ui/switch": {
|
|
285
333
|
"types": "./ui/switch/index.d.ts",
|
|
286
334
|
"esm2022": "./esm2022/ui/switch/aril-ui-switch.mjs",
|
|
@@ -293,23 +341,17 @@
|
|
|
293
341
|
"esm": "./esm2022/ui/table/aril-ui-table.mjs",
|
|
294
342
|
"default": "./fesm2022/aril-ui-table.mjs"
|
|
295
343
|
},
|
|
296
|
-
"./ui/tag": {
|
|
297
|
-
"types": "./ui/tag/index.d.ts",
|
|
298
|
-
"esm2022": "./esm2022/ui/tag/aril-ui-tag.mjs",
|
|
299
|
-
"esm": "./esm2022/ui/tag/aril-ui-tag.mjs",
|
|
300
|
-
"default": "./fesm2022/aril-ui-tag.mjs"
|
|
301
|
-
},
|
|
302
344
|
"./ui/table-expand": {
|
|
303
345
|
"types": "./ui/table-expand/index.d.ts",
|
|
304
346
|
"esm2022": "./esm2022/ui/table-expand/aril-ui-table-expand.mjs",
|
|
305
347
|
"esm": "./esm2022/ui/table-expand/aril-ui-table-expand.mjs",
|
|
306
348
|
"default": "./fesm2022/aril-ui-table-expand.mjs"
|
|
307
349
|
},
|
|
308
|
-
"./ui/
|
|
309
|
-
"types": "./ui/
|
|
310
|
-
"esm2022": "./esm2022/ui/
|
|
311
|
-
"esm": "./esm2022/ui/
|
|
312
|
-
"default": "./fesm2022/aril-ui-
|
|
350
|
+
"./ui/tag": {
|
|
351
|
+
"types": "./ui/tag/index.d.ts",
|
|
352
|
+
"esm2022": "./esm2022/ui/tag/aril-ui-tag.mjs",
|
|
353
|
+
"esm": "./esm2022/ui/tag/aril-ui-tag.mjs",
|
|
354
|
+
"default": "./fesm2022/aril-ui-tag.mjs"
|
|
313
355
|
},
|
|
314
356
|
"./ui/text": {
|
|
315
357
|
"types": "./ui/text/index.d.ts",
|
|
@@ -323,17 +365,23 @@
|
|
|
323
365
|
"esm": "./esm2022/ui/textArea/aril-ui-textArea.mjs",
|
|
324
366
|
"default": "./fesm2022/aril-ui-textArea.mjs"
|
|
325
367
|
},
|
|
368
|
+
"./ui/tooltip": {
|
|
369
|
+
"types": "./ui/tooltip/index.d.ts",
|
|
370
|
+
"esm2022": "./esm2022/ui/tooltip/aril-ui-tooltip.mjs",
|
|
371
|
+
"esm": "./esm2022/ui/tooltip/aril-ui-tooltip.mjs",
|
|
372
|
+
"default": "./fesm2022/aril-ui-tooltip.mjs"
|
|
373
|
+
},
|
|
326
374
|
"./ui/toggle-button": {
|
|
327
375
|
"types": "./ui/toggle-button/index.d.ts",
|
|
328
376
|
"esm2022": "./esm2022/ui/toggle-button/aril-ui-toggle-button.mjs",
|
|
329
377
|
"esm": "./esm2022/ui/toggle-button/aril-ui-toggle-button.mjs",
|
|
330
378
|
"default": "./fesm2022/aril-ui-toggle-button.mjs"
|
|
331
379
|
},
|
|
332
|
-
"./ui/
|
|
333
|
-
"types": "./ui/
|
|
334
|
-
"esm2022": "./esm2022/ui/
|
|
335
|
-
"esm": "./esm2022/ui/
|
|
336
|
-
"default": "./fesm2022/aril-ui-
|
|
380
|
+
"./ui/tagBox": {
|
|
381
|
+
"types": "./ui/tagBox/index.d.ts",
|
|
382
|
+
"esm2022": "./esm2022/ui/tagBox/aril-ui-tagBox.mjs",
|
|
383
|
+
"esm": "./esm2022/ui/tagBox/aril-ui-tagBox.mjs",
|
|
384
|
+
"default": "./fesm2022/aril-ui-tagBox.mjs"
|
|
337
385
|
},
|
|
338
386
|
"./ui/translate-input": {
|
|
339
387
|
"types": "./ui/translate-input/index.d.ts",
|
|
@@ -341,84 +389,36 @@
|
|
|
341
389
|
"esm": "./esm2022/ui/translate-input/aril-ui-translate-input.mjs",
|
|
342
390
|
"default": "./fesm2022/aril-ui-translate-input.mjs"
|
|
343
391
|
},
|
|
344
|
-
"./ui/tree": {
|
|
345
|
-
"types": "./ui/tree/index.d.ts",
|
|
346
|
-
"esm2022": "./esm2022/ui/tree/aril-ui-tree.mjs",
|
|
347
|
-
"esm": "./esm2022/ui/tree/aril-ui-tree.mjs",
|
|
348
|
-
"default": "./fesm2022/aril-ui-tree.mjs"
|
|
349
|
-
},
|
|
350
392
|
"./ui/treeTable": {
|
|
351
393
|
"types": "./ui/treeTable/index.d.ts",
|
|
352
394
|
"esm2022": "./esm2022/ui/treeTable/aril-ui-treeTable.mjs",
|
|
353
395
|
"esm": "./esm2022/ui/treeTable/aril-ui-treeTable.mjs",
|
|
354
396
|
"default": "./fesm2022/aril-ui-treeTable.mjs"
|
|
355
397
|
},
|
|
398
|
+
"./ui/tree": {
|
|
399
|
+
"types": "./ui/tree/index.d.ts",
|
|
400
|
+
"esm2022": "./esm2022/ui/tree/aril-ui-tree.mjs",
|
|
401
|
+
"esm": "./esm2022/ui/tree/aril-ui-tree.mjs",
|
|
402
|
+
"default": "./fesm2022/aril-ui-tree.mjs"
|
|
403
|
+
},
|
|
356
404
|
"./ui/treeSelect": {
|
|
357
405
|
"types": "./ui/treeSelect/index.d.ts",
|
|
358
406
|
"esm2022": "./esm2022/ui/treeSelect/aril-ui-treeSelect.mjs",
|
|
359
407
|
"esm": "./esm2022/ui/treeSelect/aril-ui-treeSelect.mjs",
|
|
360
408
|
"default": "./fesm2022/aril-ui-treeSelect.mjs"
|
|
361
409
|
},
|
|
362
|
-
"./ui/value": {
|
|
363
|
-
"types": "./ui/value/index.d.ts",
|
|
364
|
-
"esm2022": "./esm2022/ui/value/aril-ui-value.mjs",
|
|
365
|
-
"esm": "./esm2022/ui/value/aril-ui-value.mjs",
|
|
366
|
-
"default": "./fesm2022/aril-ui-value.mjs"
|
|
367
|
-
},
|
|
368
|
-
"./ui-business/detailed-overlay-panel": {
|
|
369
|
-
"types": "./ui-business/detailed-overlay-panel/index.d.ts",
|
|
370
|
-
"esm2022": "./esm2022/ui-business/detailed-overlay-panel/aril-ui-business-detailed-overlay-panel.mjs",
|
|
371
|
-
"esm": "./esm2022/ui-business/detailed-overlay-panel/aril-ui-business-detailed-overlay-panel.mjs",
|
|
372
|
-
"default": "./fesm2022/aril-ui-business-detailed-overlay-panel.mjs"
|
|
373
|
-
},
|
|
374
|
-
"./ui-business/assetPicker": {
|
|
375
|
-
"types": "./ui-business/assetPicker/index.d.ts",
|
|
376
|
-
"esm2022": "./esm2022/ui-business/assetPicker/aril-ui-business-assetPicker.mjs",
|
|
377
|
-
"esm": "./esm2022/ui-business/assetPicker/aril-ui-business-assetPicker.mjs",
|
|
378
|
-
"default": "./fesm2022/aril-ui-business-assetPicker.mjs"
|
|
379
|
-
},
|
|
380
|
-
"./ui-business/enumPicker": {
|
|
381
|
-
"types": "./ui-business/enumPicker/index.d.ts",
|
|
382
|
-
"esm2022": "./esm2022/ui-business/enumPicker/aril-ui-business-enumPicker.mjs",
|
|
383
|
-
"esm": "./esm2022/ui-business/enumPicker/aril-ui-business-enumPicker.mjs",
|
|
384
|
-
"default": "./fesm2022/aril-ui-business-enumPicker.mjs"
|
|
385
|
-
},
|
|
386
|
-
"./ui-business/multiple-ref-value": {
|
|
387
|
-
"types": "./ui-business/multiple-ref-value/index.d.ts",
|
|
388
|
-
"esm2022": "./esm2022/ui-business/multiple-ref-value/aril-ui-business-multiple-ref-value.mjs",
|
|
389
|
-
"esm": "./esm2022/ui-business/multiple-ref-value/aril-ui-business-multiple-ref-value.mjs",
|
|
390
|
-
"default": "./fesm2022/aril-ui-business-multiple-ref-value.mjs"
|
|
391
|
-
},
|
|
392
|
-
"./ui-business/operation-types-dialog": {
|
|
393
|
-
"types": "./ui-business/operation-types-dialog/index.d.ts",
|
|
394
|
-
"esm2022": "./esm2022/ui-business/operation-types-dialog/aril-ui-business-operation-types-dialog.mjs",
|
|
395
|
-
"esm": "./esm2022/ui-business/operation-types-dialog/aril-ui-business-operation-types-dialog.mjs",
|
|
396
|
-
"default": "./fesm2022/aril-ui-business-operation-types-dialog.mjs"
|
|
397
|
-
},
|
|
398
|
-
"./ui-business/ref-value": {
|
|
399
|
-
"types": "./ui-business/ref-value/index.d.ts",
|
|
400
|
-
"esm2022": "./esm2022/ui-business/ref-value/aril-ui-business-ref-value.mjs",
|
|
401
|
-
"esm": "./esm2022/ui-business/ref-value/aril-ui-business-ref-value.mjs",
|
|
402
|
-
"default": "./fesm2022/aril-ui-business-ref-value.mjs"
|
|
403
|
-
},
|
|
404
|
-
"./ui-business/rolePicker": {
|
|
405
|
-
"types": "./ui-business/rolePicker/index.d.ts",
|
|
406
|
-
"esm2022": "./esm2022/ui-business/rolePicker/aril-ui-business-rolePicker.mjs",
|
|
407
|
-
"esm": "./esm2022/ui-business/rolePicker/aril-ui-business-rolePicker.mjs",
|
|
408
|
-
"default": "./fesm2022/aril-ui-business-rolePicker.mjs"
|
|
409
|
-
},
|
|
410
|
-
"./ui-business/userPicker": {
|
|
411
|
-
"types": "./ui-business/userPicker/index.d.ts",
|
|
412
|
-
"esm2022": "./esm2022/ui-business/userPicker/aril-ui-business-userPicker.mjs",
|
|
413
|
-
"esm": "./esm2022/ui-business/userPicker/aril-ui-business-userPicker.mjs",
|
|
414
|
-
"default": "./fesm2022/aril-ui-business-userPicker.mjs"
|
|
415
|
-
},
|
|
416
410
|
"./util/block": {
|
|
417
411
|
"types": "./util/block/index.d.ts",
|
|
418
412
|
"esm2022": "./esm2022/util/block/aril-util-block.mjs",
|
|
419
413
|
"esm": "./esm2022/util/block/aril-util-block.mjs",
|
|
420
414
|
"default": "./fesm2022/aril-util-block.mjs"
|
|
421
415
|
},
|
|
416
|
+
"./ui/value": {
|
|
417
|
+
"types": "./ui/value/index.d.ts",
|
|
418
|
+
"esm2022": "./esm2022/ui/value/aril-ui-value.mjs",
|
|
419
|
+
"esm": "./esm2022/ui/value/aril-ui-value.mjs",
|
|
420
|
+
"default": "./fesm2022/aril-ui-value.mjs"
|
|
421
|
+
},
|
|
422
422
|
"./util/custom_pages": {
|
|
423
423
|
"types": "./util/custom_pages/index.d.ts",
|
|
424
424
|
"esm2022": "./esm2022/util/custom_pages/aril-util-custom_pages.mjs",
|
|
@@ -431,12 +431,6 @@
|
|
|
431
431
|
"esm": "./esm2022/util/init-event/aril-util-init-event.mjs",
|
|
432
432
|
"default": "./fesm2022/aril-util-init-event.mjs"
|
|
433
433
|
},
|
|
434
|
-
"./util/lib": {
|
|
435
|
-
"types": "./util/lib/index.d.ts",
|
|
436
|
-
"esm2022": "./esm2022/util/lib/aril-util-lib.mjs",
|
|
437
|
-
"esm": "./esm2022/util/lib/aril-util-lib.mjs",
|
|
438
|
-
"default": "./fesm2022/aril-util-lib.mjs"
|
|
439
|
-
},
|
|
440
434
|
"./util/pipes": {
|
|
441
435
|
"types": "./util/pipes/index.d.ts",
|
|
442
436
|
"esm2022": "./esm2022/util/pipes/aril-util-pipes.mjs",
|
|
@@ -449,6 +443,12 @@
|
|
|
449
443
|
"esm": "./esm2022/util/loaders/aril-util-loaders.mjs",
|
|
450
444
|
"default": "./fesm2022/aril-util-loaders.mjs"
|
|
451
445
|
},
|
|
446
|
+
"./util/lib": {
|
|
447
|
+
"types": "./util/lib/index.d.ts",
|
|
448
|
+
"esm2022": "./esm2022/util/lib/aril-util-lib.mjs",
|
|
449
|
+
"esm": "./esm2022/util/lib/aril-util-lib.mjs",
|
|
450
|
+
"default": "./fesm2022/aril-util-lib.mjs"
|
|
451
|
+
},
|
|
452
452
|
"./util/primitive-extensions": {
|
|
453
453
|
"types": "./util/primitive-extensions/index.d.ts",
|
|
454
454
|
"esm2022": "./esm2022/util/primitive-extensions/aril-util-primitive-extensions.mjs",
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { KeycloakAuthGuard } from 'keycloak-angular';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/router";
|
|
5
|
-
import * as i2 from "keycloak-angular";
|
|
6
|
-
export class AuthGuard extends KeycloakAuthGuard {
|
|
7
|
-
constructor(router, keycloak) {
|
|
8
|
-
super(router, keycloak);
|
|
9
|
-
this.router = router;
|
|
10
|
-
this.keycloak = keycloak;
|
|
11
|
-
}
|
|
12
|
-
async isAccessAllowed(route, state) {
|
|
13
|
-
try {
|
|
14
|
-
if (this.keycloak.isTokenExpired(5)) {
|
|
15
|
-
console.log("Token expired, updating token");
|
|
16
|
-
await this.keycloak.updateToken(5);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
console.error('Error while updating token', error);
|
|
21
|
-
await this.keycloak.login({
|
|
22
|
-
redirectUri: window.location.origin + state.url
|
|
23
|
-
});
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
if (!this.authenticated) {
|
|
27
|
-
await this.keycloak.login({
|
|
28
|
-
redirectUri: window.location.origin + state.url
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
const requiredRoles = route.data['roles'];
|
|
32
|
-
if (!Array.isArray(requiredRoles) || requiredRoles.length === 0) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
const authorized = requiredRoles.every((role) => this.roles.includes(role));
|
|
36
|
-
if (!authorized) {
|
|
37
|
-
console.error('User not authorized to access this route');
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
else
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, deps: [{ token: i1.Router }, { token: i2.KeycloakService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
44
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
|
|
45
|
-
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, decorators: [{
|
|
47
|
-
type: Injectable,
|
|
48
|
-
args: [{
|
|
49
|
-
providedIn: 'root'
|
|
50
|
-
}]
|
|
51
|
-
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.KeycloakService }] });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5ndWFyZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FyaWwva2V5Y2xvYWsvc3JjL2F1dGguZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUUsaUJBQWlCLEVBQW1CLE1BQU0sa0JBQWtCLENBQUM7Ozs7QUFJdEUsTUFBTSxPQUFPLFNBQVUsU0FBUSxpQkFBaUI7SUFDL0MsWUFDNkIsTUFBYyxFQUN2QixRQUF5QjtRQUU1QyxLQUFLLENBQUMsTUFBTSxFQUFFLFFBQVEsQ0FBQyxDQUFDO1FBSEksV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUN2QixhQUFRLEdBQVIsUUFBUSxDQUFpQjtJQUc3QyxDQUFDO0lBQ00sS0FBSyxDQUFDLGVBQWUsQ0FBQyxLQUE2QixF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Um9sZXMubGVuZ3RoID09PSAwKSB7XHJcblx0XHRcdHJldHVybiB0cnVlO1xyXG5cdFx0fVxyXG5cdFx0Y29uc3QgYXV0aG9yaXplZCA9IHJlcXVpcmVkUm9sZXMuZXZlcnkoKHJvbGUpID0+IHRoaXMucm9sZXMuaW5jbHVkZXMocm9sZSkpO1xyXG5cdFx0aWYgKCFhdXRob3JpemVkKSB7XHJcblx0XHRcdGNvbnNvbGUuZXJyb3IoJ1VzZXIgbm90IGF1dGhvcml6ZWQgdG8gYWNjZXNzIHRoaXMgcm91dGUnKTtcclxuXHRcdFx0cmV0dXJuIGZhbHNlO1xyXG5cdFx0fSBlbHNlIHJldHVybiB0cnVlO1xyXG5cdH1cclxufSJdfQ==
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { KeycloakAuthGuard, KeycloakService } from 'keycloak-angular';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AuthGuard extends KeycloakAuthGuard {
|
|
5
|
-
protected readonly router: Router;
|
|
6
|
-
protected readonly keycloak: KeycloakService;
|
|
7
|
-
constructor(router: Router, keycloak: KeycloakService);
|
|
8
|
-
isAccessAllowed(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
|
|
11
|
-
}
|