@pie-element/ebsr 6.5.0 → 6.5.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +463 -0
  2. package/configure/CHANGELOG.md +447 -0
  3. package/configure/lib/defaults.js +34 -11
  4. package/configure/lib/defaults.js.map +1 -1
  5. package/configure/lib/index.js +30 -23
  6. package/configure/lib/index.js.map +1 -1
  7. package/configure/lib/main.js +109 -72
  8. package/configure/lib/main.js.map +1 -1
  9. package/configure/package.json +3 -3
  10. package/configure/src/__tests__/__snapshots__/index.test.js.snap +12 -2
  11. package/configure/src/__tests__/index.test.js +164 -211
  12. package/configure/src/defaults.js +49 -27
  13. package/configure/src/index.js +19 -39
  14. package/configure/src/main.jsx +165 -149
  15. package/controller/CHANGELOG.md +67 -0
  16. package/controller/lib/defaults.js.map +1 -1
  17. package/controller/lib/index.js +123 -29
  18. package/controller/lib/index.js.map +1 -1
  19. package/controller/lib/utils.js.map +1 -1
  20. package/controller/package.json +2 -2
  21. package/controller/src/__tests__/index.test.js +113 -141
  22. package/controller/src/__tests__/utils.test.js +6 -9
  23. package/controller/src/defaults.js +1 -1
  24. package/controller/src/index.js +109 -70
  25. package/controller/src/utils.js +6 -4
  26. package/docs/config-schema.json +376 -0
  27. package/docs/config-schema.json.md +289 -1
  28. package/docs/demo/config.js +2 -2
  29. package/docs/demo/generate.js +3 -3
  30. package/docs/pie-schema.json +177 -0
  31. package/docs/pie-schema.json.md +138 -0
  32. package/lib/index.js +12 -9
  33. package/lib/index.js.map +1 -1
  34. package/lib/print.js +243 -0
  35. package/lib/print.js.map +1 -0
  36. package/package.json +8 -4
  37. package/src/__tests__/index.test.js +2 -7
  38. package/src/index.js +7 -5
  39. package/src/print.js +179 -0
@@ -90,6 +90,22 @@ Indicates if the item has to be displayed in the Settings Panel
90
90
 
91
91
  Indicates the label for the item that has to be displayed in the Settings Panel
92
92
 
93
+ ## `settingsPanelDisabled` (boolean)
94
+
95
+ Indicates if the settings panel is not available
96
+
97
+ ## `spellCheck` (object)
98
+
99
+ Properties of the `spellCheck` object:
100
+
101
+ ### `settings` (boolean)
102
+
103
+ Indicates if the item has to be displayed in the Settings Panel
104
+
105
+ ### `label` (string)
106
+
107
+ Indicates the label for the item that has to be displayed in the Settings Panel
108
+
93
109
  ## `rationale` (object)
94
110
 
95
111
  Properties of the `rationale` object:
@@ -126,6 +142,78 @@ Indicates if the item has to be displayed in the Settings Panel
126
142
 
127
143
  Indicates the label for the item that has to be displayed in the Settings Panel
128
144
 
145
+ ## `choicesLayout` (object)
146
+
147
+ Properties of the `choicesLayout` object:
148
+
149
+ ### `settings` (boolean)
150
+
151
+ Indicates if the item has to be displayed in the Settings Panel
152
+
153
+ ### `label` (string)
154
+
155
+ Indicates the label for the item that has to be displayed in the Settings Panel
156
+
157
+ ## `gridColumns` (object)
158
+
159
+ Properties of the `gridColumns` object:
160
+
161
+ ### `settings` (boolean)
162
+
163
+ Indicates if the item has to be displayed in the Settings Panel
164
+
165
+ ### `label` (string)
166
+
167
+ Indicates the label for the item that has to be displayed in the Settings Panel
168
+
169
+ ## `minAnswerChoices` (number)
170
+
171
+ Minimum number of answer choices
172
+
173
+ ## `maxAnswerChoices` (number)
174
+
175
+ Maximum number of answer choices
176
+
177
+ ## `maxImageWidth` (object)
178
+
179
+ Properties of the `maxImageWidth` object:
180
+
181
+ ### `teacherInstructions` (number)
182
+
183
+ Indicates the max dimension for images in teacher instructions
184
+
185
+ ### `prompt` (number)
186
+
187
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
188
+
189
+ ### `rationale` (number)
190
+
191
+ Indicates the max dimension for images in rationale
192
+
193
+ ### `choices` (number)
194
+
195
+ Indicates the max dimension for images in choices
196
+
197
+ ## `maxImageHeight` (object)
198
+
199
+ Properties of the `maxImageHeight` object:
200
+
201
+ ### `teacherInstructions` (number)
202
+
203
+ Indicates the max dimension for images in teacher instructions
204
+
205
+ ### `prompt` (number)
206
+
207
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
208
+
209
+ ### `rationale` (number)
210
+
211
+ Indicates the max dimension for images in rationale
212
+
213
+ ### `choices` (number)
214
+
215
+ Indicates the max dimension for images in choices
216
+
129
217
  # `partB` (object, required)
