@instructure/quiz-core 20.11.3-rc.2 → 20.11.3-rc.20
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
|
@@ -15,7 +15,7 @@ import debounce from 'lodash/debounce';
|
|
|
15
15
|
import PropTypes from 'prop-types';
|
|
16
16
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
17
17
|
import partial from 'lodash/partial';
|
|
18
|
-
import { IconPlusLine } from '@instructure/ui-icons';
|
|
18
|
+
import { IconMoreSolid, IconPlusLine } from '@instructure/ui-icons';
|
|
19
19
|
import { BreadcrumbLink } from '@instructure/ui-breadcrumb';
|
|
20
20
|
import { Button } from '@instructure/ui-buttons';
|
|
21
21
|
import { Heading } from '@instructure/ui-heading';
|
|
@@ -38,6 +38,9 @@ import NavWrapper from "../NavWrapper/index.js";
|
|
|
38
38
|
import { ADD_BANK_ENTRY_MODAL, BANKS_BANK_ENTRY_PAGINATION, CAN_EDIT, REMOVED_ACCESS, READ_ONLY } from '@instructure/quiz-common';
|
|
39
39
|
import generateStyle from "./styles.js";
|
|
40
40
|
import generateComponentTheme from "./theme.js";
|
|
41
|
+
|
|
42
|
+
var _ref = jsx(IconMoreSolid, null);
|
|
43
|
+
|
|
41
44
|
export var Bank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
42
45
|
_inherits(Bank, _Component);
|
|
43
46
|
|
|
@@ -67,7 +70,10 @@ export var Bank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
67
70
|
_this.renderHeaderMenu = function () {
|
|
68
71
|
if (!_this.props.isCompact) {
|
|
69
72
|
return jsx(HeaderMenu, {
|
|
70
|
-
bank: _this.props.bank
|
|
73
|
+
bank: _this.props.bank,
|
|
74
|
+
iceTopNavBarEnabled: _this.props.iceTopNavBarEnabled,
|
|
75
|
+
id: "BankMenu",
|
|
76
|
+
renderIcon: _ref
|
|
71
77
|
});
|
|
72
78
|
}
|
|
73
79
|
};
|
|
@@ -92,7 +98,7 @@ export var Bank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
92
98
|
};
|
|
93
99
|
|
|
94
100
|
_this.unshareBankWithCourse = /*#__PURE__*/function () {
|
|
95
|
-
var
|
|
101
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(sharedBank) {
|
|
96
102
|
var _this$props, updateSharedBankPermission, bankId, getSharedBank, scope;
|
|
97
103
|
|
|
98
104
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -120,7 +126,7 @@ export var Bank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
120
126
|
}));
|
|
121
127
|
|
|
122
128
|
return function (_x) {
|
|
123
|
-
return
|
|
129
|
+
return _ref2.apply(this, arguments);
|
|
124
130
|
};
|
|
125
131
|
}();
|
|
126
132
|
|
|
@@ -175,8 +181,8 @@ export var Bank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
175
181
|
}, _this.renderNewBankEntryButton());
|
|
176
182
|
};
|
|
177
183
|
|
|
178
|
-
_this.announceResults = function (
|
|
179
|
-
var totalPages =
|
|
184
|
+
_this.announceResults = function (_ref3) {
|
|
185
|
+
var totalPages = _ref3.totalPages;
|
|
180
186
|
var message = t("{\n count, plural,\n =0 {No search results found}\n one {Displaying one page of results}\n other {Displaying # pages of results}\n }", {
|
|
181
187
|
count: totalPages
|
|
182
188
|
}); // Audibly announce when search results are ready.
|
|
@@ -9,8 +9,11 @@ var _dec, _class, _class2, _temp;
|
|
|
9
9
|
import { Component } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
12
|
+
import { View } from '@instructure/ui-view';
|
|
12
13
|
import { Menu } from '@instructure/ui-menu';
|
|
13
14
|
import { IconButton } from '@instructure/ui-buttons';
|
|
15
|
+
import { TopNavBar } from '@instructure/ui-top-nav-bar';
|
|
16
|
+
import { Drilldown } from '@instructure/ui-drilldown';
|
|
14
17
|
import { IconMoreSolid, IconImportLine } from '@instructure/ui-icons';
|
|
15
18
|
import { withStyle, jsx } from '@instructure/emotion';
|
|
16
19
|
import QTIImportModal from "../../../building/components/QTIImportModal/index.js";
|
|
@@ -18,6 +21,11 @@ import { PARENT_TYPE_BANK } from '@instructure/quiz-common';
|
|
|
18
21
|
import generateStyle from "./styles.js";
|
|
19
22
|
import generateComponentTheme from "./theme.js";
|
|
20
23
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
24
|
+
|
|
25
|
+
var _ref = jsx(IconImportLine, {
|
|
26
|
+
"data-automation": "sdk-headermenu-import-content"
|
|
27
|
+
});
|
|
28
|
+
|
|
21
29
|
export var HeaderMenu = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
22
30
|
_inherits(HeaderMenu, _Component);
|
|
23
31
|
|
|
@@ -32,6 +40,28 @@ export var HeaderMenu = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
32
40
|
_createClass(HeaderMenu, [{
|
|
33
41
|
key: "renderMenu",
|
|
34
42
|
value: function renderMenu() {
|
|
43
|
+
if (this.props.iceTopNavBarEnabled) {
|
|
44
|
+
return jsx(TopNavBar.Item, {
|
|
45
|
+
id: this.props.id,
|
|
46
|
+
variant: "icon",
|
|
47
|
+
renderIcon: this.props.renderIcon,
|
|
48
|
+
showSubmenuChevron: false,
|
|
49
|
+
renderSubmenu: jsx(Drilldown, {
|
|
50
|
+
rootPageId: "root"
|
|
51
|
+
}, jsx(Drilldown.Page, {
|
|
52
|
+
id: "root"
|
|
53
|
+
}, jsx(Drilldown.Option, {
|
|
54
|
+
id: "import",
|
|
55
|
+
key: "import",
|
|
56
|
+
disabled: !this.props.bank.canImport(),
|
|
57
|
+
onOptionClick: this.props.openImportModal
|
|
58
|
+
}, _ref, jsx(View, {
|
|
59
|
+
as: "span",
|
|
60
|
+
margin: "0 0 0 x-small"
|
|
61
|
+
}, t('Import Content')))))
|
|
62
|
+
}, t('More Item Banking Actions'));
|
|
63
|
+
}
|
|
64
|
+
|
|
35
65
|
return jsx(Menu, {
|
|
36
66
|
trigger: jsx(IconButton, {
|
|
37
67
|
renderIcon: IconMoreSolid,
|
|
@@ -52,7 +82,9 @@ export var HeaderMenu = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
52
82
|
key: "render",
|
|
53
83
|
value: function render() {
|
|
54
84
|
var bank = this.props.bank;
|
|
55
|
-
return jsx("div",
|
|
85
|
+
return jsx("div", {
|
|
86
|
+
css: this.props.styles.container
|
|
87
|
+
}, this.renderMenu(), jsx(QTIImportModal, {
|
|
56
88
|
parentId: bank.id,
|
|
57
89
|
parentType: PARENT_TYPE_BANK,
|
|
58
90
|
qtiImport: bank.getLatestImport(),
|
|
@@ -66,7 +98,14 @@ export var HeaderMenu = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
66
98
|
}(Component), _class2.propTypes = {
|
|
67
99
|
openImportModal: PropTypes.func.isRequired,
|
|
68
100
|
bank: ImmutablePropTypes.record.isRequired,
|
|
101
|
+
iceTopNavBarEnabled: PropTypes.bool,
|
|
102
|
+
id: PropTypes.string,
|
|
103
|
+
renderIcon: PropTypes.element,
|
|
69
104
|
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
70
105
|
styles: PropTypes.object
|
|
106
|
+
}, _class2.defaultProps = {
|
|
107
|
+
iceTopNavBarEnabled: false,
|
|
108
|
+
id: 'BankMenu',
|
|
109
|
+
renderIcon: jsx(IconMoreSolid, null)
|
|
71
110
|
}, _temp)) || _class);
|
|
72
111
|
export default HeaderMenu;
|
|
@@ -73,12 +73,15 @@ var NavWrapper = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
|
|
|
73
73
|
if (!closeTray && returnToUrl) {
|
|
74
74
|
return jsx(ReturnButton, {
|
|
75
75
|
returnToUrl: returnToUrl,
|
|
76
|
+
id: "ReturnButton",
|
|
77
|
+
key: "ReturnButton",
|
|
76
78
|
iceTopNavBarEnabled: iceTopNavBarEnabled
|
|
77
79
|
});
|
|
78
80
|
} else if (navigateToBuild) {
|
|
79
81
|
if (iceTopNavBarEnabled) {
|
|
80
82
|
return jsx(SecondaryNavBarButton, {
|
|
81
83
|
id: "ReturnButton",
|
|
84
|
+
key: "ReturnButton",
|
|
82
85
|
variant: "button",
|
|
83
86
|
onClick: navigateToBuild
|
|
84
87
|
}, t('Return'));
|
|
@@ -105,12 +108,14 @@ var NavWrapper = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
|
|
|
105
108
|
key: "render",
|
|
106
109
|
value: function render() {
|
|
107
110
|
if (this.props.iceTopNavBarEnabled) {
|
|
111
|
+
var actionItems = [this.renderReturnButton()];
|
|
112
|
+
!this.props.isCompact && actionItems.push(this.props.renderHeaderMenu());
|
|
108
113
|
return jsx(NavBar, {
|
|
109
114
|
menuItems: [{
|
|
110
115
|
path: this.props.menuItemPath,
|
|
111
116
|
text: 'Item Banks'
|
|
112
117
|
}],
|
|
113
|
-
actionItems:
|
|
118
|
+
actionItems: actionItems
|
|
114
119
|
});
|
|
115
120
|
}
|
|
116
121
|
|
|
@@ -615,7 +615,7 @@ export var SharingModalPresenter = (_dec = withStyle(generateStyle, generateComp
|
|
|
615
615
|
placement: "end",
|
|
616
616
|
offset: "medium",
|
|
617
617
|
screenReaderLabel: t('Close')
|
|
618
|
-
})), jsx(ModalBody, null, !subAccountBankSharingEnabled && this.renderRootAccountSharing(), !subAccountBankSharingEnabled && this.renderSearchSection(), this.state.shares.size
|
|
618
|
+
})), jsx(ModalBody, null, !subAccountBankSharingEnabled && this.renderRootAccountSharing(), !subAccountBankSharingEnabled && this.renderSearchSection(), this.state.shares.size >= 0 ? this.renderEntitiesSection() : _ref7), jsx(ModalFooter, null, this.renderFooter()));
|
|
619
619
|
}
|
|
620
620
|
}]);
|
|
621
621
|
|
|
@@ -14,6 +14,7 @@ import { DropTargetCreator } from "../../../../../common/components/shared/drag_
|
|
|
14
14
|
import { QuizEntry as QuizEntryPresenter } from "./presenter.js";
|
|
15
15
|
import { SHOULD_CLONE_ITEM, QUIZ_ENTRY_GUID_SUFFIX, QUIZ_ENTRY_REF } from '@instructure/quiz-common';
|
|
16
16
|
import { getActiveQuiz } from "../../../../../common/selectors/quizzes.js";
|
|
17
|
+
import quizEntryPresenterWrapper from "./quizEntryPresenterWrapper.js";
|
|
17
18
|
export var mapStateToProps = function mapStateToProps(state, props) {
|
|
18
19
|
var activeQuiz = getActiveQuiz(state);
|
|
19
20
|
var quizId = activeQuiz.id;
|
|
@@ -67,5 +68,5 @@ var dispatchToProps = {
|
|
|
67
68
|
setUi: set,
|
|
68
69
|
showError: showError
|
|
69
70
|
};
|
|
70
|
-
export var QuizEntry = compose(connect(mapStateToProps, dispatchToProps), makeEditable, DropTargetCreator(QUIZ_ENTRY_REF))(QuizEntryPresenter);
|
|
71
|
+
export var QuizEntry = compose(connect(mapStateToProps, dispatchToProps), makeEditable, DropTargetCreator(QUIZ_ENTRY_REF))(quizEntryPresenterWrapper(QuizEntryPresenter));
|
|
71
72
|
export default QuizEntry;
|
|
@@ -7,13 +7,14 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
7
7
|
|
|
8
8
|
var _dec, _class, _class2, _temp;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/** @jsx jsx */
|
|
11
|
+
import { Component } from 'react';
|
|
11
12
|
import PropTypes from 'prop-types';
|
|
12
13
|
import { List } from 'immutable';
|
|
13
14
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
14
15
|
import pick from 'lodash/pick';
|
|
15
16
|
import partial from 'lodash/partial';
|
|
16
|
-
import {
|
|
17
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
17
18
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
18
19
|
import WarningWrapper from "../../../../../common/components/resources/WarningWrapper/index.js";
|
|
19
20
|
import { propsForItemBankEntryEditPrompt, propsForStimulusBankEntryEditPrompt, propsForBankEntryUnauthorizedEdit, propsForItemVersioningWrapper, propsForBankEntryVersioningWrapper } from "../../../../../common/util/warningHelpers.js";
|
|
@@ -30,17 +31,9 @@ import { BUILD_TRAY_OPEN, PARENT_TYPE_QUIZ, REGRADE_MODAL, SHOULD_CLONE_ITEM } f
|
|
|
30
31
|
import QuizEntryShow from "../QuizEntryShow/index.js";
|
|
31
32
|
import QuizEntryEdit from "../QuizEntryEdit/index.js";
|
|
32
33
|
import Stimulus from "../../../../../common/components/resources/stimulus/Stimulus/index.js";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return "\n\n.erzHq_cjWK{border-top:".concat(theme.footerBorderWidth || 'inherit', " solid ").concat(theme.footerBorderColor || 'inherit', ";font-size:").concat(theme.footerFontSize || 'inherit', ";overflow:auto;padding:").concat(theme.footerPadding || 'inherit', "}\n\n.erzHq_fpkp{display:none}\n\n@media print{.erzHq_fpkp{display:inherit}.erzHq_dcyh{display:none}}");
|
|
37
|
-
},
|
|
38
|
-
'footer': 'erzHq_cjWK',
|
|
39
|
-
'sampleItems': 'erzHq_fpkp',
|
|
40
|
-
'bankItem': 'erzHq_dcyh'
|
|
41
|
-
};
|
|
42
|
-
import theme from "./theme.js";
|
|
43
|
-
export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
34
|
+
import generateStyle from "./styles.js";
|
|
35
|
+
import generateComponentTheme from "./theme.js";
|
|
36
|
+
export var QuizEntry = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
44
37
|
_inherits(QuizEntry, _Component);
|
|
45
38
|
|
|
46
39
|
var _super = _createSuper(QuizEntry);
|
|
@@ -67,7 +60,7 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
67
60
|
};
|
|
68
61
|
|
|
69
62
|
_this.renderItemBankingOptions = function () {
|
|
70
|
-
return
|
|
63
|
+
return jsx(AddToBankOptions, {
|
|
71
64
|
displayPosition: _this.props.displayPosition,
|
|
72
65
|
entryType: _this.props.quizEntry.entryType,
|
|
73
66
|
guid: _this.props.guid,
|
|
@@ -99,10 +92,10 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
99
92
|
interactionTypeName: entryMutable.interactionType.name
|
|
100
93
|
});
|
|
101
94
|
|
|
102
|
-
return
|
|
95
|
+
return jsx("div", {
|
|
103
96
|
key: index,
|
|
104
|
-
|
|
105
|
-
},
|
|
97
|
+
css: _this.props.styles.sampleItems
|
|
98
|
+
}, jsx(QuizEntryShow, overrideProps, jsx(ItemShow, _this.propsForItem(item))));
|
|
106
99
|
};
|
|
107
100
|
|
|
108
101
|
_this.bankEntryWarningWrapperProps = function () {
|
|
@@ -196,7 +189,7 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
196
189
|
var quizEntryProps = this.quizEntryProps();
|
|
197
190
|
var propsForWrapperFunc = quizEntry.isArchivedBankEntry ? propsForBankEntryVersioningWrapper : propsForItemVersioningWrapper;
|
|
198
191
|
var propsForItemVersioning = propsForWrapperFunc(entry.isImmutable() || quizEntry.isArchivedBankEntry, shouldClone, partial(this.props.setUi, SHOULD_CLONE_ITEM), this.props.switchOffEditing, isEditing, quizEntry.isArchivedBankEntry ? 'info' : 'warning');
|
|
199
|
-
return
|
|
192
|
+
return jsx(QuizEntryComponent, quizEntryProps, jsx(WarningWrapper, propsForItemVersioning, jsx(ItemComponent, itemProps)));
|
|
200
193
|
}
|
|
201
194
|
}, {
|
|
202
195
|
key: "renderBank",
|
|
@@ -210,9 +203,9 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
210
203
|
name: bank.title
|
|
211
204
|
};
|
|
212
205
|
var sampleItems = this.props.quizEntry.sampleItems;
|
|
213
|
-
return
|
|
214
|
-
|
|
215
|
-
},
|
|
206
|
+
return jsx("div", null, jsx("div", {
|
|
207
|
+
css: this.props.styles.bankItem
|
|
208
|
+
}, jsx(QuizEntryComponent, Object.assign({}, this.props, bankProps), jsx(QuizEntryBankComponent, Object.assign({}, this.props, bankProps)))), sampleItems.map(this.renderPrintableItemBankSample));
|
|
216
209
|
}
|
|
217
210
|
}, {
|
|
218
211
|
key: "isOverridable",
|
|
@@ -243,9 +236,9 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
243
236
|
var itemProps = this.propsForItem();
|
|
244
237
|
var mergedItem = this.isEditing() ? this.props.workingQuizEntry.getItem() : itemProps.entry;
|
|
245
238
|
var ItemComponent = this.isOverriding() ? ItemOverride : ItemShow;
|
|
246
|
-
return
|
|
239
|
+
return jsx(QuizEntryComponent, quizEntryProps, jsx(WarningWrapper, Object.assign({}, bankEntryWarningWrapperProps, {
|
|
247
240
|
disableChildren: this.isEditing() && !this.isOverridable()
|
|
248
|
-
}),
|
|
241
|
+
}), jsx(ItemComponent, Object.assign({}, itemProps, {
|
|
249
242
|
entry: mergedItem,
|
|
250
243
|
quizEntry: this.props.quizEntry
|
|
251
244
|
}))), this.renderFooter());
|
|
@@ -253,7 +246,7 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
253
246
|
}, {
|
|
254
247
|
key: "renderStimulus",
|
|
255
248
|
value: function renderStimulus(bankEntryWarningWrapperProps) {
|
|
256
|
-
return
|
|
249
|
+
return jsx(Stimulus, {
|
|
257
250
|
bankEntryWarningWrapperProps: bankEntryWarningWrapperProps,
|
|
258
251
|
childEntries: this.props.childEntries,
|
|
259
252
|
displayPosition: this.props.displayPosition,
|
|
@@ -281,7 +274,7 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
281
274
|
}, {
|
|
282
275
|
key: "renderTags",
|
|
283
276
|
value: function renderTags() {
|
|
284
|
-
return
|
|
277
|
+
return jsx(TagDisplay, {
|
|
285
278
|
tagAssociations: this.props.tagAssociations
|
|
286
279
|
});
|
|
287
280
|
}
|
|
@@ -297,8 +290,8 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
297
290
|
return null;
|
|
298
291
|
}
|
|
299
292
|
|
|
300
|
-
return
|
|
301
|
-
|
|
293
|
+
return jsx("div", {
|
|
294
|
+
css: this.props.styles.footer
|
|
302
295
|
}, this.renderTags());
|
|
303
296
|
}
|
|
304
297
|
}, {
|
|
@@ -327,7 +320,7 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
327
320
|
}, {
|
|
328
321
|
key: "render",
|
|
329
322
|
value: function render() {
|
|
330
|
-
return this.props.connectDropTarget(
|
|
323
|
+
return this.props.connectDropTarget(jsx("div", {
|
|
331
324
|
tabIndex: "-1"
|
|
332
325
|
}, this.renderQuizEntryByType()));
|
|
333
326
|
}
|
|
@@ -378,7 +371,8 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
378
371
|
type: PropTypes.string,
|
|
379
372
|
text: PropTypes.string
|
|
380
373
|
}))),
|
|
381
|
-
stimulusOrientation: PropTypes.string
|
|
374
|
+
stimulusOrientation: PropTypes.string,
|
|
375
|
+
styles: PropTypes.object
|
|
382
376
|
}, _class2.defaultProps = {
|
|
383
377
|
childEntries: List(),
|
|
384
378
|
draggingAboveHalf: false,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
var isClassComponent = function isClassComponent(Component) {
|
|
8
|
+
return !!(typeof Component === 'function' && Component.prototype && Component.prototype.isReactComponent);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var quizEntryPresenterWrapper = function quizEntryPresenterWrapper(Component) {
|
|
12
|
+
if (isClassComponent(Component)) {
|
|
13
|
+
return Component;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
17
|
+
_inherits(ClassComponentWrapper, _React$Component);
|
|
18
|
+
|
|
19
|
+
var _super = _createSuper(ClassComponentWrapper);
|
|
20
|
+
|
|
21
|
+
function ClassComponentWrapper() {
|
|
22
|
+
_classCallCheck(this, ClassComponentWrapper);
|
|
23
|
+
|
|
24
|
+
return _super.apply(this, arguments);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_createClass(ClassComponentWrapper, [{
|
|
28
|
+
key: "render",
|
|
29
|
+
value: function render() {
|
|
30
|
+
return /*#__PURE__*/React.createElement(Component, this.props);
|
|
31
|
+
}
|
|
32
|
+
}]);
|
|
33
|
+
|
|
34
|
+
ClassComponentWrapper.displayName = "ClassComponentWrapper";
|
|
35
|
+
return ClassComponentWrapper;
|
|
36
|
+
}(React.Component);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default quizEntryPresenterWrapper;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
4
|
+
var mp = '@media print';
|
|
5
|
+
return {
|
|
6
|
+
footer: {
|
|
7
|
+
overflow: 'auto',
|
|
8
|
+
padding: componentTheme.footerPadding,
|
|
9
|
+
borderTop: "".concat(componentTheme.footerBorderWidth, " solid ").concat(componentTheme.footerBorderColor),
|
|
10
|
+
fontSize: componentTheme.footerFontSize
|
|
11
|
+
},
|
|
12
|
+
sampleItems: _defineProperty({
|
|
13
|
+
display: 'none'
|
|
14
|
+
}, mp, {
|
|
15
|
+
display: 'inherit'
|
|
16
|
+
}),
|
|
17
|
+
bankItem: _defineProperty({}, mp, {
|
|
18
|
+
display: 'none'
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
colors = _ref.colors,
|
|
4
4
|
borders = _ref.borders,
|
|
@@ -9,4 +9,6 @@ export default function generator(_ref) {
|
|
|
9
9
|
footerBorderColor: colors.tiara,
|
|
10
10
|
footerFontSize: typography.fontSizeXSmall
|
|
11
11
|
};
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default generateComponentTheme;
|
package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js
CHANGED
|
@@ -5,7 +5,8 @@ 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 PropTypes from 'prop-types';
|
|
10
11
|
import { Grid } from '@instructure/ui-grid';
|
|
11
12
|
import { View } from '@instructure/ui-view';
|
|
@@ -14,30 +15,20 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
|
14
15
|
import NumberInput from '@instructure/quiz-number-input';
|
|
15
16
|
import { Text } from '@instructure/ui-text';
|
|
16
17
|
import { Alert } from '@instructure/ui-alerts';
|
|
17
|
-
import {
|
|
18
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
18
19
|
import EntrySave from "../../../../../../common/components/resources/entry/EntrySave/index.js";
|
|
19
20
|
import BankSelection from "../../../../../../common/components/resources/BankSelection/index.js";
|
|
20
21
|
import QuizEntry from "../../../../../../common/records/QuizEntry.js";
|
|
21
22
|
import Bank from "../../../../../../common/records/Bank.js";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
template: function template(theme) {
|
|
25
|
-
return "\n\n.bRxwg_cTJN{margin:".concat(theme.marginAddMargin || 'inherit', "}\n\n.bRxwg_edMM{background-color:").concat(theme.quizEntryBankEditBackgroundColor || 'inherit', ";border:").concat(theme.quizEntryBankEditBorderSize || 'inherit', " dashed ").concat(theme.quizEntryBankEditBorderColor || 'inherit', ";margin:").concat(theme.quizEntryBankEditMargin || 'inherit', ";padding:").concat(theme.quizEntryBankEditPadding || 'inherit', "}\n\n.bRxwg_dpNC,[dir=ltr] .bRxwg_dpNC,[dir=rtl] .bRxwg_dpNC{text-align:left}\n\n.bRxwg_fGqX{display:inline-flex;font-size:").concat(theme.numberInputFontSize || 'inherit', ";padding:").concat(theme.numberInputPadding || 'inherit', ";padding-bottom:0;padding-left:").concat(theme.numberInputLeftPadding || 'inherit', "}\n\n.bRxwg_bRWN{border-bottom:solid ").concat(theme.borderLineBottomBorderSize || 'inherit', " ").concat(theme.borderLineBottomBorderColor || 'inherit', ";margin-bottom:").concat(theme.borderLineBottomMargin || 'inherit', ";margin-top:").concat(theme.borderLineTopMargin || 'inherit', "}");
|
|
26
|
-
},
|
|
27
|
-
'marginAdd': 'bRxwg_cTJN',
|
|
28
|
-
'quizEntryBankEdit': 'bRxwg_edMM',
|
|
29
|
-
'quizEntryBankText': 'bRxwg_dpNC',
|
|
30
|
-
'numberInput': 'bRxwg_fGqX',
|
|
31
|
-
'borderLine': 'bRxwg_bRWN'
|
|
32
|
-
};
|
|
33
|
-
import theme from "./theme.js";
|
|
23
|
+
import generateStyle from "./styles.js";
|
|
24
|
+
import generateComponentTheme from "./theme.js";
|
|
34
25
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
35
26
|
|
|
36
|
-
var _ref =
|
|
27
|
+
var _ref = jsx("br", null);
|
|
37
28
|
|
|
38
|
-
var _ref2 =
|
|
29
|
+
var _ref2 = jsx("br", null);
|
|
39
30
|
|
|
40
|
-
export var QuizEntryBankEdit = (_dec =
|
|
31
|
+
export var QuizEntryBankEdit = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
41
32
|
_inherits(QuizEntryBankEdit, _Component);
|
|
42
33
|
|
|
43
34
|
var _super = _createSuper(QuizEntryBankEdit);
|
|
@@ -127,14 +118,14 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
127
118
|
};
|
|
128
119
|
|
|
129
120
|
_this.renderPointsPossibleRow = function () {
|
|
130
|
-
return
|
|
121
|
+
return jsx(Grid.Row, null, jsx(Grid.Col, {
|
|
131
122
|
width: 3
|
|
132
|
-
},
|
|
123
|
+
}, jsx(Text, {
|
|
133
124
|
color: "primary"
|
|
134
|
-
}, t('Points per question'))),
|
|
125
|
+
}, t('Points per question'))), jsx(Grid.Col, {
|
|
135
126
|
width: 9
|
|
136
|
-
},
|
|
137
|
-
renderLabel:
|
|
127
|
+
}, jsx(NumberInput, {
|
|
128
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Points per question')),
|
|
138
129
|
onChange: _this.handlePointsChange,
|
|
139
130
|
onBlur: _this.handlePointsBlur,
|
|
140
131
|
value: _this.state.rawPointsPossible,
|
|
@@ -150,16 +141,16 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
150
141
|
_createClass(QuizEntryBankEdit, [{
|
|
151
142
|
key: "renderQuestionSelectRadioGroup",
|
|
152
143
|
value: function renderQuestionSelectRadioGroup() {
|
|
153
|
-
return
|
|
144
|
+
return jsx(RadioInputGroup, {
|
|
154
145
|
name: "questionSelect",
|
|
155
146
|
description: t('Question selection'),
|
|
156
147
|
defaultValue: this.props.questionSelection,
|
|
157
148
|
onChange: this.handleQuestionChange
|
|
158
|
-
},
|
|
149
|
+
}, jsx(RadioInput, {
|
|
159
150
|
key: "all",
|
|
160
151
|
value: "all",
|
|
161
152
|
label: t('Use all questions')
|
|
162
|
-
}),
|
|
153
|
+
}), jsx(RadioInput, {
|
|
163
154
|
key: "rand",
|
|
164
155
|
value: "rand",
|
|
165
156
|
label: t('Randomly select questions')
|
|
@@ -172,14 +163,14 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
172
163
|
return;
|
|
173
164
|
}
|
|
174
165
|
|
|
175
|
-
return
|
|
166
|
+
return jsx(Grid.Row, null, jsx(Grid.Col, {
|
|
176
167
|
width: 3
|
|
177
|
-
},
|
|
168
|
+
}, jsx(Text, {
|
|
178
169
|
color: "primary"
|
|
179
|
-
}, t('Number of questions'))),
|
|
170
|
+
}, t('Number of questions'))), jsx(Grid.Col, {
|
|
180
171
|
width: 9
|
|
181
|
-
},
|
|
182
|
-
renderLabel:
|
|
172
|
+
}, jsx(NumberInput, {
|
|
173
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Number of questions')),
|
|
183
174
|
onChange: this.handleSampleNumChange,
|
|
184
175
|
value: this.props.sampleNum,
|
|
185
176
|
min: 1,
|
|
@@ -191,7 +182,7 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
191
182
|
}, {
|
|
192
183
|
key: "renderQuestionNumberInputs",
|
|
193
184
|
value: function renderQuestionNumberInputs() {
|
|
194
|
-
return
|
|
185
|
+
return jsx(Grid, {
|
|
195
186
|
vAlign: "middle",
|
|
196
187
|
rowSpacing: "small"
|
|
197
188
|
}, this.renderRandomQuestionSelectionRow(), this.renderPointsPossibleRow());
|
|
@@ -199,9 +190,9 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
199
190
|
}, {
|
|
200
191
|
key: "renderContent",
|
|
201
192
|
value: function renderContent() {
|
|
202
|
-
return
|
|
203
|
-
|
|
204
|
-
},
|
|
193
|
+
return jsx("div", {
|
|
194
|
+
css: this.props.styles.quizEntryBankText
|
|
195
|
+
}, jsx(BankSelection, {
|
|
205
196
|
label: t('Select the source bank'),
|
|
206
197
|
selectedBank: this.props.workingBank,
|
|
207
198
|
onBankSelection: this.onBankSelection
|
|
@@ -211,9 +202,9 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
211
202
|
key: "renderErrors",
|
|
212
203
|
value: function renderErrors() {
|
|
213
204
|
if (this.props.workingBank.archived) {
|
|
214
|
-
return
|
|
205
|
+
return jsx(Alert, {
|
|
215
206
|
variant: "error"
|
|
216
|
-
},
|
|
207
|
+
}, jsx(Text, {
|
|
217
208
|
color: "primary"
|
|
218
209
|
}, t('Item bank no longer exists!')));
|
|
219
210
|
}
|
|
@@ -221,13 +212,13 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
221
212
|
}, {
|
|
222
213
|
key: "render",
|
|
223
214
|
value: function render() {
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
}, this.renderErrors(), this.renderContent(),
|
|
227
|
-
|
|
228
|
-
}),
|
|
215
|
+
return jsx("div", {
|
|
216
|
+
css: this.props.styles.quizEntryBankEdit
|
|
217
|
+
}, this.renderErrors(), this.renderContent(), jsx("div", {
|
|
218
|
+
css: this.props.styles.borderLine
|
|
219
|
+
}), jsx(View, {
|
|
229
220
|
textAlign: "end"
|
|
230
|
-
},
|
|
221
|
+
}, jsx(EntrySave, {
|
|
231
222
|
clearChanges: this.clearChanges,
|
|
232
223
|
displayPosition: this.props.displayPosition,
|
|
233
224
|
disableSubmit: !this.props.workingQuizEntry.isValid(),
|
|
@@ -255,7 +246,8 @@ export var QuizEntryBankEdit = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
255
246
|
sampleNum: PropTypes.string,
|
|
256
247
|
updateQuizEntry: PropTypes.func.isRequired,
|
|
257
248
|
workingBank: PropTypes.instanceOf(Bank).isRequired,
|
|
258
|
-
workingQuizEntry: PropTypes.instanceOf(QuizEntry).isRequired
|
|
249
|
+
workingQuizEntry: PropTypes.instanceOf(QuizEntry).isRequired,
|
|
250
|
+
styles: PropTypes.object
|
|
259
251
|
}, _class2.defaultProps = {
|
|
260
252
|
sampleNum: void 0
|
|
261
253
|
}, _temp)) || _class);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
marginAdd: {
|
|
4
|
+
margin: componentTheme.marginAddMargin
|
|
5
|
+
},
|
|
6
|
+
quizEntryBankEdit: {
|
|
7
|
+
backgroundColor: componentTheme.quizEntryBankEditBackgroundColor,
|
|
8
|
+
border: "".concat(componentTheme.quizEntryBankEditBorderSize, " dashed ").concat(componentTheme.quizEntryBankEditBorderColor),
|
|
9
|
+
padding: componentTheme.quizEntryBankEditPadding,
|
|
10
|
+
margin: componentTheme.quizEntryBankEditMargin
|
|
11
|
+
},
|
|
12
|
+
quizEntryBankText: {
|
|
13
|
+
textAlign: 'left'
|
|
14
|
+
},
|
|
15
|
+
numberInput: {
|
|
16
|
+
fontSize: componentTheme.numberInputFontSize,
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
padding: componentTheme.numberInputPadding,
|
|
19
|
+
paddingBottom: '0',
|
|
20
|
+
paddingLeft: componentTheme.numberInputLeftPadding
|
|
21
|
+
},
|
|
22
|
+
borderLine: {
|
|
23
|
+
marginTop: componentTheme.borderLineTopMargin,
|
|
24
|
+
marginBottom: componentTheme.borderLineBottomMargin,
|
|
25
|
+
borderBottom: "solid ".concat(componentTheme.borderLineBottomBorderSize, " ").concat(componentTheme.borderLineBottomBorderColor)
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
colors = _ref.colors,
|
|
4
4
|
typography = _ref.typography,
|
|
@@ -18,4 +18,6 @@ export default function generator(_ref) {
|
|
|
18
18
|
borderLineBottomBorderSize: borders.widthSmall,
|
|
19
19
|
borderLineBottomBorderColor: colors.ash
|
|
20
20
|
};
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default generateComponentTheme;
|