Monster.Components.Host. ConfigManager

The Config Manager component is used to encapsulate the configuration of the application.

Dependencies: the system uses functions of the monsterjs library

You can create this control either by specifying the HTML tagdirectly in the HTML or using Javascript via thedocument.createElement('monster-host');` method.

<monster-config-manager></monster-config-manager>

Or you can create this CustomControl directly in Javascript:

import '@schukai/component-state/source/config-manager.mjs';
document.createElement('monster-config-manager');

The Body should have a class "hidden" to ensure that the styles are applied correctly.

body.hidden {
   visibility: hidden;
}

Constructor

new ConfigManager()

A config manager component

Members

defaults

To set the options via the html tag the attribute data-monster-options must be used.

To set the options via the html tag the attribute data-monster-options must be used.

Properties
NameTypeDescription
templatesObject

Template definitions

Properties
NameTypeDescription
mainstring

Main template

See

(static) instanceSymbol

This method is called by the instanceof operator.

This method is called by the instanceof operator.

Methods

assembleMethodSymbol() → {Monster.Components.Host.Host}

getConfig(key) → {Promise.<unknown>}

Parameters:
NameTypeDescription
keystring
Returns:
Type: 
Promise.<unknown>

hasConfig(key) → {Promise.<boolean>}

Parameters:
NameTypeDescription
keystring
Returns:
Type: 
Promise.<boolean>

ready() → {Promise}

Returns:
Type: 
Promise

setConfig(key, value) → {Promise.<unknown>}

Parameters:
NameTypeDescription
keystring
value*
Returns:
Type: 
Promise.<unknown>

(static) getCSSStyleSheet() → {Array.<CSSStyleSheet>}

Returns:
Type: 
Array.<CSSStyleSheet>

(static) getTag() → {string}

Returns:
Type: 
string