UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

40 lines (39 loc) 1.15 kB
import GirafeSingleton from '../../base/GirafeSingleton.js'; export default class UrlManager extends GirafeSingleton { getParam(param: string): string | null; /** * Read all the arguments from the current url */ getParams(...args: string[]): Record<string, string | null>; getParamsWithPrefix(...prefixList: string[]): Record<string, string | null>; /** * Remove the arguments from the current url */ removeParams(...args: string[]): void; /** * Return the current root URL */ getRootUrl(): string; /** * Return the current url without the url parameters */ getBaseUrlPath(): string; /** * Replace the url in the browser * @param url url to replace * @param data optional data to pass to replaceState */ updateUrl(url: string | URL, data?: unknown): void; /** * Update the hash of the url */ updateHash(hash: string): void; /** * Get the current hash from the url */ getHash(): string | null; /** * Check if the url contains the searched hash */ hasHash(searchedHash: string): boolean; }