/** * Redirects the current page to a specified URL using the single-spa framework. * Made to be used from views. If you are not navigating from a view, use navigate instead * * @param url - The target URL to which the page should be redirected. */ export declare function navigateTo(url: string): (event?: Event) => void; /** * Navigates to the specified URL using the single-spa framework. * Suitable for in-code navigation. If you need to navigate from a view, use navigateTo instead. * @param targetUrl - The target URL to which the page should be redirected. * @param queryParams - Optional query parameters to append to the URL. Nullish values are skipped. */ export declare function navigate(targetUrl: string, queryParams?: Record): void; /** * Appends query parameters to a URL. Nullish values are skipped and remaining values are stringified. * Existing query parameters are preserved and merged (a duplicate key is overwritten with the new value), * and any URL fragment (#hash) is kept at the end where it belongs. * * @param url - The base URL to append the query parameters to. * @param queryParams - The query parameters to append. * @returns The URL with the query parameters appended, as an absolute URL. */ export declare function buildUrl(url: string, queryParams?: Record): string; /** * Navigates to the login page and adds a return url along with all query params * @param returnUrl - The page to return to after login, without the context path. Defaults to the current page. */ export declare function navigateToLoginPage(returnUrl?: string): void; /** * Opens a new tab with the specified URL. * @param url - The URL to open in a new tab. */ export declare function openInNewTab(url: string): void; /** * Checks if the current page is the home page. * * @returns Returns true if the current page is the home page, false otherwise. */ export declare function isHomePage(): boolean; /** * Checks if the current page is the login page. * * @returns Returns true if the current page is the login page, false otherwise. */ export declare function isLoginPage(): boolean; /** * Retrieves the pathname portion of the current URL without the context prefix. * * @returns The pathname of the current URL, which represents the path segment that comes after the context (if any) and before the query string. */ export declare function getPathName(): string; /** * Retrieves the current URL including the context prefix, if present. * * @returns The current URL including the context prefix. */ export declare function getOrigin(): string; /** * Whether both URLs point to the same page, excluding query and hash changes. * The URLs are resolved against the current origin to handle relative URLs. */ export declare function isSamePage(oldUrl: string, newUrl: string): boolean; /** * Returns the context name (base href) from the `` tag in the document. * * This is usually the base path under which the app is deployed, e.g. '/graphdb/'. * If no `` tag is found, returns '/' by default. * * @returns The context path as specified in the base href (always ending with a slash). */ export declare function getBasePath(): string; /** * Retrieves the current route from the URL, removing the leading /. * For example:
* Calling getCurrentRoute() while on http://localhost:9000/sparql will return "sparql"
* Calling getCurrentRoute() while on http://localhost:9000/graphql/endpoints will return "graphql/endpoints" */ export declare function getCurrentRoute(): string; /** * Retrieves the current URL path along with any query parameters. * * @returns The current URL path combined with its query parameters, if any. */ export declare function getLocationPathWithQueryParams(): string;