@pie-element/math-inline 11.0.5-esm.0 → 11.1.0-next.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/CHANGELOG.md +70 -0
- package/configure/CHANGELOG.md +69 -0
- package/configure/lib/configure.js +162 -240
- package/configure/lib/configure.js.map +1 -1
- package/configure/lib/defaults.js +8 -8
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/general-config-block.js +447 -564
- package/configure/lib/general-config-block.js.map +1 -1
- package/configure/lib/index.js +111 -176
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/response.js +330 -388
- package/configure/lib/response.js.map +1 -1
- package/configure/lib/utils.js +15 -30
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +14 -12
- package/controller/CHANGELOG.md +49 -0
- package/controller/lib/defaults.js +5 -8
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +189 -278
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +1 -2
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +7 -7
- package/lib/index.js +72 -125
- package/lib/index.js.map +1 -1
- package/lib/main.js +784 -889
- package/lib/main.js.map +1 -1
- package/lib/print.js +43 -84
- package/lib/print.js.map +1 -1
- package/lib/simple-question-block.js +125 -162
- package/lib/simple-question-block.js.map +1 -1
- package/lib/utils.js +1 -2
- package/lib/utils.js.map +1 -1
- package/module/configure.js +1 -1
- package/module/controller.js +2319 -2930
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +7 -3
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +21 -33
- package/esm/configure.css +0 -847
- package/esm/configure.js +0 -1769
- package/esm/configure.js.map +0 -1
- package/esm/controller.css +0 -847
- package/esm/controller.js +0 -416
- package/esm/controller.js.map +0 -1
- package/esm/element.css +0 -847
- package/esm/element.js +0 -1476
- package/esm/element.js.map +0 -1
- package/esm/print.css +0 -847
- package/esm/print.js +0 -1288
- package/esm/print.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,76 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@10.3.1...@pie-element/math-inline@10.3.2) (2025-10-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* bump libs PD-5265 ([184a978](https://github.com/pie-framework/pie-elements/commit/184a978f57a2a84dc6ba87c1eba0b92d5cdd9eae))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [10.3.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@10.2.1...@pie-element/math-inline@10.3.1) (2025-10-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* bump pie-lib versions and pslb module versions ([393d39f](https://github.com/pie-framework/pie-elements/commit/393d39fb850ad055568f4d20464213e9043f208f))
|
|
23
|
+
* remove deprecated ReactDOM.findDOMNode from math-inline ([b6267be](https://github.com/pie-framework/pie-elements/commit/b6267be95153d5f6d9f4b46ed431859d6e99b7d5))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# [10.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@10.2.0...@pie-element/math-inline@10.3.0) (2025-10-15)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* bump libs ([2616ab2](https://github.com/pie-framework/pie-elements/commit/2616ab24f776f4df02302f5855c381ee52527665))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [10.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@10.2.0...@pie-element/math-inline@10.2.1) (2025-10-14)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* bump libs ([2616ab2](https://github.com/pie-framework/pie-elements/commit/2616ab24f776f4df02302f5855c381ee52527665))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# [10.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@10.0.0...@pie-element/math-inline@10.2.0) (2025-10-10)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* conclude merge with develop ([8388078](https://github.com/pie-framework/pie-elements/commit/8388078124486bdab0def8dbe5e442117514c05a))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* allow elemnts to use same fontFamily set in common ui container to avoid incons PD-5199 ([8b1742e](https://github.com/pie-framework/pie-elements/commit/8b1742e06c9befe1e81bf6a76c72448c91b2429b))
|
|
62
|
+
* update libs PD-5208, PD-5211, PD-5199, PD-5218, PD-5217 ([da327fa](https://github.com/pie-framework/pie-elements/commit/da327fa501f6e9eff1c0b30b5ef092426a91f78b))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# [10.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@9.0.0...@pie-element/math-inline@10.1.0) (2025-10-07)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @pie-element/math-inline
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
6
76
|
# [10.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@8.8.11...@pie-element/math-inline@10.0.0) (2025-10-02)
|
|
7
77
|
|
|
8
78
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,75 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.3.1...@pie-element/math-inline-configure@9.3.2) (2025-10-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* bump libs PD-5265 ([184a978](https://github.com/pie-framework/pie-elements/commit/184a978f57a2a84dc6ba87c1eba0b92d5cdd9eae))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [9.3.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.2.1...@pie-element/math-inline-configure@9.3.1) (2025-10-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* bump pie-lib versions and pslb module versions ([393d39f](https://github.com/pie-framework/pie-elements/commit/393d39fb850ad055568f4d20464213e9043f208f))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [9.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.2.0...@pie-element/math-inline-configure@9.3.0) (2025-10-15)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* bump libs ([2616ab2](https://github.com/pie-framework/pie-elements/commit/2616ab24f776f4df02302f5855c381ee52527665))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [9.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.2.0...@pie-element/math-inline-configure@9.2.1) (2025-10-14)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* bump libs ([2616ab2](https://github.com/pie-framework/pie-elements/commit/2616ab24f776f4df02302f5855c381ee52527665))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# [9.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.0.1...@pie-element/math-inline-configure@9.2.0) (2025-10-10)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Bug Fixes
|
|
54
|
+
|
|
55
|
+
* conclude merge with develop ([8388078](https://github.com/pie-framework/pie-elements/commit/8388078124486bdab0def8dbe5e442117514c05a))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
* allow elemnts to use same fontFamily set in common ui container to avoid incons PD-5199 ([8b1742e](https://github.com/pie-framework/pie-elements/commit/8b1742e06c9befe1e81bf6a76c72448c91b2429b))
|
|
61
|
+
* update libs PD-5208, PD-5211, PD-5199, PD-5218, PD-5217 ([da327fa](https://github.com/pie-framework/pie-elements/commit/da327fa501f6e9eff1c0b30b5ef092426a91f78b))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# [9.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.0.0...@pie-element/math-inline-configure@9.1.0) (2025-10-07)
|
|
68
|
+
|
|
69
|
+
**Note:** Version bump only for package @pie-element/math-inline-configure
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
6
75
|
## [9.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@8.7.0...@pie-element/math-inline-configure@9.0.1) (2025-10-02)
|
|
7
76
|
|
|
8
77
|
**Note:** Version bump only for package @pie-element/math-inline-configure
|
|
@@ -1,264 +1,186 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
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
|
-
|
|
7
|
+
exports.default = exports.Configure = void 0;
|
|
22
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
9
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _styles = require("@material-ui/core/styles");
|
|
27
|
-
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
28
11
|
var _configUi = require("@pie-lib/config-ui");
|
|
29
|
-
|
|
30
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
31
|
-
|
|
32
13
|
var _debug = _interopRequireDefault(require("debug"));
|
|
33
|
-
|
|
34
|
-
var _editableHtml = _interopRequireDefault(require("@pie-lib/editable-html"));
|
|
35
|
-
|
|
14
|
+
var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
|
|
36
15
|
var _generalConfigBlock = _interopRequireDefault(require("./general-config-block"));
|
|
37
|
-
|
|
38
16
|
var _utils = require("./utils");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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);
|
|
17
|
+
const log = (0, _debug.default)('@pie-element:math-inline:configure');
|
|
18
|
+
const {
|
|
19
|
+
Panel,
|
|
20
|
+
toggle,
|
|
21
|
+
radio,
|
|
22
|
+
dropdown
|
|
23
|
+
} = _configUi.settings;
|
|
24
|
+
const PromptHolder = (0, _styles.styled)(_configUi.InputContainer)(({
|
|
25
|
+
theme
|
|
26
|
+
}) => ({
|
|
27
|
+
width: '100%',
|
|
28
|
+
paddingTop: theme.spacing(2),
|
|
29
|
+
marginBottom: theme.spacing(2)
|
|
30
|
+
}));
|
|
31
|
+
const ErrorText = (0, _styles.styled)('div')(({
|
|
32
|
+
theme
|
|
33
|
+
}) => ({
|
|
34
|
+
fontSize: theme.typography.fontSize - 2,
|
|
35
|
+
color: theme.palette.error.main,
|
|
36
|
+
paddingTop: theme.spacing(1)
|
|
37
|
+
}));
|
|
38
|
+
class Configure extends _react.default.Component {
|
|
39
|
+
constructor(...args) {
|
|
40
|
+
super(...args);
|
|
41
|
+
(0, _defineProperty2.default)(this, "onChange", model => {
|
|
42
|
+
this.props.onModelChanged(model);
|
|
86
43
|
});
|
|
87
|
-
(0, _defineProperty2
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
44
|
+
(0, _defineProperty2.default)(this, "changeTeacherInstructions", teacherInstructions => {
|
|
45
|
+
this.props.onModelChanged({
|
|
46
|
+
...this.props.model,
|
|
47
|
+
teacherInstructions
|
|
48
|
+
});
|
|
91
49
|
});
|
|
92
|
-
(0, _defineProperty2
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
50
|
+
(0, _defineProperty2.default)(this, "onFeedbackChange", feedback => {
|
|
51
|
+
const {
|
|
52
|
+
model,
|
|
53
|
+
onModelChanged
|
|
54
|
+
} = this.props;
|
|
96
55
|
model.feedback = feedback;
|
|
97
56
|
onModelChanged(model);
|
|
98
57
|
});
|
|
99
|
-
return _this;
|
|
100
58
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
responseType: responseType.settings && radio(responseType.label, [_utils.ResponseTypes.simple, _utils.ResponseTypes.advanced]),
|
|
173
|
-
feedbackEnabled: feedback.settings && toggle(feedback.label),
|
|
174
|
-
promptEnabled: prompt.settings && toggle(prompt.label),
|
|
175
|
-
'language.enabled': language.settings && toggle(language.label, true),
|
|
176
|
-
language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options)
|
|
177
|
-
};
|
|
178
|
-
var panelProperties = {
|
|
179
|
-
teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
|
|
180
|
-
studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),
|
|
181
|
-
rationaleEnabled: rationale.settings && toggle(rationale.label),
|
|
182
|
-
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
|
|
183
|
-
scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),
|
|
184
|
-
'ignoreOrder.enabled': ignoreOrder.settings && toggle(ignoreOrder.label),
|
|
185
|
-
'allowTrailingZeros.enabled': allowTrailingZeros.settings && toggle(allowTrailingZeros.label),
|
|
186
|
-
rubricEnabled: (withRubric === null || withRubric === void 0 ? void 0 : withRubric.settings) && toggle(withRubric === null || withRubric === void 0 ? void 0 : withRubric.label)
|
|
187
|
-
};
|
|
188
|
-
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
189
|
-
extraCSSRules: extraCSSRules,
|
|
190
|
-
dimensions: contentDimensions,
|
|
191
|
-
hideSettings: settingsPanelDisabled,
|
|
192
|
-
settings: /*#__PURE__*/_react["default"].createElement(Panel, {
|
|
193
|
-
model: model,
|
|
194
|
-
configuration: configuration,
|
|
195
|
-
onChangeModel: function onChangeModel(model) {
|
|
196
|
-
return onModelChanged(model);
|
|
197
|
-
},
|
|
198
|
-
onChangeConfiguration: function onChangeConfiguration(config) {
|
|
199
|
-
return onConfigurationChanged(config);
|
|
200
|
-
},
|
|
201
|
-
groups: {
|
|
202
|
-
Settings: panelSettings,
|
|
203
|
-
Properties: panelProperties
|
|
204
|
-
}
|
|
205
|
-
})
|
|
206
|
-
}, teacherInstructionsEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
|
|
207
|
-
label: teacherInstructions.label,
|
|
208
|
-
className: classes.promptHolder
|
|
209
|
-
}, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
|
|
210
|
-
className: classes.prompt,
|
|
211
|
-
markup: model.teacherInstructions || '',
|
|
212
|
-
onChange: this.changeTeacherInstructions,
|
|
213
|
-
imageSupport: imageSupport,
|
|
214
|
-
nonEmpty: false,
|
|
215
|
-
error: teacherInstructionsError,
|
|
216
|
-
toolbarOpts: toolbarOpts,
|
|
217
|
-
pluginProps: (0, _utils.getPluginProps)(teacherInstructions === null || teacherInstructions === void 0 ? void 0 : teacherInstructions.inputConfiguration, baseInputConfiguration),
|
|
218
|
-
spellCheck: spellCheckEnabled,
|
|
219
|
-
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
220
|
-
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
221
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
222
|
-
languageCharactersProps: [{
|
|
223
|
-
language: 'spanish'
|
|
224
|
-
}, {
|
|
225
|
-
language: 'special'
|
|
226
|
-
}],
|
|
227
|
-
mathMlOptions: mathMlOptions
|
|
228
|
-
}), teacherInstructionsError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
|
-
className: classes.errorText
|
|
230
|
-
}, teacherInstructionsError)), /*#__PURE__*/_react["default"].createElement(_generalConfigBlock["default"], {
|
|
231
|
-
imageSupport: imageSupport,
|
|
232
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
59
|
+
render() {
|
|
60
|
+
const {
|
|
61
|
+
model,
|
|
62
|
+
imageSupport,
|
|
63
|
+
onModelChanged,
|
|
64
|
+
configuration,
|
|
65
|
+
onConfigurationChanged,
|
|
66
|
+
uploadSoundSupport
|
|
67
|
+
} = this.props;
|
|
68
|
+
const {
|
|
69
|
+
allowTrailingZeros = {},
|
|
70
|
+
baseInputConfiguration = {},
|
|
71
|
+
contentDimensions = {},
|
|
72
|
+
feedback = {},
|
|
73
|
+
ignoreOrder = {},
|
|
74
|
+
maxImageWidth = {},
|
|
75
|
+
maxImageHeight = {},
|
|
76
|
+
prompt = {},
|
|
77
|
+
rationale = {},
|
|
78
|
+
responseType = {},
|
|
79
|
+
scoringType = {},
|
|
80
|
+
settingsPanelDisabled,
|
|
81
|
+
spellCheck = {},
|
|
82
|
+
studentInstructions = {},
|
|
83
|
+
teacherInstructions = {},
|
|
84
|
+
withRubric = {},
|
|
85
|
+
mathMlOptions = {},
|
|
86
|
+
language = {},
|
|
87
|
+
languageChoices = {}
|
|
88
|
+
} = configuration || {};
|
|
89
|
+
const {
|
|
90
|
+
errors = {},
|
|
91
|
+
extraCSSRules,
|
|
92
|
+
feedbackEnabled,
|
|
93
|
+
promptEnabled,
|
|
94
|
+
rationaleEnabled,
|
|
95
|
+
spellCheckEnabled,
|
|
96
|
+
teacherInstructionsEnabled,
|
|
97
|
+
toolbarEditorPosition
|
|
98
|
+
} = model || {};
|
|
99
|
+
const {
|
|
100
|
+
teacherInstructions: teacherInstructionsError
|
|
101
|
+
} = errors;
|
|
102
|
+
log('[render] model', model);
|
|
103
|
+
const toolbarOpts = {
|
|
104
|
+
position: toolbarEditorPosition === 'top' ? 'top' : 'bottom'
|
|
105
|
+
};
|
|
106
|
+
const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
|
|
107
|
+
const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
|
|
108
|
+
const panelSettings = {
|
|
109
|
+
responseType: responseType.settings && radio(responseType.label, [_utils.ResponseTypes.simple, _utils.ResponseTypes.advanced]),
|
|
110
|
+
feedbackEnabled: feedback.settings && toggle(feedback.label),
|
|
111
|
+
promptEnabled: prompt.settings && toggle(prompt.label),
|
|
112
|
+
'language.enabled': language.settings && toggle(language.label, true),
|
|
113
|
+
language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options)
|
|
114
|
+
};
|
|
115
|
+
const panelProperties = {
|
|
116
|
+
teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
|
|
117
|
+
studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),
|
|
118
|
+
rationaleEnabled: rationale.settings && toggle(rationale.label),
|
|
119
|
+
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
|
|
120
|
+
scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),
|
|
121
|
+
'ignoreOrder.enabled': ignoreOrder.settings && toggle(ignoreOrder.label),
|
|
122
|
+
'allowTrailingZeros.enabled': allowTrailingZeros.settings && toggle(allowTrailingZeros.label),
|
|
123
|
+
rubricEnabled: withRubric?.settings && toggle(withRubric?.label)
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/_react.default.createElement(_configUi.layout.ConfigLayout, {
|
|
126
|
+
extraCSSRules: extraCSSRules,
|
|
127
|
+
dimensions: contentDimensions,
|
|
128
|
+
hideSettings: settingsPanelDisabled,
|
|
129
|
+
settings: /*#__PURE__*/_react.default.createElement(Panel, {
|
|
233
130
|
model: model,
|
|
234
131
|
configuration: configuration,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
132
|
+
onChangeModel: model => onModelChanged(model),
|
|
133
|
+
onChangeConfiguration: config => onConfigurationChanged(config),
|
|
134
|
+
groups: {
|
|
135
|
+
Settings: panelSettings,
|
|
136
|
+
Properties: panelProperties
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
}, teacherInstructionsEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
|
|
140
|
+
label: teacherInstructions.label
|
|
141
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
142
|
+
markup: model.teacherInstructions || '',
|
|
143
|
+
onChange: this.changeTeacherInstructions,
|
|
144
|
+
imageSupport: imageSupport,
|
|
145
|
+
nonEmpty: false,
|
|
146
|
+
error: teacherInstructionsError,
|
|
147
|
+
toolbarOpts: toolbarOpts,
|
|
148
|
+
pluginProps: (0, _utils.getPluginProps)(teacherInstructions?.inputConfiguration, baseInputConfiguration),
|
|
149
|
+
spellCheck: spellCheckEnabled,
|
|
150
|
+
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
151
|
+
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
152
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
153
|
+
languageCharactersProps: [{
|
|
154
|
+
language: 'spanish'
|
|
155
|
+
}, {
|
|
156
|
+
language: 'special'
|
|
157
|
+
}],
|
|
158
|
+
mathMlOptions: mathMlOptions
|
|
159
|
+
}), teacherInstructionsError && /*#__PURE__*/_react.default.createElement(ErrorText, null, teacherInstructionsError)), /*#__PURE__*/_react.default.createElement(_generalConfigBlock.default, {
|
|
160
|
+
imageSupport: imageSupport,
|
|
161
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
162
|
+
model: model,
|
|
163
|
+
configuration: configuration,
|
|
164
|
+
onChange: this.onChange,
|
|
165
|
+
rationaleEnabled: rationaleEnabled,
|
|
166
|
+
promptEnabled: promptEnabled,
|
|
167
|
+
toolbarOpts: toolbarOpts,
|
|
168
|
+
spellCheck: spellCheckEnabled
|
|
169
|
+
}), feedbackEnabled && /*#__PURE__*/_react.default.createElement(_configUi.FeedbackConfig, {
|
|
170
|
+
feedback: model.feedback,
|
|
171
|
+
onChange: this.onFeedbackChange,
|
|
172
|
+
toolbarOpts: toolbarOpts
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
250
176
|
exports.Configure = Configure;
|
|
251
|
-
(0, _defineProperty2
|
|
252
|
-
onModelChanged: _propTypes
|
|
253
|
-
onConfigurationChanged: _propTypes
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
uploadSoundSupport: _propTypes["default"].object
|
|
177
|
+
(0, _defineProperty2.default)(Configure, "propTypes", {
|
|
178
|
+
onModelChanged: _propTypes.default.func,
|
|
179
|
+
onConfigurationChanged: _propTypes.default.func,
|
|
180
|
+
model: _propTypes.default.object.isRequired,
|
|
181
|
+
configuration: _propTypes.default.object.isRequired,
|
|
182
|
+
imageSupport: _propTypes.default.object,
|
|
183
|
+
uploadSoundSupport: _propTypes.default.object
|
|
259
184
|
});
|
|
260
|
-
|
|
261
|
-
var _default = (0, _styles.withStyles)(styles)(Configure);
|
|
262
|
-
|
|
263
|
-
exports["default"] = _default;
|
|
185
|
+
var _default = exports.default = Configure;
|
|
264
186
|
//# sourceMappingURL=configure.js.map
|