import { CSSDeclaration, OneDArray, ProtoExtends, TColumn, TData } from './types'; import Storage from './storage/storage'; import Pipeline from './pipeline/pipeline'; import Tabular from './tabular'; import { SearchConfig } from './view/plugin/search/search'; import { PaginationConfig } from './view/plugin/pagination'; import Header from './header'; import { ServerStorageOptions } from './storage/server'; import Dispatcher from './util/dispatcher'; import { GenericSortConfig } from './view/plugin/sort/sort'; import { Language, Translator } from './i18n/language'; import { ComponentChild, RefObject } from 'preact'; import { EventEmitter } from './util/eventEmitter'; import { GridEvents } from './events'; export interface Config { eventEmitter: EventEmitter; dispatcher: Dispatcher; /** container element that is used to mount the Grid.js to */ container?: Element; /** gridjs-temp div which is used internally */ tempRef?: RefObject; data?: TData | (() => TData) | (() => Promise); server?: ServerStorageOptions; header?: Header; /** to parse a HTML table and load the data */ from: HTMLElement; storage: Storage; pipeline: Pipeline; /** to automatically calculate the columns width */ autoWidth: boolean; /** sets the width of the container and table */ width: string; search: SearchConfig; pagination: PaginationConfig; sort: GenericSortConfig; translator: Translator; style?: Partial<{ table: CSSDeclaration; td: CSSDeclaration; th: CSSDeclaration; container: CSSDeclaration; header: CSSDeclaration; footer: CSSDeclaration; }>; className?: Partial<{ table: string; th: string; td: string; container: string; footer: string; header: string; }>; } interface UserConfigExtend { columns?: OneDArray; search: SearchConfig | boolean; pagination: PaginationConfig | boolean; sort: GenericSortConfig | boolean; language: Language; } export declare type UserConfig = ProtoExtends, Partial>; export declare class Config { private _userConfig; constructor(config?: Partial); /** * Assigns `updatedConfig` keys to the current config file * * @param updatedConfig */ assign(updatedConfig: Partial): Config; /** * Updates the config from a UserConfig * * @param userConfig */ update(userConfig: Partial): Config; static defaultConfig(): Config; static fromUserConfig(userConfig: UserConfig): Config; } export {};