UNPKG

@adaptabletools/adaptable

Version:

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

89 lines (88 loc) 2.46 kB
import { AdaptableTheme, 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: AdaptableTheme[]): void; /** * Sets available User Themes * * @param userThemes User themes to set - each has name, description */ setUserThemes(userThemes: AdaptableTheme[]): void; /** * Adds a User Theme to State * @param theme */ addUserTheme(theme: AdaptableTheme): void; /** * Deletes a User Theme from State * @param theme */ deleteUserTheme(theme: AdaptableTheme): void; /** * Retrieves System Themes in State */ getSystemThemes(): AdaptableTheme[]; /** * Retrieves User Themes in State */ 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; }