@pie-element/ebsr 7.0.24 → 8.0.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 +33 -0
- package/configure/CHANGELOG.md +33 -0
- package/configure/lib/defaults.js +12 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/main.js +6 -4
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +3 -3
- package/configure/src/__tests__/index.test.js +4 -2
- package/configure/src/defaults.js +12 -0
- package/configure/src/main.jsx +8 -3
- package/controller/CHANGELOG.md +8 -0
- package/controller/lib/index.js +79 -3
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/controller/src/index.js +55 -0
- package/docs/config-schema.json +212 -0
- package/docs/config-schema.json.md +165 -1
- package/docs/pie-schema.json +88 -0
- package/docs/pie-schema.json.md +68 -0
- package/package.json +3 -3
- package/module/configure.js +0 -472
- package/module/controller.js +0 -20756
- package/module/demo.js +0 -77
- package/module/element.js +0 -2164
- package/module/index.html +0 -21
- package/module/manifest.json +0 -14
- package/module/print-demo.js +0 -115
- package/module/print.html +0 -18
- package/module/print.js +0 -2188
package/controller/src/index.js
CHANGED
|
@@ -298,3 +298,58 @@ export const createCorrectResponseSession = (question, env) => {
|
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
};
|
|
301
|
+
|
|
302
|
+
const validatePart = (model = {}, config = {}) => {
|
|
303
|
+
const { choices } = model;
|
|
304
|
+
const { minAnswerChoices = 2, maxAnswerChoices } = config;
|
|
305
|
+
const reversedChoices = [...choices || []].reverse();
|
|
306
|
+
const choicesErrors = {};
|
|
307
|
+
let hasCorrectResponse = false;
|
|
308
|
+
|
|
309
|
+
reversedChoices.forEach((choice, index) => {
|
|
310
|
+
const { correct, value, label } = choice;
|
|
311
|
+
|
|
312
|
+
if (correct) {
|
|
313
|
+
hasCorrectResponse = true;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (label === '' || label === '<div></div>') {
|
|
317
|
+
choicesErrors[value] = 'Content should not be empty.';
|
|
318
|
+
} else {
|
|
319
|
+
const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);
|
|
320
|
+
|
|
321
|
+
if (identicalAnswer) {
|
|
322
|
+
choicesErrors[value] = 'Content should be unique.';
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
const errors = {};
|
|
328
|
+
const nbOfChoices = (choices || []).length;
|
|
329
|
+
|
|
330
|
+
if (nbOfChoices < minAnswerChoices) {
|
|
331
|
+
errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;
|
|
332
|
+
} else if (nbOfChoices > maxAnswerChoices) {
|
|
333
|
+
errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (!hasCorrectResponse) {
|
|
337
|
+
errors.correctResponseError = 'No correct response defined.';
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (!isEmpty(choicesErrors)) {
|
|
341
|
+
errors.choicesErrors = choicesErrors;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
return errors;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
export const validate = (model = {}, config = {}) => {
|
|
348
|
+
const { partA, partB } = model || {};
|
|
349
|
+
const { partA: partAConfig, partB: partBConfig } = config || {};
|
|
350
|
+
|
|
351
|
+
const partAErrors = validatePart(partA, partAConfig);
|
|
352
|
+
const partBErrors = validatePart(partB, partBConfig);
|
|
353
|
+
|
|
354
|
+
return { partA: partAErrors, partB: partBErrors };
|
|
355
|
+
};
|
package/docs/config-schema.json
CHANGED
|
@@ -214,6 +214,68 @@
|
|
|
214
214
|
"title": "label"
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
+
},
|
|
218
|
+
"minAnswerChoices": {
|
|
219
|
+
"description": "Minimum number of answer choices",
|
|
220
|
+
"type": "number",
|
|
221
|
+
"title": "minAnswerChoices"
|
|
222
|
+
},
|
|
223
|
+
"maxAnswerChoices": {
|
|
224
|
+
"description": "Maximum number of answer choices",
|
|
225
|
+
"type": "number",
|
|
226
|
+
"title": "maxAnswerChoices"
|
|
227
|
+
},
|
|
228
|
+
"maxImageWidth": {
|
|
229
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
230
|
+
"type": "object",
|
|
231
|
+
"properties": {
|
|
232
|
+
"teacherInstructions": {
|
|
233
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
234
|
+
"type": "number",
|
|
235
|
+
"title": "teacherInstructions"
|
|
236
|
+
},
|
|
237
|
+
"prompt": {
|
|
238
|
+
"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",
|
|
239
|
+
"type": "number",
|
|
240
|
+
"title": "prompt"
|
|
241
|
+
},
|
|
242
|
+
"rationale": {
|
|
243
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
244
|
+
"type": "number",
|
|
245
|
+
"title": "rationale"
|
|
246
|
+
},
|
|
247
|
+
"choices": {
|
|
248
|
+
"description": "Indicates the max dimension for images in choices",
|
|
249
|
+
"type": "number",
|
|
250
|
+
"title": "choices"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"maxImageHeight": {
|
|
255
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
256
|
+
"type": "object",
|
|
257
|
+
"properties": {
|
|
258
|
+
"teacherInstructions": {
|
|
259
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
260
|
+
"type": "number",
|
|
261
|
+
"title": "teacherInstructions"
|
|
262
|
+
},
|
|
263
|
+
"prompt": {
|
|
264
|
+
"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",
|
|
265
|
+
"type": "number",
|
|
266
|
+
"title": "prompt"
|
|
267
|
+
},
|
|
268
|
+
"rationale": {
|
|
269
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
270
|
+
"type": "number",
|
|
271
|
+
"title": "rationale"
|
|
272
|
+
},
|
|
273
|
+
"choices": {
|
|
274
|
+
"description": "Indicates the max dimension for images in choices",
|
|
275
|
+
"type": "number",
|
|
276
|
+
"title": "choices"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
217
279
|
}
|
|
218
280
|
}
|
|
219
281
|
},
|
|
@@ -428,6 +490,68 @@
|
|
|
428
490
|
"title": "label"
|
|
429
491
|
}
|
|
430
492
|
}
|
|
493
|
+
},
|
|
494
|
+
"minAnswerChoices": {
|
|
495
|
+
"description": "Minimum number of answer choices",
|
|
496
|
+
"type": "number",
|
|
497
|
+
"title": "minAnswerChoices"
|
|
498
|
+
},
|
|
499
|
+
"maxAnswerChoices": {
|
|
500
|
+
"description": "Maximum number of answer choices",
|
|
501
|
+
"type": "number",
|
|
502
|
+
"title": "maxAnswerChoices"
|
|
503
|
+
},
|
|
504
|
+
"maxImageWidth": {
|
|
505
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
506
|
+
"type": "object",
|
|
507
|
+
"properties": {
|
|
508
|
+
"teacherInstructions": {
|
|
509
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
510
|
+
"type": "number",
|
|
511
|
+
"title": "teacherInstructions"
|
|
512
|
+
},
|
|
513
|
+
"prompt": {
|
|
514
|
+
"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",
|
|
515
|
+
"type": "number",
|
|
516
|
+
"title": "prompt"
|
|
517
|
+
},
|
|
518
|
+
"rationale": {
|
|
519
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
520
|
+
"type": "number",
|
|
521
|
+
"title": "rationale"
|
|
522
|
+
},
|
|
523
|
+
"choices": {
|
|
524
|
+
"description": "Indicates the max dimension for images in choices",
|
|
525
|
+
"type": "number",
|
|
526
|
+
"title": "choices"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"maxImageHeight": {
|
|
531
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
532
|
+
"type": "object",
|
|
533
|
+
"properties": {
|
|
534
|
+
"teacherInstructions": {
|
|
535
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
536
|
+
"type": "number",
|
|
537
|
+
"title": "teacherInstructions"
|
|
538
|
+
},
|
|
539
|
+
"prompt": {
|
|
540
|
+
"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",
|
|
541
|
+
"type": "number",
|
|
542
|
+
"title": "prompt"
|
|
543
|
+
},
|
|
544
|
+
"rationale": {
|
|
545
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
546
|
+
"type": "number",
|
|
547
|
+
"title": "rationale"
|
|
548
|
+
},
|
|
549
|
+
"choices": {
|
|
550
|
+
"description": "Indicates the max dimension for images in choices",
|
|
551
|
+
"type": "number",
|
|
552
|
+
"title": "choices"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
431
555
|
}
|
|
432
556
|
}
|
|
433
557
|
},
|
|
@@ -708,6 +832,68 @@
|
|
|
708
832
|
"title": "label"
|
|
709
833
|
}
|
|
710
834
|
}
|
|
835
|
+
},
|
|
836
|
+
"minAnswerChoices": {
|
|
837
|
+
"description": "Minimum number of answer choices",
|
|
838
|
+
"type": "number",
|
|
839
|
+
"title": "minAnswerChoices"
|
|
840
|
+
},
|
|
841
|
+
"maxAnswerChoices": {
|
|
842
|
+
"description": "Maximum number of answer choices",
|
|
843
|
+
"type": "number",
|
|
844
|
+
"title": "maxAnswerChoices"
|
|
845
|
+
},
|
|
846
|
+
"maxImageWidth": {
|
|
847
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
848
|
+
"type": "object",
|
|
849
|
+
"properties": {
|
|
850
|
+
"teacherInstructions": {
|
|
851
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
852
|
+
"type": "number",
|
|
853
|
+
"title": "teacherInstructions"
|
|
854
|
+
},
|
|
855
|
+
"prompt": {
|
|
856
|
+
"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",
|
|
857
|
+
"type": "number",
|
|
858
|
+
"title": "prompt"
|
|
859
|
+
},
|
|
860
|
+
"rationale": {
|
|
861
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
862
|
+
"type": "number",
|
|
863
|
+
"title": "rationale"
|
|
864
|
+
},
|
|
865
|
+
"choices": {
|
|
866
|
+
"description": "Indicates the max dimension for images in choices",
|
|
867
|
+
"type": "number",
|
|
868
|
+
"title": "choices"
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"maxImageHeight": {
|
|
873
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
874
|
+
"type": "object",
|
|
875
|
+
"properties": {
|
|
876
|
+
"teacherInstructions": {
|
|
877
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
878
|
+
"type": "number",
|
|
879
|
+
"title": "teacherInstructions"
|
|
880
|
+
},
|
|
881
|
+
"prompt": {
|
|
882
|
+
"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",
|
|
883
|
+
"type": "number",
|
|
884
|
+
"title": "prompt"
|
|
885
|
+
},
|
|
886
|
+
"rationale": {
|
|
887
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
888
|
+
"type": "number",
|
|
889
|
+
"title": "rationale"
|
|
890
|
+
},
|
|
891
|
+
"choices": {
|
|
892
|
+
"description": "Indicates the max dimension for images in choices",
|
|
893
|
+
"type": "number",
|
|
894
|
+
"title": "choices"
|
|
895
|
+
}
|
|
896
|
+
}
|
|
711
897
|
}
|
|
712
898
|
}
|
|
713
899
|
},
|
|
@@ -726,6 +912,32 @@
|
|
|
726
912
|
"title": "label"
|
|
727
913
|
}
|
|
728
914
|
}
|
|
915
|
+
},
|
|
916
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
917
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
918
|
+
"type": "object",
|
|
919
|
+
"properties": {
|
|
920
|
+
"teacherInstructions": {
|
|
921
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
922
|
+
"type": "number",
|
|
923
|
+
"title": "teacherInstructions"
|
|
924
|
+
},
|
|
925
|
+
"prompt": {
|
|
926
|
+
"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",
|
|
927
|
+
"type": "number",
|
|
928
|
+
"title": "prompt"
|
|
929
|
+
},
|
|
930
|
+
"rationale": {
|
|
931
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
932
|
+
"type": "number",
|
|
933
|
+
"title": "rationale"
|
|
934
|
+
},
|
|
935
|
+
"choices": {
|
|
936
|
+
"description": "Indicates the max dimension for images in choices",
|
|
937
|
+
"type": "number",
|
|
938
|
+
"title": "choices"
|
|
939
|
+
}
|
|
940
|
+
}
|
|
729
941
|
}
|
|
730
942
|
},
|
|
731
943
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -162,6 +162,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
162
162
|
|
|
163
163
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
164
164
|
|
|
165
|
+
## `minAnswerChoices` (number)
|
|
166
|
+
|
|
167
|
+
Minimum number of answer choices
|
|
168
|
+
|
|
169
|
+
## `maxAnswerChoices` (number)
|
|
170
|
+
|
|
171
|
+
Maximum number of answer choices
|
|
172
|
+
|
|
173
|
+
## `maxImageWidth` (object)
|
|
174
|
+
|
|
175
|
+
Properties of the `maxImageWidth` object:
|
|
176
|
+
|
|
177
|
+
### `teacherInstructions` (number)
|
|
178
|
+
|
|
179
|
+
Indicates the max dimension for images in teacher instructions
|
|
180
|
+
|
|
181
|
+
### `prompt` (number)
|
|
182
|
+
|
|
183
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
184
|
+
|
|
185
|
+
### `rationale` (number)
|
|
186
|
+
|
|
187
|
+
Indicates the max dimension for images in rationale
|
|
188
|
+
|
|
189
|
+
### `choices` (number)
|
|
190
|
+
|
|
191
|
+
Indicates the max dimension for images in choices
|
|
192
|
+
|
|
193
|
+
## `maxImageHeight` (object)
|
|
194
|
+
|
|
195
|
+
Properties of the `maxImageHeight` object:
|
|
196
|
+
|
|
197
|
+
### `teacherInstructions` (number)
|
|
198
|
+
|
|
199
|
+
Indicates the max dimension for images in teacher instructions
|
|
200
|
+
|
|
201
|
+
### `prompt` (number)
|
|
202
|
+
|
|
203
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
204
|
+
|
|
205
|
+
### `rationale` (number)
|
|
206
|
+
|
|
207
|
+
Indicates the max dimension for images in rationale
|
|
208
|
+
|
|
209
|
+
### `choices` (number)
|
|
210
|
+
|
|
211
|
+
Indicates the max dimension for images in choices
|
|
212
|
+
|
|
165
213
|
# `partB` (object, required)
|
|
166
214
|
|
|
167
215
|
Properties of the `partB` object:
|
|
@@ -322,6 +370,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
322
370
|
|
|
323
371
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
324
372
|
|
|
373
|
+
## `minAnswerChoices` (number)
|
|
374
|
+
|
|
375
|
+
Minimum number of answer choices
|
|
376
|
+
|
|
377
|
+
## `maxAnswerChoices` (number)
|
|
378
|
+
|
|
379
|
+
Maximum number of answer choices
|
|
380
|
+
|
|
381
|
+
## `maxImageWidth` (object)
|
|
382
|
+
|
|
383
|
+
Properties of the `maxImageWidth` object:
|
|
384
|
+
|
|
385
|
+
### `teacherInstructions` (number)
|
|
386
|
+
|
|
387
|
+
Indicates the max dimension for images in teacher instructions
|
|
388
|
+
|
|
389
|
+
### `prompt` (number)
|
|
390
|
+
|
|
391
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
392
|
+
|
|
393
|
+
### `rationale` (number)
|
|
394
|
+
|
|
395
|
+
Indicates the max dimension for images in rationale
|
|
396
|
+
|
|
397
|
+
### `choices` (number)
|
|
398
|
+
|
|
399
|
+
Indicates the max dimension for images in choices
|
|
400
|
+
|
|
401
|
+
## `maxImageHeight` (object)
|
|
402
|
+
|
|
403
|
+
Properties of the `maxImageHeight` object:
|
|
404
|
+
|
|
405
|
+
### `teacherInstructions` (number)
|
|
406
|
+
|
|
407
|
+
Indicates the max dimension for images in teacher instructions
|
|
408
|
+
|
|
409
|
+
### `prompt` (number)
|
|
410
|
+
|
|
411
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
412
|
+
|
|
413
|
+
### `rationale` (number)
|
|
414
|
+
|
|
415
|
+
Indicates the max dimension for images in rationale
|
|
416
|
+
|
|
417
|
+
### `choices` (number)
|
|
418
|
+
|
|
419
|
+
Indicates the max dimension for images in choices
|
|
420
|
+
|
|
325
421
|
# `partLabels` (object)
|
|
326
422
|
|
|
327
423
|
Properties of the `partLabels` object:
|
|
@@ -536,6 +632,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
536
632
|
|
|
537
633
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
538
634
|
|
|
635
|
+
### `minAnswerChoices` (number)
|
|
636
|
+
|
|
637
|
+
Minimum number of answer choices
|
|
638
|
+
|
|
639
|
+
### `maxAnswerChoices` (number)
|
|
640
|
+
|
|
641
|
+
Maximum number of answer choices
|
|
642
|
+
|
|
643
|
+
### `maxImageWidth` (object)
|
|
644
|
+
|
|
645
|
+
Properties of the `maxImageWidth` object:
|
|
646
|
+
|
|
647
|
+
#### `teacherInstructions` (number)
|
|
648
|
+
|
|
649
|
+
Indicates the max dimension for images in teacher instructions
|
|
650
|
+
|
|
651
|
+
#### `prompt` (number)
|
|
652
|
+
|
|
653
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
654
|
+
|
|
655
|
+
#### `rationale` (number)
|
|
656
|
+
|
|
657
|
+
Indicates the max dimension for images in rationale
|
|
658
|
+
|
|
659
|
+
#### `choices` (number)
|
|
660
|
+
|
|
661
|
+
Indicates the max dimension for images in choices
|
|
662
|
+
|
|
663
|
+
### `maxImageHeight` (object)
|
|
664
|
+
|
|
665
|
+
Properties of the `maxImageHeight` object:
|
|
666
|
+
|
|
667
|
+
#### `teacherInstructions` (number)
|
|
668
|
+
|
|
669
|
+
Indicates the max dimension for images in teacher instructions
|
|
670
|
+
|
|
671
|
+
#### `prompt` (number)
|
|
672
|
+
|
|
673
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
674
|
+
|
|
675
|
+
#### `rationale` (number)
|
|
676
|
+
|
|
677
|
+
Indicates the max dimension for images in rationale
|
|
678
|
+
|
|
679
|
+
#### `choices` (number)
|
|
680
|
+
|
|
681
|
+
Indicates the max dimension for images in choices
|
|
682
|
+
|
|
539
683
|
## `ConfigureProp` (object)
|
|
540
684
|
|
|
541
685
|
Properties of the `ConfigureProp` object:
|
|
@@ -546,4 +690,24 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
546
690
|
|
|
547
691
|
### `label` (string)
|
|
548
692
|
|
|
549
|
-
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
693
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
694
|
+
|
|
695
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
696
|
+
|
|
697
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
698
|
+
|
|
699
|
+
### `teacherInstructions` (number)
|
|
700
|
+
|
|
701
|
+
Indicates the max dimension for images in teacher instructions
|
|
702
|
+
|
|
703
|
+
### `prompt` (number)
|
|
704
|
+
|
|
705
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
706
|
+
|
|
707
|
+
### `rationale` (number)
|
|
708
|
+
|
|
709
|
+
Indicates the max dimension for images in rationale
|
|
710
|
+
|
|
711
|
+
### `choices` (number)
|
|
712
|
+
|
|
713
|
+
Indicates the max dimension for images in choices
|
package/docs/pie-schema.json
CHANGED
|
@@ -494,6 +494,68 @@
|
|
|
494
494
|
"title": "label"
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
+
},
|
|
498
|
+
"minAnswerChoices": {
|
|
499
|
+
"description": "Minimum number of answer choices",
|
|
500
|
+
"type": "number",
|
|
501
|
+
"title": "minAnswerChoices"
|
|
502
|
+
},
|
|
503
|
+
"maxAnswerChoices": {
|
|
504
|
+
"description": "Maximum number of answer choices",
|
|
505
|
+
"type": "number",
|
|
506
|
+
"title": "maxAnswerChoices"
|
|
507
|
+
},
|
|
508
|
+
"maxImageWidth": {
|
|
509
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
510
|
+
"type": "object",
|
|
511
|
+
"properties": {
|
|
512
|
+
"teacherInstructions": {
|
|
513
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
514
|
+
"type": "number",
|
|
515
|
+
"title": "teacherInstructions"
|
|
516
|
+
},
|
|
517
|
+
"prompt": {
|
|
518
|
+
"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",
|
|
519
|
+
"type": "number",
|
|
520
|
+
"title": "prompt"
|
|
521
|
+
},
|
|
522
|
+
"rationale": {
|
|
523
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
524
|
+
"type": "number",
|
|
525
|
+
"title": "rationale"
|
|
526
|
+
},
|
|
527
|
+
"choices": {
|
|
528
|
+
"description": "Indicates the max dimension for images in choices",
|
|
529
|
+
"type": "number",
|
|
530
|
+
"title": "choices"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"maxImageHeight": {
|
|
535
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
536
|
+
"type": "object",
|
|
537
|
+
"properties": {
|
|
538
|
+
"teacherInstructions": {
|
|
539
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
540
|
+
"type": "number",
|
|
541
|
+
"title": "teacherInstructions"
|
|
542
|
+
},
|
|
543
|
+
"prompt": {
|
|
544
|
+
"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",
|
|
545
|
+
"type": "number",
|
|
546
|
+
"title": "prompt"
|
|
547
|
+
},
|
|
548
|
+
"rationale": {
|
|
549
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
550
|
+
"type": "number",
|
|
551
|
+
"title": "rationale"
|
|
552
|
+
},
|
|
553
|
+
"choices": {
|
|
554
|
+
"description": "Indicates the max dimension for images in choices",
|
|
555
|
+
"type": "number",
|
|
556
|
+
"title": "choices"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
497
559
|
}
|
|
498
560
|
}
|
|
499
561
|
},
|
|
@@ -513,6 +575,32 @@
|
|
|
513
575
|
}
|
|
514
576
|
}
|
|
515
577
|
},
|
|
578
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
579
|
+
"title": "ConfigureMaxImageDimensionsProp",
|
|
580
|
+
"type": "object",
|
|
581
|
+
"properties": {
|
|
582
|
+
"teacherInstructions": {
|
|
583
|
+
"description": "Indicates the max dimension for images in teacher instructions",
|
|
584
|
+
"type": "number",
|
|
585
|
+
"title": "teacherInstructions"
|
|
586
|
+
},
|
|
587
|
+
"prompt": {
|
|
588
|
+
"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",
|
|
589
|
+
"type": "number",
|
|
590
|
+
"title": "prompt"
|
|
591
|
+
},
|
|
592
|
+
"rationale": {
|
|
593
|
+
"description": "Indicates the max dimension for images in rationale",
|
|
594
|
+
"type": "number",
|
|
595
|
+
"title": "rationale"
|
|
596
|
+
},
|
|
597
|
+
"choices": {
|
|
598
|
+
"description": "Indicates the max dimension for images in choices",
|
|
599
|
+
"type": "number",
|
|
600
|
+
"title": "choices"
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
},
|
|
516
604
|
"Part": {
|
|
517
605
|
"title": "Part",
|
|
518
606
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -370,6 +370,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
370
370
|
|
|
371
371
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
372
372
|
|
|
373
|
+
### `minAnswerChoices` (number)
|
|
374
|
+
|
|
375
|
+
Minimum number of answer choices
|
|
376
|
+
|
|
377
|
+
### `maxAnswerChoices` (number)
|
|
378
|
+
|
|
379
|
+
Maximum number of answer choices
|
|
380
|
+
|
|
381
|
+
### `maxImageWidth` (object)
|
|
382
|
+
|
|
383
|
+
Properties of the `maxImageWidth` object:
|
|
384
|
+
|
|
385
|
+
#### `teacherInstructions` (number)
|
|
386
|
+
|
|
387
|
+
Indicates the max dimension for images in teacher instructions
|
|
388
|
+
|
|
389
|
+
#### `prompt` (number)
|
|
390
|
+
|
|
391
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
392
|
+
|
|
393
|
+
#### `rationale` (number)
|
|
394
|
+
|
|
395
|
+
Indicates the max dimension for images in rationale
|
|
396
|
+
|
|
397
|
+
#### `choices` (number)
|
|
398
|
+
|
|
399
|
+
Indicates the max dimension for images in choices
|
|
400
|
+
|
|
401
|
+
### `maxImageHeight` (object)
|
|
402
|
+
|
|
403
|
+
Properties of the `maxImageHeight` object:
|
|
404
|
+
|
|
405
|
+
#### `teacherInstructions` (number)
|
|
406
|
+
|
|
407
|
+
Indicates the max dimension for images in teacher instructions
|
|
408
|
+
|
|
409
|
+
#### `prompt` (number)
|
|
410
|
+
|
|
411
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
412
|
+
|
|
413
|
+
#### `rationale` (number)
|
|
414
|
+
|
|
415
|
+
Indicates the max dimension for images in rationale
|
|
416
|
+
|
|
417
|
+
#### `choices` (number)
|
|
418
|
+
|
|
419
|
+
Indicates the max dimension for images in choices
|
|
420
|
+
|
|
373
421
|
## `ConfigureProp` (object)
|
|
374
422
|
|
|
375
423
|
Properties of the `ConfigureProp` object:
|
|
@@ -382,6 +430,26 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
382
430
|
|
|
383
431
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
384
432
|
|
|
433
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
434
|
+
|
|
435
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
436
|
+
|
|
437
|
+
### `teacherInstructions` (number)
|
|
438
|
+
|
|
439
|
+
Indicates the max dimension for images in teacher instructions
|
|
440
|
+
|
|
441
|
+
### `prompt` (number)
|
|
442
|
+
|
|
443
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
444
|
+
|
|
445
|
+
### `rationale` (number)
|
|
446
|
+
|
|
447
|
+
Indicates the max dimension for images in rationale
|
|
448
|
+
|
|
449
|
+
### `choices` (number)
|
|
450
|
+
|
|
451
|
+
Indicates the max dimension for images in choices
|
|
452
|
+
|
|
385
453
|
## `Part` (object)
|
|
386
454
|
|
|
387
455
|
Properties of the `Part` object:
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/ebsr",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pie-element/multiple-choice": "^
|
|
10
|
+
"@pie-element/multiple-choice": "^7.0.0",
|
|
11
11
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"debug": "^4.1.1",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"author": "pie framework developers",
|
|
17
17
|
"license": "ISC",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "ff92cee6f9a7bf3f3dc75dbafd2263710f0a6b3d",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|