UiSchema
The PANDIUM.yaml's UISchema is a list of elements that determine how the configurations defined in the schema properties are displayed on the connection settings page e.g. the order of controls, their visibility, labels, and layout.
All UISchema elements must contain the type prop. Depending on that type other props may be available/required. Pandium currently supports the following types of UISchema elements:
Control
A UISchema element with type: Control
displays one of the configurations defined in the schema properties.
In addition to type, it takes these properties:
scope
Required.
Determines which schema property this UISchema element displays.
Has the following format ‘#/properties/[property_name]’
label
string
Not Required.
Used to customize the text seen for the control on the connections settings page.
admin
boolean
Not Required.
When true, the element will only render for Integration Hub users.
options
object
Not required. For full-width inputs, use
options:
trim: false
If the schema properties look like this:
Then, the UISchema element for the bool_input property could look like this:
It would then be displayed in the connection settings page like this:
MultiSelectControl
A UISchema element with type: MultiSelectControl
displays one of the configurations defined in the schema properties. This type will only render correctly if the Schema property referenced in its scope is formatted as a multi select enum.
In addition to type, it takes these properties:
scope
Required for Control.
Determines which schema property this uischema element displays.
Has the following format ‘#/properties/[property_name]’
The schema property referenced in its scope must be formatted as a multi select enum.
admin
boolean
Not Required. When true, the element will only render for Integration Hub users.
If the schema property looks like this:
Then, the UISchema element for the string_enum_multi_input property coudl look like this:
Which would then be displayed like this on the connections page:
Label
A UISchema element with type: Label displays a label. This can be helpful when combined with UISchema elements that do not take the label prop (e.g. the MultiSelectControl)
In addition to type, it takes these properties:
title
string
Not Required.
subtitle
string
Not Required.
hintText
string
Not Required.
admin
boolean
Not Required. When true, the element will only render for Integration Hub users.
Here is an example of a UISchema element with type: label
Which would be displayed like this on the connection settings page:
Divider
A UISchema element with type: Divider displays a horizontal line. This can help visually organize and separate different sections of the connections setting page. This type of UISchema element does not take any additional properties.
Here is an example of UISchema element with type: Label
It would be displayed as a simple dividing line in the connection settings page.
Vertical Layout
A UISchema element with type: VerticalLayout is used to list other UISchema elements vertically. Layout elements (i.e. VerticalLayout, HorizontalLayout, Section) can be combined and nested within one another.
In addition to type, it takes these properties:
element
List of UISchema elements
Required.
Here is an example of UISchema element with type: Vertical Layout:
Which would be displayed like so:
Horizontal Layout
A UISchema element with type: HorizontalLayout is used to list other UISchema elements side by side. Layout elements (i.e. VerticalLayout, HorizontalLayout, Section) can be combined and nested within one another.
In addition to type, it takes these properties:
element
List of UISchema elements
Required.
Here is an example of UISchema element with type: HorizontalLayout:
In addition to type, it takes these properties:
Section
A UISchema element with type: Section is used to list other UISchema elements vertically. It differs from the VerticalLayout because it can take more props (e.g. label, subtitle, hintText). Layout elements (i.e. VerticalLayout, HorizontalLayout, Section) can be combined and nested within one another.
In addition to type, it takes these properties:
element
List of UISchema elements
Required.
label
string
Not required.
subtitle
string
Not required.
hintText
string
Not required.
Here is an example of UISchema element with type: Section:
It would be displayed like this on the connections settings page:
Combining Layout Elements
UISchema elements of the type VerticalLayout, HorizontalLayout, and Section can be combined and nested within one another as in this example:
Last updated