@instructure/quiz-core 18.4.1-rc.2 → 18.4.1-rc.3
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/BanksList/presenter.js +1 -1
- package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +1 -1
- package/es/common/components/shared/TagDisplay/index.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +16 -12
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/theme.js +3 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +23 -17
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/theme.js +6 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/presenter.js +43 -30
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/theme.js +3 -6
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +29 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/theme.js +3 -5
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +1 -1
- package/lib/banks/components/BanksList/presenter.js +1 -1
- package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +1 -1
- package/lib/common/components/shared/TagDisplay/index.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +20 -13
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/theme.js +10 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +25 -16
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/theme.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/presenter.js +50 -32
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/theme.js +4 -8
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +33 -28
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/theme.js +4 -7
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +1 -1
- package/package.json +56 -57
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +0 -11
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +0 -18
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/styles.js +0 -36
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/styles.js +0 -12
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +0 -19
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +0 -26
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/styles.js +0 -46
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/styles.js +0 -20
|
@@ -266,7 +266,7 @@ export var BanksList = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
266
266
|
className: styles.bankTitle
|
|
267
267
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
268
268
|
onClick: navigateToBank(bank.id),
|
|
269
|
-
|
|
269
|
+
theme: {
|
|
270
270
|
color: _this.theme.bankTitleLinkColor,
|
|
271
271
|
hoverColor: _this.theme.bankTitleLinkHoverColor
|
|
272
272
|
},
|
|
@@ -51,7 +51,7 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
|
51
51
|
as: "h2",
|
|
52
52
|
color: "primary",
|
|
53
53
|
margin: "0 0 small",
|
|
54
|
-
|
|
54
|
+
theme: {
|
|
55
55
|
h2FontWeight: '700'
|
|
56
56
|
}
|
|
57
57
|
}, this.props.stimulus.title), instructions, /*#__PURE__*/React.createElement("div", {
|
|
@@ -54,7 +54,7 @@ export var TagDisplay = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
54
54
|
className: styles.tags,
|
|
55
55
|
"aria-label": t('question tags')
|
|
56
56
|
}, visible, extra > 0 && /*#__PURE__*/React.createElement(Tag, {
|
|
57
|
-
|
|
57
|
+
theme: {
|
|
58
58
|
defaultBackground: '#FFFFFF'
|
|
59
59
|
},
|
|
60
60
|
text: /*#__PURE__*/React.createElement(AccessibleContent, {
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js
CHANGED
|
@@ -5,14 +5,20 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
import
|
|
8
|
+
import { themeable } from '@instructure/ui-themeable';
|
|
9
|
+
import theme from "./theme.js";
|
|
10
|
+
var styles = {
|
|
11
|
+
componentId: 'ethsC',
|
|
12
|
+
template: function template(theme) {
|
|
13
|
+
return "\n\n.ethsC_eckF{margin:0;max-width:159px;text-transform:capitalize}";
|
|
14
|
+
},
|
|
15
|
+
'metricLabel': 'ethsC_eckF'
|
|
16
|
+
};
|
|
17
|
+
import React, { Component } from 'react';
|
|
10
18
|
import { getSanitizedMetricValue } from "../utils.js";
|
|
11
19
|
import { Metric } from '@instructure/ui-metric';
|
|
12
20
|
import PropTypes from 'prop-types';
|
|
13
|
-
|
|
14
|
-
import generateStyle from "./styles.js";
|
|
15
|
-
export var AnalysisMetric = (_dec = withStyle(generateStyle, null), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
21
|
+
export var AnalysisMetric = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
16
22
|
_inherits(AnalysisMetric, _Component);
|
|
17
23
|
|
|
18
24
|
var _super = _createSuper(AnalysisMetric);
|
|
@@ -31,15 +37,15 @@ export var AnalysisMetric = (_dec = withStyle(generateStyle, null), _dec(_class
|
|
|
31
37
|
label = _this$props.label,
|
|
32
38
|
value = _this$props.value,
|
|
33
39
|
suffix = _this$props.suffix;
|
|
34
|
-
return
|
|
35
|
-
|
|
40
|
+
return /*#__PURE__*/React.createElement(Metric, {
|
|
41
|
+
theme: {
|
|
36
42
|
valueFontWeight: 500,
|
|
37
43
|
padding: '0'
|
|
38
44
|
},
|
|
39
45
|
textAlign: "start",
|
|
40
46
|
key: metricKey,
|
|
41
|
-
renderLabel:
|
|
42
|
-
|
|
47
|
+
renderLabel: /*#__PURE__*/React.createElement("p", {
|
|
48
|
+
className: styles.metricLabel
|
|
43
49
|
}, label),
|
|
44
50
|
renderValue: getSanitizedMetricValue(value, suffix)
|
|
45
51
|
});
|
|
@@ -52,9 +58,7 @@ export var AnalysisMetric = (_dec = withStyle(generateStyle, null), _dec(_class
|
|
|
52
58
|
metricKey: PropTypes.string.isRequired,
|
|
53
59
|
label: PropTypes.string.isRequired,
|
|
54
60
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array]),
|
|
55
|
-
suffix: PropTypes.string
|
|
56
|
-
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
57
|
-
styles: PropTypes.object
|
|
61
|
+
suffix: PropTypes.string
|
|
58
62
|
}, _class2.defaultProps = {
|
|
59
63
|
value: void 0,
|
|
60
64
|
suffix: ''
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js
CHANGED
|
@@ -5,15 +5,23 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
import { Component } from 'react';
|
|
8
|
+
import React, { Component } from 'react';
|
|
10
9
|
import { Metric } from '@instructure/ui-metric';
|
|
11
10
|
import { getSanitizedMetricValue } from "../utils.js";
|
|
11
|
+
var styles = {
|
|
12
|
+
componentId: 'dpcwk',
|
|
13
|
+
template: function template(theme) {
|
|
14
|
+
return "\n\n.dpcwk_elNf{max-width:159px}\n\n.dpcwk_eckF{margin:0;padding-right:24px;text-transform:capitalize}\n\n.dpcwk_dqHR{margin-left:-24px;padding-left:5px}";
|
|
15
|
+
},
|
|
16
|
+
'metricLabelContainer': 'dpcwk_elNf',
|
|
17
|
+
'metricLabel': 'dpcwk_eckF',
|
|
18
|
+
'popoverContainer': 'dpcwk_dqHR'
|
|
19
|
+
};
|
|
12
20
|
import MetricPopover from "../MetricPopover/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
21
|
+
import { themeable } from '@instructure/ui-themeable';
|
|
22
|
+
import theme from "./theme.js";
|
|
15
23
|
import PropTypes from 'prop-types';
|
|
16
|
-
export var AnalysisPopoverMetric = (_dec =
|
|
24
|
+
export var AnalysisPopoverMetric = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
17
25
|
_inherits(AnalysisPopoverMetric, _Component);
|
|
18
26
|
|
|
19
27
|
var _super = _createSuper(AnalysisPopoverMetric);
|
|
@@ -27,13 +35,13 @@ export var AnalysisPopoverMetric = (_dec = withStyle(generateStyle, null), _dec(
|
|
|
27
35
|
_createClass(AnalysisPopoverMetric, [{
|
|
28
36
|
key: "renderLabelWithPopover",
|
|
29
37
|
value: function renderLabelWithPopover(texts) {
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
}, this.props.label),
|
|
35
|
-
|
|
36
|
-
},
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: styles.metricLabelContainer
|
|
40
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
41
|
+
className: styles.metricLabel
|
|
42
|
+
}, this.props.label), /*#__PURE__*/React.createElement("span", {
|
|
43
|
+
className: styles.popoverContainer
|
|
44
|
+
}, /*#__PURE__*/React.createElement(MetricPopover, texts)));
|
|
37
45
|
}
|
|
38
46
|
}, {
|
|
39
47
|
key: "render",
|
|
@@ -42,8 +50,8 @@ export var AnalysisPopoverMetric = (_dec = withStyle(generateStyle, null), _dec(
|
|
|
42
50
|
metricKey = _this$props.metricKey,
|
|
43
51
|
popoverDescription = _this$props.popoverDescription,
|
|
44
52
|
value = _this$props.value;
|
|
45
|
-
return
|
|
46
|
-
|
|
53
|
+
return /*#__PURE__*/React.createElement(Metric, {
|
|
54
|
+
theme: {
|
|
47
55
|
valueFontWeight: 500,
|
|
48
56
|
padding: '0'
|
|
49
57
|
},
|
|
@@ -66,9 +74,7 @@ export var AnalysisPopoverMetric = (_dec = withStyle(generateStyle, null), _dec(
|
|
|
66
74
|
subtitle: PropTypes.string,
|
|
67
75
|
body: PropTypes.string,
|
|
68
76
|
screenReaderLabel: PropTypes.string
|
|
69
|
-
}).isRequired
|
|
70
|
-
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
71
|
-
styles: PropTypes.object
|
|
77
|
+
}).isRequired
|
|
72
78
|
}, _class2.defaultProps = {
|
|
73
79
|
value: void 0
|
|
74
80
|
}, _temp)) || _class);
|
|
@@ -1,26 +1,36 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
3
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
4
5
|
|
|
5
6
|
var _dec, _class, _class2, _temp;
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
import { Component } from 'react';
|
|
8
|
+
import React, { Component } from 'react';
|
|
9
9
|
import { Table } from '@instructure/ui-table';
|
|
10
10
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
11
|
+
import { themeable } from '@instructure/ui-themeable';
|
|
12
|
+
import theme from "./theme.js";
|
|
13
|
+
var styles = {
|
|
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
|
+
};
|
|
23
|
+
import PropTypes from 'prop-types';
|
|
11
24
|
import { IconXSolid, IconCheckSolid } from '@instructure/ui-icons';
|
|
25
|
+
import classNames from 'classnames';
|
|
12
26
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
13
27
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
14
|
-
import { withStyle, jsx } from '@instructure/emotion';
|
|
15
|
-
import generateComponentTheme from "./theme.js";
|
|
16
|
-
import generateStyle from "./styles.js";
|
|
17
|
-
import PropTypes from 'prop-types';
|
|
18
28
|
|
|
19
|
-
var _ref =
|
|
29
|
+
var _ref = /*#__PURE__*/React.createElement(IconCheckSolid, null);
|
|
20
30
|
|
|
21
|
-
var _ref2 =
|
|
31
|
+
var _ref2 = /*#__PURE__*/React.createElement(IconXSolid, null);
|
|
22
32
|
|
|
23
|
-
export var ChoiceTypeTableRow = (_dec =
|
|
33
|
+
export var ChoiceTypeTableRow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
24
34
|
_inherits(ChoiceTypeTableRow, _Component);
|
|
25
35
|
|
|
26
36
|
var _super = _createSuper(ChoiceTypeTableRow);
|
|
@@ -37,20 +47,25 @@ export var ChoiceTypeTableRow = (_dec = withStyle(generateStyle, generateCompone
|
|
|
37
47
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
38
48
|
|
|
39
49
|
_this.renderIcon = function (correct) {
|
|
40
|
-
|
|
41
|
-
|
|
50
|
+
var className = classNames(styles.iconWrapper, _defineProperty({}, styles.iconCorrect, correct));
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: className
|
|
42
53
|
}, correct ? _ref : _ref2);
|
|
43
54
|
};
|
|
44
55
|
|
|
45
56
|
_this.renderMiddleCell = function (correct, content) {
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
var className = classNames(_defineProperty({}, styles.correctRowBorder, correct));
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: className
|
|
48
60
|
}, content);
|
|
49
61
|
};
|
|
50
62
|
|
|
51
63
|
_this.renderLastCell = function (correct, content) {
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
var _classNames3;
|
|
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
|
|
54
69
|
}, content);
|
|
55
70
|
};
|
|
56
71
|
|
|
@@ -67,26 +82,26 @@ export var ChoiceTypeTableRow = (_dec = withStyle(generateStyle, generateCompone
|
|
|
67
82
|
_this.render = function () {
|
|
68
83
|
var correct = _this.props.choice.correct;
|
|
69
84
|
var choiceBody = _this.props.choice.body;
|
|
70
|
-
var cellPadding = correct ? '0' : _this.
|
|
71
|
-
return
|
|
85
|
+
var cellPadding = correct ? '0' : _this.theme.cellPadding;
|
|
86
|
+
return /*#__PURE__*/React.createElement(Table.Row, {
|
|
72
87
|
key: _this.props.choiceIndex
|
|
73
|
-
},
|
|
74
|
-
|
|
88
|
+
}, /*#__PURE__*/React.createElement(Table.Cell, {
|
|
89
|
+
theme: {
|
|
75
90
|
padding: '0px',
|
|
76
91
|
fontWeight: 'bold'
|
|
77
92
|
}
|
|
78
|
-
},
|
|
79
|
-
|
|
93
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, _this.answerLabel(correct)), _this.renderIcon(correct)), /*#__PURE__*/React.createElement(Table.RowHeader, {
|
|
94
|
+
theme: {
|
|
80
95
|
padding: cellPadding,
|
|
81
96
|
fontWeight: 'bold'
|
|
82
97
|
}
|
|
83
|
-
}, _this.renderMiddleCell(correct, _this.extractChoiceText(choiceBody, correct))),
|
|
84
|
-
|
|
98
|
+
}, _this.renderMiddleCell(correct, _this.extractChoiceText(choiceBody, correct))), /*#__PURE__*/React.createElement(Table.Cell, {
|
|
99
|
+
theme: {
|
|
85
100
|
padding: cellPadding,
|
|
86
101
|
fontWeight: 'bold'
|
|
87
102
|
}
|
|
88
|
-
}, _this.renderMiddleCell(correct, _this.props.choice.count)),
|
|
89
|
-
|
|
103
|
+
}, _this.renderMiddleCell(correct, _this.props.choice.count)), /*#__PURE__*/React.createElement(Table.Cell, {
|
|
104
|
+
theme: {
|
|
90
105
|
padding: cellPadding,
|
|
91
106
|
fontWeight: 'bold'
|
|
92
107
|
},
|
|
@@ -104,8 +119,6 @@ export var ChoiceTypeTableRow = (_dec = withStyle(generateStyle, generateCompone
|
|
|
104
119
|
correct: PropTypes.bool,
|
|
105
120
|
count: PropTypes.number,
|
|
106
121
|
percentage: PropTypes.number
|
|
107
|
-
})
|
|
108
|
-
choiceIndex: PropTypes.number
|
|
109
|
-
|
|
110
|
-
styles: PropTypes.object
|
|
111
|
-
}, _temp)) || _class);
|
|
122
|
+
}),
|
|
123
|
+
choiceIndex: PropTypes.number
|
|
124
|
+
}.isRequired, _temp)) || _class);
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var colors = _ref.colors;
|
|
1
|
+
export default function generator() {
|
|
3
2
|
return {
|
|
4
|
-
|
|
3
|
+
colorGreen: '#0b874b',
|
|
5
4
|
cellPadding: '0.75rem 0.75rem'
|
|
6
5
|
};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default generateComponentTheme;
|
|
6
|
+
}
|
|
@@ -5,20 +5,25 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
import { Component } from 'react';
|
|
8
|
+
import React, { Component } from 'react';
|
|
10
9
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
11
10
|
import { Table } from '@instructure/ui-table';
|
|
12
11
|
import { Flex } from '@instructure/ui-flex';
|
|
13
12
|
import { Heading } from '@instructure/ui-heading';
|
|
13
|
+
import { themeable } from '@instructure/ui-themeable';
|
|
14
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
15
16
|
import ChoiceTypeTableRow from "./ChoiceTypeTableRow/index.js";
|
|
16
17
|
import { choiceTypeAnswerSummaryPropType } from "../../propTypes.js";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
var styles = {
|
|
19
|
+
componentId: 'ZuPLN',
|
|
20
|
+
template: function template(theme) {
|
|
21
|
+
return "\n\n.ZuPLN_rMrG{display:flex;flex-basis:100%;flex-direction:column;padding-bottom:".concat(theme.tableBottomPadding || 'inherit', "}");
|
|
22
|
+
},
|
|
23
|
+
'tableWrapper': 'ZuPLN_rMrG'
|
|
24
|
+
};
|
|
25
|
+
import theme from "./theme.js";
|
|
26
|
+
export var ChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
22
27
|
_inherits(ChoiceType, _Component);
|
|
23
28
|
|
|
24
29
|
var _super = _createSuper(ChoiceType);
|
|
@@ -35,7 +40,7 @@ export var ChoiceType = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
35
40
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
36
41
|
|
|
37
42
|
_this.renderRow = function (choice, choiceIndex) {
|
|
38
|
-
return
|
|
43
|
+
return /*#__PURE__*/React.createElement(ChoiceTypeTableRow, {
|
|
39
44
|
key: choiceIndex,
|
|
40
45
|
choice: choice,
|
|
41
46
|
choiceIndex: choiceIndex
|
|
@@ -49,7 +54,7 @@ export var ChoiceType = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
49
54
|
correct: false,
|
|
50
55
|
count: payload.count
|
|
51
56
|
};
|
|
52
|
-
return
|
|
57
|
+
return /*#__PURE__*/React.createElement(ChoiceTypeTableRow, {
|
|
53
58
|
key: choiceIndex,
|
|
54
59
|
choice: asChoice,
|
|
55
60
|
choiceIndex: choiceIndex
|
|
@@ -72,42 +77,40 @@ export var ChoiceType = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
72
77
|
var answerHeaderId = "answer-frequency-summary-answer-".concat(itemId);
|
|
73
78
|
var respondentsHeaderId = "answer-frequency-summary-respondents-".concat(itemId);
|
|
74
79
|
var percentageHeaderId = "answer-frequency-summary-percentage-".concat(itemId);
|
|
75
|
-
return
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Flex, {
|
|
76
81
|
direction: "row"
|
|
77
|
-
},
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
78
83
|
shouldGrow: true
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: styles.tableWrapper
|
|
86
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
82
87
|
margin: "large 0 small 0",
|
|
83
88
|
level: "h4",
|
|
84
|
-
|
|
89
|
+
theme: {
|
|
85
90
|
h4FontWeight: 'normal'
|
|
86
91
|
}
|
|
87
|
-
}, t('Answer Frequency Summary')),
|
|
92
|
+
}, t('Answer Frequency Summary')), /*#__PURE__*/React.createElement(Table, {
|
|
88
93
|
caption: t('Answer Frequency Summary')
|
|
89
|
-
},
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Table.Head, null, /*#__PURE__*/React.createElement(Table.Row, null, /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
90
95
|
id: spacingHeaderId,
|
|
91
96
|
width: "46px"
|
|
92
|
-
},
|
|
97
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Answer correctness'))), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
93
98
|
id: answerHeaderId,
|
|
94
99
|
height: "47px"
|
|
95
|
-
}, t('Answer')),
|
|
100
|
+
}, t('Answer')), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
96
101
|
id: respondentsHeaderId,
|
|
97
102
|
height: "47px"
|
|
98
|
-
}, t('Respondents')),
|
|
103
|
+
}, t('Respondents')), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
99
104
|
id: percentageHeaderId,
|
|
100
105
|
height: "47px",
|
|
101
106
|
textAlign: "center"
|
|
102
|
-
}, t('%')))),
|
|
107
|
+
}, t('%')))), /*#__PURE__*/React.createElement(Table.Body, null, choices.map(this.renderRow), this.renderNoAnswer(noAnswer, numberOfChoices)))))));
|
|
103
108
|
}
|
|
104
109
|
}]);
|
|
105
110
|
|
|
106
111
|
ChoiceType.displayName = "ChoiceType";
|
|
107
112
|
return ChoiceType;
|
|
108
113
|
}(Component), _class2.propTypes = {
|
|
109
|
-
itemId: PropTypes.number
|
|
110
|
-
answerSummary: choiceTypeAnswerSummaryPropType
|
|
111
|
-
|
|
112
|
-
styles: PropTypes.object
|
|
113
|
-
}, _temp)) || _class);
|
|
114
|
+
itemId: PropTypes.number,
|
|
115
|
+
answerSummary: choiceTypeAnswerSummaryPropType
|
|
116
|
+
}.isRequired, _temp)) || _class);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export default function generator(_ref) {
|
|
2
2
|
var spacing = _ref.spacing;
|
|
3
3
|
return {
|
|
4
|
-
tableBottomPadding: spacing
|
|
4
|
+
tableBottomPadding: spacing.medium
|
|
5
5
|
};
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default generateComponentTheme;
|
|
6
|
+
}
|
|
@@ -86,7 +86,7 @@ export var MetricPopover = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
86
86
|
className: styles.popoverTitle,
|
|
87
87
|
level: "h3"
|
|
88
88
|
}, _this.props.title)), /*#__PURE__*/React.createElement("div", null, _this.props.subtitle && /*#__PURE__*/React.createElement(Heading, {
|
|
89
|
-
|
|
89
|
+
theme: {
|
|
90
90
|
h5FontWeight: 700
|
|
91
91
|
},
|
|
92
92
|
level: "h5"
|
|
@@ -103,7 +103,7 @@ export var MetricPopover = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
103
103
|
value: function renderPopoverTrigger() {
|
|
104
104
|
return /*#__PURE__*/React.createElement(IconButton, {
|
|
105
105
|
size: "small",
|
|
106
|
-
|
|
106
|
+
theme: {
|
|
107
107
|
smallHeight: '18px',
|
|
108
108
|
transform: 'translateY(-1px)'
|
|
109
109
|
},
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -89,7 +89,7 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
89
89
|
className: styles.heading
|
|
90
90
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
91
91
|
level: "h2",
|
|
92
|
-
|
|
92
|
+
theme: {
|
|
93
93
|
h2FontWeight: 700
|
|
94
94
|
},
|
|
95
95
|
margin: "0 x-large 0 0",
|
|
@@ -56,7 +56,7 @@ export var ScoreDistribution = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
56
56
|
className: styles.headingContainer
|
|
57
57
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
58
58
|
level: "h3",
|
|
59
|
-
|
|
59
|
+
theme: {
|
|
60
60
|
h3FontWeight: 700
|
|
61
61
|
}
|
|
62
62
|
}, t('Score Distribution'))), /*#__PURE__*/React.createElement(QuintileDistribution, {
|
|
@@ -137,7 +137,7 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
|
|
|
137
137
|
color: "primary-inverse",
|
|
138
138
|
margin: "0 0 x-small 0",
|
|
139
139
|
onClick: _this.handleGeneration,
|
|
140
|
-
|
|
140
|
+
theme: {
|
|
141
141
|
lineHeight: '24px'
|
|
142
142
|
}
|
|
143
143
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -303,7 +303,7 @@ var BanksList = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _de
|
|
|
303
303
|
className: styles.bankTitle
|
|
304
304
|
}, /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
305
305
|
onClick: navigateToBank(bank.id),
|
|
306
|
-
|
|
306
|
+
theme: {
|
|
307
307
|
color: _this.theme.bankTitleLinkColor,
|
|
308
308
|
hoverColor: _this.theme.bankTitleLinkHoverColor
|
|
309
309
|
},
|
|
@@ -72,7 +72,7 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
|
72
72
|
as: "h2",
|
|
73
73
|
color: "primary",
|
|
74
74
|
margin: "0 0 small",
|
|
75
|
-
|
|
75
|
+
theme: {
|
|
76
76
|
h2FontWeight: '700'
|
|
77
77
|
}
|
|
78
78
|
}, this.props.stimulus.title), instructions, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -76,7 +76,7 @@ var TagDisplay = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
76
76
|
className: styles.tags,
|
|
77
77
|
"aria-label": (0, _formatMessage.default)('question tags')
|
|
78
78
|
}, visible, extra > 0 && /*#__PURE__*/_react.default.createElement(_uiTag.Tag, {
|
|
79
|
-
|
|
79
|
+
theme: {
|
|
80
80
|
defaultBackground: '#FFFFFF'
|
|
81
81
|
},
|
|
82
82
|
text: /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
@@ -15,7 +17,11 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
17
|
|
|
16
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
17
19
|
|
|
18
|
-
var
|
|
20
|
+
var _uiThemeable = require("@instructure/ui-themeable");
|
|
21
|
+
|
|
22
|
+
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
23
|
+
|
|
24
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
25
|
|
|
20
26
|
var _utils = require("../utils.js");
|
|
21
27
|
|
|
@@ -23,13 +29,16 @@ var _uiMetric = require("@instructure/ui-metric");
|
|
|
23
29
|
|
|
24
30
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
31
|
|
|
26
|
-
var _emotion = require("@instructure/emotion");
|
|
27
|
-
|
|
28
|
-
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
29
|
-
|
|
30
32
|
var _dec, _class, _class2, _temp;
|
|
31
33
|
|
|
32
|
-
var
|
|
34
|
+
var styles = {
|
|
35
|
+
componentId: 'ethsC',
|
|
36
|
+
template: function template(theme) {
|
|
37
|
+
return "\n\n.ethsC_eckF{margin:0;max-width:159px;text-transform:capitalize}";
|
|
38
|
+
},
|
|
39
|
+
'metricLabel': 'ethsC_eckF'
|
|
40
|
+
};
|
|
41
|
+
var AnalysisMetric = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
33
42
|
(0, _inherits2.default)(AnalysisMetric, _Component);
|
|
34
43
|
|
|
35
44
|
var _super = (0, _createSuper2.default)(AnalysisMetric);
|
|
@@ -47,15 +56,15 @@ var AnalysisMetric = (_dec = (0, _emotion.withStyle)(_styles.default, null), _de
|
|
|
47
56
|
label = _this$props.label,
|
|
48
57
|
value = _this$props.value,
|
|
49
58
|
suffix = _this$props.suffix;
|
|
50
|
-
return
|
|
51
|
-
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_uiMetric.Metric, {
|
|
60
|
+
theme: {
|
|
52
61
|
valueFontWeight: 500,
|
|
53
62
|
padding: '0'
|
|
54
63
|
},
|
|
55
64
|
textAlign: "start",
|
|
56
65
|
key: metricKey,
|
|
57
|
-
renderLabel:
|
|
58
|
-
|
|
66
|
+
renderLabel: /*#__PURE__*/_react.default.createElement("p", {
|
|
67
|
+
className: styles.metricLabel
|
|
59
68
|
}, label),
|
|
60
69
|
renderValue: (0, _utils.getSanitizedMetricValue)(value, suffix)
|
|
61
70
|
});
|
|
@@ -67,9 +76,7 @@ var AnalysisMetric = (_dec = (0, _emotion.withStyle)(_styles.default, null), _de
|
|
|
67
76
|
metricKey: _propTypes.default.string.isRequired,
|
|
68
77
|
label: _propTypes.default.string.isRequired,
|
|
69
78
|
value: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.array]),
|
|
70
|
-
suffix: _propTypes.default.string
|
|
71
|
-
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
72
|
-
styles: _propTypes.default.object
|
|
79
|
+
suffix: _propTypes.default.string
|
|
73
80
|
}, _class2.defaultProps = {
|
|
74
81
|
value: void 0,
|
|
75
82
|
suffix: ''
|