@instructure/quiz-core 20.11.3-rc.2 → 20.11.3-rc.21
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/banks/components/Bank/presenter.js +12 -6
- package/es/banks/components/HeaderMenu/presenter.js +40 -1
- package/es/banks/components/HeaderMenu/styles.js +3 -0
- package/es/banks/components/NavWrapper/presenter.js +6 -1
- package/es/banks/components/SharingModal/presenter.js +1 -1
- package/es/building/components/resources/quizEntry/QuizEntry/index.js +2 -1
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +23 -29
- package/es/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +39 -0
- package/es/building/components/resources/quizEntry/QuizEntry/styles.js +23 -0
- package/es/building/components/resources/quizEntry/QuizEntry/theme.js +4 -2
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +35 -43
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +30 -0
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +4 -2
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +25 -31
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +19 -0
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +4 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +27 -33
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +28 -0
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +4 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +32 -37
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +49 -0
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +4 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +23 -23
- package/es/building/components/resources/quizEntry/QuizEntryEdit/styles.js +21 -0
- package/es/building/components/resources/quizEntry/QuizEntryEdit/theme.js +4 -2
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +36 -50
- package/es/building/components/resources/quizEntry/QuizEntryShow/styles.js +84 -0
- package/es/building/components/resources/quizEntry/QuizEntryShow/theme.js +4 -2
- package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +1 -1
- package/es/common/components/layout/navbar/index.js +135 -38
- package/es/common/components/layout/navbar/styles.js +8 -0
- package/es/common/components/layout/navbar/theme.js +10 -0
- package/es/common/components/resources/stimulus/Stimulus/presenter.js +40 -50
- package/es/common/components/resources/stimulus/Stimulus/styles.js +58 -0
- package/es/common/components/resources/stimulus/Stimulus/theme.js +4 -2
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +37 -46
- package/es/common/components/resources/stimulus/StimulusEdit/styles.js +46 -0
- package/es/common/components/resources/stimulus/StimulusEdit/theme.js +4 -2
- package/es/common/components/shared/overlayEmotion/index.js +1 -1
- package/es/common/components/shared/return_button/ReturnButton.js +4 -1
- package/es/moderating/components/resources/ModerateTable/presenter.js +44 -46
- package/es/moderating/components/resources/ModerateTable/styles.js +23 -0
- package/es/moderating/components/resources/ModerateTable/theme.js +4 -2
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +63 -68
- package/es/moderating/components/resources/ModerateTableRow/styles.js +25 -0
- package/es/moderating/components/resources/ModerateTableRow/theme.js +4 -2
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +34 -41
- package/es/reporting/components/quizAnalysis/styles.js +27 -0
- package/es/reporting/components/quizAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +43 -43
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +41 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +6 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +20 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +19 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +45 -47
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +52 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +32 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +14 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +38 -53
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +141 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +10 -7
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +80 -61
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +93 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +8 -5
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +31 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +15 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +80 -79
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +75 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +47 -49
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +14 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +4 -2
- package/lib/banks/components/Bank/presenter.js +10 -5
- package/lib/banks/components/HeaderMenu/presenter.js +42 -1
- package/lib/banks/components/HeaderMenu/styles.js +3 -0
- package/lib/banks/components/NavWrapper/presenter.js +6 -1
- package/lib/banks/components/SharingModal/presenter.js +1 -1
- package/lib/building/components/resources/quizEntry/QuizEntry/index.js +3 -1
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +22 -30
- package/lib/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +51 -0
- package/lib/building/components/resources/quizEntry/QuizEntry/styles.js +33 -0
- package/lib/building/components/resources/quizEntry/QuizEntry/theme.js +6 -3
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +34 -45
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +38 -0
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +6 -3
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +24 -33
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +27 -0
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +6 -3
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +26 -35
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +38 -0
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +6 -3
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +30 -38
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +57 -0
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +6 -3
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +20 -22
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/styles.js +29 -0
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/theme.js +6 -3
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +36 -53
- package/lib/building/components/resources/quizEntry/QuizEntryShow/styles.js +95 -0
- package/lib/building/components/resources/quizEntry/QuizEntryShow/theme.js +6 -3
- package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +1 -1
- package/lib/common/components/layout/navbar/index.js +130 -39
- package/lib/common/components/layout/navbar/styles.js +16 -0
- package/lib/common/components/layout/navbar/theme.js +18 -0
- package/lib/common/components/resources/stimulus/Stimulus/presenter.js +38 -52
- package/lib/common/components/resources/stimulus/Stimulus/styles.js +70 -0
- package/lib/common/components/resources/stimulus/Stimulus/theme.js +6 -3
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +36 -47
- package/lib/common/components/resources/stimulus/StimulusEdit/styles.js +54 -0
- package/lib/common/components/resources/stimulus/StimulusEdit/theme.js +6 -3
- package/lib/common/components/shared/overlayEmotion/index.js +1 -1
- package/lib/common/components/shared/return_button/ReturnButton.js +4 -1
- package/lib/moderating/components/resources/ModerateTable/presenter.js +43 -50
- package/lib/moderating/components/resources/ModerateTable/styles.js +33 -0
- package/lib/moderating/components/resources/ModerateTable/theme.js +6 -3
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +61 -70
- package/lib/moderating/components/resources/ModerateTableRow/styles.js +33 -0
- package/lib/moderating/components/resources/ModerateTableRow/theme.js +6 -3
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +33 -43
- package/lib/reporting/components/quizAnalysis/styles.js +37 -0
- package/lib/reporting/components/quizAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +42 -47
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +51 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +8 -4
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +19 -28
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +27 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +45 -52
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +62 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +28 -26
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +24 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +37 -55
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +149 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +12 -8
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +81 -65
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +103 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +10 -6
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +30 -28
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +23 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +82 -84
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +85 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +43 -48
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +22 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +6 -3
- package/package.json +9 -9
- package/es/common/components/layout/navbar/presenter.js +0 -114
- package/lib/common/components/layout/navbar/presenter.js +0 -136
|
@@ -5,36 +5,28 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
+
/** @jsx jsx */
|
|
8
9
|
import React, { Component } from 'react';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
12
|
import { Heading } from '@instructure/ui-heading';
|
|
12
13
|
import { MetricGroup } from '@instructure/ui-metric';
|
|
13
14
|
import { Text } from '@instructure/ui-text';
|
|
14
|
-
import {
|
|
15
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
15
16
|
import FormattedDuration from "../../../common/components/shared/FormattedDuration/index.js";
|
|
16
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
17
18
|
import Card from "../../../common/components/shared/Card/index.js";
|
|
18
19
|
import Spinner from "../../../common/components/shared/spinner/Spinner.js";
|
|
19
20
|
import CentileDistribution from "../charts/CentileDistribution/index.js";
|
|
20
21
|
import MetricsListItem from "../MetricsListItem/index.js";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
template: function template(theme) {
|
|
24
|
-
return "\n\n.fOAfX_bGBk{padding:".concat(theme.rootPadding || 'inherit', "}\n\n.fOAfX_CIyo{padding-bottom:").concat(theme.metricWrapperPadding || 'inherit', "}\n\n.fOAfX_CIyo,.fOAfX_gasz{margin-top:").concat(theme.wrapperMargin || 'inherit', "}\n\n@media screen and (--tabletBreakPoint){.fOAfX_eiMu{flex-basis:33.3%}}\n\n@media screen and (--phoneBreakPoint){.fOAfX_eiMu{flex-basis:50%}}");
|
|
25
|
-
},
|
|
26
|
-
'root': 'fOAfX_bGBk',
|
|
27
|
-
'metricWrapper': 'fOAfX_CIyo',
|
|
28
|
-
'wrapper': 'fOAfX_gasz',
|
|
29
|
-
'metric': 'fOAfX_eiMu'
|
|
30
|
-
};
|
|
31
|
-
import theme from "./theme.js";
|
|
22
|
+
import generateStyle from "./styles.js";
|
|
23
|
+
import generateComponentTheme from "./theme.js";
|
|
32
24
|
|
|
33
|
-
var _ref =
|
|
25
|
+
var _ref = jsx("br", null);
|
|
34
26
|
|
|
35
|
-
var _ref2 =
|
|
27
|
+
var _ref2 = jsx(Spinner, null);
|
|
36
28
|
|
|
37
|
-
export var QuizAnalysisOverview = (_dec =
|
|
29
|
+
export var QuizAnalysisOverview = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
38
30
|
_inherits(QuizAnalysisOverview, _Component);
|
|
39
31
|
|
|
40
32
|
var _super = _createSuper(QuizAnalysisOverview);
|
|
@@ -53,10 +45,10 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
53
45
|
_this.renderBatchTimestamp = function () {
|
|
54
46
|
if (_this.props.quizAnalysis.batchTimestamp) {
|
|
55
47
|
var timestamp = Date.parse(_this.props.quizAnalysis.batchTimestamp);
|
|
56
|
-
return
|
|
48
|
+
return jsx(Text, {
|
|
57
49
|
color: "secondary",
|
|
58
50
|
size: "x-small"
|
|
59
|
-
}, _ref,
|
|
51
|
+
}, _ref, jsx("b", null, t('Data Last Updated:')), "\xA0", t.date(timestamp, 'medium'));
|
|
60
52
|
}
|
|
61
53
|
};
|
|
62
54
|
|
|
@@ -67,47 +59,47 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
67
59
|
key: "defaulMetrics",
|
|
68
60
|
value: function defaulMetrics() {
|
|
69
61
|
var quizAnalysis = this.props.quizAnalysis;
|
|
70
|
-
var formattedElapsedTime =
|
|
62
|
+
var formattedElapsedTime = jsx(FormattedDuration, {
|
|
71
63
|
fontSize: "x-large",
|
|
72
64
|
seconds: quizAnalysis.meanElapsedTime()
|
|
73
65
|
});
|
|
74
|
-
return
|
|
66
|
+
return jsx(MetricGroup, null, jsx(MetricsListItem, {
|
|
75
67
|
key: "highScore",
|
|
76
68
|
renderLabel: t('High Score'),
|
|
77
69
|
renderValue: quizAnalysis.highScore(),
|
|
78
|
-
|
|
70
|
+
css: this.props.styles.metric,
|
|
79
71
|
isGroupChild: true
|
|
80
|
-
}),
|
|
72
|
+
}), jsx(MetricsListItem, {
|
|
81
73
|
key: "lowScore",
|
|
82
74
|
renderLabel: t('Low Score'),
|
|
83
75
|
renderValue: quizAnalysis.lowScore(),
|
|
84
|
-
|
|
76
|
+
css: this.props.styles.metric,
|
|
85
77
|
isGroupChild: true
|
|
86
|
-
}),
|
|
78
|
+
}), jsx(MetricsListItem, {
|
|
87
79
|
key: "meanScore",
|
|
88
80
|
renderLabel: t('Mean Score'),
|
|
89
81
|
renderValue: quizAnalysis.meanScore(),
|
|
90
|
-
|
|
82
|
+
css: this.props.styles.metric,
|
|
91
83
|
isGroupChild: true
|
|
92
|
-
}),
|
|
84
|
+
}), jsx(MetricsListItem, {
|
|
93
85
|
key: "standardDeviation",
|
|
94
86
|
renderLabel: t('Standard Deviation'),
|
|
95
87
|
renderValue: quizAnalysis.standardDeviation(),
|
|
96
|
-
|
|
88
|
+
css: this.props.styles.metric,
|
|
97
89
|
isGroupChild: true
|
|
98
|
-
}),
|
|
90
|
+
}), jsx(MetricsListItem, {
|
|
99
91
|
key: "meanElapsedTime",
|
|
100
92
|
renderLabel: t('Mean Elapsed Time'),
|
|
101
|
-
renderValue:
|
|
93
|
+
renderValue: jsx(Text, {
|
|
102
94
|
size: "x-large"
|
|
103
95
|
}, formattedElapsedTime),
|
|
104
|
-
|
|
96
|
+
css: this.props.styles.metric,
|
|
105
97
|
isGroupChild: true
|
|
106
|
-
}),
|
|
98
|
+
}), jsx(MetricsListItem, {
|
|
107
99
|
key: "cronbachsAlpha",
|
|
108
100
|
renderLabel: t('Cronbach\'s Alpha'),
|
|
109
101
|
renderValue: quizAnalysis.cronbachsAlpha(),
|
|
110
|
-
|
|
102
|
+
css: this.props.styles.metric,
|
|
111
103
|
isGroupChild: true
|
|
112
104
|
}));
|
|
113
105
|
}
|
|
@@ -120,18 +112,18 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
120
112
|
quizAnalysis = _this$props.quizAnalysis,
|
|
121
113
|
quizTitle = _this$props.quizTitle;
|
|
122
114
|
if (!quizAnalysis.isLoaded()) return _ref2;
|
|
123
|
-
var list = React.Children.count(this.props.children) === 0 ? this.defaulMetrics() :
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
},
|
|
115
|
+
var list = React.Children.count(this.props.children) === 0 ? this.defaulMetrics() : jsx(MetricGroup, null, this.props.children);
|
|
116
|
+
return jsx(Card, {
|
|
117
|
+
css: this.props.styles.root
|
|
118
|
+
}, jsx(Heading, {
|
|
127
119
|
level: "h4",
|
|
128
120
|
as: "h2",
|
|
129
121
|
color: "primary"
|
|
130
|
-
}, quizTitle),
|
|
131
|
-
|
|
132
|
-
}, list),
|
|
133
|
-
|
|
134
|
-
},
|
|
122
|
+
}, quizTitle), jsx("div", {
|
|
123
|
+
css: this.props.styles.metricWrapper
|
|
124
|
+
}, list), jsx("div", {
|
|
125
|
+
css: this.props.styles.wrapper
|
|
126
|
+
}, jsx(CentileDistribution, {
|
|
135
127
|
animateDelay: animateDelay,
|
|
136
128
|
animateDuration: animateDuration,
|
|
137
129
|
summaryDistribution: quizAnalysis.decileDistribution(),
|
|
@@ -147,7 +139,8 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
147
139
|
animateDuration: PropTypes.number,
|
|
148
140
|
quizAnalysis: ImmutablePropTypes.record.isRequired,
|
|
149
141
|
quizTitle: PropTypes.string.isRequired,
|
|
150
|
-
children: PropTypes.arrayOf(PropTypes.node)
|
|
142
|
+
children: PropTypes.arrayOf(PropTypes.node),
|
|
143
|
+
styles: PropTypes.object
|
|
151
144
|
}, _class2.defaultProps = {
|
|
152
145
|
animateDelay: void 0,
|
|
153
146
|
animateDuration: void 0,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
4
|
+
var _metric;
|
|
5
|
+
|
|
6
|
+
var tabletBreakPoint = "@media screen and (".concat(componentTheme.tabletBreakPoint, ")");
|
|
7
|
+
var phoneBreakPoint = "@media screen and (".concat(componentTheme.phoneBreakPoint, ")");
|
|
8
|
+
return {
|
|
9
|
+
root: {
|
|
10
|
+
padding: componentTheme.rootPadding
|
|
11
|
+
},
|
|
12
|
+
metricWrapper: {
|
|
13
|
+
marginTop: componentTheme.wrapperMargin,
|
|
14
|
+
paddingBottom: componentTheme.metricWrapperPadding
|
|
15
|
+
},
|
|
16
|
+
wrapper: {
|
|
17
|
+
marginTop: componentTheme.wrapperMargin
|
|
18
|
+
},
|
|
19
|
+
metric: (_metric = {}, _defineProperty(_metric, tabletBreakPoint, {
|
|
20
|
+
flexBasis: '33.3%'
|
|
21
|
+
}), _defineProperty(_metric, phoneBreakPoint, {
|
|
22
|
+
flexBasis: '50%'
|
|
23
|
+
}), _metric)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
typography = _ref.typography,
|
|
4
4
|
colors = _ref.colors,
|
|
@@ -10,4 +10,6 @@ export default function generator(_ref) {
|
|
|
10
10
|
phoneBreakPoint: "max-width: ".concat(breakpoints.medium),
|
|
11
11
|
tabletBreakPoint: "max-width: ".concat(breakpoints.large)
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default generateComponentTheme;
|
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
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
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
9
10
|
import { Table } from '@instructure/ui-table';
|
|
10
11
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
componentId: 'cInnW',
|
|
15
|
-
template: function template(theme) {
|
|
16
|
-
return "\n\n.cInnW_cvRx{align-items:center;display:flex;height:48px;justify-content:center;width:46px}\n\n.cInnW_EKAb{background-color:".concat(theme.colorGreen || 'inherit', ";border-radius:4px 0 0 4px}\n\n.cInnW_EKAb svg{fill:#fff}\n\n.cInnW_tnta{border-color:").concat(theme.colorGreen || 'inherit', ";border-style:solid;border-width:2px 0;padding:").concat(theme.cellPadding || 'inherit', "}\n\n.cInnW_fvqY{border-radius:0 4px 4px 0;border-width:2px 2px 2px 0}");
|
|
17
|
-
},
|
|
18
|
-
'iconWrapper': 'cInnW_cvRx',
|
|
19
|
-
'iconCorrect': 'cInnW_EKAb',
|
|
20
|
-
'correctRowBorder': 'cInnW_tnta',
|
|
21
|
-
'correctRowBorderRadius': 'cInnW_fvqY'
|
|
22
|
-
};
|
|
12
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
13
|
+
import generateComponentTheme from "./theme.js";
|
|
14
|
+
import generateStyle from "./styles.js";
|
|
23
15
|
import PropTypes from 'prop-types';
|
|
24
16
|
import { IconXSolid, IconCheckSolid } from '@instructure/ui-icons';
|
|
25
|
-
import classNames from 'classnames';
|
|
26
17
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
27
18
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
28
19
|
|
|
29
|
-
var _ref =
|
|
20
|
+
var _ref = jsx(IconCheckSolid, null);
|
|
30
21
|
|
|
31
|
-
var _ref2 =
|
|
22
|
+
var _ref2 = jsx(IconXSolid, null);
|
|
32
23
|
|
|
33
|
-
export var ChoiceTypeTableRow = (_dec =
|
|
24
|
+
export var ChoiceTypeTableRow = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
34
25
|
_inherits(ChoiceTypeTableRow, _Component);
|
|
35
26
|
|
|
36
27
|
var _super = _createSuper(ChoiceTypeTableRow);
|
|
@@ -46,26 +37,21 @@ export var ChoiceTypeTableRow = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
46
37
|
|
|
47
38
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
48
39
|
|
|
49
|
-
_this.renderIcon = function (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, correct ? _ref : _ref2);
|
|
40
|
+
_this.renderIcon = function () {
|
|
41
|
+
return jsx("div", {
|
|
42
|
+
css: _this.props.styles.iconWrapper
|
|
43
|
+
}, _this.props.choice.correct ? _ref : _ref2);
|
|
54
44
|
};
|
|
55
45
|
|
|
56
|
-
_this.renderMiddleCell = function (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
className: className
|
|
46
|
+
_this.renderMiddleCell = function (content) {
|
|
47
|
+
return jsx("div", {
|
|
48
|
+
css: _this.props.styles.correctRowBorder
|
|
60
49
|
}, content);
|
|
61
50
|
};
|
|
62
51
|
|
|
63
|
-
_this.renderLastCell = function (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var className = classNames((_classNames3 = {}, _defineProperty(_classNames3, styles.correctRowBorder, correct), _defineProperty(_classNames3, styles.correctRowBorderRadius, correct), _classNames3));
|
|
67
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
68
|
-
className: className
|
|
52
|
+
_this.renderLastCell = function (content) {
|
|
53
|
+
return jsx("div", {
|
|
54
|
+
css: _this.props.styles.lastRowBorder
|
|
69
55
|
}, content);
|
|
70
56
|
};
|
|
71
57
|
|
|
@@ -82,32 +68,44 @@ export var ChoiceTypeTableRow = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
82
68
|
_this.render = function () {
|
|
83
69
|
var correct = _this.props.choice.correct;
|
|
84
70
|
var choiceBody = _this.props.choice.body;
|
|
85
|
-
var cellPadding = correct ? '0' : _this.
|
|
86
|
-
return
|
|
71
|
+
var cellPadding = correct ? '0' : _this.props.styles.cellPadding;
|
|
72
|
+
return jsx(Table.Row, {
|
|
87
73
|
key: _this.props.choiceIndex
|
|
88
|
-
},
|
|
74
|
+
}, jsx(Table.Cell, {
|
|
89
75
|
themeOverride: {
|
|
90
76
|
padding: '0px'
|
|
91
77
|
}
|
|
92
|
-
},
|
|
78
|
+
}, jsx(ScreenReaderContent, null, _this.answerLabel(correct)), _this.renderIcon()), jsx(Table.RowHeader, {
|
|
93
79
|
themeOverride: {
|
|
94
80
|
padding: cellPadding
|
|
95
81
|
}
|
|
96
|
-
}, _this.renderMiddleCell(
|
|
82
|
+
}, _this.renderMiddleCell(_this.extractChoiceText(choiceBody, correct))), jsx(Table.Cell, {
|
|
97
83
|
themeOverride: {
|
|
98
84
|
padding: cellPadding
|
|
99
85
|
}
|
|
100
|
-
}, _this.renderMiddleCell(
|
|
86
|
+
}, _this.renderMiddleCell(_this.props.choice.count)), jsx(Table.Cell, {
|
|
101
87
|
themeOverride: {
|
|
102
88
|
padding: cellPadding
|
|
103
89
|
},
|
|
104
90
|
textAlign: "center"
|
|
105
|
-
}, _this.renderLastCell(
|
|
91
|
+
}, _this.renderLastCell("".concat(_this.props.choice.percentage, "%"))));
|
|
106
92
|
};
|
|
107
93
|
|
|
108
94
|
return _this;
|
|
109
95
|
}
|
|
110
96
|
|
|
97
|
+
_createClass(ChoiceTypeTableRow, [{
|
|
98
|
+
key: "componentDidMount",
|
|
99
|
+
value: function componentDidMount() {
|
|
100
|
+
this.props.makeStyles();
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "componentDidUpdate",
|
|
104
|
+
value: function componentDidUpdate() {
|
|
105
|
+
this.props.makeStyles();
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
108
|
+
|
|
111
109
|
return ChoiceTypeTableRow;
|
|
112
110
|
}(Component), _class2.displayName = 'Row', _class2.propTypes = {
|
|
113
111
|
choice: PropTypes.shape({
|
|
@@ -115,6 +113,8 @@ export var ChoiceTypeTableRow = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
115
113
|
correct: PropTypes.bool,
|
|
116
114
|
count: PropTypes.number,
|
|
117
115
|
percentage: PropTypes.number
|
|
118
|
-
}),
|
|
119
|
-
choiceIndex: PropTypes.number
|
|
120
|
-
|
|
116
|
+
}).isRequired,
|
|
117
|
+
choiceIndex: PropTypes.number.isRequired,
|
|
118
|
+
styles: PropTypes.object,
|
|
119
|
+
makeStyles: PropTypes.func
|
|
120
|
+
}, _temp)) || _class);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme, props) {
|
|
4
|
+
var correctRowBorderStyles = {
|
|
5
|
+
borderColor: componentTheme.colorGreen,
|
|
6
|
+
borderWidth: '2px 0',
|
|
7
|
+
borderStyle: 'solid',
|
|
8
|
+
padding: componentTheme.cellPadding
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
iconWrapper: _objectSpread({
|
|
12
|
+
display: 'flex',
|
|
13
|
+
height: '48px',
|
|
14
|
+
width: '46px',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
alignItems: 'center'
|
|
17
|
+
}, props.choice.correct && {
|
|
18
|
+
backgroundColor: componentTheme.colorGreen,
|
|
19
|
+
borderRadius: '4px 0 0 4px',
|
|
20
|
+
'svg': {
|
|
21
|
+
fill: 'white'
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
correctRowBorder: _objectSpread({
|
|
25
|
+
borderWidth: '0'
|
|
26
|
+
}, props.choice.correct && correctRowBorderStyles),
|
|
27
|
+
correctRowBorderRadius: {
|
|
28
|
+
borderWidth: '2px 2px 2px 0',
|
|
29
|
+
borderRadius: '0 4px 4px 0'
|
|
30
|
+
},
|
|
31
|
+
lastRowBorder: _objectSpread({
|
|
32
|
+
borderWidth: '0'
|
|
33
|
+
}, props.choice.correct && _objectSpread(_objectSpread({}, correctRowBorderStyles), {}, {
|
|
34
|
+
borderWidth: '2px 2px 2px 0',
|
|
35
|
+
borderRadius: '0 4px 4px 0'
|
|
36
|
+
})),
|
|
37
|
+
cellPadding: componentTheme.cellPadding
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default generateStyle;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
+
var colors = _ref.colors;
|
|
2
3
|
return {
|
|
3
|
-
colorGreen:
|
|
4
|
+
colorGreen: colors.shamrock,
|
|
4
5
|
cellPadding: '0.75rem 0.75rem'
|
|
5
6
|
};
|
|
6
|
-
}
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default generateComponentTheme;
|
|
@@ -5,26 +5,19 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
9
10
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
10
11
|
import { Table } from '@instructure/ui-table';
|
|
11
|
-
import {
|
|
12
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
12
13
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
13
14
|
import PropTypes from 'prop-types';
|
|
14
15
|
import ChoiceTypeTableRow from "./ChoiceTypeTableRow/index.js";
|
|
15
16
|
import { choiceTypeAnswerSummaryPropType } from "../../propTypes.js";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
template: function template(theme) {
|
|
19
|
-
return "\n\n.fxQkB_rMrG{display:flex;flex-basis:100%;flex-direction:column;padding-bottom:".concat(theme.tableBottomPadding || 'inherit', "}\n\n.fxQkB_SVtU{max-width:100%;width:calc(25% + 350px)}\n\n.fxQkB_SVtU table tbody tr th{font-weight:400}");
|
|
20
|
-
},
|
|
21
|
-
'tableWrapper': 'fxQkB_rMrG',
|
|
22
|
-
'tableContainer': 'fxQkB_SVtU'
|
|
23
|
-
};
|
|
24
|
-
import theme from "./theme.js";
|
|
17
|
+
import generateStyle from "./styles.js";
|
|
18
|
+
import generateComponentTheme from "./theme.js";
|
|
25
19
|
import AfsTableWrapper from "../shared/AfsTableWrapper/index.js";
|
|
26
|
-
|
|
27
|
-
export var LegacyChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
20
|
+
export var LegacyChoiceType = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
28
21
|
_inherits(LegacyChoiceType, _Component);
|
|
29
22
|
|
|
30
23
|
var _super = _createSuper(LegacyChoiceType);
|
|
@@ -41,7 +34,7 @@ export var LegacyChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
41
34
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
42
35
|
|
|
43
36
|
_this.renderRow = function (choice, choiceIndex) {
|
|
44
|
-
return
|
|
37
|
+
return jsx(ChoiceTypeTableRow, {
|
|
45
38
|
key: choiceIndex,
|
|
46
39
|
choice: choice,
|
|
47
40
|
choiceIndex: choiceIndex
|
|
@@ -55,7 +48,7 @@ export var LegacyChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
55
48
|
correct: false,
|
|
56
49
|
count: payload.count
|
|
57
50
|
};
|
|
58
|
-
return
|
|
51
|
+
return jsx(ChoiceTypeTableRow, {
|
|
59
52
|
key: choiceIndex,
|
|
60
53
|
choice: asChoice,
|
|
61
54
|
choiceIndex: choiceIndex
|
|
@@ -78,30 +71,31 @@ export var LegacyChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
78
71
|
var answerHeaderId = "answer-frequency-summary-answer-".concat(itemId);
|
|
79
72
|
var respondentsHeaderId = "answer-frequency-summary-respondents-".concat(itemId);
|
|
80
73
|
var percentageHeaderId = "answer-frequency-summary-percentage-".concat(itemId);
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
},
|
|
74
|
+
return jsx(AfsTableWrapper, null, jsx("div", {
|
|
75
|
+
css: this.props.styles.tableContainer
|
|
76
|
+
}, jsx(Table, {
|
|
84
77
|
caption: t('Answer Frequency Summary')
|
|
85
|
-
},
|
|
78
|
+
}, jsx(Table.Head, null, jsx(Table.Row, null, jsx(Table.ColHeader, {
|
|
86
79
|
id: spacingHeaderId,
|
|
87
80
|
width: "46px"
|
|
88
|
-
},
|
|
81
|
+
}, jsx(ScreenReaderContent, null, t('Answer correctness'))), jsx(Table.ColHeader, {
|
|
89
82
|
id: answerHeaderId,
|
|
90
83
|
height: "47px"
|
|
91
|
-
}, t('Answer')),
|
|
84
|
+
}, t('Answer')), jsx(Table.ColHeader, {
|
|
92
85
|
id: respondentsHeaderId,
|
|
93
86
|
height: "47px"
|
|
94
|
-
}, t('Respondents')),
|
|
87
|
+
}, t('Respondents')), jsx(Table.ColHeader, {
|
|
95
88
|
id: percentageHeaderId,
|
|
96
89
|
height: "47px",
|
|
97
90
|
textAlign: "center"
|
|
98
|
-
}, t('Percentage')))),
|
|
91
|
+
}, t('Percentage')))), jsx(Table.Body, null, choices.map(this.renderRow), this.renderNoAnswer(noAnswer, numberOfChoices)))));
|
|
99
92
|
}
|
|
100
93
|
}]);
|
|
101
94
|
|
|
102
95
|
LegacyChoiceType.displayName = "LegacyChoiceType";
|
|
103
96
|
return LegacyChoiceType;
|
|
104
97
|
}(Component), _class2.propTypes = {
|
|
105
|
-
itemId: PropTypes.number,
|
|
106
|
-
answerSummary: choiceTypeAnswerSummaryPropType
|
|
107
|
-
|
|
98
|
+
itemId: PropTypes.number.isRequired,
|
|
99
|
+
answerSummary: choiceTypeAnswerSummaryPropType.isRequired,
|
|
100
|
+
styles: PropTypes.object
|
|
101
|
+
}, _temp)) || _class);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
tableWrapper: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexBasis: '100%',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
paddingBottom: componentTheme.tableBottomPadding
|
|
8
|
+
},
|
|
9
|
+
tableContainer: {
|
|
10
|
+
width: 'calc(25% + 350px)',
|
|
11
|
+
maxWidth: '100%',
|
|
12
|
+
'table tbody tr th': {
|
|
13
|
+
fontWeight: '400'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default generateStyle;
|