@pie-element/ebsr 7.0.13 → 7.0.15-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 +328 -0
- package/configure/CHANGELOG.md +312 -0
- package/configure/lib/defaults.js +23 -4
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +5 -5
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +62 -50
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +3 -3
- package/configure/src/__tests__/__snapshots__/index.test.js.snap +4 -2
- package/configure/src/__tests__/index.test.js +164 -211
- package/configure/src/defaults.js +38 -19
- package/configure/src/index.js +8 -7
- package/configure/src/main.jsx +134 -147
- package/controller/CHANGELOG.md +20 -0
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +91 -12
- 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 +113 -141
- package/controller/src/__tests__/utils.test.js +6 -9
- package/controller/src/defaults.js +1 -1
- package/controller/src/index.js +104 -69
- package/controller/src/utils.js +6 -4
- package/docs/config-schema.json +280 -0
- package/docs/config-schema.json.md +217 -1
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +3 -3
- package/docs/pie-schema.json +127 -0
- package/docs/pie-schema.json.md +96 -0
- package/lib/index.js +11 -8
- package/lib/index.js.map +1 -1
- package/lib/print.js +243 -0
- package/lib/print.js.map +1 -0
- package/package.json +8 -4
- package/src/__tests__/index.test.js +2 -7
- package/src/index.js +7 -5
- 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:
|
|
@@ -150,6 +166,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
150
166
|
|
|
151
167
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
152
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
|
+
|
|
153
217
|
# `partB` (object, required)
|
|
154
218
|
|
|
155
219
|
Properties of the `partB` object:
|
|
@@ -238,6 +302,22 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
238
302
|
|
|
239
303
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
240
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
|
+
|
|
241
321
|
## `rationale` (object)
|
|
242
322
|
|
|
243
323
|
Properties of the `rationale` object:
|
|
@@ -298,6 +378,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
298
378
|
|
|
299
379
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
300
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
|
+
|
|
301
429
|
# `partLabels` (object)
|
|
302
430
|
|
|
303
431
|
Properties of the `partLabels` object:
|
|
@@ -322,6 +450,10 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
322
450
|
|
|
323
451
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
324
452
|
|
|
453
|
+
# `settingsPanelDisabled` (boolean)
|
|
454
|
+
|
|
455
|
+
Indicates if the settings panel is not available
|
|
456
|
+
|
|
325
457
|
# `scoringType` (object)
|
|
326
458
|
|
|
327
459
|
Properties of the `scoringType` object:
|
|
@@ -440,6 +572,22 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
440
572
|
|
|
441
573
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
442
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
|
+
|
|
443
591
|
### `rationale` (object)
|
|
444
592
|
|
|
445
593
|
Properties of the `rationale` object:
|
|
@@ -500,6 +648,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
500
648
|
|
|
501
649
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
502
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
|
+
|
|
503
699
|
## `ConfigureProp` (object)
|
|
504
700
|
|
|
505
701
|
Properties of the `ConfigureProp` object:
|
|
@@ -510,4 +706,24 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
510
706
|
|
|
511
707
|
### `label` (string)
|
|
512
708
|
|
|
513
|
-
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
|
package/docs/demo/config.js
CHANGED
|
@@ -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
|
};
|
package/docs/demo/generate.js
CHANGED
|
@@ -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
|
});
|
package/docs/pie-schema.json
CHANGED
|
@@ -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",
|
|
@@ -109,6 +114,7 @@
|
|
|
109
114
|
"feedbackEnabled",
|
|
110
115
|
"prompt",
|
|
111
116
|
"rationaleEnabled",
|
|
117
|
+
"spellCheckEnabled",
|
|
112
118
|
"studentInstructionsEnabled",
|
|
113
119
|
"teacherInstructionsEnabled"
|
|
114
120
|
]
|
|
@@ -195,6 +201,11 @@
|
|
|
195
201
|
"type": "boolean",
|
|
196
202
|
"title": "rationaleEnabled"
|
|
197
203
|
},
|
|
204
|
+
"spellCheckEnabled": {
|
|
205
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true",
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"title": "spellCheckEnabled"
|
|
208
|
+
},
|
|
198
209
|
"studentInstructionsEnabled": {
|
|
199
210
|
"description": "Indicates if Student Instructions are enabled",
|
|
200
211
|
"type": "boolean",
|
|
@@ -219,6 +230,7 @@
|
|
|
219
230
|
"feedbackEnabled",
|
|
220
231
|
"prompt",
|
|
221
232
|
"rationaleEnabled",
|
|
233
|
+
"spellCheckEnabled",
|
|
222
234
|
"studentInstructionsEnabled",
|
|
223
235
|
"teacherInstructionsEnabled"
|
|
224
236
|
]
|
|
@@ -387,6 +399,27 @@
|
|
|
387
399
|
}
|
|
388
400
|
}
|
|
389
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
|
+
},
|
|
390
423
|
"rationale": {
|
|
391
424
|
"title": "ConfigureProp",
|
|
392
425
|
"type": "object",
|
|
@@ -466,6 +499,68 @@
|
|
|
466
499
|
"title": "label"
|
|
467
500
|
}
|
|
468
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
|
+
}
|
|
469
564
|
}
|
|
470
565
|
}
|
|
471
566
|
},
|
|
@@ -485,6 +580,32 @@
|
|
|
485
580
|
}
|
|
486
581
|
}
|
|
487
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
|
+
},
|
|
488
609
|
"Part": {
|
|
489
610
|
"title": "Part",
|
|
490
611
|
"type": "object",
|
|
@@ -567,6 +688,11 @@
|
|
|
567
688
|
"type": "boolean",
|
|
568
689
|
"title": "rationaleEnabled"
|
|
569
690
|
},
|
|
691
|
+
"spellCheckEnabled": {
|
|
692
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true",
|
|
693
|
+
"type": "boolean",
|
|
694
|
+
"title": "spellCheckEnabled"
|
|
695
|
+
},
|
|
570
696
|
"studentInstructionsEnabled": {
|
|
571
697
|
"description": "Indicates if Student Instructions are enabled",
|
|
572
698
|
"type": "boolean",
|
|
@@ -591,6 +717,7 @@
|
|
|
591
717
|
"feedbackEnabled",
|
|
592
718
|
"prompt",
|
|
593
719
|
"rationaleEnabled",
|
|
720
|
+
"spellCheckEnabled",
|
|
594
721
|
"studentInstructionsEnabled",
|
|
595
722
|
"teacherInstructionsEnabled"
|
|
596
723
|
]
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -68,6 +68,10 @@ Indicates if Feedback is enabled
|
|
|
68
68
|
|
|
69
69
|
Indicates if Rationale are enabled
|
|
70
70
|
|
|
71
|
+
## `spellCheckEnabled` (boolean, required)
|
|
72
|
+
|
|
73
|
+
Indicates if spellcheck is enabled for the author. Default value is true
|
|
74
|
+
|
|
71
75
|
## `studentInstructionsEnabled` (boolean, required)
|
|
72
76
|
|
|
73
77
|
Indicates if Student Instructions are enabled
|
|
@@ -148,6 +152,10 @@ Indicates if Feedback is enabled
|
|
|
148
152
|
|
|
149
153
|
Indicates if Rationale are enabled
|
|
150
154
|
|
|
155
|
+
## `spellCheckEnabled` (boolean, required)
|
|
156
|
+
|
|
157
|
+
Indicates if spellcheck is enabled for the author. Default value is true
|
|
158
|
+
|
|
151
159
|
## `studentInstructionsEnabled` (boolean, required)
|
|
152
160
|
|
|
153
161
|
Indicates if Student Instructions are enabled
|
|
@@ -290,6 +298,22 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
290
298
|
|
|
291
299
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
292
300
|
|
|
301
|
+
### `settingsPanelDisabled` (boolean)
|
|
302
|
+
|
|
303
|
+
Indicates if the settings panel is not available
|
|
304
|
+
|
|
305
|
+
### `spellCheck` (object)
|
|
306
|
+
|
|
307
|
+
Properties of the `spellCheck` object:
|
|
308
|
+
|
|
309
|
+
#### `settings` (boolean)
|
|
310
|
+
|
|
311
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
312
|
+
|
|
313
|
+
#### `label` (string)
|
|
314
|
+
|
|
315
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
316
|
+
|
|
293
317
|
### `rationale` (object)
|
|
294
318
|
|
|
295
319
|
Properties of the `rationale` object:
|
|
@@ -350,6 +374,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
350
374
|
|
|
351
375
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
352
376
|
|
|
377
|
+
### `minAnswerChoices` (number)
|
|
378
|
+
|
|
379
|
+
Minimum number of answer choices
|
|
380
|
+
|
|
381
|
+
### `maxAnswerChoices` (number)
|
|
382
|
+
|
|
383
|
+
Maximum number of answer choices
|
|
384
|
+
|
|
385
|
+
### `maxImageWidth` (object)
|
|
386
|
+
|
|
387
|
+
Properties of the `maxImageWidth` object:
|
|
388
|
+
|
|
389
|
+
#### `teacherInstructions` (number)
|
|
390
|
+
|
|
391
|
+
Indicates the max dimension for images in teacher instructions
|
|
392
|
+
|
|
393
|
+
#### `prompt` (number)
|
|
394
|
+
|
|
395
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
396
|
+
|
|
397
|
+
#### `rationale` (number)
|
|
398
|
+
|
|
399
|
+
Indicates the max dimension for images in rationale
|
|
400
|
+
|
|
401
|
+
#### `choices` (number)
|
|
402
|
+
|
|
403
|
+
Indicates the max dimension for images in choices
|
|
404
|
+
|
|
405
|
+
### `maxImageHeight` (object)
|
|
406
|
+
|
|
407
|
+
Properties of the `maxImageHeight` object:
|
|
408
|
+
|
|
409
|
+
#### `teacherInstructions` (number)
|
|
410
|
+
|
|
411
|
+
Indicates the max dimension for images in teacher instructions
|
|
412
|
+
|
|
413
|
+
#### `prompt` (number)
|
|
414
|
+
|
|
415
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
416
|
+
|
|
417
|
+
#### `rationale` (number)
|
|
418
|
+
|
|
419
|
+
Indicates the max dimension for images in rationale
|
|
420
|
+
|
|
421
|
+
#### `choices` (number)
|
|
422
|
+
|
|
423
|
+
Indicates the max dimension for images in choices
|
|
424
|
+
|
|
353
425
|
## `ConfigureProp` (object)
|
|
354
426
|
|
|
355
427
|
Properties of the `ConfigureProp` object:
|
|
@@ -362,6 +434,26 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
362
434
|
|
|
363
435
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
364
436
|
|
|
437
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
438
|
+
|
|
439
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
440
|
+
|
|
441
|
+
### `teacherInstructions` (number)
|
|
442
|
+
|
|
443
|
+
Indicates the max dimension for images in teacher instructions
|
|
444
|
+
|
|
445
|
+
### `prompt` (number)
|
|
446
|
+
|
|
447
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
448
|
+
|
|
449
|
+
### `rationale` (number)
|
|
450
|
+
|
|
451
|
+
Indicates the max dimension for images in rationale
|
|
452
|
+
|
|
453
|
+
### `choices` (number)
|
|
454
|
+
|
|
455
|
+
Indicates the max dimension for images in choices
|
|
456
|
+
|
|
365
457
|
## `Part` (object)
|
|
366
458
|
|
|
367
459
|
Properties of the `Part` object:
|
|
@@ -428,6 +520,10 @@ Indicates if Feedback is enabled
|
|
|
428
520
|
|
|
429
521
|
Indicates if Rationale are enabled
|
|
430
522
|
|
|
523
|
+
### `spellCheckEnabled` (boolean, required)
|
|
524
|
+
|
|
525
|
+
Indicates if spellcheck is enabled for the author. Default value is true
|
|
526
|
+
|
|
431
527
|
### `studentInstructionsEnabled` (boolean, required)
|
|
432
528
|
|
|
433
529
|
Indicates if Student Instructions are enabled
|
package/lib/index.js
CHANGED
|
@@ -5,9 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
9
|
-
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
8
|
+
exports.isSessionComplete = exports["default"] = void 0;
|
|
11
9
|
|
|
12
10
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
11
|
|
|
@@ -15,6 +13,8 @@ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/w
|
|
|
15
13
|
|
|
16
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
15
|
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
18
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
19
19
|
|
|
20
20
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
@@ -31,9 +31,9 @@ var _get = _interopRequireDefault(require("lodash/get"));
|
|
|
31
31
|
|
|
32
32
|
var _debug = _interopRequireDefault(require("debug"));
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
37
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
39
39
|
|
|
@@ -53,7 +53,7 @@ var EbsrMC = /*#__PURE__*/function (_MultipleChoice) {
|
|
|
53
53
|
return _super.apply(this, arguments);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
return EbsrMC;
|
|
56
|
+
return (0, _createClass2["default"])(EbsrMC);
|
|
57
57
|
}(_multipleChoice["default"]);
|
|
58
58
|
|
|
59
59
|
var defineMultipleChoice = function defineMultipleChoice() {
|
|
@@ -125,6 +125,9 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
|
|
|
125
125
|
}
|
|
126
126
|
}, {
|
|
127
127
|
key: "session",
|
|
128
|
+
get: function get() {
|
|
129
|
+
return this._session;
|
|
130
|
+
},
|
|
128
131
|
set: function set(s) {
|
|
129
132
|
var _this3 = this;
|
|
130
133
|
|
|
@@ -138,7 +141,7 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
|
|
|
138
141
|
}, {
|
|
139
142
|
key: "setPartModel",
|
|
140
143
|
value: function setPartModel(part, key) {
|
|
141
|
-
if (this._model && this._model[key]) {
|
|
144
|
+
if (this._model && this._model[key] && part) {
|
|
142
145
|
var mode = this._model.mode;
|
|
143
146
|
part.model = _objectSpread(_objectSpread({}, this._model[key]), {}, {
|
|
144
147
|
mode: mode,
|
|
@@ -149,7 +152,7 @@ var Ebsr = /*#__PURE__*/function (_HTMLElement) {
|
|
|
149
152
|
}, {
|
|
150
153
|
key: "setPartSession",
|
|
151
154
|
value: function setPartSession(part, key) {
|
|
152
|
-
if (this._session && this._model) {
|
|
155
|
+
if (this._session && this._model && part) {
|
|
153
156
|
var value = this._session.value;
|
|
154
157
|
part.session = value && value[key] ? value[key] : {
|
|
155
158
|
id: key
|