ThemeApi
Provides run-time access to the Theme Module and associated state
export interfaceMethods
| Method | Description |
|---|---|
| addUserTheme(theme) | Adds a User Theme to State |
| applyCurrentTheme() | Applies the Current Theme |
| deleteUserTheme(theme) | Deletes a User Theme from State |
| editTheme(theme) | Edits an existing theme |
| getCurrentTheme() | Retrieves name of Current Theme |
| getCurrentThemeObject() | Retrieves the current theme object |
| getSystemThemes() | Retrieves System Themes in State |
| getThemeByName(themeName) | Retrieves a Theme by name |
| getThemes() | Retrieves all Themes (both System & User) in State |
| getThemeState() | Retrieves Theme section from Adaptable State |
| getUserThemes() | Retrieves User Themes in State |
| loadDarkTheme() | Sets AdapTable Dark Theme - updates the AG Grid theme to match |
| loadLightTheme() | Sets AdapTable Light Theme - updates the AG Grid theme to match |
| loadTheme(theme) | Sets Adaptable to use a given theme |
| openThemeSettingsPanel() | Opens Settings Panel with Theme section selected and visible |
| setSystemThemes(systemThemes) | Sets available System Themes; if empty array is passed none will be |
| setUserThemes(userThemes) | Sets available User Themes |
Method Details
addUserTheme
Adds a User Theme to State
addUserTheme(theme: AdaptableTheme): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| theme | AdaptableTheme |
Returns
void
applyCurrentTheme
Applies the Current Theme
applyCurrentTheme(): void;Returns
void
deleteUserTheme
Deletes a User Theme from State
deleteUserTheme(theme: AdaptableTheme): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| theme | AdaptableTheme |
Returns
void
editTheme
Edits an existing theme
editTheme(theme: AdaptableTheme): void;Parameters
| Parameter | Type |
|---|---|
| theme | AdaptableTheme |
Returns
void
getCurrentTheme
Retrieves name of Current Theme
getCurrentTheme(): string;Returns
string
getCurrentThemeObject
Retrieves the current theme object
getCurrentThemeObject(): AdaptableTheme;Returns
getSystemThemes
Retrieves System Themes in State
getSystemThemes(): AdaptableTheme[];Returns
getThemeByName
Retrieves a Theme by name
getThemeByName(themeName: string): AdaptableTheme;Parameters
| Parameter | Type | Description |
|---|---|---|
| themeName | string |
Returns
getThemes
Retrieves all Themes (both System & User) in State
getThemes(): AdaptableTheme[];Returns
getThemeState
Retrieves Theme section from Adaptable State
getThemeState(): ThemeState;Returns
getUserThemes
Retrieves User Themes in State
getUserThemes(): AdaptableTheme[];Returns
loadDarkTheme
Sets AdapTable Dark Theme - updates the AG Grid theme to match
loadDarkTheme(): void;Returns
void
loadLightTheme
Sets AdapTable Light Theme - updates the AG Grid theme to match
loadLightTheme(): void;Returns
void
loadTheme
Sets Adaptable to use a given theme
loadTheme(theme: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| theme | string | name of theme to apply |
Returns
void
openThemeSettingsPanel
Opens Settings Panel with Theme section selected and visible
openThemeSettingsPanel(): void;Returns
void
setSystemThemes
Sets available System Themes; if empty array is passed none will be
setSystemThemes(systemThemes: AdaptableTheme[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| systemThemes | AdaptableTheme[] | system themes to use ('light', 'dark', both, or none) |
Returns
void
setUserThemes
Sets available User Themes
setUserThemes(userThemes: AdaptableTheme[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| userThemes | AdaptableTheme[] | User themes to set - each has name, description |
Returns
void