Home Reference Source
public class | source

NestedComponent

Extends:

src/components/_classes/component/Component.js~ComponentField → NestedComponent

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set
public get
public
public get
public set
public get

data: *

public set
public get
public
public get
public get
public set
public
public get

errors: *

public get

isDirty: *

public get
public get
public set
public get
public set
public get
public get

ready: *

public get
public set
public get

schema: *

public get
public
public set
public get

visible: *

Private Members
private
private

_data: *

private
private

Method Summary

Public Methods
public

addComponent(component: Object, data: Object, before: HTMLElement): Component

Add a new component to the components array.

public

addComponents(element: *, data: *)

public

attach(element: *): *

public

attachComponents(element: *, components: *, container: *): *

public
public

beforePage(next: *): *

Allow components to hook into the next page trigger to perform their own logic.

public

Allow components to hook into the submission to provide their own async data.

public

Return a path of component's value.

public

calculateValue(data: *, flags: *, row: *): *

public

checkAsyncValidity(data: *, dirty: *, row: *, silentCheck: *): *

public

checkConditions(data: *, flags: *, row: *): *

public

checkData(data: *, flags: *, row: *, components: *): *

public

checkModal(isValid: *, dirty: *)

public

checkValidity(data: *, dirty: *, row: *, silentCheck: *): *

public

clear()

public

clearOnHide(show: *)

public
public

createComponent(component: *, data: *): *

Create a new component and add it to the components array.

public
public
public

detach()

public

Perform an iteration over each component within this container component.

public

Perform a deep iteration over every component, including those within other container based components.

public
public

Returns a component provided a key.

public

Return a component provided the Id of the component.

public
public
public

getValue(): *

public

hasComponent(component: *): *

public

init(): *

public

isLastPage(): *

public

isValid(data: *, dirty: *): *

public

removeComponent(component: Component, components: Array<Component>)

Remove a component from the components array.

public

Removes a component provided the Id of the component.

public

Removes a component provided the API key of that component.

public

render(children: *): *

public

renderComponents(components: *): *

public
public
public

setNestedValue(component: *, value: *, flags: {}): *

public

setPristine(pristine: *)

public

setValue(value: *, flags: {}): *

public

shouldSkipValidation(data: *, dirty: *, row: *): *

public

updateValue(value: *, flags: {}): *

Inherited Summary

From class Field
public

render(element: *): *

Static Public Methods

public static schema(extend: ...*): * source

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Constructors

public constructor() source

Public Members

public get collapsed: * source

public set collapsed source

public get componentComponents: * source

public components: * source

public get currentForm: * source

public set currentForm source

public get data: * source

public set data source

public get dataReady: * source

public dataValue: * source

public get defaultSchema: * source

public get disabled: * source

public set disabled source

public error: string source

public get errors: * source

public get isDirty: * source

public get isPristine: * source

public get nestedKey: string source

public set parentDisabled source

public get parentDisabled: * source

public set parentVisible source

public get parentVisible: * source

public get ready: * source

public get rowIndex: * source

public set rowIndex source

public get schema: * source

public get templateName: string source

public type: string source

public set visible source

public get visible: * source

Private Members

private _collapsed: * source

private _data: * source

private _rowIndex: * source

private _visible: * source

Public Methods

public addComponent(component: Object, data: Object, before: HTMLElement): Component source

Add a new component to the components array.

Params:

NameTypeAttributeDescription
component Object

The component JSON schema to add.

data Object

The submission data object to house the data for this component.

before HTMLElement

A DOM element to insert this element before.

Return:

Component

The created component instance.

public addComponents(element: *, data: *) source

Params:

NameTypeAttributeDescription
element *
data *

