UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

93 lines (92 loc) 2.73 kB
import { AdaptableTheme, SystemThemeEntry, ThemeState } from '../AdaptableState/ThemeState'; /** * Provides run-time access to the Theme Module and associated state */ export interface ThemeApi { /** * Retrieves Theme section from Adaptable State */ getThemeState(): ThemeState; /** * Applies the Current Theme */ applyCurrentTheme(): void; /** * Sets Adaptable to use a given theme * @param theme name of theme to apply */ loadTheme(theme: string): void; /** * Sets AdapTable Light Theme - updates the AG Grid theme to match */ loadLightTheme(): void; /** * Sets AdapTable Dark Theme - updates the AG Grid theme to match */ loadDarkTheme(): void; /** * Retrieves name of Current Theme */ getCurrentTheme(): string; /** * Retrieves the current theme object */ getCurrentThemeObject(): AdaptableTheme; /** * Edits an existing theme */ editTheme(theme: AdaptableTheme): void; /** * Sets available System Themes; if empty array is passed none will be * * @param systemThemes system themes to use ('light', 'dark', both, or none) */ setSystemThemes(systemThemes: SystemThemeEntry[]): void; /** * Sets available User Themes * * @param userThemes User themes to set - each has name, description * @deprecated Will be removed in the next major version. */ setUserThemes(userThemes: AdaptableTheme[]): void; /** * Adds a User Theme to State * @param theme * @deprecated Will be removed in the next major version. */ addUserTheme(theme: AdaptableTheme): void; /** * Deletes a User Theme from State * @param theme * @deprecated Will be removed in the next major version. */ deleteUserTheme(theme: AdaptableTheme): void; /** * Retrieves System Themes in State */ getSystemThemes(): AdaptableTheme[]; /** * Retrieves User Themes in State * @deprecated Will be removed in the next major version. */ getUserThemes(): AdaptableTheme[]; /** * Retrieves all Themes (both System & User) in State */ getThemes(): AdaptableTheme[]; /** * Retrieves a Theme by name * @param themeName */ getThemeByName(themeName: string): AdaptableTheme; /** * Opens Settings Panel with Theme section selected and visible */ openThemeSettingsPanel(): void; /** * Get the name of the current AG Grid theme * * @deprecated required only for legacy AG Grid themes, see https://www.ag-grid.com/javascript-data-grid/theming-v32/ */ getAgGridCurrentThemeName(): string; }