@pie-element/rubric 4.1.6-next.3 → 4.2.0
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/CHANGELOG.md +17 -0
- package/configure/CHANGELOG.md +16 -0
- package/configure/lib/main.js +2 -0
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +2 -2
- package/configure/src/main.jsx +2 -0
- package/controller/CHANGELOG.md +11 -0
- package/controller/package.json +2 -2
- package/lib/main.js +7 -1
- package/lib/main.js.map +1 -1
- package/module/configure.js +4 -2
- package/module/element.js +24 -20
- package/module/manifest.json +2 -2
- package/module/print.js +24 -20
- package/package.json +3 -3
- package/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +21751 -21723
- package/src/main.jsx +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@4.1.5...@pie-element/rubric@4.2.0) (2024-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fixed all tests after updating pie-toolbox [PD-1460] ([9f5293d](https://github.com/pie-framework/pie-elements/commit/9f5293d618edc06f69fabb27a042ec5eee66e151))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* fixed most of the tests, waiting on PR merge to fix the rest [PD-1460] ([9b12daf](https://github.com/pie-framework/pie-elements/commit/9b12dafc8e7d8dd8cd9bef71dce37d0c62760355))
|
|
17
|
+
* used configlayout, preview layout or uilayout to enable extraCSSRules inside author and player elements [PD-1460] ([eeebb02](https://github.com/pie-framework/pie-elements/commit/eeebb02f200208620c1af56366a22bf65944ba3e))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [4.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@4.1.4...@pie-element/rubric@4.1.5) (2024-10-28)
|
|
7
24
|
|
|
8
25
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@4.0.7...@pie-element/rubric-configure@4.1.0) (2024-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fixed all tests after updating pie-toolbox [PD-1460] ([9f5293d](https://github.com/pie-framework/pie-elements/commit/9f5293d618edc06f69fabb27a042ec5eee66e151))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* used configlayout, preview layout or uilayout to enable extraCSSRules inside author and player elements [PD-1460] ([eeebb02](https://github.com/pie-framework/pie-elements/commit/eeebb02f200208620c1af56366a22bf65944ba3e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [4.0.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@4.0.6...@pie-element/rubric-configure@4.0.7) (2024-10-28)
|
|
7
23
|
|
|
8
24
|
|
package/configure/lib/main.js
CHANGED
|
@@ -112,6 +112,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
var value = this.verifyRubriclessModel(model, configuration);
|
|
115
|
+
var extraCSSRules = model.extraCSSRules;
|
|
115
116
|
var panelProperties = {
|
|
116
117
|
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
117
118
|
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
@@ -123,6 +124,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
123
124
|
};
|
|
124
125
|
|
|
125
126
|
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
127
|
+
extraCSSRules: extraCSSRules,
|
|
126
128
|
dimensions: contentDimensions,
|
|
127
129
|
hideSettings: settingsPanelDisabled,
|
|
128
130
|
settings: /*#__PURE__*/_react["default"].createElement(Panel, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","m","config","rubricless","points","sampleAnswers","rest","props","model","configuration","onConfigurationChanged","onModelChanged","imageSupport","baseInputConfiguration","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","rubriclessInstruction","width","value","verifyRubriclessModel","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","rubriclessInstructionEnabled","getPluginProps","Object","assign","inputConfiguration","Properties","maxWidth","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAE,cADN;AAENC,MAAAA,QAAQ,EAAEH,KAAK,CAACI,UAAN,CAAiBD;AAFrB;AADiB,GAAZ;AAAA,CAAf;;IAOME,I;;;;;;;;;;;;;;;8GACoB,UAACC,CAAD,EAAIC,MAAJ,EAAe;AACrC,iBAA+BA,MAAM,IAAI,EAAzC;AAAA,iCAAQC,UAAR;AAAA,UAAQA,UAAR,gCAAqB,KAArB;;AACA,aAAOA,UAAU,GAAI;AAAA,YAAGC,MAAH,SAAGA,MAAH;AAAA,YAAWC,aAAX,SAAWA,aAAX;AAAA,YAA6BC,IAA7B;AAAA,eAAwCA,IAAxC;AAAA,OAAD,CAA+CL,CAA/C,CAAH,GAAuDA,CAAxE;AACD,K;;;;;;WAED,kBAAS;AACP,kBAAuF,KAAKM,KAAL,IAAc,EAArG;AAAA,UAAQC,KAAR,SAAQA,KAAR;AAAA,UAAeC,aAAf,SAAeA,aAAf;AAAA,UAA8BC,sBAA9B,SAA8BA,sBAA9B;AAAA,UAAsDC,cAAtD,SAAsDA,cAAtD;AAAA,UAAsEC,YAAtE,SAAsEA,YAAtE;;AACA,kBAUIH,aAAa,IAAI,EAVrB;AAAA,wCACEI,sBADF;AAAA,UACEA,sBADF,sCAC2B,EAD3B;AAAA,wCAEEC,iBAFF;AAAA,UAEEA,iBAFF,sCAEsB,EAFtB;AAAA,UAGEC,qBAHF,SAGEA,qBAHF;AAAA,wCAIEC,eAJF;AAAA,UAIEA,eAJF,sCAIoB,EAJpB;AAAA,qCAKEC,YALF;AAAA,UAKEA,YALF,mCAKiB,EALjB;AAAA,sCAMEC,aANF;AAAA,UAMEA,aANF,oCAMkB,EANlB;AAAA,mCAOEf,UAPF;AAAA,UAOEA,UAPF,iCAOe,KAPf;AAAA,UAQEgB,qBARF,SAQEA,qBARF;AAAA,UASEC,KATF,SASEA,KATF,CAFO,CAcP;;;AACA,UAAMC,KAAK,GAAG,KAAKC,qBAAL,CAA2Bd,KAA3B,EAAkCC,aAAlC,CAAd;AAEA,
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","m","config","rubricless","points","sampleAnswers","rest","props","model","configuration","onConfigurationChanged","onModelChanged","imageSupport","baseInputConfiguration","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","rubriclessInstruction","width","value","verifyRubriclessModel","extraCSSRules","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","rubriclessInstructionEnabled","getPluginProps","Object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CAAEa,kBAAxB,CAL5B;AAME,UAAA,MAAM,EAAE;AACNC,YAAAA,UAAU,EAAET;AADN,WANV;AASE,UAAA,YAAY,EAAEZ;AAThB;AALJ,sBAkBE;AAAK,QAAA,KAAK,EAAE;AAAEsB,UAAAA,QAAQ,EAAEd;AAAZ;AAAZ,sBACE,gCAAC,gBAAD;AACE,QAAA,KAAK,EAAEC,KADT;AAEE,QAAA,MAAM,EAAEZ,aAFV;AAGE,QAAA,QAAQ,EAAEE,cAHZ;AAIE,QAAA,aAAa,EAAEO,aAJjB;AAKE,QAAA,UAAU,EAAEf,UALd;AAME,QAAA,UAAU,EAAEU,sBANd;AAOE,QAAA,YAAY,EAAED;AAPhB,QADF,CAlBF,CADF;AAgCD;;;EAvEgBuB,kBAAMC,S;;eA0EV,wBAAW1C,MAAX,EAAmBM,IAAnB,C","sourcesContent":["import React from 'react';\nimport { Authoring } from './pie-toolbox-rubric/index';\nimport { withStyles } from '@material-ui/core/styles';\nimport { layout, settings } from '@pie-lib/pie-toolbox/config-ui';\n\nconst { Panel, toggle } = settings;\n\nconst styles = (theme) => ({\n design: {\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize,\n },\n});\n\nclass Main extends React.Component {\n verifyRubriclessModel = (m, config) => {\n const { rubricless = false } = config || {};\n return rubricless ? (({ points, sampleAnswers, ...rest }) => rest)(m) : m;\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged, imageSupport } = this.props || {};\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n settingsPanelDisabled,\n showExcludeZero = {},\n showMaxPoint = {},\n mathMlOptions = {},\n rubricless = false,\n rubriclessInstruction,\n width,\n } = configuration || {};\n\n // ensure to eliminate points and sampleAnswers in case of rubricless\n const value = this.verifyRubriclessModel(model, configuration);\n const { extraCSSRules } = model;\n\n const panelProperties = {\n excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n pluginOpts={getPluginProps(rubriclessInstruction?.inputConfiguration)}\n groups={{\n Properties: panelProperties,\n }}\n imageSupport={imageSupport}\n />\n }\n >\n <div style={{ maxWidth: width }}>\n <Authoring\n value={value}\n config={configuration}\n onChange={onModelChanged}\n mathMlOptions={mathMlOptions}\n rubricless={rubricless}\n pluginOpts={baseInputConfiguration}\n imageSupport={imageSupport}\n />\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "4.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"description": "Rubric authoring view",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"author": "Pie Framework Authors",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@material-ui/core": "^3.9.2",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "2.0
|
|
11
|
+
"@pie-lib/pie-toolbox": "2.1.0",
|
|
12
12
|
"debug": "^4.1.1",
|
|
13
13
|
"react": "^16.8.6",
|
|
14
14
|
"react-dom": "^16.8.6"
|
package/configure/src/main.jsx
CHANGED
|
@@ -34,6 +34,7 @@ class Main extends React.Component {
|
|
|
34
34
|
|
|
35
35
|
// ensure to eliminate points and sampleAnswers in case of rubricless
|
|
36
36
|
const value = this.verifyRubriclessModel(model, configuration);
|
|
37
|
+
const { extraCSSRules } = model;
|
|
37
38
|
|
|
38
39
|
const panelProperties = {
|
|
39
40
|
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
@@ -52,6 +53,7 @@ class Main extends React.Component {
|
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
55
|
<layout.ConfigLayout
|
|
56
|
+
extraCSSRules={extraCSSRules}
|
|
55
57
|
dimensions={contentDimensions}
|
|
56
58
|
hideSettings={settingsPanelDisabled}
|
|
57
59
|
settings={
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@3.0.6...@pie-element/rubric-controller@3.0.7) (2024-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fixed all tests after updating pie-toolbox [PD-1460] ([9f5293d](https://github.com/pie-framework/pie-elements/commit/9f5293d618edc06f69fabb27a042ec5eee66e151))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.0.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-controller@3.0.5...@pie-element/rubric-controller@3.0.6) (2024-10-28)
|
|
7
18
|
|
|
8
19
|
|
package/controller/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.7",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "./node_modules/.bin/jest"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pie-lib/pie-toolbox": "2.0
|
|
10
|
+
"@pie-lib/pie-toolbox": "2.1.0",
|
|
11
11
|
"lodash": "^4.17.15"
|
|
12
12
|
}
|
|
13
13
|
}
|
package/lib/main.js
CHANGED
|
@@ -92,12 +92,16 @@ var Rubric = /*#__PURE__*/function (_React$Component) {
|
|
|
92
92
|
key: "render",
|
|
93
93
|
value: function render() {
|
|
94
94
|
var _this$props = this.props,
|
|
95
|
+
model = _this$props.model,
|
|
95
96
|
value = _this$props.value,
|
|
96
97
|
classes = _this$props.classes;
|
|
97
98
|
var animationsDisabled = this.props.animationsDisabled;
|
|
98
99
|
animationsDisabled = animationsDisabled || value.animationsDisabled;
|
|
99
100
|
|
|
100
101
|
if (value && value.points) {
|
|
102
|
+
var _ref = model || {},
|
|
103
|
+
extraCSSRules = _ref.extraCSSRules;
|
|
104
|
+
|
|
101
105
|
var points = value.points,
|
|
102
106
|
sampleAnswers = value.sampleAnswers;
|
|
103
107
|
|
|
@@ -142,7 +146,8 @@ var Rubric = /*#__PURE__*/function (_React$Component) {
|
|
|
142
146
|
})));
|
|
143
147
|
}));
|
|
144
148
|
|
|
145
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
149
|
+
return /*#__PURE__*/_react["default"].createElement(_renderUi.UiLayout, {
|
|
150
|
+
extraCSSRules: extraCSSRules,
|
|
146
151
|
className: classes.root
|
|
147
152
|
}, !animationsDisabled ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
148
153
|
href: this.dudUrl,
|
|
@@ -161,6 +166,7 @@ var Rubric = /*#__PURE__*/function (_React$Component) {
|
|
|
161
166
|
|
|
162
167
|
(0, _defineProperty2["default"])(Rubric, "propTypes", {
|
|
163
168
|
classes: _propTypes["default"].object.isRequired,
|
|
169
|
+
model: _propTypes["default"].object.isRequired,
|
|
164
170
|
animationsDisabled: _propTypes["default"].bool,
|
|
165
171
|
value: RubricType
|
|
166
172
|
});
|
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","classes","rubricList","slice","reverse","map","desc","length","pointsLabel","rubricCol","text","__html","marginLeft","root","dudUrl","React","Component","object","isRequired","styles","color","backgroundColor","background","flex","minWidth"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,IAAMA,UAAU,GAAGC,sBAAUC,KAAV,CAAgB;AACxCC,EAAAA,WAAW,EAAEF,sBAAUG,IADiB;AAExCC,EAAAA,MAAM,EAAEJ,sBAAUK,OAAV,CAAkBL,sBAAUM,MAA5B,CAFgC;AAGxCC,EAAAA,aAAa,EAAEP,sBAAUK,OAAV,CAAkBL,sBAAUM,MAA5B,CAHyB;AAIxCE,EAAAA,kBAAkB,EAAER,sBAAUG;AAJU,CAAhB,CAAnB;;;;IAODM,M;;;;;AAGJ,kBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,+FAFV,cAEU;AAAA,
|
|
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","rubricCol","text","__html","marginLeft","root","dudUrl","React","Component","object","isRequired","styles","color","backgroundColor","background","flex","minWidth"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,IAAMA,UAAU,GAAGC,sBAAUC,KAAV,CAAgB;A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IAAAA,SAAS,EAAE;AACTc,MAAAA,IAAI,EAAE,UADG;AAETC,MAAAA,QAAQ,EAAE;AAFD,KALS;AASpBd,IAAAA,IAAI,EAAE;AACJU,MAAAA,KAAK,EAAEA,gBAAMV,IAAN;AADH;AATc,GAAP;AAAA,CAAf;;eAce,wBAAWS,MAAX,EAAmB9B,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 ListItemText from '@material-ui/core/ListItemText';\nimport Link from '@material-ui/core/Link';\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}`}>\n <ListItemText\n className={classes.rubricCol}\n primary={<div className={classes.text}>{pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}</div>}\n />\n\n <ListItemText\n primary={<div className={classes.text} dangerouslySetInnerHTML={{ __html: desc }} />}\n />\n </ListItem>\n\n {sampleAnswers && sampleAnswers[index] && (\n <ListItem key={`S${index}`}>\n <ListItemText\n className={classes.rubricCol}\n style={{ marginLeft: '20px' }}\n primary={<div className={classes.text}>Sample Answer</div>}\n />\n\n <ListItemText\n primary={\n <div className={classes.text} dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />\n }\n />\n </ListItem>\n )}\n </React.Fragment>\n );\n })}\n </List>\n );\n\n return (\n <UiLayout extraCSSRules={extraCSSRules} className={classes.root}>\n {!animationsDisabled ? (\n <React.Fragment>\n <Link href={this.dudUrl} onClick={this.toggleRubric}>\n {this.state.linkPrefix} Rubric\n </Link>\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 = () => ({\n root: {\n color: color.text(),\n backgroundColor: color.background(),\n },\n rubricCol: {\n flex: '0 1 auto',\n minWidth: 'fit-content',\n },\n text: {\n color: color.text(),\n },\n});\n\nexport default withStyles(styles)(Rubric);\n"],"file":"main.js"}
|
package/module/configure.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.14/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.13/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -42346,6 +42346,7 @@ const require$$12$1 = _dll_pie_lib__pie_toolbox_config_ui;
|
|
|
42346
42346
|
var _ref3 = this.props || ({}), model = _ref3.model, configuration = _ref3.configuration, onConfigurationChanged = _ref3.onConfigurationChanged, onModelChanged = _ref3.onModelChanged, imageSupport = _ref3.imageSupport;
|
|
42347
42347
|
var _ref4 = configuration || ({}), _ref4$baseInputConfig = _ref4.baseInputConfiguration, baseInputConfiguration = _ref4$baseInputConfig === void 0 ? {} : _ref4$baseInputConfig, _ref4$contentDimensio = _ref4.contentDimensions, contentDimensions = _ref4$contentDimensio === void 0 ? {} : _ref4$contentDimensio, settingsPanelDisabled = _ref4.settingsPanelDisabled, _ref4$showExcludeZero = _ref4.showExcludeZero, showExcludeZero = _ref4$showExcludeZero === void 0 ? {} : _ref4$showExcludeZero, _ref4$showMaxPoint = _ref4.showMaxPoint, showMaxPoint = _ref4$showMaxPoint === void 0 ? {} : _ref4$showMaxPoint, _ref4$mathMlOptions = _ref4.mathMlOptions, mathMlOptions = _ref4$mathMlOptions === void 0 ? {} : _ref4$mathMlOptions, _ref4$rubricless = _ref4.rubricless, rubricless = _ref4$rubricless === void 0 ? false : _ref4$rubricless, rubriclessInstruction = _ref4.rubriclessInstruction, width = _ref4.width;
|
|
42348
42348
|
var value = this.verifyRubriclessModel(model, configuration);
|
|
42349
|
+
var extraCSSRules = model.extraCSSRules;
|
|
42349
42350
|
var panelProperties = {
|
|
42350
42351
|
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
42351
42352
|
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
@@ -42355,6 +42356,7 @@ const require$$12$1 = _dll_pie_lib__pie_toolbox_config_ui;
|
|
|
42355
42356
|
return Object.assign(_objectSpread({}, baseInputConfiguration), props || ({}));
|
|
42356
42357
|
};
|
|
42357
42358
|
return _react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
42359
|
+
extraCSSRules: extraCSSRules,
|
|
42358
42360
|
dimensions: contentDimensions,
|
|
42359
42361
|
hideSettings: settingsPanelDisabled,
|
|
42360
42362
|
settings: _react["default"].createElement(Panel, {
|
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.14/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.13/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -8116,6 +8116,7 @@ var Collapse = getDefaultExportFromCjs(Collapse$3);
|
|
|
8116
8116
|
const React$1 = _dll_react;
|
|
8117
8117
|
const PropTypes = _dll_prop_types;
|
|
8118
8118
|
const {color: color} = _dll_pie_lib__pie_toolbox_render_ui;
|
|
8119
|
+
const {UiLayout: UiLayout} = _dll_pie_lib__pie_toolbox_render_ui;
|
|
8119
8120
|
const _jsxFileName$1 = "/home/circleci/repo/packages/rubric/src/main.jsx";
|
|
8120
8121
|
const RubricType = PropTypes.shape({
|
|
8121
8122
|
excludeZero: PropTypes.bool,
|
|
@@ -8140,6 +8141,7 @@ class Rubric extends React$1.Component {
|
|
|
8140
8141
|
static __initStatic() {
|
|
8141
8142
|
this.propTypes = {
|
|
8142
8143
|
classes: PropTypes.object.isRequired,
|
|
8144
|
+
model: PropTypes.object.isRequired,
|
|
8143
8145
|
animationsDisabled: PropTypes.bool,
|
|
8144
8146
|
value: RubricType
|
|
8145
8147
|
};
|
|
@@ -8162,17 +8164,18 @@ class Rubric extends React$1.Component {
|
|
|
8162
8164
|
};
|
|
8163
8165
|
}
|
|
8164
8166
|
render() {
|
|
8165
|
-
const {value, classes} = this.props;
|
|
8167
|
+
const {model, value, classes} = this.props;
|
|
8166
8168
|
let {animationsDisabled} = this.props;
|
|
8167
8169
|
animationsDisabled = animationsDisabled || value.animationsDisabled;
|
|
8168
8170
|
if (value && value.points) {
|
|
8171
|
+
const {extraCSSRules} = model || ({});
|
|
8169
8172
|
const {points, sampleAnswers} = value;
|
|
8170
8173
|
const rubricList = React$1.createElement(List, {
|
|
8171
8174
|
component: "nav",
|
|
8172
8175
|
__self: this,
|
|
8173
8176
|
__source: {
|
|
8174
8177
|
fileName: _jsxFileName$1,
|
|
8175
|
-
lineNumber:
|
|
8178
|
+
lineNumber: 60
|
|
8176
8179
|
}
|
|
8177
8180
|
}, points.slice(0).reverse().map((desc, index) => {
|
|
8178
8181
|
index = points.length - index - 1;
|
|
@@ -8182,14 +8185,14 @@ class Rubric extends React$1.Component {
|
|
|
8182
8185
|
__self: this,
|
|
8183
8186
|
__source: {
|
|
8184
8187
|
fileName: _jsxFileName$1,
|
|
8185
|
-
lineNumber:
|
|
8188
|
+
lineNumber: 69
|
|
8186
8189
|
}
|
|
8187
8190
|
}, React$1.createElement(ListItem, {
|
|
8188
8191
|
key: `P${index}`,
|
|
8189
8192
|
__self: this,
|
|
8190
8193
|
__source: {
|
|
8191
8194
|
fileName: _jsxFileName$1,
|
|
8192
|
-
lineNumber:
|
|
8195
|
+
lineNumber: 70
|
|
8193
8196
|
}
|
|
8194
8197
|
}, React$1.createElement(ListItemText, {
|
|
8195
8198
|
className: classes.rubricCol,
|
|
@@ -8198,13 +8201,13 @@ class Rubric extends React$1.Component {
|
|
|
8198
8201
|
__self: this,
|
|
8199
8202
|
__source: {
|
|
8200
8203
|
fileName: _jsxFileName$1,
|
|
8201
|
-
lineNumber:
|
|
8204
|
+
lineNumber: 73
|
|
8202
8205
|
}
|
|
8203
8206
|
}, pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`),
|
|
8204
8207
|
__self: this,
|
|
8205
8208
|
__source: {
|
|
8206
8209
|
fileName: _jsxFileName$1,
|
|
8207
|
-
lineNumber:
|
|
8210
|
+
lineNumber: 71
|
|
8208
8211
|
}
|
|
8209
8212
|
}), React$1.createElement(ListItemText, {
|
|
8210
8213
|
primary: React$1.createElement('div', {
|
|
@@ -8215,20 +8218,20 @@ class Rubric extends React$1.Component {
|
|
|
8215
8218
|
__self: this,
|
|
8216
8219
|
__source: {
|
|
8217
8220
|
fileName: _jsxFileName$1,
|
|
8218
|
-
lineNumber:
|
|
8221
|
+
lineNumber: 77
|
|
8219
8222
|
}
|
|
8220
8223
|
}),
|
|
8221
8224
|
__self: this,
|
|
8222
8225
|
__source: {
|
|
8223
8226
|
fileName: _jsxFileName$1,
|
|
8224
|
-
lineNumber:
|
|
8227
|
+
lineNumber: 76
|
|
8225
8228
|
}
|
|
8226
8229
|
})), sampleAnswers && sampleAnswers[index] && React$1.createElement(ListItem, {
|
|
8227
8230
|
key: `S${index}`,
|
|
8228
8231
|
__self: this,
|
|
8229
8232
|
__source: {
|
|
8230
8233
|
fileName: _jsxFileName$1,
|
|
8231
|
-
lineNumber:
|
|
8234
|
+
lineNumber: 82
|
|
8232
8235
|
}
|
|
8233
8236
|
}, React$1.createElement(ListItemText, {
|
|
8234
8237
|
className: classes.rubricCol,
|
|
@@ -8240,13 +8243,13 @@ class Rubric extends React$1.Component {
|
|
|
8240
8243
|
__self: this,
|
|
8241
8244
|
__source: {
|
|
8242
8245
|
fileName: _jsxFileName$1,
|
|
8243
|
-
lineNumber:
|
|
8246
|
+
lineNumber: 86
|
|
8244
8247
|
}
|
|
8245
8248
|
}, "Sample Answer"),
|
|
8246
8249
|
__self: this,
|
|
8247
8250
|
__source: {
|
|
8248
8251
|
fileName: _jsxFileName$1,
|
|
8249
|
-
lineNumber:
|
|
8252
|
+
lineNumber: 83
|
|
8250
8253
|
}
|
|
8251
8254
|
}), React$1.createElement(ListItemText, {
|
|
8252
8255
|
primary: React$1.createElement('div', {
|
|
@@ -8257,28 +8260,29 @@ class Rubric extends React$1.Component {
|
|
|
8257
8260
|
__self: this,
|
|
8258
8261
|
__source: {
|
|
8259
8262
|
fileName: _jsxFileName$1,
|
|
8260
|
-
lineNumber:
|
|
8263
|
+
lineNumber: 91
|
|
8261
8264
|
}
|
|
8262
8265
|
}),
|
|
8263
8266
|
__self: this,
|
|
8264
8267
|
__source: {
|
|
8265
8268
|
fileName: _jsxFileName$1,
|
|
8266
|
-
lineNumber:
|
|
8269
|
+
lineNumber: 89
|
|
8267
8270
|
}
|
|
8268
8271
|
})));
|
|
8269
8272
|
}));
|
|
8270
|
-
return React$1.createElement(
|
|
8273
|
+
return React$1.createElement(UiLayout, {
|
|
8274
|
+
extraCSSRules: extraCSSRules,
|
|
8271
8275
|
className: classes.root,
|
|
8272
8276
|
__self: this,
|
|
8273
8277
|
__source: {
|
|
8274
8278
|
fileName: _jsxFileName$1,
|
|
8275
|
-
lineNumber:
|
|
8279
|
+
lineNumber: 103
|
|
8276
8280
|
}
|
|
8277
8281
|
}, !animationsDisabled ? React$1.createElement(React$1.Fragment, {
|
|
8278
8282
|
__self: this,
|
|
8279
8283
|
__source: {
|
|
8280
8284
|
fileName: _jsxFileName$1,
|
|
8281
|
-
lineNumber:
|
|
8285
|
+
lineNumber: 105
|
|
8282
8286
|
}
|
|
8283
8287
|
}, React$1.createElement(Link, {
|
|
8284
8288
|
href: this.dudUrl,
|
|
@@ -8286,7 +8290,7 @@ class Rubric extends React$1.Component {
|
|
|
8286
8290
|
__self: this,
|
|
8287
8291
|
__source: {
|
|
8288
8292
|
fileName: _jsxFileName$1,
|
|
8289
|
-
lineNumber:
|
|
8293
|
+
lineNumber: 106
|
|
8290
8294
|
}
|
|
8291
8295
|
}, this.state.linkPrefix, " Rubric"), React$1.createElement(Collapse, {
|
|
8292
8296
|
in: this.state.rubricOpen,
|
|
@@ -8294,7 +8298,7 @@ class Rubric extends React$1.Component {
|
|
|
8294
8298
|
__self: this,
|
|
8295
8299
|
__source: {
|
|
8296
8300
|
fileName: _jsxFileName$1,
|
|
8297
|
-
lineNumber:
|
|
8301
|
+
lineNumber: 109
|
|
8298
8302
|
}
|
|
8299
8303
|
}, rubricList)) : rubricList);
|
|
8300
8304
|
} else {
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.14/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.13/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -8116,6 +8116,7 @@ var Collapse = getDefaultExportFromCjs(Collapse$3);
|
|
|
8116
8116
|
const React$1 = _dll_react;
|
|
8117
8117
|
const PropTypes = _dll_prop_types;
|
|
8118
8118
|
const {color: color} = _dll_pie_lib__pie_toolbox_render_ui;
|
|
8119
|
+
const {UiLayout: UiLayout} = _dll_pie_lib__pie_toolbox_render_ui;
|
|
8119
8120
|
const _jsxFileName = "/home/circleci/repo/packages/rubric/src/main.jsx";
|
|
8120
8121
|
const RubricType = PropTypes.shape({
|
|
8121
8122
|
excludeZero: PropTypes.bool,
|
|
@@ -8140,6 +8141,7 @@ class Rubric extends React$1.Component {
|
|
|
8140
8141
|
static __initStatic() {
|
|
8141
8142
|
this.propTypes = {
|
|
8142
8143
|
classes: PropTypes.object.isRequired,
|
|
8144
|
+
model: PropTypes.object.isRequired,
|
|
8143
8145
|
animationsDisabled: PropTypes.bool,
|
|
8144
8146
|
value: RubricType
|
|
8145
8147
|
};
|
|
@@ -8162,17 +8164,18 @@ class Rubric extends React$1.Component {
|
|
|
8162
8164
|
};
|
|
8163
8165
|
}
|
|
8164
8166
|
render() {
|
|
8165
|
-
const {value, classes} = this.props;
|
|
8167
|
+
const {model, value, classes} = this.props;
|
|
8166
8168
|
let {animationsDisabled} = this.props;
|
|
8167
8169
|
animationsDisabled = animationsDisabled || value.animationsDisabled;
|
|
8168
8170
|
if (value && value.points) {
|
|
8171
|
+
const {extraCSSRules} = model || ({});
|
|
8169
8172
|
const {points, sampleAnswers} = value;
|
|
8170
8173
|
const rubricList = React$1.createElement(List, {
|
|
8171
8174
|
component: "nav",
|
|
8172
8175
|
__self: this,
|
|
8173
8176
|
__source: {
|
|
8174
8177
|
fileName: _jsxFileName,
|
|
8175
|
-
lineNumber:
|
|
8178
|
+
lineNumber: 60
|
|
8176
8179
|
}
|
|
8177
8180
|
}, points.slice(0).reverse().map((desc, index) => {
|
|
8178
8181
|
index = points.length - index - 1;
|
|
@@ -8182,14 +8185,14 @@ class Rubric extends React$1.Component {
|
|
|
8182
8185
|
__self: this,
|
|
8183
8186
|
__source: {
|
|
8184
8187
|
fileName: _jsxFileName,
|
|
8185
|
-
lineNumber:
|
|
8188
|
+
lineNumber: 69
|
|
8186
8189
|
}
|
|
8187
8190
|
}, React$1.createElement(ListItem, {
|
|
8188
8191
|
key: `P${index}`,
|
|
8189
8192
|
__self: this,
|
|
8190
8193
|
__source: {
|
|
8191
8194
|
fileName: _jsxFileName,
|
|
8192
|
-
lineNumber:
|
|
8195
|
+
lineNumber: 70
|
|
8193
8196
|
}
|
|
8194
8197
|
}, React$1.createElement(ListItemText, {
|
|
8195
8198
|
className: classes.rubricCol,
|
|
@@ -8198,13 +8201,13 @@ class Rubric extends React$1.Component {
|
|
|
8198
8201
|
__self: this,
|
|
8199
8202
|
__source: {
|
|
8200
8203
|
fileName: _jsxFileName,
|
|
8201
|
-
lineNumber:
|
|
8204
|
+
lineNumber: 73
|
|
8202
8205
|
}
|
|
8203
8206
|
}, pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`),
|
|
8204
8207
|
__self: this,
|
|
8205
8208
|
__source: {
|
|
8206
8209
|
fileName: _jsxFileName,
|
|
8207
|
-
lineNumber:
|
|
8210
|
+
lineNumber: 71
|
|
8208
8211
|
}
|
|
8209
8212
|
}), React$1.createElement(ListItemText, {
|
|
8210
8213
|
primary: React$1.createElement('div', {
|
|
@@ -8215,20 +8218,20 @@ class Rubric extends React$1.Component {
|
|
|
8215
8218
|
__self: this,
|
|
8216
8219
|
__source: {
|
|
8217
8220
|
fileName: _jsxFileName,
|
|
8218
|
-
lineNumber:
|
|
8221
|
+
lineNumber: 77
|
|
8219
8222
|
}
|
|
8220
8223
|
}),
|
|
8221
8224
|
__self: this,
|
|
8222
8225
|
__source: {
|
|
8223
8226
|
fileName: _jsxFileName,
|
|
8224
|
-
lineNumber:
|
|
8227
|
+
lineNumber: 76
|
|
8225
8228
|
}
|
|
8226
8229
|
})), sampleAnswers && sampleAnswers[index] && React$1.createElement(ListItem, {
|
|
8227
8230
|
key: `S${index}`,
|
|
8228
8231
|
__self: this,
|
|
8229
8232
|
__source: {
|
|
8230
8233
|
fileName: _jsxFileName,
|
|
8231
|
-
lineNumber:
|
|
8234
|
+
lineNumber: 82
|
|
8232
8235
|
}
|
|
8233
8236
|
}, React$1.createElement(ListItemText, {
|
|
8234
8237
|
className: classes.rubricCol,
|
|
@@ -8240,13 +8243,13 @@ class Rubric extends React$1.Component {
|
|
|
8240
8243
|
__self: this,
|
|
8241
8244
|
__source: {
|
|
8242
8245
|
fileName: _jsxFileName,
|
|
8243
|
-
lineNumber:
|
|
8246
|
+
lineNumber: 86
|
|
8244
8247
|
}
|
|
8245
8248
|
}, "Sample Answer"),
|
|
8246
8249
|
__self: this,
|
|
8247
8250
|
__source: {
|
|
8248
8251
|
fileName: _jsxFileName,
|
|
8249
|
-
lineNumber:
|
|
8252
|
+
lineNumber: 83
|
|
8250
8253
|
}
|
|
8251
8254
|
}), React$1.createElement(ListItemText, {
|
|
8252
8255
|
primary: React$1.createElement('div', {
|
|
@@ -8257,28 +8260,29 @@ class Rubric extends React$1.Component {
|
|
|
8257
8260
|
__self: this,
|
|
8258
8261
|
__source: {
|
|
8259
8262
|
fileName: _jsxFileName,
|
|
8260
|
-
lineNumber:
|
|
8263
|
+
lineNumber: 91
|
|
8261
8264
|
}
|
|
8262
8265
|
}),
|
|
8263
8266
|
__self: this,
|
|
8264
8267
|
__source: {
|
|
8265
8268
|
fileName: _jsxFileName,
|
|
8266
|
-
lineNumber:
|
|
8269
|
+
lineNumber: 89
|
|
8267
8270
|
}
|
|
8268
8271
|
})));
|
|
8269
8272
|
}));
|
|
8270
|
-
return React$1.createElement(
|
|
8273
|
+
return React$1.createElement(UiLayout, {
|
|
8274
|
+
extraCSSRules: extraCSSRules,
|
|
8271
8275
|
className: classes.root,
|
|
8272
8276
|
__self: this,
|
|
8273
8277
|
__source: {
|
|
8274
8278
|
fileName: _jsxFileName,
|
|
8275
|
-
lineNumber:
|
|
8279
|
+
lineNumber: 103
|
|
8276
8280
|
}
|
|
8277
8281
|
}, !animationsDisabled ? React$1.createElement(React$1.Fragment, {
|
|
8278
8282
|
__self: this,
|
|
8279
8283
|
__source: {
|
|
8280
8284
|
fileName: _jsxFileName,
|
|
8281
|
-
lineNumber:
|
|
8285
|
+
lineNumber: 105
|
|
8282
8286
|
}
|
|
8283
8287
|
}, React$1.createElement(Link, {
|
|
8284
8288
|
href: this.dudUrl,
|
|
@@ -8286,7 +8290,7 @@ class Rubric extends React$1.Component {
|
|
|
8286
8290
|
__self: this,
|
|
8287
8291
|
__source: {
|
|
8288
8292
|
fileName: _jsxFileName,
|
|
8289
|
-
lineNumber:
|
|
8293
|
+
lineNumber: 106
|
|
8290
8294
|
}
|
|
8291
8295
|
}, this.state.linkPrefix, " Rubric"), React$1.createElement(Collapse, {
|
|
8292
8296
|
in: this.state.rubricOpen,
|
|
@@ -8294,7 +8298,7 @@ class Rubric extends React$1.Component {
|
|
|
8294
8298
|
__self: this,
|
|
8295
8299
|
__source: {
|
|
8296
8300
|
fileName: _jsxFileName,
|
|
8297
|
-
lineNumber:
|
|
8301
|
+
lineNumber: 109
|
|
8298
8302
|
}
|
|
8299
8303
|
}, rubricList)) : rubricList);
|
|
8300
8304
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/rubric",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"description": "Rubric Scoring Interaction",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
|
-
"@pie-lib/pie-toolbox": "2.0
|
|
13
|
+
"@pie-lib/pie-toolbox": "2.1.0",
|
|
14
14
|
"prop-types": "^15.7.2"
|
|
15
15
|
},
|
|
16
16
|
"author": "pie framework developers",
|
|
17
17
|
"license": "ISC",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "0ceacdb80b0be7b4cae60b1eff7974170b088358",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|