@pie-element/charting 13.0.4-next.20261011174919 → 13.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.
- package/dist/author/charting-config.d.ts +19 -4
- package/dist/author/configure.d.ts +39 -16
- package/dist/author/configure.js +76 -87
- package/dist/author/correct-response.d.ts +18 -1
- package/dist/author/defaults.d.ts +60 -58
- package/dist/author/index.d.ts +15 -38
- package/dist/author/index.js +12 -4
- package/dist/browser/author/index.js +22 -27
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +22 -27
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +14 -13
- package/dist/controller/index.d.ts +113 -11
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +571 -0
- package/dist/schemas/model.schema.json +594 -0
- package/dist/schemas/session.schema.json +86 -0
- package/dist/types.d.ts +333 -0
- package/package.json +19 -15
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/charting@13.0.4/dist/schemas/model.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config."
|
|
9
|
+
},
|
|
10
|
+
"element": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The html Element tag name: the key in the item config's `elements` map, e.g. \"multiple-choice\""
|
|
13
|
+
},
|
|
14
|
+
"accessibilityCatalogs": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "#/definitions/AccessibilityCatalog"
|
|
18
|
+
},
|
|
19
|
+
"description": "QTI-aligned accessibility catalogs whose cards dock to content nodes by `data-catalog-idref`"
|
|
20
|
+
},
|
|
21
|
+
"addCategoryEnabled": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Indicates if user can add more categories",
|
|
24
|
+
"default": true
|
|
25
|
+
},
|
|
26
|
+
"chartType": {
|
|
27
|
+
"$ref": "#/definitions/ChartingChartType",
|
|
28
|
+
"description": "Indicates the chart type",
|
|
29
|
+
"default": "lineCross"
|
|
30
|
+
},
|
|
31
|
+
"correctAnswer": {
|
|
32
|
+
"$ref": "#/definitions/ChartingCorrectAnswer",
|
|
33
|
+
"description": "Indicates marks that are set as answers"
|
|
34
|
+
},
|
|
35
|
+
"data": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"$ref": "#/definitions/ChartingCategory"
|
|
39
|
+
},
|
|
40
|
+
"description": "Indicates default categories for the answer"
|
|
41
|
+
},
|
|
42
|
+
"domain": {
|
|
43
|
+
"$ref": "#/definitions/ChartingDomain",
|
|
44
|
+
"description": "Indicates domain settings for the chart"
|
|
45
|
+
},
|
|
46
|
+
"graph": {
|
|
47
|
+
"$ref": "#/definitions/ChartingGraph",
|
|
48
|
+
"description": "Indicates the chart line model; 480 by 480 when absent"
|
|
49
|
+
},
|
|
50
|
+
"prompt": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Indicates prompt value"
|
|
53
|
+
},
|
|
54
|
+
"promptEnabled": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Indicates if the prompt is enabled",
|
|
57
|
+
"default": true
|
|
58
|
+
},
|
|
59
|
+
"range": {
|
|
60
|
+
"$ref": "#/definitions/ChartingRange",
|
|
61
|
+
"description": "Indicates range settings for the chart"
|
|
62
|
+
},
|
|
63
|
+
"rationale": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Indicates rationale for the answer"
|
|
66
|
+
},
|
|
67
|
+
"rationaleEnabled": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"description": "Indicates if Rationale are enabled",
|
|
70
|
+
"default": true
|
|
71
|
+
},
|
|
72
|
+
"scoringType": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enum": [
|
|
75
|
+
"all or nothing",
|
|
76
|
+
"partial scoring"
|
|
77
|
+
],
|
|
78
|
+
"description": "Indicates scoring type. `model()` applies the default when absent; `outcome()` scores an absent value as partial scoring unless the environment turns partial scoring off.",
|
|
79
|
+
"default": "all or nothing"
|
|
80
|
+
},
|
|
81
|
+
"studentInstructions": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Not read by this element: it has no student instructions"
|
|
84
|
+
},
|
|
85
|
+
"studentInstructionsEnabled": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Indicates if Student Instructions are enabled. Not read by this element: it has no student instructions.",
|
|
88
|
+
"default": true
|
|
89
|
+
},
|
|
90
|
+
"teacherInstructions": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "Indicates teacher instructions"
|
|
93
|
+
},
|
|
94
|
+
"teacherInstructionsEnabled": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "Indicates if Teacher Instructions are enabled",
|
|
97
|
+
"default": true
|
|
98
|
+
},
|
|
99
|
+
"title": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "Indicates chart title"
|
|
102
|
+
},
|
|
103
|
+
"placeholderMessages": {
|
|
104
|
+
"$ref": "#/definitions/ChartingPlaceholderMessages",
|
|
105
|
+
"description": "Not read by this element: the configuration's `titlePlaceholder` and `labelsPlaceholders` set the placeholders"
|
|
106
|
+
},
|
|
107
|
+
"spellCheckEnabled": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true"
|
|
110
|
+
},
|
|
111
|
+
"rubricEnabled": {
|
|
112
|
+
"type": "boolean",
|
|
113
|
+
"description": "Indicates if Rubric is enabled. Not read by this element: the settings panel sets it when `withRubric.settings` is on."
|
|
114
|
+
},
|
|
115
|
+
"changeInteractiveEnabled": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"description": "Indicates if teacher can enable/disable data[]:interactive",
|
|
118
|
+
"default": false
|
|
119
|
+
},
|
|
120
|
+
"changeEditableEnabled": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"description": "Indicates if teacher can enable/disable data[]:editable",
|
|
123
|
+
"default": false
|
|
124
|
+
},
|
|
125
|
+
"changeAddCategoryEnabled": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"description": "Indicates if teacher can enable/disable addCategoryEnabled",
|
|
128
|
+
"default": false
|
|
129
|
+
},
|
|
130
|
+
"studentNewCategoryDefaultLabel": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Label for new category in correct response and player's chart",
|
|
133
|
+
"default": "New Category"
|
|
134
|
+
},
|
|
135
|
+
"language": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"description": "Indicates the language of the component Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX"
|
|
138
|
+
},
|
|
139
|
+
"extraCSSRules": {
|
|
140
|
+
"$ref": "#/definitions/ExtraCSSRules",
|
|
141
|
+
"description": "Host-supplied CSS scoped to the element"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"element",
|
|
146
|
+
"id"
|
|
147
|
+
],
|
|
148
|
+
"description": "Model Object for `@pie-element/charting`",
|
|
149
|
+
"definitions": {
|
|
150
|
+
"AccessibilityCatalog": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"properties": {
|
|
153
|
+
"identifier": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
},
|
|
156
|
+
"cards": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"$ref": "#/definitions/CatalogCard"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": [
|
|
164
|
+
"identifier",
|
|
165
|
+
"cards"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"CatalogCard": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"properties": {
|
|
171
|
+
"catalog": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"language": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"content": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"payload": {
|
|
181
|
+
"$ref": "#/definitions/CatalogCardPayload"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"required": [
|
|
185
|
+
"catalog"
|
|
186
|
+
],
|
|
187
|
+
"description": "QTI-aligned accessibility catalog entry: one alternate representation of a content node, docked to it by `data-catalog-idref`.\n\nMaps onto QTI 3's `qti-card`. `catalog` is QTI's `@support` and is the only discriminant — there is deliberately no second `kind` field. `language` is the card entry's `xml:lang`. QTI's single content slot is represented by exactly one of two fields, never both, with nothing mirrored between them:\n\n- `content` — the string form, for alternates a string can express: SSML for `spoken`, plain text for `simplified-language`.\n- `payload` — the structured form, for what a string cannot express. Today only a signing video.\n\nOne generic payload slot rather than a field per accommodation (`signLanguage`, `braille`, …), which is the shape pie-players canonicalises and the shape this repo now follows. A field per accommodation makes every new structured alternate a breaking widening of this type in every consumer that reads cards, and it gives the same fact two names across repos — which produced a real bug: a card carrying `signLanguage` rendered its video in the player and was simultaneously reported as carrying no payload by the player's \"what alternates exist\" path, because only one of the two read paths knew about the alias.\n\n`catalog` is a bare `string` because the vocabulary is open-ended and unknown tokens must be ignored rather than rejected. TypeScript therefore cannot express \"a `sign-language` card must carry a payload\", so a `{ catalog: 'sign-language', content: '<url>' }` object still satisfies this type. That legacy bare-URL form is not supported: runtime validation on the consuming side must reject it rather than render the URL as visible text. Narrow with `isSignLanguageCard`."
|
|
188
|
+
},
|
|
189
|
+
"CatalogCardPayload": {
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{
|
|
192
|
+
"$ref": "#/definitions/SignLanguageCardPayload"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"$ref": "#/definitions/SpokenAudioCardPayload"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"description": "The structured forms a card's `payload` may take.\n\nWhich one applies is decided by the card's `catalog`, so this union carries no discriminant of its own — a second discriminant could contradict the first. Consumers select a card by catalog type and then validate the payload structurally, which they must do regardless: catalog data is authored, wire-facing and untrusted."
|
|
199
|
+
},
|
|
200
|
+
"SignLanguageCardPayload": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"properties": {
|
|
203
|
+
"signLang": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "Language tag for the signed translation — BCP 47, which admits ISO 639-3 subtags for languages with no 639-1/2 code. \"ase\" is ASL, matching QTI 3 `xml:lang`.\n\nThis is the language of the *adaptation*, not the item's base content language (AfA/PNP's `languageOfAdaptation`). The distinction is load bearing: a Spanish item's signed alternate is LSM, not ASL, so `signLang` must never be inferred from the item or assessment content language.\n\nOptional, and redundant on almost every card. The card's `language` states the same code and is the only field pie-players resolves a card on — resolution runs before anything knows the card is a signing card, so it can only key on the generic field — and the player falls back to it when this is absent. Author it only where the two differ: a card tagged with the item's content language (`language: 'en-US'`, `signLang: 'ase'`) so resolution reaches it by the default-language rung. The pie-api-aws importer emits `language` alone."
|
|
206
|
+
},
|
|
207
|
+
"media": {
|
|
208
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
209
|
+
},
|
|
210
|
+
"fragment": {
|
|
211
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"required": [
|
|
215
|
+
"media"
|
|
216
|
+
],
|
|
217
|
+
"description": "Payload for a `sign-language` catalog card: a signed translation of the content node the card is docked to."
|
|
218
|
+
},
|
|
219
|
+
"MediaAssetRef": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"version": {
|
|
223
|
+
"type": "number",
|
|
224
|
+
"const": 1
|
|
225
|
+
},
|
|
226
|
+
"id": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"kind": {
|
|
230
|
+
"$ref": "#/definitions/MediaKind"
|
|
231
|
+
},
|
|
232
|
+
"sources": {
|
|
233
|
+
"type": "array",
|
|
234
|
+
"items": {
|
|
235
|
+
"$ref": "#/definitions/MediaSource"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"poster": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"thumbnail": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"durationSeconds": {
|
|
245
|
+
"type": "number"
|
|
246
|
+
},
|
|
247
|
+
"tracks": {
|
|
248
|
+
"type": "array",
|
|
249
|
+
"items": {
|
|
250
|
+
"$ref": "#/definitions/TextTrackRef"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"transcript": {
|
|
254
|
+
"$ref": "#/definitions/TranscriptRef"
|
|
255
|
+
},
|
|
256
|
+
"label": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"description": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
"lang": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "Language of the asset itself, as authored metadata. Sign-language cards leave it unset: the card's `language` already states the adaptation language, and a second copy is a second thing to keep in agreement."
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": [
|
|
268
|
+
"version",
|
|
269
|
+
"id",
|
|
270
|
+
"kind",
|
|
271
|
+
"sources"
|
|
272
|
+
],
|
|
273
|
+
"description": "Reference to a media asset and its playable encodings.\n\nStructurally mirrors the `MediaAssetRef` in the pie-players `media-asset-contract` PRD. The two definitions are deliberately kept as separate declarations rather than a shared package dependency: this repo owns the item-model side of the contract, pie-players owns the player side, and both read the same authored JSON, so structural typing is sufficient for interop. Fixture parity — not a package edge — is what pins them together.\n\nSign-language catalog cards were the first consumer and use only the core source fields. The optional presentation, track, and transcript metadata is declared for broader consumers such as video stimuli; it remains meaningless for a signing clip, where captions would duplicate the text already on screen."
|
|
274
|
+
},
|
|
275
|
+
"MediaKind": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"enum": [
|
|
278
|
+
"image",
|
|
279
|
+
"audio",
|
|
280
|
+
"video",
|
|
281
|
+
"other"
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"MediaSource": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"properties": {
|
|
287
|
+
"src": {
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"type": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"description": "MIME type, e.g. \"video/mp4\"."
|
|
293
|
+
},
|
|
294
|
+
"width": {
|
|
295
|
+
"type": "number"
|
|
296
|
+
},
|
|
297
|
+
"height": {
|
|
298
|
+
"type": "number"
|
|
299
|
+
},
|
|
300
|
+
"bitrate": {
|
|
301
|
+
"type": "number"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"required": [
|
|
305
|
+
"src"
|
|
306
|
+
],
|
|
307
|
+
"description": "One playable encoding of a media asset."
|
|
308
|
+
},
|
|
309
|
+
"TextTrackRef": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"properties": {
|
|
312
|
+
"src": {
|
|
313
|
+
"type": "string"
|
|
314
|
+
},
|
|
315
|
+
"kind": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"enum": [
|
|
318
|
+
"captions",
|
|
319
|
+
"subtitles",
|
|
320
|
+
"descriptions",
|
|
321
|
+
"chapters",
|
|
322
|
+
"metadata"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"lang": {
|
|
326
|
+
"type": "string"
|
|
327
|
+
},
|
|
328
|
+
"label": {
|
|
329
|
+
"type": "string"
|
|
330
|
+
},
|
|
331
|
+
"default": {
|
|
332
|
+
"type": "boolean"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"required": [
|
|
336
|
+
"src",
|
|
337
|
+
"kind",
|
|
338
|
+
"lang",
|
|
339
|
+
"label"
|
|
340
|
+
],
|
|
341
|
+
"description": "One authored text track associated with an audio or video asset."
|
|
342
|
+
},
|
|
343
|
+
"TranscriptRef": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"src": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"html": {
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"plainText": {
|
|
353
|
+
"type": "string"
|
|
354
|
+
},
|
|
355
|
+
"lang": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"description": "Inline or externally hosted transcript content for a media asset."
|
|
360
|
+
},
|
|
361
|
+
"MediaFragmentRange": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"startSeconds": {
|
|
365
|
+
"type": "number"
|
|
366
|
+
},
|
|
367
|
+
"endSeconds": {
|
|
368
|
+
"type": "number"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"required": [
|
|
372
|
+
"startSeconds"
|
|
373
|
+
],
|
|
374
|
+
"description": "A time slice within a media asset, so one recording can serve several content nodes. Mirrors QTI 3's Media Fragments URI usage."
|
|
375
|
+
},
|
|
376
|
+
"SpokenAudioCardPayload": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"properties": {
|
|
379
|
+
"media": {
|
|
380
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
381
|
+
},
|
|
382
|
+
"fragment": {
|
|
383
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"required": [
|
|
387
|
+
"media"
|
|
388
|
+
],
|
|
389
|
+
"description": "Payload for a `spoken` catalog card that is a recording rather than a script.\n\nQTI 3 treats recorded audio and synthesized speech as the same support: both are `spoken`, so this is not a new accommodation, it is the other form the existing one can take. A node commonly carries both this and a `content` card in the same language — the script is both what the audio was generated from and the fallback for when the audio cannot play; pie-players resolves between them with `CatalogLookupOptions.form`.\n\nNo `kind` discriminant, for the same reason `SignLanguageCardPayload` has none: the card's `catalog` already says what this is."
|
|
390
|
+
},
|
|
391
|
+
"ChartingChartType": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"enum": [
|
|
394
|
+
"bar",
|
|
395
|
+
"histogram",
|
|
396
|
+
"lineDot",
|
|
397
|
+
"lineCross",
|
|
398
|
+
"dotPlot",
|
|
399
|
+
"linePlot"
|
|
400
|
+
],
|
|
401
|
+
"description": "The chart types the element renders"
|
|
402
|
+
},
|
|
403
|
+
"ChartingCorrectAnswer": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"name": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"description": "Indicates name of answer; the author keys the correct-response chart by it"
|
|
409
|
+
},
|
|
410
|
+
"data": {
|
|
411
|
+
"type": "array",
|
|
412
|
+
"items": {
|
|
413
|
+
"$ref": "#/definitions/ChartingCategory"
|
|
414
|
+
},
|
|
415
|
+
"description": "Indicates marks for the answer"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"description": "Marks that are set as answers"
|
|
419
|
+
},
|
|
420
|
+
"ChartingCategory": {
|
|
421
|
+
"type": "object",
|
|
422
|
+
"properties": {
|
|
423
|
+
"label": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"description": "Indicates category label"
|
|
426
|
+
},
|
|
427
|
+
"value": {
|
|
428
|
+
"type": "number",
|
|
429
|
+
"description": "Indicates category value"
|
|
430
|
+
},
|
|
431
|
+
"interactive": {
|
|
432
|
+
"type": "boolean",
|
|
433
|
+
"description": "Indicates if category value is interactive"
|
|
434
|
+
},
|
|
435
|
+
"editable": {
|
|
436
|
+
"type": "boolean",
|
|
437
|
+
"description": "Indicates if category label is editable"
|
|
438
|
+
},
|
|
439
|
+
"deletable": {
|
|
440
|
+
"type": "boolean",
|
|
441
|
+
"description": "Indicates if category is deletable"
|
|
442
|
+
},
|
|
443
|
+
"index": {
|
|
444
|
+
"type": "number",
|
|
445
|
+
"description": "Position of the category in the author's chart; scoring reports it with each correct category"
|
|
446
|
+
},
|
|
447
|
+
"correctness": {
|
|
448
|
+
"$ref": "#/definitions/ChartingCategoryCorrectness",
|
|
449
|
+
"description": "Indicates correctness for a category"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"required": [
|
|
453
|
+
"label",
|
|
454
|
+
"value"
|
|
455
|
+
],
|
|
456
|
+
"description": "A category on the chart: a bar, a point on a line or a column of a plot"
|
|
457
|
+
},
|
|
458
|
+
"ChartingCategoryCorrectness": {
|
|
459
|
+
"type": "object",
|
|
460
|
+
"properties": {
|
|
461
|
+
"value": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"enum": [
|
|
464
|
+
"correct",
|
|
465
|
+
"incorrect"
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"label": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"enum": [
|
|
471
|
+
"correct",
|
|
472
|
+
"incorrect"
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"required": [
|
|
477
|
+
"value",
|
|
478
|
+
"label"
|
|
479
|
+
],
|
|
480
|
+
"description": "Whether a category's value or label matches the correct answer; the controller sets it when scoring"
|
|
481
|
+
},
|
|
482
|
+
"ChartingDomain": {
|
|
483
|
+
"type": "object",
|
|
484
|
+
"properties": {
|
|
485
|
+
"label": {
|
|
486
|
+
"type": "string",
|
|
487
|
+
"description": "Axis label"
|
|
488
|
+
},
|
|
489
|
+
"min": {
|
|
490
|
+
"type": "number",
|
|
491
|
+
"description": "Not read by this element: the chart fixes the category axis to 0–1"
|
|
492
|
+
},
|
|
493
|
+
"max": {
|
|
494
|
+
"type": "number",
|
|
495
|
+
"description": "Not read by this element: the chart fixes the category axis to 0–1"
|
|
496
|
+
},
|
|
497
|
+
"step": {
|
|
498
|
+
"type": "number",
|
|
499
|
+
"description": "Not read by this element: the chart fixes the category axis step to 1"
|
|
500
|
+
},
|
|
501
|
+
"labelStep": {
|
|
502
|
+
"type": "number",
|
|
503
|
+
"description": "Not read by this element: the chart fixes the category axis label step to 1"
|
|
504
|
+
},
|
|
505
|
+
"axisLabel": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"description": "Not read by this element: `label` labels the axis"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"description": "Settings for the category axis"
|
|
511
|
+
},
|
|
512
|
+
"ChartingGraph": {
|
|
513
|
+
"type": "object",
|
|
514
|
+
"properties": {
|
|
515
|
+
"width": {
|
|
516
|
+
"type": "number",
|
|
517
|
+
"description": "Width for chart representation"
|
|
518
|
+
},
|
|
519
|
+
"height": {
|
|
520
|
+
"type": "number",
|
|
521
|
+
"description": "Height for chart representation"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"required": [
|
|
525
|
+
"width",
|
|
526
|
+
"height"
|
|
527
|
+
],
|
|
528
|
+
"description": "Size of the chart"
|
|
529
|
+
},
|
|
530
|
+
"ChartingRange": {
|
|
531
|
+
"type": "object",
|
|
532
|
+
"properties": {
|
|
533
|
+
"label": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Axis label"
|
|
536
|
+
},
|
|
537
|
+
"min": {
|
|
538
|
+
"type": "number",
|
|
539
|
+
"description": "Min value",
|
|
540
|
+
"default": 0
|
|
541
|
+
},
|
|
542
|
+
"max": {
|
|
543
|
+
"type": "number",
|
|
544
|
+
"description": "Max value",
|
|
545
|
+
"default": 1
|
|
546
|
+
},
|
|
547
|
+
"step": {
|
|
548
|
+
"type": "number",
|
|
549
|
+
"description": "Step value; `labelStep` applies when absent"
|
|
550
|
+
},
|
|
551
|
+
"labelStep": {
|
|
552
|
+
"type": "number",
|
|
553
|
+
"description": "Label step value",
|
|
554
|
+
"default": 1
|
|
555
|
+
},
|
|
556
|
+
"axisLabel": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"description": "Not read by this element: `label` labels the axis"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
"description": "Settings for the value axis"
|
|
562
|
+
},
|
|
563
|
+
"ChartingPlaceholderMessages": {
|
|
564
|
+
"type": "object",
|
|
565
|
+
"properties": {
|
|
566
|
+
"title": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"description": "Indicates placeholder message if title is not defined"
|
|
569
|
+
},
|
|
570
|
+
"labels": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"description": "Indicates placeholder message if labels for range or domain are not defined"
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"description": "Placeholder messages for the chart"
|
|
576
|
+
},
|
|
577
|
+
"ExtraCSSRules": {
|
|
578
|
+
"type": "object",
|
|
579
|
+
"properties": {
|
|
580
|
+
"names": {
|
|
581
|
+
"type": "array",
|
|
582
|
+
"items": {
|
|
583
|
+
"type": "string"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"rules": {
|
|
587
|
+
"type": "string"
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"description": "Host-supplied CSS scoped to the element: `rules` is a stylesheet whose class names are listed in `names`."
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"additionalProperties": false
|
|
594
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/charting@13.0.4/dist/schemas/session.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Identifier of the session"
|
|
9
|
+
},
|
|
10
|
+
"element": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The element the session belongs to"
|
|
13
|
+
},
|
|
14
|
+
"answer": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "#/definitions/ChartingCategory"
|
|
18
|
+
},
|
|
19
|
+
"description": "The student's categories; the initial chart is scored when absent"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"definitions": {
|
|
23
|
+
"ChartingCategory": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"label": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Indicates category label"
|
|
29
|
+
},
|
|
30
|
+
"value": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"description": "Indicates category value"
|
|
33
|
+
},
|
|
34
|
+
"interactive": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "Indicates if category value is interactive"
|
|
37
|
+
},
|
|
38
|
+
"editable": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "Indicates if category label is editable"
|
|
41
|
+
},
|
|
42
|
+
"deletable": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "Indicates if category is deletable"
|
|
45
|
+
},
|
|
46
|
+
"index": {
|
|
47
|
+
"type": "number",
|
|
48
|
+
"description": "Position of the category in the author's chart; scoring reports it with each correct category"
|
|
49
|
+
},
|
|
50
|
+
"correctness": {
|
|
51
|
+
"$ref": "#/definitions/ChartingCategoryCorrectness",
|
|
52
|
+
"description": "Indicates correctness for a category"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"label",
|
|
57
|
+
"value"
|
|
58
|
+
],
|
|
59
|
+
"description": "A category on the chart: a bar, a point on a line or a column of a plot"
|
|
60
|
+
},
|
|
61
|
+
"ChartingCategoryCorrectness": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"value": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": [
|
|
67
|
+
"correct",
|
|
68
|
+
"incorrect"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"label": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": [
|
|
74
|
+
"correct",
|
|
75
|
+
"incorrect"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"value",
|
|
81
|
+
"label"
|
|
82
|
+
],
|
|
83
|
+
"description": "Whether a category's value or label matches the correct answer; the controller sets it when scoring"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|