@instructure/quiz-core 22.6.0 → 22.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/banks/api/banks.js +2 -2
- package/es/banks/components/AddBankEntryModal/presenter.js +17 -29
- package/es/banks/components/AddToBankModal/presenter.js +32 -44
- package/es/banks/components/AsyncSearch/index.js +69 -81
- package/es/banks/components/Bank/presenter.js +67 -79
- package/es/banks/components/Bank/styles.js +2 -2
- package/es/banks/components/BankEntriesList/presenter.js +11 -23
- package/es/banks/components/BankEntry/presenter.js +74 -88
- package/es/banks/components/BankEntry/styles.js +2 -2
- package/es/banks/components/BankEntryRow/presenter.js +41 -55
- package/es/banks/components/BankSearch/presenter.js +14 -26
- package/es/banks/components/Banks/presenter.js +90 -102
- package/es/banks/components/BanksList/presenter.js +62 -74
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +70 -82
- package/es/banks/components/CreateBankModal/presenter.js +31 -43
- package/es/banks/components/EditBankModal/presenter.js +25 -37
- package/es/banks/components/HeaderBreadCrumb/index.js +7 -19
- package/es/banks/components/HeaderMenu/presenter.js +2 -14
- package/es/banks/components/NavWrapper/presenter.js +9 -21
- package/es/banks/components/NavWrapper/styles.js +2 -2
- package/es/banks/components/SharingModal/ContextualIconButton/index.js +10 -22
- package/es/banks/components/SharingModal/RootAccountSharing.js +7 -19
- package/es/banks/components/SharingModal/ShareList/index.js +17 -29
- package/es/banks/components/SharingModal/presenter.js +108 -120
- package/es/building/api/quizEntries.js +2 -2
- package/es/building/components/layout/Sidebar/Sidebar.examples.js +9 -21
- package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +2 -14
- package/es/building/components/layout/Sidebar/Stimulus/presenter.js +2 -14
- package/es/building/components/layout/Sidebar/presenter.js +28 -40
- package/es/building/components/layout/Sidebar/styles.js +2 -2
- package/es/building/components/layout/header/BuildingButtons/presenter.js +23 -35
- package/es/building/components/layout/header/BuildingButtons/styles.js +2 -2
- package/es/building/components/resources/ActionButtons/presenter.js +16 -28
- package/es/building/components/resources/ActionButtons/styles.js +2 -2
- package/es/building/components/resources/AddToBankOptions/index.js +16 -28
- package/es/building/components/resources/BanksTray/presenter.js +21 -33
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +50 -62
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +16 -28
- package/es/building/components/resources/MoveImmutableModal/presenter.js +16 -28
- package/es/building/components/resources/quiz/editButton/EditButton.js +9 -21
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +2 -14
- package/es/building/components/resources/quiz/instructions/Instructions/presenter.js +25 -37
- package/es/building/components/resources/quiz/instructions/Show/index.js +7 -19
- package/es/building/components/resources/quiz/title/Edit/index.js +26 -38
- package/es/building/components/resources/quiz/title/Show/index.js +7 -19
- package/es/building/components/resources/quiz/title/Title/presenter.js +25 -37
- package/es/building/components/resources/quiz/title/Title/styles.js +2 -2
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +47 -59
- package/es/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +2 -14
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +43 -55
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +2 -14
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +31 -43
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +2 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +51 -63
- package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +100 -112
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +38 -50
- package/es/building/components/resources/quizEntry/QuizEntryShow/styles.js +2 -2
- package/es/common/api/callHandlers.js +2 -2
- package/es/common/components/AccessCodeTextInput/index.js +8 -20
- package/es/common/components/ConfirmationModal/index.js +2 -2
- package/es/common/components/ConfirmationModal/presenter.js +28 -40
- package/es/common/components/ImportModal/ImportFileSelector/index.js +2 -14
- package/es/common/components/ImportModal/presenter.js +46 -58
- package/es/common/components/LearnosityCalculator/index.js +10 -22
- package/es/common/components/MaskedTextInput/index.js +4 -16
- package/es/common/components/Pin/presenter.js +7 -19
- package/es/common/components/PreviewFrame/index.js +2 -14
- package/es/common/components/PrintFontSizeModal/presenter.js +14 -26
- package/es/common/components/RceConfigProvider/presenter.js +2 -2
- package/es/common/components/SDKApp/index.js +9 -21
- package/es/common/components/alerts/presenter.js +10 -22
- package/es/common/components/layout/Page/index.js +2 -14
- package/es/common/components/layout/Page/styles.js +2 -2
- package/es/common/components/layout/header/Calculator/presenter.js +2 -14
- package/es/common/components/layout/header/HeaderMenuButton/presenter.js +10 -22
- package/es/common/components/layout/header/Timer/presenter.js +17 -29
- package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +2 -14
- package/es/common/components/layout/navbar/index.js +28 -40
- package/es/common/components/layout/navbar/styles.js +2 -2
- package/es/common/components/layout/sidebar/PositionSummary/index.js +4 -16
- package/es/common/components/layout/sidebar/Sidebar/Pin.js +7 -19
- package/es/common/components/layout/sidebar/Sidebar/index.js +24 -36
- package/es/common/components/layout/sidebar/Sidebar/styles.js +2 -2
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +8 -20
- package/es/common/components/layout/sidebar/SidebarItem/styles.js +2 -2
- package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +12 -24
- package/es/common/components/layout/sidebar/Stimulus/Collection/styles.js +2 -2
- package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +10 -22
- package/es/common/components/layout/sidebar/Stimulus/Title/index.js +2 -14
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +7 -19
- package/es/common/components/resources/BankSelection/presenter.js +16 -28
- package/es/common/components/resources/WarningWrapper/index.js +8 -20
- package/es/common/components/resources/entry/EntrySave/presenter.js +25 -37
- package/es/common/components/resources/item/ItemEdit/presenter.js +15 -27
- package/es/common/components/resources/item/ItemOverride/presenter.js +9 -21
- package/es/common/components/resources/item/ItemShow/index.js +2 -14
- package/es/common/components/resources/positionBox/PositionBox.js +2 -14
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +35 -47
- package/es/common/components/resources/quiz/AddContent/Button/index.js +7 -19
- package/es/common/components/resources/quiz/AddContent/Button/styles.js +2 -2
- package/es/common/components/resources/quiz/AddContent/Modal/presenter.js +2 -14
- package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +33 -45
- package/es/common/components/resources/quiz/info/QuizInfo.js +2 -14
- package/es/common/components/resources/quiz/instructions/Instructions.js +2 -14
- package/es/common/components/resources/quiz/title/Title.js +2 -14
- package/es/common/components/resources/quizSessionResult/Header/index.js +9 -21
- package/es/common/components/resources/quizSessionResult/Info/index.js +7 -19
- package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +7 -19
- package/es/common/components/resources/sessionItemResult/ResultStimulus/styles.js +2 -2
- package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +6 -18
- package/es/common/components/resources/sessionItemResult/SessionItemResult/styles.js +2 -2
- package/es/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +11 -23
- package/es/common/components/resources/stimulus/Stimulus/presenter.js +20 -32
- package/es/common/components/resources/stimulus/Stimulus/styles.js +2 -2
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +90 -102
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +18 -29
- package/es/common/components/resources/stimulus/StimulusShow/index.js +7 -19
- package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +2 -14
- package/es/common/components/shared/Card/CardContent/index.js +4 -16
- package/es/common/components/shared/Card/CardWrapper/index.js +4 -16
- package/es/common/components/shared/ExpandButton/index.js +2 -14
- package/es/common/components/shared/ExpandButton/styles.js +2 -2
- package/es/common/components/shared/FormattedDuration/index.js +4 -16
- package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +49 -61
- package/es/common/components/shared/IfFeature/presenter.js +2 -14
- package/es/common/components/shared/InteractionTypes/presenter.js +26 -38
- package/es/common/components/shared/PaginatedCollection/presenter.js +7 -19
- package/es/common/components/shared/Paginator/index.js +5 -17
- package/es/common/components/shared/PrintTrigger/presenter.js +31 -43
- package/es/common/components/shared/TagDisplay/index.js +2 -14
- package/es/common/components/shared/TagSelect/presenter.js +43 -55
- package/es/common/components/shared/TagSuggestSelect/presenter.js +18 -30
- package/es/common/components/shared/TagWrapper/presenter.js +7 -19
- package/es/common/components/shared/TimeUnitsInput/index.js +41 -53
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +6 -18
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +2 -2
- package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +19 -31
- package/es/common/components/shared/file_selector/FileSelector.js +6 -18
- package/es/common/components/shared/functionality/componentWithOutsideClick.js +13 -24
- package/es/common/components/shared/functionality/componentWithOutsideClickEmotion.js +6 -18
- package/es/common/components/shared/functionality/makeEditable.js +11 -23
- package/es/common/components/shared/functionality/makeScrollable.js +13 -25
- package/es/common/components/shared/overlay/index.js +2 -14
- package/es/common/components/shared/return_button/ReturnButton.js +2 -14
- package/es/common/components/shared/spinner/Spinner.js +9 -21
- package/es/common/kinesis/StreamQueue.js +2 -2
- package/es/common/records/Alert.js +2 -14
- package/es/common/records/Bank.js +2 -14
- package/es/common/records/BankEntry.js +19 -17
- package/es/common/records/Item.js +2 -14
- package/es/common/records/ItemAnalysis.js +2 -14
- package/es/common/records/QtiImport.js +2 -14
- package/es/common/records/Quiz.js +9 -20
- package/es/common/records/QuizAnalysis.js +2 -14
- package/es/common/records/QuizEntry.js +25 -36
- package/es/common/records/QuizSession.js +2 -14
- package/es/common/records/QuizSessionEvent.js +2 -14
- package/es/common/records/QuizSessionResult.js +2 -14
- package/es/common/records/Response.js +2 -14
- package/es/common/records/SessionItem.js +5 -17
- package/es/common/records/SessionItemResult.js +2 -14
- package/es/common/records/Stimulus.js +2 -14
- package/es/common/records/baseRecord.js +4 -16
- package/es/common/records/reduxRecord.js +2 -14
- package/es/common/reducers/modifications.js +2 -2
- package/es/common/util/ExhaustivePaginatedFetcher.js +12 -23
- package/es/common/util/Fetcher.js +2 -2
- package/es/common/util/PaginatedFetcher.js +13 -24
- package/es/common/util/ThunkQueue.js +3 -3
- package/es/common/util/jsonify.js +2 -2
- package/es/common/util/localStoreService.js +43 -0
- package/es/common/util/warningHelpers.js +2 -7
- package/es/common/util/withDynamoPagination.js +8 -20
- package/es/configureStore.js +18 -10
- package/es/index.js +1 -0
- package/es/messages/StorageExhaustionError.js +6 -18
- package/es/messages/postMessageService.js +2 -2
- package/es/moderating/components/events/Event.js +2 -14
- package/es/moderating/components/events/PageBlurredEvent.js +2 -14
- package/es/moderating/components/events/PageFocusedEvent.js +2 -14
- package/es/moderating/components/events/RCEEvent.js +2 -14
- package/es/moderating/components/events/ResponseEvent.js +5 -17
- package/es/moderating/components/events/SessionStartEvent.js +2 -14
- package/es/moderating/components/events/SessionSubmitEvent.js +2 -14
- package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +8 -20
- package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +18 -30
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +21 -33
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +22 -34
- package/es/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +12 -24
- package/es/moderating/components/resources/AccommodationsModal/index.js +34 -46
- package/es/moderating/components/resources/ElapsedTime.js +2 -14
- package/es/moderating/components/resources/ModerateTable/presenter.js +66 -78
- package/es/moderating/components/resources/ModerateTable/styles.js +2 -2
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +33 -45
- package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +30 -42
- package/es/moderating/components/sidebar/ModerateTray/presenter.js +40 -52
- package/es/moderating/components/sidebar/ResetQuiz/presenter.js +15 -27
- package/es/reporting/components/Caption/index.js +2 -14
- package/es/reporting/components/MetricsListItem/index.js +4 -16
- package/es/reporting/components/charts/CentileDistribution/presenter.js +16 -28
- package/es/reporting/components/charts/Distribution/presenter.js +23 -35
- package/es/reporting/components/charts/Legend/index.js +6 -18
- package/es/reporting/components/charts/Legend/styles.js +2 -2
- package/es/reporting/components/charts/QuintileDistribution/presenter.js +19 -31
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +10 -22
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +21 -33
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +8 -20
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +2 -14
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +2 -14
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +9 -21
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +9 -21
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +24 -36
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +7 -19
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +13 -25
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +9 -21
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +34 -46
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +15 -27
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +16 -28
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +47 -59
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +29 -41
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +16 -28
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +13 -25
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +9 -21
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +30 -42
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +15 -27
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +11 -23
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +40 -52
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +53 -65
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +22 -34
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +22 -34
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +2 -14
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +51 -63
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +24 -36
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +46 -58
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +8 -20
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +62 -74
- package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +2 -14
- package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +22 -34
- package/es/reporting/components/resources/ReportCard/index.js +2 -14
- package/es/reporting/components/resources/ReportList/index.js +2 -14
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +45 -57
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/styles.js +2 -2
- package/es/reporting/components/resources/common/AnalysisUpdateDate/index.js +2 -14
- package/lib/banks/api/banks.js +2 -2
- package/lib/banks/components/AddBankEntryModal/index.js +2 -2
- package/lib/banks/components/AddBankEntryModal/presenter.js +19 -31
- package/lib/banks/components/AddToBankModal/index.js +2 -2
- package/lib/banks/components/AddToBankModal/presenter.js +34 -46
- package/lib/banks/components/AsyncSearch/index.js +71 -83
- package/lib/banks/components/Bank/index.js +2 -2
- package/lib/banks/components/Bank/presenter.js +69 -81
- package/lib/banks/components/Bank/styles.js +2 -2
- package/lib/banks/components/BankEntriesList/presenter.js +11 -23
- package/lib/banks/components/BankEntry/presenter.js +74 -88
- package/lib/banks/components/BankEntry/styles.js +2 -2
- package/lib/banks/components/BankEntryRow/index.js +2 -2
- package/lib/banks/components/BankEntryRow/presenter.js +43 -57
- package/lib/banks/components/BankSearch/presenter.js +14 -26
- package/lib/banks/components/Banks/index.js +2 -2
- package/lib/banks/components/Banks/presenter.js +92 -104
- package/lib/banks/components/BanksList/presenter.js +64 -76
- package/lib/banks/components/CopyMoveBankEntryModal/index.js +2 -2
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +72 -84
- package/lib/banks/components/CreateBankModal/index.js +2 -2
- package/lib/banks/components/CreateBankModal/presenter.js +33 -45
- package/lib/banks/components/EditBankModal/index.js +2 -2
- package/lib/banks/components/EditBankModal/presenter.js +27 -39
- package/lib/banks/components/HeaderBreadCrumb/index.js +9 -21
- package/lib/banks/components/HeaderMenu/index.js +2 -2
- package/lib/banks/components/HeaderMenu/presenter.js +2 -14
- package/lib/banks/components/NavWrapper/presenter.js +9 -21
- package/lib/banks/components/NavWrapper/styles.js +2 -2
- package/lib/banks/components/SharingModal/ContextualIconButton/index.js +12 -24
- package/lib/banks/components/SharingModal/RootAccountSharing.js +9 -21
- package/lib/banks/components/SharingModal/ShareList/index.js +17 -29
- package/lib/banks/components/SharingModal/presenter.js +110 -122
- package/lib/building/api/quizEntries.js +2 -2
- package/lib/building/components/layout/Sidebar/Sidebar.examples.js +9 -21
- package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +2 -14
- package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +2 -14
- package/lib/building/components/layout/Sidebar/presenter.js +28 -40
- package/lib/building/components/layout/Sidebar/styles.js +2 -2
- package/lib/building/components/layout/header/BuildingButtons/index.js +2 -2
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +23 -35
- package/lib/building/components/layout/header/BuildingButtons/styles.js +2 -2
- package/lib/building/components/resources/ActionButtons/presenter.js +16 -28
- package/lib/building/components/resources/ActionButtons/styles.js +2 -2
- package/lib/building/components/resources/AddToBankOptions/index.js +16 -28
- package/lib/building/components/resources/BanksTray/presenter.js +23 -35
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +52 -64
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +16 -28
- package/lib/building/components/resources/MoveImmutableModal/presenter.js +18 -30
- package/lib/building/components/resources/quiz/editButton/EditButton.js +11 -23
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +2 -14
- package/lib/building/components/resources/quiz/instructions/Instructions/presenter.js +25 -37
- package/lib/building/components/resources/quiz/instructions/Show/index.js +7 -19
- package/lib/building/components/resources/quiz/title/Edit/index.js +28 -40
- package/lib/building/components/resources/quiz/title/Show/index.js +7 -19
- package/lib/building/components/resources/quiz/title/Title/presenter.js +25 -37
- package/lib/building/components/resources/quiz/title/Title/styles.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +47 -59
- package/lib/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +2 -14
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +43 -55
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +2 -14
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +31 -43
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +51 -63
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/index.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +102 -114
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +38 -50
- package/lib/building/components/resources/quizEntry/QuizEntryShow/styles.js +2 -2
- package/lib/common/api/callHandlers.js +2 -2
- package/lib/common/components/AccessCodeTextInput/index.js +10 -22
- package/lib/common/components/ApiFeatureFlagInitializer/index.js +2 -2
- package/lib/common/components/ConfirmationModal/index.js +2 -2
- package/lib/common/components/ConfirmationModal/presenter.js +30 -42
- package/lib/common/components/ImportModal/ImportFileSelector/index.js +2 -14
- package/lib/common/components/ImportModal/presenter.js +46 -58
- package/lib/common/components/LearnosityCalculator/index.js +12 -24
- package/lib/common/components/MaskedTextInput/index.js +6 -18
- package/lib/common/components/Pin/presenter.js +9 -21
- package/lib/common/components/PreviewFrame/index.js +4 -16
- package/lib/common/components/PrintFontSizeModal/presenter.js +14 -26
- package/lib/common/components/RceConfigProvider/presenter.js +4 -4
- package/lib/common/components/SDKApp/index.js +9 -21
- package/lib/common/components/alerts/presenter.js +10 -22
- package/lib/common/components/layout/Page/index.js +2 -14
- package/lib/common/components/layout/Page/styles.js +2 -2
- package/lib/common/components/layout/header/Calculator/presenter.js +4 -16
- package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +10 -22
- package/lib/common/components/layout/header/Timer/presenter.js +19 -31
- package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +2 -14
- package/lib/common/components/layout/navbar/index.js +28 -40
- package/lib/common/components/layout/navbar/styles.js +2 -2
- package/lib/common/components/layout/sidebar/PositionSummary/index.js +4 -16
- package/lib/common/components/layout/sidebar/Sidebar/Pin.js +9 -21
- package/lib/common/components/layout/sidebar/Sidebar/index.js +24 -36
- package/lib/common/components/layout/sidebar/Sidebar/styles.js +2 -2
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +8 -20
- package/lib/common/components/layout/sidebar/SidebarItem/styles.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +12 -24
- package/lib/common/components/layout/sidebar/Stimulus/Collection/styles.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +10 -22
- package/lib/common/components/layout/sidebar/Stimulus/Title/index.js +2 -14
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +7 -19
- package/lib/common/components/resources/BankSelection/presenter.js +18 -30
- package/lib/common/components/resources/WarningWrapper/index.js +8 -20
- package/lib/common/components/resources/entry/EntrySave/presenter.js +27 -39
- package/lib/common/components/resources/item/ItemEdit/index.js +2 -2
- package/lib/common/components/resources/item/ItemEdit/presenter.js +17 -29
- package/lib/common/components/resources/item/ItemOverride/index.js +2 -2
- package/lib/common/components/resources/item/ItemOverride/presenter.js +11 -23
- package/lib/common/components/resources/item/ItemShow/index.js +4 -16
- package/lib/common/components/resources/positionBox/PositionBox.js +2 -14
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +35 -47
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +7 -19
- package/lib/common/components/resources/quiz/AddContent/Button/styles.js +2 -2
- package/lib/common/components/resources/quiz/AddContent/Modal/presenter.js +4 -16
- package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +33 -45
- package/lib/common/components/resources/quiz/info/QuizInfo.js +4 -16
- package/lib/common/components/resources/quiz/instructions/Instructions.js +2 -14
- package/lib/common/components/resources/quiz/title/Title.js +2 -14
- package/lib/common/components/resources/quizSessionResult/Header/index.js +9 -21
- package/lib/common/components/resources/quizSessionResult/Info/index.js +7 -19
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +7 -19
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/styles.js +2 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +6 -18
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/styles.js +2 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +11 -23
- package/lib/common/components/resources/stimulus/Stimulus/presenter.js +20 -32
- package/lib/common/components/resources/stimulus/Stimulus/styles.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEdit/index.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +90 -102
- package/lib/common/components/resources/stimulus/StimulusEditInfo/index.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +18 -29
- package/lib/common/components/resources/stimulus/StimulusShow/index.js +7 -19
- package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +4 -16
- package/lib/common/components/shared/Card/CardContent/index.js +4 -16
- package/lib/common/components/shared/Card/CardWrapper/index.js +4 -16
- package/lib/common/components/shared/ExpandButton/index.js +2 -14
- package/lib/common/components/shared/ExpandButton/styles.js +2 -2
- package/lib/common/components/shared/FormattedDuration/index.js +6 -18
- package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +51 -63
- package/lib/common/components/shared/IfFeature/presenter.js +2 -14
- package/lib/common/components/shared/InteractionTypes/presenter.js +26 -38
- package/lib/common/components/shared/PaginatedCollection/presenter.js +9 -21
- package/lib/common/components/shared/Paginator/index.js +5 -17
- package/lib/common/components/shared/PrintTrigger/index.js +2 -2
- package/lib/common/components/shared/PrintTrigger/presenter.js +33 -45
- package/lib/common/components/shared/TagDisplay/index.js +2 -14
- package/lib/common/components/shared/TagSelect/presenter.js +45 -57
- package/lib/common/components/shared/TagSuggestSelect/presenter.js +20 -32
- package/lib/common/components/shared/TagWrapper/presenter.js +9 -21
- package/lib/common/components/shared/TimeUnitsInput/index.js +43 -55
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +6 -18
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +2 -2
- package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +21 -33
- package/lib/common/components/shared/file_selector/FileSelector.js +6 -18
- package/lib/common/components/shared/functionality/componentWithOutsideClick.js +13 -24
- package/lib/common/components/shared/functionality/componentWithOutsideClickEmotion.js +6 -18
- package/lib/common/components/shared/functionality/makeEditable.js +13 -25
- package/lib/common/components/shared/functionality/makeScrollable.js +15 -27
- package/lib/common/components/shared/overlay/index.js +4 -16
- package/lib/common/components/shared/return_button/ReturnButton.js +4 -16
- package/lib/common/components/shared/spinner/Spinner.js +9 -21
- package/lib/common/kinesis/StreamQueue.js +2 -2
- package/lib/common/records/Alert.js +2 -14
- package/lib/common/records/Bank.js +2 -14
- package/lib/common/records/BankEntry.js +19 -17
- package/lib/common/records/Item.js +2 -14
- package/lib/common/records/ItemAnalysis.js +2 -14
- package/lib/common/records/QtiImport.js +2 -14
- package/lib/common/records/Quiz.js +9 -20
- package/lib/common/records/QuizAnalysis.js +2 -14
- package/lib/common/records/QuizEntry.js +27 -38
- package/lib/common/records/QuizSession.js +2 -14
- package/lib/common/records/QuizSessionEvent.js +2 -14
- package/lib/common/records/QuizSessionResult.js +2 -14
- package/lib/common/records/Response.js +2 -14
- package/lib/common/records/SessionItem.js +5 -17
- package/lib/common/records/SessionItemResult.js +2 -14
- package/lib/common/records/Stimulus.js +2 -14
- package/lib/common/records/baseRecord.js +4 -16
- package/lib/common/records/reduxRecord.js +2 -14
- package/lib/common/reducers/modifications.js +2 -2
- package/lib/common/util/ExhaustivePaginatedFetcher.js +12 -23
- package/lib/common/util/Fetcher.js +2 -2
- package/lib/common/util/PaginatedFetcher.js +13 -24
- package/lib/common/util/ThunkQueue.js +3 -3
- package/lib/common/util/componentForItem.js +2 -2
- package/lib/common/util/interactionTypeRecordForItem.js +2 -2
- package/lib/common/util/jsonify.js +2 -2
- package/lib/common/util/localStoreService.js +50 -0
- package/lib/common/util/warningHelpers.js +2 -7
- package/lib/common/util/withDynamoPagination.js +8 -20
- package/lib/configureStore.js +18 -10
- package/lib/index.js +10 -2
- package/lib/messages/StorageExhaustionError.js +6 -18
- package/lib/messages/postMessageService.js +2 -2
- package/lib/moderating/components/events/Event.js +4 -16
- package/lib/moderating/components/events/PageBlurredEvent.js +4 -16
- package/lib/moderating/components/events/PageFocusedEvent.js +4 -16
- package/lib/moderating/components/events/RCEEvent.js +4 -16
- package/lib/moderating/components/events/ResponseEvent.js +7 -19
- package/lib/moderating/components/events/SessionStartEvent.js +4 -16
- package/lib/moderating/components/events/SessionSubmitEvent.js +4 -16
- package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +10 -22
- package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +20 -32
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +23 -35
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +24 -36
- package/lib/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +14 -26
- package/lib/moderating/components/resources/AccommodationsModal/index.js +36 -48
- package/lib/moderating/components/resources/ElapsedTime.js +4 -16
- package/lib/moderating/components/resources/ModerateTable/presenter.js +66 -78
- package/lib/moderating/components/resources/ModerateTable/styles.js +2 -2
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +35 -47
- package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +32 -44
- package/lib/moderating/components/sidebar/ModerateTray/presenter.js +42 -54
- package/lib/moderating/components/sidebar/ResetQuiz/presenter.js +17 -29
- package/lib/reporting/components/Caption/index.js +2 -14
- package/lib/reporting/components/MetricsListItem/index.js +4 -16
- package/lib/reporting/components/charts/CentileDistribution/presenter.js +16 -28
- package/lib/reporting/components/charts/Distribution/presenter.js +23 -35
- package/lib/reporting/components/charts/Legend/index.js +6 -18
- package/lib/reporting/components/charts/Legend/styles.js +2 -2
- package/lib/reporting/components/charts/QuintileDistribution/presenter.js +19 -31
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +10 -22
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +23 -35
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +10 -22
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +2 -14
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +2 -14
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +11 -23
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +11 -23
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +24 -36
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +7 -19
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +15 -27
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +11 -23
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +34 -46
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +17 -29
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +18 -30
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +47 -59
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +29 -41
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +18 -30
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +13 -25
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +11 -23
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +32 -44
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +17 -29
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +11 -23
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +40 -52
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +53 -65
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +22 -34
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +22 -34
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +2 -14
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +51 -63
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +24 -36
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +46 -58
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +10 -22
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +64 -76
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +2 -2
- package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +4 -16
- package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +22 -34
- package/lib/reporting/components/resources/ReportCard/index.js +2 -14
- package/lib/reporting/components/resources/ReportList/index.js +2 -14
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +47 -59
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/styles.js +2 -2
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +2 -2
- package/lib/reporting/components/resources/common/AnalysisUpdateDate/index.js +4 -16
- package/lib/taking/api/taking.js +2 -2
- package/package.json +8 -8
|
@@ -7,20 +7,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
8
|
var _dec, _class, _Bank;
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
|
-
function _callSuper(
|
|
11
|
-
|
|
12
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
13
|
-
if (Reflect.construct.sham) return false;
|
|
14
|
-
if (typeof Proxy === "function") return true;
|
|
15
|
-
try {
|
|
16
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
17
|
-
} catch (e) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
derived = _getPrototypeOf(derived);
|
|
22
|
-
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
23
|
-
}
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
12
|
/** @jsx jsx */
|
|
25
13
|
import { Component } from 'react';
|
|
26
14
|
import * as immutable from 'immutable';
|
|
@@ -53,60 +41,60 @@ import generateStyle from './styles';
|
|
|
53
41
|
import generateComponentTheme from './theme';
|
|
54
42
|
export var Bank = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_Bank = /*#__PURE__*/function (_Component) {
|
|
55
43
|
function Bank() {
|
|
56
|
-
var
|
|
44
|
+
var _this;
|
|
57
45
|
_classCallCheck(this, Bank);
|
|
58
46
|
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
59
47
|
_args[_key] = arguments[_key];
|
|
60
48
|
}
|
|
61
|
-
|
|
62
|
-
_defineProperty(
|
|
49
|
+
_this = _callSuper(this, Bank, [].concat(_args));
|
|
50
|
+
_defineProperty(_this, "state", {
|
|
63
51
|
sharedWithCourse: false,
|
|
64
52
|
shareWithCourseCheckboxDisabled: true
|
|
65
53
|
});
|
|
66
|
-
_defineProperty(
|
|
67
|
-
|
|
68
|
-
modalTrigger:
|
|
54
|
+
_defineProperty(_this, "openAddBankEntryModal", function () {
|
|
55
|
+
_this.props.openModal(ADD_BANK_ENTRY_MODAL, {
|
|
56
|
+
modalTrigger: _this.createBankEntryButton
|
|
69
57
|
});
|
|
70
58
|
});
|
|
71
|
-
_defineProperty(
|
|
72
|
-
if (!
|
|
59
|
+
_defineProperty(_this, "renderHeaderMenu", function () {
|
|
60
|
+
if (!_this.props.isCompact) {
|
|
73
61
|
return jsx(HeaderMenu, {
|
|
74
|
-
bank:
|
|
75
|
-
iceTopNavBarEnabled:
|
|
62
|
+
bank: _this.props.bank,
|
|
63
|
+
iceTopNavBarEnabled: _this.props.iceTopNavBarEnabled,
|
|
76
64
|
id: "BankMenu",
|
|
77
65
|
renderIcon: jsx(IconMoreSolid, null)
|
|
78
66
|
});
|
|
79
67
|
}
|
|
80
68
|
});
|
|
81
|
-
_defineProperty(
|
|
82
|
-
|
|
69
|
+
_defineProperty(_this, "storeCreateBankEntryButtonRef", function (c) {
|
|
70
|
+
_this.createBankEntryButton = c;
|
|
83
71
|
});
|
|
84
|
-
_defineProperty(
|
|
72
|
+
_defineProperty(_this, "renderBankBreadCrumbLink", function () {
|
|
85
73
|
return jsx(BreadcrumbLink, {
|
|
86
74
|
key: "bank"
|
|
87
|
-
},
|
|
75
|
+
}, _this.props.bank.title);
|
|
88
76
|
});
|
|
89
|
-
_defineProperty(
|
|
77
|
+
_defineProperty(_this, "toggleCheckbox", function () {
|
|
90
78
|
// disable until request resolves
|
|
91
|
-
|
|
79
|
+
_this.setState({
|
|
92
80
|
shareWithCourseCheckboxDisabled: true
|
|
93
81
|
});
|
|
94
|
-
|
|
82
|
+
_this.changeSharedPermissions();
|
|
95
83
|
});
|
|
96
|
-
_defineProperty(
|
|
84
|
+
_defineProperty(_this, "unshareBankWithCourse", /*#__PURE__*/function () {
|
|
97
85
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(sharedBank) {
|
|
98
|
-
var
|
|
86
|
+
var _this$props, updateSharedBankPermission, bankId, getSharedBank, scope;
|
|
99
87
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
100
88
|
while (1) switch (_context.prev = _context.next) {
|
|
101
89
|
case 0:
|
|
102
|
-
|
|
90
|
+
_this$props = _this.props, updateSharedBankPermission = _this$props.updateSharedBankPermission, bankId = _this$props.bankId, getSharedBank = _this$props.getSharedBank, scope = _this$props.scope;
|
|
103
91
|
_context.next = 3;
|
|
104
92
|
return updateSharedBankPermission(bankId, sharedBank.get('id'), REMOVED_ACCESS);
|
|
105
93
|
case 3:
|
|
106
94
|
getSharedBank(bankId, scope.type, scope.uuid)["catch"](function (err) {
|
|
107
95
|
// make sure the user still has access to the bank
|
|
108
96
|
if (err.response.status === 401) {
|
|
109
|
-
|
|
97
|
+
_this.props.navigateToBanks();
|
|
110
98
|
}
|
|
111
99
|
});
|
|
112
100
|
case 4:
|
|
@@ -119,48 +107,48 @@ export var Bank = (_dec = withStyleOverrides(generateStyle, generateComponentThe
|
|
|
119
107
|
return _ref.apply(this, arguments);
|
|
120
108
|
};
|
|
121
109
|
}());
|
|
122
|
-
_defineProperty(
|
|
110
|
+
_defineProperty(_this, "translatedPermissionLevel", function (permission) {
|
|
123
111
|
return _defineProperty(_defineProperty({}, CAN_EDIT, t('edit')), READ_ONLY, t('view'))[permission];
|
|
124
112
|
});
|
|
125
|
-
_defineProperty(
|
|
113
|
+
_defineProperty(_this, "confirmUnshareBankWithCourse", function () {
|
|
126
114
|
var confirmText = t('You are about to remove { accessLevel } access for { entityTitle } to this bank.', {
|
|
127
|
-
accessLevel:
|
|
128
|
-
entityTitle:
|
|
115
|
+
accessLevel: _this.translatedPermissionLevel(_this.props.courseSharedBank.get('permission')),
|
|
116
|
+
entityTitle: _this.props.scope.title
|
|
129
117
|
});
|
|
130
|
-
|
|
118
|
+
_this.props.withConfirm(partial(_this.unshareBankWithCourse, _this.props.courseSharedBank), {
|
|
131
119
|
title: t('Unshare Bank with Course'),
|
|
132
120
|
text: confirmText,
|
|
133
121
|
continueText: t('Confirm'),
|
|
134
|
-
onCancel:
|
|
122
|
+
onCancel: _this.onCancelUnshareBankWithCourse
|
|
135
123
|
});
|
|
136
124
|
});
|
|
137
|
-
_defineProperty(
|
|
138
|
-
|
|
125
|
+
_defineProperty(_this, "onCancelUnshareBankWithCourse", function () {
|
|
126
|
+
_this.setState({
|
|
139
127
|
shareWithCourseCheckboxDisabled: false
|
|
140
128
|
});
|
|
141
129
|
});
|
|
142
|
-
_defineProperty(
|
|
130
|
+
_defineProperty(_this, "addBankToQuiz", function () {
|
|
143
131
|
var newEntry = QuizEntry.create({
|
|
144
|
-
entryId:
|
|
132
|
+
entryId: _this.props.bankId,
|
|
145
133
|
entryType: 'Bank',
|
|
146
|
-
position:
|
|
147
|
-
stimulusQuizEntryId:
|
|
134
|
+
position: _this.props.position,
|
|
135
|
+
stimulusQuizEntryId: _this.props.stimulusId
|
|
148
136
|
});
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
_this.props.addEntryToQuiz(_this.props.activeQuizId, newEntry.entryId, newEntry.entryType, newEntry.getProperties(), false).then(function () {
|
|
138
|
+
_this.props.screenreaderNotification(t('Bank was successfully added to the quiz'));
|
|
151
139
|
});
|
|
152
140
|
});
|
|
153
|
-
_defineProperty(
|
|
141
|
+
_defineProperty(_this, "renderTopLeftMenu", function () {
|
|
154
142
|
return jsx("div", {
|
|
155
|
-
css:
|
|
156
|
-
},
|
|
143
|
+
css: _this.props.styles.topLeftMenu
|
|
144
|
+
}, _this.renderMultiAdd());
|
|
157
145
|
});
|
|
158
|
-
_defineProperty(
|
|
146
|
+
_defineProperty(_this, "renderTopRightMenu", function () {
|
|
159
147
|
return jsx("div", {
|
|
160
|
-
css:
|
|
161
|
-
},
|
|
148
|
+
css: _this.props.styles.topRightMenu
|
|
149
|
+
}, _this.renderNewBankEntryButton());
|
|
162
150
|
});
|
|
163
|
-
_defineProperty(
|
|
151
|
+
_defineProperty(_this, "announceResults", function (_ref2) {
|
|
164
152
|
var totalPages = _ref2.totalPages;
|
|
165
153
|
var message = t("{\n count, plural,\n =0 {No search results found}\n one {Displaying one page of results}\n other {Displaying # pages of results}\n }", {
|
|
166
154
|
count: totalPages
|
|
@@ -169,14 +157,14 @@ export var Bank = (_dec = withStyleOverrides(generateStyle, generateComponentThe
|
|
|
169
157
|
// We debounce using a larger interval for a11y, so that the user isn't
|
|
170
158
|
// flooded with "Search results ready" messages every time they type a
|
|
171
159
|
// character
|
|
172
|
-
|
|
160
|
+
_this.props.screenreaderNotification(message);
|
|
173
161
|
});
|
|
174
|
-
_defineProperty(
|
|
175
|
-
_defineProperty(
|
|
176
|
-
var
|
|
177
|
-
getBankEntries =
|
|
178
|
-
bankId =
|
|
179
|
-
useBankSearch =
|
|
162
|
+
_defineProperty(_this, "debouncedAnnounceResults", debounce(_this.announceResults, 1000));
|
|
163
|
+
_defineProperty(_this, "getPage", function (page, search) {
|
|
164
|
+
var _this$props2 = _this.props,
|
|
165
|
+
getBankEntries = _this$props2.getBankEntries,
|
|
166
|
+
bankId = _this$props2.bankId,
|
|
167
|
+
useBankSearch = _this$props2.useBankSearch;
|
|
180
168
|
var text = search.get('text');
|
|
181
169
|
var interactionTypes = search.get('interactionTypes', immutable.Set()).toJS();
|
|
182
170
|
var tagIds = search.get('tags', []).map(function (tag) {
|
|
@@ -194,28 +182,28 @@ export var Bank = (_dec = withStyleOverrides(generateStyle, generateComponentThe
|
|
|
194
182
|
var resultPage = getBankEntries(bankId, useBankSearch, params);
|
|
195
183
|
if (resultPage) {
|
|
196
184
|
return resultPage.then(function (results) {
|
|
197
|
-
|
|
185
|
+
_this.debouncedAnnounceResults(results);
|
|
198
186
|
return results;
|
|
199
187
|
});
|
|
200
188
|
} else {
|
|
201
189
|
return Promise.resolve(null);
|
|
202
190
|
}
|
|
203
191
|
});
|
|
204
|
-
_defineProperty(
|
|
205
|
-
var
|
|
206
|
-
return (
|
|
192
|
+
_defineProperty(_this, "getPageDebounced", debounceLatestPromise(function () {
|
|
193
|
+
var _this2;
|
|
194
|
+
return (_this2 = _this).getPage.apply(_this2, arguments);
|
|
207
195
|
}, 100));
|
|
208
|
-
_defineProperty(
|
|
209
|
-
var addEntryFunc =
|
|
196
|
+
_defineProperty(_this, "renderRecords", function (recordIds) {
|
|
197
|
+
var addEntryFunc = _this.props.isCompact && _this.props.addEntryToQuiz || null;
|
|
210
198
|
return jsx(BankEntriesList, {
|
|
211
199
|
addEntryToQuiz: addEntryFunc,
|
|
212
|
-
bank:
|
|
213
|
-
navigateToBankEntry:
|
|
200
|
+
bank: _this.props.bank,
|
|
201
|
+
navigateToBankEntry: _this.props.navigateToBankEntry,
|
|
214
202
|
recordIds: recordIds,
|
|
215
|
-
isQuizContentLocked:
|
|
203
|
+
isQuizContentLocked: _this.props.isQuizContentLocked
|
|
216
204
|
});
|
|
217
205
|
});
|
|
218
|
-
return
|
|
206
|
+
return _this;
|
|
219
207
|
}
|
|
220
208
|
_inherits(Bank, _Component);
|
|
221
209
|
return _createClass(Bank, [{
|
|
@@ -276,12 +264,12 @@ export var Bank = (_dec = withStyleOverrides(generateStyle, generateComponentThe
|
|
|
276
264
|
}, {
|
|
277
265
|
key: "renderNav",
|
|
278
266
|
value: function renderNav() {
|
|
279
|
-
var _this$
|
|
280
|
-
scope = _this$
|
|
281
|
-
closeTray = _this$
|
|
282
|
-
navigateToBanks = _this$
|
|
283
|
-
navigateToBuild = _this$
|
|
284
|
-
returnToUrl = _this$
|
|
267
|
+
var _this$props3 = this.props,
|
|
268
|
+
scope = _this$props3.scope,
|
|
269
|
+
closeTray = _this$props3.closeTray,
|
|
270
|
+
navigateToBanks = _this$props3.navigateToBanks,
|
|
271
|
+
navigateToBuild = _this$props3.navigateToBuild,
|
|
272
|
+
returnToUrl = _this$props3.returnToUrl;
|
|
285
273
|
var isScopeEmpty = !Object.keys(scope).length;
|
|
286
274
|
return jsx(NavWrapper, {
|
|
287
275
|
closeTray: closeTray,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
var generateStyle = function generateStyle(componentTheme) {
|
|
5
5
|
var menuStyles = {
|
|
6
6
|
display: 'flex',
|
|
@@ -5,20 +5,8 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
7
|
var _dec, _class, _BankEntriesList;
|
|
8
|
-
function _callSuper(
|
|
9
|
-
|
|
10
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
11
|
-
if (Reflect.construct.sham) return false;
|
|
12
|
-
if (typeof Proxy === "function") return true;
|
|
13
|
-
try {
|
|
14
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
15
|
-
} catch (e) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
derived = _getPrototypeOf(derived);
|
|
20
|
-
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
21
|
-
}
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
10
|
/** @jsx jsx */
|
|
23
11
|
import { Component } from 'react';
|
|
24
12
|
import PropTypes from 'prop-types';
|
|
@@ -31,26 +19,26 @@ import generateComponentTheme from './theme';
|
|
|
31
19
|
import { withStyleOverrides } from '@instructure/quiz-common';
|
|
32
20
|
export var BankEntriesList = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BankEntriesList = /*#__PURE__*/function (_Component) {
|
|
33
21
|
function BankEntriesList() {
|
|
34
|
-
var
|
|
22
|
+
var _this;
|
|
35
23
|
_classCallCheck(this, BankEntriesList);
|
|
36
24
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
25
|
args[_key] = arguments[_key];
|
|
38
26
|
}
|
|
39
|
-
|
|
40
|
-
_defineProperty(
|
|
27
|
+
_this = _callSuper(this, BankEntriesList, [].concat(args));
|
|
28
|
+
_defineProperty(_this, "renderEntry", function (entry) {
|
|
41
29
|
var entryId = entry.get('id');
|
|
42
30
|
return jsx(Card, {
|
|
43
31
|
key: entryId,
|
|
44
|
-
css:
|
|
32
|
+
css: _this.props.styles.entryRow
|
|
45
33
|
}, jsx(BankEntryRow, {
|
|
46
34
|
bankEntry: entry,
|
|
47
|
-
bank:
|
|
48
|
-
navigateToBankEntry:
|
|
49
|
-
addEntryToQuiz:
|
|
50
|
-
isQuizContentLocked:
|
|
35
|
+
bank: _this.props.bank,
|
|
36
|
+
navigateToBankEntry: _this.props.navigateToBankEntry,
|
|
37
|
+
addEntryToQuiz: _this.props.addEntryToQuiz,
|
|
38
|
+
isQuizContentLocked: _this.props.isQuizContentLocked
|
|
51
39
|
}));
|
|
52
40
|
});
|
|
53
|
-
return
|
|
41
|
+
return _this;
|
|
54
42
|
}
|
|
55
43
|
_inherits(BankEntriesList, _Component);
|
|
56
44
|
return _createClass(BankEntriesList, [{
|
|
@@ -7,20 +7,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
8
|
var _dec, _class, _BankEntry;
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
|
-
function _callSuper(
|
|
11
|
-
|
|
12
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
13
|
-
if (Reflect.construct.sham) return false;
|
|
14
|
-
if (typeof Proxy === "function") return true;
|
|
15
|
-
try {
|
|
16
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
17
|
-
} catch (e) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
derived = _getPrototypeOf(derived);
|
|
22
|
-
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
23
|
-
}
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
12
|
/** @jsx jsx */
|
|
25
13
|
import { Component } from 'react';
|
|
26
14
|
import ReactDOM from 'react-dom';
|
|
@@ -61,55 +49,55 @@ import generateStyle from './styles';
|
|
|
61
49
|
import generateComponentTheme from './theme';
|
|
62
50
|
export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_BankEntry = /*#__PURE__*/function (_Component) {
|
|
63
51
|
function BankEntry() {
|
|
64
|
-
var
|
|
52
|
+
var _this;
|
|
65
53
|
_classCallCheck(this, BankEntry);
|
|
66
54
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
67
55
|
args[_key] = arguments[_key];
|
|
68
56
|
}
|
|
69
|
-
|
|
70
|
-
_defineProperty(
|
|
57
|
+
_this = _callSuper(this, BankEntry, [].concat(args));
|
|
58
|
+
_defineProperty(_this, "state", {
|
|
71
59
|
validationErrorsFromApi: {}
|
|
72
60
|
});
|
|
73
|
-
_defineProperty(
|
|
74
|
-
|
|
61
|
+
_defineProperty(_this, "setNavToBankRef", function (node) {
|
|
62
|
+
_this.navToBankRef = node;
|
|
75
63
|
});
|
|
76
|
-
_defineProperty(
|
|
77
|
-
|
|
64
|
+
_defineProperty(_this, "navigateToBank", function () {
|
|
65
|
+
_this.props.navigateToBank(_this.props.bankId);
|
|
78
66
|
});
|
|
79
|
-
_defineProperty(
|
|
80
|
-
|
|
67
|
+
_defineProperty(_this, "handleTitleChange", function (e) {
|
|
68
|
+
_this.props.changeItemTitle(_this.props.entry.id, e.target.value);
|
|
81
69
|
});
|
|
82
|
-
_defineProperty(
|
|
70
|
+
_defineProperty(_this, "clearValidationErrorsFromApi", function (inputId) {
|
|
83
71
|
if (inputId === CLEAR_ALL_INPUT_VALIDATION_ERRORS) {
|
|
84
|
-
|
|
72
|
+
_this.setState({
|
|
85
73
|
validationErrorsFromApi: {}
|
|
86
74
|
});
|
|
87
75
|
}
|
|
88
|
-
if (
|
|
89
|
-
var newErrors = Object.assign({},
|
|
76
|
+
if (_this.state.validationErrorsFromApi[inputId]) {
|
|
77
|
+
var newErrors = Object.assign({}, _this.state.validationErrorsFromApi);
|
|
90
78
|
delete newErrors[inputId];
|
|
91
|
-
|
|
79
|
+
_this.setState({
|
|
92
80
|
validationErrorsFromApi: newErrors
|
|
93
81
|
});
|
|
94
82
|
}
|
|
95
83
|
});
|
|
96
|
-
_defineProperty(
|
|
84
|
+
_defineProperty(_this, "submitHandler", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
97
85
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
98
86
|
while (1) switch (_context.prev = _context.next) {
|
|
99
87
|
case 0:
|
|
100
88
|
_context.prev = 0;
|
|
101
|
-
if (!
|
|
89
|
+
if (!_this.props.entry.isTemporary()) {
|
|
102
90
|
_context.next = 6;
|
|
103
91
|
break;
|
|
104
92
|
}
|
|
105
93
|
_context.next = 4;
|
|
106
|
-
return
|
|
94
|
+
return _this.temporarySubmit();
|
|
107
95
|
case 4:
|
|
108
96
|
_context.next = 8;
|
|
109
97
|
break;
|
|
110
98
|
case 6:
|
|
111
99
|
_context.next = 8;
|
|
112
|
-
return
|
|
100
|
+
return _this.normalSubmit();
|
|
113
101
|
case 8:
|
|
114
102
|
_context.next = 16;
|
|
115
103
|
break;
|
|
@@ -120,7 +108,7 @@ export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
120
108
|
_context.next = 15;
|
|
121
109
|
break;
|
|
122
110
|
}
|
|
123
|
-
|
|
111
|
+
_this.setState({
|
|
124
112
|
validationErrorsFromApi: _context.t0.validationErrorsFromApi
|
|
125
113
|
});
|
|
126
114
|
// Throwing an error here would cause an alert banner to show,
|
|
@@ -129,82 +117,82 @@ export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
129
117
|
case 15:
|
|
130
118
|
throw _context.t0;
|
|
131
119
|
case 16:
|
|
132
|
-
|
|
120
|
+
_this.navigateToBank();
|
|
133
121
|
case 17:
|
|
134
122
|
case "end":
|
|
135
123
|
return _context.stop();
|
|
136
124
|
}
|
|
137
125
|
}, _callee, null, [[0, 10]]);
|
|
138
126
|
})));
|
|
139
|
-
_defineProperty(
|
|
140
|
-
|
|
127
|
+
_defineProperty(_this, "handleRef", function (node) {
|
|
128
|
+
_this.itemEditArea = node;
|
|
141
129
|
});
|
|
142
|
-
_defineProperty(
|
|
143
|
-
|
|
144
|
-
if (!
|
|
145
|
-
if (
|
|
146
|
-
|
|
130
|
+
_defineProperty(_this, "clearChanges", function () {
|
|
131
|
+
_this.clearValidationErrorsFromApi(CLEAR_ALL_INPUT_VALIDATION_ERRORS);
|
|
132
|
+
if (!_this.props.entry) return;
|
|
133
|
+
if (_this.props.entry.isTemporary()) {
|
|
134
|
+
_this.props.clearTemporaryBankItem(_this.props.bankId);
|
|
147
135
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
136
|
+
_this.props.clearModifications('items', _this.props.entry.id);
|
|
137
|
+
_this.props.setPendingDeletionTagAssociations(_this.props.bankEntry.entryType, _this.props.entry.id, []);
|
|
138
|
+
_this.props.setPendingAdditionTagAssociations(_this.props.bankEntry.entryType, _this.props.entry.id, []);
|
|
151
139
|
});
|
|
152
|
-
_defineProperty(
|
|
153
|
-
|
|
140
|
+
_defineProperty(_this, "handlePointsChange", function (points) {
|
|
141
|
+
_this.props.changeQuizEntryPoints(_this.props.entry.id, points);
|
|
154
142
|
});
|
|
155
|
-
_defineProperty(
|
|
143
|
+
_defineProperty(_this, "editProps", function (entry) {
|
|
156
144
|
return {
|
|
157
|
-
cancelHandler:
|
|
158
|
-
clearChanges:
|
|
159
|
-
clearValidationErrorsFromApi:
|
|
145
|
+
cancelHandler: _this.navigateToBank,
|
|
146
|
+
clearChanges: _this.clearChanges,
|
|
147
|
+
clearValidationErrorsFromApi: _this.clearValidationErrorsFromApi,
|
|
160
148
|
contextUuid: null,
|
|
161
149
|
entry: entry,
|
|
162
|
-
guid: "".concat(
|
|
163
|
-
handleQuizEntryPointsChange:
|
|
164
|
-
itemEditArea:
|
|
165
|
-
parentId:
|
|
150
|
+
guid: "".concat(_this.props.bankEntry.id, "_bank_entry_edit"),
|
|
151
|
+
handleQuizEntryPointsChange: _this.handlePointsChange,
|
|
152
|
+
itemEditArea: _this.itemEditArea,
|
|
153
|
+
parentId: _this.props.bankId,
|
|
166
154
|
parentType: PARENT_TYPE_BANK,
|
|
167
155
|
stimulus: entry,
|
|
168
|
-
submitHandler:
|
|
169
|
-
validationErrorsFromApi:
|
|
170
|
-
scope:
|
|
156
|
+
submitHandler: _this.submitHandler,
|
|
157
|
+
validationErrorsFromApi: _this.state.validationErrorsFromApi,
|
|
158
|
+
scope: _this.props.scope
|
|
171
159
|
};
|
|
172
160
|
});
|
|
173
|
-
_defineProperty(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
modalTrigger:
|
|
161
|
+
_defineProperty(_this, "openFeedbackModal", function () {
|
|
162
|
+
_this.props.setUi(ITEM_FEEDBACK_MODAL_ITEM, _this.props.entry.getWorkingInstance());
|
|
163
|
+
_this.props.setUi(ITEM_FEEDBACK_MODAL_FEEDBACK, _this.props.entry.getWorkingInstance().feedback);
|
|
164
|
+
_this.props.openModal(ITEM_FEEDBACK_MODAL, {
|
|
165
|
+
modalTrigger: _this.addFeedbackButton
|
|
178
166
|
});
|
|
179
167
|
});
|
|
180
|
-
_defineProperty(
|
|
181
|
-
|
|
168
|
+
_defineProperty(_this, "storeFeedbackButtonRef", function (button) {
|
|
169
|
+
_this.addFeedbackButton = button;
|
|
182
170
|
});
|
|
183
|
-
_defineProperty(
|
|
171
|
+
_defineProperty(_this, "compareTagValues", function (left, right) {
|
|
184
172
|
return left.tag_value === right.tag_value;
|
|
185
173
|
});
|
|
186
|
-
_defineProperty(
|
|
174
|
+
_defineProperty(_this, "tagToAssociation", function (_ref2) {
|
|
187
175
|
var value = _ref2.value;
|
|
188
176
|
return {
|
|
189
177
|
tag_value: value
|
|
190
178
|
};
|
|
191
179
|
});
|
|
192
|
-
_defineProperty(
|
|
193
|
-
var bankEntry =
|
|
194
|
-
var tagAssociations =
|
|
195
|
-
var associations = tags.map(
|
|
196
|
-
var removed = differenceWith(tagAssociations, associations,
|
|
197
|
-
var created = differenceWith(associations, tagAssociations,
|
|
180
|
+
_defineProperty(_this, "handleTagChange", function (tags) {
|
|
181
|
+
var bankEntry = _this.props.bankEntry;
|
|
182
|
+
var tagAssociations = _this.props.tagAssociations.toJS();
|
|
183
|
+
var associations = tags.map(_this.tagToAssociation);
|
|
184
|
+
var removed = differenceWith(tagAssociations, associations, _this.compareTagValues);
|
|
185
|
+
var created = differenceWith(associations, tagAssociations, _this.compareTagValues);
|
|
198
186
|
// If a tag that was removed is being re-added,
|
|
199
187
|
// remove from both addAssociations and deletedTags
|
|
200
|
-
var restored = intersectionWith(created, removed,
|
|
188
|
+
var restored = intersectionWith(created, removed, _this.compareTagValues);
|
|
201
189
|
var addOperations = differenceWith(created, restored, isEqual);
|
|
202
|
-
var deleteOperations = differenceWith(removed, restored,
|
|
203
|
-
var bankEntryId =
|
|
204
|
-
|
|
205
|
-
|
|
190
|
+
var deleteOperations = differenceWith(removed, restored, _this.compareTagValues);
|
|
191
|
+
var bankEntryId = _this.getBankEntryId(bankEntry);
|
|
192
|
+
_this.props.setPendingDeletionTagAssociations(bankEntry.entryType, bankEntryId, deleteOperations);
|
|
193
|
+
_this.props.setPendingAdditionTagAssociations(bankEntry.entryType, bankEntryId, addOperations);
|
|
206
194
|
});
|
|
207
|
-
return
|
|
195
|
+
return _this;
|
|
208
196
|
}
|
|
209
197
|
_inherits(BankEntry, _Component);
|
|
210
198
|
return _createClass(BankEntry, [{
|
|
@@ -251,16 +239,14 @@ export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
251
239
|
}, {
|
|
252
240
|
key: "isStimulusEntry",
|
|
253
241
|
value: function isStimulusEntry() {
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
return entry.isStimulus && !entry.isPassage;
|
|
242
|
+
var _this$props$bankEntry;
|
|
243
|
+
return (_this$props$bankEntry = this.props.bankEntry) === null || _this$props$bankEntry === void 0 ? void 0 : _this$props$bankEntry.isStimulusEntry;
|
|
257
244
|
}
|
|
258
245
|
}, {
|
|
259
246
|
key: "isPassageEntry",
|
|
260
247
|
value: function isPassageEntry() {
|
|
261
|
-
var
|
|
262
|
-
|
|
263
|
-
return entry.isStimulus && entry.isPassage;
|
|
248
|
+
var _this$props$bankEntry2;
|
|
249
|
+
return (_this$props$bankEntry2 = this.props.bankEntry) === null || _this$props$bankEntry2 === void 0 ? void 0 : _this$props$bankEntry2.isPassageEntry;
|
|
264
250
|
}
|
|
265
251
|
}, {
|
|
266
252
|
key: "getEditWarning",
|
|
@@ -617,14 +603,14 @@ export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
617
603
|
}, {
|
|
618
604
|
key: "renderEntry",
|
|
619
605
|
value: function renderEntry(entry) {
|
|
620
|
-
var
|
|
606
|
+
var _this2 = this;
|
|
621
607
|
if (!entry) return;
|
|
622
608
|
var _this$props3 = this.props,
|
|
623
609
|
bankEntry = _this$props3.bankEntry,
|
|
624
610
|
useBankTags = _this$props3.useBankTags;
|
|
625
611
|
var props = this.editProps(entry);
|
|
626
612
|
var propsFunc = this.isItemEntry() ? propsForItemVersioningWrapper : propsForStimulusVersioningWrapper;
|
|
627
|
-
var versioningProps = propsFunc(entry.isImmutable(), this.props.shouldClone, this.props.setShouldClone, this.navigateToBank, true);
|
|
613
|
+
var versioningProps = propsFunc(entry.isImmutable(), this.props.shouldClone, this.props.setShouldClone, this.navigateToBank, true, 'warning', this.isPassageEntry());
|
|
628
614
|
var canEdit = !entry.isImmutable() || this.props.shouldClone;
|
|
629
615
|
var ItemComponent = canEdit ? ItemEdit : ItemShow;
|
|
630
616
|
var StimulusComponent = canEdit ? StimulusEditInfo : StimulusShowInfo;
|
|
@@ -637,8 +623,8 @@ export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
637
623
|
noMatchText: t('Enter a tag to find or create'),
|
|
638
624
|
parentType: entryType,
|
|
639
625
|
parentId: entryId,
|
|
640
|
-
onChange:
|
|
641
|
-
tags:
|
|
626
|
+
onChange: _this2.handleTagChange,
|
|
627
|
+
tags: _this2.visibleTags()
|
|
642
628
|
});
|
|
643
629
|
};
|
|
644
630
|
var editWarning = this.getEditWarning();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
var generateStyle = function generateStyle(componentTheme) {
|
|
5
5
|
var footerStyles = {
|
|
6
6
|
display: 'flex',
|