@pie-element/extended-text-entry 16.0.4-next.20261011174919 → 16.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 +62 -58
- package/dist/author/index.d.ts +15 -36
- package/dist/author/index.js +7 -3
- package/dist/author/main.d.ts +28 -13
- package/dist/author/main.js +46 -55
- package/dist/browser/author/index.js +13 -20
- 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 +13 -20
- 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 +18 -14
- package/dist/controller/index.d.ts +86 -39
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +367 -0
- package/dist/schemas/model.schema.json +513 -0
- package/dist/schemas/session.schema.json +74 -0
- package/dist/types.d.ts +229 -0
- package/package.json +18 -14
|
@@ -1,146 +1,150 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
model: {
|
|
3
|
-
annotationsEnabled:
|
|
3
|
+
annotationsEnabled: false;
|
|
4
4
|
dimensions: {
|
|
5
5
|
height: number;
|
|
6
6
|
width: number;
|
|
7
7
|
};
|
|
8
|
-
equationEditor:
|
|
9
|
-
feedbackEnabled:
|
|
10
|
-
mathInput:
|
|
11
|
-
playerPasteFormattingDisabled:
|
|
12
|
-
playerSpellCheckDisabled:
|
|
13
|
-
predefinedAnnotations: {
|
|
8
|
+
equationEditor: "Grade 8 - HS";
|
|
9
|
+
feedbackEnabled: false;
|
|
10
|
+
mathInput: false;
|
|
11
|
+
playerPasteFormattingDisabled: false;
|
|
12
|
+
playerSpellCheckDisabled: true;
|
|
13
|
+
predefinedAnnotations: ({
|
|
14
14
|
label: string;
|
|
15
15
|
text: string;
|
|
16
|
-
type:
|
|
17
|
-
}
|
|
16
|
+
type: "positive";
|
|
17
|
+
} | {
|
|
18
|
+
label: string;
|
|
19
|
+
text: string;
|
|
20
|
+
type: "negative";
|
|
21
|
+
})[];
|
|
18
22
|
prompt: string;
|
|
19
|
-
promptEnabled:
|
|
23
|
+
promptEnabled: true;
|
|
20
24
|
rationale: string;
|
|
21
|
-
rationaleEnabled:
|
|
22
|
-
spanishInput:
|
|
23
|
-
specialInput:
|
|
24
|
-
spellCheckEnabled:
|
|
25
|
-
studentInstructionsEnabled:
|
|
25
|
+
rationaleEnabled: true;
|
|
26
|
+
spanishInput: false;
|
|
27
|
+
specialInput: false;
|
|
28
|
+
spellCheckEnabled: true;
|
|
29
|
+
studentInstructionsEnabled: true;
|
|
26
30
|
teacherInstructions: string;
|
|
27
|
-
teacherInstructionsEnabled:
|
|
28
|
-
toolbarEditorPosition:
|
|
31
|
+
teacherInstructionsEnabled: true;
|
|
32
|
+
toolbarEditorPosition: "bottom";
|
|
29
33
|
};
|
|
30
34
|
configuration: {
|
|
31
35
|
annotations: {
|
|
32
|
-
settings:
|
|
36
|
+
settings: false;
|
|
33
37
|
label: string;
|
|
34
38
|
};
|
|
35
39
|
baseInputConfiguration: {
|
|
36
40
|
audio: {
|
|
37
|
-
disabled:
|
|
41
|
+
disabled: false;
|
|
38
42
|
};
|
|
39
43
|
video: {
|
|
40
|
-
disabled:
|
|
44
|
+
disabled: false;
|
|
41
45
|
};
|
|
42
46
|
image: {
|
|
43
|
-
disabled:
|
|
47
|
+
disabled: false;
|
|
44
48
|
};
|
|
45
49
|
h3: {
|
|
46
|
-
disabled:
|
|
50
|
+
disabled: true;
|
|
47
51
|
};
|
|
48
52
|
blockquote: {
|
|
49
|
-
disabled:
|
|
53
|
+
disabled: true;
|
|
50
54
|
};
|
|
51
55
|
textAlign: {
|
|
52
|
-
disabled:
|
|
56
|
+
disabled: true;
|
|
53
57
|
};
|
|
54
58
|
showParagraphs: {
|
|
55
|
-
disabled:
|
|
59
|
+
disabled: false;
|
|
56
60
|
};
|
|
57
61
|
separateParagraphs: {
|
|
58
|
-
disabled:
|
|
62
|
+
disabled: true;
|
|
59
63
|
};
|
|
60
64
|
};
|
|
61
65
|
dimensions: {
|
|
62
|
-
settings:
|
|
66
|
+
settings: true;
|
|
63
67
|
label: string;
|
|
64
68
|
};
|
|
65
69
|
spellCheck: {
|
|
66
70
|
label: string;
|
|
67
|
-
settings:
|
|
68
|
-
enabled:
|
|
71
|
+
settings: false;
|
|
72
|
+
enabled: true;
|
|
69
73
|
};
|
|
70
74
|
playerSpellCheck: {
|
|
71
75
|
label: string;
|
|
72
|
-
settings:
|
|
73
|
-
enabled:
|
|
76
|
+
settings: true;
|
|
77
|
+
enabled: true;
|
|
74
78
|
};
|
|
75
79
|
playerPasteFormatting: {
|
|
76
80
|
label: string;
|
|
77
|
-
settings:
|
|
81
|
+
settings: true;
|
|
78
82
|
};
|
|
79
83
|
equationEditor: {
|
|
80
|
-
settings:
|
|
84
|
+
settings: false;
|
|
81
85
|
label: string;
|
|
82
|
-
enabled:
|
|
86
|
+
enabled: true;
|
|
83
87
|
};
|
|
84
88
|
feedback: {
|
|
85
|
-
settings:
|
|
89
|
+
settings: true;
|
|
86
90
|
label: string;
|
|
87
91
|
};
|
|
88
92
|
mathInput: {
|
|
89
|
-
settings:
|
|
93
|
+
settings: true;
|
|
90
94
|
label: string;
|
|
91
|
-
enabled:
|
|
95
|
+
enabled: false;
|
|
92
96
|
};
|
|
93
|
-
settingsPanelDisabled:
|
|
97
|
+
settingsPanelDisabled: false;
|
|
94
98
|
spanishInput: {
|
|
95
|
-
settings:
|
|
99
|
+
settings: true;
|
|
96
100
|
label: string;
|
|
97
|
-
enabled:
|
|
101
|
+
enabled: false;
|
|
98
102
|
};
|
|
99
103
|
specialInput: {
|
|
100
|
-
settings:
|
|
104
|
+
settings: true;
|
|
101
105
|
label: string;
|
|
102
|
-
enabled:
|
|
106
|
+
enabled: false;
|
|
103
107
|
};
|
|
104
108
|
multiple: {
|
|
105
|
-
settings:
|
|
109
|
+
settings: false;
|
|
106
110
|
label: string;
|
|
107
|
-
enabled:
|
|
111
|
+
enabled: false;
|
|
108
112
|
};
|
|
109
113
|
studentInstructions: {
|
|
110
|
-
settings:
|
|
114
|
+
settings: false;
|
|
111
115
|
label: string;
|
|
112
116
|
};
|
|
113
117
|
prompt: {
|
|
114
|
-
settings:
|
|
118
|
+
settings: true;
|
|
115
119
|
label: string;
|
|
116
120
|
inputConfiguration: {
|
|
117
121
|
audio: {
|
|
118
|
-
disabled:
|
|
122
|
+
disabled: false;
|
|
119
123
|
};
|
|
120
124
|
video: {
|
|
121
|
-
disabled:
|
|
125
|
+
disabled: false;
|
|
122
126
|
};
|
|
123
127
|
image: {
|
|
124
|
-
disabled:
|
|
128
|
+
disabled: false;
|
|
125
129
|
};
|
|
126
130
|
};
|
|
127
|
-
required:
|
|
131
|
+
required: false;
|
|
128
132
|
};
|
|
129
133
|
teacherInstructions: {
|
|
130
|
-
settings:
|
|
134
|
+
settings: true;
|
|
131
135
|
label: string;
|
|
132
136
|
inputConfiguration: {
|
|
133
137
|
audio: {
|
|
134
|
-
disabled:
|
|
138
|
+
disabled: false;
|
|
135
139
|
};
|
|
136
140
|
video: {
|
|
137
|
-
disabled:
|
|
141
|
+
disabled: false;
|
|
138
142
|
};
|
|
139
143
|
image: {
|
|
140
|
-
disabled:
|
|
144
|
+
disabled: false;
|
|
141
145
|
};
|
|
142
146
|
};
|
|
143
|
-
required:
|
|
147
|
+
required: false;
|
|
144
148
|
};
|
|
145
149
|
maxImageWidth: {
|
|
146
150
|
teacherInstructions: number;
|
|
@@ -151,12 +155,12 @@ declare const _default: {
|
|
|
151
155
|
prompt: number;
|
|
152
156
|
};
|
|
153
157
|
withRubric: {
|
|
154
|
-
settings:
|
|
158
|
+
settings: false;
|
|
155
159
|
label: string;
|
|
156
160
|
};
|
|
157
161
|
mathMlOptions: {
|
|
158
|
-
mmlOutput:
|
|
159
|
-
mmlEditing:
|
|
162
|
+
mmlOutput: false;
|
|
163
|
+
mmlEditing: false;
|
|
160
164
|
};
|
|
161
165
|
};
|
|
162
166
|
};
|
package/dist/author/index.d.ts
CHANGED
|
@@ -1,45 +1,24 @@
|
|
|
1
|
+
import { type DeleteDone, type ImageHandler, type SoundHandler } from '@pie-element/shared-configure-events';
|
|
2
|
+
import { type AuthorModel } from './main.js';
|
|
3
|
+
import type { ExtendedTextEntryConfiguration } from '../types.js';
|
|
1
4
|
export default class ExtendedTextEntry extends HTMLElement {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
width: number;
|
|
7
|
-
};
|
|
8
|
-
equationEditor: string;
|
|
9
|
-
feedbackEnabled: boolean;
|
|
10
|
-
mathInput: boolean;
|
|
11
|
-
playerPasteFormattingDisabled: boolean;
|
|
12
|
-
playerSpellCheckDisabled: boolean;
|
|
13
|
-
predefinedAnnotations: {
|
|
14
|
-
label: string;
|
|
15
|
-
text: string;
|
|
16
|
-
type: string;
|
|
17
|
-
}[];
|
|
18
|
-
prompt: string;
|
|
19
|
-
promptEnabled: boolean;
|
|
20
|
-
rationale: string;
|
|
21
|
-
rationaleEnabled: boolean;
|
|
22
|
-
spanishInput: boolean;
|
|
23
|
-
specialInput: boolean;
|
|
24
|
-
spellCheckEnabled: boolean;
|
|
25
|
-
studentInstructionsEnabled: boolean;
|
|
26
|
-
teacherInstructions: string;
|
|
27
|
-
teacherInstructionsEnabled: boolean;
|
|
28
|
-
toolbarEditorPosition: string;
|
|
29
|
-
};
|
|
5
|
+
private _root;
|
|
6
|
+
private _model;
|
|
7
|
+
private _configuration;
|
|
8
|
+
static createDefaultModel: (model?: AuthorModel, config?: ExtendedTextEntryConfiguration) => AuthorModel;
|
|
30
9
|
constructor();
|
|
31
|
-
set model(m:
|
|
32
|
-
set configuration(c:
|
|
33
|
-
onModelChanged(m:
|
|
34
|
-
onConfigurationChanged(c:
|
|
10
|
+
set model(m: AuthorModel);
|
|
11
|
+
set configuration(c: ExtendedTextEntryConfiguration);
|
|
12
|
+
onModelChanged(m: AuthorModel): void;
|
|
13
|
+
onConfigurationChanged(c: ExtendedTextEntryConfiguration): void;
|
|
35
14
|
/**
|
|
36
15
|
*
|
|
37
16
|
* @param {done, progress, file} handler
|
|
38
17
|
*/
|
|
39
|
-
insertImage(handler:
|
|
40
|
-
onDeleteImage(src:
|
|
41
|
-
insertSound(handler:
|
|
42
|
-
onDeleteSound(src:
|
|
18
|
+
insertImage(handler: ImageHandler): void;
|
|
19
|
+
onDeleteImage(src: string, done: DeleteDone): void;
|
|
20
|
+
insertSound(handler: SoundHandler): void;
|
|
21
|
+
onDeleteSound(src: string, done: DeleteDone): void;
|
|
43
22
|
render(): void;
|
|
44
23
|
connectedCallback(): void;
|
|
45
24
|
disconnectedCallback(): void;
|
package/dist/author/index.js
CHANGED
|
@@ -5,6 +5,9 @@ import { createRoot as r } from "react-dom/client";
|
|
|
5
5
|
import { DeleteImageEvent as i, DeleteSoundEvent as a, InsertImageEvent as o, InsertSoundEvent as s, ModelUpdatedEvent as c } from "@pie-element/shared-configure-events";
|
|
6
6
|
//#region src/author/index.ts
|
|
7
7
|
var l = class l extends HTMLElement {
|
|
8
|
+
_root;
|
|
9
|
+
_model;
|
|
10
|
+
_configuration;
|
|
8
11
|
static createDefaultModel = (e = {}, n) => {
|
|
9
12
|
let r = {
|
|
10
13
|
...t.model,
|
|
@@ -19,12 +22,13 @@ var l = class l extends HTMLElement {
|
|
|
19
22
|
this._model = l.createDefaultModel(e, this._configuration), this.render();
|
|
20
23
|
}
|
|
21
24
|
set configuration(e) {
|
|
22
|
-
|
|
25
|
+
let n = {
|
|
23
26
|
...t.configuration,
|
|
24
27
|
...e
|
|
25
28
|
};
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
this._configuration = n;
|
|
30
|
+
let { withRubric: r = {} } = e || {};
|
|
31
|
+
r?.forceEnabled && (n.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
|
|
28
32
|
}
|
|
29
33
|
onModelChanged(e) {
|
|
30
34
|
this._model = e, this.render(), this.dispatchEvent(new c(this._model, !1));
|
package/dist/author/main.d.ts
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
|
|
3
|
+
import type { ExtendedTextEntryValidationErrors } from '../controller/index.js';
|
|
4
|
+
import type { ExtendedTextEntryConfiguration, ExtendedTextEntryFeedback, ExtendedTextEntryModel } from '../types.js';
|
|
5
|
+
/** The model the author edits; the host sets `errors` from the controller's `validate()`. */
|
|
6
|
+
export type AuthorModel = Partial<ExtendedTextEntryModel> & {
|
|
7
|
+
errors?: ExtendedTextEntryValidationErrors;
|
|
8
|
+
};
|
|
9
|
+
export type MainProps = {
|
|
10
|
+
model: AuthorModel;
|
|
11
|
+
configuration: ExtendedTextEntryConfiguration;
|
|
12
|
+
onModelChanged: (model: AuthorModel) => void;
|
|
13
|
+
onConfigurationChanged: (configuration: ExtendedTextEntryConfiguration) => void;
|
|
14
|
+
imageSupport: {
|
|
15
|
+
add: (handler: ImageHandler) => void;
|
|
16
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
11
17
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
uploadSoundSupport: {
|
|
19
|
+
add: (handler: SoundHandler) => void;
|
|
20
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
type MainState = {
|
|
24
|
+
setDimensions: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare class Main extends React.Component<MainProps, MainState> {
|
|
27
|
+
constructor(props: MainProps);
|
|
28
|
+
onPromptChange: (markup: string) => void;
|
|
29
|
+
changeFeedback: (feedback: ExtendedTextEntryFeedback) => void;
|
|
30
|
+
changeTeacherInstructions: (teacherInstructions: string) => void;
|
|
16
31
|
render(): React.JSX.Element;
|
|
17
32
|
}
|
|
18
33
|
export default Main;
|
package/dist/author/main.js
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
import e from "react";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "@mui/material/
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { FeedbackSelector as c, InputContainer as l, layout as u, settings as d } from "@pie-lib/config-ui";
|
|
2
|
+
import t from "@mui/material/Typography";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import r, { ALL_PLUGINS as i } from "@pie-lib/editable-html-tip-tap";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { FeedbackSelector as s, InputContainer as c, layout as l, settings as u } from "@pie-lib/config-ui";
|
|
8
7
|
//#region src/author/main.tsx
|
|
9
|
-
var { Panel:
|
|
8
|
+
var { Panel: d, toggle: f, numberFields: p, dropdown: m } = u, h = {
|
|
10
9
|
type: "default",
|
|
11
10
|
default: "Your answer has been submitted"
|
|
12
|
-
}, g =
|
|
11
|
+
}, g = n(t)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), _ = n(c)(({ theme: e }) => ({
|
|
13
12
|
paddingTop: e.spacing(1),
|
|
14
13
|
marginTop: e.spacing(2),
|
|
15
14
|
marginBottom: e.spacing(2),
|
|
16
15
|
width: "100%"
|
|
17
|
-
})), v =
|
|
16
|
+
})), v = n("div")(({ theme: e }) => ({
|
|
18
17
|
fontSize: e.typography.fontSize - 2,
|
|
19
18
|
color: e.palette.error.main,
|
|
20
19
|
paddingTop: e.spacing(1)
|
|
21
20
|
})), y = class extends e.Component {
|
|
22
|
-
static propTypes = {
|
|
23
|
-
onModelChanged: t.func.isRequired,
|
|
24
|
-
onConfigurationChanged: t.func,
|
|
25
|
-
model: t.object.isRequired,
|
|
26
|
-
configuration: t.object.isRequired,
|
|
27
|
-
imageSupport: t.object.isRequired,
|
|
28
|
-
uploadSoundSupport: t.object.isRequired
|
|
29
|
-
};
|
|
30
21
|
constructor(e) {
|
|
31
22
|
super(e), this.state = { setDimensions: !0 };
|
|
32
23
|
}
|
|
@@ -52,9 +43,9 @@ var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
|
|
|
52
43
|
});
|
|
53
44
|
};
|
|
54
45
|
render() {
|
|
55
|
-
let { model: t, configuration: n, imageSupport:
|
|
56
|
-
mathInput: P.settings &&
|
|
57
|
-
equationEditor:
|
|
46
|
+
let { model: t, configuration: n, imageSupport: c, onConfigurationChanged: u, onModelChanged: y, uploadSoundSupport: b } = this.props, { annotations: x = {}, contentDimensions: S = {}, dimensions: C = {}, equationEditor: w = {}, feedback: T = {}, playerPasteFormatting: E = {}, playerSpellCheck: D = {}, prompt: O = {}, settingsPanelDisabled: ee, spanishInput: k = {}, specialInput: A = {}, spellCheck: j = {}, studentInstructions: M = {}, teacherInstructions: N = {}, mathInput: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, multiple: L = {}, withRubric: R = {}, mathMlOptions: z = {}, baseInputConfiguration: B = {} } = n || {}, { errors: V = {}, extraCSSRules: H, feedbackEnabled: U, promptEnabled: W, spellCheckEnabled: G, teacherInstructionsEnabled: K, toolbarEditorPosition: q } = t || {}, { prompt: J, teacherInstructions: Y } = V, X = F && F.prompt, Z = I && I.prompt, Q = { position: q === "top" ? "top" : "bottom" }, te = {
|
|
47
|
+
mathInput: P.settings && f(P.label),
|
|
48
|
+
equationEditor: w.enabled && t.mathInput && m(w.label, [
|
|
58
49
|
"non-negative-integers",
|
|
59
50
|
"integers",
|
|
60
51
|
"decimals",
|
|
@@ -68,9 +59,9 @@ var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
|
|
|
68
59
|
"statistics",
|
|
69
60
|
"item-authoring"
|
|
70
61
|
]),
|
|
71
|
-
spanishInput: k.settings &&
|
|
72
|
-
specialInput: A.settings &&
|
|
73
|
-
dimensions:
|
|
62
|
+
spanishInput: k.settings && f(k.label),
|
|
63
|
+
specialInput: A.settings && f(A.label),
|
|
64
|
+
dimensions: C.settings && p(C.label, {
|
|
74
65
|
width: {
|
|
75
66
|
label: "Width (px)",
|
|
76
67
|
suffix: "px",
|
|
@@ -84,78 +75,78 @@ var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
|
|
|
84
75
|
max: 500
|
|
85
76
|
}
|
|
86
77
|
}),
|
|
87
|
-
"multiple.enabled": L.settings &&
|
|
88
|
-
promptEnabled:
|
|
89
|
-
feedbackEnabled:
|
|
90
|
-
annotationsEnabled:
|
|
91
|
-
spellCheckEnabled: j.settings &&
|
|
92
|
-
playerSpellCheckDisabled:
|
|
93
|
-
playerPasteFormattingDisabled:
|
|
78
|
+
"multiple.enabled": L.settings && f(L.label, !0),
|
|
79
|
+
promptEnabled: O.settings && f(O.label),
|
|
80
|
+
feedbackEnabled: T.settings && f(T.label),
|
|
81
|
+
annotationsEnabled: x.settings && f(x.label),
|
|
82
|
+
spellCheckEnabled: j.settings && f(j.label),
|
|
83
|
+
playerSpellCheckDisabled: D.settings && f(D.label),
|
|
84
|
+
playerPasteFormattingDisabled: E.settings && f(E.label)
|
|
94
85
|
}, ne = {
|
|
95
|
-
teacherInstructionsEnabled: N.settings &&
|
|
96
|
-
studentInstructionsEnabled: M.settings &&
|
|
97
|
-
rubricEnabled: R?.settings &&
|
|
86
|
+
teacherInstructionsEnabled: N.settings && f(N.label),
|
|
87
|
+
studentInstructionsEnabled: M.settings && f(M.label),
|
|
88
|
+
rubricEnabled: R?.settings && f(R?.label)
|
|
98
89
|
}, $ = (e) => Object.assign({ ...B }, e || {});
|
|
99
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ o(l.ConfigLayout, {
|
|
100
91
|
extraCSSRules: H,
|
|
101
|
-
dimensions:
|
|
102
|
-
hideSettings:
|
|
103
|
-
settings: /* @__PURE__ */
|
|
92
|
+
dimensions: S,
|
|
93
|
+
hideSettings: ee,
|
|
94
|
+
settings: /* @__PURE__ */ a(d, {
|
|
104
95
|
model: t,
|
|
105
96
|
configuration: n,
|
|
106
|
-
onChangeModel: (e) =>
|
|
107
|
-
onChangeConfiguration: (e) =>
|
|
97
|
+
onChangeModel: (e) => y(e),
|
|
98
|
+
onChangeConfiguration: (e) => u(e),
|
|
108
99
|
groups: {
|
|
109
100
|
Settings: te,
|
|
110
101
|
Properties: ne
|
|
111
102
|
}
|
|
112
103
|
}),
|
|
113
104
|
children: [
|
|
114
|
-
K && /* @__PURE__ */
|
|
105
|
+
K && /* @__PURE__ */ o(_, {
|
|
115
106
|
label: N.label,
|
|
116
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: [/* @__PURE__ */ a(r, {
|
|
117
108
|
className: "prompt",
|
|
118
109
|
markup: t.teacherInstructions || "",
|
|
119
110
|
onChange: this.changeTeacherInstructions,
|
|
120
|
-
imageSupport:
|
|
111
|
+
imageSupport: c,
|
|
121
112
|
nonEmpty: !1,
|
|
122
113
|
error: Y,
|
|
123
114
|
toolbarOpts: Q,
|
|
124
115
|
spellCheck: G,
|
|
125
116
|
maxImageWidth: F && F.teacherInstructions || X,
|
|
126
117
|
maxImageHeight: I && I.teacherInstructions || Z,
|
|
127
|
-
uploadSoundSupport:
|
|
118
|
+
uploadSoundSupport: b,
|
|
128
119
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
129
120
|
mathMlOptions: z,
|
|
130
121
|
pluginProps: $(N?.inputConfiguration)
|
|
131
|
-
}), Y && /* @__PURE__ */
|
|
122
|
+
}), Y && /* @__PURE__ */ a(v, { children: Y })]
|
|
132
123
|
}),
|
|
133
|
-
W && /* @__PURE__ */
|
|
134
|
-
label:
|
|
135
|
-
children: [/* @__PURE__ */
|
|
136
|
-
activePlugins:
|
|
124
|
+
W && /* @__PURE__ */ o(_, {
|
|
125
|
+
label: O.label,
|
|
126
|
+
children: [/* @__PURE__ */ a(r, {
|
|
127
|
+
activePlugins: i,
|
|
137
128
|
className: "prompt",
|
|
138
129
|
markup: t.prompt || "",
|
|
139
130
|
onChange: this.onPromptChange,
|
|
140
|
-
imageSupport:
|
|
131
|
+
imageSupport: c,
|
|
141
132
|
nonEmpty: !1,
|
|
142
133
|
error: J,
|
|
143
134
|
toolbarOpts: Q,
|
|
144
135
|
spellCheck: G,
|
|
145
136
|
maxImageWidth: X,
|
|
146
137
|
maxImageHeight: Z,
|
|
147
|
-
uploadSoundSupport:
|
|
138
|
+
uploadSoundSupport: b,
|
|
148
139
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
149
140
|
mathMlOptions: z,
|
|
150
|
-
pluginProps: $(
|
|
151
|
-
}), J && /* @__PURE__ */
|
|
141
|
+
pluginProps: $(O?.inputConfiguration)
|
|
142
|
+
}), J && /* @__PURE__ */ a(v, { children: J })]
|
|
152
143
|
}),
|
|
153
|
-
U && /* @__PURE__ */
|
|
144
|
+
U && /* @__PURE__ */ o(e.Fragment, { children: [/* @__PURE__ */ a(g, {
|
|
154
145
|
variant: "h6",
|
|
155
146
|
children: "Feedback"
|
|
156
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ a(s, {
|
|
157
148
|
label: "When submitted, show",
|
|
158
|
-
feedback: t.feedback ||
|
|
149
|
+
feedback: t.feedback || h,
|
|
159
150
|
onChange: this.changeFeedback,
|
|
160
151
|
toolbarOpts: Q
|
|
161
152
|
})] })
|
|
@@ -2093,15 +2093,12 @@ var mr = class extends V.Component {
|
|
|
2093
2093
|
}), vr = (e) => typeof e == "string" ? {
|
|
2094
2094
|
label: e,
|
|
2095
2095
|
value: e
|
|
2096
|
-
} : e, yr =
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
isConfigProperty: n
|
|
2103
|
-
};
|
|
2104
|
-
}, br = (e, t, n = !1) => ({
|
|
2096
|
+
} : e, yr = (e, t, n = !1) => ({
|
|
2097
|
+
type: "radio",
|
|
2098
|
+
label: e,
|
|
2099
|
+
choices: t && t.map((e) => vr(e)),
|
|
2100
|
+
isConfigProperty: n
|
|
2101
|
+
}), br = (e, t, n = !1) => ({
|
|
2105
2102
|
type: "dropdown",
|
|
2106
2103
|
label: e,
|
|
2107
2104
|
choices: t,
|
|
@@ -2200,14 +2197,6 @@ var mr = class extends V.Component {
|
|
|
2200
2197
|
color: e.palette.error.main,
|
|
2201
2198
|
paddingTop: e.spacing(1)
|
|
2202
2199
|
})), Lr = class extends V.Component {
|
|
2203
|
-
static propTypes = {
|
|
2204
|
-
onModelChanged: K.default.func.isRequired,
|
|
2205
|
-
onConfigurationChanged: K.default.func,
|
|
2206
|
-
model: K.default.object.isRequired,
|
|
2207
|
-
configuration: K.default.object.isRequired,
|
|
2208
|
-
imageSupport: K.default.object.isRequired,
|
|
2209
|
-
uploadSoundSupport: K.default.object.isRequired
|
|
2210
|
-
};
|
|
2211
2200
|
constructor(e) {
|
|
2212
2201
|
super(e), this.state = { setDimensions: !0 };
|
|
2213
2202
|
}
|
|
@@ -2554,6 +2543,9 @@ var mr = class extends V.Component {
|
|
|
2554
2543
|
}
|
|
2555
2544
|
}
|
|
2556
2545
|
}, zr = class e extends HTMLElement {
|
|
2546
|
+
_root;
|
|
2547
|
+
_model;
|
|
2548
|
+
_configuration;
|
|
2557
2549
|
static createDefaultModel = (e = {}, t) => {
|
|
2558
2550
|
let n = {
|
|
2559
2551
|
...Rr.model,
|
|
@@ -2568,12 +2560,13 @@ var mr = class extends V.Component {
|
|
|
2568
2560
|
this._model = e.createDefaultModel(t, this._configuration), this.render();
|
|
2569
2561
|
}
|
|
2570
2562
|
set configuration(e) {
|
|
2571
|
-
|
|
2563
|
+
let t = {
|
|
2572
2564
|
...Rr.configuration,
|
|
2573
2565
|
...e
|
|
2574
2566
|
};
|
|
2575
|
-
|
|
2576
|
-
|
|
2567
|
+
this._configuration = t;
|
|
2568
|
+
let { withRubric: n = {} } = e || {};
|
|
2569
|
+
n?.forceEnabled && (t.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
|
|
2577
2570
|
}
|
|
2578
2571
|
onModelChanged(e) {
|
|
2579
2572
|
this._model = e, this.render(), this.dispatchEvent(new Tr(this._model, !1));
|