183 lines
9.4 KiB
JSON
183 lines
9.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-04/schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string",
|
|
"description": "URL to a schema file"
|
|
},
|
|
"parameters": {
|
|
"type": "array",
|
|
"description": "A list of attributes of this User Control.",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^data-tchmi-",
|
|
"description": "Name of the attribute in the HTML."
|
|
},
|
|
"propertyName": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Name of the attribute property."
|
|
},
|
|
"propertySetterName": {
|
|
"type": "string",
|
|
"description": "Name of the attribute property setter (can be empty string or missing if the attribute is readonly)."
|
|
},
|
|
"propertyGetterName": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Name of the attribute property getter."
|
|
},
|
|
"displayName": {
|
|
"type": "string",
|
|
"description": "Name which should be presented the user."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Determine if an attribute is shown to the user."
|
|
},
|
|
"themeable": {
|
|
"type": "string",
|
|
"enum": ["None", "Standard", "Advanced"],
|
|
"description": "Determine if the attribute can be changed by a theme. Defaults to standard."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"pattern": "^tchmi:",
|
|
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
|
|
},
|
|
"allowedFunctions": {
|
|
"type": "object",
|
|
"description": "A definition of functions which are allowed to use here. The functions must match the requiredArguments signature.",
|
|
"properties": {
|
|
"returnType": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
|
|
},
|
|
"requiredArguments": {
|
|
"description": "A list of arguments which will be filled from the control itself. They are not changeable in the creator.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"minLength": 6,
|
|
"pattern": "^tchmi:",
|
|
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"requiredWaitMode": {
|
|
"type": "string",
|
|
"enum": ["Synchronous", "Asynchronous"],
|
|
"description": "A compatible function must match this waitmode."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"allowSymbolExpressionsInObject": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Allows symbol expressions in properties of object or array values."
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"description": "Name of the area this attribute will be listed in the creator."
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "A long description of this attribute."
|
|
},
|
|
"requiredOnCompile": {
|
|
"type": "boolean",
|
|
"description": "The attribute has to be set in the HTML. Otherwise the control is not valid."
|
|
},
|
|
"refTo": {
|
|
"type": "string",
|
|
"description": "The name of an attribute which contains information relevant for this attribute.\nThe engineering will use this information to optimize position of attribute inputs.\nExample: MeasurementUnits are shown in the same row as the main value."
|
|
},
|
|
"readOnly": {
|
|
"type": "boolean",
|
|
"description": "Readonly attributes do not need a setter."
|
|
},
|
|
"bindable": {
|
|
"type": "boolean",
|
|
"description": "Defines if this is bindable to a Symbol."
|
|
},
|
|
"heritable": {
|
|
"type": "boolean",
|
|
"description": "This attribute can be overwritten by a inheritance child."
|
|
},
|
|
"defaultValue": {
|
|
"default": null,
|
|
"description": "This property indicates the default value for the attribute that is used in the Engineering Properties window when instantiating the control and written to the HTML code."
|
|
},
|
|
"defaultValueInternal": {
|
|
"default": null,
|
|
"description": "This property specifies the internal default value for the attribute. This value is passed to the Setter function when the control has no other value in HTML code. The internal default aka runtime default may differ from the normal default (drop default)."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["name", "displayName", "visible", "type", "category", "readOnly", "bindable", "heritable"]
|
|
}
|
|
},
|
|
"virtualRights": {
|
|
"type": "array",
|
|
"description": "Additional virtual rights for the User Control. For example the 'operate' right of an embedded button can be configured to react on 'canStartPump' right of this User Control.",
|
|
"items": {
|
|
"$schema": "http://json-schema.org/draft-04/schema",
|
|
"type": "object",
|
|
"description": "An access right which is checked by controls. In the schema a defaultValue of true mean access is granted, false is denied, null is ask parent.",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Name of the access definition in the HTML."
|
|
},
|
|
"displayName": {
|
|
"type": "string",
|
|
"description": "Name which should be presented the user."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Determine if an access definition is shown to the user."
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "A long description of this access definition."
|
|
},
|
|
"defaultValueInternal": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Defines the default of this control access right. This will be used if the check for this access right does not return a result. true mean access is granted, false is denied, null is ask parent."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["name", "defaultValueInternal"]
|
|
}
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "A long description of this User Control."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["parameters"]
|
|
}
|