@pie-element/explicit-constructed-response 6.5.1-next.9 → 6.6.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 +21 -0
- package/configure/CHANGELOG.md +19 -0
- package/configure/lib/defaults.js +63 -3
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/main.js +17 -13
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +17 -0
- package/controller/package.json +2 -2
- package/docs/config-schema.json +396 -3
- package/docs/config-schema.json.md +284 -0
- package/docs/pie-schema.json +127 -0
- package/docs/pie-schema.json.md +92 -0
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/print.js +2 -2
- package/lib/print.js.map +1 -1
- package/module/configure.js +76 -17
- package/module/element.js +46795 -3338
- package/module/manifest.json +1 -1
- package/module/print.js +46795 -3338
- package/package.json +3 -4
|
@@ -2,6 +2,42 @@ Config Object for @pie-elements/explicit-constructed-response
|
|
|
2
2
|
|
|
3
3
|
The schema defines the following properties:
|
|
4
4
|
|
|
5
|
+
# `baseInputConfiguration` (object)
|
|
6
|
+
|
|
7
|
+
Properties of the `baseInputConfiguration` object:
|
|
8
|
+
|
|
9
|
+
## `math` (object)
|
|
10
|
+
|
|
11
|
+
Properties of the `math` object:
|
|
12
|
+
|
|
13
|
+
### `disabled` (boolean)
|
|
14
|
+
|
|
15
|
+
Indicates if the plugin is disabled or not
|
|
16
|
+
|
|
17
|
+
## `audio` (object)
|
|
18
|
+
|
|
19
|
+
Properties of the `audio` object:
|
|
20
|
+
|
|
21
|
+
### `disabled` (boolean)
|
|
22
|
+
|
|
23
|
+
Indicates if the plugin is disabled or not
|
|
24
|
+
|
|
25
|
+
## `video` (object)
|
|
26
|
+
|
|
27
|
+
Properties of the `video` object:
|
|
28
|
+
|
|
29
|
+
### `disabled` (boolean)
|
|
30
|
+
|
|
31
|
+
Indicates if the plugin is disabled or not
|
|
32
|
+
|
|
33
|
+
## `image` (object)
|
|
34
|
+
|
|
35
|
+
Properties of the `image` object:
|
|
36
|
+
|
|
37
|
+
### `disabled` (boolean)
|
|
38
|
+
|
|
39
|
+
Indicates if the plugin is disabled or not
|
|
40
|
+
|
|
5
41
|
# `choices` (object)
|
|
6
42
|
|
|
7
43
|
Properties of the `choices` object:
|
|
@@ -18,6 +54,42 @@ Indicates the label for the item that has to be displayed in the Settings Panel
|
|
|
18
54
|
|
|
19
55
|
Properties of the `prompt` object:
|
|
20
56
|
|
|
57
|
+
## `inputConfiguration` (object)
|
|
58
|
+
|
|
59
|
+
Properties of the `inputConfiguration` object:
|
|
60
|
+
|
|
61
|
+
### `math` (object)
|
|
62
|
+
|
|
63
|
+
Properties of the `math` object:
|
|
64
|
+
|
|
65
|
+
#### `disabled` (boolean)
|
|
66
|
+
|
|
67
|
+
Indicates if the plugin is disabled or not
|
|
68
|
+
|
|
69
|
+
### `audio` (object)
|
|
70
|
+
|
|
71
|
+
Properties of the `audio` object:
|
|
72
|
+
|
|
73
|
+
#### `disabled` (boolean)
|
|
74
|
+
|
|
75
|
+
Indicates if the plugin is disabled or not
|
|
76
|
+
|
|
77
|
+
### `video` (object)
|
|
78
|
+
|
|
79
|
+
Properties of the `video` object:
|
|
80
|
+
|
|
81
|
+
#### `disabled` (boolean)
|
|
82
|
+
|
|
83
|
+
Indicates if the plugin is disabled or not
|
|
84
|
+
|
|
85
|
+
### `image` (object)
|
|
86
|
+
|
|
87
|
+
Properties of the `image` object:
|
|
88
|
+
|
|
89
|
+
#### `disabled` (boolean)
|
|
90
|
+
|
|
91
|
+
Indicates if the plugin is disabled or not
|
|
92
|
+
|
|
21
93
|
## `settings` (boolean)
|
|
22
94
|
|
|
23
95
|
Indicates if the item has to be displayed in the Settings Panel
|
|
@@ -30,6 +102,42 @@ Indicates the label for the item that has to be displayed in the Settings Panel
|
|
|
30
102
|
|
|
31
103
|
Properties of the `rationale` object:
|
|
32
104
|
|
|
105
|
+
## `inputConfiguration` (object)
|
|
106
|
+
|
|
107
|
+
Properties of the `inputConfiguration` object:
|
|
108
|
+
|
|
109
|
+
### `math` (object)
|
|
110
|
+
|
|
111
|
+
Properties of the `math` object:
|
|
112
|
+
|
|
113
|
+
#### `disabled` (boolean)
|
|
114
|
+
|
|
115
|
+
Indicates if the plugin is disabled or not
|
|
116
|
+
|
|
117
|
+
### `audio` (object)
|
|
118
|
+
|
|
119
|
+
Properties of the `audio` object:
|
|
120
|
+
|
|
121
|
+
#### `disabled` (boolean)
|
|
122
|
+
|
|
123
|
+
Indicates if the plugin is disabled or not
|
|
124
|
+
|
|
125
|
+
### `video` (object)
|
|
126
|
+
|
|
127
|
+
Properties of the `video` object:
|
|
128
|
+
|
|
129
|
+
#### `disabled` (boolean)
|
|
130
|
+
|
|
131
|
+
Indicates if the plugin is disabled or not
|
|
132
|
+
|
|
133
|
+
### `image` (object)
|
|
134
|
+
|
|
135
|
+
Properties of the `image` object:
|
|
136
|
+
|
|
137
|
+
#### `disabled` (boolean)
|
|
138
|
+
|
|
139
|
+
Indicates if the plugin is disabled or not
|
|
140
|
+
|
|
33
141
|
## `settings` (boolean)
|
|
34
142
|
|
|
35
143
|
Indicates if the item has to be displayed in the Settings Panel
|
|
@@ -94,6 +202,90 @@ Indicates the label for the item that has to be displayed in the Settings Panel
|
|
|
94
202
|
|
|
95
203
|
Properties of the `teacherInstructions` object:
|
|
96
204
|
|
|
205
|
+
## `inputConfiguration` (object)
|
|
206
|
+
|
|
207
|
+
Properties of the `inputConfiguration` object:
|
|
208
|
+
|
|
209
|
+
### `math` (object)
|
|
210
|
+
|
|
211
|
+
Properties of the `math` object:
|
|
212
|
+
|
|
213
|
+
#### `disabled` (boolean)
|
|
214
|
+
|
|
215
|
+
Indicates if the plugin is disabled or not
|
|
216
|
+
|
|
217
|
+
### `audio` (object)
|
|
218
|
+
|
|
219
|
+
Properties of the `audio` object:
|
|
220
|
+
|
|
221
|
+
#### `disabled` (boolean)
|
|
222
|
+
|
|
223
|
+
Indicates if the plugin is disabled or not
|
|
224
|
+
|
|
225
|
+
### `video` (object)
|
|
226
|
+
|
|
227
|
+
Properties of the `video` object:
|
|
228
|
+
|
|
229
|
+
#### `disabled` (boolean)
|
|
230
|
+
|
|
231
|
+
Indicates if the plugin is disabled or not
|
|
232
|
+
|
|
233
|
+
### `image` (object)
|
|
234
|
+
|
|
235
|
+
Properties of the `image` object:
|
|
236
|
+
|
|
237
|
+
#### `disabled` (boolean)
|
|
238
|
+
|
|
239
|
+
Indicates if the plugin is disabled or not
|
|
240
|
+
|
|
241
|
+
## `settings` (boolean)
|
|
242
|
+
|
|
243
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
244
|
+
|
|
245
|
+
## `label` (string)
|
|
246
|
+
|
|
247
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
248
|
+
|
|
249
|
+
# `template` (object)
|
|
250
|
+
|
|
251
|
+
Properties of the `template` object:
|
|
252
|
+
|
|
253
|
+
## `inputConfiguration` (object)
|
|
254
|
+
|
|
255
|
+
Properties of the `inputConfiguration` object:
|
|
256
|
+
|
|
257
|
+
### `math` (object)
|
|
258
|
+
|
|
259
|
+
Properties of the `math` object:
|
|
260
|
+
|
|
261
|
+
#### `disabled` (boolean)
|
|
262
|
+
|
|
263
|
+
Indicates if the plugin is disabled or not
|
|
264
|
+
|
|
265
|
+
### `audio` (object)
|
|
266
|
+
|
|
267
|
+
Properties of the `audio` object:
|
|
268
|
+
|
|
269
|
+
#### `disabled` (boolean)
|
|
270
|
+
|
|
271
|
+
Indicates if the plugin is disabled or not
|
|
272
|
+
|
|
273
|
+
### `video` (object)
|
|
274
|
+
|
|
275
|
+
Properties of the `video` object:
|
|
276
|
+
|
|
277
|
+
#### `disabled` (boolean)
|
|
278
|
+
|
|
279
|
+
Indicates if the plugin is disabled or not
|
|
280
|
+
|
|
281
|
+
### `image` (object)
|
|
282
|
+
|
|
283
|
+
Properties of the `image` object:
|
|
284
|
+
|
|
285
|
+
#### `disabled` (boolean)
|
|
286
|
+
|
|
287
|
+
Indicates if the plugin is disabled or not
|
|
288
|
+
|
|
97
289
|
## `settings` (boolean)
|
|
98
290
|
|
|
99
291
|
Indicates if the item has to be displayed in the Settings Panel
|
|
@@ -296,6 +488,50 @@ Default: `true`
|
|
|
296
488
|
|
|
297
489
|
The schema defines the following additional types:
|
|
298
490
|
|
|
491
|
+
## `EditableHtmlConfigureProp` (object)
|
|
492
|
+
|
|
493
|
+
Properties of the `EditableHtmlConfigureProp` object:
|
|
494
|
+
|
|
495
|
+
### `math` (object)
|
|
496
|
+
|
|
497
|
+
Properties of the `math` object:
|
|
498
|
+
|
|
499
|
+
#### `disabled` (boolean)
|
|
500
|
+
|
|
501
|
+
Indicates if the plugin is disabled or not
|
|
502
|
+
|
|
503
|
+
### `audio` (object)
|
|
504
|
+
|
|
505
|
+
Properties of the `audio` object:
|
|
506
|
+
|
|
507
|
+
#### `disabled` (boolean)
|
|
508
|
+
|
|
509
|
+
Indicates if the plugin is disabled or not
|
|
510
|
+
|
|
511
|
+
### `video` (object)
|
|
512
|
+
|
|
513
|
+
Properties of the `video` object:
|
|
514
|
+
|
|
515
|
+
#### `disabled` (boolean)
|
|
516
|
+
|
|
517
|
+
Indicates if the plugin is disabled or not
|
|
518
|
+
|
|
519
|
+
### `image` (object)
|
|
520
|
+
|
|
521
|
+
Properties of the `image` object:
|
|
522
|
+
|
|
523
|
+
#### `disabled` (boolean)
|
|
524
|
+
|
|
525
|
+
Indicates if the plugin is disabled or not
|
|
526
|
+
|
|
527
|
+
## `EditableHtmlButtonConfigure` (object)
|
|
528
|
+
|
|
529
|
+
Properties of the `EditableHtmlButtonConfigure` object:
|
|
530
|
+
|
|
531
|
+
### `disabled` (boolean)
|
|
532
|
+
|
|
533
|
+
Indicates if the plugin is disabled or not
|
|
534
|
+
|
|
299
535
|
## `ConfigureProp` (object)
|
|
300
536
|
|
|
301
537
|
Properties of the `ConfigureProp` object:
|
|
@@ -308,6 +544,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
308
544
|
|
|
309
545
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
310
546
|
|
|
547
|
+
## `EditableHtmlPluginConfigure` (object)
|
|
548
|
+
|
|
549
|
+
Properties of the `EditableHtmlPluginConfigure` object:
|
|
550
|
+
|
|
551
|
+
### `inputConfiguration` (object)
|
|
552
|
+
|
|
553
|
+
Properties of the `inputConfiguration` object:
|
|
554
|
+
|
|
555
|
+
#### `math` (object)
|
|
556
|
+
|
|
557
|
+
Properties of the `math` object:
|
|
558
|
+
|
|
559
|
+
##### `disabled` (boolean)
|
|
560
|
+
|
|
561
|
+
Indicates if the plugin is disabled or not
|
|
562
|
+
|
|
563
|
+
#### `audio` (object)
|
|
564
|
+
|
|
565
|
+
Properties of the `audio` object:
|
|
566
|
+
|
|
567
|
+
##### `disabled` (boolean)
|
|
568
|
+
|
|
569
|
+
Indicates if the plugin is disabled or not
|
|
570
|
+
|
|
571
|
+
#### `video` (object)
|
|
572
|
+
|
|
573
|
+
Properties of the `video` object:
|
|
574
|
+
|
|
575
|
+
##### `disabled` (boolean)
|
|
576
|
+
|
|
577
|
+
Indicates if the plugin is disabled or not
|
|
578
|
+
|
|
579
|
+
#### `image` (object)
|
|
580
|
+
|
|
581
|
+
Properties of the `image` object:
|
|
582
|
+
|
|
583
|
+
##### `disabled` (boolean)
|
|
584
|
+
|
|
585
|
+
Indicates if the plugin is disabled or not
|
|
586
|
+
|
|
587
|
+
### `settings` (boolean)
|
|
588
|
+
|
|
589
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
590
|
+
|
|
591
|
+
### `label` (string)
|
|
592
|
+
|
|
593
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
594
|
+
|
|
311
595
|
## `ConfigureMaxImageDimensionsProp` (object)
|
|
312
596
|
|
|
313
597
|
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
package/docs/pie-schema.json
CHANGED
|
@@ -169,6 +169,67 @@
|
|
|
169
169
|
"teacherInstructionsEnabled"
|
|
170
170
|
],
|
|
171
171
|
"definitions": {
|
|
172
|
+
"EditableHtmlConfigureProp": {
|
|
173
|
+
"title": "EditableHtmlConfigureProp",
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"math": {
|
|
177
|
+
"title": "EditableHtmlButtonConfigure",
|
|
178
|
+
"type": "object",
|
|
179
|
+
"properties": {
|
|
180
|
+
"disabled": {
|
|
181
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
182
|
+
"type": "boolean",
|
|
183
|
+
"title": "disabled"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"audio": {
|
|
188
|
+
"title": "EditableHtmlButtonConfigure",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"properties": {
|
|
191
|
+
"disabled": {
|
|
192
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"title": "disabled"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"video": {
|
|
199
|
+
"title": "EditableHtmlButtonConfigure",
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"disabled": {
|
|
203
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
204
|
+
"type": "boolean",
|
|
205
|
+
"title": "disabled"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"image": {
|
|
210
|
+
"title": "EditableHtmlButtonConfigure",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"disabled": {
|
|
214
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"title": "disabled"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"EditableHtmlButtonConfigure": {
|
|
223
|
+
"title": "EditableHtmlButtonConfigure",
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"disabled": {
|
|
227
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
228
|
+
"type": "boolean",
|
|
229
|
+
"title": "disabled"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
172
233
|
"ConfigureProp": {
|
|
173
234
|
"title": "ConfigureProp",
|
|
174
235
|
"type": "object",
|
|
@@ -185,6 +246,72 @@
|
|
|
185
246
|
}
|
|
186
247
|
}
|
|
187
248
|
},
|
|
249
|
+
"EditableHtmlPluginConfigure": {
|
|
250
|
+
"title": "EditableHtmlPluginConfigure",
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"inputConfiguration": {
|
|
254
|
+
"title": "EditableHtmlConfigureProp",
|
|
255
|
+
"type": "object",
|
|
256
|
+
"properties": {
|
|
257
|
+
"math": {
|
|
258
|
+
"title": "EditableHtmlButtonConfigure",
|
|
259
|
+
"type": "object",
|
|
260
|
+
"properties": {
|
|
261
|
+
"disabled": {
|
|
262
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"title": "disabled"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"audio": {
|
|
269
|
+
"title": "EditableHtmlButtonConfigure",
|
|
270
|
+
"type": "object",
|
|
271
|
+
"properties": {
|
|
272
|
+
"disabled": {
|
|
273
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
274
|
+
"type": "boolean",
|
|
275
|
+
"title": "disabled"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"video": {
|
|
280
|
+
"title": "EditableHtmlButtonConfigure",
|
|
281
|
+
"type": "object",
|
|
282
|
+
"properties": {
|
|
283
|
+
"disabled": {
|
|
284
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
285
|
+
"type": "boolean",
|
|
286
|
+
"title": "disabled"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"image": {
|
|
291
|
+
"title": "EditableHtmlButtonConfigure",
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"disabled": {
|
|
295
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
296
|
+
"type": "boolean",
|
|
297
|
+
"title": "disabled"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"settings": {
|
|
304
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
305
|
+
"type": "boolean",
|
|
306
|
+
"title": "settings"
|
|
307
|
+
},
|
|
308
|
+
"label": {
|
|
309
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
310
|
+
"type": "string",
|
|
311
|
+
"title": "label"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
188
315
|
"ConfigureMaxImageDimensionsProp": {
|
|
189
316
|
"title": "ConfigureMaxImageDimensionsProp",
|
|
190
317
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -112,6 +112,50 @@ The html Element tag name
|
|
|
112
112
|
|
|
113
113
|
The schema defines the following additional types:
|
|
114
114
|
|
|
115
|
+
## `EditableHtmlConfigureProp` (object)
|
|
116
|
+
|
|
117
|
+
Properties of the `EditableHtmlConfigureProp` object:
|
|
118
|
+
|
|
119
|
+
### `math` (object)
|
|
120
|
+
|
|
121
|
+
Properties of the `math` object:
|
|
122
|
+
|
|
123
|
+
#### `disabled` (boolean)
|
|
124
|
+
|
|
125
|
+
Indicates if the plugin is disabled or not
|
|
126
|
+
|
|
127
|
+
### `audio` (object)
|
|
128
|
+
|
|
129
|
+
Properties of the `audio` object:
|
|
130
|
+
|
|
131
|
+
#### `disabled` (boolean)
|
|
132
|
+
|
|
133
|
+
Indicates if the plugin is disabled or not
|
|
134
|
+
|
|
135
|
+
### `video` (object)
|
|
136
|
+
|
|
137
|
+
Properties of the `video` object:
|
|
138
|
+
|
|
139
|
+
#### `disabled` (boolean)
|
|
140
|
+
|
|
141
|
+
Indicates if the plugin is disabled or not
|
|
142
|
+
|
|
143
|
+
### `image` (object)
|
|
144
|
+
|
|
145
|
+
Properties of the `image` object:
|
|
146
|
+
|
|
147
|
+
#### `disabled` (boolean)
|
|
148
|
+
|
|
149
|
+
Indicates if the plugin is disabled or not
|
|
150
|
+
|
|
151
|
+
## `EditableHtmlButtonConfigure` (object)
|
|
152
|
+
|
|
153
|
+
Properties of the `EditableHtmlButtonConfigure` object:
|
|
154
|
+
|
|
155
|
+
### `disabled` (boolean)
|
|
156
|
+
|
|
157
|
+
Indicates if the plugin is disabled or not
|
|
158
|
+
|
|
115
159
|
## `ConfigureProp` (object)
|
|
116
160
|
|
|
117
161
|
Properties of the `ConfigureProp` object:
|
|
@@ -124,6 +168,54 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
124
168
|
|
|
125
169
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
126
170
|
|
|
171
|
+
## `EditableHtmlPluginConfigure` (object)
|
|
172
|
+
|
|
173
|
+
Properties of the `EditableHtmlPluginConfigure` object:
|
|
174
|
+
|
|
175
|
+
### `inputConfiguration` (object)
|
|
176
|
+
|
|
177
|
+
Properties of the `inputConfiguration` object:
|
|
178
|
+
|
|
179
|
+
#### `math` (object)
|
|
180
|
+
|
|
181
|
+
Properties of the `math` object:
|
|
182
|
+
|
|
183
|
+
##### `disabled` (boolean)
|
|
184
|
+
|
|
185
|
+
Indicates if the plugin is disabled or not
|
|
186
|
+
|
|
187
|
+
#### `audio` (object)
|
|
188
|
+
|
|
189
|
+
Properties of the `audio` object:
|
|
190
|
+
|
|
191
|
+
##### `disabled` (boolean)
|
|
192
|
+
|
|
193
|
+
Indicates if the plugin is disabled or not
|
|
194
|
+
|
|
195
|
+
#### `video` (object)
|
|
196
|
+
|
|
197
|
+
Properties of the `video` object:
|
|
198
|
+
|
|
199
|
+
##### `disabled` (boolean)
|
|
200
|
+
|
|
201
|
+
Indicates if the plugin is disabled or not
|
|
202
|
+
|
|
203
|
+
#### `image` (object)
|
|
204
|
+
|
|
205
|
+
Properties of the `image` object:
|
|
206
|
+
|
|
207
|
+
##### `disabled` (boolean)
|
|
208
|
+
|
|
209
|
+
Indicates if the plugin is disabled or not
|
|
210
|
+
|
|
211
|
+
### `settings` (boolean)
|
|
212
|
+
|
|
213
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
214
|
+
|
|
215
|
+
### `label` (string)
|
|
216
|
+
|
|
217
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
218
|
+
|
|
127
219
|
## `ConfigureMaxImageDimensionsProp` (object)
|
|
128
220
|
|
|
129
221
|
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
29
29
|
|
|
30
30
|
var _piePlayerEvents = require("@pie-framework/pie-player-events");
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
|
|
33
33
|
|
|
34
34
|
var _main = _interopRequireDefault(require("./main"));
|
|
35
35
|
|
|
@@ -71,7 +71,7 @@ var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
|
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
_reactDom["default"].render(elem, (0, _assertThisInitialized2["default"])(_this), function () {
|
|
74
|
-
(0,
|
|
74
|
+
(0, _mathRendering.renderMath)((0, _assertThisInitialized2["default"])(_this));
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
});
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["InlineDropdown","_model","_session","elem","React","createElement","Main","teacherInstructions","prompt","note","showNote","env","rationale","disabled","choices","markup","mode","maxLengthPerChoice","maxLengthPerChoiceEnabled","playerSpellCheckEnabled","value","feedback","displayType","language","onChange","changeSession","ReactDOM","render","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","session","dispatchChangedEvent","_render","m","ModelSetEvent","s","setAttribute","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,c;;;;;AACnB,4BAAc;AAAA;;AAAA;AACZ;AADY,gGAwBJ,YAAM;AACd,UAAI,MAAKC,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAIC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,UAAAA,mBAAmB,EAAE,MAAKN,MAAL,CAAYM,mBADE;AAEnCC,UAAAA,MAAM,EAAE,MAAKP,MAAL,CAAYO,MAFe;AAGnCC,UAAAA,IAAI,EAAE,MAAKR,MAAL,CAAYQ,IAHiB;AAInCC,UAAAA,QAAQ,EAAE,MAAKT,MAAL,CAAYS,QAJa;AAKnCC,UAAAA,GAAG,EAAE,MAAKV,MAAL,CAAYU,GALkB;AAMnCC,UAAAA,SAAS,EAAE,MAAKX,MAAL,CAAYW,SANY;AAOnCC,UAAAA,QAAQ,EAAE,MAAKZ,MAAL,CAAYY,QAPa;AAQnCC,UAAAA,OAAO,EAAE,MAAKb,MAAL,CAAYa,OARc;AASnCC,UAAAA,MAAM,EAAE,MAAKd,MAAL,CAAYc,MATe;AAUnCC,UAAAA,IAAI,EAAE,MAAKf,MAAL,CAAYe,IAViB;AAWnCC,UAAAA,kBAAkB,EAAE,MAAKhB,MAAL,CAAYgB,kBAXG;AAYnCC,UAAAA,yBAAyB,EAAE,MAAKjB,MAAL,CAAYiB,yBAZJ;AAanCC,UAAAA,uBAAuB,EAAE,MAAKlB,MAAL,CAAYkB,uBAbF;AAcnCC,UAAAA,KAAK,EAAE,MAAKlB,QAAL,CAAckB,KAdc;AAenCC,UAAAA,QAAQ,EAAE,MAAKpB,MAAL,CAAYoB,QAfa;AAgBnCC,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ourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["InlineDropdown","_model","_session","elem","React","createElement","Main","teacherInstructions","prompt","note","showNote","env","rationale","disabled","choices","markup","mode","maxLengthPerChoice","maxLengthPerChoiceEnabled","playerSpellCheckEnabled","value","feedback","displayType","language","onChange","changeSession","ReactDOM","render","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","session","dispatchChangedEvent","_render","m","ModelSetEvent","s","setAttribute","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,c;;;;;AACnB,4BAAc;AAAA;;AAAA;AACZ;AADY,gGAwBJ,YAAM;AACd,UAAI,MAAKC,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAIC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,UAAAA,mBAAmB,EAAE,MAAKN,MAAL,CAAYM,mBADE;AAEnCC,UAAAA,MAAM,EAAE,MAAKP,MAAL,CAAYO,MAFe;AAGnCC,UAAAA,IAAI,EAAE,MAAKR,MAAL,CAAYQ,IAHiB;AAInCC,UAAAA,QAAQ,EAAE,MAAKT,MAAL,CAAYS,QAJa;AAKnCC,UAAAA,GAAG,EAAE,MAAKV,MAAL,CAAYU,GALkB;AAMnCC,UAAAA,SAAS,EAAE,MAAKX,MAAL,CAAYW,SANY;AAOnCC,UAAAA,QAAQ,EAAE,MAAKZ,MAAL,CAAYY,QAPa;AAQnCC,UAAAA,OAAO,EAAE,MAAKb,MAAL,CAAYa,OARc;AASnCC,UAAAA,MAAM,EAAE,MAAKd,MAAL,CAAYc,MATe;AAUnCC,UAAAA,IAAI,EAAE,MAAKf,MAAL,CAAYe,IAViB;AAWnCC,UAAAA,kB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AAc;AACZ,aAAO,KAAKhC,QAAZ;AACD,K;SAPD,aAAYmC,CAAZ,EAAe;AACb,WAAKnC,QAAL,GAAgBmC,CAAhB;;AACA,WAAKH,OAAL;AACD;;;WA6CD,6BAAoB;AAClB,WAAKI,YAAL,CAAkB,YAAlB,EAAgC,4BAAhC;AACA,WAAKA,YAAL,CAAkB,MAAlB,EAA0B,QAA1B;;AAEA,WAAKJ,OAAL;AACD;;;kDArEyCK,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\n\nimport Main from './main';\n\nexport default class InlineDropdown extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(\n new ModelSetEvent(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model),\n );\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n _render = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n teacherInstructions: this._model.teacherInstructions,\n prompt: this._model.prompt,\n note: this._model.note,\n showNote: this._model.showNote,\n env: this._model.env,\n rationale: this._model.rationale,\n disabled: this._model.disabled,\n choices: this._model.choices,\n markup: this._model.markup,\n mode: this._model.mode,\n maxLengthPerChoice: this._model.maxLengthPerChoice,\n maxLengthPerChoiceEnabled: this._model.maxLengthPerChoiceEnabled,\n playerSpellCheckEnabled: this._model.playerSpellCheckEnabled,\n value: this._session.value,\n feedback: this._model.feedback,\n displayType: this._model.displayType,\n language: this._model.language,\n onChange: this.changeSession,\n });\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.session && !!this.session.value));\n };\n\n changeSession = (value) => {\n this.session.value = value;\n this.dispatchChangedEvent();\n this._render();\n };\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Fill in the Blank Question');\n this.setAttribute('role', 'region');\n\n this._render();\n }\n}\n"],"file":"index.js"}
|
package/lib/print.js
CHANGED
|
@@ -31,7 +31,7 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
|
31
31
|
|
|
32
32
|
var _main = _interopRequireDefault(require("./main"));
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
|
|
35
35
|
|
|
36
36
|
var _debug = _interopRequireDefault(require("debug"));
|
|
37
37
|
|
|
@@ -80,7 +80,7 @@ var ExplicitConstructedResponsePrint = /*#__PURE__*/function (_HTMLElement) {
|
|
|
80
80
|
|
|
81
81
|
_reactDom["default"].render(element, (0, _assertThisInitialized2["default"])(_this), function () {
|
|
82
82
|
log('render complete - render math');
|
|
83
|
-
(0,
|
|
83
|
+
(0, _mathRendering.renderMath)((0, _assertThisInitialized2["default"])(_this));
|
|
84
84
|
});
|
|
85
85
|
} else {
|
|
86
86
|
log('skip');
|
package/lib/print.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","rationale","rationaleEnabled","alwaysShowCorrect","mode","disabled","animationsDisabled","ExplicitConstructedResponsePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","onChange","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,iDAAN,CAAZ;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,KAAD,EAAQC,IAAR,EAAiB;AACzC,MAAMC,KAAK,GAAGD,IAAI,CAACE,IAAL,KAAc,YAA5B;AAEAH,EA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CAAC,MAAD,CAAH;AACD;AACF,KAnBc,EAoBf,EApBe,EAqBf;AAAE8B,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KArBe,CAAjB;AALY;AA4Bb;;;;SACD,aAAYC,CAAZ,EAAe;AACb,WAAKd,QAAL,GAAgBc,CAAhB;AACD;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKd,MAAL,GAAcc,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAvCsCa,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport Main from './main';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering
|
|
1
|
+
{"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","rationale","rationaleEnabled","alwaysShowCorrect","mode","disabled","animationsDisabled","ExplicitConstructedResponsePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","onChange","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,iDAAN,CAAZ;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,KAAD,EAAQC,IAAR,EAAiB;AACzC,MAAMC,KAAK,GAAGD,IAAI,CAACE,IAAL,KAAc,YAA5B;AAEAH,EAAAA,KAAK,CAACI,MAAN,GAAeJ,KAAK,CAACK,aAAN,KAAwB,KAAxB,GAAgCL,KAAK,CAACI,MAAtC,GAA+CE,SAA9D;AACAN,EAAAA,KAAK,CAACO,mBAAN,GACEL,KAAK,IAAIF,KAAK,CAACQ,0BAAN,KAAqC,KAA9C,GAAsDR,KAAK,CAACO,mBAA5D,GAAkFD,SADpF;AAEAN,EAAAA,KAAK,C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AAL,GAAcc,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAvCsCa,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport Main from './main';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\nimport debug from 'debug';\n\nconst log = debug('pie-element:explicit-constructed-response:print');\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n model.prompt = model.promptEnabled !== false ? model.prompt : undefined;\n model.teacherInstructions =\n instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;\n model.rationale = instr && model.rationaleEnabled !== false ? model.rationale : undefined;\n\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : model.mode;\n\n model.disabled = true;\n model.animationsDisabled = true;\n\n return model;\n};\n\nexport default class ExplicitConstructedResponsePrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = [];\n this._rerender = debounce(\n () => {\n if (this._model && this._session) {\n const printModel = preparePrintModel(this._model, this._options);\n\n const element =\n this._options &&\n React.createElement(Main, {\n ...printModel,\n onChange: () => {},\n });\n\n ReactDOM.render(element, this, () => {\n log('render complete - render math');\n renderMath(this);\n });\n } else {\n log('skip');\n }\n },\n 50,\n { leading: false, trailing: true },\n );\n }\n set options(o) {\n this._options = o;\n }\n\n set model(s) {\n this._model = s;\n this._rerender();\n }\n\n connectedCallback() {}\n}\n"],"file":"print.js"}
|