@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
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -6,24 +6,13 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
6
6
|
|
|
7
7
|
var _dec, _class, _class2, _temp;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
template: function template(theme) {
|
|
13
|
-
return "\n\n.eHqQt_eDnN{display:flex;justify-content:space-between;padding-bottom:".concat(theme.headingPadding || 'inherit', "}\n\n.eHqQt_eKXQ{margin:").concat(theme.cardTopMargin || 'inherit', " auto ").concat(theme.cardBottomMargin || 'inherit', " auto;padding:").concat(theme.cardWrapperPadding || 'inherit', ";position:relative}\n\n.eHqQt_dYbQ{align-items:center;display:flex;height:502px;justify-content:center;padding:").concat(theme.cardWrapperPadding || 'inherit', "}\n\n.eHqQt_crZr{padding-top:").concat(theme.metricGroupPaddingTop || 'inherit', "}\n\n.eHqQt_bTHH{position:absolute;right:calc(").concat(theme.viewPaddingRight || 'inherit', " + ").concat(theme.viewPaddingRightAdjust || 'inherit', ");top:").concat(theme.viewPaddingTop || 'inherit', "}\n\n.eHqQt_dPzc,.eHqQt_cpZE{column-gap:").concat(theme.metricsColumnGap || 'inherit', ";display:flex;flex-wrap:wrap;justify-content:flex-start;row-gap:1.5rem}");
|
|
14
|
-
},
|
|
15
|
-
'heading': 'eHqQt_eDnN',
|
|
16
|
-
'cardWrapper': 'eHqQt_eKXQ',
|
|
17
|
-
'skeletonCardWrapper': 'eHqQt_dYbQ',
|
|
18
|
-
'container': 'eHqQt_crZr',
|
|
19
|
-
'expandButtonContainer': 'eHqQt_bTHH',
|
|
20
|
-
'metricGroup': 'eHqQt_dPzc',
|
|
21
|
-
'metricsWrapper': 'eHqQt_cpZE'
|
|
22
|
-
};
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
import { Component } from 'react';
|
|
11
|
+
import generateStyle from "./styles.js";
|
|
23
12
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
24
13
|
import ExpandButton from "../../../../../common/components/shared/ExpandButton/index.js";
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
14
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
15
|
+
import generateComponentTheme from "./theme.js";
|
|
27
16
|
import { formatTimeToFullNumeric } from "../../../../../common/util/formatTimespan.js";
|
|
28
17
|
import Card from "../../../../../common/components/shared/Card/index.js";
|
|
29
18
|
import AnalysisPopoverMetric from "../AnalysisPopoverMetric/index.js";
|
|
@@ -33,7 +22,7 @@ import { quizAnalysisPropType } from "../propTypes.js";
|
|
|
33
22
|
import PropTypes from 'prop-types';
|
|
34
23
|
import { Spinner } from '@instructure/ui-spinner';
|
|
35
24
|
import { cronbachsAlpha, standardDeviation } from "./popoverContent.js";
|
|
36
|
-
export var NewQuizAnalysis = (_dec =
|
|
25
|
+
export var NewQuizAnalysis = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
37
26
|
_inherits(NewQuizAnalysis, _Component);
|
|
38
27
|
|
|
39
28
|
var _super = _createSuper(NewQuizAnalysis);
|
|
@@ -60,16 +49,16 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
60
49
|
|
|
61
50
|
_this.renderExpanded = function () {
|
|
62
51
|
var scores = _this.props.quizAnalysis.scores;
|
|
63
|
-
return
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
52
|
+
return jsx("div", {
|
|
53
|
+
css: _this.props.styles.container
|
|
54
|
+
}, jsx("div", {
|
|
55
|
+
css: _this.props.styles.metricGroup
|
|
56
|
+
}, jsx(AnalysisPopoverMetric, {
|
|
68
57
|
metricKey: "stddev",
|
|
69
58
|
value: scores === null || scores === void 0 ? void 0 : scores.stddev,
|
|
70
59
|
label: t('Standard Deviation'),
|
|
71
60
|
popoverDescription: standardDeviation
|
|
72
|
-
}),
|
|
61
|
+
}), jsx(AnalysisPopoverMetric, {
|
|
73
62
|
metricKey: "cronbachs_alpha",
|
|
74
63
|
value: scores === null || scores === void 0 ? void 0 : scores.cronbachs_alpha,
|
|
75
64
|
label: t('Cronbach\'s Alpha'),
|
|
@@ -82,45 +71,45 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
82
71
|
var scores = quizAnalysis.scores,
|
|
83
72
|
attempts = quizAnalysis.attempts;
|
|
84
73
|
var expanded = _this.state.expanded;
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
74
|
+
return jsx(Card, {
|
|
75
|
+
css: _this.props.styles.cardWrapper
|
|
76
|
+
}, jsx("div", {
|
|
77
|
+
css: _this.props.styles.metricGroup
|
|
78
|
+
}, jsx("div", {
|
|
79
|
+
css: _this.props.styles.metricsWrapper
|
|
80
|
+
}, jsx(AnalysisMetric, {
|
|
92
81
|
metricKey: "highscore",
|
|
93
82
|
label: t('High Score'),
|
|
94
83
|
value: scores === null || scores === void 0 ? void 0 : scores.max_percentage,
|
|
95
84
|
suffix: "%"
|
|
96
|
-
}),
|
|
85
|
+
}), jsx(AnalysisMetric, {
|
|
97
86
|
metricKey: "lowscore",
|
|
98
87
|
label: t('Low Score'),
|
|
99
88
|
value: scores === null || scores === void 0 ? void 0 : scores.min_percentage,
|
|
100
89
|
suffix: "%"
|
|
101
|
-
}),
|
|
90
|
+
}), jsx(AnalysisMetric, {
|
|
102
91
|
metricKey: "meanscore",
|
|
103
92
|
label: t('Mean Score'),
|
|
104
93
|
value: scores === null || scores === void 0 ? void 0 : scores.mean_percentage,
|
|
105
94
|
suffix: "%"
|
|
106
|
-
})),
|
|
107
|
-
|
|
108
|
-
},
|
|
95
|
+
})), jsx("div", {
|
|
96
|
+
css: _this.props.styles.metricsWrapper
|
|
97
|
+
}, jsx(AnalysisMetric, {
|
|
109
98
|
metricKey: "median_percentage",
|
|
110
99
|
label: t('Median Score'),
|
|
111
100
|
value: scores === null || scores === void 0 ? void 0 : scores.median_percentage,
|
|
112
101
|
suffix: "%"
|
|
113
|
-
}),
|
|
102
|
+
}), jsx(AnalysisMetric, {
|
|
114
103
|
metricKey: "mean_elapsed_sec",
|
|
115
104
|
label: t('Mean Elapsed Time'),
|
|
116
105
|
value: formatTimeToFullNumeric(attempts === null || attempts === void 0 ? void 0 : attempts.mean_elapsed_sec)
|
|
117
|
-
})),
|
|
118
|
-
|
|
119
|
-
},
|
|
106
|
+
})), jsx("div", {
|
|
107
|
+
css: _this.props.styles.expandButtonContainer
|
|
108
|
+
}, jsx(ExpandButton, {
|
|
120
109
|
onClick: _this.handleToggle,
|
|
121
110
|
title: expanded ? t('collapse quiz analysis') : t('expand quiz analysis'),
|
|
122
111
|
isExpanded: expanded
|
|
123
|
-
}))), expanded && _this.renderExpanded(),
|
|
112
|
+
}))), expanded && _this.renderExpanded(), jsx(ScoreDistribution, {
|
|
124
113
|
decileDistribution: _this.getPreparedDecileDistribution()
|
|
125
114
|
}));
|
|
126
115
|
};
|
|
@@ -152,9 +141,9 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
152
141
|
var fetchInProgress = this.props.fetchInProgress;
|
|
153
142
|
|
|
154
143
|
if (fetchInProgress) {
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
},
|
|
144
|
+
return jsx(Card, {
|
|
145
|
+
css: this.props.styles.skeletonCardWrapper
|
|
146
|
+
}, jsx(Spinner, {
|
|
158
147
|
renderTitle: t('Loading quiz analysis data')
|
|
159
148
|
}));
|
|
160
149
|
} else {
|
|
@@ -167,7 +156,8 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
167
156
|
return NewQuizAnalysis;
|
|
168
157
|
}(Component), _class2.propTypes = {
|
|
169
158
|
quizAnalysis: quizAnalysisPropType,
|
|
170
|
-
fetchInProgress: PropTypes.bool
|
|
159
|
+
fetchInProgress: PropTypes.bool,
|
|
160
|
+
styles: PropTypes.object
|
|
171
161
|
}.isRequired, _class2.defaultProps = {
|
|
172
162
|
quizAnalysis: {}
|
|
173
163
|
}, _temp)) || _class);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
var metric = {
|
|
3
|
+
flexWrap: 'wrap',
|
|
4
|
+
display: 'flex',
|
|
5
|
+
justifyContent: 'flex-start',
|
|
6
|
+
columnGap: componentTheme.metricsColumnGap,
|
|
7
|
+
rowGap: '1.5rem'
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
heading: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'space-between',
|
|
13
|
+
paddingBottom: componentTheme.headingPadding
|
|
14
|
+
},
|
|
15
|
+
cardWrapper: {
|
|
16
|
+
padding: componentTheme.cardWrapperPadding,
|
|
17
|
+
position: 'relative',
|
|
18
|
+
margin: "".concat(componentTheme.cardTopMargin, " auto ").concat(componentTheme.cardBottomMargin, " auto")
|
|
19
|
+
},
|
|
20
|
+
skeletonCardWrapper: {
|
|
21
|
+
padding: componentTheme.cardWrapperPadding,
|
|
22
|
+
height: '502px',
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center'
|
|
26
|
+
},
|
|
27
|
+
container: {
|
|
28
|
+
paddingTop: componentTheme.metricGroupPaddingTop
|
|
29
|
+
},
|
|
30
|
+
expandButtonContainer: {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
right: "calc(".concat(componentTheme.viewPaddingRight, " + ").concat(componentTheme.viewPaddingRightAdjust, ")"),
|
|
33
|
+
top: componentTheme.viewPaddingTop
|
|
34
|
+
},
|
|
35
|
+
metricsWrapper: metric,
|
|
36
|
+
metricGroup: metric
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing;
|
|
3
3
|
return {
|
|
4
4
|
metricGroupPaddingTop: spacing.medium,
|
|
@@ -11,4 +11,6 @@ export default function generator(_ref) {
|
|
|
11
11
|
cardWrapperPadding: spacing.medium,
|
|
12
12
|
metricsColumnGap: '82px'
|
|
13
13
|
};
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default generateComponentTheme;
|
|
@@ -3,27 +3,23 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
|
|
6
|
-
var _dec, _class, _temp;
|
|
6
|
+
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
+
/* eslint-disable no-unused-vars */
|
|
9
|
+
|
|
10
|
+
/** @jsx jsx */
|
|
8
11
|
import React, { Component } from 'react';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
9
13
|
import QuintileDistribution from "../../../../charts/QuintileDistribution/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
componentId: 'eRgoL',
|
|
14
|
-
template: function template(theme) {
|
|
15
|
-
return "\n\n.eRgoL_YBfL{background-color:".concat(theme.legendRectFillColor || 'inherit', "}\n\n.eRgoL_eDZF{column-gap:10px;display:inline-flex;padding:").concat(theme.legendPadding || 'inherit', " 0}\n\n.eRgoL_dVXF{margin:").concat(theme.legendMargin || 'inherit', " 0}\n\n.eRgoL_dxZa,[dir=ltr] .eRgoL_dxZa,[dir=rtl] .eRgoL_dxZa{text-align:center}");
|
|
16
|
-
},
|
|
17
|
-
'legendRect': 'eRgoL_YBfL',
|
|
18
|
-
'legendContainer': 'eRgoL_eDZF',
|
|
19
|
-
'headingContainer': 'eRgoL_dVXF',
|
|
20
|
-
'chartLabel': 'eRgoL_dxZa'
|
|
21
|
-
};
|
|
14
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
15
|
+
import generateComponentTheme from "./theme.js";
|
|
16
|
+
import generateStyle from "./styles.js";
|
|
22
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
23
18
|
import { Text } from '@instructure/ui-text';
|
|
24
19
|
import { Heading } from '@instructure/ui-heading';
|
|
25
20
|
import Legend from "../../../../charts/Legend/index.js";
|
|
26
|
-
|
|
21
|
+
import { number } from 'sinon/lib/sinon/match';
|
|
22
|
+
export var ScoreDistribution = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
27
23
|
_inherits(ScoreDistribution, _Component);
|
|
28
24
|
|
|
29
25
|
var _super = _createSuper(ScoreDistribution);
|
|
@@ -65,28 +61,28 @@ export var ScoreDistribution = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
65
61
|
key: "render",
|
|
66
62
|
value: function render() {
|
|
67
63
|
var decileDistribution = this.props.decileDistribution;
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
},
|
|
64
|
+
return jsx(React.Fragment, null, jsx("div", {
|
|
65
|
+
css: this.props.styles.headingContainer
|
|
66
|
+
}, jsx(Heading, {
|
|
71
67
|
level: "h3",
|
|
72
68
|
themeOverride: {
|
|
73
69
|
h3FontWeight: 700
|
|
74
70
|
}
|
|
75
|
-
}, t('Score Distribution'))),
|
|
71
|
+
}, t('Score Distribution'))), jsx(QuintileDistribution, {
|
|
76
72
|
animateDelay: 1000,
|
|
77
73
|
animateDuration: 1000,
|
|
78
74
|
visualDistribution: decileDistribution || [],
|
|
79
75
|
calculateLabelForColumn: decileDistribution.length > 10 ? this.calculateLabelForColumnsWithExtremeValues : this.calculateLabelForColumns
|
|
80
|
-
}),
|
|
76
|
+
}), jsx("div", {
|
|
81
77
|
"aria-hidden": "true",
|
|
82
|
-
|
|
83
|
-
},
|
|
78
|
+
css: this.props.styles.chartLabel
|
|
79
|
+
}, jsx(Text, {
|
|
84
80
|
size: "small"
|
|
85
|
-
}, t('Score'))),
|
|
86
|
-
|
|
87
|
-
},
|
|
81
|
+
}, t('Score'))), jsx("div", {
|
|
82
|
+
css: this.props.styles.legendContainer
|
|
83
|
+
}, jsx(Legend, {
|
|
88
84
|
series: [{
|
|
89
|
-
|
|
85
|
+
customStyles: this.props.styles.legendRect,
|
|
90
86
|
label: t('Number of Students')
|
|
91
87
|
}]
|
|
92
88
|
})));
|
|
@@ -95,4 +91,9 @@ export var ScoreDistribution = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
95
91
|
|
|
96
92
|
ScoreDistribution.displayName = "ScoreDistribution";
|
|
97
93
|
return ScoreDistribution;
|
|
98
|
-
}(Component),
|
|
94
|
+
}(Component), _class2.propTypes = {
|
|
95
|
+
decileDistribution: PropTypes.arrayOf(PropTypes.number),
|
|
96
|
+
styles: PropTypes.object
|
|
97
|
+
}, _class2.defaultProps = {
|
|
98
|
+
decileDistribution: []
|
|
99
|
+
}, _temp)) || _class);
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
legendRect: {
|
|
4
|
+
backgroundColor: componentTheme.legendRectFillColor
|
|
5
|
+
},
|
|
6
|
+
legendContainer: {
|
|
7
|
+
display: 'inline-flex',
|
|
8
|
+
columnGap: '10px',
|
|
9
|
+
padding: "".concat(componentTheme.legendPadding, " 0")
|
|
10
|
+
},
|
|
11
|
+
headingContainer: {
|
|
12
|
+
margin: "".concat(componentTheme.legendMargin, " 0")
|
|
13
|
+
},
|
|
14
|
+
chartLabel: {
|
|
15
|
+
textAlign: 'center'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default generateStyle;
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var colors = _ref.colors,
|
|
3
3
|
spacing = _ref.spacing,
|
|
4
4
|
typography = _ref.typography;
|
|
@@ -9,4 +9,6 @@ export default function generator(_ref) {
|
|
|
9
9
|
legendFontSize: typography.fontSizeXSmall,
|
|
10
10
|
legendMargin: spacing.medium
|
|
11
11
|
};
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default generateComponentTheme;
|
|
@@ -2,8 +2,6 @@
|
|
|
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
|
});
|
|
@@ -17,33 +15,25 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
21
19
|
|
|
22
20
|
var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
|
|
23
21
|
|
|
24
|
-
var
|
|
22
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
+
|
|
24
|
+
var _emotion = require("@instructure/emotion");
|
|
25
25
|
|
|
26
26
|
var _quizRce = require("@instructure/quiz-rce");
|
|
27
27
|
|
|
28
28
|
var _makeScrollable = _interopRequireDefault(require("../../../shared/functionality/makeScrollable.js"));
|
|
29
29
|
|
|
30
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
31
|
+
|
|
30
32
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
31
33
|
|
|
32
34
|
var _dec, _class, _class2, _temp;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
// renders the quiz instructions on
|
|
36
|
-
// the Preview and Take pages
|
|
37
|
-
// ================================
|
|
38
|
-
var styles = {
|
|
39
|
-
componentId: 'eLFCb',
|
|
40
|
-
template: function template(theme) {
|
|
41
|
-
return "\n\n.eLFCb_gasz{box-sizing:border-box;padding-left:".concat(theme.wrapperPadding || 'inherit', ";padding-right:").concat(theme.wrapperPadding || 'inherit', ";position:relative;width:100%}\n\n.eLFCb_gasz:after{clear:both;content:\"\";display:table}\n\n[dir=ltr] .eLFCb_gasz:after,[dir=rtl] .eLFCb_gasz:after{clear:both}\n\n.eLFCb_eWKC{font-size:").concat(theme.textFontSize || 'inherit', "}");
|
|
42
|
-
},
|
|
43
|
-
'wrapper': 'eLFCb_gasz',
|
|
44
|
-
'text': 'eLFCb_eWKC'
|
|
45
|
-
};
|
|
46
|
-
var QuizInstructions = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
36
|
+
var QuizInstructions = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
47
37
|
(0, _inherits2.default)(QuizInstructions, _Component);
|
|
48
38
|
|
|
49
39
|
var _super = (0, _createSuper2.default)(QuizInstructions);
|
|
@@ -56,11 +46,12 @@ var QuizInstructions = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
56
46
|
(0, _createClass2.default)(QuizInstructions, [{
|
|
57
47
|
key: "render",
|
|
58
48
|
value: function render() {
|
|
59
|
-
return
|
|
60
|
-
|
|
49
|
+
return (0, _emotion.jsx)("div", {
|
|
50
|
+
"data-testid": "instructionsWrapper",
|
|
51
|
+
css: this.props.styles.wrapper,
|
|
61
52
|
tabIndex: "-1"
|
|
62
|
-
},
|
|
63
|
-
customStyles: styles.text,
|
|
53
|
+
}, (0, _emotion.jsx)(_quizRce.RichContentRendererEmotion, {
|
|
54
|
+
customStyles: this.props.styles.text,
|
|
64
55
|
content: this.props.quiz.instructions
|
|
65
56
|
}));
|
|
66
57
|
}
|
|
@@ -68,7 +59,9 @@ var QuizInstructions = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
68
59
|
QuizInstructions.displayName = "QuizInstructions";
|
|
69
60
|
return QuizInstructions;
|
|
70
61
|
}(_react.Component), _class2.propTypes = {
|
|
71
|
-
quiz: _reactImmutableProptypes.default.record.isRequired
|
|
62
|
+
quiz: _reactImmutableProptypes.default.record.isRequired,
|
|
63
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
64
|
+
styles: _propTypes.default.object
|
|
72
65
|
}, _temp)) || _class);
|
|
73
66
|
exports.QuizInstructions = QuizInstructions;
|
|
74
67
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
wrapper: {
|
|
11
|
+
position: 'relative',
|
|
12
|
+
width: '100%',
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
paddingLeft: componentTheme.wrapperPadding,
|
|
15
|
+
paddingRight: componentTheme.wrapperPadding,
|
|
16
|
+
'&::after': {
|
|
17
|
+
clear: 'both',
|
|
18
|
+
content: '""',
|
|
19
|
+
display: 'table'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
text: {
|
|
23
|
+
fontSize: componentTheme.textFontSize
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var _default = generateStyle;
|
|
29
|
+
exports.default = _default;
|
|
@@ -3,13 +3,16 @@
|
|
|
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
|
typography = _ref.typography;
|
|
11
11
|
return {
|
|
12
12
|
wrapperPadding: spacing.large,
|
|
13
13
|
textFontSize: typography.fontSizeMedium
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var _default = generateComponentTheme;
|
|
18
|
+
exports.default = _default;
|
|
@@ -2,8 +2,6 @@
|
|
|
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
|
});
|
|
@@ -17,33 +15,25 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
19
|
+
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
|
|
22
22
|
var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
|
|
23
23
|
|
|
24
24
|
var _uiHeading = require("@instructure/ui-heading");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _emotion = require("@instructure/emotion");
|
|
27
27
|
|
|
28
28
|
var _makeScrollable = _interopRequireDefault(require("../../../shared/functionality/makeScrollable.js"));
|
|
29
29
|
|
|
30
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
31
|
+
|
|
30
32
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
31
33
|
|
|
32
34
|
var _dec, _class, _class2, _temp;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
// renders the quiz title on
|
|
36
|
-
// the Preview and Take pages
|
|
37
|
-
// ==========================
|
|
38
|
-
var styles = {
|
|
39
|
-
componentId: 'cBDEG',
|
|
40
|
-
template: function template(theme) {
|
|
41
|
-
return "\n\n.cBDEG_gasz{align-items:center;box-sizing:border-box;display:flex;margin-bottom:".concat(theme.wrapperMargin || 'inherit', ";padding-left:").concat(theme.wrapperPadding || 'inherit', ";padding-top:").concat(theme.wrapperPadding || 'inherit', ";position:relative;width:100%}\n\n.cBDEG_eWKC{font-size:").concat(theme.textFontSize || 'inherit', "}");
|
|
42
|
-
},
|
|
43
|
-
'wrapper': 'cBDEG_gasz',
|
|
44
|
-
'text': 'cBDEG_eWKC'
|
|
45
|
-
};
|
|
46
|
-
var QuizTitle = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
36
|
+
var QuizTitle = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
47
37
|
(0, _inherits2.default)(QuizTitle, _Component);
|
|
48
38
|
|
|
49
39
|
var _super = (0, _createSuper2.default)(QuizTitle);
|
|
@@ -56,13 +46,13 @@ var QuizTitle = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _de
|
|
|
56
46
|
(0, _createClass2.default)(QuizTitle, [{
|
|
57
47
|
key: "render",
|
|
58
48
|
value: function render() {
|
|
59
|
-
return
|
|
60
|
-
|
|
49
|
+
return (0, _emotion.jsx)("div", {
|
|
50
|
+
css: this.props.styles.wrapper,
|
|
61
51
|
tabIndex: "-1"
|
|
62
|
-
},
|
|
52
|
+
}, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
63
53
|
level: "h1"
|
|
64
|
-
},
|
|
65
|
-
|
|
54
|
+
}, (0, _emotion.jsx)("span", {
|
|
55
|
+
css: this.props.styles.text,
|
|
66
56
|
"data-automation": "sdk-quiz-title-text"
|
|
67
57
|
}, this.props.quiz.title)));
|
|
68
58
|
}
|
|
@@ -70,7 +60,9 @@ var QuizTitle = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _de
|
|
|
70
60
|
QuizTitle.displayName = "QuizTitle";
|
|
71
61
|
return QuizTitle;
|
|
72
62
|
}(_react.Component), _class2.propTypes = {
|
|
73
|
-
quiz: _reactImmutableProptypes.default.record.isRequired
|
|
63
|
+
quiz: _reactImmutableProptypes.default.record.isRequired,
|
|
64
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
65
|
+
styles: _propTypes.default.object
|
|
74
66
|
}, _temp)) || _class);
|
|
75
67
|
exports.QuizTitle = QuizTitle;
|
|
76
68
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
wrapper: {
|
|
11
|
+
position: 'relative',
|
|
12
|
+
width: '100%',
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
marginBottom: componentTheme.wrapperMargin,
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
paddingTop: componentTheme.wrapperPadding,
|
|
18
|
+
paddingLeft: componentTheme.wrapperPadding
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
fontSize: componentTheme.textFontSize
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _default = generateStyle;
|
|
27
|
+
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
|
typography = _ref.typography;
|
|
11
11
|
return {
|
|
@@ -13,4 +13,7 @@ function generator(_ref) {
|
|
|
13
13
|
wrapperMargin: spacing.medium,
|
|
14
14
|
textFontSize: typography.fontSizeXLarge
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var _default = generateComponentTheme;
|
|
19
|
+
exports.default = _default;
|