import ViewBase from '../Views/ViewBase'; import { RoutingState } from './RoutingState'; import { INavigationHelper as INeoNavigationHelper } from '@singularsystems/neo-core/dist/Routing/INavigationHelper'; import { ParamValues, RouteParameterObject } from './IRouteParameter'; import type { IPageLeaveHandler } from "./PageLeaveHandler"; export type ViewConstructor> = new (...args: any) => ViewBase; export interface INavigationHelper extends INeoNavigationHelper { /** * Navigates to the view, if the view component is found in the routes definition. * If the view is bound to multiple routes, the first one will be used. * @param view View component which inherits from view base. * @param paramValues View params to include in the url to pass to the view. */ navigateToView>(view: ViewConstructor, paramValues?: ParamValues): void; /** * Gets the full path for a view including view parameter values. * @param view View component which inherits from view base. * @param paramValues View params to include in the url to pass to the view. */ getPathForView>(view: ViewConstructor, paramValues?: ParamValues): string; /** * Gets the path of the currently rendered view, without parameter components. */ getCurrentViewPath(): string; } export default class NavigationHelper implements INavigationHelper { private routingState; private pageLeaveHandler; constructor(routingState: RoutingState, pageLeaveHandler: IPageLeaveHandler); private prevUrls; private isPrompting; navigateInternal(url: string, replace?: boolean): Promise; navigateToView>(view: ViewConstructor, paramValues?: ParamValues): void; openWindow(path: string, state?: { name: string; value: any; }, options?: { target?: string; features?: string; }): Window | null; readOpenerState(name: string, reset?: boolean): string | undefined; getPathForView>(view: ViewConstructor, paramValues?: ParamValues): string; getCurrentViewPath(): string; private historyPopState; private windowUnload; private beforeLocationChanged; }