ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
45 lines (44 loc) • 1.77 kB
TypeScript
import type { Part } from './part';
import { PartImpl } from './partImpl';
import type { SharedThemeParams } from './shared/shared-css';
import type { Theme } from './theme';
import type { ThemeLogger } from './themeLogger';
import type { WithParamTypes } from './themeTypes';
export declare const _asThemeImpl: <TParams>(theme: Theme<TParams>) => ThemeImpl;
export declare const createSharedTheme: <TParams extends SharedThemeParams>(themeLogger: ThemeLogger, overridePrefix?: string) => Theme<TParams>;
type themeUseArgs = {
loadThemeGoogleFonts: boolean | undefined;
styleContainer: HTMLElement;
cssLayer: string | undefined;
nonce: string | undefined;
moduleCss: Map<string, string[]> | undefined;
};
export declare class ThemeImpl {
private readonly params;
readonly parts: PartImpl[];
constructor(params: {
themeLogger: ThemeLogger;
/**
* If a theme element is nested inside another theme element,
* this allows the child to inherit different variables than the parent
*/
overridePrefix?: string;
}, parts?: PartImpl[]);
withPart(part: Part | (() => Part)): ThemeImpl;
withoutPart(feature: string): ThemeImpl;
withParams(params: WithParamTypes<unknown>, mode?: string): ThemeImpl;
_startUse({ styleContainer, cssLayer, nonce, loadThemeGoogleFonts, moduleCss }: themeUseArgs): void;
private _cssClassCache?;
_getCssClass(this: ThemeImpl): string;
private _paramsClassName?;
_getParamsClassName(): string;
private _paramsCache?;
_getModeParams(): ModalParamValues;
private _paramsCssCache?;
_getParamsCss(): string;
}
type ParamValues = Record<string, unknown>;
type ModalParamValues = {
[mode: string]: ParamValues;
};
export {};