@instructure/quiz-core 20.34.1-undefined.0 → 20.35.0
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/api/banks.js +6 -2
- package/es/banks/components/AddToBankModal/index.js +1 -5
- package/es/banks/components/AddToBankModal/presenter.js +11 -10
- package/es/banks/components/Bank/presenter.js +4 -4
- package/es/banks/components/BankEntriesList/presenter.js +4 -3
- package/es/banks/components/BankEntry/presenter.js +4 -4
- package/es/banks/components/BankEntryRow/presenter.js +4 -4
- package/es/banks/components/BankSearch/presenter.js +4 -3
- package/es/banks/components/Banks/presenter.js +4 -4
- package/es/banks/components/BanksList/presenter.js +4 -4
- package/es/banks/components/CopyMoveBankEntryModal/index.js +1 -5
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +11 -11
- package/es/banks/components/CreateBankModal/presenter.js +4 -4
- package/es/banks/components/EditBankModal/presenter.js +4 -4
- package/es/banks/components/HeaderMenu/presenter.js +4 -4
- package/es/banks/components/NavWrapper/presenter.js +4 -3
- package/es/banks/components/SharingModal/RootAccountSharing.js +3 -4
- package/es/banks/components/SharingModal/ShareList/index.js +4 -4
- package/es/banks/components/SharingModal/presenter.js +4 -4
- package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +4 -3
- package/es/building/components/layout/Sidebar/Stimulus/presenter.js +4 -3
- package/es/building/components/layout/Sidebar/presenter.js +4 -4
- package/es/building/components/layout/header/BuildingButtons/presenter.js +4 -4
- package/es/building/components/resources/ActionButtons/presenter.js +4 -4
- package/es/building/components/resources/AddToBankOptions/index.js +4 -4
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +4 -4
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +4 -4
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +4 -4
- package/es/building/components/resources/quiz/instructions/Instructions/presenter.js +4 -3
- package/es/building/components/resources/quiz/instructions/Show/index.js +4 -3
- package/es/building/components/resources/quiz/title/Edit/index.js +4 -3
- package/es/building/components/resources/quiz/title/Show/index.js +9 -4
- package/es/building/components/resources/quiz/title/Title/presenter.js +4 -3
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +4 -4
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +6 -5
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +4 -3
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +4 -4
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +4 -4
- package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +4 -4
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +4 -4
- package/es/common/components/ImportModal/ImportFileSelector/index.js +4 -3
- package/es/common/components/ImportModal/presenter.js +4 -4
- package/es/common/components/PrintFontSizeModal/presenter.js +4 -4
- package/es/common/components/SDKApp/index.js +4 -4
- package/es/common/components/alerts/presenter.js +4 -3
- package/es/common/components/layout/Page/index.js +4 -3
- package/es/common/components/layout/header/HeaderMenuButton/presenter.js +4 -3
- package/es/common/components/layout/header/Timer/presenter.js +4 -3
- package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +4 -3
- package/es/common/components/layout/navbar/index.js +4 -3
- package/es/common/components/layout/sidebar/PositionSummary/index.js +4 -3
- package/es/common/components/layout/sidebar/Sidebar/index.js +4 -4
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +4 -4
- package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +4 -3
- package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +4 -3
- package/es/common/components/layout/sidebar/Stimulus/Title/index.js +4 -3
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +4 -4
- package/es/common/components/resources/BankSelection/presenter.js +40 -142
- package/es/common/components/resources/WarningWrapper/index.js +4 -3
- package/es/common/components/resources/positionBox/PositionBox.js +4 -3
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +4 -4
- package/es/common/components/resources/quiz/AddContent/Button/index.js +4 -4
- package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +4 -4
- package/es/common/components/resources/quiz/instructions/Instructions.js +4 -3
- package/es/common/components/resources/quiz/title/Title.js +4 -3
- package/es/common/components/resources/quizSessionResult/Header/index.js +4 -3
- package/es/common/components/resources/quizSessionResult/Info/index.js +4 -4
- package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +4 -3
- package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +4 -4
- package/es/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +4 -3
- package/es/common/components/resources/stimulus/Stimulus/presenter.js +4 -4
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +4 -4
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +4 -4
- package/es/common/components/resources/stimulus/StimulusShow/index.js +4 -3
- package/es/common/components/shared/Card/CardContent/index.js +4 -3
- package/es/common/components/shared/Card/CardWrapper/index.js +4 -3
- package/es/common/components/shared/ExpandButton/index.js +4 -3
- package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +178 -0
- package/es/common/components/shared/InteractionTypes/presenter.js +4 -3
- package/es/common/components/shared/PaginatedCollection/presenter.js +4 -3
- package/es/common/components/shared/Paginator/index.js +4 -3
- package/es/common/components/shared/TagDisplay/index.js +4 -3
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +4 -3
- package/es/common/components/shared/errors/Errors.js +4 -3
- package/es/common/components/shared/file_selector/FileSelector.js +4 -3
- package/es/common/components/shared/overlay/index.js +4 -4
- package/es/common/components/shared/spinner/Spinner.js +4 -3
- package/es/index.js +6 -2
- package/es/moderating/components/events/Event.js +3 -0
- package/es/moderating/components/events/ResponseEvent.js +4 -3
- package/es/moderating/components/resources/ModerateTable/presenter.js +4 -4
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +4 -4
- package/es/reporting/api/fetchStudentAnalyses.js +9 -4
- package/es/reporting/api/getAnalysesExport.js +11 -4
- package/es/reporting/api/getAnalysesStatus.js +11 -4
- package/es/reporting/components/Caption/index.js +4 -3
- package/es/reporting/components/MetricsListItem/index.js +4 -3
- package/es/reporting/components/charts/CentileDistribution/presenter.js +4 -3
- package/es/reporting/components/charts/Distribution/presenter.js +4 -3
- package/es/reporting/components/charts/Legend/index.js +4 -3
- package/es/reporting/components/charts/QuintileDistribution/presenter.js +4 -3
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +4 -3
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +4 -4
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +4 -4
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +4 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +4 -3
- package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +4 -4
- package/es/reporting/components/resources/ReportCard/index.js +4 -3
- package/es/reporting/components/resources/ReportList/index.js +4 -3
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +8 -6
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +2 -1
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +19 -6
- package/lib/banks/api/banks.js +8 -3
- package/lib/banks/components/AddToBankModal/index.js +0 -4
- package/lib/banks/components/AddToBankModal/presenter.js +11 -10
- package/lib/banks/components/Bank/presenter.js +2 -2
- package/lib/banks/components/BankEntriesList/presenter.js +3 -2
- package/lib/banks/components/BankEntry/presenter.js +2 -2
- package/lib/banks/components/BankEntryRow/presenter.js +2 -2
- package/lib/banks/components/BankSearch/presenter.js +3 -2
- package/lib/banks/components/Banks/presenter.js +2 -2
- package/lib/banks/components/BanksList/presenter.js +2 -2
- package/lib/banks/components/CopyMoveBankEntryModal/index.js +0 -4
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +11 -11
- package/lib/banks/components/CreateBankModal/presenter.js +2 -2
- package/lib/banks/components/EditBankModal/presenter.js +2 -2
- package/lib/banks/components/HeaderMenu/presenter.js +2 -2
- package/lib/banks/components/NavWrapper/presenter.js +3 -2
- package/lib/banks/components/SharingModal/RootAccountSharing.js +2 -3
- package/lib/banks/components/SharingModal/ShareList/index.js +2 -2
- package/lib/banks/components/SharingModal/presenter.js +2 -2
- package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +3 -2
- package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +3 -2
- package/lib/building/components/layout/Sidebar/presenter.js +2 -2
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +2 -2
- package/lib/building/components/resources/ActionButtons/presenter.js +2 -2
- package/lib/building/components/resources/AddToBankOptions/index.js +2 -2
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +2 -2
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +2 -2
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +2 -2
- package/lib/building/components/resources/quiz/instructions/Instructions/presenter.js +3 -2
- package/lib/building/components/resources/quiz/instructions/Show/index.js +3 -2
- package/lib/building/components/resources/quiz/title/Edit/index.js +3 -2
- package/lib/building/components/resources/quiz/title/Show/index.js +3 -2
- package/lib/building/components/resources/quiz/title/Title/presenter.js +3 -2
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +6 -5
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +3 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +2 -2
- package/lib/common/components/ImportModal/ImportFileSelector/index.js +3 -2
- package/lib/common/components/ImportModal/presenter.js +2 -2
- package/lib/common/components/PrintFontSizeModal/presenter.js +2 -2
- package/lib/common/components/SDKApp/index.js +2 -2
- package/lib/common/components/alerts/presenter.js +3 -2
- package/lib/common/components/layout/Page/index.js +3 -2
- package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +3 -2
- package/lib/common/components/layout/header/Timer/presenter.js +3 -2
- package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +3 -2
- package/lib/common/components/layout/navbar/index.js +3 -2
- package/lib/common/components/layout/sidebar/PositionSummary/index.js +3 -2
- package/lib/common/components/layout/sidebar/Sidebar/index.js +2 -2
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +3 -2
- package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +3 -2
- package/lib/common/components/layout/sidebar/Stimulus/Title/index.js +3 -2
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +2 -2
- package/lib/common/components/resources/BankSelection/presenter.js +40 -142
- package/lib/common/components/resources/WarningWrapper/index.js +3 -2
- package/lib/common/components/resources/positionBox/PositionBox.js +3 -2
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +2 -2
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +2 -2
- package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +2 -2
- package/lib/common/components/resources/quiz/instructions/Instructions.js +3 -2
- package/lib/common/components/resources/quiz/title/Title.js +3 -2
- package/lib/common/components/resources/quizSessionResult/Header/index.js +3 -2
- package/lib/common/components/resources/quizSessionResult/Info/index.js +2 -2
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +3 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +2 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +3 -2
- package/lib/common/components/resources/stimulus/Stimulus/presenter.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusShow/index.js +3 -2
- package/lib/common/components/shared/Card/CardContent/index.js +3 -2
- package/lib/common/components/shared/Card/CardWrapper/index.js +3 -2
- package/lib/common/components/shared/ExpandButton/index.js +3 -2
- package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +188 -0
- package/lib/common/components/shared/InteractionTypes/presenter.js +3 -2
- package/lib/common/components/shared/PaginatedCollection/presenter.js +3 -2
- package/lib/common/components/shared/Paginator/index.js +3 -2
- package/lib/common/components/shared/TagDisplay/index.js +3 -2
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +3 -2
- package/lib/common/components/shared/errors/Errors.js +3 -2
- package/lib/common/components/shared/file_selector/FileSelector.js +3 -2
- package/lib/common/components/shared/overlay/index.js +2 -2
- package/lib/common/components/shared/spinner/Spinner.js +3 -2
- package/lib/index.js +51 -0
- package/lib/moderating/components/events/Event.js +4 -1
- package/lib/moderating/components/events/ResponseEvent.js +3 -2
- package/lib/moderating/components/resources/ModerateTable/presenter.js +2 -2
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +2 -2
- package/lib/reporting/api/fetchStudentAnalyses.js +9 -4
- package/lib/reporting/api/getAnalysesExport.js +11 -4
- package/lib/reporting/api/getAnalysesStatus.js +11 -4
- package/lib/reporting/components/Caption/index.js +3 -2
- package/lib/reporting/components/MetricsListItem/index.js +3 -2
- package/lib/reporting/components/charts/CentileDistribution/presenter.js +3 -2
- package/lib/reporting/components/charts/Distribution/presenter.js +3 -2
- package/lib/reporting/components/charts/Legend/index.js +3 -2
- package/lib/reporting/components/charts/QuintileDistribution/presenter.js +3 -2
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +3 -2
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +2 -2
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +3 -2
- package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +2 -2
- package/lib/reporting/components/resources/ReportCard/index.js +3 -2
- package/lib/reporting/components/resources/ReportList/index.js +3 -2
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +7 -5
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +2 -1
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +19 -6
- package/package.json +31 -32
package/es/banks/api/banks.js
CHANGED
|
@@ -16,10 +16,14 @@ import { noop } from 'lodash';
|
|
|
16
16
|
import { NIL } from 'uuid';
|
|
17
17
|
var banksApiEndpoint = '/api/banks';
|
|
18
18
|
var DEFAULT_PAGE_SIZE = 100;
|
|
19
|
+
export var simpleFetchBanks = function simpleFetchBanks() {
|
|
20
|
+
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
21
|
+
var fetcher = new PaginatedFetcher();
|
|
22
|
+
return fetcher.get(banksApiEndpoint, params);
|
|
23
|
+
};
|
|
19
24
|
var _fetchBanks = function _fetchBanks(dispatch) {
|
|
20
25
|
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
21
|
-
|
|
22
|
-
return fetcher.get(banksApiEndpoint, params).then(function (_ref) {
|
|
26
|
+
return simpleFetchBanks(params).then(function (_ref) {
|
|
23
27
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
24
28
|
response = _ref2[0],
|
|
25
29
|
pageData = _ref2[1];
|
|
@@ -7,16 +7,12 @@ import AddToBankModal from "./presenter.js";
|
|
|
7
7
|
import * as modalActions from "../../../common/actions/modal.js";
|
|
8
8
|
import { disassociateEntry } from "../../../common/actions/banks.js";
|
|
9
9
|
import * as uiActions from "../../../common/actions/ui.js";
|
|
10
|
-
import
|
|
11
|
-
import { ADD_TO_BANK_MODAL_BANK_SELECTION, ADD_TO_BANK_MODAL } from '@instructure/quiz-common';
|
|
10
|
+
import { ADD_TO_BANK_MODAL } from '@instructure/quiz-common';
|
|
12
11
|
import { getModalTrigger } from "../../../common/util/modalHelpers.js";
|
|
13
12
|
export function mapStateToProps(state, props) {
|
|
14
|
-
var selectedBankOption = state.getIn(['ui', ADD_TO_BANK_MODAL_BANK_SELECTION]);
|
|
15
|
-
var selectedBank = selectedBankOption && new Bank(state.getIn(['banks', selectedBankOption]));
|
|
16
13
|
return {
|
|
17
14
|
canvasOrigin: state.getIn(['config', 'canvasOrigin']),
|
|
18
15
|
checkContentShareability: props.entryType === 'Item' ? checkItemShareability : checkStimulusShareability,
|
|
19
|
-
selectedBank: selectedBank,
|
|
20
16
|
modalTrigger: getModalTrigger(state),
|
|
21
17
|
modalOpen: state.getIn(['modal', 'isOpen']) === [ADD_TO_BANK_MODAL, props.entryType, props.entryId].join(':')
|
|
22
18
|
};
|
|
@@ -13,14 +13,14 @@ import { TextInput } from '@instructure/ui-text-input';
|
|
|
13
13
|
import { RadioInputGroup, RadioInput } from '@instructure/ui-radio-input';
|
|
14
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
15
|
import Bank from "../../../common/records/Bank.js";
|
|
16
|
-
import BankSelection from "../../../common/components/resources/BankSelection/
|
|
16
|
+
import BankSelection from "../../../common/components/resources/BankSelection/presenter.js";
|
|
17
17
|
import { Spinner } from '@instructure/ui-spinner';
|
|
18
18
|
import { Text } from '@instructure/ui-text';
|
|
19
19
|
import { IconNoLine, IconWarningLine } from '@instructure/ui-icons';
|
|
20
20
|
import { View } from '@instructure/ui-view';
|
|
21
21
|
import { Flex } from '@instructure/ui-flex';
|
|
22
22
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
23
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter,
|
|
23
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
24
24
|
import { featureOn } from "../../../common/util/featureCheck.js";
|
|
25
25
|
var _ref2 = /*#__PURE__*/React.createElement(Flex.Item, {
|
|
26
26
|
padding: "0 small 0 0"
|
|
@@ -45,7 +45,8 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
|
45
45
|
_this.state = {
|
|
46
46
|
bankType: 'existing',
|
|
47
47
|
contentShareable: 'loading',
|
|
48
|
-
newBankTitle: ''
|
|
48
|
+
newBankTitle: '',
|
|
49
|
+
selectedBank: null
|
|
49
50
|
};
|
|
50
51
|
_this.copyBankEntry = function (entryId, bankId) {
|
|
51
52
|
if (featureOn('instfs_bank_entry_movement_endpoints')) {
|
|
@@ -80,14 +81,16 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
|
80
81
|
_this.addToBank(bankData.id);
|
|
81
82
|
});
|
|
82
83
|
} else {
|
|
83
|
-
_this.addToBank(_this.
|
|
84
|
+
_this.addToBank(_this.state.selectedBank.id);
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
87
|
_this.closeAction = function () {
|
|
87
88
|
_this.props.closeModal();
|
|
88
89
|
};
|
|
89
90
|
_this.onBankSelection = function (e, option) {
|
|
90
|
-
_this.
|
|
91
|
+
_this.setState({
|
|
92
|
+
selectedBank: new Bank(option)
|
|
93
|
+
});
|
|
91
94
|
};
|
|
92
95
|
_this.handleRadioChange = function (event, value) {
|
|
93
96
|
_this.setState({
|
|
@@ -168,7 +171,7 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
|
168
171
|
newBankTitle = _this$state.newBankTitle,
|
|
169
172
|
contentShareable = _this$state.contentShareable;
|
|
170
173
|
var contentShareableLoading = contentShareable === 'loading';
|
|
171
|
-
var disabled = bankType === 'existing' && !this.
|
|
174
|
+
var disabled = bankType === 'existing' && !this.state.selectedBank || bankType === 'new' && (!newBankTitle || !newBankTitle.trim()) || contentShareableLoading;
|
|
172
175
|
return /*#__PURE__*/React.createElement(Button, {
|
|
173
176
|
type: "button",
|
|
174
177
|
color: "primary",
|
|
@@ -184,7 +187,7 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
|
184
187
|
if (this.state.bankType === 'existing') {
|
|
185
188
|
return /*#__PURE__*/React.createElement(BankSelection, {
|
|
186
189
|
onBankSelection: this.onBankSelection,
|
|
187
|
-
selectedBank: this.
|
|
190
|
+
selectedBank: this.state.selectedBank,
|
|
188
191
|
"data-automation": "sdk-bank-selection"
|
|
189
192
|
});
|
|
190
193
|
}
|
|
@@ -283,7 +286,6 @@ AddToBankModal.propTypes = {
|
|
|
283
286
|
modalOpen: PropTypes.bool.isRequired,
|
|
284
287
|
onAdd: PropTypes.func,
|
|
285
288
|
onContinue: PropTypes.func,
|
|
286
|
-
selectedBank: ImmutablePropTypes.record,
|
|
287
289
|
uiSet: PropTypes.func.isRequired,
|
|
288
290
|
workingEntry: ImmutablePropTypes.record.isRequired,
|
|
289
291
|
quizId: PropTypes.string.isRequired
|
|
@@ -292,8 +294,7 @@ AddToBankModal.defaultProps = {
|
|
|
292
294
|
canvasOrigin: '',
|
|
293
295
|
handleValidationErrorsFromApi: function handleValidationErrorsFromApi() {},
|
|
294
296
|
onAdd: function onAdd() {},
|
|
295
|
-
onContinue: function onContinue() {}
|
|
296
|
-
selectedBank: null
|
|
297
|
+
onContinue: function onContinue() {}
|
|
297
298
|
};
|
|
298
299
|
AddToBankModal.contextTypes = {
|
|
299
300
|
locale: PropTypes.string
|
|
@@ -18,7 +18,7 @@ import { BreadcrumbLink } from '@instructure/ui-breadcrumb';
|
|
|
18
18
|
import { Button } from '@instructure/ui-buttons';
|
|
19
19
|
import { Heading } from '@instructure/ui-heading';
|
|
20
20
|
import { AccessibleContent } from '@instructure/ui-a11y-content';
|
|
21
|
-
import {
|
|
21
|
+
import { jsx } from '@instructure/emotion';
|
|
22
22
|
import { Checkbox } from '@instructure/ui-checkbox';
|
|
23
23
|
import { View } from '@instructure/ui-view';
|
|
24
24
|
import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
|
|
@@ -33,11 +33,11 @@ import BankEntriesList from "../../../banks/components/BankEntriesList/index.js"
|
|
|
33
33
|
import BankSearch from "../../../banks/components/BankSearch/index.js";
|
|
34
34
|
import HeaderMenu from "../../../banks/components/HeaderMenu/index.js";
|
|
35
35
|
import NavWrapper from "../NavWrapper/index.js";
|
|
36
|
-
import { ADD_BANK_ENTRY_MODAL, BANKS_BANK_ENTRY_PAGINATION, CAN_EDIT, REMOVED_ACCESS, READ_ONLY } from '@instructure/quiz-common';
|
|
36
|
+
import { ADD_BANK_ENTRY_MODAL, BANKS_BANK_ENTRY_PAGINATION, CAN_EDIT, REMOVED_ACCESS, READ_ONLY, withStyleOverrides } from '@instructure/quiz-common';
|
|
37
37
|
import generateStyle from "./styles.js";
|
|
38
38
|
import generateComponentTheme from "./theme.js";
|
|
39
39
|
var _ref = jsx(IconMoreSolid, null);
|
|
40
|
-
export var Bank = (_dec =
|
|
40
|
+
export var Bank = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_Bank = /*#__PURE__*/function (_Component) {
|
|
41
41
|
_inherits(Bank, _Component);
|
|
42
42
|
var _super = _createSuper(Bank);
|
|
43
43
|
function Bank() {
|
|
@@ -440,7 +440,7 @@ export var Bank = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
440
440
|
}]);
|
|
441
441
|
Bank.displayName = "Bank";
|
|
442
442
|
return Bank;
|
|
443
|
-
}(Component), _Bank.propTypes = {
|
|
443
|
+
}(Component), _Bank.displayName = 'Bank', _Bank.componentId = "Quizzes".concat(_Bank.displayName), _Bank.propTypes = {
|
|
444
444
|
activeQuizId: PropTypes.string,
|
|
445
445
|
addEntryToQuiz: PropTypes.func,
|
|
446
446
|
bankId: PropTypes.string.isRequired,
|
|
@@ -7,12 +7,13 @@ var _dec, _class, _BankEntriesList;
|
|
|
7
7
|
import { Component } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
10
|
-
import {
|
|
10
|
+
import { jsx } from '@instructure/emotion';
|
|
11
11
|
import Card from "../../../common/components/shared/Card/index.js";
|
|
12
12
|
import BankEntryRow from "../BankEntryRow/index.js";
|
|
13
13
|
import generateStyle from "./styles.js";
|
|
14
14
|
import generateComponentTheme from "./theme.js";
|
|
15
|
-
|
|
15
|
+
import { withStyleOverrides } from '@instructure/quiz-common';
|
|
16
|
+
export var BankEntriesList = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BankEntriesList = /*#__PURE__*/function (_Component) {
|
|
16
17
|
_inherits(BankEntriesList, _Component);
|
|
17
18
|
var _super = _createSuper(BankEntriesList);
|
|
18
19
|
function BankEntriesList() {
|
|
@@ -45,7 +46,7 @@ export var BankEntriesList = (_dec = withStyle(generateStyle, generateComponentT
|
|
|
45
46
|
}]);
|
|
46
47
|
BankEntriesList.displayName = "BankEntriesList";
|
|
47
48
|
return BankEntriesList;
|
|
48
|
-
}(Component), _BankEntriesList.propTypes = {
|
|
49
|
+
}(Component), _BankEntriesList.displayName = 'BankEntriesList', _BankEntriesList.componentId = "Quizzes".concat(_BankEntriesList.displayName), _BankEntriesList.propTypes = {
|
|
49
50
|
addEntryToQuiz: PropTypes.func,
|
|
50
51
|
bank: ImmutablePropTypes.record.isRequired,
|
|
51
52
|
bankEntries: ImmutablePropTypes.list.isRequired,
|
|
@@ -24,7 +24,7 @@ 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
26
|
import { TextInput } from '@instructure/ui-text-input';
|
|
27
|
-
import {
|
|
27
|
+
import { jsx } from '@instructure/emotion';
|
|
28
28
|
import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
|
|
29
29
|
import EntrySave from "../../../common/components/resources/entry/EntrySave/index.js";
|
|
30
30
|
import ItemEdit from "../../../common/components/resources/item/ItemEdit/index.js";
|
|
@@ -41,11 +41,11 @@ import { createItem } from "../../../building/api/items.js";
|
|
|
41
41
|
import { createStimulus } from "../../../building/api/stimuli.js";
|
|
42
42
|
import { propsForItemVersioningWrapper, propsForStimulusVersioningWrapper } from "../../../common/util/warningHelpers.js";
|
|
43
43
|
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 } from '@instructure/quiz-common';
|
|
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';
|
|
45
45
|
import generateStyle from "./styles.js";
|
|
46
46
|
import generateComponentTheme from "./theme.js";
|
|
47
47
|
var _ref3 = jsx(Spinner, null);
|
|
48
|
-
export var BankEntry = (_dec =
|
|
48
|
+
export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BankEntry = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(BankEntry, _Component);
|
|
50
50
|
var _super = _createSuper(BankEntry);
|
|
51
51
|
function BankEntry() {
|
|
@@ -581,7 +581,7 @@ export var BankEntry = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
581
581
|
}]);
|
|
582
582
|
BankEntry.displayName = "BankEntry";
|
|
583
583
|
return BankEntry;
|
|
584
|
-
}(Component), _BankEntry.propTypes = {
|
|
584
|
+
}(Component), _BankEntry.displayName = 'BankEntry', _BankEntry.componentId = "Quizzes".concat(_BankEntry.displayName), _BankEntry.propTypes = {
|
|
585
585
|
bankEntryId: PropTypes.string.isRequired,
|
|
586
586
|
bankId: PropTypes.string.isRequired,
|
|
587
587
|
bank: ImmutablePropTypes.record.isRequired,
|
|
@@ -16,8 +16,8 @@ import { List } from '@instructure/ui-list';
|
|
|
16
16
|
import { Heading } from '@instructure/ui-heading';
|
|
17
17
|
import { PresentationContent } from '@instructure/ui-a11y-content';
|
|
18
18
|
import { Alert } from '@instructure/ui-alerts';
|
|
19
|
-
import {
|
|
20
|
-
import { BUILD_TRAY_POSITION, COPY_MOVE_BANK_ENTRY_MODAL, SET_EDIT_BUTTON_FOCUS, withI18nSupport } from '@instructure/quiz-common';
|
|
19
|
+
import { jsx } from '@instructure/emotion';
|
|
20
|
+
import { BUILD_TRAY_POSITION, COPY_MOVE_BANK_ENTRY_MODAL, SET_EDIT_BUTTON_FOCUS, withI18nSupport, withStyleOverrides } from '@instructure/quiz-common';
|
|
21
21
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
22
22
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
23
23
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -31,7 +31,7 @@ import generateStyle from "./styles.js";
|
|
|
31
31
|
import generateComponentTheme from "./theme.js";
|
|
32
32
|
import Overlay from "../../../common/components/shared/overlay/index.js";
|
|
33
33
|
var _ref2 = jsx("div", null);
|
|
34
|
-
export var BankEntryRow = (_dec =
|
|
34
|
+
export var BankEntryRow = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BankEntryRow = /*#__PURE__*/function (_withI18nSupport) {
|
|
35
35
|
_inherits(BankEntryRow, _withI18nSupport);
|
|
36
36
|
var _super = _createSuper(BankEntryRow);
|
|
37
37
|
function BankEntryRow() {
|
|
@@ -341,7 +341,7 @@ export var BankEntryRow = (_dec = withStyle(generateStyle, generateComponentThem
|
|
|
341
341
|
}]);
|
|
342
342
|
BankEntryRow.displayName = "BankEntryRow";
|
|
343
343
|
return BankEntryRow;
|
|
344
|
-
}(withI18nSupport(Component)), _BankEntryRow.propTypes = {
|
|
344
|
+
}(withI18nSupport(Component)), _BankEntryRow.displayName = 'BankEntryRow', _BankEntryRow.componentId = "Quizzes".concat(_BankEntryRow.displayName), _BankEntryRow.propTypes = {
|
|
345
345
|
activeQuizId: PropTypes.string,
|
|
346
346
|
addEntryToQuiz: PropTypes.func,
|
|
347
347
|
bankEntry: ImmutablePropTypes.record.isRequired,
|
|
@@ -16,12 +16,13 @@ import { View } from '@instructure/ui-view';
|
|
|
16
16
|
import { Flex } from '@instructure/ui-flex';
|
|
17
17
|
import { Text } from '@instructure/ui-text';
|
|
18
18
|
import { AccessibleContent, ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
19
|
-
import {
|
|
19
|
+
import { jsx } from '@instructure/emotion';
|
|
20
20
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
21
21
|
import TagSuggestSelect from "../../../common/components/shared/TagSuggestSelect/index.js";
|
|
22
22
|
import { interactionTypesNameDictionary } from "../../../common/util/interactionTypeMetadata.js";
|
|
23
23
|
import generateStyle from "./styles.js";
|
|
24
24
|
import generateComponentTheme from "./theme.js";
|
|
25
|
+
import { withStyleOverrides } from '@instructure/quiz-common';
|
|
25
26
|
var tagShape = PropTypes.shape({
|
|
26
27
|
tag: PropTypes.shape({
|
|
27
28
|
id: PropTypes.string,
|
|
@@ -29,7 +30,7 @@ var tagShape = PropTypes.shape({
|
|
|
29
30
|
}).isRequired,
|
|
30
31
|
count: PropTypes.number.isRequired
|
|
31
32
|
});
|
|
32
|
-
export var BankSearch = (_dec =
|
|
33
|
+
export var BankSearch = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BankSearch = /*#__PURE__*/function (_Component) {
|
|
33
34
|
_inherits(BankSearch, _Component);
|
|
34
35
|
var _super = _createSuper(BankSearch);
|
|
35
36
|
function BankSearch() {
|
|
@@ -156,7 +157,7 @@ export var BankSearch = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
156
157
|
}]);
|
|
157
158
|
BankSearch.displayName = "BankSearch";
|
|
158
159
|
return BankSearch;
|
|
159
|
-
}(Component), _BankSearch.propTypes = {
|
|
160
|
+
}(Component), _BankSearch.displayName = 'BankSearch', _BankSearch.componentId = "Quizzes".concat(_BankSearch.displayName), _BankSearch.propTypes = {
|
|
160
161
|
allInteractions: PropTypes.bool,
|
|
161
162
|
interactionTypes: PropTypes.arrayOf(PropTypes.shape({
|
|
162
163
|
count: PropTypes.number,
|
|
@@ -16,7 +16,7 @@ import { Billboard } from '@instructure/ui-billboard';
|
|
|
16
16
|
import { Button } from '@instructure/ui-buttons';
|
|
17
17
|
import { TextInput } from '@instructure/ui-text-input';
|
|
18
18
|
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
19
|
-
import {
|
|
19
|
+
import { jsx } from '@instructure/emotion';
|
|
20
20
|
import { Grid } from '@instructure/ui-grid';
|
|
21
21
|
import { View } from '@instructure/ui-view';
|
|
22
22
|
import debounce from 'lodash/fp/debounce';
|
|
@@ -24,7 +24,7 @@ import Page from "../../../common/components/layout/Page/index.js";
|
|
|
24
24
|
import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
|
|
25
25
|
import PaginatedCollection from "../../../common/components/shared/PaginatedCollection/index.js";
|
|
26
26
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
27
|
-
import { BANKS_BANK_FILTERS, BANKS_BANK_PAGINATION, CREATE_BANK_MODAL, SHARED_WITH_ACCOUNT } from '@instructure/quiz-common';
|
|
27
|
+
import { BANKS_BANK_FILTERS, BANKS_BANK_PAGINATION, CREATE_BANK_MODAL, SHARED_WITH_ACCOUNT, withStyleOverrides } from '@instructure/quiz-common';
|
|
28
28
|
import BanksList from "../../../banks/components/BanksList/index.js";
|
|
29
29
|
import CreateBankModal from "../../../banks/components/CreateBankModal/index.js";
|
|
30
30
|
import NavWrapper from "../NavWrapper/index.js";
|
|
@@ -39,7 +39,7 @@ var sortOrderIcons = {
|
|
|
39
39
|
var _ref4 = jsx(Img, {
|
|
40
40
|
src: noResults
|
|
41
41
|
});
|
|
42
|
-
export var Banks = (_dec =
|
|
42
|
+
export var Banks = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_Banks = /*#__PURE__*/function (_Component) {
|
|
43
43
|
_inherits(Banks, _Component);
|
|
44
44
|
var _super = _createSuper(Banks);
|
|
45
45
|
function Banks(props) {
|
|
@@ -429,7 +429,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
429
429
|
}]);
|
|
430
430
|
Banks.displayName = "Banks";
|
|
431
431
|
return Banks;
|
|
432
|
-
}(Component), _Banks.propTypes = {
|
|
432
|
+
}(Component), _Banks.displayName = 'Banks', _Banks.componentId = "Quizzes".concat(_Banks.displayName), _Banks.propTypes = {
|
|
433
433
|
closeTray: PropTypes.func,
|
|
434
434
|
createBank: PropTypes.func.isRequired,
|
|
435
435
|
currentUser: PropTypes.shape({
|
|
@@ -20,8 +20,8 @@ import { IconEditLine, IconTrashLine, IconShareSolid, IconCopyLine } from '@inst
|
|
|
20
20
|
import { Alert } from '@instructure/ui-alerts';
|
|
21
21
|
import { Spinner } from '@instructure/ui-spinner';
|
|
22
22
|
import { Table } from '@instructure/ui-table';
|
|
23
|
-
import {
|
|
24
|
-
import { EDIT_BANK_MODAL, withI18nSupport } from '@instructure/quiz-common';
|
|
23
|
+
import { jsx } from '@instructure/emotion';
|
|
24
|
+
import { EDIT_BANK_MODAL, withI18nSupport, withStyleOverrides } from '@instructure/quiz-common';
|
|
25
25
|
import CustomPropTypes from "../../../common/util/CustomPropTypes.js";
|
|
26
26
|
import IfFeature from "../../../common/components/shared/IfFeature/index.js";
|
|
27
27
|
import EditBankModal from "../EditBankModal/index.js";
|
|
@@ -33,7 +33,7 @@ var _ref4 = jsx(Table.Cell, null);
|
|
|
33
33
|
var _ref5 = jsx(Table.Cell, null);
|
|
34
34
|
var _ref6 = jsx(Table.Cell, null);
|
|
35
35
|
var _ref7 = jsx(Table.Cell, null);
|
|
36
|
-
export var BanksList = (_dec =
|
|
36
|
+
export var BanksList = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BanksList = /*#__PURE__*/function (_withI18nSupport) {
|
|
37
37
|
_inherits(BanksList, _withI18nSupport);
|
|
38
38
|
var _super = _createSuper(BanksList);
|
|
39
39
|
function BanksList() {
|
|
@@ -461,7 +461,7 @@ export var BanksList = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
461
461
|
}]);
|
|
462
462
|
BanksList.displayName = "BanksList";
|
|
463
463
|
return BanksList;
|
|
464
|
-
}(withI18nSupport(Component)), _BanksList.propTypes = {
|
|
464
|
+
}(withI18nSupport(Component)), _BanksList.displayName = 'BanksList', _BanksList.componentId = "Quizzes".concat(_BanksList.displayName), _BanksList.propTypes = {
|
|
465
465
|
addInfo: PropTypes.func.isRequired,
|
|
466
466
|
addToPolling: PropTypes.func.isRequired,
|
|
467
467
|
appContainer: CustomPropTypes.selectors.isRequired,
|
|
@@ -5,15 +5,11 @@ import CopyMoveBankModal from "./presenter.js";
|
|
|
5
5
|
import * as modalActions from "../../../common/actions/modal.js";
|
|
6
6
|
import { disassociateEntry } from "../../../common/actions/banks.js";
|
|
7
7
|
import * as uiActions from "../../../common/actions/ui.js";
|
|
8
|
-
import
|
|
9
|
-
import { COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, COPY_MOVE_BANK_ENTRY_MODAL_BANK_SELECTION, COPY_MOVE_BANK_ENTRY_MODAL } from '@instructure/quiz-common';
|
|
8
|
+
import { COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, COPY_MOVE_BANK_ENTRY_MODAL } from '@instructure/quiz-common';
|
|
10
9
|
import { getModalTrigger } from "../../../common/util/modalHelpers.js";
|
|
11
10
|
export function mapStateToProps(state, props) {
|
|
12
|
-
var selectedBankOption = state.getIn(['ui', COPY_MOVE_BANK_ENTRY_MODAL_BANK_SELECTION]);
|
|
13
|
-
var selectedBank = selectedBankOption && new Bank(state.getIn(['banks', selectedBankOption]));
|
|
14
11
|
var modalKey = [COPY_MOVE_BANK_ENTRY_MODAL, props.entryType, props.entryId].join(':');
|
|
15
12
|
return {
|
|
16
|
-
selectedBank: selectedBank,
|
|
17
13
|
modalTrigger: getModalTrigger(state),
|
|
18
14
|
keepCopy: state.getIn(['ui', COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY], true),
|
|
19
15
|
modalOpen: state.getIn(['modal', 'isOpen']) === modalKey
|
|
@@ -4,7 +4,6 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
8
7
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
9
8
|
import { TextInput } from '@instructure/ui-text-input';
|
|
10
9
|
import { RadioInputGroup, RadioInput } from '@instructure/ui-radio-input';
|
|
@@ -13,8 +12,8 @@ import { Heading } from '@instructure/ui-heading';
|
|
|
13
12
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
14
13
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
14
|
import Bank from "../../../common/records/Bank.js";
|
|
16
|
-
import BankSelection from "../../../common/components/resources/BankSelection/
|
|
17
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter,
|
|
15
|
+
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';
|
|
18
17
|
import { featureOn } from "../../../common/util/featureCheck.js";
|
|
19
18
|
var _ref = /*#__PURE__*/React.createElement("br", null);
|
|
20
19
|
var _ref2 = /*#__PURE__*/React.createElement("br", null);
|
|
@@ -30,7 +29,8 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
|
|
|
30
29
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
31
30
|
_this.state = {
|
|
32
31
|
bankType: 'existing',
|
|
33
|
-
newBankTitle: ''
|
|
32
|
+
newBankTitle: '',
|
|
33
|
+
selectedBank: null
|
|
34
34
|
};
|
|
35
35
|
_this.copyOrMove = function (newBankId) {
|
|
36
36
|
if (_this.props.keepCopy) {
|
|
@@ -50,7 +50,7 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
|
|
|
50
50
|
_this.copyOrMove(bankData.id);
|
|
51
51
|
});
|
|
52
52
|
} else {
|
|
53
|
-
_this.copyOrMove(_this.
|
|
53
|
+
_this.copyOrMove(_this.state.selectedBank.id);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
_this.initiateMove = function (newBankId) {
|
|
@@ -87,7 +87,9 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
|
|
|
87
87
|
_this.props.closeModal();
|
|
88
88
|
};
|
|
89
89
|
_this.onBankSelection = function (e, option) {
|
|
90
|
-
_this.
|
|
90
|
+
_this.setState({
|
|
91
|
+
selectedBank: new Bank(option)
|
|
92
|
+
});
|
|
91
93
|
};
|
|
92
94
|
_this.onKeepCopyChange = function (e) {
|
|
93
95
|
_this.props.uiSet(COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, e.target.checked);
|
|
@@ -118,7 +120,7 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
|
|
|
118
120
|
var _this$state = this.state,
|
|
119
121
|
bankType = _this$state.bankType,
|
|
120
122
|
newBankTitle = _this$state.newBankTitle;
|
|
121
|
-
var disabled = bankType === 'existing' && !this.
|
|
123
|
+
var disabled = bankType === 'existing' && !this.state.selectedBank || bankType === 'new' && (!newBankTitle || !newBankTitle.trim());
|
|
122
124
|
return /*#__PURE__*/React.createElement(Button, {
|
|
123
125
|
color: "primary",
|
|
124
126
|
onClick: this.continueAction,
|
|
@@ -133,7 +135,7 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
|
|
|
133
135
|
if (this.state.bankType === 'existing') {
|
|
134
136
|
return /*#__PURE__*/React.createElement(BankSelection, {
|
|
135
137
|
onBankSelection: this.onBankSelection,
|
|
136
|
-
selectedBank: this.
|
|
138
|
+
selectedBank: this.state.selectedBank,
|
|
137
139
|
"data-automation": "sdk-bank-selection"
|
|
138
140
|
});
|
|
139
141
|
}
|
|
@@ -207,7 +209,6 @@ CopyMoveBankEntryModal.propTypes = {
|
|
|
207
209
|
modalOpen: PropTypes.bool.isRequired,
|
|
208
210
|
modalTrigger: PropTypes.instanceOf(Component),
|
|
209
211
|
onAdd: PropTypes.func,
|
|
210
|
-
selectedBank: ImmutablePropTypes.record,
|
|
211
212
|
sourceBankEntryId: PropTypes.string.isRequired,
|
|
212
213
|
sourceBankId: PropTypes.string.isRequired,
|
|
213
214
|
uiSet: PropTypes.func.isRequired,
|
|
@@ -220,7 +221,6 @@ CopyMoveBankEntryModal.contextTypes = {
|
|
|
220
221
|
CopyMoveBankEntryModal.defaultProps = {
|
|
221
222
|
keepCopy: true,
|
|
222
223
|
modalTrigger: null,
|
|
223
|
-
onAdd: function onAdd() {}
|
|
224
|
-
selectedBank: null
|
|
224
|
+
onAdd: function onAdd() {}
|
|
225
225
|
};
|
|
226
226
|
export default CopyMoveBankEntryModal;
|
|
@@ -11,14 +11,14 @@ import { Checkbox } from '@instructure/ui-checkbox';
|
|
|
11
11
|
import { View } from '@instructure/ui-view';
|
|
12
12
|
import { TextInput } from '@instructure/ui-text-input';
|
|
13
13
|
import { Heading } from '@instructure/ui-heading';
|
|
14
|
-
import {
|
|
14
|
+
import { jsx } from '@instructure/emotion';
|
|
15
15
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
16
16
|
import Bank from "../../../common/records/Bank.js";
|
|
17
17
|
import { toErrors } from "../../../common/util/instUIMessages.js";
|
|
18
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
18
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
|
|
19
19
|
import generateStyle from "./styles.js";
|
|
20
20
|
import generateComponentTheme from "./theme.js";
|
|
21
|
-
export var CreateBankModal = (_dec =
|
|
21
|
+
export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_CreateBankModal = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(CreateBankModal, _Component);
|
|
23
23
|
var _super = _createSuper(CreateBankModal);
|
|
24
24
|
function CreateBankModal() {
|
|
@@ -147,7 +147,7 @@ export var CreateBankModal = (_dec = withStyle(generateStyle, generateComponentT
|
|
|
147
147
|
}]);
|
|
148
148
|
CreateBankModal.displayName = "CreateBankModal";
|
|
149
149
|
return CreateBankModal;
|
|
150
|
-
}(Component), _CreateBankModal.propTypes = {
|
|
150
|
+
}(Component), _CreateBankModal.displayName = 'CreateBankModal', _CreateBankModal.componentId = "Quizzes".concat(_CreateBankModal.displayName), _CreateBankModal.propTypes = {
|
|
151
151
|
modalOpen: PropTypes.bool.isRequired,
|
|
152
152
|
modalTrigger: PropTypes.instanceOf(Component),
|
|
153
153
|
temporaryBank: PropTypes.instanceOf(Bank).isRequired,
|
|
@@ -9,14 +9,14 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
10
10
|
import { TextInput } from '@instructure/ui-text-input';
|
|
11
11
|
import { Heading } from '@instructure/ui-heading';
|
|
12
|
-
import {
|
|
12
|
+
import { jsx } from '@instructure/emotion';
|
|
13
13
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
14
14
|
import { toErrors } from "../../../common/util/instUIMessages.js";
|
|
15
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
15
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
|
|
16
16
|
import Bank from "../../../common/records/Bank.js";
|
|
17
17
|
import generateStyle from "./styles.js";
|
|
18
18
|
import generateComponentTheme from "./theme.js";
|
|
19
|
-
export var EditBankModal = (_dec =
|
|
19
|
+
export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_EditBankModal = /*#__PURE__*/function (_Component) {
|
|
20
20
|
_inherits(EditBankModal, _Component);
|
|
21
21
|
var _super = _createSuper(EditBankModal);
|
|
22
22
|
function EditBankModal() {
|
|
@@ -110,7 +110,7 @@ export var EditBankModal = (_dec = withStyle(generateStyle, generateComponentThe
|
|
|
110
110
|
}]);
|
|
111
111
|
EditBankModal.displayName = "EditBankModal";
|
|
112
112
|
return EditBankModal;
|
|
113
|
-
}(Component), _EditBankModal.propTypes = {
|
|
113
|
+
}(Component), _EditBankModal.displayName = 'EditBankModal', _EditBankModal.componentId = "Quizzes".concat(_EditBankModal.displayName), _EditBankModal.propTypes = {
|
|
114
114
|
modalOpen: PropTypes.bool.isRequired,
|
|
115
115
|
modalTrigger: PropTypes.instanceOf(Component),
|
|
116
116
|
workingBank: PropTypes.instanceOf(Bank).isRequired,
|
|
@@ -13,16 +13,16 @@ import { IconButton } from '@instructure/ui-buttons';
|
|
|
13
13
|
import { TopNavBar } from '@instructure/ui-top-nav-bar';
|
|
14
14
|
import { Drilldown } from '@instructure/ui-drilldown';
|
|
15
15
|
import { IconMoreSolid, IconImportLine } from '@instructure/ui-icons';
|
|
16
|
-
import {
|
|
16
|
+
import { jsx } from '@instructure/emotion';
|
|
17
17
|
import QTIImportModal from "../../../building/components/QTIImportModal/index.js";
|
|
18
|
-
import { PARENT_TYPE_BANK } from '@instructure/quiz-common';
|
|
18
|
+
import { PARENT_TYPE_BANK, withStyleOverrides } from '@instructure/quiz-common';
|
|
19
19
|
import generateStyle from "./styles.js";
|
|
20
20
|
import generateComponentTheme from "./theme.js";
|
|
21
21
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
22
22
|
var _ref = jsx(IconImportLine, {
|
|
23
23
|
"data-automation": "sdk-headermenu-import-content"
|
|
24
24
|
});
|
|
25
|
-
export var HeaderMenu = (_dec =
|
|
25
|
+
export var HeaderMenu = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_HeaderMenu = /*#__PURE__*/function (_Component) {
|
|
26
26
|
_inherits(HeaderMenu, _Component);
|
|
27
27
|
var _super = _createSuper(HeaderMenu);
|
|
28
28
|
function HeaderMenu() {
|
|
@@ -85,7 +85,7 @@ export var HeaderMenu = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
85
85
|
}]);
|
|
86
86
|
HeaderMenu.displayName = "HeaderMenu";
|
|
87
87
|
return HeaderMenu;
|
|
88
|
-
}(Component), _HeaderMenu.propTypes = {
|
|
88
|
+
}(Component), _HeaderMenu.displayName = 'HeaderMenu', _HeaderMenu.componentId = "Quizzes".concat(_HeaderMenu.displayName), _HeaderMenu.propTypes = {
|
|
89
89
|
openImportModal: PropTypes.func.isRequired,
|
|
90
90
|
bank: ImmutablePropTypes.record.isRequired,
|
|
91
91
|
iceTopNavBarEnabled: PropTypes.bool,
|
|
@@ -16,11 +16,12 @@ import { CloseButton, Button } from '@instructure/ui-buttons';
|
|
|
16
16
|
import { BreadcrumbLink } from '@instructure/ui-breadcrumb';
|
|
17
17
|
import { IconBankLine } from '@instructure/ui-icons';
|
|
18
18
|
import { View } from '@instructure/ui-view';
|
|
19
|
-
import {
|
|
19
|
+
import { jsx, Global } from '@instructure/emotion';
|
|
20
20
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
21
21
|
import generateStyle from "./styles.js";
|
|
22
22
|
import generateComponentTheme from "./theme.js";
|
|
23
|
-
|
|
23
|
+
import { withStyleOverrides } from '@instructure/quiz-common';
|
|
24
|
+
var NavWrapper = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_NavWrapper = /*#__PURE__*/function (_Component) {
|
|
24
25
|
_inherits(NavWrapper, _Component);
|
|
25
26
|
var _super = _createSuper(NavWrapper);
|
|
26
27
|
function NavWrapper() {
|
|
@@ -129,7 +130,7 @@ var NavWrapper = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
|
|
|
129
130
|
}]);
|
|
130
131
|
NavWrapper.displayName = "NavWrapper";
|
|
131
132
|
return NavWrapper;
|
|
132
|
-
}(Component), _NavWrapper.propTypes = {
|
|
133
|
+
}(Component), _NavWrapper.displayName = 'NavWrapper', _NavWrapper.componentId = "Quizzes".concat(_NavWrapper.displayName), _NavWrapper.propTypes = {
|
|
133
134
|
children: Children.oneOf([BreadcrumbLink]),
|
|
134
135
|
closeTray: PropTypes.func,
|
|
135
136
|
navigateToBanks: PropTypes.func,
|
|
@@ -5,14 +5,13 @@ 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 { CAN_EDIT, READ_ONLY } from '@instructure/quiz-common';
|
|
8
|
+
import { withStyleOverrides, CAN_EDIT, READ_ONLY } 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
14
|
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
15
|
-
import { withStyle } from '@instructure/emotion';
|
|
16
15
|
import generateStyle from "./styles.js";
|
|
17
16
|
import generateComponentTheme from "./theme.js";
|
|
18
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -21,7 +20,7 @@ var _ref = /*#__PURE__*/React.createElement(Grid.Col, {
|
|
|
21
20
|
}, /*#__PURE__*/React.createElement(IconAdminLine, {
|
|
22
21
|
size: "medium"
|
|
23
22
|
}));
|
|
24
|
-
export var RootAccountSharing = (_dec =
|
|
23
|
+
export var RootAccountSharing = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_RootAccountSharing = /*#__PURE__*/function (_Component) {
|
|
25
24
|
_inherits(RootAccountSharing, _Component);
|
|
26
25
|
var _super = _createSuper(RootAccountSharing);
|
|
27
26
|
function RootAccountSharing() {
|
|
@@ -71,7 +70,7 @@ export var RootAccountSharing = (_dec = withStyle(generateStyle, generateCompone
|
|
|
71
70
|
}]);
|
|
72
71
|
RootAccountSharing.displayName = "RootAccountSharing";
|
|
73
72
|
return RootAccountSharing;
|
|
74
|
-
}(Component), _RootAccountSharing.propTypes = {
|
|
73
|
+
}(Component), _RootAccountSharing.displayName = 'RootAccountSharing', _RootAccountSharing.componentId = "Quizzes".concat(_RootAccountSharing.displayName), _RootAccountSharing.propTypes = {
|
|
75
74
|
accountName: PropTypes.string,
|
|
76
75
|
onShareChange: PropTypes.func.isRequired,
|
|
77
76
|
onShareTypeChange: PropTypes.func.isRequired,
|
|
@@ -13,15 +13,15 @@ import { Grid } from '@instructure/ui-grid';
|
|
|
13
13
|
import { Avatar } from '@instructure/ui-avatar';
|
|
14
14
|
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
15
15
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
16
|
-
import {
|
|
17
|
-
import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_COURSE } from '@instructure/quiz-common';
|
|
16
|
+
import { jsx } from '@instructure/emotion';
|
|
17
|
+
import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_COURSE, withStyleOverrides } from '@instructure/quiz-common';
|
|
18
18
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
19
19
|
import { ContextualIconButton } from "../ContextualIconButton/index.js";
|
|
20
20
|
import generateStyle from "./styles.js";
|
|
21
21
|
var _ref3 = jsx(IconCoursesLine, {
|
|
22
22
|
size: "small"
|
|
23
23
|
});
|
|
24
|
-
export var ShareList = (_dec =
|
|
24
|
+
export var ShareList = (_dec = withStyleOverrides(generateStyle, null), _dec(_class = (_ShareList = /*#__PURE__*/function (_Component) {
|
|
25
25
|
_inherits(ShareList, _Component);
|
|
26
26
|
var _super = _createSuper(ShareList);
|
|
27
27
|
function ShareList() {
|
|
@@ -109,7 +109,7 @@ export var ShareList = (_dec = withStyle(generateStyle, null), _dec(_class = (_S
|
|
|
109
109
|
}]);
|
|
110
110
|
ShareList.displayName = "ShareList";
|
|
111
111
|
return ShareList;
|
|
112
|
-
}(Component), _ShareList.propTypes = {
|
|
112
|
+
}(Component), _ShareList.displayName = 'ShareList', _ShareList.componentId = "Quizzes".concat(_ShareList.displayName), _ShareList.propTypes = {
|
|
113
113
|
canEdit: PropTypes.bool.isRequired,
|
|
114
114
|
entities: ImmutablePropTypes.listOf(ImmutablePropTypes.contains({
|
|
115
115
|
entityType: PropTypes.string.isRequired,
|