oip-common 0.3.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +68 -68
  2. package/assets/demo/code.scss +17 -17
  3. package/assets/demo/demo.scss +2 -2
  4. package/assets/demo/flags/flags.scss +984 -984
  5. package/assets/i18n/app-modules.en.json +8 -1
  6. package/assets/i18n/app-modules.ru.json +8 -1
  7. package/assets/i18n/applications.en.json +46 -0
  8. package/assets/i18n/applications.ru.json +46 -0
  9. package/assets/i18n/config.en.json +18 -17
  10. package/assets/i18n/config.ru.json +18 -17
  11. package/assets/i18n/db-migration.en.json +19 -19
  12. package/assets/i18n/db-migration.ru.json +19 -19
  13. package/assets/i18n/en.json +4 -2
  14. package/assets/i18n/extensions.en.json +1 -0
  15. package/assets/i18n/extensions.ru.json +1 -0
  16. package/assets/i18n/notfound.en.json +8 -8
  17. package/assets/i18n/notfound.ru.json +8 -8
  18. package/assets/i18n/ru.json +4 -2
  19. package/assets/layout/_core.scss +30 -30
  20. package/assets/layout/_footer.scss +8 -8
  21. package/assets/layout/_main.scss +12 -12
  22. package/assets/layout/_mixins.scss +15 -15
  23. package/assets/layout/_preloading.scss +49 -49
  24. package/assets/layout/_responsive.scss +108 -108
  25. package/assets/layout/_topbar.scss +168 -168
  26. package/assets/layout/_typography.scss +68 -68
  27. package/assets/layout/_utils.scss +25 -25
  28. package/assets/layout/layout.scss +13 -13
  29. package/assets/layout/variables/_common.scss +20 -20
  30. package/assets/layout/variables/_dark.scss +5 -5
  31. package/assets/layout/variables/_light.scss +5 -5
  32. package/assets/tailwind.css +3 -3
  33. package/fesm2022/oip-common.mjs +2445 -1047
  34. package/fesm2022/oip-common.mjs.map +1 -1
  35. package/index.d.ts +355 -172
  36. package/package.json +2 -2
  37. package/scripts/generate-api.mjs +4 -4
  38. package/templates/http-client.ejs +14 -1
package/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, OnInit, DestroyRef, WritableSignal, OnChanges, SimpleChanges, Type, Provider, InjectionToken, EventEmitter, Renderer2, EnvironmentProviders } from '@angular/core';
3
- import { MessageService, ToastMessageOptions, MenuItem, ConfirmationService, FilterMetadata } from 'primeng/api';
4
- import { ActivatedRoute, QueryParamsHandling, IsActiveMatchOptions, Params, Router, UrlTree } from '@angular/router';
5
- import { InterpolationParameters, Translation, TranslationObject, TranslateService } from '@ngx-translate/core';
2
+ import { OnDestroy, OnInit, DestroyRef, WritableSignal, OnChanges, SimpleChanges, Type, InjectionToken, Provider, EventEmitter, Renderer2, EnvironmentProviders } from '@angular/core';
6
3
  import * as rxjs from 'rxjs';
7
4
  import { Observable, BehaviorSubject, Subscription, Subject } from 'rxjs';
8
- import { LoginResponse, AuthOptions, OidcSecurityService, LogoutAuthOptions } from 'angular-auth-oidc-client';
5
+ import { MessageService, ToastMessageOptions, ConfirmationService, MenuItem, FilterMetadata } from 'primeng/api';
6
+ import { ActivatedRoute, QueryParamsHandling, IsActiveMatchOptions, Params, Router } from '@angular/router';
7
+ import { InterpolationParameters, Translation, TranslationObject, TranslateService } from '@ngx-translate/core';
9
8
  import { ContextMenu } from 'primeng/contextmenu';
10
9
  import { PaletteDesignToken, Preset } from '@primeuix/themes/types';
11
10
  import { PrimeNG } from 'primeng/config';
