Constructs a new ConfigurationFactory
Adds the specified action to the eventActions list
Adds the specified action to the initActions list
Adds a label translation with the specified data
The id for the label
The language code associated with the label
The label text in the language specified by the language code
Adds multiple translations with the specified data
The id for the label
A record that holds language code to translations lookups
Adds a language to the availableLanguages list.
The label represents the name of the language.
An error is thrown if a language with the given language code already exists
The given alnguage code
The human readable name of the language
Add a timeline with the given data
identifier for the timeline
animation or mediaplayer
the duration of the timeline in seconds
True if the timeline should automatically restart at the end
css selector for the container where the timeline will be rendered
Adds the given actions to timelineActions list that is associated with the specified uri
Starts the creation of a new action with the specified name that gets added to the actions list
Starts the creation of a new action with the specified name that gets added to the eventActions list
Starts the creation of a new action with the specified name that gets added to the initActions list
Starts the creation of a new action with the specified name that gets added to the timelineActions list that is associated with the specified uri
Starts an editor for the action from the actions list associated with the given id
Starts an editor for the action from the eventActions list associated with the given id
Starts an editor for the action from the initActions list associated with the given id
Starts an editor for the label that is associated with the specified id
Starts an editor for the action from the timelineActions list associated with the given uri and id
Starts an editing process for the timeline provider settings.
Return a copy of the current state of the configuration
OptionalcallBack: (copy: IEngineConfiguration) => IEngineConfigurationthe callback receives the configuration as well and can return a mutated version wich will be assigned to the factory's internal state
Gets the timeline associated with the specified uri
Initialize the configuration with a minimal shape.
It assigns an ID, sets the engine to EligiusEngine, default the containerSelector [data-ct-container=true]
and initializes all of the list properties with empty arrays.
Removes all translations with the given id
the id for the label
Removes the timeline associated with the specified uri
Assign the css selector that specifies the DOM location where the engine renders its output
Assigns the default language
Assigns a string representation of the HTML layout template for the engine.
StaticextendStaticextend
This class offers a fluent, extensible and strongly typed DSL for creating Eligius configurations.
Example: Building a configuration using the factory
To initialize a basic configuration to start off of:
Then to add an init action:
After that, add a timeline action:
It also possible to extend the factory with specialized creation methods for the particular configuration you are building:
Finally, retrieve the configuration and save it:
The
ConfigurationFactorycan also be used to edit an existing configuration. In this case, simply pass the JSON configuration to theConfigurationFactory's constructor: