@pie-element/rubric 4.8.2-next.20 → 4.8.2-next.4

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/lib/main.js CHANGED
@@ -199,21 +199,7 @@ var styles = function styles(theme) {
199
199
  return {
200
200
  root: {
201
201
  color: _renderUi.color.text(),
202
- backgroundColor: _renderUi.color.background(),
203
- // apply styles to tables to match the rest of the UI
204
- '&:not(.MathJax) table': {
205
- borderCollapse: 'collapse'
206
- },
207
- '&:not(.MathJax) table td, &:not(.MathJax) table th': {
208
- padding: '8px 12px',
209
- textAlign: 'left'
210
- },
211
- // reset paragraph margins and line-height inside lists to override client styles
212
- '& ul p, & ol p': {
213
- marginBottom: 0,
214
- marginTop: 0,
215
- lineHeight: 'normal'
216
- }
202
+ backgroundColor: _renderUi.color.background()
217
203
  },
218
204
  listColumn: {
219
205
  display: 'flex',
package/lib/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main.jsx"],"names":["RubricType","PropTypes","shape","excludeZero","bool","points","arrayOf","string","sampleAnswers","animationsDisabled","Rubric","props","index","value","state","rubricOpen","linkPrefix","toggleRubric","bind","setState","model","classes","extraCSSRules","rubricList","slice","reverse","map","desc","length","pointsLabel","listColumn","titleText","text","__html","fontWeight","root","hiddenScreenReader","rubricToggle","e","key","chevronStyle","React","Component","object","isRequired","styles","theme","color","backgroundColor","background","borderCollapse","padding","textAlign","marginBottom","marginTop","lineHeight","display","flexDirection","alignItems","listColumnItem","fontSize","margin","paddingBottom","cursor","userSelect","typography","tertiary","transition","marginLeft","alignSelf","position","width","height","overflow","clip","border","whiteSpace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,IAAMA,UAAU,GAAGC,sBAAUC,KAAV,CAAgB;AACxCC,EAAAA,WAAW,EAAEF,sBAAUG,IADiB;AAExCC,EAAAA,MAAM,EAAEJ,sBAA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MAAAA,MAAM,EAAE,CARU;AASlBC,MAAAA,UAAU,EAAE;AATM;AAtDK,GAAZ;AAAA,CAAf;;eAmEe,wBAAW/B,MAAX,EAAmBnC,MAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport ListItem from '@material-ui/core/ListItem';\nimport List from '@material-ui/core/List';\nimport Collapse from '@material-ui/core/Collapse';\nimport { color, UiLayout } from '@pie-lib/pie-toolbox/render-ui';\nimport PropTypes from 'prop-types';\n\nexport const RubricType = PropTypes.shape({\n excludeZero: PropTypes.bool,\n points: PropTypes.arrayOf(PropTypes.string),\n sampleAnswers: PropTypes.arrayOf(PropTypes.string),\n animationsDisabled: PropTypes.bool,\n});\n\nclass Rubric extends React.Component {\n dudUrl = 'javascript:;';\n\n constructor(props) {\n super(props);\n this.state = {\n rubricOpen: false,\n linkPrefix: 'Show',\n };\n this.toggleRubric = this.toggleRubric.bind(this);\n }\n\n static propTypes = {\n classes: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n animationsDisabled: PropTypes.bool,\n value: RubricType,\n };\n\n toggleRubric() {\n this.setState({ rubricOpen: !this.state.rubricOpen });\n this.setState({ linkPrefix: this.state.rubricOpen ? 'Show' : 'Hide' });\n }\n\n shouldRenderPoint = (index, value) => {\n if (!value.excludeZero) {\n return true;\n } else {\n return index !== 0;\n }\n };\n\n render() {\n const { model, value, classes } = this.props;\n let { animationsDisabled } = this.props;\n animationsDisabled = animationsDisabled || value.animationsDisabled;\n\n if (value && value.points) {\n const { extraCSSRules } = model || {};\n const { points, sampleAnswers } = value;\n\n const rubricList = (\n <List component=\"nav\">\n {points\n .slice(0)\n .reverse()\n .map((desc, index) => {\n index = points.length - index - 1;\n const pointsLabel = value.excludeZero ? index + 1 : index;\n\n return (\n <React.Fragment key={index}>\n <ListItem key={`P${index}`} className={classes.listColumn}>\n <h3 className={classes.titleText}>{pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}</h3>\n <div className={classes.text} dangerouslySetInnerHTML={{ __html: desc }} />\n </ListItem>\n\n {sampleAnswers && sampleAnswers[index] && (\n <ListItem key={`S${index}`} className={classes.listColumn}>\n <h4 className={classes.titleText} style={{ fontWeight: 'normal' }}>Sample Answer</h4>\n <div className={classes.text} dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />\n </ListItem>\n )}\n </React.Fragment>\n );\n })}\n </List>\n );\n\n return (\n <UiLayout extraCSSRules={extraCSSRules} className={classes.root}>\n {/* screen reader only heading for navigation as per PD-5057 */}\n <h2 className={classes.hiddenScreenReader}>Rubric</h2>\n {!animationsDisabled ? (\n <React.Fragment>\n <h2\n id={'rubric-toggle'}\n className={classes.rubricToggle}\n tabIndex={0}\n role=\"button\"\n aria-expanded={this.state.rubricOpen}\n onClick={this.toggleRubric}\n onKeyPress={e => {\n if (e.key === 'Enter' || e.key === ' ') this.toggleRubric();\n }}\n >\n {this.state.linkPrefix} Rubric\n <span\n className={classes.chevronStyle}\n aria-hidden=\"true\"\n >\n {this.state.rubricOpen ? (\n <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>\n ) : (\n <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>\n )}\n </span>\n </h2>\n <Collapse in={this.state.rubricOpen} timeout=\"auto\">\n {rubricList}\n </Collapse>\n </React.Fragment>\n ) : (\n rubricList\n )}\n </UiLayout>\n );\n } else {\n return null;\n }\n }\n}\n\nconst styles = (theme) => ({\n root: {\n color: color.text(),\n backgroundColor: color.background(),\n // apply styles to tables to match the rest of the UI\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '8px 12px',\n textAlign: 'left',\n },\n // reset paragraph margins and line-height inside lists to override client styles\n '& ul p, & ol p': {\n marginBottom: 0,\n marginTop: 0,\n lineHeight: 'normal',\n },\n },\n listColumn: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n padding: '12px 0px',\n },\n listColumnItem: {\n padding: 0,\n },\n text: {\n color: color.text(),\n },\n titleText: {\n color: color.text(),\n fontSize: '16px',\n fontWeight: '700',\n margin: 0,\n paddingBottom: '6px',\n },\n rubricToggle: {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: theme.typography.fontSize,\n fontWeight: '500',\n color: color.tertiary(),\n margin: 0\n },\n chevronStyle: {\n display: 'inline-flex',\n transition: 'transform 0.2s',\n marginLeft: 2,\n alignSelf: 'center',\n },\n hiddenScreenReader: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0,0,0,0)',\n border: 0,\n whiteSpace: 'nowrap',\n },\n});\n\nexport default withStyles(styles)(Rubric);\n"],"file":"main.js"}
1
+ {"version":3,"sources":["../src/main.jsx"],"names":["RubricType","PropTypes","shape","excludeZero","bool","points","arrayOf","string","sampleAnswers","animationsDisabled","Rubric","props","index","value","state","rubricOpen","linkPrefix","toggleRubric","bind","setState","model","classes","extraCSSRules","rubricList","slice","reverse","map","desc","length","pointsLabel","listColumn","titleText","text","__html","fontWeight","root","hiddenScreenReader","rubricToggle","e","key","chevronStyle","React","Component","object","isRequired","styles","theme","color","backgroundColor","background","display","flexDirection","alignItems","padding","listColumnItem","fontSize","margin","paddingBottom","cursor","userSelect","typography","tertiary","transition","marginLeft","alignSelf","position","width","height","overflow","clip","border","whiteSpace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,IAAMA,UAAU,GAAGC,sBAAUC,KAAV,C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AMf,IAAN;AADH,KAdmB;AAiBzBD,IAAAA,SAAS,EAAE;AACTgB,MAAAA,KAAK,EAAEA,gBAAMf,IAAN,EADE;AAETuB,MAAAA,QAAQ,EAAE,MAFD;AAGTrB,MAAAA,UAAU,EAAE,KAHH;AAITsB,MAAAA,MAAM,EAAE,CAJC;AAKTC,MAAAA,aAAa,EAAE;AALN,KAjBc;AAwBzBpB,IAAAA,YAAY,EAAE;AACZa,MAAAA,OAAO,EAAE,MADG;AAEZE,MAAAA,UAAU,EAAE,QAFA;AAGZM,MAAAA,MAAM,EAAE,SAHI;AAIZC,MAAAA,UAAU,EAAE,MAJA;AAKZJ,MAAAA,QAAQ,EAAET,KAAK,CAACc,UAAN,CAAiBL,QALf;AAMZrB,MAAAA,UAAU,EAAE,KANA;AAOZa,MAAAA,KAAK,EAAEA,gBAAMc,QAAN,EAPK;AAQZL,MAAAA,MAAM,EAAE;AARI,KAxBW;AAkCzBhB,IAAAA,YAAY,EAAE;AACZU,MAAAA,OAAO,EAAE,aADG;AAEZY,MAAAA,UAAU,EAAE,gBAFA;AAGZC,MAAAA,UAAU,EAAE,CAHA;AAIZC,MAAAA,SAAS,EAAE;AAJC,KAlCW;AAwCzB5B,IAAAA,kBAAkB,EAAE;AAClB6B,MAAAA,QAAQ,EAAE,UADQ;AAElBC,MAAAA,KAAK,EAAE,KAFW;AAGlBC,MAAAA,MAAM,EAAE,KAHU;AAIlBd,MAAAA,OAAO,EAAE,CAJS;AAKlBG,MAAAA,MAAM,EAAE,MALU;AAMlBY,MAAAA,QAAQ,EAAE,QANQ;AAOlBC,MAAAA,IAAI,EAAE,eAPY;AAQlBC,MAAAA,MAAM,EAAE,CARU;AASlBC,MAAAA,UAAU,EAAE;AATM;AAxCK,GAAZ;AAAA,CAAf;;eAqDe,wBAAW1B,MAAX,EAAmBnC,MAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport ListItem from '@material-ui/core/ListItem';\nimport List from '@material-ui/core/List';\nimport Collapse from '@material-ui/core/Collapse';\nimport { color, UiLayout } from '@pie-lib/pie-toolbox/render-ui';\nimport PropTypes from 'prop-types';\n\nexport const RubricType = PropTypes.shape({\n excludeZero: PropTypes.bool,\n points: PropTypes.arrayOf(PropTypes.string),\n sampleAnswers: PropTypes.arrayOf(PropTypes.string),\n animationsDisabled: PropTypes.bool,\n});\n\nclass Rubric extends React.Component {\n dudUrl = 'javascript:;';\n\n constructor(props) {\n super(props);\n this.state = {\n rubricOpen: false,\n linkPrefix: 'Show',\n };\n this.toggleRubric = this.toggleRubric.bind(this);\n }\n\n static propTypes = {\n classes: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n animationsDisabled: PropTypes.bool,\n value: RubricType,\n };\n\n toggleRubric() {\n this.setState({ rubricOpen: !this.state.rubricOpen });\n this.setState({ linkPrefix: this.state.rubricOpen ? 'Show' : 'Hide' });\n }\n\n shouldRenderPoint = (index, value) => {\n if (!value.excludeZero) {\n return true;\n } else {\n return index !== 0;\n }\n };\n\n render() {\n const { model, value, classes } = this.props;\n let { animationsDisabled } = this.props;\n animationsDisabled = animationsDisabled || value.animationsDisabled;\n\n if (value && value.points) {\n const { extraCSSRules } = model || {};\n const { points, sampleAnswers } = value;\n\n const rubricList = (\n <List component=\"nav\">\n {points\n .slice(0)\n .reverse()\n .map((desc, index) => {\n index = points.length - index - 1;\n const pointsLabel = value.excludeZero ? index + 1 : index;\n\n return (\n <React.Fragment key={index}>\n <ListItem key={`P${index}`} className={classes.listColumn}>\n <h3 className={classes.titleText}>{pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}</h3>\n <div className={classes.text} dangerouslySetInnerHTML={{ __html: desc }} />\n </ListItem>\n\n {sampleAnswers && sampleAnswers[index] && (\n <ListItem key={`S${index}`} className={classes.listColumn}>\n <h4 className={classes.titleText} style={{ fontWeight: 'normal' }}>Sample Answer</h4>\n <div className={classes.text} dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />\n </ListItem>\n )}\n </React.Fragment>\n );\n })}\n </List>\n );\n\n return (\n <UiLayout extraCSSRules={extraCSSRules} className={classes.root}>\n {/* screen reader only heading for navigation as per PD-5057 */}\n <h2 className={classes.hiddenScreenReader}>Rubric</h2>\n {!animationsDisabled ? (\n <React.Fragment>\n <h2\n id={'rubric-toggle'}\n className={classes.rubricToggle}\n tabIndex={0}\n role=\"button\"\n aria-expanded={this.state.rubricOpen}\n onClick={this.toggleRubric}\n onKeyPress={e => {\n if (e.key === 'Enter' || e.key === ' ') this.toggleRubric();\n }}\n >\n {this.state.linkPrefix} Rubric\n <span\n className={classes.chevronStyle}\n aria-hidden=\"true\"\n >\n {this.state.rubricOpen ? (\n <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>\n ) : (\n <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>\n )}\n </span>\n </h2>\n <Collapse in={this.state.rubricOpen} timeout=\"auto\">\n {rubricList}\n </Collapse>\n </React.Fragment>\n ) : (\n rubricList\n )}\n </UiLayout>\n );\n } else {\n return null;\n }\n }\n}\n\nconst styles = (theme) => ({\n root: {\n color: color.text(),\n backgroundColor: color.background(),\n },\n listColumn: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n padding: '12px 0px',\n },\n listColumnItem: {\n padding: 0,\n },\n text: {\n color: color.text(),\n },\n titleText: {\n color: color.text(),\n fontSize: '16px',\n fontWeight: '700',\n margin: 0,\n paddingBottom: '6px',\n },\n rubricToggle: {\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: theme.typography.fontSize,\n fontWeight: '500',\n color: color.tertiary(),\n margin: 0\n },\n chevronStyle: {\n display: 'inline-flex',\n transition: 'transform 0.2s',\n marginLeft: 2,\n alignSelf: 'center',\n },\n hiddenScreenReader: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0,0,0,0)',\n border: 0,\n whiteSpace: 'nowrap',\n },\n});\n\nexport default withStyles(styles)(Rubric);\n"],"file":"main.js"}
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.0.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.0.3/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@8.0.2/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.0.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.0.3/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@8.0.2/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -7877,19 +7877,7 @@ Rubric.__initStatic();
7877
7877
  const styles = theme => ({
7878
7878
  root: {
7879
7879
  color: color.text(),
7880
- backgroundColor: color.background(),
7881
- '&:not(.MathJax) table': {
7882
- borderCollapse: 'collapse'
7883
- },
7884
- '&:not(.MathJax) table td, &:not(.MathJax) table th': {
7885
- padding: '8px 12px',
7886
- textAlign: 'left'
7887
- },
7888
- '& ul p, & ol p': {
7889
- marginBottom: 0,
7890
- marginTop: 0,
7891
- lineHeight: 'normal'
7892
- }
7880
+ backgroundColor: color.background()
7893
7881
  },
7894
7882
  listColumn: {
7895
7883
  display: 'flex',
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "5.0.4"
7
+ "version": "5.0.3"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
package/module/print.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.0.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@5.0.3/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@8.0.2/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -7877,19 +7877,7 @@ Rubric.__initStatic();
7877
7877
  const styles = theme => ({
7878
7878
  root: {
7879
7879
  color: color.text(),
7880
- backgroundColor: color.background(),
7881
- '&:not(.MathJax) table': {
7882
- borderCollapse: 'collapse'
7883
- },
7884
- '&:not(.MathJax) table td, &:not(.MathJax) table th': {
7885
- padding: '8px 12px',
7886
- textAlign: 'left'
7887
- },
7888
- '& ul p, & ol p': {
7889
- marginBottom: 0,
7890
- marginTop: 0,
7891
- lineHeight: 'normal'
7892
- }
7880
+ backgroundColor: color.background()
7893
7881
  },
7894
7882
  listColumn: {
7895
7883
  display: 'flex',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/rubric",
3
- "version": "4.8.2-next.20+04f51a260",
3
+ "version": "4.8.2-next.4+f2fd6fc8c",
4
4
  "main": "lib/index.js",
5
5
  "module": "src/index.js",
6
6
  "description": "Rubric Scoring Interaction",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "author": "pie framework developers",
17
17
  "license": "ISC",
18
- "gitHead": "04f51a260930d47ef8c8df0cf2261e7338d9614f",
18
+ "gitHead": "f2fd6fc8c21d285b44f3c113d1dad0232030c4bf",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },
package/src/main.jsx CHANGED
@@ -130,20 +130,6 @@ const styles = (theme) => ({
130
130
  root: {
131
131
  color: color.text(),
132
132
  backgroundColor: color.background(),
133
- // apply styles to tables to match the rest of the UI
134
- '&:not(.MathJax) table': {
135
- borderCollapse: 'collapse',
136
- },
137
- '&:not(.MathJax) table td, &:not(.MathJax) table th': {
138
- padding: '8px 12px',
139
- textAlign: 'left',
140
- },
141
- // reset paragraph margins and line-height inside lists to override client styles
142
- '& ul p, & ol p': {
143
- marginBottom: 0,
144
- marginTop: 0,
145
- lineHeight: 'normal',
146
- },
147
133
  },
148
134
  listColumn: {
149
135
  display: 'flex',