@openmfp/portal-ui-lib 0.194.13 → 0.194.15

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.
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpErrorResponse, HttpClient, provideHttpClient } from '@angular/common/http';
5
5
  import { firstValueFrom, Subject, lastValueFrom, tap, filter } from 'rxjs';
6
6
  import * as i1$1 from '@angular/router';
7
- import { ActivatedRoute, NavigationEnd, RouterOutlet, RouteReuseStrategy, provideRouter } from '@angular/router';
7
+ import { ActivatedRoute, NavigationEnd, RouterOutlet, RouteReuseStrategy, UrlHandlingStrategy, provideRouter } from '@angular/router';
8
8
  import { jwtDecode } from 'jwt-decode';
9
9
  import isEqual from 'lodash.isequal';
10
10
  import oAuth2 from '@luigi-project/plugin-auth-oauth2';
@@ -2698,6 +2698,24 @@ class CustomReuseStrategy {
2698
2698
  }
2699
2699
  }
2700
2700
 
2701
+ class PreserveQueryParamsUrlHandlingStrategy {
2702
+ shouldProcessUrl(url) {
2703
+ return true;
2704
+ }
2705
+ extract(url) {
2706
+ return url;
2707
+ }
2708
+ merge(newUrlPart, wholeUrl) {
2709
+ const routerHasNoQueryParams = !newUrlPart.queryParams ||
2710
+ Object.keys(newUrlPart.queryParams).length === 0;
2711
+ const liveParams = Object.fromEntries(new URLSearchParams(location.search));
2712
+ if (routerHasNoQueryParams && Object.keys(liveParams).length > 0) {
2713
+ newUrlPart.queryParams = liveParams;
2714
+ }
2715
+ return newUrlPart;
2716
+ }
2717
+ }
2718
+
2701
2719
  function providePortal(options = {}) {
2702
2720
  const providers = [
2703
2721
  provideHttpClient(),
@@ -2707,6 +2725,10 @@ function providePortal(options = {}) {
2707
2725
  provideLanguageServices(),
2708
2726
  provideRouter(portalRouts),
2709
2727
  { provide: RouteReuseStrategy, useClass: CustomReuseStrategy },
2728
+ {
2729
+ provide: UrlHandlingStrategy,
2730
+ useClass: PreserveQueryParamsUrlHandlingStrategy,
2731
+ },
2710
2732
  ...addOptionalProviders(options),
2711
2733
  ];
2712
2734
  return makeEnvironmentProviders(providers);
@@ -2819,5 +2841,5 @@ const addOptionalProviders = (options) => {
2819
2841
  * Generated bundle index. Do not edit.
2820
2842
  */
2821
2843
 
2822
- export { AppSwitcherConfigServiceImpl, AuthConfigService, AuthEvent, AuthService, ConfigService, CustomMessageListenersService, CustomReuseStrategy, DefaultNavigationRedirectStrategy, 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, NAVIGATION_REDIRECT_STRATEGY_INJECTION_TOKEN, NavHeaderService, NetworkVisibility, NodeContextProcessingServiceImpl, NodeUtilsService, PortalComponent, RequestHeadersService, RoutingConfigServiceImpl, SessionRefreshService, StaticSettingsConfigServiceImpl, THEMING_SERVICE, UserSettingsConfigService, featureToggleLocalStorage, localDevelopmentSettingsLocalStorage, matchesJMESPath, providePortal, userSettingsLocalStorage };
2844
+ export { AppSwitcherConfigServiceImpl, AuthConfigService, AuthEvent, AuthService, ConfigService, CustomMessageListenersService, CustomReuseStrategy, DefaultNavigationRedirectStrategy, 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, NAVIGATION_REDIRECT_STRATEGY_INJECTION_TOKEN, NavHeaderService, NetworkVisibility, NodeContextProcessingServiceImpl, NodeUtilsService, PortalComponent, PreserveQueryParamsUrlHandlingStrategy, RequestHeadersService, RoutingConfigServiceImpl, SessionRefreshService, StaticSettingsConfigServiceImpl, THEMING_SERVICE, UserSettingsConfigService, featureToggleLocalStorage, localDevelopmentSettingsLocalStorage, matchesJMESPath, providePortal, userSettingsLocalStorage };
2823
2845
  //# sourceMappingURL=openmfp-portal-ui-lib.mjs.map