130
218
 
131
219
  Properties of the `partB` object:
@@ -214,6 +302,22 @@ Indicates if the item has to be displayed in the Settings Panel
214
302
 
215
303
  Indicates the label for the item that has to be displayed in the Settings Panel
216
304
 
305
+ ## `settingsPanelDisabled` (boolean)
306
+
307
+ Indicates if the settings panel is not available
308
+
309
+ ## `spellCheck` (object)
310
+
311
+ Properties of the `spellCheck` object:
312
+
313
+ ### `settings` (boolean)
314
+
315
+ Indicates if the item has to be displayed in the Settings Panel
316
+
317
+ ### `label` (string)
318
+
319
+ Indicates the label for the item that has to be displayed in the Settings Panel
320
+
217
321
  ## `rationale` (object)
218
322
 
219
323
  Properties of the `rationale` object:
@@ -250,6 +354,78 @@ Indicates if the item has to be displayed in the Settings Panel
250
354
 
251
355
  Indicates the label for the item that has to be displayed in the Settings Panel
252
356
 
357
+ ## `choicesLayout` (object)
358
+
359
+ Properties of the `choicesLayout` object:
360
+
361
+ ### `settings` (boolean)
362
+
363
+ Indicates if the item has to be displayed in the Settings Panel
364
+
365
+ ### `label` (string)
366
+
367
+ Indicates the label for the item that has to be displayed in the Settings Panel
368
+
369
+ ## `gridColumns` (object)
370
+
371
+ Properties of the `gridColumns` object:
372
+
373
+ ### `settings` (boolean)
374
+
375
+ Indicates if the item has to be displayed in the Settings Panel
376
+
377
+ ### `label` (string)
378
+
379
+ Indicates the label for the item that has to be displayed in the Settings Panel
380
+
381
+ ## `minAnswerChoices` (number)
382
+
383
+ Minimum number of answer choices
384
+
385
+ ## `maxAnswerChoices` (number)
386
+
387
+ Maximum number of answer choices
388
+
389
+ ## `maxImageWidth` (object)
390
+
391
+ Properties of the `maxImageWidth` object:
392
+
393
+ ### `teacherInstructions` (number)
394
+
395
+ Indicates the max dimension for images in teacher instructions
396
+
397
+ ### `prompt` (number)
398
+
399
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
400
+
401
+ ### `rationale` (number)
402
+
403
+ Indicates the max dimension for images in rationale
404
+
405
+ ### `choices` (number)
406
+
407
+ Indicates the max dimension for images in choices
408
+
409
+ ## `maxImageHeight` (object)
410
+
411
+ Properties of the `maxImageHeight` object:
412
+
413
+ ### `teacherInstructions` (number)
414
+
415
+ Indicates the max dimension for images in teacher instructions
416
+
417
+ ### `prompt` (number)
418
+
419
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
420
+
421
+ ### `rationale` (number)
422
+
423
+ Indicates the max dimension for images in rationale
424
+
425
+ ### `choices` (number)
426
+
427
+ Indicates the max dimension for images in choices
428
+
253
429
  # `partLabels` (object)
254
430
 
255
431
  Properties of the `partLabels` object:
@@ -274,6 +450,10 @@ Indicates if the item has to be displayed in the Settings Panel
274
450
 
275
451
  Indicates the label for the item that has to be displayed in the Settings Panel
276
452
 
453
+ # `settingsPanelDisabled` (boolean)
454
+
455
+ Indicates if the settings panel is not available
456
+
277
457
  # `scoringType` (object)
278
458
 
279
459
  Properties of the `scoringType` object:
@@ -392,6 +572,22 @@ Indicates if the item has to be displayed in the Settings Panel
392
572
 
393
573
  Indicates the label for the item that has to be displayed in the Settings Panel
394
574
 
