@pie-element/rubric 4.9.8-next.5 → 4.9.8-next.72
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 +1 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/pie-toolbox-rubric/authoring.js +3 -3
- package/configure/lib/pie-toolbox-rubric/authoring.js.map +1 -1
- package/configure/package.json +5 -2
- package/configure/src/__tests__/index.test.jsx +11 -0
- package/configure/src/main.jsx +1 -1
- package/configure/src/pie-toolbox-rubric/authoring.jsx +3 -3
- package/controller/package.json +0 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/main.js +1 -1
- package/lib/main.js.map +1 -1
- package/lib/print.js +1 -1
- package/lib/print.js.map +1 -1
- package/module/configure.js +1 -42661
- package/module/element.js +1 -7980
- package/module/index.html +1 -1
- package/module/manifest.json +3 -7
- package/module/print.html +1 -1
- package/module/print.js +1 -7993
- package/package.json +4 -3
- package/src/index.js +1 -1
- package/src/main.jsx +34 -11
- package/src/print.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
|
-
"version": "4.9.8-next.
|
|
3
|
+
"version": "4.9.8-next.72+bb2d58615",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"description": "Rubric Scoring Interaction",
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
|
-
"@pie-lib/
|
|
13
|
+
"@pie-lib/math-rendering": "^3.12.0",
|
|
14
|
+
"@pie-lib/render-ui": "^4.25.0",
|
|
14
15
|
"prop-types": "^15.7.2"
|
|
15
16
|
},
|
|
16
17
|
"author": "pie framework developers",
|
|
17
18
|
"license": "ISC",
|
|
18
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "bb2d58615291cb18ae4b0c5f3113c1309056ce62",
|
|
19
20
|
"scripts": {
|
|
20
21
|
"postpublish": "../../scripts/postpublish"
|
|
21
22
|
},
|
package/src/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import Rubric from './main';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
import debug from 'debug';
|
|
5
|
-
import { renderMath } from '@pie-lib/
|
|
5
|
+
import { renderMath } from '@pie-lib/math-rendering';
|
|
6
6
|
|
|
7
7
|
export default class RubricRender extends HTMLElement {
|
|
8
8
|
constructor() {
|
package/src/main.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
3
3
|
import ListItem from '@material-ui/core/ListItem';
|
|
4
4
|
import List from '@material-ui/core/List';
|
|
5
5
|
import Collapse from '@material-ui/core/Collapse';
|
|
6
|
-
import { color, UiLayout } from '@pie-lib/
|
|
6
|
+
import { color, UiLayout } from '@pie-lib/render-ui';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
|
|
9
9
|
export const RubricType = PropTypes.shape({
|
|
@@ -66,13 +66,17 @@ class Rubric extends React.Component {
|
|
|
66
66
|
return (
|
|
67
67
|
<React.Fragment key={index}>
|
|
68
68
|
<ListItem key={`P${index}`} className={classes.listColumn}>
|
|
69
|
-
<h3 className={classes.titleText}>
|
|
69
|
+
<h3 className={classes.titleText}>
|
|
70
|
+
{pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}
|
|
71
|
+
</h3>
|
|
70
72
|
<div className={classes.text} dangerouslySetInnerHTML={{ __html: desc }} />
|
|
71
73
|
</ListItem>
|
|
72
74
|
|
|
73
75
|
{sampleAnswers && sampleAnswers[index] && (
|
|
74
76
|
<ListItem key={`S${index}`} className={classes.listColumn}>
|
|
75
|
-
<h4 className={classes.titleText} style={{ fontWeight: 'normal' }}>
|
|
77
|
+
<h4 className={classes.titleText} style={{ fontWeight: 'normal' }}>
|
|
78
|
+
Sample Answer
|
|
79
|
+
</h4>
|
|
76
80
|
<div className={classes.text} dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />
|
|
77
81
|
</ListItem>
|
|
78
82
|
)}
|
|
@@ -95,19 +99,38 @@ class Rubric extends React.Component {
|
|
|
95
99
|
role="button"
|
|
96
100
|
aria-expanded={this.state.rubricOpen}
|
|
97
101
|
onClick={this.toggleRubric}
|
|
98
|
-
onKeyPress={e => {
|
|
102
|
+
onKeyPress={(e) => {
|
|
99
103
|
if (e.key === 'Enter' || e.key === ' ') this.toggleRubric();
|
|
100
104
|
}}
|
|
101
105
|
>
|
|
102
106
|
{this.state.linkPrefix} Rubric
|
|
103
|
-
<span
|
|
104
|
-
className={classes.chevronStyle}
|
|
105
|
-
aria-hidden="true"
|
|
106
|
-
>
|
|
107
|
+
<span className={classes.chevronStyle} aria-hidden="true">
|
|
107
108
|
{this.state.rubricOpen ? (
|
|
108
|
-
<svg
|
|
109
|
+
<svg
|
|
110
|
+
width="20"
|
|
111
|
+
height="20"
|
|
112
|
+
viewBox="0 0 24 24"
|
|
113
|
+
fill="none"
|
|
114
|
+
stroke="currentColor"
|
|
115
|
+
strokeWidth="2"
|
|
116
|
+
strokeLinecap="round"
|
|
117
|
+
strokeLinejoin="round"
|
|
118
|
+
>
|
|
119
|
+
<polyline points="18 15 12 9 6 15"></polyline>
|
|
120
|
+
</svg>
|
|
109
121
|
) : (
|
|
110
|
-
<svg
|
|
122
|
+
<svg
|
|
123
|
+
width="20"
|
|
124
|
+
height="20"
|
|
125
|
+
viewBox="0 0 24 24"
|
|
126
|
+
fill="none"
|
|
127
|
+
stroke="currentColor"
|
|
128
|
+
strokeWidth="2"
|
|
129
|
+
strokeLinecap="round"
|
|
130
|
+
strokeLinejoin="round"
|
|
131
|
+
>
|
|
132
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
133
|
+
</svg>
|
|
111
134
|
)}
|
|
112
135
|
</span>
|
|
113
136
|
</h2>
|
|
@@ -172,7 +195,7 @@ const styles = (theme) => ({
|
|
|
172
195
|
fontSize: theme.typography.fontSize,
|
|
173
196
|
fontWeight: '500',
|
|
174
197
|
color: color.tertiary(),
|
|
175
|
-
margin: 0
|
|
198
|
+
margin: 0,
|
|
176
199
|
},
|
|
177
200
|
chevronStyle: {
|
|
178
201
|
display: 'inline-flex',
|
package/src/print.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
4
|
import Main from './main';
|
|
5
|
-
import { renderMath } from '@pie-lib/
|
|
5
|
+
import { renderMath } from '@pie-lib/math-rendering';
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
|
|
8
8
|
const log = debug('pie-element:rubric:print');
|