-
Notifications
You must be signed in to change notification settings - Fork 2
/
properties.schema
310 lines (310 loc) · 11.3 KB
/
properties.schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"id": "http://jsonschema.net",
"$ref": "http://localhost/plugins/content/component/model.schema",
"properties":{
"_supportedLayout": {
"type": "string",
"required": true,
"enum": ["full-width", "half-width", "both"],
"default": "half-width",
"editorOnly": true
},
"instruction": {
"type": "string",
"required": false,
"default": "",
"title": "Instruction",
"inputType": "Text",
"validators": [],
"help": "This is the instruction text"
},
"_options": {
"type":"object",
"required":false,
"title": "Options",
"help": "Not required. Review property descriptions at visjs.org.",
"properties":{
"width": {
"type":"string",
"required":false,
"default": "",
"title": "Timeline Window Width",
"inputType": "Text",
"validators": [],
"help": "A number followed by '%' or 'px', (e.g., '100%')"
},
"height": {
"type":"string",
"required":false,
"default": "",
"title": "Timeline Window Height",
"inputType": "Text",
"validators": [],
"help": "A number followed by '%' or 'px', (e.g., '100%')"
},
"showCurrentTime": {
"type":"boolean",
"required":false,
"default": "",
"title": "Show Current Time",
"inputType": {"type": "Boolean", "options": [true, false]},
"validators": [],
"help": "When set to 'true', a vertical line will be displayed indicating the current time"
},
"template": {
"type":"string",
"required":false,
"default": "",
"title": "Default Template",
"inputType": "Asset:other",
"validators": [],
"help": "The name of the template (excluding the file extension) that will be applied to all items"
},
"align": {
"type":"string",
"required":false,
"default": "auto",
"title": "Content Alignment",
"enum": ["auto", "center", "left", "right"],
"inputType": {"type": "Select", "options":["auto", "center", "left", "right"]},
"validators": [],
"help": "Alignment of items with type 'box', 'range', and 'background'. Available values are 'auto' (default), 'center', 'left', or 'right'. For 'box' items, the 'auto' alignment is 'center'. For 'range' items, the auto alignment is dynamic: positioned left and shifted such that the contents is always visible on screen."
}
}
},
"_items-url":{
"type": "string",
"required": false,
"default": "",
"title": "External Item Data",
"inputType": "Asset:other",
"validators": [],
"help": "Optional. Select a file that contains item data."
},
"_items": {
"type":"array",
"required":true,
"minItems": 1,
"title": "Items",
"help": "At least one item is required. Review property descriptions at visjs.org.",
"items": {
"type": "object",
"required": true,
"properties":{
"id": {
"type":"string",
"required":true,
"default": "",
"title": "Item ID",
"inputType": "Text",
"validators": ["required"],
"help": "Numbers or letters that uniquely identify this item"
},
"content": {
"type":"string",
"required":true,
"inputType": "TextArea",
"default": "",
"title": "Content",
"validators": ["required"],
"help": "Plain text or HTML that will display as the item text"
},
"start": {
"type":"string",
"required":true,
"title": "Start",
"inputType": "Text",
"validators": ["required"],
"help": "Requires a date/time format compatible with vis.js"
},
"end": {
"type":"string",
"required":false,
"inputType": "Text",
"default": "",
"title": "End",
"validators": [],
"help": "Requires a date/time format compatible with vis.js"
},
"type": {
"type":"string",
"required":false,
"enum": ["box", "range", "point", "background"],
"inputType": {"type": "Select", "options":["box","range","point","background"]},
"default": "box",
"title": "Item Type",
"validators": [],
"help": "Determines the basic display type of the item"
},
"template": {
"type":"string",
"required":false,
"default": "",
"title": "Template",
"inputType": "Asset:other",
"validators": [],
"help": "The name of the template (excluding the file extension) that will be applied to this single item"
},
"className": {
"type":"string",
"required":false,
"default": "",
"title": "ClassName",
"inputType": "Text",
"validators": [],
"help": "A CSS class used to style this single item"
},
"style": {
"type":"string",
"required":false,
"default": "",
"title": "Style",
"inputType": "Text",
"validators": [],
"help": "Text for a CSS inline style to be applied to this single item"
},
"group": {
"type":"string",
"required":false,
"default": "",
"title": "Group",
"inputType": "Text",
"validators": [],
"help": "If the Groups option is used, this specifies which group this item belongs to. Must match one of the groups specified in the Groups options"
},
"subgroup": {
"type":"string",
"required":false,
"default": "",
"title": "Subgroup",
"inputType": "Text",
"validators": [],
"help": "Used to order items within a subgroup. Must be used in conjunction with the subgroupOrder option for Groups. Reference documentation on Visjs.org"
},
"title": {
"type":"string",
"required":false,
"default": "",
"title": "Tooltip Tex",
"inputType": "Text",
"validators": ["text"],
"help": "Plain text that displays as a tool-tip when hovering over an item"
}
}
}
},
"_groups-url":{
"type": "string",
"required": false,
"default": "",
"title": "External Groups Data",
"inputType": "Asset:other",
"validators": [],
"help": "Optional. Select a file that contains groups data."
},
"_groups": {
"type":"array",
"required":true,
"title": "Groups",
"help": "Not required. Review property descriptions at visjs.org. Note: If groups are used, items will not display unless the Group ID appears in the item's Group property.",
"items": {
"type": "object",
"required": false,
"properties":{
"id": {
"type": "string",
"required": true,
"default": "",
"title": "Group ID",
"inputType": "Text",
"validators": ["required"],
"help": "Numbers or letters that uniquely identify this group. All items with this ID will be grouped together"
},
"content": {
"type": "string",
"required": true,
"default": "",
"title": "content",
"inputType": "Text",
"validators":["required"],
"help": "Plain text or HTML that will display as the group's row header"
},
"className": {
"type":"string",
"required":false,
"default": "",
"title": "ClassName",
"inputType": "Text",
"validators": ["text"],
"help": "A CSS class used to style this single item"
},
"style": {
"type":"string",
"required":false,
"default": "",
"title": "ClassName",
"inputType": "Text",
"validators": [],
"help": "Text for a CSS inline style to be applied to this single item"
},
"subgroupOrder": {
"type":"string",
"required":false,
"default": "",
"title": "Subgroup Order",
"inputType": "Text",
"validators": [],
"help": "By default, groups are displayed in the order in which they are entered. Change this by entering the name of an item field by which they should be sorted or by entering a custom sort function"
},
"title": {
"type":"string",
"required":false,
"default": "",
"title": "Tooltip Text",
"inputType": "Text",
"validators": ["text"],
"help": "Plain text that displays as a tool-tip when hovering over a group"
},
"autoResize": {
"type":"boolean",
"required": false,
"default": true,
"title": "Auto Resize",
"inputType": {"type": "Boolean", "options": [true, false]},
"validators": [],
"help": "If true, the Timeline will automatically detect when its HTML container is resized, and will redraw itself accordingly. Defaults to 'True'."
},
"clickToUse": {
"type":"boolean",
"required": false,
"default": false,
"title": "Click Timeline to Activate",
"inputType": {"type": "Boolean", "options": [true, false]},
"validators": [],
"help": "If set to true, the Timeline will respond to mouse and touch events only after clicking on it. Defaults to false."
},
"dataAttributes": {
"type":"array",
"required": false,
"default": "",
"title": "Data Attributes",
"inputType": "Text",
"validators": [],
"help": "An array of fields optionally defined on the Timeline items that will be appended as data- attributes to the DOM element of the items. If value is 'all' then each field defined on the Timeline item will become a data- attribute."
},
"end": {
"type":"array",
"required": false,
"default": "",
"title": "Range End",
"inputType": "Text",
"validators": [],
"help": "The initial end date for the axis of the Timeline. If not provided, the chronologically last date present in the items set is used as end date."
}
}
}
}
}
}