@camunda/element-templates-json-schema-shared 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +8 -0
- package/package.json +19 -0
- package/src/defs/base-properties.json +155 -0
- package/src/defs/base.json +78 -0
- package/src/defs/groups.json +38 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to [@camunda/element-templates-json-schema-shared](https://github.com/camunda/element-templates-json-schema/packages/element-templates-json-schema-shared) are documented here. We use [semantic versioning](http://semver.org/) for releases.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
___Note:__ Yet to be released changes appear here._
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 0.1.0
|
|
11
|
+
|
|
12
|
+
* `FEAT`: initial version :tada:
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 camunda Services GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@camunda/element-templates-json-schema-shared",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared schema definitions used within element-templates-json-schema",
|
|
5
|
+
"files": [
|
|
6
|
+
"src"
|
|
7
|
+
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/camunda/element-templates-json-schema.git",
|
|
11
|
+
"directory": "packages/element-templates-json-schema-shared"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"json-schema",
|
|
15
|
+
"element-templates",
|
|
16
|
+
"camunda"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT"
|
|
19
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "array",
|
|
3
|
+
"title": "element template properties",
|
|
4
|
+
"description": "The properties of the element template",
|
|
5
|
+
"default": [],
|
|
6
|
+
"items": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"title": "element template property",
|
|
9
|
+
"description": "A property defined for the element template",
|
|
10
|
+
"default": {},
|
|
11
|
+
"allOf": [
|
|
12
|
+
{
|
|
13
|
+
"if": {
|
|
14
|
+
"properties": {
|
|
15
|
+
"type": {
|
|
16
|
+
"const": "Dropdown"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": [
|
|
20
|
+
"type"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"then": {
|
|
24
|
+
"required": [
|
|
25
|
+
"choices"
|
|
26
|
+
],
|
|
27
|
+
"errorMessage": "must provide choices=[] with \"Dropdown\" type"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"value": {
|
|
33
|
+
"$id": "#/properties/property/value",
|
|
34
|
+
"type": [
|
|
35
|
+
"string",
|
|
36
|
+
"boolean"
|
|
37
|
+
],
|
|
38
|
+
"title": "property value",
|
|
39
|
+
"description": "The value of the control field for the property"
|
|
40
|
+
},
|
|
41
|
+
"description": {
|
|
42
|
+
"$id": "#/properties/property/description",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"title": "property description",
|
|
45
|
+
"description": "The description of the control field"
|
|
46
|
+
},
|
|
47
|
+
"label": {
|
|
48
|
+
"$id": "#/properties/property/label",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"title": "property label",
|
|
51
|
+
"description": "The label of the control field for the property"
|
|
52
|
+
},
|
|
53
|
+
"type": {
|
|
54
|
+
"$id": "#/properties/property/type",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"title": "property type",
|
|
57
|
+
"description": "The type of the control field"
|
|
58
|
+
},
|
|
59
|
+
"editable": {
|
|
60
|
+
"$id": "#/properties/property/editable",
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"title": "property editable",
|
|
63
|
+
"description": "Indicates whether the property is editable or not"
|
|
64
|
+
},
|
|
65
|
+
"choices": {
|
|
66
|
+
"$id": "#/properties/property/choices",
|
|
67
|
+
"type": "array",
|
|
68
|
+
"title": "property choices",
|
|
69
|
+
"description": "The choices for dropdown properties",
|
|
70
|
+
"items": {
|
|
71
|
+
"$id": "#/properties/property/choices/item",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"name": {
|
|
75
|
+
"$id": "#/properties/property/choices/item/name",
|
|
76
|
+
"type": "string",
|
|
77
|
+
"title": "choice name",
|
|
78
|
+
"description": "The name of the choice"
|
|
79
|
+
},
|
|
80
|
+
"value": {
|
|
81
|
+
"$id": "#/properties/property/choices/item/value",
|
|
82
|
+
"type": "string",
|
|
83
|
+
"title": "choice value",
|
|
84
|
+
"description": "The value of the choice"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"value",
|
|
89
|
+
"name"
|
|
90
|
+
],
|
|
91
|
+
"errorMessage": "{ name, value } must be specified for \"Dropdown\" choices"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"constraints": {
|
|
95
|
+
"$id": "#/properties/property/constraints",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"title": "property constraints",
|
|
98
|
+
"description": "The validation constraints",
|
|
99
|
+
"properties": {
|
|
100
|
+
"notEmpty": {
|
|
101
|
+
"$id": "#/properties/property/constraints/notEmpty",
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"title": "property constraints not empty",
|
|
104
|
+
"description": "The control field must not be empty"
|
|
105
|
+
},
|
|
106
|
+
"minLength": {
|
|
107
|
+
"$id": "#/properties/property/constraints/minLength",
|
|
108
|
+
"type": "number",
|
|
109
|
+
"title": "property constraints min length",
|
|
110
|
+
"description": "The minimal length for the control field value"
|
|
111
|
+
},
|
|
112
|
+
"maxLength": {
|
|
113
|
+
"$id": "#/properties/property/constraints/maxLength",
|
|
114
|
+
"type": "number",
|
|
115
|
+
"title": "property constraints max length",
|
|
116
|
+
"description": "The maximal length for the control field value"
|
|
117
|
+
},
|
|
118
|
+
"pattern": {
|
|
119
|
+
"$id": "#/properties/property/constraints/pattern",
|
|
120
|
+
"title": "property constraints pattern",
|
|
121
|
+
"description": "A regular expression pattern for the constraints",
|
|
122
|
+
"oneOf": [
|
|
123
|
+
{
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"value": {
|
|
127
|
+
"$id": "#/properties/property/constraints/pattern/value",
|
|
128
|
+
"type": "string",
|
|
129
|
+
"title": "property constraints pattern value",
|
|
130
|
+
"description": "The regular expression of the pattern constraint"
|
|
131
|
+
},
|
|
132
|
+
"message": {
|
|
133
|
+
"$id": "#/properties/property/constraints/pattern/message",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"title": "property constraints pattern message",
|
|
136
|
+
"description": "The validation message of the pattern constraint"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "string"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"group": {
|
|
148
|
+
"$id": "#/properties/property/group",
|
|
149
|
+
"type": "string",
|
|
150
|
+
"title": "property group",
|
|
151
|
+
"description": "The custom group of the control field for the property"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"required": [
|
|
3
|
+
"name",
|
|
4
|
+
"id",
|
|
5
|
+
"appliesTo",
|
|
6
|
+
"properties"
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"$id": "#/name",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"title": "element template name",
|
|
13
|
+
"description": "The name of the element template"
|
|
14
|
+
},
|
|
15
|
+
"id": {
|
|
16
|
+
"$id": "#/id",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"title": "element template id",
|
|
19
|
+
"description": "The identifier of the element template"
|
|
20
|
+
},
|
|
21
|
+
"description": {
|
|
22
|
+
"$id": "#/description",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"title": "element template description",
|
|
25
|
+
"description": "The description of the element template"
|
|
26
|
+
},
|
|
27
|
+
"version": {
|
|
28
|
+
"$id": "#/version",
|
|
29
|
+
"type": "number",
|
|
30
|
+
"title": "element template version",
|
|
31
|
+
"description": "The version of the element template"
|
|
32
|
+
},
|
|
33
|
+
"isDefault": {
|
|
34
|
+
"$id": "#/isDefault",
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"title": "element template is default",
|
|
37
|
+
"description": "Indicates whether the element template is a default template"
|
|
38
|
+
},
|
|
39
|
+
"appliesTo": {
|
|
40
|
+
"$id": "#/appliesTo",
|
|
41
|
+
"type": "array",
|
|
42
|
+
"title": "element template applies to",
|
|
43
|
+
"description": "The definition for which element types the element template can be applied",
|
|
44
|
+
"default": [],
|
|
45
|
+
"items": {
|
|
46
|
+
"$id": "#/appliesTo/items",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^(.*?:)",
|
|
49
|
+
"errorMessage": {
|
|
50
|
+
"pattern": "invalid item for \"appliesTo\", should contain namespaced property, example: \"bpmn:Task\""
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"metadata": {
|
|
55
|
+
"$id": "#/metadata",
|
|
56
|
+
"type": "object",
|
|
57
|
+
"title": "element template metadata",
|
|
58
|
+
"description": "Some metadata for further configuration"
|
|
59
|
+
},
|
|
60
|
+
"entriesVisible": {
|
|
61
|
+
"$id": "#/entriesVisible",
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"title": "element template entries visible",
|
|
64
|
+
"description": "Select whether non-template entries are visible in the properties panel"
|
|
65
|
+
},
|
|
66
|
+
"groups": {
|
|
67
|
+
"$ref": "groups.json"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"errorMessage": {
|
|
71
|
+
"required": {
|
|
72
|
+
"name": "missing template name",
|
|
73
|
+
"id": "missing template id",
|
|
74
|
+
"appliesTo": "missing appliesTo=[]",
|
|
75
|
+
"properties": "missing properties=[]"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "#/groups",
|
|
3
|
+
"type": "array",
|
|
4
|
+
"title": "element template properties groups",
|
|
5
|
+
"description": "The custom defined groups of the element template",
|
|
6
|
+
"default": [],
|
|
7
|
+
"items": {
|
|
8
|
+
"$id": "#/groups/group",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"title": "element template group",
|
|
11
|
+
"description": "A custom defined group for the element template",
|
|
12
|
+
"default": {},
|
|
13
|
+
"required": [
|
|
14
|
+
"id",
|
|
15
|
+
"label"
|
|
16
|
+
],
|
|
17
|
+
"errorMessage": {
|
|
18
|
+
"required": {
|
|
19
|
+
"id": "missing id for group \"${0#}\"",
|
|
20
|
+
"label": "missing label for group \"${0#}\""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"properties": {
|
|
24
|
+
"id": {
|
|
25
|
+
"$id": "#/groups/group/id",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"title": "group id",
|
|
28
|
+
"description": "The id of the custom group"
|
|
29
|
+
},
|
|
30
|
+
"label": {
|
|
31
|
+
"$id": "#/groups/group/label",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"title": "group label",
|
|
34
|
+
"description": "The label of the custom group"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|