@pie-element/charting 7.11.2-next.17 → 7.11.2-next.18
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/charting-config.js +255 -0
- package/configure/lib/charting-config.js.map +1 -0
- package/configure/lib/configure.js +406 -0
- package/configure/lib/configure.js.map +1 -0
- package/configure/lib/correct-response.js +319 -0
- package/configure/lib/correct-response.js.map +1 -0
- package/configure/lib/defaults.js +221 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +184 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/utils.js +98 -0
- package/configure/lib/utils.js.map +1 -0
- package/controller/lib/defaults.js +15 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +378 -0
- package/controller/lib/index.js.map +1 -0
- package/lib/index.js +121 -0
- package/lib/index.js.map +1 -0
- package/lib/main.js +208 -0
- package/lib/main.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.getUpdatedCategories = exports["default"] = exports.CorrectResponse = void 0;
|
|
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
|
+
|
|
24
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
25
|
+
|
|
26
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
27
|
+
|
|
28
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
|
+
|
|
30
|
+
var React = _interopRequireWildcard(require("react"));
|
|
31
|
+
|
|
32
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
33
|
+
|
|
34
|
+
var _styles = require("@material-ui/core/styles");
|
|
35
|
+
|
|
36
|
+
var _charting = require("@pie-lib/pie-toolbox/charting");
|
|
37
|
+
|
|
38
|
+
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
39
|
+
|
|
40
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
41
|
+
|
|
42
|
+
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
43
|
+
|
|
44
|
+
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
45
|
+
|
|
46
|
+
var _excluded = ["editable", "interactive", "deletable"],
|
|
47
|
+
_excluded2 = ["interactive", "editable", "index"];
|
|
48
|
+
|
|
49
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
50
|
+
|
|
51
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
52
|
+
|
|
53
|
+
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); }; }
|
|
54
|
+
|
|
55
|
+
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; } }
|
|
56
|
+
|
|
57
|
+
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; }
|
|
58
|
+
|
|
59
|
+
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; }
|
|
60
|
+
|
|
61
|
+
var styles = function styles(theme) {
|
|
62
|
+
return {
|
|
63
|
+
container: {
|
|
64
|
+
marginBottom: theme.spacing.unit * 2.5,
|
|
65
|
+
display: 'flex',
|
|
66
|
+
flex: 1
|
|
67
|
+
},
|
|
68
|
+
button: {
|
|
69
|
+
marginTop: theme.spacing.unit * 3,
|
|
70
|
+
cursor: 'pointer',
|
|
71
|
+
background: theme.palette.grey[200],
|
|
72
|
+
padding: theme.spacing.unit * 2,
|
|
73
|
+
width: 'fit-content',
|
|
74
|
+
borderRadius: '4px'
|
|
75
|
+
},
|
|
76
|
+
column: {
|
|
77
|
+
flex: 1
|
|
78
|
+
},
|
|
79
|
+
chartError: {
|
|
80
|
+
border: "2px solid ".concat(theme.palette.error.main)
|
|
81
|
+
},
|
|
82
|
+
errorText: {
|
|
83
|
+
fontSize: theme.typography.fontSize - 2,
|
|
84
|
+
color: theme.palette.error.main,
|
|
85
|
+
paddingTop: theme.spacing.unit
|
|
86
|
+
},
|
|
87
|
+
title: {
|
|
88
|
+
marginBottom: theme.spacing.unit
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var addCategoryProps = function addCategoryProps(correctAnswer, data) {
|
|
94
|
+
return correctAnswer.map(function (correct, index) {
|
|
95
|
+
return _objectSpread(_objectSpread({}, correct), {}, {
|
|
96
|
+
editable: index < data.length ? data[index].editable : true,
|
|
97
|
+
interactive: index < data.length ? data[index].interactive : true,
|
|
98
|
+
deletable: index >= data.length ? true : false
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
var updateCorrectResponseData = function updateCorrectResponseData(correctAnswer, data) {
|
|
104
|
+
if (!correctAnswer) {
|
|
105
|
+
return data;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var correctAnswerData = (0, _toConsumableArray2["default"])(correctAnswer);
|
|
109
|
+
var correctResponseDefinition = [];
|
|
110
|
+
(data || []).forEach(function (category, currentIndex) {
|
|
111
|
+
var _correctAnswer$curren, _correctAnswer$curren2, _correctAnswer$curren3;
|
|
112
|
+
|
|
113
|
+
var editable = category.editable;
|
|
114
|
+
var interactive = category.interactive;
|
|
115
|
+
var label = editable && (_correctAnswer$curren = correctAnswer[currentIndex]) !== null && _correctAnswer$curren !== void 0 && _correctAnswer$curren.label ? correctAnswer[currentIndex].label : category.label;
|
|
116
|
+
var value = interactive && (_correctAnswer$curren2 = correctAnswer[currentIndex]) !== null && _correctAnswer$curren2 !== void 0 && _correctAnswer$curren2.value || interactive && ((_correctAnswer$curren3 = correctAnswer[currentIndex]) === null || _correctAnswer$curren3 === void 0 ? void 0 : _correctAnswer$curren3.value) == 0 ? correctAnswer[currentIndex].value : category.value;
|
|
117
|
+
correctResponseDefinition[currentIndex] = {
|
|
118
|
+
label: label,
|
|
119
|
+
value: value,
|
|
120
|
+
editable: category.editable,
|
|
121
|
+
interactive: category.interactive
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (correctResponseDefinition.length < correctAnswer.length) {
|
|
126
|
+
var missingCategories = (correctAnswerData || []).slice(correctResponseDefinition.length, correctAnswer.length);
|
|
127
|
+
return addCategoryProps((correctResponseDefinition || []).concat(missingCategories), data);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return correctResponseDefinition;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
var insertCategory = function insertCategory(correctAnswer, data) {
|
|
134
|
+
var positionToInsert = data.length - 1; // eslint-disable-next-line no-unused-vars
|
|
135
|
+
|
|
136
|
+
var _data = data[data.length - 1],
|
|
137
|
+
editable = _data.editable,
|
|
138
|
+
interactive = _data.interactive,
|
|
139
|
+
deletable = _data.deletable,
|
|
140
|
+
categoryToInsert = (0, _objectWithoutProperties2["default"])(_data, _excluded);
|
|
141
|
+
(correctAnswer || []).splice(positionToInsert, 0, categoryToInsert);
|
|
142
|
+
var correctAnswerData = (0, _toConsumableArray2["default"])(correctAnswer);
|
|
143
|
+
return addCategoryProps(correctAnswerData, data);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var removeCategory = function removeCategory(correctAnswer, data, positionToRemove) {
|
|
147
|
+
(correctAnswer || []).splice(positionToRemove, 1);
|
|
148
|
+
var correctAnswerData = (0, _toConsumableArray2["default"])(correctAnswer);
|
|
149
|
+
return addCategoryProps(correctAnswerData, data);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var getUpdatedCategories = function getUpdatedCategories(nextProps, prevProps, prevState) {
|
|
153
|
+
var nextData = nextProps && nextProps.model && nextProps.model.data || [];
|
|
154
|
+
var data = prevProps && prevProps.model && prevProps.model.data || [];
|
|
155
|
+
var nextCorrectAnswerDataCopy = (0, _cloneDeep["default"])(nextProps && nextProps.model && nextProps.model.correctAnswer && nextProps.model.correctAnswer.data || []);
|
|
156
|
+
var categoriesCopy = (0, _cloneDeep["default"])(prevState ? prevState.categories : []);
|
|
157
|
+
var nextCategories = []; // Handle categories insertion in Define Chart
|
|
158
|
+
|
|
159
|
+
if (nextData.length > data.length) {
|
|
160
|
+
nextCategories = insertCategory(nextCorrectAnswerDataCopy, nextData);
|
|
161
|
+
return nextCategories;
|
|
162
|
+
} // Handle categories removal from Define Chart
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
if (nextData.length < data.length) {
|
|
166
|
+
var removedIndex = nextData.length; // we need to remove the category from the correct answer data and categories, from the same index it was removed from the data
|
|
167
|
+
// index is a property of the nextData category
|
|
168
|
+
|
|
169
|
+
for (var index = 0; index < nextData.length; index++) {
|
|
170
|
+
if (nextData[index].index !== index) {
|
|
171
|
+
removedIndex = index;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
nextCategories = removeCategory(categoriesCopy, nextData, removedIndex);
|
|
177
|
+
return nextCategories;
|
|
178
|
+
} // Handle category value or label changes in Define Chart
|
|
179
|
+
// Handle categories update in Define Correct Response Chart
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
nextCategories = updateCorrectResponseData(nextCorrectAnswerDataCopy, nextData);
|
|
183
|
+
return nextCategories;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
exports.getUpdatedCategories = getUpdatedCategories;
|
|
187
|
+
|
|
188
|
+
var CorrectResponse = /*#__PURE__*/function (_React$Component) {
|
|
189
|
+
(0, _inherits2["default"])(CorrectResponse, _React$Component);
|
|
190
|
+
|
|
191
|
+
var _super = _createSuper(CorrectResponse);
|
|
192
|
+
|
|
193
|
+
function CorrectResponse(props) {
|
|
194
|
+
var _this;
|
|
195
|
+
|
|
196
|
+
(0, _classCallCheck2["default"])(this, CorrectResponse);
|
|
197
|
+
_this = _super.call(this, props);
|
|
198
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeData", function (data) {
|
|
199
|
+
var _this$props = _this.props,
|
|
200
|
+
model = _this$props.model,
|
|
201
|
+
onChange = _this$props.onChange;
|
|
202
|
+
|
|
203
|
+
var _ref = model || {},
|
|
204
|
+
correctAnswer = _ref.correctAnswer;
|
|
205
|
+
|
|
206
|
+
onChange(_objectSpread(_objectSpread({}, model), {}, {
|
|
207
|
+
correctAnswer: _objectSpread(_objectSpread({}, correctAnswer), {}, {
|
|
208
|
+
// eslint-disable-next-line no-unused-vars
|
|
209
|
+
data: data.map(function (_ref2) {
|
|
210
|
+
var interactive = _ref2.interactive,
|
|
211
|
+
editable = _ref2.editable,
|
|
212
|
+
index = _ref2.index,
|
|
213
|
+
keepAttrs = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
|
214
|
+
return keepAttrs;
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
}));
|
|
218
|
+
});
|
|
219
|
+
_this.state = {
|
|
220
|
+
categories: []
|
|
221
|
+
};
|
|
222
|
+
return _this;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
(0, _createClass2["default"])(CorrectResponse, [{
|
|
226
|
+
key: "componentDidMount",
|
|
227
|
+
value: function componentDidMount() {
|
|
228
|
+
var initialCategories = getUpdatedCategories(this.props, this.props, null);
|
|
229
|
+
this.setState({
|
|
230
|
+
categories: initialCategories || updateCorrectResponseData(this.props.model.correctAnswer.data, this.props.model.data)
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}, {
|
|
234
|
+
key: "componentDidUpdate",
|
|
235
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
236
|
+
var nextCategories = getUpdatedCategories(this.props, prevProps, prevState);
|
|
237
|
+
|
|
238
|
+
if (nextCategories && !(0, _isEqual["default"])(nextCategories, this.state.categories)) {
|
|
239
|
+
this.changeData(nextCategories);
|
|
240
|
+
this.setState({
|
|
241
|
+
categories: nextCategories
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}, {
|
|
246
|
+
key: "render",
|
|
247
|
+
value: function render() {
|
|
248
|
+
var _this$props2 = this.props,
|
|
249
|
+
classes = _this$props2.classes,
|
|
250
|
+
model = _this$props2.model,
|
|
251
|
+
charts = _this$props2.charts,
|
|
252
|
+
error = _this$props2.error,
|
|
253
|
+
studentNewCategoryDefaultLabel = _this$props2.studentNewCategoryDefaultLabel,
|
|
254
|
+
correctAnswerErrors = _this$props2.correctAnswerErrors,
|
|
255
|
+
_this$props2$mathMlOp = _this$props2.mathMlOptions,
|
|
256
|
+
mathMlOptions = _this$props2$mathMlOp === void 0 ? {} : _this$props2$mathMlOp;
|
|
257
|
+
var categories = this.state.categories;
|
|
258
|
+
|
|
259
|
+
var _ref3 = model || {},
|
|
260
|
+
_ref3$domain = _ref3.domain,
|
|
261
|
+
domain = _ref3$domain === void 0 ? {} : _ref3$domain,
|
|
262
|
+
_ref3$range = _ref3.range,
|
|
263
|
+
range = _ref3$range === void 0 ? {} : _ref3$range;
|
|
264
|
+
|
|
265
|
+
var _ref4 = correctAnswerErrors || {},
|
|
266
|
+
identicalError = _ref4.identicalError,
|
|
267
|
+
categoriesError = _ref4.categoriesError;
|
|
268
|
+
|
|
269
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
270
|
+
className: classes.title
|
|
271
|
+
}, "Define Correct Response"), /*#__PURE__*/React.createElement("div", {
|
|
272
|
+
className: classes.container
|
|
273
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
274
|
+
className: classes.column,
|
|
275
|
+
key: "graph"
|
|
276
|
+
}, /*#__PURE__*/React.createElement(_Typography["default"], {
|
|
277
|
+
component: "div",
|
|
278
|
+
type: "body1"
|
|
279
|
+
}, /*#__PURE__*/React.createElement("span", null, "Use the tools below to define the correct answer.")), /*#__PURE__*/React.createElement("div", {
|
|
280
|
+
key: "correct-response-graph-".concat(model.correctAnswer.name),
|
|
281
|
+
className: identicalError || categoriesError ? classes.chartError : ''
|
|
282
|
+
}, /*#__PURE__*/React.createElement(_charting.Chart, {
|
|
283
|
+
chartType: model.chartType,
|
|
284
|
+
size: model.graph,
|
|
285
|
+
domain: domain,
|
|
286
|
+
range: range,
|
|
287
|
+
charts: charts,
|
|
288
|
+
data: categories,
|
|
289
|
+
title: model.title,
|
|
290
|
+
onDataChange: this.changeData,
|
|
291
|
+
addCategoryEnabled: model.addCategoryEnabled,
|
|
292
|
+
categoryDefaultLabel: studentNewCategoryDefaultLabel,
|
|
293
|
+
error: error,
|
|
294
|
+
mathMlOptions: mathMlOptions
|
|
295
|
+
})), (identicalError || categoriesError) && /*#__PURE__*/React.createElement(_Typography["default"], {
|
|
296
|
+
component: "div",
|
|
297
|
+
type: "body1",
|
|
298
|
+
className: classes.errorText
|
|
299
|
+
}, /*#__PURE__*/React.createElement("span", null, identicalError || categoriesError)))));
|
|
300
|
+
}
|
|
301
|
+
}]);
|
|
302
|
+
return CorrectResponse;
|
|
303
|
+
}(React.Component);
|
|
304
|
+
|
|
305
|
+
exports.CorrectResponse = CorrectResponse;
|
|
306
|
+
(0, _defineProperty2["default"])(CorrectResponse, "propTypes", {
|
|
307
|
+
classes: _propTypes["default"].object.isRequired,
|
|
308
|
+
correctAnswerErrors: _propTypes["default"].object,
|
|
309
|
+
studentNewCategoryDefaultLabel: _propTypes["default"].string,
|
|
310
|
+
model: _propTypes["default"].object.isRequired,
|
|
311
|
+
onChange: _propTypes["default"].func.isRequired,
|
|
312
|
+
charts: _propTypes["default"].array,
|
|
313
|
+
error: _propTypes["default"].string
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
var _default = (0, _styles.withStyles)(styles)(CorrectResponse);
|
|
317
|
+
|
|
318
|
+
exports["default"] = _default;
|
|
319
|
+
//# sourceMappingURL=correct-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/correct-response.jsx"],"names":["styles","theme","container","marginBottom","spacing","unit","display","flex","button","marginTop","cursor","background","palette","grey","padding","width","borderRadius","column","chartError","border","error","main","errorText","fontSize","typography","color","paddingTop","title","addCategoryProps","correctAnswer","data","map","correct","index","editable","length","interactive","deletable","updateCorrectResponseData","correctAnswerData","correctResponseDefinition","forEach","category","currentIndex","label","value","missingCategories","slice","concat","insertCategory","positionToInsert","categoryToInsert","splice","removeCategory","positionToRemove","getUpdatedCategories","nextProps","prevProps","prevState","nextData","model","nextCorrectAnswerDataCopy","categoriesCopy","categories","nextCategories","removedIndex","CorrectResponse","props","onChange","keepAttrs","state","initialCategories","setState","changeData","classes","charts","studentNewCategoryDefaultLabel","correctAnswerErrors","mathMlOptions","domain","range","identicalError","categoriesError","name","chartType","graph","addCategoryEnabled","React","Component","PropTypes","object","isRequired","string","func","array"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,SAAS,EAAE;AACTC,M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AA,KAAK,EAAE6B,sBAAUC,MAAV,CAAiBC,UAJP;AAKjBvB,EAAAA,QAAQ,EAAEqB,sBAAUI,IAAV,CAAeF,UALR;AAMjBhB,EAAAA,MAAM,EAAEc,sBAAUK,KAND;AAOjB1E,EAAAA,KAAK,EAAEqE,sBAAUG;AAPA,C;;eAyGN,wBAAW5F,MAAX,EAAmBkE,eAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Chart } from '@pie-lib/pie-toolbox/charting';\nimport isEqual from 'lodash/isEqual';\nimport isEmpty from 'lodash/isEmpty';\nimport cloneDeep from 'lodash/cloneDeep';\n\nimport Typography from '@material-ui/core/Typography';\n\nconst styles = (theme) => ({\n container: {\n marginBottom: theme.spacing.unit * 2.5,\n display: 'flex',\n flex: 1,\n },\n button: {\n marginTop: theme.spacing.unit * 3,\n cursor: 'pointer',\n background: theme.palette.grey[200],\n padding: theme.spacing.unit * 2,\n width: 'fit-content',\n borderRadius: '4px',\n },\n column: {\n flex: 1,\n },\n chartError: {\n border: `2px solid ${theme.palette.error.main}`,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n title: {\n marginBottom: theme.spacing.unit,\n },\n});\n\nconst addCategoryProps = (correctAnswer, data) =>\n correctAnswer.map((correct, index) => ({\n ...correct,\n editable: index < data.length ? data[index].editable : true,\n interactive: index < data.length ? data[index].interactive : true,\n deletable: index >= data.length ? true : false,\n }));\n\nconst updateCorrectResponseData = (correctAnswer, data) => {\n if (!correctAnswer) {\n return data;\n }\n\n const correctAnswerData = [...correctAnswer];\n let correctResponseDefinition = [];\n\n (data || []).forEach((category, currentIndex) => {\n const editable = category.editable;\n const interactive = category.interactive;\n const label = editable && correctAnswer[currentIndex]?.label ? correctAnswer[currentIndex].label : category.label;\n const value =\n (interactive && correctAnswer[currentIndex]?.value) || (interactive && correctAnswer[currentIndex]?.value == 0)\n ? correctAnswer[currentIndex].value\n : category.value;\n\n correctResponseDefinition[currentIndex] = {\n label: label,\n value: value,\n editable: category.editable,\n interactive: category.interactive,\n };\n });\n\n if (correctResponseDefinition.length < correctAnswer.length) {\n const missingCategories = (correctAnswerData || []).slice(correctResponseDefinition.length, correctAnswer.length);\n\n return addCategoryProps((correctResponseDefinition || []).concat(missingCategories), data);\n }\n\n return correctResponseDefinition;\n};\n\nconst insertCategory = (correctAnswer, data) => {\n const positionToInsert = data.length - 1;\n // eslint-disable-next-line no-unused-vars\n const { editable, interactive, deletable, ...categoryToInsert } = data[data.length - 1];\n\n (correctAnswer || []).splice(positionToInsert, 0, categoryToInsert);\n const correctAnswerData = [...correctAnswer];\n\n return addCategoryProps(correctAnswerData, data);\n};\n\nconst removeCategory = (correctAnswer, data, positionToRemove) => {\n (correctAnswer || []).splice(positionToRemove, 1);\n const correctAnswerData = [...correctAnswer];\n\n return addCategoryProps(correctAnswerData, data);\n};\n\nexport const getUpdatedCategories = (nextProps, prevProps, prevState) => {\n const nextData = (nextProps && nextProps.model && nextProps.model.data) || [];\n const data = (prevProps && prevProps.model && prevProps.model.data) || [];\n const nextCorrectAnswerDataCopy = cloneDeep((nextProps && nextProps.model && nextProps.model.correctAnswer && nextProps.model.correctAnswer.data) || []);\n\n const categoriesCopy = cloneDeep(prevState ? prevState.categories : []);\n\n let nextCategories = [];\n\n // Handle categories insertion in Define Chart\n if (nextData.length > data.length) {\n nextCategories = insertCategory(nextCorrectAnswerDataCopy, nextData);\n return nextCategories;\n }\n\n // Handle categories removal from Define Chart\n if (nextData.length < data.length) {\n let removedIndex = nextData.length;\n\n // we need to remove the category from the correct answer data and categories, from the same index it was removed from the data\n // index is a property of the nextData category\n for (let index = 0; index < nextData.length; index++) {\n if (nextData[index].index !== index) {\n removedIndex = index;\n break;\n }\n }\n \n nextCategories = removeCategory(categoriesCopy, nextData, removedIndex);\n return nextCategories;\n }\n\n // Handle category value or label changes in Define Chart\n // Handle categories update in Define Correct Response Chart\n nextCategories = updateCorrectResponseData(nextCorrectAnswerDataCopy, nextData);\n\n return nextCategories;\n};\n\nexport class CorrectResponse extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n correctAnswerErrors: PropTypes.object,\n studentNewCategoryDefaultLabel: PropTypes.string,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n charts: PropTypes.array,\n error: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n categories: [],\n };\n }\n\n changeData = (data) => {\n const { model, onChange } = this.props;\n const { correctAnswer } = model || {};\n\n onChange({\n ...model,\n correctAnswer: {\n ...correctAnswer,\n // eslint-disable-next-line no-unused-vars\n data: data.map(({ interactive, editable, index, ...keepAttrs }) => keepAttrs),\n },\n });\n };\n\n componentDidMount() {\n const initialCategories = getUpdatedCategories(this.props, this.props, null);\n\n this.setState({\n categories:\n initialCategories || updateCorrectResponseData(this.props.model.correctAnswer.data, this.props.model.data),\n });\n }\n\n componentDidUpdate(prevProps, prevState) {\n const nextCategories = getUpdatedCategories(this.props, prevProps, prevState);\n\n if (nextCategories && !isEqual(nextCategories, this.state.categories)) {\n this.changeData(nextCategories);\n this.setState({ categories: nextCategories });\n }\n }\n\n render() {\n const {\n classes,\n model,\n charts,\n error,\n studentNewCategoryDefaultLabel,\n correctAnswerErrors,\n mathMlOptions = {},\n } = this.props;\n const { categories } = this.state;\n\n const { domain = {}, range = {} } = model || {};\n const { identicalError, categoriesError } = correctAnswerErrors || {};\n\n return (\n <div>\n <div className={classes.title}>Define Correct Response</div>\n <div className={classes.container}>\n <div className={classes.column} key=\"graph\">\n <Typography component=\"div\" type=\"body1\">\n <span>Use the tools below to define the correct answer.</span>\n </Typography>\n\n <div\n key={`correct-response-graph-${model.correctAnswer.name}`}\n className={identicalError || categoriesError ? classes.chartError : ''}\n >\n <Chart\n chartType={model.chartType}\n size={model.graph}\n domain={domain}\n range={range}\n charts={charts}\n data={categories}\n title={model.title}\n onDataChange={this.changeData}\n addCategoryEnabled={model.addCategoryEnabled}\n categoryDefaultLabel={studentNewCategoryDefaultLabel}\n error={error}\n mathMlOptions={mathMlOptions}\n />\n </div>\n\n {(identicalError || categoriesError) && (\n <Typography component=\"div\" type=\"body1\" className={classes.errorText}>\n <span>{identicalError || categoriesError}</span>\n </Typography>\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(CorrectResponse);\n"],"file":"correct-response.js"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* NOTE: There's no functionality described for graphTitle,
|
|
10
|
+
* rationale, scoringType, studentInstructions, teacherInstructions
|
|
11
|
+
* so there's no implementation (they are only added in model)
|
|
12
|
+
*/
|
|
13
|
+
// const createCategory = (label, value) => ({
|
|
14
|
+
// label,
|
|
15
|
+
// value,
|
|
16
|
+
// interactive: true,
|
|
17
|
+
// editable: true
|
|
18
|
+
// });
|
|
19
|
+
var _default = {
|
|
20
|
+
model: {
|
|
21
|
+
addCategoryEnabled: true,
|
|
22
|
+
chartType: 'lineCross',
|
|
23
|
+
correctAnswer: {},
|
|
24
|
+
data: [],
|
|
25
|
+
domain: {},
|
|
26
|
+
graph: {
|
|
27
|
+
width: 480,
|
|
28
|
+
height: 480
|
|
29
|
+
},
|
|
30
|
+
prompt: '',
|
|
31
|
+
promptEnabled: true,
|
|
32
|
+
rationale: '',
|
|
33
|
+
range: {
|
|
34
|
+
label: '',
|
|
35
|
+
max: 1,
|
|
36
|
+
min: 0
|
|
37
|
+
},
|
|
38
|
+
scoringType: 'all or nothing',
|
|
39
|
+
title: '',
|
|
40
|
+
rationaleEnabled: true,
|
|
41
|
+
teacherInstructionsEnabled: true,
|
|
42
|
+
studentInstructionsEnabled: true,
|
|
43
|
+
studentNewCategoryDefaultLabel: 'New Category',
|
|
44
|
+
changeInteractiveEnabled: false,
|
|
45
|
+
changeEditableEnabled: false,
|
|
46
|
+
changeAddCategoryEnabled: false
|
|
47
|
+
},
|
|
48
|
+
configuration: {
|
|
49
|
+
baseInputConfiguration: {
|
|
50
|
+
audio: {
|
|
51
|
+
disabled: false
|
|
52
|
+
},
|
|
53
|
+
video: {
|
|
54
|
+
disabled: false
|
|
55
|
+
},
|
|
56
|
+
image: {
|
|
57
|
+
disabled: false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
spellCheck: {
|
|
61
|
+
label: 'Spellcheck',
|
|
62
|
+
settings: false,
|
|
63
|
+
enabled: true
|
|
64
|
+
},
|
|
65
|
+
chartDimensions: {
|
|
66
|
+
settings: false,
|
|
67
|
+
label: 'Chart Dimensions',
|
|
68
|
+
showInConfigPanel: true,
|
|
69
|
+
width: {
|
|
70
|
+
min: 50,
|
|
71
|
+
max: 700,
|
|
72
|
+
step: 20
|
|
73
|
+
},
|
|
74
|
+
height: {
|
|
75
|
+
min: 400,
|
|
76
|
+
max: 700,
|
|
77
|
+
step: 20
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
authorNewCategoryDefaults: {
|
|
81
|
+
settings: false,
|
|
82
|
+
label: 'Category',
|
|
83
|
+
interactive: true,
|
|
84
|
+
editable: false
|
|
85
|
+
},
|
|
86
|
+
availableChartTypes: {
|
|
87
|
+
bar: 'Bar Chart',
|
|
88
|
+
histogram: 'Histogram',
|
|
89
|
+
lineDot: 'Line Chart ●',
|
|
90
|
+
lineCross: 'Line Chart x',
|
|
91
|
+
dotPlot: 'Dot/Line Plot ⬤',
|
|
92
|
+
linePlot: 'Dot/Line Plot X'
|
|
93
|
+
},
|
|
94
|
+
chartTypeLabel: 'ChartType',
|
|
95
|
+
studentNewCategoryDefaultLabel: {
|
|
96
|
+
settings: false,
|
|
97
|
+
label: 'Category'
|
|
98
|
+
},
|
|
99
|
+
prompt: {
|
|
100
|
+
settings: true,
|
|
101
|
+
label: 'Item Stem',
|
|
102
|
+
required: false,
|
|
103
|
+
inputConfiguration: {
|
|
104
|
+
audio: {
|
|
105
|
+
disabled: false
|
|
106
|
+
},
|
|
107
|
+
video: {
|
|
108
|
+
disabled: false
|
|
109
|
+
},
|
|
110
|
+
image: {
|
|
111
|
+
disabled: false
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
rationale: {
|
|
116
|
+
settings: true,
|
|
117
|
+
label: 'Rationale',
|
|
118
|
+
required: false,
|
|
119
|
+
inputConfiguration: {
|
|
120
|
+
audio: {
|
|
121
|
+
disabled: false
|
|
122
|
+
},
|
|
123
|
+
video: {
|
|
124
|
+
disabled: false
|
|
125
|
+
},
|
|
126
|
+
image: {
|
|
127
|
+
disabled: false
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
scoringType: {
|
|
132
|
+
settings: false,
|
|
133
|
+
label: 'Scoring Type'
|
|
134
|
+
},
|
|
135
|
+
settingsPanelDisabled: false,
|
|
136
|
+
studentInstructions: {
|
|
137
|
+
settings: false,
|
|
138
|
+
label: 'Student Instructions'
|
|
139
|
+
},
|
|
140
|
+
teacherInstructions: {
|
|
141
|
+
settings: true,
|
|
142
|
+
label: 'Teacher Instructions',
|
|
143
|
+
required: false,
|
|
144
|
+
inputConfiguration: {
|
|
145
|
+
audio: {
|
|
146
|
+
disabled: false
|
|
147
|
+
},
|
|
148
|
+
video: {
|
|
149
|
+
disabled: false
|
|
150
|
+
},
|
|
151
|
+
image: {
|
|
152
|
+
disabled: false
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
title: {
|
|
157
|
+
settings: false,
|
|
158
|
+
label: 'Chart Title'
|
|
159
|
+
},
|
|
160
|
+
instruction: {
|
|
161
|
+
settings: false,
|
|
162
|
+
label: 'This item type provides various types of interactive charts. Depending upon how an item is configured,\n' + ' students can change the heights of bars (or other similar chart elements) created by the author; relabel bars\n' + ' created by the author; and/or add new bars, label them, and set their heights.'
|
|
163
|
+
},
|
|
164
|
+
titlePlaceholder: {
|
|
165
|
+
settings: false,
|
|
166
|
+
label: 'Click here to add a title'
|
|
167
|
+
},
|
|
168
|
+
labelsPlaceholders: {
|
|
169
|
+
left: 'Click here to add a label for this axis',
|
|
170
|
+
right: '',
|
|
171
|
+
top: '',
|
|
172
|
+
bottom: 'Click here to add a label for this axis'
|
|
173
|
+
},
|
|
174
|
+
maxImageWidth: {
|
|
175
|
+
teacherInstructions: 300,
|
|
176
|
+
prompt: 300,
|
|
177
|
+
rationale: 300
|
|
178
|
+
},
|
|
179
|
+
maxImageHeight: {
|
|
180
|
+
teacherInstructions: 300,
|
|
181
|
+
prompt: 300,
|
|
182
|
+
rationale: 300
|
|
183
|
+
},
|
|
184
|
+
withRubric: {
|
|
185
|
+
settings: false,
|
|
186
|
+
label: 'Add Rubric'
|
|
187
|
+
},
|
|
188
|
+
language: {
|
|
189
|
+
settings: false,
|
|
190
|
+
label: 'Specify Language',
|
|
191
|
+
enabled: false
|
|
192
|
+
},
|
|
193
|
+
languageChoices: {
|
|
194
|
+
label: 'Language Choices',
|
|
195
|
+
options: []
|
|
196
|
+
},
|
|
197
|
+
chartingOptions: {
|
|
198
|
+
changeInteractive: {
|
|
199
|
+
settings: false,
|
|
200
|
+
authoringLabel: 'Student can set value',
|
|
201
|
+
settingsLabel: 'Allow non-interactive categories'
|
|
202
|
+
},
|
|
203
|
+
changeEditable: {
|
|
204
|
+
settings: false,
|
|
205
|
+
authoringLabel: 'Student can edit name',
|
|
206
|
+
settingsLabel: 'Allow editable category names'
|
|
207
|
+
},
|
|
208
|
+
addCategory: {
|
|
209
|
+
settings: false,
|
|
210
|
+
authoringLabel: 'Student can add categories',
|
|
211
|
+
settingsLabel: 'Allow changes to whether students can add categories'
|
|
212
|
+
},
|
|
213
|
+
mathMlOptions: {
|
|
214
|
+
mmlOutput: false,
|
|
215
|
+
mmlEditing: false
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
exports["default"] = _default;
|
|
221
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","addCategoryEnabled","chartType","correctAnswer","data","domain","graph","width","height","prompt","promptEnabled","rationale","range","label","max","min","scoringType","title","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","studentNewCategoryDefaultLabel","changeInteractiveEnabled","changeEditableEnabled","changeAddCategoryEnabled","configuration","baseInputConfiguration","audio","disabled","video","image","spellCheck","settings","enabled","chartDimensions","showInConfigPanel","step","authorNewCategoryDefaults","interactive","editable","availableChartTypes","bar","histogram","lineDot","lineCross","dotPlot","linePlot","chartTypeLabel","required","inputConfiguration","settingsPanelDisabled","studentInstructions","teacherInstructions","instruction","titlePlaceholder","labelsPlaceholders","left","right","top","bottom","maxImageWidth","maxImageHeight","withRubric","language","languageChoices","options","chartingOptions","changeInteractive","authoringLabel","settingsLabel","changeEditable","addCategory","mathMlOptions","mmlOutput","mmlEditing"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAE,IADf;AAELC,IAAAA,SAAS,EAAE,WAFN;AAGLC,IAAAA,aAAa,EAAE,EAHV;AAILC,IAAAA,IAAI,EAAE,EAJD;AAKLC,IAAAA,MAAM,EAAE,EALH;AAMLC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAE,GADF;AAELC,MAAAA,MAAM,EAAE;AAFH,KANF;AAULC,IAAAA,MAAM,EAAE,EAVH;AAWLC,IAAAA,aAAa,EAAE,IAXV;AAYLC,IAAAA,SAAS,EAAE,EAZN;AAaLC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAE,EADF;AAELC,MAAAA,GAAG,EAAE,CAFA;AA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A,SAAS,EAAE;AAHE,KAzGF;AA8GbkD,IAAAA,cAAc,EAAE;AACdT,MAAAA,mBAAmB,EAAE,GADP;AAEd3C,MAAAA,MAAM,EAAE,GAFM;AAGdE,MAAAA,SAAS,EAAE;AAHG,KA9GH;AAmHbmD,IAAAA,UAAU,EAAE;AACV9B,MAAAA,QAAQ,EAAE,KADA;AAEVnB,MAAAA,KAAK,EAAE;AAFG,KAnHC;AAuHbkD,IAAAA,QAAQ,EAAE;AACR/B,MAAAA,QAAQ,EAAE,KADF;AAERnB,MAAAA,KAAK,EAAE,kBAFC;AAGRoB,MAAAA,OAAO,EAAE;AAHD,KAvHG;AA4Hb+B,IAAAA,eAAe,EAAE;AACfnD,MAAAA,KAAK,EAAE,kBADQ;AAEfoD,MAAAA,OAAO,EAAE;AAFM,KA5HJ;AAgIbC,IAAAA,eAAe,EAAE;AACfC,MAAAA,iBAAiB,EAAE;AACjBnC,QAAAA,QAAQ,EAAE,KADO;AAEjBoC,QAAAA,cAAc,EAAE,uBAFC;AAGjBC,QAAAA,aAAa,EAAE;AAHE,OADJ;AAMfC,MAAAA,cAAc,EAAE;AACdtC,QAAAA,QAAQ,EAAE,KADI;AAEdoC,QAAAA,cAAc,EAAE,uBAFF;AAGdC,QAAAA,aAAa,EAAE;AAHD,OAND;AAWfE,MAAAA,WAAW,EAAE;AACXvC,QAAAA,QAAQ,EAAE,KADC;AAEXoC,QAAAA,cAAc,EAAE,4BAFL;AAGXC,QAAAA,aAAa,EAAE;AAHJ,OAXE;AAgBfG,MAAAA,aAAa,EAAE;AACbC,QAAAA,SAAS,EAAE,KADE;AAEbC,QAAAA,UAAU,EAAE;AAFC;AAhBA;AAhIJ;AA7BF,C","sourcesContent":["/**\n * NOTE: There's no functionality described for graphTitle,\n * rationale, scoringType, studentInstructions, teacherInstructions\n * so there's no implementation (they are only added in model)\n */\n\n// const createCategory = (label, value) => ({\n// label,\n// value,\n// interactive: true,\n// editable: true\n// });\n\nexport default {\n model: {\n addCategoryEnabled: true,\n chartType: 'lineCross',\n correctAnswer: {},\n data: [],\n domain: {},\n graph: {\n width: 480,\n height: 480,\n },\n prompt: '',\n promptEnabled: true,\n rationale: '',\n range: {\n label: '',\n max: 1,\n min: 0,\n },\n scoringType: 'all or nothing',\n title: '',\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n studentNewCategoryDefaultLabel: 'New Category',\n changeInteractiveEnabled: false,\n changeEditableEnabled: false,\n changeAddCategoryEnabled: false,\n },\n configuration: {\n baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n chartDimensions: {\n settings: false,\n label: 'Chart Dimensions',\n showInConfigPanel: true,\n width: {\n min: 50,\n max: 700,\n step: 20,\n },\n height: {\n min: 400,\n max: 700,\n step: 20,\n },\n },\n authorNewCategoryDefaults: {\n settings: false,\n label: 'Category',\n interactive: true,\n editable: false,\n },\n availableChartTypes: {\n bar: 'Bar Chart',\n histogram: 'Histogram',\n lineDot: 'Line Chart ●',\n lineCross: 'Line Chart x',\n dotPlot: 'Dot/Line Plot ⬤',\n linePlot: 'Dot/Line Plot X',\n },\n chartTypeLabel: 'ChartType',\n studentNewCategoryDefaultLabel: {\n settings: false,\n label: 'Category',\n },\n prompt: {\n settings: true,\n label: 'Item Stem',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n settingsPanelDisabled: false,\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n title: {\n settings: false,\n label: 'Chart Title',\n },\n instruction: {\n settings: false,\n label:\n 'This item type provides various types of interactive charts. Depending upon how an item is configured,\\n' +\n ' students can change the heights of bars (or other similar chart elements) created by the author; relabel bars\\n' +\n ' created by the author; and/or add new bars, label them, and set their heights.',\n },\n titlePlaceholder: {\n settings: false,\n label: 'Click here to add a title',\n },\n labelsPlaceholders: {\n left: 'Click here to add a label for this axis',\n right: '',\n top: '',\n bottom: 'Click here to add a label for this axis',\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 language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n chartingOptions: {\n changeInteractive: {\n settings: false,\n authoringLabel: 'Student can set value',\n settingsLabel: 'Allow non-interactive categories',\n },\n changeEditable: {\n settings: false,\n authoringLabel: 'Student can edit name',\n settingsLabel: 'Allow editable category names',\n },\n addCategory: {\n settings: false,\n authoringLabel: 'Student can add categories',\n settingsLabel: 'Allow changes to whether students can add categories',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n },\n },\n};\n"],"file":"defaults.js"}
|