@pie-element/complex-rubric 8.0.4-next.20261011174919 → 8.0.4

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 (37) hide show
  1. package/dist/author/defaults.d.ts +10 -10
  2. package/dist/author/defaults.js +14 -14
  3. package/dist/author/index.d.ts +20 -20
  4. package/dist/author/index.js +4 -0
  5. package/dist/author/main.d.ts +26 -13
  6. package/dist/author/main.js +20 -30
  7. package/dist/browser/author/index.js +54 -76
  8. package/dist/browser/author/index.js.map +1 -1
  9. package/dist/browser/controller/index.js.map +1 -1
  10. package/dist/browser/delivery/index.js +2 -2
  11. package/dist/browser/{delivery-Z7dq393G.js → delivery-pWFw_9mm.js} +2 -2
  12. package/dist/browser/{delivery-Z7dq393G.js.map → delivery-pWFw_9mm.js.map} +1 -1
  13. package/dist/browser/editor-runtime/author/index.js +54 -76
  14. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  15. package/dist/browser/editor-runtime/controller/index.js.map +1 -1
  16. package/dist/browser/editor-runtime/delivery/index.js +2 -2
  17. package/dist/browser/editor-runtime/{delivery-BD3aCYuV.js → delivery-DHFx9jYx.js} +2 -2
  18. package/dist/browser/editor-runtime/{delivery-BD3aCYuV.js.map → delivery-DHFx9jYx.js.map} +1 -1
  19. package/dist/browser/editor-runtime/print/index.js +2 -2
  20. package/dist/browser/editor-runtime/{private-tags-Dq8udgmI.js → private-tags-BRKFxLqP.js} +2 -2
  21. package/dist/browser/editor-runtime/{private-tags-Dq8udgmI.js.map → private-tags-BRKFxLqP.js.map} +1 -1
  22. package/dist/browser/print/index.js +2 -2
  23. package/dist/browser/{private-tags-C5WL6_In.js → private-tags-CMwniYBP.js} +2 -2
  24. package/dist/browser/{private-tags-C5WL6_In.js.map → private-tags-CMwniYBP.js.map} +1 -1
  25. package/dist/controller/defaults.d.ts +13 -12
  26. package/dist/controller/index.d.ts +88 -5
  27. package/dist/controller/utils.d.ts +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.iife.js +1 -1
  30. package/dist/private-tags.js +1 -1
  31. package/dist/schemas/configuration.schema.json +469 -0
  32. package/dist/schemas/model.schema.json +553 -0
  33. package/dist/schemas/session.schema.json +17 -0
  34. package/dist/types.d.ts +60 -0
  35. package/module/print.js +1 -1
  36. package/module/print.js.map +1 -1
  37. package/package.json +16 -12
