@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
@@ -6,37 +5,24 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
6
5
|
|
|
7
6
|
var _dec, _class, _class2, _temp;
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import { DragSource } from 'react-dnd';
|
|
12
12
|
import { List, Map } from 'immutable';
|
|
13
|
-
import classnames from 'classnames';
|
|
14
13
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
15
|
-
import {
|
|
14
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
16
15
|
import AddContentPopover from "../../quiz/AddContent/Popover/index.js";
|
|
17
16
|
import StimulusEdit from "../StimulusEdit/index.js";
|
|
18
17
|
import StimulusShow from "../StimulusShow/index.js";
|
|
19
18
|
import DragAndDropZone from "../../../shared/drag_and_drop/DragAndDropZone/index.js";
|
|
20
19
|
import { ItemTypes, dragSource, collectDrag } from "../../../../../common/components/shared/drag_and_drop/dragAndDropUtils.js";
|
|
21
|
-
import
|
|
22
|
-
import { DELETE_STIMULUS_DATA
|
|
20
|
+
import wrapWithOutsideClickEmotion from "../../../shared/functionality/componentWithOutsideClickEmotion.js";
|
|
21
|
+
import { DELETE_STIMULUS_DATA } from '@instructure/quiz-common';
|
|
23
22
|
import ConnectedQuizEntry from "../../../../../building/components/resources/quizEntry/QuizEntry/index.js";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return "\n\n.fEUId_dRGY{display:flex}\n\n.fEUId_cZDz{border-right:".concat(theme.leftPanelBorderWidth || 'inherit', " solid ").concat(theme.leftPanelBorderColor || 'inherit', "}\n\n.fEUId_cZDz,.fEUId_AmHx{box-sizing:border-box;max-height:105vh;overflow:auto}\n\n.fEUId_AmHx{margin-left:calc(").concat(theme.rightPanelPadding || 'inherit', "*-1);padding-left:").concat(theme.rightPanelPadding || 'inherit', "}\n\n.fEUId_duqv{display:none}\n\n.fEUId_ehcZ{transform:translateZ(0)}\n\n.fEUId_fPOQ{background-color:transparent;border:none;color:inherit;cursor:move;font-size:").concat(theme.dragAndDropHandleFontSize || 'inherit', ";height:0;margin:").concat(theme.dragAndDropHandleMargin || 'inherit', ";margin-top:0;position:relative;z-index:").concat(theme.dragAndDropHandleZIndex || 'inherit', "}\n\n.fEUId_eLmg{width:100%}\n\n.fEUId_dORw{width:50%}\n\n@media print{.fEUId_cZDz,.fEUId_AmHx{max-height:none}}");
|
|
28
|
-
},
|
|
29
|
-
'stimulus': 'fEUId_dRGY',
|
|
30
|
-
'leftPanel': 'fEUId_cZDz',
|
|
31
|
-
'rightPanel': 'fEUId_AmHx',
|
|
32
|
-
'hidden': 'fEUId_duqv',
|
|
33
|
-
'stimulusWrapper': 'fEUId_ehcZ',
|
|
34
|
-
'dragAndDropHandle': 'fEUId_fPOQ',
|
|
35
|
-
'quizEntryWrapper': 'fEUId_eLmg',
|
|
36
|
-
'horizontallyAligned': 'fEUId_dORw'
|
|
37
|
-
};
|
|
38
|
-
import theme from "./theme.js";
|
|
39
|
-
export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
23
|
+
import generateStyle from "./styles.js";
|
|
24
|
+
import generateComponentTheme from "./theme.js";
|
|
25
|
+
export var Stimulus = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
40
26
|
_inherits(Stimulus, _Component);
|
|
41
27
|
|
|
42
28
|
var _super = _createSuper(Stimulus);
|
|
@@ -68,6 +54,16 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
68
54
|
}
|
|
69
55
|
|
|
70
56
|
_createClass(Stimulus, [{
|
|
57
|
+
key: "componentDidMount",
|
|
58
|
+
value: function componentDidMount() {
|
|
59
|
+
this.props.makeStyles();
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "componentDidUpdate",
|
|
63
|
+
value: function componentDidUpdate() {
|
|
64
|
+
this.props.makeStyles();
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
71
67
|
key: "shouldDisableDragHandle",
|
|
72
68
|
value: function shouldDisableDragHandle() {
|
|
73
69
|
var _this$props = this.props,
|
|
@@ -92,12 +88,12 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
92
88
|
return this.props.childEntries.toArray().map(function (childEntry, idx) {
|
|
93
89
|
var displayPosition = nextDisplayPosition;
|
|
94
90
|
nextDisplayPosition += childEntry.displayPositionSlots;
|
|
95
|
-
return
|
|
96
|
-
|
|
91
|
+
return jsx("div", {
|
|
92
|
+
css: _this2.props.styles.quizEntryWrapper,
|
|
97
93
|
key: childEntry.id
|
|
98
|
-
},
|
|
94
|
+
}, jsx(ConnectedQuizEntry, Object.assign({}, _this2.props.propsForQuizEntry(childEntry, displayPosition), {
|
|
99
95
|
stimulusOrientation: _this2.props.stimulusOrientationEnabled ? _this2.props.stimulus.orientation : null
|
|
100
|
-
})), !_this2.props.draggingOnBuild && !_this2.isQuizContentLocked() &&
|
|
96
|
+
})), !_this2.props.draggingOnBuild && !_this2.isQuizContentLocked() && jsx(AddContentPopover, {
|
|
101
97
|
allowStimulusCreation: false,
|
|
102
98
|
stimulusId: _this2.props.stimulus.id,
|
|
103
99
|
parentEntryId: _this2.props.quizEntry.id,
|
|
@@ -112,9 +108,9 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
112
108
|
value: function renderStimulusPanel() {
|
|
113
109
|
var StimulusComponent = this.props.isEditing ? StimulusEdit : StimulusShow;
|
|
114
110
|
var connectDragPreview = this.props.connectDragPreview;
|
|
115
|
-
return connectDragPreview(
|
|
111
|
+
return connectDragPreview(jsx("div", {
|
|
116
112
|
"data-automation": "sdk-stimulus-LeftPanelShow"
|
|
117
|
-
},
|
|
113
|
+
}, jsx(StimulusComponent, {
|
|
118
114
|
bankEntryWarningWrapperProps: this.props.bankEntryWarningWrapperProps,
|
|
119
115
|
connectDragSource: this.props.connectDragSource,
|
|
120
116
|
displayPosition: this.props.displayPosition,
|
|
@@ -138,25 +134,17 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
138
134
|
}, {
|
|
139
135
|
key: "renderPanels",
|
|
140
136
|
value: function renderPanels(propsForDnDZone) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var _this$props3 = this.props,
|
|
144
|
-
stimulus = _this$props3.stimulus,
|
|
145
|
-
stimulusOrientationEnabled = _this$props3.stimulusOrientationEnabled;
|
|
146
|
-
var shouldSetHorizontalOrientation = stimulus.orientation === LEFT || !stimulusOrientationEnabled;
|
|
147
|
-
var stimulusPanelClass = classnames(styles.leftPanel, _defineProperty({}, styles.horizontallyAligned, shouldSetHorizontalOrientation));
|
|
148
|
-
var itemsPanelClass = classnames((_classnames2 = {}, _defineProperty(_classnames2, styles.horizontallyAligned, shouldSetHorizontalOrientation), _defineProperty(_classnames2, styles.hidden, stimulus.isTemporary()), _defineProperty(_classnames2, styles.rightPanel, !stimulus.isTemporary()), _classnames2));
|
|
149
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
150
|
-
className: classnames(_defineProperty({}, styles.stimulus, shouldSetHorizontalOrientation)),
|
|
137
|
+
return jsx("div", {
|
|
138
|
+
css: this.props.styles.stimulus,
|
|
151
139
|
ref: this.props.dndRef,
|
|
152
140
|
"data-automation": "sdk-stimulus"
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
}, this.renderStimulusPanel()),
|
|
156
|
-
|
|
157
|
-
},
|
|
141
|
+
}, jsx("div", {
|
|
142
|
+
css: this.props.styles.leftPanel
|
|
143
|
+
}, this.renderStimulusPanel()), jsx("div", {
|
|
144
|
+
css: this.props.styles.itemPanel
|
|
145
|
+
}, jsx("div", null), this.renderChildQuizEntries(), jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
158
146
|
location: "in"
|
|
159
|
-
})), this.props.childEntries.size === 0 && !this.isQuizContentLocked() &&
|
|
147
|
+
})), this.props.childEntries.size === 0 && !this.isQuizContentLocked() && jsx(AddContentPopover, {
|
|
160
148
|
allowStimulusCreation: false,
|
|
161
149
|
stimulusId: this.props.stimulus.id,
|
|
162
150
|
parentEntryId: this.props.quizEntry.id,
|
|
@@ -174,13 +162,13 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
174
162
|
draggingAboveHalf: this.props.draggingAboveHalf,
|
|
175
163
|
dropIntoEmptyStimulus: this.props.dropIntoEmptyStimulus
|
|
176
164
|
};
|
|
177
|
-
return
|
|
165
|
+
return jsx("div", {
|
|
178
166
|
tabIndex: "-1"
|
|
179
|
-
},
|
|
167
|
+
}, jsx("div", null, jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
180
168
|
location: "above"
|
|
181
|
-
})), this.renderPanels(propsForDnDZone),
|
|
169
|
+
})), this.renderPanels(propsForDnDZone), jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
182
170
|
location: "below"
|
|
183
|
-
})));
|
|
171
|
+
}))));
|
|
184
172
|
}
|
|
185
173
|
}]);
|
|
186
174
|
|
|
@@ -215,7 +203,9 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
215
203
|
switchOffEditing: PropTypes.func.isRequired,
|
|
216
204
|
onEditStimulusToggle: PropTypes.func.isRequired,
|
|
217
205
|
editStimulusToggle: PropTypes.bool.isRequired,
|
|
218
|
-
stimulusOrientationEnabled: PropTypes.bool.isRequired
|
|
206
|
+
stimulusOrientationEnabled: PropTypes.bool.isRequired,
|
|
207
|
+
makeStyles: PropTypes.func,
|
|
208
|
+
styles: PropTypes.object
|
|
219
209
|
}, _class2.defaultProps = {
|
|
220
210
|
bankEntryWarningWrapperProps: function bankEntryWarningWrapperProps() {},
|
|
221
211
|
childEntries: List([]),
|
|
@@ -231,4 +221,4 @@ export var Stimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
231
221
|
scrollKey: '',
|
|
232
222
|
isContentLockedByBlueprint: false
|
|
233
223
|
}, _temp)) || _class);
|
|
234
|
-
export default DragSource(ItemTypes.QUIZ_ENTRY, dragSource, collectDrag)(
|
|
224
|
+
export default DragSource(ItemTypes.QUIZ_ENTRY, dragSource, collectDrag)(wrapWithOutsideClickEmotion(Stimulus));
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import { LEFT } from '@instructure/quiz-common';
|
|
4
|
+
|
|
5
|
+
var generateStyle = function generateStyle(componentTheme, props) {
|
|
6
|
+
var mp = '@media print';
|
|
7
|
+
var shouldSetHorizontalOrientation = props.stimulus.orientation === LEFT || !props.stimulusOrientationEnabled;
|
|
8
|
+
return {
|
|
9
|
+
stimulus: _objectSpread({}, shouldSetHorizontalOrientation && {
|
|
10
|
+
display: 'flex'
|
|
11
|
+
}),
|
|
12
|
+
leftPanel: _objectSpread(_objectSpread({
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
maxHeight: '105vh',
|
|
15
|
+
overflow: 'auto',
|
|
16
|
+
borderRight: "".concat(componentTheme.leftPanelBorderWidth, " solid ").concat(componentTheme.leftPanelBorderColor)
|
|
17
|
+
}, shouldSetHorizontalOrientation && {
|
|
18
|
+
width: '50%'
|
|
19
|
+
}), {}, _defineProperty({}, mp, {
|
|
20
|
+
maxHeight: 'none'
|
|
21
|
+
})),
|
|
22
|
+
itemPanel: _objectSpread(_objectSpread(_objectSpread({}, shouldSetHorizontalOrientation && {
|
|
23
|
+
width: '50%'
|
|
24
|
+
}), props.stimulus.isTemporary() && {
|
|
25
|
+
display: 'none'
|
|
26
|
+
}), !props.stimulus.isTemporary() && _defineProperty({
|
|
27
|
+
boxSizing: 'border-box',
|
|
28
|
+
maxHeight: '105vh',
|
|
29
|
+
overflow: 'auto',
|
|
30
|
+
paddingLeft: componentTheme.rightPanelPadding,
|
|
31
|
+
marginLeft: "calc(".concat(componentTheme.rightPanelPadding, " * -1)")
|
|
32
|
+
}, mp, {
|
|
33
|
+
maxHeight: 'none'
|
|
34
|
+
})),
|
|
35
|
+
stimulusWrapper: {
|
|
36
|
+
transform: 'translate3d(0, 0, 0)'
|
|
37
|
+
/* for drag and drop preview to work */
|
|
38
|
+
|
|
39
|
+
},
|
|
40
|
+
dragAndDropHandle: {
|
|
41
|
+
cursor: 'move',
|
|
42
|
+
height: '0',
|
|
43
|
+
zIndex: componentTheme.dragAndDropHandleZIndex,
|
|
44
|
+
backgroundColor: 'transparent',
|
|
45
|
+
border: 'none',
|
|
46
|
+
color: 'inherit',
|
|
47
|
+
fontSize: componentTheme.dragAndDropHandleFontSize,
|
|
48
|
+
margin: componentTheme.dragAndDropHandleMargin,
|
|
49
|
+
marginTop: '0',
|
|
50
|
+
position: 'relative'
|
|
51
|
+
},
|
|
52
|
+
quizEntryWrapper: {
|
|
53
|
+
width: '100%'
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
typography = _ref.typography,
|
|
4
4
|
colors = _ref.colors,
|
|
@@ -12,4 +12,6 @@ export default function generator(_ref) {
|
|
|
12
12
|
dragAndDropHandleFontSize: typography.fontSizeMedium,
|
|
13
13
|
dragAndDropHandleMargin: spacing.xSmall
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default generateComponentTheme;
|
|
@@ -7,14 +7,15 @@ 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 ImmutablePropTypes from 'react-immutable-proptypes';
|
|
13
14
|
import first from 'lodash/first';
|
|
14
15
|
import partial from 'lodash/partial';
|
|
15
16
|
import { Button } from '@instructure/ui-buttons';
|
|
16
17
|
import { ToggleDetails } from '@instructure/ui-toggle-details';
|
|
17
|
-
import {
|
|
18
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
18
19
|
import { FILE_UPLOAD_SUCCESS, SHOULD_CLONE_ITEM, DELETED_QUIZ_ENTRY } from '@instructure/quiz-common';
|
|
19
20
|
import { propsForStimulusVersioningWrapper, propsForBankEntryVersioningWrapper } from "../../../../util/warningHelpers.js";
|
|
20
21
|
import AddToBankModal from "../../../../../banks/components/AddToBankModal/index.js";
|
|
@@ -24,25 +25,12 @@ import CustomPropTypes from "../../../../../common/util/CustomPropTypes.js";
|
|
|
24
25
|
import elementsForSelectors from "../../../../../common/util/ElementsForSelectors.js";
|
|
25
26
|
import StimulusShowInfo from "../StimulusShowInfo/index.js";
|
|
26
27
|
import StimulusEditInfo from "../StimulusEditInfo/index.js";
|
|
27
|
-
import
|
|
28
|
+
import wrapWithOutsideClickEmotion from "../../../shared/functionality/componentWithOutsideClickEmotion.js";
|
|
28
29
|
import ActionButtons from "../../../../../building/components/resources/ActionButtons/index.js";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
template: function template(theme) {
|
|
32
|
-
return "\n\n.eCUGW_dRGY{padding-bottom:".concat(theme.stimulusPadding || 'inherit', ";padding-top:").concat(theme.stimulusPadding || 'inherit', "}\n\n.eCUGW_cjWK{display:flex;justify-content:flex-end}\n\n.eCUGW_nqth{padding-left:").concat(theme.buttonWrapperPadding || 'inherit', "}\n\n.eCUGW_fsuY{align-items:center;display:flex;height:1rem;justify-content:space-between;padding-left:").concat(theme.headerPadding || 'inherit', ";padding-right:").concat(theme.headerPadding || 'inherit', "}\n\n.eCUGW_dMwa{height:100%;padding:").concat(theme.stimulusContentPadding || 'inherit', "}\n\n.eCUGW_ffXB{color:").concat(theme.stimulusLabelColor || 'inherit', ";font-size:").concat(theme.stimulusLabelFontSize || 'inherit', "}\n\n.eCUGW_fjJt{color:").concat(theme.stimulusButtonsColor || 'inherit', ";display:inline-flex;flex:0 0 auto;text-align:right;z-index:").concat(theme.stimulusButtonsZIndex || 'inherit', "}\n\n[dir=ltr] .eCUGW_fjJt,[dir=rtl] .eCUGW_fjJt{text-align:right}\n\n.eCUGW_fjJt button{background-color:transparent;background-color:initial}\n\n.eCUGW_fBJf{padding-top:").concat(theme.optionPadding || 'inherit', "}");
|
|
33
|
-
},
|
|
34
|
-
'stimulus': 'eCUGW_dRGY',
|
|
35
|
-
'footer': 'eCUGW_cjWK',
|
|
36
|
-
'buttonWrapper': 'eCUGW_nqth',
|
|
37
|
-
'header': 'eCUGW_fsuY',
|
|
38
|
-
'stimulusContent': 'eCUGW_dMwa',
|
|
39
|
-
'stimulusLabel': 'eCUGW_ffXB',
|
|
40
|
-
'stimulusButtons': 'eCUGW_fjJt',
|
|
41
|
-
'optionWrapper': 'eCUGW_fBJf'
|
|
42
|
-
};
|
|
43
|
-
import theme from "./theme.js";
|
|
30
|
+
import generateStyle from "./styles.js";
|
|
31
|
+
import generateComponentTheme from "./theme.js";
|
|
44
32
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
45
|
-
export var StimulusEdit = (_dec =
|
|
33
|
+
export var StimulusEdit = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
46
34
|
_inherits(StimulusEdit, _Component);
|
|
47
35
|
|
|
48
36
|
var _super = _createSuper(StimulusEdit);
|
|
@@ -371,7 +359,7 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
371
359
|
}, {
|
|
372
360
|
key: "renderAddToBankModal",
|
|
373
361
|
value: function renderAddToBankModal() {
|
|
374
|
-
return
|
|
362
|
+
return jsx(AddToBankModal, {
|
|
375
363
|
label: t('Add to an Item Bank'),
|
|
376
364
|
onAdd: this.handleAddToBank,
|
|
377
365
|
onContinue: this.handleAddToBankContinue,
|
|
@@ -384,13 +372,13 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
384
372
|
}, {
|
|
385
373
|
key: "renderAddToBankOptions",
|
|
386
374
|
value: function renderAddToBankOptions() {
|
|
387
|
-
return
|
|
375
|
+
return jsx("div", null, jsx(ToggleDetails, {
|
|
388
376
|
variant: "filled",
|
|
389
377
|
key: "itemBanking",
|
|
390
378
|
summary: t('Item Banking')
|
|
391
|
-
},
|
|
392
|
-
|
|
393
|
-
},
|
|
379
|
+
}, jsx("div", {
|
|
380
|
+
css: this.props.styles.optionWrapper
|
|
381
|
+
}, jsx(AddToBankOptions, {
|
|
394
382
|
displayPosition: this.props.displayPosition,
|
|
395
383
|
entryType: this.props.quizEntry.entryType,
|
|
396
384
|
guid: this.props.guid,
|
|
@@ -403,13 +391,13 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
403
391
|
}, {
|
|
404
392
|
key: "renderStimulusEdit",
|
|
405
393
|
value: function renderStimulusEdit() {
|
|
406
|
-
return
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
}, t('Stimulus')),
|
|
394
|
+
return jsx("div", null, jsx("div", {
|
|
395
|
+
css: this.props.styles.stimulus
|
|
396
|
+
}, jsx("div", {
|
|
397
|
+
css: this.props.styles.header
|
|
398
|
+
}, jsx("div", {
|
|
399
|
+
css: this.props.styles.stimulusLabel
|
|
400
|
+
}, t('Stimulus')), jsx(ActionButtons, {
|
|
413
401
|
connectDragSource: this.props.connectDragSource,
|
|
414
402
|
displayPosition: this.props.displayPosition,
|
|
415
403
|
onDelete: this.handleDeleteStimulus,
|
|
@@ -418,25 +406,27 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
418
406
|
shouldDisableDragHandle: true,
|
|
419
407
|
shouldRenderEdit: false,
|
|
420
408
|
shouldFocusOnMount: this.props.shouldFocusOnMount
|
|
421
|
-
})),
|
|
422
|
-
|
|
423
|
-
},
|
|
409
|
+
})), jsx("div", {
|
|
410
|
+
css: this.props.styles.stimulusContent
|
|
411
|
+
}, jsx(StimulusEditInfo, {
|
|
424
412
|
errorsShowing: this.props.errorsShowing,
|
|
425
413
|
guid: this.props.guid,
|
|
426
414
|
stimulus: this.props.stimulus,
|
|
427
415
|
isBankedContent: this.props.isBankedContent,
|
|
428
416
|
setTitleRef: this.setTitleRef
|
|
429
|
-
}), this.renderAddToBankOptions())),
|
|
430
|
-
className:
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
417
|
+
}), this.renderAddToBankOptions())), jsx("div", {
|
|
418
|
+
className: "footer",
|
|
419
|
+
css: this.props.styles.footer
|
|
420
|
+
}, jsx("div", {
|
|
421
|
+
css: this.props.styles.buttonWrapper
|
|
422
|
+
}, jsx(Button, {
|
|
434
423
|
type: "button",
|
|
435
424
|
onClick: this.onCancel,
|
|
436
425
|
"data-automation": "sdk-stimulus-discardButton"
|
|
437
|
-
}, t('Cancel'))),
|
|
438
|
-
className:
|
|
439
|
-
|
|
426
|
+
}, t('Cancel'))), jsx("div", {
|
|
427
|
+
className: "submitButtonWrapper",
|
|
428
|
+
css: this.props.styles.buttonWrapper
|
|
429
|
+
}, jsx(Button, {
|
|
440
430
|
type: "button",
|
|
441
431
|
color: "primary",
|
|
442
432
|
disabled: !this.state.canSubmit,
|
|
@@ -449,7 +439,7 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
449
439
|
this.stimulusEditInfoRef = null;
|
|
450
440
|
|
|
451
441
|
if (this.props.isBankedContent) {
|
|
452
|
-
return
|
|
442
|
+
return jsx(WarningWrapper, this.props.bankEntryWarningWrapperProps(), jsx(StimulusShowInfo, this.props));
|
|
453
443
|
}
|
|
454
444
|
|
|
455
445
|
var _this$props4 = this.props,
|
|
@@ -459,7 +449,7 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
459
449
|
var propForWrapperFunc = quizEntry.isArchivedBankEntry ? propsForBankEntryVersioningWrapper : propsForStimulusVersioningWrapper;
|
|
460
450
|
var propsForStimulusVersioning = propForWrapperFunc(needsWarning, this.props.shouldClone, partial(this.props.setUi, SHOULD_CLONE_ITEM), this.props.switchOffEditing, true, quizEntry.isArchivedBankEntry ? 'info' : 'warning');
|
|
461
451
|
var hasWarningWrapper = needsWarning && !this.props.shouldClone;
|
|
462
|
-
return
|
|
452
|
+
return jsx(WarningWrapper, propsForStimulusVersioning, hasWarningWrapper ? jsx(StimulusShowInfo, this.props) : this.renderStimulusEdit());
|
|
463
453
|
}
|
|
464
454
|
}]);
|
|
465
455
|
|
|
@@ -504,11 +494,12 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
504
494
|
workingQuizEntry: ImmutablePropTypes.record.isRequired,
|
|
505
495
|
workingStimulus: ImmutablePropTypes.record.isRequired,
|
|
506
496
|
onEditToggle: PropTypes.func.isRequired,
|
|
507
|
-
shouldFocusOnMount: PropTypes.bool.isRequired
|
|
497
|
+
shouldFocusOnMount: PropTypes.bool.isRequired,
|
|
498
|
+
styles: PropTypes.object
|
|
508
499
|
}, _class2.defaultProps = {
|
|
509
500
|
bankEntryWarningWrapperProps: function bankEntryWarningWrapperProps() {},
|
|
510
501
|
errorsShowing: false,
|
|
511
502
|
isBankedContent: false,
|
|
512
503
|
nextQuizEntry: null
|
|
513
504
|
}, _temp)) || _class);
|
|
514
|
-
export default
|
|
505
|
+
export default wrapWithOutsideClickEmotion(StimulusEdit);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
stimulus: {
|
|
4
|
+
paddingTop: componentTheme.stimulusPadding,
|
|
5
|
+
paddingBottom: componentTheme.stimulusPadding
|
|
6
|
+
},
|
|
7
|
+
footer: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
justifyContent: 'flex-end'
|
|
10
|
+
},
|
|
11
|
+
buttonWrapper: {
|
|
12
|
+
paddingLeft: componentTheme.buttonWrapperPadding
|
|
13
|
+
},
|
|
14
|
+
header: {
|
|
15
|
+
height: '1rem',
|
|
16
|
+
paddingLeft: componentTheme.headerPadding,
|
|
17
|
+
paddingRight: componentTheme.headerPadding,
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'space-between'
|
|
21
|
+
},
|
|
22
|
+
stimulusContent: {
|
|
23
|
+
height: '100%',
|
|
24
|
+
padding: componentTheme.stimulusContentPadding
|
|
25
|
+
},
|
|
26
|
+
stimulusLabel: {
|
|
27
|
+
color: componentTheme.stimulusLabelColor,
|
|
28
|
+
fontSize: componentTheme.stimulusLabelFontSize
|
|
29
|
+
},
|
|
30
|
+
stimulusButtons: {
|
|
31
|
+
flex: '0 0 auto',
|
|
32
|
+
display: 'inline-flex',
|
|
33
|
+
textAlign: 'right',
|
|
34
|
+
zIndex: componentTheme.stimulusButtonsZIndex,
|
|
35
|
+
color: componentTheme.stimulusButtonsColor,
|
|
36
|
+
button: {
|
|
37
|
+
backgroundColor: 'initial'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
optionWrapper: {
|
|
41
|
+
paddingTop: componentTheme.optionPadding
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
typography = _ref.typography,
|
|
4
4
|
colors = _ref.colors;
|
|
@@ -14,4 +14,6 @@ export default function generator(_ref) {
|
|
|
14
14
|
stimulusButtonsColor: colors.oxford,
|
|
15
15
|
stimulusButtonsZIndex: '3333'
|
|
16
16
|
};
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default generateComponentTheme;
|
|
@@ -42,6 +42,7 @@ var OverlayEmotion = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
42
42
|
|
|
43
43
|
return jsx("div", {
|
|
44
44
|
role: "presentation",
|
|
45
|
+
className: "overlay",
|
|
45
46
|
css: this.props.styles.overlay,
|
|
46
47
|
onClick: this.props.onClick,
|
|
47
48
|
"data-automation": "sdk-overlay"
|
|
@@ -62,7 +63,6 @@ var OverlayEmotion = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}), jsx("div", {
|
|
65
|
-
className: "overlay",
|
|
66
66
|
css: [this.props.styles.root, wrapperStyles],
|
|
67
67
|
"data-testid": "overlay-wrapper",
|
|
68
68
|
tabIndex: tabIndex,
|
|
@@ -27,7 +27,8 @@ export var ReturnButton = /*#__PURE__*/function (_Component) {
|
|
|
27
27
|
|
|
28
28
|
if (this.props.iceTopNavBarEnabled) {
|
|
29
29
|
return /*#__PURE__*/React.createElement(SecondaryNavBarButton, {
|
|
30
|
-
id:
|
|
30
|
+
id: this.props.id,
|
|
31
|
+
key: this.props.id,
|
|
31
32
|
variant: "button",
|
|
32
33
|
"data-automation": "sdk-return-button",
|
|
33
34
|
href: this.props.returnToUrl,
|
|
@@ -49,11 +50,13 @@ export var ReturnButton = /*#__PURE__*/function (_Component) {
|
|
|
49
50
|
ReturnButton.propTypes = {
|
|
50
51
|
returnToUrl: PropTypes.string,
|
|
51
52
|
text: PropTypes.string,
|
|
53
|
+
id: PropTypes.string,
|
|
52
54
|
iceTopNavBarEnabled: PropTypes.bool
|
|
53
55
|
};
|
|
54
56
|
ReturnButton.defaultProps = {
|
|
55
57
|
returnToUrl: void 0,
|
|
56
58
|
text: t('Return'),
|
|
59
|
+
id: 'ReturnButton',
|
|
57
60
|
iceTopNavBarEnabled: false
|
|
58
61
|
};
|
|
59
62
|
export default ReturnButton;
|