@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
|
@@ -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
|
});
|
|
@@ -11,21 +9,21 @@ exports.ChoiceTypeTable = void 0;
|
|
|
11
9
|
|
|
12
10
|
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
13
11
|
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
15
|
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
|
|
18
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
+
var _react = require("react");
|
|
23
21
|
|
|
24
22
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
25
23
|
|
|
26
24
|
var _uiTable = require("@instructure/ui-table");
|
|
27
25
|
|
|
28
|
-
var
|
|
26
|
+
var _emotion = require("@instructure/emotion");
|
|
29
27
|
|
|
30
28
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
31
29
|
|
|
@@ -33,9 +31,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
33
31
|
|
|
34
32
|
var _propTypes2 = require("../../../propTypes.js");
|
|
35
33
|
|
|
36
|
-
var
|
|
34
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
39
37
|
|
|
40
38
|
var _uiIcons = require("@instructure/ui-icons");
|
|
41
39
|
|
|
@@ -45,38 +43,23 @@ var _uiFlex = require("@instructure/ui-flex");
|
|
|
45
43
|
|
|
46
44
|
var _uiText = require("@instructure/ui-text");
|
|
47
45
|
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
var styles = {
|
|
51
|
-
componentId: 'cYrxJ',
|
|
52
|
-
template: function template(theme) {
|
|
53
|
-
return "\n\n.cYrxJ_rMrG{display:flex;flex-basis:100%;flex-direction:column;padding-bottom:".concat(theme.tableBottomPadding || 'inherit', "}\n\n.cYrxJ_fgIl{max-width:100%;width:calc(25% + 350px)}\n\n.cYrxJ_SVtU table{border-collapse:separate;border-spacing:0 1px}\n\n.cYrxJ_eviJ table thead tr td,.cYrxJ_eviJ table thead tr th{border-bottom:solid 0.0625rem ").concat(theme.colorGray || 'inherit', "}\n\n.cYrxJ_SVtU table tbody tr th{font-weight:400;width:33.33%}\n\n.cYrxJ_SVtU table tbody tr td{width:33.33%}\n\n.cYrxJ_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.cYrxJ_EKAb{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.cYrxJ_EKAb svg{fill:#fff}\n\n.cYrxJ_cCmC{align-items:center;display:flex;height:calc(100% - 4px);justify-content:center}\n\n.cYrxJ_dJVn{padding:").concat(theme.cellPadding || 'inherit', "}\n\n.cYrxJ_eEOp td,.cYrxJ_eEOp th{border-bottom:solid 0.0625rem ").concat(theme.colorGray || 'inherit', "}\n\n.cYrxJ_UAZE td{border-width:2px 0 2px 0}\n\n.cYrxJ_UAZE td,.cYrxJ_UAZE th:first-child{border-color:").concat(theme.colorGreen || 'inherit', ";border-style:solid}\n\n.cYrxJ_UAZE th:first-child{border-radius:4px 0 0 4px;border-width:2px 0 2px 2px}\n\n.cYrxJ_UAZE td:last-child{border-color:").concat(theme.colorGreen || 'inherit', ";border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}");
|
|
54
|
-
},
|
|
55
|
-
'tableWrapper': 'cYrxJ_rMrG',
|
|
56
|
-
'tableWidthMax': 'cYrxJ_fgIl',
|
|
57
|
-
'tableContainer': 'cYrxJ_SVtU',
|
|
58
|
-
'headerGrayBottomBorder': 'cYrxJ_eviJ',
|
|
59
|
-
'iconWrapper': 'cYrxJ_cvRx',
|
|
60
|
-
'iconCorrect': 'cYrxJ_EKAb',
|
|
61
|
-
'textContainer': 'cYrxJ_cCmC',
|
|
62
|
-
'firstTextContainer': 'cYrxJ_dJVn',
|
|
63
|
-
'incorrectRow': 'cYrxJ_eEOp',
|
|
64
|
-
'correctRow': 'cYrxJ_UAZE'
|
|
65
|
-
};
|
|
46
|
+
var _dec, _class, _class2, _temp;
|
|
47
|
+
|
|
66
48
|
var correctAttribute = 'correct';
|
|
67
49
|
var incorrectAttribute = 'incorrect';
|
|
68
|
-
var rowStyleMap = (_rowStyleMap = {}, (0, _defineProperty2.default)(_rowStyleMap, correctAttribute, styles.correctRow), (0, _defineProperty2.default)(_rowStyleMap, incorrectAttribute, styles.incorrectRow), _rowStyleMap);
|
|
69
50
|
|
|
70
|
-
var _ref =
|
|
51
|
+
var _ref = (0, _emotion.jsx)(_uiIcons.IconCheckSolid, null);
|
|
71
52
|
|
|
72
|
-
var _ref2 =
|
|
53
|
+
var _ref2 = (0, _emotion.jsx)(_uiIcons.IconXSolid, null);
|
|
73
54
|
|
|
74
|
-
var ChoiceTypeTable = (_dec = (0,
|
|
55
|
+
var ChoiceTypeTable = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
75
56
|
(0, _inherits2.default)(ChoiceTypeTable, _Component);
|
|
76
57
|
|
|
77
58
|
var _super = (0, _createSuper2.default)(ChoiceTypeTable);
|
|
78
59
|
|
|
79
60
|
function ChoiceTypeTable() {
|
|
61
|
+
var _this$rowStyleMap;
|
|
62
|
+
|
|
80
63
|
var _this;
|
|
81
64
|
|
|
82
65
|
(0, _classCallCheck2.default)(this, ChoiceTypeTable);
|
|
@@ -86,25 +69,24 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
86
69
|
}
|
|
87
70
|
|
|
88
71
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
72
|
+
_this.rowStyleMap = (_this$rowStyleMap = {}, (0, _defineProperty2.default)(_this$rowStyleMap, correctAttribute, _this.props.styles.correctRow), (0, _defineProperty2.default)(_this$rowStyleMap, incorrectAttribute, _this.props.styles.incorrectRow), _this$rowStyleMap);
|
|
89
73
|
|
|
90
74
|
_this.renderIcon = function (correct) {
|
|
91
|
-
var
|
|
92
|
-
return
|
|
93
|
-
|
|
75
|
+
var iconStyles = [_this.props.styles.iconWrapper, correct ? _this.props.styles.iconCorrect : {}];
|
|
76
|
+
return (0, _emotion.jsx)("div", {
|
|
77
|
+
css: iconStyles
|
|
94
78
|
}, correct ? _ref : _ref2);
|
|
95
79
|
};
|
|
96
80
|
|
|
97
81
|
_this.renderFirstCell = function (content) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
className: className
|
|
82
|
+
return (0, _emotion.jsx)("div", {
|
|
83
|
+
css: _this.props.styles.firstTextContainer
|
|
101
84
|
}, content);
|
|
102
85
|
};
|
|
103
86
|
|
|
104
87
|
_this.renderCell = function (content) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
className: className
|
|
88
|
+
return (0, _emotion.jsx)("div", {
|
|
89
|
+
css: _this.props.styles.textContainer
|
|
108
90
|
}, content);
|
|
109
91
|
};
|
|
110
92
|
|
|
@@ -141,30 +123,30 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
141
123
|
var extractedBody = _this.extractChoiceText(body, correct);
|
|
142
124
|
|
|
143
125
|
var screenReaderContent = "".concat(_this.answerLabel(correct), ": ").concat(extractedBody);
|
|
144
|
-
return
|
|
126
|
+
return (0, _emotion.jsx)(_uiTable.Table.Row, {
|
|
145
127
|
key: choiceIndex
|
|
146
|
-
},
|
|
128
|
+
}, (0, _emotion.jsx)(_uiTable.Table.RowHeader, {
|
|
147
129
|
themeOverride: {
|
|
148
130
|
padding: '0'
|
|
149
131
|
}
|
|
150
|
-
},
|
|
132
|
+
}, (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, screenReaderContent), (0, _emotion.jsx)(_uiFlex.Flex, {
|
|
151
133
|
direction: "row",
|
|
152
134
|
alignItems: "center"
|
|
153
|
-
},
|
|
135
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
154
136
|
width: "46px",
|
|
155
137
|
textAlign: "center",
|
|
156
138
|
align: "stretch"
|
|
157
|
-
},
|
|
139
|
+
}, (0, _emotion.jsx)("div", {
|
|
158
140
|
"data-icon": _this.getDataIconAttribute(correct, choiceIndex),
|
|
159
|
-
|
|
160
|
-
}, _this.renderIcon(correct))),
|
|
141
|
+
css: _this.props.styles.iconWrapper
|
|
142
|
+
}, _this.renderIcon(correct))), (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
161
143
|
shouldShrink: true,
|
|
162
144
|
shouldGrow: true
|
|
163
|
-
},
|
|
145
|
+
}, (0, _emotion.jsx)(_uiText.Text, null, _this.renderFirstCell(extractedBody))))), (0, _emotion.jsx)(_uiTable.Table.Cell, {
|
|
164
146
|
themeOverride: {
|
|
165
147
|
padding: '0'
|
|
166
148
|
}
|
|
167
|
-
}, _this.renderCell(choice.count)),
|
|
149
|
+
}, _this.renderCell(choice.count)), (0, _emotion.jsx)(_uiTable.Table.Cell, {
|
|
168
150
|
themeOverride: {
|
|
169
151
|
padding: '0'
|
|
170
152
|
},
|
|
@@ -173,17 +155,48 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
173
155
|
};
|
|
174
156
|
|
|
175
157
|
_this.componentDidMount = function () {
|
|
158
|
+
_this.applyStylesToTable();
|
|
159
|
+
|
|
160
|
+
_this.props.makeStyles();
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
_this.componentDidUpdate = function () {
|
|
164
|
+
_this.props.makeStyles();
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
_this.applyStylesToTable = function () {
|
|
176
168
|
if (_this.tableRef) {
|
|
177
169
|
var _iterator = (0, _createForOfIteratorHelper2.default)(_this.tableRef.rows),
|
|
178
170
|
_step;
|
|
179
171
|
|
|
180
172
|
try {
|
|
181
|
-
|
|
173
|
+
var _loop = function _loop() {
|
|
182
174
|
var _row$querySelector, _row$querySelector$da;
|
|
183
175
|
|
|
184
176
|
var row = _step.value;
|
|
185
177
|
var icon = (_row$querySelector = row.querySelector('tr th:first-child [data-icon]')) === null || _row$querySelector === void 0 ? void 0 : (_row$querySelector$da = _row$querySelector.dataset) === null || _row$querySelector$da === void 0 ? void 0 : _row$querySelector$da.icon;
|
|
186
|
-
row.
|
|
178
|
+
var td = row.querySelectorAll('td');
|
|
179
|
+
var th = row.querySelectorAll('th');
|
|
180
|
+
|
|
181
|
+
if (icon) {
|
|
182
|
+
td.forEach(function (cell) {
|
|
183
|
+
cell.setAttribute('style', (0, _emotion.css)(_this.rowStyleMap[icon].td).styles);
|
|
184
|
+
});
|
|
185
|
+
th.forEach(function (cell) {
|
|
186
|
+
cell.setAttribute('style', (0, _emotion.css)(_this.rowStyleMap[icon].th).styles);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
if (icon === correctAttribute) {
|
|
190
|
+
row.querySelector('th:first-child').setAttribute('style', (0, _emotion.css)(_this.props.styles.correctRow.thFirstChild).styles);
|
|
191
|
+
row.querySelector('td:last-child').setAttribute('style', (0, _emotion.css)(_this.props.styles.correctRow.tdLastChild).styles);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
row.setAttribute('style', (0, _emotion.css)(_this.rowStyleMap[icon]).styles);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
199
|
+
_loop();
|
|
187
200
|
}
|
|
188
201
|
} catch (err) {
|
|
189
202
|
_iterator.e(err);
|
|
@@ -200,32 +213,31 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
200
213
|
_this.render = function () {
|
|
201
214
|
var _this$props = _this.props,
|
|
202
215
|
choices = _this$props.choices,
|
|
203
|
-
itemId = _this$props.itemId
|
|
204
|
-
tableContainerSizeClass = _this$props.tableContainerSizeClass;
|
|
216
|
+
itemId = _this$props.itemId;
|
|
205
217
|
var answerHeaderId = "answer-frequency-summary-answer-".concat(itemId);
|
|
206
218
|
var respondentsHeaderId = "answer-frequency-summary-respondents-".concat(itemId);
|
|
207
219
|
var percentageHeaderId = "answer-frequency-summary-percentage-".concat(itemId);
|
|
208
|
-
var
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
},
|
|
220
|
+
var containerStyles = [_this.props.styles.tableContainer, !_this.nextChoiceIsCorrect(choices, 0) ? _this.props.styles.headerGrayBottomBorder : {}];
|
|
221
|
+
return (0, _emotion.jsx)("div", {
|
|
222
|
+
css: containerStyles
|
|
223
|
+
}, (0, _emotion.jsx)(_uiTable.Table, {
|
|
212
224
|
caption: (0, _formatMessage.default)('Answer Frequency Summary'),
|
|
213
225
|
elementRef: _this.setTableRef
|
|
214
|
-
},
|
|
226
|
+
}, (0, _emotion.jsx)(_uiTable.Table.Head, null, (0, _emotion.jsx)(_uiTable.Table.Row, null, (0, _emotion.jsx)(_uiTable.Table.ColHeader, {
|
|
215
227
|
id: answerHeaderId,
|
|
216
228
|
height: "47px",
|
|
217
229
|
themeOverride: {
|
|
218
230
|
padding: '0 0 0 57px'
|
|
219
231
|
}
|
|
220
|
-
}, (0, _formatMessage.default)('Answer')),
|
|
232
|
+
}, (0, _formatMessage.default)('Answer')), (0, _emotion.jsx)(_uiTable.Table.ColHeader, {
|
|
221
233
|
id: respondentsHeaderId,
|
|
222
234
|
height: "47px",
|
|
223
235
|
textAlign: "center"
|
|
224
|
-
}, (0, _formatMessage.default)('Respondents')),
|
|
236
|
+
}, (0, _formatMessage.default)('Respondents')), (0, _emotion.jsx)(_uiTable.Table.ColHeader, {
|
|
225
237
|
id: percentageHeaderId,
|
|
226
238
|
height: "47px",
|
|
227
239
|
textAlign: "center"
|
|
228
|
-
}, (0, _formatMessage.default)('Percentage')))),
|
|
240
|
+
}, (0, _formatMessage.default)('Percentage')))), (0, _emotion.jsx)(_uiTable.Table.Body, null, choices.map(_this.renderRow))));
|
|
229
241
|
};
|
|
230
242
|
|
|
231
243
|
return _this;
|
|
@@ -233,10 +245,14 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
233
245
|
|
|
234
246
|
return ChoiceTypeTable;
|
|
235
247
|
}(_react.Component), _class2.propTypes = {
|
|
236
|
-
itemId: _propTypes.default.number,
|
|
237
|
-
choices: _propTypes.default.arrayOf(_propTypes2.choiceTypeObject),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
248
|
+
itemId: _propTypes.default.number.isRequired,
|
|
249
|
+
choices: _propTypes.default.arrayOf(_propTypes2.choiceTypeObject).isRequired,
|
|
250
|
+
|
|
251
|
+
/* eslint-disable-next-line react/no-unused-prop-types */
|
|
252
|
+
tableContainerStyles: _propTypes.default.object,
|
|
253
|
+
styles: _propTypes.default.object,
|
|
254
|
+
makeStyles: _propTypes.default.func
|
|
255
|
+
}, _class2.defaultProps = {
|
|
256
|
+
tableContainerStyles: void 0
|
|
241
257
|
}, _temp)) || _class);
|
|
242
258
|
exports.ChoiceTypeTable = ChoiceTypeTable;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var generateStyle = function generateStyle(componentTheme, props) {
|
|
13
|
+
var tableContainerStyles = props.tableContainerStyles || {
|
|
14
|
+
width: 'calc(25% + 350px)',
|
|
15
|
+
maxWidth: '100%'
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
tableWrapper: {
|
|
19
|
+
display: 'flex',
|
|
20
|
+
flexBasis: '100%',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
paddingBottom: componentTheme.tableBottomPadding
|
|
23
|
+
},
|
|
24
|
+
tableWidthMax: {},
|
|
25
|
+
tableContainer: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, tableContainerStyles), {}, {
|
|
26
|
+
'table': {
|
|
27
|
+
borderCollapse: 'separate',
|
|
28
|
+
borderSpacing: '0 1px'
|
|
29
|
+
},
|
|
30
|
+
'table tbody tr td:': {
|
|
31
|
+
width: '33.33%'
|
|
32
|
+
},
|
|
33
|
+
'table tbody tr th': {
|
|
34
|
+
fontWeight: '400',
|
|
35
|
+
width: '33.33%'
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
headerGrayBottomBorder: {
|
|
39
|
+
'table thead tr th': {
|
|
40
|
+
borderBottom: "solid 0.0625rem ".concat(componentTheme.colorGray)
|
|
41
|
+
},
|
|
42
|
+
'table thead tr td': {
|
|
43
|
+
borderBottom: "solid 0.0625rem ".concat(componentTheme.colorGray)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
iconWrapper: {
|
|
47
|
+
display: 'flex',
|
|
48
|
+
height: '100%',
|
|
49
|
+
minHeight: '47px',
|
|
50
|
+
width: '46px',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
alignItems: 'center'
|
|
53
|
+
},
|
|
54
|
+
iconCorrect: {
|
|
55
|
+
backgroundColor: componentTheme.colorGreen,
|
|
56
|
+
'svg': {
|
|
57
|
+
fill: 'white'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
textContainer: {
|
|
61
|
+
height: 'calc(100% - 4px)',
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
justifyContent: 'center'
|
|
65
|
+
},
|
|
66
|
+
firstTextContainer: {
|
|
67
|
+
padding: componentTheme.cellPadding
|
|
68
|
+
},
|
|
69
|
+
incorrectRow: {
|
|
70
|
+
td: {
|
|
71
|
+
borderBottom: "solid 0.0625rem ".concat(componentTheme.colorGray)
|
|
72
|
+
},
|
|
73
|
+
th: {
|
|
74
|
+
borderBottom: "solid 0.0625rem ".concat(componentTheme.colorGray)
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
correctRow: {
|
|
78
|
+
td: {
|
|
79
|
+
borderStyle: 'solid',
|
|
80
|
+
borderWidth: '2px 0 2px 0',
|
|
81
|
+
borderColor: componentTheme.colorGreen
|
|
82
|
+
},
|
|
83
|
+
th: {
|
|
84
|
+
border: 0
|
|
85
|
+
},
|
|
86
|
+
thFirstChild: {
|
|
87
|
+
borderStyle: 'solid',
|
|
88
|
+
borderRadius: '4px 0 0 4px',
|
|
89
|
+
borderWidth: '2px 0 2px 2px',
|
|
90
|
+
borderColor: componentTheme.colorGreen
|
|
91
|
+
},
|
|
92
|
+
tdLastChild: {
|
|
93
|
+
borderStyle: 'solid',
|
|
94
|
+
borderWidth: '2px 2px 2px 0',
|
|
95
|
+
borderRadius: '0 4px 4px 0',
|
|
96
|
+
borderColor: componentTheme.colorGreen
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
var _default = generateStyle;
|
|
103
|
+
exports.default = _default;
|
|
@@ -3,14 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
9
|
-
var spacing = _ref.spacing
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
|
+
var spacing = _ref.spacing,
|
|
10
|
+
colors = _ref.colors;
|
|
10
11
|
return {
|
|
11
12
|
tableBottomPadding: spacing.medium,
|
|
12
|
-
colorGreen:
|
|
13
|
-
colorGray:
|
|
13
|
+
colorGreen: colors.shamrock,
|
|
14
|
+
colorGray: colors.tiara,
|
|
14
15
|
cellPadding: '0.75rem 0.75rem'
|
|
15
16
|
};
|
|
16
|
-
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var _default = generateComponentTheme;
|
|
20
|
+
exports.default = _default;
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js
CHANGED
|
@@ -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,7 +15,7 @@ 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 _uiView = require("@instructure/ui-view");
|
|
23
21
|
|
|
@@ -33,28 +31,21 @@ var _uiPopover = require("@instructure/ui-popover");
|
|
|
33
31
|
|
|
34
32
|
var _uiHeading = require("@instructure/ui-heading");
|
|
35
33
|
|
|
36
|
-
var
|
|
34
|
+
var _emotion = require("@instructure/emotion");
|
|
37
35
|
|
|
38
36
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
39
37
|
|
|
38
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
39
|
+
|
|
40
40
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
41
41
|
|
|
42
42
|
var _dec, _class, _class2, _temp;
|
|
43
43
|
|
|
44
|
-
var
|
|
45
|
-
componentId: 'fSfiS',
|
|
46
|
-
template: function template(theme) {
|
|
47
|
-
return "\n\n.fSfiS_CkEK{padding-bottom:".concat(theme.headerPaddingBottom || 'inherit', "}\n\n.fSfiS_fSpJ{display:flex;justify-content:flex-end;margin-right:-10px;margin-top:-10px}");
|
|
48
|
-
},
|
|
49
|
-
'headerContainer': 'fSfiS_CkEK',
|
|
50
|
-
'closeIconContainer': 'fSfiS_fSpJ'
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.IconInfoLine, {
|
|
44
|
+
var _ref = (0, _emotion.jsx)(_uiIcons.IconInfoLine, {
|
|
54
45
|
size: "x-small"
|
|
55
46
|
});
|
|
56
47
|
|
|
57
|
-
var MetricPopover = (_dec = (0,
|
|
48
|
+
var MetricPopover = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
58
49
|
(0, _inherits2.default)(MetricPopover, _Component);
|
|
59
50
|
|
|
60
51
|
var _super = (0, _createSuper2.default)(MetricPopover);
|
|
@@ -86,7 +77,7 @@ var MetricPopover = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
86
77
|
};
|
|
87
78
|
|
|
88
79
|
_this.render = function () {
|
|
89
|
-
return
|
|
80
|
+
return (0, _emotion.jsx)(_uiPopover.Popover, {
|
|
90
81
|
renderTrigger: _this.renderPopoverTrigger(),
|
|
91
82
|
on: "click",
|
|
92
83
|
screenReaderLabel: _this.props.screenReaderLabel,
|
|
@@ -95,27 +86,26 @@ var MetricPopover = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
95
86
|
onShowContent: _this.showPopover,
|
|
96
87
|
onHideContent: _this.hidePopover,
|
|
97
88
|
isShowingContent: _this.state.isContentVisible
|
|
98
|
-
},
|
|
89
|
+
}, (0, _emotion.jsx)(_uiView.View, {
|
|
99
90
|
padding: "medium",
|
|
100
91
|
as: "div",
|
|
101
92
|
display: "block",
|
|
102
93
|
width: "248px"
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
},
|
|
94
|
+
}, (0, _emotion.jsx)("div", {
|
|
95
|
+
css: _this.props.styles.closeIconContainer
|
|
96
|
+
}, (0, _emotion.jsx)(_uiButtons.CloseButton, {
|
|
106
97
|
onClick: _this.hidePopover,
|
|
107
98
|
screenReaderLabel: (0, _formatMessage.default)('Close popover')
|
|
108
|
-
})),
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
className: styles.popoverTitle,
|
|
99
|
+
})), (0, _emotion.jsx)("div", {
|
|
100
|
+
css: _this.props.styles.headerContainer
|
|
101
|
+
}, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
112
102
|
level: "h3"
|
|
113
|
-
}, _this.props.title)),
|
|
103
|
+
}, _this.props.title)), (0, _emotion.jsx)("div", null, _this.props.subtitle && (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
114
104
|
themeOverride: {
|
|
115
105
|
h5FontWeight: 700
|
|
116
106
|
},
|
|
117
107
|
level: "h5"
|
|
118
|
-
}, _this.props.subtitle),
|
|
108
|
+
}, _this.props.subtitle), (0, _emotion.jsx)(_uiText.Text, {
|
|
119
109
|
size: "small"
|
|
120
110
|
}, _this.props.body))));
|
|
121
111
|
};
|
|
@@ -124,9 +114,19 @@ var MetricPopover = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
124
114
|
}
|
|
125
115
|
|
|
126
116
|
(0, _createClass2.default)(MetricPopover, [{
|
|
117
|
+
key: "componentDidMount",
|
|
118
|
+
value: function componentDidMount() {
|
|
119
|
+
this.props.makeStyles();
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
key: "componentDidUpdate",
|
|
123
|
+
value: function componentDidUpdate() {
|
|
124
|
+
this.props.makeStyles();
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
127
|
key: "renderPopoverTrigger",
|
|
128
128
|
value: function renderPopoverTrigger() {
|
|
129
|
-
return
|
|
129
|
+
return (0, _emotion.jsx)(_uiButtons.IconButton, {
|
|
130
130
|
size: "small",
|
|
131
131
|
themeOverride: {
|
|
132
132
|
smallHeight: '18px',
|
|
@@ -144,7 +144,9 @@ var MetricPopover = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
144
144
|
screenReaderLabel: _propTypes.default.string.isRequired,
|
|
145
145
|
title: _propTypes.default.string.isRequired,
|
|
146
146
|
subtitle: _propTypes.default.string,
|
|
147
|
-
body: _propTypes.default.string.isRequired
|
|
147
|
+
body: _propTypes.default.string.isRequired,
|
|
148
|
+
styles: _propTypes.default.object,
|
|
149
|
+
makeStyles: _propTypes.default.func
|
|
148
150
|
}, _class2.defaultProps = {
|
|
149
151
|
subtitle: ''
|
|
150
152
|
}, _temp)) || _class);
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
headerContainer: {
|
|
11
|
+
paddingBottom: componentTheme.headerPaddingBottom
|
|
12
|
+
},
|
|
13
|
+
closeIconContainer: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
justifyContent: 'flex-end',
|
|
16
|
+
marginRight: '-10px',
|
|
17
|
+
marginTop: '-10px'
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var _default = generateStyle;
|
|
23
|
+
exports.default = _default;
|
|
@@ -3,11 +3,14 @@
|
|
|
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
|
return {
|
|
11
11
|
headerPaddingBottom: spacing.medium
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var _default = generateComponentTheme;
|
|
16
|
+
exports.default = _default;
|