Home Reference Source
public class | source

Tagpad

Extends:

src/Component.js~ComponentBaseComponentNestedComponent → Tagpad

Static Member Summary

Static Public Members
public static
public static

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

backgroundReady: {"resolve": *, "reject": *}

public

canvas: *

public
public
public

components: *[]

public get
public
public

dimensions: {"width": *, "height": *, "minX": *, "minY": *}

public
public set
public

dots: *[]

public
public
public get
public
public
public

two: *

public

Method Summary

Public Methods
public
public

addDot(coordinate: *)

public

addInputError(message: *, dirty: *)

public

addTagpadComponent(componentInstance: *)

public

attach()

public
public

build(state: *): *

public

checkDotValidity(data: *, dirty: *, dot: *): *

public

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

public

dotClicked(e: *, dot: *, index: *)

public

drawDot(dot: *, index: *): {"circle": *, "text": *}

public

getActualCoordinate(coordinate: *): *

public

getValue(): *

public
public
public
public
public
public

selectDot(index: *)

public

setBackgroundImage(svgMarkup: *)

public

setDotValidity(dot: *, isValid: *)

public

setEditorSize(width: *, height: *)

public

setFormValue(value: *)

public

setValue(dots: *)

public
public

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

Inherited Summary

From class BaseComponent
public static

schema(sources: ...*): *

public static

tableView(value: *, options: *)

Provides a table view for this component.

public get
public get

Retrieves the CSS class name of this component.

public get
public set
public get

Build the custom style from the layout values

public get
public get

dataValue: *: *

Get the static value of this component.

public set

dataValue(value: *)

Sets the static value of this component.

public get
public get
public get
public get

Return if the component is disabled.

public set

disabled(disabled: boolean)

Disable this component.

public get

The empty value for this component.

public get

errorLabel: *: *

Returns the error label for this component.

public get

errors: *

public set

forceDisabled(disabled: *)

Force a component to be disabled regardless if it should or not.

public get
public get
public get

key: *

public get

label: *

Get this component's label text.

public set

label(value: *)

Set this component's label text and render it.

public get

logic: *

public get

name: string: *

The readible name for this component.

public get
public set
public get

rootValue: *: *

Get the data value at the root level.

public get

schema: *

Returns the JSON schema for this component.

public get
public get

Return the submission timezone.

public get
public get

value: *: *

Get the value of this component.

public get
public get

visible: *

public set
public get

widget: *: *

Returns the instance of the widget for this component.

public get

wysiwygDefault: {"theme": string, "placeholder": *, "modules": *}

public
public

The Form.io component JSON schema.

public

data: *

The data object in which this component resides.

public
public

dragula: *

public

The bounding HTML Element which this component is rendered.

public

The existing error that this component has.

public
public

The HTMLElement for which the errors are rendered for this component (usually underneath the component).

public
public

The basic component information which tells the BaseComponent how to render the input element of the components that derive from this class.

public

An array of all of the input HTML Elements that have been added to this component.

public
public
public

The HTMLElement that is assigned to the label of this component.

public
public

Points to the parent component.

public

persist: {}

A persistent data object that can persist between component instances.

public

If this input has been input and provided value.

public

quill: *

public
public
public

Points to the root component, usually the FormComponent.

public

The row path of this component.

public

The HTML Element for the table body.

public

tooltip: *

public
public

Used to trigger a redraw event within this component.

public

type: *

public

validators: [string]

The validators that are assigned to this component.

public
private
private

Determines if this component is disabled, or not.

private

Determines if this component has a condition assigned to it.

private
private

Determines if this component is visible, or not.

private

_widget: *

public

addButton(justIcon: *): HTMLElement

Adds a new button to add new rows to the multiple input elements.

public

addCKE(element: *, settings: *, onChange: *): *

public

addDraggable(containers: *)

public

addFocusBlurEvents(element: *)

public

addInput(input: *, container: *, noSet: *): *

Add a new input to this comonent.

public

addInputError(message: *, dirty: *)

Add a new input error to this element.

public

Add new input element listeners.

public

addInputGroup(input: HTMLElement, container: HTMLElement): HTMLElement

Adds a new input group to hold the input html elements.

public
public

addNewValue(value: *)

Adds a new empty value to the data array.

public

addPrefix(input: HTMLElement, inputGroup: HTMLElement): HTMLElement

Adds a prefix html element.

public

addQuill(element: *, settings: *, onChange: *): *

public

addShortcut(element: *, shortcut: *)

public

addShortcutToLabel(label: *, shortcut: *): *

public

addSuffix(input: HTMLElement, inputGroup: HTMLElement): HTMLElement

Adds a suffix html element.

public

Adds a new empty value to the data array, and add a new row to contain it.

public

append(element: HTMLElement)

Append an element to this elements containing element.

public

applyActions(actions: *, result: *, data: *, newComponent: *): *

public

asString(value: *): *

