@instructure/quiz-core 22.17.0 → 22.18.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/appDispatch.js +5 -0
- package/es/banks/api/bankEntries.js +14 -8
- package/es/banks/api/banks.js +41 -31
- package/es/banks/api/tagAssociations.js +9 -9
- package/es/banks/components/AddBankEntryModal/index.js +2 -5
- package/es/banks/components/AddBankEntryModal/presenter.js +2 -1
- package/es/banks/components/AddToBankModal/index.js +6 -6
- package/es/banks/components/AddToBankModal/presenter.js +6 -4
- package/es/banks/components/AsyncSearch/index.js +2 -1
- package/es/banks/components/Bank/index.js +12 -23
- package/es/banks/components/Bank/presenter.js +2 -1
- package/es/banks/components/BankEntriesList/index.js +1 -4
- package/es/banks/components/BankEntriesList/presenter.js +1 -1
- package/es/banks/components/BankEntry/index.js +12 -25
- package/es/banks/components/BankEntry/presenter.js +603 -747
- package/es/banks/components/BankEntryRow/index.js +10 -25
- package/es/banks/components/BankEntryRow/presenter.js +5 -3
- package/es/banks/components/BankSearch/index.js +6 -14
- package/es/banks/components/BankSearch/presenter.js +3 -1
- package/es/banks/components/Banks/index.js +9 -13
- package/es/banks/components/Banks/presenter.js +4 -1
- package/es/banks/components/BanksList/index.js +2 -8
- package/es/banks/components/BanksList/presenter.js +3 -1
- package/es/banks/components/CopyMoveBankEntryModal/index.js +6 -9
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +7 -5
- package/es/banks/components/CreateBankModal/index.js +9 -13
- package/es/banks/components/CreateBankModal/presenter.js +3 -1
- package/es/banks/components/EditBankModal/index.js +4 -6
- package/es/banks/components/EditBankModal/presenter.js +3 -1
- package/es/banks/components/HeaderMenu/presenter.js +2 -1
- package/es/banks/components/NavWrapper/index.js +2 -5
- package/es/banks/components/NavWrapper/presenter.js +1 -1
- package/es/banks/components/SharingModal/RootAccountSharing.js +3 -1
- package/es/banks/components/SharingModal/ShareList/index.js +3 -1
- package/es/banks/components/SharingModal/index.js +3 -5
- package/es/banks/components/SharingModal/presenter.js +545 -583
- package/es/building/api/items.js +7 -7
- package/es/building/api/qtiImports.js +15 -8
- package/es/building/api/quizEntries.js +38 -30
- package/es/building/api/quizzes.js +16 -13
- package/es/building/api/stimuli.js +4 -4
- package/es/building/components/QTIImportModal/index.js +2 -2
- package/es/building/components/layout/Sidebar/SidebarItem/index.js +75 -21
- package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +1 -1
- package/es/building/components/layout/Sidebar/Stimulus/index.js +75 -25
- package/es/building/components/layout/Sidebar/Stimulus/presenter.js +1 -1
- package/es/building/components/layout/Sidebar/index.js +68 -9
- package/es/building/components/layout/Sidebar/presenter.js +3 -2
- package/es/building/components/layout/header/BuildingButtons/index.js +6 -8
- package/es/building/components/layout/header/BuildingButtons/presenter.js +2 -1
- package/es/building/components/layout/header/SDKBuildingButtons/index.js +6 -5
- package/es/building/components/resources/ActionButtons/index.js +6 -5
- package/es/building/components/resources/ActionButtons/presenter.js +3 -2
- package/es/building/components/resources/AddToBankOptions/index.js +78 -182
- package/es/building/components/resources/BanksTray/index.js +6 -21
- package/es/building/components/resources/BanksTray/presenter.js +2 -1
- package/es/building/components/resources/DeleteStimulusModal/index.js +5 -17
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +4 -2
- package/es/building/components/resources/ItemFeedbackModal/index.js +4 -13
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +4 -2
- package/es/building/components/resources/MoveImmutableModal/index.js +4 -13
- package/es/building/components/resources/MoveImmutableModal/presenter.js +2 -1
- package/es/building/components/resources/quiz/instructions/Edit/index.js +1 -4
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +3 -2
- package/es/building/components/resources/quiz/instructions/Instructions/index.js +4 -3
- package/es/building/components/resources/quiz/instructions/Instructions/presenter.js +2 -2
- package/es/building/components/resources/quiz/instructions/Show/index.js +2 -2
- package/es/building/components/resources/quiz/instructions/Show/styles.js +3 -1
- package/es/building/components/resources/quiz/title/Edit/index.js +2 -1
- package/es/building/components/resources/quiz/title/Show/index.js +1 -1
- package/es/building/components/resources/quiz/title/Title/index.js +4 -3
- package/es/building/components/resources/quiz/title/Title/presenter.js +2 -2
- package/es/building/components/resources/quizEntry/QuizEntry/index.js +78 -25
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +2 -1
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +183 -40
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +1 -1
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +168 -299
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +3 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +5 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/index.js +15 -29
- package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +374 -441
- package/es/building/components/resources/quizEntry/QuizEntryShow/components/LeftHeader.js +1 -1
- package/es/building/components/resources/quizEntry/QuizEntryShow/index.js +14 -28
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +13 -12
- package/es/common/actions/addInteractionTypes.js +1 -1
- package/es/common/actions/alerts.js +1 -1
- package/es/common/actions/analyses.js +1 -1
- package/es/common/actions/bankEntries.js +1 -1
- package/es/common/actions/bankSearch.js +1 -1
- package/es/common/actions/banks.js +1 -1
- package/es/common/actions/config.js +19 -1
- package/es/common/actions/dragAndDrop.js +1 -1
- package/es/common/actions/editing.js +1 -1
- package/es/common/actions/errorsShowing.js +1 -1
- package/es/common/actions/features.js +1 -1
- package/es/common/actions/grading.js +1 -1
- package/es/common/actions/items.js +1 -1
- package/es/common/actions/modal.js +1 -1
- package/es/common/actions/moderation.js +1 -1
- package/es/common/actions/modifications.js +2 -2
- package/es/common/actions/outcomes.js +1 -1
- package/es/common/actions/postMessage.js +1 -1
- package/es/common/actions/printing.js +1 -1
- package/es/common/actions/qtiImports.js +1 -1
- package/es/common/actions/quizEntries.js +1 -1
- package/es/common/actions/quizExport.js +1 -1
- package/es/common/actions/quizSessionEvents.js +1 -1
- package/es/common/actions/quizSessionResults.js +1 -1
- package/es/common/actions/quizSessions.js +13 -11
- package/es/common/actions/quizzes.js +1 -1
- package/es/common/actions/rce.js +1 -1
- package/es/common/actions/regrading.js +1 -1
- package/es/common/actions/reporting.js +1 -1
- package/es/common/actions/scrolling.js +1 -1
- package/es/common/actions/sessionItemResults.js +1 -1
- package/es/common/actions/sessionItems.js +1 -1
- package/es/common/actions/sharedBanks.js +1 -1
- package/es/common/actions/sharingModal.js +1 -1
- package/es/common/actions/sidebar.js +1 -1
- package/es/common/actions/stimuli.js +1 -1
- package/es/common/actions/tagAssociations.js +1 -1
- package/es/common/actions/taking.js +1 -1
- package/es/common/actions/ui.js +1 -1
- package/es/common/actions/upload.js +1 -1
- package/es/common/api/features.js +11 -2
- package/es/common/api/fileUpload.js +8 -2
- package/es/common/api/helpers.js +1 -1
- package/es/common/api/interactionTypes.js +2 -2
- package/es/common/api/quizSessions.js +129 -106
- package/es/common/api/quizzes.js +6 -5
- package/es/common/components/ApiFeatureFlagInitializer/index.js +3 -6
- package/es/common/components/ConfirmationModal/index.js +1 -1
- package/es/common/components/ConfirmationModal/presenter.js +7 -4
- package/es/common/components/ImportModal/ImportFileSelector/index.js +1 -1
- package/es/common/components/ImportModal/index.js +6 -18
- package/es/common/components/ImportModal/presenter.js +5 -1
- package/es/common/components/MaskedTextInput/index.js +1 -1
- package/es/common/components/ModuleNavigationButtons/index.js +32 -0
- package/es/common/components/PreviewFrame/index.js +1 -1
- package/es/common/components/PrintFontSizeModal/presenter.js +164 -225
- package/es/common/components/RceConfigProvider/index.js +3 -2
- package/es/common/components/RceConfigProvider/presenter.js +12 -9
- package/es/common/components/RceConfigProvider/rceConfigErrorHandler.js +7 -8
- package/es/common/components/RceConfigProvider/rceConfigErrorMessages.js +1 -1
- package/es/common/components/RceConfigProvider/rceConfigMapper.js +1 -1
- package/es/common/components/SDKApp/index.js +276 -225
- package/es/common/components/SDKHeaderCalculator.js +6 -5
- package/es/common/components/SDKMenuButton.js +6 -5
- package/es/common/components/SDKNavBar.js +6 -5
- package/es/common/components/SDKTimer.js +6 -5
- package/es/common/components/TimingAlerts/presenter.js +3 -3
- package/es/common/components/alerts/index.js +2 -1
- package/es/common/components/alerts/presenter.js +1 -1
- package/es/common/components/alerts/styles.js +1 -1
- package/es/common/components/layout/Page/index.js +1 -1
- package/es/common/components/layout/Page/styles.js +3 -0
- package/es/common/components/layout/header/Calculator/presenter.js +2 -2
- package/es/common/components/layout/header/HeaderMenuButton/index.js +1 -4
- package/es/common/components/layout/header/HeaderMenuButton/presenter.js +1 -1
- package/es/common/components/layout/header/Timer/presenter.js +1 -1
- package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +28 -2
- package/es/common/components/layout/navbar/index.js +1 -1
- package/es/common/components/layout/sidebar/PositionSummary/index.js +1 -1
- package/es/common/components/layout/sidebar/Sidebar/index.js +5 -4
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +6 -4
- package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +1 -1
- package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +1 -1
- package/es/common/components/layout/sidebar/Stimulus/Title/index.js +1 -1
- package/es/common/components/layout/sidebar/Stimulus/index.js +1 -4
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +4 -2
- package/es/common/components/resources/BankSelection/index.js +3 -9
- package/es/common/components/resources/QuizSessionResult/QuizSessionResultHeader/index.js +1 -1
- package/es/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/LetterGrade.js +2 -2
- package/es/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/PointsDisplay.js +3 -3
- package/es/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/Progress.js +4 -4
- package/es/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/index.js +3 -3
- package/es/common/components/resources/QuizSessionResult/QuizSessionResultInfo/index.js +1 -1
- package/es/common/components/resources/WarningWrapper/index.js +1 -1
- package/es/common/components/resources/entry/EntrySave/presenter.js +174 -240
- package/es/common/components/resources/item/ItemEdit/index.js +17 -28
- package/es/common/components/resources/item/ItemEdit/presenter.js +3 -1
- package/es/common/components/resources/item/ItemOverride/index.js +8 -5
- package/es/common/components/resources/item/ItemOverride/presenter.js +1 -1
- package/es/common/components/resources/item/ItemShow/index.js +1 -1
- package/es/common/components/resources/positionBox/PositionBox.js +1 -1
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +2 -1
- package/es/common/components/resources/quiz/AddContent/Button/index.js +2 -1
- package/es/common/components/resources/quiz/AddContent/Modal/index.js +3 -9
- package/es/common/components/resources/quiz/AddContent/Modal/presenter.js +1 -1
- package/es/common/components/resources/quiz/AddContent/Popover/index.js +3 -9
- package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +2 -1
- package/es/common/components/resources/quiz/info/QuizInfo.js +1 -1
- package/es/common/components/resources/quiz/instructions/Instructions.js +2 -2
- package/es/common/components/resources/quiz/instructions/styles.js +3 -1
- package/es/common/components/resources/quiz/title/Title.js +1 -1
- package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +2 -2
- package/es/common/components/resources/sessionItemResult/SessionItemResult/components/SessionItemResultHeader.js +1 -1
- package/es/common/components/resources/sessionItemResult/SessionItemResult/index.js +7 -7
- package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +19 -5
- package/es/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +1 -1
- package/es/common/components/resources/stimulus/Stimulus/index.js +8 -15
- package/es/common/components/resources/stimulus/Stimulus/presenter.js +12 -4
- package/es/common/components/resources/stimulus/Stimulus/styles.js +1 -1
- package/es/common/components/resources/stimulus/StimulusEdit/index.js +5 -10
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +2 -1
- package/es/common/components/resources/stimulus/StimulusEditInfo/index.js +4 -6
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +7 -2
- package/es/common/components/resources/stimulus/StimulusShow/index.js +2 -1
- package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +1 -1
- package/es/common/components/shared/Card/CardContent/index.js +1 -1
- package/es/common/components/shared/Card/CardWrapper/index.js +1 -1
- package/es/common/components/shared/ExpandButton/index.js +1 -1
- package/es/common/components/shared/FormattedDuration/index.js +1 -1
- package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +2 -1
- package/es/common/components/shared/IfFeature/index.js +3 -2
- package/es/common/components/shared/InteractionTypes/presenter.js +1 -1
- package/es/common/components/shared/PaginatedCollection/index.js +1 -4
- package/es/common/components/shared/PaginatedCollection/presenter.js +111 -205
- package/es/common/components/shared/Paginator/index.js +1 -1
- package/es/common/components/shared/PrintTrigger/index.js +7 -18
- package/es/common/components/shared/PrintTrigger/presenter.js +1 -1
- package/es/common/components/shared/TagDisplay/index.js +1 -1
- package/es/common/components/shared/TagSelect/presenter.js +2 -1
- package/es/common/components/shared/TagSuggestSelect/index.js +1 -2
- package/es/common/components/shared/TimeUnitsInput/index.js +315 -298
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +1 -1
- package/es/common/components/shared/drag_and_drop/DragHandle/index.js +3 -9
- package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +1 -1
- package/es/common/components/shared/drag_and_drop/dragAndDropUtils.js +152 -33
- package/es/common/components/shared/file_selector/FileSelector.js +1 -1
- package/es/common/components/shared/functionality/componentWithOutsideClick.js +7 -8
- package/es/common/components/shared/functionality/componentWithOutsideClickEmotion.js +6 -7
- package/es/common/components/shared/functionality/makeEditable.js +65 -147
- package/es/common/components/shared/functionality/makeScrollable.js +7 -10
- package/es/common/components/shared/functionality/outsideClickStore.js +7 -0
- package/es/common/components/shared/overlay/index.js +2 -1
- package/es/common/components/shared/return_button/ReturnButton.js +51 -110
- package/es/common/components/shared/spinner/Spinner.js +1 -1
- package/es/common/kinesis/QuizEventsLogger.js +6 -6
- package/es/common/kinesis/client.js +4 -5
- package/es/common/middleware/alertTimerMiddleware.js +1 -1
- package/es/common/middleware/appSyncMiddleware.js +1 -1
- package/es/common/middleware/crossDomainMessagingMiddleware.js +1 -1
- package/es/common/middleware/eventLoggerMiddleware.js +3 -1
- package/es/common/middleware/persistedStorageMiddleware.js +4 -13
- package/es/common/middleware/quizTimerWebSocketMiddleware.js +1 -1
- package/es/common/middleware/sharedBanksMiddleware.js +3 -3
- package/es/common/react-redux.js +92 -4
- package/es/common/records/Alert.js +5 -4
- package/es/common/records/Bank.js +4 -4
- package/es/common/records/BankEntry.js +7 -15
- package/es/common/records/Item.js +4 -4
- package/es/common/records/ItemAnalysis.js +2 -1
- package/es/common/records/QtiImport.js +1 -0
- package/es/common/records/Quiz.js +5 -6
- package/es/common/records/QuizAnalysis.js +1 -0
- package/es/common/records/QuizEntry.js +13 -27
- package/es/common/records/QuizSession.js +3 -5
- package/es/common/records/QuizSessionEvent.js +1 -0
- package/es/common/records/QuizSessionResult.js +3 -3
- package/es/common/records/Response.js +2 -1
- package/es/common/records/SessionItem.js +3 -5
- package/es/common/records/SessionItemResult.js +2 -2
- package/es/common/records/Stimulus.js +4 -4
- package/es/common/records/baseRecord.js +11 -10
- package/es/common/records/reduxRecord.js +13 -11
- package/es/common/reducers/alerts.js +1 -1
- package/es/common/reducers/analyses.js +1 -1
- package/es/common/reducers/bankEntries.js +1 -1
- package/es/common/reducers/bankSearch.js +3 -2
- package/es/common/reducers/banks.js +1 -1
- package/es/common/reducers/calls.js +1 -1
- package/es/common/reducers/config.js +7 -1
- package/es/common/reducers/dragAndDrop.js +1 -1
- package/es/common/reducers/editing.js +11 -17
- package/es/common/reducers/errorsShowing.js +1 -1
- package/es/common/reducers/features.js +1 -1
- package/es/common/reducers/grading.js +1 -1
- package/es/common/reducers/interactionTypes.js +1 -1
- package/es/common/reducers/items.js +1 -1
- package/es/common/reducers/modal.js +1 -1
- package/es/common/reducers/moderation.js +1 -1
- package/es/common/reducers/modifications.js +1 -1
- package/es/common/reducers/outcomes.js +1 -1
- package/es/common/reducers/printing.js +1 -1
- package/es/common/reducers/qtiImports.js +1 -1
- package/es/common/reducers/quizEntries.js +1 -1
- package/es/common/reducers/quizExport.js +1 -1
- package/es/common/reducers/quizSessionEvents.js +1 -1
- package/es/common/reducers/quizSessionResults.js +1 -1
- package/es/common/reducers/quizSessions.js +1 -1
- package/es/common/reducers/quizzes.js +1 -1
- package/es/common/reducers/rce.js +1 -1
- package/es/common/reducers/regrading.js +2 -2
- package/es/common/reducers/reporting.js +1 -1
- package/es/common/reducers/scrolling.js +1 -1
- package/es/common/reducers/sessionItemResults.js +1 -1
- package/es/common/reducers/sessionItems.js +1 -1
- package/es/common/reducers/sharedBanks.js +1 -1
- package/es/common/reducers/sharingModal.js +1 -1
- package/es/common/reducers/sidebar.js +1 -1
- package/es/common/reducers/stimuli.js +1 -1
- package/es/common/reducers/tagAssociations.js +1 -1
- package/es/common/reducers/taking.js +1 -1
- package/es/common/reducers/ui.js +1 -1
- package/es/common/reducers/upload.js +1 -1
- package/es/common/selectors/analyses.js +14 -48
- package/es/common/selectors/calculator.js +2 -5
- package/es/common/selectors/calls.js +3 -6
- package/es/common/selectors/config.js +1 -4
- package/es/common/selectors/interactionTypes.js +11 -73
- package/es/common/selectors/items.js +3 -7
- package/es/common/selectors/qtiImports.js +3 -5
- package/es/common/selectors/quizSessionResults.js +1 -4
- package/es/common/selectors/quizSessions.js +2 -9
- package/es/common/selectors/quizzes.js +28 -134
- package/es/common/selectors/rce.js +2 -8
- package/es/common/selectors/reporting.js +1 -2
- package/es/common/selectors/sessionItemResults.js +1 -4
- package/es/common/selectors/sessionItems.js +3 -9
- package/es/common/selectors/taking.js +9 -29
- package/es/common/selectors/ui.js +1 -4
- package/es/common/util/Fetcher.js +183 -65
- package/es/common/util/TimerService.js +6 -4
- package/es/common/util/callHelpers.js +1 -1
- package/es/common/util/clickHandlers.js +1 -1
- package/es/common/util/componentForItem.js +106 -1
- package/es/common/util/featureCheck.js +26 -28
- package/es/common/util/getClientIpAddress.js +2 -2
- package/es/common/util/interactionTypePropsHelper.js +3 -3
- package/es/common/util/interactionTypeRecordForItem.js +32 -3
- package/es/common/util/mathRenderingUtils.js +1 -1
- package/es/common/util/maxContent.js +1 -1
- package/es/common/util/modalHelpers.js +1 -4
- package/es/common/util/persistedState.js +3 -3
- package/es/common/util/printUtils.js +1 -1
- package/es/common/util/renderAlerts.js +5 -4
- package/es/common/util/serializeEvent.js +6 -6
- package/es/common/util/sessionLockHelpers.js +62 -0
- package/es/common/util/windowChecks.js +1 -1
- package/es/common/util/withStateCache.js +31 -2
- package/es/configureStore.js +46 -5
- package/es/grading/api/quizEntryRegrades.js +3 -3
- package/es/grading/api/updateResults.js +3 -3
- package/es/index.js +10 -7
- package/es/messages/subjectHandlers/lti.capabilities.js +3 -1
- package/es/moderating/api/quizSessionEvents.js +14 -9
- package/es/moderating/api/quizSessions.js +15 -7
- package/es/moderating/components/events/Event.js +2 -1
- package/es/moderating/components/events/ResponseEvent.js +25 -22
- package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +1 -1
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +132 -191
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +2 -1
- package/es/moderating/components/resources/ElapsedTime.js +1 -1
- package/es/moderating/components/resources/EventDetails.js +2 -2
- package/es/moderating/components/resources/ModerateTable/index.js +4 -7
- package/es/moderating/components/resources/ModerateTable/presenter.js +7 -3
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +40 -13
- package/es/moderating/components/resources/OutstandingQuizzesModal/index.js +2 -5
- package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +1 -1
- package/es/moderating/components/resources/util/extractSessionData.js +1 -1
- package/es/moderating/components/sidebar/ModerateTray/index.js +2 -8
- package/es/moderating/components/sidebar/ModerateTray/presenter.js +2 -1
- package/es/moderating/components/sidebar/ResetQuiz/index.js +11 -9
- package/es/moderating/components/sidebar/ResetQuiz/presenter.js +11 -1
- package/es/reporting/api/fetchStudentAnalyses.js +3 -7
- package/es/reporting/api/getAnalysesExport.js +73 -12
- package/es/reporting/api/getAnalysesStatus.js +4 -9
- package/es/reporting/api/getItemAnalyses.js +1 -2
- package/es/reporting/api/getQuizAnalysis.js +1 -2
- package/es/reporting/api/itemAnalyses.js +9 -2
- package/es/reporting/api/quizAnalyses.js +2 -2
- package/es/reporting/components/Caption/index.js +1 -1
- package/es/reporting/components/MetricsListItem/index.js +1 -1
- package/es/reporting/components/charts/CentileDistribution/presenter.js +1 -1
- package/es/reporting/components/charts/Distribution/presenter.js +1 -1
- package/es/reporting/components/charts/Legend/index.js +1 -1
- package/es/reporting/components/charts/QuintileDistribution/presenter.js +1 -1
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +2 -2
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +4 -2
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +3 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +3 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +3 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +16 -14
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +7 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +30 -10
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +2 -2
- package/es/reporting/components/resources/OutcomeAnalysis/index.js +4 -16
- package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +1 -1
- package/es/reporting/components/resources/QuizAndItemAnalysis/index.js +4 -14
- package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +200 -335
- package/es/reporting/components/resources/ReportCard/index.js +8 -4
- package/es/reporting/components/resources/ReportList/index.js +1 -1
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +7 -4
- package/es/reporting/components/resources/StudentAnalysis/fetchReport.js +4 -3
- package/es/reporting/components/resources/StudentAnalysis/fetchReportStatus.js +5 -4
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +6 -3
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +21 -22
- package/es/reporting/components/resources/common/AnalysisUpdateDate/index.js +1 -1
- package/es/reporting/components/resources/common/ExportButton/index.js +2 -2
- package/es/reporting/components/resources/common/errorCodes.js +5 -2
- package/es/reporting/components/resources/common/errorMessages.js +3 -0
- package/es/reporting/components/resources/common/exportReports.js +3 -3
- package/es/reporting/components/resources/common/generateReports.js +1 -1
- package/es/taking/api/taking.js +48 -51
- package/es/taking/learnosity/index.js +1 -1
- package/lib/appDispatch.js +5 -0
- package/lib/banks/api/bankEntries.js +14 -8
- package/lib/banks/api/banks.js +41 -31
- package/lib/banks/api/tagAssociations.js +9 -9
- package/lib/banks/components/AddBankEntryModal/index.js +2 -5
- package/lib/banks/components/AddBankEntryModal/presenter.js +2 -1
- package/lib/banks/components/AddToBankModal/index.js +6 -6
- package/lib/banks/components/AddToBankModal/presenter.js +6 -4
- package/lib/banks/components/AsyncSearch/index.js +2 -1
- package/lib/banks/components/Bank/index.js +12 -23
- package/lib/banks/components/Bank/presenter.js +2 -1
- package/lib/banks/components/BankEntriesList/index.js +1 -4
- package/lib/banks/components/BankEntriesList/presenter.js +1 -1
- package/lib/banks/components/BankEntry/index.js +12 -25
- package/lib/banks/components/BankEntry/presenter.js +603 -747
- package/lib/banks/components/BankEntryRow/index.js +10 -25
- package/lib/banks/components/BankEntryRow/presenter.js +5 -3
- package/lib/banks/components/BankSearch/index.js +6 -14
- package/lib/banks/components/BankSearch/presenter.js +3 -1
- package/lib/banks/components/Banks/index.js +9 -13
- package/lib/banks/components/Banks/presenter.js +4 -1
- package/lib/banks/components/BanksList/index.js +2 -8
- package/lib/banks/components/BanksList/presenter.js +3 -1
- package/lib/banks/components/CopyMoveBankEntryModal/index.js +6 -9
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +7 -5
- package/lib/banks/components/CreateBankModal/index.js +9 -13
- package/lib/banks/components/CreateBankModal/presenter.js +3 -1
- package/lib/banks/components/EditBankModal/index.js +4 -6
- package/lib/banks/components/EditBankModal/presenter.js +3 -1
- package/lib/banks/components/HeaderMenu/presenter.js +2 -1
- package/lib/banks/components/NavWrapper/index.js +2 -5
- package/lib/banks/components/NavWrapper/presenter.js +1 -1
- package/lib/banks/components/SharingModal/RootAccountSharing.js +3 -1
- package/lib/banks/components/SharingModal/ShareList/index.js +3 -1
- package/lib/banks/components/SharingModal/index.js +3 -5
- package/lib/banks/components/SharingModal/presenter.js +545 -583
- package/lib/building/api/items.js +7 -7
- package/lib/building/api/qtiImports.js +15 -8
- package/lib/building/api/quizEntries.js +38 -30
- package/lib/building/api/quizzes.js +16 -13
- package/lib/building/api/stimuli.js +4 -4
- package/lib/building/components/QTIImportModal/index.js +2 -2
- package/lib/building/components/layout/Sidebar/SidebarItem/index.js +75 -21
- package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +1 -1
- package/lib/building/components/layout/Sidebar/Stimulus/index.js +75 -25
- package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +1 -1
- package/lib/building/components/layout/Sidebar/index.js +68 -9
- package/lib/building/components/layout/Sidebar/presenter.js +3 -2
- package/lib/building/components/layout/header/BuildingButtons/index.js +6 -8
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +2 -1
- package/lib/building/components/layout/header/SDKBuildingButtons/index.js +6 -5
- package/lib/building/components/resources/ActionButtons/index.js +6 -5
- package/lib/building/components/resources/ActionButtons/presenter.js +3 -2
- package/lib/building/components/resources/AddToBankOptions/index.js +78 -182
- package/lib/building/components/resources/BanksTray/index.js +6 -21
- package/lib/building/components/resources/BanksTray/presenter.js +2 -1
- package/lib/building/components/resources/DeleteStimulusModal/index.js +5 -17
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +4 -2
- package/lib/building/components/resources/ItemFeedbackModal/index.js +4 -13
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +4 -2
- package/lib/building/components/resources/MoveImmutableModal/index.js +4 -13
- package/lib/building/components/resources/MoveImmutableModal/presenter.js +2 -1
- package/lib/building/components/resources/quiz/instructions/Edit/index.js +1 -4
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +3 -2
- package/lib/building/components/resources/quiz/instructions/Instructions/index.js +4 -3
- package/lib/building/components/resources/quiz/instructions/Instructions/presenter.js +2 -2
- package/lib/building/components/resources/quiz/instructions/Show/index.js +2 -2
- package/lib/building/components/resources/quiz/instructions/Show/styles.js +3 -1
- package/lib/building/components/resources/quiz/title/Edit/index.js +2 -1
- package/lib/building/components/resources/quiz/title/Show/index.js +1 -1
- package/lib/building/components/resources/quiz/title/Title/index.js +4 -3
- package/lib/building/components/resources/quiz/title/Title/presenter.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntry/index.js +78 -25
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +2 -1
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +183 -40
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +1 -1
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +168 -299
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +3 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +5 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/index.js +15 -29
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +374 -441
- package/lib/building/components/resources/quizEntry/QuizEntryShow/components/LeftHeader.js +1 -1
- package/lib/building/components/resources/quizEntry/QuizEntryShow/index.js +14 -28
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +13 -12
- package/lib/common/actions/addInteractionTypes.js +1 -1
- package/lib/common/actions/alerts.js +1 -1
- package/lib/common/actions/analyses.js +1 -1
- package/lib/common/actions/bankEntries.js +1 -1
- package/lib/common/actions/bankSearch.js +1 -1
- package/lib/common/actions/banks.js +1 -1
- package/lib/common/actions/config.js +19 -1
- package/lib/common/actions/dragAndDrop.js +1 -1
- package/lib/common/actions/editing.js +1 -1
- package/lib/common/actions/errorsShowing.js +1 -1
- package/lib/common/actions/features.js +1 -1
- package/lib/common/actions/grading.js +1 -1
- package/lib/common/actions/items.js +1 -1
- package/lib/common/actions/modal.js +1 -1
- package/lib/common/actions/moderation.js +1 -1
- package/lib/common/actions/modifications.js +2 -2
- package/lib/common/actions/outcomes.js +1 -1
- package/lib/common/actions/postMessage.js +1 -1
- package/lib/common/actions/printing.js +1 -1
- package/lib/common/actions/qtiImports.js +1 -1
- package/lib/common/actions/quizEntries.js +1 -1
- package/lib/common/actions/quizExport.js +1 -1
- package/lib/common/actions/quizSessionEvents.js +1 -1
- package/lib/common/actions/quizSessionResults.js +1 -1
- package/lib/common/actions/quizSessions.js +13 -11
- package/lib/common/actions/quizzes.js +1 -1
- package/lib/common/actions/rce.js +1 -1
- package/lib/common/actions/regrading.js +1 -1
- package/lib/common/actions/reporting.js +1 -1
- package/lib/common/actions/scrolling.js +1 -1
- package/lib/common/actions/sessionItemResults.js +1 -1
- package/lib/common/actions/sessionItems.js +1 -1
- package/lib/common/actions/sharedBanks.js +1 -1
- package/lib/common/actions/sharingModal.js +1 -1
- package/lib/common/actions/sidebar.js +1 -1
- package/lib/common/actions/stimuli.js +1 -1
- package/lib/common/actions/tagAssociations.js +1 -1
- package/lib/common/actions/taking.js +1 -1
- package/lib/common/actions/ui.js +1 -1
- package/lib/common/actions/upload.js +1 -1
- package/lib/common/api/features.js +11 -2
- package/lib/common/api/fileUpload.js +8 -2
- package/lib/common/api/helpers.js +1 -1
- package/lib/common/api/interactionTypes.js +2 -2
- package/lib/common/api/quizSessions.js +129 -106
- package/lib/common/api/quizzes.js +6 -5
- package/lib/common/components/ApiFeatureFlagInitializer/index.js +3 -6
- package/lib/common/components/ConfirmationModal/index.js +1 -1
- package/lib/common/components/ConfirmationModal/presenter.js +7 -4
- package/lib/common/components/ImportModal/ImportFileSelector/index.js +1 -1
- package/lib/common/components/ImportModal/index.js +6 -18
- package/lib/common/components/ImportModal/presenter.js +5 -1
- package/lib/common/components/MaskedTextInput/index.js +1 -1
- package/lib/common/components/ModuleNavigationButtons/index.js +32 -0
- package/lib/common/components/PreviewFrame/index.js +1 -1
- package/lib/common/components/PrintFontSizeModal/presenter.js +164 -225
- package/lib/common/components/RceConfigProvider/index.js +3 -2
- package/lib/common/components/RceConfigProvider/presenter.js +12 -9
- package/lib/common/components/RceConfigProvider/rceConfigErrorHandler.js +7 -8
- package/lib/common/components/RceConfigProvider/rceConfigErrorMessages.js +1 -1
- package/lib/common/components/RceConfigProvider/rceConfigMapper.js +1 -1
- package/lib/common/components/SDKApp/index.js +276 -225
- package/lib/common/components/SDKHeaderCalculator.js +6 -5
- package/lib/common/components/SDKMenuButton.js +6 -5
- package/lib/common/components/SDKNavBar.js +6 -5
- package/lib/common/components/SDKTimer.js +6 -5
- package/lib/common/components/TimingAlerts/presenter.js +3 -3
- package/lib/common/components/alerts/index.js +2 -1
- package/lib/common/components/alerts/presenter.js +1 -1
- package/lib/common/components/alerts/styles.js +1 -1
- package/lib/common/components/layout/Page/index.js +1 -1
- package/lib/common/components/layout/Page/styles.js +3 -0
- package/lib/common/components/layout/header/Calculator/presenter.js +2 -2
- package/lib/common/components/layout/header/HeaderMenuButton/index.js +1 -4
- package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +1 -1
- package/lib/common/components/layout/header/Timer/presenter.js +1 -1
- package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +28 -2
- package/lib/common/components/layout/navbar/index.js +1 -1
- package/lib/common/components/layout/sidebar/PositionSummary/index.js +1 -1
- package/lib/common/components/layout/sidebar/Sidebar/index.js +5 -4
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +6 -4
- package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +1 -1
- package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +1 -1
- package/lib/common/components/layout/sidebar/Stimulus/Title/index.js +1 -1
- package/lib/common/components/layout/sidebar/Stimulus/index.js +1 -4
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +4 -2
- package/lib/common/components/resources/BankSelection/index.js +3 -9
- package/lib/common/components/resources/QuizSessionResult/QuizSessionResultHeader/index.js +1 -1
- package/lib/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/LetterGrade.js +2 -2
- package/lib/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/PointsDisplay.js +3 -3
- package/lib/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/Progress.js +4 -4
- package/lib/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/index.js +3 -3
- package/lib/common/components/resources/QuizSessionResult/QuizSessionResultInfo/index.js +1 -1
- package/lib/common/components/resources/WarningWrapper/index.js +1 -1
- package/lib/common/components/resources/entry/EntrySave/presenter.js +174 -240
- package/lib/common/components/resources/item/ItemEdit/index.js +17 -28
- package/lib/common/components/resources/item/ItemEdit/presenter.js +3 -1
- package/lib/common/components/resources/item/ItemOverride/index.js +8 -5
- package/lib/common/components/resources/item/ItemOverride/presenter.js +1 -1
- package/lib/common/components/resources/item/ItemShow/index.js +1 -1
- package/lib/common/components/resources/positionBox/PositionBox.js +1 -1
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +2 -1
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +2 -1
- package/lib/common/components/resources/quiz/AddContent/Modal/index.js +3 -9
- package/lib/common/components/resources/quiz/AddContent/Modal/presenter.js +1 -1
- package/lib/common/components/resources/quiz/AddContent/Popover/index.js +3 -9
- package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +2 -1
- package/lib/common/components/resources/quiz/info/QuizInfo.js +1 -1
- package/lib/common/components/resources/quiz/instructions/Instructions.js +2 -2
- package/lib/common/components/resources/quiz/instructions/styles.js +3 -1
- package/lib/common/components/resources/quiz/title/Title.js +1 -1
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +2 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/components/SessionItemResultHeader.js +1 -1
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/index.js +7 -7
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +19 -5
- package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +1 -1
- package/lib/common/components/resources/stimulus/Stimulus/index.js +8 -15
- package/lib/common/components/resources/stimulus/Stimulus/presenter.js +12 -4
- package/lib/common/components/resources/stimulus/Stimulus/styles.js +1 -1
- package/lib/common/components/resources/stimulus/StimulusEdit/index.js +5 -10
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +2 -1
- package/lib/common/components/resources/stimulus/StimulusEditInfo/index.js +4 -6
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +7 -2
- package/lib/common/components/resources/stimulus/StimulusShow/index.js +2 -1
- package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +1 -1
- package/lib/common/components/shared/Card/CardContent/index.js +1 -1
- package/lib/common/components/shared/Card/CardWrapper/index.js +1 -1
- package/lib/common/components/shared/ExpandButton/index.js +1 -1
- package/lib/common/components/shared/FormattedDuration/index.js +1 -1
- package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +2 -1
- package/lib/common/components/shared/IfFeature/index.js +3 -2
- package/lib/common/components/shared/InteractionTypes/presenter.js +1 -1
- package/lib/common/components/shared/PaginatedCollection/index.js +1 -4
- package/lib/common/components/shared/PaginatedCollection/presenter.js +111 -205
- package/lib/common/components/shared/Paginator/index.js +1 -1
- package/lib/common/components/shared/PrintTrigger/index.js +7 -18
- package/lib/common/components/shared/PrintTrigger/presenter.js +1 -1
- package/lib/common/components/shared/TagDisplay/index.js +1 -1
- package/lib/common/components/shared/TagSelect/presenter.js +2 -1
- package/lib/common/components/shared/TagSuggestSelect/index.js +1 -2
- package/lib/common/components/shared/TimeUnitsInput/index.js +315 -298
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +1 -1
- package/lib/common/components/shared/drag_and_drop/DragHandle/index.js +3 -9
- package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +1 -1
- package/lib/common/components/shared/drag_and_drop/dragAndDropUtils.js +152 -33
- package/lib/common/components/shared/file_selector/FileSelector.js +1 -1
- package/lib/common/components/shared/functionality/componentWithOutsideClick.js +7 -8
- package/lib/common/components/shared/functionality/componentWithOutsideClickEmotion.js +6 -7
- package/lib/common/components/shared/functionality/makeEditable.js +65 -147
- package/lib/common/components/shared/functionality/makeScrollable.js +7 -10
- package/lib/common/components/shared/functionality/outsideClickStore.js +7 -0
- package/lib/common/components/shared/overlay/index.js +2 -1
- package/lib/common/components/shared/return_button/ReturnButton.js +51 -110
- package/lib/common/components/shared/spinner/Spinner.js +1 -1
- package/lib/common/kinesis/QuizEventsLogger.js +6 -6
- package/lib/common/kinesis/client.js +4 -5
- package/lib/common/middleware/alertTimerMiddleware.js +1 -1
- package/lib/common/middleware/appSyncMiddleware.js +1 -1
- package/lib/common/middleware/crossDomainMessagingMiddleware.js +1 -1
- package/lib/common/middleware/eventLoggerMiddleware.js +3 -1
- package/lib/common/middleware/persistedStorageMiddleware.js +4 -13
- package/lib/common/middleware/quizTimerWebSocketMiddleware.js +1 -1
- package/lib/common/middleware/sharedBanksMiddleware.js +3 -3
- package/lib/common/react-redux.js +92 -4
- package/lib/common/records/Alert.js +5 -4
- package/lib/common/records/Bank.js +4 -4
- package/lib/common/records/BankEntry.js +7 -15
- package/lib/common/records/Item.js +4 -4
- package/lib/common/records/ItemAnalysis.js +2 -1
- package/lib/common/records/QtiImport.js +1 -0
- package/lib/common/records/Quiz.js +5 -6
- package/lib/common/records/QuizAnalysis.js +1 -0
- package/lib/common/records/QuizEntry.js +13 -27
- package/lib/common/records/QuizSession.js +3 -5
- package/lib/common/records/QuizSessionEvent.js +1 -0
- package/lib/common/records/QuizSessionResult.js +3 -3
- package/lib/common/records/Response.js +2 -1
- package/lib/common/records/SessionItem.js +3 -5
- package/lib/common/records/SessionItemResult.js +2 -2
- package/lib/common/records/Stimulus.js +4 -4
- package/lib/common/records/baseRecord.js +11 -10
- package/lib/common/records/reduxRecord.js +13 -11
- package/lib/common/reducers/alerts.js +1 -1
- package/lib/common/reducers/analyses.js +1 -1
- package/lib/common/reducers/bankEntries.js +1 -1
- package/lib/common/reducers/bankSearch.js +3 -2
- package/lib/common/reducers/banks.js +1 -1
- package/lib/common/reducers/calls.js +1 -1
- package/lib/common/reducers/config.js +7 -1
- package/lib/common/reducers/dragAndDrop.js +1 -1
- package/lib/common/reducers/editing.js +11 -17
- package/lib/common/reducers/errorsShowing.js +1 -1
- package/lib/common/reducers/features.js +1 -1
- package/lib/common/reducers/grading.js +1 -1
- package/lib/common/reducers/interactionTypes.js +1 -1
- package/lib/common/reducers/items.js +1 -1
- package/lib/common/reducers/modal.js +1 -1
- package/lib/common/reducers/moderation.js +1 -1
- package/lib/common/reducers/modifications.js +1 -1
- package/lib/common/reducers/outcomes.js +1 -1
- package/lib/common/reducers/printing.js +1 -1
- package/lib/common/reducers/qtiImports.js +1 -1
- package/lib/common/reducers/quizEntries.js +1 -1
- package/lib/common/reducers/quizExport.js +1 -1
- package/lib/common/reducers/quizSessionEvents.js +1 -1
- package/lib/common/reducers/quizSessionResults.js +1 -1
- package/lib/common/reducers/quizSessions.js +1 -1
- package/lib/common/reducers/quizzes.js +1 -1
- package/lib/common/reducers/rce.js +1 -1
- package/lib/common/reducers/regrading.js +2 -2
- package/lib/common/reducers/reporting.js +1 -1
- package/lib/common/reducers/scrolling.js +1 -1
- package/lib/common/reducers/sessionItemResults.js +1 -1
- package/lib/common/reducers/sessionItems.js +1 -1
- package/lib/common/reducers/sharedBanks.js +1 -1
- package/lib/common/reducers/sharingModal.js +1 -1
- package/lib/common/reducers/sidebar.js +1 -1
- package/lib/common/reducers/stimuli.js +1 -1
- package/lib/common/reducers/tagAssociations.js +1 -1
- package/lib/common/reducers/taking.js +1 -1
- package/lib/common/reducers/ui.js +1 -1
- package/lib/common/reducers/upload.js +1 -1
- package/lib/common/selectors/analyses.js +14 -48
- package/lib/common/selectors/calculator.js +2 -5
- package/lib/common/selectors/calls.js +3 -6
- package/lib/common/selectors/config.js +1 -4
- package/lib/common/selectors/interactionTypes.js +11 -73
- package/lib/common/selectors/items.js +3 -7
- package/lib/common/selectors/qtiImports.js +3 -5
- package/lib/common/selectors/quizSessionResults.js +1 -4
- package/lib/common/selectors/quizSessions.js +2 -9
- package/lib/common/selectors/quizzes.js +28 -134
- package/lib/common/selectors/rce.js +2 -8
- package/lib/common/selectors/reporting.js +1 -2
- package/lib/common/selectors/sessionItemResults.js +1 -4
- package/lib/common/selectors/sessionItems.js +3 -9
- package/lib/common/selectors/taking.js +9 -29
- package/lib/common/selectors/ui.js +1 -4
- package/lib/common/util/Fetcher.js +183 -65
- package/lib/common/util/TimerService.js +6 -4
- package/lib/common/util/callHelpers.js +1 -1
- package/lib/common/util/clickHandlers.js +1 -1
- package/lib/common/util/componentForItem.js +106 -1
- package/lib/common/util/featureCheck.js +26 -28
- package/lib/common/util/getClientIpAddress.js +2 -2
- package/lib/common/util/interactionTypePropsHelper.js +3 -3
- package/lib/common/util/interactionTypeRecordForItem.js +32 -3
- package/lib/common/util/mathRenderingUtils.js +1 -1
- package/lib/common/util/maxContent.js +1 -1
- package/lib/common/util/modalHelpers.js +1 -4
- package/lib/common/util/persistedState.js +3 -3
- package/lib/common/util/printUtils.js +1 -1
- package/lib/common/util/renderAlerts.js +5 -4
- package/lib/common/util/serializeEvent.js +6 -6
- package/lib/common/util/sessionLockHelpers.js +62 -0
- package/lib/common/util/windowChecks.js +1 -1
- package/lib/common/util/withStateCache.js +31 -2
- package/lib/configureStore.js +46 -5
- package/lib/grading/api/quizEntryRegrades.js +3 -3
- package/lib/grading/api/updateResults.js +3 -3
- package/lib/index.js +10 -7
- package/lib/messages/subjectHandlers/lti.capabilities.js +3 -1
- package/lib/moderating/api/quizSessionEvents.js +14 -9
- package/lib/moderating/api/quizSessions.js +15 -7
- package/lib/moderating/components/events/Event.js +2 -1
- package/lib/moderating/components/events/ResponseEvent.js +25 -22
- package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +1 -1
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +132 -191
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +2 -1
- package/lib/moderating/components/resources/ElapsedTime.js +1 -1
- package/lib/moderating/components/resources/EventDetails.js +2 -2
- package/lib/moderating/components/resources/ModerateTable/index.js +4 -7
- package/lib/moderating/components/resources/ModerateTable/presenter.js +7 -3
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +40 -13
- package/lib/moderating/components/resources/OutstandingQuizzesModal/index.js +2 -5
- package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +1 -1
- package/lib/moderating/components/resources/util/extractSessionData.js +1 -1
- package/lib/moderating/components/sidebar/ModerateTray/index.js +2 -8
- package/lib/moderating/components/sidebar/ModerateTray/presenter.js +2 -1
- package/lib/moderating/components/sidebar/ResetQuiz/index.js +11 -9
- package/lib/moderating/components/sidebar/ResetQuiz/presenter.js +11 -1
- package/lib/reporting/api/fetchStudentAnalyses.js +3 -7
- package/lib/reporting/api/getAnalysesExport.js +73 -12
- package/lib/reporting/api/getAnalysesStatus.js +4 -9
- package/lib/reporting/api/getItemAnalyses.js +1 -2
- package/lib/reporting/api/getQuizAnalysis.js +1 -2
- package/lib/reporting/api/itemAnalyses.js +9 -2
- package/lib/reporting/api/quizAnalyses.js +2 -2
- package/lib/reporting/components/Caption/index.js +1 -1
- package/lib/reporting/components/MetricsListItem/index.js +1 -1
- package/lib/reporting/components/charts/CentileDistribution/presenter.js +1 -1
- package/lib/reporting/components/charts/Distribution/presenter.js +1 -1
- package/lib/reporting/components/charts/Legend/index.js +1 -1
- package/lib/reporting/components/charts/QuintileDistribution/presenter.js +1 -1
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +2 -2
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +4 -2
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +1 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +16 -14
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +4 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +7 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +30 -10
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +2 -2
- package/lib/reporting/components/resources/OutcomeAnalysis/index.js +4 -16
- package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +1 -1
- package/lib/reporting/components/resources/QuizAndItemAnalysis/index.js +4 -14
- package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +200 -335
- package/lib/reporting/components/resources/ReportCard/index.js +8 -4
- package/lib/reporting/components/resources/ReportList/index.js +1 -1
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +7 -4
- package/lib/reporting/components/resources/StudentAnalysis/fetchReport.js +4 -3
- package/lib/reporting/components/resources/StudentAnalysis/fetchReportStatus.js +5 -4
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +6 -3
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +21 -22
- package/lib/reporting/components/resources/common/AnalysisUpdateDate/index.js +1 -1
- package/lib/reporting/components/resources/common/ExportButton/index.js +2 -2
- package/lib/reporting/components/resources/common/errorCodes.js +5 -2
- package/lib/reporting/components/resources/common/errorMessages.js +3 -0
- package/lib/reporting/components/resources/common/exportReports.js +3 -3
- package/lib/reporting/components/resources/common/generateReports.js +1 -1
- package/lib/taking/api/taking.js +48 -51
- package/lib/taking/learnosity/index.js +1 -1
- package/package.json +85 -93
- package/src/__tests__/config.test.js +9 -0
- package/src/appDispatch.js +6 -0
- package/src/banks/api/__tests__/bankEntries.test.js +359 -0
- package/src/banks/api/__tests__/banks.test.js +764 -0
- package/src/banks/api/__tests__/copyingBanksPoller.test.js +47 -0
- package/src/banks/api/__tests__/tagAssociations.test.js +133 -0
- package/src/banks/api/bankEntries.js +265 -0
- package/src/banks/api/banks.js +351 -0
- package/src/banks/api/copyingBanksPoller.js +61 -0
- package/src/banks/api/tagAssociations.js +92 -0
- package/src/banks/components/AddBankEntryModal/__tests__/presenter.test.js +76 -0
- package/src/banks/components/AddBankEntryModal/index.js +33 -0
- package/src/banks/components/AddBankEntryModal/presenter.js +117 -0
- package/src/banks/components/AddToBankModal/__tests__/index.test.js +35 -0
- package/src/banks/components/AddToBankModal/__tests__/presenter.test.js +248 -0
- package/src/banks/components/AddToBankModal/index.js +33 -0
- package/src/banks/components/AddToBankModal/presenter.js +220 -0
- package/src/banks/components/AsyncSearch/__tests__/index.test.js +228 -0
- package/src/banks/components/AsyncSearch/index.js +412 -0
- package/src/banks/components/Bank/README.md +7 -0
- package/src/banks/components/Bank/__tests__/index.test.js +98 -0
- package/src/banks/components/Bank/__tests__/presenter.test.js +304 -0
- package/src/banks/components/Bank/index.js +66 -0
- package/src/banks/components/Bank/presenter.js +507 -0
- package/src/banks/components/Bank/styles.js +36 -0
- package/src/banks/components/Bank/theme.js +14 -0
- package/src/banks/components/BankEntriesList/__tests__/index.test.js +22 -0
- package/src/banks/components/BankEntriesList/__tests__/presenter.test.js +15 -0
- package/src/banks/components/BankEntriesList/index.js +13 -0
- package/src/banks/components/BankEntriesList/presenter.js +54 -0
- package/src/banks/components/BankEntriesList/styles.js +9 -0
- package/src/banks/components/BankEntriesList/theme.js +7 -0
- package/src/banks/components/BankEntry/README.md +7 -0
- package/src/banks/components/BankEntry/__tests__/index.test.js +95 -0
- package/src/banks/components/BankEntry/__tests__/presenter.test.js +698 -0
- package/src/banks/components/BankEntry/index.js +92 -0
- package/src/banks/components/BankEntry/presenter.js +699 -0
- package/src/banks/components/BankEntry/styles.js +65 -0
- package/src/banks/components/BankEntry/theme.js +25 -0
- package/src/banks/components/BankEntryRow/__tests__/index.test.js +59 -0
- package/src/banks/components/BankEntryRow/__tests__/presenter.test.js +233 -0
- package/src/banks/components/BankEntryRow/index.js +49 -0
- package/src/banks/components/BankEntryRow/presenter.js +439 -0
- package/src/banks/components/BankEntryRow/styles.js +58 -0
- package/src/banks/components/BankEntryRow/theme.js +21 -0
- package/src/banks/components/BankSearch/BankSearch.stories.js +35 -0
- package/src/banks/components/BankSearch/__tests__/index.test.js +11 -0
- package/src/banks/components/BankSearch/__tests__/presenter.test.js +96 -0
- package/src/banks/components/BankSearch/index.js +28 -0
- package/src/banks/components/BankSearch/presenter.js +178 -0
- package/src/banks/components/BankSearch/styles.js +19 -0
- package/src/banks/components/BankSearch/theme.js +8 -0
- package/src/banks/components/Banks/README.md +7 -0
- package/src/banks/components/Banks/__tests__/index.test.js +36 -0
- package/src/banks/components/Banks/__tests__/presenter.test.js +318 -0
- package/src/banks/components/Banks/index.js +46 -0
- package/src/banks/components/Banks/presenter.js +569 -0
- package/src/banks/components/Banks/styles.js +34 -0
- package/src/banks/components/Banks/theme.js +13 -0
- package/src/banks/components/BanksList/__tests__/index.test.js +40 -0
- package/src/banks/components/BanksList/__tests__/presenter.test.js +425 -0
- package/src/banks/components/BanksList/index.js +24 -0
- package/src/banks/components/BanksList/presenter.js +523 -0
- package/src/banks/components/BanksList/styles.js +52 -0
- package/src/banks/components/BanksList/theme.js +19 -0
- package/src/banks/components/CopyMoveBankEntryModal/__tests__/index.test.js +41 -0
- package/src/banks/components/CopyMoveBankEntryModal/__tests__/presenter.test.js +331 -0
- package/src/banks/components/CopyMoveBankEntryModal/index.js +40 -0
- package/src/banks/components/CopyMoveBankEntryModal/presenter.js +322 -0
- package/src/banks/components/CreateBankModal/__tests__/index.test.js +27 -0
- package/src/banks/components/CreateBankModal/__tests__/presenter.test.js +154 -0
- package/src/banks/components/CreateBankModal/index.js +42 -0
- package/src/banks/components/CreateBankModal/presenter.js +197 -0
- package/src/banks/components/EditBankModal/__tests__/index.test.js +26 -0
- package/src/banks/components/EditBankModal/__tests__/presenter.test.js +101 -0
- package/src/banks/components/EditBankModal/index.js +35 -0
- package/src/banks/components/EditBankModal/presenter.js +146 -0
- package/src/banks/components/HeaderBreadCrumb/__tests__/index.test.js +152 -0
- package/src/banks/components/HeaderBreadCrumb/index.js +88 -0
- package/src/banks/components/HeaderMenu/__tests__/index.test.js +19 -0
- package/src/banks/components/HeaderMenu/__tests__/presenter.test.js +42 -0
- package/src/banks/components/HeaderMenu/index.js +22 -0
- package/src/banks/components/HeaderMenu/presenter.js +115 -0
- package/src/banks/components/HeaderMenu/styles.js +14 -0
- package/src/banks/components/HeaderMenu/theme.js +8 -0
- package/src/banks/components/NavWrapper/__tests__/presenter.test.js +164 -0
- package/src/banks/components/NavWrapper/externalStyles.js +3 -0
- package/src/banks/components/NavWrapper/index.js +12 -0
- package/src/banks/components/NavWrapper/presenter.js +170 -0
- package/src/banks/components/NavWrapper/styles.js +31 -0
- package/src/banks/components/NavWrapper/theme.js +14 -0
- package/src/banks/components/SharingModal/ContextualIconButton/index.js +35 -0
- package/src/banks/components/SharingModal/RootAccountSharing.js +88 -0
- package/src/banks/components/SharingModal/ShareList/__tests__/index.test.js +115 -0
- package/src/banks/components/SharingModal/ShareList/index.js +137 -0
- package/src/banks/components/SharingModal/ShareList/styles.js +9 -0
- package/src/banks/components/SharingModal/__tests__/presenter.test.js +512 -0
- package/src/banks/components/SharingModal/__tests__/rootAccountSharing.test.js +37 -0
- package/src/banks/components/SharingModal/index.js +42 -0
- package/src/banks/components/SharingModal/presenter.js +689 -0
- package/src/banks/components/SharingModal/styles.js +13 -0
- package/src/banks/components/SharingModal/theme.js +9 -0
- package/src/banks/components/noResults.svg +56 -0
- package/src/building/api/__tests__/items.test.js +487 -0
- package/src/building/api/__tests__/qtiImports.test.js +452 -0
- package/src/building/api/__tests__/quizEntries.test.js +715 -0
- package/src/building/api/__tests__/quizzes.test.js +389 -0
- package/src/building/api/__tests__/stimuli.test.js +186 -0
- package/src/building/api/items.js +262 -0
- package/src/building/api/qtiImports.js +143 -0
- package/src/building/api/quizEntries.js +464 -0
- package/src/building/api/quizzes.js +389 -0
- package/src/building/api/stimuli.js +83 -0
- package/src/building/components/QTIImportModal/__tests__/QTIImportModal.test.js +50 -0
- package/src/building/components/QTIImportModal/index.js +48 -0
- package/src/building/components/layout/Sidebar/SidebarItem/__tests__/SidebarItem.test.js +7 -0
- package/src/building/components/layout/Sidebar/SidebarItem/__tests__/presenter.test.js +48 -0
- package/src/building/components/layout/Sidebar/SidebarItem/index.js +67 -0
- package/src/building/components/layout/Sidebar/SidebarItem/presenter.js +122 -0
- package/src/building/components/layout/Sidebar/SidebarItem/styles.js +9 -0
- package/src/building/components/layout/Sidebar/SidebarItem/theme.js +5 -0
- package/src/building/components/layout/Sidebar/Stimulus/__tests__/Stimulus.test.js +25 -0
- package/src/building/components/layout/Sidebar/Stimulus/__tests__/presenter.test.js +34 -0
- package/src/building/components/layout/Sidebar/Stimulus/index.js +66 -0
- package/src/building/components/layout/Sidebar/Stimulus/presenter.js +129 -0
- package/src/building/components/layout/Sidebar/Stimulus/styles.js +9 -0
- package/src/building/components/layout/Sidebar/Stimulus/theme.js +5 -0
- package/src/building/components/layout/Sidebar/__tests__/Sidebar.test.js +60 -0
- package/src/building/components/layout/Sidebar/__tests__/presenter.test.js +161 -0
- package/src/building/components/layout/Sidebar/index.js +60 -0
- package/src/building/components/layout/Sidebar/presenter.js +225 -0
- package/src/building/components/layout/Sidebar/styles.js +29 -0
- package/src/building/components/layout/Sidebar/theme.js +7 -0
- package/src/building/components/layout/header/BuildingButtons/README.md +19 -0
- package/src/building/components/layout/header/BuildingButtons/__tests__/index.test.js +15 -0
- package/src/building/components/layout/header/BuildingButtons/__tests__/presenter.test.js +297 -0
- package/src/building/components/layout/header/BuildingButtons/index.js +46 -0
- package/src/building/components/layout/header/BuildingButtons/presenter.js +419 -0
- package/src/building/components/layout/header/BuildingButtons/styles.js +25 -0
- package/src/building/components/layout/header/BuildingButtons/theme.js +13 -0
- package/src/building/components/layout/header/SDKBuildingButtons/__tests__/index.test.js +23 -0
- package/src/building/components/layout/header/SDKBuildingButtons/index.js +17 -0
- package/src/building/components/resources/ActionButtons/README.md +24 -0
- package/src/building/components/resources/ActionButtons/__tests__/ActionButtons.test.js +113 -0
- package/src/building/components/resources/ActionButtons/index.js +25 -0
- package/src/building/components/resources/ActionButtons/presenter.js +175 -0
- package/src/building/components/resources/ActionButtons/styles.js +31 -0
- package/src/building/components/resources/ActionButtons/theme.js +9 -0
- package/src/building/components/resources/AddToBankOptions/__tests__/index.test.js +77 -0
- package/src/building/components/resources/AddToBankOptions/index.js +85 -0
- package/src/building/components/resources/AddToBankOptions/styles.js +11 -0
- package/src/building/components/resources/AddToBankOptions/theme.js +8 -0
- package/src/building/components/resources/BanksTray/__tests__/presenter.test.js +78 -0
- package/src/building/components/resources/BanksTray/index.js +26 -0
- package/src/building/components/resources/BanksTray/presenter.js +210 -0
- package/src/building/components/resources/DeleteStimulusModal/__tests__/presenter.test.js +310 -0
- package/src/building/components/resources/DeleteStimulusModal/index.js +45 -0
- package/src/building/components/resources/DeleteStimulusModal/presenter.js +328 -0
- package/src/building/components/resources/DeleteStimulusModal/styles.js +22 -0
- package/src/building/components/resources/DeleteStimulusModal/theme.js +10 -0
- package/src/building/components/resources/ItemFeedbackModal/__tests__/index.test.js +23 -0
- package/src/building/components/resources/ItemFeedbackModal/__tests__/presenter.test.js +122 -0
- package/src/building/components/resources/ItemFeedbackModal/index.js +45 -0
- package/src/building/components/resources/ItemFeedbackModal/presenter.js +170 -0
- package/src/building/components/resources/MoveImmutableModal/__tests__/presenter.test.js +98 -0
- package/src/building/components/resources/MoveImmutableModal/index.js +37 -0
- package/src/building/components/resources/MoveImmutableModal/presenter.js +109 -0
- package/src/building/components/resources/quiz/__tests__/editableFieldTests.js +28 -0
- package/src/building/components/resources/quiz/__tests__/toggleEditingTests.js +53 -0
- package/src/building/components/resources/quiz/editButton/EditButton.js +43 -0
- package/src/building/components/resources/quiz/editButton/__tests__/EditButton.test.js +38 -0
- package/src/building/components/resources/quiz/instructions/Edit/__tests__/Edit.test.js +54 -0
- package/src/building/components/resources/quiz/instructions/Edit/index.js +10 -0
- package/src/building/components/resources/quiz/instructions/Edit/presenter.js +83 -0
- package/src/building/components/resources/quiz/instructions/Edit/styles.js +21 -0
- package/src/building/components/resources/quiz/instructions/Edit/theme.js +6 -0
- package/src/building/components/resources/quiz/instructions/Instructions/__tests__/Instructions.test.js +307 -0
- package/src/building/components/resources/quiz/instructions/Instructions/index.js +34 -0
- package/src/building/components/resources/quiz/instructions/Instructions/presenter.js +185 -0
- package/src/building/components/resources/quiz/instructions/Instructions/styles.js +32 -0
- package/src/building/components/resources/quiz/instructions/Instructions/theme.js +10 -0
- package/src/building/components/resources/quiz/instructions/Show/__tests__/Show.test.js +26 -0
- package/src/building/components/resources/quiz/instructions/Show/index.js +66 -0
- package/src/building/components/resources/quiz/instructions/Show/styles.js +33 -0
- package/src/building/components/resources/quiz/instructions/Show/theme.js +6 -0
- package/src/building/components/resources/quiz/title/Edit/__tests__/Edit.test.js +119 -0
- package/src/building/components/resources/quiz/title/Edit/index.js +176 -0
- package/src/building/components/resources/quiz/title/Show/__tests__/Show.test.js +25 -0
- package/src/building/components/resources/quiz/title/Show/index.js +64 -0
- package/src/building/components/resources/quiz/title/Show/styles.js +16 -0
- package/src/building/components/resources/quiz/title/Show/theme.js +7 -0
- package/src/building/components/resources/quiz/title/Title/__tests__/Title.test.js +277 -0
- package/src/building/components/resources/quiz/title/Title/index.js +30 -0
- package/src/building/components/resources/quiz/title/Title/presenter.js +182 -0
- package/src/building/components/resources/quiz/title/Title/styles.js +38 -0
- package/src/building/components/resources/quiz/title/Title/theme.js +13 -0
- package/src/building/components/resources/quizEntry/QuizEntry/__tests__/index.test.js +67 -0
- package/src/building/components/resources/quizEntry/QuizEntry/__tests__/presenter.test.js +469 -0
- package/src/building/components/resources/quizEntry/QuizEntry/index.js +99 -0
- package/src/building/components/resources/quizEntry/QuizEntry/presenter.js +453 -0
- package/src/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +22 -0
- package/src/building/components/resources/quizEntry/QuizEntry/styles.js +24 -0
- package/src/building/components/resources/quizEntry/QuizEntry/theme.js +10 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/__tests__/index.test.js +32 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/__tests__/presenter.test.js +277 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/index.js +34 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +247 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/styles.js +30 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +21 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/__tests__/index.test.js +49 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +108 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/styles.js +19 -0
- package/src/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +11 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Footer/__tests__/index.test.js +87 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Footer/__tests__/presenter.test.js +352 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Footer/index.js +28 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +295 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +26 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Footer/theme.js +9 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Header/__tests__/index.test.js +356 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +353 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +20 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +9 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/__tests__/presenter.test.js +675 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/index.js +88 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +521 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/styles.js +19 -0
- package/src/building/components/resources/quizEntry/QuizEntryEdit/theme.js +8 -0
- package/src/building/components/resources/quizEntry/QuizEntryShow/__tests__/presenter.test.js +450 -0
- package/src/building/components/resources/quizEntry/QuizEntryShow/components/LeftHeader.js +138 -0
- package/src/building/components/resources/quizEntry/QuizEntryShow/index.js +48 -0
- package/src/building/components/resources/quizEntry/QuizEntryShow/presenter.js +305 -0
- package/src/building/components/resources/quizEntry/QuizEntryShow/styles.js +71 -0
- package/src/building/components/resources/quizEntry/QuizEntryShow/theme.js +30 -0
- package/src/common/actions/addInteractionTypes.js +8 -0
- package/src/common/actions/alerts.js +54 -0
- package/src/common/actions/analyses.js +90 -0
- package/src/common/actions/bankEntries.js +15 -0
- package/src/common/actions/bankSearch.js +33 -0
- package/src/common/actions/banks.js +56 -0
- package/src/common/actions/config.js +47 -0
- package/src/common/actions/dragAndDrop.js +8 -0
- package/src/common/actions/editing.js +23 -0
- package/src/common/actions/errorsShowing.js +22 -0
- package/src/common/actions/features.js +15 -0
- package/src/common/actions/grading.js +25 -0
- package/src/common/actions/items.js +8 -0
- package/src/common/actions/modal.js +77 -0
- package/src/common/actions/moderation.js +9 -0
- package/src/common/actions/modifications.js +611 -0
- package/src/common/actions/outcomes.js +34 -0
- package/src/common/actions/postMessage.js +8 -0
- package/src/common/actions/printing.js +18 -0
- package/src/common/actions/qtiImports.js +14 -0
- package/src/common/actions/quizEntries.js +50 -0
- package/src/common/actions/quizExport.js +8 -0
- package/src/common/actions/quizSessionEvents.js +5 -0
- package/src/common/actions/quizSessionResults.js +8 -0
- package/src/common/actions/quizSessions.js +124 -0
- package/src/common/actions/quizzes.js +50 -0
- package/src/common/actions/rce.js +24 -0
- package/src/common/actions/regrading.js +26 -0
- package/src/common/actions/reporting.js +42 -0
- package/src/common/actions/scrolling.js +15 -0
- package/src/common/actions/sessionItemResults.js +8 -0
- package/src/common/actions/sessionItems.js +8 -0
- package/src/common/actions/sharedBanks.js +45 -0
- package/src/common/actions/sharingModal.js +8 -0
- package/src/common/actions/sidebar.js +14 -0
- package/src/common/actions/stimuli.js +8 -0
- package/src/common/actions/tagAssociations.js +99 -0
- package/src/common/actions/taking.js +178 -0
- package/src/common/actions/ui.js +68 -0
- package/src/common/actions/upload.js +40 -0
- package/src/common/api/__tests__/callHandlers.test.js +594 -0
- package/src/common/api/__tests__/camelizeHelpers.test.js +33 -0
- package/src/common/api/__tests__/features.test.js +101 -0
- package/src/common/api/__tests__/fileUpload.test.js +86 -0
- package/src/common/api/__tests__/helpers.test.js +216 -0
- package/src/common/api/__tests__/interactionTypes.test.js +39 -0
- package/src/common/api/__tests__/quizSessions.test.js +247 -0
- package/src/common/api/callHandlers.js +185 -0
- package/src/common/api/camelizeHelpers.js +27 -0
- package/src/common/api/features.js +25 -0
- package/src/common/api/fileUpload.js +35 -0
- package/src/common/api/getPersistenceActions.js +80 -0
- package/src/common/api/helpers.js +114 -0
- package/src/common/api/interactionTypes.js +14 -0
- package/src/common/api/quizSessions.js +216 -0
- package/src/common/api/quizzes.js +41 -0
- package/src/common/api/schema.js +121 -0
- package/src/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +8 -0
- package/src/common/components/AccessCodeTextInput/__tests__/index.test.js +25 -0
- package/src/common/components/AccessCodeTextInput/index.js +33 -0
- package/src/common/components/ApiFeatureFlagInitializer/index.js +44 -0
- package/src/common/components/ConfirmationModal/__tests__/ConfirmationModal.test.js +111 -0
- package/src/common/components/ConfirmationModal/index.js +23 -0
- package/src/common/components/ConfirmationModal/presenter.js +120 -0
- package/src/common/components/ImportModal/ImportFileSelector/__tests__/ImportFileSelector.test.js +30 -0
- package/src/common/components/ImportModal/ImportFileSelector/index.js +124 -0
- package/src/common/components/ImportModal/ImportFileSelector/styles.js +27 -0
- package/src/common/components/ImportModal/ImportFileSelector/theme.js +15 -0
- package/src/common/components/ImportModal/__tests__/ImportModal.test.js +489 -0
- package/src/common/components/ImportModal/__tests__/index.test.js +53 -0
- package/src/common/components/ImportModal/index.js +75 -0
- package/src/common/components/ImportModal/presenter.js +389 -0
- package/src/common/components/ImportModal/styles.js +8 -0
- package/src/common/components/ImportModal/theme.js +7 -0
- package/src/common/components/LearnosityCalculator/__tests__/index.test.js +234 -0
- package/src/common/components/LearnosityCalculator/index.js +119 -0
- package/src/common/components/MaskedTextInput/MaskedTextInput.stories.js +16 -0
- package/src/common/components/MaskedTextInput/__tests__/index.test.js +42 -0
- package/src/common/components/MaskedTextInput/index.js +55 -0
- package/src/common/components/ModuleNavigationButtons/index.tsx +56 -0
- package/src/common/components/Pin/__tests__/Pin.test.js +57 -0
- package/src/common/components/Pin/index.js +4 -0
- package/src/common/components/Pin/presenter.js +39 -0
- package/src/common/components/PreviewFrame/__tests__/index.test.js +55 -0
- package/src/common/components/PreviewFrame/index.js +30 -0
- package/src/common/components/PrintFontSizeModal/__tests__/presenter.test.js +114 -0
- package/src/common/components/PrintFontSizeModal/index.js +3 -0
- package/src/common/components/PrintFontSizeModal/presenter.js +192 -0
- package/src/common/components/PrintFontSizeModal/styles.js +13 -0
- package/src/common/components/PrintFontSizeModal/theme.js +8 -0
- package/src/common/components/RceConfigProvider/index.js +20 -0
- package/src/common/components/RceConfigProvider/presenter.js +159 -0
- package/src/common/components/RceConfigProvider/rceConfigErrorHandler.js +28 -0
- package/src/common/components/RceConfigProvider/rceConfigErrorMessages.js +24 -0
- package/src/common/components/RceConfigProvider/rceConfigFetcher.js +18 -0
- package/src/common/components/RceConfigProvider/rceConfigMapper.js +54 -0
- package/src/common/components/RceConfigProvider/rceConfigUtils.js +20 -0
- package/src/common/components/SDKApp/index.js +350 -0
- package/src/common/components/SDKApp/styles.js +9 -0
- package/src/common/components/SDKHeaderCalculator.js +29 -0
- package/src/common/components/SDKMenuButton.js +17 -0
- package/src/common/components/SDKNavBar.js +17 -0
- package/src/common/components/SDKTimer.js +26 -0
- package/src/common/components/TimingAlerts/__tests__/presenter.test.js +129 -0
- package/src/common/components/TimingAlerts/index.js +1 -0
- package/src/common/components/TimingAlerts/presenter.js +51 -0
- package/src/common/components/__tests__/ApiFeatureFlagInitializer.test.js +57 -0
- package/src/common/components/__tests__/RceConfigProvider.test.js +415 -0
- package/src/common/components/__tests__/SDKApp.test.js +214 -0
- package/src/common/components/__tests__/rceConfigErrorHandler.test.js +97 -0
- package/src/common/components/__tests__/rceConfigErrorMessages.test.js +22 -0
- package/src/common/components/__tests__/rceConfigFetcher.test.js +86 -0
- package/src/common/components/__tests__/rceConfigMapper.test.js +184 -0
- package/src/common/components/__tests__/rceConfigUtils.test.js +122 -0
- package/src/common/components/alerts/__tests__/Alerts.test.js +75 -0
- package/src/common/components/alerts/index.js +20 -0
- package/src/common/components/alerts/presenter.js +85 -0
- package/src/common/components/alerts/styles.js +24 -0
- package/src/common/components/alerts/theme.js +11 -0
- package/src/common/components/layout/Page/__tests__/index.test.js +31 -0
- package/src/common/components/layout/Page/index.js +79 -0
- package/src/common/components/layout/Page/styles.js +42 -0
- package/src/common/components/layout/Page/theme.js +9 -0
- package/src/common/components/layout/header/Calculator/README.md +19 -0
- package/src/common/components/layout/header/Calculator/__tests__/index.test.js +41 -0
- package/src/common/components/layout/header/Calculator/__tests__/presenter.test.js +26 -0
- package/src/common/components/layout/header/Calculator/index.js +25 -0
- package/src/common/components/layout/header/Calculator/presenter.js +73 -0
- package/src/common/components/layout/header/HeaderMenuButton/__tests__/HeaderTitle.test.js +138 -0
- package/src/common/components/layout/header/HeaderMenuButton/index.js +33 -0
- package/src/common/components/layout/header/HeaderMenuButton/presenter.js +60 -0
- package/src/common/components/layout/header/HeaderMenuButton/styles.js +29 -0
- package/src/common/components/layout/header/HeaderMenuButton/theme.js +10 -0
- package/src/common/components/layout/header/Timer/README.md +46 -0
- package/src/common/components/layout/header/Timer/__tests__/Timer.test.js +150 -0
- package/src/common/components/layout/header/Timer/index.js +32 -0
- package/src/common/components/layout/header/Timer/presenter.js +199 -0
- package/src/common/components/layout/header/Timer/styles.js +30 -0
- package/src/common/components/layout/header/Timer/theme.js +16 -0
- package/src/common/components/layout/navbar/SecondaryNavBarButton/__tests__/index.test.js +21 -0
- package/src/common/components/layout/navbar/SecondaryNavBarButton/index.js +31 -0
- package/src/common/components/layout/navbar/__tests__/navbar.test.js +62 -0
- package/src/common/components/layout/navbar/externalStyles.js +5 -0
- package/src/common/components/layout/navbar/index.js +126 -0
- package/src/common/components/layout/navbar/styles.js +11 -0
- package/src/common/components/layout/navbar/theme.js +8 -0
- package/src/common/components/layout/sidebar/PositionSummary/__tests__/index.test.js +9 -0
- package/src/common/components/layout/sidebar/PositionSummary/index.js +37 -0
- package/src/common/components/layout/sidebar/PositionSummary/styles.js +28 -0
- package/src/common/components/layout/sidebar/PositionSummary/theme.js +13 -0
- package/src/common/components/layout/sidebar/Sidebar/Pin.js +29 -0
- package/src/common/components/layout/sidebar/Sidebar/__tests__/Sidebar.test.js +210 -0
- package/src/common/components/layout/sidebar/Sidebar/components/TotalPointsPossible.js +51 -0
- package/src/common/components/layout/sidebar/Sidebar/externalStyles.js +8 -0
- package/src/common/components/layout/sidebar/Sidebar/index.js +387 -0
- package/src/common/components/layout/sidebar/Sidebar/styles.js +125 -0
- package/src/common/components/layout/sidebar/Sidebar/theme.js +41 -0
- package/src/common/components/layout/sidebar/SidebarItem/__tests__/SidebarItem.test.js +17 -0
- package/src/common/components/layout/sidebar/SidebarItem/__tests__/presenter.test.js +61 -0
- package/src/common/components/layout/sidebar/SidebarItem/index.js +31 -0
- package/src/common/components/layout/sidebar/SidebarItem/presenter.js +217 -0
- package/src/common/components/layout/sidebar/SidebarItem/styles.js +65 -0
- package/src/common/components/layout/sidebar/SidebarItem/theme.js +24 -0
- package/src/common/components/layout/sidebar/Stimulus/Collection/__tests__/Collection.test.js +23 -0
- package/src/common/components/layout/sidebar/Stimulus/Collection/__tests__/presenter.test.js +146 -0
- package/src/common/components/layout/sidebar/Stimulus/Collection/index.js +7 -0
- package/src/common/components/layout/sidebar/Stimulus/Collection/presenter.js +147 -0
- package/src/common/components/layout/sidebar/Stimulus/Collection/styles.js +63 -0
- package/src/common/components/layout/sidebar/Stimulus/Collection/theme.js +9 -0
- package/src/common/components/layout/sidebar/Stimulus/Summary/__tests__/presenter.test.js +105 -0
- package/src/common/components/layout/sidebar/Stimulus/Summary/index.js +7 -0
- package/src/common/components/layout/sidebar/Stimulus/Summary/presenter.js +122 -0
- package/src/common/components/layout/sidebar/Stimulus/Summary/styles.js +34 -0
- package/src/common/components/layout/sidebar/Stimulus/Summary/theme.js +12 -0
- package/src/common/components/layout/sidebar/Stimulus/Title/__tests__/Title.test.js +30 -0
- package/src/common/components/layout/sidebar/Stimulus/Title/index.js +51 -0
- package/src/common/components/layout/sidebar/Stimulus/Title/styles.js +12 -0
- package/src/common/components/layout/sidebar/Stimulus/__tests__/Stimulus.test.js +46 -0
- package/src/common/components/layout/sidebar/Stimulus/__tests__/presenter.test.js +140 -0
- package/src/common/components/layout/sidebar/Stimulus/index.js +28 -0
- package/src/common/components/layout/sidebar/Stimulus/presenter.js +255 -0
- package/src/common/components/layout/sidebar/Stimulus/styles.js +9 -0
- package/src/common/components/layout/sidebar/Stimulus/theme.js +8 -0
- package/src/common/components/resources/BankSelection/__tests__/index.test.js +17 -0
- package/src/common/components/resources/BankSelection/__tests__/presenter.test.js +36 -0
- package/src/common/components/resources/BankSelection/index.js +21 -0
- package/src/common/components/resources/BankSelection/presenter.js +94 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultHeader/index.js +84 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultHeader/styles.js +29 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultHeader/theme.js +10 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/LetterGrade.js +38 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/PointsDisplay.js +104 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/components/Progress.js +68 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultInfo/ScoreDisplay/index.js +58 -0
- package/src/common/components/resources/QuizSessionResult/QuizSessionResultInfo/index.js +134 -0
- package/src/common/components/resources/WarningWrapper/__tests__/index.test.js +48 -0
- package/src/common/components/resources/WarningWrapper/index.js +120 -0
- package/src/common/components/resources/WarningWrapper/styles.js +31 -0
- package/src/common/components/resources/WarningWrapper/theme.js +12 -0
- package/src/common/components/resources/entry/EntrySave/__tests__/index.test.js +35 -0
- package/src/common/components/resources/entry/EntrySave/__tests__/presenter.test.js +251 -0
- package/src/common/components/resources/entry/EntrySave/index.js +25 -0
- package/src/common/components/resources/entry/EntrySave/presenter.js +152 -0
- package/src/common/components/resources/item/ItemEdit/__tests__/index.test.js +105 -0
- package/src/common/components/resources/item/ItemEdit/__tests__/presenter.test.js +285 -0
- package/src/common/components/resources/item/ItemEdit/index.js +82 -0
- package/src/common/components/resources/item/ItemEdit/presenter.js +204 -0
- package/src/common/components/resources/item/ItemOverride/__tests__/index.test.js +103 -0
- package/src/common/components/resources/item/ItemOverride/__tests__/presenter.test.js +63 -0
- package/src/common/components/resources/item/ItemOverride/index.js +40 -0
- package/src/common/components/resources/item/ItemOverride/presenter.js +64 -0
- package/src/common/components/resources/item/ItemShow/index.js +41 -0
- package/src/common/components/resources/positionBox/PositionBox.js +42 -0
- package/src/common/components/resources/positionBox/__tests__/PositionBox.test.js +28 -0
- package/src/common/components/resources/positionBox/styles.js +27 -0
- package/src/common/components/resources/positionBox/theme.js +13 -0
- package/src/common/components/resources/quiz/AddContent/Body/__tests__/presenter.test.js +221 -0
- package/src/common/components/resources/quiz/AddContent/Body/index.js +31 -0
- package/src/common/components/resources/quiz/AddContent/Body/presenter.js +230 -0
- package/src/common/components/resources/quiz/AddContent/Body/styles.js +33 -0
- package/src/common/components/resources/quiz/AddContent/Body/theme.js +10 -0
- package/src/common/components/resources/quiz/AddContent/Button/__tests__/index.test.js +40 -0
- package/src/common/components/resources/quiz/AddContent/Button/index.js +93 -0
- package/src/common/components/resources/quiz/AddContent/Button/styles.js +52 -0
- package/src/common/components/resources/quiz/AddContent/Button/theme.js +21 -0
- package/src/common/components/resources/quiz/AddContent/Modal/index.js +34 -0
- package/src/common/components/resources/quiz/AddContent/Modal/presenter.js +87 -0
- package/src/common/components/resources/quiz/AddContent/Popover/README.md +36 -0
- package/src/common/components/resources/quiz/AddContent/Popover/__tests__/index.test.js +31 -0
- package/src/common/components/resources/quiz/AddContent/Popover/__tests__/presenter.test.js +86 -0
- package/src/common/components/resources/quiz/AddContent/Popover/index.js +42 -0
- package/src/common/components/resources/quiz/AddContent/Popover/presenter.js +168 -0
- package/src/common/components/resources/quiz/AddContent/Popover/styles.js +32 -0
- package/src/common/components/resources/quiz/AddContent/Popover/theme.js +8 -0
- package/src/common/components/resources/quiz/info/QuizInfo.js +26 -0
- package/src/common/components/resources/quiz/info/__tests__/QuizInfo.test.js +35 -0
- package/src/common/components/resources/quiz/instructions/Instructions.js +49 -0
- package/src/common/components/resources/quiz/instructions/__tests__/Instructions.test.js +22 -0
- package/src/common/components/resources/quiz/instructions/styles.js +34 -0
- package/src/common/components/resources/quiz/instructions/theme.js +9 -0
- package/src/common/components/resources/quiz/title/Title.js +43 -0
- package/src/common/components/resources/quiz/title/__tests__/Title.test.js +23 -0
- package/src/common/components/resources/quiz/title/styles.js +19 -0
- package/src/common/components/resources/quiz/title/theme.js +9 -0
- package/src/common/components/resources/sessionItemResult/ResultStimulus/__tests__/resultStimulus.test.js +74 -0
- package/src/common/components/resources/sessionItemResult/ResultStimulus/index.js +85 -0
- package/src/common/components/resources/sessionItemResult/ResultStimulus/styles.js +91 -0
- package/src/common/components/resources/sessionItemResult/ResultStimulus/theme.js +29 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResult/__tests__/SessionItemResult.test.js +309 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResult/components/SessionItemResultHeader.js +180 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResult/index.js +25 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +277 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResult/styles.js +41 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResult/theme.js +28 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResultsList/__tests__/SessionItemResultsList.test.js +36 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +83 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResultsList/styles.js +17 -0
- package/src/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +12 -0
- package/src/common/components/resources/stimulus/Stimulus/__tests__/presenter.test.js +12 -0
- package/src/common/components/resources/stimulus/Stimulus/index.js +36 -0
- package/src/common/components/resources/stimulus/Stimulus/presenter.js +241 -0
- package/src/common/components/resources/stimulus/Stimulus/styles.js +64 -0
- package/src/common/components/resources/stimulus/Stimulus/theme.js +13 -0
- package/src/common/components/resources/stimulus/StimulusEdit/__tests__/presenter.test.js +688 -0
- package/src/common/components/resources/stimulus/StimulusEdit/index.js +59 -0
- package/src/common/components/resources/stimulus/StimulusEdit/presenter.js +466 -0
- package/src/common/components/resources/stimulus/StimulusEdit/styles.js +42 -0
- package/src/common/components/resources/stimulus/StimulusEdit/theme.js +14 -0
- package/src/common/components/resources/stimulus/StimulusEditInfo/__tests__/presenter.test.js +214 -0
- package/src/common/components/resources/stimulus/StimulusEditInfo/index.js +33 -0
- package/src/common/components/resources/stimulus/StimulusEditInfo/presenter.js +228 -0
- package/src/common/components/resources/stimulus/StimulusEditInfo/styles.js +15 -0
- package/src/common/components/resources/stimulus/StimulusEditInfo/theme.js +10 -0
- package/src/common/components/resources/stimulus/StimulusShow/__tests__/StimulusShow.test.js +137 -0
- package/src/common/components/resources/stimulus/StimulusShow/index.js +109 -0
- package/src/common/components/resources/stimulus/StimulusShow/styles.js +30 -0
- package/src/common/components/resources/stimulus/StimulusShow/theme.js +11 -0
- package/src/common/components/resources/stimulus/StimulusShowInfo/__tests__/StimulusShowInfo.test.js +41 -0
- package/src/common/components/resources/stimulus/StimulusShowInfo/index.js +59 -0
- package/src/common/components/shared/Card/CardContent/__tests__/CardContent.test.js +12 -0
- package/src/common/components/shared/Card/CardContent/index.js +43 -0
- package/src/common/components/shared/Card/CardContent/styles.js +20 -0
- package/src/common/components/shared/Card/CardContent/theme.js +15 -0
- package/src/common/components/shared/Card/CardWrapper/__tests__/CardWrapper.test.js +12 -0
- package/src/common/components/shared/Card/CardWrapper/index.js +38 -0
- package/src/common/components/shared/Card/CardWrapper/styles.js +17 -0
- package/src/common/components/shared/Card/CardWrapper/theme.js +10 -0
- package/src/common/components/shared/Card/__tests__/Card.test.js +22 -0
- package/src/common/components/shared/Card/index.js +25 -0
- package/src/common/components/shared/ExpandButton/__tests__/ExpandButton.test.js +29 -0
- package/src/common/components/shared/ExpandButton/index.js +54 -0
- package/src/common/components/shared/ExpandButton/styles.js +12 -0
- package/src/common/components/shared/ExpandButton/theme.js +7 -0
- package/src/common/components/shared/FormattedDuration/__tests__/FormattedDuration.test.js +177 -0
- package/src/common/components/shared/FormattedDuration/index.js +81 -0
- package/src/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +190 -0
- package/src/common/components/shared/GenericAsyncSearch/__tests__/GenericAsyncSearch.test.js +68 -0
- package/src/common/components/shared/IfFeature/__tests__/index.test.js +27 -0
- package/src/common/components/shared/IfFeature/__tests__/presenter.test.js +25 -0
- package/src/common/components/shared/IfFeature/index.js +13 -0
- package/src/common/components/shared/IfFeature/presenter.js +24 -0
- package/src/common/components/shared/InteractionTypes/__tests__/presenter.test.js +84 -0
- package/src/common/components/shared/InteractionTypes/index.js +8 -0
- package/src/common/components/shared/InteractionTypes/presenter.js +163 -0
- package/src/common/components/shared/InteractionTypes/styles.js +19 -0
- package/src/common/components/shared/InteractionTypes/theme.js +10 -0
- package/src/common/components/shared/PaginatedCollection/__tests__/index.test.js +30 -0
- package/src/common/components/shared/PaginatedCollection/__tests__/presenter.test.js +239 -0
- package/src/common/components/shared/PaginatedCollection/index.js +19 -0
- package/src/common/components/shared/PaginatedCollection/presenter.js +145 -0
- package/src/common/components/shared/PaginatedCollection/styles.js +12 -0
- package/src/common/components/shared/PaginatedCollection/theme.js +9 -0
- package/src/common/components/shared/Paginator/__tests__/index.test.js +50 -0
- package/src/common/components/shared/Paginator/index.js +57 -0
- package/src/common/components/shared/Paginator/styles.js +9 -0
- package/src/common/components/shared/Paginator/theme.js +7 -0
- package/src/common/components/shared/PrintTrigger/__tests__/index.test.js +67 -0
- package/src/common/components/shared/PrintTrigger/__tests__/presenter.test.js +188 -0
- package/src/common/components/shared/PrintTrigger/index.js +53 -0
- package/src/common/components/shared/PrintTrigger/presenter.js +128 -0
- package/src/common/components/shared/TagDisplay/__tests__/index.test.js +36 -0
- package/src/common/components/shared/TagDisplay/index.js +64 -0
- package/src/common/components/shared/TagDisplay/styles.js +9 -0
- package/src/common/components/shared/TagSelect/__tests__/index.test.js +214 -0
- package/src/common/components/shared/TagSelect/index.js +3 -0
- package/src/common/components/shared/TagSelect/presenter.js +228 -0
- package/src/common/components/shared/TagSuggestSelect/__tests__/presenter.test.js +84 -0
- package/src/common/components/shared/TagSuggestSelect/index.js +27 -0
- package/src/common/components/shared/TagSuggestSelect/presenter.js +79 -0
- package/src/common/components/shared/TagWrapper/__tests__/presenter.test.js +34 -0
- package/src/common/components/shared/TagWrapper/index.js +3 -0
- package/src/common/components/shared/TagWrapper/presenter.js +48 -0
- package/src/common/components/shared/TimeUnitsInput/__tests__/index.test.js +314 -0
- package/src/common/components/shared/TimeUnitsInput/index.js +359 -0
- package/src/common/components/shared/drag_and_drop/DragAndDropZone/__tests__/index.test.js +174 -0
- package/src/common/components/shared/drag_and_drop/DragAndDropZone/index.js +91 -0
- package/src/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +45 -0
- package/src/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +18 -0
- package/src/common/components/shared/drag_and_drop/DragHandle/__tests__/dragHandle.test.js +528 -0
- package/src/common/components/shared/drag_and_drop/DragHandle/index.js +30 -0
- package/src/common/components/shared/drag_and_drop/DragHandle/presenter.js +267 -0
- package/src/common/components/shared/drag_and_drop/__tests__/dragAndDropUtils.test.js +738 -0
- package/src/common/components/shared/drag_and_drop/dragAndDropUtils.js +441 -0
- package/src/common/components/shared/file_selector/FileSelector.js +60 -0
- package/src/common/components/shared/file_selector/__tests__/FileSelector.test.js +26 -0
- package/src/common/components/shared/file_selector/styles.js +12 -0
- package/src/common/components/shared/file_selector/theme.js +10 -0
- package/src/common/components/shared/functionality/__tests__/componentWithOutsideClick.test.js +79 -0
- package/src/common/components/shared/functionality/__tests__/makeEditable.test.js +60 -0
- package/src/common/components/shared/functionality/__tests__/makeScrollable.test.js +113 -0
- package/src/common/components/shared/functionality/componentWithOutsideClick.js +58 -0
- package/src/common/components/shared/functionality/componentWithOutsideClickEmotion.js +71 -0
- package/src/common/components/shared/functionality/disableDraggingOverride.js +10 -0
- package/src/common/components/shared/functionality/makeEditable.js +100 -0
- package/src/common/components/shared/functionality/makeScrollable.js +120 -0
- package/src/common/components/shared/functionality/outsideClickStore.js +9 -0
- package/src/common/components/shared/overlay/__tests__/Overlay.test.js +66 -0
- package/src/common/components/shared/overlay/index.js +76 -0
- package/src/common/components/shared/overlay/styles.js +30 -0
- package/src/common/components/shared/overlay/theme.js +9 -0
- package/src/common/components/shared/return_button/ReturnButton.js +67 -0
- package/src/common/components/shared/return_button/__tests__/ReturnButton.test.js +87 -0
- package/src/common/components/shared/spinner/Spinner.js +86 -0
- package/src/common/components/shared/spinner/__tests__/Spinner.test.js +22 -0
- package/src/common/components/shared/spinner/styles.js +15 -0
- package/src/common/kinesis/QuizEventsLogger.js +108 -0
- package/src/common/kinesis/StreamQueue.js +137 -0
- package/src/common/kinesis/__tests__/QuizEventsLogger.test.js +148 -0
- package/src/common/kinesis/__tests__/StreamQueue.test.js +47 -0
- package/src/common/kinesis/__tests__/client.test.js +106 -0
- package/src/common/kinesis/__tests__/config.test.js +4 -0
- package/src/common/kinesis/__tests__/eventTypes.test.js +62 -0
- package/src/common/kinesis/__tests__/kinesisTests.js +44 -0
- package/src/common/kinesis/client.js +53 -0
- package/src/common/kinesis/config.js +51 -0
- package/src/common/kinesis/eventTypes.js +43 -0
- package/src/common/middleware/__tests__/alertTimerMiddleware.test.js +46 -0
- package/src/common/middleware/__tests__/eventLoggerMiddleware.test.js +64 -0
- package/src/common/middleware/__tests__/persistedStorageMiddleware.test.js +111 -0
- package/src/common/middleware/__tests__/quizTimerWebSocketMiddleware.test.js +220 -0
- package/src/common/middleware/__tests__/sharedBanksMiddleware.test.js +46 -0
- package/src/common/middleware/alertTimerMiddleware.js +26 -0
- package/src/common/middleware/appSyncMiddleware.js +18 -0
- package/src/common/middleware/crossDomainMessagingMiddleware.js +11 -0
- package/src/common/middleware/eventLoggerMiddleware.js +36 -0
- package/src/common/middleware/persistedStorageMiddleware.js +64 -0
- package/src/common/middleware/quizTimerWebSocketMiddleware.js +92 -0
- package/src/common/middleware/sharedBanksMiddleware.js +147 -0
- package/src/common/react-redux.js +65 -0
- package/src/common/records/Alert.ts +11 -0
- package/src/common/records/Bank.ts +79 -0
- package/src/common/records/BankEntry.ts +68 -0
- package/src/common/records/Item.ts +119 -0
- package/src/common/records/ItemAnalysis.ts +125 -0
- package/src/common/records/QtiImport.ts +28 -0
- package/src/common/records/Quiz.ts +157 -0
- package/src/common/records/QuizAnalysis.ts +76 -0
- package/src/common/records/QuizEntry.ts +433 -0
- package/src/common/records/QuizSession.ts +177 -0
- package/src/common/records/QuizSessionEvent.ts +30 -0
- package/src/common/records/QuizSessionResult.ts +51 -0
- package/src/common/records/Response.ts +28 -0
- package/src/common/records/SessionItem.ts +107 -0
- package/src/common/records/SessionItemResult.ts +73 -0
- package/src/common/records/Stimulus.ts +60 -0
- package/src/common/records/__tests__/Bank.test.js +76 -0
- package/src/common/records/__tests__/BankEntry.test.js +102 -0
- package/src/common/records/__tests__/Item.test.js +96 -0
- package/src/common/records/__tests__/ItemAnalysis.test.js +184 -0
- package/src/common/records/__tests__/QtiImport.test.js +38 -0
- package/src/common/records/__tests__/Quiz.test.js +226 -0
- package/src/common/records/__tests__/QuizAnalysis.test.js +92 -0
- package/src/common/records/__tests__/QuizEntry.test.js +831 -0
- package/src/common/records/__tests__/QuizSession.test.js +267 -0
- package/src/common/records/__tests__/QuizSessionEvent.test.js +56 -0
- package/src/common/records/__tests__/QuizSessionResult.test.js +100 -0
- package/src/common/records/__tests__/Response.test.js +59 -0
- package/src/common/records/__tests__/SessionItem.test.js +195 -0
- package/src/common/records/__tests__/SessionItemResult.test.js +107 -0
- package/src/common/records/__tests__/Stimulus.test.js +49 -0
- package/src/common/records/__tests__/baseRecord.test.js +116 -0
- package/src/common/records/baseRecord.ts +73 -0
- package/src/common/records/index.ts +16 -0
- package/src/common/records/reduxRecord.ts +24 -0
- package/src/common/reducers/__tests__/alerts.test.js +32 -0
- package/src/common/reducers/__tests__/analyses.test.js +97 -0
- package/src/common/reducers/__tests__/bankEntries.test.js +38 -0
- package/src/common/reducers/__tests__/bankSearch.test.js +60 -0
- package/src/common/reducers/__tests__/banks.test.js +84 -0
- package/src/common/reducers/__tests__/calls.test.js +59 -0
- package/src/common/reducers/__tests__/config.test.js +20 -0
- package/src/common/reducers/__tests__/dragAndDrop.test.js +28 -0
- package/src/common/reducers/__tests__/editing.test.js +50 -0
- package/src/common/reducers/__tests__/errorsShowing.test.js +62 -0
- package/src/common/reducers/__tests__/features.test.js +30 -0
- package/src/common/reducers/__tests__/grading.test.js +36 -0
- package/src/common/reducers/__tests__/interactionTypes.test.js +34 -0
- package/src/common/reducers/__tests__/items.test.js +36 -0
- package/src/common/reducers/__tests__/modal.test.js +74 -0
- package/src/common/reducers/__tests__/moderation.test.js +43 -0
- package/src/common/reducers/__tests__/modifications.test.js +626 -0
- package/src/common/reducers/__tests__/outcomes.test.js +51 -0
- package/src/common/reducers/__tests__/printing.test.js +30 -0
- package/src/common/reducers/__tests__/qtiImports.test.js +38 -0
- package/src/common/reducers/__tests__/quizEntries.test.js +379 -0
- package/src/common/reducers/__tests__/quizSession.test.js +110 -0
- package/src/common/reducers/__tests__/quizSessionEvents.test.js +34 -0
- package/src/common/reducers/__tests__/quizSessionResults.test.js +49 -0
- package/src/common/reducers/__tests__/quizzes.test.js +97 -0
- package/src/common/reducers/__tests__/rce.test.js +34 -0
- package/src/common/reducers/__tests__/reporting.test.js +63 -0
- package/src/common/reducers/__tests__/scrolling.test.js +42 -0
- package/src/common/reducers/__tests__/sessionItemResults.test.js +40 -0
- package/src/common/reducers/__tests__/sessionItems.test.js +48 -0
- package/src/common/reducers/__tests__/sharedBanks.test.js +55 -0
- package/src/common/reducers/__tests__/sidebar.test.js +39 -0
- package/src/common/reducers/__tests__/stimuli.test.js +36 -0
- package/src/common/reducers/__tests__/tagAssociations.test.js +184 -0
- package/src/common/reducers/__tests__/taking.test.js +233 -0
- package/src/common/reducers/__tests__/ui.test.js +88 -0
- package/src/common/reducers/__tests__/upload.test.js +61 -0
- package/src/common/reducers/alerts.js +14 -0
- package/src/common/reducers/analyses.js +70 -0
- package/src/common/reducers/bankEntries.js +20 -0
- package/src/common/reducers/bankSearch.js +30 -0
- package/src/common/reducers/banks.js +57 -0
- package/src/common/reducers/calls.js +14 -0
- package/src/common/reducers/config.js +30 -0
- package/src/common/reducers/dragAndDrop.js +12 -0
- package/src/common/reducers/editing.js +16 -0
- package/src/common/reducers/errorsShowing.js +16 -0
- package/src/common/reducers/features.js +14 -0
- package/src/common/reducers/grading.js +20 -0
- package/src/common/reducers/interactionTypes.js +17 -0
- package/src/common/reducers/items.js +19 -0
- package/src/common/reducers/modal.js +43 -0
- package/src/common/reducers/moderation.js +25 -0
- package/src/common/reducers/modifications.js +300 -0
- package/src/common/reducers/outcomes.js +30 -0
- package/src/common/reducers/printing.js +16 -0
- package/src/common/reducers/qtiImports.js +20 -0
- package/src/common/reducers/quizEntries.js +167 -0
- package/src/common/reducers/quizExport.js +11 -0
- package/src/common/reducers/quizSessionEvents.js +21 -0
- package/src/common/reducers/quizSessionResults.js +18 -0
- package/src/common/reducers/quizSessions.js +54 -0
- package/src/common/reducers/quizzes.js +60 -0
- package/src/common/reducers/rce.js +22 -0
- package/src/common/reducers/regrading.js +28 -0
- package/src/common/reducers/reporting.js +49 -0
- package/src/common/reducers/scrolling.js +16 -0
- package/src/common/reducers/sessionItemResults.js +18 -0
- package/src/common/reducers/sessionItems.js +19 -0
- package/src/common/reducers/sharedBanks.js +29 -0
- package/src/common/reducers/sharingModal.js +17 -0
- package/src/common/reducers/sidebar.js +14 -0
- package/src/common/reducers/stimuli.js +19 -0
- package/src/common/reducers/tagAssociations.js +172 -0
- package/src/common/reducers/taking.js +164 -0
- package/src/common/reducers/ui.js +40 -0
- package/src/common/reducers/upload.js +30 -0
- package/src/common/selectors/__tests__/analyses.test.js +95 -0
- package/src/common/selectors/__tests__/calculator.test.js +121 -0
- package/src/common/selectors/__tests__/calls.test.js +30 -0
- package/src/common/selectors/__tests__/config.test.js +30 -0
- package/src/common/selectors/__tests__/interactionTypes.test.js +77 -0
- package/src/common/selectors/__tests__/items.test.js +37 -0
- package/src/common/selectors/__tests__/qtiImports.test.js +24 -0
- package/src/common/selectors/__tests__/quizSessionResults.test.js +41 -0
- package/src/common/selectors/__tests__/quizSessions.test.js +100 -0
- package/src/common/selectors/__tests__/quizzes.test.js +140 -0
- package/src/common/selectors/__tests__/rce.test.js +36 -0
- package/src/common/selectors/__tests__/reporting.test.js +140 -0
- package/src/common/selectors/__tests__/sessionItemResults.test.js +42 -0
- package/src/common/selectors/__tests__/sessionItems.test.js +77 -0
- package/src/common/selectors/__tests__/taking.test.js +173 -0
- package/src/common/selectors/__tests__/ui.test.js +17 -0
- package/src/common/selectors/analyses.js +44 -0
- package/src/common/selectors/calculator.js +23 -0
- package/src/common/selectors/calls.js +8 -0
- package/src/common/selectors/config.js +14 -0
- package/src/common/selectors/interactionTypes.js +21 -0
- package/src/common/selectors/items.js +16 -0
- package/src/common/selectors/qtiImports.js +17 -0
- package/src/common/selectors/quizSessionResults.js +13 -0
- package/src/common/selectors/quizSessions.js +34 -0
- package/src/common/selectors/quizzes.js +92 -0
- package/src/common/selectors/rce.js +7 -0
- package/src/common/selectors/reporting.js +12 -0
- package/src/common/selectors/sessionItemResults.js +26 -0
- package/src/common/selectors/sessionItems.js +39 -0
- package/src/common/selectors/taking.js +43 -0
- package/src/common/selectors/ui.js +3 -0
- package/src/common/util/CustomPropTypes.js +90 -0
- package/src/common/util/ElementsForSelectors.js +10 -0
- package/src/common/util/ExhaustivePaginatedFetcher.js +51 -0
- package/src/common/util/Fetcher.js +267 -0
- package/src/common/util/MultiWeakMap.js +56 -0
- package/src/common/util/PaginatedFetcher.js +36 -0
- package/src/common/util/ThunkQueue.js +70 -0
- package/src/common/util/TimeRecordingService.js +54 -0
- package/src/common/util/TimerService.js +155 -0
- package/src/common/util/__tests__/CustomPropTypes.test.js +134 -0
- package/src/common/util/__tests__/ExhaustivePaginatedFetcher.test.js +96 -0
- package/src/common/util/__tests__/Fetcher.test.js +370 -0
- package/src/common/util/__tests__/MultiWeakMap.test.js +38 -0
- package/src/common/util/__tests__/ThunkQueue.test.js +128 -0
- package/src/common/util/__tests__/TimerRecordingService.test.js +30 -0
- package/src/common/util/__tests__/TimerService.test.js +196 -0
- package/src/common/util/__tests__/cachePreviousArgs.test.js +38 -0
- package/src/common/util/__tests__/callHelpers.test.js +32 -0
- package/src/common/util/__tests__/clickHandlers.test.js +81 -0
- package/src/common/util/__tests__/componentForItem.test.js +46 -0
- package/src/common/util/__tests__/crossDomainMessaging.test.js +27 -0
- package/src/common/util/__tests__/fitbCopyHelper.test.js +70 -0
- package/src/common/util/__tests__/formatTimespan.test.js +129 -0
- package/src/common/util/__tests__/generateDisplayPositions.test.js +50 -0
- package/src/common/util/__tests__/getClientIpAddress.test.js +36 -0
- package/src/common/util/__tests__/httpHeaders.test.js +27 -0
- package/src/common/util/__tests__/immutableHelpers.test.js +71 -0
- package/src/common/util/__tests__/instUIMessages.test.js +10 -0
- package/src/common/util/__tests__/interactionTypeMetadata.test.js +23 -0
- package/src/common/util/__tests__/interactionTypePropsHelper.test.js +139 -0
- package/src/common/util/__tests__/jsonify.test.js +23 -0
- package/src/common/util/__tests__/keyboardClickable.test.js +40 -0
- package/src/common/util/__tests__/localStoreService.test.js +51 -0
- package/src/common/util/__tests__/maxContent.test.js +17 -0
- package/src/common/util/__tests__/modalHelpers.test.js +18 -0
- package/src/common/util/__tests__/persistedState.test.js +46 -0
- package/src/common/util/__tests__/printUtils.test.js +77 -0
- package/src/common/util/__tests__/rceChecker.test.js +34 -0
- package/src/common/util/__tests__/renderAlerts.test.js +33 -0
- package/src/common/util/__tests__/serializeEvent.test.js +196 -0
- package/src/common/util/__tests__/sessionStore.test.js +45 -0
- package/src/common/util/__tests__/valMap.test.js +22 -0
- package/src/common/util/__tests__/windowChecks.test.js +48 -0
- package/src/common/util/__tests__/withCachedArguments.test.js +53 -0
- package/src/common/util/__tests__/withDynamoPagination.test.js +95 -0
- package/src/common/util/__tests__/withStateCache.test.js +140 -0
- package/src/common/util/cachePreviousArgs.js +16 -0
- package/src/common/util/callHelpers.js +25 -0
- package/src/common/util/clickHandlers.js +14 -0
- package/src/common/util/componentForItem.js +143 -0
- package/src/common/util/crossDomainMessaging.js +5 -0
- package/src/common/util/debounceLatestPromise.js +21 -0
- package/src/common/util/featureCheck.js +44 -0
- package/src/common/util/fetchHelpers.js +7 -0
- package/src/common/util/fitbCopyHelper.js +39 -0
- package/src/common/util/formatTimespan.js +64 -0
- package/src/common/util/generateDisplayPositions.js +20 -0
- package/src/common/util/getClientIpAddress.js +12 -0
- package/src/common/util/httpHeaders.js +17 -0
- package/src/common/util/immutableHelpers.js +20 -0
- package/src/common/util/instUIMessages.js +5 -0
- package/src/common/util/interactionTypeMetadata.js +52 -0
- package/src/common/util/interactionTypePropsHelper.js +91 -0
- package/src/common/util/interactionTypeRecordForItem.js +53 -0
- package/src/common/util/isMissing.js +5 -0
- package/src/common/util/jsonify.js +27 -0
- package/src/common/util/keyboardClickable.js +9 -0
- package/src/common/util/localStoreService.js +38 -0
- package/src/common/util/mathRenderingUtils.js +8 -0
- package/src/common/util/maxContent.js +9 -0
- package/src/common/util/modalHelpers.js +6 -0
- package/src/common/util/noop.js +3 -0
- package/src/common/util/persistedState.js +39 -0
- package/src/common/util/printUtils.js +47 -0
- package/src/common/util/rceChecker.js +5 -0
- package/src/common/util/renderAlerts.js +31 -0
- package/src/common/util/serializeEvent.js +60 -0
- package/src/common/util/sessionLockHelpers.js +74 -0
- package/src/common/util/sessionStore.js +57 -0
- package/src/common/util/useRemoteComponent.js +105 -0
- package/src/common/util/valMap.js +13 -0
- package/src/common/util/warningHelpers.js +171 -0
- package/src/common/util/windowChecks.js +19 -0
- package/src/common/util/withCachedArguments.js +28 -0
- package/src/common/util/withDynamoPagination.js +54 -0
- package/src/common/util/withStateCache.js +44 -0
- package/src/config.js +30 -0
- package/src/configureStore.js +154 -0
- package/src/grading/api/__tests__/quizEntryRegrades.test.js +61 -0
- package/src/grading/api/__tests__/updateResults.test.js +140 -0
- package/src/grading/api/quizEntryRegrades.js +45 -0
- package/src/grading/api/updateResults.js +49 -0
- package/src/index.js +275 -0
- package/src/messages/LocalStorageAdapter.js +31 -0
- package/src/messages/LocalStorageLimits.js +70 -0
- package/src/messages/StorageExhaustionError.js +6 -0
- package/src/messages/__tests__/LocalStorageAdapter.test.js +58 -0
- package/src/messages/__tests__/LocalStorageLimits.test.js +147 -0
- package/src/messages/__tests__/PostMessageService.test.js +94 -0
- package/src/messages/postMessageService.js +96 -0
- package/src/messages/subjectHandlers/__tests__/forwardMessage.test.js +54 -0
- package/src/messages/subjectHandlers/__tests__/lti.capabilities.test.js +37 -0
- package/src/messages/subjectHandlers/__tests__/lti.fetchWindowSize.test.js +44 -0
- package/src/messages/subjectHandlers/__tests__/lti.frameResize.test.js +64 -0
- package/src/messages/subjectHandlers/__tests__/lti.get_data.test.js +87 -0
- package/src/messages/subjectHandlers/__tests__/lti.put_data.test.js +89 -0
- package/src/messages/subjectHandlers/__tests__/requestFullWindowLaunch.test.js +30 -0
- package/src/messages/subjectHandlers/forwardMessage.js +7 -0
- package/src/messages/subjectHandlers/lti.capabilities.js +18 -0
- package/src/messages/subjectHandlers/lti.fetchWindowSize.js +16 -0
- package/src/messages/subjectHandlers/lti.frameResize.js +18 -0
- package/src/messages/subjectHandlers/lti.get_data.js +27 -0
- package/src/messages/subjectHandlers/lti.put_data.js +57 -0
- package/src/messages/subjectHandlers/requestFullWindowLaunch.js +13 -0
- package/src/messages/utils.js +6 -0
- package/src/moderating/api/__tests__/quizSessionEvents.test.js +49 -0
- package/src/moderating/api/__tests__/quizSessions.test.js +120 -0
- package/src/moderating/api/quizSessionEvents.js +24 -0
- package/src/moderating/api/quizSessions.js +56 -0
- package/src/moderating/components/events/Event.js +103 -0
- package/src/moderating/components/events/PageBlurredEvent.js +23 -0
- package/src/moderating/components/events/PageFocusedEvent.js +20 -0
- package/src/moderating/components/events/RCEEvent.js +21 -0
- package/src/moderating/components/events/ResponseEvent.js +117 -0
- package/src/moderating/components/events/SessionStartEvent.js +28 -0
- package/src/moderating/components/events/SessionSubmitEvent.js +27 -0
- package/src/moderating/components/events/__tests__/Event.test.js +130 -0
- package/src/moderating/components/events/__tests__/PageBlurredEvent.test.js +28 -0
- package/src/moderating/components/events/__tests__/PageFocusedEvent.test.js +28 -0
- package/src/moderating/components/events/__tests__/RCEEvent.test.js +43 -0
- package/src/moderating/components/events/__tests__/ResponseEvent.test.js +190 -0
- package/src/moderating/components/events/__tests__/SessionStartEvent.test.js +67 -0
- package/src/moderating/components/events/__tests__/SessionSubmitEvent.test.js +67 -0
- package/src/moderating/components/events/styles.js +27 -0
- package/src/moderating/components/events/theme.js +11 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +88 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/__tests__/index.test.js +300 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +79 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/__tests__/index.test.js +116 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +113 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/__tests__/index.test.js +99 -0
- package/src/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +158 -0
- package/src/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/__tests__/index.test.js +31 -0
- package/src/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +79 -0
- package/src/moderating/components/resources/AccommodationsModal/__tests__/AccommodationsModal.test.js +73 -0
- package/src/moderating/components/resources/AccommodationsModal/index.js +159 -0
- package/src/moderating/components/resources/ElapsedTime.js +48 -0
- package/src/moderating/components/resources/EventDetails.js +55 -0
- package/src/moderating/components/resources/ModerateTable/README.md +53 -0
- package/src/moderating/components/resources/ModerateTable/__tests__/index.test.js +79 -0
- package/src/moderating/components/resources/ModerateTable/__tests__/presenter.test.js +292 -0
- package/src/moderating/components/resources/ModerateTable/index.js +41 -0
- package/src/moderating/components/resources/ModerateTable/presenter.js +439 -0
- package/src/moderating/components/resources/ModerateTable/styles.js +24 -0
- package/src/moderating/components/resources/ModerateTable/theme.js +8 -0
- package/src/moderating/components/resources/ModerateTableRow/__tests__/index.test.js +60 -0
- package/src/moderating/components/resources/ModerateTableRow/__tests__/presenter.test.js +336 -0
- package/src/moderating/components/resources/ModerateTableRow/index.js +17 -0
- package/src/moderating/components/resources/ModerateTableRow/presenter.js +461 -0
- package/src/moderating/components/resources/ModerateTableRow/story.js +19 -0
- package/src/moderating/components/resources/ModerateTableRow/styles.js +23 -0
- package/src/moderating/components/resources/ModerateTableRow/theme.js +8 -0
- package/src/moderating/components/resources/OutstandingQuizzesModal/__tests__/presenter.test.js +118 -0
- package/src/moderating/components/resources/OutstandingQuizzesModal/index.js +18 -0
- package/src/moderating/components/resources/OutstandingQuizzesModal/presenter.js +173 -0
- package/src/moderating/components/resources/RetryGradePassbackButton/__tests__/presenter.test.js +92 -0
- package/src/moderating/components/resources/RetryGradePassbackButton/index.js +23 -0
- package/src/moderating/components/resources/RetryGradePassbackButton/presenter.js +57 -0
- package/src/moderating/components/resources/__tests__/ElapsedTime.test.js +24 -0
- package/src/moderating/components/resources/util/__tests__/extractSessionData.test.js +79 -0
- package/src/moderating/components/resources/util/__tests__/renderEventSummary.test.js +22 -0
- package/src/moderating/components/resources/util/extractSessionData.js +31 -0
- package/src/moderating/components/resources/util/renderEventSummary.js +34 -0
- package/src/moderating/components/sidebar/ModerateTray/__tests__/index.test.js +20 -0
- package/src/moderating/components/sidebar/ModerateTray/__tests__/presenter.test.js +37 -0
- package/src/moderating/components/sidebar/ModerateTray/index.js +13 -0
- package/src/moderating/components/sidebar/ModerateTray/presenter.js +250 -0
- package/src/moderating/components/sidebar/ResetQuiz/__tests__/index.test.js +84 -0
- package/src/moderating/components/sidebar/ResetQuiz/__tests__/presenter.test.js +44 -0
- package/src/moderating/components/sidebar/ResetQuiz/index.js +49 -0
- package/src/moderating/components/sidebar/ResetQuiz/presenter.js +95 -0
- package/src/reporting/api/__tests__/endpointCalledWithParametersTest.js +8 -0
- package/src/reporting/api/__tests__/fetchStudentAnalyses.test.js +38 -0
- package/src/reporting/api/__tests__/getAnalysesExport.test.js +70 -0
- package/src/reporting/api/__tests__/getAnalysesStatus.test.js +50 -0
- package/src/reporting/api/__tests__/getItemAnalyses.test.js +38 -0
- package/src/reporting/api/__tests__/getQuizAnalysis.test.js +38 -0
- package/src/reporting/api/__tests__/itemAnalyses.test.js +58 -0
- package/src/reporting/api/__tests__/quizAnalyses.test.js +52 -0
- package/src/reporting/api/fetchStudentAnalyses.js +10 -0
- package/src/reporting/api/getAnalysesExport.js +39 -0
- package/src/reporting/api/getAnalysesStatus.js +12 -0
- package/src/reporting/api/getItemAnalyses.js +6 -0
- package/src/reporting/api/getQuizAnalysis.js +6 -0
- package/src/reporting/api/itemAnalyses.js +24 -0
- package/src/reporting/api/quizAnalyses.js +18 -0
- package/src/reporting/components/Caption/__tests__/Caption.test.js +24 -0
- package/src/reporting/components/Caption/index.js +40 -0
- package/src/reporting/components/Caption/styles.js +12 -0
- package/src/reporting/components/Caption/theme.js +8 -0
- package/src/reporting/components/MetricsListItem/__tests__/MetricsListItem.test.js +30 -0
- package/src/reporting/components/MetricsListItem/index.js +52 -0
- package/src/reporting/components/MetricsListItem/styles.js +12 -0
- package/src/reporting/components/MetricsListItem/theme.js +0 -0
- package/src/reporting/components/charts/CentileDistribution/__tests__/index.test.js +9 -0
- package/src/reporting/components/charts/CentileDistribution/__tests__/presenter.test.js +57 -0
- package/src/reporting/components/charts/CentileDistribution/index.js +3 -0
- package/src/reporting/components/charts/CentileDistribution/presenter.js +150 -0
- package/src/reporting/components/charts/CentileDistribution/styles.js +31 -0
- package/src/reporting/components/charts/CentileDistribution/theme.js +8 -0
- package/src/reporting/components/charts/Distribution/CentileDistribution.js +5 -0
- package/src/reporting/components/charts/Distribution/Distribution.js +4 -0
- package/src/reporting/components/charts/Distribution/QuintileDistribution.js +4 -0
- package/src/reporting/components/charts/Distribution/__tests__/CentileDistribution.test.js +9 -0
- package/src/reporting/components/charts/Distribution/__tests__/Distribution.test.js +9 -0
- package/src/reporting/components/charts/Distribution/__tests__/QuintileDistribution.test.js +9 -0
- package/src/reporting/components/charts/Distribution/__tests__/index.test.js +9 -0
- package/src/reporting/components/charts/Distribution/__tests__/presenter.test.js +137 -0
- package/src/reporting/components/charts/Distribution/index.js +3 -0
- package/src/reporting/components/charts/Distribution/presenter.js +378 -0
- package/src/reporting/components/charts/Distribution/styles.js +26 -0
- package/src/reporting/components/charts/Distribution/theme.js +12 -0
- package/src/reporting/components/charts/Legend/README.md +62 -0
- package/src/reporting/components/charts/Legend/__tests__/index.test.js +39 -0
- package/src/reporting/components/charts/Legend/index.js +66 -0
- package/src/reporting/components/charts/Legend/styles.js +44 -0
- package/src/reporting/components/charts/Legend/theme.js +15 -0
- package/src/reporting/components/charts/QuintileDistribution/__tests__/index.test.js +9 -0
- package/src/reporting/components/charts/QuintileDistribution/__tests__/presenter.test.js +64 -0
- package/src/reporting/components/charts/QuintileDistribution/index.js +3 -0
- package/src/reporting/components/charts/QuintileDistribution/presenter.js +155 -0
- package/src/reporting/components/charts/QuintileDistribution/styles.js +12 -0
- package/src/reporting/components/charts/QuintileDistribution/theme.js +9 -0
- package/src/reporting/components/itemAnalysis/AnswerFrequencySummary/__tests__/AnswerFrequencySummary.test.js +109 -0
- package/src/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +128 -0
- package/src/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +41 -0
- package/src/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +29 -0
- package/src/reporting/components/itemAnalysis/ItemAnalysisRow/__tests__/index.test.js +10 -0
- package/src/reporting/components/itemAnalysis/ItemAnalysisRow/__tests__/presenter.test.js +212 -0
- package/src/reporting/components/itemAnalysis/ItemAnalysisRow/index.js +14 -0
- package/src/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +290 -0
- package/src/reporting/components/itemAnalysis/ItemAnalysisRow/styles.js +100 -0
- package/src/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +23 -0
- package/src/reporting/components/quizAnalysis/QuizAnalysisOverview.js +144 -0
- package/src/reporting/components/quizAnalysis/__tests__/QuizAnalysisOverview.test.js +59 -0
- package/src/reporting/components/quizAnalysis/styles.js +31 -0
- package/src/reporting/components/quizAnalysis/theme.js +11 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/__tests__/presenter.test.js +26 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +3 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +47 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/styles.js +14 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/__tests__/AnalysisPopoverMetric.test.js +36 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +3 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +59 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/styles.js +16 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/__tests__/AggregationType.test.js +47 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +25 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/__tests__/ChoiceType.test.js +66 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +27 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/__tests__/ChoiceTypeTableRow.test.js +81 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +105 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +47 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +8 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/__tests__/LegacyChoiceType.test.js +65 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +80 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/styles.js +20 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/theme.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +57 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +34 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/__tests__/MatchingTypeTable.test.js +169 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +197 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +57 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/theme.js +8 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +59 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/__tests__/CategorizationType.test.js +101 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/__tests__/MatchingType.test.js +73 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/__tests__/OrderingType.test.js +100 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/index.js +3 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/utils/__tests__/matchingTypeOrderer.test.js +112 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/utils/matchingTypeOrderer.js +36 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/__tests__/ChoiceTypeWithInfo.test.js +53 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +66 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/__tests__/NumericType.test.js +219 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +242 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/styles.js +10 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/theme.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/__tests__/ChoiceGroupTypeTable.test.js +141 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +136 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/styles.js +10 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/theme.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/__tests__/RichFillBlankType.test.js +23 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +41 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/__tests__/ScoreDistributionTypeTable.test.js +59 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +102 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/styles.js +39 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/theme.js +9 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/__tests__/ScoreDistributionType.test.js +93 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +32 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/__tests__/AnswerFrequencySummary.test.js +291 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +79 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +53 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +13 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/popoverContent.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +50 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/styles.js +11 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +226 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +154 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +12 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/__tests__/ChoiceTypeTable.test.js +135 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +195 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +102 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +10 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/__tests__/ExpandableCard.test.js +34 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +84 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/styles.js +16 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/theme.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/__tests__/AfsPartsContainer.test.js +49 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/__tests__/AfsTableWrapper.test.js +88 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/__tests__/AggregationTable.test.js +162 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/__tests__/ExportButton.test.js +54 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ExportButton/index.js +44 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/__tests__/MetricPopover.test.js +46 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/index.js +3 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +109 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/styles.js +16 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/theme.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/__tests__/BlankIcon.test.js +23 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/index.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +23 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/styles.js +17 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +10 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/__tests__/NewItemAnalysis.test.js +290 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/__tests__/sampleFitbItemAnalysis.js +57 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +26 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/popoverContent.js +25 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +312 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +85 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +15 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/__tests__/NewQuizAnalysis.test.js +159 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/index.js +3 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js +17 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +150 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/styles.js +40 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/theme.js +15 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/__tests__/presenter.test.js +184 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +7 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +221 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +55 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +12 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/fetchReportStatus.test.js +155 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/fetchReports.test.js +503 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/presenter.test.js +248 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/sampleItemAnalysis.js +63 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/sampleQuizAnalysis.js +26 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/withAnalysisState.test.js +21 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/__tests__/withAnalysisStatePresenter.test.js +282 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/index.js +3 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +78 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/styles.js +20 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +11 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg +58 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/exportFormats.js +1 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +50 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +29 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/index.js +5 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +273 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +14 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +6 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisState.js +73 -0
- package/src/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +156 -0
- package/src/reporting/components/resources/OutcomeAnalysis/__tests__/index.test.js +23 -0
- package/src/reporting/components/resources/OutcomeAnalysis/__tests__/presenter.test.js +48 -0
- package/src/reporting/components/resources/OutcomeAnalysis/index.js +20 -0
- package/src/reporting/components/resources/OutcomeAnalysis/presenter.js +72 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/README.md +26 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/__tests__/index.test.js +28 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/__tests__/presenter.test.js +239 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/index.js +33 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/presenter.js +329 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/styles.js +20 -0
- package/src/reporting/components/resources/QuizAndItemAnalysis/theme.js +12 -0
- package/src/reporting/components/resources/ReportCard/README.md +24 -0
- package/src/reporting/components/resources/ReportCard/__tests__/index.test.js +27 -0
- package/src/reporting/components/resources/ReportCard/index.js +61 -0
- package/src/reporting/components/resources/ReportCard/styles.js +24 -0
- package/src/reporting/components/resources/ReportCard/theme.js +11 -0
- package/src/reporting/components/resources/ReportList/README.md +53 -0
- package/src/reporting/components/resources/ReportList/__tests__/index.test.js +25 -0
- package/src/reporting/components/resources/ReportList/index.js +44 -0
- package/src/reporting/components/resources/ReportList/styles.js +19 -0
- package/src/reporting/components/resources/ReportList/theme.js +9 -0
- package/src/reporting/components/resources/StudentAnalysis/ReportCard/__tests__/presenter.test.js +159 -0
- package/src/reporting/components/resources/StudentAnalysis/ReportCard/index.ts +6 -0
- package/src/reporting/components/resources/StudentAnalysis/ReportCard/presenter.tsx +193 -0
- package/src/reporting/components/resources/StudentAnalysis/ReportCard/styles.ts +45 -0
- package/src/reporting/components/resources/StudentAnalysis/ReportCard/theme.ts +12 -0
- package/src/reporting/components/resources/StudentAnalysis/__tests__/fetchReport.test.js +189 -0
- package/src/reporting/components/resources/StudentAnalysis/__tests__/fetchReportStatus.test.js +122 -0
- package/src/reporting/components/resources/StudentAnalysis/__tests__/withStudentAnalysisReportState.test.js +73 -0
- package/src/reporting/components/resources/StudentAnalysis/__tests__/withStudentAnalysisReportStatePresenter.test.js +241 -0
- package/src/reporting/components/resources/StudentAnalysis/fetchReport.js +41 -0
- package/src/reporting/components/resources/StudentAnalysis/fetchReportStatus.js +31 -0
- package/src/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.ts +66 -0
- package/src/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +157 -0
- package/src/reporting/components/resources/common/AnalysisUpdateDate/__tests__/index.test.js +16 -0
- package/src/reporting/components/resources/common/AnalysisUpdateDate/index.js +36 -0
- package/src/reporting/components/resources/common/ExportButton/__tests__/exportButton.test.js +39 -0
- package/src/reporting/components/resources/common/ExportButton/index.js +24 -0
- package/src/reporting/components/resources/common/__tests__/errorCodes.test.js +52 -0
- package/src/reporting/components/resources/common/__tests__/exportReports.test.js +97 -0
- package/src/reporting/components/resources/common/__tests__/generateReports.test.js +168 -0
- package/src/reporting/components/resources/common/__tests__/utils.test.js +42 -0
- package/src/reporting/components/resources/common/errorCodes.js +39 -0
- package/src/reporting/components/resources/common/errorMessages.js +27 -0
- package/src/reporting/components/resources/common/exportReports.js +38 -0
- package/src/reporting/components/resources/common/generateReports.js +49 -0
- package/src/reporting/components/resources/common/propTypes.js +215 -0
- package/src/reporting/components/resources/common/utils.js +25 -0
- package/src/taking/api/__tests__/taking.test.js +833 -0
- package/src/taking/api/taking.js +496 -0
- package/src/taking/learnosity/__tests__/index.test.js +195 -0
- package/src/taking/learnosity/index.js +122 -0
- package/es/reduxStore.js +0 -33
- package/lib/reduxStore.js +0 -33
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
/** @jsx jsx */ function
|
|
2
|
-
if (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/** @jsx jsx */ function _array_like_to_array(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
function _array_with_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return arr;
|
|
6
8
|
}
|
|
7
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
8
10
|
try {
|
|
@@ -33,91 +35,43 @@ function _async_to_generator(fn) {
|
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
57
|
-
return Constructor;
|
|
58
|
-
}
|
|
59
|
-
function _define_property(obj, key, value) {
|
|
60
|
-
if (key in obj) {
|
|
61
|
-
Object.defineProperty(obj, key, {
|
|
62
|
-
value: value,
|
|
63
|
-
enumerable: true,
|
|
64
|
-
configurable: true,
|
|
65
|
-
writable: true
|
|
66
|
-
});
|
|
67
|
-
} else {
|
|
68
|
-
obj[key] = value;
|
|
69
|
-
}
|
|
70
|
-
return obj;
|
|
71
|
-
}
|
|
72
|
-
function _get_prototype_of(o) {
|
|
73
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
74
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
75
|
-
};
|
|
76
|
-
return _get_prototype_of(o);
|
|
77
|
-
}
|
|
78
|
-
function _inherits(subClass, superClass) {
|
|
79
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
80
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
81
|
-
}
|
|
82
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
83
|
-
constructor: {
|
|
84
|
-
value: subClass,
|
|
85
|
-
writable: true,
|
|
86
|
-
configurable: true
|
|
38
|
+
function _iterable_to_array_limit(arr, i) {
|
|
39
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
40
|
+
if (_i == null) return;
|
|
41
|
+
var _arr = [];
|
|
42
|
+
var _n = true;
|
|
43
|
+
var _d = false;
|
|
44
|
+
var _s, _e;
|
|
45
|
+
try {
|
|
46
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
47
|
+
_arr.push(_s.value);
|
|
48
|
+
if (i && _arr.length === i) break;
|
|
49
|
+
}
|
|
50
|
+
} catch (err) {
|
|
51
|
+
_d = true;
|
|
52
|
+
_e = err;
|
|
53
|
+
} finally{
|
|
54
|
+
try {
|
|
55
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
56
|
+
} finally{
|
|
57
|
+
if (_d) throw _e;
|
|
87
58
|
}
|
|
88
|
-
});
|
|
89
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
90
|
-
}
|
|
91
|
-
function _possible_constructor_return(self, call) {
|
|
92
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
93
|
-
return call;
|
|
94
59
|
}
|
|
95
|
-
return
|
|
96
|
-
}
|
|
97
|
-
function _set_prototype_of(o, p) {
|
|
98
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
99
|
-
o.__proto__ = p;
|
|
100
|
-
return o;
|
|
101
|
-
};
|
|
102
|
-
return _set_prototype_of(o, p);
|
|
60
|
+
return _arr;
|
|
103
61
|
}
|
|
104
|
-
function
|
|
105
|
-
"
|
|
106
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
62
|
+
function _non_iterable_rest() {
|
|
63
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
107
64
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
110
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
111
|
-
} catch (_) {}
|
|
112
|
-
return (_is_native_reflect_construct = function() {
|
|
113
|
-
return !!result;
|
|
114
|
-
})();
|
|
65
|
+
function _sliced_to_array(arr, i) {
|
|
66
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
115
67
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
if (typeof
|
|
119
|
-
|
|
120
|
-
|
|
68
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
69
|
+
if (!o) return;
|
|
70
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
71
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
72
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
73
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
74
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
121
75
|
}
|
|
122
76
|
function _ts_generator(thisArg, body) {
|
|
123
77
|
var f, y, t, _ = {
|
|
@@ -210,7 +164,7 @@ function _ts_generator(thisArg, body) {
|
|
|
210
164
|
};
|
|
211
165
|
}
|
|
212
166
|
}
|
|
213
|
-
import {
|
|
167
|
+
import { useCallback, useState, useEffect, useRef } from 'react';
|
|
214
168
|
import ReactDOM from 'react-dom';
|
|
215
169
|
import PropTypes from 'prop-types';
|
|
216
170
|
import Immutable from 'immutable';
|
|
@@ -244,674 +198,577 @@ import { createItem } from '../../../building/api/items';
|
|
|
244
198
|
import { createStimulus } from '../../../building/api/stimuli';
|
|
245
199
|
import { propsForItemVersioningWrapper, propsForStimulusVersioningWrapper } from '../../../common/util/warningHelpers';
|
|
246
200
|
import NavWrapper from '../NavWrapper';
|
|
247
|
-
import { API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, PARENT_TYPE_BANK
|
|
201
|
+
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/constants';
|
|
202
|
+
import { TextInput } from '@instructure/quiz-common/components/TextInput/index';
|
|
203
|
+
import { withStyleOverrides } from '@instructure/quiz-common/util/withStyleOverrides';
|
|
248
204
|
import generateStyle from './styles';
|
|
249
205
|
import generateComponentTheme from './theme';
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
206
|
+
function BaseBankEntry(props) {
|
|
207
|
+
var bankEntryId = props.bankEntryId, bankId = props.bankId, bank = props.bank, bankEntry = props.bankEntry, entry = props.entry, changeItemTitle = props.changeItemTitle, changeQuizEntryPoints = props.changeQuizEntryPoints, cloneBankEntry = props.cloneBankEntry, clearModificationsProp = props.clearModifications, clearTemporaryBankItem = props.clearTemporaryBankItem, createEntryAndBankEntry = props.createEntryAndBankEntry, closeTray = props.closeTray, createTagAssociations = props.createTagAssociations, deleteTagAssociations = props.deleteTagAssociations, getBankEntry = props.getBankEntry, getBank = props.getBank, isCompact = props.isCompact, navigateToBanks = props.navigateToBanks, navigateToBankProp = props.navigateToBank, navigateToBuild = props.navigateToBuild, scope = props.scope, returnToUrl = props.returnToUrl, openModal = props.openModal, pendingAdditionTags = props.pendingAdditionTags, pendingDeletionTags = props.pendingDeletionTags, setPendingAdditionTagAssociations = props.setPendingAdditionTagAssociations, setPendingDeletionTagAssociations = props.setPendingDeletionTagAssociations, setShouldClone = props.setShouldClone, setUi = props.setUi, shouldClone = props.shouldClone, tagAssociations = props.tagAssociations, updateItem = props.updateItem, updateStimulus = props.updateStimulus, useBankTags = props.useBankTags, iceTopNavBarEnabled = props.iceTopNavBarEnabled, styles = props.styles;
|
|
208
|
+
var _useState = _sliced_to_array(useState({}), 2), validationErrorsFromApi = _useState[0], setValidationErrorsFromApi = _useState[1];
|
|
209
|
+
var navToBankRef = useRef(null);
|
|
210
|
+
var itemEditArea = useRef(null);
|
|
211
|
+
var addFeedbackButton = useRef(null);
|
|
212
|
+
useEffect(function() {
|
|
213
|
+
setShouldClone(false);
|
|
214
|
+
return function() {
|
|
215
|
+
return setShouldClone(false);
|
|
216
|
+
};
|
|
217
|
+
}, []);
|
|
218
|
+
useEffect(function() {
|
|
219
|
+
if (!isTemporary()) {
|
|
220
|
+
getBankEntry(bankId, bankEntryId);
|
|
221
|
+
}
|
|
222
|
+
if (navToBankRef.current) {
|
|
223
|
+
ReactDOM.findDOMNode(navToBankRef.current).focus();
|
|
224
|
+
}
|
|
225
|
+
getBank(bankId);
|
|
226
|
+
}, []);
|
|
227
|
+
function setNavToBankRef(node) {
|
|
228
|
+
navToBankRef.current = node;
|
|
229
|
+
}
|
|
230
|
+
function navigateToBank() {
|
|
231
|
+
navigateToBankProp(bankId);
|
|
232
|
+
}
|
|
233
|
+
function isTemporary() {
|
|
234
|
+
return entry && entry.isTemporary();
|
|
235
|
+
}
|
|
236
|
+
function isItemEntry() {
|
|
237
|
+
return bankEntry.entryType === 'Item';
|
|
238
|
+
}
|
|
239
|
+
function isStimulusEntry() {
|
|
240
|
+
return bankEntry === null || bankEntry === void 0 ? void 0 : bankEntry.isStimulusEntry;
|
|
241
|
+
}
|
|
242
|
+
function isPassageEntry() {
|
|
243
|
+
return bankEntry === null || bankEntry === void 0 ? void 0 : bankEntry.isPassageEntry;
|
|
244
|
+
}
|
|
245
|
+
function getEditWarning() {
|
|
246
|
+
if (isStimulusEntry()) {
|
|
247
|
+
return t('Edits made here will appear on any assessment using this stimulus.');
|
|
248
|
+
}
|
|
249
|
+
if (isPassageEntry()) {
|
|
250
|
+
return t('Edits made here will appear on any assessment using this text block.');
|
|
251
|
+
}
|
|
252
|
+
return t('Edits made here will appear on any assessment using this question.');
|
|
253
|
+
}
|
|
254
|
+
function handleTitleChange(e) {
|
|
255
|
+
changeItemTitle(entry.id, e.target.value);
|
|
256
|
+
}
|
|
257
|
+
function entryLinkName() {
|
|
258
|
+
var translations = {
|
|
259
|
+
new: {
|
|
260
|
+
question: t('New Question'),
|
|
261
|
+
stimulus: t('New Stimulus'),
|
|
262
|
+
passage: t('New Text Block')
|
|
263
|
+
},
|
|
264
|
+
edit: {
|
|
265
|
+
question: t('Edit Question'),
|
|
266
|
+
stimulus: t('Edit Stimulus'),
|
|
267
|
+
passage: t('Edit Text Block')
|
|
270
268
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
269
|
+
};
|
|
270
|
+
var operation = isTemporary() ? 'new' : 'edit';
|
|
271
|
+
switch(true){
|
|
272
|
+
case isItemEntry():
|
|
273
|
+
return translations[operation]['question'];
|
|
274
|
+
case isStimulusEntry():
|
|
275
|
+
return translations[operation]['stimulus'];
|
|
276
|
+
case isPassageEntry():
|
|
277
|
+
return translations[operation]['passage'];
|
|
278
|
+
}
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
function renderBankBreadCrumbLink() {
|
|
282
|
+
return /*#__PURE__*/ jsx(BreadcrumbLink, {
|
|
283
|
+
key: "bank",
|
|
284
|
+
onClick: navigateToBank,
|
|
285
|
+
ref: setNavToBankRef
|
|
286
|
+
}, bank.title);
|
|
287
|
+
}
|
|
288
|
+
function renderBankEntryBreadCrumbLink() {
|
|
289
|
+
return /*#__PURE__*/ jsx(BreadcrumbLink, {
|
|
290
|
+
key: "bankEntry"
|
|
291
|
+
}, entryLinkName());
|
|
292
|
+
}
|
|
293
|
+
function renderNav() {
|
|
294
|
+
var isScopeEmpty = !Object.keys(scope).length;
|
|
295
|
+
return /*#__PURE__*/ jsx(NavWrapper, {
|
|
296
|
+
closeTray: closeTray,
|
|
297
|
+
navigateToBanks: navigateToBanks,
|
|
298
|
+
navigateToBuild: navigateToBuild,
|
|
299
|
+
returnToUrl: isScopeEmpty ? null : returnToUrl,
|
|
300
|
+
scope: scope,
|
|
301
|
+
isCompact: isCompact,
|
|
302
|
+
iceTopNavBarEnabled: iceTopNavBarEnabled,
|
|
303
|
+
menuItemPath: "/banks/".concat(bankId, "/bank_entries/").concat(bankEntryId || 'new')
|
|
304
|
+
}, renderBankBreadCrumbLink(), renderBankEntryBreadCrumbLink());
|
|
305
|
+
}
|
|
306
|
+
function renderTitle(entryParam) {
|
|
307
|
+
if (isItemEntry()) {
|
|
308
|
+
return /*#__PURE__*/ jsx(TextInput, {
|
|
309
|
+
renderLabel: /*#__PURE__*/ jsx(ScreenReaderContent, null, t('Edit question title')),
|
|
310
|
+
type: "text",
|
|
311
|
+
placeholder: t('Question Title'),
|
|
312
|
+
onChange: handleTitleChange,
|
|
313
|
+
value: entryParam.getWorkingInstance().title || ''
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
function getIdentifier(entryParam) {
|
|
319
|
+
if (!entryParam) return null;
|
|
320
|
+
switch(true){
|
|
321
|
+
case isItemEntry():
|
|
322
|
+
return t('Question { id }', {
|
|
323
|
+
id: entryParam.id
|
|
276
324
|
});
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
var e;
|
|
281
|
-
return _ts_generator(this, function(_state) {
|
|
282
|
-
switch(_state.label){
|
|
283
|
-
case 0:
|
|
284
|
-
_state.trys.push([
|
|
285
|
-
0,
|
|
286
|
-
5,
|
|
287
|
-
,
|
|
288
|
-
6
|
|
289
|
-
]);
|
|
290
|
-
if (!_this1.props.entry.isTemporary()) return [
|
|
291
|
-
3,
|
|
292
|
-
2
|
|
293
|
-
];
|
|
294
|
-
return [
|
|
295
|
-
4,
|
|
296
|
-
_this1.temporarySubmit()
|
|
297
|
-
];
|
|
298
|
-
case 1:
|
|
299
|
-
_state.sent();
|
|
300
|
-
return [
|
|
301
|
-
3,
|
|
302
|
-
4
|
|
303
|
-
];
|
|
304
|
-
case 2:
|
|
305
|
-
return [
|
|
306
|
-
4,
|
|
307
|
-
_this1.normalSubmit()
|
|
308
|
-
];
|
|
309
|
-
case 3:
|
|
310
|
-
_state.sent();
|
|
311
|
-
_state.label = 4;
|
|
312
|
-
case 4:
|
|
313
|
-
return [
|
|
314
|
-
3,
|
|
315
|
-
6
|
|
316
|
-
];
|
|
317
|
-
case 5:
|
|
318
|
-
e = _state.sent();
|
|
319
|
-
if (e.validationErrorsFromApi) {
|
|
320
|
-
_this1.setState({
|
|
321
|
-
validationErrorsFromApi: e.validationErrorsFromApi
|
|
322
|
-
});
|
|
323
|
-
// Throwing an error here would cause an alert banner to show,
|
|
324
|
-
// which we don't want in the case of a simple input validation error
|
|
325
|
-
return [
|
|
326
|
-
2,
|
|
327
|
-
API_INPUT_VALIDATION_ERROR
|
|
328
|
-
];
|
|
329
|
-
}
|
|
330
|
-
throw e;
|
|
331
|
-
case 6:
|
|
332
|
-
_this1.navigateToBank();
|
|
333
|
-
return [
|
|
334
|
-
2
|
|
335
|
-
];
|
|
336
|
-
}
|
|
325
|
+
case isStimulusEntry():
|
|
326
|
+
return t('Stimulus { id }', {
|
|
327
|
+
id: entryParam.id
|
|
337
328
|
});
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
key: "getEntry",
|
|
440
|
-
value: function getEntry() {
|
|
441
|
-
return this.props.entry;
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
key: "isItemEntry",
|
|
446
|
-
value: function isItemEntry() {
|
|
447
|
-
return this.props.bankEntry.entryType === 'Item';
|
|
448
|
-
}
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
key: "isStimulusEntry",
|
|
452
|
-
value: function isStimulusEntry() {
|
|
453
|
-
var _this_props_bankEntry;
|
|
454
|
-
return (_this_props_bankEntry = this.props.bankEntry) === null || _this_props_bankEntry === void 0 ? void 0 : _this_props_bankEntry.isStimulusEntry;
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
key: "isPassageEntry",
|
|
459
|
-
value: function isPassageEntry() {
|
|
460
|
-
var _this_props_bankEntry;
|
|
461
|
-
return (_this_props_bankEntry = this.props.bankEntry) === null || _this_props_bankEntry === void 0 ? void 0 : _this_props_bankEntry.isPassageEntry;
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
key: "getEditWarning",
|
|
466
|
-
value: function getEditWarning() {
|
|
467
|
-
if (this.isStimulusEntry()) {
|
|
468
|
-
return t('Edits made here will appear on any assessment using this stimulus.');
|
|
469
|
-
}
|
|
470
|
-
if (this.isPassageEntry()) {
|
|
471
|
-
return t('Edits made here will appear on any assessment using this text block.');
|
|
472
|
-
}
|
|
473
|
-
return t('Edits made here will appear on any assessment using this question.');
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
key: "entryLinkName",
|
|
478
|
-
value: function entryLinkName() {
|
|
479
|
-
var translations = {
|
|
480
|
-
new: {
|
|
481
|
-
question: t('New Question'),
|
|
482
|
-
stimulus: t('New Stimulus'),
|
|
483
|
-
passage: t('New Text Block')
|
|
484
|
-
},
|
|
485
|
-
edit: {
|
|
486
|
-
question: t('Edit Question'),
|
|
487
|
-
stimulus: t('Edit Stimulus'),
|
|
488
|
-
passage: t('Edit Text Block')
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
var operation = this.isTemporary() ? 'new' : 'edit';
|
|
492
|
-
switch(true){
|
|
493
|
-
case this.isItemEntry():
|
|
494
|
-
return translations[operation]['question'];
|
|
495
|
-
case this.isStimulusEntry():
|
|
496
|
-
return translations[operation]['stimulus'];
|
|
497
|
-
case this.isPassageEntry():
|
|
498
|
-
return translations[operation]['passage'];
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
key: "renderBankBreadCrumbLink",
|
|
504
|
-
value: function renderBankBreadCrumbLink() {
|
|
505
|
-
return /*#__PURE__*/ jsx(BreadcrumbLink, {
|
|
506
|
-
key: "bank",
|
|
507
|
-
onClick: this.navigateToBank,
|
|
508
|
-
ref: this.setNavToBankRef
|
|
509
|
-
}, this.props.bank.title);
|
|
510
|
-
}
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
key: "renderBankEntryBreadCrumbLink",
|
|
514
|
-
value: function renderBankEntryBreadCrumbLink() {
|
|
515
|
-
return /*#__PURE__*/ jsx(BreadcrumbLink, {
|
|
516
|
-
key: "bankEntry"
|
|
517
|
-
}, this.entryLinkName());
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
key: "renderNav",
|
|
522
|
-
value: function renderNav() {
|
|
523
|
-
var _this_props = this.props, scope = _this_props.scope, closeTray = _this_props.closeTray, navigateToBanks = _this_props.navigateToBanks, navigateToBuild = _this_props.navigateToBuild, returnToUrl = _this_props.returnToUrl;
|
|
524
|
-
var isScopeEmpty = !Object.keys(scope).length;
|
|
525
|
-
return /*#__PURE__*/ jsx(NavWrapper, {
|
|
526
|
-
closeTray: closeTray,
|
|
527
|
-
navigateToBanks: navigateToBanks,
|
|
528
|
-
navigateToBuild: navigateToBuild,
|
|
529
|
-
returnToUrl: isScopeEmpty ? null : returnToUrl,
|
|
530
|
-
scope: scope,
|
|
531
|
-
isCompact: this.props.isCompact,
|
|
532
|
-
iceTopNavBarEnabled: this.props.iceTopNavBarEnabled,
|
|
533
|
-
menuItemPath: "/banks/".concat(this.props.bankId, "/bank_entries/").concat(this.props.bankEntryId || 'new')
|
|
534
|
-
}, this.renderBankBreadCrumbLink(), this.renderBankEntryBreadCrumbLink());
|
|
535
|
-
}
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
key: "renderTitle",
|
|
539
|
-
value: function renderTitle(entry) {
|
|
540
|
-
if (this.isItemEntry()) {
|
|
541
|
-
return /*#__PURE__*/ jsx(TextInput, {
|
|
542
|
-
renderLabel: /*#__PURE__*/ jsx(ScreenReaderContent, null, t('Edit question title')),
|
|
543
|
-
type: "text",
|
|
544
|
-
placeholder: t('Question Title'),
|
|
545
|
-
onChange: this.handleTitleChange,
|
|
546
|
-
value: entry.getWorkingInstance().title || ''
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
key: "getIdentifier",
|
|
553
|
-
value: function getIdentifier(entry) {
|
|
554
|
-
if (!entry) return;
|
|
555
|
-
switch(true){
|
|
556
|
-
case this.isItemEntry():
|
|
557
|
-
return t('Question { id }', {
|
|
558
|
-
id: entry.id
|
|
559
|
-
});
|
|
560
|
-
case this.isStimulusEntry():
|
|
561
|
-
return t('Stimulus { id }', {
|
|
562
|
-
id: entry.id
|
|
563
|
-
});
|
|
564
|
-
case this.isPassageEntry():
|
|
565
|
-
return t('Text Block { id }', {
|
|
566
|
-
id: entry.id
|
|
567
|
-
});
|
|
568
|
-
default:
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
key: "getTemporaryIdentifier",
|
|
575
|
-
value: function getTemporaryIdentifier() {
|
|
576
|
-
switch(true){
|
|
577
|
-
case this.isItemEntry():
|
|
578
|
-
return t('New Question');
|
|
579
|
-
case this.isStimulusEntry():
|
|
580
|
-
return t('New Stimulus');
|
|
581
|
-
case this.isPassageEntry():
|
|
582
|
-
return t('New Text Block');
|
|
583
|
-
default:
|
|
584
|
-
return;
|
|
329
|
+
case isPassageEntry():
|
|
330
|
+
return t('Text Block { id }', {
|
|
331
|
+
id: entryParam.id
|
|
332
|
+
});
|
|
333
|
+
default:
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function getTemporaryIdentifier() {
|
|
338
|
+
switch(true){
|
|
339
|
+
case isItemEntry():
|
|
340
|
+
return t('New Question');
|
|
341
|
+
case isStimulusEntry():
|
|
342
|
+
return t('New Stimulus');
|
|
343
|
+
case isPassageEntry():
|
|
344
|
+
return t('New Text Block');
|
|
345
|
+
default:
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
function getEntryName(entryParam) {
|
|
350
|
+
if (!entryParam) return null;
|
|
351
|
+
switch(true){
|
|
352
|
+
case isItemEntry():
|
|
353
|
+
var _entryParam_getInteractionType;
|
|
354
|
+
return (_entryParam_getInteractionType = entryParam.getInteractionType()) === null || _entryParam_getInteractionType === void 0 ? void 0 : _entryParam_getInteractionType.name;
|
|
355
|
+
case isStimulusEntry():
|
|
356
|
+
return t('Stimulus');
|
|
357
|
+
case isPassageEntry():
|
|
358
|
+
return t('Text Block');
|
|
359
|
+
default:
|
|
360
|
+
return null;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function renderHeader(entryParam) {
|
|
364
|
+
if (!entryParam) return null;
|
|
365
|
+
var propsForEntry = editProps(entryParam);
|
|
366
|
+
var identifier = getIdentifier(entryParam);
|
|
367
|
+
var tempIdentifier = getTemporaryIdentifier();
|
|
368
|
+
var itemIdentifier = isTemporary() ? tempIdentifier : identifier;
|
|
369
|
+
var entryName = getEntryName(entryParam);
|
|
370
|
+
return /*#__PURE__*/ jsx("div", {
|
|
371
|
+
css: styles.header
|
|
372
|
+
}, /*#__PURE__*/ jsx("div", {
|
|
373
|
+
css: styles.leftHeader
|
|
374
|
+
}, /*#__PURE__*/ jsx("div", {
|
|
375
|
+
css: styles.headerText
|
|
376
|
+
}, /*#__PURE__*/ jsx(Heading, {
|
|
377
|
+
level: "reset",
|
|
378
|
+
as: "h2"
|
|
379
|
+
}, t('{entryName} | {itemIdentifier}', {
|
|
380
|
+
entryName: entryName,
|
|
381
|
+
itemIdentifier: itemIdentifier
|
|
382
|
+
})))), renderTitle(entryParam), /*#__PURE__*/ jsx("div", {
|
|
383
|
+
css: styles.rightHeader
|
|
384
|
+
}, /*#__PURE__*/ jsx(EntrySave, propsForEntry)));
|
|
385
|
+
}
|
|
386
|
+
function hasPendingTagModifications() {
|
|
387
|
+
return !pendingDeletionTags.isEmpty() || !pendingAdditionTags.isEmpty();
|
|
388
|
+
}
|
|
389
|
+
function createTagsForClone(newBankEntry, tags) {
|
|
390
|
+
createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, tags.map(function(tag) {
|
|
391
|
+
return tag.tag_value;
|
|
392
|
+
}));
|
|
393
|
+
// Pending tag associations were applied to the original bank entry, so clear those out
|
|
394
|
+
setPendingAdditionTagAssociations(bankEntry.entryType, entry.id, []);
|
|
395
|
+
setPendingDeletionTagAssociations(bankEntry.entryType, entry.id, []);
|
|
396
|
+
}
|
|
397
|
+
function updateTagsForEntry() {
|
|
398
|
+
return _async_to_generator(function() {
|
|
399
|
+
return _ts_generator(this, function(_state) {
|
|
400
|
+
switch(_state.label){
|
|
401
|
+
case 0:
|
|
402
|
+
if (!!shouldClone) return [
|
|
403
|
+
3,
|
|
404
|
+
3
|
|
405
|
+
];
|
|
406
|
+
return [
|
|
407
|
+
4,
|
|
408
|
+
createTagAssociations(bankEntryId, bankEntry.entryType, getBankEntryId(bankEntry), pendingAdditionTags.map(function(tagToAdd) {
|
|
409
|
+
return tagToAdd.get('tag_value');
|
|
410
|
+
}))
|
|
411
|
+
];
|
|
412
|
+
case 1:
|
|
413
|
+
_state.sent();
|
|
414
|
+
return [
|
|
415
|
+
4,
|
|
416
|
+
deleteTagAssociations(bankEntryId, bankEntry.entryType, getBankEntryId(bankEntry), pendingDeletionTags.map(function(tagToDelete) {
|
|
417
|
+
return tagToDelete.get('id');
|
|
418
|
+
}))
|
|
419
|
+
];
|
|
420
|
+
case 2:
|
|
421
|
+
_state.sent();
|
|
422
|
+
_state.label = 3;
|
|
423
|
+
case 3:
|
|
424
|
+
return [
|
|
425
|
+
2
|
|
426
|
+
];
|
|
585
427
|
}
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
428
|
+
});
|
|
429
|
+
})();
|
|
430
|
+
}
|
|
431
|
+
function normalSubmit() {
|
|
432
|
+
return _async_to_generator(function() {
|
|
433
|
+
var tags, createEntryCb, newBankEntry, workingEntry, updateFunc, toClear;
|
|
434
|
+
return _ts_generator(this, function(_state) {
|
|
435
|
+
switch(_state.label){
|
|
436
|
+
case 0:
|
|
437
|
+
if (!(entry.hasModifications() || shouldClone && hasPendingTagModifications())) return [
|
|
438
|
+
3,
|
|
439
|
+
5
|
|
440
|
+
];
|
|
441
|
+
if (!shouldClone) return [
|
|
442
|
+
3,
|
|
443
|
+
2
|
|
444
|
+
];
|
|
445
|
+
tags = visibleTagAssociations();
|
|
446
|
+
createEntryCb = isItemEntry() ? createItem : createStimulus;
|
|
447
|
+
return [
|
|
448
|
+
4,
|
|
449
|
+
cloneBankEntry(bankEntry, createEntryCb)
|
|
450
|
+
];
|
|
451
|
+
case 1:
|
|
452
|
+
newBankEntry = _state.sent();
|
|
453
|
+
createTagsForClone(newBankEntry, tags);
|
|
454
|
+
return [
|
|
455
|
+
3,
|
|
456
|
+
4
|
|
457
|
+
];
|
|
458
|
+
case 2:
|
|
459
|
+
workingEntry = entry.getWorkingInstance();
|
|
460
|
+
updateFunc = isItemEntry() ? updateItem : updateStimulus;
|
|
461
|
+
return [
|
|
462
|
+
4,
|
|
463
|
+
updateFunc(workingEntry, bankId, 'bank')
|
|
464
|
+
];
|
|
465
|
+
case 3:
|
|
466
|
+
_state.sent();
|
|
467
|
+
_state.label = 4;
|
|
468
|
+
case 4:
|
|
469
|
+
toClear = isItemEntry() ? 'items' : 'stimuli';
|
|
470
|
+
clearModificationsProp(toClear, entry.id);
|
|
471
|
+
_state.label = 5;
|
|
472
|
+
case 5:
|
|
473
|
+
if (!hasPendingTagModifications()) return [
|
|
474
|
+
3,
|
|
475
|
+
7
|
|
476
|
+
];
|
|
477
|
+
return [
|
|
478
|
+
4,
|
|
479
|
+
updateTagsForEntry()
|
|
480
|
+
];
|
|
481
|
+
case 6:
|
|
482
|
+
_state.sent();
|
|
483
|
+
_state.label = 7;
|
|
484
|
+
case 7:
|
|
485
|
+
return [
|
|
486
|
+
2
|
|
487
|
+
];
|
|
602
488
|
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
itemIdentifier: itemIdentifier
|
|
626
|
-
})))), this.renderTitle(entry), /*#__PURE__*/ jsx("div", {
|
|
627
|
-
css: this.props.styles.rightHeader
|
|
628
|
-
}, /*#__PURE__*/ jsx(EntrySave, props)));
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
key: "hasPendingTagModifications",
|
|
633
|
-
value: function hasPendingTagModifications() {
|
|
634
|
-
return !this.props.pendingDeletionTags.isEmpty() || !this.props.pendingAdditionTags.isEmpty();
|
|
635
|
-
}
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
key: "createTagsForClone",
|
|
639
|
-
value: function createTagsForClone(newBankEntry, tags) {
|
|
640
|
-
this.props.createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, tags.map(function(tag) {
|
|
641
|
-
return tag.tag_value;
|
|
642
|
-
}));
|
|
643
|
-
// Pending tag associations were applied to the original bank entry, so clear those out
|
|
644
|
-
this.props.setPendingAdditionTagAssociations(this.props.bankEntry.entryType, this.props.entry.id, []);
|
|
645
|
-
this.props.setPendingDeletionTagAssociations(this.props.bankEntry.entryType, this.props.entry.id, []);
|
|
646
|
-
}
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
key: "updateTagsForEntry",
|
|
650
|
-
value: function updateTagsForEntry() {
|
|
651
|
-
return _async_to_generator(function() {
|
|
652
|
-
return _ts_generator(this, function(_state) {
|
|
653
|
-
switch(_state.label){
|
|
654
|
-
case 0:
|
|
655
|
-
if (!!this.props.shouldClone) return [
|
|
656
|
-
3,
|
|
657
|
-
3
|
|
658
|
-
];
|
|
659
|
-
return [
|
|
660
|
-
4,
|
|
661
|
-
this.props.createTagAssociations(this.props.bankEntryId, this.props.bankEntry.entryType, this.getBankEntryId(this.props.bankEntry), this.props.pendingAdditionTags.map(function(tagToAdd) {
|
|
662
|
-
return tagToAdd.get('tag_value');
|
|
663
|
-
}))
|
|
664
|
-
];
|
|
665
|
-
case 1:
|
|
666
|
-
_state.sent();
|
|
667
|
-
return [
|
|
668
|
-
4,
|
|
669
|
-
this.props.deleteTagAssociations(this.props.bankEntryId, this.props.bankEntry.entryType, this.getBankEntryId(this.props.bankEntry), this.props.pendingDeletionTags.map(function(tagToDelete) {
|
|
670
|
-
return tagToDelete.get('id');
|
|
671
|
-
}))
|
|
672
|
-
];
|
|
673
|
-
case 2:
|
|
674
|
-
_state.sent();
|
|
675
|
-
_state.label = 3;
|
|
676
|
-
case 3:
|
|
677
|
-
return [
|
|
678
|
-
2
|
|
679
|
-
];
|
|
680
|
-
}
|
|
681
|
-
});
|
|
682
|
-
}).call(this);
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
{
|
|
686
|
-
key: "normalSubmit",
|
|
687
|
-
value: function normalSubmit() {
|
|
688
|
-
return _async_to_generator(function() {
|
|
689
|
-
var entry, tags, createEntryCb, newBankEntry, workingEntry, updateFunc, toClear;
|
|
690
|
-
return _ts_generator(this, function(_state) {
|
|
691
|
-
switch(_state.label){
|
|
692
|
-
case 0:
|
|
693
|
-
entry = this.props.entry;
|
|
694
|
-
if (!(entry.hasModifications() || this.props.shouldClone && this.hasPendingTagModifications())) return [
|
|
695
|
-
3,
|
|
696
|
-
5
|
|
697
|
-
];
|
|
698
|
-
if (!this.props.shouldClone) return [
|
|
699
|
-
3,
|
|
700
|
-
2
|
|
701
|
-
];
|
|
702
|
-
tags = this.visibleTagAssociations();
|
|
703
|
-
createEntryCb = this.isItemEntry() ? createItem : createStimulus;
|
|
704
|
-
return [
|
|
705
|
-
4,
|
|
706
|
-
this.props.cloneBankEntry(this.props.bankEntry, createEntryCb)
|
|
707
|
-
];
|
|
708
|
-
case 1:
|
|
709
|
-
newBankEntry = _state.sent();
|
|
710
|
-
this.createTagsForClone(newBankEntry, tags);
|
|
711
|
-
return [
|
|
712
|
-
3,
|
|
713
|
-
4
|
|
714
|
-
];
|
|
715
|
-
case 2:
|
|
716
|
-
workingEntry = entry.getWorkingInstance();
|
|
717
|
-
updateFunc = this.isItemEntry() ? this.props.updateItem : this.props.updateStimulus;
|
|
718
|
-
return [
|
|
719
|
-
4,
|
|
720
|
-
updateFunc(workingEntry, this.props.bankId, 'bank')
|
|
721
|
-
];
|
|
722
|
-
case 3:
|
|
723
|
-
_state.sent();
|
|
724
|
-
_state.label = 4;
|
|
725
|
-
case 4:
|
|
726
|
-
toClear = this.isItemEntry() ? 'items' : 'stimuli';
|
|
727
|
-
this.props.clearModifications(toClear, entry.id);
|
|
728
|
-
_state.label = 5;
|
|
729
|
-
case 5:
|
|
730
|
-
if (!this.hasPendingTagModifications()) return [
|
|
731
|
-
3,
|
|
732
|
-
7
|
|
733
|
-
];
|
|
734
|
-
return [
|
|
735
|
-
4,
|
|
736
|
-
this.updateTagsForEntry()
|
|
737
|
-
];
|
|
738
|
-
case 6:
|
|
739
|
-
_state.sent();
|
|
740
|
-
_state.label = 7;
|
|
741
|
-
case 7:
|
|
742
|
-
return [
|
|
743
|
-
2
|
|
744
|
-
];
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
}).call(this);
|
|
748
|
-
}
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
key: "temporarySubmit",
|
|
752
|
-
value: function temporarySubmit() {
|
|
753
|
-
return _async_to_generator(function() {
|
|
754
|
-
var entry, workingEntry, workingBankEntry, createEntryCb, newBankEntry, toClear;
|
|
755
|
-
return _ts_generator(this, function(_state) {
|
|
756
|
-
switch(_state.label){
|
|
757
|
-
case 0:
|
|
758
|
-
entry = this.props.entry;
|
|
759
|
-
workingEntry = entry.getWorkingInstance();
|
|
760
|
-
workingBankEntry = this.props.bankEntry.getWorkingInstance();
|
|
761
|
-
createEntryCb = this.isItemEntry() ? createItem : createStimulus;
|
|
762
|
-
return [
|
|
763
|
-
4,
|
|
764
|
-
this.props.createEntryAndBankEntry(this.props.bankId, workingEntry, workingBankEntry, createEntryCb)
|
|
765
|
-
];
|
|
766
|
-
case 1:
|
|
767
|
-
newBankEntry = _state.sent();
|
|
768
|
-
if (this.hasPendingTagModifications()) {
|
|
769
|
-
this.props.createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, this.props.pendingAdditionTags.map(function(tagToAdd) {
|
|
770
|
-
return tagToAdd.get('tag_value');
|
|
771
|
-
}));
|
|
772
|
-
}
|
|
773
|
-
toClear = this.isItemEntry() ? 'items' : 'stimuli';
|
|
774
|
-
this.props.clearModifications(toClear, entry.id);
|
|
775
|
-
this.props.clearTemporaryBankItem(this.props.bankId);
|
|
776
|
-
return [
|
|
777
|
-
2
|
|
778
|
-
];
|
|
489
|
+
});
|
|
490
|
+
})();
|
|
491
|
+
}
|
|
492
|
+
function temporarySubmit() {
|
|
493
|
+
return _async_to_generator(function() {
|
|
494
|
+
var workingEntry, workingBankEntry, createEntryCb, newBankEntry, toClear;
|
|
495
|
+
return _ts_generator(this, function(_state) {
|
|
496
|
+
switch(_state.label){
|
|
497
|
+
case 0:
|
|
498
|
+
workingEntry = entry.getWorkingInstance();
|
|
499
|
+
workingBankEntry = bankEntry.getWorkingInstance();
|
|
500
|
+
createEntryCb = isItemEntry() ? createItem : createStimulus;
|
|
501
|
+
return [
|
|
502
|
+
4,
|
|
503
|
+
createEntryAndBankEntry(bankId, workingEntry, workingBankEntry, createEntryCb)
|
|
504
|
+
];
|
|
505
|
+
case 1:
|
|
506
|
+
newBankEntry = _state.sent();
|
|
507
|
+
if (hasPendingTagModifications()) {
|
|
508
|
+
createTagAssociations(newBankEntry.id, newBankEntry.entry_type, newBankEntry.entry.id, pendingAdditionTags.map(function(tagToAdd) {
|
|
509
|
+
return tagToAdd.get('tag_value');
|
|
510
|
+
}));
|
|
779
511
|
}
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
value: function renderFeedbackSection() {
|
|
787
|
-
if (!this.isItemEntry()) {
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
var shouldClone = this.props.shouldClone;
|
|
791
|
-
var disabled = this.props.entry.isImmutable() && !shouldClone;
|
|
792
|
-
var icon, text;
|
|
793
|
-
if (this.props.entry.getWorkingInstance().hasFeedback()) {
|
|
794
|
-
icon = IconDiscussionSolid;
|
|
795
|
-
text = t('Edit Question Level Feedback (present)');
|
|
796
|
-
} else {
|
|
797
|
-
icon = IconDiscussionLine;
|
|
798
|
-
text = t('Edit Question Level Feedback');
|
|
512
|
+
toClear = isItemEntry() ? 'items' : 'stimuli';
|
|
513
|
+
clearModificationsProp(toClear, entry.id);
|
|
514
|
+
clearTemporaryBankItem(bankId);
|
|
515
|
+
return [
|
|
516
|
+
2
|
|
517
|
+
];
|
|
799
518
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
value: function getBankEntryId(bankEntry) {
|
|
814
|
-
// bankEntry.entry can be either 'TEMPORARY_ITEM' or an entire Map
|
|
815
|
-
return bankEntry.entry ? bankEntry.entry.get ? bankEntry.entry.get('id') : bankEntry.entry : null;
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
key: "visibleTagAssociations",
|
|
820
|
-
value: function visibleTagAssociations() {
|
|
821
|
-
var _this_props = this.props, pendingAdditionTags = _this_props.pendingAdditionTags, pendingDeletionTags = _this_props.pendingDeletionTags, tagAssociations = _this_props.tagAssociations;
|
|
822
|
-
var existingValues = keyBy(tagAssociations.toJS(), function(t) {
|
|
823
|
-
return t.tag_value;
|
|
824
|
-
});
|
|
825
|
-
var noDuplicates = pendingAdditionTags.filter(function(t) {
|
|
826
|
-
return isUndefined(existingValues[t.get('tag_value')]);
|
|
827
|
-
});
|
|
828
|
-
return tagAssociations.filter(function(tag) {
|
|
829
|
-
return !pendingDeletionTags.includes(tag);
|
|
830
|
-
}).concat(noDuplicates).toJS();
|
|
831
|
-
}
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
key: "visibleTags",
|
|
835
|
-
value: function visibleTags() {
|
|
836
|
-
return this.visibleTagAssociations().map(function(a) {
|
|
837
|
-
return {
|
|
838
|
-
id: a.tag_id,
|
|
839
|
-
value: a.tag_value
|
|
840
|
-
};
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
},
|
|
844
|
-
{
|
|
845
|
-
key: "renderEntry",
|
|
846
|
-
value: function renderEntry(entry) {
|
|
847
|
-
var _this = this;
|
|
848
|
-
if (!entry) return;
|
|
849
|
-
var _this_props = this.props, bankEntry = _this_props.bankEntry, useBankTags = _this_props.useBankTags;
|
|
850
|
-
var props = this.editProps(entry);
|
|
851
|
-
var propsFunc = this.isItemEntry() ? propsForItemVersioningWrapper : propsForStimulusVersioningWrapper;
|
|
852
|
-
var versioningProps = propsFunc(entry.isImmutable(), this.props.shouldClone, this.props.setShouldClone, this.navigateToBank, true, 'warning', this.isPassageEntry());
|
|
853
|
-
var canEdit = !entry.isImmutable() || this.props.shouldClone;
|
|
854
|
-
var ItemComponent = canEdit ? ItemEdit : ItemShow;
|
|
855
|
-
var StimulusComponent = canEdit ? StimulusEditInfo : StimulusShowInfo;
|
|
856
|
-
var EntryComponent = this.isItemEntry() ? ItemComponent : StimulusComponent;
|
|
857
|
-
var entryType = bankEntry.entryType;
|
|
858
|
-
var entryId = this.getBankEntryId(bankEntry);
|
|
859
|
-
var tags = function() {
|
|
860
|
-
return /*#__PURE__*/ jsx(TagSuggestSelect, {
|
|
861
|
-
allowNewTags: true,
|
|
862
|
-
noMatchText: t('Enter a tag to find or create'),
|
|
863
|
-
parentType: entryType,
|
|
864
|
-
parentId: entryId,
|
|
865
|
-
onChange: _this.handleTagChange,
|
|
866
|
-
tags: _this.visibleTags()
|
|
867
|
-
});
|
|
868
|
-
};
|
|
869
|
-
var editWarning = this.getEditWarning();
|
|
870
|
-
return /*#__PURE__*/ jsx("div", null, /*#__PURE__*/ jsx("div", {
|
|
871
|
-
css: this.props.styles.entryEdit
|
|
872
|
-
}, /*#__PURE__*/ jsx(WarningWrapper, versioningProps, canEdit && /*#__PURE__*/ jsx(Alert, {
|
|
873
|
-
renderCloseButtonLabel: t('Dismiss'),
|
|
874
|
-
margin: "0 0 medium 0"
|
|
875
|
-
}, /*#__PURE__*/ jsx(Text, {
|
|
876
|
-
color: "primary"
|
|
877
|
-
}, editWarning)), /*#__PURE__*/ jsx(EntryComponent, props), useBankTags && tags())), /*#__PURE__*/ jsx("div", {
|
|
878
|
-
css: this.props.styles.footer
|
|
879
|
-
}, /*#__PURE__*/ jsx("div", {
|
|
880
|
-
css: this.props.styles.leftFooter
|
|
881
|
-
}, this.renderFeedbackSection()), /*#__PURE__*/ jsx("div", {
|
|
882
|
-
css: this.props.styles.rightFooter
|
|
883
|
-
}, /*#__PURE__*/ jsx(EntrySave, props))));
|
|
519
|
+
});
|
|
520
|
+
})();
|
|
521
|
+
}
|
|
522
|
+
function clearValidationErrorsFromApi(inputId) {
|
|
523
|
+
if (inputId === CLEAR_ALL_INPUT_VALIDATION_ERRORS) {
|
|
524
|
+
setValidationErrorsFromApi({});
|
|
525
|
+
return null;
|
|
526
|
+
}
|
|
527
|
+
setValidationErrorsFromApi(function(prevErrors) {
|
|
528
|
+
if (prevErrors[inputId]) {
|
|
529
|
+
var newErrors = Object.assign({}, prevErrors);
|
|
530
|
+
delete newErrors[inputId];
|
|
531
|
+
return newErrors;
|
|
884
532
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
533
|
+
return prevErrors;
|
|
534
|
+
});
|
|
535
|
+
return null;
|
|
536
|
+
}
|
|
537
|
+
function submitHandler() {
|
|
538
|
+
return _async_to_generator(function() {
|
|
539
|
+
var e;
|
|
540
|
+
return _ts_generator(this, function(_state) {
|
|
541
|
+
switch(_state.label){
|
|
542
|
+
case 0:
|
|
543
|
+
_state.trys.push([
|
|
544
|
+
0,
|
|
545
|
+
5,
|
|
546
|
+
,
|
|
547
|
+
6
|
|
548
|
+
]);
|
|
549
|
+
if (!entry.isTemporary()) return [
|
|
550
|
+
3,
|
|
551
|
+
2
|
|
552
|
+
];
|
|
553
|
+
return [
|
|
554
|
+
4,
|
|
555
|
+
temporarySubmit()
|
|
556
|
+
];
|
|
557
|
+
case 1:
|
|
558
|
+
_state.sent();
|
|
559
|
+
return [
|
|
560
|
+
3,
|
|
561
|
+
4
|
|
562
|
+
];
|
|
563
|
+
case 2:
|
|
564
|
+
return [
|
|
565
|
+
4,
|
|
566
|
+
normalSubmit()
|
|
567
|
+
];
|
|
568
|
+
case 3:
|
|
569
|
+
_state.sent();
|
|
570
|
+
_state.label = 4;
|
|
571
|
+
case 4:
|
|
572
|
+
return [
|
|
573
|
+
3,
|
|
574
|
+
6
|
|
575
|
+
];
|
|
576
|
+
case 5:
|
|
577
|
+
e = _state.sent();
|
|
578
|
+
if (e.validationErrorsFromApi) {
|
|
579
|
+
setValidationErrorsFromApi(e.validationErrorsFromApi);
|
|
580
|
+
// Throwing an error here would cause an alert banner to show,
|
|
581
|
+
// which we don't want in the case of a simple input validation error
|
|
582
|
+
return [
|
|
583
|
+
2,
|
|
584
|
+
API_INPUT_VALIDATION_ERROR
|
|
585
|
+
];
|
|
586
|
+
}
|
|
587
|
+
throw e;
|
|
588
|
+
case 6:
|
|
589
|
+
navigateToBank();
|
|
590
|
+
return [
|
|
591
|
+
2,
|
|
592
|
+
null
|
|
593
|
+
];
|
|
892
594
|
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
parentId: this.props.bankId,
|
|
905
|
-
parentType: PARENT_TYPE_BANK
|
|
906
|
-
})));
|
|
907
|
-
}
|
|
595
|
+
});
|
|
596
|
+
})();
|
|
597
|
+
}
|
|
598
|
+
function handleRef(node) {
|
|
599
|
+
itemEditArea.current = node;
|
|
600
|
+
}
|
|
601
|
+
function clearChanges() {
|
|
602
|
+
clearValidationErrorsFromApi(CLEAR_ALL_INPUT_VALIDATION_ERRORS);
|
|
603
|
+
if (!entry) return;
|
|
604
|
+
if (entry.isTemporary()) {
|
|
605
|
+
clearTemporaryBankItem(bankId);
|
|
908
606
|
}
|
|
607
|
+
clearModificationsProp('items', entry.id);
|
|
608
|
+
setPendingDeletionTagAssociations(bankEntry.entryType, entry.id, []);
|
|
609
|
+
setPendingAdditionTagAssociations(bankEntry.entryType, entry.id, []);
|
|
610
|
+
}
|
|
611
|
+
var handlePointsChange = useCallback(function(points) {
|
|
612
|
+
changeQuizEntryPoints(entry.id, points);
|
|
613
|
+
}, [
|
|
614
|
+
changeQuizEntryPoints,
|
|
615
|
+
entry === null || entry === void 0 ? void 0 : entry.id
|
|
909
616
|
]);
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
617
|
+
function editProps(entryParam) {
|
|
618
|
+
return {
|
|
619
|
+
cancelHandler: navigateToBank,
|
|
620
|
+
clearChanges: clearChanges,
|
|
621
|
+
clearValidationErrorsFromApi: clearValidationErrorsFromApi,
|
|
622
|
+
contextUuid: null,
|
|
623
|
+
entry: entryParam,
|
|
624
|
+
guid: "".concat(bankEntry.id, "_bank_entry_edit"),
|
|
625
|
+
handleQuizEntryPointsChange: handlePointsChange,
|
|
626
|
+
itemEditArea: itemEditArea.current,
|
|
627
|
+
parentId: bankId,
|
|
628
|
+
parentType: PARENT_TYPE_BANK,
|
|
629
|
+
stimulus: entryParam,
|
|
630
|
+
submitHandler: submitHandler,
|
|
631
|
+
validationErrorsFromApi: validationErrorsFromApi,
|
|
632
|
+
scope: scope
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
function openFeedbackModal() {
|
|
636
|
+
setUi(ITEM_FEEDBACK_MODAL_ITEM, entry.getWorkingInstance());
|
|
637
|
+
setUi(ITEM_FEEDBACK_MODAL_FEEDBACK, entry.getWorkingInstance().feedback);
|
|
638
|
+
openModal(ITEM_FEEDBACK_MODAL, {
|
|
639
|
+
modalTrigger: addFeedbackButton.current
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
function storeFeedbackButtonRef(button) {
|
|
643
|
+
addFeedbackButton.current = button;
|
|
644
|
+
}
|
|
645
|
+
function renderFeedbackSection() {
|
|
646
|
+
if (!isItemEntry()) {
|
|
647
|
+
return null;
|
|
648
|
+
}
|
|
649
|
+
var disabled = entry.isImmutable() && !shouldClone;
|
|
650
|
+
var icon, text;
|
|
651
|
+
if (entry.getWorkingInstance().hasFeedback()) {
|
|
652
|
+
icon = IconDiscussionSolid;
|
|
653
|
+
text = t('Edit Question Level Feedback (present)');
|
|
654
|
+
} else {
|
|
655
|
+
icon = IconDiscussionLine;
|
|
656
|
+
text = t('Edit Question Level Feedback');
|
|
657
|
+
}
|
|
658
|
+
return /*#__PURE__*/ jsx(IconButton, {
|
|
659
|
+
onClick: openFeedbackModal,
|
|
660
|
+
withBackground: false,
|
|
661
|
+
withBorder: false,
|
|
662
|
+
disabled: disabled,
|
|
663
|
+
ref: storeFeedbackButtonRef,
|
|
664
|
+
renderIcon: icon,
|
|
665
|
+
screenReaderLabel: text
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
function compareTagValues(left, right) {
|
|
669
|
+
return left.tag_value === right.tag_value;
|
|
670
|
+
}
|
|
671
|
+
function tagToAssociation(param) {
|
|
672
|
+
var value = param.value;
|
|
673
|
+
return {
|
|
674
|
+
tag_value: value
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
function getBankEntryId(bankEntryParam) {
|
|
678
|
+
// bankEntry.entry can be either 'TEMPORARY_ITEM' or an entire Map
|
|
679
|
+
return bankEntryParam.entry ? bankEntryParam.entry.get ? bankEntryParam.entry.get('id') : bankEntryParam.entry : null;
|
|
680
|
+
}
|
|
681
|
+
function handleTagChange(tags) {
|
|
682
|
+
var tagAssociationsJS = tagAssociations.toJS();
|
|
683
|
+
var associations = tags.map(tagToAssociation);
|
|
684
|
+
var removed = differenceWith(tagAssociationsJS, associations, compareTagValues);
|
|
685
|
+
var created = differenceWith(associations, tagAssociationsJS, compareTagValues);
|
|
686
|
+
// If a tag that was removed is being re-added,
|
|
687
|
+
// remove from both addAssociations and deletedTags
|
|
688
|
+
var restored = intersectionWith(created, removed, compareTagValues);
|
|
689
|
+
var addOperations = differenceWith(created, restored, isEqual);
|
|
690
|
+
var deleteOperations = differenceWith(removed, restored, compareTagValues);
|
|
691
|
+
var bankEntryIdValue = getBankEntryId(bankEntry);
|
|
692
|
+
setPendingDeletionTagAssociations(bankEntry.entryType, bankEntryIdValue, deleteOperations);
|
|
693
|
+
setPendingAdditionTagAssociations(bankEntry.entryType, bankEntryIdValue, addOperations);
|
|
694
|
+
}
|
|
695
|
+
function visibleTagAssociations() {
|
|
696
|
+
var existingValues = keyBy(tagAssociations.toJS(), function(t) {
|
|
697
|
+
return t.tag_value;
|
|
698
|
+
});
|
|
699
|
+
var noDuplicates = pendingAdditionTags.filter(function(t) {
|
|
700
|
+
return isUndefined(existingValues[t.get('tag_value')]);
|
|
701
|
+
});
|
|
702
|
+
return tagAssociations.filter(function(tag) {
|
|
703
|
+
return !pendingDeletionTags.includes(tag);
|
|
704
|
+
}).concat(noDuplicates).toJS();
|
|
705
|
+
}
|
|
706
|
+
function visibleTags() {
|
|
707
|
+
return visibleTagAssociations().map(function(a) {
|
|
708
|
+
return {
|
|
709
|
+
id: a.tag_id,
|
|
710
|
+
value: a.tag_value
|
|
711
|
+
};
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
function renderEntry(entryParam) {
|
|
715
|
+
if (!entryParam) return null;
|
|
716
|
+
var propsForEntry = editProps(entryParam);
|
|
717
|
+
var propsFunc = isItemEntry() ? propsForItemVersioningWrapper : propsForStimulusVersioningWrapper;
|
|
718
|
+
var versioningProps = propsFunc(entryParam.isImmutable(), shouldClone, setShouldClone, navigateToBank, true, 'warning', isPassageEntry());
|
|
719
|
+
var canEdit = !entryParam.isImmutable() || shouldClone;
|
|
720
|
+
var ItemComponent = canEdit ? ItemEdit : ItemShow;
|
|
721
|
+
var StimulusComponent = canEdit ? StimulusEditInfo : StimulusShowInfo;
|
|
722
|
+
var EntryComponent = isItemEntry() ? ItemComponent : StimulusComponent;
|
|
723
|
+
var entryType = bankEntry.entryType;
|
|
724
|
+
var entryId = getBankEntryId(bankEntry);
|
|
725
|
+
var tags = function() {
|
|
726
|
+
return /*#__PURE__*/ jsx(TagSuggestSelect, {
|
|
727
|
+
allowNewTags: true,
|
|
728
|
+
noMatchText: t('Enter a tag to find or create'),
|
|
729
|
+
parentType: entryType,
|
|
730
|
+
parentId: entryId,
|
|
731
|
+
onChange: handleTagChange,
|
|
732
|
+
tags: visibleTags()
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
var editWarning = getEditWarning();
|
|
736
|
+
return /*#__PURE__*/ jsx("div", null, /*#__PURE__*/ jsx("div", {
|
|
737
|
+
css: styles.entryEdit
|
|
738
|
+
}, /*#__PURE__*/ jsx(WarningWrapper, versioningProps, canEdit && /*#__PURE__*/ jsx(Alert, {
|
|
739
|
+
renderCloseButtonLabel: t('Dismiss'),
|
|
740
|
+
margin: "0 0 medium 0"
|
|
741
|
+
}, /*#__PURE__*/ jsx(Text, {
|
|
742
|
+
color: "primary"
|
|
743
|
+
}, editWarning)), /*#__PURE__*/ jsx(EntryComponent, propsForEntry), useBankTags && tags())), /*#__PURE__*/ jsx("div", {
|
|
744
|
+
css: styles.footer
|
|
745
|
+
}, /*#__PURE__*/ jsx("div", {
|
|
746
|
+
css: styles.leftFooter
|
|
747
|
+
}, renderFeedbackSection()), /*#__PURE__*/ jsx("div", {
|
|
748
|
+
css: styles.rightFooter
|
|
749
|
+
}, /*#__PURE__*/ jsx(EntrySave, propsForEntry))));
|
|
750
|
+
}
|
|
751
|
+
if (entry && !entry.isLoaded()) {
|
|
752
|
+
return /*#__PURE__*/ jsx(Spinner, null);
|
|
753
|
+
}
|
|
754
|
+
return /*#__PURE__*/ jsx(Page, null, renderNav(), /*#__PURE__*/ jsx("div", {
|
|
755
|
+
css: styles.content,
|
|
756
|
+
ref: handleRef
|
|
757
|
+
}, iceTopNavBarEnabled && /*#__PURE__*/ jsx("div", {
|
|
758
|
+
css: styles.breadcrumb
|
|
759
|
+
}, /*#__PURE__*/ jsx(HeaderBreadCrumb, {
|
|
760
|
+
returnToUrl: returnToUrl,
|
|
761
|
+
scope: scope,
|
|
762
|
+
navigateToBanks: navigateToBanks,
|
|
763
|
+
navigateToBuild: navigateToBuild
|
|
764
|
+
}, renderBankBreadCrumbLink(), renderBankEntryBreadCrumbLink())), renderHeader(entry), renderEntry(entry), !isCompact && /*#__PURE__*/ jsx(ItemFeedbackModal, {
|
|
765
|
+
parentId: bankId,
|
|
766
|
+
parentType: PARENT_TYPE_BANK
|
|
767
|
+
})));
|
|
768
|
+
}
|
|
769
|
+
BaseBankEntry.displayName = 'BankEntry';
|
|
770
|
+
BaseBankEntry.componentId = 'QuizzesBankEntry';
|
|
771
|
+
BaseBankEntry.propTypes = {
|
|
915
772
|
bankEntryId: PropTypes.string.isRequired,
|
|
916
773
|
bankId: PropTypes.string.isRequired,
|
|
917
774
|
bank: ImmutablePropTypes.record.isRequired,
|
|
@@ -956,8 +813,8 @@ _define_property(BankEntry, "propTypes", {
|
|
|
956
813
|
useBankTags: PropTypes.bool,
|
|
957
814
|
iceTopNavBarEnabled: PropTypes.bool,
|
|
958
815
|
styles: PropTypes.object
|
|
959
|
-
}
|
|
960
|
-
|
|
816
|
+
};
|
|
817
|
+
BaseBankEntry.defaultProps = {
|
|
961
818
|
closeTray: function closeTray() {},
|
|
962
819
|
entry: null,
|
|
963
820
|
isCompact: false,
|
|
@@ -970,8 +827,7 @@ _define_property(BankEntry, "defaultProps", {
|
|
|
970
827
|
tagInput: null,
|
|
971
828
|
useBankTags: false,
|
|
972
829
|
iceTopNavBarEnabled: false
|
|
973
|
-
}
|
|
974
|
-
BankEntry =
|
|
975
|
-
|
|
976
|
-
], BankEntry);
|
|
830
|
+
};
|
|
831
|
+
var BankEntry = withStyleOverrides(generateStyle, generateComponentTheme)(BaseBankEntry);
|
|
832
|
+
export { BankEntry };
|
|
977
833
|
export default BankEntry;
|