575
+ ### `settingsPanelDisabled` (boolean)
576
+
577
+ Indicates if the settings panel is not available
578
+
579
+ ### `spellCheck` (object)
580
+
581
+ Properties of the `spellCheck` object:
582
+
583
+ #### `settings` (boolean)
584
+
585
+ Indicates if the item has to be displayed in the Settings Panel
586
+
587
+ #### `label` (string)
588
+
589
+ Indicates the label for the item that has to be displayed in the Settings Panel
590
+
395
591
  ### `rationale` (object)
396
592
 
397
593
  Properties of the `rationale` object:
@@ -428,6 +624,78 @@ Indicates if the item has to be displayed in the Settings Panel
428
624
 
429
625
  Indicates the label for the item that has to be displayed in the Settings Panel
430
626
 
627
+ ### `choicesLayout` (object)
628
+
629
+ Properties of the `choicesLayout` object:
630
+
631
+ #### `settings` (boolean)
632
+
633
+ Indicates if the item has to be displayed in the Settings Panel
634
+
635
+ #### `label` (string)
636
+
637
+ Indicates the label for the item that has to be displayed in the Settings Panel
638
+
639
+ ### `gridColumns` (object)
640
+
641
+ Properties of the `gridColumns` object:
642
+
643
+ #### `settings` (boolean)
644
+
645
+ Indicates if the item has to be displayed in the Settings Panel
646
+
647
+ #### `label` (string)
648
+
649
+ Indicates the label for the item that has to be displayed in the Settings Panel
650
+
651
+ ### `minAnswerChoices` (number)
652
+
653
+ Minimum number of answer choices
654
+
655
+ ### `maxAnswerChoices` (number)
656
+
657
+ Maximum number of answer choices
658
+
659
+ ### `maxImageWidth` (object)
660
+
661
+ Properties of the `maxImageWidth` object:
662
+
663
+ #### `teacherInstructions` (number)
664
+
665
+ Indicates the max dimension for images in teacher instructions
666
+
667
+ #### `prompt` (number)
668
+
669
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
670
+
671
+ #### `rationale` (number)
672
+
673
+ Indicates the max dimension for images in rationale
674
+
675
+ #### `choices` (number)
676
+
677
+ Indicates the max dimension for images in choices
678
+
679
+ ### `maxImageHeight` (object)
680
+
681
+ Properties of the `maxImageHeight` object:
682
+
683
+ #### `teacherInstructions` (number)
684
+
685
+ Indicates the max dimension for images in teacher instructions
686
+
687
+ #### `prompt` (number)
688
+
689
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
690
+
691
+ #### `rationale` (number)
692
+
693
+ Indicates the max dimension for images in rationale
694
+
695
+ #### `choices` (number)
696
+
697
+ Indicates the max dimension for images in choices
698
+
431
699
  ## `ConfigureProp` (object)
432
700
 
433
701
  Properties of the `ConfigureProp` object:
@@ -438,4 +706,24 @@ Indicates if the item has to be displayed in the Settings Panel
438
706
 
439
707
  ### `label` (string)
440
708
 
441
- Indicates the label for the item that has to be displayed in the Settings Panel
709
+ Indicates the label for the item that has to be displayed in the Settings Panel
710
+
711
+ ## `ConfigureMaxImageDimensionsProp` (object)
712
+
713
+ Properties of the `ConfigureMaxImageDimensionsProp` object:
714
+
715
+ ### `teacherInstructions` (number)
716
+
717
+ Indicates the max dimension for images in teacher instructions
718
+
719
+ ### `prompt` (number)
720
+
721
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
722
+
723
+ ### `rationale` (number)
724
+
725
+ Indicates the max dimension for images in rationale
726
+
727
+ ### `choices` (number)
728
+
729
+ Indicates the max dimension for images in choices
@@ -2,7 +2,7 @@ const { model } = require('./generate');
2
2
 
3
3
  module.exports = {
4
4
  elements: {
5
- 'ebsr-element': '../..'
5
+ 'ebsr-element': '../..',
6
6
  },
7
- models: [model('1', 'ebsr-element'), model('2', 'ebsr-element')]
7
+ models: [model('1', 'ebsr-element') /*, model('2', 'ebsr-element')*/],
8
8
  };
