@pie-element/math-inline 7.14.1 → 7.14.2-next.1
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/package.json +1 -1
- package/controller/package.json +1 -1
- package/package.json +3 -3
- package/configure/lib/configure.js +0 -262
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/defaults.js +0 -176
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/general-config-block.js +0 -653
- package/configure/lib/general-config-block.js.map +0 -1
- package/configure/lib/index.js +0 -201
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/response.js +0 -431
- package/configure/lib/response.js.map +0 -1
- package/configure/lib/utils.js +0 -46
- package/configure/lib/utils.js.map +0 -1
- package/controller/lib/defaults.js +0 -34
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -437
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -12
- package/controller/lib/utils.js.map +0 -1
- package/lib/index.js +0 -130
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -947
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -133
- package/lib/print.js.map +0 -1
- package/lib/simple-question-block.js +0 -195
- package/lib/simple-question-block.js.map +0 -1
- package/lib/utils.js +0 -12
- package/lib/utils.js.map +0 -1
- package/module/configure.js +0 -16629
- package/module/controller.js +0 -4563
- package/module/demo.js +0 -66
- package/module/element.js +0 -12765
- package/module/index.html +0 -21
- package/module/manifest.json +0 -14
- package/module/print-demo.js +0 -104
- package/module/print.html +0 -18
- package/module/print.js +0 -12514
package/configure/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@material-ui/icons": "^3.0.1",
|
|
12
12
|
"@pie-framework/mathquill": "^1.1.3",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
|
-
"@pie-lib/pie-toolbox": "1.13.
|
|
14
|
+
"@pie-lib/pie-toolbox": "1.13.2-next.21",
|
|
15
15
|
"classnames": "^2.2.5",
|
|
16
16
|
"debug": "^3.1.0",
|
|
17
17
|
"prop-types": "^15.6.2",
|
package/controller/package.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "7.14.1",
|
|
7
|
+
"version": "7.14.2-next.1+94a3df859",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"description": "",
|
|
10
10
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@material-ui/core": "^3.9.2",
|
|
15
15
|
"@pie-framework/mathquill": "^1.1.3",
|
|
16
16
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
17
|
-
"@pie-lib/pie-toolbox": "1.13.
|
|
17
|
+
"@pie-lib/pie-toolbox": "1.13.2-next.21",
|
|
18
18
|
"classnames": "^2.2.5",
|
|
19
19
|
"debug": "^4.1.1",
|
|
20
20
|
"lodash": "^4.17.10",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "94a3df859268430085398dafb638d1cd1986dee8",
|
|
28
28
|
"module": "src/index.js",
|
|
29
29
|
"exports": {
|
|
30
30
|
".": "./src/index.js",
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.Configure = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _styles = require("@material-ui/core/styles");
|
|
27
|
-
|
|
28
|
-
var _configUi = require("@pie-lib/pie-toolbox/config-ui");
|
|
29
|
-
|
|
30
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
31
|
-
|
|
32
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
33
|
-
|
|
34
|
-
var _editableHtml = require("@pie-lib/pie-toolbox/editable-html");
|
|
35
|
-
|
|
36
|
-
var _generalConfigBlock = _interopRequireDefault(require("./general-config-block"));
|
|
37
|
-
|
|
38
|
-
var _utils = require("./utils");
|
|
39
|
-
|
|
40
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
41
|
-
|
|
42
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
|
-
|
|
44
|
-
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); }; }
|
|
45
|
-
|
|
46
|
-
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; } }
|
|
47
|
-
|
|
48
|
-
var log = (0, _debug["default"])('@pie-element:math-inline:configure');
|
|
49
|
-
var Panel = _configUi.settings.Panel,
|
|
50
|
-
toggle = _configUi.settings.toggle,
|
|
51
|
-
radio = _configUi.settings.radio,
|
|
52
|
-
dropdown = _configUi.settings.dropdown;
|
|
53
|
-
|
|
54
|
-
var styles = function styles(theme) {
|
|
55
|
-
return {
|
|
56
|
-
promptHolder: {
|
|
57
|
-
width: '100%',
|
|
58
|
-
paddingTop: theme.spacing.unit * 2,
|
|
59
|
-
marginBottom: theme.spacing.unit * 2
|
|
60
|
-
},
|
|
61
|
-
errorText: {
|
|
62
|
-
fontSize: theme.typography.fontSize - 2,
|
|
63
|
-
color: theme.palette.error.main,
|
|
64
|
-
paddingTop: theme.spacing.unit
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var Configure = /*#__PURE__*/function (_React$Component) {
|
|
70
|
-
(0, _inherits2["default"])(Configure, _React$Component);
|
|
71
|
-
|
|
72
|
-
var _super = _createSuper(Configure);
|
|
73
|
-
|
|
74
|
-
function Configure() {
|
|
75
|
-
var _this;
|
|
76
|
-
|
|
77
|
-
(0, _classCallCheck2["default"])(this, Configure);
|
|
78
|
-
|
|
79
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
80
|
-
args[_key] = arguments[_key];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
84
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (model) {
|
|
85
|
-
_this.props.onModelChanged(model);
|
|
86
|
-
});
|
|
87
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeTeacherInstructions", function (teacherInstructions) {
|
|
88
|
-
_this.props.onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
|
|
89
|
-
teacherInstructions: teacherInstructions
|
|
90
|
-
}));
|
|
91
|
-
});
|
|
92
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFeedbackChange", function (feedback) {
|
|
93
|
-
var _this$props = _this.props,
|
|
94
|
-
model = _this$props.model,
|
|
95
|
-
onModelChanged = _this$props.onModelChanged;
|
|
96
|
-
model.feedback = feedback;
|
|
97
|
-
onModelChanged(model);
|
|
98
|
-
});
|
|
99
|
-
return _this;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
(0, _createClass2["default"])(Configure, [{
|
|
103
|
-
key: "render",
|
|
104
|
-
value: function render() {
|
|
105
|
-
var _this$props2 = this.props,
|
|
106
|
-
classes = _this$props2.classes,
|
|
107
|
-
model = _this$props2.model,
|
|
108
|
-
imageSupport = _this$props2.imageSupport,
|
|
109
|
-
onModelChanged = _this$props2.onModelChanged,
|
|
110
|
-
configuration = _this$props2.configuration,
|
|
111
|
-
onConfigurationChanged = _this$props2.onConfigurationChanged,
|
|
112
|
-
uploadSoundSupport = _this$props2.uploadSoundSupport;
|
|
113
|
-
|
|
114
|
-
var _ref = configuration || {},
|
|
115
|
-
_ref$allowTrailingZer = _ref.allowTrailingZeros,
|
|
116
|
-
allowTrailingZeros = _ref$allowTrailingZer === void 0 ? {} : _ref$allowTrailingZer,
|
|
117
|
-
_ref$baseInputConfigu = _ref.baseInputConfiguration,
|
|
118
|
-
baseInputConfiguration = _ref$baseInputConfigu === void 0 ? {} : _ref$baseInputConfigu,
|
|
119
|
-
_ref$contentDimension = _ref.contentDimensions,
|
|
120
|
-
contentDimensions = _ref$contentDimension === void 0 ? {} : _ref$contentDimension,
|
|
121
|
-
_ref$feedback = _ref.feedback,
|
|
122
|
-
feedback = _ref$feedback === void 0 ? {} : _ref$feedback,
|
|
123
|
-
_ref$ignoreOrder = _ref.ignoreOrder,
|
|
124
|
-
ignoreOrder = _ref$ignoreOrder === void 0 ? {} : _ref$ignoreOrder,
|
|
125
|
-
_ref$maxImageWidth = _ref.maxImageWidth,
|
|
126
|
-
maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
|
|
127
|
-
_ref$maxImageHeight = _ref.maxImageHeight,
|
|
128
|
-
maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight,
|
|
129
|
-
_ref$prompt = _ref.prompt,
|
|
130
|
-
prompt = _ref$prompt === void 0 ? {} : _ref$prompt,
|
|
131
|
-
_ref$rationale = _ref.rationale,
|
|
132
|
-
rationale = _ref$rationale === void 0 ? {} : _ref$rationale,
|
|
133
|
-
_ref$responseType = _ref.responseType,
|
|
134
|
-
responseType = _ref$responseType === void 0 ? {} : _ref$responseType,
|
|
135
|
-
_ref$scoringType = _ref.scoringType,
|
|
136
|
-
scoringType = _ref$scoringType === void 0 ? {} : _ref$scoringType,
|
|
137
|
-
settingsPanelDisabled = _ref.settingsPanelDisabled,
|
|
138
|
-
_ref$spellCheck = _ref.spellCheck,
|
|
139
|
-
spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
|
|
140
|
-
_ref$studentInstructi = _ref.studentInstructions,
|
|
141
|
-
studentInstructions = _ref$studentInstructi === void 0 ? {} : _ref$studentInstructi,
|
|
142
|
-
_ref$teacherInstructi = _ref.teacherInstructions,
|
|
143
|
-
teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
|
|
144
|
-
_ref$withRubric = _ref.withRubric,
|
|
145
|
-
withRubric = _ref$withRubric === void 0 ? {} : _ref$withRubric,
|
|
146
|
-
_ref$mathMlOptions = _ref.mathMlOptions,
|
|
147
|
-
mathMlOptions = _ref$mathMlOptions === void 0 ? {} : _ref$mathMlOptions,
|
|
148
|
-
_ref$language = _ref.language,
|
|
149
|
-
language = _ref$language === void 0 ? {} : _ref$language,
|
|
150
|
-
_ref$languageChoices = _ref.languageChoices,
|
|
151
|
-
languageChoices = _ref$languageChoices === void 0 ? {} : _ref$languageChoices;
|
|
152
|
-
|
|
153
|
-
var _ref2 = model || {},
|
|
154
|
-
_ref2$errors = _ref2.errors,
|
|
155
|
-
errors = _ref2$errors === void 0 ? {} : _ref2$errors,
|
|
156
|
-
feedbackEnabled = _ref2.feedbackEnabled,
|
|
157
|
-
promptEnabled = _ref2.promptEnabled,
|
|
158
|
-
rationaleEnabled = _ref2.rationaleEnabled,
|
|
159
|
-
spellCheckEnabled = _ref2.spellCheckEnabled,
|
|
160
|
-
teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
|
|
161
|
-
toolbarEditorPosition = _ref2.toolbarEditorPosition;
|
|
162
|
-
|
|
163
|
-
var teacherInstructionsError = errors.teacherInstructions;
|
|
164
|
-
log('[render] model', model);
|
|
165
|
-
var toolbarOpts = {
|
|
166
|
-
position: toolbarEditorPosition === 'top' ? 'top' : 'bottom'
|
|
167
|
-
};
|
|
168
|
-
var defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
|
|
169
|
-
var defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
|
|
170
|
-
var panelSettings = {
|
|
171
|
-
responseType: responseType.settings && radio(responseType.label, [_utils.ResponseTypes.simple, _utils.ResponseTypes.advanced]),
|
|
172
|
-
feedbackEnabled: feedback.settings && toggle(feedback.label),
|
|
173
|
-
promptEnabled: prompt.settings && toggle(prompt.label),
|
|
174
|
-
'language.enabled': language.settings && toggle(language.label, true),
|
|
175
|
-
language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options)
|
|
176
|
-
};
|
|
177
|
-
var panelProperties = {
|
|
178
|
-
teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
|
|
179
|
-
studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),
|
|
180
|
-
rationaleEnabled: rationale.settings && toggle(rationale.label),
|
|
181
|
-
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
|
|
182
|
-
scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),
|
|
183
|
-
'ignoreOrder.enabled': ignoreOrder.settings && toggle(ignoreOrder.label),
|
|
184
|
-
'allowTrailingZeros.enabled': allowTrailingZeros.settings && toggle(allowTrailingZeros.label),
|
|
185
|
-
rubricEnabled: (withRubric === null || withRubric === void 0 ? void 0 : withRubric.settings) && toggle(withRubric === null || withRubric === void 0 ? void 0 : withRubric.label)
|
|
186
|
-
};
|
|
187
|
-
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
188
|
-
dimensions: contentDimensions,
|
|
189
|
-
hideSettings: settingsPanelDisabled,
|
|
190
|
-
settings: /*#__PURE__*/_react["default"].createElement(Panel, {
|
|
191
|
-
model: model,
|
|
192
|
-
configuration: configuration,
|
|
193
|
-
onChangeModel: function onChangeModel(model) {
|
|
194
|
-
return onModelChanged(model);
|
|
195
|
-
},
|
|
196
|
-
onChangeConfiguration: function onChangeConfiguration(config) {
|
|
197
|
-
return onConfigurationChanged(config);
|
|
198
|
-
},
|
|
199
|
-
groups: {
|
|
200
|
-
Settings: panelSettings,
|
|
201
|
-
Properties: panelProperties
|
|
202
|
-
}
|
|
203
|
-
})
|
|
204
|
-
}, teacherInstructionsEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
|
|
205
|
-
label: teacherInstructions.label,
|
|
206
|
-
className: classes.promptHolder
|
|
207
|
-
}, /*#__PURE__*/_react["default"].createElement(_editableHtml.EditableHtml, {
|
|
208
|
-
className: classes.prompt,
|
|
209
|
-
markup: model.teacherInstructions || '',
|
|
210
|
-
onChange: this.changeTeacherInstructions,
|
|
211
|
-
imageSupport: imageSupport,
|
|
212
|
-
nonEmpty: false,
|
|
213
|
-
error: teacherInstructionsError,
|
|
214
|
-
toolbarOpts: toolbarOpts,
|
|
215
|
-
pluginProps: (0, _utils.getPluginProps)(teacherInstructions === null || teacherInstructions === void 0 ? void 0 : teacherInstructions.inputConfiguration, baseInputConfiguration),
|
|
216
|
-
spellCheck: spellCheckEnabled,
|
|
217
|
-
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
218
|
-
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
219
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
220
|
-
languageCharactersProps: [{
|
|
221
|
-
language: 'spanish'
|
|
222
|
-
}, {
|
|
223
|
-
language: 'special'
|
|
224
|
-
}],
|
|
225
|
-
mathMlOptions: mathMlOptions
|
|
226
|
-
}), teacherInstructionsError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
227
|
-
className: classes.errorText
|
|
228
|
-
}, teacherInstructionsError)), /*#__PURE__*/_react["default"].createElement(_generalConfigBlock["default"], {
|
|
229
|
-
imageSupport: imageSupport,
|
|
230
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
231
|
-
model: model,
|
|
232
|
-
configuration: configuration,
|
|
233
|
-
onChange: this.onChange,
|
|
234
|
-
rationaleEnabled: rationaleEnabled,
|
|
235
|
-
promptEnabled: promptEnabled,
|
|
236
|
-
toolbarOpts: toolbarOpts,
|
|
237
|
-
spellCheck: spellCheckEnabled
|
|
238
|
-
}), feedbackEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.FeedbackConfig, {
|
|
239
|
-
feedback: model.feedback,
|
|
240
|
-
onChange: this.onFeedbackChange,
|
|
241
|
-
toolbarOpts: toolbarOpts
|
|
242
|
-
}));
|
|
243
|
-
}
|
|
244
|
-
}]);
|
|
245
|
-
return Configure;
|
|
246
|
-
}(_react["default"].Component);
|
|
247
|
-
|
|
248
|
-
exports.Configure = Configure;
|
|
249
|
-
(0, _defineProperty2["default"])(Configure, "propTypes", {
|
|
250
|
-
onModelChanged: _propTypes["default"].func,
|
|
251
|
-
onConfigurationChanged: _propTypes["default"].func,
|
|
252
|
-
classes: _propTypes["default"].object,
|
|
253
|
-
model: _propTypes["default"].object.isRequired,
|
|
254
|
-
configuration: _propTypes["default"].object.isRequired,
|
|
255
|
-
imageSupport: _propTypes["default"].object,
|
|
256
|
-
uploadSoundSupport: _propTypes["default"].object
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
var _default = (0, _styles.withStyles)(styles)(Configure);
|
|
260
|
-
|
|
261
|
-
exports["default"] = _default;
|
|
262
|
-
//# sourceMappingURL=configure.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configure.jsx"],"names":["log","Panel","settings","toggle","radio","dropdown","styles","theme","promptHolder","width","paddingTop","spacing","unit","marginBottom","errorText","fontSize","typography","color","palette","error","main","Configure","model","props","onModelChanged","teacherInstructions","feedback","classes","imageSupport","configuration","onConfigurationChanged","uploadSoundSupport","allowTrailingZeros","baseInputConfiguration","contentDimensions","ignoreOrder","maxImageWidth","maxImageHeight","prompt","rationale","responseType","scoringType","settingsPanelDisabled","spellCheck","studentInstructions","withRubric","mathMlOptions","language","languageChoices","errors","feedbackEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","teacherInstructionsError","toolbarOpts","position","defaultImageMaxWidth","defaultImageMaxHeight","panelSettings","label","ResponseTypes","simple","advanced","enabled","options","panelProperties","studentInstructionsEnabled","rubricEnabled","config","Settings","Properties","changeTeacherInstructions","inputConfiguration","onChange","onFeedbackChange","React","Component","PropTypes","func","object","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,oCAAN,CAAZ;AACA,IAAQC,KAAR,GAA2CC,kBAA3C,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA2CD,kBAA3C,CAAeC,MAAf;AAAA,IAAuBC,KAAvB,GAA2CF,kBAA3C,CAAuBE,KAAvB;AAAA,IAA8BC,QAA9B,GAA2CH,kBAA3C,CAA8BG,QAA9B;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,UAAU,EAAEH,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB,CAFrB;AAGZC,MAAAA,YAAY,EAAEN,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB;AAHvB,KADW;AAMzBE,IAAAA,SAAS,EAAE;AACTC,MAAAA,QAAQ,EAAER,KAAK,CAACS,UAAN,CAAiBD,QAAjB,GAA4B,CAD7B;AAETE,MAAAA,KAAK,EAAEV,KAAK,CAACW,OAAN,CAAcC,KAAd,CAAoBC,IAFlB;AAGTV,MAAAA,UAAU,EAAEH,KAAK,CAACI,OAAN,CAAcC;AAHjB;AANc,GAAZ;AAAA,CAAf;;IAaaS,S;;;;;;;;;;;;;;;iGAWA,UAACC,KAAD,EAAW;AACpB,YAAKC,KAAL,CAAWC,cAAX,CAA0BF,KAA1B;AACD,K;kHAE2B,UAACG,mBAAD,EAAyB;AACnD,YAAKF,KAAL,CAAWC,cAAX,iCACK,MAAKD,KAAL,CAAWD,KADhB;AAEEG,QAAAA,mBAAmB,EAAnBA;AAFF;AAID,K;yGAEkB,UAACC,QAAD,EAAc;AAC/B,wBAA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BAAkB,EAAEiD,sBAAUE;AAPb,C;;eAqJN,wBAAW5E,MAAX,EAAmBe,SAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { FeedbackConfig, settings, layout, InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport PropTypes from 'prop-types';\nimport debug from 'debug';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport GeneralConfigBlock from './general-config-block';\nimport { getPluginProps, ResponseTypes } from './utils';\n\nconst log = debug('@pie-element:math-inline:configure');\nconst { Panel, toggle, radio, dropdown } = settings;\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n});\n\nexport class Configure extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n };\n\n onChange = (model) => {\n this.props.onModelChanged(model);\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions,\n });\n };\n\n onFeedbackChange = (feedback) => {\n const { model, onModelChanged } = this.props;\n model.feedback = feedback;\n onModelChanged(model);\n };\n\n render() {\n const { classes, model, imageSupport, onModelChanged, configuration, onConfigurationChanged, uploadSoundSupport } =\n this.props;\n const {\n allowTrailingZeros = {},\n baseInputConfiguration = {},\n contentDimensions = {},\n feedback = {},\n ignoreOrder = {},\n maxImageWidth = {},\n maxImageHeight = {},\n prompt = {},\n rationale = {},\n responseType = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n } = configuration || {};\n const {\n errors = {},\n feedbackEnabled,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n\n const { teacherInstructions: teacherInstructionsError } = errors;\n\n log('[render] model', model);\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const panelSettings = {\n responseType: responseType.settings && radio(responseType.label, [ResponseTypes.simple, ResponseTypes.advanced]),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n 'ignoreOrder.enabled': ignoreOrder.settings && toggle(ignoreOrder.label),\n 'allowTrailingZeros.enabled': allowTrailingZeros.settings && toggle(allowTrailingZeros.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n error={teacherInstructionsError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}\n </InputContainer>\n )}\n\n <GeneralConfigBlock\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n model={model}\n configuration={configuration}\n onChange={this.onChange}\n rationaleEnabled={rationaleEnabled}\n promptEnabled={promptEnabled}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n\n {feedbackEnabled && (\n <FeedbackConfig feedback={model.feedback} onChange={this.onFeedbackChange} toolbarOpts={toolbarOpts} />\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Configure);\n"],"file":"configure.js"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _utils = require("./utils");
|
|
9
|
-
|
|
10
|
-
/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
|
|
11
|
-
* functionalities are not defined yet - the value for those can belong to
|
|
12
|
-
* model or to configure
|
|
13
|
-
*/
|
|
14
|
-
var _default = {
|
|
15
|
-
model: {
|
|
16
|
-
partialScoring: true,
|
|
17
|
-
responseType: _utils.ResponseTypes.advanced,
|
|
18
|
-
element: 'math-inline',
|
|
19
|
-
feedback: {
|
|
20
|
-
correct: {
|
|
21
|
-
"default": 'Correct',
|
|
22
|
-
type: 'none'
|
|
23
|
-
},
|
|
24
|
-
incorrect: {
|
|
25
|
-
"default": 'Incorrect',
|
|
26
|
-
type: 'none'
|
|
27
|
-
},
|
|
28
|
-
partial: {
|
|
29
|
-
"default": 'Nearly',
|
|
30
|
-
type: 'none'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
equationEditor: '8',
|
|
34
|
-
expression: '',
|
|
35
|
-
rationale: 'Rationale goes here.',
|
|
36
|
-
prompt: '',
|
|
37
|
-
responses: [],
|
|
38
|
-
customKeys: [],
|
|
39
|
-
scoringType: 'auto',
|
|
40
|
-
feedbackEnabled: false,
|
|
41
|
-
promptEnabled: true,
|
|
42
|
-
rationaleEnabled: true,
|
|
43
|
-
teacherInstructionsEnabled: true,
|
|
44
|
-
studentInstructionsEnabled: true,
|
|
45
|
-
toolbarEditorPosition: 'bottom',
|
|
46
|
-
validationDefault: 'literal',
|
|
47
|
-
ignoreOrderDefault: false,
|
|
48
|
-
allowTrailingZerosDefault: false
|
|
49
|
-
},
|
|
50
|
-
configuration: {
|
|
51
|
-
baseInputConfiguration: {
|
|
52
|
-
audio: {
|
|
53
|
-
disabled: false
|
|
54
|
-
},
|
|
55
|
-
video: {
|
|
56
|
-
disabled: false
|
|
57
|
-
},
|
|
58
|
-
image: {
|
|
59
|
-
disabled: false
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
prompt: {
|
|
63
|
-
settings: true,
|
|
64
|
-
label: 'Prompt',
|
|
65
|
-
inputConfiguration: {
|
|
66
|
-
audio: {
|
|
67
|
-
disabled: false
|
|
68
|
-
},
|
|
69
|
-
video: {
|
|
70
|
-
disabled: false
|
|
71
|
-
},
|
|
72
|
-
image: {
|
|
73
|
-
disabled: false
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
required: false
|
|
77
|
-
},
|
|
78
|
-
feedback: {
|
|
79
|
-
settings: true,
|
|
80
|
-
label: 'Feedback'
|
|
81
|
-
},
|
|
82
|
-
responseType: {
|
|
83
|
-
settings: true,
|
|
84
|
-
label: 'Response type'
|
|
85
|
-
},
|
|
86
|
-
rationale: {
|
|
87
|
-
settings: true,
|
|
88
|
-
label: 'Rationale',
|
|
89
|
-
inputConfiguration: {
|
|
90
|
-
audio: {
|
|
91
|
-
disabled: false
|
|
92
|
-
},
|
|
93
|
-
video: {
|
|
94
|
-
disabled: false
|
|
95
|
-
},
|
|
96
|
-
image: {
|
|
97
|
-
disabled: false
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
required: false
|
|
101
|
-
},
|
|
102
|
-
settingsPanelDisabled: false,
|
|
103
|
-
spellCheck: {
|
|
104
|
-
label: 'Spellcheck',
|
|
105
|
-
settings: false,
|
|
106
|
-
enabled: true
|
|
107
|
-
},
|
|
108
|
-
scoringType: {
|
|
109
|
-
settings: false,
|
|
110
|
-
label: 'Scoring Type'
|
|
111
|
-
},
|
|
112
|
-
studentInstructions: {
|
|
113
|
-
settings: false,
|
|
114
|
-
label: 'Student Instructions'
|
|
115
|
-
},
|
|
116
|
-
teacherInstructions: {
|
|
117
|
-
settings: true,
|
|
118
|
-
label: 'Teacher Instructions',
|
|
119
|
-
inputConfiguration: {
|
|
120
|
-
audio: {
|
|
121
|
-
disabled: false
|
|
122
|
-
},
|
|
123
|
-
video: {
|
|
124
|
-
disabled: false
|
|
125
|
-
},
|
|
126
|
-
image: {
|
|
127
|
-
disabled: false
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
required: false
|
|
131
|
-
},
|
|
132
|
-
partialScoring: {
|
|
133
|
-
settings: false,
|
|
134
|
-
label: 'Allow Partial Scoring'
|
|
135
|
-
},
|
|
136
|
-
ignoreOrder: {
|
|
137
|
-
settings: false,
|
|
138
|
-
label: 'Ignore Order',
|
|
139
|
-
enabled: true
|
|
140
|
-
},
|
|
141
|
-
allowTrailingZeros: {
|
|
142
|
-
settings: false,
|
|
143
|
-
label: 'Allow Trailing Zeros',
|
|
144
|
-
enabled: true
|
|
145
|
-
},
|
|
146
|
-
maxImageWidth: {
|
|
147
|
-
teacherInstructions: 300,
|
|
148
|
-
prompt: 300,
|
|
149
|
-
rationale: 300
|
|
150
|
-
},
|
|
151
|
-
maxImageHeight: {
|
|
152
|
-
teacherInstructions: 300,
|
|
153
|
-
prompt: 300,
|
|
154
|
-
rationale: 300
|
|
155
|
-
},
|
|
156
|
-
withRubric: {
|
|
157
|
-
settings: false,
|
|
158
|
-
label: 'Add Rubric'
|
|
159
|
-
},
|
|
160
|
-
mathMlOptions: {
|
|
161
|
-
mmlOutput: false,
|
|
162
|
-
mmlEditing: false
|
|
163
|
-
},
|
|
164
|
-
language: {
|
|
165
|
-
settings: false,
|
|
166
|
-
label: 'Specify Language',
|
|
167
|
-
enabled: false
|
|
168
|
-
},
|
|
169
|
-
languageChoices: {
|
|
170
|
-
label: 'Language Choices',
|
|
171
|
-
options: []
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
exports["default"] = _default;
|
|
176
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","partialScoring","responseType","ResponseTypes","advanced","element","feedback","correct","type","incorrect","partial","equationEditor","expression","rationale","prompt","responses","customKeys","scoringType","feedbackEnabled","promptEnabled","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","validationDefault","ignoreOrderDefault","allowTrailingZerosDefault","configuration","baseInputConfiguration","audio","disabled","video","image","settings","label","inputConfiguration","required","settingsPanelDisabled","spellCheck","enabled","studentInstructions","teacherInstructions","ignoreOrder","allowTrailingZeros","maxImageWidth","maxImageHeight","withRubric","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"mappings":";;;;;;;AAAA;;AAEA;AACA;AACA;AACA;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,cAAc,EAAE,IADX;AAELC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AAE;AAFC,KAtFF;AA0FbC,IAAAA,QAAQ,EAAE;AACRjB,MAAAA,QAAQ,EAAE,KADF;AAERC,MAAAA,KAAK,EAAE,kBAFC;AAGRK,MAAAA,OAAO,EAAE;AAHD,KA1FG;AA+FbY,IAAAA,eAAe,EAAE;AACfjB,MAAAA,KAAK,EAAE,kBADQ;AAEfkB,MAAAA,OAAO,EAAE;AAFM;AA/FJ;AApCF,C","sourcesContent":["import { ResponseTypes } from './utils';\n\n/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType\n * functionalities are not defined yet - the value for those can belong to\n * model or to configure\n */\n\nexport default {\n model: {\n partialScoring: true,\n responseType: ResponseTypes.advanced,\n element: 'math-inline',\n feedback: {\n correct: {\n default: 'Correct',\n type: 'none',\n },\n incorrect: {\n default: 'Incorrect',\n type: 'none',\n },\n partial: {\n default: 'Nearly',\n type: 'none',\n },\n },\n equationEditor: '8',\n expression: '',\n rationale: 'Rationale goes here.',\n prompt: '',\n responses: [],\n customKeys: [],\n scoringType: 'auto',\n feedbackEnabled: false,\n promptEnabled: true,\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n validationDefault: 'literal',\n ignoreOrderDefault: false,\n allowTrailingZerosDefault: false,\n },\n configuration: {\n baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n },\n responseType: {\n settings: true,\n label: 'Response type',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n ignoreOrder: {\n settings: false,\n label: 'Ignore Order',\n enabled: true,\n },\n allowTrailingZeros: {\n settings: false,\n label: 'Allow Trailing Zeros',\n enabled: true,\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"file":"defaults.js"}
|