@pie-element/hotspot 4.7.18-next.85 → 4.8.1-beta.587
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 +485 -0
- package/configure/CHANGELOG.md +425 -0
- package/configure/lib/button.js.map +1 -1
- package/configure/lib/defaults.js +24 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/hotspot-container.js +44 -23
- package/configure/lib/hotspot-container.js.map +1 -1
- package/configure/lib/hotspot-drawable.js +11 -5
- package/configure/lib/hotspot-drawable.js.map +1 -1
- package/configure/lib/hotspot-palette.js +1 -1
- package/configure/lib/hotspot-palette.js.map +1 -1
- package/configure/lib/hotspot-polygon.js +1 -1
- package/configure/lib/hotspot-polygon.js.map +1 -1
- package/configure/lib/hotspot-rectangle.js +1 -1
- package/configure/lib/hotspot-rectangle.js.map +1 -1
- package/configure/lib/index.js +17 -3
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/root.js +133 -27
- package/configure/lib/root.js.map +1 -1
- package/configure/lib/upload-control.js.map +1 -1
- package/configure/lib/utils.js +18 -4
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +4 -4
- package/configure/src/__tests__/__snapshots__/hotspot-container.test.js.snap +2 -1
- package/configure/src/__tests__/__snapshots__/root.test.js.snap +56 -4
- package/configure/src/__tests__/hotspot-container.test.js +98 -71
- package/configure/src/__tests__/hotspot-drawable.test.js +48 -49
- package/configure/src/__tests__/index.test.js +28 -51
- package/configure/src/__tests__/root.test.js +162 -82
- package/configure/src/__tests__/utils.test.js +112 -98
- package/configure/src/button.jsx +4 -4
- package/configure/src/defaults.js +36 -18
- package/configure/src/hotspot-container.jsx +107 -97
- package/configure/src/hotspot-drawable.jsx +59 -53
- package/configure/src/hotspot-palette.jsx +12 -25
- package/configure/src/hotspot-polygon.jsx +20 -22
- package/configure/src/hotspot-rectangle.jsx +5 -15
- package/configure/src/index.js +32 -18
- package/configure/src/root.jsx +120 -51
- package/configure/src/upload-control.jsx +9 -20
- package/configure/src/utils.js +51 -22
- package/controller/CHANGELOG.md +72 -0
- package/controller/lib/defaults.js +2 -2
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +57 -9
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +2 -2
- package/controller/src/__tests__/index.test.js +99 -55
- package/controller/src/defaults.js +5 -9
- package/controller/src/index.js +58 -34
- package/controller/src/utils.js +9 -6
- package/docs/config-schema.json +217 -0
- package/docs/config-schema.json.md +169 -0
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +54 -35
- package/docs/demo/session.js +2 -2
- package/docs/pie-schema.json +59 -0
- package/docs/pie-schema.json.md +47 -0
- package/lib/hotspot/container.js +44 -7
- package/lib/hotspot/container.js.map +1 -1
- package/lib/hotspot/icons.js.map +1 -1
- package/lib/hotspot/image.js +35 -8
- package/lib/hotspot/image.js.map +1 -1
- package/lib/hotspot/index.js +72 -18
- package/lib/hotspot/index.js.map +1 -1
- package/lib/hotspot/polygon.js +51 -32
- package/lib/hotspot/polygon.js.map +1 -1
- package/lib/hotspot/rectangle.js +51 -32
- package/lib/hotspot/rectangle.js.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/session-updater.js.map +1 -1
- package/package.json +7 -4
- package/src/__tests__/__snapshots__/{container-test.jsx.snap → container.test.jsx.snap} +8 -0
- package/src/__tests__/__snapshots__/image.test.jsx.snap +43 -0
- package/src/__tests__/__snapshots__/{polygon-test.jsx.snap → polygon.test.jsx.snap} +11 -0
- package/src/__tests__/__snapshots__/{rectangle-test.jsx.snap → rectangle.test.jsx.snap} +11 -0
- package/src/__tests__/container.test.jsx +214 -0
- package/src/__tests__/{image-test.jsx → image.test.jsx} +10 -2
- package/src/__tests__/polygon.test.jsx +235 -0
- package/src/__tests__/rectangle.test.jsx +237 -0
- package/src/__tests__/{session-updater-test.jsx → session-updater.test.jsx} +22 -31
- package/src/hotspot/container.jsx +60 -23
- package/src/hotspot/icons.js +4 -2
- package/src/hotspot/image.jsx +26 -13
- package/src/hotspot/index.jsx +73 -33
- package/src/hotspot/polygon.jsx +51 -40
- package/src/hotspot/rectangle.jsx +51 -40
- package/src/index.js +10 -18
- package/src/session-updater.js +1 -1
- package/src/__tests__/__snapshots__/image-test.jsx.snap +0 -21
- package/src/__tests__/container-test.jsx +0 -143
- package/src/__tests__/polygon-test.jsx +0 -76
- package/src/__tests__/rectangle-test.jsx +0 -77
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Config Object for @pie-elements/hotspot",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"multipleCorrect": {
|
|
7
|
+
"title": "ConfigureProp",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"settings": {
|
|
11
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "settings"
|
|
14
|
+
},
|
|
15
|
+
"label": {
|
|
16
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"title": "label"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"partialScoring": {
|
|
23
|
+
"title": "ConfigureProp",
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"settings": {
|
|
27
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"title": "settings"
|
|
30
|
+
},
|
|
31
|
+
"label": {
|
|
32
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"title": "label"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"rationale": {
|
|
39
|
+
"title": "ConfigureProp",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"settings": {
|
|
43
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"title": "settings"
|
|
46
|
+
},
|
|
47
|
+
"label": {
|
|
48
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"title": "label"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"settingsPanelDisabled": {
|
|
55
|
+
"description": "Indicates if the settings panel is not available",
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"title": "settingsPanelDisabled"
|
|
58
|
+
},
|
|
59
|
+
"spellCheck": {
|
|
60
|
+
"title": "ConfigureProp",
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"settings": {
|
|
64
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"title": "settings"
|
|
67
|
+
},
|
|
68
|
+
"label": {
|
|
69
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"title": "label"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"preserveAspectRatio": {
|
|
76
|
+
"title": "ConfigureProp",
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"settings": {
|
|
80
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"title": "settings"
|
|
83
|
+
},
|
|
84
|
+
"label": {
|
|
85
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"title": "label"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"minShapes": {
|
|
92
|
+
"description": "Minimum number of shapes",
|
|
93
|
+
"type": "number",
|
|
94
|
+
"title": "minShapes"
|
|
95
|
+
},
|
|
96
|
+
"maxShapes": {
|
|
97
|
+
"description": "Maximum number of shapes",
|
|
98
|
+
"type": "number",
|
|
99
|
+
"title": "maxShapes"
|
|
100
|
+
},
|
|
101
|
+
"maxSelections": {
|
|
102
|
+
"description": "Maximum number of selected shapes in correct answer",
|
|
103
|
+
"type": "number",
|
|
104
|
+
"title": "maxSelections"
|
|
105
|
+
},
|
|
106
|
+
"maxImageWidth": {
|
|
107
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"teacherInstructions": {
|
|
111
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
112
|
+
"type": "number",
|
|
113
|
+
"title": "teacherInstructions"
|
|
114
|
+
},
|
|
115
|
+
"prompt": {
|
|
116
|
+
"description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
|
|
117
|
+
"type": "number",
|
|
118
|
+
"title": "prompt"
|
|
119
|
+
},
|
|
120
|
+
"rationale": {
|
|
121
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
122
|
+
"type": "number",
|
|
123
|
+
"title": "rationale"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"maxImageHeight": {
|
|
128
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"teacherInstructions": {
|
|
132
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
133
|
+
"type": "number",
|
|
134
|
+
"title": "teacherInstructions"
|
|
135
|
+
},
|
|
136
|
+
"prompt": {
|
|
137
|
+
"description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
|
|
138
|
+
"type": "number",
|
|
139
|
+
"title": "prompt"
|
|
140
|
+
},
|
|
141
|
+
"rationale": {
|
|
142
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
143
|
+
"type": "number",
|
|
144
|
+
"title": "rationale"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"withRubric": {
|
|
149
|
+
"title": "ConfigureProp",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"settings": {
|
|
153
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"title": "settings"
|
|
156
|
+
},
|
|
157
|
+
"label": {
|
|
158
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"title": "label"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"showPrompt": {
|
|
165
|
+
"description": "Determines whether prompt field will be displayed or not",
|
|
166
|
+
"default": true,
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"title": "showPrompt"
|
|
169
|
+
},
|
|
170
|
+
"promptLabel": {
|
|
171
|
+
"description": "The label for the item stem/prompt field",
|
|
172
|
+
"default": "Item Stemm",
|
|
173
|
+
"type": "string",
|
|
174
|
+
"title": "promptLabel"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"definitions": {
|
|
178
|
+
"ConfigureProp": {
|
|
179
|
+
"title": "ConfigureProp",
|
|
180
|
+
"type": "object",
|
|
181
|
+
"properties": {
|
|
182
|
+
"settings": {
|
|
183
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"title": "settings"
|
|
186
|
+
},
|
|
187
|
+
"label": {
|
|
188
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
189
|
+
"type": "string",
|
|
190
|
+
"title": "label"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
195
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {
|
|
198
|
+
"teacherInstructions": {
|
|
199
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
200
|
+
"type": "number",
|
|
201
|
+
"title": "teacherInstructions"
|
|
202
|
+
},
|
|
203
|
+
"prompt": {
|
|
204
|
+
"description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
|
|
205
|
+
"type": "number",
|
|
206
|
+
"title": "prompt"
|
|
207
|
+
},
|
|
208
|
+
"rationale": {
|
|
209
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
210
|
+
"type": "number",
|
|
211
|
+
"title": "rationale"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
217
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Config Object for @pie-elements/hotspot
|
|
2
|
+
|
|
3
|
+
The schema defines the following properties:
|
|
4
|
+
|
|
5
|
+
# `multipleCorrect` (object)
|
|
6
|
+
|
|
7
|
+
Properties of the `multipleCorrect` object:
|
|
8
|
+
|
|
9
|
+
## `settings` (boolean)
|
|
10
|
+
|
|
11
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
12
|
+
|
|
13
|
+
## `label` (string)
|
|
14
|
+
|
|
15
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
16
|
+
|
|
17
|
+
# `partialScoring` (object)
|
|
18
|
+
|
|
19
|
+
Properties of the `partialScoring` object:
|
|
20
|
+
|
|
21
|
+
## `settings` (boolean)
|
|
22
|
+
|
|
23
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
24
|
+
|
|
25
|
+
## `label` (string)
|
|
26
|
+
|
|
27
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
28
|
+
|
|
29
|
+
# `rationale` (object)
|
|
30
|
+
|
|
31
|
+
Properties of the `rationale` object:
|
|
32
|
+
|
|
33
|
+
## `settings` (boolean)
|
|
34
|
+
|
|
35
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
36
|
+
|
|
37
|
+
## `label` (string)
|
|
38
|
+
|
|
39
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
40
|
+
|
|
41
|
+
# `settingsPanelDisabled` (boolean)
|
|
42
|
+
|
|
43
|
+
Indicates if the settings panel is not available
|
|
44
|
+
|
|
45
|
+
# `spellCheck` (object)
|
|
46
|
+
|
|
47
|
+
Properties of the `spellCheck` object:
|
|
48
|
+
|
|
49
|
+
## `settings` (boolean)
|
|
50
|
+
|
|
51
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
52
|
+
|
|
53
|
+
## `label` (string)
|
|
54
|
+
|
|
55
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
56
|
+
|
|
57
|
+
# `preserveAspectRatio` (object)
|
|
58
|
+
|
|
59
|
+
Properties of the `preserveAspectRatio` object:
|
|
60
|
+
|
|
61
|
+
## `settings` (boolean)
|
|
62
|
+
|
|
63
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
64
|
+
|
|
65
|
+
## `label` (string)
|
|
66
|
+
|
|
67
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
68
|
+
|
|
69
|
+
# `minShapes` (number)
|
|
70
|
+
|
|
71
|
+
Minimum number of shapes
|
|
72
|
+
|
|
73
|
+
# `maxShapes` (number)
|
|
74
|
+
|
|
75
|
+
Maximum number of shapes
|
|
76
|
+
|
|
77
|
+
# `maxSelections` (number)
|
|
78
|
+
|
|
79
|
+
Maximum number of selected shapes in correct answer
|
|
80
|
+
|
|
81
|
+
# `maxImageWidth` (object)
|
|
82
|
+
|
|
83
|
+
Properties of the `maxImageWidth` object:
|
|
84
|
+
|
|
85
|
+
## `teacherInstructions` (number)
|
|
86
|
+
|
|
87
|
+
Indicates the max dimension for images in teacher instructions
|
|
88
|
+
|
|
89
|
+
## `prompt` (number)
|
|
90
|
+
|
|
91
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
92
|
+
|
|
93
|
+
## `rationale` (number)
|
|
94
|
+
|
|
95
|
+
Indicates the max dimension for images in rationale
|
|
96
|
+
|
|
97
|
+
# `maxImageHeight` (object)
|
|
98
|
+
|
|
99
|
+
Properties of the `maxImageHeight` object:
|
|
100
|
+
|
|
101
|
+
## `teacherInstructions` (number)
|
|
102
|
+
|
|
103
|
+
Indicates the max dimension for images in teacher instructions
|
|
104
|
+
|
|
105
|
+
## `prompt` (number)
|
|
106
|
+
|
|
107
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
108
|
+
|
|
109
|
+
## `rationale` (number)
|
|
110
|
+
|
|
111
|
+
Indicates the max dimension for images in rationale
|
|
112
|
+
|
|
113
|
+
# `withRubric` (object)
|
|
114
|
+
|
|
115
|
+
Properties of the `withRubric` object:
|
|
116
|
+
|
|
117
|
+
## `settings` (boolean)
|
|
118
|
+
|
|
119
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
120
|
+
|
|
121
|
+
## `label` (string)
|
|
122
|
+
|
|
123
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
124
|
+
|
|
125
|
+
# `showPrompt` (boolean)
|
|
126
|
+
|
|
127
|
+
Determines whether prompt field will be displayed or not
|
|
128
|
+
|
|
129
|
+
Default: `true`
|
|
130
|
+
|
|
131
|
+
# `promptLabel` (string)
|
|
132
|
+
|
|
133
|
+
The label for the item stem/prompt field
|
|
134
|
+
|
|
135
|
+
Default: `"Item Stemm"`
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
# Sub Schemas
|
|
140
|
+
|
|
141
|
+
The schema defines the following additional types:
|
|
142
|
+
|
|
143
|
+
## `ConfigureProp` (object)
|
|
144
|
+
|
|
145
|
+
Properties of the `ConfigureProp` object:
|
|
146
|
+
|
|
147
|
+
### `settings` (boolean)
|
|
148
|
+
|
|
149
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
150
|
+
|
|
151
|
+
### `label` (string)
|
|
152
|
+
|
|
153
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
154
|
+
|
|
155
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
156
|
+
|
|
157
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
158
|
+
|
|
159
|
+
### `teacherInstructions` (number)
|
|
160
|
+
|
|
161
|
+
Indicates the max dimension for images in teacher instructions
|
|
162
|
+
|
|
163
|
+
### `prompt` (number)
|
|
164
|
+
|
|
165
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
166
|
+
|
|
167
|
+
### `rationale` (number)
|
|
168
|
+
|
|
169
|
+
Indicates the max dimension for images in rationale
|
package/docs/demo/config.js
CHANGED
package/docs/demo/generate.js
CHANGED
|
@@ -4,12 +4,14 @@ exports.model = (id, element) => ({
|
|
|
4
4
|
disabled: false,
|
|
5
5
|
mode: 'gather',
|
|
6
6
|
dimensions: { height: 291, width: 410 },
|
|
7
|
-
imageUrl:
|
|
8
|
-
|
|
7
|
+
imageUrl:
|
|
8
|
+
'https://store-images.s-microsoft.com/image/apps.2544.13768621950225582.167ba0c8-6eb8-47bb-96fe-278c89bf0dc9.ea440c13-fd1d-4705-b62c-9bfd9054b8b3?w=672&h=378&q=80&mode=letterbox&background=%23FFE4E4E4&format=jpg',
|
|
9
|
+
hotspotColor: 'rgba(137, 183, 244, 0.25)',
|
|
9
10
|
hotspotList: [
|
|
10
|
-
'rgba(137, 183, 244, 0.
|
|
11
|
-
'rgba(217, 30, 24, 0.
|
|
12
|
-
'rgba(254, 241, 96, 0.
|
|
11
|
+
'rgba(137, 183, 244, 0.25)',
|
|
12
|
+
'rgba(217, 30, 24, 0.25)',
|
|
13
|
+
'rgba(254, 241, 96, 0.25)',
|
|
14
|
+
'rgba(0, 0, 0, 0.1)',
|
|
13
15
|
],
|
|
14
16
|
outlineColor: 'blue',
|
|
15
17
|
outlineList: ['blue', 'red', 'yellow'],
|
|
@@ -22,46 +24,63 @@ exports.model = (id, element) => ({
|
|
|
22
24
|
width: 130,
|
|
23
25
|
x: 1,
|
|
24
26
|
y: 1,
|
|
25
|
-
correct: true
|
|
26
|
-
},
|
|
27
|
+
correct: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
27
30
|
id: 'd41',
|
|
28
31
|
height: 140,
|
|
29
32
|
width: 130,
|
|
30
33
|
x: 140,
|
|
31
|
-
y: 1
|
|
32
|
-
},
|
|
34
|
+
y: 1,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
33
37
|
id: 'aaaa42',
|
|
34
38
|
height: 140,
|
|
35
39
|
width: 130,
|
|
36
40
|
x: 280,
|
|
37
|
-
y: 1
|
|
38
|
-
}
|
|
41
|
+
y: 1,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
polygons: [
|
|
45
|
+
{
|
|
46
|
+
// triangle
|
|
47
|
+
id: '3',
|
|
48
|
+
points: [
|
|
49
|
+
{ x: 65, y: 148 },
|
|
50
|
+
{ x: 1, y: 288 },
|
|
51
|
+
{ y: 288, x: 129 },
|
|
52
|
+
],
|
|
53
|
+
correct: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
// triangle
|
|
57
|
+
id: 'g74',
|
|
58
|
+
points: [
|
|
59
|
+
{ y: 151, x: 141 },
|
|
60
|
+
{ y: 289, x: 205 },
|
|
61
|
+
{ x: 269, y: 151 },
|
|
62
|
+
],
|
|
63
|
+
correct: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
// hexagon
|
|
67
|
+
id: 'j35',
|
|
68
|
+
points: [
|
|
69
|
+
{ x: 300, y: 150 },
|
|
70
|
+
{ x: 279, y: 220 },
|
|
71
|
+
{ x: 300, y: 289 },
|
|
72
|
+
{ x: 386, y: 289 },
|
|
73
|
+
{ x: 407, y: 220 },
|
|
74
|
+
{ x: 386, y: 150 },
|
|
75
|
+
],
|
|
76
|
+
correct: false,
|
|
77
|
+
},
|
|
39
78
|
],
|
|
40
|
-
polygons: [{
|
|
41
|
-
// triangle
|
|
42
|
-
id: '3',
|
|
43
|
-
points: [{ x: 65, y: 148 }, { x: 1, y: 288 }, { y: 288, x: 129 }],
|
|
44
|
-
correct: true
|
|
45
|
-
}, {
|
|
46
|
-
// triangle
|
|
47
|
-
id: 'g74',
|
|
48
|
-
points: [{ y: 151, x: 141 }, { y: 289, x: 205 }, { x: 269, y: 151 }],
|
|
49
|
-
correct: false
|
|
50
|
-
}, {
|
|
51
|
-
// hexagon
|
|
52
|
-
id: 'j35',
|
|
53
|
-
points: [
|
|
54
|
-
{ x: 300, y: 150 },
|
|
55
|
-
{ x: 279, y: 220 },
|
|
56
|
-
{ x: 300, y: 289 },
|
|
57
|
-
{ x: 386, y: 289 },
|
|
58
|
-
{ x: 407, y: 220 },
|
|
59
|
-
{ x: 386, y: 150 }
|
|
60
|
-
],
|
|
61
|
-
correct: false
|
|
62
|
-
}]
|
|
63
79
|
},
|
|
64
80
|
rationale: null,
|
|
65
81
|
teacherInstructions: null,
|
|
66
|
-
|
|
82
|
+
toolbarEditorPosition: 'bottom',
|
|
83
|
+
prompt:
|
|
84
|
+
'<div><audio controls="controls" src="https://storage.googleapis.com/pie-prod-221718-assets/audio/77f3f61e-5f2d-425f-80a5-fb814dfa5e4c"></audio><br><br>Choose ALL of the words with the long /o/ sound.</div>',
|
|
85
|
+
rubricEnabled: false,
|
|
67
86
|
});
|
package/docs/demo/session.js
CHANGED
package/docs/pie-schema.json
CHANGED
|
@@ -200,6 +200,11 @@
|
|
|
200
200
|
"type": "boolean",
|
|
201
201
|
"title": "studentInstructionsEnabled"
|
|
202
202
|
},
|
|
203
|
+
"spellCheckEnabled": {
|
|
204
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true",
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"title": "spellCheckEnabled"
|
|
207
|
+
},
|
|
203
208
|
"strokeWidth": {
|
|
204
209
|
"description": "Indicates the width of the outline for a selection",
|
|
205
210
|
"type": "number",
|
|
@@ -210,6 +215,21 @@
|
|
|
210
215
|
"type": "boolean",
|
|
211
216
|
"title": "teacherInstructionsEnabled"
|
|
212
217
|
},
|
|
218
|
+
"toolbarEditorPosition": {
|
|
219
|
+
"description": "Indicates the editor's toolbar position which can be 'bottom' or 'top'",
|
|
220
|
+
"default": ": 'bottom'",
|
|
221
|
+
"enum": [
|
|
222
|
+
"bottom",
|
|
223
|
+
"top"
|
|
224
|
+
],
|
|
225
|
+
"type": "string",
|
|
226
|
+
"title": "toolbarEditorPosition"
|
|
227
|
+
},
|
|
228
|
+
"rubricEnabled": {
|
|
229
|
+
"description": "Indicates if Rubric is enabled",
|
|
230
|
+
"type": "boolean",
|
|
231
|
+
"title": "rubricEnabled"
|
|
232
|
+
},
|
|
213
233
|
"id": {
|
|
214
234
|
"description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
|
|
215
235
|
"type": "string",
|
|
@@ -228,12 +248,51 @@
|
|
|
228
248
|
"multipleCorrect",
|
|
229
249
|
"partialScoring",
|
|
230
250
|
"rationaleEnabled",
|
|
251
|
+
"rubricEnabled",
|
|
231
252
|
"shapes",
|
|
253
|
+
"spellCheckEnabled",
|
|
232
254
|
"strokeWidth",
|
|
233
255
|
"studentInstructionsEnabled",
|
|
234
256
|
"teacherInstructionsEnabled"
|
|
235
257
|
],
|
|
236
258
|
"definitions": {
|
|
259
|
+
"ConfigureProp": {
|
|
260
|
+
"title": "ConfigureProp",
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"settings": {
|
|
264
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
265
|
+
"type": "boolean",
|
|
266
|
+
"title": "settings"
|
|
267
|
+
},
|
|
268
|
+
"label": {
|
|
269
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
270
|
+
"type": "string",
|
|
271
|
+
"title": "label"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
276
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
277
|
+
"type": "object",
|
|
278
|
+
"properties": {
|
|
279
|
+
"teacherInstructions": {
|
|
280
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
281
|
+
"type": "number",
|
|
282
|
+
"title": "teacherInstructions"
|
|
283
|
+
},
|
|
284
|
+
"prompt": {
|
|
285
|
+
"description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
|
|
286
|
+
"type": "number",
|
|
287
|
+
"title": "prompt"
|
|
288
|
+
},
|
|
289
|
+
"rationale": {
|
|
290
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
291
|
+
"type": "number",
|
|
292
|
+
"title": "rationale"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
237
296
|
"Shape": {
|
|
238
297
|
"title": "Shape",
|
|
239
298
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -138,6 +138,10 @@ Indicates if Rationale are enabled
|
|
|
138
138
|
|
|
139
139
|
Indicates if Student Instructions are enabled
|
|
140
140
|
|
|
141
|
+
# `spellCheckEnabled` (boolean, required)
|
|
142
|
+
|
|
143
|
+
Indicates if spellcheck is enabled for the author. Default value is true
|
|
144
|
+
|
|
141
145
|
# `strokeWidth` (number, required)
|
|
142
146
|
|
|
143
147
|
Indicates the width of the outline for a selection
|
|
@@ -146,6 +150,21 @@ Indicates the width of the outline for a selection
|
|
|
146
150
|
|
|
147
151
|
Indicates if Teacher Instructions are enabled
|
|
148
152
|
|
|
153
|
+
# `toolbarEditorPosition` (string, enum)
|
|
154
|
+
|
|
155
|
+
Indicates the editor's toolbar position which can be 'bottom' or 'top'
|
|
156
|
+
|
|
157
|
+
This element must be one of the following enum values:
|
|
158
|
+
|
|
159
|
+
* `bottom`
|
|
160
|
+
* `top`
|
|
161
|
+
|
|
162
|
+
Default: `": 'bottom'"`
|
|
163
|
+
|
|
164
|
+
# `rubricEnabled` (boolean, required)
|
|
165
|
+
|
|
166
|
+
Indicates if Rubric is enabled
|
|
167
|
+
|
|
149
168
|
# `id` (string, required)
|
|
150
169
|
|
|
151
170
|
Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
|
|
@@ -160,6 +179,34 @@ The html Element tag name
|
|
|
160
179
|
|
|
161
180
|
The schema defines the following additional types:
|
|
162
181
|
|
|
182
|
+
## `ConfigureProp` (object)
|
|
183
|
+
|
|
184
|
+
Properties of the `ConfigureProp` object:
|
|
185
|
+
|
|
186
|
+
### `settings` (boolean)
|
|
187
|
+
|
|
188
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
189
|
+
|
|
190
|
+
### `label` (string)
|
|
191
|
+
|
|
192
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
193
|
+
|
|
194
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
195
|
+
|
|
196
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
197
|
+
|
|
198
|
+
### `teacherInstructions` (number)
|
|
199
|
+
|
|
200
|
+
Indicates the max dimension for images in teacher instructions
|
|
201
|
+
|
|
202
|
+
### `prompt` (number)
|
|
203
|
+
|
|
204
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
205
|
+
|
|
206
|
+
### `rationale` (number)
|
|
207
|
+
|
|
208
|
+
Indicates the max dimension for images in rationale
|
|
209
|
+
|
|
163
210
|
## `Shape` (object)
|
|
164
211
|
|
|
165
212
|
Properties of the `Shape` object:
|