Prints out the value of this component as a string value.

public

attachActions(element: *, actions: *)

public
public

attachRefreshEvent(refreshData: *)

public
public
public

beforeNext(): *

Called before a next page is triggered allowing the components to perform special functions.

public

Called before a submission is triggered allowing the components to perform special async functions.

public

build(state: *)

Builds the component.

public

buildInput(container: *, value: *)

public

buildRows(values: *)

Rebuild the rows to contain the values of this component.

public

Perform a calculated value operation.

public

checkCondition(row: *, data: *): boolean

Checks the condition of this component.

public

checkConditions(data: *): *

Check for conditionals and hide/show the element based on those conditions.

public

checkValidity(data: *, dirty: *, rowData: *): *

public

clear(): *

Destroys and clears a component and returns the current state.

public

clearOnHide(show: *)

public

Check if this component is conditionally visible.

public

createDescription(container: *)

Creates the description block for this input field.

public

createElement(): HTMLElement

Create the outside wrapping element for this component.

public

Creates a new error element to hold the errors of this element.

public

createInput(container: HTMLElement): HTMLElement

Creates a new input element.

public

createLabel(container: HTMLElement)

Create the HTML element for the label of this component.

public
public

createTooltip(container: HTMLElement)

Create the HTML element for the tooltip of this component.

public
public

createViewOnlyLabel(container: *)

public

createViewOnlyValue(container: *)

public

Creates an instance of a widget for this component.

public

Create the input wrapping element.

public

Deletes the value of the component.

public

destroy(): *

Remove all event handlers.

public
public

dragButton(): *

public

elementInfo(): {"type": string, "component": *, "changeEvent": string, "attr": *}

Get the element information.

public

errorMessage(type: *): *

Get the error message provided a certain type of error.

public

evalContext(additional: *): *

public

fieldLogic(data: *): *

Check all triggers and apply necessary actions.

public

focus()

public
public

getElement(): HTMLElement

Returns the outside wrapping element of this component.

public

getFlags(): *

public
public
public

getModifiedSchema(schema: *, defaultSchema: *): *

Returns only the schema that is different from the default.

public
public

getRoot(): *

Get FormioForm element at the root of this component tree.

public

getRowDragulaOptions(): {"moves": *}

public

getValue(): *

Get the input value of this component.

public

getValueAt(index: *): *

Get the value at a specific index.

public

getView(value: *): *

public

hasChanged(newValue: *, oldValue: *): boolean

Determine if the value of this component has changed.

public

Determines if this component has a condition defined.

public

hasValue(data: *): *

Returns if this component has a value set.

public

inContext(component: *): boolean

Checks to see if a separate component is in the "context" of this component.

public

invalidMessage(data: *, dirty: *): *

Returns the invalid message, or empty string if the component is valid.

public

isEmpty(value: *): *

public

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

Returns if the component is valid or not.

public
public

labelOnTheLeft(position: *): *

public

labelOnTheLeftOrRight(position: *): *

public

labelOnTheRight(position: *): *

public

onChange(flags: *, fromRoot: *)

public

onRowDrop(droppedElement: *, newParent: *, oldParent: *, nextSibling: *)

public

performInputMapping(input: *): *

public

prepend(element: HTMLElement)

Prepend an element to this elements containing element.

public

redraw(shouldRedrawInBuilder: *)

public

refresh(value: *)

Refreshes the component with a new value.

public

removeButton(index: number): HTMLElement

Creates a new "remove" row button and returns the html element of that button.

public

removeChild(element: HTMLElement)

Removes a child from this component.

public

removeShortcut(element: *, shortcut: *)

public

Removes a value out of the data array and rebuild the rows.

public

renderElement(template: *, data: *, actions: *[]): *

public

renderTemplate(template: *, data: *, actions: *): HTMLElement

Render a template string into html.

public

renderTemplateToElement(element: *, template: *, data: *, actions: *[]): *

public

Resets the value of this component.

public

Restore the value of a control.

public

rightAlignedLabel(position: *): *

public

selectOptions(select: *, tag: *, options: *, defaultValue: *)

public

setCustomValidity(message: *, dirty: *)

public

setDisabled(element: *, disabled: *)

public

setInputMask(input: *, inputMask: *): *

public

setInputStyles(input: *)

public

setLoading(element: *, loading: *)

public

setPristine(pristine: *)

Sets the pristine flag for this component.

public

setSelectValue(select: *, value: *)

public

setValue(value: *, flags: *): boolean

Set the value of this component.

public

setValueAt(index: *, value: *)

Set the value at a specific index.

public

setupValueElement(element: *)

public

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

public

show(show: *): *

Hide or Show an element.

public

showElement(element: *, show: *): *

Show or hide the root element of this component.

public

splice(index: *)

Splice a value from the dataValue.

public

t(text: string, params: Object): *

Translate a text using the i18n system.

public

updateItems(args: ...*)