@@ -21,7 +21,7 @@ exports.model = (id, element) => ({
21
21
  choicePrefix: 'numbers',
22
22
  partialScoring: false,
23
23
  prompt: 'What color is the sky?',
24
- promptEnabled: true
24
+ promptEnabled: true,
25
25
  },
26
26
  partB: {
27
27
  choiceMode: 'radio',
@@ -47,6 +47,6 @@ exports.model = (id, element) => ({
47
47
  choicePrefix: 'numbers',
48
48
  partialScoring: false,
49
49
  prompt: 'What color do you get when you mix Red with your answer in Part 1?',
50
- promptEnabled: true
51
- }
50
+ promptEnabled: true,
51
+ },
52
52
  });
@@ -85,6 +85,11 @@
85
85
  "type": "boolean",
86
86
  "title": "rationaleEnabled"
87
87
  },
88
+ "spellCheckEnabled": {
89
+ "description": "Indicates if spellcheck is enabled for the author. Default value is true",
90
+ "type": "boolean",
91
+ "title": "spellCheckEnabled"
92
+ },
88
93
  "studentInstructionsEnabled": {
89
94
  "description": "Indicates if Student Instructions are enabled",
90
95
  "type": "boolean",
@@ -94,6 +99,12 @@
94
99
  "description": "Indicates if Teacher Instructions are enabled",
95
100
  "type": "boolean",
96
101
  "title": "teacherInstructionsEnabled"
102
+ },
103
+ "verticalMode": {
104
+ "description": "Indicates the layout of choices for player",
105
+ "default": ": true",
106
+ "type": "boolean",
107
+ "title": "verticalMode"
97
108
  }
98
109
  },
99
110
  "required": [
@@ -103,6 +114,7 @@
103
114
  "feedbackEnabled",
104
115
  "prompt",
105
116
  "rationaleEnabled",
117
+ "spellCheckEnabled",
106
118
  "studentInstructionsEnabled",
107
119
  "teacherInstructionsEnabled"
108
120
  ]
@@ -189,6 +201,11 @@
189
201
  "type": "boolean",
190
202
  "title": "rationaleEnabled"
191
203
  },
204
+ "spellCheckEnabled": {
205
+ "description": "Indicates if spellcheck is enabled for the author. Default value is true",
206
+ "type": "boolean",
207
+ "title": "spellCheckEnabled"
208
+ },
192
209
  "studentInstructionsEnabled": {
193
210
  "description": "Indicates if Student Instructions are enabled",
194
211
  "type": "boolean",
@@ -198,6 +215,12 @@
198
215
  "description": "Indicates if Teacher Instructions are enabled",
199
216
  "type": "boolean",
200
217
  "title": "teacherInstructionsEnabled"
218
+ },
219
+ "verticalMode": {
220
+ "description": "Indicates the layout of choices for player",
221
+ "default": ": true",
222
+ "type": "boolean",
223
+ "title": "verticalMode"
201
224
  }
202
225
  },
203
226
  "required": [
@@ -207,6 +230,7 @@
207
230
  "feedbackEnabled",
208
231
  "prompt",
209
232
  "rationaleEnabled",
233
+ "spellCheckEnabled",
210
234
  "studentInstructionsEnabled",
211
235
  "teacherInstructionsEnabled"
212
236
  ]
@@ -375,6 +399,27 @@
375
399
  }
376
400
  }
377
401
  },
402
+ "settingsPanelDisabled": {
403
+ "description": "Indicates if the settings panel is not available",
404
+ "type": "boolean",
405
+ "title": "settingsPanelDisabled"
406
+ },
407
+ "spellCheck": {
408
+ "title": "ConfigureProp",
409
+ "type": "object",
410
+ "properties": {
411
+ "settings": {
412
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
413
+ "type": "boolean",
414
+ "title": "settings"
415
+ },
416
+ "label": {
417
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
418
+ "type": "string",
419
+ "title": "label"
420
+ }
421
+ }
422
+ },
378
423
  "rationale": {
379
424
  "title": "ConfigureProp",
380
425
  "type": "object",
@@ -422,6 +467,100 @@
422
467
  "title": "label"
423
468
  }
424
469
  }
