Configuring the manifest file
Every widget must define an insights-manifest.json file (also called manifest file for short) which contains information like the widget name,
the configurations it will offer in the editor, and which other projects can access this widget.
→ Check for example the manifest file template for Angular here.
You need to configure the following important properties in this file:
name: represents the name of the widget. The name cannot be empty and has to be unique within a given repository.
allowedProjects: provides a list of projects which are allowed to use this widget. Leave it empty if you do not want to share the widget with other projects, and you can update this at any time as needed.
file: defines the entry point of the web component.
displayName: defines a human-readable display name of the widget. This will be used to show the widget in the editor list.
description: provides a short description of the widget. This will be used to show the widget in the editor list.
includeDataSourceConfig: when set to true, adds the data source block to the widget configurator. If set to false, the widget configurator will not include a data source configuration option.
configProperties : defines configurable properties of the widget. Project admins will be able to use the widget editor view (see Examples below) to provide their own values for these properties. The supported property types are presented in the following table:
Type
Behavior
Example
string
Provides a string input field in the widget editor.
"name": {
"type": "string",
"label": {
"en": "Name",
"de": "Name"
},
"default": "name value"
number
Provides a numeric input field in the widget editor.
"number": {
"type": "number",
"label": {
"en": "Number",
"de": "Number"
},
"default": 2
}
boolean
Provides a checkbox editor in the widget editor.
"isNameMandatory": {
"type": "boolean",
"default": true,
"label": {
"en": "Is name mandatory",
"de": "Ist der Name obligatorisch?"
}
}
map
Provides a key-value editor in its own independent section.
"map": {
"label": {
"en": "Country code",
"de": "Landesvorwahl"
},
"type": "map"
}
iteratingPath
Provides a drop-down with iterating paths of the configured data source.
The iterating path index can be further modified.
"iterating": {
"type": "iteratingPath",
"label": {
"en": "Iterating path",
"de": "Iterating path"
}
}
staticPath
Provides a drop-down with static paths of the configured data source.
"myProperty": {
"type": "staticPath",
"label": {
"en": "Static path",
"de": "Static path"
}
}
RestRequestDefinition
Provides a REST request definition editor in its own independent section.
"restCall": {
"label": {
"en": "My external rest request",
"de": ""
},
"type": "RestRequestDefinition"
}
$schema: provides a reference to the schema file ( insights-manifest.schema.json ) which explains the schema of the insights-manifest.json file, such as the values accepted by the corresponding properties.
Here is an example in the demo repository.
Examples from the UI
This section provides an example of how the configProperties listed in the table above will look in the widget configuration editor.
String
Number
Boolean
Map
Iterating path
The iterating path index can be further modified as shown below.
Static path
Rest request definition