@pie-element/explicit-constructed-response 12.0.4-next.20261011174919 → 12.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/defaults.d.ts +56 -54
- package/dist/author/index.d.ts +18 -28
- package/dist/author/index.js +6 -1
- package/dist/author/main.d.ts +43 -25
- package/dist/author/main.js +98 -111
- package/dist/browser/author/index.js +19 -29
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +4 -4
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +19 -29
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +4 -4
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +10 -9
- package/dist/controller/index.d.ts +83 -24
- package/dist/controller/index.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +426 -0
- package/dist/schemas/model.schema.json +605 -0
- package/dist/schemas/session.schema.json +23 -0
- package/dist/types.d.ts +186 -0
- package/package.json +20 -16
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import type { Choices } from '../types.js';
|
|
1
2
|
declare const _default: {
|
|
2
|
-
choices:
|
|
3
|
+
choices: Choices;
|
|
3
4
|
displayType: string;
|
|
4
5
|
markup: string;
|
|
5
|
-
maxLengthPerChoiceEnabled:
|
|
6
|
-
playerSpellCheckEnabled:
|
|
6
|
+
maxLengthPerChoiceEnabled: true;
|
|
7
|
+
playerSpellCheckEnabled: false;
|
|
7
8
|
prompt: string;
|
|
8
|
-
promptEnabled:
|
|
9
|
+
promptEnabled: true;
|
|
9
10
|
rationale: string;
|
|
10
|
-
rationaleEnabled:
|
|
11
|
-
spellCheckEnabled:
|
|
12
|
-
studentInstructionsEnabled:
|
|
11
|
+
rationaleEnabled: true;
|
|
12
|
+
spellCheckEnabled: true;
|
|
13
|
+
studentInstructionsEnabled: true;
|
|
13
14
|
teacherInstructions: string;
|
|
14
|
-
teacherInstructionsEnabled:
|
|
15
|
-
toolbarEditorPosition:
|
|
15
|
+
teacherInstructionsEnabled: true;
|
|
16
|
+
toolbarEditorPosition: "bottom";
|
|
16
17
|
};
|
|
17
18
|
export default _default;
|
|
@@ -1,37 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { PieEnvironment } from '@pie-element/shared-types';
|
|
2
|
+
import type { Choice, Choices, ExplicitConstructedResponseConfiguration, ExplicitConstructedResponseModel, ExplicitConstructedResponseSession } from '../types.js';
|
|
3
|
+
/** Errors `validate()` reports, keyed by field. */
|
|
4
|
+
export type ExplicitConstructedResponseValidationErrors = {
|
|
5
|
+
teacherInstructions?: string;
|
|
6
|
+
prompt?: string;
|
|
7
|
+
rationale?: string;
|
|
8
|
+
responseAreas?: string;
|
|
9
|
+
/** Per response area index, the error for each choice, keyed by the choice's `value` */
|
|
10
|
+
choices?: Record<string, Record<string, string>>;
|
|
11
|
+
};
|
|
12
|
+
/** A choice as the controller hands it to the delivery */
|
|
13
|
+
type PreparedChoice = {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string;
|
|
16
|
+
correct?: boolean;
|
|
17
|
+
feedback?: string;
|
|
18
|
+
};
|
|
19
|
+
type DefaultFeedback = {
|
|
20
|
+
correct: string;
|
|
21
|
+
incorrect: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const prepareChoice: (mode: PieEnvironment["mode"], defaultFeedback: DefaultFeedback) => (choice: Choice) => PreparedChoice;
|
|
24
|
+
export declare const normalize: (question: ExplicitConstructedResponseModel) => {
|
|
25
|
+
choices: Choices;
|
|
26
|
+
displayType: string;
|
|
27
|
+
markup: string;
|
|
28
|
+
slateMarkup?: string;
|
|
29
|
+
prompt: string;
|
|
30
|
+
promptEnabled: boolean;
|
|
31
|
+
spellCheckEnabled: boolean;
|
|
32
|
+
playerSpellCheckEnabled: boolean;
|
|
33
|
+
rationale: string;
|
|
34
|
+
autoScoring?: "allOrNothing" | "partial";
|
|
35
|
+
partialScoring?: boolean;
|
|
36
|
+
studentInstructions?: string;
|
|
37
|
+
teacherInstructions: string;
|
|
38
|
+
rubric?: string;
|
|
39
|
+
rationaleEnabled: boolean;
|
|
40
|
+
studentInstructionsEnabled: boolean;
|
|
41
|
+
teacherInstructionsEnabled: boolean;
|
|
42
|
+
note?: string;
|
|
43
|
+
toolbarEditorPosition: "bottom" | "top";
|
|
44
|
+
maxLengthPerChoice?: number[];
|
|
45
|
+
maxLengthPerChoiceEnabled: boolean;
|
|
46
|
+
rubricEnabled?: boolean;
|
|
47
|
+
language?: string;
|
|
48
|
+
spanishInputEnabled?: boolean;
|
|
49
|
+
responseAreaInputConfiguration?: import("@pie-element/shared-types").EditableHtmlConfigureProp;
|
|
50
|
+
defaultFeedback?: {
|
|
51
|
+
correct?: string;
|
|
52
|
+
incorrect?: string;
|
|
53
|
+
};
|
|
54
|
+
extraCSSRules?: import("@pie-element/shared-types").ExtraCSSRules;
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
id: string;
|
|
57
|
+
element: string;
|
|
58
|
+
accessibilityCatalogs?: import("@pie-element/shared-types").AccessibilityCatalog[];
|
|
4
59
|
};
|
|
5
|
-
export declare const normalize: (question: any) => any;
|
|
6
60
|
/**
|
|
7
61
|
*
|
|
8
62
|
* @param {*} question
|
|
9
63
|
* @param {*} session
|
|
10
64
|
* @param {*} env
|
|
11
65
|
*/
|
|
12
|
-
export declare function model(question:
|
|
13
|
-
choices:
|
|
66
|
+
export declare function model(question: ExplicitConstructedResponseModel, session: ExplicitConstructedResponseSession | undefined, env: PieEnvironment): Promise<{
|
|
67
|
+
choices: Record<string, PreparedChoice[]>;
|
|
14
68
|
disabled: boolean;
|
|
15
|
-
displayType:
|
|
16
|
-
mode:
|
|
17
|
-
role:
|
|
18
|
-
feedback:
|
|
19
|
-
language:
|
|
20
|
-
markup:
|
|
21
|
-
maxLengthPerChoice:
|
|
22
|
-
maxLengthPerChoiceEnabled:
|
|
23
|
-
note:
|
|
69
|
+
displayType: string;
|
|
70
|
+
mode: "gather" | "view" | "evaluate";
|
|
71
|
+
role: "student" | "instructor";
|
|
72
|
+
feedback: Record<string, "correct" | "incorrect">;
|
|
73
|
+
language: string | undefined;
|
|
74
|
+
markup: string;
|
|
75
|
+
maxLengthPerChoice: number[];
|
|
76
|
+
maxLengthPerChoiceEnabled: boolean;
|
|
77
|
+
note: string;
|
|
24
78
|
playerSpellCheckEnabled: boolean;
|
|
25
|
-
prompt:
|
|
79
|
+
prompt: string;
|
|
26
80
|
rationale: string;
|
|
27
81
|
responseCorrect: boolean | undefined;
|
|
28
82
|
showNote: boolean;
|
|
29
83
|
teacherInstructions: string;
|
|
30
|
-
responseAreaInputConfiguration:
|
|
31
|
-
extraCSSRules:
|
|
84
|
+
responseAreaInputConfiguration: import("@pie-element/shared-types").EditableHtmlConfigureProp | undefined;
|
|
85
|
+
extraCSSRules: import("@pie-element/shared-types").ExtraCSSRules | undefined;
|
|
32
86
|
}>;
|
|
33
|
-
export declare const prepareVal: (html:
|
|
34
|
-
export declare const getScore: (config:
|
|
87
|
+
export declare const prepareVal: (html: string | undefined) => string;
|
|
88
|
+
export declare const getScore: (config: Pick<ExplicitConstructedResponseModel, "choices" | "markup">, session: ExplicitConstructedResponseSession | undefined) => number;
|
|
35
89
|
/**
|
|
36
90
|
* Generates detailed trace log for scoring evaluation
|
|
37
91
|
* @param {Object} model - the question model
|
|
@@ -39,7 +93,7 @@ export declare const getScore: (config: any, session: any) => number;
|
|
|
39
93
|
* @param {Object} env - the environment
|
|
40
94
|
* @returns {Array} traceLog - array of trace messages
|
|
41
95
|
*/
|
|
42
|
-
export declare const getLogTrace: (model:
|
|
96
|
+
export declare const getLogTrace: (model: ExplicitConstructedResponseModel, session: ExplicitConstructedResponseSession | undefined, env: Partial<PieEnvironment>) => string[];
|
|
43
97
|
/**
|
|
44
98
|
* The score is partial by default for checkbox mode, allOrNothing for radio mode.
|
|
45
99
|
* To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
|
|
@@ -51,6 +105,11 @@ export declare const getLogTrace: (model: any, session: any, env: any) => string
|
|
|
51
105
|
* @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
|
|
52
106
|
* `model.partialScoring`.
|
|
53
107
|
*/
|
|
54
|
-
export declare function outcome(model:
|
|
55
|
-
|
|
56
|
-
|
|
108
|
+
export declare function outcome(model: ExplicitConstructedResponseModel, session: ExplicitConstructedResponseSession | undefined, env?: Partial<PieEnvironment>): Promise<{
|
|
109
|
+
score: number;
|
|
110
|
+
empty: boolean;
|
|
111
|
+
traceLog: string[];
|
|
112
|
+
}>;
|
|
113
|
+
export declare const createCorrectResponseSession: (question: ExplicitConstructedResponseModel, env: PieEnvironment) => Promise<ExplicitConstructedResponseSession | null>;
|
|
114
|
+
export declare const validate: (model?: Partial<ExplicitConstructedResponseModel>, config?: ExplicitConstructedResponseConfiguration) => ExplicitConstructedResponseValidationErrors;
|
|
115
|
+
export {};
|
package/dist/controller/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var l = e(), { translator: u } = o, d = s("explicit-constructed-response:control
|
|
|
13
13
|
if (e === "evaluate") {
|
|
14
14
|
r.correct = !0;
|
|
15
15
|
let e = n.feedback && n.feedback.type || "none";
|
|
16
|
-
e === "default" ? r.feedback = t.correct : e === "custom" && (r.feedback = n.feedback
|
|
16
|
+
e === "default" ? r.feedback = t.correct : e === "custom" && (r.feedback = n.feedback?.value);
|
|
17
17
|
}
|
|
18
18
|
return r;
|
|
19
19
|
}, p = (e) => e ? "correct" : "incorrect", m = (e) => Math.abs(e) === Infinity ? 2 : e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, h = (e) => e ? e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'|'/g, "'").replace(/&/g, "&") : "", g = (e) => ({
|
|
@@ -67,12 +67,12 @@ var v = (e) => w(C(e).trim()), y = (e, t) => {
|
|
|
67
67
|
let o = e.markup && e.markup.match(/\{\{(.+?)\}\}/g), s = o ? o.length : 0, c = a(e.choices, (e, t, a) => {
|
|
68
68
|
let o = i && i[a];
|
|
69
69
|
return r(o) || !n(t, (e) => v(e.label) === v(o)) ? e : e + 1;
|
|
70
|
-
}, 0), l = s ? (c / s).toFixed(2) : 0;
|
|
70
|
+
}, 0), l = s ? (c / s).toFixed(2) : "0";
|
|
71
71
|
return parseFloat(l);
|
|
72
72
|
}, b = (e, t, n) => {
|
|
73
73
|
let i = [], { value: a } = t || {}, { choices: o, markup: s } = e || {}, l = s ? s.match(/\{\{(.+?)\}\}/g) : [], u = l ? l.length : 0;
|
|
74
74
|
if (i.push(`${u} response area(s) defined in this question.`), a && Object.keys(a).length > 0) {
|
|
75
|
-
let e = Object.entries(a).filter(([
|
|
75
|
+
let e = Object.entries(a).filter(([, e]) => e && e.trim()).length;
|
|
76
76
|
i.push(`Student filled ${e} out of ${u} response area(s).`), Object.keys(o || {}).forEach((e) => {
|
|
77
77
|
let t = a && a[e] || "", n = o[e] || [], s = !r(t.trim()) && n.some((e) => v(e.label) === v(t));
|
|
78
78
|
t.trim() ? i.push(`Response area ${parseInt(e) + 1}: ${s ? "CORRECT" : "INCORRECT"}.`) : i.push(`Response area ${parseInt(e) + 1}: left empty.`);
|
|
@@ -133,7 +133,7 @@ var S = (e, t) => new Promise((n) => {
|
|
|
133
133
|
}), r(i) || (o[e] = i);
|
|
134
134
|
});
|
|
135
135
|
let c = (i.match(/\{\{(\d+)\}\}/g) || []).length;
|
|
136
|
-
return c > a ? s.responseAreas = `No more than ${a} response areas should be defined.` : c < 1 && (s.responseAreas = "There should be at least 1 response area defined."), r(o) || (s.choices = o), s;
|
|
136
|
+
return a !== void 0 && c > a ? s.responseAreas = `No more than ${a} response areas should be defined.` : c < 1 && (s.responseAreas = "There should be at least 1 response area defined."), r(o) || (s.choices = o), s;
|
|
137
137
|
};
|
|
138
138
|
//#endregion
|
|
139
139
|
export { S as createCorrectResponseSession, b as getLogTrace, y as getScore, _ as model, g as normalize, x as outcome, f as prepareChoice, v as prepareVal, E as validate };
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/explicit-constructed-response@12.0.4/dist/schemas/configuration.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"baseInputConfiguration": {
|
|
7
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
8
|
+
"description": "Base editable html input configuration regarding plugins that are enabled/disabled E.g. audio, video, image"
|
|
9
|
+
},
|
|
10
|
+
"choices": {
|
|
11
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
12
|
+
"description": "Not read by this element"
|
|
13
|
+
},
|
|
14
|
+
"prompt": {
|
|
15
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
16
|
+
"description": "Item Stem configuration"
|
|
17
|
+
},
|
|
18
|
+
"rationale": {
|
|
19
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
20
|
+
"description": "Rationale configuration"
|
|
21
|
+
},
|
|
22
|
+
"settingsPanelDisabled": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"description": "Indicates if the settings panel is not available"
|
|
25
|
+
},
|
|
26
|
+
"spellCheck": {
|
|
27
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
28
|
+
"description": "Configuration for the author's spellcheck; `enabled` is not read"
|
|
29
|
+
},
|
|
30
|
+
"playerSpellCheck": {
|
|
31
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
32
|
+
"description": "Configuration for the player's spellcheck; `enabled` is not read"
|
|
33
|
+
},
|
|
34
|
+
"editSource": {
|
|
35
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
36
|
+
"description": "Settings Panel control for editing the source; the control writes `enabled`, which is not read"
|
|
37
|
+
},
|
|
38
|
+
"partialScoring": {
|
|
39
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
40
|
+
"description": "Settings Panel control for partial scoring"
|
|
41
|
+
},
|
|
42
|
+
"autoScoring": {
|
|
43
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
44
|
+
"description": "Not read by this element: `partialScoring` shows the scoring control"
|
|
45
|
+
},
|
|
46
|
+
"studentInstructions": {
|
|
47
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
48
|
+
"description": "Not read by this element"
|
|
49
|
+
},
|
|
50
|
+
"teacherInstructions": {
|
|
51
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
52
|
+
"description": "Teacher Instructions configuration"
|
|
53
|
+
},
|
|
54
|
+
"template": {
|
|
55
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigure",
|
|
56
|
+
"description": "Template configuration"
|
|
57
|
+
},
|
|
58
|
+
"rubric": {
|
|
59
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
60
|
+
"description": "Not read by this element: `withRubric` shows the rubric control"
|
|
61
|
+
},
|
|
62
|
+
"alternates": {
|
|
63
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
64
|
+
"description": "Not read by this element"
|
|
65
|
+
},
|
|
66
|
+
"maxLengthPerChoice": {
|
|
67
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
68
|
+
"description": "Maximum Length Per Choice Configuration: the settings panel control for `maxLengthPerChoiceEnabled`"
|
|
69
|
+
},
|
|
70
|
+
"maxResponseAreas": {
|
|
71
|
+
"type": "number",
|
|
72
|
+
"description": "Maximum number of response areas"
|
|
73
|
+
},
|
|
74
|
+
"maxImageWidth": {
|
|
75
|
+
"$ref": "#/definitions/ConfigureMaxImageDimensionsProp",
|
|
76
|
+
"description": "Maximum image width for input fields"
|
|
77
|
+
},
|
|
78
|
+
"maxImageHeight": {
|
|
79
|
+
"$ref": "#/definitions/ConfigureMaxImageDimensionsProp",
|
|
80
|
+
"description": "Maximum image height for input fields"
|
|
81
|
+
},
|
|
82
|
+
"withRubric": {
|
|
83
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
84
|
+
"description": "Rubric configuration - only relevant in environments that use pie-player-components"
|
|
85
|
+
},
|
|
86
|
+
"mathMlOptions": {
|
|
87
|
+
"$ref": "#/definitions/ConfigureMathMLProp",
|
|
88
|
+
"description": "Configuration for editable-html"
|
|
89
|
+
},
|
|
90
|
+
"language": {
|
|
91
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
92
|
+
"description": "Language configuration"
|
|
93
|
+
},
|
|
94
|
+
"languageChoices": {
|
|
95
|
+
"$ref": "#/definitions/ConfigureLanguageOptions",
|
|
96
|
+
"description": "Language choices configuration Only available if language is enabled"
|
|
97
|
+
},
|
|
98
|
+
"spanishInput": {
|
|
99
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
100
|
+
"description": "Not read by this element: `spanishButton` shows the Spanish characters control"
|
|
101
|
+
},
|
|
102
|
+
"spanishButton": {
|
|
103
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
104
|
+
"description": "Settings Panel control that disables the Spanish characters in the response areas' inputs"
|
|
105
|
+
},
|
|
106
|
+
"responseAreaInputConfiguration": {
|
|
107
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigure",
|
|
108
|
+
"description": "Toolbar plugins of the response areas' inputs, under `inputConfiguration`"
|
|
109
|
+
},
|
|
110
|
+
"contentDimensions": {
|
|
111
|
+
"$ref": "#/definitions/ContentDimensions",
|
|
112
|
+
"description": "Dimensions of the authoring container"
|
|
113
|
+
},
|
|
114
|
+
"showPrompt": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"description": "Not read by this element: the model's `promptEnabled` shows the prompt"
|
|
117
|
+
},
|
|
118
|
+
"promptLabel": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Not read by this element: `prompt.label` labels the prompt"
|
|
121
|
+
},
|
|
122
|
+
"settingsPartialScoring": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"description": "Not read by this element: `partialScoring.settings` shows the partial scoring control"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"description": "Config Object for `@pie-element/explicit-constructed-response`",
|
|
128
|
+
"definitions": {
|
|
129
|
+
"EditableHtmlConfigureProp": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"math": {
|
|
133
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
134
|
+
},
|
|
135
|
+
"audio": {
|
|
136
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
137
|
+
},
|
|
138
|
+
"video": {
|
|
139
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
140
|
+
},
|
|
141
|
+
"image": {
|
|
142
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
143
|
+
},
|
|
144
|
+
"customPlugins": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"$ref": "#/definitions/CustomPlugin"
|
|
148
|
+
},
|
|
149
|
+
"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)."
|
|
150
|
+
},
|
|
151
|
+
"blockquote": {
|
|
152
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
153
|
+
},
|
|
154
|
+
"h3": {
|
|
155
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
156
|
+
},
|
|
157
|
+
"characters": {
|
|
158
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
159
|
+
},
|
|
160
|
+
"bold": {
|
|
161
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
162
|
+
},
|
|
163
|
+
"html": {
|
|
164
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
165
|
+
},
|
|
166
|
+
"italic": {
|
|
167
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
168
|
+
},
|
|
169
|
+
"ol_list": {
|
|
170
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
171
|
+
},
|
|
172
|
+
"redo": {
|
|
173
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
174
|
+
},
|
|
175
|
+
"strikethrough": {
|
|
176
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
177
|
+
},
|
|
178
|
+
"sub": {
|
|
179
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
180
|
+
},
|
|
181
|
+
"sup": {
|
|
182
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
183
|
+
},
|
|
184
|
+
"table": {
|
|
185
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
186
|
+
},
|
|
187
|
+
"ul_list": {
|
|
188
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
189
|
+
},
|
|
190
|
+
"underline": {
|
|
191
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
192
|
+
},
|
|
193
|
+
"undo": {
|
|
194
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
195
|
+
},
|
|
196
|
+
"textAlign": {
|
|
197
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
198
|
+
},
|
|
199
|
+
"showParagraphs": {
|
|
200
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
201
|
+
},
|
|
202
|
+
"separateParagraphs": {
|
|
203
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
204
|
+
},
|
|
205
|
+
"pasteFormatting": {
|
|
206
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
207
|
+
},
|
|
208
|
+
"superscript": {
|
|
209
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
210
|
+
},
|
|
211
|
+
"subscript": {
|
|
212
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
213
|
+
},
|
|
214
|
+
"languageCharacters": {
|
|
215
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
216
|
+
},
|
|
217
|
+
"responseArea": {
|
|
218
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"description": "Toolbar plugins of an editable-html field, keyed by plugin name."
|
|
222
|
+
},
|
|
223
|
+
"EditableHtmlButtonConfigure": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"disabled": {
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"description": "Indicates if the plugin is disabled or not"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"CustomPlugin": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"event": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"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."
|
|
238
|
+
},
|
|
239
|
+
"iconAlt": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "The alt for the custom button icon"
|
|
242
|
+
},
|
|
243
|
+
"iconType": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "The icon type. Currently, only \"SVG\" is supported."
|
|
246
|
+
},
|
|
247
|
+
"icon": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"description": "The icon string. Currently, only SVG is supported, so it needs to be a valid svg."
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"event",
|
|
254
|
+
"iconAlt",
|
|
255
|
+
"iconType",
|
|
256
|
+
"icon"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"ConfigureProp": {
|
|
260
|
+
"type": "object",
|
|
261
|
+
"properties": {
|
|
262
|
+
"settings": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
265
|
+
},
|
|
266
|
+
"label": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"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."
|
|
272
|
+
},
|
|
273
|
+
"EditableHtmlPluginConfigureRequired": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"properties": {
|
|
276
|
+
"settings": {
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
279
|
+
},
|
|
280
|
+
"label": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
283
|
+
},
|
|
284
|
+
"inputConfiguration": {
|
|
285
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
286
|
+
"description": "Configuration for editable-html"
|
|
287
|
+
},
|
|
288
|
+
"required": {
|
|
289
|
+
"type": "boolean",
|
|
290
|
+
"description": "Indicates if the item is required and the value cannot be empty"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"ConfigurePropWithEnabled": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"properties": {
|
|
297
|
+
"settings": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
300
|
+
},
|
|
301
|
+
"label": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
304
|
+
},
|
|
305
|
+
"enabled": {
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"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)"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"EditableHtmlPluginConfigure": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"properties": {
|
|
314
|
+
"settings": {
|
|
315
|
+
"type": "boolean",
|
|
316
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
317
|
+
},
|
|
318
|
+
"label": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
321
|
+
},
|
|
322
|
+
"inputConfiguration": {
|
|
323
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
324
|
+
"description": "Configuration for editable-html"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"properties": {
|
|
331
|
+
"teacherInstructions": {
|
|
332
|
+
"type": "number",
|
|
333
|
+
"description": "Indicates the max dimension for images in teacher instructions"
|
|
334
|
+
},
|
|
335
|
+
"prompt": {
|
|
336
|
+
"type": "number",
|
|
337
|
+
"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"
|
|
338
|
+
},
|
|
339
|
+
"rationale": {
|
|
340
|
+
"type": "number",
|
|
341
|
+
"description": "Indicates the max dimension for images in rationale"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"description": "Maximum image dimensions per editable field. Elements extend it with their own fields."
|
|
345
|
+
},
|
|
346
|
+
"ConfigureMathMLProp": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"properties": {
|
|
349
|
+
"mmlOutput": {
|
|
350
|
+
"type": "boolean",
|
|
351
|
+
"description": "Indicates if model should have mathML output instead of latex"
|
|
352
|
+
},
|
|
353
|
+
"mmlEditing": {
|
|
354
|
+
"type": "boolean",
|
|
355
|
+
"description": "Indicates if mathML that's already in model should be editable"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"ConfigureLanguageOptions": {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"properties": {
|
|
362
|
+
"label": {
|
|
363
|
+
"type": "string"
|
|
364
|
+
},
|
|
365
|
+
"options": {
|
|
366
|
+
"type": "array",
|
|
367
|
+
"items": {
|
|
368
|
+
"$ref": "#/definitions/ConfigureLanguageOptionsProp"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"required": [
|
|
373
|
+
"label",
|
|
374
|
+
"options"
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
"ConfigureLanguageOptionsProp": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"properties": {
|
|
380
|
+
"value": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"description": "Value of the language option"
|
|
383
|
+
},
|
|
384
|
+
"label": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"description": "Label of the language option"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": [
|
|
390
|
+
"value",
|
|
391
|
+
"label"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
"ContentDimensions": {
|
|
395
|
+
"type": "object",
|
|
396
|
+
"properties": {
|
|
397
|
+
"maxHeight": {
|
|
398
|
+
"type": [
|
|
399
|
+
"string",
|
|
400
|
+
"number"
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
"maxWidth": {
|
|
404
|
+
"type": [
|
|
405
|
+
"string",
|
|
406
|
+
"number"
|
|
407
|
+
]
|
|
408
|
+
},
|
|
409
|
+
"minHeight": {
|
|
410
|
+
"type": [
|
|
411
|
+
"string",
|
|
412
|
+
"number"
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
"minWidth": {
|
|
416
|
+
"type": [
|
|
417
|
+
"string",
|
|
418
|
+
"number"
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"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."
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"additionalProperties": false
|
|
426
|
+
}
|