@pie-element/rubric 4.9.8 → 4.9.10-next.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/rubric",
3
- "version": "4.9.8",
3
+ "version": "4.9.10-next.86+260752f06",
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/pie-toolbox": "2.25.1",
13
+ "@pie-lib/math-rendering": "^3.17.0",
14
+ "@pie-lib/render-ui": "^4.30.0",
14
15
  "prop-types": "^15.7.2"
15
16
  },
16
17
  "author": "pie framework developers",
17
18
  "license": "ISC",
18
- "gitHead": "f80de41c9acc8412b3bc5fcf8d95681e76c105d0",
19
+ "gitHead": "260752f06b5e03f581d3a2533a3007e567d7655a",
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/pie-toolbox/math-rendering';
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/pie-toolbox/render-ui';
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}>{pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}</h3>
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' }}>Sample Answer</h4>
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 width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="18 15 12 9 6 15"></polyline></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 width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="6 9 12 15 18 9"></polyline></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/pie-toolbox/math-rendering';
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');