Reference Source
public class | source

Component

Extends:

js/base/component/rendered_dom.js~RenderedDomBoundDomStatedDom → Component

Constructor Summary

Public Constructor
public

constructor(arg_runtime: RuntimeBase, arg_state: Immutable.Map, arg_log_context: string): nothing

Creates an instance of Component.

Member Summary

Public Members
public

Method Summary

Public Methods
public

Get component content value object.

public

Get component size.

public

Get component content value string.

public

resize(arg_width: any, arg_height: any): nothing

Resize component.

public

set_object_value(arg_value: object): nothing

Set component content value object

public

set_text_value(arg_value: string): nothing

Set component content value string.

public

Update component size with its content.

Inherited Summary

From class BoundDom
public
public
private

_bindings: {}

private
public

init_bindings(): nothing

Init bindings.

public

load(arg_state: Immutable.Map | undefined): nothing | Promise

Load and apply a component configuration.

public

unload(): nothing

Unload a component configuration.

From class StatedDom
public
private
private
private
public

Clear component to initial values.

public

dispatch_update_state_action(arg_new_state: Immutable.Map): nothing

Dispatch update state action.

public

dispatch_update_state_value_action(arg_path: array | string, arg_value: any): nothing

Dispatch update state action.

public

Get view children components.

public

get_named_stream(arg_stream_name: string): Stream | undefined

Get a named stream.

public

Render a component inside this element from a json description.

public

register_from_json(arg_options: object): nothing

Register a component description from a json content.

public

render_inside_from_json(arg_name: string, arg_json_desc: object): nothing

Render a component inside this element from a json description.

public

Update view with current state.

public

Update view with current state.

private

_update(): *

Public Constructors

public constructor(arg_runtime: RuntimeBase, arg_state: Immutable.Map, arg_log_context: string): nothing source

Creates an instance of Component.

Override:

StatedDom#constructor

Params:

NameTypeAttributeDescription
arg_runtime RuntimeBase

client runtime.

arg_state Immutable.Map

component initial state.

arg_log_context string

context of traces of this instance (optional).

Return:

nothing

Public Members

public is_component: boolean source

Public Methods

public get_object_value(): object source

Get component content value object.

Return:

object

public get_size(): object source

Get component size.

Return:

object

size object { width:integer, height:integer }

public get_text_value(): string source

Get component content value string.

Return:

string

public resize(arg_width: any, arg_height: any): nothing source

Resize component.

Params:

NameTypeAttributeDescription
arg_width any

css width value.

arg_height any

css height value.

Return:

nothing

public set_object_value(arg_value: object): nothing source

Set component content value object

Params:

NameTypeAttributeDescription
arg_value object

component values object.

Return:

nothing

public set_text_value(arg_value: string): nothing source

Set component content value string.

Params:

NameTypeAttributeDescription
arg_value string

component values string.

Return:

nothing

public update_size(): object source

Update component size with its content.

Return:

object

size object { width:integer, height:integer }