SiDefaultThemeStore Type documentation¶
TypeScript declaration¶
import { SiDefaultThemeStore } from '@siemens/element-ng/theme'; -
activateTheme
(name: string) => Observable<boolean>¶Sets the theme with the given name to active.
Inherited from SiThemeStore
-
deactivateTheme
() => Observable<boolean>¶Deactivate any active theme and makes the element theme the default one.
Inherited from SiThemeStore
-
deleteTheme
(name: string) => Observable<boolean>¶Deletes the theme with the given name from the store.
Inherited from SiThemeStore
-
loadActiveTheme
() => Observable<Theme | undefined>¶Load and return an alternative custom theme, other then the default element theme. This method is invoked initially to check for an alternative custom theme.
Inherited from SiThemeStore
-
loadTheme
(name: string) => Observable<Theme | undefined>¶Load theme with the given
name.Inherited from SiThemeStore
-
loadThemeNames
() => Observable<string[]>¶Load and return the available theme names.
Inherited from SiThemeStore
-
saveTheme
(theme: Theme) => Observable<boolean>¶Saves a theme to the store. The name shall not be empty. A theme with identical name gets overwritten.
Inherited from SiThemeStore
Types Documentation¶
import { SiThemeStore } from '@siemens/element-ng/theme';SiThemeStore object is used by the theme service to load and store the themes. You can inject your own implementation to provide a backend implementation. Otherwise a localStorage based implementation is used.
-
() => SiThemeStore¶
-
activateTheme
(name: string) => Observable<boolean>¶Sets the theme with the given name to active.
Returns: True on success, otherwise false.
-
deactivateTheme
() => Observable<boolean>¶Deactivate any active theme and makes the element theme the default one.
Returns: True on success, otherwise false.
-
deleteTheme
(name: string) => Observable<boolean>¶Deletes the theme with the given name from the store.
Returns: True on success, otherwise false. All nicely wrapped in an observable that may also emit errors. Returns false, if the theme does not exist.
-
loadActiveTheme
() => Observable<Theme | undefined>¶Load and return an alternative custom theme, other then the default element theme. This method is invoked initially to check for an alternative custom theme.
Returns: The active theme to be used, or undefined if the default element theme shall be used. All wrapped in an observable that can also emit errors.
-
loadTheme
(name: string) => Observable<Theme | undefined>¶Load theme with the given
name.Returns: Observable with the named theme or
undefinedif no such theme exist. -
loadThemeNames
() => Observable<string[]>¶Load and return the available theme names.
Returns: An
Observableof available theme names, other than the default element theme. -
saveTheme
(theme: Theme) => Observable<boolean>¶Saves a theme to the store. The name shall not be empty. A theme with identical name gets overwritten.
Returns: True on success, otherwise false. All nicely wrapped in an observable that may also emit errors.
import type { Theme } from '@siemens/element-ng/theme'; -
A map of icons that overrides the default Element icons. The key must be the key of the original icon that should be overridden. The value has to be a data SVG string.
Example:
{ elementUser: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>...</svg>" }
import type { ThemeColorSchemes } from '@siemens/element-ng/theme'; import type { ThemeColorScheme } from '@siemens/element-ng/theme'; Except where otherwise noted, content on this site is licensed under MIT License.