@instructure/quiz-core 20.36.1-rc.3 → 20.36.1-rc.37
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/AddToBankModal/presenter.js +1 -2
- package/es/banks/components/AsyncSearch/index.js +1 -2
- package/es/banks/components/BankEntry/presenter.js +1 -2
- package/es/banks/components/BankSearch/presenter.js +1 -3
- package/es/banks/components/Banks/index.js +0 -1
- package/es/banks/components/Banks/presenter.js +5 -9
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +1 -2
- package/es/banks/components/CreateBankModal/presenter.js +1 -2
- package/es/banks/components/EditBankModal/presenter.js +1 -2
- package/es/banks/components/SharingModal/RootAccountSharing.js +1 -2
- package/es/banks/components/SharingModal/ShareList/index.js +1 -2
- package/es/banks/components/SharingModal/index.js +0 -2
- package/es/banks/components/SharingModal/presenter.js +18 -78
- package/es/building/api/stimuli.js +2 -1
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +14 -7
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +11 -4
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +1 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +40 -23
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +1 -29
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +1 -5
- package/es/common/actions/modifications.js +3 -2
- package/es/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +11 -0
- package/es/common/components/AccessCodeTextInput/index.js +47 -0
- package/es/common/components/ImportModal/presenter.js +1 -2
- package/es/common/components/MaskedTextInput/MaskedTextInput.stories.js +19 -0
- package/es/common/components/MaskedTextInput/index.js +64 -0
- package/es/common/components/layout/Page/styles.js +7 -4
- package/es/common/components/layout/Page/theme.js +1 -2
- package/es/common/components/layout/sidebar/Sidebar/index.js +26 -4
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +13 -7
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +14 -7
- package/es/common/components/resources/item/ItemEdit/presenter.js +2 -4
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +2 -2
- package/es/common/components/resources/quiz/instructions/styles.js +8 -6
- package/es/common/components/resources/quiz/instructions/theme.js +1 -2
- package/es/common/components/resources/stimulus/Stimulus/presenter.js +3 -2
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +14 -4
- package/es/common/components/resources/stimulus/StimulusEdit/styles.js +1 -5
- package/es/common/components/resources/stimulus/StimulusEdit/theme.js +0 -2
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +51 -37
- package/es/common/components/resources/stimulus/StimulusShow/index.js +10 -4
- package/es/common/components/resources/stimulus/StimulusShow/styles.js +0 -7
- package/es/common/components/resources/stimulus/StimulusShow/theme.js +0 -3
- package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +1 -2
- package/es/common/components/shared/InteractionTypes/index.js +4 -1
- package/es/common/components/shared/InteractionTypes/presenter.js +38 -15
- package/es/common/components/shared/TagSelect/presenter.js +1 -2
- package/es/common/components/shared/TimeUnitsInput/index.js +11 -9
- package/es/common/components/shared/drag_and_drop/dragAndDropUtils.js +3 -0
- package/es/common/records/QuizEntry.js +5 -0
- package/es/common/records/Stimulus.js +2 -1
- package/es/common/reducers/modifications.js +6 -3
- package/es/common/util/warningHelpers.js +15 -5
- package/es/index.js +3 -1
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +1 -1
- package/es/moderating/components/resources/ModerateTable/presenter.js +1 -2
- package/es/moderating/components/sidebar/ModerateTray/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +1 -2
- package/es/reporting/components/resources/ReportCard/index.js +1 -2
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +1 -2
- package/es/reporting/components/resources/common/AnalysisUpdateDate/index.js +1 -1
- package/es/taking/api/taking.js +4 -0
- package/lib/banks/components/AddToBankModal/presenter.js +1 -2
- package/lib/banks/components/AsyncSearch/index.js +8 -9
- package/lib/banks/components/BankEntry/presenter.js +1 -2
- package/lib/banks/components/BankSearch/presenter.js +4 -6
- package/lib/banks/components/Banks/index.js +0 -1
- package/lib/banks/components/Banks/presenter.js +9 -13
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +1 -2
- package/lib/banks/components/CreateBankModal/presenter.js +1 -2
- package/lib/banks/components/EditBankModal/presenter.js +1 -2
- package/lib/banks/components/SharingModal/RootAccountSharing.js +3 -4
- package/lib/banks/components/SharingModal/ShareList/index.js +3 -4
- package/lib/banks/components/SharingModal/index.js +0 -2
- package/lib/banks/components/SharingModal/presenter.js +20 -80
- package/lib/building/api/stimuli.js +2 -1
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +14 -7
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +11 -4
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +3 -4
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +39 -22
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +1 -29
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +1 -5
- package/lib/common/actions/modifications.js +3 -2
- package/lib/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +20 -0
- package/lib/common/components/AccessCodeTextInput/index.js +57 -0
- package/lib/common/components/ImportModal/presenter.js +1 -2
- package/lib/common/components/MaskedTextInput/MaskedTextInput.stories.js +29 -0
- package/lib/common/components/MaskedTextInput/index.js +74 -0
- package/lib/common/components/layout/Page/styles.js +7 -4
- package/lib/common/components/layout/Page/theme.js +1 -2
- package/lib/common/components/layout/sidebar/Sidebar/index.js +25 -3
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +15 -9
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +16 -9
- package/lib/common/components/resources/item/ItemEdit/presenter.js +2 -4
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +2 -2
- package/lib/common/components/resources/quiz/instructions/styles.js +8 -6
- package/lib/common/components/resources/quiz/instructions/theme.js +1 -2
- package/lib/common/components/resources/stimulus/Stimulus/presenter.js +3 -2
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +14 -4
- package/lib/common/components/resources/stimulus/StimulusEdit/styles.js +1 -5
- package/lib/common/components/resources/stimulus/StimulusEdit/theme.js +0 -2
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +56 -42
- package/lib/common/components/resources/stimulus/StimulusShow/index.js +9 -3
- package/lib/common/components/resources/stimulus/StimulusShow/styles.js +0 -7
- package/lib/common/components/resources/stimulus/StimulusShow/theme.js +0 -3
- package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +3 -4
- package/lib/common/components/shared/InteractionTypes/index.js +4 -1
- package/lib/common/components/shared/InteractionTypes/presenter.js +38 -15
- package/lib/common/components/shared/TagSelect/presenter.js +4 -5
- package/lib/common/components/shared/TimeUnitsInput/index.js +12 -10
- package/lib/common/components/shared/drag_and_drop/dragAndDropUtils.js +3 -0
- package/lib/common/records/QuizEntry.js +5 -0
- package/lib/common/records/Stimulus.js +2 -1
- package/lib/common/reducers/modifications.js +6 -3
- package/lib/common/util/warningHelpers.js +15 -5
- package/lib/index.js +22 -6
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +6 -6
- package/lib/moderating/components/resources/ModerateTable/presenter.js +3 -4
- package/lib/moderating/components/sidebar/ModerateTray/presenter.js +5 -6
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +6 -7
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +9 -9
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +2 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +5 -6
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +4 -5
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +3 -4
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +3 -4
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +8 -9
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +20 -21
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +9 -10
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +20 -21
- package/lib/reporting/components/resources/ReportCard/index.js +1 -2
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +9 -10
- package/lib/reporting/components/resources/common/AnalysisUpdateDate/index.js +2 -2
- package/lib/taking/api/taking.js +4 -0
- package/package.json +10 -13
|
@@ -6,13 +6,12 @@ import React, { Component } from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
8
8
|
import { Heading } from '@instructure/ui-heading';
|
|
9
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
10
9
|
import { RadioInputGroup, RadioInput } from '@instructure/ui-radio-input';
|
|
11
10
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
12
11
|
import Bank from "../../../common/records/Bank.js";
|
|
13
12
|
import BankSelection from "../../../common/components/resources/BankSelection/presenter.js";
|
|
14
13
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
14
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
16
15
|
import { featureOn } from "../../../common/util/featureCheck.js";
|
|
17
16
|
var _ref = /*#__PURE__*/React.createElement("br", null);
|
|
18
17
|
export var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
@@ -9,10 +9,9 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import debounce from 'lodash/fp/debounce';
|
|
10
10
|
import find from 'lodash/fp/find';
|
|
11
11
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
12
|
-
import { Select } from '@instructure/ui-select';
|
|
13
12
|
import { Spinner } from '@instructure/ui-spinner';
|
|
14
13
|
import TagWrapper from "../../../common/components/shared/TagWrapper/index.js";
|
|
15
|
-
import { SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, SELECT_EMPTY_OPTION } from '@instructure/quiz-common';
|
|
14
|
+
import { SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, SELECT_EMPTY_OPTION, Select } from '@instructure/quiz-common';
|
|
16
15
|
export var AsyncSearch = /*#__PURE__*/function (_Component) {
|
|
17
16
|
_inherits(AsyncSearch, _Component);
|
|
18
17
|
var _super = _createSuper(AsyncSearch);
|
|
@@ -23,7 +23,6 @@ import { Text } from '@instructure/ui-text';
|
|
|
23
23
|
import { Heading } from '@instructure/ui-heading';
|
|
24
24
|
import { IconDiscussionLine, IconDiscussionSolid } from '@instructure/ui-icons';
|
|
25
25
|
import { PresentationContent, ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
26
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
27
26
|
import { jsx } from '@instructure/emotion';
|
|
28
27
|
import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
|
|
29
28
|
import EntrySave from "../../../common/components/resources/entry/EntrySave/index.js";
|
|
@@ -41,7 +40,7 @@ import { createItem } from "../../../building/api/items.js";
|
|
|
41
40
|
import { createStimulus } from "../../../building/api/stimuli.js";
|
|
42
41
|
import { propsForItemVersioningWrapper, propsForStimulusVersioningWrapper } from "../../../common/util/warningHelpers.js";
|
|
43
42
|
import NavWrapper from "../NavWrapper/index.js";
|
|
44
|
-
import { API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, PARENT_TYPE_BANK, withStyleOverrides } from '@instructure/quiz-common';
|
|
43
|
+
import { API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, PARENT_TYPE_BANK, TextInput, withStyleOverrides } from '@instructure/quiz-common';
|
|
45
44
|
import generateStyle from "./styles.js";
|
|
46
45
|
import generateComponentTheme from "./theme.js";
|
|
47
46
|
var _ref3 = jsx(Spinner, null);
|
|
@@ -10,10 +10,8 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
11
|
import { IconPlusLine } from '@instructure/ui-icons';
|
|
12
12
|
import { Button, CondensedButton } from '@instructure/ui-buttons';
|
|
13
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
14
13
|
import { Checkbox } from '@instructure/ui-checkbox';
|
|
15
14
|
import { View } from '@instructure/ui-view';
|
|
16
|
-
import { Flex } from '@instructure/ui-flex';
|
|
17
15
|
import { Text } from '@instructure/ui-text';
|
|
18
16
|
import { AccessibleContent, ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
19
17
|
import { jsx } from '@instructure/emotion';
|
|
@@ -22,7 +20,7 @@ import TagSuggestSelect from "../../../common/components/shared/TagSuggestSelect
|
|
|
22
20
|
import { interactionTypesNameDictionary } from "../../../common/util/interactionTypeMetadata.js";
|
|
23
21
|
import generateStyle from "./styles.js";
|
|
24
22
|
import generateComponentTheme from "./theme.js";
|
|
25
|
-
import { withStyleOverrides } from '@instructure/quiz-common';
|
|
23
|
+
import { Flex, TextInput, withStyleOverrides } from '@instructure/quiz-common';
|
|
26
24
|
var tagShape = PropTypes.shape({
|
|
27
25
|
tag: PropTypes.shape({
|
|
28
26
|
id: PropTypes.string,
|
|
@@ -19,7 +19,6 @@ function mapStateToProps(state, props) {
|
|
|
19
19
|
return {
|
|
20
20
|
itemBankSearchTableEnabled: featureOn('item_bank_search_table'),
|
|
21
21
|
usedByCourseEnabled: featureOn('filter_item_banks_used_by_course'),
|
|
22
|
-
subAccountBankSharingEnabled: featureOn('sub_account_bank_sharing'),
|
|
23
22
|
scopeType: scopeType,
|
|
24
23
|
sortBy: sortBy,
|
|
25
24
|
sortOrder: sortOrder,
|
|
@@ -14,8 +14,6 @@ import { AccessibleContent, ScreenReaderContent } from '@instructure/ui-a11y-con
|
|
|
14
14
|
import { IconPlusLine, IconArrowUpLine, IconArrowDownLine } from '@instructure/ui-icons';
|
|
15
15
|
import { Billboard } from '@instructure/ui-billboard';
|
|
16
16
|
import { Button } from '@instructure/ui-buttons';
|
|
17
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
18
|
-
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
19
17
|
import { jsx } from '@instructure/emotion';
|
|
20
18
|
import { Grid } from '@instructure/ui-grid';
|
|
21
19
|
import { View } from '@instructure/ui-view';
|
|
@@ -24,7 +22,7 @@ import Page from "../../../common/components/layout/Page/index.js";
|
|
|
24
22
|
import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
|
|
25
23
|
import PaginatedCollection from "../../../common/components/shared/PaginatedCollection/index.js";
|
|
26
24
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
27
|
-
import { BANKS_BANK_FILTERS, BANKS_BANK_PAGINATION, CREATE_BANK_MODAL, SHARED_WITH_ACCOUNT, withStyleOverrides } from '@instructure/quiz-common';
|
|
25
|
+
import { BANKS_BANK_FILTERS, BANKS_BANK_PAGINATION, CREATE_BANK_MODAL, SHARED_WITH_ACCOUNT, withStyleOverrides, SimpleSelect, TextInput } from '@instructure/quiz-common';
|
|
28
26
|
import BanksList from "../../../banks/components/BanksList/index.js";
|
|
29
27
|
import CreateBankModal from "../../../banks/components/CreateBankModal/index.js";
|
|
30
28
|
import NavWrapper from "../NavWrapper/index.js";
|
|
@@ -224,7 +222,7 @@ export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTh
|
|
|
224
222
|
}, {
|
|
225
223
|
key: "topLevelBankFilterName",
|
|
226
224
|
value: function topLevelBankFilterName() {
|
|
227
|
-
return
|
|
225
|
+
return t('Shared with Me');
|
|
228
226
|
}
|
|
229
227
|
}, {
|
|
230
228
|
key: "renderFilters",
|
|
@@ -237,7 +235,7 @@ export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTh
|
|
|
237
235
|
translation: t('Institution Banks')
|
|
238
236
|
}, {
|
|
239
237
|
slug: 'courses',
|
|
240
|
-
translation:
|
|
238
|
+
translation: t('Shared with Courses')
|
|
241
239
|
}];
|
|
242
240
|
if (this.props.scope.uuid) {
|
|
243
241
|
scopeOptions.push({
|
|
@@ -245,7 +243,7 @@ export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTh
|
|
|
245
243
|
translation: t('This Course')
|
|
246
244
|
});
|
|
247
245
|
}
|
|
248
|
-
if (this.
|
|
246
|
+
if (this.isSubAccountLaunch()) {
|
|
249
247
|
// Put this option below "Insitution Banks"
|
|
250
248
|
scopeOptions.splice(2, 0, {
|
|
251
249
|
slug: 'this_account',
|
|
@@ -304,7 +302,7 @@ export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTh
|
|
|
304
302
|
onChange: this.handleSearchInputChange,
|
|
305
303
|
placeholder: t('Search Banks'),
|
|
306
304
|
"data-automation": "sdk-search-bank-textinput"
|
|
307
|
-
})),
|
|
305
|
+
})), !this.hideAccountSearch() && jsx(Grid.Col, {
|
|
308
306
|
width: 4
|
|
309
307
|
}, jsx(AsyncSearch, {
|
|
310
308
|
getShareableSubaccounts: this.props.getShareableSubaccounts,
|
|
@@ -490,7 +488,6 @@ export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTh
|
|
|
490
488
|
usedByCourseEnabled: PropTypes.bool,
|
|
491
489
|
itemBankSearchTableEnabled: PropTypes.bool,
|
|
492
490
|
setUI: PropTypes.func.isRequired,
|
|
493
|
-
subAccountBankSharingEnabled: PropTypes.bool,
|
|
494
491
|
iceTopNavBarEnabled: PropTypes.bool,
|
|
495
492
|
styles: PropTypes.object,
|
|
496
493
|
rootAccountUuid: PropTypes.string
|
|
@@ -517,7 +514,6 @@ export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTh
|
|
|
517
514
|
searchSelection: [],
|
|
518
515
|
usedByCourseEnabled: false,
|
|
519
516
|
itemBankSearchTableEnabled: false,
|
|
520
|
-
subAccountBankSharingEnabled: false,
|
|
521
517
|
iceTopNavBarEnabled: false,
|
|
522
518
|
rootAccountUuid: null
|
|
523
519
|
}, _Banks.contextTypes = {
|
|
@@ -5,7 +5,6 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
8
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
9
8
|
import { RadioInputGroup, RadioInput } from '@instructure/ui-radio-input';
|
|
10
9
|
import { Checkbox } from '@instructure/ui-checkbox';
|
|
11
10
|
import { Heading } from '@instructure/ui-heading';
|
|
@@ -13,7 +12,7 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
|
13
12
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
14
13
|
import Bank from "../../../common/records/Bank.js";
|
|
15
14
|
import BankSelection from "../../../common/components/resources/BankSelection/presenter.js";
|
|
16
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
15
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, TextInput, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
17
16
|
import { featureOn } from "../../../common/util/featureCheck.js";
|
|
18
17
|
var _ref = /*#__PURE__*/React.createElement("br", null);
|
|
19
18
|
var _ref2 = /*#__PURE__*/React.createElement("br", null);
|
|
@@ -9,13 +9,12 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
10
10
|
import { Checkbox } from '@instructure/ui-checkbox';
|
|
11
11
|
import { View } from '@instructure/ui-view';
|
|
12
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
13
12
|
import { Heading } from '@instructure/ui-heading';
|
|
14
13
|
import { jsx } from '@instructure/emotion';
|
|
15
14
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
16
15
|
import Bank from "../../../common/records/Bank.js";
|
|
17
16
|
import { toErrors } from "../../../common/util/instUIMessages.js";
|
|
18
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
|
|
17
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
|
|
19
18
|
import generateStyle from "./styles.js";
|
|
20
19
|
import generateComponentTheme from "./theme.js";
|
|
21
20
|
export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_CreateBankModal = /*#__PURE__*/function (_Component) {
|
|
@@ -7,12 +7,11 @@ var _dec, _class, _EditBankModal;
|
|
|
7
7
|
import { Component } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
10
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
11
10
|
import { Heading } from '@instructure/ui-heading';
|
|
12
11
|
import { jsx } from '@instructure/emotion';
|
|
13
12
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
14
13
|
import { toErrors } from "../../../common/util/instUIMessages.js";
|
|
15
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
|
|
14
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
|
|
16
15
|
import Bank from "../../../common/records/Bank.js";
|
|
17
16
|
import generateStyle from "./styles.js";
|
|
18
17
|
import generateComponentTheme from "./theme.js";
|
|
@@ -5,13 +5,12 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
var _dec, _class, _RootAccountSharing;
|
|
6
6
|
import React, { Component } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { withStyleOverrides, CAN_EDIT, READ_ONLY } from '@instructure/quiz-common';
|
|
8
|
+
import { withStyleOverrides, CAN_EDIT, READ_ONLY, SimpleSelect } from '@instructure/quiz-common';
|
|
9
9
|
import { IconAdminLine } from '@instructure/ui-icons';
|
|
10
10
|
import { Checkbox } from '@instructure/ui-checkbox';
|
|
11
11
|
import { View } from '@instructure/ui-view';
|
|
12
12
|
import { Grid } from '@instructure/ui-grid';
|
|
13
13
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
14
|
-
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
15
14
|
import generateStyle from "./styles.js";
|
|
16
15
|
import generateComponentTheme from "./theme.js";
|
|
17
16
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -11,10 +11,9 @@ import { Map } from 'immutable';
|
|
|
11
11
|
import { IconCoursesLine, IconTrashLine, IconResetLine } from '@instructure/ui-icons';
|
|
12
12
|
import { Grid } from '@instructure/ui-grid';
|
|
13
13
|
import { Avatar } from '@instructure/ui-avatar';
|
|
14
|
-
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
15
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
16
15
|
import { jsx } from '@instructure/emotion';
|
|
17
|
-
import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_COURSE, withStyleOverrides } from '@instructure/quiz-common';
|
|
16
|
+
import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_COURSE, SimpleSelect, withStyleOverrides } from '@instructure/quiz-common';
|
|
18
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
19
18
|
import { ContextualIconButton } from "../ContextualIconButton/index.js";
|
|
20
19
|
import generateStyle from "./styles.js";
|
|
@@ -4,14 +4,12 @@ import { connect } from "../../../common/react-redux.js";
|
|
|
4
4
|
import { shareBank, getSharedBanks, updateSharedBankPermission, getBank, updateBank } from "../../api/banks.js";
|
|
5
5
|
import { removeSharedBank } from "../../../common/actions/sharedBanks.js";
|
|
6
6
|
import { withConfirm } from "../../../common/actions/modal.js";
|
|
7
|
-
import { featureOn } from "../../../common/util/featureCheck.js";
|
|
8
7
|
import SharingModal from "./presenter.js";
|
|
9
8
|
function mapStateToProps(state, ownProps) {
|
|
10
9
|
var sharedBanks = state.get('sharedBanks', Map()).filter(function (sharedBank) {
|
|
11
10
|
return sharedBank.get('bankId') === ownProps.bank.id;
|
|
12
11
|
}).toList();
|
|
13
12
|
return {
|
|
14
|
-
subAccountBankSharingEnabled: featureOn('sub_account_bank_sharing'),
|
|
15
13
|
sharedBanks: sharedBanks
|
|
16
14
|
};
|
|
17
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
6
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
@@ -14,14 +14,13 @@ import PropTypes from 'prop-types';
|
|
|
14
14
|
import { List, Map } from 'immutable';
|
|
15
15
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
16
16
|
import partial from 'lodash/partial';
|
|
17
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, withStyleOverrides } from '@instructure/quiz-common';
|
|
17
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, SimpleSelect, withStyleOverrides } from '@instructure/quiz-common';
|
|
18
18
|
import { Heading } from '@instructure/ui-heading';
|
|
19
19
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
20
20
|
import { View } from '@instructure/ui-view';
|
|
21
21
|
import { Grid } from '@instructure/ui-grid';
|
|
22
22
|
import { Tabs } from '@instructure/ui-tabs';
|
|
23
23
|
import { Text } from '@instructure/ui-text';
|
|
24
|
-
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
25
24
|
import { jsx } from '@instructure/emotion';
|
|
26
25
|
import elementsForSelectors from "../../../common/util/ElementsForSelectors.js";
|
|
27
26
|
import CustomPropTypes from "../../../common/util/CustomPropTypes.js";
|
|
@@ -177,27 +176,7 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
177
176
|
return originalEntity.get('permission', CAN_EDIT);
|
|
178
177
|
};
|
|
179
178
|
_this.handleEntityRemove = function (entity, undoRemove) {
|
|
180
|
-
|
|
181
|
-
_this.confirmPermissionChange(entity, REMOVED_ACCESS);
|
|
182
|
-
} else {
|
|
183
|
-
var permission = undoRemove ? _this.originalPermissionForEntity(entity) : REMOVED_ACCESS;
|
|
184
|
-
_this.setState(function (prevState) {
|
|
185
|
-
var sharesIndex = prevState.shares.findIndex(function (e) {
|
|
186
|
-
return e.get('id') == entity.get('id');
|
|
187
|
-
});
|
|
188
|
-
var newEntitiesIndex = prevState.newEntities.findIndex(function (e) {
|
|
189
|
-
return e.get('id') == entity.get('id');
|
|
190
|
-
});
|
|
191
|
-
var removedNewEntity = newEntitiesIndex > -1;
|
|
192
|
-
var newShares = removedNewEntity ? prevState.shares.delete(sharesIndex) : prevState.shares.setIn([sharesIndex, 'permission'], permission);
|
|
193
|
-
var newEntities = removedNewEntity ? prevState.newEntities.delete(newEntitiesIndex) : prevState.newEntities;
|
|
194
|
-
return {
|
|
195
|
-
shares: newShares,
|
|
196
|
-
newEntities: newEntities,
|
|
197
|
-
entitiesWithChangedPermission: Object.assign({}, prevState.entitiesWithChangedPermission, _defineProperty({}, entity.get('id'), permission))
|
|
198
|
-
};
|
|
199
|
-
}, _this.updateEntitiesCount);
|
|
200
|
-
}
|
|
179
|
+
_this.confirmPermissionChange(entity, REMOVED_ACCESS);
|
|
201
180
|
};
|
|
202
181
|
_this.handleSearchPermissionChange = function (e, _ref4) {
|
|
203
182
|
var value = _ref4.value;
|
|
@@ -224,21 +203,13 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
224
203
|
permission: _this.state.searchPermission
|
|
225
204
|
});
|
|
226
205
|
}));
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
});
|
|
235
|
-
} else {
|
|
236
|
-
_this.setState({
|
|
237
|
-
searchSelection: [],
|
|
238
|
-
shares: newEntities.concat(_this.state.shares),
|
|
239
|
-
newEntities: newEntities.concat(_this.state.newEntities)
|
|
240
|
-
}, _this.updateEntitiesCount);
|
|
241
|
-
}
|
|
206
|
+
newEntities.forEach(function (entity) {
|
|
207
|
+
_this.props.onShare(entity.toJS());
|
|
208
|
+
_this.props.shareBank(_this.sharedBankForEntity(entity), _this.props.getUserInfo);
|
|
209
|
+
});
|
|
210
|
+
_this.setState({
|
|
211
|
+
searchSelection: []
|
|
212
|
+
});
|
|
242
213
|
};
|
|
243
214
|
_this.updatePermission = /*#__PURE__*/function () {
|
|
244
215
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(entity, permission) {
|
|
@@ -283,19 +254,7 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
283
254
|
});
|
|
284
255
|
};
|
|
285
256
|
_this.handleEntityPermissionChange = function (entity, permission) {
|
|
286
|
-
|
|
287
|
-
_this.confirmPermissionChange(entity, permission);
|
|
288
|
-
} else {
|
|
289
|
-
_this.setState(function (prevState) {
|
|
290
|
-
var index = prevState.shares.findIndex(function (share) {
|
|
291
|
-
return share.get('id') === entity.get('id');
|
|
292
|
-
});
|
|
293
|
-
return {
|
|
294
|
-
shares: prevState.shares.setIn([index, 'permission'], permission),
|
|
295
|
-
entitiesWithChangedPermission: Object.assign({}, prevState.entitiesWithChangedPermission, _defineProperty({}, entity.get('id'), permission))
|
|
296
|
-
};
|
|
297
|
-
});
|
|
298
|
-
}
|
|
257
|
+
_this.confirmPermissionChange(entity, permission);
|
|
299
258
|
};
|
|
300
259
|
_this.toggleAccountShare = function (event) {
|
|
301
260
|
_this.setState(function (prevState) {
|
|
@@ -384,7 +343,7 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
384
343
|
}, {
|
|
385
344
|
key: "componentDidUpdate",
|
|
386
345
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
387
|
-
if (this.
|
|
346
|
+
if (this.state.accountPermission !== prevState.accountPermission && this.state.accountPermission !== this.props.bank.accountPermission) {
|
|
388
347
|
var updatedBank = this.props.bank.set('accountPermission', this.state.accountPermission);
|
|
389
348
|
this.props.updateBank(updatedBank, false);
|
|
390
349
|
}
|
|
@@ -503,37 +462,20 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
503
462
|
var existingAccounts = existingShares.filter(function (s) {
|
|
504
463
|
return s.get('entityType') === SHARED_WITH_ACCOUNT;
|
|
505
464
|
});
|
|
506
|
-
|
|
507
|
-
return this.renderSubaccountSharingEnabledEntities(existingPeople, existingCourses, existingAccounts);
|
|
508
|
-
}
|
|
509
|
-
return this.renderOriginalDesignEntities(existingPeople, existingCourses);
|
|
465
|
+
return this.renderSubaccountSharingEnabledEntities(existingPeople, existingCourses, existingAccounts);
|
|
510
466
|
}
|
|
511
467
|
}, {
|
|
512
468
|
key: "renderFooter",
|
|
513
469
|
value: function renderFooter() {
|
|
514
|
-
|
|
515
|
-
return jsx(Button, {
|
|
516
|
-
color: "primary",
|
|
517
|
-
margin: "0 x-small 0 0",
|
|
518
|
-
onClick: this.handleDismiss
|
|
519
|
-
}, t('Close'));
|
|
520
|
-
}
|
|
521
|
-
return jsx(React.Fragment, null, jsx(Button, {
|
|
522
|
-
"data-automation": "sdk-shared-bank-cancel-button",
|
|
523
|
-
color: "primary-inverse",
|
|
524
|
-
onClick: this.handleDismiss,
|
|
525
|
-
margin: "0 x-small 0 0"
|
|
526
|
-
}, t('Cancel')), jsx(Button, {
|
|
527
|
-
"data-automation": "sdk-shared-bank-done-button",
|
|
470
|
+
return jsx(Button, {
|
|
528
471
|
color: "primary",
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}, t('
|
|
472
|
+
margin: "0 x-small 0 0",
|
|
473
|
+
onClick: this.handleDismiss
|
|
474
|
+
}, t('Close'));
|
|
532
475
|
}
|
|
533
476
|
}, {
|
|
534
477
|
key: "render",
|
|
535
478
|
value: function render() {
|
|
536
|
-
var subAccountBankSharingEnabled = this.props.subAccountBankSharingEnabled;
|
|
537
479
|
return jsx(Modal, {
|
|
538
480
|
open: this.props.isOpen,
|
|
539
481
|
onDismiss: this.handleDismiss,
|
|
@@ -546,7 +488,7 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
546
488
|
placement: "end",
|
|
547
489
|
offset: "medium",
|
|
548
490
|
screenReaderLabel: t('Close')
|
|
549
|
-
})), jsx(ModalBody, null,
|
|
491
|
+
})), jsx(ModalBody, null, this.state.shares.size >= 0 ? this.renderEntitiesSection() : _ref7), jsx(ModalFooter, null, this.renderFooter()));
|
|
550
492
|
}
|
|
551
493
|
}]);
|
|
552
494
|
SharingModalPresenter.displayName = "SharingModalPresenter";
|
|
@@ -581,7 +523,6 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
581
523
|
removeSharedBank: PropTypes.func.isRequired,
|
|
582
524
|
shareBank: PropTypes.func.isRequired,
|
|
583
525
|
sharedBanks: ImmutablePropTypes.list,
|
|
584
|
-
subAccountBankSharingEnabled: PropTypes.bool,
|
|
585
526
|
updateBank: PropTypes.func.isRequired,
|
|
586
527
|
updateSharedBankPermission: PropTypes.func.isRequired,
|
|
587
528
|
updateSharedCount: PropTypes.func,
|
|
@@ -596,7 +537,6 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
|
|
|
596
537
|
onDismiss: noop,
|
|
597
538
|
onShare: function onShare() {},
|
|
598
539
|
sharedBanks: List(),
|
|
599
|
-
subAccountBankSharingEnabled: false,
|
|
600
540
|
updateSharedCount: Function.prototype
|
|
601
541
|
}, _SharingModalPresenter)) || _class);
|
|
602
542
|
export default SharingModalPresenter;
|
|
@@ -21,7 +21,8 @@ export function createStimulus(stimulus, parentId, parentType) {
|
|
|
21
21
|
parent_stimulus_id: parentStimulusId,
|
|
22
22
|
source_url: stimulus.sourceUrl,
|
|
23
23
|
stimulus_type: stimulus.stimulusType,
|
|
24
|
-
title: stimulus.title
|
|
24
|
+
title: stimulus.title,
|
|
25
|
+
passage: stimulus.passage
|
|
25
26
|
};
|
|
26
27
|
var requestBody = JSON.stringify({
|
|
27
28
|
stimulus: stimulusParams
|
|
@@ -114,6 +114,12 @@ export var DeleteStimulusModal = (_dec = withStyleOverrides(generateStyle, gener
|
|
|
114
114
|
cancelText: t('Cancel')
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "isPassage",
|
|
119
|
+
value: function isPassage() {
|
|
120
|
+
var _this$props$stimulusE;
|
|
121
|
+
return (_this$props$stimulusE = this.props.stimulusEntry) === null || _this$props$stimulusE === void 0 ? void 0 : _this$props$stimulusE.getEntry().passage;
|
|
122
|
+
}
|
|
117
123
|
}, {
|
|
118
124
|
key: "anyImmutableKeepers",
|
|
119
125
|
value: function anyImmutableKeepers() {
|
|
@@ -142,8 +148,8 @@ export var DeleteStimulusModal = (_dec = withStyleOverrides(generateStyle, gener
|
|
|
142
148
|
return jsx(Button, {
|
|
143
149
|
onClick: this.closeAction,
|
|
144
150
|
margin: XSMALL_SIDE_MARGIN,
|
|
145
|
-
"data-automation": "sdk-keep-stimulus-button"
|
|
146
|
-
}, t('Keep Stimulus'));
|
|
151
|
+
"data-automation": "sdk-keep-".concat(this.isPassage() ? 'passage' : 'stimulus', "-button")
|
|
152
|
+
}, this.isPassage() ? t('Keep Passage') : t('Keep Stimulus'));
|
|
147
153
|
}
|
|
148
154
|
}, {
|
|
149
155
|
key: "doneButton",
|
|
@@ -157,8 +163,8 @@ export var DeleteStimulusModal = (_dec = withStyleOverrides(generateStyle, gener
|
|
|
157
163
|
color: "primary",
|
|
158
164
|
onClick: this.handleSubmit,
|
|
159
165
|
margin: XSMALL_SIDE_MARGIN,
|
|
160
|
-
"data-automation": "sdk-remove-stimulus-button"
|
|
161
|
-
}, t('Remove Stimulus'));
|
|
166
|
+
"data-automation": "sdk-remove-".concat(this.isPassage() ? 'passage' : 'stimulus', "-button")
|
|
167
|
+
}, this.isPassage() ? t('Remove Passage') : t('Remove Stimulus'));
|
|
162
168
|
}
|
|
163
169
|
}, {
|
|
164
170
|
key: "renderChooseWhich",
|
|
@@ -199,7 +205,8 @@ export var DeleteStimulusModal = (_dec = withStyleOverrides(generateStyle, gener
|
|
|
199
205
|
}, {
|
|
200
206
|
key: "renderContent",
|
|
201
207
|
value: function renderContent() {
|
|
202
|
-
var
|
|
208
|
+
var message = this.isPassage() ? t('Are you sure you want to remove this passage?') : t('Are you sure you want to remove this stimulus?');
|
|
209
|
+
var content = this.props.childEntries.size === 0 ? jsx("span", null, message) : this.renderMainMenu();
|
|
203
210
|
var stimulusTitle = this.props.stimulusEntry && this.props.stimulusEntry.getEntry().title;
|
|
204
211
|
return jsx("div", {
|
|
205
212
|
className: "deleteStimulusModal",
|
|
@@ -215,11 +222,11 @@ export var DeleteStimulusModal = (_dec = withStyleOverrides(generateStyle, gener
|
|
|
215
222
|
open: this.props.modalOpen,
|
|
216
223
|
onDismiss: this.closeAction,
|
|
217
224
|
size: "small",
|
|
218
|
-
label: t('Confirm Stimulus Removal')
|
|
225
|
+
label: this.isPassage() ? t('Confirm Passage Removal') : t('Confirm Stimulus Removal')
|
|
219
226
|
}, jsx(ModalHeader, null, jsx(Heading, {
|
|
220
227
|
level: "reset",
|
|
221
228
|
as: "h2"
|
|
222
|
-
}, t('Confirm Stimulus Removal')), jsx(CloseButton, {
|
|
229
|
+
}, this.isPassage() ? t('Confirm Passage Removal') : t('Confirm Stimulus Removal')), jsx(CloseButton, {
|
|
223
230
|
onClick: this.closeAction,
|
|
224
231
|
placement: "end",
|
|
225
232
|
offset: "medium",
|
|
@@ -38,10 +38,10 @@ export var QuizEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
38
38
|
function QuizEntry() {
|
|
39
39
|
var _this;
|
|
40
40
|
_classCallCheck(this, QuizEntry);
|
|
41
|
-
for (var _len = arguments.length,
|
|
42
|
-
|
|
41
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
42
|
+
_args[_key] = arguments[_key];
|
|
43
43
|
}
|
|
44
|
-
_this = _super.call.apply(_super, [this].concat(
|
|
44
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
45
45
|
_this.itemOverrideTypes = function () {
|
|
46
46
|
return ['choice'].concat(_toConsumableArray(_this.props.partialScoringEnabled ? ['multi-answer'] : []), _toConsumableArray(_this.props.partialDeepScoringEnabled ? ['matching'] : []));
|
|
47
47
|
};
|
|
@@ -96,7 +96,14 @@ export var QuizEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
96
96
|
};
|
|
97
97
|
_this.bankEntryWarningWrapperProps = function () {
|
|
98
98
|
if (_this.props.quizEntry.entryEditable) {
|
|
99
|
-
var
|
|
99
|
+
var _this$props$entry;
|
|
100
|
+
var isPassage = (_this$props$entry = _this.props.entry) === null || _this$props$entry === void 0 ? void 0 : _this$props$entry.passage;
|
|
101
|
+
var propsFunc = _this.props.quizEntry.hasStimulus ? function () {
|
|
102
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
103
|
+
args[_key2] = arguments[_key2];
|
|
104
|
+
}
|
|
105
|
+
return propsForStimulusBankEntryEditPrompt.apply(void 0, [isPassage].concat(args));
|
|
106
|
+
} : propsForItemBankEntryEditPrompt;
|
|
100
107
|
return propsFunc(_this.isEditing(), _this.props.switchOffEditing, function () {
|
|
101
108
|
var bankEntry = _this.props.quizEntry.getEntry();
|
|
102
109
|
_this.props.setUi(BUILD_TRAY_OPEN, true);
|
|
@@ -9,7 +9,6 @@ import { Component } from 'react';
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
11
|
import { View } from '@instructure/ui-view';
|
|
12
|
-
import { Flex } from '@instructure/ui-flex';
|
|
13
12
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
14
13
|
import { Text } from '@instructure/ui-text';
|
|
15
14
|
import NumberInput from '@instructure/quiz-number-input';
|
|
@@ -19,7 +18,7 @@ import { IconDiscussionLine, IconDiscussionSolid } from '@instructure/ui-icons';
|
|
|
19
18
|
import { interactionPoints } from '@instructure/quiz-interactions';
|
|
20
19
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
21
20
|
import EntrySave from "../../../../../../common/components/resources/entry/EntrySave/index.js";
|
|
22
|
-
import { ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, withStyleOverrides } from '@instructure/quiz-common';
|
|
21
|
+
import { Flex, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, withStyleOverrides } from '@instructure/quiz-common';
|
|
23
22
|
import generateStyle from "./styles.js";
|
|
24
23
|
import generateComponentTheme from "./theme.js";
|
|
25
24
|
function pointsAsFloat(pointsString) {
|