@pie-element/complex-rubric 3.7.8-next.74 → 3.7.8-next.80
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/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/CHANGELOG.md +402 -676
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/configure/CHANGELOG.md +366 -574
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +584 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +152 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/configure/lib/index.js +89 -63
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +546 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +361 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +556 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +380 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +296 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +118 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +18 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/controller/CHANGELOG.md +172 -165
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/controller/lib/defaults.js +8 -5
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +215 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +13 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +1628 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +1202 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/docs/demo/config.js +2 -2
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +117 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +861 -0
- package/configure/node_modules/@pie-element/{rubric/docs/config-schema.json.md → multi-trait-rubric/docs/pie-schema.json.md} +284 -202
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/lib/index.js +27 -30
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +164 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +330 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +103 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/package.json +10 -12
- package/configure/package.json +5 -5
- package/module/configure.js +1 -1
- package/module/element.js +1 -1
- package/module/manifest.json +4 -4
- package/module/print.js +1 -1
- package/package.json +4 -4
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
- package/configure/node_modules/@pie-element/rubric/README.md +0 -3
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +0 -68
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +0 -162
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js +0 -573
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js +0 -24
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js +0 -172
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -17
- package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +0 -167
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +0 -42
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -129
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +0 -89
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/authoring.jsx +0 -449
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/index.js +0 -9
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/point-menu.jsx +0 -94
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -59
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -13
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -33
- package/configure/node_modules/@pie-element/rubric/controller/src/defaults.js +0 -8
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -41
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -712
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -2
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -391
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -281
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -270
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/module/configure.js +0 -42661
- package/configure/node_modules/@pie-element/rubric/module/controller.js +0 -113
- package/configure/node_modules/@pie-element/rubric/module/demo.js +0 -33
- package/configure/node_modules/@pie-element/rubric/module/element.js +0 -7980
- package/configure/node_modules/@pie-element/rubric/module/index.html +0 -21
- package/configure/node_modules/@pie-element/rubric/module/manifest.json +0 -14
- package/configure/node_modules/@pie-element/rubric/module/print-demo.js +0 -71
- package/configure/node_modules/@pie-element/rubric/module/print.html +0 -18
- package/configure/node_modules/@pie-element/rubric/module/print.js +0 -7993
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -1815
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -49
- package/configure/node_modules/@pie-element/rubric/src/index.js +0 -37
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -196
- package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
- /package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/LICENSE.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/scale.jsx"],"names":["styles","theme","wrapper","display","position","tableWrapper","width","overflow","table","borderSpacing","marginBottom","spacing","unit","borderRadius","color","text","fontSize","typography","lineHeight","marginBlockStart","paddingInlineStart","padding","textAlign","backgroundColor","secondaryBackground","verticalAlign","scorePointHeader","border","minWidth","pointLabel","scorePointValue","fontWeight","ArrowContainer","show","onClick","extraStyles","children","height","top","margin","alignItems","justifyContent","cursor","propTypes","PropTypes","bool","func","object","Scale","scrollLeft","offsetWidth","setState","showRight","scrollWidth","showLeft","initialScrollLeft","state","props","classes","scale","scaleIndex","showDescription","showPointsLabels","showStandards","arrowsDisabled","excludeZero","maxPoints","traitLabel","traits","scorePointsLabels","scorePointsValues","descriptions","pointsLabels","standards","pointValue","push","reduce","tcc","trait","traitStandards","traitDescriptions","description","length","e","left","background","ref","__html","map","index","traitIndex","scrollRight","right","React","Component","number","shape","arrayOf","string","name","scorePointsDescriptors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;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S,EAAE7B,sBAAUqD,OAAV,CAAkBrD,sBAAUsD,MAA5B,CAFG;AAGdE,MAAAA,sBAAsB,EAAExD,sBAAUqD,OAAV,CAAkBrD,sBAAUsD,MAA5B,CAHV;AAIdjB,MAAAA,WAAW,EAAErC,sBAAUsD;AAJT,KAAhB,CADM;AALa,GAAhB,CAHS;AAiBhBpC,EAAAA,gBAAgB,EAAElB,sBAAUC,IAjBZ;AAkBhBgB,EAAAA,eAAe,EAAEjB,sBAAUC,IAlBX;AAmBhBkB,EAAAA,aAAa,EAAEnB,sBAAUC,IAnBT;AAoBhBmB,EAAAA,cAAc,EAAEpB,sBAAUC;AApBV,CAAlB;;eAuBe,wBAAW7C,MAAX,EAAmBgD,KAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { color } from '@pie-lib/pie-toolbox/render-ui';\nimport Trait from './trait';\nimport ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';\n\nconst styles = (theme) => ({\n wrapper: {\n display: 'flex',\n position: 'relative'\n },\n tableWrapper: {\n width: '100%',\n overflow: 'auto'\n },\n table: {\n borderSpacing: 0,\n marginBottom: theme.spacing.unit * 2,\n borderRadius: '4px',\n color: color.text(),\n fontSize: theme.typography.fontSize,\n lineHeight: '16px',\n overflow: 'unset',\n\n '& ul, ol': {\n marginBlockStart: 0,\n paddingInlineStart: theme.spacing.unit * 2,\n },\n\n '& th': {\n padding: theme.spacing.unit * 2,\n textAlign: 'left',\n backgroundColor: color.secondaryBackground(),\n verticalAlign: 'bottom',\n },\n\n '& th div': {\n width: '200px',\n },\n\n '& td': {\n width: '200px',\n padding: `${theme.spacing.unit * 2}px ${theme.spacing.unit}px`,\n verticalAlign: 'top',\n },\n },\n scorePointHeader: {\n '& td': {\n border: 0,\n padding: 0,\n textAlign: 'center',\n minWidth: '200px',\n },\n },\n pointLabel: {\n marginBottom: '4px',\n },\n scorePointValue: {\n fontWeight: 'normal',\n },\n});\n\nconst ArrowContainer = ({ show, onClick, extraStyles, children }) => (\n <div\n style={{\n height: 'calc(100% - 1px)',\n top: '1px',\n display: show ? 'flex' : 'none',\n width: '50px',\n margin: 'auto',\n position: 'absolute',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer',\n ...extraStyles\n }}\n onClick={onClick}\n >\n {children}\n </div>\n);\n\nArrowContainer.propTypes = {\n show: PropTypes.bool,\n onClick: PropTypes.func,\n extraStyles: PropTypes.object,\n children: PropTypes.object,\n};\n\n\nclass Scale extends React.Component {\n state = {};\n\n componentDidMount() {\n if (this.tableWrapper) {\n if (this.tableWrapper.offsetWidth < this.tableWrapper.scrollWidth) {\n this.setState({ showRight: true });\n }\n }\n }\n\n scrollLeft = () => {\n this.tableWrapper.scrollLeft -= this.tableWrapper.offsetWidth / 2;\n\n this.setState({\n showRight: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth,\n showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0,\n });\n }\n\n scrollRight = () => {\n const initialScrollLeft = this.tableWrapper.scrollLeft;\n this.tableWrapper.scrollLeft += this.tableWrapper.offsetWidth / 2;\n\n this.setState({\n showRight: initialScrollLeft !== this.tableWrapper.scrollLeft && this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth,\n showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0,\n });\n }\n\n render() {\n const { showRight, showLeft } = this.state;\n const { classes, scale, scaleIndex, showDescription, showPointsLabels, showStandards, arrowsDisabled } = this.props;\n const { excludeZero, maxPoints, traitLabel, traits, scorePointsLabels } = scale || {};\n\n let scorePointsValues = [];\n let descriptions;\n let pointsLabels;\n let standards;\n\n try {\n // determining the score points values\n for (let pointValue = maxPoints; pointValue >= excludeZero ? 1 : 0; pointValue -= 1) {\n scorePointsValues.push(pointValue);\n }\n\n const { traitStandards, traitDescriptions } = traits.reduce(\n (tcc, trait) => ({\n traitStandards: [...tcc.traitStandards, ...(trait.standards || [])],\n traitDescriptions: [...tcc.traitDescriptions, ...(trait.description || [])],\n }),\n {\n traitStandards: [],\n traitDescriptions: [],\n },\n );\n\n descriptions = showDescription && traitDescriptions.length;\n pointsLabels = showPointsLabels && scorePointsLabels.length;\n standards = showStandards && traitStandards.length;\n } catch (e) {\n descriptions = false;\n pointsLabels = false;\n standards = false;\n }\n\n return (\n <div className={classes.wrapper}>\n <ArrowContainer\n show={showLeft && !arrowsDisabled}\n onClick={this.scrollLeft}\n extraStyles={{\n left: 0,\n background: `linear-gradient(to right, white, ${color.background()})`,\n }}\n >\n <ArrowBackIosIcon/>\n </ArrowContainer>\n\n <div\n className={classes.tableWrapper}\n ref={ref => {\n this.tableWrapper = ref;\n }}\n onScroll={() => {\n this.setState({\n // 5 is a margin of error\n showRight: this.tableWrapper.scrollLeft + this.tableWrapper.offsetWidth < this.tableWrapper.scrollWidth - 5\n && this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth,\n showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0,\n });\n }}\n >\n {arrowsDisabled && (showRight || showLeft) ? <div>The item is too large to fit in print mode.</div> : null}\n <table\n key={`scale-${scaleIndex}`}\n className={classes.table}\n >\n <thead>\n <tr>\n <th>\n <div dangerouslySetInnerHTML={{ __html: traitLabel }}/>\n </th>\n\n {standards ? (\n <th>\n <div>Standard(s)</div>\n </th>\n ) : null}\n\n {descriptions ? (\n <th>\n <div>Description</div>\n </th>\n ) : null}\n\n {scorePointsValues &&\n scorePointsValues.map((scorePointValue, index) => {\n let pointLabel = '';\n\n // to handle the case when there aren't enough labels\n try {\n pointLabel = scorePointsLabels[scorePointsValues.length - index - 1] || '';\n } catch (e) {\n pointLabel = '';\n }\n\n return (\n <th key={`table-header-${index}`}>\n <table className={classes.scorePointHeader}>\n <thead>\n {pointsLabels ? (\n <tr>\n <td>\n <div className={classes.pointLabel} dangerouslySetInnerHTML={{ __html: pointLabel }}/>\n </td>\n </tr>\n ) : null}\n <tr>\n <td className={classes.scorePointValue}>\n {scorePointValue === 1 ? `${scorePointValue} point` : `${scorePointValue} points`}\n </td>\n </tr>\n </thead>\n </table>\n </th>\n );\n })}\n </tr>\n </thead>\n\n <tbody>\n {traits &&\n traits.map((trait, traitIndex) => (\n <Trait\n key={`trait_${scaleIndex}_${traitIndex}`}\n trait={trait}\n traitIndex={traitIndex}\n showDescription={!!descriptions}\n showStandards={!!standards}\n scaleIndex={scaleIndex}\n scorePointsValues={scorePointsValues}\n excludeZero={excludeZero}\n />\n ))}\n </tbody>\n </table>\n </div>\n\n <ArrowContainer\n show={showRight && !arrowsDisabled}\n onClick={this.scrollRight}\n extraStyles={{\n right: 0,\n background: `linear-gradient(to left, white, ${color.background()})`,\n }}\n >\n <ArrowForwardIosIcon/>\n </ArrowContainer>\n </div>\n );\n }\n}\n\nScale.propTypes = {\n classes: PropTypes.object,\n scaleIndex: PropTypes.number,\n scale: PropTypes.shape({\n excludeZero: PropTypes.bool,\n maxPoints: PropTypes.number,\n scorePointsLabels: PropTypes.arrayOf(PropTypes.string),\n traitLabel: PropTypes.string,\n traits: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n standards: PropTypes.arrayOf(PropTypes.string),\n scorePointsDescriptors: PropTypes.arrayOf(PropTypes.string),\n description: PropTypes.string,\n }),\n ),\n }),\n showPointsLabels: PropTypes.bool,\n showDescription: PropTypes.bool,\n showStandards: PropTypes.bool,\n arrowsDisabled: PropTypes.bool,\n};\n\nexport default withStyles(styles)(Scale);\n"],"file":"scale.js"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _styles = require("@material-ui/core/styles");
|
|
15
|
+
|
|
16
|
+
var _renderUi = require("@pie-lib/pie-toolbox/render-ui");
|
|
17
|
+
|
|
18
|
+
var styles = function styles() {
|
|
19
|
+
return {
|
|
20
|
+
trait: {
|
|
21
|
+
'&$traitName': {
|
|
22
|
+
color: _renderUi.color.primaryDark(),
|
|
23
|
+
verticalAlign: 'middle'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
noDescription: {
|
|
27
|
+
color: _renderUi.color.secondaryBackground(),
|
|
28
|
+
textAlign: 'center'
|
|
29
|
+
},
|
|
30
|
+
traitName: {}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var Trait = function Trait(props) {
|
|
35
|
+
var trait = props.trait,
|
|
36
|
+
traitIndex = props.traitIndex,
|
|
37
|
+
scaleIndex = props.scaleIndex,
|
|
38
|
+
showStandards = props.showStandards,
|
|
39
|
+
showDescription = props.showDescription,
|
|
40
|
+
scorePointsValues = props.scorePointsValues,
|
|
41
|
+
classes = props.classes;
|
|
42
|
+
|
|
43
|
+
var _ref = trait || {},
|
|
44
|
+
name = _ref.name,
|
|
45
|
+
standards = _ref.standards,
|
|
46
|
+
scorePointsDescriptors = _ref.scorePointsDescriptors,
|
|
47
|
+
description = _ref.description;
|
|
48
|
+
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement("tr", {
|
|
50
|
+
key: "scale-".concat(scaleIndex, "-trait-").concat(traitIndex)
|
|
51
|
+
}, /*#__PURE__*/_react["default"].createElement("td", {
|
|
52
|
+
className: "".concat(classes.trait, " ").concat(classes.traitName)
|
|
53
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
54
|
+
dangerouslySetInnerHTML: {
|
|
55
|
+
__html: name
|
|
56
|
+
}
|
|
57
|
+
})), showStandards ? /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
+
dangerouslySetInnerHTML: {
|
|
59
|
+
__html: standards.join(',')
|
|
60
|
+
}
|
|
61
|
+
})) : null, showDescription ? /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: description
|
|
64
|
+
}
|
|
65
|
+
})) : null, scorePointsValues && scorePointsValues.map(function (scorePointValue, index) {
|
|
66
|
+
var scoreDescriptor;
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
scoreDescriptor = scorePointsDescriptors[scorePointsValues.length - index - 1] || '';
|
|
70
|
+
} catch (e) {
|
|
71
|
+
scoreDescriptor = '';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return /*#__PURE__*/_react["default"].createElement("td", {
|
|
75
|
+
key: "table-cell-".concat(index)
|
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: !scoreDescriptor ? classes.noDescription : '',
|
|
78
|
+
dangerouslySetInnerHTML: {
|
|
79
|
+
__html: scoreDescriptor || 'No Description'
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
Trait.propTypes = {
|
|
86
|
+
classes: _propTypes["default"].object,
|
|
87
|
+
showStandards: _propTypes["default"].bool,
|
|
88
|
+
showDescription: _propTypes["default"].bool,
|
|
89
|
+
scorePointsValues: _propTypes["default"].arrayOf(_propTypes["default"].number),
|
|
90
|
+
scaleIndex: _propTypes["default"].number,
|
|
91
|
+
traitIndex: _propTypes["default"].number,
|
|
92
|
+
trait: _propTypes["default"].shape({
|
|
93
|
+
name: _propTypes["default"].string,
|
|
94
|
+
standards: _propTypes["default"].arrayOf(_propTypes["default"].string),
|
|
95
|
+
scorePointsDescriptors: _propTypes["default"].arrayOf(_propTypes["default"].string),
|
|
96
|
+
description: _propTypes["default"].string
|
|
97
|
+
})
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var _default = (0, _styles.withStyles)(styles)(Trait);
|
|
101
|
+
|
|
102
|
+
exports["default"] = _default;
|
|
103
|
+
//# sourceMappingURL=trait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/trait.jsx"],"names":["styles","trait","color","primaryDark","verticalAlign","noDescription","secondaryBackground","textAlign","traitName","Trait","props","traitIndex","scaleIndex","showStandards","showDescription","scorePointsValues","classes","name","standards","scorePointsDescriptors","description","__html","join","map","scorePointValue","index","scoreDescriptor","length","e","propTypes","PropTypes","object","bool","arrayOf","number","shape","string"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBC,IAAAA,KAAK,EAAE;AACL,qBAAe;AACbC,QAAAA,KAAK,EAAEA,gBAAMC,WAAN,EADM;AAEbC,QAAAA,aAAa,EAAE;AAFF;AADV,KADa;AAOpBC,IAAAA,aAAa,EAAE;AACbH,MAAAA,KAAK,EAAEA,gBAAMI,mBAAN,EADM;AAEbC,MAAAA,SAAS,EAAE;AAFE,KAPK;AAWpBC,IAAAA,SAAS,EAAE;AAXS,GAAP;AAAA,CAAf;;AAcA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD,EAAW;AACvB,MAAQT,KAAR,GAAsGS,KAAtG,CAAQT,KAAR;AAAA,MAAeU,UAAf,GAAsGD,KAAtG,CAAeC,UAAf;AAAA,MAA2BC,UAA3B,GAAsGF,KAAtG,CAA2BE,UAA3B;AAAA,MAAuCC,aAAvC,GAAsGH,KAAtG,CAAuCG,aAAvC;AAAA,MAAsDC,eAAtD,GAAsGJ,KAAtG,CAAsDI,eAAtD;AAAA,MAAuEC,iBAAvE,GAAsGL,KAAtG,CAAuE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AAEK,eAAe,IAAI;AAA7B;AAF3B,MADF,CADF;AAQD,GAjBD,CAlBJ,CADF;AAuCD,CA3CD;;AA6CAjB,KAAK,CAACoB,SAAN,GAAkB;AAChBb,EAAAA,OAAO,EAAEc,sBAAUC,MADH;AAEhBlB,EAAAA,aAAa,EAAEiB,sBAAUE,IAFT;AAGhBlB,EAAAA,eAAe,EAAEgB,sBAAUE,IAHX;AAIhBjB,EAAAA,iBAAiB,EAAEe,sBAAUG,OAAV,CAAkBH,sBAAUI,MAA5B,CAJH;AAKhBtB,EAAAA,UAAU,EAAEkB,sBAAUI,MALN;AAMhBvB,EAAAA,UAAU,EAAEmB,sBAAUI,MANN;AAOhBjC,EAAAA,KAAK,EAAE6B,sBAAUK,KAAV,CAAgB;AACrBlB,IAAAA,IAAI,EAAEa,sBAAUM,MADK;AAErBlB,IAAAA,SAAS,EAAEY,sBAAUG,OAAV,CAAkBH,sBAAUM,MAA5B,CAFU;AAGrBjB,IAAAA,sBAAsB,EAAEW,sBAAUG,OAAV,CAAkBH,sBAAUM,MAA5B,CAHH;AAIrBhB,IAAAA,WAAW,EAAEU,sBAAUM;AAJF,GAAhB;AAPS,CAAlB;;eAee,wBAAWpC,MAAX,EAAmBS,KAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { color } from '@pie-lib/pie-toolbox/render-ui';\n\nconst styles = () => ({\n trait: {\n '&$traitName': {\n color: color.primaryDark(),\n verticalAlign: 'middle',\n },\n },\n noDescription: {\n color: color.secondaryBackground(),\n textAlign: 'center',\n },\n traitName: {},\n});\n\nconst Trait = (props) => {\n const { trait, traitIndex, scaleIndex, showStandards, showDescription, scorePointsValues, classes } = props;\n const { name, standards, scorePointsDescriptors, description } = trait || {};\n\n return (\n <tr key={`scale-${scaleIndex}-trait-${traitIndex}`}>\n <td className={`${classes.trait} ${classes.traitName}`}>\n <div dangerouslySetInnerHTML={{ __html: name }} />\n </td>\n\n {showStandards ? (\n <td>\n <div dangerouslySetInnerHTML={{ __html: standards.join(',') }} />\n </td>\n ) : null}\n\n {showDescription ? (\n <td>\n <div dangerouslySetInnerHTML={{ __html: description }} />\n </td>\n ) : null}\n\n {scorePointsValues &&\n scorePointsValues.map((scorePointValue, index) => {\n let scoreDescriptor;\n\n try {\n scoreDescriptor = scorePointsDescriptors[scorePointsValues.length - index - 1] || '';\n } catch (e) {\n scoreDescriptor = '';\n }\n\n return (\n <td key={`table-cell-${index}`}>\n <div\n className={!scoreDescriptor ? classes.noDescription : ''}\n dangerouslySetInnerHTML={{ __html: scoreDescriptor || 'No Description' }}\n />\n </td>\n );\n })}\n </tr>\n );\n};\n\nTrait.propTypes = {\n classes: PropTypes.object,\n showStandards: PropTypes.bool,\n showDescription: PropTypes.bool,\n scorePointsValues: PropTypes.arrayOf(PropTypes.number),\n scaleIndex: PropTypes.number,\n traitIndex: PropTypes.number,\n trait: PropTypes.shape({\n name: PropTypes.string,\n standards: PropTypes.arrayOf(PropTypes.string),\n scorePointsDescriptors: PropTypes.arrayOf(PropTypes.string),\n description: PropTypes.string,\n }),\n};\n\nexport default withStyles(styles)(Trait);\n"],"file":"trait.js"}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@pie-element/rubric",
|
|
3
|
-
"version": "4.9.9",
|
|
4
|
-
"main": "lib/index.js",
|
|
5
|
-
"module": "src/index.js",
|
|
6
|
-
"description": "Rubric Scoring Interaction",
|
|
2
|
+
"name": "@pie-element/multi-trait-rubric",
|
|
7
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
+
"version": "4.6.9",
|
|
8
5
|
"publishConfig": {
|
|
9
6
|
"access": "public"
|
|
10
7
|
},
|
|
11
8
|
"dependencies": {
|
|
12
9
|
"@material-ui/core": "^3.9.2",
|
|
10
|
+
"@pie-framework/pie-player-events": "^0.1.0",
|
|
13
11
|
"@pie-lib/pie-toolbox": "2.25.2",
|
|
14
|
-
"
|
|
12
|
+
"clsx": "^1.1.1",
|
|
13
|
+
"enzyme-to-json": "^3.3.5",
|
|
14
|
+
"prop-types": "^15.6.1",
|
|
15
|
+
"react": "^16.8.1",
|
|
16
|
+
"react-dom": "^16.8.1"
|
|
15
17
|
},
|
|
16
|
-
"author": "pie framework developers",
|
|
17
|
-
"license": "ISC",
|
|
18
18
|
"gitHead": "c467a0677fd15eec0c1b522a2525e3910d5a79dd",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"./print": "./src/print.js"
|
|
25
|
-
}
|
|
22
|
+
"main": "lib/index.js",
|
|
23
|
+
"module": "src/index.js"
|
|
26
24
|
}
|
package/configure/package.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"author": "Pie Framework Authors",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
|
-
"@pie-element/multi-trait-rubric": "^4.6.
|
|
12
|
-
"@pie-element/rubric": "^4.9.
|
|
11
|
+
"@pie-element/multi-trait-rubric": "^4.6.8-next.74",
|
|
12
|
+
"@pie-element/rubric": "^4.9.8-next.74",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
|
-
"@pie-lib/rubric": "^0.
|
|
15
|
-
"@pie-lib/render-ui": "^4.
|
|
16
|
-
"@pie-lib/config-ui": "^11.
|
|
14
|
+
"@pie-lib/rubric": "^0.22.0",
|
|
15
|
+
"@pie-lib/render-ui": "^4.29.0",
|
|
16
|
+
"@pie-lib/config-ui": "^11.23.0",
|
|
17
17
|
"debug": "^4.1.1",
|
|
18
18
|
"lodash": "^4.17.15",
|
|
19
19
|
"prop-types": "^15.6.2",
|