@finos/legend-application
Version:
Legend application core
71 lines • 3.55 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type NavigationAddress, type NavigationLocation, type ApplicationNavigator, type NavigationLocationParameterValue, type NavigationZone } from './NavigationService.js';
import { Outlet, Route, Routes, matchPath, matchRoutes, generatePath, useParams, useSearchParams, Navigate, type NavigateFunction } from 'react-router';
export { BrowserRouter } from 'react-router-dom';
export { Outlet, Route, Routes, useParams, useSearchParams, matchPath, matchRoutes, generatePath, Navigate, };
export declare const useNavigationZone: () => NavigationZone;
/**
* Prefix URL patterns coming from extensions with `/extensions/`
* to avoid potential conflicts with main routes.
*/
export declare const generateExtensionUrlPattern: (pattern: string) => string;
export declare function stripTrailingSlash(url: string): string;
export declare class BrowserNavigator implements ApplicationNavigator {
private readonly navigate;
private readonly baseUrl;
private _isNavigationBlocked;
private _forceBypassNavigationBlocking;
private _blockCheckers;
private _beforeUnloadListener;
onBlock?: ((onProceed: () => void) => void) | undefined;
onNativePlatformNavigationBlock?: (() => void) | undefined;
constructor(navigate: NavigateFunction, baseUrl: string);
private get window();
goToLocation(location: NavigationLocation, options?: {
ignoreBlocking?: boolean | undefined;
}): void;
reload(options?: {
ignoreBlocking?: boolean | undefined;
}): void;
goToAddress(address: NavigationAddress, options?: {
ignoreBlocking?: boolean | undefined;
}): void;
visitAddress(address: NavigationAddress): void;
generateAddress(location: NavigationLocation): string;
updateCurrentLocation(location: NavigationLocation): void;
updateCurrentZone(zone: NavigationZone): void;
resetZone(): void;
getCurrentBaseAddress(options?: {
withAppRoot?: boolean | undefined;
}): NavigationAddress;
getCurrentAddress(): NavigationAddress;
getCurrentLocation(): NavigationLocation;
getCurrentLocationParameters<T extends Record<string, NavigationLocationParameterValue>>(options?: {
replaceUrlSafeBase64Characters?: boolean | undefined;
sanitizeParametersInsteadOfUrl?: boolean | undefined;
}): T;
getCurrentLocationParameterValue(key: string, options?: {
replaceUrlSafeBase64Characters?: boolean | undefined;
sanitizeParametersInsteadOfUrl?: boolean | undefined;
}): NavigationLocationParameterValue;
getCurrentZone(): NavigationZone;
blockNavigation(blockCheckers: (() => boolean)[], onBlock?: ((onProceed: () => void) => void) | undefined, onNativePlatformNavigationBlock?: (() => void) | undefined): void;
unblockNavigation(): void;
get isNavigationBlocked(): boolean;
INTERNAL__internalizeTransientParameter(key: string): void;
}
//# sourceMappingURL=BrowserNavigator.d.ts.map