@pie-element/extended-text-entry 13.4.1-next.3 → 14.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/lib/defaults.js +2 -3
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +97 -151
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +222 -297
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +9 -6
- package/controller/lib/defaults.js +2 -3
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +73 -170
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +2 -2
- package/lib/annotation/annotation-editor.js +492 -565
- package/lib/annotation/annotation-editor.js.map +1 -1
- package/lib/annotation/annotation-menu.js +131 -190
- package/lib/annotation/annotation-menu.js.map +1 -1
- package/lib/annotation/annotation-utils.js +77 -121
- package/lib/annotation/annotation-utils.js.map +1 -1
- package/lib/annotation/freeform-editor.js +202 -227
- package/lib/annotation/freeform-editor.js.map +1 -1
- package/lib/index.js +77 -131
- package/lib/index.js.map +1 -1
- package/lib/main.js +178 -242
- package/lib/main.js.map +1 -1
- package/lib/print.js +45 -87
- package/lib/print.js.map +1 -1
- package/package.json +13 -19
- package/esm/configure.js +0 -9412
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -905
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -21631
- package/esm/element.js.map +0 -1
- package/esm/package.json +0 -3
- package/esm/print.js +0 -21600
- package/esm/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -139
- package/module/demo.js +0 -38
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -22
- package/module/print-demo.js +0 -76
- package/module/print.html +0 -18
- package/module/print.js +0 -1
package/configure/lib/main.js
CHANGED
|
@@ -1,322 +1,247 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
|
-
exports
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
-
|
|
22
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
-
|
|
7
|
+
exports.default = exports.Main = void 0;
|
|
24
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
9
|
var _react = _interopRequireDefault(require("react"));
|
|
27
|
-
|
|
28
10
|
var _configUi = require("@pie-lib/config-ui");
|
|
29
|
-
|
|
30
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
var _styles = require("@material-ui/core/styles");
|
|
35
|
-
|
|
12
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
36
14
|
var _editableHtml = _interopRequireWildcard(require("@pie-lib/editable-html"));
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
47
|
-
|
|
48
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
|
-
|
|
50
|
-
var Panel = _configUi.settings.Panel,
|
|
51
|
-
toggle = _configUi.settings.toggle,
|
|
52
|
-
numberFields = _configUi.settings.numberFields,
|
|
53
|
-
dropdown = _configUi.settings.dropdown;
|
|
54
|
-
var defaultFeedback = {
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
const {
|
|
17
|
+
Panel,
|
|
18
|
+
toggle,
|
|
19
|
+
numberFields,
|
|
20
|
+
dropdown
|
|
21
|
+
} = _configUi.settings;
|
|
22
|
+
const defaultFeedback = {
|
|
55
23
|
type: 'default',
|
|
56
|
-
|
|
24
|
+
default: 'Your answer has been submitted'
|
|
57
25
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
26
|
+
const StyledHeader = (0, _styles.styled)(_Typography.default)(({
|
|
27
|
+
theme
|
|
28
|
+
}) => ({
|
|
29
|
+
paddingBottom: theme.spacing(1)
|
|
30
|
+
}));
|
|
31
|
+
const PromptContainer = (0, _styles.styled)(_configUi.InputContainer)(({
|
|
32
|
+
theme
|
|
33
|
+
}) => ({
|
|
34
|
+
paddingTop: theme.spacing(1),
|
|
35
|
+
marginTop: theme.spacing(2),
|
|
36
|
+
marginBottom: theme.spacing(2),
|
|
37
|
+
width: '100%'
|
|
38
|
+
}));
|
|
39
|
+
const ErrorText = (0, _styles.styled)('div')(({
|
|
40
|
+
theme
|
|
41
|
+
}) => ({
|
|
42
|
+
fontSize: theme.typography.fontSize - 2,
|
|
43
|
+
color: theme.palette.error.main,
|
|
44
|
+
paddingTop: theme.spacing(1)
|
|
45
|
+
}));
|
|
46
|
+
class Main extends _react.default.Component {
|
|
47
|
+
constructor(props) {
|
|
48
|
+
super(props);
|
|
49
|
+
(0, _defineProperty2.default)(this, "onPromptChange", markup => {
|
|
50
|
+
const {
|
|
51
|
+
onModelChanged,
|
|
52
|
+
model
|
|
53
|
+
} = this.props;
|
|
54
|
+
onModelChanged({
|
|
55
|
+
...model,
|
|
74
56
|
prompt: markup
|
|
75
|
-
}));
|
|
76
|
-
});
|
|
77
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeFeedback", function (feedback) {
|
|
78
|
-
var _this$props2 = _this.props,
|
|
79
|
-
model = _this$props2.model,
|
|
80
|
-
onModelChanged = _this$props2.onModelChanged;
|
|
81
|
-
|
|
82
|
-
var update = _objectSpread(_objectSpread({}, model), {}, {
|
|
83
|
-
feedback: feedback
|
|
84
57
|
});
|
|
85
|
-
|
|
58
|
+
});
|
|
59
|
+
(0, _defineProperty2.default)(this, "changeFeedback", feedback => {
|
|
60
|
+
const {
|
|
61
|
+
model,
|
|
62
|
+
onModelChanged
|
|
63
|
+
} = this.props;
|
|
64
|
+
const update = {
|
|
65
|
+
...model,
|
|
66
|
+
feedback
|
|
67
|
+
};
|
|
86
68
|
onModelChanged(update);
|
|
87
69
|
});
|
|
88
|
-
(0, _defineProperty2
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
70
|
+
(0, _defineProperty2.default)(this, "changeTeacherInstructions", teacherInstructions => {
|
|
71
|
+
const {
|
|
72
|
+
model,
|
|
73
|
+
onModelChanged
|
|
74
|
+
} = this.props;
|
|
75
|
+
const update = {
|
|
76
|
+
...model,
|
|
77
|
+
teacherInstructions
|
|
78
|
+
};
|
|
97
79
|
onModelChanged(update);
|
|
98
80
|
});
|
|
99
|
-
|
|
81
|
+
this.state = {
|
|
100
82
|
setDimensions: true
|
|
101
83
|
};
|
|
102
|
-
return _this;
|
|
103
84
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
|
|
257
|
-
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
258
|
-
className: classes.prompt,
|
|
259
|
-
markup: model.prompt || '',
|
|
260
|
-
onChange: this.onPromptChange,
|
|
261
|
-
imageSupport: imageSupport,
|
|
262
|
-
nonEmpty: false,
|
|
263
|
-
error: promptError,
|
|
264
|
-
toolbarOpts: toolbarOpts,
|
|
265
|
-
spellCheck: spellCheckEnabled,
|
|
266
|
-
maxImageWidth: defaultImageMaxWidth,
|
|
267
|
-
maxImageHeight: defaultImageMaxHeight,
|
|
268
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
269
|
-
languageCharactersProps: [{
|
|
270
|
-
language: 'spanish'
|
|
271
|
-
}, {
|
|
272
|
-
language: 'special'
|
|
273
|
-
}],
|
|
274
|
-
mathMlOptions: mathMlOptions,
|
|
275
|
-
pluginProps: getPluginProps(prompt === null || prompt === void 0 ? void 0 : prompt.inputConfiguration)
|
|
276
|
-
}), promptError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
277
|
-
className: classes.errorText
|
|
278
|
-
}, promptError)), feedbackEnabled && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
279
|
-
className: classes.header,
|
|
280
|
-
variant: "subheading"
|
|
281
|
-
}, "Feedback"), /*#__PURE__*/_react["default"].createElement(_configUi.FeedbackSelector, {
|
|
282
|
-
label: "When submitted, show",
|
|
283
|
-
feedback: model.feedback || defaultFeedback,
|
|
284
|
-
onChange: this.changeFeedback,
|
|
285
|
-
toolbarOpts: toolbarOpts
|
|
286
|
-
})));
|
|
287
|
-
}
|
|
288
|
-
}]);
|
|
289
|
-
return Main;
|
|
290
|
-
}(_react["default"].Component);
|
|
291
|
-
|
|
85
|
+
render() {
|
|
86
|
+
const {
|
|
87
|
+
model,
|
|
88
|
+
configuration,
|
|
89
|
+
imageSupport,
|
|
90
|
+
onConfigurationChanged,
|
|
91
|
+
onModelChanged,
|
|
92
|
+
uploadSoundSupport
|
|
93
|
+
} = this.props;
|
|
94
|
+
const {
|
|
95
|
+
annotations = {},
|
|
96
|
+
contentDimensions = {},
|
|
97
|
+
dimensions = {},
|
|
98
|
+
equationEditor = {},
|
|
99
|
+
feedback = {},
|
|
100
|
+
playerSpellCheck = {},
|
|
101
|
+
prompt = {},
|
|
102
|
+
settingsPanelDisabled,
|
|
103
|
+
spanishInput = {},
|
|
104
|
+
specialInput = {},
|
|
105
|
+
spellCheck = {},
|
|
106
|
+
studentInstructions = {},
|
|
107
|
+
teacherInstructions = {},
|
|
108
|
+
mathInput = {},
|
|
109
|
+
maxImageWidth = {},
|
|
110
|
+
maxImageHeight = {},
|
|
111
|
+
multiple = {},
|
|
112
|
+
withRubric = {},
|
|
113
|
+
mathMlOptions = {},
|
|
114
|
+
baseInputConfiguration = {}
|
|
115
|
+
} = configuration || {};
|
|
116
|
+
const {
|
|
117
|
+
errors = {},
|
|
118
|
+
extraCSSRules,
|
|
119
|
+
feedbackEnabled,
|
|
120
|
+
promptEnabled,
|
|
121
|
+
spellCheckEnabled,
|
|
122
|
+
teacherInstructionsEnabled,
|
|
123
|
+
toolbarEditorPosition
|
|
124
|
+
} = model || {};
|
|
125
|
+
const {
|
|
126
|
+
prompt: promptError,
|
|
127
|
+
teacherInstructions: teacherInstructionsError
|
|
128
|
+
} = errors;
|
|
129
|
+
const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
|
|
130
|
+
const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
|
|
131
|
+
const toolbarOpts = {
|
|
132
|
+
position: toolbarEditorPosition === 'top' ? 'top' : 'bottom'
|
|
133
|
+
};
|
|
134
|
+
const panelSettings = {
|
|
135
|
+
mathInput: mathInput.settings && toggle(mathInput.label),
|
|
136
|
+
equationEditor: equationEditor.enabled && model.mathInput && dropdown(equationEditor.label, ['non-negative-integers', 'integers', 'decimals', 'fractions', 'Grade 1 - 2', 'Grade 3 - 5', 'Grade 6 - 7', 'Grade 8 - HS', 'geometry', 'advanced-algebra', 'statistics', 'item-authoring']),
|
|
137
|
+
spanishInput: spanishInput.settings && toggle(spanishInput.label),
|
|
138
|
+
specialInput: specialInput.settings && toggle(specialInput.label),
|
|
139
|
+
dimensions: dimensions.settings && numberFields(dimensions.label, {
|
|
140
|
+
width: {
|
|
141
|
+
label: 'Width (px)',
|
|
142
|
+
suffix: 'px',
|
|
143
|
+
min: 100,
|
|
144
|
+
max: 1200
|
|
145
|
+
},
|
|
146
|
+
height: {
|
|
147
|
+
label: 'Height (px)',
|
|
148
|
+
suffix: 'px',
|
|
149
|
+
min: 100,
|
|
150
|
+
max: 500
|
|
151
|
+
}
|
|
152
|
+
}),
|
|
153
|
+
'multiple.enabled': multiple.settings && toggle(multiple.label, true),
|
|
154
|
+
promptEnabled: prompt.settings && toggle(prompt.label),
|
|
155
|
+
feedbackEnabled: feedback.settings && toggle(feedback.label),
|
|
156
|
+
annotationsEnabled: annotations.settings && toggle(annotations.label),
|
|
157
|
+
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
|
|
158
|
+
playerSpellCheckDisabled: playerSpellCheck.settings && toggle(playerSpellCheck.label)
|
|
159
|
+
};
|
|
160
|
+
const panelProperties = {
|
|
161
|
+
teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
|
|
162
|
+
studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),
|
|
163
|
+
rubricEnabled: withRubric?.settings && toggle(withRubric?.label)
|
|
164
|
+
};
|
|
165
|
+
const getPluginProps = props => {
|
|
166
|
+
return Object.assign({
|
|
167
|
+
...baseInputConfiguration
|
|
168
|
+
}, props || {});
|
|
169
|
+
};
|
|
170
|
+
return /*#__PURE__*/_react.default.createElement(_configUi.layout.ConfigLayout, {
|
|
171
|
+
extraCSSRules: extraCSSRules,
|
|
172
|
+
dimensions: contentDimensions,
|
|
173
|
+
hideSettings: settingsPanelDisabled,
|
|
174
|
+
settings: /*#__PURE__*/_react.default.createElement(Panel, {
|
|
175
|
+
model: model,
|
|
176
|
+
configuration: configuration,
|
|
177
|
+
onChangeModel: model => onModelChanged(model),
|
|
178
|
+
onChangeConfiguration: config => onConfigurationChanged(config),
|
|
179
|
+
groups: {
|
|
180
|
+
Settings: panelSettings,
|
|
181
|
+
Properties: panelProperties
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
}, teacherInstructionsEnabled && /*#__PURE__*/_react.default.createElement(PromptContainer, {
|
|
185
|
+
label: teacherInstructions.label
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
187
|
+
className: "prompt",
|
|
188
|
+
markup: model.teacherInstructions || '',
|
|
189
|
+
onChange: this.changeTeacherInstructions,
|
|
190
|
+
imageSupport: imageSupport,
|
|
191
|
+
nonEmpty: false,
|
|
192
|
+
error: teacherInstructionsError,
|
|
193
|
+
toolbarOpts: toolbarOpts,
|
|
194
|
+
spellCheck: spellCheckEnabled,
|
|
195
|
+
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
196
|
+
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
197
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
198
|
+
languageCharactersProps: [{
|
|
199
|
+
language: 'spanish'
|
|
200
|
+
}, {
|
|
201
|
+
language: 'special'
|
|
202
|
+
}],
|
|
203
|
+
mathMlOptions: mathMlOptions,
|
|
204
|
+
pluginProps: getPluginProps(teacherInstructions?.inputConfiguration)
|
|
205
|
+
}), teacherInstructionsError && /*#__PURE__*/_react.default.createElement(ErrorText, null, teacherInstructionsError)), promptEnabled && /*#__PURE__*/_react.default.createElement(PromptContainer, {
|
|
206
|
+
label: prompt.label
|
|
207
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
208
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
209
|
+
className: "prompt",
|
|
210
|
+
markup: model.prompt || '',
|
|
211
|
+
onChange: this.onPromptChange,
|
|
212
|
+
imageSupport: imageSupport,
|
|
213
|
+
nonEmpty: false,
|
|
214
|
+
error: promptError,
|
|
215
|
+
toolbarOpts: toolbarOpts,
|
|
216
|
+
spellCheck: spellCheckEnabled,
|
|
217
|
+
maxImageWidth: defaultImageMaxWidth,
|
|
218
|
+
maxImageHeight: defaultImageMaxHeight,
|
|
219
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
220
|
+
languageCharactersProps: [{
|
|
221
|
+
language: 'spanish'
|
|
222
|
+
}, {
|
|
223
|
+
language: 'special'
|
|
224
|
+
}],
|
|
225
|
+
mathMlOptions: mathMlOptions,
|
|
226
|
+
pluginProps: getPluginProps(prompt?.inputConfiguration)
|
|
227
|
+
}), promptError && /*#__PURE__*/_react.default.createElement(ErrorText, null, promptError)), feedbackEnabled && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(StyledHeader, {
|
|
228
|
+
variant: "h6"
|
|
229
|
+
}, "Feedback"), /*#__PURE__*/_react.default.createElement(_configUi.FeedbackSelector, {
|
|
230
|
+
label: "When submitted, show",
|
|
231
|
+
feedback: model.feedback || defaultFeedback,
|
|
232
|
+
onChange: this.changeFeedback,
|
|
233
|
+
toolbarOpts: toolbarOpts
|
|
234
|
+
})));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
292
237
|
exports.Main = Main;
|
|
293
|
-
(0, _defineProperty2
|
|
294
|
-
onModelChanged: _propTypes
|
|
295
|
-
onConfigurationChanged: _propTypes
|
|
296
|
-
model: _propTypes
|
|
297
|
-
configuration: _propTypes
|
|
298
|
-
imageSupport: _propTypes
|
|
299
|
-
uploadSoundSupport: _propTypes
|
|
300
|
-
classes: _propTypes["default"].object.isRequired
|
|
238
|
+
(0, _defineProperty2.default)(Main, "propTypes", {
|
|
239
|
+
onModelChanged: _propTypes.default.func.isRequired,
|
|
240
|
+
onConfigurationChanged: _propTypes.default.func,
|
|
241
|
+
model: _propTypes.default.object.isRequired,
|
|
242
|
+
configuration: _propTypes.default.object.isRequired,
|
|
243
|
+
imageSupport: _propTypes.default.object.isRequired,
|
|
244
|
+
uploadSoundSupport: _propTypes.default.object.isRequired
|
|
301
245
|
});
|
|
302
|
-
|
|
303
|
-
var _default = (0, _styles.withStyles)(function (theme) {
|
|
304
|
-
return {
|
|
305
|
-
header: {
|
|
306
|
-
paddingBottom: theme.spacing.unit
|
|
307
|
-
},
|
|
308
|
-
promptContainer: {
|
|
309
|
-
paddingTop: theme.spacing.unit * 2,
|
|
310
|
-
marginBottom: theme.spacing.unit * 2,
|
|
311
|
-
width: '100%'
|
|
312
|
-
},
|
|
313
|
-
errorText: {
|
|
314
|
-
fontSize: theme.typography.fontSize - 2,
|
|
315
|
-
color: theme.palette.error.main,
|
|
316
|
-
paddingTop: theme.spacing.unit
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
})(Main);
|
|
320
|
-
|
|
321
|
-
exports["default"] = _default;
|
|
246
|
+
var _default = exports.default = Main;
|
|
322
247
|
//# sourceMappingURL=main.js.map
|