oip-common 0.2.1 → 0.3.1

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/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, OnInit, DestroyRef, WritableSignal, OnChanges, SimpleChanges, Type, Provider, InjectionToken, EventEmitter, Renderer2, EnvironmentProviders, PipeTransform } from '@angular/core';
2
+ import { OnDestroy, OnInit, DestroyRef, WritableSignal, OnChanges, SimpleChanges, Type, Provider, InjectionToken, EventEmitter, Renderer2, EnvironmentProviders } from '@angular/core';
3
3
  import { MessageService, ToastMessageOptions, MenuItem, ConfirmationService, FilterMetadata } from 'primeng/api';
4
4
  import { ActivatedRoute, QueryParamsHandling, IsActiveMatchOptions, Params, Router, UrlTree } from '@angular/router';
5
5
  import { InterpolationParameters, Translation, TranslationObject, TranslateService } from '@ngx-translate/core';
6
6
  import * as rxjs from 'rxjs';
7
7
  import { Observable, BehaviorSubject, Subscription, Subject } from 'rxjs';
8
- import { LoginResponse, AuthOptions, OidcSecurityService, LogoutAuthOptions, AbstractSecurityStorage, StsConfigHttpLoader } from 'angular-auth-oidc-client';
8
+ import { LoginResponse, AuthOptions, OidcSecurityService, LogoutAuthOptions } from 'angular-auth-oidc-client';
9
9
  import { ContextMenu } from 'primeng/contextmenu';
10
10
  import { PaletteDesignToken, Preset } from '@primeuix/themes/types';
11
11
  import { PrimeNG } from 'primeng/config';
12
+ import { PaginatorState } from 'primeng/paginator';
12
13
  import { Table } from 'primeng/table';
13
- import { HttpInterceptorFn, HttpClient as HttpClient$1 } from '@angular/common/http';
14
- import { SafeUrl } from '@angular/platform-browser';
14
+ import { HttpInterceptorFn } from '@angular/common/http';
15
15
 
