@pie-lib/rubric 0.24.1-next.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.js +586 -0
- package/esm/index.js.map +1 -0
- package/package.json +10 -3
package/esm/index.js
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import OutlinedInput from '@material-ui/core/OutlinedInput';
|
|
6
|
+
import InputLabel from '@material-ui/core/InputLabel';
|
|
7
|
+
import Select from '@material-ui/core/Select';
|
|
8
|
+
import FormControl from '@material-ui/core/FormControl';
|
|
9
|
+
import MenuItem from '@material-ui/core/MenuItem';
|
|
10
|
+
import times from 'lodash/times';
|
|
11
|
+
import Checkbox from '@material-ui/core/Checkbox';
|
|
12
|
+
import FormGroup from '@material-ui/core/FormGroup';
|
|
13
|
+
import FormControlLabel from '@material-ui/core/FormControlLabel';
|
|
14
|
+
import grey from '@material-ui/core/colors/grey';
|
|
15
|
+
import Typography from '@material-ui/core/Typography';
|
|
16
|
+
import DragIndicator from '@material-ui/icons/DragIndicator';
|
|
17
|
+
import EditableHtml from '@pie-lib/editable-html';
|
|
18
|
+
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
19
|
+
import debug from 'debug';
|
|
20
|
+
import takeRight from 'lodash/takeRight';
|
|
21
|
+
import Menu from '@material-ui/core/Menu';
|
|
22
|
+
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
23
|
+
import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
|
|
24
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
25
|
+
import range from 'lodash/range';
|
|
26
|
+
import { InputContainer } from '@pie-lib/config-ui';
|
|
27
|
+
|
|
28
|
+
function _extends() {
|
|
29
|
+
_extends = Object.assign || function (target) {
|
|
30
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
31
|
+
var source = arguments[i];
|
|
32
|
+
|
|
33
|
+
for (var key in source) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
35
|
+
target[key] = source[key];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return target;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return _extends.apply(this, arguments);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class IconMenu extends React.Component {
|
|
47
|
+
constructor(props) {
|
|
48
|
+
super(props);
|
|
49
|
+
|
|
50
|
+
this.handleClick = event => this.setState({
|
|
51
|
+
open: true,
|
|
52
|
+
anchorEl: event.currentTarget
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
this.handleRequestClose = () => this.setState({
|
|
56
|
+
open: false
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
this.state = {
|
|
60
|
+
anchorEl: undefined,
|
|
61
|
+
open: false
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
render() {
|
|
66
|
+
const {
|
|
67
|
+
opts,
|
|
68
|
+
onClick,
|
|
69
|
+
classes
|
|
70
|
+
} = this.props;
|
|
71
|
+
const {
|
|
72
|
+
open,
|
|
73
|
+
anchorEl
|
|
74
|
+
} = this.state;
|
|
75
|
+
const keys = Object.keys(opts) || [];
|
|
76
|
+
|
|
77
|
+
const handleMenuClick = key => () => {
|
|
78
|
+
onClick(key);
|
|
79
|
+
this.handleRequestClose();
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const iconColor = open ? 'inherit' : 'disabled';
|
|
83
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
onClick: this.handleClick
|
|
85
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
86
|
+
className: classes.icon
|
|
87
|
+
}, open ? /*#__PURE__*/React.createElement(MoreVertIcon, {
|
|
88
|
+
color: iconColor
|
|
89
|
+
}) : /*#__PURE__*/React.createElement(MoreHorizIcon, {
|
|
90
|
+
color: iconColor
|
|
91
|
+
}))), /*#__PURE__*/React.createElement(Menu, {
|
|
92
|
+
id: "point-menu",
|
|
93
|
+
anchorEl: anchorEl,
|
|
94
|
+
open: open,
|
|
95
|
+
onClose: this.handleRequestClose,
|
|
96
|
+
style: {
|
|
97
|
+
transform: 'translate(-15px, -15px)'
|
|
98
|
+
},
|
|
99
|
+
transformOrigin: {
|
|
100
|
+
vertical: 'center',
|
|
101
|
+
horizontal: 'right'
|
|
102
|
+
}
|
|
103
|
+
}, keys.map((k, index) => /*#__PURE__*/React.createElement(MenuItem, {
|
|
104
|
+
key: index,
|
|
105
|
+
onClick: handleMenuClick(k)
|
|
106
|
+
}, opts[k]))));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
IconMenu.propTypes = {
|
|
111
|
+
opts: PropTypes.object,
|
|
112
|
+
onClick: PropTypes.func.isRequired,
|
|
113
|
+
classes: PropTypes.object.isRequired
|
|
114
|
+
};
|
|
115
|
+
class PointMenu extends React.Component {
|
|
116
|
+
render() {
|
|
117
|
+
const {
|
|
118
|
+
onChange,
|
|
119
|
+
classes,
|
|
120
|
+
showSampleAnswer
|
|
121
|
+
} = this.props;
|
|
122
|
+
const sampleText = showSampleAnswer ? 'Provide Sample Response' : 'Remove Sample Response';
|
|
123
|
+
return /*#__PURE__*/React.createElement(IconMenu, {
|
|
124
|
+
onClick: key => onChange(key),
|
|
125
|
+
opts: {
|
|
126
|
+
sample: sampleText
|
|
127
|
+
},
|
|
128
|
+
classes: classes
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
PointMenu.propTypes = {
|
|
134
|
+
onChange: PropTypes.func.isRequired,
|
|
135
|
+
classes: PropTypes.object.isRequired,
|
|
136
|
+
showSampleAnswer: PropTypes.bool.isRequired
|
|
137
|
+
};
|
|
138
|
+
PointMenu.defaultProps = {
|
|
139
|
+
classes: {}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const log = debug('pie-lib:rubric:authoring');
|
|
143
|
+
|
|
144
|
+
const reorder = (list, startIndex, endIndex) => {
|
|
145
|
+
const result = Array.from(list);
|
|
146
|
+
const [removed] = result.splice(startIndex, 1);
|
|
147
|
+
result.splice(endIndex, 0, removed);
|
|
148
|
+
return result;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const RubricType = PropTypes.shape({
|
|
152
|
+
excludeZero: PropTypes.bool,
|
|
153
|
+
points: PropTypes.arrayOf(PropTypes.string),
|
|
154
|
+
sampleAnswers: PropTypes.arrayOf(PropTypes.string),
|
|
155
|
+
maxPoints: PropTypes.number,
|
|
156
|
+
rubriclessInstruction: PropTypes.string
|
|
157
|
+
});
|
|
158
|
+
const MaxPoints = withStyles(theme => ({
|
|
159
|
+
formControl: {
|
|
160
|
+
minWidth: '120px',
|
|
161
|
+
margin: theme.spacing.unit
|
|
162
|
+
}
|
|
163
|
+
}))(props => {
|
|
164
|
+
const {
|
|
165
|
+
value,
|
|
166
|
+
onChange,
|
|
167
|
+
max,
|
|
168
|
+
classes
|
|
169
|
+
} = props;
|
|
170
|
+
return /*#__PURE__*/React.createElement(FormControl, {
|
|
171
|
+
className: classes.formControl,
|
|
172
|
+
variant: "outlined"
|
|
173
|
+
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
174
|
+
width: 100,
|
|
175
|
+
htmlFor: "..."
|
|
176
|
+
}, "Max Points"), /*#__PURE__*/React.createElement(Select, {
|
|
177
|
+
value: value,
|
|
178
|
+
onChange: e => onChange(e.target.value),
|
|
179
|
+
input: /*#__PURE__*/React.createElement(OutlinedInput, {
|
|
180
|
+
labelWidth: 80
|
|
181
|
+
})
|
|
182
|
+
}, range(1, max + 1).map(v => /*#__PURE__*/React.createElement(MenuItem, {
|
|
183
|
+
key: `${v}`,
|
|
184
|
+
value: v
|
|
185
|
+
}, v))));
|
|
186
|
+
}); // if the value is null or 'null', the Sample Answer input field for that point will not be dispalyed
|
|
187
|
+
// if the value is '', the Sample Answer input field will be empty
|
|
188
|
+
|
|
189
|
+
const checkSampleAnswer = sampleAnswer => sampleAnswer === null || sampleAnswer === 'null';
|
|
190
|
+
|
|
191
|
+
const PointConfig = withStyles(theme => ({
|
|
192
|
+
pointConfig: {},
|
|
193
|
+
row: {
|
|
194
|
+
display: 'flex',
|
|
195
|
+
width: '100%',
|
|
196
|
+
position: 'relative'
|
|
197
|
+
},
|
|
198
|
+
editor: {
|
|
199
|
+
width: '100%',
|
|
200
|
+
backgroundColor: `${theme.palette.common.white} !important`
|
|
201
|
+
},
|
|
202
|
+
dragIndicator: {
|
|
203
|
+
paddingTop: theme.spacing.unit,
|
|
204
|
+
color: grey[500]
|
|
205
|
+
},
|
|
206
|
+
pointsLabel: {
|
|
207
|
+
color: grey[500],
|
|
208
|
+
paddingBottom: theme.spacing.unit,
|
|
209
|
+
textTransform: 'uppercase'
|
|
210
|
+
},
|
|
211
|
+
sampleAnswersEditor: {
|
|
212
|
+
paddingLeft: theme.spacing.unit * 3
|
|
213
|
+
},
|
|
214
|
+
pointMenu: {
|
|
215
|
+
position: 'absolute',
|
|
216
|
+
right: 0
|
|
217
|
+
},
|
|
218
|
+
errorText: {
|
|
219
|
+
fontSize: theme.typography.fontSize - 2,
|
|
220
|
+
color: theme.palette.error.main,
|
|
221
|
+
paddingLeft: theme.spacing.unit * 3,
|
|
222
|
+
paddingTop: theme.spacing.unit
|
|
223
|
+
}
|
|
224
|
+
}))(props => {
|
|
225
|
+
const {
|
|
226
|
+
points,
|
|
227
|
+
content,
|
|
228
|
+
classes,
|
|
229
|
+
sampleAnswer,
|
|
230
|
+
mathMlOptions = {},
|
|
231
|
+
error,
|
|
232
|
+
pluginOpts = {}
|
|
233
|
+
} = props;
|
|
234
|
+
const pointsLabel = `${points} ${points <= 1 ? 'pt' : 'pts'}`;
|
|
235
|
+
const showSampleAnswer = checkSampleAnswer(sampleAnswer);
|
|
236
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
237
|
+
className: classes.pointConfig
|
|
238
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
239
|
+
variant: "overline",
|
|
240
|
+
className: classes.pointsLabel
|
|
241
|
+
}, pointsLabel), /*#__PURE__*/React.createElement("div", {
|
|
242
|
+
className: classes.row
|
|
243
|
+
}, /*#__PURE__*/React.createElement(DragIndicator, {
|
|
244
|
+
className: classes.dragIndicator
|
|
245
|
+
}), /*#__PURE__*/React.createElement(EditableHtml, {
|
|
246
|
+
className: classes.editor,
|
|
247
|
+
error: error,
|
|
248
|
+
pluginProps: pluginOpts,
|
|
249
|
+
markup: content,
|
|
250
|
+
onChange: props.onChange,
|
|
251
|
+
mathMlOptions: mathMlOptions
|
|
252
|
+
}), /*#__PURE__*/React.createElement(PointMenu, {
|
|
253
|
+
classes: {
|
|
254
|
+
icon: classes.pointMenu
|
|
255
|
+
},
|
|
256
|
+
showSampleAnswer: showSampleAnswer,
|
|
257
|
+
onChange: props.onMenuChange
|
|
258
|
+
})), error && /*#__PURE__*/React.createElement("div", {
|
|
259
|
+
className: classes.errorText
|
|
260
|
+
}, error), !showSampleAnswer && /*#__PURE__*/React.createElement("div", {
|
|
261
|
+
className: classes.sampleAnswersEditor
|
|
262
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
263
|
+
variant: "overline",
|
|
264
|
+
className: classes.dragIndicator
|
|
265
|
+
}, "Sample Response"), /*#__PURE__*/React.createElement(EditableHtml, {
|
|
266
|
+
className: classes.editor,
|
|
267
|
+
markup: sampleAnswer,
|
|
268
|
+
pluginProps: pluginOpts,
|
|
269
|
+
onChange: props.onSampleChange,
|
|
270
|
+
mathMlOptions: mathMlOptions
|
|
271
|
+
})));
|
|
272
|
+
});
|
|
273
|
+
class RawAuthoring extends React.Component {
|
|
274
|
+
constructor(...args) {
|
|
275
|
+
super(...args);
|
|
276
|
+
|
|
277
|
+
this.dragEnd = result => {
|
|
278
|
+
if (!result.destination) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const {
|
|
283
|
+
value,
|
|
284
|
+
onChange
|
|
285
|
+
} = this.props;
|
|
286
|
+
const points = reorder(value.points, result.source.index, result.destination.index);
|
|
287
|
+
const sampleAnswers = reorder(value.sampleAnswers, result.source.index, result.destination.index);
|
|
288
|
+
onChange(_extends({}, value, {
|
|
289
|
+
points,
|
|
290
|
+
sampleAnswers
|
|
291
|
+
}));
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
this.changeRubriclessInstruction = input => {
|
|
295
|
+
const {
|
|
296
|
+
value,
|
|
297
|
+
onChange
|
|
298
|
+
} = this.props;
|
|
299
|
+
onChange(_extends({}, value, {
|
|
300
|
+
rubriclessInstruction: input
|
|
301
|
+
}));
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
this.changeMaxPoints = maxPoints => {
|
|
305
|
+
const {
|
|
306
|
+
value,
|
|
307
|
+
onChange,
|
|
308
|
+
rubricless
|
|
309
|
+
} = this.props;
|
|
310
|
+
const currentMax = value.points.length - 1;
|
|
311
|
+
log('current', currentMax, 'new: ', maxPoints);
|
|
312
|
+
let points, sampleAnswers;
|
|
313
|
+
|
|
314
|
+
if (maxPoints > currentMax) {
|
|
315
|
+
points = times(maxPoints - currentMax).map(() => '').concat(value.points);
|
|
316
|
+
sampleAnswers = times(maxPoints - currentMax).map(() => null).concat(value.sampleAnswers);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (maxPoints < currentMax) {
|
|
320
|
+
log('less than');
|
|
321
|
+
points = takeRight(value.points, maxPoints + 1);
|
|
322
|
+
sampleAnswers = takeRight(value.sampleAnswers, maxPoints + 1);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if (points && !rubricless) {
|
|
326
|
+
onChange(_extends({}, value, {
|
|
327
|
+
points,
|
|
328
|
+
sampleAnswers,
|
|
329
|
+
maxPoints
|
|
330
|
+
}));
|
|
331
|
+
} else {
|
|
332
|
+
onChange(_extends({}, value, {
|
|
333
|
+
maxPoints
|
|
334
|
+
}));
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
this.changeContent = (index, content, type) => {
|
|
339
|
+
// type could be 'points' or 'sampleAnswers'
|
|
340
|
+
log(`changeModel[${type}]:`, index, content);
|
|
341
|
+
|
|
342
|
+
if (type !== 'points' && type !== 'sampleAnswers') {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const {
|
|
347
|
+
value,
|
|
348
|
+
onChange
|
|
349
|
+
} = this.props;
|
|
350
|
+
const items = value[type] && Array.from(value[type]);
|
|
351
|
+
items.splice(index, 1, content);
|
|
352
|
+
log(`changeModel[${type}]:`, items);
|
|
353
|
+
onChange(_extends({}, value, {
|
|
354
|
+
[type]: items
|
|
355
|
+
}));
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
this.excludeZeros = () => {
|
|
359
|
+
const {
|
|
360
|
+
value,
|
|
361
|
+
onChange
|
|
362
|
+
} = this.props;
|
|
363
|
+
onChange(_extends({}, value, {
|
|
364
|
+
excludeZero: !value.excludeZero
|
|
365
|
+
}));
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
this.shouldRenderPoint = (index, value) => {
|
|
369
|
+
if (!value.excludeZero) {
|
|
370
|
+
return true;
|
|
371
|
+
} else {
|
|
372
|
+
if (index < value.points.length - 1) {
|
|
373
|
+
return true;
|
|
374
|
+
} else if (index === value.points.length - 1) {
|
|
375
|
+
return false;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
return true;
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
this.onPointMenuChange = (index, clickedItem) => {
|
|
383
|
+
if (clickedItem === 'sample') {
|
|
384
|
+
const {
|
|
385
|
+
value
|
|
386
|
+
} = this.props;
|
|
387
|
+
const sampleAnswers = Array.from(value.sampleAnswers || []);
|
|
388
|
+
|
|
389
|
+
if (checkSampleAnswer(sampleAnswers[index])) {
|
|
390
|
+
// an empty string will display an empty Sample Answer input field
|
|
391
|
+
this.changeContent(index, '', 'sampleAnswers');
|
|
392
|
+
} else {
|
|
393
|
+
// when the content is null or 'null', the Sample Answer input field will not be displayed
|
|
394
|
+
this.changeContent(index, null, 'sampleAnswers');
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
render() {
|
|
401
|
+
const {
|
|
402
|
+
classes,
|
|
403
|
+
className,
|
|
404
|
+
value,
|
|
405
|
+
mathMlOptions = {},
|
|
406
|
+
config = {},
|
|
407
|
+
rubricless = false,
|
|
408
|
+
pluginOpts = {}
|
|
409
|
+
} = this.props;
|
|
410
|
+
let {
|
|
411
|
+
excludeZeroEnabled = true,
|
|
412
|
+
maxPointsEnabled = true,
|
|
413
|
+
errors = {},
|
|
414
|
+
rubriclessInstructionEnabled = false,
|
|
415
|
+
maxPoints = 10
|
|
416
|
+
} = value || {}; // rubric will contain a max value for maxPoints
|
|
417
|
+
|
|
418
|
+
const {
|
|
419
|
+
rubriclessInstruction = {},
|
|
420
|
+
maxMaxPoints = 10
|
|
421
|
+
} = config || {};
|
|
422
|
+
const {
|
|
423
|
+
pointsDescriptorsErrors
|
|
424
|
+
} = errors || {};
|
|
425
|
+
|
|
426
|
+
if (value && Number.isFinite(value.maxPoints)) {
|
|
427
|
+
// eslint-disable-next-line no-console
|
|
428
|
+
console.warn('maxPoints is deprecated - remove from model');
|
|
429
|
+
} // for rubric value is computed based on points
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
const maxPointsValue = !rubricless ? value.points.length - 1 : maxPoints;
|
|
433
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
434
|
+
className: classNames(classes.class, className)
|
|
435
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
436
|
+
variant: "h5",
|
|
437
|
+
className: classes.rubricTitle
|
|
438
|
+
}, "Rubric"), /*#__PURE__*/React.createElement(FormGroup, {
|
|
439
|
+
row: true
|
|
440
|
+
}, maxPointsEnabled && /*#__PURE__*/React.createElement(MaxPoints, {
|
|
441
|
+
max: maxMaxPoints < 100 ? maxMaxPoints : 100,
|
|
442
|
+
value: maxPointsValue,
|
|
443
|
+
onChange: this.changeMaxPoints,
|
|
444
|
+
pluginOpts: pluginOpts
|
|
445
|
+
}), excludeZeroEnabled && /*#__PURE__*/React.createElement(FormControlLabel, {
|
|
446
|
+
label: "Exclude zeros",
|
|
447
|
+
control: /*#__PURE__*/React.createElement(Checkbox, {
|
|
448
|
+
checked: value.excludeZero,
|
|
449
|
+
onChange: this.excludeZeros
|
|
450
|
+
})
|
|
451
|
+
})), rubriclessInstructionEnabled && rubricless && /*#__PURE__*/React.createElement(InputContainer, {
|
|
452
|
+
label: rubriclessInstruction.label,
|
|
453
|
+
className: classes.inputContainer
|
|
454
|
+
}, /*#__PURE__*/React.createElement(EditableHtml, {
|
|
455
|
+
className: classes.input,
|
|
456
|
+
markup: value.rubriclessInstruction || '',
|
|
457
|
+
onChange: this.changeRubriclessInstruction,
|
|
458
|
+
pluginProps: pluginOpts,
|
|
459
|
+
nonEmpty: false,
|
|
460
|
+
disableUnderline: true,
|
|
461
|
+
languageCharactersProps: [{
|
|
462
|
+
language: 'spanish'
|
|
463
|
+
}, {
|
|
464
|
+
language: 'special'
|
|
465
|
+
}],
|
|
466
|
+
mathMlOptions: mathMlOptions
|
|
467
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
468
|
+
className: rubricless ? classes.rubricless : classes.container
|
|
469
|
+
}, /*#__PURE__*/React.createElement(DragDropContext, {
|
|
470
|
+
onDragEnd: this.dragEnd
|
|
471
|
+
}, /*#__PURE__*/React.createElement(Droppable, {
|
|
472
|
+
droppableId: "droppable"
|
|
473
|
+
}, provided => /*#__PURE__*/React.createElement("div", _extends({}, provided.droppableProps, {
|
|
474
|
+
ref: provided.innerRef
|
|
475
|
+
}), value.points.map((p, index) => this.shouldRenderPoint(index, value) && /*#__PURE__*/React.createElement(Draggable, {
|
|
476
|
+
key: `${p.points}-${index}`,
|
|
477
|
+
index: index,
|
|
478
|
+
draggableId: index.toString()
|
|
479
|
+
}, provided => /*#__PURE__*/React.createElement("div", _extends({
|
|
480
|
+
className: classes.configHolder,
|
|
481
|
+
ref: provided.innerRef
|
|
482
|
+
}, provided.draggableProps, provided.dragHandleProps), /*#__PURE__*/React.createElement(PointConfig, {
|
|
483
|
+
points: value.points.length - 1 - index,
|
|
484
|
+
content: p,
|
|
485
|
+
error: pointsDescriptorsErrors && pointsDescriptorsErrors[value.points.length - 1 - index],
|
|
486
|
+
sampleAnswer: value.sampleAnswers && value.sampleAnswers[index],
|
|
487
|
+
onChange: content => this.changeContent(index, content, 'points'),
|
|
488
|
+
onSampleChange: content => this.changeContent(index, content, 'sampleAnswers'),
|
|
489
|
+
onMenuChange: clickedItem => this.onPointMenuChange(index, clickedItem),
|
|
490
|
+
mathMlOptions: mathMlOptions,
|
|
491
|
+
pluginOpts: pluginOpts
|
|
492
|
+
})))), provided.placeholder)))));
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
}
|
|
496
|
+
RawAuthoring.propTypes = {
|
|
497
|
+
classes: PropTypes.object.isRequired,
|
|
498
|
+
className: PropTypes.string,
|
|
499
|
+
value: RubricType,
|
|
500
|
+
config: PropTypes.object,
|
|
501
|
+
pluginOpts: PropTypes.object,
|
|
502
|
+
rubricless: PropTypes.bool,
|
|
503
|
+
onChange: PropTypes.func
|
|
504
|
+
};
|
|
505
|
+
RawAuthoring.defaultProps = {};
|
|
506
|
+
|
|
507
|
+
const styles = theme => ({
|
|
508
|
+
container: {
|
|
509
|
+
backgroundColor: grey[200],
|
|
510
|
+
borderWidth: 1,
|
|
511
|
+
borderStyle: 'solid',
|
|
512
|
+
borderColor: grey[300],
|
|
513
|
+
padding: theme.spacing.unit * 2,
|
|
514
|
+
margin: theme.spacing.unit
|
|
515
|
+
},
|
|
516
|
+
inputContainer: {
|
|
517
|
+
width: '100%',
|
|
518
|
+
paddingTop: theme.spacing.unit * 2,
|
|
519
|
+
marginBottom: theme.spacing.unit * 2
|
|
520
|
+
},
|
|
521
|
+
rubricless: {
|
|
522
|
+
display: 'none'
|
|
523
|
+
},
|
|
524
|
+
configHolder: {
|
|
525
|
+
paddingTop: theme.spacing.unit,
|
|
526
|
+
paddingBottom: theme.spacing.unit
|
|
527
|
+
},
|
|
528
|
+
rubricTitle: {
|
|
529
|
+
paddingLeft: theme.spacing.unit,
|
|
530
|
+
margin: theme.spacing.unit
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
const StyledRawAuthoring = withStyles(styles)(RawAuthoring);
|
|
535
|
+
|
|
536
|
+
const Reverse = props => {
|
|
537
|
+
const {
|
|
538
|
+
rubricless = false,
|
|
539
|
+
config = {},
|
|
540
|
+
pluginOpts = {}
|
|
541
|
+
} = props || {};
|
|
542
|
+
const points = Array.from(props.value.points || []).reverse();
|
|
543
|
+
let sampleAnswers = Array.from(props.value.sampleAnswers || []).reverse();
|
|
544
|
+
|
|
545
|
+
if (points.length > sampleAnswers.length) {
|
|
546
|
+
sampleAnswers = times(points.length - sampleAnswers.length).map(() => null).concat(sampleAnswers);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
const value = _extends({}, props.value, {
|
|
550
|
+
points,
|
|
551
|
+
sampleAnswers
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
const onChange = value => {
|
|
555
|
+
props.onChange(_extends({}, value, {
|
|
556
|
+
points: Array.from(value.points || []).reverse(),
|
|
557
|
+
sampleAnswers: Array.from(value.sampleAnswers || []).reverse()
|
|
558
|
+
}));
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
return /*#__PURE__*/React.createElement(StyledRawAuthoring, {
|
|
562
|
+
value: value,
|
|
563
|
+
config: config,
|
|
564
|
+
onChange: onChange,
|
|
565
|
+
rubricless: rubricless,
|
|
566
|
+
pluginOpts: pluginOpts
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
Reverse.propTypes = {
|
|
571
|
+
value: RubricType,
|
|
572
|
+
config: PropTypes.object,
|
|
573
|
+
pluginOpts: PropTypes.object,
|
|
574
|
+
rubricless: PropTypes.bool,
|
|
575
|
+
getIndex: PropTypes.func,
|
|
576
|
+
onChange: PropTypes.func
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
const RUBRIC_TYPES = {
|
|
580
|
+
SIMPLE_RUBRIC: 'simpleRubric',
|
|
581
|
+
MULTI_TRAIT_RUBRIC: 'multiTraitRubric',
|
|
582
|
+
RUBRICLESS: 'rubricless'
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
export { Reverse as Authoring, RUBRIC_TYPES };
|
|
586
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/point-menu.jsx","../src/authoring.jsx","../src/index.js"],"sourcesContent":["import Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\nimport IconButton from '@material-ui/core/IconButton';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nexport class IconMenu extends React.Component {\n static propTypes = {\n opts: PropTypes.object,\n onClick: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n anchorEl: undefined,\n open: false,\n };\n }\n\n handleClick = (event) => this.setState({ open: true, anchorEl: event.currentTarget });\n\n handleRequestClose = () => this.setState({ open: false });\n\n render() {\n const { opts, onClick, classes } = this.props;\n const { open, anchorEl } = this.state;\n const keys = Object.keys(opts) || [];\n\n const handleMenuClick = (key) => () => {\n onClick(key);\n this.handleRequestClose();\n };\n\n const iconColor = open ? 'inherit' : 'disabled';\n\n return (\n <div>\n <div onClick={this.handleClick}>\n <IconButton className={classes.icon}>\n {open ? <MoreVertIcon color={iconColor} /> : <MoreHorizIcon color={iconColor} />}\n </IconButton>\n </div>\n <Menu\n id=\"point-menu\"\n anchorEl={anchorEl}\n open={open}\n onClose={this.handleRequestClose}\n style={{ transform: 'translate(-15px, -15px)' }}\n transformOrigin={{\n vertical: 'center',\n horizontal: 'right',\n }}\n >\n {keys.map((k, index) => (\n <MenuItem key={index} onClick={handleMenuClick(k)}>\n {opts[k]}\n </MenuItem>\n ))}\n </Menu>\n </div>\n );\n }\n}\n\nexport default class PointMenu extends React.Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n showSampleAnswer: PropTypes.bool.isRequired,\n };\n\n static defaultProps = {\n classes: {},\n };\n\n render() {\n const { onChange, classes, showSampleAnswer } = this.props;\n const sampleText = showSampleAnswer ? 'Provide Sample Response' : 'Remove Sample Response';\n\n return (\n <IconMenu\n onClick={(key) => onChange(key)}\n opts={{\n sample: sampleText,\n }}\n classes={classes}\n />\n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport Select from '@material-ui/core/Select';\nimport FormControl from '@material-ui/core/FormControl';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport times from 'lodash/times';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormGroup from '@material-ui/core/FormGroup';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport grey from '@material-ui/core/colors/grey';\nimport Typography from '@material-ui/core/Typography';\nimport DragIndicator from '@material-ui/icons/DragIndicator';\nimport EditableHtml from '@pie-lib/editable-html';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport debug from 'debug';\nimport takeRight from 'lodash/takeRight';\nimport PointMenu from './point-menu';\n\nimport range from 'lodash/range';\nimport { InputContainer } from '@pie-lib/config-ui';\n\nconst log = debug('pie-lib:rubric:authoring');\n\nconst reorder = (list, startIndex, endIndex) => {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n\n result.splice(endIndex, 0, removed);\n\n return result;\n};\n\nexport const RubricType = PropTypes.shape({\n excludeZero: PropTypes.bool,\n points: PropTypes.arrayOf(PropTypes.string),\n sampleAnswers: PropTypes.arrayOf(PropTypes.string),\n maxPoints: PropTypes.number,\n rubriclessInstruction: PropTypes.string,\n});\n\nconst MaxPoints = withStyles((theme) => ({\n formControl: {\n minWidth: '120px',\n margin: theme.spacing.unit,\n },\n}))((props) => {\n const { value, onChange, max, classes } = props;\n\n return (\n <FormControl className={classes.formControl} variant=\"outlined\">\n <InputLabel width={100} htmlFor=\"...\">\n Max Points\n </InputLabel>\n <Select value={value} onChange={(e) => onChange(e.target.value)} input={<OutlinedInput labelWidth={80} />}>\n {range(1, max + 1).map((v) => (\n <MenuItem key={`${v}`} value={v}>\n {v}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n );\n});\n\n// if the value is null or 'null', the Sample Answer input field for that point will not be dispalyed\n// if the value is '', the Sample Answer input field will be empty\nconst checkSampleAnswer = (sampleAnswer) => sampleAnswer === null || sampleAnswer === 'null';\n\nexport const PointConfig = withStyles((theme) => ({\n pointConfig: {},\n row: {\n display: 'flex',\n width: '100%',\n position: 'relative',\n },\n editor: {\n width: '100%',\n backgroundColor: `${theme.palette.common.white} !important`,\n },\n dragIndicator: {\n paddingTop: theme.spacing.unit,\n color: grey[500],\n },\n pointsLabel: {\n color: grey[500],\n paddingBottom: theme.spacing.unit,\n textTransform: 'uppercase',\n },\n sampleAnswersEditor: {\n paddingLeft: theme.spacing.unit * 3,\n },\n pointMenu: {\n position: 'absolute',\n right: 0,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingLeft: theme.spacing.unit * 3,\n paddingTop: theme.spacing.unit,\n },\n}))((props) => {\n const { points, content, classes, sampleAnswer, mathMlOptions = {}, error, pluginOpts = {} } = props;\n const pointsLabel = `${points} ${points <= 1 ? 'pt' : 'pts'}`;\n const showSampleAnswer = checkSampleAnswer(sampleAnswer);\n\n return (\n <div className={classes.pointConfig}>\n <Typography variant=\"overline\" className={classes.pointsLabel}>\n {pointsLabel}\n </Typography>\n\n <div className={classes.row}>\n <DragIndicator className={classes.dragIndicator} />\n <EditableHtml\n className={classes.editor}\n error={error}\n pluginProps={pluginOpts}\n markup={content}\n onChange={props.onChange}\n mathMlOptions={mathMlOptions}\n />\n <PointMenu\n classes={{\n icon: classes.pointMenu,\n }}\n showSampleAnswer={showSampleAnswer}\n onChange={props.onMenuChange}\n />\n </div>\n {error && <div className={classes.errorText}>{error}</div>}\n {!showSampleAnswer && (\n <div className={classes.sampleAnswersEditor}>\n <Typography variant=\"overline\" className={classes.dragIndicator}>\n Sample Response\n </Typography>\n <EditableHtml\n className={classes.editor}\n markup={sampleAnswer}\n pluginProps={pluginOpts}\n onChange={props.onSampleChange}\n mathMlOptions={mathMlOptions}\n />\n </div>\n )}\n </div>\n );\n});\n\nexport class RawAuthoring extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n value: RubricType,\n config: PropTypes.object,\n pluginOpts: PropTypes.object,\n rubricless: PropTypes.bool,\n onChange: PropTypes.func,\n };\n\n static defaultProps = {};\n\n dragEnd = (result) => {\n if (!result.destination) {\n return;\n }\n\n const { value, onChange } = this.props;\n\n const points = reorder(value.points, result.source.index, result.destination.index);\n const sampleAnswers = reorder(value.sampleAnswers, result.source.index, result.destination.index);\n\n onChange({ ...value, points, sampleAnswers });\n };\n\n changeRubriclessInstruction = (input) => {\n const { value, onChange } = this.props;\n onChange({ ...value, rubriclessInstruction: input });\n };\n\n changeMaxPoints = (maxPoints) => {\n const { value, onChange, rubricless } = this.props;\n const currentMax = value.points.length - 1;\n\n log('current', currentMax, 'new: ', maxPoints);\n\n let points, sampleAnswers;\n if (maxPoints > currentMax) {\n points = times(maxPoints - currentMax)\n .map(() => '')\n .concat(value.points);\n sampleAnswers = times(maxPoints - currentMax)\n .map(() => null)\n .concat(value.sampleAnswers);\n }\n\n if (maxPoints < currentMax) {\n log('less than');\n points = takeRight(value.points, maxPoints + 1);\n sampleAnswers = takeRight(value.sampleAnswers, maxPoints + 1);\n }\n\n if (points && !rubricless) {\n onChange({ ...value, points, sampleAnswers, maxPoints });\n } else {\n onChange({ ...value, maxPoints });\n }\n };\n\n changeContent = (index, content, type) => {\n // type could be 'points' or 'sampleAnswers'\n log(`changeModel[${type}]:`, index, content);\n\n if (type !== 'points' && type !== 'sampleAnswers') {\n return;\n }\n\n const { value, onChange } = this.props;\n const items = value[type] && Array.from(value[type]);\n\n items.splice(index, 1, content);\n log(`changeModel[${type}]:`, items);\n\n onChange({ ...value, [type]: items });\n };\n\n excludeZeros = () => {\n const { value, onChange } = this.props;\n\n onChange({ ...value, excludeZero: !value.excludeZero });\n };\n\n shouldRenderPoint = (index, value) => {\n if (!value.excludeZero) {\n return true;\n } else {\n if (index < value.points.length - 1) {\n return true;\n } else if (index === value.points.length - 1) {\n return false;\n }\n\n return true;\n }\n };\n\n onPointMenuChange = (index, clickedItem) => {\n if (clickedItem === 'sample') {\n const { value } = this.props;\n const sampleAnswers = Array.from(value.sampleAnswers || []);\n\n if (checkSampleAnswer(sampleAnswers[index])) {\n // an empty string will display an empty Sample Answer input field\n this.changeContent(index, '', 'sampleAnswers');\n } else {\n // when the content is null or 'null', the Sample Answer input field will not be displayed\n this.changeContent(index, null, 'sampleAnswers');\n }\n }\n };\n\n render() {\n const {\n classes,\n className,\n value,\n mathMlOptions = {},\n config = {},\n rubricless = false,\n pluginOpts = {},\n } = this.props;\n let {\n excludeZeroEnabled = true,\n maxPointsEnabled = true,\n errors = {},\n rubriclessInstructionEnabled = false,\n maxPoints = 10,\n } = value || {};\n // rubric will contain a max value for maxPoints\n const { rubriclessInstruction = {}, maxMaxPoints = 10 } = config || {};\n const { pointsDescriptorsErrors } = errors || {};\n if (value && Number.isFinite(value.maxPoints)) {\n // eslint-disable-next-line no-console\n console.warn('maxPoints is deprecated - remove from model');\n }\n\n // for rubric value is computed based on points\n const maxPointsValue = !rubricless ? value.points.length - 1 : maxPoints;\n\n return (\n <div className={classNames(classes.class, className)}>\n <Typography variant=\"h5\" className={classes.rubricTitle}>\n Rubric\n </Typography>\n <FormGroup row>\n {maxPointsEnabled && (\n <MaxPoints\n max={maxMaxPoints < 100 ? maxMaxPoints : 100}\n value={maxPointsValue}\n onChange={this.changeMaxPoints}\n pluginOpts={pluginOpts}\n />\n )}\n {excludeZeroEnabled && (\n <FormControlLabel\n label=\"Exclude zeros\"\n control={<Checkbox checked={value.excludeZero} onChange={this.excludeZeros} />}\n />\n )}\n </FormGroup>\n\n {rubriclessInstructionEnabled && rubricless && (\n <InputContainer label={rubriclessInstruction.label} className={classes.inputContainer}>\n <EditableHtml\n className={classes.input}\n markup={value.rubriclessInstruction || ''}\n onChange={this.changeRubriclessInstruction}\n pluginProps={pluginOpts}\n nonEmpty={false}\n disableUnderline\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n <div className={rubricless ? classes.rubricless : classes.container}>\n <DragDropContext onDragEnd={this.dragEnd}>\n <Droppable droppableId=\"droppable\">\n {(provided) => (\n <div {...provided.droppableProps} ref={provided.innerRef}>\n {value.points.map(\n (p, index) =>\n this.shouldRenderPoint(index, value) && (\n <Draggable key={`${p.points}-${index}`} index={index} draggableId={index.toString()}>\n {(provided) => (\n <div\n className={classes.configHolder}\n ref={provided.innerRef}\n {...provided.draggableProps}\n {...provided.dragHandleProps}\n >\n <PointConfig\n points={value.points.length - 1 - index}\n content={p}\n error={\n pointsDescriptorsErrors && pointsDescriptorsErrors[value.points.length - 1 - index]\n }\n sampleAnswer={value.sampleAnswers && value.sampleAnswers[index]}\n onChange={(content) => this.changeContent(index, content, 'points')}\n onSampleChange={(content) => this.changeContent(index, content, 'sampleAnswers')}\n onMenuChange={(clickedItem) => this.onPointMenuChange(index, clickedItem)}\n mathMlOptions={mathMlOptions}\n pluginOpts={pluginOpts}\n />\n </div>\n )}\n </Draggable>\n ),\n )}\n {provided.placeholder}\n </div>\n )}\n </Droppable>\n </DragDropContext>\n </div>\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n container: {\n backgroundColor: grey[200],\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: grey[300],\n padding: theme.spacing.unit * 2,\n margin: theme.spacing.unit,\n },\n inputContainer: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n rubricless: {\n display: 'none',\n },\n configHolder: {\n paddingTop: theme.spacing.unit,\n paddingBottom: theme.spacing.unit,\n },\n rubricTitle: {\n paddingLeft: theme.spacing.unit,\n margin: theme.spacing.unit,\n },\n});\n\nconst StyledRawAuthoring = withStyles(styles)(RawAuthoring);\n\nconst Reverse = (props) => {\n const { rubricless = false, config = {}, pluginOpts = {} } = props || {};\n const points = Array.from(props.value.points || []).reverse();\n let sampleAnswers = Array.from(props.value.sampleAnswers || []).reverse();\n\n if (points.length > sampleAnswers.length) {\n sampleAnswers = times(points.length - sampleAnswers.length)\n .map(() => null)\n .concat(sampleAnswers);\n }\n\n const value = { ...props.value, points, sampleAnswers };\n\n const onChange = (value) => {\n props.onChange({\n ...value,\n points: Array.from(value.points || []).reverse(),\n sampleAnswers: Array.from(value.sampleAnswers || []).reverse(),\n });\n };\n\n return (\n <StyledRawAuthoring\n value={value}\n config={config}\n onChange={onChange}\n rubricless={rubricless}\n pluginOpts={pluginOpts}\n />\n );\n};\n\nReverse.propTypes = {\n value: RubricType,\n config: PropTypes.object,\n pluginOpts: PropTypes.object,\n rubricless: PropTypes.bool,\n getIndex: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default Reverse;\n","import Authoring from './authoring';\n\nconst RUBRIC_TYPES = {\n SIMPLE_RUBRIC: 'simpleRubric',\n MULTI_TRAIT_RUBRIC: 'multiTraitRubric',\n RUBRICLESS: 'rubricless',\n};\n\nexport { Authoring, RUBRIC_TYPES };\n"],"names":["IconMenu","React","Component","constructor","props","handleClick","event","setState","open","anchorEl","currentTarget","handleRequestClose","state","undefined","render","opts","onClick","classes","keys","Object","handleMenuClick","key","iconColor","icon","transform","vertical","horizontal","map","k","index","propTypes","PropTypes","object","func","isRequired","PointMenu","onChange","showSampleAnswer","sampleText","sample","bool","defaultProps","log","debug","reorder","list","startIndex","endIndex","result","Array","from","removed","splice","RubricType","shape","excludeZero","points","arrayOf","string","sampleAnswers","maxPoints","number","rubriclessInstruction","MaxPoints","withStyles","theme","formControl","minWidth","margin","spacing","unit","value","max","e","target","range","v","checkSampleAnswer","sampleAnswer","PointConfig","pointConfig","row","display","width","position","editor","backgroundColor","palette","common","white","dragIndicator","paddingTop","color","grey","pointsLabel","paddingBottom","textTransform","sampleAnswersEditor","paddingLeft","pointMenu","right","errorText","fontSize","typography","error","main","content","mathMlOptions","pluginOpts","onMenuChange","onSampleChange","RawAuthoring","dragEnd","destination","source","changeRubriclessInstruction","input","changeMaxPoints","rubricless","currentMax","length","times","concat","takeRight","changeContent","type","items","excludeZeros","shouldRenderPoint","onPointMenuChange","clickedItem","className","config","excludeZeroEnabled","maxPointsEnabled","errors","rubriclessInstructionEnabled","maxMaxPoints","pointsDescriptorsErrors","Number","isFinite","console","warn","maxPointsValue","classNames","class","rubricTitle","label","inputContainer","language","container","provided","droppableProps","innerRef","p","toString","configHolder","draggableProps","dragHandleProps","placeholder","styles","borderWidth","borderStyle","borderColor","padding","marginBottom","StyledRawAuthoring","Reverse","reverse","getIndex","RUBRIC_TYPES","SIMPLE_RUBRIC","MULTI_TRAIT_RUBRIC","RUBRICLESS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAMA,QAAN,SAAuBC,KAAK,CAACC,SAA7B,CAAuC;AAO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,KAAK,CAACC,IAAN,CAAWqB,KAAK,CAACZ,aAAN,IAAuB,EAAlC,CAAA,CAAsC6G,OAAtC;AAHjB,KAAA,CAAA,CAAA;AAKD,EAAA,CAND;;AAQA,EAAA,oBACE,oBAAC,kBAAD,EAAA;AACE,IAAA,KAAK,EAAEjG,KADT;AAEE,IAAA,MAAM,EAAE6D,MAFV;AAGE,IAAA,QAAQ,EAAEhG,QAHZ;AAIE,IAAA,UAAU,EAAEkF,UAJd;AAKE,IAAA,UAAU,EAAEV;AALd,GAAA,CADF;AASD;;AAED2D,OAAO,CAACzI,SAAR,GAAoB;AAClByC,EAAAA,KAAK,EAAElB,UADW;AAElB+E,EAAAA,MAAM,EAAErG,SAAS,CAACC,MAFA;AAGlB4E,EAAAA,UAAU,EAAE7E,SAAS,CAACC,MAHJ;AAIlBsF,EAAAA,UAAU,EAAEvF,SAAS,CAACS,IAJJ;AAKlBiI,EAAAA,QAAQ,EAAE1I,SAAS,CAACE,IALF;AAMlBG,EAAAA,QAAQ,EAAEL,SAAS,CAACE;AANF,CAApB;;AClbA,MAAMyI,YAAY,GAAG;AACnBC,EAAAA,aAAa,EAAE,cADI;AAEnBC,EAAAA,kBAAkB,EAAE,kBAFD;AAGnBC,EAAAA,UAAU,EAAE;AAHO;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/rubric",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.3",
|
|
11
11
|
"@material-ui/icons": "^3.0.2",
|
|
12
|
-
"@pie-lib/editable-html": "^11.
|
|
12
|
+
"@pie-lib/editable-html": "^11.18.1",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
14
14
|
"debug": "^4.1.1",
|
|
15
15
|
"lodash": "^4.17.11",
|
|
@@ -18,5 +18,12 @@
|
|
|
18
18
|
"react-beautiful-dnd": "^11.0.2",
|
|
19
19
|
"react-dom": "^16.9.0"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "be0b7951407a81d53b8b8b4861b8407b31728809",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./esm/index.js",
|
|
25
|
+
"require": "./lib/index.js",
|
|
26
|
+
"default": "./esm/index.js"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
22
29
|
}
|