Reference Source
public class | source

Table

Extends:

js/base/component/rendered_dom.js~RenderedDomBoundDomStatedDomComponentContainer → Table

Constructor Summary

Public Constructor
public

constructor(arg_runtime: object, arg_state: object, arg_log_context: string): nothing

Creates an instance of Table.

Member Summary

Public Members
public
Private Members
private

Method Summary

Public Methods
public

build_cell(arg_cell_value: any, arg_row_index: integer, arg_column_index: integer, arg_document: Document): Element

Build a row cell DOM element.

public

build_row(arg_row_array: array, arg_row_index: integer, arg_max_cols: integer, arg_depth: integer): Element

Build a table row DOM element.

public

delete_row_elem(arg_rows_array: array): Element

Delete table rows DOM elements.

public

Get view children components.

public

process_row_array(arg_body_element: Element, arg_row_array: array, arg_row_index: integer, arg_max_rows: integer, arg_max_cols: integer, arg_mode: string, arg_max_rows_action: string, arg_depth: integer): Element

Build a table row DOM element.

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_get_count(): nothing

Get container items count.

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 a row at given position.

public

Remove a row at first position.

public

ui_items_remove_last(arg_count: integer): nothing

Remove a row at last position.

public

ui_items_replace(arg_items_array: array, arg_items_count: intege): nothing

Replace container items.

public

update_rows(arg_rows_array: array, arg_options: object): nothing

Append or prepend a row.

public

update_section_collection(arg_collection_def: object, arg_collection_values: object): nothing

Update values on a table part.

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(): *

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.

From class Container
public
public
public
public
public
public
public
public
private
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

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

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(arg_state: Immutable.Map | undefined): nothing

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

Remove a item at first position.

public

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.

Public Constructors

public constructor(arg_runtime: object, arg_state: object, arg_log_context: string): nothing source

Creates an instance of Table.

Override:

Container#constructor

Params:

NameTypeAttributeDescription
arg_runtime object

client runtime.

arg_state object

component state.

arg_log_context string

context of traces of this instance (optional).

API: ->get_children_component():array - Get view children components.

    ->ui_items_get_count():integer - Get container items count.

    ->ui_items_append(arg_items_array, arg_items_count):nothing  - Append tems to the container.
    ->ui_items_prepend(arg_items_array, arg_items_count):nothing - Prepend tems to the container.
    ->ui_items_insert_at(arg_index, arg_items_array, arg_items_count):nothing - Insert items at container position index.
    ->ui_items_replace(arg_items_array, arg_items_count):nothing - Replace container items.

    ->ui_items_remove_at_index(arg_index):nothing - Remove a row at given position.
    ->ui_items_remove_first():nothing - Remove a row at first position.
    ->ui_items_remove_last(arg_count):nothing - Remove a row at last position.

    ->build_row(arg_row_array, arg_row_index, arg_max_cols):string - Build a table row html tag.
    ->update_rows(arg_rows_array, arg_options):nothing - Append or prepend a row.
    ->update_section_collection(arg_collection_def, arg_collection_values):nothing - Update values on a table part.

Return:

nothing

Public Members

public is_table_component: boolean source

Private Members

private _children_component: *[] source

Public Methods

public build_cell(arg_cell_value: any, arg_row_index: integer, arg_column_index: integer, arg_document: Document): Element source

Build a row cell DOM element.

Params:

NameTypeAttributeDescription
arg_cell_value any

cell value.

arg_row_index integer

row index.

arg_column_index integer

column index.

arg_document Document

DOM document.

Return:

Element

TD DOM Element.

public build_row(arg_row_array: array, arg_row_index: integer, arg_max_cols: integer, arg_depth: integer): Element source

Build a table row DOM element.

Params:

NameTypeAttributeDescription
arg_row_array array

row values array.

arg_row_index integer

row index.

arg_max_cols integer

max columns number.

arg_depth integer

path depth.

Return:

Element

TD DOM Element.

public delete_row_elem(arg_rows_array: array): Element source

Delete table rows DOM elements.

Params:

NameTypeAttributeDescription
arg_rows_array array

rows Element array.

Return:

Element

TD DOM Element.

public get_children_component(): array source

Get view children components.

Override:

StatedDom#get_children_component

Return:

array

list of Component.

public process_row_array(arg_body_element: Element, arg_row_array: array, arg_row_index: integer, arg_max_rows: integer, arg_max_cols: integer, arg_mode: string, arg_max_rows_action: string, arg_depth: integer): Element source

Build a table row DOM element.

Params:

NameTypeAttributeDescription
arg_body_element Element

table body element.

arg_row_array array

row values array.

arg_row_index integer

row index.

arg_max_rows integer

max rows number.

arg_max_cols integer

max columns number.

arg_mode string

fill mode:append/prepend

arg_max_rows_action string

action on max rows.

arg_depth integer

path depth.

Return:

Element

TD DOM Element.

public ui_items_append(arg_items_array: array, arg_items_count: intege): nothing source

Append items to the container.

Override:

Container#ui_items_append

Params:

NameTypeAttributeDescription
arg_items_array array

items array.

arg_items_count intege

items count.

Return:

nothing

public ui_items_clear(): nothing source

Erase container items.

Override:

Container#ui_items_clear

Return:

nothing

public ui_items_get_count(): nothing source

Get container items count.

Override:

Container#ui_items_get_count

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.

Override:

Container#ui_items_insert_at

Params:

NameTypeAttributeDescription
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.

Override:

Container#ui_items_prepend

Params:

NameTypeAttributeDescription
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 a row at given position.

Override:

Container#ui_items_remove_at_index

Params:

NameTypeAttributeDescription
arg_index number

row index.

Return:

nothing

public ui_items_remove_first(): nothing source

Remove a row at first position.

Override:

Container#ui_items_remove_first

Return:

nothing

public ui_items_remove_last(arg_count: integer): nothing source

Remove a row at last position.

Override:

Container#ui_items_remove_last

Params:

NameTypeAttributeDescription
arg_count integer

items count to remove.

Return:

nothing

public ui_items_replace(arg_items_array: array, arg_items_count: intege): nothing source

Replace container items.

Override:

Container#ui_items_replace

Params:

NameTypeAttributeDescription
arg_items_array array

items array.

arg_items_count intege

items count.

Return:

nothing

public update_rows(arg_rows_array: array, arg_options: object): nothing source

Append or prepend a row.

Params:

NameTypeAttributeDescription
arg_rows_array array

rows array.

arg_options object

operation settigs (optional).

Return:

nothing

public update_section_collection(arg_collection_def: object, arg_collection_values: object): nothing source

Update values on a table part.

Params:

NameTypeAttributeDescription
arg_collection_def object

plain object map of collection definition ({collection_name:"", collection_dom_id:""}.

arg_collection_values object

plain object map of collection key/value pairs.

Return:

nothing