@instructure/quiz-core 20.4.2-rc.0 → 20.4.2-rc.2
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/es/common/components/resources/quiz/instructions/Instructions.js +17 -18
- package/es/common/components/resources/quiz/instructions/styles.js +21 -0
- package/es/common/components/resources/quiz/instructions/theme.js +4 -2
- package/es/common/components/resources/quiz/title/Title.js +15 -18
- package/es/common/components/resources/quiz/title/styles.js +19 -0
- package/es/common/components/resources/quiz/title/theme.js +4 -2
- package/es/common/components/resources/quizSessionResult/Header/index.js +22 -29
- package/es/common/components/resources/quizSessionResult/Header/styles.js +29 -0
- package/es/common/components/resources/quizSessionResult/Header/theme.js +4 -2
- package/es/common/components/resources/quizSessionResult/Info/index.js +43 -53
- package/es/common/components/resources/quizSessionResult/Info/styles.js +61 -0
- package/es/common/components/resources/quizSessionResult/Info/theme.js +4 -2
- package/es/reporting/components/Caption/index.js +13 -18
- package/es/reporting/components/Caption/styles.js +12 -0
- package/es/reporting/components/Caption/theme.js +4 -2
- package/es/reporting/components/charts/Legend/index.js +45 -33
- package/es/reporting/components/charts/Legend/styles.js +44 -0
- package/es/reporting/components/charts/Legend/theme.js +4 -2
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +61 -79
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +100 -0
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +34 -44
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +40 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +27 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +20 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +4 -2
- package/lib/common/components/resources/quiz/instructions/Instructions.js +15 -22
- package/lib/common/components/resources/quiz/instructions/styles.js +29 -0
- package/lib/common/components/resources/quiz/instructions/theme.js +6 -3
- package/lib/common/components/resources/quiz/title/Title.js +15 -23
- package/lib/common/components/resources/quiz/title/styles.js +27 -0
- package/lib/common/components/resources/quiz/title/theme.js +6 -3
- package/lib/common/components/resources/quizSessionResult/Header/index.js +21 -31
- package/lib/common/components/resources/quizSessionResult/Header/styles.js +37 -0
- package/lib/common/components/resources/quizSessionResult/Header/theme.js +6 -3
- package/lib/common/components/resources/quizSessionResult/Info/index.js +42 -55
- package/lib/common/components/resources/quizSessionResult/Info/styles.js +69 -0
- package/lib/common/components/resources/quizSessionResult/Info/theme.js +6 -3
- package/lib/reporting/components/Caption/index.js +12 -19
- package/lib/reporting/components/Caption/styles.js +20 -0
- package/lib/reporting/components/Caption/theme.js +6 -3
- package/lib/reporting/components/charts/Legend/index.js +44 -34
- package/lib/reporting/components/charts/Legend/styles.js +54 -0
- package/lib/reporting/components/charts/Legend/theme.js +6 -3
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +61 -80
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +110 -0
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +33 -45
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +48 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +27 -26
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +28 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +6 -3
- package/package.json +9 -9
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = exports.Legend = void 0;
|
|
11
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
|
|
14
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -17,33 +17,21 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
|
|
18
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
19
|
|
|
20
|
-
var _react =
|
|
20
|
+
var _react = require("react");
|
|
21
21
|
|
|
22
22
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
23
|
|
|
24
24
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _emotion = require("@instructure/emotion");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
29
29
|
|
|
30
30
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
31
31
|
|
|
32
32
|
var _dec, _class, _class2, _temp;
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
componentId: 'gafaO',
|
|
36
|
-
template: function template(theme) {
|
|
37
|
-
return "\n\n.gafaO_fEOG{border:".concat(theme.containerBorderWidth || 'inherit', " solid ").concat(theme.containerBorderColor || 'inherit', "}\n\n.gafaO_dWcO{margin:0 calc(-1*").concat(theme.seriesContainerRowMargin || 'inherit', ")}\n\n.gafaO_czwp{align-items:center;flex-direction:row;margin:").concat(theme.seriesContainerMargin || 'inherit', "}\n\n.gafaO_fEOG .gafaO_czwp{display:flex}\n\n.gafaO_dWcO .gafaO_czwp{display:inline-flex;padding:0 ").concat(theme.seriesContainerRowMargin || 'inherit', "}\n\n.gafaO_crhW{display:flex;height:1.2rem;margin-right:").concat(theme.seriesSwatchMargin || 'inherit', ";width:1.2rem}\n\n.gafaO_fAPS{flex:1}\n\n.gafaO_eVVT{color:").concat(theme.seriesLabelColor || 'inherit', ";font-family:").concat(theme.seriesLabelFontFamily || 'inherit', ";font-size:").concat(theme.seriesLabelFontSize || 'inherit', ";white-space:nowrap}");
|
|
38
|
-
},
|
|
39
|
-
'containerColumn': 'gafaO_fEOG',
|
|
40
|
-
'containerRow': 'gafaO_dWcO',
|
|
41
|
-
'seriesContainer': 'gafaO_czwp',
|
|
42
|
-
'seriesSwatchContainer': 'gafaO_crhW',
|
|
43
|
-
'seriesSwatch': 'gafaO_fAPS',
|
|
44
|
-
'seriesLabel': 'gafaO_eVVT'
|
|
45
|
-
};
|
|
46
|
-
var Legend = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
34
|
+
var Legend = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
47
35
|
(0, _inherits2.default)(Legend, _Component);
|
|
48
36
|
|
|
49
37
|
var _super = (0, _createSuper2.default)(Legend);
|
|
@@ -54,27 +42,47 @@ var Legend = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_
|
|
|
54
42
|
}
|
|
55
43
|
|
|
56
44
|
(0, _createClass2.default)(Legend, [{
|
|
45
|
+
key: "componentDidMount",
|
|
46
|
+
value: function componentDidMount() {
|
|
47
|
+
this.props.makeStyles();
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
key: "componentDidUpdate",
|
|
51
|
+
value: function componentDidUpdate() {
|
|
52
|
+
this.props.makeStyles();
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
57
55
|
key: "renderSeries",
|
|
58
|
-
value: function renderSeries(series, index) {
|
|
59
|
-
|
|
56
|
+
value: function renderSeries(series, index, styles) {
|
|
57
|
+
var customStyles = series.customStyles ? series.customStyles : {};
|
|
58
|
+
return (0, _emotion.jsx)("div", {
|
|
60
59
|
key: index,
|
|
61
|
-
className:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
className: "seriesContainer",
|
|
61
|
+
css: styles.seriesContainer
|
|
62
|
+
}, (0, _emotion.jsx)("div", {
|
|
63
|
+
css: styles.seriesSwatchContainer
|
|
64
|
+
}, (0, _emotion.jsx)("div", {
|
|
65
|
+
css: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles.seriesSwatch), customStyles)
|
|
66
|
+
})), (0, _emotion.jsx)("div", {
|
|
67
|
+
css: styles.seriesLabel
|
|
68
68
|
}, series.label));
|
|
69
69
|
}
|
|
70
70
|
}, {
|
|
71
71
|
key: "render",
|
|
72
72
|
value: function render() {
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
var _this = this;
|
|
74
|
+
|
|
75
|
+
var _this$props = this.props,
|
|
76
|
+
variant = _this$props.variant,
|
|
77
|
+
series = _this$props.series,
|
|
78
|
+
styles = _this$props.styles;
|
|
79
|
+
var containerClass = variant === 'row' ? 'containerRow' : 'containerColumn';
|
|
80
|
+
return (0, _emotion.jsx)(_uiA11yContent.PresentationContent, null, (0, _emotion.jsx)("div", {
|
|
81
|
+
className: containerClass,
|
|
82
|
+
css: styles.containerStyle
|
|
83
|
+
}, series.map(function (s, i) {
|
|
84
|
+
return _this.renderSeries(s, i, styles);
|
|
85
|
+
})));
|
|
78
86
|
}
|
|
79
87
|
}]);
|
|
80
88
|
Legend.displayName = "Legend";
|
|
@@ -82,9 +90,11 @@ var Legend = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_
|
|
|
82
90
|
}(_react.Component), _class2.propTypes = {
|
|
83
91
|
series: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
84
92
|
label: _propTypes.default.string.isRequired,
|
|
85
|
-
|
|
93
|
+
customStyles: _propTypes.default.object.isRequired
|
|
86
94
|
})),
|
|
87
|
-
variant: _propTypes.default.oneOf(['column', 'row'])
|
|
95
|
+
variant: _propTypes.default.oneOf(['column', 'row']),
|
|
96
|
+
makeStyles: _propTypes.default.func,
|
|
97
|
+
styles: _propTypes.default.object
|
|
88
98
|
}, _class2.defaultProps = {
|
|
89
99
|
series: [],
|
|
90
100
|
variant: 'column'
|
|
@@ -0,0 +1,54 @@
|
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var generateStyle = function generateStyle(componentTheme, props) {
|
|
13
|
+
var containerVariant = {
|
|
14
|
+
row: {
|
|
15
|
+
margin: "0 calc(-1 * ".concat(componentTheme.seriesContainerRowMargin, ")"),
|
|
16
|
+
'.seriesContainer': {
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
padding: "0 ".concat(componentTheme.seriesContainerRowMargin)
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
column: {
|
|
22
|
+
border: "".concat(componentTheme.containerBorderWidth, " solid ").concat(componentTheme.containerBorderColor),
|
|
23
|
+
'.seriesContainer': {
|
|
24
|
+
display: 'flex'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return {
|
|
29
|
+
seriesContainer: {
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
margin: componentTheme.seriesContainerMargin
|
|
33
|
+
},
|
|
34
|
+
containerStyle: (0, _objectSpread2.default)({}, containerVariant[props.variant]),
|
|
35
|
+
seriesSwatchContainer: {
|
|
36
|
+
width: '1.2rem',
|
|
37
|
+
height: '1.2rem',
|
|
38
|
+
marginRight: componentTheme.seriesSwatchMargin,
|
|
39
|
+
display: 'flex'
|
|
40
|
+
},
|
|
41
|
+
seriesSwatch: {
|
|
42
|
+
flex: 1
|
|
43
|
+
},
|
|
44
|
+
seriesLabel: {
|
|
45
|
+
fontFamily: componentTheme.seriesLabelFontFamily,
|
|
46
|
+
fontSize: componentTheme.seriesLabelFontSize,
|
|
47
|
+
whiteSpace: 'nowrap',
|
|
48
|
+
color: componentTheme.seriesLabelColor
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var _default = generateStyle;
|
|
54
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var borders = _ref.borders,
|
|
10
10
|
spacing = _ref.spacing,
|
|
11
11
|
colors = _ref.colors,
|
|
@@ -21,4 +21,7 @@ function generator(_ref) {
|
|
|
21
21
|
seriesLabelFontSize: typography.fontSizeXSmall,
|
|
22
22
|
seriesLabelColor: colors.textDarkest
|
|
23
23
|
};
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _default = generateComponentTheme;
|
|
27
|
+
exports.default = _default;
|
|
@@ -31,7 +31,7 @@ var _uiHeading = require("@instructure/ui-heading");
|
|
|
31
31
|
|
|
32
32
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _emotion = require("@instructure/emotion");
|
|
35
35
|
|
|
36
36
|
var _quizRce = require("@instructure/quiz-rce");
|
|
37
37
|
|
|
@@ -55,37 +55,15 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
55
55
|
|
|
56
56
|
var _quizCommon = require("@instructure/quiz-common");
|
|
57
57
|
|
|
58
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
59
|
+
|
|
58
60
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
59
61
|
|
|
60
62
|
var _dec, _class, _class2, _temp;
|
|
61
63
|
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return "\n\n.eCUxk_cQXk{margin-bottom:".concat(theme.itemAnalysisRowMargin || 'inherit', ";padding:").concat(theme.itemAnalysisRowPadding || 'inherit', ";position:relative}\n\n.eCUxk_dlpV{align-items:flex-start;display:flex;flex-direction:row;justify-content:space-between}\n\n.eCUxk_fAhB{color:").concat(theme.headerTextColor || 'inherit', ";font-size:").concat(theme.headerTextFontSize || 'inherit', "}\n\n.eCUxk_dzph{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;padding-bottom:").concat(theme.metricsRowLowerPadding || 'inherit', "}\n\n.eCUxk_dFNV{color:").concat(theme.metricNoteColor || 'inherit', ";font-size:").concat(theme.metricNoteFontSize || 'inherit', "}\n\n.eCUxk_cloC{flex:1 0 35%;font-size:").concat(theme.stemFontSize || 'inherit', ";line-height:").concat(theme.stemLineHeight || 'inherit', ";margin-bottom:").concat(theme.stemMargin || 'inherit', "}\n\n.eCUxk_cloC p{margin:0}\n\n.eCUxk_bQrf{flex:0 1 42rem}\n\n.eCUxk_eiMu{justify-content:center}\n\n.eCUxk_bwKH{color:").concat(theme.emptyTextColor || 'inherit', ";flex:0 1 42rem;padding:").concat(theme.emptyTextPadding || 'inherit', ";text-align:center}\n\n[dir=ltr] .eCUxk_bwKH,[dir=rtl] .eCUxk_bwKH{text-align:center}\n\n.eCUxk_sIdV{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;margin:0 -1rem}\n\n.eCUxk_dvfr{flex:10 1 45%}\n\n.eCUxk_dYYR{flex:1 1 auto;min-width:1%}\n\n.eCUxk_eFpQ{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;padding:0 ").concat(theme.answerDistributionPadding || 'inherit', ";position:relative}\n\n.eCUxk_dFwC{padding:0 ").concat(theme.answerDistributionChartPadding || 'inherit', ";width:19rem}\n\n.eCUxk_bqaR{padding:0 ").concat(theme.answerDistributionLegendPadding || 'inherit', "}\n\n.eCUxk_RMvh{background-color:").concat(theme.answerDistributionSwatchColor || 'inherit', "}\n\n.eCUxk_dMVr{display:flex;margin:0 -1rem}\n\n@media screen and (--phoneBreakPoint){.eCUxk_eFpQ{padding:0}.eCUxk_eiMu{flex-basis:50%}}");
|
|
66
|
-
},
|
|
67
|
-
'itemAnalysisRow': 'eCUxk_cQXk',
|
|
68
|
-
'headerRow': 'eCUxk_dlpV',
|
|
69
|
-
'headerText': 'eCUxk_fAhB',
|
|
70
|
-
'metricsRow': 'eCUxk_dzph',
|
|
71
|
-
'metricNote': 'eCUxk_dFNV',
|
|
72
|
-
'stem': 'eCUxk_cloC',
|
|
73
|
-
'metrics': 'eCUxk_bQrf',
|
|
74
|
-
'metric': 'eCUxk_eiMu',
|
|
75
|
-
'emptyText': 'eCUxk_bwKH',
|
|
76
|
-
'answerAnalysis': 'eCUxk_sIdV',
|
|
77
|
-
'answerTableSection': 'eCUxk_dvfr',
|
|
78
|
-
'answerDistributionSection': 'eCUxk_dYYR',
|
|
79
|
-
'answerDistribution': 'eCUxk_eFpQ',
|
|
80
|
-
'answerDistributionChart': 'eCUxk_dFwC',
|
|
81
|
-
'answerDistributionLegend': 'eCUxk_bqaR',
|
|
82
|
-
'answerDistributionSwatch': 'eCUxk_RMvh',
|
|
83
|
-
'outcomeAlignments': 'eCUxk_dMVr'
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var _ref2 = /*#__PURE__*/_react.default.createElement(_Spinner.default, null);
|
|
87
|
-
|
|
88
|
-
var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_withI18nSupport) {
|
|
64
|
+
var _ref2 = (0, _emotion.jsx)(_Spinner.default, null);
|
|
65
|
+
|
|
66
|
+
var ItemAnalysisRow = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_withI18nSupport) {
|
|
89
67
|
(0, _inherits2.default)(ItemAnalysisRow, _withI18nSupport);
|
|
90
68
|
|
|
91
69
|
var _super = (0, _createSuper2.default)(ItemAnalysisRow);
|
|
@@ -128,7 +106,7 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
128
106
|
position: position,
|
|
129
107
|
expanded: expanded
|
|
130
108
|
});
|
|
131
|
-
return
|
|
109
|
+
return (0, _emotion.jsx)(_index2.default, {
|
|
132
110
|
onClick: this.toggleExpanded,
|
|
133
111
|
title: title,
|
|
134
112
|
isExpanded: expanded,
|
|
@@ -142,74 +120,76 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
142
120
|
var interactionType = this.props.itemAnalysis.interactionTypeName();
|
|
143
121
|
var pointsPossible = this.props.itemAnalysis.pointsPossible;
|
|
144
122
|
var separator = ' | ';
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
123
|
+
return (0, _emotion.jsx)("div", {
|
|
124
|
+
css: this.props.styles.headerRow
|
|
125
|
+
}, (0, _emotion.jsx)("div", {
|
|
126
|
+
css: this.props.styles.headerText
|
|
127
|
+
}, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
150
128
|
level: "reset",
|
|
151
129
|
as: "h3"
|
|
152
|
-
},
|
|
130
|
+
}, (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Question {position, number}', {
|
|
153
131
|
position: position
|
|
154
|
-
})), interactionType,
|
|
132
|
+
})), interactionType, (0, _emotion.jsx)(_uiA11yContent.PresentationContent, null, separator), (0, _formatMessage.default)('{pointsPossible, number} points possible', {
|
|
155
133
|
pointsPossible: pointsPossible
|
|
156
134
|
}))), this.props.itemAnalysis.isPresent() && this.renderExpandButton());
|
|
157
135
|
}
|
|
158
136
|
}, {
|
|
159
137
|
key: "renderStem",
|
|
160
138
|
value: function renderStem() {
|
|
161
|
-
return
|
|
162
|
-
customStyles: styles.stem,
|
|
139
|
+
return (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
140
|
+
customStyles: this.props.styles.stem,
|
|
163
141
|
content: this.props.itemAnalysis.itemBody
|
|
164
142
|
});
|
|
165
143
|
}
|
|
166
144
|
}, {
|
|
167
145
|
key: "defaultMetricsList",
|
|
168
146
|
value: function defaultMetricsList() {
|
|
147
|
+
var _this2 = this;
|
|
148
|
+
|
|
169
149
|
var mean = _formatMessage.default.rich('{score}<0>/{possible, number} pts</0>', {
|
|
170
150
|
0: function _(_ref) {
|
|
171
151
|
var children = _ref.children;
|
|
172
|
-
return
|
|
152
|
+
return (0, _emotion.jsx)("span", {
|
|
173
153
|
key: "mean",
|
|
174
|
-
|
|
154
|
+
css: _this2.props.styles.metricNote
|
|
175
155
|
}, children);
|
|
176
156
|
},
|
|
177
157
|
score: this.props.itemAnalysis.meanScore(this.locale) || 0,
|
|
178
158
|
possible: this.props.itemAnalysis.pointsPossible
|
|
179
159
|
});
|
|
180
160
|
|
|
181
|
-
return
|
|
161
|
+
return (0, _emotion.jsx)(_uiMetric.MetricGroup, null, (0, _emotion.jsx)(_index7.default, {
|
|
182
162
|
key: "difficultyIndex",
|
|
183
163
|
renderLabel: (0, _formatMessage.default)('Difficulty Index'),
|
|
184
164
|
renderValue: this.props.itemAnalysis.difficultyIndex(this.locale),
|
|
185
|
-
|
|
165
|
+
css: this.props.styles.metric,
|
|
186
166
|
isGroupChild: true
|
|
187
|
-
}),
|
|
167
|
+
}), (0, _emotion.jsx)(_index7.default, {
|
|
188
168
|
key: "discriminationIndex",
|
|
189
169
|
renderLabel: (0, _formatMessage.default)('Discrimination Index'),
|
|
190
170
|
renderValue: this.props.itemAnalysis.discriminationIndex(this.locale),
|
|
191
|
-
|
|
171
|
+
css: this.props.styles.metric,
|
|
192
172
|
isGroupChild: true
|
|
193
|
-
}),
|
|
173
|
+
}), (0, _emotion.jsx)(_index7.default, {
|
|
194
174
|
key: "rpb",
|
|
195
175
|
renderLabel: (0, _formatMessage.default)('RPB'),
|
|
196
176
|
renderValue: this.props.itemAnalysis.pointBiserial(this.locale),
|
|
197
|
-
|
|
177
|
+
css: this.props.styles.metric,
|
|
198
178
|
isGroupChild: true
|
|
199
|
-
}),
|
|
179
|
+
}), (0, _emotion.jsx)(_index7.default, {
|
|
200
180
|
key: "meanEarnedScore",
|
|
201
181
|
renderLabel: (0, _formatMessage.default)('Mean Earned Score'),
|
|
202
182
|
renderValue: mean,
|
|
203
|
-
|
|
183
|
+
css: this.props.styles.metric,
|
|
204
184
|
isGroupChild: true
|
|
205
185
|
}));
|
|
206
186
|
}
|
|
207
187
|
}, {
|
|
208
188
|
key: "renderMetrics",
|
|
209
189
|
value: function renderMetrics() {
|
|
210
|
-
var list = _react.default.Children.count(this.props.children) === 0 ? this.defaultMetricsList() :
|
|
211
|
-
return
|
|
212
|
-
|
|
190
|
+
var list = _react.default.Children.count(this.props.children) === 0 ? this.defaultMetricsList() : (0, _emotion.jsx)(_uiMetric.MetricGroup, null, this.props.children);
|
|
191
|
+
return (0, _emotion.jsx)("div", {
|
|
192
|
+
css: this.props.styles.metrics
|
|
213
193
|
}, list);
|
|
214
194
|
}
|
|
215
195
|
}, {
|
|
@@ -219,11 +199,11 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
219
199
|
return;
|
|
220
200
|
}
|
|
221
201
|
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
},
|
|
202
|
+
return (0, _emotion.jsx)("div", {
|
|
203
|
+
css: this.props.styles.answerTableSection
|
|
204
|
+
}, (0, _emotion.jsx)(_index6.default, {
|
|
225
205
|
text: (0, _formatMessage.default)('Answer Frequency Summary')
|
|
226
|
-
},
|
|
206
|
+
}, (0, _emotion.jsx)(_index3.default, {
|
|
227
207
|
itemAnalysis: this.props.itemAnalysis
|
|
228
208
|
})));
|
|
229
209
|
}
|
|
@@ -232,26 +212,26 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
232
212
|
value: function renderAnswerAnalysis() {
|
|
233
213
|
if (this.props.expanded) {
|
|
234
214
|
var quintile = this.props.itemAnalysis.quintile();
|
|
235
|
-
return
|
|
236
|
-
|
|
237
|
-
}, this.renderAnswerAnalysisChart(),
|
|
238
|
-
|
|
215
|
+
return (0, _emotion.jsx)("div", {
|
|
216
|
+
css: this.props.styles.answerAnalysis
|
|
217
|
+
}, this.renderAnswerAnalysisChart(), (0, _emotion.jsx)("div", {
|
|
218
|
+
css: this.props.styles.answerDistributionSection,
|
|
239
219
|
"data-automation": "sdk-reporting-answer-distribution"
|
|
240
|
-
},
|
|
220
|
+
}, (0, _emotion.jsx)(_index6.default, {
|
|
241
221
|
text: (0, _formatMessage.default)('Performance by Quintile')
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
},
|
|
222
|
+
}, (0, _emotion.jsx)("div", {
|
|
223
|
+
css: this.props.styles.answerDistribution
|
|
224
|
+
}, (0, _emotion.jsx)("div", {
|
|
225
|
+
css: this.props.styles.answerDistributionChart
|
|
226
|
+
}, (0, _emotion.jsx)(_index4.default, {
|
|
247
227
|
visualDistribution: quintile,
|
|
248
228
|
animateDelay: this.props.animateDelay,
|
|
249
229
|
animateDuration: this.props.animateDuration
|
|
250
|
-
})),
|
|
251
|
-
|
|
252
|
-
},
|
|
230
|
+
})), (0, _emotion.jsx)("div", {
|
|
231
|
+
css: this.props.styles.answerDistributionLegend
|
|
232
|
+
}, (0, _emotion.jsx)(_index5.default, {
|
|
253
233
|
series: [{
|
|
254
|
-
|
|
234
|
+
customStyles: this.props.styles.answerDistributionSwatch,
|
|
255
235
|
label: (0, _formatMessage.default)('Number of Students')
|
|
256
236
|
}]
|
|
257
237
|
}))))));
|
|
@@ -267,11 +247,11 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
267
247
|
outcomesToken = _this$props3.outcomesToken;
|
|
268
248
|
|
|
269
249
|
if (expanded && outcomesEndpoint && itemAnalysis.outcomeAlignmentSetGuid) {
|
|
270
|
-
return
|
|
271
|
-
|
|
272
|
-
},
|
|
250
|
+
return (0, _emotion.jsx)("div", {
|
|
251
|
+
css: this.props.styles.outcomeAlignments
|
|
252
|
+
}, (0, _emotion.jsx)(_index6.default, {
|
|
273
253
|
text: (0, _formatMessage.default)('Outcomes')
|
|
274
|
-
},
|
|
254
|
+
}, (0, _emotion.jsx)(_OutcomeList.default, {
|
|
275
255
|
artifactType: "quizzes.item",
|
|
276
256
|
artifactId: itemAnalysis.itemId,
|
|
277
257
|
alignmentSetId: itemAnalysis.outcomeAlignmentSetGuid,
|
|
@@ -286,8 +266,8 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
286
266
|
}, {
|
|
287
267
|
key: "renderNotFound",
|
|
288
268
|
value: function renderNotFound() {
|
|
289
|
-
return
|
|
290
|
-
|
|
269
|
+
return (0, _emotion.jsx)("div", {
|
|
270
|
+
css: this.props.styles.emptyText
|
|
291
271
|
}, (0, _formatMessage.default)('No submissions yet'));
|
|
292
272
|
}
|
|
293
273
|
}, {
|
|
@@ -298,11 +278,11 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
298
278
|
}
|
|
299
279
|
|
|
300
280
|
var present = this.props.itemAnalysis.isPresent();
|
|
301
|
-
return
|
|
281
|
+
return (0, _emotion.jsx)(_index.default, {
|
|
302
282
|
key: this.props.itemId,
|
|
303
|
-
|
|
304
|
-
}, this.renderHeader(),
|
|
305
|
-
|
|
283
|
+
css: this.props.styles.itemAnalysisRow
|
|
284
|
+
}, this.renderHeader(), (0, _emotion.jsx)("div", {
|
|
285
|
+
css: this.props.styles.metricsRow
|
|
306
286
|
}, this.renderStem(), present ? this.renderMetrics() : this.renderNotFound()), present && this.renderAnswerAnalysis(), this.renderOutcomeAlignments());
|
|
307
287
|
}
|
|
308
288
|
}]);
|
|
@@ -320,7 +300,8 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
320
300
|
outcomesToken: _propTypes.default.string,
|
|
321
301
|
screenreaderNotification: _propTypes.default.func.isRequired,
|
|
322
302
|
children: _propTypes.default.arrayOf(_propTypes.default.node),
|
|
323
|
-
locale: _propTypes.default.string
|
|
303
|
+
locale: _propTypes.default.string,
|
|
304
|
+
styles: _propTypes.default.object
|
|
324
305
|
}, _class2.defaultProps = {
|
|
325
306
|
animateDelay: void 0,
|
|
326
307
|
animateDuration: void 0,
|
|
@@ -0,0 +1,110 @@
|
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
13
|
+
var mq = "@media screen and (".concat(componentTheme.phoneBreakPoint, ")");
|
|
14
|
+
return {
|
|
15
|
+
itemAnalysisRow: {
|
|
16
|
+
padding: componentTheme.itemAnalysisRowPadding,
|
|
17
|
+
marginBottom: componentTheme.itemAnalysisRowMargin,
|
|
18
|
+
position: 'relative'
|
|
19
|
+
},
|
|
20
|
+
headerRow: {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
alignItems: 'flex-start'
|
|
25
|
+
},
|
|
26
|
+
headerText: {
|
|
27
|
+
color: componentTheme.headerTextColor,
|
|
28
|
+
fontSize: componentTheme.headerTextFontSize
|
|
29
|
+
},
|
|
30
|
+
metricsRow: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
flexWrap: 'wrap',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
paddingBottom: componentTheme.metricsRowLowerPadding
|
|
36
|
+
},
|
|
37
|
+
metricNote: {
|
|
38
|
+
fontSize: componentTheme.metricNoteFontSize,
|
|
39
|
+
color: componentTheme.metricNoteColor
|
|
40
|
+
},
|
|
41
|
+
stem: {
|
|
42
|
+
flex: '1 0 35%',
|
|
43
|
+
fontSize: componentTheme.stemFontSize,
|
|
44
|
+
lineHeight: componentTheme.stemLineHeight,
|
|
45
|
+
marginBottom: componentTheme.stemMargin,
|
|
46
|
+
'& p': {
|
|
47
|
+
margin: 0
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
metrics: {
|
|
51
|
+
flex: '0 1 42rem'
|
|
52
|
+
},
|
|
53
|
+
metric: (0, _defineProperty2.default)({
|
|
54
|
+
justifyContent: 'center'
|
|
55
|
+
}, mq, {
|
|
56
|
+
flexBasis: '50%'
|
|
57
|
+
}),
|
|
58
|
+
emptyText: {
|
|
59
|
+
flex: '0 1 42rem',
|
|
60
|
+
padding: componentTheme.emptyTextPadding,
|
|
61
|
+
textAlign: 'center',
|
|
62
|
+
color: componentTheme.emptyTextColor
|
|
63
|
+
},
|
|
64
|
+
answerAnalysis: {
|
|
65
|
+
display: 'flex',
|
|
66
|
+
flexDirection: 'row',
|
|
67
|
+
flexWrap: 'wrap',
|
|
68
|
+
justifyContent: 'center',
|
|
69
|
+
margin: '0 -1rem'
|
|
70
|
+
},
|
|
71
|
+
answerTableSection: {
|
|
72
|
+
/* Explicit flex-basis is a workaround for https://bugs.webkit.org/show_bug.cgi?id=136041 */
|
|
73
|
+
flex: '10 1 45%'
|
|
74
|
+
},
|
|
75
|
+
answerDistributionSection: {
|
|
76
|
+
flex: '1 1 auto',
|
|
77
|
+
|
|
78
|
+
/* Non-zero width for IE11 flex-wrap */
|
|
79
|
+
minWidth: '1%'
|
|
80
|
+
},
|
|
81
|
+
answerDistribution: (0, _defineProperty2.default)({
|
|
82
|
+
display: 'flex',
|
|
83
|
+
flexDirection: 'row',
|
|
84
|
+
flexWrap: 'wrap',
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
padding: "0 ".concat(componentTheme.answerDistributionPadding),
|
|
88
|
+
position: 'relative'
|
|
89
|
+
}, mq, {
|
|
90
|
+
padding: 0
|
|
91
|
+
}),
|
|
92
|
+
answerDistributionChart: {
|
|
93
|
+
width: '19rem',
|
|
94
|
+
padding: "0 ".concat(componentTheme.answerDistributionChartPadding)
|
|
95
|
+
},
|
|
96
|
+
answerDistributionLegend: {
|
|
97
|
+
padding: "0 ".concat(componentTheme.answerDistributionLegendPadding)
|
|
98
|
+
},
|
|
99
|
+
answerDistributionSwatch: {
|
|
100
|
+
backgroundColor: componentTheme.answerDistributionSwatchColor
|
|
101
|
+
},
|
|
102
|
+
outcomeAlignments: {
|
|
103
|
+
display: 'flex',
|
|
104
|
+
margin: '0 - 1rem'
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var _default = generateStyle;
|
|
110
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var spacing = _ref.spacing,
|
|
10
10
|
colors = _ref.colors,
|
|
11
11
|
typography = _ref.typography,
|
|
@@ -29,4 +29,7 @@ function generator(_ref) {
|
|
|
29
29
|
answerDistributionSwatchColor: colors.electric,
|
|
30
30
|
phoneBreakPoint: "max-width: ".concat(breakpoints.medium)
|
|
31
31
|
};
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var _default = generateComponentTheme;
|
|
35
|
+
exports.default = _default;
|