ve.Component: Components represent inputs and displays that yield a value via .v. They are typically encapsulated by a ve.Feature, but can be manually mounted via bind(arg0_container_el:HTMLElement).
Constructor:
arg0_options: Object- All bindings accept 'this'/'global'/'window' variables. Bindings propagate recursively upwards (i.e. a userchange at a lower level will register as a userchange in an upper level).
.binding: string - Related event:.onchange. Bidirectional data binding for both.from_binding/.to_binding..from_binding: string - Related event:.onprogramchange. Unidirectional data binding..to_binding: string - Related event:.onuserchange. Unidirectional data binding..onchange: function(this.v, this:ve.Component).onprogramchange: function(this.v, this:ve.Component).onuserchange: function(this.v, this:ve.Component).attributes: Object - Any attributes to place on the mountedthis.element.<attribute_key>: string
.limit=true: function(this.v)|undefined | boolean - Whether to display the current Component. Immediate mode..onload: function(this:ve.Component).tooltip: Object<ve.Component>|string.style: Object - The CSS/Telestyle object to use for the current element. Immediate mode CSS if function is declared.<selector_key>: string - CSS query selector. :nth-parent() is acceptable.<css_property>: function|string
<css_property>: function|string
DOM:
.instance: this:ve.Component
Instance:
.child_class=this.constructor: ve.Component - The constructor object of the child class..is_vercengen_component=true: boolean - Whether to mark this ve.Component as a Vercengen component..parent_el: HTMLElement - The parent element of the current component, should it exist..height=1: number.width=1: number.x=0: number - Switches to an n+1 default if only.yis defined..y=n + 1: number - Switches to 0 if only.xis defined.- The linter/engine guarantees the following fields:
.element: HTMLElement - The HTMLElement that the ve.Component is mounted to..name: string - The name to display for the current ve.Component..owner: any - The root owner of the current ve.Component. This is typically a ve.Class, but can also be a ve.Feature or global/window..owners: Array<any> - A list of relevant owners in descending orders..v: any - The value stored by the component. Getter/setter.
Methods:
- addComponent() - Attempts to mount the current component on its parent_el.
- bind(arg0_container_el:HTMLElement) - Manually mounts the current component to arg0_container_el.
- fireFromBinding() - Pseudo-setter from binding. Fires only upon program-driven changes to
.vdirectly. - fireToBinding() - Pseudo-setter to binding. Fires only upon user-driven changes to
.v. - remove() - Removes the component/element from the DOM.
- removeComponent() - Unmounts the current component from its parent_el.
- setOwner(arg0_value:Object, arg1_owner_array=[]:Array<Object>) - Used by the reflection engine in ve.Class to set the owner hierarchy automatically.
Static Methods:
- linter() - Run at startup if ve.debug_mode is true. Lints all Vercengen components.
Types:
Types are annotated by both their constructor function and what they return after the pipe separator (.v).
* indicates a recursive Object of that type.
-
veFileExplorer(arg0_value:string, arg1_options:Object) | string - The file path the File Explorer is currently navigating.
-
veHierarchy(arg0_value:Object<ve.Component>, arg1_options:Object) | Object<ve.Component> - Note. It is recommended to use ve.HierarchyDatatype as the specific ve.Component for
arg0_value.- veHierarchyDatatype(Object<ve.Component>, arg1_options:Object) | Object<ve.Component> - Represents individual items in a hierarchy.
-
veBIUF(arg0_value:string, arg1_options:Object) | string - Single-line rich text input.
.vis an HTML string. -
veButton(arg0_value:function, arg1_options:Object) | function
-
veCheckbox(arg0_value:boolean|Object<boolean>*, arg1_options: Object) | boolean|Object<boolean>* - A recursive list of checkboxes, or a single toggleable input.
-
veColour(arg0_value:Array<number, number, number|string, arg1_options: Object>) | Array<number, number, number> - RGB colour selector.
-
veDatalist(arg0_value:Object<string>, arg1_options: Object)
-
veDateLength(arg0_value:UF.Date, arg1_options: Object) | UF.Date
-
veFile(arg0_value:string, arg1_options:Object) | string - The file/folder path selected by the user.
-
veHTML(arg0_value:function|HTMLElement|string, arg1_options: Object) | string
-
veInterface(arg0_value:Object<ve.Component>, arg1_options:Object) | Object<ve.Component>
-
veMap(arg0_value:maptalks.Map, arg1_options:Object) | maptalks.Map
-
vePageMenu(arg0_value:Object, arg1_options:Object) | string - The
.pagekey currently displayed. -
vePassword(arg0_value:string, arg1_options:Object) | string
-
veRawInterface(arg0_components_obj:Object<ve.Component>, arg1_options:Object) | Object<ve.Component>
-
veSelect(arg0_value:ve.Object<string>, arg1_options:Object) | string - The key of the selected option.
-
veTelephone(arg0_value:string, arg1_options:Object) | string
-
veTime(arg0_value:{hour:number, minute:number}, arg1_options:Object) | {hour:number, minute:number}
-
veUndoRedo(arg0_value:string, arg1_options:Object) | string - The DALS.Timeline ID that the UndoRedo component is currently navigating.
Classes
- ve.Button
- ve.Checkbox
- ve.Colour
- ve.Datalist
- ve.Date
- ve.DateLength
- ve.File
- ve.FileExplorer
- ve.HTML
- ve.Hierarchy
- ve.HierarchyDatatype
- ve.Interface
- ve.Map
- ve.Number
- ve.PageMenu
- ve.Password
- ve.Radio
- ve.Range
- ve.RawInterface
- ve.Select
- ve.Telephone
- ve.Text
- ve.Time
- ve.Toggle
- ve.URL
- ve.WYSIWYG
Members
from_binding
Internal .from_binding setter for handling .options.from_binding. Accepts a string literal that is then parsed to a variable reference.
.to_binding counterparts are manually handled child-side.
- Accessor of: ve.Component
limit
Tests the current this.limit by calling this.limit_function(this.v, this). Otherwise resolves to true if no .options.limit is set.
- Accessor of: ve.Component
limit
Sets the present this.limit or clears it (if undefined). Calls this.limit_function(this.v, this) when polled.
- Accessor of: ve.Component
name
Returns the visual name of the present ve.Component,
- Accessor of: ve.Component
name
Sets the visual name of the present ve.Component
- Accessor of: ve.Component
Methods
addComponent()
Adds the current component to this.parent_el should it exist.
- Method of: ve.Component
bind(arg0_container_el)
Manually binds/mounts the present ve.Component into the visual DOM.
- Method of: ve.Component
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_container_el |
HTMLElement
|
fireFromBinding()
Pseudo-setter from binding. Fires only upon program-driven changes to .v directly, which means that this has to be monitored manually component-side in set v(). This should always come last in set v().
- Method of: ve.Component
fireToBinding()
Pseudo-setter to binding. Fires only upon user-driven changes, which means that this has to be monitored manually component-side.
- Method of: ve.Component
remove()
Removes the component/element from the DOM.
- Method of: ve.Component
removeComponent()
Removes the current component from this.parent_el should it exist.
- Method of: ve.Component
setOwner(arg0_value, arg1_owner_array)
Sets the root parent and ownership tree. Influences this.parent_el, this.owner, this.owners.
- Method of: ve.Component
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_value |
||
arg1_owner_array |
(static) linter()
Runs over all Vercengen components that extend ve.Component and lints them in addition to declaring ve[local_key]() as a functional binding for each.
- Static method of: ve.Component
Ensures the following properties if ve.debug_mode=true:
- get v()/set v()
- Not a duplicate component