@openmfp/portal-ui-lib 0.184.4 → 0.184.6
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.
|
@@ -1144,33 +1144,37 @@ class UserSettingsConfigService {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
async addUserSettings(settings) {
|
|
1146
1146
|
const userInfo = this.authService.getUserInfo();
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1147
|
+
const { userAvatarUrl } = await this.envConfigService.getEnvConfig();
|
|
1148
|
+
const imageUrl = userAvatarUrl?.replace('${userId}', userInfo.userId);
|
|
1149
|
+
if (userInfo.email || userInfo.userId) {
|
|
1150
|
+
settings.frame_userAccount = {
|
|
1151
|
+
label: 'USERSETTINGSDIALOG_USER_ACCOUNT',
|
|
1152
|
+
sublabel: userInfo.name,
|
|
1153
|
+
icon: imageUrl || 'person-placeholder',
|
|
1154
|
+
title: userInfo.name,
|
|
1155
|
+
initials: userInfo.initials,
|
|
1156
|
+
iconClassAttribute: 'fd-avatar fd-avatar--s fd-avatar--circle fd-avatar--thumbnail lui-avatar-space',
|
|
1157
|
+
settings: {
|
|
1158
|
+
name: {
|
|
1159
|
+
type: 'string',
|
|
1160
|
+
label: 'USERSETTINGSDIALOG_NAME',
|
|
1161
|
+
isEditable: false,
|
|
1162
|
+
},
|
|
1163
|
+
email: {
|
|
1164
|
+
type: 'string',
|
|
1165
|
+
label: 'USERSETTINGSDIALOG_EMAIL',
|
|
1166
|
+
isEditable: false,
|
|
1167
|
+
},
|
|
1164
1168
|
},
|
|
1165
|
-
},
|
|
1166
|
-
};
|
|
1167
|
-
const validLanguages = await this.i18nService.getValidLanguages();
|
|
1168
|
-
if (validLanguages.length > 1) {
|
|
1169
|
-
settings.frame_userAccount.settings['language'] = {
|
|
1170
|
-
type: 'enum',
|
|
1171
|
-
label: 'USERSETTINGSDIALOG_LANGUAGE',
|
|
1172
|
-
options: validLanguages,
|
|
1173
1169
|
};
|
|
1170
|
+
const validLanguages = await this.i18nService.getValidLanguages();
|
|
1171
|
+
if (validLanguages.length > 1) {
|
|
1172
|
+
settings.frame_userAccount.settings['language'] = {
|
|
1173
|
+
type: 'enum',
|
|
1174
|
+
label: 'USERSETTINGSDIALOG_LANGUAGE',
|
|
1175
|
+
options: validLanguages,
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1174
1178
|
}
|
|
1175
1179
|
}
|
|
1176
1180
|
addInfoSettings(settings) {
|
|
@@ -1307,6 +1311,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
1307
1311
|
args: [{ providedIn: 'root' }]
|
|
1308
1312
|
}] });
|
|
1309
1313
|
|
|
1314
|
+
class DefaultUserProfileConfigService {
|
|
1315
|
+
async getProfile() {
|
|
1316
|
+
return {
|
|
1317
|
+
items: [],
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1310
1322
|
class HeaderBarService {
|
|
1311
1323
|
constructor(headerBarConfig) {
|
|
1312
1324
|
this.headerBarConfig = headerBarConfig;
|
|
@@ -1758,15 +1770,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
1758
1770
|
args: [{ providedIn: 'root' }]
|
|
1759
1771
|
}] });
|
|
1760
1772
|
|
|
1761
|
-
async function bootstrap(
|
|
1773
|
+
async function bootstrap() {
|
|
1774
|
+
const authService = inject(AuthService);
|
|
1775
|
+
const envConfigService = inject(EnvConfigService);
|
|
1762
1776
|
try {
|
|
1777
|
+
const { oauthServerUrl, clientId } = await envConfigService.getEnvConfig();
|
|
1778
|
+
if (!oauthServerUrl || !clientId) {
|
|
1779
|
+
return;
|
|
1780
|
+
}
|
|
1763
1781
|
await authService.refresh();
|
|
1764
1782
|
}
|
|
1765
1783
|
catch (error) {
|
|
1766
1784
|
console.error('Error bootstrapping the app:', error);
|
|
1767
1785
|
}
|
|
1768
1786
|
}
|
|
1769
|
-
const provideBootstrap = () => provideAppInitializer(() => bootstrap(
|
|
1787
|
+
const provideBootstrap = () => provideAppInitializer(() => bootstrap());
|
|
1770
1788
|
|
|
1771
1789
|
async function initializeAutomaticSessionRefresh(sessionRefreshService, authService, luigiCoreService) {
|
|
1772
1790
|
authService.authEvents
|
|
@@ -2681,12 +2699,10 @@ const addOptionalProviders = (options) => {
|
|
|
2681
2699
|
provide: LUIGI_APP_SWITCHER_CONFIG_SERVICE_INJECTION_TOKEN,
|
|
2682
2700
|
useClass: options.appSwitcherConfigService || AppSwitcherConfigServiceImpl,
|
|
2683
2701
|
});
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
});
|
|
2689
|
-
}
|
|
2702
|
+
providers.push({
|
|
2703
|
+
provide: LUIGI_USER_PROFILE_CONFIG_SERVICE_INJECTION_TOKEN,
|
|
2704
|
+
useClass: options.userProfileConfigService || DefaultUserProfileConfigService,
|
|
2705
|
+
});
|
|
2690
2706
|
if (options.luigiExtendedGlobalContextConfigService) {
|
|
2691
2707
|
providers.push({
|
|
2692
2708
|
provide: LUIGI_EXTENDED_GLOBAL_CONTEXT_CONFIG_SERVICE_INJECTION_TOKEN,
|
|
@@ -2776,5 +2792,5 @@ const addOptionalProviders = (options) => {
|
|
|
2776
2792
|
* Generated bundle index. Do not edit.
|
|
2777
2793
|
*/
|
|
2778
2794
|
|
|
2779
|
-
export { AppSwitcherConfigServiceImpl, AuthConfigService, AuthEvent, AuthService, ConfigService, CustomMessageListenersService, CustomReuseStrategy, ERROR_COMPONENT_CONFIG, EntityType, EnvConfigService, GlobalContextConfigService, HEADER_BAR_CONFIG_SERVICE_INJECTION_TOKEN, HeaderBarService, I18nService, IframeService, LOCAL_CONFIGURATION_SERVICE_INJECTION_TOKEN, LUIGI_APP_SWITCHER_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_AUTH_EVENTS_CALLBACKS_SERVICE_INJECTION_TOKEN, LUIGI_BREADCRUMB_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_MESSAGE_LISTENERS_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_CONTEXT_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_EXTENDED_GLOBAL_CONTEXT_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_GLOBAL_SEARCH_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_NODES_CUSTOM_GLOBAL_SERVICE_INJECTION_TOKEN, LUIGI_NODE_CHANGE_HOOK_SERVICE_INJECTION_TOKEN, LUIGI_ROUTING_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_STATIC_SETTINGS_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_USER_PROFILE_CONFIG_SERVICE_INJECTION_TOKEN, LocalConfigurationServiceImpl, LocalNodesService, LocalStorageKeys, LoginEventService, LoginEventType, LuigiCoreService, LuigiNodesService, NetworkVisibility, NodeContextProcessingServiceImpl, NodeUtilsService, PortalComponent, RequestHeadersService, RoutingConfigServiceImpl, SessionRefreshService, StaticSettingsConfigServiceImpl, THEMING_SERVICE, UserSettingsConfigService, featureToggleLocalStorage, localDevelopmentSettingsLocalStorage, matchesJMESPath, providePortal, userSettingsLocalStorage };
|
|
2795
|
+
export { AppSwitcherConfigServiceImpl, AuthConfigService, AuthEvent, AuthService, ConfigService, CustomMessageListenersService, CustomReuseStrategy, DefaultUserProfileConfigService, ERROR_COMPONENT_CONFIG, EntityType, EnvConfigService, GlobalContextConfigService, HEADER_BAR_CONFIG_SERVICE_INJECTION_TOKEN, HeaderBarService, I18nService, IframeService, LOCAL_CONFIGURATION_SERVICE_INJECTION_TOKEN, LUIGI_APP_SWITCHER_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_AUTH_EVENTS_CALLBACKS_SERVICE_INJECTION_TOKEN, LUIGI_BREADCRUMB_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_MESSAGE_LISTENERS_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_CONTEXT_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_EXTENDED_GLOBAL_CONTEXT_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_GLOBAL_SEARCH_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_NODES_CUSTOM_GLOBAL_SERVICE_INJECTION_TOKEN, LUIGI_NODE_CHANGE_HOOK_SERVICE_INJECTION_TOKEN, LUIGI_ROUTING_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_STATIC_SETTINGS_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_USER_PROFILE_CONFIG_SERVICE_INJECTION_TOKEN, LocalConfigurationServiceImpl, LocalNodesService, LocalStorageKeys, LoginEventService, LoginEventType, LuigiCoreService, LuigiNodesService, NetworkVisibility, NodeContextProcessingServiceImpl, NodeUtilsService, PortalComponent, RequestHeadersService, RoutingConfigServiceImpl, SessionRefreshService, StaticSettingsConfigServiceImpl, THEMING_SERVICE, UserSettingsConfigService, featureToggleLocalStorage, localDevelopmentSettingsLocalStorage, matchesJMESPath, providePortal, userSettingsLocalStorage };
|
|
2780
2796
|
//# sourceMappingURL=openmfp-portal-ui-lib.mjs.map
|