@pie-element/rubric 4.1.6-next.17 → 4.1.6-next.25
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/main.js +2 -0
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +1 -1
- package/configure/src/main.jsx +2 -0
- package/controller/package.json +1 -1
- package/lib/main.js +7 -1
- package/lib/main.js.map +1 -1
- package/module/configure.js +2 -0
- package/module/element.js +22 -18
- package/module/print.js +22 -18
- package/package.json +3 -3
- package/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +21751 -21723
- package/src/main.jsx +6 -4
package/src/main.jsx
CHANGED
|
@@ -5,7 +5,7 @@ import List from '@material-ui/core/List';
|
|
|
5
5
|
import ListItemText from '@material-ui/core/ListItemText';
|
|
6
6
|
import Link from '@material-ui/core/Link';
|
|
7
7
|
import Collapse from '@material-ui/core/Collapse';
|
|
8
|
-
import { color } from '@pie-lib/pie-toolbox/render-ui';
|
|
8
|
+
import { color, UiLayout } from '@pie-lib/pie-toolbox/render-ui';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
|
|
11
11
|
export const RubricType = PropTypes.shape({
|
|
@@ -29,6 +29,7 @@ class Rubric extends React.Component {
|
|
|
29
29
|
|
|
30
30
|
static propTypes = {
|
|
31
31
|
classes: PropTypes.object.isRequired,
|
|
32
|
+
model: PropTypes.object.isRequired,
|
|
32
33
|
animationsDisabled: PropTypes.bool,
|
|
33
34
|
value: RubricType,
|
|
34
35
|
};
|
|
@@ -47,11 +48,12 @@ class Rubric extends React.Component {
|
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
render() {
|
|
50
|
-
const { value, classes } = this.props;
|
|
51
|
+
const { model, value, classes } = this.props;
|
|
51
52
|
let { animationsDisabled } = this.props;
|
|
52
53
|
animationsDisabled = animationsDisabled || value.animationsDisabled;
|
|
53
54
|
|
|
54
55
|
if (value && value.points) {
|
|
56
|
+
const { extraCSSRules } = model || {};
|
|
55
57
|
const { points, sampleAnswers } = value;
|
|
56
58
|
|
|
57
59
|
const rubricList = (
|
|
@@ -98,7 +100,7 @@ class Rubric extends React.Component {
|
|
|
98
100
|
);
|
|
99
101
|
|
|
100
102
|
return (
|
|
101
|
-
<
|
|
103
|
+
<UiLayout extraCSSRules={extraCSSRules} className={classes.root}>
|
|
102
104
|
{!animationsDisabled ? (
|
|
103
105
|
<React.Fragment>
|
|
104
106
|
<Link href={this.dudUrl} onClick={this.toggleRubric}>
|
|
@@ -111,7 +113,7 @@ class Rubric extends React.Component {
|
|
|
111
113
|
) : (
|
|
112
114
|
rubricList
|
|
113
115
|
)}
|
|
114
|
-
</
|
|
116
|
+
</UiLayout>
|
|
115
117
|
);
|
|
116
118
|
} else {
|
|
117
119
|
return null;
|