470
+ },
471
+ "choicesLayout": {
472
+ "title": "ConfigureProp",
473
+ "type": "object",
474
+ "properties": {
475
+ "settings": {
476
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
477
+ "type": "boolean",
478
+ "title": "settings"
479
+ },
480
+ "label": {
481
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
482
+ "type": "string",
483
+ "title": "label"
484
+ }
485
+ }
486
+ },
487
+ "gridColumns": {
488
+ "title": "ConfigureProp",
489
+ "type": "object",
490
+ "properties": {
491
+ "settings": {
492
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
493
+ "type": "boolean",
494
+ "title": "settings"
495
+ },
496
+ "label": {
497
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
498
+ "type": "string",
499
+ "title": "label"
500
+ }
501
+ }
502
+ },
503
+ "minAnswerChoices": {
504
+ "description": "Minimum number of answer choices",
505
+ "type": "number",
506
+ "title": "minAnswerChoices"
507
+ },
508
+ "maxAnswerChoices": {
509
+ "description": "Maximum number of answer choices",
510
+ "type": "number",
511
+ "title": "maxAnswerChoices"
512
+ },
513
+ "maxImageWidth": {
514
+ "title": "ConfigureMaxImageDimensionsProp",
515
+ "type": "object",
516
+ "properties": {
517
+ "teacherInstructions": {
518
+ "description": "Indicates the max dimension for images in teacher instructions",
519
+ "type": "number",
520
+ "title": "teacherInstructions"
521
+ },
522
+ "prompt": {
523
+ "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",
524
+ "type": "number",
525
+ "title": "prompt"
526
+ },
527
+ "rationale": {
528
+ "description": "Indicates the max dimension for images in rationale",
529
+ "type": "number",
530
+ "title": "rationale"
531
+ },
532
+ "choices": {
533
+ "description": "Indicates the max dimension for images in choices",
534
+ "type": "number",
535
+ "title": "choices"
536
+ }
537
+ }
538
+ },
539
+ "maxImageHeight": {
540
+ "title": "ConfigureMaxImageDimensionsProp",
541
+ "type": "object",
542
+ "properties": {
543
+ "teacherInstructions": {
544
+ "description": "Indicates the max dimension for images in teacher instructions",
545
+ "type": "number",
546
+ "title": "teacherInstructions"
547
+ },
548
+ "prompt": {
549
+ "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",
550
+ "type": "number",
551
+ "title": "prompt"
552
+ },
553
+ "rationale": {
554
+ "description": "Indicates the max dimension for images in rationale",
555
+ "type": "number",
556
+ "title": "rationale"
557
+ },
558
+ "choices": {
559
+ "description": "Indicates the max dimension for images in choices",
560
+ "type": "number",
561
+ "title": "choices"
562
+ }
563
+ }
425
564
  }
426
565
  }
427
566
  },
@@ -441,6 +580,32 @@
441
580
  }
442
581
  }
443
582
  },
583
+ "ConfigureMaxImageDimensionsProp": {
584
+ "title": "ConfigureMaxImageDimensionsProp",
585
+ "type": "object",
586
+ "properties": {
587
+ "teacherInstructions": {
588
+ "description": "Indicates the max dimension for images in teacher instructions",
589
+ "type": "number",
590
+ "title": "teacherInstructions"
591
+ },
592
+ "prompt": {
593
+ "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",
594
+ "type": "number",
595
+ "title": "prompt"
596
+ },
597
+ "rationale": {
598
+ "description": "Indicates the max dimension for images in rationale",
599
+ "type": "number",
600
+ "title": "rationale"
601
+ },
602
+ "choices": {
603
+ "description": "Indicates the max dimension for images in choices",
604
+ "type": "number",
605
+ "title": "choices"
606
+ }
607
+ }
608
+ },
444
609
  "Part": {
445
610
  "title": "Part",
446
611
  "type": "object",
@@ -523,6 +688,11 @@
523
688
  "type": "boolean",
524
689
  "title": "rationaleEnabled"
525
690
  },
691
+ "spellCheckEnabled": {
692
+ "description": "Indicates if spellcheck is enabled for the author. Default value is true",
693
+ "type": "boolean",
694
+ "title": "spellCheckEnabled"
695
+ },
526
696
  "studentInstructionsEnabled": {
527
697
  "description": "Indicates if Student Instructions are enabled",
528
698
  "type": "boolean",
@@ -532,6 +702,12 @@
532
702
  "description": "Indicates if Teacher Instructions are enabled",
533
703
  "type": "boolean",
534
704
  "title": "teacherInstructionsEnabled"
705
+ },
706
+ "verticalMode": {
707
+ "description": "Indicates the layout of choices for player",
708
+ "default": ": true",
709
+ "type": "boolean",
710
+ "title": "verticalMode"
535
711
  }
536
712
  },
537
713
  "required": [
@@ -541,6 +717,7 @@
541
717
  "feedbackEnabled",
542
718
  "prompt",
543
719
  "rationaleEnabled",
720
+ "spellCheckEnabled",
544
721
  "studentInstructionsEnabled",
545
722
  "teacherInstructionsEnabled"
546
723
  ]