@pie-element/placement-ordering 9.10.2-next.0 → 9.10.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.
@@ -1,268 +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.ChoiceTile = 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 _editableHtml = require("@pie-lib/pie-toolbox/editable-html");
25
-
26
- var _CardActions = _interopRequireDefault(require("@material-ui/core/CardActions"));
27
-
28
- var _DragHandle = _interopRequireDefault(require("@material-ui/icons/DragHandle"));
29
-
30
- var _reactDnd = require("react-dnd");
31
-
32
- var _classnames = _interopRequireDefault(require("classnames"));
33
-
34
- var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
35
-
36
- var _propTypes = _interopRequireDefault(require("prop-types"));
37
-
38
- var _react = _interopRequireDefault(require("react"));
39
-
40
- var _RemoveCircle = _interopRequireDefault(require("@material-ui/icons/RemoveCircle"));
41
-
42
- var _debug = _interopRequireDefault(require("debug"));
43
-
44
- var _styles = require("@material-ui/core/styles");
45
-
46
- var _renderUi = require("@pie-lib/pie-toolbox/render-ui");
47
-
48
- 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); }; }
49
-
50
- 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; } }
51
-
52
- var log = (0, _debug["default"])('@pie-element:placement-ordering:configure:choice-tile');
53
-
54
- var ChoiceTile = /*#__PURE__*/function (_React$Component) {
55
- (0, _inherits2["default"])(ChoiceTile, _React$Component);
56
-
57
- var _super = _createSuper(ChoiceTile);
58
-
59
- function ChoiceTile() {
60
- var _this;
61
-
62
- (0, _classCallCheck2["default"])(this, ChoiceTile);
63
-
64
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
65
- args[_key] = arguments[_key];
66
- }
67
-
68
- _this = _super.call.apply(_super, [this].concat(args));
69
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onLabelChange", function (label) {
70
- var _this$props = _this.props,
71
- choice = _this$props.choice,
72
- onChoiceChange = _this$props.onChoiceChange;
73
- choice.label = label;
74
- onChoiceChange(choice);
75
- });
76
- return _this;
77
- }
78
-
79
- (0, _createClass2["default"])(ChoiceTile, [{
80
- key: "render",
81
- value: function render() {
82
- var _this$props2 = this.props,
83
- _this$props2$choice = _this$props2.choice,
84
- label = _this$props2$choice.label,
85
- editable = _this$props2$choice.editable,
86
- type = _this$props2$choice.type,
87
- isDragging = _this$props2.isDragging,
88
- connectDragSource = _this$props2.connectDragSource,
89
- connectDropTarget = _this$props2.connectDropTarget,
90
- classes = _this$props2.classes,
91
- onDelete = _this$props2.onDelete,
92
- imageSupport = _this$props2.imageSupport,
93
- spellCheck = _this$props2.spellCheck,
94
- toolbarOpts = _this$props2.toolbarOpts,
95
- pluginProps = _this$props2.pluginProps,
96
- maxImageWidth = _this$props2.maxImageWidth,
97
- maxImageHeight = _this$props2.maxImageHeight,
98
- error = _this$props2.error,
99
- _this$props2$mathMlOp = _this$props2.mathMlOptions,
100
- mathMlOptions = _this$props2$mathMlOp === void 0 ? {} : _this$props2$mathMlOp;
101
- var dragSourceOpts = {}; //dropEffect: moveOnDrag ? 'move' : 'copy'};
102
-
103
- var filteredDefaultPlugins = (_editableHtml.DEFAULT_PLUGINS || []).filter(function (p) {
104
- return p !== 'bulleted-list' && p !== 'numbered-list';
105
- });
106
- var opacity = isDragging ? 0 : 1;
107
-
108
- var markup = /*#__PURE__*/_react["default"].createElement("div", {
109
- className: classes.choiceTile,
110
- style: {
111
- opacity: opacity,
112
- width: '100%'
113
- }
114
- }, /*#__PURE__*/_react["default"].createElement("div", {
115
- style: {
116
- width: '100%',
117
- display: 'flex'
118
- }
119
- }, /*#__PURE__*/_react["default"].createElement(_CardActions["default"], null, /*#__PURE__*/_react["default"].createElement("span", {
120
- className: (0, _classnames["default"])(classes.dragHandle)
121
- }, /*#__PURE__*/_react["default"].createElement(_DragHandle["default"], {
122
- className: classes.actions
123
- }))), /*#__PURE__*/_react["default"].createElement(_editableHtml.EditableHtml, {
124
- disabled: !editable,
125
- className: (0, _classnames["default"])(classes.prompt, !editable && classes.targetPrompt),
126
- placeholder: type !== 'target' && !label.includes('data-latex') ? 'Enter a choice' : '',
127
- markup: label,
128
- imageSupport: imageSupport || undefined,
129
- onChange: this.onLabelChange,
130
- pluginProps: pluginProps,
131
- toolbarOpts: toolbarOpts,
132
- activePlugins: filteredDefaultPlugins,
133
- spellCheck: spellCheck,
134
- maxImageWidth: maxImageWidth,
135
- maxImageHeight: maxImageHeight,
136
- languageCharactersProps: [{
137
- language: 'spanish'
138
- }, {
139
- language: 'special'
140
- }],
141
- error: editable && error,
142
- mathMlOptions: mathMlOptions
143
- }), editable && /*#__PURE__*/_react["default"].createElement("div", {
144
- className: classes.controls
145
- }, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
146
- color: "default",
147
- onClick: onDelete
148
- }, /*#__PURE__*/_react["default"].createElement(_RemoveCircle["default"], {
149
- classes: {
150
- root: classes.removeCircle
151
- }
152
- })))), editable && error && /*#__PURE__*/_react["default"].createElement("div", {
153
- className: classes.errorText
154
- }, error));
155
-
156
- return connectDragSource(connectDropTarget( /*#__PURE__*/_react["default"].createElement("div", null, markup)), dragSourceOpts);
157
- }
158
- }]);
159
- return ChoiceTile;
160
- }(_react["default"].Component);
161
-
162
- exports.ChoiceTile = ChoiceTile;
163
- (0, _defineProperty2["default"])(ChoiceTile, "propTypes", {
164
- connectDragSource: _propTypes["default"].func.isRequired,
165
- connectDropTarget: _propTypes["default"].func.isRequired,
166
- isDragging: _propTypes["default"].bool.isRequired,
167
- id: _propTypes["default"].any,
168
- maxImageHeight: _propTypes["default"].object,
169
- maxImageWidth: _propTypes["default"].object,
170
- label: _propTypes["default"].string,
171
- isOver: _propTypes["default"].bool,
172
- classes: _propTypes["default"].object.isRequired,
173
- type: _propTypes["default"].string,
174
- empty: _propTypes["default"].bool,
175
- disabled: _propTypes["default"].bool,
176
- outcome: _propTypes["default"].object,
177
- index: _propTypes["default"].number,
178
- imageSupport: _propTypes["default"].shape({
179
- add: _propTypes["default"].func.isRequired,
180
- "delete": _propTypes["default"].func.isRequired
181
- }),
182
- choice: _propTypes["default"].object,
183
- choices: _propTypes["default"].array.isRequired,
184
- onChoiceChange: _propTypes["default"].func.isRequired,
185
- onDelete: _propTypes["default"].func.isRequired,
186
- toolbarOpts: _propTypes["default"].object,
187
- pluginProps: _propTypes["default"].object,
188
- choicesLabel: _propTypes["default"].string,
189
- error: _propTypes["default"].string,
190
- spellCheck: _propTypes["default"].bool
191
- });
192
- var Styled = (0, _styles.withStyles)(function (theme) {
193
- return {
194
- removeCircle: {
195
- fill: theme.palette.error[500]
196
- },
197
- choiceTile: {
198
- cursor: 'move',
199
- backgroundColor: theme.palette.common.white,
200
- margin: "".concat(theme.spacing.unit, "px 0"),
201
- display: 'flex',
202
- flexDirection: 'column'
203
- },
204
- controls: {
205
- display: 'flex',
206
- justifyContent: 'flex-end'
207
- },
208
- prompt: {
209
- width: '80%',
210
- border: 'none',
211
- borderRadius: '4px'
212
- },
213
- targetPrompt: {
214
- backgroundColor: theme.palette.error['A100']
215
- },
216
- actions: {
217
- color: theme.palette.error[400]
218
- },
219
- errorText: {
220
- fontSize: theme.typography.fontSize - 2,
221
- color: theme.palette.error.main,
222
- marginLeft: theme.spacing.unit * 5,
223
- marginTop: theme.spacing.unit
224
- },
225
- correctOrder: {
226
- position: 'absolute',
227
- top: 0,
228
- fontSize: theme.typography.fontSize - 2,
229
- color: _renderUi.color.disabled()
230
- }
231
- };
232
- })(ChoiceTile);
233
- var NAME = 'choice-config';
234
- var choiceSource = {
235
- beginDrag: function beginDrag(props) {
236
- return {
237
- id: props.choice.id,
238
- index: props.index,
239
- type: props.choice.type,
240
- instanceId: props.choice.instanceId
241
- };
242
- }
243
- };
244
- var StyledSource = (0, _reactDnd.DragSource)(NAME, choiceSource, function (connect, monitor) {
245
- return {
246
- connectDragSource: connect.dragSource(),
247
- isDragging: monitor.isDragging()
248
- };
249
- })(Styled);
250
- var choiceTarget = {
251
- hover: function hover() {
252
- log('[hover]');
253
- },
254
- drop: function drop(props, monitor) {
255
- var item = monitor.getItem();
256
- log('[drop] item: ', item, 'didDrop?', monitor.didDrop());
257
- props.onDropChoice(item, props.index);
258
- }
259
- };
260
- var StyledSourceAndTarget = (0, _reactDnd.DropTarget)(NAME, choiceTarget, function (connect, monitor) {
261
- return {
262
- connectDropTarget: connect.dropTarget(),
263
- isOver: monitor.isOver()
264
- };
265
- })(StyledSource);
266
- var _default = StyledSourceAndTarget;
267
- exports["default"] = _default;
268
- //# sourceMappingURL=choice-tile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/choice-tile.jsx"],"names":["log","ChoiceTile","label","props","choice","onChoiceChange","editable","type","isDragging","connectDragSource","connectDropTarget","classes","onDelete","imageSupport","spellCheck","toolbarOpts","pluginProps","maxImageWidth","maxImageHeight","error","mathMlOptions","dragSourceOpts","filteredDefaultPlugins","DEFAULT_PLUGINS","filter","p","opacity","markup","choiceTile","width","display","dragHandle","actions","prompt","targetPrompt","includes","undefined","onLabelChange","language","controls","root","removeCircle","errorText","React","Component","PropTypes","func","isRequired","bool","id","any","object","string","isOver","empty","disabled","outcome","index","number","shape","add","choices","array","choicesLabel","Styled","theme","fill","palette","cursor","backgroundColor","common","white","margin","spacing","unit","flexDirection","justifyContent","border","borderRadius","color","fontSize","typography","main","marginLeft","marginTop","correctOrder","position","top","NAME","choiceSource","beginDrag","instanceId","StyledSource","connect","monitor","dragSource","choiceTarget","hover","drop","item","getItem","didDrop","onDropChoice","StyledSourceAndTarget","dropTarget"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,uDAAN,CAAZ;;IAEaC,U;;;;;;;;;;;;;;;sGA+BK,UAACC,KAAD,EAAW;AACzB,wBAAmC,MAAKC,KAAxC;AAAA,UAAQC,MAAR,eAAQA,MAAR;AAAA,UAAgBC,cAAhB,eAAgBA,cAAhB;AAEAD,MAAAA,MAAM,CAACF,KAAP,GAAeA,KAAf;AACAG,MAAAA,cAAc,CAACD,MAAD,CAAd;AACD,K;;;;;;WAED,kBAAS;AACP,yBAeI,KAAKD,KAfT;AAAA,6CACEC,MADF;AAAA,UACYF,KADZ,uBACYA,KADZ;AAAA,UACmBI,QADnB,uBACmBA,QADnB;AAAA,UAC6BC,IAD7B,uBAC6BA,IAD7B;AAAA,UAEEC,UAFF,gBAEEA,UAFF;AAAA,UAGEC,iBAHF,gBAGEA,iBAHF;A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AwB,UAAxB,EAAoCL,OAAO,CAACO,OAAR,EAApC,CAAH;AAEAlG,IAAAA,KAAK,CAACmG,YAAN,CAAmBH,IAAnB,EAAyBhG,KAAK,CAACsD,KAA/B;AACD;AATkB,CAArB;AAYA,IAAM8C,qBAAqB,GAAG,0BAAWf,IAAX,EAAiBQ,YAAjB,EAA+B,UAACH,OAAD,EAAUC,OAAV;AAAA,SAAuB;AAClFpF,IAAAA,iBAAiB,EAAEmF,OAAO,CAACW,UAAR,EAD+D;AAElFnD,IAAAA,MAAM,EAAEyC,OAAO,CAACzC,MAAR;AAF0E,GAAvB;AAAA,CAA/B,EAG1BuC,YAH0B,CAA9B;eAKeW,qB","sourcesContent":["import { EditableHtml, DEFAULT_PLUGINS } from '@pie-lib/pie-toolbox/editable-html';\nimport CardActions from '@material-ui/core/CardActions';\nimport DragHandle from '@material-ui/icons/DragHandle';\n\nimport { DragSource, DropTarget } from 'react-dnd';\nimport classNames from 'classnames';\n\nimport IconButton from '@material-ui/core/IconButton';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport RemoveCircle from '@material-ui/icons/RemoveCircle';\nimport debug from 'debug';\nimport { withStyles } from '@material-ui/core/styles';\nimport { color } from '@pie-lib/pie-toolbox/render-ui';\n\nconst log = debug('@pie-element:placement-ordering:configure:choice-tile');\n\nexport class ChoiceTile extends React.Component {\n static propTypes = {\n connectDragSource: PropTypes.func.isRequired,\n connectDropTarget: PropTypes.func.isRequired,\n isDragging: PropTypes.bool.isRequired,\n id: PropTypes.any,\n maxImageHeight: PropTypes.object,\n maxImageWidth: PropTypes.object,\n label: PropTypes.string,\n isOver: PropTypes.bool,\n classes: PropTypes.object.isRequired,\n type: PropTypes.string,\n empty: PropTypes.bool,\n disabled: PropTypes.bool,\n outcome: PropTypes.object,\n index: PropTypes.number,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n choice: PropTypes.object,\n choices: PropTypes.array.isRequired,\n onChoiceChange: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n toolbarOpts: PropTypes.object,\n pluginProps: PropTypes.object,\n choicesLabel: PropTypes.string,\n error: PropTypes.string,\n spellCheck: PropTypes.bool,\n };\n\n onLabelChange = (label) => {\n const { choice, onChoiceChange } = this.props;\n\n choice.label = label;\n onChoiceChange(choice);\n };\n\n render() {\n const {\n choice: { label, editable, type },\n isDragging,\n connectDragSource,\n connectDropTarget,\n classes,\n onDelete,\n imageSupport,\n spellCheck,\n toolbarOpts,\n pluginProps,\n maxImageWidth,\n maxImageHeight,\n error,\n mathMlOptions = {},\n } = this.props;\n\n const dragSourceOpts = {}; //dropEffect: moveOnDrag ? 'move' : 'copy'};\n const filteredDefaultPlugins = (DEFAULT_PLUGINS || []).filter(\n (p) => p !== 'bulleted-list' && p !== 'numbered-list',\n );\n\n const opacity = isDragging ? 0 : 1;\n const markup = (\n <div className={classes.choiceTile} style={{ opacity: opacity, width: '100%' }}>\n <div style={{ width: '100%', display: 'flex' }}>\n <CardActions>\n <span className={classNames(classes.dragHandle)}>\n <DragHandle className={classes.actions} />\n </span>\n </CardActions>\n\n <EditableHtml\n disabled={!editable}\n className={classNames(classes.prompt, !editable && classes.targetPrompt)}\n placeholder={type !== 'target' && !label.includes('data-latex') ? 'Enter a choice' : ''}\n markup={label}\n imageSupport={imageSupport || undefined}\n onChange={this.onLabelChange}\n pluginProps={pluginProps}\n toolbarOpts={toolbarOpts}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n error={editable && error}\n mathMlOptions={mathMlOptions}\n />\n\n {editable && (\n <div className={classes.controls}>\n <IconButton color=\"default\" onClick={onDelete}>\n <RemoveCircle classes={{ root: classes.removeCircle }} />\n </IconButton>\n </div>\n )}\n </div>\n\n {editable && error && <div className={classes.errorText}>{error}</div>}\n </div>\n );\n\n return connectDragSource(connectDropTarget(<div>{markup}</div>), dragSourceOpts);\n }\n}\n\nconst Styled = withStyles((theme) => ({\n removeCircle: {\n fill: theme.palette.error[500],\n },\n choiceTile: {\n cursor: 'move',\n backgroundColor: theme.palette.common.white,\n margin: `${theme.spacing.unit}px 0`,\n display: 'flex',\n flexDirection: 'column',\n },\n controls: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n prompt: {\n width: '80%',\n border: 'none',\n borderRadius: '4px',\n },\n targetPrompt: {\n backgroundColor: theme.palette.error['A100'],\n },\n actions: {\n color: theme.palette.error[400],\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n marginLeft: theme.spacing.unit * 5,\n marginTop: theme.spacing.unit,\n },\n correctOrder: {\n position: 'absolute',\n top: 0,\n fontSize: theme.typography.fontSize - 2,\n color: color.disabled(),\n },\n}))(ChoiceTile);\n\nconst NAME = 'choice-config';\n\nconst choiceSource = {\n beginDrag(props) {\n return {\n id: props.choice.id,\n index: props.index,\n type: props.choice.type,\n instanceId: props.choice.instanceId,\n };\n },\n};\n\nconst StyledSource = DragSource(NAME, choiceSource, (connect, monitor) => ({\n connectDragSource: connect.dragSource(),\n isDragging: monitor.isDragging(),\n}))(Styled);\n\nconst choiceTarget = {\n hover() {\n log('[hover]');\n },\n drop(props, monitor) {\n const item = monitor.getItem();\n log('[drop] item: ', item, 'didDrop?', monitor.didDrop());\n\n props.onDropChoice(item, props.index);\n },\n};\n\nconst StyledSourceAndTarget = DropTarget(NAME, choiceTarget, (connect, monitor) => ({\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n}))(StyledSource);\n\nexport default StyledSourceAndTarget;\n"],"file":"choice-tile.js"}
@@ -1,204 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- /** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
9
- * functionalities are not defined yet - the value for those can belong to
10
- * model or to configuration
11
- */
12
- var _default = {
13
- model: {
14
- choiceLabel: '',
15
- choices: [],
16
- correctResponse: [],
17
- enableImages: false,
18
- prompt: 'Item Stem goes here',
19
- numberedGuides: false,
20
- orientation: 'vertical',
21
- partialScoring: true,
22
- placementArea: false,
23
- removeTilesAfterPlacing: true,
24
- choiceLabelEnabled: true,
25
- scoringType: 'auto',
26
- targetLabel: '',
27
- rationaleEnabled: true,
28
- feedbackEnabled: false,
29
- promptEnabled: true,
30
- teacherInstructionsEnabled: true,
31
- studentInstructionsEnabled: true,
32
- toolbarEditorPosition: 'bottom'
33
- },
34
- configuration: {
35
- baseInputConfiguration: {
36
- audio: {
37
- disabled: false
38
- },
39
- video: {
40
- disabled: false
41
- },
42
- image: {
43
- disabled: false
44
- }
45
- },
46
- choiceLabel: {
47
- settings: true,
48
- label: 'Choice label',
49
- inputConfiguration: {
50
- audio: {
51
- disabled: false
52
- },
53
- video: {
54
- disabled: false
55
- },
56
- image: {
57
- disabled: false
58
- }
59
- }
60
- },
61
- choices: {
62
- settings: true,
63
- label: 'Choices',
64
- inputConfiguration: {
65
- audio: {
66
- disabled: true
67
- },
68
- video: {
69
- disabled: true
70
- },
71
- image: {
72
- disabled: true
73
- }
74
- }
75
- },
76
- enableImages: {
77
- settings: true,
78
- label: 'Enable Images'
79
- },
80
- feedback: {
81
- settings: true,
82
- label: 'Feedback',
83
- enabled: true
84
- },
85
- prompt: {
86
- settings: true,
87
- label: 'Item Stem',
88
- required: false,
89
- inputConfiguration: {
90
- audio: {
91
- disabled: false
92
- },
93
- video: {
94
- disabled: false
95
- },
96
- image: {
97
- disabled: false
98
- }
99
- }
100
- },
101
- numberedGuides: {
102
- settings: true,
103
- label: 'Numbered guides'
104
- },
105
- orientation: {
106
- settings: true,
107
- label: 'Orientation'
108
- },
109
- partialScoring: {
110
- settings: false,
111
- label: 'Allow Partial Scoring'
112
- },
113
- placementArea: {
114
- settings: true,
115
- label: 'Placement Area'
116
- },
117
- rationale: {
118
- settings: true,
119
- label: 'Rationale',
120
- required: false,
121
- inputConfiguration: {
122
- audio: {
123
- disabled: false
124
- },
125
- video: {
126
- disabled: false
127
- },
128
- image: {
129
- disabled: false
130
- }
131
- }
132
- },
133
- removeTilesAfterPlacing: {
134
- settings: false,
135
- label: 'Remove Tiles after placing'
136
- },
137
- settingsPanelDisabled: false,
138
- scoringType: {
139
- settings: false,
140
- label: 'Scoring Type'
141
- },
142
- studentInstructions: {
143
- settings: false,
144
- label: 'Student Instructions'
145
- },
146
- targetLabel: {
147
- settings: true,
148
- label: 'Target label'
149
- },
150
- spellCheck: {
151
- label: 'Spellcheck',
152
- settings: false,
153
- enabled: true
154
- },
155
- teacherInstructions: {
156
- settings: true,
157
- label: 'Teacher Instructions',
158
- required: false,
159
- inputConfiguration: {
160
- audio: {
161
- disabled: false
162
- },
163
- video: {
164
- disabled: false
165
- },
166
- image: {
167
- disabled: false
168
- }
169
- }
170
- },
171
- maxImageWidth: {
172
- teacherInstructions: 300,
173
- prompt: 300,
174
- rationale: 300,
175
- choicesWithPlacementArea: 240,
176
- choicesWithoutPlacementArea: 300
177
- },
178
- maxImageHeight: {
179
- teacherInstructions: 300,
180
- prompt: 300,
181
- rationale: 300,
182
- choices: 150
183
- },
184
- withRubric: {
185
- settings: false,
186
- label: 'Add Rubric'
187
- },
188
- mathMlOptions: {
189
- mmlOutput: false,
190
- mmlEditing: false
191
- },
192
- language: {
193
- settings: false,
194
- label: 'Specify Language',
195
- enabled: false
196
- },
197
- languageChoices: {
198
- label: 'Language Choices',
199
- options: []
200
- }
201
- }
202
- };
203
- exports["default"] = _default;
204
- //# sourceMappingURL=defaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","choiceLabel","choices","correctResponse","enableImages","prompt","numberedGuides","orientation","partialScoring","placementArea","removeTilesAfterPlacing","choiceLabelEnabled","scoringType","targetLabel","rationaleEnabled","feedbackEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","baseInputConfiguration","audio","disabled","video","image","settings","label","inputConfiguration","feedback","enabled","required","rationale","settingsPanelDisabled","studentInstructions","spellCheck","teacherInstructions","maxImageWidth","choicesWithPlacementArea","choicesWithoutPlacementArea","maxImageHeight","withRubric","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,WAAW,EAAE,EADR;AAELC,IAAAA,OAAO,EAAE,EAFJ;AAGLC,IAAAA,eAAe,EAAE,EAHZ;AAILC,IAAAA,YAAY,EAAE,KAJT;AAKLC,IAAAA,MAAM,EAAE,qBALH;AAMLC,IAAAA,cAAc,EAAE,KANX;AAOLC,IAAAA,WAAW,EAAE,UAPR;AAQLC,IAAAA,cAAc,EAAE,IARX;AASLC,IAAAA,aAAa,EAAE,KATV;AAULC,IAAAA,uBAAuB,EAAE,IAVpB;AAWLC,IAAAA,kBAAkB,EAAE,IAXf;AAYLC,IAAAA,WAAW,EAAE,MAZR;AAaLC,IAAAA,WAAW,EAAE,EAbR;AAcLC,IAAAA,gBAAgB,EAAE,IAdb;AAeLC,IAAAA,eAAe,EAAE,KAfZ;AAgBLC,IAAAA,aAAa,EAAE,IAhBV;AAiBLC,IAAAA,0BAA0B,EAAE,IAjBvB;AAkBLC,IAAAA,0BAA0B,EAAE,IAlBvB;AAmBLC,IAAAA,qBAAqB,EAAE;AAnBlB,GADM;AAsBbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,sBAAsB,EAAE;AACtBC,MAAAA,KAAK,EAAE;AAAEC,QAAAA,QAAQ,EAAE;AAAZ,OADe;AAEtBC,MAAAA,KAAK,EAAE;AAAED,QAAAA,QAAQ,EAAE;AAAZ,OAFe;AAGtBE,MAAAA,KAAK,EAAE;AAAEF,QAAAA,QAAQ,EAAE;AAAZ;AAHe,KADX;AAMbtB,IAAAA,WAAW,EAAE;AACXyB,MAAAA,QAAQ,EAAE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BADQ;AAEfoB,MAAAA,OAAO,EAAE;AAFM;AA/HJ;AAtBF,C","sourcesContent":["/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType\n * functionalities are not defined yet - the value for those can belong to\n * model or to configuration\n */\n\nexport default {\n model: {\n choiceLabel: '',\n choices: [],\n correctResponse: [],\n enableImages: false,\n prompt: 'Item Stem goes here',\n numberedGuides: false,\n orientation: 'vertical',\n partialScoring: true,\n placementArea: false,\n removeTilesAfterPlacing: true,\n choiceLabelEnabled: true,\n scoringType: 'auto',\n targetLabel: '',\n rationaleEnabled: true,\n feedbackEnabled: false,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n choiceLabel: {\n settings: true,\n label: 'Choice label',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n choices: {\n settings: true,\n label: 'Choices',\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: true },\n },\n },\n enableImages: {\n settings: true,\n label: 'Enable Images',\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true,\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 numberedGuides: {\n settings: true,\n label: 'Numbered guides',\n },\n orientation: {\n settings: true,\n label: 'Orientation',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n placementArea: {\n settings: true,\n label: 'Placement Area',\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 removeTilesAfterPlacing: {\n settings: false,\n label: 'Remove Tiles after placing',\n },\n settingsPanelDisabled: false,\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n targetLabel: {\n settings: true,\n label: 'Target label',\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\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 maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n choicesWithPlacementArea: 240,\n choicesWithoutPlacementArea: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n choices: 150,\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"}