import { OnDestroy } from '@angular/core'; import { TableSettings } from '../../models'; import { TableCache } from '../../models/table-cache.model'; import { DatatableComponent } from '../../components/datatable/datatable.component'; import { TableCacheService } from '../table-cache.service'; import * as i0 from "@angular/core"; /** * The following service is dedicated to each Datatable per instance. * Means, each datatable will have completely different instance of this service. * MUST NOT BE USED as SINGLETON */ export declare class TableCacheSettingService implements OnDestroy { private tableCacheSvc; private localStorageCacheSub; private sessionStorageCacheSub; localStorageCache: TableCache; sessionStorageCache: TableCache; get tableSettings(): TableSettings; get pagination(): { [key: string]: any; }; get cacheKey(): string; private dtInstance; constructor(tableCacheSvc: TableCacheService); /** Subscribe to TableCache instances of local and session storage */ private subscribeToCache; datatableInstance(ts: DatatableComponent): void; /** * TODO: [change] save settings only if cache is empty or the defined settings are empty */ saveSettingsToCache(): void; /** On update of a setting/value: * saveSettingToCache('settingName'): * IF cachingActive && * IF that setting's cacheEnabled * const cacheLocation = this.ts.cache[settingName].cacheLocation * const settingToBeSaved = this.getPropertyToBeSavedToCache('settingName') * this.tableCacheSvc.saveSettingToCache(cacheKey, cacheLocation, settingToBeSaved); * -- update local/session storage observable * -- save that observable to storage */ saveSettingToCache(propertyName: string): void; private getPropertyToBeSavedToCache; /** Load settings from retrieved local/session storage caches into table's settings */ loadSettingsFromCache(): void; /** Loads one of the properties defined in TableCacheSettings into the corresponding TableSettings */ private loadSetting; private loadColumnSearchFromCache; private loadPageIndexFromCache; private loadPaginationSizeFromCache; private loadResponsiveTableFromCache; private loadSearchValueFromCache; private loadSortingFromCache; private loadFixedColumnsFromCache; private setFixedColumns; private loadTableDensityFromCache; private loadFixedHeadersFromCache; private loadVisibleColumnsFromCache; private setVisibleColumns; unsubscribeFromCache(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; }