Home Reference Source
import WebformBuilder from 'formiojs/src/WebformBuilder.js'
public class | source

WebformBuilder

Extends:

src/components/_classes/component/Component.js~Component → WebformBuilder

Direct Subclass:

PDFBuilder, WizardBuilder

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

builder: *

public
public
public get
public get

defaultGroups: {"basic": *, "advanced": *, "layout": *, "data": *, "premium": *}

public

dialog: *

public
public

dragula: *

public
public

element: *

public

fieldsList: {"title": string, "key": string, "weight": *, "subgroups": *, "default": boolean, "components": *, "componentOrder": *}

public get

form: *

public set
public

groupOrder: *[]

public

groups: {}

public

preview: *

public get

Called when everything is ready.

public
public get

schema: *

public

schemas: {}

public
public
public

webform: *

Method Summary

Public Methods
public

addBuilderComponentInfo(component: *): *

public

addBuilderGroup(name: *, group: *)

public
public
public

attach(element: *): *

public

copyComponent(component: Component): *

Creates copy of component schema and stores it under sessionStorage.

public

createForm(options: *): *

public

destroy(deleteFromGlobal: *)

public

detach()

public

editComponent(component: *, parent: *, isNew: *, isJsonEdit: *, original: *)

public

findNamespaceRoot(component: *): *

When a component sets its api key, we need to check if it is unique within its namespace.

public
public

getComponentInfo(key: *, group: *): *

public

getComponentsPath(component: *, parent: *): *

public

getParentElement(element: *): *

public
public

init(): *

public
public

onDrop(element: *, target: *, source: *, sibling: *): *

public

pasteComponent(component: Component): *

Paste copied component after the current component.

public
public

recurseNamespace(component: *): *

public

redraw(): *

public

removeComponent(component: *, parent: *, original: *): *

public

render(): *

public

saveComponent(parent: *, component: *): boolean

Called when a new component is saved.

public

searchFields(searchString: *)

public

setForm(form: *): *

public

updateBuilderGroup(name: *, group: *)

public

updateComponent(component: *, changed: *)

public

Public Constructors

public constructor() source

Public Members

public builder: * source

public builderHeight: number source

public componentEdit: * source

public get container: * source

public get defaultGroups: {"basic": *, "advanced": *, "layout": *, "data": *, "premium": *} source

public dialog: * source

public dragDropEnabled: boolean source

public dragula: * source

public editForm: * source

public element: * source

public fieldsList: {"title": string, "key": string, "weight": *, "subgroups": *, "default": boolean, "components": *, "componentOrder": *} source

public get form: * source

public set form source

public groupOrder: *[] source

public groups: {} source

public preview: * source

public get ready: Promise: * source

Called when everything is ready.

Return:

Promise

Wait for webform to be ready.

public repeatablePaths: *[] source

public get schema: * source

public schemas: {} source

public sideBarScroll: * source

public sideBarScrollOffset: * source

public webform: * source

Public Methods

public addBuilderComponentInfo(component: *): * source

Params:

NameTypeAttributeDescription
component *

Return:

*

public addBuilderGroup(name: *, group: *) source

Params:

NameTypeAttributeDescription
name *
group *

public addExistingResourceFields(resources: *) source

Params:

NameTypeAttributeDescription
resources *

public allowDrop(): boolean source

Return:

boolean

public attach(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*

public copyComponent(component: Component): * source

Creates copy of component schema and stores it under sessionStorage.

Params:

NameTypeAttributeDescription
component Component

Return:

*

public createForm(options: *): * source

Params:

NameTypeAttributeDescription
options *

Return:

*

public destroy(deleteFromGlobal: *) source

Params:

NameTypeAttributeDescription
deleteFromGlobal *

public detach() source

public editComponent(component: *, parent: *, isNew: *, isJsonEdit: *, original: *) source

Params:

NameTypeAttributeDescription
component *
parent *
isNew *
isJsonEdit *
original *

public findNamespaceRoot(component: *): * source

When a component sets its api key, we need to check if it is unique within its namespace. Find the namespace root so we can calculate this correctly.

Params:

NameTypeAttributeDescription
component *

Return:

*

public findRepeatablePaths(): * source

Return:

*

public getComponentInfo(key: *, group: *): * source

Params:

NameTypeAttributeDescription
key *
group *

Return:

*

public getComponentsPath(component: *, parent: *): * source

Params:

NameTypeAttributeDescription
component *
parent *

Return:

*

public getParentElement(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*

public highlightInvalidComponents() source

public init(): * source

Return:

*

public initDragula(): * source

Return:

*

public onDrop(element: *, target: *, source: *, sibling: *): * source

Params:

NameTypeAttributeDescription
element *
target *
source *
sibling *

Return:

*

public pasteComponent(component: Component): * source

Paste copied component after the current component.

Params:

NameTypeAttributeDescription
component Component

Return:

*

public populateRecaptchaSettings(form: *) source

Params:

NameTypeAttributeDescription
form *

public recurseNamespace(component: *): * source

Params:

NameTypeAttributeDescription
component *

Return:

*

public redraw(): * source

Return:

*

public removeComponent(component: *, parent: *, original: *): * source

Params:

NameTypeAttributeDescription
component *
parent *
original *

Return:

*

public render(): * source

Return:

*

public saveComponent(parent: *, component: *): boolean source

Called when a new component is saved.

Params:

NameTypeAttributeDescription
parent *
component *

Return:

boolean

public searchFields(searchString: *) source

Params:

NameTypeAttributeDescription
searchString *

public setForm(form: *): * source

Params:

NameTypeAttributeDescription
form *

Return:

*

public updateBuilderGroup(name: *, group: *) source

Params:

NameTypeAttributeDescription
name *
group *

public updateComponent(component: *, changed: *) source

Params:

NameTypeAttributeDescription
component *
changed *

public updateDragAndDrop(): * source

Return:

*