Container
Extends:
Indirect Subclass:
Constructor Summary
Public Constructor | ||
public |
constructor(arg_runtime: object, arg_state: object, arg_log_context: string): nothing Creates an instance of Container. |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
max_size: * |
|
public |
|
|
public |
strategy: * |
|
public |
|
|
public |
|
|
public |
|
Private Members | ||
private |
|
Method Summary
Public Methods | ||
public |
do_action_append(arg_items_array: array, arg_items_count: intege): nothing Append items to the container (an item can be a string or an array or an object or ...). |
|
public |
do_action_clear_items(): nothing Clear container items. |
|
public |
do_action_insert_at(arg_index: intege, arg_items_array: array, arg_items_count: intege): nothing Insert items at container position index (an item can be a string or an array or an object or ...). |
|
public |
do_action_prepend(arg_items_array: array, arg_items_count: intege): nothing Prepend items to the container (an item can be a string or an array or an object or ...). |
|
public |
do_action_remove_at_index(arg_index: number): nothing Remove an item at given position. |
|
public |
do_action_remove_first(): nothing Remove an item at first position. |
|
public |
do_action_remove_last(arg_count: number): nothing Remove an item at last position. |
|
public |
do_action_replace(arg_items_array: array, arg_items_count: intege): nothing Replace items to the container (an item can be a string or an array or an object or ...). |
|
public |
do_action_set_resize_max(arg_value: integer): nothing Set max items value for the container. |
|
public |
handle_state_change(arg_previous_state: Immutable.Map, arg_new_state: Immutable.Map): nothing Handle component state changes. |
|
public |
handle_state_change_action(arg_action: object, arg_previous_state: Immutable.Map, arg_new_state: Immutable.Map): nothing Handle component state changes action. |
|
public |
hide(): nothing Hide component. |
|
public |
Load and apply a container component configuration. |
|
public |
reduce_action(arg_previous_state: Immutable.Map, arg_action: object): Immutable.Map Store actions reducer pure function. |
|
public |
show(): nothing Show component. |
|
public |
ui_items_append(arg_items_array: array, arg_items_count: intege): nothing Append items to the container. |
|
public |
ui_items_clear(): nothing Erase container items. |
|
public |
ui_items_filter(arg_selector: string, arg_filter_text: string): nothing Toggle items visibility belonging a given filter. |
|
public |
ui_items_get_count(): integer Get container items count. |
|
public |
ui_items_hide_item(arg_element: Element): nothing Hide an element. |
|
public |
ui_items_insert_at(arg_index: intege, arg_items_array: array, arg_items_count: intege): nothing Insert items at container position index. |
|
public |
ui_items_prepend(arg_items_array: array, arg_items_count: intege): nothing Prepend items to the container. |
|
public |
ui_items_remove_at_index(arg_index: number): nothing Remove an item at given position. |
|
public |
ui_items_remove_first(): nothing Remove a item at first position. |
|
public |
ui_items_remove_last(): nothing Remove an item at last position. |
|
public |
ui_items_replace(arg_items_array: array, arg_items_count: intege): nothing Replace container items. |
|
public |
ui_items_show_item(arg_element: Element): nothing Show an element. |
Inherited Summary
From class BoundDom | ||
public |
|
|
public |
|
|
private |
_bindings: {} |
|
private |
|
|
public |
init_bindings(): nothing Init bindings. |
|
public |
Load and apply a component configuration. |
|
public |
unload(): nothing Unload a component configuration. |
From class StatedDom | ||
public |
|
|
private |
|
|
private |
_dom_element: * |
|
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_children_component(): array Get view children components. |
|
public |
get_named_stream(arg_stream_name: string): Stream | undefined Get a named stream. |
|
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_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(): * |
From class Component | ||
public |
|
|
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. |
Public Constructors
public constructor(arg_runtime: object, arg_state: object, arg_log_context: string): nothing source
Creates an instance of Container. A Container contains other Components through the 'children' property.
Override:
Component#constructorReturn:
nothing |
Public Members
public max_size: * source
public strategy: * source
public strategy_resize_state: * source
public strategy_resize_ui: * source
public strategy_update: * source
Private Members
Public Methods
public do_action_append(arg_items_array: array, arg_items_count: intege): nothing source
Append items to the container (an item can be a string or an array or an object or ...).
Params:
Name | Type | Attribute | Description |
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public do_action_insert_at(arg_index: intege, arg_items_array: array, arg_items_count: intege): nothing source
Insert items at container position index (an item can be a string or an array or an object or ...).
Params:
Name | Type | Attribute | Description |
arg_index | intege | position index. |
|
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public do_action_prepend(arg_items_array: array, arg_items_count: intege): nothing source
Prepend items to the container (an item can be a string or an array or an object or ...).
Params:
Name | Type | Attribute | Description |
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public do_action_remove_at_index(arg_index: number): nothing source
Remove an item at given position.
Params:
Name | Type | Attribute | Description |
arg_index | number | item index. |
Return:
nothing |
public do_action_remove_last(arg_count: number): nothing source
Remove an item at last position.
Params:
Name | Type | Attribute | Description |
arg_count | number | items count. |
Return:
nothing |
public do_action_replace(arg_items_array: array, arg_items_count: intege): nothing source
Replace items to the container (an item can be a string or an array or an object or ...).
Params:
Name | Type | Attribute | Description |
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public do_action_set_resize_max(arg_value: integer): nothing source
Set max items value for the container.
Params:
Name | Type | Attribute | Description |
arg_value | integer | max items value. |
Return:
nothing |
public handle_state_change(arg_previous_state: Immutable.Map, arg_new_state: Immutable.Map): nothing source
Handle component state changes.
Params:
Name | Type | Attribute | Description |
arg_previous_state | Immutable.Map | previous state map. |
|
arg_new_state | Immutable.Map | new state map. |
Return:
nothing |
public handle_state_change_action(arg_action: object, arg_previous_state: Immutable.Map, arg_new_state: Immutable.Map): nothing source
Handle component state changes action.
Params:
Name | Type | Attribute | Description |
arg_action | object | state change action |
|
arg_previous_state | Immutable.Map | previous state map. |
|
arg_new_state | Immutable.Map | new state map. |
Return:
nothing |
public load(arg_state: Immutable.Map | undefined): nothing source
Load and apply a container component configuration.
Override:
BoundDom#loadParams:
Name | Type | Attribute | Description |
arg_state | Immutable.Map | undefined | component state to load (optional). |
Return:
nothing |
public reduce_action(arg_previous_state: Immutable.Map, arg_action: object): Immutable.Map source
Store actions reducer pure function.
Params:
Name | Type | Attribute | Description |
arg_previous_state | Immutable.Map | previous state. |
|
arg_action | object | store action: { type:'', component:'', ...} |
Return:
Immutable.Map | new state |
public ui_items_append(arg_items_array: array, arg_items_count: intege): nothing source
Append items to the container.
Params:
Name | Type | Attribute | Description |
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public ui_items_filter(arg_selector: string, arg_filter_text: string): nothing source
Toggle items visibility belonging a given filter.
Return:
nothing |
public ui_items_hide_item(arg_element: Element): nothing source
Hide an element.
Params:
Name | Type | Attribute | Description |
arg_element | Element | DOM element to hide. |
Return:
nothing |
public ui_items_insert_at(arg_index: intege, arg_items_array: array, arg_items_count: intege): nothing source
Insert items at container position index.
Params:
Name | Type | Attribute | Description |
arg_index | intege | position index. |
|
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public ui_items_prepend(arg_items_array: array, arg_items_count: intege): nothing source
Prepend items to the container.
Params:
Name | Type | Attribute | Description |
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public ui_items_remove_at_index(arg_index: number): nothing source
Remove an item at given position.
Params:
Name | Type | Attribute | Description |
arg_index | number | item index. |
Return:
nothing |
public ui_items_replace(arg_items_array: array, arg_items_count: intege): nothing source
Replace container items.
Params:
Name | Type | Attribute | Description |
arg_items_array | array | items array. |
|
arg_items_count | intege | items count. |
Return:
nothing |
public ui_items_show_item(arg_element: Element): nothing source
Show an element.
Params:
Name | Type | Attribute | Description |
arg_element | Element | DOM element to hide. |
Return:
nothing |