-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathcomponent.schema.json
137 lines (137 loc) · 4.92 KB
/
component.schema.json
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
{
"$anchor": "accordion-component",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$merge": {
"source": {
"$ref": "component"
},
"with": {
"properties": {
"_supportedLayout": {
"type": "string",
"title": "Supported layout",
"default": "full-width",
"enum": [
"full-width",
"half-width",
"both"
],
"_adapt": {
"editorOnly": true
}
},
"instruction": {
"type": "string",
"title": "Instruction",
"default": "Select the headings to find out more.",
"_adapt": {
"translatable": true
}
},
"_setCompletionOn": {
"type": "string",
"title": "Completion criteria",
"description": "Whether completion is based on the learner having viewed all the accordion items - or just having viewed the component",
"default": "allItems",
"enum": [
"inview",
"allItems"
],
"_backboneForms": "Select"
},
"_items": {
"type": "array",
"title": "Items",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"title": "Title",
"default": "",
"_adapt": {
"translatable": true
}
},
"body": {
"type": "string",
"title": "Body",
"description": "This is the item body text that is hidden until the item title is clicked on",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
},
"_imageAlignment": {
"type": "string",
"title": "Image alignment",
"description": "Defines the alignment of the item image. Full: Image spans the entire width of the container below the text area. Left: Image aligned to the left of the text area. Right: Image aligned to the right of the text area. The default alignment is `full`. For smaller screens the alignment defaults to `full`.",
"default": "full",
"enum": [
"full",
"left",
"right"
],
"_backboneForms": "Select"
},
"_graphic": {
"type": "object",
"title": "Graphic",
"default": {},
"properties": {
"alt": {
"type": "string",
"title": "Alternative text",
"description": "A description of the image; required when it has meaning that must be conveyed to the learner. For 'decorative' images, leave this blank",
"default": "",
"_adapt": {
"translatable": true
}
},
"src": {
"type": "string",
"isObjectId": true,
"title": "Source",
"description": "Optional image which will be rendered with the item body text",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"attribution": {
"type": "string",
"title": "Attribution",
"description": "Text to be displayed as an attribution",
"default": "",
"_adapt": {
"translatable": true
}
}
}
},
"_classes": {
"type": "string",
"title": "Custom classes",
"description": "Custom classes that are applied to the accordion item. Supported classes 'align-image-left' and 'align-image-right' are available to align item image to the left or right in desktop view. On smaller screens the item image defaults underneath the item body text. Additional classes can be used but they must be predefined in one of the Less files. Separate multiple classes with a space",
"default": ""
}
}
}
},
"_shouldCollapseItems": {
"type": "boolean",
"title": "Automatically collapse items",
"description": "If disabled, upon expansion of an accordion item, any previously expanded items will not be collapsed",
"default": true
},
"_shouldExpandFirstItem": {
"type": "boolean",
"title": "Expand first item by default",
"default": false
}
}
}
}
}