Property description
The components property represents a part of a template that can be used within another template (e.g., an object template).
This property is used primarily for referencing within other templates. A single component can be referenced in multiple object type templates, allowing changes made to the component to automatically apply to all templates that reference it, instead of editing each individually.
Minimal JSON
{
"key": ""
}{
"key": "panel_table_recipes",
"template": {
"type": "panel",
"values": []
}
}Example taken from Example Application Package.
{
"key": "widget_objects_by_state",
"widget": {
"titleKey": "widget.title.objects_by_state",
"descriptionKey": "widget.desc.objects_by_state",
"category": "overview",
"defaultWidth": 12,
"defaultHeight": 4,
"minWidth": 6,
"minHeight": 3,
"editableFilters": [
{
"key": "workflowStateKey",
"editor": "workflow-state",
"valueKind": "enumKey"
}
]
},
"template": {
"type": "api-chart",
"title": "widget.title.objects_by_state",
"data": {
"datasets": [
{
"dataApi": "/api/chart/statistics/core_statistic_chart_objects_states/buckets"
}
]
},
"definition": {
"type": "doughnut"
}
}
}A component that also serves as a home screen widget. For the widget properties, see widget.
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
key | Unique key of the asset. Used for referencing in the same package or other packages using packageKey#assetKey. | string | Yes |
template | Visual part of the template that is referenced in other templates. Templates are made up of different components, which are available in the Components library. | json | No |
widget | Widget configuration that lists the component in the home screen widget catalog. Sets the catalog title, category, grid size, and the filters a user can change on a placed widget. Available for the following component types: api-chart, chart, summaries, api-table, wordcloud, panel, section-title, static-text. | json | No |