@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,29 +35,6 @@ function _async_to_generator(fn) {
|
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
|
-
function _call_super(_this, derived, args) {
|
|
37
|
-
derived = _get_prototype_of(derived);
|
|
38
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
39
|
-
}
|
|
40
|
-
function _class_call_check(instance, Constructor) {
|
|
41
|
-
if (!(instance instanceof Constructor)) {
|
|
42
|
-
throw new TypeError("Cannot call a class as a function");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function _defineProperties(target, props) {
|
|
46
|
-
for(var i = 0; i < props.length; i++){
|
|
47
|
-
var descriptor = props[i];
|
|
48
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
49
|
-
descriptor.configurable = true;
|
|
50
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
51
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
55
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
56
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
57
|
-
return Constructor;
|
|
58
|
-
}
|
|
59
38
|
function _define_property(obj, key, value) {
|
|
60
39
|
if (key in obj) {
|
|
61
40
|
Object.defineProperty(obj, key, {
|
|
@@ -69,55 +48,43 @@ function _define_property(obj, key, value) {
|
|
|
69
48
|
}
|
|
70
49
|
return obj;
|
|
71
50
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
51
|
+
function _iterable_to_array_limit(arr, i) {
|
|
52
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
53
|
+
if (_i == null) return;
|
|
54
|
+
var _arr = [];
|
|
55
|
+
var _n = true;
|
|
56
|
+
var _d = false;
|
|
57
|
+
var _s, _e;
|
|
58
|
+
try {
|
|
59
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
60
|
+
_arr.push(_s.value);
|
|
61
|
+
if (i && _arr.length === i) break;
|
|
62
|
+
}
|
|
63
|
+
} catch (err) {
|
|
64
|
+
_d = true;
|
|
65
|
+
_e = err;
|
|
66
|
+
} finally{
|
|
67
|
+
try {
|
|
68
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
69
|
+
} finally{
|
|
70
|
+
if (_d) throw _e;
|
|
87
71
|
}
|
|
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
72
|
}
|
|
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);
|
|
73
|
+
return _arr;
|
|
103
74
|
}
|
|
104
|
-
function
|
|
105
|
-
"
|
|
106
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
75
|
+
function _non_iterable_rest() {
|
|
76
|
+
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
77
|
}
|
|
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
|
-
})();
|
|
78
|
+
function _sliced_to_array(arr, i) {
|
|
79
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
115
80
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
if (typeof
|
|
119
|
-
|
|
120
|
-
|
|
81
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
82
|
+
if (!o) return;
|
|
83
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
84
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
85
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
86
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
87
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
121
88
|
}
|
|
122
89
|
function _ts_generator(thisArg, body) {
|
|
123
90
|
var f, y, t, _ = {
|
|
@@ -210,13 +177,17 @@ function _ts_generator(thisArg, body) {
|
|
|
210
177
|
};
|
|
211
178
|
}
|
|
212
179
|
}
|
|
213
|
-
import React, {
|
|
180
|
+
import React, { useState, useEffect, useRef, useMemo, useImperativeHandle, forwardRef } from 'react';
|
|
214
181
|
import PropTypes from 'prop-types';
|
|
215
182
|
import { List, Map } from 'immutable';
|
|
216
183
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
217
184
|
import partial from 'lodash/partial';
|
|
218
185
|
import debounce from 'lodash/debounce';
|
|
219
|
-
import { Modal, ModalHeader, ModalBody, ModalFooter
|
|
186
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter } from '@instructure/quiz-common/components/Modal/index';
|
|
187
|
+
import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT } from '@instructure/quiz-common/constants';
|
|
188
|
+
import { SimpleSelect } from '@instructure/quiz-common/components/SimpleSelect/index';
|
|
189
|
+
import { withStyleOverrides } from '@instructure/quiz-common/util/withStyleOverrides';
|
|
190
|
+
import { TextInput } from '@instructure/quiz-common/components/TextInput/index';
|
|
220
191
|
import { Heading } from '@instructure/ui-heading';
|
|
221
192
|
import { Button, CloseButton, CondensedButton, IconButton } from '@instructure/ui-buttons';
|
|
222
193
|
import { View } from '@instructure/ui-view';
|
|
@@ -224,7 +195,6 @@ import { Grid } from '@instructure/ui-grid';
|
|
|
224
195
|
import { Tabs } from '@instructure/ui-tabs';
|
|
225
196
|
import { Text } from '@instructure/ui-text';
|
|
226
197
|
import { jsx } from '@instructure/emotion';
|
|
227
|
-
import CustomPropTypes from '../../../common/util/CustomPropTypes';
|
|
228
198
|
import ShareList from './ShareList';
|
|
229
199
|
import AsyncSearch from '../AsyncSearch';
|
|
230
200
|
import RootAccountSharing from './RootAccountSharing';
|
|
@@ -234,516 +204,512 @@ import generateComponentTheme from './theme';
|
|
|
234
204
|
import t from '@instructure/quiz-i18n/format-message';
|
|
235
205
|
import { IconSearchLine, IconTroubleLine } from '@instructure/ui-icons';
|
|
236
206
|
var noop = function() {};
|
|
237
|
-
export var SharingModalPresenter = /*#__PURE__*/ function(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
var entities = _this1.state.shares;
|
|
274
|
-
var users = entities.filter(function(s) {
|
|
275
|
-
return s.get('entityType') === SHARED_WITH_USER;
|
|
276
|
-
});
|
|
277
|
-
var courses = entities.filter(function(s) {
|
|
278
|
-
return s.get('entityType') === SHARED_WITH_COURSE;
|
|
279
|
-
});
|
|
280
|
-
var accounts = entities.filter(function(s) {
|
|
281
|
-
return s.get('entityType') === SHARED_WITH_ACCOUNT;
|
|
282
|
-
});
|
|
283
|
-
switch(_this1.state.selectedTabIndex){
|
|
284
|
-
case 0:
|
|
285
|
-
{
|
|
286
|
-
var displayedUsers = users.filter(function(item) {
|
|
287
|
-
return _this1.normalizeText(item.get('title')).includes(_this1.normalizeText(_this1.state.searchValue));
|
|
288
|
-
});
|
|
289
|
-
_this1.setState({
|
|
290
|
-
numOfResults: displayedUsers.size,
|
|
291
|
-
displayEntities: displayedUsers.slice(0, _this1.state.startingPoint + _this1.props.limit)
|
|
292
|
-
});
|
|
293
|
-
_this1.debouncedStopLoading();
|
|
294
|
-
break;
|
|
295
|
-
}
|
|
296
|
-
case 1:
|
|
297
|
-
{
|
|
298
|
-
var displayedCourses = courses.filter(function(item) {
|
|
299
|
-
return _this1.normalizeText(item.get('title')).includes(_this1.normalizeText(_this1.state.searchValue));
|
|
300
|
-
});
|
|
301
|
-
_this1.setState({
|
|
302
|
-
numOfResults: displayedCourses.size,
|
|
303
|
-
displayEntities: displayedCourses.slice(0, _this1.state.startingPoint + _this1.props.limit)
|
|
304
|
-
});
|
|
305
|
-
_this1.debouncedStopLoading();
|
|
306
|
-
break;
|
|
307
|
-
}
|
|
308
|
-
case 2:
|
|
309
|
-
{
|
|
310
|
-
var displayedAccounts = accounts.filter(function(item) {
|
|
311
|
-
return _this1.normalizeText(item.get('title')).includes(_this1.normalizeText(_this1.state.searchValue));
|
|
312
|
-
});
|
|
313
|
-
_this1.setState({
|
|
314
|
-
numOfResults: displayedAccounts.size,
|
|
315
|
-
displayEntities: displayedAccounts.slice(0, _this1.state.startingPoint + _this1.props.limit)
|
|
316
|
-
});
|
|
317
|
-
_this1.debouncedStopLoading();
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}), _define_property(_this1, "handleTabChange", function(event, param) {
|
|
322
|
-
var index = param.index;
|
|
323
|
-
_this1.setState({
|
|
324
|
-
selectedTabIndex: index,
|
|
325
|
-
startingPoint: 0,
|
|
326
|
-
value: ''
|
|
327
|
-
}, function() {
|
|
328
|
-
_this1.checkForSharedBanks();
|
|
329
|
-
});
|
|
330
|
-
}), _define_property(_this1, "modalDismissCleanup", function() {
|
|
331
|
-
_this1.props.onDismiss();
|
|
332
|
-
if (_this1.props.modalTrigger) {
|
|
333
|
-
_this1.props.modalTrigger.focus();
|
|
207
|
+
export var SharingModalPresenter = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
208
|
+
var bank = props.bank, currentUser = props.currentUser, getBank = props.getBank, getShareableCourses = props.getShareableCourses, getCourseInfo = props.getCourseInfo, getShareableUsers = props.getShareableUsers, getSharedBanks = props.getSharedBanks, getUserInfo = props.getUserInfo, getShareableSubaccounts = props.getShareableSubaccounts, getSubaccountInfo = props.getSubaccountInfo, isOpen = props.isOpen, minChars = props.minChars, modalTrigger = props.modalTrigger, onDismiss = props.onDismiss, onShare = props.onShare, removeSharedBank = props.removeSharedBank, shareBank = props.shareBank, sharedBanks = props.sharedBanks, updateBank = props.updateBank, updateSharedBankPermission = props.updateSharedBankPermission, updateSharedCount = props.updateSharedCount, withConfirm = props.withConfirm, styles = props.styles, limit = props.limit, loading = props.loading, changeSharedBankLoading = props.changeSharedBankLoading;
|
|
209
|
+
var _useState = _sliced_to_array(useState(bank.accountPermission), 2), accountPermission = _useState[0], setAccountPermission = _useState[1];
|
|
210
|
+
var _useState1 = _sliced_to_array(useState(sharedBanks), 2), shares = _useState1[0], setShares = _useState1[1];
|
|
211
|
+
var _useState2 = _sliced_to_array(useState(List()), 1), newEntities = _useState2[0];
|
|
212
|
+
var _useState3 = _sliced_to_array(useState([]), 2), searchSelection = _useState3[0], setSearchSelection = _useState3[1];
|
|
213
|
+
var _useState4 = _sliced_to_array(useState(READ_ONLY), 2), searchPermission = _useState4[0], setSearchPermission = _useState4[1];
|
|
214
|
+
var _useState5 = _sliced_to_array(useState(0), 2), selectedTabIndex = _useState5[0], setSelectedTabIndex = _useState5[1];
|
|
215
|
+
var _useState6 = _sliced_to_array(useState(''), 2), value = _useState6[0], setValue = _useState6[1];
|
|
216
|
+
var _useState7 = _sliced_to_array(useState(0), 2), startingPoint = _useState7[0], setStartingPoint = _useState7[1];
|
|
217
|
+
var _useState8 = _sliced_to_array(useState(0), 2), numOfResults = _useState8[0], setNumOfResults = _useState8[1];
|
|
218
|
+
var _useState9 = _sliced_to_array(useState(''), 2), searchValue = _useState9[0], setSearchValue = _useState9[1];
|
|
219
|
+
var _useState10 = _sliced_to_array(useState([]), 2), displayEntities = _useState10[0], setDisplayEntities = _useState10[1];
|
|
220
|
+
var shareButtonRef = useRef(null);
|
|
221
|
+
var inputRef = useRef(null);
|
|
222
|
+
var loadingRef = useRef(loading);
|
|
223
|
+
var changeSharedBankLoadingRef = useRef(changeSharedBankLoading);
|
|
224
|
+
useEffect(function() {
|
|
225
|
+
loadingRef.current = loading;
|
|
226
|
+
changeSharedBankLoadingRef.current = changeSharedBankLoading;
|
|
227
|
+
});
|
|
228
|
+
// Expose methods and state to tests via ref
|
|
229
|
+
useImperativeHandle(ref, function() {
|
|
230
|
+
return {
|
|
231
|
+
handleDismiss: handleDismiss,
|
|
232
|
+
handleSearchSelectionChange: handleSearchSelectionChange,
|
|
233
|
+
handleShare: handleShare,
|
|
234
|
+
handleEntityPermissionChange: handleEntityPermissionChange,
|
|
235
|
+
handleEntityRemove: handleEntityRemove,
|
|
236
|
+
toggleAccountShare: toggleAccountShare,
|
|
237
|
+
handleAccountPermissionChange: handleAccountPermissionChange,
|
|
238
|
+
handleSearchFilter: handleSearchFilter,
|
|
239
|
+
state: {
|
|
240
|
+
searchSelection: searchSelection,
|
|
241
|
+
newEntities: newEntities,
|
|
242
|
+
shares: shares
|
|
334
243
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
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
|
-
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
var debouncedSearch = useMemo(function() {
|
|
247
|
+
return debounce(function(currentValue) {
|
|
248
|
+
setSearchValue(currentValue);
|
|
249
|
+
}, 300);
|
|
250
|
+
}, []);
|
|
251
|
+
var debouncedStopLoading = useMemo(function() {
|
|
252
|
+
return debounce(function() {
|
|
253
|
+
if (loadingRef.current != false) changeSharedBankLoadingRef.current(false);
|
|
254
|
+
}, 300);
|
|
255
|
+
}, []);
|
|
256
|
+
useEffect(function() {
|
|
257
|
+
return function() {
|
|
258
|
+
debouncedSearch.cancel();
|
|
259
|
+
debouncedStopLoading.cancel();
|
|
260
|
+
};
|
|
261
|
+
}, []);
|
|
262
|
+
useEffect(function() {
|
|
263
|
+
setAccountPermission(bank.accountPermission);
|
|
264
|
+
}, [
|
|
265
|
+
bank.accountPermission
|
|
266
|
+
]);
|
|
267
|
+
useEffect(function() {
|
|
268
|
+
setShares(sharedBanks);
|
|
269
|
+
}, [
|
|
270
|
+
sharedBanks
|
|
271
|
+
]);
|
|
272
|
+
var isFirstRender = useRef(true);
|
|
273
|
+
useEffect(function() {
|
|
274
|
+
if (accountPermission !== bank.accountPermission) {
|
|
275
|
+
var updatedBank = bank.set('accountPermission', accountPermission);
|
|
276
|
+
updateBank(updatedBank, false);
|
|
277
|
+
}
|
|
278
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
279
|
+
}, [
|
|
280
|
+
accountPermission
|
|
281
|
+
]);
|
|
282
|
+
useEffect(function() {
|
|
283
|
+
if (isFirstRender.current) {
|
|
284
|
+
isFirstRender.current = false;
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (loading == false) changeSharedBankLoading(true);
|
|
288
|
+
setStartingPoint(0);
|
|
289
|
+
debouncedSearch(value);
|
|
290
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
291
|
+
}, [
|
|
292
|
+
value
|
|
293
|
+
]);
|
|
294
|
+
useEffect(function() {
|
|
295
|
+
createFilteredList();
|
|
296
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
297
|
+
}, [
|
|
298
|
+
searchValue,
|
|
299
|
+
startingPoint,
|
|
300
|
+
selectedTabIndex,
|
|
301
|
+
shares
|
|
302
|
+
]);
|
|
303
|
+
function checkForSharedBanks() {
|
|
304
|
+
var size = sharedBanks.size;
|
|
305
|
+
if (size >= 0 && size !== bank.sharedCount || size === 0) {
|
|
306
|
+
getSharedBanks(bank, getUserInfo, getCourseInfo, getSubaccountInfo);
|
|
307
|
+
} else {
|
|
308
|
+
setShares(sharedBanks);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function normalizeText(text) {
|
|
312
|
+
return text.normalize('NFD').replace(/[\u0300-\u036f]/g, '').toLowerCase();
|
|
313
|
+
}
|
|
314
|
+
function createFilteredList() {
|
|
315
|
+
var entities = shares;
|
|
316
|
+
var users = entities.filter(function(s) {
|
|
317
|
+
return s.get('entityType') === SHARED_WITH_USER;
|
|
318
|
+
});
|
|
319
|
+
var courses = entities.filter(function(s) {
|
|
320
|
+
return s.get('entityType') === SHARED_WITH_COURSE;
|
|
321
|
+
});
|
|
322
|
+
var accounts = entities.filter(function(s) {
|
|
323
|
+
return s.get('entityType') === SHARED_WITH_ACCOUNT;
|
|
324
|
+
});
|
|
325
|
+
switch(selectedTabIndex){
|
|
326
|
+
case 0:
|
|
327
|
+
{
|
|
328
|
+
var displayedUsers = users.filter(function(item) {
|
|
329
|
+
return normalizeText(item.get('title')).includes(normalizeText(searchValue));
|
|
330
|
+
});
|
|
331
|
+
setNumOfResults(displayedUsers.size);
|
|
332
|
+
setDisplayEntities(displayedUsers.slice(0, startingPoint + limit));
|
|
333
|
+
debouncedStopLoading();
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
case 1:
|
|
337
|
+
{
|
|
338
|
+
var displayedCourses = courses.filter(function(item) {
|
|
339
|
+
return normalizeText(item.get('title')).includes(normalizeText(searchValue));
|
|
340
|
+
});
|
|
341
|
+
setNumOfResults(displayedCourses.size);
|
|
342
|
+
setDisplayEntities(displayedCourses.slice(0, startingPoint + limit));
|
|
343
|
+
debouncedStopLoading();
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
case 2:
|
|
347
|
+
{
|
|
348
|
+
var displayedAccounts = accounts.filter(function(item) {
|
|
349
|
+
return normalizeText(item.get('title')).includes(normalizeText(searchValue));
|
|
350
|
+
});
|
|
351
|
+
setNumOfResults(displayedAccounts.size);
|
|
352
|
+
setDisplayEntities(displayedAccounts.slice(0, startingPoint + limit));
|
|
353
|
+
debouncedStopLoading();
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function handleTabChange(event, param) {
|
|
359
|
+
var index = param.index;
|
|
360
|
+
setSelectedTabIndex(index);
|
|
361
|
+
setStartingPoint(0);
|
|
362
|
+
setValue('');
|
|
363
|
+
checkForSharedBanks();
|
|
364
|
+
}
|
|
365
|
+
function modalDismissCleanup() {
|
|
366
|
+
onDismiss();
|
|
367
|
+
if (modalTrigger) {
|
|
368
|
+
modalTrigger.focus();
|
|
369
|
+
}
|
|
370
|
+
// removes the creator's temporary sharedBank record
|
|
371
|
+
removeSharedBank('-1');
|
|
372
|
+
}
|
|
373
|
+
function isSharedWithAccount() {
|
|
374
|
+
var state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
375
|
+
accountPermission: accountPermission
|
|
376
|
+
};
|
|
377
|
+
return [
|
|
378
|
+
READ_ONLY,
|
|
379
|
+
CAN_EDIT
|
|
380
|
+
].includes(state.accountPermission);
|
|
381
|
+
}
|
|
382
|
+
function handleDismiss(e) {
|
|
383
|
+
updateSharedCount(null);
|
|
384
|
+
modalDismissCleanup();
|
|
385
|
+
}
|
|
386
|
+
function sharedBankForEntity(entity) {
|
|
387
|
+
return {
|
|
388
|
+
entityType: entity.get('entityType'),
|
|
389
|
+
entityId: entity.get('entityId'),
|
|
390
|
+
title: entity.get('title'),
|
|
391
|
+
bankId: bank.id,
|
|
392
|
+
permission: entity.get('permission')
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function handleSearchSelectionChange(searchSelectionParam) {
|
|
396
|
+
setSearchSelection(searchSelectionParam);
|
|
397
|
+
}
|
|
398
|
+
function originalPermissionForEntity(entity) {
|
|
399
|
+
var originalEntity = sharedBanks.find(function(sb) {
|
|
400
|
+
return sb.get('id') == entity.get('id');
|
|
401
|
+
}) || Map();
|
|
402
|
+
return originalEntity.get('permission', CAN_EDIT);
|
|
403
|
+
}
|
|
404
|
+
function handleEntityRemove(entity, undoRemove) {
|
|
405
|
+
confirmPermissionChange(entity, REMOVED_ACCESS);
|
|
406
|
+
}
|
|
407
|
+
function handleSearchPermissionChange(e, param) {
|
|
408
|
+
var permValue = param.value;
|
|
409
|
+
setSearchPermission(permValue);
|
|
410
|
+
}
|
|
411
|
+
function handleSearchFilter(searchResults) {
|
|
412
|
+
return searchResults.filter(function(result) {
|
|
413
|
+
return !sharedBanks.some(function(entity) {
|
|
414
|
+
return entity.get('entityId') === result.uuid;
|
|
415
|
+
}) && (result.uuid !== bank.creator || bank.sharedCount > 0);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
function handleShare() {
|
|
419
|
+
var newEntitiesValue = List(searchSelection.map(function(entity) {
|
|
420
|
+
return Map({
|
|
421
|
+
id: entity.uuid,
|
|
422
|
+
entityType: entity.entityType,
|
|
423
|
+
entityId: entity.uuid,
|
|
424
|
+
title: entity.fullName || entity.title || entity.name,
|
|
425
|
+
avatar: entity.avatar,
|
|
426
|
+
email: entity.email,
|
|
427
|
+
permission: searchPermission
|
|
364
428
|
});
|
|
365
|
-
})
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
429
|
+
}));
|
|
430
|
+
newEntitiesValue.forEach(function(entity) {
|
|
431
|
+
onShare(entity.toJS());
|
|
432
|
+
shareBank(sharedBankForEntity(entity), getUserInfo);
|
|
433
|
+
});
|
|
434
|
+
setSearchSelection([]);
|
|
435
|
+
}
|
|
436
|
+
function updatePermission(entity, permission) {
|
|
437
|
+
return _async_to_generator(function() {
|
|
438
|
+
return _ts_generator(this, function(_state) {
|
|
439
|
+
switch(_state.label){
|
|
440
|
+
case 0:
|
|
441
|
+
return [
|
|
442
|
+
4,
|
|
443
|
+
updateSharedBankPermission(bank.id, entity.get('id'), permission)
|
|
444
|
+
];
|
|
445
|
+
case 1:
|
|
446
|
+
_state.sent();
|
|
447
|
+
getBank(bank.id); // make sure the user still has access to the bank
|
|
448
|
+
return [
|
|
449
|
+
2
|
|
450
|
+
];
|
|
451
|
+
}
|
|
370
452
|
});
|
|
371
|
-
})
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
453
|
+
})();
|
|
454
|
+
}
|
|
455
|
+
function translatedPermissionLevel(permission) {
|
|
456
|
+
var _obj;
|
|
457
|
+
return (_obj = {}, _define_property(_obj, CAN_EDIT, t('edit')), _define_property(_obj, READ_ONLY, t('view')), _obj)[permission];
|
|
458
|
+
}
|
|
459
|
+
function confirmPermissionChange(entity, permission) {
|
|
460
|
+
var confirmText = permission === REMOVED_ACCESS ? t('You are about to remove { accessLevel } access for { entityTitle } to this bank.', {
|
|
461
|
+
accessLevel: translatedPermissionLevel(originalPermissionForEntity(entity)),
|
|
462
|
+
entityTitle: entity.get('title')
|
|
463
|
+
}) : t('You are about to change access level for { entityTitle } from { originalAccessLevel } to { permission }.', {
|
|
464
|
+
entityTitle: entity.get('title'),
|
|
465
|
+
originalAccessLevel: translatedPermissionLevel(originalPermissionForEntity(entity)),
|
|
466
|
+
permission: translatedPermissionLevel(permission)
|
|
467
|
+
});
|
|
468
|
+
withConfirm(partial(updatePermission, entity, permission), {
|
|
469
|
+
title: t('Change Permission'),
|
|
470
|
+
text: confirmText,
|
|
471
|
+
continueText: t('Confirm')
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
function handleEntityPermissionChange(entity, permission) {
|
|
475
|
+
confirmPermissionChange(entity, permission);
|
|
476
|
+
}
|
|
477
|
+
function toggleAccountShare(event) {
|
|
478
|
+
setAccountPermission(function(prevAccountPermission) {
|
|
479
|
+
return isSharedWithAccount({
|
|
480
|
+
accountPermission: prevAccountPermission
|
|
481
|
+
}) ? REMOVED_ACCESS : READ_ONLY;
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
function handleAccountPermissionChange(e, param) {
|
|
485
|
+
var permValue = param.value;
|
|
486
|
+
setAccountPermission(permValue);
|
|
487
|
+
}
|
|
488
|
+
function handleShareButtonRef(node) {
|
|
489
|
+
shareButtonRef.current = node;
|
|
490
|
+
}
|
|
491
|
+
function handleChange(e, valueParam) {
|
|
492
|
+
setValue(valueParam);
|
|
493
|
+
}
|
|
494
|
+
function handleClear(e) {
|
|
495
|
+
e.stopPropagation();
|
|
496
|
+
handleChange(e, '');
|
|
497
|
+
}
|
|
498
|
+
function renderRootAccountSharing() {
|
|
499
|
+
return /*#__PURE__*/ jsx(RootAccountSharing, {
|
|
500
|
+
accountName: currentUser === null || currentUser === void 0 ? void 0 : currentUser.account_name,
|
|
501
|
+
onShareChange: toggleAccountShare,
|
|
502
|
+
onShareTypeChange: handleAccountPermissionChange,
|
|
503
|
+
accountPermission: accountPermission
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
function renderSearchSection(searchType) {
|
|
507
|
+
if (bank.canEdit()) {
|
|
508
|
+
return /*#__PURE__*/ jsx(React.Fragment, null, /*#__PURE__*/ jsx(Grid, {
|
|
509
|
+
vAlign: "bottom",
|
|
510
|
+
colSpacing: "small"
|
|
511
|
+
}, /*#__PURE__*/ jsx(Grid.Row, null, /*#__PURE__*/ jsx(Grid.Col, null, /*#__PURE__*/ jsx(AsyncSearch, {
|
|
512
|
+
getShareableCourses: getShareableCourses,
|
|
513
|
+
getShareableUsers: getShareableUsers,
|
|
514
|
+
getShareableSubaccounts: getShareableSubaccounts,
|
|
515
|
+
minChars: minChars,
|
|
516
|
+
onSelectionChange: handleSearchSelectionChange,
|
|
517
|
+
searchType: searchType,
|
|
518
|
+
selectedOption: searchSelection,
|
|
519
|
+
selectionFilter: handleSearchFilter,
|
|
520
|
+
searchLabel: t('Share With')
|
|
521
|
+
})), /*#__PURE__*/ jsx(Grid.Col, {
|
|
522
|
+
width: "auto"
|
|
523
|
+
}, /*#__PURE__*/ jsx(SimpleSelect, {
|
|
524
|
+
onChange: handleSearchPermissionChange,
|
|
525
|
+
value: searchPermission,
|
|
526
|
+
renderLabel: t('Access')
|
|
527
|
+
}, /*#__PURE__*/ jsx(SimpleSelect.Option, {
|
|
528
|
+
id: "sharing-modal-search-section-select-option-can-view",
|
|
529
|
+
value: READ_ONLY
|
|
530
|
+
}, t('Can view')), /*#__PURE__*/ jsx(SimpleSelect.Option, {
|
|
531
|
+
id: "sharing-modal-search-section-select-option-can-edit",
|
|
532
|
+
value: CAN_EDIT
|
|
533
|
+
}, t('Can edit')))), /*#__PURE__*/ jsx(Grid.Col, {
|
|
534
|
+
width: "auto"
|
|
535
|
+
}, /*#__PURE__*/ jsx(Button, {
|
|
536
|
+
"data-automation": "sdk-shared-bank-add-user-button",
|
|
537
|
+
ref: handleShareButtonRef,
|
|
538
|
+
onClick: handleShare,
|
|
539
|
+
color: searchSelection.length ? 'success' : 'secondary'
|
|
540
|
+
}, t('Add'))))), /*#__PURE__*/ jsx("div", {
|
|
541
|
+
css: styles.separator
|
|
382
542
|
}));
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
_this1.setState({
|
|
388
|
-
searchSelection: []
|
|
389
|
-
});
|
|
390
|
-
}), _define_property(_this1, "updatePermission", function(entity, permission) {
|
|
391
|
-
return _async_to_generator(function() {
|
|
392
|
-
var _this_props, updateSharedBankPermission, getBank, bank;
|
|
393
|
-
return _ts_generator(this, function(_state) {
|
|
394
|
-
switch(_state.label){
|
|
395
|
-
case 0:
|
|
396
|
-
_this_props = _this1.props, updateSharedBankPermission = _this_props.updateSharedBankPermission, getBank = _this_props.getBank, bank = _this_props.bank;
|
|
397
|
-
return [
|
|
398
|
-
4,
|
|
399
|
-
updateSharedBankPermission(bank.id, entity.get('id'), permission)
|
|
400
|
-
];
|
|
401
|
-
case 1:
|
|
402
|
-
_state.sent();
|
|
403
|
-
getBank(bank.id); // make sure the user still has access to the bank
|
|
404
|
-
return [
|
|
405
|
-
2
|
|
406
|
-
];
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
})();
|
|
410
|
-
}), _define_property(_this1, "translatedPermissionLevel", function(permission) {
|
|
411
|
-
var _obj;
|
|
412
|
-
return (_obj = {}, _define_property(_obj, CAN_EDIT, t('edit')), _define_property(_obj, READ_ONLY, t('view')), _obj)[permission];
|
|
413
|
-
}), _define_property(_this1, "confirmPermissionChange", function(entity, permission) {
|
|
414
|
-
var confirmText = permission === REMOVED_ACCESS ? t('You are about to remove { accessLevel } access for { entityTitle } to this bank.', {
|
|
415
|
-
accessLevel: _this1.translatedPermissionLevel(_this1.originalPermissionForEntity(entity)),
|
|
416
|
-
entityTitle: entity.get('title')
|
|
417
|
-
}) : t('You are about to change access level for { entityTitle } from { originalAccessLevel } to { permission }.', {
|
|
418
|
-
entityTitle: entity.get('title'),
|
|
419
|
-
originalAccessLevel: _this1.translatedPermissionLevel(_this1.originalPermissionForEntity(entity)),
|
|
420
|
-
permission: _this1.translatedPermissionLevel(permission)
|
|
421
|
-
});
|
|
422
|
-
_this1.props.withConfirm(partial(_this1.updatePermission, entity, permission), {
|
|
423
|
-
title: t('Change Permission'),
|
|
424
|
-
text: confirmText,
|
|
425
|
-
continueText: t('Confirm')
|
|
426
|
-
});
|
|
427
|
-
}), _define_property(_this1, "handleEntityPermissionChange", function(entity, permission) {
|
|
428
|
-
_this1.confirmPermissionChange(entity, permission);
|
|
429
|
-
}), _define_property(_this1, "toggleAccountShare", function(event) {
|
|
430
|
-
_this1.setState(function(prevState) {
|
|
431
|
-
return {
|
|
432
|
-
accountPermission: _this1.isSharedWithAccount(prevState) ? REMOVED_ACCESS : READ_ONLY
|
|
433
|
-
};
|
|
434
|
-
});
|
|
435
|
-
}), _define_property(_this1, "handleAccountPermissionChange", function(e, param) {
|
|
436
|
-
var value = param.value;
|
|
437
|
-
return _this1.setState({
|
|
438
|
-
accountPermission: value
|
|
439
|
-
});
|
|
440
|
-
}), _define_property(_this1, "handleShareButtonRef", function(node) {
|
|
441
|
-
_this1.shareButtonRef = node;
|
|
442
|
-
}), _define_property(_this1, "handleChange", function(e, value) {
|
|
443
|
-
_this1.setState({
|
|
444
|
-
value: value
|
|
445
|
-
});
|
|
446
|
-
}), _define_property(_this1, "handleClear", function(e) {
|
|
447
|
-
e.stopPropagation();
|
|
448
|
-
_this1.handleChange(e, '');
|
|
449
|
-
}), _define_property(_this1, "renderSearchSection", function(searchType) {
|
|
450
|
-
if (_this1.props.bank.canEdit()) {
|
|
451
|
-
return /*#__PURE__*/ jsx(React.Fragment, null, /*#__PURE__*/ jsx(Grid, {
|
|
452
|
-
vAlign: "bottom",
|
|
453
|
-
colSpacing: "small"
|
|
454
|
-
}, /*#__PURE__*/ jsx(Grid.Row, null, /*#__PURE__*/ jsx(Grid.Col, null, /*#__PURE__*/ jsx(AsyncSearch, {
|
|
455
|
-
getShareableCourses: _this1.props.getShareableCourses,
|
|
456
|
-
getShareableUsers: _this1.props.getShareableUsers,
|
|
457
|
-
getShareableSubaccounts: _this1.props.getShareableSubaccounts,
|
|
458
|
-
minChars: _this1.props.minChars,
|
|
459
|
-
onSelectionChange: _this1.handleSearchSelectionChange,
|
|
460
|
-
searchType: searchType,
|
|
461
|
-
selectedOption: _this1.state.searchSelection,
|
|
462
|
-
selectionFilter: _this1.handleSearchFilter,
|
|
463
|
-
searchLabel: t('Share With')
|
|
464
|
-
})), /*#__PURE__*/ jsx(Grid.Col, {
|
|
465
|
-
width: "auto"
|
|
466
|
-
}, /*#__PURE__*/ jsx(SimpleSelect, {
|
|
467
|
-
onChange: _this1.handleSearchPermissionChange,
|
|
468
|
-
value: _this1.state.searchPermission,
|
|
469
|
-
renderLabel: t('Access')
|
|
470
|
-
}, /*#__PURE__*/ jsx(SimpleSelect.Option, {
|
|
471
|
-
id: "sharing-modal-search-section-select-option-can-view",
|
|
472
|
-
value: READ_ONLY
|
|
473
|
-
}, t('Can view')), /*#__PURE__*/ jsx(SimpleSelect.Option, {
|
|
474
|
-
id: "sharing-modal-search-section-select-option-can-edit",
|
|
475
|
-
value: CAN_EDIT
|
|
476
|
-
}, t('Can edit')))), /*#__PURE__*/ jsx(Grid.Col, {
|
|
477
|
-
width: "auto"
|
|
478
|
-
}, /*#__PURE__*/ jsx(Button, {
|
|
479
|
-
"data-automation": "sdk-shared-bank-add-user-button",
|
|
480
|
-
ref: _this1.handleShareButtonRef,
|
|
481
|
-
onClick: _this1.handleShare,
|
|
482
|
-
color: _this1.state.searchSelection.length ? 'success' : 'secondary'
|
|
483
|
-
}, t('Add'))))), /*#__PURE__*/ jsx("div", {
|
|
484
|
-
css: _this1.props.styles.separator
|
|
485
|
-
}));
|
|
486
|
-
}
|
|
487
|
-
}), _define_property(_this1, "renderShareList", function() {
|
|
488
|
-
if (_this1.props.loading) {
|
|
489
|
-
return /*#__PURE__*/ jsx(View, {
|
|
490
|
-
height: "12em",
|
|
491
|
-
as: "div"
|
|
492
|
-
}, /*#__PURE__*/ jsx(View, {
|
|
493
|
-
position: "absolute",
|
|
494
|
-
as: "div",
|
|
495
|
-
insetBlockEnd: "0"
|
|
496
|
-
}, /*#__PURE__*/ jsx(Spinner, {
|
|
497
|
-
renderTitle: "Loading...",
|
|
498
|
-
size: "small",
|
|
499
|
-
fontSize: "medium"
|
|
500
|
-
})));
|
|
501
|
-
}
|
|
502
|
-
if (_this1.state.displayEntities.size > 0) {
|
|
503
|
-
return /*#__PURE__*/ jsx(View, {
|
|
504
|
-
height: "12em",
|
|
505
|
-
overflowY: "auto",
|
|
506
|
-
overflowX: "hidden",
|
|
507
|
-
as: "div",
|
|
508
|
-
padding: "xx-small xx-small none"
|
|
509
|
-
}, /*#__PURE__*/ jsx(ShareList, {
|
|
510
|
-
canEdit: _this1.props.bank.canEdit(),
|
|
511
|
-
entities: _this1.state.displayEntities,
|
|
512
|
-
onPermissionChange: _this1.handleEntityPermissionChange,
|
|
513
|
-
onEntityRemove: _this1.handleEntityRemove,
|
|
514
|
-
sharedBanks: _this1.props.sharedBanks
|
|
515
|
-
}), /*#__PURE__*/ jsx("div", null, _this1.renderShowMoreButton()));
|
|
516
|
-
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function renderShareList() {
|
|
546
|
+
if (loading) {
|
|
517
547
|
return /*#__PURE__*/ jsx(View, {
|
|
518
548
|
height: "12em",
|
|
519
549
|
as: "div"
|
|
520
|
-
},
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
var shouldShowButton = _this1.state.startingPoint + _this1.props.limit < _this1.state.numOfResults;
|
|
527
|
-
if (!shouldShowButton) {
|
|
528
|
-
return null;
|
|
529
|
-
}
|
|
530
|
-
return /*#__PURE__*/ jsx(View, {
|
|
531
|
-
css: {
|
|
532
|
-
display: shouldShowButton
|
|
533
|
-
},
|
|
534
|
-
background: "primary",
|
|
535
|
-
padding: "small none",
|
|
536
|
-
as: "div"
|
|
537
|
-
}, /*#__PURE__*/ jsx(CondensedButton, {
|
|
538
|
-
onClick: function(e) {
|
|
539
|
-
e.preventDefault();
|
|
540
|
-
e.stopPropagation();
|
|
541
|
-
_this1.showMoreResult();
|
|
542
|
-
}
|
|
543
|
-
}, t('Show more')));
|
|
544
|
-
}), _define_property(_this1, "renderClearButton", function() {
|
|
545
|
-
if (!_this1.state.value.length || _this1.state.readOnly || _this1.state.disabled) return null;
|
|
546
|
-
return /*#__PURE__*/ jsx(IconButton, {
|
|
547
|
-
type: "button",
|
|
550
|
+
}, /*#__PURE__*/ jsx(View, {
|
|
551
|
+
position: "absolute",
|
|
552
|
+
as: "div",
|
|
553
|
+
insetBlockEnd: "0"
|
|
554
|
+
}, /*#__PURE__*/ jsx(Spinner, {
|
|
555
|
+
renderTitle: "Loading...",
|
|
548
556
|
size: "small",
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
onClick: _this1.handleClear
|
|
554
|
-
}, /*#__PURE__*/ jsx(IconTroubleLine, null));
|
|
555
|
-
}), _define_property(_this1, "renderSharedSearch", function() {
|
|
557
|
+
fontSize: "medium"
|
|
558
|
+
})));
|
|
559
|
+
}
|
|
560
|
+
if (displayEntities.size > 0) {
|
|
556
561
|
return /*#__PURE__*/ jsx(View, {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}),
|
|
570
|
-
renderAfterInput: _this1.renderClearButton(),
|
|
571
|
-
shouldNotWrap: true
|
|
572
|
-
}));
|
|
573
|
-
});
|
|
574
|
-
_this1.debouncedSearch = debounce(function() {
|
|
575
|
-
_this1.setState({
|
|
576
|
-
searchValue: _this1.state.value
|
|
577
|
-
});
|
|
578
|
-
}, 300);
|
|
579
|
-
_this1.debouncedStopLoading = debounce(function() {
|
|
580
|
-
if (_this1.props.loading != false) _this1.props.changeSharedBankLoading(false);
|
|
581
|
-
}, 300);
|
|
582
|
-
return _this;
|
|
583
|
-
}
|
|
584
|
-
_create_class(SharingModalPresenter, [
|
|
585
|
-
{
|
|
586
|
-
key: "componentDidMount",
|
|
587
|
-
value: function componentDidMount() {
|
|
588
|
-
this.setState({
|
|
589
|
-
accountPermission: this.props.bank.accountPermission,
|
|
590
|
-
shares: this.props.sharedBanks
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
596
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
597
|
-
this.setState({
|
|
598
|
-
accountPermission: nextProps.bank.accountPermission,
|
|
599
|
-
shares: nextProps.sharedBanks
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
key: "componentDidUpdate",
|
|
605
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
606
|
-
if (this.state.accountPermission !== prevState.accountPermission && this.state.accountPermission !== this.props.bank.accountPermission) {
|
|
607
|
-
var updatedBank = this.props.bank.set('accountPermission', this.state.accountPermission);
|
|
608
|
-
this.props.updateBank(updatedBank, false);
|
|
609
|
-
}
|
|
610
|
-
if (prevState.value !== this.state.value) {
|
|
611
|
-
if (this.props.loading == false) this.props.changeSharedBankLoading(true);
|
|
612
|
-
this.setState({
|
|
613
|
-
startingPoint: 0
|
|
614
|
-
});
|
|
615
|
-
this.debouncedSearch();
|
|
616
|
-
}
|
|
617
|
-
if (prevState.searchValue !== this.state.searchValue || prevState.startingPoint !== this.state.startingPoint || prevState.selectedTabIndex !== this.state.selectedTabIndex || prevState.shares !== this.state.shares) {
|
|
618
|
-
this.createFilteredList();
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
key: "sharedBankForEntity",
|
|
624
|
-
value: function sharedBankForEntity(entity) {
|
|
625
|
-
return {
|
|
626
|
-
entityType: entity.get('entityType'),
|
|
627
|
-
entityId: entity.get('entityId'),
|
|
628
|
-
title: entity.get('title'),
|
|
629
|
-
bankId: this.props.bank.id,
|
|
630
|
-
permission: entity.get('permission')
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
// =============
|
|
636
|
-
// RENDERING
|
|
637
|
-
// =============
|
|
638
|
-
key: "renderRootAccountSharing",
|
|
639
|
-
value: function renderRootAccountSharing() {
|
|
640
|
-
var _this_props_currentUser;
|
|
641
|
-
return /*#__PURE__*/ jsx(RootAccountSharing, {
|
|
642
|
-
accountName: (_this_props_currentUser = this.props.currentUser) === null || _this_props_currentUser === void 0 ? void 0 : _this_props_currentUser.account_name,
|
|
643
|
-
onShareChange: this.toggleAccountShare,
|
|
644
|
-
onShareTypeChange: this.handleAccountPermissionChange,
|
|
645
|
-
accountPermission: this.state.accountPermission
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
key: "renderSubaccountSharingEnabledEntities",
|
|
651
|
-
value: function renderSubaccountSharingEnabledEntities(existingPeople, existingCourses, existingAccounts) {
|
|
652
|
-
var currentUser = this.props.currentUser;
|
|
653
|
-
return /*#__PURE__*/ jsx(View, {
|
|
654
|
-
as: "div",
|
|
655
|
-
"data-automation": "sdk-shared-bank-user-list"
|
|
656
|
-
}, /*#__PURE__*/ jsx(Tabs, {
|
|
657
|
-
onRequestTabChange: this.handleTabChange
|
|
658
|
-
}, /*#__PURE__*/ jsx(Tabs.Panel, {
|
|
659
|
-
renderTitle: t('People ({ peopleCount })', {
|
|
660
|
-
peopleCount: existingPeople.size
|
|
661
|
-
}),
|
|
662
|
-
isSelected: this.state.selectedTabIndex === 0,
|
|
663
|
-
padding: "large small small small"
|
|
664
|
-
}, this.renderSearchSection(SHARED_WITH_USER), /*#__PURE__*/ jsx(Text, {
|
|
665
|
-
as: "div",
|
|
666
|
-
weight: "bold",
|
|
667
|
-
lineHeight: "double"
|
|
668
|
-
}, t('Currently shared with')), this.renderSharedSearch(), this.renderShareList()), /*#__PURE__*/ jsx(Tabs.Panel, {
|
|
669
|
-
renderTitle: t('Courses ({ coursesCount })', {
|
|
670
|
-
coursesCount: existingCourses.size
|
|
671
|
-
}),
|
|
672
|
-
isSelected: this.state.selectedTabIndex === 1,
|
|
673
|
-
padding: "large small small small"
|
|
674
|
-
}, this.renderSearchSection(SHARED_WITH_COURSE), /*#__PURE__*/ jsx(Text, {
|
|
675
|
-
as: "div",
|
|
676
|
-
weight: "bold",
|
|
677
|
-
lineHeight: "double"
|
|
678
|
-
}, t('Currently shared with')), this.renderSharedSearch(), this.renderShareList()), ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.bank_admin) || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.can_share_banks_with_subaccounts)) && /*#__PURE__*/ jsx(Tabs.Panel, {
|
|
679
|
-
renderTitle: t('Accounts ({ accountsCount })', {
|
|
680
|
-
accountsCount: existingAccounts.size
|
|
681
|
-
}),
|
|
682
|
-
isSelected: this.state.selectedTabIndex === 2,
|
|
683
|
-
padding: "large small small small"
|
|
684
|
-
}, (currentUser === null || currentUser === void 0 ? void 0 : currentUser.bank_admin) && this.renderRootAccountSharing(), (currentUser === null || currentUser === void 0 ? void 0 : currentUser.can_share_banks_with_subaccounts) && this.renderSearchSection(SHARED_WITH_ACCOUNT), /*#__PURE__*/ jsx(Text, {
|
|
685
|
-
as: "div",
|
|
686
|
-
weight: "bold",
|
|
687
|
-
lineHeight: "double"
|
|
688
|
-
}, t('Currently shared with')), this.renderSharedSearch(), this.renderShareList())));
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
key: "renderEntitiesSection",
|
|
693
|
-
value: function renderEntitiesSection() {
|
|
694
|
-
var newEntityIds = this.state.newEntities.map(function(e) {
|
|
695
|
-
return e.get('id');
|
|
696
|
-
});
|
|
697
|
-
var existingShares = this.state.shares.filterNot(function(s) {
|
|
698
|
-
return newEntityIds.includes(s.get('id'));
|
|
699
|
-
});
|
|
700
|
-
var existingPeople = existingShares.filter(function(s) {
|
|
701
|
-
return s.get('entityType') === SHARED_WITH_USER;
|
|
702
|
-
});
|
|
703
|
-
var existingCourses = existingShares.filter(function(s) {
|
|
704
|
-
return s.get('entityType') === SHARED_WITH_COURSE;
|
|
705
|
-
});
|
|
706
|
-
var existingAccounts = existingShares.filter(function(s) {
|
|
707
|
-
return s.get('entityType') === SHARED_WITH_ACCOUNT;
|
|
708
|
-
});
|
|
709
|
-
return this.renderSubaccountSharingEnabledEntities(existingPeople, existingCourses, existingAccounts);
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
key: "renderFooter",
|
|
714
|
-
value: function renderFooter() {
|
|
715
|
-
return /*#__PURE__*/ jsx(Button, {
|
|
716
|
-
color: "primary",
|
|
717
|
-
margin: "0 x-small 0 0",
|
|
718
|
-
onClick: this.handleDismiss
|
|
719
|
-
}, t('Close'));
|
|
720
|
-
}
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
key: "render",
|
|
724
|
-
value: function render() {
|
|
725
|
-
return /*#__PURE__*/ jsx(Modal, {
|
|
726
|
-
open: this.props.isOpen,
|
|
727
|
-
onDismiss: this.handleDismiss,
|
|
728
|
-
size: "medium",
|
|
729
|
-
label: t('Sharing'),
|
|
730
|
-
shouldCloseOnDocumentClick: true,
|
|
731
|
-
onOpen: this.checkForSharedBanks
|
|
732
|
-
}, /*#__PURE__*/ jsx(ModalHeader, null, /*#__PURE__*/ jsx(Heading, null, this.props.bank.title), /*#__PURE__*/ jsx(CloseButton, {
|
|
733
|
-
onClick: this.handleDismiss,
|
|
734
|
-
placement: "end",
|
|
735
|
-
offset: "medium",
|
|
736
|
-
screenReaderLabel: t('Close')
|
|
737
|
-
})), /*#__PURE__*/ jsx(ModalBody, null, this.state.shares.size >= 0 ? this.renderEntitiesSection() : /*#__PURE__*/ jsx(Spinner, null)), /*#__PURE__*/ jsx(ModalFooter, null, this.renderFooter()));
|
|
738
|
-
}
|
|
562
|
+
height: "12em",
|
|
563
|
+
overflowY: "auto",
|
|
564
|
+
overflowX: "hidden",
|
|
565
|
+
as: "div",
|
|
566
|
+
padding: "xx-small xx-small none"
|
|
567
|
+
}, /*#__PURE__*/ jsx(ShareList, {
|
|
568
|
+
canEdit: bank.canEdit(),
|
|
569
|
+
entities: displayEntities,
|
|
570
|
+
onPermissionChange: handleEntityPermissionChange,
|
|
571
|
+
onEntityRemove: handleEntityRemove,
|
|
572
|
+
sharedBanks: sharedBanks
|
|
573
|
+
}), /*#__PURE__*/ jsx("div", null, renderShowMoreButton()));
|
|
739
574
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
575
|
+
return /*#__PURE__*/ jsx(View, {
|
|
576
|
+
height: "12em",
|
|
577
|
+
as: "div"
|
|
578
|
+
}, t('No results found'));
|
|
579
|
+
}
|
|
580
|
+
function showMoreResult() {
|
|
581
|
+
setStartingPoint(startingPoint + limit);
|
|
582
|
+
}
|
|
583
|
+
function renderShowMoreButton() {
|
|
584
|
+
var shouldShowButton = startingPoint + limit < numOfResults;
|
|
585
|
+
if (!shouldShowButton) {
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
return /*#__PURE__*/ jsx(View, {
|
|
589
|
+
css: {
|
|
590
|
+
display: shouldShowButton
|
|
591
|
+
},
|
|
592
|
+
background: "primary",
|
|
593
|
+
padding: "small none",
|
|
594
|
+
as: "div"
|
|
595
|
+
}, /*#__PURE__*/ jsx(CondensedButton, {
|
|
596
|
+
onClick: function(e) {
|
|
597
|
+
e.preventDefault();
|
|
598
|
+
e.stopPropagation();
|
|
599
|
+
showMoreResult();
|
|
600
|
+
}
|
|
601
|
+
}, t('Show more')));
|
|
602
|
+
}
|
|
603
|
+
function renderClearButton() {
|
|
604
|
+
if (!value.length) return null;
|
|
605
|
+
return /*#__PURE__*/ jsx(IconButton, {
|
|
606
|
+
type: "button",
|
|
607
|
+
size: "small",
|
|
608
|
+
withBackground: false,
|
|
609
|
+
withBorder: false,
|
|
610
|
+
screenReaderLabel: "Clear search",
|
|
611
|
+
onClick: handleClear
|
|
612
|
+
}, /*#__PURE__*/ jsx(IconTroubleLine, null));
|
|
613
|
+
}
|
|
614
|
+
function renderSharedSearch() {
|
|
615
|
+
return /*#__PURE__*/ jsx(View, {
|
|
616
|
+
margin: "none large none medium"
|
|
617
|
+
}, /*#__PURE__*/ jsx(TextInput, {
|
|
618
|
+
size: 'medium',
|
|
619
|
+
placeholder: t('Search...'),
|
|
620
|
+
value: value,
|
|
621
|
+
onChange: handleChange,
|
|
622
|
+
interaction: 'enabled',
|
|
623
|
+
inputRef: function(el) {
|
|
624
|
+
return inputRef.current = el;
|
|
625
|
+
},
|
|
626
|
+
renderBeforeInput: /*#__PURE__*/ jsx(IconSearchLine, {
|
|
627
|
+
inline: false
|
|
628
|
+
}),
|
|
629
|
+
renderAfterInput: renderClearButton(),
|
|
630
|
+
shouldNotWrap: true
|
|
631
|
+
}));
|
|
632
|
+
}
|
|
633
|
+
function renderSubaccountSharingEnabledEntities(existingPeople, existingCourses, existingAccounts) {
|
|
634
|
+
return /*#__PURE__*/ jsx(View, {
|
|
635
|
+
as: "div",
|
|
636
|
+
"data-automation": "sdk-shared-bank-user-list"
|
|
637
|
+
}, /*#__PURE__*/ jsx(Tabs, {
|
|
638
|
+
onRequestTabChange: handleTabChange
|
|
639
|
+
}, /*#__PURE__*/ jsx(Tabs.Panel, {
|
|
640
|
+
renderTitle: t('People ({ peopleCount })', {
|
|
641
|
+
peopleCount: existingPeople.size
|
|
642
|
+
}),
|
|
643
|
+
isSelected: selectedTabIndex === 0,
|
|
644
|
+
padding: "large small small small"
|
|
645
|
+
}, renderSearchSection(SHARED_WITH_USER), /*#__PURE__*/ jsx(Text, {
|
|
646
|
+
as: "div",
|
|
647
|
+
weight: "bold",
|
|
648
|
+
lineHeight: "double"
|
|
649
|
+
}, t('Currently shared with')), renderSharedSearch(), renderShareList()), /*#__PURE__*/ jsx(Tabs.Panel, {
|
|
650
|
+
renderTitle: t('Courses ({ coursesCount })', {
|
|
651
|
+
coursesCount: existingCourses.size
|
|
652
|
+
}),
|
|
653
|
+
isSelected: selectedTabIndex === 1,
|
|
654
|
+
padding: "large small small small"
|
|
655
|
+
}, renderSearchSection(SHARED_WITH_COURSE), /*#__PURE__*/ jsx(Text, {
|
|
656
|
+
as: "div",
|
|
657
|
+
weight: "bold",
|
|
658
|
+
lineHeight: "double"
|
|
659
|
+
}, t('Currently shared with')), renderSharedSearch(), renderShareList()), ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.bank_admin) || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.can_share_banks_with_subaccounts)) && /*#__PURE__*/ jsx(Tabs.Panel, {
|
|
660
|
+
renderTitle: t('Accounts ({ accountsCount })', {
|
|
661
|
+
accountsCount: existingAccounts.size
|
|
662
|
+
}),
|
|
663
|
+
isSelected: selectedTabIndex === 2,
|
|
664
|
+
padding: "large small small small"
|
|
665
|
+
}, (currentUser === null || currentUser === void 0 ? void 0 : currentUser.bank_admin) && renderRootAccountSharing(), (currentUser === null || currentUser === void 0 ? void 0 : currentUser.can_share_banks_with_subaccounts) && renderSearchSection(SHARED_WITH_ACCOUNT), /*#__PURE__*/ jsx(Text, {
|
|
666
|
+
as: "div",
|
|
667
|
+
weight: "bold",
|
|
668
|
+
lineHeight: "double"
|
|
669
|
+
}, t('Currently shared with')), renderSharedSearch(), renderShareList())));
|
|
670
|
+
}
|
|
671
|
+
function renderEntitiesSection() {
|
|
672
|
+
var newEntityIds = newEntities.map(function(e) {
|
|
673
|
+
return e.get('id');
|
|
674
|
+
});
|
|
675
|
+
var existingShares = shares.filterNot(function(s) {
|
|
676
|
+
return newEntityIds.includes(s.get('id'));
|
|
677
|
+
});
|
|
678
|
+
var existingPeople = existingShares.filter(function(s) {
|
|
679
|
+
return s.get('entityType') === SHARED_WITH_USER;
|
|
680
|
+
});
|
|
681
|
+
var existingCourses = existingShares.filter(function(s) {
|
|
682
|
+
return s.get('entityType') === SHARED_WITH_COURSE;
|
|
683
|
+
});
|
|
684
|
+
var existingAccounts = existingShares.filter(function(s) {
|
|
685
|
+
return s.get('entityType') === SHARED_WITH_ACCOUNT;
|
|
686
|
+
});
|
|
687
|
+
return renderSubaccountSharingEnabledEntities(existingPeople, existingCourses, existingAccounts);
|
|
688
|
+
}
|
|
689
|
+
function renderFooter() {
|
|
690
|
+
return /*#__PURE__*/ jsx(Button, {
|
|
691
|
+
color: "primary",
|
|
692
|
+
margin: "0 x-small 0 0",
|
|
693
|
+
onClick: handleDismiss
|
|
694
|
+
}, t('Close'));
|
|
695
|
+
}
|
|
696
|
+
return /*#__PURE__*/ jsx(Modal, {
|
|
697
|
+
open: isOpen,
|
|
698
|
+
onDismiss: handleDismiss,
|
|
699
|
+
size: "medium",
|
|
700
|
+
label: t('Sharing'),
|
|
701
|
+
shouldCloseOnDocumentClick: true,
|
|
702
|
+
onOpen: checkForSharedBanks
|
|
703
|
+
}, /*#__PURE__*/ jsx(ModalHeader, null, /*#__PURE__*/ jsx(Heading, null, bank.title), /*#__PURE__*/ jsx(CloseButton, {
|
|
704
|
+
onClick: handleDismiss,
|
|
705
|
+
placement: "end",
|
|
706
|
+
offset: "medium",
|
|
707
|
+
screenReaderLabel: t('Close')
|
|
708
|
+
})), /*#__PURE__*/ jsx(ModalBody, null, shares.size >= 0 ? renderEntitiesSection() : /*#__PURE__*/ jsx(Spinner, null)), /*#__PURE__*/ jsx(ModalFooter, null, renderFooter()));
|
|
709
|
+
});
|
|
710
|
+
SharingModalPresenter.displayName = 'SharingModalPresenter';
|
|
711
|
+
SharingModalPresenter.componentId = 'QuizzesSharingModalPresenter';
|
|
712
|
+
SharingModalPresenter.propTypes = {
|
|
747
713
|
bank: ImmutablePropTypes.record.isRequired,
|
|
748
714
|
currentUser: PropTypes.shape({
|
|
749
715
|
bank_admin: PropTypes.bool,
|
|
@@ -754,7 +720,6 @@ _define_property(SharingModalPresenter, "propTypes", {
|
|
|
754
720
|
uuid: PropTypes.string,
|
|
755
721
|
account_name: PropTypes.string
|
|
756
722
|
}),
|
|
757
|
-
focusCreateBankButton: PropTypes.func.isRequired,
|
|
758
723
|
getBank: PropTypes.func.isRequired,
|
|
759
724
|
getShareableCourses: PropTypes.func.isRequired,
|
|
760
725
|
getCourseInfo: PropTypes.func.isRequired,
|
|
@@ -779,8 +744,8 @@ _define_property(SharingModalPresenter, "propTypes", {
|
|
|
779
744
|
limit: PropTypes.number,
|
|
780
745
|
loading: PropTypes.bool,
|
|
781
746
|
changeSharedBankLoading: PropTypes.func.isRequired
|
|
782
|
-
}
|
|
783
|
-
|
|
747
|
+
};
|
|
748
|
+
SharingModalPresenter.defaultProps = {
|
|
784
749
|
bank: null,
|
|
785
750
|
currentUser: null,
|
|
786
751
|
isOpen: false,
|
|
@@ -792,8 +757,5 @@ _define_property(SharingModalPresenter, "defaultProps", {
|
|
|
792
757
|
updateSharedCount: Function.prototype,
|
|
793
758
|
limit: 10,
|
|
794
759
|
loading: false
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
withStyleOverrides(generateStyle, generateComponentTheme)
|
|
798
|
-
], SharingModalPresenter);
|
|
799
|
-
export default SharingModalPresenter;
|
|
760
|
+
};
|
|
761
|
+
export default withStyleOverrides(generateStyle, generateComponentTheme)(SharingModalPresenter);
|