/** * @file Implements Browser History Management Logic: consists of methods for handling change in browser history * @author WebWiz Team */ /** * this method update browser document title * @function updateDocumentTitle * @param title - browser document title */ export declare const updateDocumentTitle: (title: string) => void; interface SemanticURLInfo { [key: string]: unknown; options?: Record; } interface HistoryState { stateObj: SemanticURLInfo; } /** * this method is used to formulate the state for corresponding semantic url * @function stateForSemanticURL * @param info - information corresponding to semantic url * @param options - other params like context * @returns state corresponding to semantic url */ export declare const getStateForSemanticURL: (info: SemanticURLInfo, options: Record) => { stateObj: SemanticURLInfo; }; /** * this method is a wrapper function for history.pushState and implements the same in try-catch block * @function addToHistory * @param state - state information corresponding to semantic url * @param title - title corresponding to semantic url * @param url - semantic url */ export declare const addToHistory: (state: HistoryState, title: string, url: string) => void; /** * this method is a wrapper function for history.replaceState and implements the same in try-catch block * @function replaceHistory * @param state - state information corresponding to semantic url * @param title - title corresponding to semantic url * @param url - semantic url */ export declare const replaceHistory: (state: HistoryState, title: string, url: string) => void; /** * this method returns history state on Browser back/forward action * @function getStateForBackForwardNav * @param event - popstate event * @returns state corresponding to popstate event */ export declare const getStateForBackForwardNav: (event: PopStateEvent) => any; /** * this method add a Event listener for browser back/forward event * @function addEventListenerForHistory * @param handlerFunc - event handler function reference */ export declare const addEventListenerForHistory: (handlerFunc: Function) => void; /** * this method add a Event listener for browser refresh event * @function addEventListenerForRefresh */ export declare const addEventListenerForRefresh: () => void; /** * this method returns the pathname of a URL * @function getPathNameOfUrl * @returns pathname of URL with first and last '/' removed */ export declare const getPathNameOfUrl: () => string; /** * this method returns the pathname of a URL * @function getPathNameOfUrl * @returns pathname of URL with first and last '/' removed */ export declare const getPathNameWithQueryParams: () => string; /** * this method returns URL * @function getFullUrl * @returns complete URL */ export declare const getFullUrl: () => string; /** * This method returns url search parameters * @function getQueryParams * @returns complete URL */ export declare const getQueryParams: () => string; /** * this method displays a message in Browser console * @function sendMessageToConsole * @param message - message * @param additionalInfo - additional Information to be displayed with message * @param messageType - warning | error | info */ export declare const sendMessageToConsole: (message: string | Error, additionalInfo: unknown, messageType: string) => void; export {};