@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
|
@@ -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 partial from 'lodash/partial';
|
|
14
15
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
16
|
import { CondensedButton } from '@instructure/ui-buttons';
|
|
16
17
|
import { TextInput } from '@instructure/ui-text-input';
|
|
17
|
-
import {
|
|
18
|
+
import { withStyle, jsx, Global } from '@instructure/emotion';
|
|
18
19
|
import { FillBlankInteractionType } from '@instructure/quiz-interactions';
|
|
19
20
|
import { IconBankLine } from '@instructure/ui-icons';
|
|
20
21
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -23,23 +24,12 @@ import PositionBox from "../../../../../../common/components/resources/positionB
|
|
|
23
24
|
import Item from "../../../../../../common/records/Item.js";
|
|
24
25
|
import ActionButtons from "../../../ActionButtons/index.js";
|
|
25
26
|
import { DELETED_QUIZ_ENTRY, API_INPUT_VALIDATION_ERROR, BUILD_TRAY_OPEN } from '@instructure/quiz-common';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'leftHeader': 'cCKjK_cKlw',
|
|
33
|
-
'interactionType': 'cCKjK_ecuB',
|
|
34
|
-
'dividingLine': 'cCKjK_epFc',
|
|
35
|
-
'titleHolder': 'cCKjK_dFsQ',
|
|
36
|
-
'titleInput': 'cCKjK_eGPC'
|
|
37
|
-
};
|
|
38
|
-
import theme from "./theme.js";
|
|
39
|
-
|
|
40
|
-
var _ref2 = /*#__PURE__*/React.createElement(IconBankLine, null);
|
|
41
|
-
|
|
42
|
-
var QuizEntryHeader = (_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 _ref2 = jsx(IconBankLine, null);
|
|
31
|
+
|
|
32
|
+
var QuizEntryHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
43
33
|
_inherits(QuizEntryHeader, _Component);
|
|
44
34
|
|
|
45
35
|
var _super = _createSuper(QuizEntryHeader);
|
|
@@ -239,7 +229,7 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
239
229
|
key: "renderName",
|
|
240
230
|
value: function renderName() {
|
|
241
231
|
if (this.props.quizEntry.isBank && this.props.newActiveBank) {
|
|
242
|
-
return
|
|
232
|
+
return jsx(CondensedButton, {
|
|
243
233
|
size: "small",
|
|
244
234
|
margin: "0 0 0 x-small",
|
|
245
235
|
onClick: this.handleBankClick,
|
|
@@ -247,8 +237,8 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
247
237
|
}, this.props.name);
|
|
248
238
|
}
|
|
249
239
|
|
|
250
|
-
return
|
|
251
|
-
|
|
240
|
+
return jsx("div", {
|
|
241
|
+
css: this.props.styles.interactionType,
|
|
252
242
|
"data-automation": "sdk-quiz-entry-interaction-type"
|
|
253
243
|
}, this.props.name);
|
|
254
244
|
}
|
|
@@ -268,13 +258,13 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
268
258
|
questionNumber: displayPosition,
|
|
269
259
|
interactionType: entry.getInteractionType().name
|
|
270
260
|
});
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
261
|
+
return jsx("div", {
|
|
262
|
+
css: this.props.styles.titleHolder
|
|
263
|
+
}, jsx("span", {
|
|
264
|
+
css: this.props.styles.titleInput
|
|
265
|
+
}, jsx(TextInput, {
|
|
276
266
|
ref: this.storeTitleRef,
|
|
277
|
-
renderLabel:
|
|
267
|
+
renderLabel: jsx(ScreenReaderContent, null, titleLabelText),
|
|
278
268
|
type: "text",
|
|
279
269
|
placeholder: t('Question Title'),
|
|
280
270
|
onChange: this.handleTitleChange,
|
|
@@ -290,14 +280,15 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
290
280
|
position: this.props.displayPosition
|
|
291
281
|
});
|
|
292
282
|
var position = this.props.disabledForRegrade ? this.props.displayPosition : this.props.quizEntry.positionToDisplay(this.props.displayPosition);
|
|
293
|
-
return
|
|
294
|
-
className:
|
|
295
|
-
|
|
283
|
+
return jsx("div", {
|
|
284
|
+
className: "leftHeader",
|
|
285
|
+
css: this.props.styles.leftHeader
|
|
286
|
+
}, jsx(PositionBox, {
|
|
296
287
|
position: position,
|
|
297
288
|
headingText: positionText,
|
|
298
289
|
"data-automation": "sdk-quiz-entry-positionbox"
|
|
299
|
-
}), this.renderBankedContent(), this.renderName(),
|
|
300
|
-
|
|
290
|
+
}), this.renderBankedContent(), this.renderName(), jsx("div", {
|
|
291
|
+
css: this.props.styles.dividingLine
|
|
301
292
|
}), this.renderTitleHolder());
|
|
302
293
|
}
|
|
303
294
|
}, {
|
|
@@ -316,9 +307,12 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
316
307
|
shouldDisableDeleteButton: this.props.disabledForRegrade,
|
|
317
308
|
shouldRenderEdit: false
|
|
318
309
|
};
|
|
319
|
-
return
|
|
320
|
-
className:
|
|
321
|
-
|
|
310
|
+
return jsx("div", {
|
|
311
|
+
className: "header",
|
|
312
|
+
css: this.props.styles.header
|
|
313
|
+
}, jsx(Global, {
|
|
314
|
+
styles: this.props.styles.globalStyles
|
|
315
|
+
}), this.renderLeftHeader(), jsx(ActionButtons, actionButtonProps));
|
|
322
316
|
}
|
|
323
317
|
}]);
|
|
324
318
|
|
|
@@ -360,7 +354,8 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
360
354
|
successfulSubmit: PropTypes.func.isRequired,
|
|
361
355
|
withConfirm: PropTypes.func.isRequired,
|
|
362
356
|
workingEntry: ImmutablePropTypes.record.isRequired,
|
|
363
|
-
workingQuizEntry: ImmutablePropTypes.record.isRequired
|
|
357
|
+
workingQuizEntry: ImmutablePropTypes.record.isRequired,
|
|
358
|
+
styles: PropTypes.object
|
|
364
359
|
}, _class2.defaultProps = {
|
|
365
360
|
disabledForRegrade: false,
|
|
366
361
|
initialFocusId: null,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
/* Hide left header when the RCE editor is in fullscreen mode */
|
|
4
|
+
globalStyles: {
|
|
5
|
+
'body.tox-fullscreen .leftHeader': {
|
|
6
|
+
display: 'none'
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
header: {
|
|
10
|
+
backgroundColor: componentTheme.headerBackgroundColor,
|
|
11
|
+
color: componentTheme.headerColor,
|
|
12
|
+
padding: componentTheme.headerPadding,
|
|
13
|
+
display: 'flex',
|
|
14
|
+
justifyContent: 'space-between',
|
|
15
|
+
verticalAlign: 'middle',
|
|
16
|
+
alignItems: 'center'
|
|
17
|
+
},
|
|
18
|
+
leftHeader: {
|
|
19
|
+
flex: '8 0 0',
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
flexWrap: 'nowrap',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
|
|
24
|
+
/* fix for ie11 */
|
|
25
|
+
width: '100%'
|
|
26
|
+
},
|
|
27
|
+
interactionType: {
|
|
28
|
+
fontSize: componentTheme.interactionTypeFontSize,
|
|
29
|
+
marginLeft: componentTheme.interactionTypeLeftMargin,
|
|
30
|
+
marginRight: componentTheme.interactionTypeRightMargin
|
|
31
|
+
},
|
|
32
|
+
dividingLine: {
|
|
33
|
+
width: '0',
|
|
34
|
+
borderLeft: componentTheme.dividingLineLeftBorder
|
|
35
|
+
},
|
|
36
|
+
titleHolder: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flex: '1 1 auto'
|
|
39
|
+
},
|
|
40
|
+
titleInput: {
|
|
41
|
+
flex: '1 1 auto',
|
|
42
|
+
fontSize: componentTheme.titleInputFontSize,
|
|
43
|
+
whiteSpace: 'nowrap',
|
|
44
|
+
textOverflow: 'ellipsis'
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
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;
|
|
@@ -11,4 +11,6 @@ export default function generator(_ref) {
|
|
|
11
11
|
interactionTypeRightMargin: spacing.xSmall,
|
|
12
12
|
titleInputFontSize: typography.fontSizeMedium
|
|
13
13
|
};
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default generateComponentTheme;
|
|
@@ -7,32 +7,29 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
7
7
|
|
|
8
8
|
var _dec, _class, _class2, _temp;
|
|
9
9
|
|
|
10
|
+
/* eslint-disable no-unused-vars */
|
|
11
|
+
|
|
12
|
+
/** @jsx jsx */
|
|
10
13
|
import React, { Component } from 'react';
|
|
11
14
|
import PropTypes from 'prop-types';
|
|
12
15
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
13
16
|
import { DragSource } from 'react-dnd';
|
|
14
17
|
import pick from 'lodash/pick';
|
|
15
18
|
import first from 'lodash/first';
|
|
16
|
-
import {
|
|
19
|
+
import { withStyle, jsx, Global } from '@instructure/emotion';
|
|
17
20
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
18
21
|
import CustomPropTypes from "../../../../../common/util/CustomPropTypes.js";
|
|
19
22
|
import elementsForSelectors from "../../../../../common/util/ElementsForSelectors.js";
|
|
20
23
|
import AddToBankModal from "../../../../../banks/components/AddToBankModal/index.js";
|
|
21
24
|
import DragAndDropZone from "../../../../../common/components/shared/drag_and_drop/DragAndDropZone/index.js";
|
|
22
|
-
import
|
|
25
|
+
import wrapWithOutsideClickEmotion from "../../../../../common/components/shared/functionality/componentWithOutsideClickEmotion.js";
|
|
23
26
|
import QuizEntryEditHeader from "./Header/index.js";
|
|
24
27
|
import QuizEntryEditFooter from "./Footer/index.js";
|
|
25
28
|
import { SHOULD_CLONE_ITEM, TEMPORARY_ITEM_ID, DELETED_QUIZ_ENTRY, API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, PARENT_TYPE_ADDING_TO_BANK } from '@instructure/quiz-common';
|
|
26
29
|
import { ItemTypes, dragSource, collectDrag } from "../../../../../common/components/shared/drag_and_drop/dragAndDropUtils.js";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return "\n\n.bZuQH_qRLg{font-size:".concat(theme.quizEntryEditFontSize || 'inherit', ";margin:").concat(theme.quizEntryEditMargin || 'inherit', " 0;position:relative;transform:translateZ(0);z-index:3333}\n\nbody.tox-fullscreen .bZuQH_qRLg{transform:none;z-index:6666}");
|
|
31
|
-
},
|
|
32
|
-
'quizEntryEdit': 'bZuQH_qRLg'
|
|
33
|
-
};
|
|
34
|
-
import theme from "./theme.js";
|
|
35
|
-
var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
30
|
+
import generateStyle from "./styles.js";
|
|
31
|
+
import generateComponentTheme from "./theme.js";
|
|
32
|
+
var QuizEntryEdit = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
36
33
|
_inherits(QuizEntryEdit, _Component);
|
|
37
34
|
|
|
38
35
|
var _super = _createSuper(QuizEntryEdit);
|
|
@@ -323,9 +320,9 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
323
320
|
draggingOver: draggingOver,
|
|
324
321
|
draggingAboveHalf: draggingAboveHalf
|
|
325
322
|
};
|
|
326
|
-
return
|
|
323
|
+
return jsx("div", null, jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
327
324
|
location: "above"
|
|
328
|
-
})), connectDragPreview(_this.renderForm()),
|
|
325
|
+
})), connectDragPreview(_this.renderForm()), jsx(DragAndDropZone, Object.assign({}, propsForDnDZone, {
|
|
329
326
|
location: "below"
|
|
330
327
|
})));
|
|
331
328
|
};
|
|
@@ -374,7 +371,7 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
374
371
|
var isItemOrBankEntry = this.props.quizEntry.isItem || this.props.quizEntry.isBankEntry;
|
|
375
372
|
if (!(isItemOrBankEntry || this.props.disabledForRegrade)) return;
|
|
376
373
|
var footerProps = pick(this.props, ['alternativeRightFooter', 'changeQuizEntryPoints', 'clearTemporaryItem', 'displayPosition', 'entry', 'guid', 'initialFocusId', 'openModal', 'quizEntry', 'setUi', 'shouldClone', 'workingQuizEntry']);
|
|
377
|
-
return
|
|
374
|
+
return jsx(QuizEntryEditFooter, Object.assign({
|
|
378
375
|
clearChanges: this.clearChanges,
|
|
379
376
|
isValid: this.isValid(),
|
|
380
377
|
successfulSubmit: this.successfulSubmit,
|
|
@@ -385,7 +382,7 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
385
382
|
key: "renderAddToBankModal",
|
|
386
383
|
value: function renderAddToBankModal() {
|
|
387
384
|
if (!this.props.quizEntry.isItem) return;
|
|
388
|
-
return
|
|
385
|
+
return jsx(AddToBankModal, {
|
|
389
386
|
label: t('Add to an Item Bank'),
|
|
390
387
|
onContinue: this.handleAddToBankContinue,
|
|
391
388
|
onAdd: this.handleAddToBank,
|
|
@@ -400,7 +397,7 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
400
397
|
key: "renderHeader",
|
|
401
398
|
value: function renderHeader() {
|
|
402
399
|
var headerProps = pick(this.props, ['changeItemTitle', 'clearModifications', 'clearTemporaryItem', 'connectDragSource', 'createTempItem', 'disabledForRegrade', 'displayPosition', 'entry', 'guid', 'hideError', 'initialFocusId', 'name', 'newActiveBank', 'quizEntries', 'quizEntry', 'quizId', 'removeQuizEntry', 'richFITBEnabled', 'richFITBInteractionID', 'screenreaderNotification', 'setUi', 'shouldClone', 'showError', 'withConfirm', 'workingEntry', 'workingQuizEntry']);
|
|
403
|
-
return
|
|
400
|
+
return jsx(QuizEntryEditHeader, Object.assign({
|
|
404
401
|
isValid: this.isValid(),
|
|
405
402
|
successfulSubmit: this.successfulSubmit,
|
|
406
403
|
disableSubmit: this.shouldDisableSubmit()
|
|
@@ -409,17 +406,19 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
409
406
|
}, {
|
|
410
407
|
key: "renderForm",
|
|
411
408
|
value: function renderForm() {
|
|
412
|
-
return
|
|
413
|
-
|
|
409
|
+
return jsx("div", null, jsx("div", {
|
|
410
|
+
css: this.props.styles.quizEntryEdit,
|
|
414
411
|
"data-automation": "sdk-quiz-entry-edit-div"
|
|
415
|
-
},
|
|
412
|
+
}, jsx("div", {
|
|
416
413
|
role: "form"
|
|
417
|
-
}, this.renderHeader(), this.props.children, this.renderFooter()), this.renderAddToBankModal());
|
|
414
|
+
}, this.renderHeader(), this.props.children, this.renderFooter()), this.renderAddToBankModal()));
|
|
418
415
|
}
|
|
419
416
|
}, {
|
|
420
417
|
key: "render",
|
|
421
418
|
value: function render() {
|
|
422
|
-
return
|
|
419
|
+
return jsx(React.Fragment, null, jsx(Global, {
|
|
420
|
+
styles: this.props.styles.globalStyles
|
|
421
|
+
}), this.props.disabledForRegrade ? this.renderForm() : this.renderDraggable());
|
|
423
422
|
}
|
|
424
423
|
}]);
|
|
425
424
|
|
|
@@ -493,7 +492,8 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
493
492
|
// from connected component
|
|
494
493
|
withConfirm: PropTypes.func.isRequired,
|
|
495
494
|
workingEntry: ImmutablePropTypes.record.isRequired,
|
|
496
|
-
workingQuizEntry: ImmutablePropTypes.record.isRequired
|
|
495
|
+
workingQuizEntry: ImmutablePropTypes.record.isRequired,
|
|
496
|
+
styles: PropTypes.object
|
|
497
497
|
}, _class2.defaultProps = {
|
|
498
498
|
alternativeRightFooter: null,
|
|
499
499
|
children: null,
|
|
@@ -510,5 +510,5 @@ var QuizEntryEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
510
510
|
shouldClone: false
|
|
511
511
|
}, _temp)) || _class);
|
|
512
512
|
export var UndecoratedQuizEntryEdit = QuizEntryEdit;
|
|
513
|
-
export var QuizEntryEditRaw =
|
|
513
|
+
export var QuizEntryEditRaw = wrapWithOutsideClickEmotion(QuizEntryEdit);
|
|
514
514
|
export default DragSource(ItemTypes.QUIZ_ENTRY, dragSource, collectDrag)(QuizEntryEditRaw);
|
|
@@ -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;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { SET_CONTEXT_UUID, SET_OUTCOMES_ENDPOINT, SET_OUTCOMES_TOKEN } from '@instructure/quiz-common';
|
|
1
|
+
import { SET_CONTEXT_UUID, SET_OUTCOMES_ENDPOINT, SET_OUTCOMES_TOKEN, SET_EXTERNAL_ACCOUNT_UUID } from '@instructure/quiz-common';
|
|
2
2
|
export function setContextUuid(contextUuid) {
|
|
3
3
|
return {
|
|
4
4
|
type: SET_CONTEXT_UUID,
|
|
5
5
|
payload: contextUuid
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
export function setExternalAccountUuid(externalAccountUuid) {
|
|
9
|
+
return {
|
|
10
|
+
type: SET_EXTERNAL_ACCOUNT_UUID,
|
|
11
|
+
payload: externalAccountUuid
|
|
12
|
+
};
|
|
13
|
+
}
|
|
8
14
|
export function setOutcomesEndpoint(endpoint) {
|
|
9
15
|
return {
|
|
10
16
|
type: SET_OUTCOMES_ENDPOINT,
|