Reference Source
public class | source

LayoutSimple

Extends:

devapt-core-common/dist/js/base/loggable~LoggableNameTypeSettingsLoggableLayout → LayoutSimple

Constructor Summary

Public Constructor
public

constructor(arg_runtime: object, arg_settings: object, arg_log_context: string | undefined): nothing

Creates an instance of LayoutSimple:a simple layout with a content element which contains a menubar, a breadcrumbs, a separator and a main view.

Member Summary

Public Members
public
public
public
Private Members
private
private

Method Summary

Public Methods
public

get_content_element(): Element

Get page content element.

public

Init page content element.

public

process_rendering_result(arg_rendering_result: RenderingResult, -: array): *

Process a RenderingResult instance.

public

render_page_content(arg_components: object): Promise

Render page content with components names.

public

render_page_content_vnode(arg_vnode: VNode, arg_rendering_result: RenderingResult, arg_credentials: Credentials): array

Render page content with a global VNode.

public

switch(arg_previous_component: Component, arg_target_component_name: string, arg_is_menubar: boolean, arg_is_breadcrumbs: boolean): Promise

Switch previously displayed component with target component.

Inherited Summary

From class NameTypeSettingsLoggable
public
private
private
private

_ui: *

public

Get instance name.

public

Get router.

public

Get runtime.

public

Get instance settings.

public

get_state_store(): Store

Get runtime state store.

public

Get instance type.

public

get_ui(): UI

Get UI.

public

Check if instance settings is valid.

From class Layout
public
public

Clear page content components.

public

Render page content components.

Public Constructors

public constructor(arg_runtime: object, arg_settings: object, arg_log_context: string | undefined): nothing source

Creates an instance of LayoutSimple:a simple layout with a content element which contains a menubar, a breadcrumbs, a separator and a main view.

Override:

Layout#constructor

Params:

NameTypeAttributeDescription
arg_runtime object

runtime.

arg_settings object

instance settings.

arg_log_context string | undefined

context of traces of this instance (optional).

Return:

nothing

Public Members

public is_breadcrumbs: boolean source

public is_menubar: boolean source

public is_simple_layout: boolean source

Private Members

private _content_element: * source

private _content_id: string source

Public Methods

public get_content_element(): Element source

Get page content element.

Return:

Element

public init_content_element(): Element source

Init page content element.

Return:

Element

public process_rendering_result(arg_rendering_result: RenderingResult, -: array): * source

Process a RenderingResult instance.

Params:

NameTypeAttributeDescription
arg_rendering_result RenderingResult

rendering result.

- array

rendered components.

Return:

*

public render_page_content(arg_components: object): Promise source

Render page content with components names.

Override:

Layout#render_page_content

Params:

NameTypeAttributeDescription
arg_components object

components to display: { view:'', menubar:'', breadcrumbs:'' }

Return:

Promise

public render_page_content_vnode(arg_vnode: VNode, arg_rendering_result: RenderingResult, arg_credentials: Credentials): array source

Render page content with a global VNode.

Params:

NameTypeAttributeDescription
arg_vnode VNode

rendered virtual dom node.

arg_rendering_result RenderingResult

rendering result associated with given vnode.

arg_credentials Credentials

user session credentials.

Return:

array

array of rendered Component instances.

public switch(arg_previous_component: Component, arg_target_component_name: string, arg_is_menubar: boolean, arg_is_breadcrumbs: boolean): Promise source

Switch previously displayed component with target component.

Params:

NameTypeAttributeDescription
arg_previous_component Component

previous component instance.

arg_target_component_name string

target component name.

arg_is_menubar boolean

target component is a menubar?

arg_is_breadcrumbs boolean

target component is a breadcrumbs?

Return:

Promise

Promise of { switch:false, component:arg_previous_component }