@pie-element/drawing-response 3.9.8 → 3.9.10-beta.1443
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 +381 -0
- package/configure/CHANGELOG.md +363 -0
- package/configure/lib/button.js.map +1 -1
- package/configure/lib/defaults.js +21 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/image-container.js +37 -21
- package/configure/lib/image-container.js.map +1 -1
- package/configure/lib/index.js +64 -11
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/root.js +65 -30
- package/configure/lib/root.js.map +1 -1
- package/configure/package.json +4 -4
- package/configure/src/__tests__/__snapshots__/image-container.test.jsx.snap +3 -2
- package/configure/src/__tests__/__snapshots__/root.test.jsx.snap +34 -14
- package/configure/src/__tests__/image-container.test.jsx +42 -35
- package/configure/src/__tests__/index.test.js +7 -7
- package/configure/src/__tests__/root.test.jsx +18 -18
- package/configure/src/button.jsx +4 -4
- package/configure/src/defaults.js +24 -5
- package/configure/src/image-container.jsx +80 -59
- package/configure/src/index.js +46 -14
- package/configure/src/root.jsx +71 -63
- package/controller/CHANGELOG.md +20 -0
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +13 -7
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/controller/src/__tests__/index.test.js +29 -19
- package/controller/src/defaults.js +2 -2
- package/controller/src/index.js +13 -14
- package/docs/config-schema.json +126 -0
- package/docs/config-schema.json.md +97 -1
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +4 -2
- package/docs/demo/session.js +4 -4
- package/docs/pie-schema.json +60 -0
- package/docs/pie-schema.json.md +44 -0
- package/lib/drawing-response/button.js.map +1 -1
- package/lib/drawing-response/constants.js.map +1 -1
- package/lib/drawing-response/container.js +73 -22
- package/lib/drawing-response/container.js.map +1 -1
- package/lib/drawing-response/drawable-image.js +1 -0
- package/lib/drawing-response/drawable-image.js.map +1 -1
- package/lib/drawing-response/drawable-main.js +45 -15
- package/lib/drawing-response/drawable-main.js.map +1 -1
- package/lib/drawing-response/drawable-palette.js +6 -1
- package/lib/drawing-response/drawable-palette.js.map +1 -1
- package/lib/drawing-response/drawable-text.js +15 -5
- package/lib/drawing-response/drawable-text.js.map +1 -1
- package/lib/drawing-response/drawable-transformer.js.map +1 -1
- package/lib/drawing-response/factory.js.map +1 -1
- package/lib/drawing-response/icon.js.map +1 -1
- package/lib/drawing-response/index.js +3 -0
- package/lib/drawing-response/index.js.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/drawing-index-test.jsx +4 -4
- package/src/drawing-response/__tests__/__snapshots__/container.test.jsx.snap +174 -290
- package/src/drawing-response/__tests__/__snapshots__/drawing-main.test.jsx.snap +26 -2
- package/src/drawing-response/__tests__/container.test.jsx +9 -2
- package/src/drawing-response/__tests__/drawable-helper.test.jsx +1 -1
- package/src/drawing-response/__tests__/drawing-main.test.jsx +74 -86
- package/src/drawing-response/button.jsx +5 -8
- package/src/drawing-response/constants.js +42 -34
- package/src/drawing-response/container.jsx +93 -70
- package/src/drawing-response/drawable-image.jsx +5 -4
- package/src/drawing-response/drawable-main.jsx +46 -17
- package/src/drawing-response/drawable-palette.jsx +18 -35
- package/src/drawing-response/drawable-text.jsx +34 -48
- package/src/drawing-response/drawable-transformer.jsx +3 -1
- package/src/drawing-response/factory.js +3 -11
- package/src/drawing-response/icon.jsx +19 -20
- package/src/drawing-response/index.jsx +9 -15
- package/src/index.js +8 -11
package/controller/src/index.js
CHANGED
|
@@ -3,33 +3,32 @@ import defaults from './defaults';
|
|
|
3
3
|
|
|
4
4
|
const log = debug('pie-elements:drawing-response:controller');
|
|
5
5
|
|
|
6
|
-
export const normalize = question => ({
|
|
6
|
+
export const normalize = (question) => ({
|
|
7
7
|
promptEnabled: true,
|
|
8
8
|
teacherInstructionsEnabled: true,
|
|
9
9
|
studentInstructionsEnabled: true,
|
|
10
|
+
backgroundImageEnabled: true,
|
|
10
11
|
...question,
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
export function model(question, session, env) {
|
|
14
15
|
const normalizedQuestion = normalize(question);
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
prompt,
|
|
19
|
-
promptEnabled
|
|
20
|
-
} = normalizedQuestion;
|
|
21
|
-
|
|
22
|
-
return new Promise(resolve => {
|
|
16
|
+
const { imageUrl, imageDimensions, prompt, promptEnabled, backgroundImageEnabled } = normalizedQuestion;
|
|
17
|
+
|
|
18
|
+
return new Promise((resolve) => {
|
|
23
19
|
const out = {
|
|
24
20
|
disabled: env.mode !== 'gather',
|
|
25
21
|
mode: env.mode,
|
|
26
22
|
imageDimensions,
|
|
27
23
|
imageUrl,
|
|
28
24
|
prompt: promptEnabled ? prompt : null,
|
|
25
|
+
backgroundImageEnabled,
|
|
29
26
|
};
|
|
30
27
|
|
|
31
28
|
if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
|
|
32
|
-
out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled
|
|
29
|
+
out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled
|
|
30
|
+
? normalizedQuestion.teacherInstructions
|
|
31
|
+
: null;
|
|
33
32
|
} else {
|
|
34
33
|
out.teacherInstructions = null;
|
|
35
34
|
}
|
|
@@ -39,20 +38,20 @@ export function model(question, session, env) {
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
export const createDefaultModel = (model = {}) =>
|
|
42
|
-
new Promise(resolve => {
|
|
41
|
+
new Promise((resolve) => {
|
|
43
42
|
resolve({
|
|
44
43
|
...defaults,
|
|
45
44
|
...model,
|
|
46
|
-
})
|
|
45
|
+
});
|
|
47
46
|
});
|
|
48
47
|
|
|
49
48
|
export function outcome(/*config, session*/) {
|
|
50
|
-
return new Promise(resolve => {
|
|
49
|
+
return new Promise((resolve) => {
|
|
51
50
|
log('outcome...');
|
|
52
51
|
resolve({
|
|
53
52
|
score: 0,
|
|
54
53
|
completed: 'n/a',
|
|
55
|
-
note: 'Requires manual scoring'
|
|
54
|
+
note: 'Requires manual scoring',
|
|
56
55
|
});
|
|
57
56
|
});
|
|
58
57
|
}
|
package/docs/config-schema.json
CHANGED
|
@@ -40,6 +40,27 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
"settingsPanelDisabled": {
|
|
44
|
+
"description": "Indicates if the settings panel is not available",
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"title": "settingsPanelDisabled"
|
|
47
|
+
},
|
|
48
|
+
"spellCheck": {
|
|
49
|
+
"title": "ConfigureProp",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"settings": {
|
|
53
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"title": "settings"
|
|
56
|
+
},
|
|
57
|
+
"label": {
|
|
58
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"title": "label"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
43
64
|
"studentInstructions": {
|
|
44
65
|
"title": "ConfigureProp",
|
|
45
66
|
"type": "object",
|
|
@@ -72,6 +93,69 @@
|
|
|
72
93
|
}
|
|
73
94
|
}
|
|
74
95
|
},
|
|
96
|
+
"maxImageWidth": {
|
|
97
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"teacherInstructions": {
|
|
101
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
102
|
+
"type": "number",
|
|
103
|
+
"title": "teacherInstructions"
|
|
104
|
+
},
|
|
105
|
+
"prompt": {
|
|
106
|
+
"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",
|
|
107
|
+
"type": "number",
|
|
108
|
+
"title": "prompt"
|
|
109
|
+
},
|
|
110
|
+
"rationale": {
|
|
111
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
112
|
+
"type": "number",
|
|
113
|
+
"title": "rationale"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"maxImageHeight": {
|
|
118
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"teacherInstructions": {
|
|
122
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
123
|
+
"type": "number",
|
|
124
|
+
"title": "teacherInstructions"
|
|
125
|
+
},
|
|
126
|
+
"prompt": {
|
|
127
|
+
"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",
|
|
128
|
+
"type": "number",
|
|
129
|
+
"title": "prompt"
|
|
130
|
+
},
|
|
131
|
+
"rationale": {
|
|
132
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
133
|
+
"type": "number",
|
|
134
|
+
"title": "rationale"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"withRubric": {
|
|
139
|
+
"title": "ConfigureWithForceProp",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"properties": {
|
|
142
|
+
"settings": {
|
|
143
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"title": "settings"
|
|
146
|
+
},
|
|
147
|
+
"label": {
|
|
148
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
149
|
+
"type": "string",
|
|
150
|
+
"title": "label"
|
|
151
|
+
},
|
|
152
|
+
"forceEnabled": {
|
|
153
|
+
"description": "Indicates the value for the toggle; if true, this property will not be visible in Settings Panel",
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"title": "forceEnabled"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
75
159
|
"showPrompt": {
|
|
76
160
|
"description": "Determines whether prompt field will be displayed or not",
|
|
77
161
|
"default": true,
|
|
@@ -122,6 +206,48 @@
|
|
|
122
206
|
"title": "label"
|
|
123
207
|
}
|
|
124
208
|
}
|
|
209
|
+
},
|
|
210
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
211
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"teacherInstructions": {
|
|
215
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
216
|
+
"type": "number",
|
|
217
|
+
"title": "teacherInstructions"
|
|
218
|
+
},
|
|
219
|
+
"prompt": {
|
|
220
|
+
"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",
|
|
221
|
+
"type": "number",
|
|
222
|
+
"title": "prompt"
|
|
223
|
+
},
|
|
224
|
+
"rationale": {
|
|
225
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
226
|
+
"type": "number",
|
|
227
|
+
"title": "rationale"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"ConfigureWithForceProp": {
|
|
232
|
+
"title": "ConfigureWithForceProp",
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"settings": {
|
|
236
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
237
|
+
"type": "boolean",
|
|
238
|
+
"title": "settings"
|
|
239
|
+
},
|
|
240
|
+
"label": {
|
|
241
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
242
|
+
"type": "string",
|
|
243
|
+
"title": "label"
|
|
244
|
+
},
|
|
245
|
+
"forceEnabled": {
|
|
246
|
+
"description": "Indicates the value for the toggle; if true, this property will not be visible in Settings Panel",
|
|
247
|
+
"type": "boolean",
|
|
248
|
+
"title": "forceEnabled"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
125
251
|
}
|
|
126
252
|
},
|
|
127
253
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -31,6 +31,22 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
31
31
|
|
|
32
32
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
33
33
|
|
|
34
|
+
# `settingsPanelDisabled` (boolean)
|
|
35
|
+
|
|
36
|
+
Indicates if the settings panel is not available
|
|
37
|
+
|
|
38
|
+
# `spellCheck` (object)
|
|
39
|
+
|
|
40
|
+
Properties of the `spellCheck` object:
|
|
41
|
+
|
|
42
|
+
## `settings` (boolean)
|
|
43
|
+
|
|
44
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
45
|
+
|
|
46
|
+
## `label` (string)
|
|
47
|
+
|
|
48
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
49
|
+
|
|
34
50
|
# `studentInstructions` (object)
|
|
35
51
|
|
|
36
52
|
Properties of the `studentInstructions` object:
|
|
@@ -55,6 +71,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
55
71
|
|
|
56
72
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
57
73
|
|
|
74
|
+
# `maxImageWidth` (object)
|
|
75
|
+
|
|
76
|
+
Properties of the `maxImageWidth` object:
|
|
77
|
+
|
|
78
|
+
## `teacherInstructions` (number)
|
|
79
|
+
|
|
80
|
+
Indicates the max dimension for images in teacher instructions
|
|
81
|
+
|
|
82
|
+
## `prompt` (number)
|
|
83
|
+
|
|
84
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
85
|
+
|
|
86
|
+
## `rationale` (number)
|
|
87
|
+
|
|
88
|
+
Indicates the max dimension for images in rationale
|
|
89
|
+
|
|
90
|
+
# `maxImageHeight` (object)
|
|
91
|
+
|
|
92
|
+
Properties of the `maxImageHeight` object:
|
|
93
|
+
|
|
94
|
+
## `teacherInstructions` (number)
|
|
95
|
+
|
|
96
|
+
Indicates the max dimension for images in teacher instructions
|
|
97
|
+
|
|
98
|
+
## `prompt` (number)
|
|
99
|
+
|
|
100
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
101
|
+
|
|
102
|
+
## `rationale` (number)
|
|
103
|
+
|
|
104
|
+
Indicates the max dimension for images in rationale
|
|
105
|
+
|
|
106
|
+
# `withRubric` (object)
|
|
107
|
+
|
|
108
|
+
Properties of the `withRubric` object:
|
|
109
|
+
|
|
110
|
+
## `settings` (boolean)
|
|
111
|
+
|
|
112
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
113
|
+
|
|
114
|
+
## `label` (string)
|
|
115
|
+
|
|
116
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
117
|
+
|
|
118
|
+
## `forceEnabled` (boolean)
|
|
119
|
+
|
|
120
|
+
Indicates the value for the toggle; if true, this property will not be visible in Settings Panel
|
|
121
|
+
|
|
58
122
|
# `showPrompt` (boolean)
|
|
59
123
|
|
|
60
124
|
Determines whether prompt field will be displayed or not
|
|
@@ -100,4 +164,36 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
100
164
|
|
|
101
165
|
### `label` (string)
|
|
102
166
|
|
|
103
|
-
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
167
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
168
|
+
|
|
169
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
170
|
+
|
|
171
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
172
|
+
|
|
173
|
+
### `teacherInstructions` (number)
|
|
174
|
+
|
|
175
|
+
Indicates the max dimension for images in teacher instructions
|
|
176
|
+
|
|
177
|
+
### `prompt` (number)
|
|
178
|
+
|
|
179
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
180
|
+
|
|
181
|
+
### `rationale` (number)
|
|
182
|
+
|
|
183
|
+
Indicates the max dimension for images in rationale
|
|
184
|
+
|
|
185
|
+
## `ConfigureWithForceProp` (object)
|
|
186
|
+
|
|
187
|
+
Properties of the `ConfigureWithForceProp` object:
|
|
188
|
+
|
|
189
|
+
### `settings` (boolean)
|
|
190
|
+
|
|
191
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
192
|
+
|
|
193
|
+
### `label` (string)
|
|
194
|
+
|
|
195
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
196
|
+
|
|
197
|
+
### `forceEnabled` (boolean)
|
|
198
|
+
|
|
199
|
+
Indicates the value for the toggle; if true, this property will not be visible in Settings Panel
|
package/docs/demo/config.js
CHANGED
package/docs/demo/generate.js
CHANGED
|
@@ -3,10 +3,12 @@ exports.model = (id, element) => ({
|
|
|
3
3
|
element,
|
|
4
4
|
prompt: 'This is the question prompt',
|
|
5
5
|
promptEnabled: true,
|
|
6
|
+
backgroundImageEnabled: true,
|
|
6
7
|
toolbarEditorPosition: 'bottom',
|
|
7
8
|
imageUrl: '',
|
|
8
9
|
imageDimensions: {
|
|
9
10
|
height: 0,
|
|
10
|
-
width: 0
|
|
11
|
-
}
|
|
11
|
+
width: 0,
|
|
12
|
+
},
|
|
13
|
+
rubricEnabled: false,
|
|
12
14
|
});
|
package/docs/demo/session.js
CHANGED
package/docs/pie-schema.json
CHANGED
|
@@ -63,6 +63,16 @@
|
|
|
63
63
|
"type": "boolean",
|
|
64
64
|
"title": "teacherInstructionsEnabled"
|
|
65
65
|
},
|
|
66
|
+
"spellCheckEnabled": {
|
|
67
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true",
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"title": "spellCheckEnabled"
|
|
70
|
+
},
|
|
71
|
+
"backgroundImageEnabled": {
|
|
72
|
+
"description": "Indicates if Background Image is enabled",
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"title": "backgroundImageEnabled"
|
|
75
|
+
},
|
|
66
76
|
"toolbarEditorPosition": {
|
|
67
77
|
"description": "Indicates the editor's toolbar position which can be 'bottom' or 'top'",
|
|
68
78
|
"default": ": 'bottom'",
|
|
@@ -73,6 +83,11 @@
|
|
|
73
83
|
"type": "string",
|
|
74
84
|
"title": "toolbarEditorPosition"
|
|
75
85
|
},
|
|
86
|
+
"rubricEnabled": {
|
|
87
|
+
"description": "Indicates if Rubric is enabled",
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"title": "rubricEnabled"
|
|
90
|
+
},
|
|
76
91
|
"id": {
|
|
77
92
|
"description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
|
|
78
93
|
"type": "string",
|
|
@@ -85,9 +100,12 @@
|
|
|
85
100
|
}
|
|
86
101
|
},
|
|
87
102
|
"required": [
|
|
103
|
+
"backgroundImageEnabled",
|
|
88
104
|
"element",
|
|
89
105
|
"id",
|
|
90
106
|
"imageDimensions",
|
|
107
|
+
"rubricEnabled",
|
|
108
|
+
"spellCheckEnabled",
|
|
91
109
|
"studentInstructionsEnabled",
|
|
92
110
|
"teacherInstructionsEnabled"
|
|
93
111
|
],
|
|
@@ -129,6 +147,48 @@
|
|
|
129
147
|
}
|
|
130
148
|
}
|
|
131
149
|
},
|
|
150
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
151
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"teacherInstructions": {
|
|
155
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
156
|
+
"type": "number",
|
|
157
|
+
"title": "teacherInstructions"
|
|
158
|
+
},
|
|
159
|
+
"prompt": {
|
|
160
|
+
"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",
|
|
161
|
+
"type": "number",
|
|
162
|
+
"title": "prompt"
|
|
163
|
+
},
|
|
164
|
+
"rationale": {
|
|
165
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
166
|
+
"type": "number",
|
|
167
|
+
"title": "rationale"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"ConfigureWithForceProp": {
|
|
172
|
+
"title": "ConfigureWithForceProp",
|
|
173
|
+
"type": "object",
|
|
174
|
+
"properties": {
|
|
175
|
+
"settings": {
|
|
176
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"title": "settings"
|
|
179
|
+
},
|
|
180
|
+
"label": {
|
|
181
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
182
|
+
"type": "string",
|
|
183
|
+
"title": "label"
|
|
184
|
+
},
|
|
185
|
+
"forceEnabled": {
|
|
186
|
+
"description": "Indicates the value for the toggle; if true, this property will not be visible in Settings Panel",
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"title": "forceEnabled"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
132
192
|
"Dimension": {
|
|
133
193
|
"title": "Dimension",
|
|
134
194
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -46,6 +46,14 @@ Indicates if Student Instructions are enabled
|
|
|
46
46
|
|
|
47
47
|
Indicates if Teacher Instructions are enabled
|
|
48
48
|
|
|
49
|
+
# `spellCheckEnabled` (boolean, required)
|
|
50
|
+
|
|
51
|
+
Indicates if spellcheck is enabled for the author. Default value is true
|
|
52
|
+
|
|
53
|
+
# `backgroundImageEnabled` (boolean, required)
|
|
54
|
+
|
|
55
|
+
Indicates if Background Image is enabled
|
|
56
|
+
|
|
49
57
|
# `toolbarEditorPosition` (string, enum)
|
|
50
58
|
|
|
51
59
|
Indicates the editor's toolbar position which can be 'bottom' or 'top'
|
|
@@ -57,6 +65,10 @@ This element must be one of the following enum values:
|
|
|
57
65
|
|
|
58
66
|
Default: `": 'bottom'"`
|
|
59
67
|
|
|
68
|
+
# `rubricEnabled` (boolean, required)
|
|
69
|
+
|
|
70
|
+
Indicates if Rubric is enabled
|
|
71
|
+
|
|
60
72
|
# `id` (string, required)
|
|
61
73
|
|
|
62
74
|
Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
|
|
@@ -100,6 +112,38 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
100
112
|
|
|
101
113
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
102
114
|
|
|
115
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
116
|
+
|
|
117
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
118
|
+
|
|
119
|
+
### `teacherInstructions` (number)
|
|
120
|
+
|
|
121
|
+
Indicates the max dimension for images in teacher instructions
|
|
122
|
+
|
|
123
|
+
### `prompt` (number)
|
|
124
|
+
|
|
125
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
126
|
+
|
|
127
|
+
### `rationale` (number)
|
|
128
|
+
|
|
129
|
+
Indicates the max dimension for images in rationale
|
|
130
|
+
|
|
131
|
+
## `ConfigureWithForceProp` (object)
|
|
132
|
+
|
|
133
|
+
Properties of the `ConfigureWithForceProp` object:
|
|
134
|
+
|
|
135
|
+
### `settings` (boolean)
|
|
136
|
+
|
|
137
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
138
|
+
|
|
139
|
+
### `label` (string)
|
|
140
|
+
|
|
141
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
142
|
+
|
|
143
|
+
### `forceEnabled` (boolean)
|
|
144
|
+
|
|
145
|
+
Indicates the value for the toggle; if true, this property will not be visible in Settings Panel
|
|
146
|
+
|
|
103
147
|
## `Dimension` (object)
|
|
104
148
|
|
|
105
149
|
Properties of the `Dimension` object:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/drawing-response/button.jsx"],"names":["RawButton","classes","className","label","onClick","disabled","title","addButton","propTypes","PropTypes","object","isRequired","string","bool","oneOfType","func","defaultProps","styles","fontSize","marginLeft","minWidth","height","width","ButtonStyled"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,SAAZ,QAAYA,SAAZ;AAAA,MAAuBC,KAAvB,QAAuBA,KAAvB;AAAA,MAA8BC,OAA9B,QAA8BA,OAA9B;AAAA,MAAuCC,QAAvC,QAAuCA,QAAvC;AAAA,MAAiDC,KAAjD,QAAiDA,KAAjD;AAAA,sBAChB,gCAAC,kBAAD;AACE,IAAA,KAAK,EAAEA,KADT;AAEE,IAAA,OAAO,EAAEF,OAFX;AAGE,IAAA,QAAQ,EAAEC,QAHZ;AAIE,IAAA,SAAS,EAAE,4BAAWJ,OAAO,CAACM,SAAnB,EAA8BL,SAA9B,CAJb;AAKE,IAAA,IAAI,EAAC,OALP;AAME,IAAA,OAAO,EAAC,WANV;AAOE,IAAA,KAAK,EAAC;AAPR,KASGC,KATH,CADgB;AAAA,CAAlB;;AAcAH,SAAS,CAACQ,SAAV,GAAsB;AACpBP,EAAAA,OAAO,EAAEQ,sBAAUC,MAAV,CAAiBC,UADN;AAEpBT,EAAAA,SAAS,EAAEO,sBAAUG,MAFD;AAGpBP,EAAAA,QAAQ,EAAEI,sBAAUI,IAHA;AAIpBV,EAAAA,KAAK,EAAEM,sBAAUK,SAAV,CAAoB,
|
|
1
|
+
{"version":3,"sources":["../../src/drawing-response/button.jsx"],"names":["RawButton","classes","className","label","onClick","disabled","title","addButton","propTypes","PropTypes","object","isRequired","string","bool","oneOfType","func","defaultProps","styles","fontSize","marginLeft","minWidth","height","width","ButtonStyled"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,SAAZ,QAAYA,SAAZ;AAAA,MAAuBC,KAAvB,QAAuBA,KAAvB;AAAA,MAA8BC,OAA9B,QAA8BA,OAA9B;AAAA,MAAuCC,QAAvC,QAAuCA,QAAvC;AAAA,MAAiDC,KAAjD,QAAiDA,KAAjD;AAAA,sBAChB,gCAAC,kBAAD;AACE,IAAA,KAAK,EAAEA,KADT;AAEE,IAAA,OAAO,EAAEF,OAFX;AAGE,IAAA,QAAQ,EAAEC,QAHZ;AAIE,IAAA,SAAS,EAAE,4BAAWJ,OAAO,CAACM,SAAnB,EAA8BL,SAA9B,CAJb;AAKE,IAAA,IAAI,EAAC,OALP;AAME,IAAA,OAAO,EAAC,WANV;AAOE,IAAA,KAAK,EAAC;AAPR,KASGC,KATH,CADgB;AAAA,CAAlB;;AAcAH,SAAS,CAACQ,SAAV,GAAsB;AACpBP,EAAAA,OAAO,EAAEQ,sBAAUC,MAAV,CAAiBC,UADN;AAEpBT,EAAAA,SAAS,EAAEO,sBAAUG,MAFD;AAGpBP,EAAAA,QAAQ,EAAEI,sBAAUI,IAHA;AAIpBV,EAAAA,KAAK,EAAEM,sBAAUK,SAAV,CAAoB,CAACL,sBAAUG,MAAX,EAAmBH,sBAAUC,MAA7B,CAApB,CAJa;AAKpBN,EAAAA,OAAO,EAAEK,sBAAUM,IALC;AAMpBT,EAAAA,KAAK,EAAEG,sBAAUG;AANG,CAAtB;AASAZ,SAAS,CAACgB,YAAV,GAAyB;AACvBd,EAAAA,SAAS,EAAE,EADY;AAEvBG,EAAAA,QAAQ,EAAE,KAFa;AAGvBF,EAAAA,KAAK,EAAE,KAHgB;AAIvBC,EAAAA,OAAO,EAAE,mBAAM,CAAE,CAJM;AAKvBE,EAAAA,KAAK,EAAE;AALgB,CAAzB;;AAQA,IAAMW,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBV,IAAAA,SAAS,EAAE;AACTW,MAAAA,QAAQ,EAAE,OADD;AAETC,MAAAA,UAAU,EAAE,CAFH;AAGTC,MAAAA,QAAQ,EAAE,EAHD;AAITC,MAAAA,MAAM,EAAE,EAJC;AAMT,gBAAU;AACR,iBAAS;AACPC,UAAAA,KAAK,EAAE,kBADA;AAEPD,UAAAA,MAAM,EAAE;AAFD;AADD;AAND;AADS,GAAP;AAAA,CAAf;;AAgBA,IAAME,YAAY,GAAG,wBAAWN,MAAX,EAAmBjB,SAAnB,CAArB;eAEeuB,Y","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport Button from '@material-ui/core/Button';\n\nconst RawButton = ({ classes, className, label, onClick, disabled, title }) => (\n <Button\n title={title}\n onClick={onClick}\n disabled={disabled}\n className={classNames(classes.addButton, className)}\n size=\"small\"\n variant=\"contained\"\n color=\"default\"\n >\n {label}\n </Button>\n);\n\nRawButton.propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n onClick: PropTypes.func,\n title: PropTypes.string,\n};\n\nRawButton.defaultProps = {\n className: '',\n disabled: false,\n label: 'Add',\n onClick: () => {},\n title: '',\n};\n\nconst styles = () => ({\n addButton: {\n fontSize: '0.9em',\n marginLeft: 8,\n minWidth: 32,\n height: 32,\n\n '& span': {\n '& svg': {\n width: '1.3em !important',\n height: '1.3em !important',\n },\n },\n },\n});\n\nconst ButtonStyled = withStyles(styles)(RawButton);\n\nexport default ButtonStyled;\n"],"file":"button.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/drawing-response/constants.js"],"names":["tools","type","label","icon"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../src/drawing-response/constants.js"],"names":["tools","type","label","icon"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE,CACL;AACEC,IAAAA,IAAI,EAAE,QADR;AAEEC,IAAAA,KAAK,EAAE,QAFT;AAGEC,IAAAA,IAAI,EAAE;AAHR,GADK,EAML;AACEF,IAAAA,IAAI,EAAE,kBADR;AAEEC,IAAAA,KAAK,EAAE,WAFT;AAGEC,IAAAA,IAAI,EAAE;AAHR,GANK,EAWL;AACEF,IAAAA,IAAI,EAAE,cADR;AAEEC,IAAAA,KAAK,EAAE,MAFT;AAGEC,IAAAA,IAAI,EAAE;AAHR,GAXK,EAgBL;AACEF,IAAAA,IAAI,EAAE,mBADR;AAEEC,IAAAA,KAAK,EAAE,WAFT;AAGEC,IAAAA,IAAI,EAAE;AAHR,GAhBK,EAqBL;AACEF,IAAAA,IAAI,EAAE,gBADR;AAEEC,IAAAA,KAAK,EAAE,QAFT;AAGEC,IAAAA,IAAI,EAAE;AAHR,GArBK,EA0BL;AACEF,IAAAA,IAAI,EAAE,MADR;AAEEC,IAAAA,KAAK,EAAE,YAFT;AAGEC,IAAAA,IAAI,EAAE;AAHR,GA1BK,EA+BL;AACE;AACA;AACA;AACA;AACA;AACAF,IAAAA,IAAI,EAAE,gBANR;AAOEC,IAAAA,KAAK,EAAE,QAPT;AAQEC,IAAAA,IAAI,EAAE;AARR,GA/BK;AADM,C","sourcesContent":["export default {\n tools: [\n {\n type: 'Select',\n label: 'Select',\n icon: 'mdiCursorDefault',\n },\n {\n type: 'FreePathDrawable',\n label: 'Free Draw',\n icon: 'mdiPencil',\n },\n {\n type: 'LineDrawable',\n label: 'Line',\n icon: 'mdiMinus',\n },\n {\n type: 'RectangleDrawable',\n label: 'Rectangle',\n icon: 'mdiRectangle',\n },\n {\n type: 'CircleDrawable',\n label: 'Circle',\n icon: 'mdiCircle',\n },\n {\n type: 'Text',\n label: 'Text Entry',\n icon: 'mdiFormatColorText',\n },\n {\n // ,{\n // type: 'PaintBucket',\n // label: 'Paint Bucket',\n // icon: 'mdiFormatColorFill'\n // },\n type: 'EraserDrawable',\n label: 'Eraser',\n icon: 'mdiEraser',\n },\n ],\n};\n"],"file":"constants.js"}
|