ve.Hierarchy

ve.Component. ve.Hierarchy

Refer to ve.Component for methods or fields inherited from this Component's parent such as .options.attributes or .element.

Hierarchy used for organising both nested and un-nested lists via item/group distinctions.

  • Functional binding: veHierarchy().
Constructor:
  • arg0_components_obj: Object<ve.Component|ve.HierarchyDatatype> - The individual items to append to the current hierarchy.
  • arg1_options: Object
    • .allow_disabled_reordering=false: boolean
    • .disable_searchbar=false: boolean
    • .namespace=Class.generateRandomID(ve.Hierarchy): string
    • .searchbar_style: Object - The Telestyle object to apply to the searchbar.
Instance:
Methods:

Extends

Members

v

Sets the current this.components_obj displayed in the hierarchy.

  • Accessor of ve.Hierarchy
Source:

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.

Overrides:
Source:

limit

Tests the current this.limit by calling this.limit_function(this.v, this). Otherwise resolves to true if no .options.limit is set.

Overrides:
Source:

name

Returns the visual name of the present ve.Component,

Overrides:
Source:

Methods

_handleDisabledOrdering(arg0_e)

Prevents placing items before disabled elements.

  • Private method of: ve.Hierarchy
Source:
Parameters:
Name Type Description
arg0_e Object

addItem(arg0_parent_el, arg1_hierarchy_datatype)

Appends the associated hierarchy datatype to the hierarchy.

  • Method of: ve.Hierarchy
Source:
Parameters:
Name Type Description
arg0_parent_el HTMLElement
arg1_hierarchy_datatype ve.HierarchyDatatype

getHierarchyArray(arg0_optionsopt) → {Array.<Object>}

Returns a flat array representative of the items in the hierarchy, ordered top to bottom.

  • Method of: ve.Hierarchy
Source:
Parameters:
Name Type Attributes Description
arg0_options Object <optional>
Name Type Attributes Default Description
flatten_object boolean <optional>
false

Whether the object should be flattened, returning only serialisable JSON keys.

Returns:
Type:
Array.<Object>

getHierarchyObject(arg0_optionsopt) → {Object}

Returns an object representative of the items in the hierarchy.

  • Method of: ve.Hierarchy
Source:
Parameters:
Name Type Attributes Description
arg0_options Object <optional>
Name Type Attributes Default Description
flatten_object boolean <optional>
false

Whether the object should be flattened, returning only serialisable JSON keys.

Returns:
Type:
Object

removeItem(arg0_hierarchy_datatype)

Removes the associated hierarchy datatype from the hierarchy.

  • Method of: ve.Hierarchy
Source:
Parameters:
Name Type Description
arg0_hierarchy_datatype ve.HierarchyDatatype

updateSearchFilter(arg0_name)

Updates the current search filter based on the inputted query. Ignores .options.disabled=true fields, since they are likely kept at the top as action menus.

  • Method of: ve.Hierarchy
Source:
Parameters:
Name Type Description
arg0_name string

addComponent()

Adds the current component to this.parent_el should it exist.

Overrides:
Source:

bind(arg0_container_el)

Manually binds/mounts the present ve.Component into the visual DOM.

Overrides:
Source:
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().

Overrides:
Source:

fireToBinding()

Pseudo-setter to binding. Fires only upon user-driven changes, which means that this has to be monitored manually component-side.

Overrides:
Source:

remove()

Removes the component/element from the DOM.

Overrides:
Source:

removeComponent()

Removes the current component from this.parent_el should it exist.

Overrides:
Source:

setOwner(arg0_value, arg1_owner_array)

Sets the root parent and ownership tree. Influences this.parent_el, this.owner, this.owners.

Overrides:
Source:
Parameters:
Name Type Description
arg0_value
arg1_owner_array

setValueFromObject(arg0_object, arg1_object)

Destructures Object values and transfers them into the .v instance fields of each Vercengen component.

Overrides:
Source:
Parameters:
Name Type Description
arg0_object Object

The Vercengen object to transfer to.

arg1_object Object

The other object to transfer from.