import Component from 'devapt-core-browser/js/base/component/unused_component.js'
Component
Extends:
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 |
|
|
public |
|
|
public |
|
|
public |
saved_dom: {"body_overflow": *, "className": *, "style": *} |
|
public |
|
Private Members | ||
private |
_assets_dependancies: *[] |
|
private |
|
|
private |
_bindings: {} |
|
private |
|
|
private |
_dom_element: * |
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
add_assets_dependancy(arg_asset_id: string): nothing Add assets dependancy. |
|
public |
Clear component to initial values. |
|
public |
collapse_from_fullscreen(): nothing Collapse component from fullscreen to original size. |
|
public |
Destroy component DOM element. |
|
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 |
expand_to_fullscreen(): nothing Expand component to fullscreen (inside browser window). |
|
public |
get_assets_dependancies(): array Get assets dependancies. |
|
public |
Get assets promises. |
|
public |
get_children_component(): array Get view children components. |
|
public |
get_named_stream(arg_stream_name: string): Stream | undefined Get a named stream. |
|
public |
Get component content value object. |
|
public |
Get component content value string. |
|
public |
init_assets(): nothing Init assets promises. |
|
public |
init_bindings(): nothing Init bindings. |
|
public |
Load and apply a component configuration. |
|
public |
process_rendering_vnode(arg_rendering_result: *, arg_credentials: *) PROCESS RENDERING VNODE: CREATE OR UPDATE DOM ELEMENT. |
|
public |
register_and_render_inside_from_json(arg_options: object): nothing 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 component DOM element. |
|
public |
render_inside_from_json(arg_name: string, arg_json_desc: object): nothing Render a component inside this element from a json description. |
|
public |
resize(arg_width: any, arg_height: any): nothing Resize component. |
|
public |
restore_(): nothing Toggle component fullscreen mode. |
|
public |
save_(): nothing Toggle component fullscreen mode. |
|
public |
save_rendering(): nothing Save rendering virtul node. |
|
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 |
toggle_from_fullscreen(): nothing Toggle component fullscreen mode. |
|
public |
unload(): nothing Unload a component configuration. |
|
public |
Update view with current state. |
|
public |
Update view with current state. |
Private Methods | ||
private |
_render(arg_force: *): * |
|
private |
_update(): * |
Inherited Summary
From class Dom | ||
public |
|
|
private |
|
|
private |
_name: * |
|
private |
_rendering: * |
|
private |
_visiblility: * |
|
public |
clear_dom_text(): nothing DOM element manipulation:clear dom element text value. |
|
public |
clear_dom_value(): nothing DOM element manipulation:clear dom element value. |
|
public |
get_dom_attr(arg_attr_name: string): string DOM element manipulation:get dom element attribute. |
|
public |
get_dom_element(): Element Get DOM element. |
|
public |
get_dom_id(): string Get DOM id. |
|
public |
get_dom_parent(): Element Get parent element. |
|
public |
DOM element manipulation:get dom element text. |
|
public |
DOM element manipulation:get dom element value. |
|
public |
get_dom_vnode(): VNode Get DOM Virtual Node. |
|
public |
Get name. |
|
public |
Test DOM Element instance. |
|
public |
has_dom_parent(arg_element: Element): boolean Test if component element has given parent element. |
|
public |
Test DOM Virtual Node. |
|
public |
hide(): nothing Hide component. |
|
public |
is_visible(arg_check: boolean): boolean Get visibility. |
|
public |
on_dom_event(arg_dom_event: *, arg_dom_selector: *, arg_handler: *, arg_data: *, arg_debug: boolean): nothing Mount dom event handler. |
|
public |
set_dom_attr(arg_attr_name: string, arg_attr_value: string): nothing DOM element manipulation:set dom element attribute value. |
|
public |
set_dom_element(arg_element: Element): nothing Set DOM element. |
|
public |
set_dom_parent(arg_parent_element: Element): nothing Set given parent element. |
|
public |
set_dom_parent_of(arg_component: Component): nothing Set given parent element. |
|
public |
set_dom_text(arg_text_value: string): nothing DOM element manipulation:set dom element text value. |
|
public |
set_dom_value(arg_value: string): nothing DOM element manipulation:set dom element value. |
|
public |
set_dom_vnode(arg_vnode: VNode): nothing Set DOM Virtual Node. |
|
public |
show(): nothing Show component. |
|
public |
toggle(): nothing Toggle component visbility. |
|
private |
_get_dom_text(arg_element: *): * |
Public Constructors
public constructor(arg_runtime: RuntimeBase, arg_state: Immutable.Map, arg_log_context: string): nothing source
Creates an instance of Component.
Override:
Dom#constructorParams:
Name | Type | Attribute | Description |
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 saved_dom: {"body_overflow": *, "className": *, "style": *} source
public store_unsubscribe: * source
Private Members
private _assets_dependancies: *[] source
private _assets_promise: * source
private _bindings: {} source
private _children_components: * source
private _dom_element: * source
private _ready_promise: * source
Public Methods
public add_assets_dependancy(arg_asset_id: string): nothing source
Add assets dependancy.
Params:
Name | Type | Attribute | Description |
arg_asset_id | string | asset element id. |
Return:
nothing |
public collapse_from_fullscreen(): nothing source
Collapse component from fullscreen to original size.
Return:
nothing |
public dispatch_update_state_action(arg_new_state: Immutable.Map): nothing source
Dispatch update state action.
Params:
Name | Type | Attribute | Description |
arg_new_state | Immutable.Map | new state Immutable Map. |
Return:
nothing |
public dispatch_update_state_value_action(arg_path: array | string, arg_value: any): nothing source
Dispatch update state action.
Params:
Name | Type | Attribute | Description |
arg_path | array | string | component state path. |
|
arg_value | any | component state value. |
Return:
nothing |
public expand_to_fullscreen(): nothing source
Expand component to fullscreen (inside browser window).
Return:
nothing |
public get_children_component(): array source
Get view children components.
Return:
array | list of Component. |
public get_named_stream(arg_stream_name: string): Stream | undefined source
Get a named stream.
Params:
Name | Type | Attribute | Description |
arg_stream_name | string | stream name. |
public load(arg_state: Immutable.Map | undefined): nothing | Promise source
Load and apply a component configuration.
Params:
Name | Type | Attribute | Description |
arg_state | Immutable.Map | undefined | component state to load (optional). |
public process_rendering_vnode(arg_rendering_result: *, arg_credentials: *) source
PROCESS RENDERING VNODE: CREATE OR UPDATE DOM ELEMENT.
Params:
Name | Type | Attribute | Description |
arg_rendering_result | * | ||
arg_credentials | * |
public register_and_render_inside_from_json(arg_options: object): nothing source
Render a component inside this element from a json description.
Params:
Name | Type | Attribute | Description |
arg_options | object | json source configuration. |
Return:
nothing |
public register_from_json(arg_options: object): nothing source
Register a component description from a json content.
Params:
Name | Type | Attribute | Description |
arg_options | object | json source configuration. |
Return:
nothing |
public render(arg_force: boolean): Promise source
Render component DOM element.
Params:
Name | Type | Attribute | Description |
arg_force | boolean | should force creation of a new VNode if a previous rendering exists. |
public render_inside_from_json(arg_name: string, arg_json_desc: object): nothing source
Render a component inside this element from a json description.
Return:
nothing |
public resize(arg_width: any, arg_height: any): nothing source
Resize component.
Params:
Name | Type | Attribute | Description |
arg_width | any | css width value. |
|
arg_height | any | css height value. |
Return:
nothing |
public save_rendering(): nothing source
Save rendering virtul node. Update component VNode with current component HTML.
Return:
nothing |
public set_object_value(arg_value: object): nothing source
Set component content value object
Params:
Name | Type | Attribute | Description |
arg_value | object | component values object. |
Return:
nothing |
public set_text_value(arg_value: string): nothing source
Set component content value string.
Params:
Name | Type | Attribute | Description |
arg_value | string | component values string. |
Return:
nothing |