@@ -0,0 +1,469 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@pie-element/complex-rubric@8.0.4/dist/schemas/configuration.schema.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "width": {
7
+ "type": "string",
8
+ "description": "How large should complex-rubric be. It replaces the `width` of the simple rubric and rubricless configurations, and the multi trait rubric's when set."
9
+ },
10
+ "rubricOptions": {
11
+ "type": "array",
12
+ "items": {
13
+ "$ref": "#/definitions/RubricType"
14
+ },
15
+ "description": "Contains the available rubric types; the author offers a choice between them when there is more than one",
16
+ "default": [
17
+ "simpleRubric",
18
+ "multiTraitRubric",
19
+ "rubricless"
20
+ ]
21
+ },
22
+ "simpleRubric": {
23
+ "$ref": "#/definitions/RubricConfiguration",
24
+ "description": "Contains the simple rubric configuration; its `width` is not read."
25
+ },
26
+ "multiTraitRubric": {
27
+ "$ref": "#/definitions/MultiTraitRubricConfiguration",
28
+ "description": "Contains the multi trait rubric configuration."
29
+ },
30
+ "rubricless": {
31
+ "$ref": "#/definitions/RubricConfiguration",
32
+ "description": "Contains the rubricless configuration, which takes effect with `rubricless: true`; its `width` is not read."
33
+ },
34
+ "contentDimensions": {
35
+ "$ref": "#/definitions/ContentDimensions",
36
+ "description": "Dimensions of the authoring container"
37
+ }
38
+ },
39
+ "description": "Config Object for `@pie-element/complex-rubric`",
40
+ "definitions": {
41
+ "RubricType": {
42
+ "type": "string",
43
+ "enum": [
44
+ "simpleRubric",
45
+ "multiTraitRubric",
46
+ "rubricless"
47
+ ],
48
+ "description": "Indicates the type of the rubric"
49
+ },
50
+ "RubricConfiguration": {
51
+ "type": "object",
52
+ "properties": {
53
+ "baseInputConfiguration": {
54
+ "$ref": "#/definitions/EditableHtmlConfigureProp",
55
+ "description": "Base editable html input configuration regarding plugins that are enabled/disabled E.g. audio, video, image"
56
+ },
57
+ "settingsPanelDisabled": {
58
+ "type": "boolean",
59
+ "description": "Indicates if the settings panel is not available"
60
+ },
61
+ "showExcludeZero": {
62
+ "$ref": "#/definitions/ConfigureProp",
63
+ "description": "Ability to exclude zero configuration"
64
+ },
65
+ "showMaxPoint": {
66
+ "$ref": "#/definitions/ConfigureProp",
67
+ "description": "Show max points dropdown configuration"
68
+ },
69
+ "width": {
70
+ "type": "string",
71
+ "description": "How large can the rubric be"
72
+ },
73
+ "mathMlOptions": {
74
+ "$ref": "#/definitions/ConfigureMathMLProp",
75
+ "description": "Configuration for editable-html"
76
+ },
77
+ "maxMaxPoints": {
78
+ "type": "number",
79
+ "description": "Indicates the max limit for scoring points; the dropdown stops at 100",
80
+ "default": 9
81
+ },
82
+ "rubricless": {
83
+ "type": "boolean",
84
+ "description": "Indicates that it is rubricless: the author edits max points and an instruction, without point descriptors"
85
+ },
86
+ "rubriclessInstruction": {
87
+ "$ref": "#/definitions/EditableHtmlPluginConfigure",
88
+ "description": "Scoring instruction for rubricless: `settings` and `label` set its Settings Panel toggle. Its editor takes `baseInputConfiguration`; `inputConfiguration` is not read."
89
+ },
90
+ "contentDimensions": {
91
+ "$ref": "#/definitions/ContentDimensions",
92
+ "description": "Dimensions of the authoring container"
93
+ },
94
+ "showPrompt": {
95
+ "type": "boolean",
96
+ "description": "Not read by this element: the rubric has no prompt"
97
+ },
98
+ "promptLabel": {
99
+ "type": "string",
100
+ "description": "Not read by this element: the rubric has no prompt"
101
+ },
102
+ "settingsPartialScoring": {
103
+ "type": "boolean",
104
+ "description": "Not read by this element: the rubric is not scored"
105
+ }
106
+ },
107
+ "description": "Config Object for `@pie-element/rubric`"
108
+ },
109
+ "EditableHtmlConfigureProp": {
110
+ "type": "object",
111
+ "properties": {
112
+ "math": {
113
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
114
+ },
115
+ "audio": {
116
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
117
+ },
118
+ "video": {
119
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
120
+ },
121
+ "image": {
122
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
123
+ },
124
+ "customPlugins": {
125
+ "type": "array",
126
+ "items": {
127
+ "$ref": "#/definitions/CustomPlugin"
128
+ },
129
+ "description": "An array of objects that determine custom plugins. A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when the button gets pressed (event)."
130
+ },
131
+ "blockquote": {
132
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
133
+ },
134
+ "h3": {
135
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
136
+ },
137
+ "characters": {
138
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
139
+ },
140
+ "bold": {
141
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
142
+ },
143
+ "html": {
144
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
145
+ },
146
+ "italic": {
147
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
148
+ },
149
+ "ol_list": {
150
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
151
+ },
152
+ "redo": {
153
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
154
+ },
155
+ "strikethrough": {
156
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
157
+ },
158
+ "sub": {
159
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
160
+ },
161
+ "sup": {
162
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
163
+ },
164
+ "table": {
165
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
166
+ },
167
+ "ul_list": {
168
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
169
+ },
170
+ "underline": {
171
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
172
+ },
173
+ "undo": {
174
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
175
+ },
176
+ "textAlign": {
177
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
178
+ },
179
+ "showParagraphs": {
180
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
181
+ },
182
+ "separateParagraphs": {
183
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
184
+ },
185
+ "pasteFormatting": {
186
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
187
+ },
188
+ "superscript": {
189
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
190
+ },
191
+ "subscript": {
192
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
193
+ },
194
+ "languageCharacters": {
195
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
196
+ },
197
+ "responseArea": {
198
+ "$ref": "#/definitions/EditableHtmlButtonConfigure"
199
+ }
200
+ },
201
+ "description": "Toolbar plugins of an editable-html field, keyed by plugin name."
202
+ },
203
+ "EditableHtmlButtonConfigure": {
204
+ "type": "object",
205
+ "properties": {
206
+ "disabled": {
207
+ "type": "boolean",
208
+ "description": "Indicates if the plugin is disabled or not"
209
+ }
210
+ }
211
+ },
212
+ "CustomPlugin": {
213
+ "type": "object",
214
+ "properties": {
215
+ "event": {
216
+ "type": "string",
217
+ "description": "The name of the custom event. It needs to be valid (only letters, numbers and \"_\" can be used). The event is emitted with the \"PIE-\" prefix."
218
+ },
219
+ "iconAlt": {
220
+ "type": "string",
221
+ "description": "The alt for the custom button icon"
222
+ },
223
+ "iconType": {
224
+ "type": "string",
225
+ "description": "The icon type. Currently, only \"SVG\" is supported."
226
+ },
227
+ "icon": {
228
+ "type": "string",
229
+ "description": "The icon string. Currently, only SVG is supported, so it needs to be a valid svg."
230
+ }
231
+ },
232
+ "required": [
233
+ "event",
234
+ "iconAlt",
235
+ "iconType",
236
+ "icon"
237
+ ]
238
+ },
239
+ "ConfigureProp": {
240
+ "type": "object",
241
+ "properties": {
242
+ "settings": {
243
+ "type": "boolean",
244
+ "description": "Indicates if the item has to be displayed in the Settings Panel"
245
+ },
246
+ "label": {
247
+ "type": "string",
248
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
249
+ }
250
+ },
251
+ "description": "Building blocks of an element's authoring configuration: the object a host passes to the `<tag>-config` custom element to decide which settings the author sees and how editors behave.\n\nEach element declares its own `<Name>Configuration` interface from these, and its JSON Schema is generated from that interface. Descriptions are carried over from the legacy `pie-elements` config schemas, so they appear in the generated schemas unchanged."
252
+ },
253
+ "ConfigureMathMLProp": {
254
+ "type": "object",
255
+ "properties": {
256
+ "mmlOutput": {
257
+ "type": "boolean",
258
+ "description": "Indicates if model should have mathML output instead of latex"
259
+ },
260
+ "mmlEditing": {
261
+ "type": "boolean",
262
+ "description": "Indicates if mathML that's already in model should be editable"
263
+ }
264
+ }
265
+ },
266
+ "EditableHtmlPluginConfigure": {
267
+ "type": "object",
268
+ "properties": {
269
+ "settings": {
270
+ "type": "boolean",
271
+ "description": "Indicates if the item has to be displayed in the Settings Panel"
272
+ },
273
+ "label": {
274
+ "type": "string",
275
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
276
+ },
277
+ "inputConfiguration": {
278
+ "$ref": "#/definitions/EditableHtmlConfigureProp",
279
+ "description": "Configuration for editable-html"
280
+ }
281
+ }
282
+ },
283
+ "ContentDimensions": {
284
+ "type": "object",
285
+ "properties": {
286
+ "maxHeight": {
287
+ "type": [
288
+ "string",
289
+ "number"
290
+ ]
291
+ },
292
+ "maxWidth": {
293
+ "type": [
294
+ "string",
295
+ "number"
296
+ ]
297
+ },
298
+ "minHeight": {
299
+ "type": [
300
+ "string",
301
+ "number"
302
+ ]
303
+ },
304
+ "minWidth": {
305
+ "type": [
306
+ "string",
307
+ "number"
308
+ ]
309
+ }
310
+ },
311
+ "description": "Indicates the dimensions configuration for the authoring container. Note: Some items have a default minimum width because of their content, but if a lower minWidth is provided, it will be used."
312
+ },
313
+ "MultiTraitRubricConfiguration": {
314
+ "type": "object",
315
+ "properties": {
316
+ "baseInputConfiguration": {
317
+ "$ref": "#/definitions/EditableHtmlConfigureProp",
318
+ "description": "Base editable html input configuration regarding plugins that are enabled/disabled E.g. audio, video, image"
319
+ },
320
+ "expandedInput": {
321
+ "$ref": "#/definitions/EditableHtmlPluginConfigure",
322
+ "description": "Expanded input configurations: only `inputConfiguration` is read, for the standards, description and score point descriptor editors"
323
+ },
324
+ "labelInput": {
325
+ "$ref": "#/definitions/EditableHtmlPluginConfigure",
326
+ "description": "Label input configurations: only `inputConfiguration` is read, for the trait name, trait label and score point label editors"
327
+ },
328
+ "excludeZeroDialogBoxContent": {
329
+ "$ref": "#/definitions/DialogContent",
330
+ "description": "Not read by the element: the dialog shows its built-in text"
331
+ },
332
+ "includeZeroDialogBoxContent": {
333
+ "$ref": "#/definitions/DialogContent",
334
+ "description": "Not read by the element: the dialog shows its built-in text"
335
+ },
336
+ "deleteScaleDialogBoxContent": {
337
+ "$ref": "#/definitions/DialogContent",
338
+ "description": "Not read by the element: the dialog shows its built-in text"
339
+ },
340
+ "maxPointsDialogBoxContent": {
341
+ "$ref": "#/definitions/DialogContent",
342
+ "description": "Not read by the element: the dialog shows its built-in text"
343
+ },
344
+ "settingsPanelDisabled": {
345
+ "type": "boolean",
346
+ "description": "Indicates if the settings panel is not available"
347
+ },
348
+ "showExcludeZero": {
349
+ "$ref": "#/definitions/ConfigureProp",
350
+ "description": "Configuration for Excluding Zero Column"
351
+ },
352
+ "showScorePointLabels": {
353
+ "$ref": "#/definitions/ConfigureProp",
354
+ "description": "Configuration for Showing Score Point Labels"
355
+ },
356
+ "showDescription": {
357
+ "$ref": "#/definitions/ConfigureProp",
358
+ "description": "Configuration for Showing Description"
359
+ },
360
+ "showVisibleToStudent": {
361
+ "$ref": "#/definitions/ConfigureProp",
362
+ "description": "Configuration for Showing Multi-trait-rubric to Students"
363
+ },
364
+ "showHalfScoring": {
365
+ "$ref": "#/definitions/ConfigureProp",
366
+ "description": "Configuration for Showing Half Scoring Indicator"
367
+ },
368
+ "spellCheck": {
369
+ "$ref": "#/definitions/ConfigurePropWithEnabled",
370
+ "description": "Configuration for the author's spellcheck: `enabled` is not read, the model's `spellCheckEnabled` sets it"
371
+ },
372
+ "showStandards": {
373
+ "$ref": "#/definitions/ConfigureProp",
374
+ "description": "Configuration for showing the Standards column"
375
+ },
376
+ "showLevelTagInput": {
377
+ "$ref": "#/definitions/ConfigurePropWithEnabled",
378
+ "description": "Configuration for showing the Level Tag Input; `enabled` shows it"
379
+ },
380
+ "dragAndDrop": {
381
+ "$ref": "#/definitions/ConfigurePropWithEnabled",
382
+ "description": "Configuration for allowing drag & drop per traits; `enabled` allows it"
383
+ },
384
+ "showMaxPoint": {
385
+ "$ref": "#/definitions/ConfigureProp",
386
+ "description": "Configuration for the Settings Panel toggle of the model's `maxPointsEnabled`"
387
+ },
388
+ "addScale": {
389
+ "$ref": "#/definitions/ConfigureProp",
390
+ "description": "Configuration for the Settings Panel toggle of the model's `addScaleEnabled`"
391
+ },
392
+ "width": {
393
+ "type": "string",
394
+ "description": "How large (in px) should multi-trait-rubric be; without it the rubric takes the container's width"
395
+ },
396
+ "contentDimensions": {
397
+ "$ref": "#/definitions/ContentDimensions",
398
+ "description": "Dimensions of the authoring container"
399
+ },
400
+ "minNoOfTraits": {
401
+ "type": "number",
402
+ "description": "Minimum number of traits",
403
+ "default": 1
404
+ },
405
+ "maxNoOfTraits": {
406
+ "type": "number",
407
+ "description": "Maximum number of traits",
408
+ "default": 10
409
+ },
410
+ "minNoOfScales": {
411
+ "type": "number",
412
+ "description": "Minimum number of scales",
413
+ "default": 1
414
+ },
415
+ "maxNoOfScales": {
416
+ "type": "number",
417
+ "description": "Maximum number of scales",
418
+ "default": 10
419
+ },
420
+ "defaultTraitLabel": {
421
+ "type": "string",
422
+ "description": "The default trait label for new created scales. If it's not defined, it will default to the label of the first trait.",
423
+ "default": "Trait"
424
+ },
425
+ "mathMlOptions": {
426
+ "$ref": "#/definitions/ConfigureMathMLProp",
427
+ "description": "Configuration for editable-html"
428
+ },
429
+ "maxMaxPoints": {
430
+ "type": "number",
431
+ "description": "Indicates the max limit for scoring points",
432
+ "default": 10
433
+ }
434
+ },
435
+ "description": "Config Object for `@pie-element/multi-trait-rubric`"
436
+ },
437
+ "DialogContent": {
438
+ "type": "object",
439
+ "properties": {
440
+ "title": {
441
+ "type": "string",
442
+ "description": "Dialog box title"
443
+ },
444
+ "text": {
445
+ "type": "string",
446
+ "description": "Dialog box text"
447
+ }
448
+ }
449
+ },
450
+ "ConfigurePropWithEnabled": {
451
+ "type": "object",
452
+ "properties": {
453
+ "settings": {
454
+ "type": "boolean",
455
+ "description": "Indicates if the item has to be displayed in the Settings Panel"
456
+ },
457
+ "label": {
458
+ "type": "string",
459
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel"
460
+ },
461
+ "enabled": {
462
+ "type": "boolean",
463
+ "description": "Indicates the value of the item if it affects config-ui (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)"
464
+ }
465
+ }
466
+ }
467
+ },
468
+ "additionalProperties": false
469
+ }