Class VariableManager
Manages variables in the editor scope.
Package: ui-framework
Properties
editor
A reference to an editor's instance.
Declaration
public editor: AuWizard
Property Value
Type | Description |
---|---|
AuWizard | A reference to an editor's instance. |
variables
An object containing variables for the editor config.
Declaration
public variables: any = null
Property Value
Type | Description |
---|---|
any | An object containing variables for the editor config. |
Methods
append(string, any, boolean)
Appends a new variable to the vars
object or updates an existing variable.
Declaration
function append(name: string, value: any, updateScope: boolean)
Parameters
Type | Name | Description |
---|---|---|
string | name |
The name of the variable. |
any | value |
The value of the variable. |
boolean | updateScope |
If |
Returns
Type | Description |
---|---|
Promise<void> |
appendExpression(string, string)
Appends a new expression to the editor's variables or updates an existing variable. You can use this method when you need to calculate the value of an expression.
Declaration
function appendExpression(name: string, value: string)
Parameters
Type | Name | Description |
---|---|---|
string | name |
The name of the variable. |
string | value |
The expression of the variable. |
Returns
Type | Description |
---|---|
Promise<any> | The calculated value of the expression. |
calculate(string)
Gets a variable by its name and calculates its value.
Declaration
function calculate(name: string)
Parameters
Type | Name | Description |
---|---|---|
string | name |
The variable name. |
Returns
Type | Description |
---|---|
any | The calculated value of the variable. |
calculateAll()
Calculates all the editor's variables.
Declaration
function calculateAll()
Returns
Type | Description |
---|---|
[key: string]: any | A dictionary of calculated variable values. |
init(any)
Initializes the variable manager with the defined editor's variables.
Declaration
function init(initialVars: any)
Parameters
Type | Name | Description |
---|---|---|
any | initialVars |
The |