UNPKG

@porscheinformatik/clr-addons

Version:
49 lines (48 loc) 1.85 kB
import { ClrHistoryModel, ClrHistorySettingsModel } from './history-model.interface'; import { BehaviorSubject } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import * as i0 from "@angular/core"; export declare class ClrHistoryService { private historyNotificationUrl; private httpClient; cookieSettings$: BehaviorSubject<ClrHistorySettingsModel[]>; cookieName: string; cookieNameSettings: string; private expiryDate; private maxSize; private maxUrlSize; constructor(historyNotificationUrl: string, httpClient: HttpClient); /** * Add a new history entry * @param historyEntry The entry to be added * @param domain The optional domain param where the cookie is stored * @returns true when entry added, otherwise false is returned */ addHistoryEntry(historyEntry: ClrHistoryModel, domain?: string): boolean; getHistoryDisplay(username: string, context: { [key: string]: string; }): ClrHistoryModel[]; getHistory(username: string, context: { [key: string]: string; }): ClrHistoryModel[]; /** * Set history * @param entries * @param domain */ private setHistory; reduceSize(entries: ClrHistoryModel[]): ClrHistoryModel[]; resetHistory(): void; removeFromHistory(entry: ClrHistoryModel): void; private checkEqualContext; initializeCookieSettings(username: string, domain?: string): void; setHistoryPinned(username: string, pin: boolean, domain?: string): void; private getCookieByName; private encode; private decode; private setCookie; private getDomain; private notifyExternalUrl; static ɵfac: i0.ɵɵFactoryDeclaration<ClrHistoryService, [{ optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<ClrHistoryService>; }