16
16
  interface TopBarDto {
17
17
  id: 'content' | 'settings' | 'security';
@@ -55,44 +55,6 @@ declare class MsgService {
55
55
  static ɵprov: i0.ɵɵInjectableDeclaration<MsgService>;
56
56
  }
57
57
 
58
- /**
59
- * BaseDataService provides a unified interface for sending HTTP requests
60
- * using Angular's HttpClient. It supports standard HTTP methods and automatic
61
- * credential handling.
62
- */
63
- declare class BaseDataService {
64
- private readonly http;
65
- private readonly frontendConfig;
66
- /**
67
- * Gets the base URL of the application from the HTML <base> tag.
68
- */
69
- get baseUrl(): string;
70
- /**
71
- * Builds a fully-qualified application URL based on frontend mode.
72
- */
73
- buildUrl(path: string): string;
74
- /**
75
- * Sends an HTTP request with the specified method and data.
76
- *
77
- * @template TResponse - Expected response type.
78
- * @param url - The target URL for the HTTP request.
79
- * @param method - The HTTP method to use (GET, PUT, POST, DELETE). Default is 'GET'.
80
- * @param data - An object containing request parameters or payload.
81
- * @returns A promise that resolves to the response of type TResponse.
82
- */
83
- sendRequest<TResponse>(url: string, method?: 'GET' | 'PUT' | 'POST' | 'DELETE', data?: any): Promise<TResponse>;
84
- /**
85
- * Sends a GET request and retrieves a response as a Blob.
86
- *
87
- * @param url - The target URL for the GET request.
88
- * @returns A promise that resolves to a Object response.
89
- */
90
- getBlob(url: string): Promise<object>;
91
- private normalizeBaseUrl;
92
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseDataService, never>;
93
- static ɵprov: i0.ɵɵInjectableDeclaration<BaseDataService>;
94
- }
95
-
96
58
  /**
97
59
  * Service to manage the application title.
98
60
  */
@@ -190,6 +152,7 @@ interface LanguageDto {
190
152
  */
191
153
  declare class L10nService {
192
154
  private loadedTranslations;
155
+ private loadingTranslations;
193
156
  private httpClient;
194
157
  private translateService;
195
158
  private readonly primeNg;
@@ -199,12 +162,12 @@ declare class L10nService {
199
162
  * Loads translations for a specific component
200
163
  * @param component - Name of the component to load translations for
201
164
  */
202
- loadComponentTranslations(component: string): void;
165
+ loadComponentTranslations(component: string): Observable<unknown>;
203
166
  /**
204
167
  * Gets the translated value of a key (or an array of keys)
205
168
  * @returns the translated key, or an object of translated keys
206
169
  */
207
- get(key: string): rxjs.Observable<any>;
170
+ get(key: string): Observable<any>;
208
171
  /**
209
172
  * Internal method to load translations from JSON files
210
173
  * @param component - Component or translation namespace
@@ -228,19 +191,13 @@ interface SecurityDto {
228
191
  roles: string[];
229
192
  }
230
193
 
231
- interface PutSecurityDto {
232
- id: number;
233
- securities: SecurityDto[];
234
- }
235
-
236
- declare class SecurityDataService extends BaseDataService {
237
- getSecurity(controller: string, id: number): Promise<SecurityDto[]>;
238
- saveSecurity(controller: string, request: PutSecurityDto): Promise<any>;
239
- getRealmRoles(): Promise<string[]>;
240
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurityDataService, never>;
241
- static ɵprov: i0.ɵɵInjectableDeclaration<SecurityDataService>;
242
- }
243
-
194
+ type RefreshCustomParams = {
195
+ [key: string]: string | number | boolean;
196
+ };
197
+ type AuthCsrfToken = {
198
+ token: string;
199
+ headerName: string;
200
+ };
244
201
  declare abstract class SecurityService {
245
202
  abstract auth(): void;
246
203
  abstract logout(): void;
@@ -249,11 +206,39 @@ declare abstract class SecurityService {
249
206
  abstract isTokenExpired(): Observable<boolean>;
250
207
  abstract getCurrentUser(): any;
251
208
  abstract getCurrentUser$(): Observable<any>;
252
- abstract forceRefreshSession(): Observable<LoginResponse>;
209
+ abstract forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<LoginResponse>;
210
+ abstract getCsrfToken(): Observable<AuthCsrfToken | null>;
253
211
  abstract isAdmin(): boolean;
254
212
  abstract authorize(configId?: string, authOptions?: AuthOptions): void;
255
213
  abstract payload: BehaviorSubject<any>;
256
214
  }
215
+ declare class BffSecurityService implements OnDestroy, SecurityService {
216
+ private readonly http;
217
+ private readonly authenticated;
218
+ private readonly currentUser;
219
+ private readonly csrfToken;
220
+ readonly payload: BehaviorSubject<any>;
221
+ auth(): void;
222
+ logout(): void;
223
+ isAuthenticated(): Observable<boolean>;
224
+ getAccessToken(): Observable<string>;
225
+ isTokenExpired(): Observable<boolean>;
226
+ getCurrentUser(): any;
227
+ getCurrentUser$(): Observable<any>;
228
+ forceRefreshSession(): Observable<LoginResponse>;
229
+ getCsrfToken(): Observable<AuthCsrfToken | null>;
230
+ isAdmin(): boolean;
231
+ authorize(): void;
232
+ ngOnDestroy(): void;
233
+ private applySession;
234
+ private createCurrentUser;
235
+ private splitDisplayName;
236
+ private applyAnonymousSession;
237
+ private createPostForm;
238
+ private buildUrl;
239
+ static ɵfac: i0.ɵɵFactoryDeclaration<BffSecurityService, never>;
240
+ static ɵprov: i0.ɵɵInjectableDeclaration<BffSecurityService>;
241
+ }
257
242
  /**
258
243
  * SecurityService extends OidcSecurityService to manage authentication,
259
244
  * token handling, and user role access in an Angular application.
@@ -262,6 +247,12 @@ declare abstract class SecurityService {
262
247
  * determining user roles, and performing logout and refresh operations.
263
248
  */
264
249
  declare class KeycloakSecurityService extends OidcSecurityService implements OnDestroy, SecurityService {
250
+ private readonly refreshLockKeyPrefix;
251
+ private readonly refreshResultKeyPrefix;
252
+ private readonly refreshLockTtlMs;
253
+ private readonly refreshWaitTimeoutMs;
254
+ private readonly refreshTabId;
255
+ private refreshSession$?;
265
256
  /**
266
257
  * Handles angular OIDC events.
267
258
  */
@@ -295,6 +286,8 @@ declare class KeycloakSecurityService extends OidcSecurityService implements OnD
295
286
  * @returns A string with the id token.
296
287
  */
297
288
  getAccessToken(configId?: string): Observable<string>;
289
+ forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<LoginResponse>;
290
+ getCsrfToken(): Observable<AuthCsrfToken | null>;
298
291
  /**
299
292
  * Indicates whether the current user has the 'admin' role.
300
293
  *
@@ -323,10 +316,85 @@ declare class KeycloakSecurityService extends OidcSecurityService implements OnD
323
316
  * @returns {Observable<boolean>} Observable that emits true if the token is expired.
324
317
  */
325
318
  isTokenExpired(): Observable<boolean>;
319
+ private runSynchronizedRefresh;
320
+ private runSynchronizedRefreshWithStorageLock;
321
+ private refreshAsLockOwner;
322
+ private syncAuthState;
323
+ private applyLoginResponse;
324
+ private isCurrentAccessTokenExpired;
325
+ private tryAcquireRefreshLock;
326
+ private releaseRefreshLock;
327
+ private waitForRefreshResult;
328
+ private tryResolveRefreshResult;
329
+ private publishRefreshResult;
330
+ private readRefreshLock;
331
+ private readRefreshResult;
332
+ private getRefreshLockKey;
333
+ private getRefreshResultKey;
334
+ private getWebLocks;
335
+ private createRefreshTabId;
326
336
  static ɵfac: i0.ɵɵFactoryDeclaration<KeycloakSecurityService, never>;
327
337
  static ɵprov: i0.ɵɵInjectableDeclaration<KeycloakSecurityService>;
328
338
  }
329
339
 
340
+ type QueryParamsType = Record<string | number, any>;
341
+ type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
342
+ interface FullRequestParams extends Omit<RequestInit, "body"> {
343
+ /** set parameter to `true` for call `securityWorker` for this request */
344
+ secure?: boolean;
345
+ /** request path */
346
+ path: string;
347
+ /** content type of request body */
348
+ type?: ContentType;
349
+ /** query params */
350
+ query?: QueryParamsType;
351
+ /** format of response (i.e. response.json() -> format: "json") */
352
+ format?: ResponseFormat;
353
+ /** request body */
354
+ body?: unknown;
355
+ /** base url */
356
+ baseUrl?: string;
357
+ /** request cancellation token */
358
+ cancelToken?: CancelToken;
359
+ }
360
+ type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
361
+ type CancelToken = Symbol | string | number;
362
+ declare enum ContentType {
363
+ Json = "application/json",
364
+ JsonApi = "application/vnd.api+json",
365
+ FormData = "multipart/form-data",
366
+ UrlEncoded = "application/x-www-form-urlencoded",
367
+ Text = "text/plain"
368
+ }
369
+ declare class HttpClient<SecurityDataType = unknown> {
370
+ protected securityService: SecurityService;
371
+ protected layoutService: LayoutService;
372
+ baseUrl: string;
373
+ private securityWorker?;
374
+ private abortControllers;
375
+ private customFetch;
376
+ private baseApiParams;
377
+ setSecurityData: (data: SecurityDataType | null) => void;
378
+ protected encodeQueryParam(key: string, value: any): string;
379
+ protected addQueryParam(query: QueryParamsType, key: string): string;
380
+ protected addArrayQueryParam(query: QueryParamsType, key: string): any;
381
+ protected toQueryString(rawQuery?: QueryParamsType): string;
382
+ protected addQueryParams(rawQuery?: QueryParamsType): string;
383
+ private contentFormatters;
384
+ protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
385
+ protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
386
+ abortRequest: (cancelToken: CancelToken) => void;
387
+ request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<T>;
388
+ private getCsrfRequestParams;
389
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient<any>, never>;
390
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient<any>>;
391
+ }
392
+
393
+ interface PutSecurityDto {
394
+ id: number;
395
+ securities: SecurityDto[];
396
+ }
397
+
330
398
  declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSettings> implements OnInit, OnDestroy {
331
399
  private static readonly readRight;
332
400
  private static readonly editRight;
@@ -335,8 +403,8 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
335
403
  private moduleInstanceReloadPromise;
336
404
  private rightsSubscription?;
337
405
  protected readonly destroyRef: DestroyRef;
338
- protected readonly securityDataService: SecurityDataService;
339
406
  protected readonly securityService: SecurityService;
407
+ protected readonly httpClient: HttpClient<any>;
340
408
  /**
341
409
  * Provide access to app settings
342
410
  */
@@ -355,11 +423,6 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
355
423
  * Provides access to messaging services.
356
424
  */
357
425
  readonly msgService: MsgService;
358
- /**
359
- * Provides access to base data service functionality.
360
- * @deprecated The method should not be used
361
- */
362
- readonly baseDataService: BaseDataService;
363
426
  /**
364
427
  * Provides access to translation functionality.
365
428
  */
@@ -494,6 +557,15 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
494
557
  private resetRightsState;
495
558
  private updateRightsState;
496
559
  protected hasSecurityRight(roles: string[], securitySettings: SecurityDto[], code: string): boolean;
560
+ protected getSecurity(controller?: string, id?: number | undefined): Promise<SecurityDto[]>;
561
+ protected saveSecurity(request: PutSecurityDto, controller?: string): Promise<unknown>;
562
+ protected getModuleInstanceSettings<TSettings>(controller?: string, id?: number | undefined): Promise<TSettings>;
563
+ protected saveModuleInstanceSettings<TSettings>(request: {
564
+ id: number;
565
+ settings: TSettings;
566
+ }, controller?: string): Promise<unknown>;
567
+ protected getMigrations<TMigration>(controller?: string): Promise<TMigration[]>;
568
+ protected applyModuleMigration(request: unknown, controller?: string): Promise<unknown>;
497
569
  private reloadModuleInstance;
498
570
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseModuleComponent<any, any>, never>;
499
571
  static ɵcmp: i0.ɵɵComponentDeclaration<BaseModuleComponent<any, any>, "ng-component", never, {}, {}, never, never, true, never>;
@@ -501,10 +573,11 @@ declare abstract class BaseModuleComponent<TBackendStoreSettings, TLocalStoreSet
501
573
 
502
574
  declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
503
575
  private readonly msgService;
504
- private readonly dataService;
505
576
  private readonly translateService;
577
+ private readonly httpClient;
578
+ private readonly securityApi;
506
579
  private securityLoadToken;
507
- securityData: any[];
580
+ securityData: SecurityDto[];
508
581
  id?: number;
509
582
  controller?: string;
510
583
  roles: string[];
@@ -514,6 +587,8 @@ declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
514
587
  saveClick(): void;
515
588
  saveKeyDown($event: KeyboardEvent): void;
516
589
  private loadSecurity;
590
+ private getSecurity;
591
+ private saveSecurity;
517
592
  static ɵfac: i0.ɵɵFactoryDeclaration<SecurityComponent, never>;
518
593
  static ɵcmp: i0.ɵɵComponentDeclaration<SecurityComponent, "security", never, { "id": { "alias": "id"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; }, {}, never, never, true, never>;
519
594
  }
@@ -524,7 +599,7 @@ declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
524
599
  */
525
600
  declare class UserService {
526
601
  private readonly securityService;
527
- private readonly baseDataService;
602
+ private readonly userProfileApi;
528
603
  private requestedPhotoEmail;
529
604
  constructor();
530
605
  /**
@@ -552,6 +627,7 @@ declare class UserService {
552
627
  * @param image - The image Blob to be converted.
553
628
  */
554
629
  private createImageFromBlob;
630
+ private getInitials;
555
631
  static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
556
632
  static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
557
633
  }
@@ -572,8 +648,11 @@ declare class AppTopbar {
572
648
  userService: UserService;
573
649
  layoutService: LayoutService;
574
650
  logoService: LogoService;
651
+ private readonly confirmationService;
652
+ private readonly translateService;
575
653
  toggleDarkMode(): void;
576
654
  logoutKeyDown($event: KeyboardEvent): void;
655
+ confirmLogout(): void;
577
656
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbar, never>;
578
657
  static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbar, "app-topbar", never, {}, {}, never, never, true, never>;
579
658
  }
@@ -591,6 +670,17 @@ interface AddModuleInstanceDto {
591
670
  parentId?: number | null;
592
671
  viewRoles?: string[] | null;
593
672
  }
673
+ interface AuthCsrfTokenResponse {
674
+ token?: string | null;
675
+ headerName?: string | null;
676
+ }
677
+ interface AuthSessionResponse {
678
+ isAuthenticated?: boolean;
679
+ userName?: string | null;
680
+ displayName?: string | null;
681
+ email?: string | null;
682
+ roles?: string[] | null;
683
+ }
594
684
  interface EditModuleInstanceDto {
595
685
  moduleInstanceId?: number;
596
686
  label?: string | null;
@@ -599,6 +689,19 @@ interface EditModuleInstanceDto {
599
689
  viewRoles?: string[] | null;
600
690
  moduleId?: number | null;
601
691
  }
692
+ interface FolderModuleSettings {
693
+ html?: string | null;
694
+ }
695
+ interface GetKeycloakClientSettingsResponse {
696
+ authority?: string | null;
697
+ clientId?: string | null;
698
+ scope?: string | null;
699
+ responseType?: string | null;
700
+ useRefreshToken?: boolean;
701
+ silentRenew?: boolean;
702
+ logLevel?: number;
703
+ secureRoutes?: string[] | null;
704
+ }
602
705
  interface IframeModuleSettings {
603
706
  url?: string | null;
604
707
  }
@@ -631,6 +734,12 @@ interface ModuleSecurityDto {
631
734
  right: string | null;
632
735
  role: string | null;
633
736
  }
737
+ interface GetModuleInstanceSettingsParams {
738
+ id?: number;
739
+ }
740
+ interface GetModuleInstanceSettingsParams2 {
741
+ id?: number;
742
+ }
634
743
  interface DeleteModuleInstanceParams {
635
744
  id?: number;
636
745
  }
@@ -691,7 +800,7 @@ interface MenuChangeEvent {
691
800
  item: ContextMenuItemDto;
692
801
  }
693
802
 
694
- declare class MenuService extends BaseDataService {
803
+ declare class MenuService {
695
804
  private readonly menuSource;
696
805
  private readonly resetSource;
697
806
  private readonly titleService;
@@ -719,60 +828,6 @@ declare class MenuService extends BaseDataService {
719
828
  static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
720
829
  }
721
830
 
722
- type QueryParamsType = Record<string | number, any>;
723
- type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
724
- interface FullRequestParams extends Omit<RequestInit, "body"> {
725
- /** set parameter to `true` for call `securityWorker` for this request */
726
- secure?: boolean;
727
- /** request path */
728
- path: string;
729
- /** content type of request body */
730
- type?: ContentType;
731
- /** query params */
732
- query?: QueryParamsType;
733
- /** format of response (i.e. response.json() -> format: "json") */
734
- format?: ResponseFormat;
735
- /** request body */
736
- body?: unknown;
737
- /** base url */
738
- baseUrl?: string;
739
- /** request cancellation token */
740
- cancelToken?: CancelToken;
741
- }
742
- type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
743
- type CancelToken = Symbol | string | number;
744
- declare enum ContentType {
745
- Json = "application/json",
746
- JsonApi = "application/vnd.api+json",
747
- FormData = "multipart/form-data",
748
- UrlEncoded = "application/x-www-form-urlencoded",
749
- Text = "text/plain"
750
- }
751
- declare class HttpClient<SecurityDataType = unknown> {
752
- protected securityService: SecurityService;
753
- protected layoutService: LayoutService;
754
- baseUrl: string;
755
- private securityData;
756
- private securityWorker?;
757
- private abortControllers;
758
- private customFetch;
759
- private baseApiParams;
760
- constructor();
761
- setSecurityData: (data: SecurityDataType | null) => void;
762
- protected encodeQueryParam(key: string, value: any): string;
763
- protected addQueryParam(query: QueryParamsType, key: string): string;
764
- protected addArrayQueryParam(query: QueryParamsType, key: string): any;
765
- protected toQueryString(rawQuery?: QueryParamsType): string;
766
- protected addQueryParams(rawQuery?: QueryParamsType): string;
767
- private contentFormatters;
768
- protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
769
- protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
770
- abortRequest: (cancelToken: CancelToken) => void;
771
- request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<T>;
772
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient<any>, never>;
773
- static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient<any>>;
774
- }
775
-
776
831
  declare class MenuApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
777
832
  get: (params?: RequestParams) => Promise<ModuleInstanceDto[]>;
778
833
  getAdminMenu: (params?: RequestParams) => Promise<ModuleInstanceDto[]>;
@@ -785,15 +840,23 @@ declare class MenuApi<SecurityDataType = unknown> extends HttpClient<SecurityDat
785
840
  static ɵprov: i0.ɵɵInjectableDeclaration<MenuApi<any>>;
786
841
  }
787
842
 
843
+ type PrimeIconOption$1 = {
844
+ label: string;
845
+ value: string;
846
+ };
788
847
  declare class MenuItemCreateDialogComponent implements OnInit {
789
848
  protected readonly menuService: MenuService;
790
849
  protected readonly menu: MenuApi<any>;
850
+ private readonly msgService;
791
851
  visible: boolean;
792
852
  visibleChange: EventEmitter<boolean>;
793
853
  modules: IntKeyValueDto[];
854
+ iconOptions: PrimeIconOption$1[];
794
855
  selectModule: any;
795
856
  label: string;
796
857
  selectIcon: string;
858
+ saving: boolean;
859
+ get canSave(): boolean;
797
860
  ngOnInit(): Promise<void>;
798
861
  changeVisible(): void;
799
862
  save(): Promise<void>;
@@ -803,14 +866,21 @@ declare class MenuItemCreateDialogComponent implements OnInit {
803
866
  static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemCreateDialogComponent, "menu-item-create-dialog", never, { "visible": { "alias": "visible"; "required": false; }; }, { "visibleChange": "visibleChange"; }, never, never, true, never>;
804
867
  }
805
868
 
869
+ type PrimeIconOption = {
870
+ label: string;
871
+ value: string;
872
+ };
806
873
  declare class MenuItemEditDialogComponent {
807
874
  private readonly menuService;
808
- private readonly securityDataService;
875
+ private readonly securityApi;
876
+ private readonly msgService;
809
877
  visible: boolean;
810
878
  visibleChange: EventEmitter<boolean>;
811
879
  modules: any[];
812
880
  roles: string[];
881
+ iconOptions: PrimeIconOption[];
813
882
  item: EditModuleInstanceDto;
883
+ saving: boolean;
814
884
  changeVisible(): void;
815
885
  save(): Promise<void>;
816
886
  hide(): void;
@@ -879,6 +949,9 @@ declare class NotfoundComponent {
879
949
 
880
950
  declare class UnauthorizedComponent {
881
951
  protected readonly securityService: SecurityService;
952
+ private readonly route;
953
+ private readonly router;
954
+ protected signIn(): void;
882
955
  static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
883
956
  static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "ng-component", never, {}, {}, never, never, true, never>;
884
957
  }
@@ -897,24 +970,12 @@ declare class ProfileComponent {
897
970
  static ɵcmp: i0.ɵɵComponentDeclaration<ProfileComponent, "user-profile", never, {}, {}, never, never, true, never>;
898
971
  }
899
972
 
900
- interface L10n$1 {
901
- menu: string;
902
- all: string;
903
- profile: string;
904
- photo: string;
905
- usePhoto256x256Pixel: string;
906
- selectLanguage: string;
907
- moduleManagement: string;
908
- localization: string;
909
- goTo: string;
910
- }
911
973
  declare class ConfigComponent {
912
974
  private readonly layoutService;
913
975
  protected readonly l10nService: L10nService;
914
976
  protected readonly userService: UserService;
915
977
  protected readonly securityService: SecurityService;
916
978
  protected readonly menuService: MenuService;
917
- protected l10n: L10n$1;
918
979
  protected readonly dateFormats: string[];
919
980
  protected readonly timeFormats: string[];
920
981
  protected readonly allTimeZones: any[];
@@ -955,39 +1016,19 @@ declare class DbMigrationComponent extends BaseModuleComponent<NoSettingsDto, No
955
1016
  static ɵcmp: i0.ɵɵComponentDeclaration<DbMigrationComponent, "db-migration", never, {}, {}, never, never, true, never>;
956
1017
  }
957
1018
 
958
- interface L10n {
959
- confirm: {
960
- header: string;
961
- message: string;
962
- cancel: string;
963
- delete: string;
964
- };
965
- title: string;
966
- messages: {
967
- deleteSuccess: string;
968
- };
969
- table: {
970
- deleteTooltip: string;
971
- currentlyLoaded: string;
972
- yes: string;
973
- no: string;
974
- name: string;
975
- moduleId: string;
976
- };
977
- refreshTooltip: string;
978
- }
979
1019
  declare class AppModulesComponent implements OnInit {
980
- protected dataService: BaseDataService;
981
1020
  protected modules: ModuleDto[];
982
1021
  protected msgService: MsgService;
983
1022
  protected confirmationService: ConfirmationService;
984
1023
  protected l10nService: L10nService;
985
- protected l10n: L10n;
986
1024
  protected titleService: AppTitleService;
987
1025
  private moduleService;
1026
+ private translationsReady;
1027
+ constructor();
988
1028
  ngOnInit(): Promise<void>;
989
1029
  refreshAction(): Promise<void>;
990
- deleteModule(module: ModuleDto): void;
1030
+ deleteModule(module: ModuleDto): Promise<void>;
1031
+ t(key: string): any;
991
1032
  static ɵfac: i0.ɵɵFactoryDeclaration<AppModulesComponent, never>;
992
1033
  static ɵcmp: i0.ɵɵComponentDeclaration<AppModulesComponent, "app-modules", never, {}, {}, never, never, true, never>;
993
1034
  }
@@ -1081,154 +1122,55 @@ declare class AppFloatingConfiguratorComponent {
1081
1122
  static ɵcmp: i0.ɵɵComponentDeclaration<AppFloatingConfiguratorComponent, "app-floating-configurator", never, {}, {}, never, never, true, never>;
1082
1123
  }
1083
1124
 
1084
- /** Attachment response DTO. */
1085
1125
  interface AttachmentDto {
1086
- /**
1087
- * Attachment identifier.
1088
- * @format int64
1089
- */
1090
1126
  attachmentId?: number;
1091
- /** Original file name. */
1092
1127
  fileName?: string | null;
1093
- /** MIME type of the file. */
1094
1128
  fileType?: string | null;
1095
- /**
1096
- * File size in bytes.
1097
- * @format int64
1098
- */
1099
1129
  fileSize?: number;
1100
- /**
1101
- * Upload timestamp.
1102
- * @format date-time
1103
- */
1104
1130
  uploadedAt?: Date;
1105
- /**
1106
- * File storage identifier.
1107
- * @format uuid
1108
- */
1109
1131
  storageFileId?: string;
1110
- /** Download URL for the file. */
1111
1132
  downloadUrl?: string | null;
1112
1133
  }
1113
- /** Comment response DTO. */
1114
1134
  interface CommentDto {
1115
- /**
1116
- * Comment identifier.
1117
- * @format int64
1118
- */
1119
1135
  commentId?: number;
1120
- /**
1121
- * Related entity type identifier.
1122
- * @format int64
1123
- */
1124
1136
  objectTypeId?: number;
1125
- /**
1126
- * Related entity identifier.
1127
- * @format int64
1128
- */
1129
1137
  objectId?: number;
1130
- /** Raw markdown comment content. */
1131
1138
  content?: string | null;
1132
- /**
1133
- * Author identifier.
1134
- * @format int64
1135
- */
1136
1139
  userId?: number;
1137
- /** Author display name. */
1138
1140
  authorDisplayName?: string | null;
1139
- /** Author e-mail. */
1140
1141
  authorEmail?: string | null;
1141
- /**
1142
- * Comment creation time.
1143
- * @format date-time
1144
- */
1145
1142
  createdAt?: Date;
1146
- /**
1147
- * Comment last update time.
1148
- * @format date-time
1149
- */
1150
1143
  updatedAt?: Date | null;
1151
- /** Whether the comment was edited. */
1152
1144
  isEdited?: boolean;
1153
- /**
1154
- * Number of edit history entries.
1155
- * @format int32
1156
- */
1157
1145
  historyCount?: number;
1158
- /** Whether the current user can edit this comment. */
1159
1146
  canEdit?: boolean;
1160
- /** Whether the current user can delete this comment. */
1161
1147
  canDelete?: boolean;
1162
- /** Attachments for the comment. */
1163
1148
  attachments?: AttachmentDto[] | null;
1164
- /** Reactions aggregated for the comment. */
1165
1149
  reactions?: CommentReactionDto[] | null;
1166
- /** Mentions for the comment. */
1167
1150
  mentions?: CommentMentionDto[] | null;
1168
1151
  }
1169
- /** Comment edit history response DTO. */
1170
1152
  interface CommentHistoryDto {
1171
- /**
1172
- * History entry identifier.
1173
- * @format int64
1174
- */
1175
1153
  commentEditHistoryId?: number;
1176
- /** Previous comment content. */
1177
1154
  oldContent?: string | null;
1178
- /** Updated comment content. */
1179
1155
  newContent?: string | null;
1180
- /**
1181
- * Editor identifier.
1182
- * @format int64
1183
- */
1184
1156
  editedByUserId?: number;
1185
- /** Editor display name. */
1186
1157
  editedByDisplayName?: string | null;
1187
- /**
1188
- * Time of edit.
1189
- * @format date-time
1190
- */
1191
1158
  editedAt?: Date;
1192
1159
  }
1193
- /** Mention response DTO. */
1194
1160
  interface CommentMentionDto {
1195
- /**
1196
- * Mentioned user identifier.
1197
- * @format int64
1198
- */
1199
1161
  mentionedUserId?: number;
1200
- /** Display name of the mentioned user. */
1201
1162
  displayName?: string | null;
1202
- /** E-mail of the mentioned user. */
1203
1163
  email?: string | null;
1204
- /**
1205
- * Position within the markdown text.
1206
- * @format int32
1207
- */
1208
1164
  position?: number;
1209
1165
  }
1210
- /** Aggregated reaction response DTO. */
1211
1166
  interface CommentReactionDto {
1212
- /** Emoji code. */
1213
1167
  emojiCode?: string | null;
1214
- /**
1215
- * Number of reactions with the same emoji.
1216
- * @format int32
1217
- */
1218
1168
  count?: number;
1219
- /** Whether the current user reacted with this emoji. */
1220
1169
  reactedByCurrentUser?: boolean;
1221
1170
  }
1222
- /** Mention candidate response DTO. */
1223
1171
  interface MentionUserDto {
1224
- /**
1225
- * User identifier.
1226
- * @format int64
1227
- */
1228
1172
  userId?: number;
1229
- /** Display name. */
1230
1173
  displayName?: string | null;
1231
- /** E-mail. */
1232
1174
  email?: string | null;
1233
1175
  }
1234
1176
 
@@ -1332,6 +1274,70 @@ declare class IframeModuleComponent extends BaseModuleComponent<IframeModuleSett
1332
1274
  static ɵcmp: i0.ɵɵComponentDeclaration<IframeModuleComponent, "ng-component", never, {}, {}, never, never, true, never>;
1333
1275
  }
1334
1276
 
1277
+ declare enum ImportanceLevel {
1278
+ Unspecified = "Unspecified",
1279
+ Low = "Low",
1280
+ Medium = "Medium",
1281
+ High = "High",
1282
+ Critical = "Critical"
1283
+ }
1284
+ interface UserNotificationCountResponse {
1285
+ count?: number;
1286
+ }
1287
+ interface UserNotificationDto {
1288
+ notificationUserId?: number;
1289
+ notificationId?: number;
1290
+ notificationTypeId?: number;
1291
+ notificationTypeName?: string | null;
1292
+ subject?: string | null;
1293
+ message?: string | null;
1294
+ importance?: ImportanceLevel;
1295
+ notificationChannelId?: number | null;
1296
+ sentAt?: Date | null;
1297
+ deliveredAt?: Date | null;
1298
+ readAt?: Date | null;
1299
+ createdAt?: Date;
1300
+ dataJson?: string | null;
1301
+ }
1302
+ interface UserNotificationListResponse {
1303
+ notifications?: UserNotificationDto[] | null;
1304
+ totalCount?: number;
1305
+ }
1306
+ interface GetNotificationByUserParams {
1307
+ skip?: number;
1308
+ take?: number;
1309
+ unreadOnly?: boolean;
1310
+ }
1311
+ interface MarkNotificationAsReadParams {
1312
+ id: number;
1313
+ }
1314
+ interface GetNotificationByIdParams {
1315
+ id?: number;
1316
+ }
1317
+
1318
+ declare class UserNotificationsComponent {
1319
+ private popover?;
1320
+ protected notifications: UserNotificationDto[];
1321
+ protected totalCount: number;
1322
+ protected skip: number;
1323
+ protected take: number;
1324
+ protected loading: boolean;
1325
+ protected readingNotificationId?: number;
1326
+ private readonly notificationApi;
1327
+ private readonly notificationService;
1328
+ private readonly msgService;
1329
+ private readonly translateService;
1330
+ protected readonly unreadNotificationCount: i0.Signal<number>;
1331
+ protected readonly unreadNotificationBadge: i0.Signal<string>;
1332
+ protected toggle(event: Event): Promise<void>;
1333
+ loadNotifications(): Promise<void>;
1334
+ onPageChange(event: PaginatorState): Promise<void>;
1335
+ markAsRead(notification: UserNotificationDto): Promise<void>;
1336
+ protected getImportanceSeverity(importance: string): 'success' | 'info' | 'warn' | 'danger' | 'secondary';
1337
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserNotificationsComponent, never>;
1338
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserNotificationsComponent, "app-user-notifications", never, {}, {}, never, never, true, never>;
1339
+ }
1340
+
1335
1341
  /**
1336
1342
  * A route guard that ensures the user is authenticated and has a valid access token.
1337
1343
  * If the access token is expired, it attempts to refresh the session.
@@ -1348,35 +1354,20 @@ declare class AuthGuardService {
1348
1354
  *
1349
1355
  * @returns {Observable<boolean | UrlTree>} A stream resolving to true (allow), or UrlTree (redirect).
1350
1356
  */
1351
- canActivate(): Observable<boolean | UrlTree>;
1352
- /**
1353
- * Attempts to refresh the session using the refresh token.
1354
- * If successful, allows route activation; otherwise, redirects to `/unauthorized`.
1355
- *
1356
- * @returns {boolean | UrlTree} A stream resolving to true or redirect UrlTree.
1357
- */
1358
- tryRefreshToken(): Observable<boolean | UrlTree>;
1357
+ canActivate(returnUrl?: string): Observable<boolean | UrlTree>;
1358
+ private getReturnUrl;
1359
1359
  static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuardService, never>;
1360
1360
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuardService>;
1361
1361
  }
1362
1362
 
1363
- declare class SecurityStorageService implements AbstractSecurityStorage {
1364
- read(key: string): string;
1365
- write(key: string, value: any): void;
1366
- remove(key: string): void;
1367
- clear(): void;
1368
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurityStorageService, never>;
1369
- static ɵprov: i0.ɵɵInjectableDeclaration<SecurityStorageService>;
1370
- }
1371
-
1372
1363
  declare class NotificationService {
1373
1364
  private connection;
1374
1365
  private securityService;
1375
1366
  private msgService;
1376
- private frontendConfig;
1377
- private securityData;
1367
+ private notificationApi;
1368
+ unreadNotificationCount: i0.WritableSignal<number>;
1378
1369
  constructor();
1379
- private resolveHubUrl;
1370
+ loadUnreadNotificationCount(): void;
1380
1371
  static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
1381
1372
  static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
1382
1373
  }
@@ -1429,31 +1420,70 @@ declare function provideAppThemes(themes: AppThemePreset[], options?: ProvideApp
1429
1420
  declare function mergeWithDefaults(themes: AppThemePreset[]): EnvironmentProviders;
1430
1421
  declare function replaceDefaults(themes: AppThemePreset[]): EnvironmentProviders;
1431
1422
 
1432
- type OipFrontendAppMode = 'standalone' | 'distributed';
1433
- interface OipFrontendConfig {
1434
- appMode: OipFrontendAppMode;
1435
- apiBaseUrl?: string;
1436
- notificationHubUrl?: string;
1437
- }
1438
- declare const DEFAULT_OIP_FRONTEND_CONFIG: OipFrontendConfig;
1439
- declare const OIP_FRONTEND_CONFIG: InjectionToken<OipFrontendConfig>;
1423
+ declare function provideOip(): i0.EnvironmentProviders;
1440
1424
 
1441
1425
  declare const langIntercept: HttpInterceptorFn;
1442
1426
 
1443
- declare class SecurePipe implements PipeTransform {
1444
- private readonly http;
1445
- private readonly sanitizer;
1446
- transform(url: any): Observable<SafeUrl>;
1447
- static ɵfac: i0.ɵɵFactoryDeclaration<SecurePipe, never>;
1448
- static ɵpipe: i0.ɵɵPipeDeclaration<SecurePipe, "secure", true>;
1427
+ declare class FolderModuleApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1428
+ getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams, params?: RequestParams) => Promise<FolderModuleSettings>;
1429
+ static ɵfac: i0.ɵɵFactoryDeclaration<FolderModuleApi<any>, never>;
1430
+ static ɵprov: i0.ɵɵInjectableDeclaration<FolderModuleApi<any>>;
1449
1431
  }
1450
1432
 
1451
- /**
1452
- * Load keycloak settings from backend and save to sessionStorage
1453
- * @param httpClient
1454
- * @returns StsConfigHttpLoader
1455
- */
1456
- declare const httpLoaderAuthFactory: (httpClient: HttpClient$1) => StsConfigHttpLoader;
1433
+ declare class IframeModuleApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1434
+ getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams2, params?: RequestParams) => Promise<IframeModuleSettings>;
1435
+ static ɵfac: i0.ɵɵFactoryDeclaration<IframeModuleApi<any>, never>;
1436
+ static ɵprov: i0.ɵɵInjectableDeclaration<IframeModuleApi<any>>;
1437
+ }
1438
+
1439
+ declare class SecurityApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1440
+ getCurrentAuthSession: (params?: RequestParams) => Promise<AuthSessionResponse>;
1441
+ createAuthSession: (params?: RequestParams) => Promise<any>;
1442
+ deleteAuthSession: (params?: RequestParams) => Promise<any>;
1443
+ getAuthCsrfToken: (params?: RequestParams) => Promise<AuthCsrfTokenResponse>;
1444
+ getKeycloakClientSettings: (params?: RequestParams) => Promise<GetKeycloakClientSettingsResponse>;
1445
+ getRealmRoles: (params?: RequestParams) => Promise<string[]>;
1446
+ static ɵfac: i0.ɵɵFactoryDeclaration<SecurityApi<any>, never>;
1447
+ static ɵprov: i0.ɵɵInjectableDeclaration<SecurityApi<any>>;
1448
+ }
1449
+
1450
+ interface UserSettingsDto {
1451
+ preset?: string | null;
1452
+ primary?: string | null;
1453
+ surface?: string | null;
1454
+ darkTheme?: boolean;
1455
+ menuMode?: string | null;
1456
+ language?: string | null;
1457
+ dateFormat?: string | null;
1458
+ timeFormat?: string | null;
1459
+ timeZone?: string | null;
1460
+ }
1461
+ interface GetUserPhotoParams {
1462
+ email?: string;
1463
+ }
1464
+ interface PostUserPhotoPayload {
1465
+ files?: File;
1466
+ }
1467
+
1468
+ declare class UserProfileApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1469
+ getUserPhoto: (query: GetUserPhotoParams, params?: RequestParams) => Promise<File>;
1470
+ postUserPhoto: (data: PostUserPhotoPayload, params?: RequestParams) => Promise<void>;
1471
+ getSettings: (params?: RequestParams) => Promise<UserSettingsDto>;
1472
+ setSettings: (data: UserSettingsDto, params?: RequestParams) => Promise<void>;
1473
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileApi<any>, never>;
1474
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileApi<any>>;
1475
+ }
1476
+
1477
+ declare function convertToPrimeNgDateFormat(dateformat: string): string;
1478
+
1479
+ declare class NotificationApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1480
+ getNotificationByUser: (query: GetNotificationByUserParams, params?: RequestParams) => Promise<UserNotificationListResponse>;
1481
+ getNotificationCountByUser: (params?: RequestParams) => Promise<UserNotificationCountResponse>;
1482
+ markNotificationAsRead: ({ id, ...query }: MarkNotificationAsReadParams, params?: RequestParams) => Promise<void>;
1483
+ getNotificationById: (query: GetNotificationByIdParams, params?: RequestParams) => Promise<UserNotificationDto>;
1484
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationApi<any>, never>;
1485
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationApi<any>>;
1486
+ }
1457
1487
 
1458
- export { APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseDataService, BaseModuleComponent, ConfigComponent, ContentType, DEFAULT_OIP_FRONTEND_CONFIG, DbMigrationComponent, DiscussionComponent, ErrorComponent, FooterComponent, HttpClient, IframeModuleComponent, KeycloakSecurityService, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationService, OIP_FRONTEND_CONFIG, ProfileComponent, SecurePipe, SecurityComponent, SecurityDataService, SecurityService, SecurityStorageService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserService, httpLoaderAuthFactory, langIntercept, mergeWithDefaults, provideAppThemes, provideLogoComponent, replaceDefaults };
1459
- export type { AppConfig, AppThemePreset, AppThemePresetMergeMode, LanguageDto, MenuChangeEvent, NoSettingsDto, OipFrontendAppMode, OipFrontendConfig, PutSecurityDto, RequestParams, SecurityDto, TopBarDto };
1488
+ export { APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseModuleComponent, BffSecurityService, ConfigComponent, ContentType, DbMigrationComponent, DiscussionComponent, ErrorComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, KeycloakSecurityService, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationApi, NotificationService, ProfileComponent, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserService, convertToPrimeNgDateFormat, langIntercept, mergeWithDefaults, provideAppThemes, provideLogoComponent, provideOip, replaceDefaults };
1489
+ export type { AppConfig, AppThemePreset, AppThemePresetMergeMode, AuthCsrfToken, LanguageDto, MenuChangeEvent, NoSettingsDto, PutSecurityDto, RequestParams, SecurityDto, TopBarDto };