public attach(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*

public attachComponents(element: *, components: *, container: *): * source

Params:

NameTypeAttributeDescription
element *
components *
container *

Return:

*

public beforeFocus() source

public beforePage(next: *): * source

Allow components to hook into the next page trigger to perform their own logic.

Params:

NameTypeAttributeDescription
next *

Return:

*

public beforeSubmit(): * source

Allow components to hook into the submission to provide their own async data.

Return:

*

public calculateComponentPath(component: Object): string source

Return a path of component's value.

Params:

NameTypeAttributeDescription
component Object

The component instance.

Return:

string

The component's value path.

public calculateValue(data: *, flags: *, row: *): * source

Params:

NameTypeAttributeDescription
data *
flags *
row *

Return:

*

public checkAsyncValidity(data: *, dirty: *, row: *, silentCheck: *): * source

Params:

NameTypeAttributeDescription
data *
dirty *
row *
silentCheck *

Return:

*

public checkConditions(data: *, flags: *, row: *): * source

Params:

NameTypeAttributeDescription
data *
flags *
row *

Return:

*

public checkData(data: *, flags: *, row: *, components: *): * source

Params:

NameTypeAttributeDescription
data *
flags *
row *
components *

Return:

*

public checkModal(isValid: *, dirty: *) source

Params:

NameTypeAttributeDescription
isValid *
dirty *

public checkValidity(data: *, dirty: *, row: *, silentCheck: *): * source

Params:

NameTypeAttributeDescription
data *
dirty *
row *
silentCheck *

Return:

*

public clear() source

public clearOnHide(show: *) source

Params:

NameTypeAttributeDescription
show *

public componentContext(): * source

Return:

*

public createComponent(component: *, data: *): * source

Create a new component and add it to the components array.

Params:

NameTypeAttributeDescription
component *
data *

Return:

*

public destroy() source

public destroyComponents() source

public detach() source

public eachComponent(fn: function) source

Perform an iteration over each component within this container component.

Params:

NameTypeAttributeDescription
fn function

Called for each component

public everyComponent(fn: function) source

Perform a deep iteration over every component, including those within other container based components.

Params:

NameTypeAttributeDescription
fn function

Called for every component.

public flattenComponents(): * source

Return:

*

public getComponent(key: string, fn: function): Object source

Returns a component provided a key. This performs a deep search within the component tree.

Params:

NameTypeAttributeDescription
key string

The key of the component to retrieve.

fn function

Called with the component once found.

Return:

Object

The component that is located.

public getComponentById(id: string, fn: function): Object source

Return a component provided the Id of the component.

Params:

NameTypeAttributeDescription
id string

The Id of the component.

fn function

Called with the component once it is retrieved.

Return:

Object

The component retrieved.

public getComponents(): * source

Return:

*

public getContainer(): * source

Return:

*

public getValue(): * source

Return:

*

public hasComponent(component: *): * source

Params:

NameTypeAttributeDescription
component *

Return:

*

public init(): * source

Return:

*

public isLastPage(): * source

Return:

*

public isValid(data: *, dirty: *): * source

Params:

NameTypeAttributeDescription
data *
dirty *

Return:

*

public removeComponent(component: Component, components: Array<Component>) source

Remove a component from the components array.

Params:

NameTypeAttributeDescription
component Component

The component to remove from the components.

components Array<Component>

An array of components to remove this component from.

public removeComponentById(id: string, fn: function): null source

Removes a component provided the Id of the component.

Params:

NameTypeAttributeDescription
id string

The Id of the component to remove.

fn function

Called when the component is removed.

Return:

null

public removeComponentByKey(key: string, fn: function): null source

Removes a component provided the API key of that component.

Params:

NameTypeAttributeDescription
key string

The API key of the component to remove.

fn function

Called once the component is removed.

Return:

null

public render(children: *): * source

Override:

Field#render

Params:

NameTypeAttributeDescription
children *

Return:

*

public renderComponents(components: *): * source

Params:

NameTypeAttributeDescription
components *

Return:

*

public resetValue() source

public restoreComponentsContext() source

public setNestedValue(component: *, value: *, flags: {}): * source

Params:

NameTypeAttributeDescription
component *
value *
flags {}
  • optional
  • default: {}

Return:

*

public setPristine(pristine: *) source

Params:

NameTypeAttributeDescription
pristine *

public setValue(value: *, flags: {}): * source

Params:

NameTypeAttributeDescription
value *
flags {}
  • optional
  • default: {}

Return:

*

public shouldSkipValidation(data: *, dirty: *, row: *): * source

Params:

NameTypeAttributeDescription
data *
dirty *
row *

Return:

*

public updateValue(value: *, flags: {}): * source

Params:

NameTypeAttributeDescription
value *
flags {}
  • optional
  • default: {}

Return:

*