@@ -23,6 +22,8 @@ interface TopBarDto {
23
22
 
24
23
  declare class TopBarService {
25
24
  topBarItems: TopBarDto[];
25
+ private readonly activeIdSubject;
26
+ readonly activeId$: rxjs.Observable<string>;
26
27
  private _activeId;
27
28
  get availableTopBarItems(): TopBarDto[];
28
29
  get activeTopBarItem(): TopBarDto | undefined;
@@ -46,8 +47,10 @@ declare class MsgService {
46
47
  error(detail: any, summary?: any, life?: number): void;
47
48
  extractErrorMessage(error: unknown, fallback: string): string;
48
49
  private extractValidationMessage;
50
+ private extractApiExceptionMessage;
49
51
  private toValidationMessages;
50
52
  private getObjectProperty;
53
+ private getStringProperty;
51
54
  errorFromException(error: unknown, fallback: string, summary?: string, life?: number): void;
52
55
  contrast(detail: any, summary?: any, life?: number): void;
53
56
  secondary(detail: any, summary?: any, life?: number): void;
@@ -82,6 +85,7 @@ interface AppConfig {
82
85
  timeFormat: string;
83
86
  dateTimeFormat: string;
84
87
  timeZone: string;
88
+ adminMode?: boolean;
85
89
  }
86
90
  interface LayoutState {
87
91
  staticMenuDesktopInactive?: boolean;
@@ -120,6 +124,7 @@ declare class LayoutService {
120
124
  dateTimeFormat: i0.Signal<string>;
121
125
  monthFormat: i0.Signal<string>;
122
126
  timeZone: i0.Signal<string>;
127
+ adminMode: i0.Signal<boolean>;
123
128
  transitionComplete: i0.WritableSignal<boolean>;
124
129
  private initialized;
125
130
  constructor();
@@ -163,6 +168,11 @@ declare class L10nService {
163
168
  * @param component - Name of the component to load translations for
164
169
  */
165
170
  loadComponentTranslations(component: string): Observable<unknown>;
171
+ /**
172
+ * Loads translations from an explicit asset URL and merges them into the active language dictionary.
173
+ * Use this for extension modules whose assets are hosted outside the shell application.
174
+ */
175
+ loadTranslationsFromUrl(namespace: string, url: string, lang?: string): Observable<unknown>;
166
176
  /**
167
177
  * Gets the translated value of a key (or an array of keys)
168
178
  * @returns the translated key, or an object of translated keys
@@ -194,6 +204,10 @@ interface SecurityDto {
194
204
  type RefreshCustomParams = {
195
205
  [key: string]: string | number | boolean;
196
206
  };
207
+ type AuthSessionRefreshResult = {
208
+ isAuthenticated: boolean;
209
+ userData: any;
210
+ };
197
211
  type AuthCsrfToken = {
198
212
  token: string;
199
213
  headerName: string;
@@ -206,13 +220,14 @@ declare abstract class SecurityService {
206
220
  abstract isTokenExpired(): Observable<boolean>;
207
221
  abstract getCurrentUser(): any;
208
222
  abstract getCurrentUser$(): Observable<any>;
209
- abstract forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<LoginResponse>;
223
+ abstract forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<AuthSessionRefreshResult>;
210
224
  abstract getCsrfToken(): Observable<AuthCsrfToken | null>;
211
225
  abstract isAdmin(): boolean;
212
- abstract authorize(configId?: string, authOptions?: AuthOptions): void;
226
+ abstract authorize(returnUrl?: string): void;
213
227
  abstract payload: BehaviorSubject<any>;
214
228
  }
215
229
  declare class BffSecurityService implements OnDestroy, SecurityService {
230
+ static readonly authorizeAfterLogoutReturnUrlKey = "oip.authorizeAfterLogoutReturnUrl";
216
231
  private readonly http;
217
232
  private readonly authenticated;
218
233
  private readonly currentUser;
@@ -225,117 +240,24 @@ declare class BffSecurityService implements OnDestroy, SecurityService {
225
240
  isTokenExpired(): Observable<boolean>;
226
241
  getCurrentUser(): any;
227
242
  getCurrentUser$(): Observable<any>;
228
- forceRefreshSession(): Observable<LoginResponse>;
243
+ forceRefreshSession(): Observable<AuthSessionRefreshResult>;
229
244
  getCsrfToken(): Observable<AuthCsrfToken | null>;
230
245
  isAdmin(): boolean;
231
- authorize(): void;
246
+ authorize(returnUrl?: string): void;
232
247
  ngOnDestroy(): void;
233
248
  private applySession;
234
249
  private createCurrentUser;
235
250
  private splitDisplayName;
236
251
  private applyAnonymousSession;
237
252
  private createPostForm;
253
+ private normalizeReturnUrl;
254
+ private replaceWithUnauthorizedUrl;
255
+ private storeAuthorizeAfterLogoutReturnUrl;
238
256
  private buildUrl;
257
+ private getBaseUrl;
239
258
  static ɵfac: i0.ɵɵFactoryDeclaration<BffSecurityService, never>;
240
259
  static ɵprov: i0.ɵɵInjectableDeclaration<BffSecurityService>;
241
260
  }
242
- /**
243
- * SecurityService extends OidcSecurityService to manage authentication,
244
- * token handling, and user role access in an Angular application.
245
- *
246
- * It provides helper methods for checking authentication, managing tokens,
247
- * determining user roles, and performing logout and refresh operations.
248
- */
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$?;
256
- /**
257
- * Handles angular OIDC events.
258
- */
259
- private readonly publicEventsService;
260
- /**
261
- * Stores the latest login response from checkAuth().
262
- */
263
- loginResponse: BehaviorSubject<LoginResponse>;
264
- /**
265
- * Stores the decoded access token payload.
266
- */
267
- readonly payload: BehaviorSubject<any>;
268
- /**
269
- * Stores user-specific data from the login response.
270
- */
271
- private readonly currentUser;
272
- /**
273
- * Emits access token updates from initial auth check, manual refresh,
274
- * and library authentication events.
275
- */
276
- private accessToken;
277
- /**
278
- * Initializes service and subscribes to authentication events.
279
- * When a 'NewAuthenticationResult' event is received, the `auth` method is called.
280
- */
281
- constructor();
282
- getCurrentUser(): any;
283
- getCurrentUser$(): Observable<any>;
284
- /**
285
- * Returns the ID token for the sign-in.
286
- * @returns A string with the id token.
287
- */
288
- getAccessToken(configId?: string): Observable<string>;
289
- forceRefreshSession(customParams?: RefreshCustomParams, configId?: string): Observable<LoginResponse>;
290
- getCsrfToken(): Observable<AuthCsrfToken | null>;
291
- /**
292
- * Indicates whether the current user has the 'admin' role.
293
- *
294
- * @returns {boolean} True if the user is an admin, false otherwise.
295
- */
296
- isAdmin(): boolean;
297
- /**
298
- * Initiates authentication check and updates login response, user data,
299
- * and decoded token payload if authenticated.
300
- */
301
- auth(): void;
302
- /**
303
- * Performs logout and clears the local token payload.
304
- *
305
- * @param {string} [configId] Optional configuration ID for logout.
306
- * @param {LogoutAuthOptions} [logoutAuthOptions] Optional logout options.
307
- */
308
- logout(configId?: string, logoutAuthOptions?: LogoutAuthOptions): void;
309
- /**
310
- * Completes the BehaviorSubjects when the service is destroyed to avoid memory leaks.
311
- */
312
- ngOnDestroy(): void;
313
- /**
314
- * Checks whether the current access token is expired based on the 'exp' claim.
315
- *
316
- * @returns {Observable<boolean>} Observable that emits true if the token is expired.
317
- */
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;
336
- static ɵfac: i0.ɵɵFactoryDeclaration<KeycloakSecurityService, never>;
337
- static ɵprov: i0.ɵɵInjectableDeclaration<KeycloakSecurityService>;
338
- }
339
261
 
340
262
  type QueryParamsType = Record<string | number, any>;
341
263
  type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
@@ -606,7 +528,9 @@ declare class SecurityComponent implements OnChanges, OnInit, OnDestroy {
606
528
  declare class UserService {
607
529
  private readonly securityService;
608
530
  private readonly userProfileApi;
609
- private requestedPhotoEmail;
531
+ private readonly msgService;
532
+ private readonly translateService;
533
+ private requestedPhotoKey;
610
534
  constructor();
611
535
  /**
612
536
  * Stores the user's photo as a data URL or binary blob, depending on how it's processed.
@@ -623,10 +547,11 @@ declare class UserService {
623
547
  get shortLabel(): string;
624
548
  get userName(): string;
625
549
  /**
626
- * Initiates an HTTP request to fetch the user's photo based on their email,
550
+ * Initiates an HTTP request to fetch the current user's photo,
627
551
  * and updates the `photo` and `photoLoaded` properties accordingly.
628
552
  */
629
553
  getUserPhoto(): void;
554
+ refreshUserPhoto(): void;
630
555
  /**
631
556
  * Converts a Blob image into a Base64 data URL and stores it in the `photo` property.
632
557
  *
@@ -634,6 +559,7 @@ declare class UserService {
634
559
  */
635
560
  private createImageFromBlob;
636
561
  private getInitials;
562
+ private getCurrentUserPhotoKey;
637
563
  static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
638
564
  static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
639
565
  }
@@ -648,7 +574,6 @@ declare class LogoService {
648
574
  }
649
575
 
650
576
  declare class AppTopbar {
651
- items: MenuItem[];
652
577
  securityService: SecurityService;
653
578
  topBarService: TopBarService;
654
579
  userService: UserService;
@@ -656,6 +581,7 @@ declare class AppTopbar {
656
581
  logoService: LogoService;
657
582
  private readonly confirmationService;
658
583
  private readonly translateService;
584
+ onActiveTabChange(value: string | number | undefined): void;
659
585
  toggleDarkMode(): void;
660
586
  logoutKeyDown($event: KeyboardEvent): void;
661
587
  confirmLogout(): void;
@@ -695,19 +621,14 @@ interface EditModuleInstanceDto {
695
621
  viewRoles?: string[] | null;
696
622
  moduleId?: number | null;
697
623
  }
624
+ interface ExistModuleDto {
625
+ moduleId?: number;
626
+ name?: string | null;
627
+ currentlyLoaded?: boolean;
628
+ }
698
629
  interface FolderModuleSettings {
699
630
  html?: string | null;
700
631
  }
701
- interface GetKeycloakClientSettingsResponse {
702
- authority?: string | null;
703
- clientId?: string | null;
704
- scope?: string | null;
705
- responseType?: string | null;
706
- useRefreshToken?: boolean;
707
- silentRenew?: boolean;
708
- logLevel?: number;
709
- secureRoutes?: string[] | null;
710
- }
711
632
  interface IframeModuleSettings {
712
633
  url?: string | null;
713
634
  }
@@ -715,12 +636,6 @@ interface IntKeyValueDto {
715
636
  key?: number;
716
637
  value?: string | null;
717
638
  }
718
- interface ModuleDto {
719
- moduleId?: number;
720
- name?: string | null;
721
- settings?: string | null;
722
- moduleSecurities?: ModuleSecurityDto[] | null;
723
- }
724
639
  interface ModuleInstanceDto {
725
640
  moduleInstanceId?: number;
726
641
  moduleId?: number;
@@ -736,14 +651,10 @@ interface ModuleInstanceDto {
736
651
  order?: number;
737
652
  separator?: boolean;
738
653
  }
739
- interface ModuleSecurityDto {
740
- right: string | null;
741
- role: string | null;
742
- }
743
- interface GetModuleInstanceSettingsParams {
654
+ interface GetModuleInstanceSettingsParams2 {
744
655
  id?: number;
745
656
  }
746
- interface GetModuleInstanceSettingsParams2 {
657
+ interface GetModuleInstanceSettingsParams4 {
747
658
  id?: number;
748
659
  }
749
660
  interface DeleteModuleInstanceParams {
@@ -811,11 +722,13 @@ declare class MenuService {
811
722
  private readonly resetSource;
812
723
  private readonly titleService;
813
724
  private readonly menuDataService;
725
+ private readonly layoutService;
814
726
  menuSource$: rxjs.Observable<MenuChangeEvent>;
815
727
  resetSource$: rxjs.Observable<unknown>;
816
728
  contextMenuItem: any;
817
729
  menu: ModuleInstanceDto[];
818
- adminMode: boolean;
730
+ get adminMode(): boolean;
731
+ set adminMode(value: boolean);
819
732
  loadMenu(): Promise<void>;
820
733
  /**
821
734
  * Handles changes in the menu state.
@@ -953,10 +866,10 @@ declare class NotfoundComponent {
953
866
  static ɵcmp: i0.ɵɵComponentDeclaration<NotfoundComponent, "app-notfound", never, {}, {}, never, never, true, never>;
954
867
  }
955
868
 
956
- declare class UnauthorizedComponent {
869
+ declare class UnauthorizedComponent implements OnInit {
957
870
  protected readonly securityService: SecurityService;
958
871
  private readonly route;
959
- private readonly router;
872
+ ngOnInit(): void;
960
873
  protected signIn(): void;
961
874
  static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
962
875
  static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "ng-component", never, {}, {}, never, never, true, never>;
@@ -967,11 +880,40 @@ declare class ErrorComponent {
967
880
  static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "app-error", never, {}, {}, never, never, true, never>;
968
881
  }
969
882
 
883
+ interface UserSettingsDto {
884
+ preset?: string | null;
885
+ primary?: string | null;
886
+ surface?: string | null;
887
+ darkTheme?: boolean;
888
+ menuMode?: string | null;
889
+ language?: string | null;
890
+ dateFormat?: string | null;
891
+ timeFormat?: string | null;
892
+ timeZone?: string | null;
893
+ }
894
+ interface GetUserPhotoByIdParams {
895
+ userId: number;
896
+ }
897
+ interface PostUserPhotoPayload {
898
+ files?: Blob;
899
+ }
900
+
901
+ declare class UserProfileApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
902
+ getUserPhoto: (params?: RequestParams) => Promise<Blob>;
903
+ getUserPhotoById: ({ userId, ...query }: GetUserPhotoByIdParams, params?: RequestParams) => Promise<Blob>;
904
+ postUserPhoto: (data: PostUserPhotoPayload, params?: RequestParams) => Promise<void>;
905
+ getSettings: (params?: RequestParams) => Promise<UserSettingsDto>;
906
+ setSettings: (data: UserSettingsDto, params?: RequestParams) => Promise<void>;
907
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileApi<any>, never>;
908
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileApi<any>>;
909
+ }
910
+
970
911
  declare class ProfileComponent {
971
912
  readonly userService: UserService;
972
913
  readonly msgService: MsgService;
973
914
  readonly translateService: TranslateService;
974
- onBasicUploadAuto($event: any): void;
915
+ readonly userProfileApi: UserProfileApi<any>;
916
+ uploadPhoto(event: any): Promise<void>;
975
917
  static ɵfac: i0.ɵɵFactoryDeclaration<ProfileComponent, never>;
976
918
  static ɵcmp: i0.ɵɵComponentDeclaration<ProfileComponent, "user-profile", never, {}, {}, never, never, true, never>;
977
919
  }
@@ -1023,22 +965,107 @@ declare class DbMigrationComponent extends BaseModuleComponent<NoSettingsDto, No
1023
965
  }
1024
966
 
1025
967
  declare class AppModulesComponent implements OnInit {
1026
- protected modules: ModuleDto[];
968
+ protected modules: ExistModuleDto[];
1027
969
  protected msgService: MsgService;
1028
970
  protected confirmationService: ConfirmationService;
1029
971
  protected l10nService: L10nService;
1030
972
  protected titleService: AppTitleService;
973
+ protected externalModuleManifestUrl: string;
974
+ protected registeringExternalModule: boolean;
1031
975
  private moduleService;
976
+ private extensionModulesService;
1032
977
  private translationsReady;
1033
978
  constructor();
1034
979
  ngOnInit(): Promise<void>;
1035
980
  refreshAction(): Promise<void>;
1036
- deleteModule(module: ModuleDto): Promise<void>;
981
+ protected get canRegisterExternalModule(): boolean;
982
+ registerExternalModule(): Promise<void>;
983
+ deleteModule(module: ExistModuleDto): Promise<void>;
1037
984
  t(key: string): any;
1038
985
  static ɵfac: i0.ɵɵFactoryDeclaration<AppModulesComponent, never>;
1039
986
  static ɵcmp: i0.ɵɵComponentDeclaration<AppModulesComponent, "app-modules", never, {}, {}, never, never, true, never>;
1040
987
  }
1041
988
 
989
+ declare enum ServiceType {
990
+ Service = "Service",
991
+ Application = "Application"
992
+ }
993
+ interface ApplicationRegistryItemDto {
994
+ code?: string | null;
995
+ displayName?: string | null;
996
+ baseUrl?: string | null;
997
+ internalBaseUrl?: string | null;
998
+ icon?: string | null;
999
+ order?: number;
1000
+ enabled?: boolean;
1001
+ serviceType?: ServiceType;
1002
+ isCurrent?: boolean;
1003
+ }
1004
+ interface GetApplicationRegistryItemByCodeParams {
1005
+ code: string;
1006
+ }
1007
+ interface UpdateApplicationRegistryItemParams {
1008
+ code: string;
1009
+ }
1010
+ interface DeleteApplicationRegistryItemParams {
1011
+ code: string;
1012
+ }
1013
+
1014
+ interface ApplicationEditModel {
1015
+ code: string;
1016
+ displayName: string;
1017
+ baseUrl: string;
1018
+ internalBaseUrl: string;
1019
+ icon: string;
1020
+ order: number;
1021
+ enabled: boolean;
1022
+ serviceType: NonNullable<ApplicationRegistryItemDto['serviceType']>;
1023
+ }
1024
+ interface ApplicationTableItem extends ApplicationRegistryItemDto {
1025
+ _isEditing?: boolean;
1026
+ _isNew?: boolean;
1027
+ _editModel?: ApplicationEditModel;
1028
+ }
1029
+ declare class ApplicationsComponent implements OnInit {
1030
+ protected readonly globalFilterFields: string[];
1031
+ protected get serviceTypeOptions(): {
1032
+ label: string;
1033
+ value: NonNullable<ApplicationRegistryItemDto['serviceType']>;
1034
+ }[];
1035
+ protected applications: ApplicationTableItem[];
1036
+ protected visibleApplications: ApplicationTableItem[];
1037
+ protected globalFilter: string;
1038
+ protected loading: boolean;
1039
+ protected activeRowAction: boolean;
1040
+ private readonly applicationsApi;
1041
+ private readonly msgService;
1042
+ private readonly l10nService;
1043
+ private readonly titleService;
1044
+ private readonly confirmationService;
1045
+ private readonly translationsReady;
1046
+ private draftApplication;
1047
+ constructor();
1048
+ ngOnInit(): Promise<void>;
1049
+ protected refreshAction(): Promise<void>;
1050
+ protected applyGlobalFilter(): void;
1051
+ protected clearFilters(): void;
1052
+ protected beginCreateApplication(): void;
1053
+ protected editApplication(application: ApplicationTableItem): void;
1054
+ protected cancelEdit(application: ApplicationTableItem): void;
1055
+ protected saveApplication(application: ApplicationTableItem): Promise<void>;
1056
+ protected deleteApplication(application: ApplicationTableItem): Promise<void>;
1057
+ private createEditModel;
1058
+ private normalizeEditModel;
1059
+ protected serviceTypeLabel(serviceType: ApplicationRegistryItemDto['serviceType']): string;
1060
+ private cancelAllEdits;
1061
+ private syncVisibleApplications;
1062
+ private filterApplications;
1063
+ private getNextOrder;
1064
+ private t;
1065
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationsComponent, never>;
1066
+ static ɵcmp: i0.ɵɵComponentDeclaration<ApplicationsComponent, "app-applications", never, {}, {}, never, never, true, never>;
1067
+ }
1068
+
1042
1069
  declare type SurfacesType = {
1043
1070
  name?: string;
1044
1071
  palette?: PaletteDesignToken;
@@ -1280,6 +1307,39 @@ declare class IframeModuleComponent extends BaseModuleComponent<IframeModuleSett
1280
1307
  static ɵcmp: i0.ɵɵComponentDeclaration<IframeModuleComponent, "ng-component", never, {}, {}, never, never, true, never>;
1281
1308
  }
1282
1309
 
1310
+ declare class ExtensionModuleHostComponent extends BaseModuleComponent<unknown, unknown> implements OnDestroy {
1311
+ private set extensionViewContainer(value);
1312
+ private readonly injector;
1313
+ private readonly environmentInjector;
1314
+ private readonly extensionModulesApi;
1315
+ private viewContainer?;
1316
+ private extensionComponent?;
1317
+ private extensionElement?;
1318
+ private extensionMetadata?;
1319
+ private renderQueued;
1320
+ private destroyed;
1321
+ protected loadError: string | null;
1322
+ private get extensionKey();
1323
+ constructor();
1324
+ reloadExtension(): Promise<void>;
1325
+ protected onModuleInstanceChange(): Promise<void>;
1326
+ protected onSecurityRightsChange(): void;
1327
+ ngOnDestroy(): void;
1328
+ private loadExtensionMetadata;
1329
+ private renderExtension;
1330
+ private queueRenderExtension;
1331
+ private destroyExtensionComponent;
1332
+ private renderFederatedExtension;
1333
+ private loadExtensionTranslations;
1334
+ private buildExtensionI18nUrl;
1335
+ private getExtensionTranslationNamespaces;
1336
+ private toKebabCase;
1337
+ private updateExtensionContext;
1338
+ private buildUrl;
1339
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExtensionModuleHostComponent, never>;
1340
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExtensionModuleHostComponent, "ng-component", never, {}, {}, never, never, true, never>;
1341
+ }
1342
+
1283
1343
  declare enum ImportanceLevel {
1284
1344
  Unspecified = "Unspecified",
1285
1345
  Low = "Low",
@@ -1344,6 +1404,25 @@ declare class UserNotificationsComponent {
1344
1404
  static ɵcmp: i0.ɵɵComponentDeclaration<UserNotificationsComponent, "app-user-notifications", never, {}, {}, never, never, true, never>;
1345
1405
  }
1346
1406
 
1407
+ declare class ApplicationRegistryService {
1408
+ private readonly applicationsApi;
1409
+ applications: ApplicationRegistryItemDto[];
1410
+ currentApplication: ApplicationRegistryItemDto | null;
1411
+ loadApplications(): Promise<void>;
1412
+ openApplication(application: ApplicationRegistryItemDto): void;
1413
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRegistryService, never>;
1414
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRegistryService>;
1415
+ }
1416
+
1417
+ declare class AppTopbarApplicationSwitcherComponent implements OnInit {
1418
+ protected applicationMenuItems: MenuItem[];
1419
+ protected readonly applicationRegistryService: ApplicationRegistryService;
1420
+ ngOnInit(): Promise<void>;
1421
+ private createApplicationMenuItem;
1422
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbarApplicationSwitcherComponent, never>;
1423
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbarApplicationSwitcherComponent, "app-topbar-application-switcher", never, {}, {}, never, never, true, never>;
1424
+ }
1425
+
1347
1426
  /**
1348
1427
  * A route guard that ensures the user is authenticated and has a valid access token.
1349
1428
  * If the access token is expired, it attempts to refresh the session.
@@ -1351,17 +1430,15 @@ declare class UserNotificationsComponent {
1351
1430
  */
1352
1431
  declare class AuthGuardService {
1353
1432
  private readonly oidcSecurityService;
1354
- private readonly router;
1355
1433
  /**
1356
1434
  * Checks whether the route can be activated.
1357
1435
  * - Returns `true` if the user is authenticated and the token is valid.
1358
1436
  * - Attempts to refresh the token if expired.
1359
- * - Redirects to `/unauthorized` if not authenticated or refresh fails.
1437
+ * - Starts the authorization flow if not authenticated or refresh fails.
1360
1438
  *
1361
- * @returns {Observable<boolean | UrlTree>} A stream resolving to true (allow), or UrlTree (redirect).
1439
+ * @returns {Observable<boolean>} A stream resolving to true (allow), or false after starting authorization.
1362
1440
  */
1363
- canActivate(returnUrl?: string): Observable<boolean | UrlTree>;
1364
- private getReturnUrl;
1441
+ canActivate(returnUrl?: string): Observable<boolean>;
1365
1442
  static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuardService, never>;
1366
1443
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuardService>;
1367
1444
  }
@@ -1408,6 +1485,13 @@ declare class TableFilterService {
1408
1485
  static ɵprov: i0.ɵɵInjectableDeclaration<TableFilterService>;
1409
1486
  }
1410
1487
 
1488
+ declare class ExtensionLoaderService {
1489
+ private readonly loadedScripts;
1490
+ loadScript(scriptUrl: string): Promise<void>;
1491
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExtensionLoaderService, never>;
1492
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExtensionLoaderService>;
1493
+ }
1494
+
1411
1495
  interface AppThemePreset {
1412
1496
  id: string;
1413
1497
  label?: string;
@@ -1426,18 +1510,93 @@ declare function provideAppThemes(themes: AppThemePreset[], options?: ProvideApp
1426
1510
  declare function mergeWithDefaults(themes: AppThemePreset[]): EnvironmentProviders;
1427
1511
  declare function replaceDefaults(themes: AppThemePreset[]): EnvironmentProviders;
1428
1512
 
1513
+ declare const defaultTheme: AppThemePreset[];
1514
+
1429
1515
  declare function provideOip(): i0.EnvironmentProviders;
1430
1516
 
1431
1517
  declare const langIntercept: HttpInterceptorFn;
1432
1518
 
1519
+ interface OipExtensionManifest {
1520
+ key: string;
1521
+ name: string;
1522
+ version: string;
1523
+ loadType?: OipExtensionLoadType;
1524
+ elementName?: string | null;
1525
+ scriptUrl?: string | null;
1526
+ remoteEntryUrl?: string | null;
1527
+ exposedModule?: string | null;
1528
+ componentName?: string | null;
1529
+ apiBaseUrl: string;
1530
+ icon?: string | null;
1531
+ description?: string | null;
1532
+ permissions?: unknown;
1533
+ settingsSchema?: unknown;
1534
+ }
1535
+ type OipExtensionLoadType = 'moduleFederation' | 'customElement';
1536
+ interface OipExtensionModuleMetadata {
1537
+ moduleId: number;
1538
+ name: string;
1539
+ settings?: string | null;
1540
+ kind: number;
1541
+ manifestUrl?: string | null;
1542
+ extensionKey?: string | null;
1543
+ loadType?: OipExtensionLoadType | null;
1544
+ elementName?: string | null;
1545
+ scriptUrl?: string | null;
1546
+ remoteEntryUrl?: string | null;
1547
+ exposedModule?: string | null;
1548
+ componentName?: string | null;
1549
+ apiBaseUrl?: string | null;
1550
+ version?: string | null;
1551
+ }
1552
+ interface OipExtensionHostContext {
1553
+ moduleInstanceId: number | undefined;
1554
+ extensionKey: string;
1555
+ apiBasePath: string;
1556
+ settings: unknown;
1557
+ locale?: string;
1558
+ theme?: unknown;
1559
+ user?: unknown;
1560
+ activeTabId?: string;
1561
+ permissions: {
1562
+ canRead: boolean;
1563
+ canEdit: boolean;
1564
+ canDelete: boolean;
1565
+ };
1566
+ }
1567
+ interface OipExtensionNotifyEvent {
1568
+ severity?: 'success' | 'info' | 'warn' | 'error';
1569
+ summary?: string;
1570
+ detail?: string;
1571
+ }
1572
+ interface OipExtensionNavigateEvent {
1573
+ commands?: unknown[];
1574
+ url?: string;
1575
+ }
1576
+
1577
+ declare const OIP_EXTENSION_EVENTS: {
1578
+ readonly contextChange: "oip:context-change";
1579
+ readonly titleChange: "oip:title-change";
1580
+ readonly settingsChange: "oip:settings-change";
1581
+ readonly notify: "oip:notify";
1582
+ readonly navigate: "oip:navigate";
1583
+ readonly error: "oip:error";
1584
+ };
1585
+ declare function emitOipTitleChange(element: HTMLElement, title: string): void;
1586
+ declare function emitOipSettingsChange(element: HTMLElement, settings: unknown): void;
1587
+ declare function emitOipNotify(element: HTMLElement, notification: OipExtensionNotifyEvent): void;
1588
+ declare function emitOipNavigate(element: HTMLElement, navigation: OipExtensionNavigateEvent): void;
1589
+ declare function emitOipError(element: HTMLElement, error: unknown): void;
1590
+ declare function emitOipContextChange(element: HTMLElement, context: OipExtensionHostContext): void;
1591
+
1433
1592
  declare class FolderModuleApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1434
- getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams, params?: RequestParams) => Promise<FolderModuleSettings>;
1593
+ getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams2, params?: RequestParams) => Promise<FolderModuleSettings>;
1435
1594
  static ɵfac: i0.ɵɵFactoryDeclaration<FolderModuleApi<any>, never>;
1436
1595
  static ɵprov: i0.ɵɵInjectableDeclaration<FolderModuleApi<any>>;
1437
1596
  }
1438
1597
 
1439
1598
  declare class IframeModuleApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1440
- getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams2, params?: RequestParams) => Promise<IframeModuleSettings>;
1599
+ getModuleInstanceSettings: (query: GetModuleInstanceSettingsParams4, params?: RequestParams) => Promise<IframeModuleSettings>;
1441
1600
  static ɵfac: i0.ɵɵFactoryDeclaration<IframeModuleApi<any>, never>;
1442
1601
  static ɵprov: i0.ɵɵInjectableDeclaration<IframeModuleApi<any>>;
1443
1602
  }
@@ -1447,37 +1606,19 @@ declare class SecurityApi<SecurityDataType = unknown> extends HttpClient<Securit
1447
1606
  createAuthSession: (params?: RequestParams) => Promise<any>;
1448
1607
  deleteAuthSession: (params?: RequestParams) => Promise<any>;
1449
1608
  getAuthCsrfToken: (params?: RequestParams) => Promise<AuthCsrfTokenResponse>;
1450
- getKeycloakClientSettings: (params?: RequestParams) => Promise<GetKeycloakClientSettingsResponse>;
1451
1609
  getRealmRoles: (params?: RequestParams) => Promise<string[]>;
1452
1610
  static ɵfac: i0.ɵɵFactoryDeclaration<SecurityApi<any>, never>;
1453
1611
  static ɵprov: i0.ɵɵInjectableDeclaration<SecurityApi<any>>;
1454
1612
  }
1455
1613
 
1456
- interface UserSettingsDto {
1457
- preset?: string | null;
1458
- primary?: string | null;
1459
- surface?: string | null;
1460
- darkTheme?: boolean;
1461
- menuMode?: string | null;
1462
- language?: string | null;
1463
- dateFormat?: string | null;
1464
- timeFormat?: string | null;
1465
- timeZone?: string | null;
1466
- }
1467
- interface GetUserPhotoParams {
1468
- email?: string;
1469
- }
1470
- interface PostUserPhotoPayload {
1471
- files?: File;
1472
- }
1473
-
1474
- declare class UserProfileApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1475
- getUserPhoto: (query: GetUserPhotoParams, params?: RequestParams) => Promise<File>;
1476
- postUserPhoto: (data: PostUserPhotoPayload, params?: RequestParams) => Promise<void>;
1477
- getSettings: (params?: RequestParams) => Promise<UserSettingsDto>;
1478
- setSettings: (data: UserSettingsDto, params?: RequestParams) => Promise<void>;
1479
- static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileApi<any>, never>;
1480
- static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileApi<any>>;
1614
+ declare class ApplicationsApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1615
+ getApplicationRegistryItems: (params?: RequestParams) => Promise<ApplicationRegistryItemDto[]>;
1616
+ getApplicationRegistryItemByCode: ({ code, ...query }: GetApplicationRegistryItemByCodeParams, params?: RequestParams) => Promise<any>;
1617
+ createApplicationRegistryItem: (data: ApplicationRegistryItemDto, params?: RequestParams) => Promise<any>;
1618
+ updateApplicationRegistryItem: ({ code, ...query }: UpdateApplicationRegistryItemParams, data: ApplicationRegistryItemDto, params?: RequestParams) => Promise<any>;
1619
+ deleteApplicationRegistryItem: ({ code, ...query }: DeleteApplicationRegistryItemParams, params?: RequestParams) => Promise<any>;
1620
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationsApi<any>, never>;
1621
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationsApi<any>>;
1481
1622
  }
1482
1623
 
1483
1624
  declare function convertToPrimeNgDateFormat(dateformat: string): string;
@@ -1491,5 +1632,47 @@ declare class NotificationApi<SecurityDataType = unknown> extends HttpClient<Sec
1491
1632
  static ɵprov: i0.ɵɵInjectableDeclaration<NotificationApi<any>>;
1492
1633
  }
1493
1634
 
1494
- 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 };
1495
- export type { AppConfig, AppThemePreset, AppThemePresetMergeMode, AuthCsrfToken, LanguageDto, MenuChangeEvent, NoSettingsDto, PutSecurityDto, RequestParams, SecurityDto, TopBarDto };
1635
+ declare class CustomElementExtensionModuleHostComponent extends BaseModuleComponent<unknown, unknown> implements OnDestroy {
1636
+ private set extensionContainer(value);
1637
+ private readonly extensionLoader;
1638
+ private readonly router;
1639
+ private readonly hostChangeDetectorRef;
1640
+ private readonly extensionModulesApi;
1641
+ private container?;
1642
+ private extensionElement?;
1643
+ private extensionMetadata?;
1644
+ private removeListeners;
1645
+ private renderQueued;
1646
+ private activeTabSyncQueued;
1647
+ private activeTabId;
1648
+ private destroyed;
1649
+ protected loadError: string | null;
1650
+ protected get showContent(): boolean;
1651
+ protected get showSettings(): boolean;
1652
+ protected get showSecurity(): boolean;
1653
+ private get extensionKey();
1654
+ constructor();
1655
+ protected onModuleInstanceChange(): Promise<void>;
1656
+ protected onSecurityRightsChange(): void;
1657
+ ngOnDestroy(): void;
1658
+ reloadExtension(): Promise<void>;
1659
+ private loadExtensionMetadata;
1660
+ private renderExtension;
1661
+ private queueRenderExtension;
1662
+ private isActiveTab;
1663
+ private queueActiveTabSync;
1664
+ private getCurrentActiveTabId;
1665
+ private updateExtensionContext;
1666
+ private attachListeners;
1667
+ private buildUrl;
1668
+ private loadExtensionTranslations;
1669
+ private buildExtensionI18nUrl;
1670
+ private addListener;
1671
+ private destroyExtensionElement;
1672
+ private renderCustomElementExtension;
1673
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomElementExtensionModuleHostComponent, never>;
1674
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomElementExtensionModuleHostComponent, "ng-component", never, {}, {}, never, never, true, never>;
1675
+ }
1676
+
1677
+ export { APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AppTopbarApplicationSwitcherComponent, ApplicationRegistryService, ApplicationsApi, ApplicationsComponent, AuthGuardService, BaseModuleComponent, BffSecurityService, ConfigComponent, ContentType, CustomElementExtensionModuleHostComponent, DbMigrationComponent, DiscussionComponent, ErrorComponent, ExtensionLoaderService, ExtensionModuleHostComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationApi, NotificationService, OIP_EXTENSION_EVENTS, ProfileComponent, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserService, convertToPrimeNgDateFormat, defaultTheme, emitOipContextChange, emitOipError, emitOipNavigate, emitOipNotify, emitOipSettingsChange, emitOipTitleChange, langIntercept, mergeWithDefaults, provideAppThemes, provideLogoComponent, provideOip, replaceDefaults };
1678
+ export type { AppConfig, AppThemePreset, AppThemePresetMergeMode, AuthCsrfToken, LanguageDto, MenuChangeEvent, NoSettingsDto, OipExtensionHostContext, OipExtensionLoadType, OipExtensionManifest, OipExtensionModuleMetadata, OipExtensionNavigateEvent, OipExtensionNotifyEvent, PutSecurityDto, RequestParams, SecurityDto, TopBarDto };