@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
globalStyles: {
|
|
4
|
+
'body.tox-fullscreen .quizEntryEdit': {
|
|
5
|
+
transform: 'none',
|
|
6
|
+
zIndex: '6666'
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
quizEntryEdit: {
|
|
10
|
+
fontSize: componentTheme.quizEntryEditFontSize,
|
|
11
|
+
position: 'relative',
|
|
12
|
+
transform: 'translate3d(0, 0, 0)',
|
|
13
|
+
|
|
14
|
+
/* for drag and drop preview to work */
|
|
15
|
+
margin: "".concat(componentTheme.quizEntryEditMargin, " 0"),
|
|
16
|
+
zIndex: '3333'
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
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,
|
|
@@ -7,4 +7,6 @@ export default function generator(_ref) {
|
|
|
7
7
|
quizEntryEditFontSize: typography.fontSizeMedium,
|
|
8
8
|
quizEntryEditMargin: spacing.medium
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default generateComponentTheme;
|
|
@@ -5,48 +5,31 @@ 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 ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
12
|
import partial from 'lodash/partial';
|
|
12
13
|
import { DragSource } from 'react-dnd';
|
|
13
14
|
import { IconBankLine } from '@instructure/ui-icons';
|
|
14
15
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
|
-
import {
|
|
16
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
16
17
|
import { FillBlankInteractionType } from '@instructure/quiz-interactions';
|
|
17
18
|
import { TOP } from '@instructure/quiz-common';
|
|
18
19
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
19
20
|
import { convertFITBtoRich } from "../../../../../common/util/fitbCopyHelper.js";
|
|
20
21
|
import Item from "../../../../../common/records/Item.js";
|
|
21
|
-
import
|
|
22
|
+
import OverlayEmotion from "../../../../../common/components/shared/overlayEmotion/index.js";
|
|
22
23
|
import ActionButtons from "../../ActionButtons/index.js";
|
|
23
24
|
import { ItemTypes, dragSource, collectDrag } from "../../../../../common/components/shared/drag_and_drop/dragAndDropUtils.js";
|
|
24
25
|
import PositionBox from "../../../../../common/components/resources/positionBox/PositionBox.js";
|
|
25
26
|
import DragAndDropZone from "../../../../../common/components/shared/drag_and_drop/DragAndDropZone/index.js";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'quizEntryShow': 'eqZPF_TMNr',
|
|
33
|
-
'header': 'eqZPF_fsuY',
|
|
34
|
-
'dndBorder': 'eqZPF_bscQ',
|
|
35
|
-
'leftHeader': 'eqZPF_cKlw',
|
|
36
|
-
'connectingLines': 'eqZPF_eGWt',
|
|
37
|
-
'rightHeader': 'eqZPF_IoDT',
|
|
38
|
-
'interactionTypeName': 'eqZPF_eCZW',
|
|
39
|
-
'points': 'eqZPF_cwte',
|
|
40
|
-
'title': 'eqZPF_nvdO',
|
|
41
|
-
'itemHolder': 'eqZPF_csjx',
|
|
42
|
-
'dragAndDropHandle': 'eqZPF_fPOQ',
|
|
43
|
-
'optionsButton': 'eqZPF_gaTA'
|
|
44
|
-
};
|
|
45
|
-
import theme from "./theme.js";
|
|
46
|
-
|
|
47
|
-
var _ref = /*#__PURE__*/React.createElement(IconBankLine, null);
|
|
48
|
-
|
|
49
|
-
var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
27
|
+
import generateStyle from "./styles.js";
|
|
28
|
+
import generateComponentTheme from "./theme.js";
|
|
29
|
+
|
|
30
|
+
var _ref = jsx(IconBankLine, null);
|
|
31
|
+
|
|
32
|
+
var QuizEntryShow = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
50
33
|
_inherits(QuizEntryShow, _Component);
|
|
51
34
|
|
|
52
35
|
var _super = _createSuper(QuizEntryShow);
|
|
@@ -215,8 +198,9 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
215
198
|
value: function renderPointsPossible() {
|
|
216
199
|
if (this.props.entry instanceof Item) {
|
|
217
200
|
var pointsPossible = this.props.quizEntry.pointsPossible;
|
|
218
|
-
return
|
|
219
|
-
className:
|
|
201
|
+
return jsx("div", {
|
|
202
|
+
className: "points",
|
|
203
|
+
css: this.props.styles.points,
|
|
220
204
|
"data-automation": "sdk-points-possible-div"
|
|
221
205
|
}, this.getPointsText(pointsPossible || 0));
|
|
222
206
|
}
|
|
@@ -226,8 +210,8 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
226
210
|
value: function renderInteractionType() {
|
|
227
211
|
if (this.props.entry instanceof Item) {
|
|
228
212
|
var interactionTypeName = this.props.entry.getInteractionType().name || this.props.interactionTypeName;
|
|
229
|
-
return
|
|
230
|
-
|
|
213
|
+
return jsx("div", {
|
|
214
|
+
css: this.props.styles.interactionTypeName,
|
|
231
215
|
"data-automation": "sdk-interaction-type-name-div"
|
|
232
216
|
}, interactionTypeName);
|
|
233
217
|
}
|
|
@@ -242,10 +226,10 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
242
226
|
}, {
|
|
243
227
|
key: "renderLeftHeader",
|
|
244
228
|
value: function renderLeftHeader() {
|
|
245
|
-
return
|
|
246
|
-
|
|
247
|
-
}, this.renderBankedContent(), this.renderInteractionType(), this.renderPointsPossible(),
|
|
248
|
-
|
|
229
|
+
return jsx("div", {
|
|
230
|
+
css: this.props.styles.leftHeader
|
|
231
|
+
}, this.renderBankedContent(), this.renderInteractionType(), this.renderPointsPossible(), jsx("div", {
|
|
232
|
+
css: this.props.styles.title,
|
|
249
233
|
"data-automation": "sdk-quiz-entry-title-div"
|
|
250
234
|
}, this.props.entry.title));
|
|
251
235
|
}
|
|
@@ -278,26 +262,27 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
278
262
|
var shouldLockQuizEntry = lockBlueprintContentEnabled && isContentLockedByBlueprint; // Overlay gets tabIndex === "-1" so that the drag handle is tabbable before
|
|
279
263
|
// the Overlay get focus and opens the quizEntry in edit mode
|
|
280
264
|
|
|
281
|
-
return
|
|
265
|
+
return jsx(OverlayEmotion, {
|
|
282
266
|
onClick: this.editingOn,
|
|
283
|
-
|
|
267
|
+
wrapperStyles: this.props.styles.quizEntryWrapper,
|
|
284
268
|
tabIndex: "-1",
|
|
285
269
|
hideOverlay: shouldLockQuizEntry
|
|
286
|
-
},
|
|
270
|
+
}, jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
287
271
|
location: "above"
|
|
288
|
-
})),
|
|
289
|
-
|
|
272
|
+
})), jsx("div", {
|
|
273
|
+
ref: connectDragPreview,
|
|
274
|
+
css: this.props.styles.quizEntryShow,
|
|
290
275
|
"data-automation": "sdk-quiz-entry-show",
|
|
291
276
|
"data-automation-item-id": this.props.quizEntry.id
|
|
292
|
-
},
|
|
293
|
-
|
|
294
|
-
}, quizEntry.isInStimulus && stimulusOrientation === TOP &&
|
|
295
|
-
|
|
296
|
-
}),
|
|
277
|
+
}, jsx("div", {
|
|
278
|
+
css: this.props.styles.header
|
|
279
|
+
}, quizEntry.isInStimulus && stimulusOrientation === TOP && jsx("div", {
|
|
280
|
+
css: this.props.styles.connectingLines
|
|
281
|
+
}), jsx(PositionBox, {
|
|
297
282
|
position: positionToDisplay,
|
|
298
283
|
headingText: positionText,
|
|
299
284
|
headingLevel: quizEntry.isInStimulus ? 'h3' : 'h2'
|
|
300
|
-
}), this.renderLeftHeader(),
|
|
285
|
+
}), this.renderLeftHeader(), jsx(ActionButtons, {
|
|
301
286
|
connectDragSource: this.props.connectDragSource,
|
|
302
287
|
displayPosition: this.props.displayPosition,
|
|
303
288
|
onDelete: this.removeItem,
|
|
@@ -311,11 +296,11 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
311
296
|
shouldDisableCopy: shouldLockQuizEntry,
|
|
312
297
|
shouldRenderEdit: !shouldLockQuizEntry,
|
|
313
298
|
shouldRenderDelete: !shouldLockQuizEntry
|
|
314
|
-
}),
|
|
315
|
-
|
|
299
|
+
}), jsx(ScreenReaderContent, null, srMsg)), jsx("div", {
|
|
300
|
+
css: this.props.styles.itemHolder,
|
|
316
301
|
ref: this.setInert,
|
|
317
302
|
"data-automation": "sdk-quiz-entry-show-item-holder"
|
|
318
|
-
}, this.props.children))
|
|
303
|
+
}, this.props.children)), jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
319
304
|
location: "below"
|
|
320
305
|
})));
|
|
321
306
|
}
|
|
@@ -355,7 +340,8 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
355
340
|
switchOnEditing: PropTypes.func.isRequired,
|
|
356
341
|
// from QuizEntry
|
|
357
342
|
updateItemCallStatus: PropTypes.string.isRequired,
|
|
358
|
-
withConfirm: PropTypes.func.isRequired
|
|
343
|
+
withConfirm: PropTypes.func.isRequired,
|
|
344
|
+
styles: PropTypes.object
|
|
359
345
|
}, _class2.defaultProps = {
|
|
360
346
|
children: null,
|
|
361
347
|
draggingOver: false,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
|
|
4
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
5
|
+
var mp = '@media print';
|
|
6
|
+
var interactionTypeStyles = {
|
|
7
|
+
color: componentTheme.titleInteractionTypeNamePointsColor,
|
|
8
|
+
fontSize: componentTheme.titleInteractionTypeNamePointsFontSize,
|
|
9
|
+
marginLeft: componentTheme.titleInteractionTypeNamePointsLeftMargin,
|
|
10
|
+
marginRight: componentTheme.titleInteractionTypeNamePointsRightMargin,
|
|
11
|
+
textOverflow: 'ellipsis',
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
whiteSpace: 'nowrap'
|
|
14
|
+
};
|
|
15
|
+
var optionsButtonDragDropStyle = {
|
|
16
|
+
backgroundColor: 'transparent',
|
|
17
|
+
border: 'none',
|
|
18
|
+
color: 'inherit',
|
|
19
|
+
fontSize: componentTheme.optionsButtonDragDropHandleFontSize,
|
|
20
|
+
margin: componentTheme.optionsButtonDragDropHandleMargin
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
quizEntryWrapper: _defineProperty({
|
|
24
|
+
transform: 'translate3d(0, 0, 0)'
|
|
25
|
+
}, mp, {
|
|
26
|
+
breakInside: 'avoid'
|
|
27
|
+
}),
|
|
28
|
+
quizEntryShow: {
|
|
29
|
+
padding: componentTheme.quizEntryShowPadding,
|
|
30
|
+
backgroundColor: componentTheme.quizEntryShowBackgroundColor
|
|
31
|
+
},
|
|
32
|
+
header: {
|
|
33
|
+
height: componentTheme.headerHeight,
|
|
34
|
+
display: 'flex',
|
|
35
|
+
flexWrap: 'nowrap',
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
alignItems: 'stretch',
|
|
38
|
+
paddingRight: componentTheme.headerRightPadding
|
|
39
|
+
},
|
|
40
|
+
dndBorder: {
|
|
41
|
+
border: componentTheme.dndBorder
|
|
42
|
+
},
|
|
43
|
+
leftHeader: {
|
|
44
|
+
flex: '8 0 0',
|
|
45
|
+
display: 'inline-flex',
|
|
46
|
+
overflow: 'hidden',
|
|
47
|
+
alignItems: 'center'
|
|
48
|
+
},
|
|
49
|
+
connectingLines: {
|
|
50
|
+
flex: '0 0 auto',
|
|
51
|
+
display: 'inline-flex',
|
|
52
|
+
borderLeft: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
|
|
53
|
+
borderBottom: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
|
|
54
|
+
borderColor: componentTheme.phoneConnectingLinesBorderColor,
|
|
55
|
+
height: '2rem',
|
|
56
|
+
width: '1.2rem',
|
|
57
|
+
marginTop: '-0.8rem',
|
|
58
|
+
marginRight: '1.2rem'
|
|
59
|
+
},
|
|
60
|
+
rightHeader: {
|
|
61
|
+
flex: '0 0 auto',
|
|
62
|
+
display: 'inline-flex',
|
|
63
|
+
textAlign: 'right',
|
|
64
|
+
zIndex: componentTheme.rightHeaderZIndex,
|
|
65
|
+
color: componentTheme.rightHeaderColor,
|
|
66
|
+
button: {
|
|
67
|
+
backgroundColor: 'initial'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
title: interactionTypeStyles,
|
|
71
|
+
interactionTypeName: interactionTypeStyles,
|
|
72
|
+
points: interactionTypeStyles,
|
|
73
|
+
itemHolder: {
|
|
74
|
+
overflowWrap: 'anywhere',
|
|
75
|
+
margin: componentTheme.itemHolderMargin
|
|
76
|
+
},
|
|
77
|
+
optionsButton: _objectSpread(_objectSpread({}, optionsButtonDragDropStyle), {}, {
|
|
78
|
+
cursor: 'pointer'
|
|
79
|
+
}),
|
|
80
|
+
dragAndDropHandle: optionsButtonDragDropStyle
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
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,
|
|
@@ -23,4 +23,6 @@ export default function generator(_ref) {
|
|
|
23
23
|
phoneConnectingLinesBorderColor: colors.ash,
|
|
24
24
|
phoneBreakPoint: "max-width: ".concat(breakpoints.medium)
|
|
25
25
|
};
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default generateComponentTheme;
|
|
@@ -54,7 +54,7 @@ export var SecondaryNavBarButton = (_dec = withStyle(generateStyle, generateComp
|
|
|
54
54
|
|
|
55
55
|
SecondaryNavBarButton.displayName = "SecondaryNavBarButton";
|
|
56
56
|
return SecondaryNavBarButton;
|
|
57
|
-
}(Component), _class2.propTypes = {
|
|
57
|
+
}(Component), _class2.displayName = 'TopNavBarItem', _class2.propTypes = {
|
|
58
58
|
children: PropTypes.string.isRequired,
|
|
59
59
|
styles: PropTypes.object,
|
|
60
60
|
makeStyles: PropTypes.func
|
|
@@ -1,39 +1,136 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
|
|
7
|
+
var _dec, _class, _class2, _temp;
|
|
8
|
+
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
import { Component } from 'react';
|
|
11
|
+
import PropTypes from 'prop-types';
|
|
12
|
+
import { TopNavBar } from '@instructure/ui-top-nav-bar';
|
|
13
|
+
import { IconQuizLine } from '@instructure/ui-icons';
|
|
14
|
+
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
16
|
+
import generateStyle from "./styles.js";
|
|
17
|
+
import generateComponentTheme from "./theme.js";
|
|
18
|
+
|
|
19
|
+
var _ref = jsx(IconQuizLine, {
|
|
20
|
+
color: "primary",
|
|
21
|
+
size: "small"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export var NavBar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
25
|
+
_inherits(NavBar, _Component);
|
|
26
|
+
|
|
27
|
+
var _super = _createSuper(NavBar);
|
|
28
|
+
|
|
29
|
+
function NavBar() {
|
|
30
|
+
var _this;
|
|
31
|
+
|
|
32
|
+
_classCallCheck(this, NavBar);
|
|
33
|
+
|
|
34
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
|
+
args[_key] = arguments[_key];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
39
|
+
|
|
40
|
+
_this.hiddenActionItemsMenuTriggerLabel = function (hiddenChildrenCount) {
|
|
41
|
+
return t('{hiddenChildrenCount} more actions', {
|
|
42
|
+
hiddenChildrenCount: hiddenChildrenCount
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
_this.hiddenMenuItemsMenuTriggerLabel = function (hiddenChildrenCount) {
|
|
47
|
+
return t('{hiddenChildrenCount} More', {
|
|
48
|
+
hiddenChildrenCount: hiddenChildrenCount
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
_this.renderBrand = function () {
|
|
53
|
+
return jsx(TopNavBar.Brand, {
|
|
54
|
+
screenReaderLabel: t('Quizzes'),
|
|
55
|
+
renderIcon: _ref
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
_this.renderMenuItems = function () {
|
|
60
|
+
return jsx(TopNavBar.MenuItems, {
|
|
61
|
+
listLabel: t('Page navigation'),
|
|
62
|
+
currentPageId: window.location.pathname,
|
|
63
|
+
renderHiddenItemsMenuTriggerLabel: _this.hiddenMenuItemsMenuTriggerLabel
|
|
64
|
+
}, _this.props.menuItems.map(function (menuItem) {
|
|
65
|
+
return _this.renderMenuItem(menuItem);
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
_this.renderMenuItem = function (menuItem) {
|
|
70
|
+
return jsx(TopNavBar.Item, {
|
|
71
|
+
id: menuItem.path,
|
|
72
|
+
key: menuItem.path,
|
|
73
|
+
onClick: function onClick() {
|
|
74
|
+
return _this.props.handleMenuItemChange(menuItem.path);
|
|
75
|
+
} // eslint-disable-line react/jsx-no-bind
|
|
76
|
+
|
|
77
|
+
}, menuItem.text);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
_this.renderActionItems = function () {
|
|
81
|
+
return jsx(TopNavBar.ActionItems, {
|
|
82
|
+
listLabel: t('Actions'),
|
|
83
|
+
renderHiddenItemsMenuTriggerLabel: _this.hiddenActionItemsMenuTriggerLabel
|
|
84
|
+
}, _toConsumableArray(_this.props.actionItems));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return _this;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
_createClass(NavBar, [{
|
|
91
|
+
key: "render",
|
|
92
|
+
value: function render() {
|
|
93
|
+
var _this2 = this;
|
|
94
|
+
|
|
95
|
+
return jsx(TopNavBar, {
|
|
96
|
+
breakpoint: this.props.styles.phoneBreakPoint,
|
|
97
|
+
mediaQueryMatch: "element",
|
|
98
|
+
inverseColor: true
|
|
99
|
+
}, function () {
|
|
100
|
+
return jsx(TopNavBar.Layout, {
|
|
101
|
+
themeOverride: {
|
|
102
|
+
desktopBackgroundInverse: _this2.props.styles.backgroundColor,
|
|
103
|
+
smallViewportBackgroundInverse: _this2.props.styles.backgroundColor
|
|
104
|
+
},
|
|
105
|
+
navLabel: t('Quizzes navigation bar'),
|
|
106
|
+
desktopConfig: {
|
|
107
|
+
hideActionsUserSeparator: true
|
|
108
|
+
},
|
|
109
|
+
smallViewportConfig: {
|
|
110
|
+
dropdownMenuToggleButtonLabel: t('Toggle Menu'),
|
|
111
|
+
dropdownMenuLabel: t('Main Menu')
|
|
112
|
+
},
|
|
113
|
+
renderBrand: _this2.renderBrand(),
|
|
114
|
+
renderMenuItems: _this2.renderMenuItems(),
|
|
115
|
+
renderActionItems: _this2.renderActionItems()
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}]);
|
|
120
|
+
|
|
121
|
+
NavBar.displayName = "NavBar";
|
|
122
|
+
return NavBar;
|
|
123
|
+
}(Component), _class2.propTypes = {
|
|
124
|
+
menuItems: PropTypes.arrayOf(PropTypes.shape({
|
|
125
|
+
path: PropTypes.string.isRequired,
|
|
126
|
+
text: PropTypes.string.isRequired
|
|
127
|
+
})),
|
|
128
|
+
handleMenuItemChange: PropTypes.func,
|
|
129
|
+
actionItems: PropTypes.arrayOf(PropTypes.node),
|
|
130
|
+
styles: PropTypes.object
|
|
131
|
+
}, _class2.defaultProps = {
|
|
132
|
+
menuItems: [],
|
|
133
|
+
handleMenuItemChange: function handleMenuItemChange() {},
|
|
134
|
+
actionItems: []
|
|
135
|
+
}, _temp)) || _class);
|
|
39
136
|
export default NavBar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
+
var breakpoints = _ref.breakpoints,
|
|
3
|
+
colors = _ref.colors;
|
|
4
|
+
return {
|
|
5
|
+
backgroundColor: colors.porcelain,
|
|
6
|
+
phoneBreakPoint: breakpoints.medium
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default generateComponentTheme;
|