Class: ComponentStore
Component settings for serialization in JSON.
Constructors
new ComponentStore()
new ComponentStore(
key
,type
):ComponentStore
Creates the component settings.
Parameters
• key: string
the React component key.
• type: string
the component type of the form viewer.
Returns
Properties
children?
optional
children:ComponentStore
[]
The array of child components.
css?
optional
css:Css
The component CSS styles.
events?
optional
events:Record
<string
,ActionData
[]>
The set of event handlers.
htmlAttributes?
optional
htmlAttributes:HtmlAttribute
[]
The set of arbitrary HTML attributes added to the component.
key
key:
string
=''
The React component key.
props
props:
Record
<string
,ComponentProperty
> ={}
The component properties.
renderWhen?
optional
renderWhen:ComponentProperty
The expression or function to conditionally render a component.
schema?
optional
schema:BoundValueSchema
The component value validation settings.
slot?
optional
slot:string
The name of the occupied component property in the parent component.
slotCondition?
optional
slotCondition:string
The condition for binding a child element to a parent element.
tooltipProps?
optional
tooltipProps:Record
<string
,ComponentProperty
>
The tooltip settings.
type
type:
string
=''
The component type of the form viewer.
wrapperCss?
optional
wrapperCss:Css
The component wrapper CSS styles.
Methods
addEventHandler()
static
addEventHandler(store
,eventName
,data
):void
Adds the event handler for component.
Parameters
• store: ComponentStore
the target ComponentStore.
• eventName: string
the target event name.
• data: ActionData
the ActionData.
Returns
void
createFromObject()
static
createFromObject(value
):any
Correctly creates the ComponentStore from deserialized data.
Parameters
• value: any
the deserialized data.
Returns
any
the component Store.