public

updateOnChange(flags: *, changed: *): boolean

Update the value on change.

public

updateValue(flags: *): *

Update a value of this component.

public
public

Check if a component is eligible for multiple validation

public
public

whenReady(): *

From class NestedComponent
public static

schema(extend: ...*): *

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

errors: *

public get
public set
public get

schema: *

public get

visible: *

public set
public
public

components: *[]

public

hidden: *[]

public
public

addComponent(component: Object, element: HTMLElement, data: Object, before: HTMLElement, noAdd: Boolean, state: Object): BaseComponent

Add a new component to the components array.

public

addComponents(element: *, data: *)

public

beforeNext(): *

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

build(state: *, showLabel: *)

public

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

public

checkConditions(data: *): *

public

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

A more performant way to check the conditions, calculations, and validity of a submission once it has been changed.

public

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

public

clearOnHide(show: *)

public

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

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

public

destroy(state: *): *

Destroys this component.

public

destroyComponents(state: *): *

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

getComponentState(component: {}, state: {}): *

public
public
public

getValue(): *

public
public

hideComponents(hidden: *)

public

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

public

removeComponent(component: BaseComponent, components: Array<BaseComponent>): *

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
public
public

setCollapseHeader(header: *)

public

setCollapsed(element: *)

public

setHidden(component: *)

public

setNestedValue(component: *, value: *, flags: *, changed: *): *

public

setPristine(pristine: *)

public

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

public

show(show: *): *

public
public

updateValue(flags: *, source: *): *

Static Public Members

public static builderInfo: * source

public static editForm: * source

Static Public Methods

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

Override:

NestedComponent#schema

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Constructors

public constructor() source

Initialize a new BaseComponent.

Override:

NestedComponent#constructor

Public Members

public background: * source

public backgroundReady: {"resolve": *, "reject": *} source

public canvas: * source

public canvasContainer: * source

public canvasSvg: * source

public components: *[] source

Override:

NestedComponent#components

public get dataReady: * source

Override:

NestedComponent#dataReady

public dataValue: * source

Get the static value of this component.

Override:

BaseComponent#dataValue

public dimensions: {"width": *, "height": *, "minX": *, "minY": *} source

public dimensionsMultiplier: number source

public set disabled source

Return if the component is disabled.

Override:

NestedComponent#disabled

public dots: *[] source

public formContainer: * source

public formRendered: boolean source

public get hasBackgroundImage: * source

public selectedDotIndex: * source

public tagpadContainer: * source

public two: * source

public type: string source

Override:

NestedComponent#type

Public Methods

public addBackground() source

public addDot(coordinate: *) source

Params:

NameTypeAttributeDescription
coordinate *

public addInputError(message: *, dirty: *) source

Add a new input error to this element.

Override:

BaseComponent#addInputError

Params:

NameTypeAttributeDescription
message *
dirty *

public addTagpadComponent(componentInstance: *) source

Params:

NameTypeAttributeDescription
componentInstance *

public attach() source

public attachDrawEvents() source

public build(state: *): * source

Builds the component.

Override:

NestedComponent#build

Params:

NameTypeAttributeDescription
state *

Return:

*

public checkDotValidity(data: *, dirty: *, dot: *): * source

Params:

NameTypeAttributeDescription
data *
dirty *
dot *

Return:

*

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

Override:

NestedComponent#checkValidity

Params:

NameTypeAttributeDescription
data *
dirty *

Return:

*

public dotClicked(e: *, dot: *, index: *) source

Params:

NameTypeAttributeDescription
e *
dot *
index *

public drawDot(dot: *, index: *): {"circle": *, "text": *} source

Params:

NameTypeAttributeDescription
dot *
index *

Return:

{"circle": *, "text": *}

public getActualCoordinate(coordinate: *): * source

Params:

NameTypeAttributeDescription
coordinate *

Return:

*

public getValue(): * source

Get the input value of this component.

Override:

NestedComponent#getValue

Return:

*

public redrawDots() source

public removeSelectedDot() source

public renderForm() source

public renderTagpad() source

public saveSelectedDot() source

public selectDot(index: *) source

Params:

NameTypeAttributeDescription
index *

public setBackgroundImage(svgMarkup: *) source

Params:

NameTypeAttributeDescription
svgMarkup *

public setDotValidity(dot: *, isValid: *) source

Params:

NameTypeAttributeDescription
dot *
isValid *

public setEditorSize(width: *, height: *) source

Params:

NameTypeAttributeDescription
width *
height *

public setFormValue(value: *) source

Params:

NameTypeAttributeDescription
value *

public setValue(dots: *) source

Set the value of this component.

Override:

NestedComponent#setValue

Params:

NameTypeAttributeDescription
dots *

public stretchDrawingArea() source

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

Update a value of this component.

Override:

NestedComponent#updateValue

Params:

NameTypeAttributeDescription
flags *
value *

Return:

*