@instructure/quiz-core 20.11.3-rc.8 → 20.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/es/banks/components/Bank/presenter.js +15 -7
- package/es/banks/components/BankEntry/presenter.js +5 -2
- package/es/banks/components/Banks/index.js +1 -1
- package/es/banks/components/Banks/presenter.js +0 -6
- package/es/banks/components/CreateBankModal/presenter.js +3 -1
- 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/BanksTray/presenter.js +5 -2
- 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/actions/outcomes.js +7 -1
- package/es/common/components/SDKApp/index.js +8 -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/resources/item/ItemEdit/index.js +5 -2
- package/es/common/components/resources/item/ItemEdit/presenter.js +45 -8
- 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/common/reducers/outcomes.js +6 -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 +13 -6
- package/lib/banks/components/BankEntry/presenter.js +5 -2
- package/lib/banks/components/Banks/index.js +1 -1
- package/lib/banks/components/Banks/presenter.js +0 -6
- package/lib/banks/components/CreateBankModal/presenter.js +3 -1
- 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/BanksTray/presenter.js +5 -2
- 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/actions/outcomes.js +8 -0
- package/lib/common/components/SDKApp/index.js +7 -1
- 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/resources/item/ItemEdit/index.js +5 -2
- package/lib/common/components/resources/item/ItemEdit/presenter.js +46 -8
- 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/common/reducers/outcomes.js +5 -1
- 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 +11 -11
- package/es/common/components/layout/navbar/presenter.js +0 -120
- package/lib/common/components/layout/navbar/presenter.js +0 -140
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;
|
|
@@ -5,29 +5,22 @@ 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 { View } from '@instructure/ui-view';
|
|
11
12
|
import { Alert } from '@instructure/ui-alerts';
|
|
12
13
|
import { Text } from '@instructure/ui-text';
|
|
13
|
-
import {
|
|
14
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
14
15
|
import Bank from "../../../../../../common/records/Bank.js";
|
|
15
16
|
import QuizEntry from "../../../../../../common/records/QuizEntry.js";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
template: function template(theme) {
|
|
19
|
-
return "\n\n.BXWam_cLXE{background-color:".concat(theme.quizEntryBankBackgroundColor || 'inherit', ";border:").concat(theme.quizEntryBankBorderSize || 'inherit', " dashed ").concat(theme.quizEntryBankBorderColor || 'inherit', ";cursor:pointer;margin-top:").concat(theme.quizEntryBankTopMargin || 'inherit', ";padding:").concat(theme.quizEntryBankPadding || 'inherit', "}\n\n.BXWam_dpNC,[dir=ltr] .BXWam_dpNC,[dir=rtl] .BXWam_dpNC{text-align:left}\n\n.BXWam_ekHz{margin-bottom:").concat(theme.alertWrapperMargin || 'inherit', "}");
|
|
20
|
-
},
|
|
21
|
-
'quizEntryBank': 'BXWam_cLXE',
|
|
22
|
-
'quizEntryBankText': 'BXWam_dpNC',
|
|
23
|
-
'alertWrapper': 'BXWam_ekHz'
|
|
24
|
-
};
|
|
25
|
-
import theme from "./theme.js";
|
|
17
|
+
import generateStyle from "./styles.js";
|
|
18
|
+
import generateComponentTheme from "./theme.js";
|
|
26
19
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
27
20
|
|
|
28
|
-
var _ref =
|
|
21
|
+
var _ref = jsx("br", null);
|
|
29
22
|
|
|
30
|
-
export var QuizEntryBank = (_dec =
|
|
23
|
+
export var QuizEntryBank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
31
24
|
_inherits(QuizEntryBank, _Component);
|
|
32
25
|
|
|
33
26
|
var _super = _createSuper(QuizEntryBank);
|
|
@@ -41,24 +34,24 @@ export var QuizEntryBank = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
41
34
|
_createClass(QuizEntryBank, [{
|
|
42
35
|
key: "renderSampleError",
|
|
43
36
|
value: function renderSampleError() {
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
},
|
|
37
|
+
return jsx("div", {
|
|
38
|
+
css: this.props.styles.alertWrapper
|
|
39
|
+
}, jsx(Alert, {
|
|
47
40
|
variant: "error"
|
|
48
|
-
},
|
|
41
|
+
}, jsx(Text, {
|
|
49
42
|
color: "primary"
|
|
50
|
-
},
|
|
43
|
+
}, jsx("b", null, t('Max number of bank questions exceeded! ')), t("{ number, plural,\n one {This bank contains 1 question.}\n other {This bank contains # questions.}\n } ", {
|
|
51
44
|
number: this.props.entry.itemEntryCount
|
|
52
45
|
}))));
|
|
53
46
|
}
|
|
54
47
|
}, {
|
|
55
48
|
key: "renderDeletedError",
|
|
56
49
|
value: function renderDeletedError() {
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
},
|
|
50
|
+
return jsx("div", {
|
|
51
|
+
css: this.props.styles.alertWrapper
|
|
52
|
+
}, jsx(Alert, {
|
|
60
53
|
variant: "error"
|
|
61
|
-
},
|
|
54
|
+
}, jsx(Text, {
|
|
62
55
|
color: "primary"
|
|
63
56
|
}, t('Item bank no longer exists!'))));
|
|
64
57
|
}
|
|
@@ -82,22 +75,22 @@ export var QuizEntryBank = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
82
75
|
value: function renderContent() {
|
|
83
76
|
var sampleNum = this.props.quizEntry.sampleNum;
|
|
84
77
|
if (!sampleNum) sampleNum = 0;
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
},
|
|
78
|
+
return jsx("div", {
|
|
79
|
+
css: this.props.styles.quizEntryBankText
|
|
80
|
+
}, jsx(Text, {
|
|
88
81
|
color: "primary"
|
|
89
82
|
}, t("{ number, plural,\n =0 { All questions pulled from bank: }\n one {# question pulled randomly from bank: }\n other {# questions pulled randomly from bank: }\n } ", {
|
|
90
83
|
number: sampleNum
|
|
91
|
-
}),
|
|
84
|
+
}), jsx("b", null, this.props.entry.title), _ref, t("{ number, plural,\n one {# point per question }\n other {# points per question }\n }", {
|
|
92
85
|
number: this.props.quizEntry.pointsPossible
|
|
93
86
|
})));
|
|
94
87
|
}
|
|
95
88
|
}, {
|
|
96
89
|
key: "render",
|
|
97
90
|
value: function render() {
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
},
|
|
91
|
+
return jsx("div", {
|
|
92
|
+
css: this.props.styles.quizEntryBank
|
|
93
|
+
}, jsx(View, {
|
|
101
94
|
size: "medium",
|
|
102
95
|
textAlign: "center",
|
|
103
96
|
margin: "0 auto",
|
|
@@ -110,6 +103,7 @@ export var QuizEntryBank = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
110
103
|
return QuizEntryBank;
|
|
111
104
|
}(Component), _class2.propTypes = {
|
|
112
105
|
entry: PropTypes.instanceOf(Bank).isRequired,
|
|
113
|
-
quizEntry: PropTypes.instanceOf(QuizEntry).isRequired
|
|
106
|
+
quizEntry: PropTypes.instanceOf(QuizEntry).isRequired,
|
|
107
|
+
styles: PropTypes.object
|
|
114
108
|
}, _temp)) || _class);
|
|
115
109
|
export default QuizEntryBank;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
quizEntryBank: {
|
|
4
|
+
backgroundColor: componentTheme.quizEntryBankBackgroundColor,
|
|
5
|
+
border: "".concat(componentTheme.quizEntryBankBorderSize, " dashed ").concat(componentTheme.quizEntryBankBorderColor),
|
|
6
|
+
cursor: 'pointer',
|
|
7
|
+
padding: componentTheme.quizEntryBankPadding,
|
|
8
|
+
marginTop: componentTheme.quizEntryBankTopMargin
|
|
9
|
+
},
|
|
10
|
+
quizEntryBankText: {
|
|
11
|
+
textAlign: 'left'
|
|
12
|
+
},
|
|
13
|
+
alertWrapper: {
|
|
14
|
+
marginBottom: componentTheme.alertWrapperMargin
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
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,
|
|
@@ -10,4 +10,6 @@ export default function generator(_ref) {
|
|
|
10
10
|
quizEntryBankTopMargin: spacing.small,
|
|
11
11
|
alertWrapperMargin: spacing.small
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default generateComponentTheme;
|
|
@@ -6,7 +6,8 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
6
6
|
|
|
7
7
|
var _dec, _class, _class2, _temp;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
import { Component } from 'react';
|
|
10
11
|
import PropTypes from 'prop-types';
|
|
11
12
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
12
13
|
import { View } from '@instructure/ui-view';
|
|
@@ -15,23 +16,14 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
|
15
16
|
import { Text } from '@instructure/ui-text';
|
|
16
17
|
import NumberInput from '@instructure/quiz-number-input';
|
|
17
18
|
import { IconButton } from '@instructure/ui-buttons';
|
|
18
|
-
import {
|
|
19
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
19
20
|
import { IconDiscussionLine, IconDiscussionSolid } from '@instructure/ui-icons';
|
|
20
21
|
import { interactionPoints } from '@instructure/quiz-interactions';
|
|
21
22
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
22
23
|
import EntrySave from "../../../../../../common/components/resources/entry/EntrySave/index.js";
|
|
23
24
|
import { ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK } from '@instructure/quiz-common';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
template: function template(theme) {
|
|
27
|
-
return "\n\n.kXHyM_bVuu{align-items:center;display:inline-flex;flex-wrap:nowrap}\n\n.kXHyM_fsXS,.kXHyM_djwg{align-items:center;display:flex}\n\n.kXHyM_fsXS{margin-left:".concat(theme.feedbackSectionLeftMargin || 'inherit', "}\n\n.kXHyM_duRV{display:inline-flex;font-size:").concat(theme.pointsInputFontSize || 'inherit', ";width:6.1rem}");
|
|
28
|
-
},
|
|
29
|
-
'leftFooter': 'kXHyM_bVuu',
|
|
30
|
-
'feedbackSection': 'kXHyM_fsXS',
|
|
31
|
-
'pointsSection': 'kXHyM_djwg',
|
|
32
|
-
'pointsInput': 'kXHyM_duRV'
|
|
33
|
-
};
|
|
34
|
-
import theme from "./theme.js";
|
|
25
|
+
import generateStyle from "./styles.js";
|
|
26
|
+
import generateComponentTheme from "./theme.js";
|
|
35
27
|
|
|
36
28
|
function pointsAsFloat(pointsString) {
|
|
37
29
|
return parseFloat(pointsString) || 0;
|
|
@@ -48,7 +40,7 @@ function countDecimals(normalizedPointsString) {
|
|
|
48
40
|
return decimals ? decimals.length : 0;
|
|
49
41
|
}
|
|
50
42
|
|
|
51
|
-
export var QuizEntryEditFooter = (_dec =
|
|
43
|
+
export var QuizEntryEditFooter = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
52
44
|
_inherits(QuizEntryEditFooter, _Component);
|
|
53
45
|
|
|
54
46
|
var _super = _createSuper(QuizEntryEditFooter);
|
|
@@ -162,10 +154,11 @@ export var QuizEntryEditFooter = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
162
154
|
text = t('Edit Question Level Feedback');
|
|
163
155
|
}
|
|
164
156
|
|
|
165
|
-
return
|
|
166
|
-
className:
|
|
157
|
+
return jsx("div", {
|
|
158
|
+
className: "feedbackSection",
|
|
159
|
+
css: this.props.styles.feedbackSection,
|
|
167
160
|
"data-automation": "sdk-quiz-entry-edit-footer-feedback-section"
|
|
168
|
-
},
|
|
161
|
+
}, jsx(IconButton, {
|
|
169
162
|
onClick: this.openFeedbackModal,
|
|
170
163
|
withBackground: false,
|
|
171
164
|
withBorder: false,
|
|
@@ -179,28 +172,28 @@ export var QuizEntryEditFooter = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
179
172
|
}, {
|
|
180
173
|
key: "renderPointsSection",
|
|
181
174
|
value: function renderPointsSection() {
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
renderLabel:
|
|
175
|
+
return jsx("div", {
|
|
176
|
+
css: this.props.styles.pointsSection
|
|
177
|
+
}, jsx("span", {
|
|
178
|
+
css: this.props.styles.pointsInput
|
|
179
|
+
}, jsx(NumberInput, {
|
|
180
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Points Possible Input')),
|
|
188
181
|
onChange: this.handlePointsChange,
|
|
189
182
|
onBlur: this.handlePointsBlur,
|
|
190
183
|
value: this.state.points,
|
|
191
184
|
disabled: this.pointsDisabled(),
|
|
192
185
|
"data-automation": "sdk-points-possible-numberinput"
|
|
193
|
-
})),
|
|
186
|
+
})), jsx(View, {
|
|
194
187
|
margin: "none none none x-small"
|
|
195
|
-
},
|
|
188
|
+
}, jsx(Text, {
|
|
196
189
|
size: "small"
|
|
197
190
|
}, t('Points'))));
|
|
198
191
|
}
|
|
199
192
|
}, {
|
|
200
193
|
key: "renderLeftFooter",
|
|
201
194
|
value: function renderLeftFooter() {
|
|
202
|
-
return
|
|
203
|
-
|
|
195
|
+
return jsx("div", {
|
|
196
|
+
css: this.props.styles.leftFooter
|
|
204
197
|
}, this.renderPointsSection(), this.renderFeedbackSection());
|
|
205
198
|
}
|
|
206
199
|
}, {
|
|
@@ -210,7 +203,7 @@ export var QuizEntryEditFooter = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
210
203
|
return this.props.alternativeRightFooter();
|
|
211
204
|
}
|
|
212
205
|
|
|
213
|
-
return
|
|
206
|
+
return jsx(EntrySave, {
|
|
214
207
|
clearChanges: this.props.clearChanges,
|
|
215
208
|
disableSubmit: this.props.disableSubmit,
|
|
216
209
|
displayPosition: this.props.displayPosition,
|
|
@@ -224,17 +217,17 @@ export var QuizEntryEditFooter = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
224
217
|
}, {
|
|
225
218
|
key: "render",
|
|
226
219
|
value: function render() {
|
|
227
|
-
return
|
|
220
|
+
return jsx(View, {
|
|
228
221
|
as: "div",
|
|
229
222
|
background: "secondary",
|
|
230
223
|
padding: "xx-small none"
|
|
231
|
-
},
|
|
224
|
+
}, jsx(Flex, {
|
|
232
225
|
wrap: "wrap",
|
|
233
226
|
justifyItems: "space-between",
|
|
234
227
|
alignItems: "center"
|
|
235
|
-
},
|
|
228
|
+
}, jsx(Flex.Item, {
|
|
236
229
|
padding: "xx-small small"
|
|
237
|
-
}, this.renderLeftFooter()),
|
|
230
|
+
}, this.renderLeftFooter()), jsx(Flex.Item, {
|
|
238
231
|
padding: "xx-small small"
|
|
239
232
|
}, this.renderRightFooter())));
|
|
240
233
|
}
|
|
@@ -260,7 +253,8 @@ export var QuizEntryEditFooter = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
260
253
|
workingEntry: ImmutablePropTypes.record.isRequired,
|
|
261
254
|
// This prop is flagged as unused, but it is actually used
|
|
262
255
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
263
|
-
workingQuizEntry: ImmutablePropTypes.record.isRequired
|
|
256
|
+
workingQuizEntry: ImmutablePropTypes.record.isRequired,
|
|
257
|
+
styles: PropTypes.object
|
|
264
258
|
}, _class2.defaultProps = {
|
|
265
259
|
alternativeRightFooter: null,
|
|
266
260
|
disableSubmit: false,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
4
|
+
var sectionStyle = {
|
|
5
|
+
display: 'flex',
|
|
6
|
+
alignItems: 'center'
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
leftFooter: {
|
|
10
|
+
display: 'inline-flex',
|
|
11
|
+
flexWrap: 'nowrap',
|
|
12
|
+
alignItems: 'center'
|
|
13
|
+
},
|
|
14
|
+
pointsSection: sectionStyle,
|
|
15
|
+
feedbackSection: _objectSpread(_objectSpread({}, sectionStyle), {}, {
|
|
16
|
+
marginLeft: componentTheme.feedbackSectionLeftMarg
|
|
17
|
+
}),
|
|
18
|
+
pointsInput: {
|
|
19
|
+
width: '6.1rem',
|
|
20
|
+
|
|
21
|
+
/* wide enough to fit 3 decimal places (i.e. 8.888) */
|
|
22
|
+
fontSize: componentTheme.pointsInputFontSize,
|
|
23
|
+
display: 'inline-flex'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
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
|
feedbackSectionLeftMargin: spacing.xSmall,
|
|
8
8
|
pointsInputFontSize: typography.fontSizeMedium
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default generateComponentTheme;
|