@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
|
@@ -26,40 +26,28 @@ var _ContextualIconButton = require("../ContextualIconButton");
|
|
|
26
26
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
27
27
|
var _dec, _class, _ShareList;
|
|
28
28
|
/** @jsx jsx */
|
|
29
|
-
function _callSuper(
|
|
30
|
-
|
|
31
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
32
|
-
if (Reflect.construct.sham) return false;
|
|
33
|
-
if (typeof Proxy === "function") return true;
|
|
34
|
-
try {
|
|
35
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
36
|
-
} catch (e) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
41
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
42
|
-
}
|
|
29
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
30
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
43
31
|
var ShareList = exports.ShareList = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default"], null), _dec(_class = (_ShareList = /*#__PURE__*/function (_Component) {
|
|
44
32
|
function ShareList() {
|
|
45
|
-
var
|
|
33
|
+
var _this;
|
|
46
34
|
(0, _classCallCheck2["default"])(this, ShareList);
|
|
47
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
36
|
args[_key] = arguments[_key];
|
|
49
37
|
}
|
|
50
|
-
|
|
51
|
-
(0, _defineProperty2["default"])(
|
|
38
|
+
_this = _callSuper(this, ShareList, [].concat(args));
|
|
39
|
+
(0, _defineProperty2["default"])(_this, "handlePermissionChange", function (entity) {
|
|
52
40
|
return function (e, _ref) {
|
|
53
41
|
var value = _ref.value;
|
|
54
|
-
|
|
42
|
+
_this.props.onPermissionChange(entity, value);
|
|
55
43
|
};
|
|
56
44
|
});
|
|
57
|
-
(0, _defineProperty2["default"])(
|
|
45
|
+
(0, _defineProperty2["default"])(_this, "handleEntityRemove", function (e, _ref2) {
|
|
58
46
|
var entity = _ref2.entity,
|
|
59
47
|
isEntityRemoved = _ref2.isEntityRemoved;
|
|
60
|
-
|
|
48
|
+
_this.props.onEntityRemove(entity, isEntityRemoved);
|
|
61
49
|
});
|
|
62
|
-
(0, _defineProperty2["default"])(
|
|
50
|
+
(0, _defineProperty2["default"])(_this, "renderRemoveButton", function (entity, isEntityRemoved) {
|
|
63
51
|
var context = {
|
|
64
52
|
entity: entity,
|
|
65
53
|
isEntityRemoved: isEntityRemoved
|
|
@@ -67,7 +55,7 @@ var ShareList = exports.ShareList = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
67
55
|
return (0, _emotion.jsx)(_ContextualIconButton.ContextualIconButton, {
|
|
68
56
|
context: context,
|
|
69
57
|
"data-automation": "sdk-unshare-bank-entity-".concat(entity.get('entityId')),
|
|
70
|
-
onClick:
|
|
58
|
+
onClick: _this.handleEntityRemove,
|
|
71
59
|
renderIcon: isEntityRemoved ? _uiIcons.IconResetLine : _uiIcons.IconTrashLine,
|
|
72
60
|
screenReaderLabel: isEntityRemoved ? (0, _formatMessage["default"])('Undo remove for {entity}', {
|
|
73
61
|
entity: entity.get('title')
|
|
@@ -76,10 +64,10 @@ var ShareList = exports.ShareList = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
76
64
|
})
|
|
77
65
|
});
|
|
78
66
|
});
|
|
79
|
-
(0, _defineProperty2["default"])(
|
|
67
|
+
(0, _defineProperty2["default"])(_this, "renderEntity", function (entity) {
|
|
80
68
|
var isEntityRemoved = entity.get('permission') === _quizCommon.REMOVED_ACCESS;
|
|
81
69
|
var isCourse = entity.get('entityType') === _quizCommon.SHARED_WITH_COURSE;
|
|
82
|
-
var originalEntity =
|
|
70
|
+
var originalEntity = _this.props.sharedBanks.find(function (sb) {
|
|
83
71
|
return sb.get('id') == entity.get('id');
|
|
84
72
|
}) || (0, _immutable.Map)();
|
|
85
73
|
var originalPermission = originalEntity.get('permission', _quizCommon.READ_ONLY);
|
|
@@ -95,17 +83,17 @@ var ShareList = exports.ShareList = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
95
83
|
src: entity.get('avatar'),
|
|
96
84
|
size: "small"
|
|
97
85
|
})), (0, _emotion.jsx)(_uiGrid.Grid.Col, null, (0, _emotion.jsx)("span", {
|
|
98
|
-
css: isEntityRemoved ?
|
|
86
|
+
css: isEntityRemoved ? _this.props.styles.labelRemoved : null,
|
|
99
87
|
"data-automation": isEntityRemoved ? 'sdk-shared-entity-removed' : null
|
|
100
88
|
}, entity.get('title'))), (0, _emotion.jsx)(_uiGrid.Grid.Col, {
|
|
101
89
|
width: "auto"
|
|
102
90
|
}, (0, _emotion.jsx)(_quizCommon.SimpleSelect, {
|
|
103
|
-
onChange:
|
|
91
|
+
onChange: _this.handlePermissionChange(entity),
|
|
104
92
|
value: entity.get('permission') === _quizCommon.REMOVED_ACCESS ? originalPermission : entity.get('permission'),
|
|
105
93
|
renderLabel: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage["default"])('Access for {entity}', {
|
|
106
94
|
entity: entity.get('title')
|
|
107
95
|
})),
|
|
108
|
-
disabled: isEntityRemoved || !
|
|
96
|
+
disabled: isEntityRemoved || !_this.props.canEdit
|
|
109
97
|
}, (0, _emotion.jsx)(_quizCommon.SimpleSelect.Option, {
|
|
110
98
|
id: "share-list-select-option-can-view",
|
|
111
99
|
value: _quizCommon.READ_ONLY
|
|
@@ -114,9 +102,9 @@ var ShareList = exports.ShareList = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
114
102
|
value: _quizCommon.CAN_EDIT
|
|
115
103
|
}, (0, _formatMessage["default"])('Can edit')))), (0, _emotion.jsx)(_uiGrid.Grid.Col, {
|
|
116
104
|
width: "auto"
|
|
117
|
-
},
|
|
105
|
+
}, _this.props.canEdit && _this.renderRemoveButton(entity, isEntityRemoved)));
|
|
118
106
|
});
|
|
119
|
-
return
|
|
107
|
+
return _this;
|
|
120
108
|
}
|
|
121
109
|
(0, _inherits2["default"])(ShareList, _Component);
|
|
122
110
|
return (0, _createClass2["default"])(ShareList, [{
|
|
@@ -37,34 +37,22 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
37
37
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
38
38
|
var _dec, _class, _SharingModalPresenter;
|
|
39
39
|
/** @jsx jsx */
|
|
40
|
-
function _getRequireWildcardCache(
|
|
41
|
-
function _interopRequireWildcard(
|
|
42
|
-
function ownKeys(
|
|
43
|
-
function _objectSpread(
|
|
44
|
-
function _callSuper(
|
|
45
|
-
|
|
46
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
47
|
-
if (Reflect.construct.sham) return false;
|
|
48
|
-
if (typeof Proxy === "function") return true;
|
|
49
|
-
try {
|
|
50
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
51
|
-
} catch (e) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
56
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
57
|
-
}
|
|
40
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
41
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
42
|
+
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; }
|
|
43
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
44
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
45
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
58
46
|
var noop = function noop() {};
|
|
59
47
|
var SharingModalPresenter = exports.SharingModalPresenter = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default"], _theme["default"]), _dec(_class = (_SharingModalPresenter = /*#__PURE__*/function (_Component) {
|
|
60
48
|
function SharingModalPresenter() {
|
|
61
|
-
var
|
|
49
|
+
var _this;
|
|
62
50
|
(0, _classCallCheck2["default"])(this, SharingModalPresenter);
|
|
63
51
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
64
52
|
args[_key] = arguments[_key];
|
|
65
53
|
}
|
|
66
|
-
|
|
67
|
-
(0, _defineProperty2["default"])(
|
|
54
|
+
_this = _callSuper(this, SharingModalPresenter, [].concat(args));
|
|
55
|
+
(0, _defineProperty2["default"])(_this, "state", {
|
|
68
56
|
accountPermission: null,
|
|
69
57
|
shares: (0, _immutable.List)(),
|
|
70
58
|
newEntities: (0, _immutable.List)(),
|
|
@@ -73,57 +61,57 @@ var SharingModalPresenter = exports.SharingModalPresenter = (_dec = (0, _quizCom
|
|
|
73
61
|
entitiesWithChangedPermission: {},
|
|
74
62
|
selectedTabIndex: 0
|
|
75
63
|
});
|
|
76
|
-
(0, _defineProperty2["default"])(
|
|
77
|
-
(0, _defineProperty2["default"])(
|
|
64
|
+
(0, _defineProperty2["default"])(_this, "shareListRef", null);
|
|
65
|
+
(0, _defineProperty2["default"])(_this, "shareButtonRef", null);
|
|
78
66
|
// =============
|
|
79
67
|
// LIFECYCLE
|
|
80
68
|
// =============
|
|
81
|
-
(0, _defineProperty2["default"])(
|
|
82
|
-
var size =
|
|
83
|
-
if (size >= 0 && size !==
|
|
84
|
-
|
|
69
|
+
(0, _defineProperty2["default"])(_this, "checkForSharedBanks", function () {
|
|
70
|
+
var size = _this.props.sharedBanks.size;
|
|
71
|
+
if (size >= 0 && size !== _this.props.bank.sharedCount || size === 0) {
|
|
72
|
+
_this.props.getSharedBanks(_this.props.bank, _this.props.getUserInfo, _this.props.getCourseInfo, _this.props.getSubaccountInfo);
|
|
85
73
|
} else {
|
|
86
|
-
|
|
87
|
-
shares:
|
|
74
|
+
_this.setState({
|
|
75
|
+
shares: _this.props.sharedBanks
|
|
88
76
|
});
|
|
89
77
|
}
|
|
90
78
|
});
|
|
91
79
|
// =============
|
|
92
80
|
// HELPERS
|
|
93
81
|
// =============
|
|
94
|
-
(0, _defineProperty2["default"])(
|
|
82
|
+
(0, _defineProperty2["default"])(_this, "handleTabChange", function (event, _ref) {
|
|
95
83
|
var index = _ref.index;
|
|
96
|
-
|
|
84
|
+
_this.setState({
|
|
97
85
|
selectedTabIndex: index
|
|
98
86
|
});
|
|
99
87
|
});
|
|
100
|
-
(0, _defineProperty2["default"])(
|
|
88
|
+
(0, _defineProperty2["default"])(_this, "modalDismissCleanup", function () {
|
|
101
89
|
var focusCreateBank = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
102
|
-
|
|
103
|
-
if (
|
|
104
|
-
|
|
90
|
+
_this.props.onDismiss();
|
|
91
|
+
if (_this.props.modalTrigger && !focusCreateBank) {
|
|
92
|
+
_this.props.modalTrigger.focus();
|
|
105
93
|
} else {
|
|
106
|
-
setTimeout(
|
|
94
|
+
setTimeout(_this.props.focusCreateBankButton, 100);
|
|
107
95
|
}
|
|
108
96
|
// removes the creator's temporary sharedBank record
|
|
109
|
-
|
|
97
|
+
_this.props.removeSharedBank('-1');
|
|
110
98
|
});
|
|
111
|
-
(0, _defineProperty2["default"])(
|
|
112
|
-
var permissions = Object.values(
|
|
99
|
+
(0, _defineProperty2["default"])(_this, "numEntitiesToRemove", function () {
|
|
100
|
+
var permissions = Object.values(_this.state.entitiesWithChangedPermission);
|
|
113
101
|
return permissions.reduce(function (count, val) {
|
|
114
102
|
return val === _quizCommon.REMOVED_ACCESS ? count + 1 : count;
|
|
115
103
|
}, 0);
|
|
116
104
|
});
|
|
117
|
-
(0, _defineProperty2["default"])(
|
|
118
|
-
var newEntities =
|
|
119
|
-
return
|
|
105
|
+
(0, _defineProperty2["default"])(_this, "newEntitiesToSubmit", function () {
|
|
106
|
+
var newEntities = _this.state.newEntities.filter(function (entity) {
|
|
107
|
+
return _this.state.entitiesWithChangedPermission[entity.get('id')] !== _quizCommon.REMOVED_ACCESS;
|
|
120
108
|
});
|
|
121
109
|
|
|
122
110
|
// special case if the creator tries to change their own permissions before
|
|
123
111
|
// first share, since they don't have a SharedBank record to update
|
|
124
|
-
var newCreatorPerm =
|
|
112
|
+
var newCreatorPerm = _this.state.entitiesWithChangedPermission['-1'];
|
|
125
113
|
if (newCreatorPerm && newCreatorPerm !== _quizCommon.CAN_EDIT) {
|
|
126
|
-
var creatorSharedBank =
|
|
114
|
+
var creatorSharedBank = _this.props.sharedBanks.find(function (sharedBank) {
|
|
127
115
|
return sharedBank.get('id') == '-1';
|
|
128
116
|
});
|
|
129
117
|
newEntities = newEntities.push((0, _immutable.Map)(_objectSpread(_objectSpread({}, creatorSharedBank.toJS()), {}, {
|
|
@@ -132,85 +120,85 @@ var SharingModalPresenter = exports.SharingModalPresenter = (_dec = (0, _quizCom
|
|
|
132
120
|
}
|
|
133
121
|
return newEntities;
|
|
134
122
|
});
|
|
135
|
-
(0, _defineProperty2["default"])(
|
|
136
|
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
123
|
+
(0, _defineProperty2["default"])(_this, "isSharedWithAccount", function () {
|
|
124
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state;
|
|
137
125
|
return [_quizCommon.READ_ONLY, _quizCommon.CAN_EDIT].includes(state.accountPermission);
|
|
138
126
|
});
|
|
139
127
|
// =============
|
|
140
128
|
// HANDLERS
|
|
141
129
|
// =============
|
|
142
|
-
(0, _defineProperty2["default"])(
|
|
143
|
-
|
|
144
|
-
|
|
130
|
+
(0, _defineProperty2["default"])(_this, "handleDismiss", function (e) {
|
|
131
|
+
_this.props.updateSharedCount(null);
|
|
132
|
+
_this.modalDismissCleanup();
|
|
145
133
|
});
|
|
146
|
-
(0, _defineProperty2["default"])(
|
|
134
|
+
(0, _defineProperty2["default"])(_this, "handleSubmit", function () {
|
|
147
135
|
// calls the sharedBank api with the new entities you shared the current bank with
|
|
148
136
|
var promises = [];
|
|
149
|
-
if (
|
|
150
|
-
var updatedBank =
|
|
151
|
-
promises.push(
|
|
137
|
+
if (_this.state.accountPermission !== _this.props.bank.accountPermission) {
|
|
138
|
+
var updatedBank = _this.props.bank.set('accountPermission', _this.state.accountPermission);
|
|
139
|
+
promises.push(_this.props.updateBank(updatedBank));
|
|
152
140
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
promises.push(
|
|
141
|
+
_this.newEntitiesToSubmit().forEach(function (entity) {
|
|
142
|
+
_this.props.onShare(entity.toJS());
|
|
143
|
+
promises.push(_this.props.shareBank(_this.sharedBankForEntity(entity), _this.props.getUserInfo));
|
|
156
144
|
});
|
|
157
145
|
|
|
158
146
|
// call the update api if any shared bank permission was updated
|
|
159
|
-
Object.entries(
|
|
147
|
+
Object.entries(_this.state.entitiesWithChangedPermission).forEach(function (_ref2) {
|
|
160
148
|
var _ref3 = (0, _slicedToArray2["default"])(_ref2, 2),
|
|
161
149
|
sharedBankId = _ref3[0],
|
|
162
150
|
permission = _ref3[1];
|
|
163
|
-
var sharedBank =
|
|
151
|
+
var sharedBank = _this.props.sharedBanks.find(function (sharedBank) {
|
|
164
152
|
return sharedBank.get('id') === sharedBankId;
|
|
165
153
|
});
|
|
166
154
|
if (sharedBank && sharedBank.get('permission') !== permission && sharedBankId != '-1') {
|
|
167
|
-
promises.push(
|
|
155
|
+
promises.push(_this.props.updateSharedBankPermission(_this.props.bank.id, sharedBankId, permission));
|
|
168
156
|
}
|
|
169
157
|
});
|
|
170
158
|
|
|
171
159
|
// waits till all the calls to the shareBank and updateSharedBank apis have completed
|
|
172
160
|
Promise.all(promises).then(function (values) {
|
|
173
161
|
// calls getBank for the current bank to update the sharedCount
|
|
174
|
-
|
|
162
|
+
_this.props.getBank(_this.props.bank.id);
|
|
175
163
|
});
|
|
176
|
-
|
|
164
|
+
_this.setState({
|
|
177
165
|
newEntities: (0, _immutable.List)()
|
|
178
166
|
});
|
|
179
|
-
|
|
167
|
+
_this.modalDismissCleanup(!!_this.numEntitiesToRemove());
|
|
180
168
|
});
|
|
181
|
-
(0, _defineProperty2["default"])(
|
|
182
|
-
|
|
169
|
+
(0, _defineProperty2["default"])(_this, "handleSearchSelectionChange", function (searchSelection) {
|
|
170
|
+
_this.setState({
|
|
183
171
|
searchSelection: searchSelection
|
|
184
172
|
});
|
|
185
173
|
});
|
|
186
|
-
(0, _defineProperty2["default"])(
|
|
174
|
+
(0, _defineProperty2["default"])(_this, "updateEntitiesCount", function () {
|
|
187
175
|
// state.shares is a list containing everyone in the list,
|
|
188
|
-
|
|
176
|
+
_this.props.updateSharedCount(_this.state.shares.size - _this.numEntitiesToRemove());
|
|
189
177
|
});
|
|
190
|
-
(0, _defineProperty2["default"])(
|
|
191
|
-
var originalEntity =
|
|
178
|
+
(0, _defineProperty2["default"])(_this, "originalPermissionForEntity", function (entity) {
|
|
179
|
+
var originalEntity = _this.props.sharedBanks.find(function (sb) {
|
|
192
180
|
return sb.get('id') == entity.get('id');
|
|
193
181
|
}) || (0, _immutable.Map)();
|
|
194
182
|
return originalEntity.get('permission', _quizCommon.CAN_EDIT);
|
|
195
183
|
});
|
|
196
|
-
(0, _defineProperty2["default"])(
|
|
197
|
-
|
|
184
|
+
(0, _defineProperty2["default"])(_this, "handleEntityRemove", function (entity, undoRemove) {
|
|
185
|
+
_this.confirmPermissionChange(entity, _quizCommon.REMOVED_ACCESS);
|
|
198
186
|
});
|
|
199
|
-
(0, _defineProperty2["default"])(
|
|
187
|
+
(0, _defineProperty2["default"])(_this, "handleSearchPermissionChange", function (e, _ref4) {
|
|
200
188
|
var value = _ref4.value;
|
|
201
|
-
|
|
189
|
+
_this.setState({
|
|
202
190
|
searchPermission: value
|
|
203
191
|
});
|
|
204
192
|
});
|
|
205
|
-
(0, _defineProperty2["default"])(
|
|
193
|
+
(0, _defineProperty2["default"])(_this, "handleSearchFilter", function (searchResults) {
|
|
206
194
|
return searchResults.filter(function (result) {
|
|
207
|
-
return !
|
|
195
|
+
return !_this.state.shares.some(function (entity) {
|
|
208
196
|
return entity.get('entityId') === result.uuid;
|
|
209
|
-
}) && (result.uuid !==
|
|
197
|
+
}) && (result.uuid !== _this.props.bank.creator || _this.props.bank.sharedCount > 0);
|
|
210
198
|
});
|
|
211
199
|
});
|
|
212
|
-
(0, _defineProperty2["default"])(
|
|
213
|
-
var newEntities = (0, _immutable.List)(
|
|
200
|
+
(0, _defineProperty2["default"])(_this, "handleShare", function () {
|
|
201
|
+
var newEntities = (0, _immutable.List)(_this.state.searchSelection.map(function (entity) {
|
|
214
202
|
return (0, _immutable.Map)({
|
|
215
203
|
id: entity.uuid,
|
|
216
204
|
entityType: entity.entityType,
|
|
@@ -218,24 +206,24 @@ var SharingModalPresenter = exports.SharingModalPresenter = (_dec = (0, _quizCom
|
|
|
218
206
|
title: entity.fullName || entity.title || entity.name,
|
|
219
207
|
avatar: entity.avatar,
|
|
220
208
|
email: entity.email,
|
|
221
|
-
permission:
|
|
209
|
+
permission: _this.state.searchPermission
|
|
222
210
|
});
|
|
223
211
|
}));
|
|
224
212
|
newEntities.forEach(function (entity) {
|
|
225
|
-
|
|
226
|
-
|
|
213
|
+
_this.props.onShare(entity.toJS());
|
|
214
|
+
_this.props.shareBank(_this.sharedBankForEntity(entity), _this.props.getUserInfo);
|
|
227
215
|
});
|
|
228
|
-
|
|
216
|
+
_this.setState({
|
|
229
217
|
searchSelection: []
|
|
230
218
|
});
|
|
231
219
|
});
|
|
232
|
-
(0, _defineProperty2["default"])(
|
|
220
|
+
(0, _defineProperty2["default"])(_this, "updatePermission", /*#__PURE__*/function () {
|
|
233
221
|
var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(entity, permission) {
|
|
234
|
-
var
|
|
222
|
+
var _this$props, updateSharedBankPermission, getBank, bank;
|
|
235
223
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
236
224
|
while (1) switch (_context.prev = _context.next) {
|
|
237
225
|
case 0:
|
|
238
|
-
|
|
226
|
+
_this$props = _this.props, updateSharedBankPermission = _this$props.updateSharedBankPermission, getBank = _this$props.getBank, bank = _this$props.bank;
|
|
239
227
|
_context.next = 3;
|
|
240
228
|
return updateSharedBankPermission(bank.id, entity.get('id'), permission);
|
|
241
229
|
case 3:
|
|
@@ -250,65 +238,65 @@ var SharingModalPresenter = exports.SharingModalPresenter = (_dec = (0, _quizCom
|
|
|
250
238
|
return _ref5.apply(this, arguments);
|
|
251
239
|
};
|
|
252
240
|
}());
|
|
253
|
-
(0, _defineProperty2["default"])(
|
|
241
|
+
(0, _defineProperty2["default"])(_this, "translatedPermissionLevel", function (permission) {
|
|
254
242
|
return (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _quizCommon.CAN_EDIT, (0, _formatMessage["default"])('edit')), _quizCommon.READ_ONLY, (0, _formatMessage["default"])('view'))[permission];
|
|
255
243
|
});
|
|
256
|
-
(0, _defineProperty2["default"])(
|
|
244
|
+
(0, _defineProperty2["default"])(_this, "confirmPermissionChange", function (entity, permission) {
|
|
257
245
|
var confirmText = permission === _quizCommon.REMOVED_ACCESS ? (0, _formatMessage["default"])('You are about to remove { accessLevel } access for { entityTitle } to this bank.', {
|
|
258
|
-
accessLevel:
|
|
246
|
+
accessLevel: _this.translatedPermissionLevel(_this.originalPermissionForEntity(entity)),
|
|
259
247
|
entityTitle: entity.get('title')
|
|
260
248
|
}) : (0, _formatMessage["default"])('You are about to change access level for { entityTitle } from { originalAccessLevel } to { permission }.', {
|
|
261
249
|
entityTitle: entity.get('title'),
|
|
262
|
-
originalAccessLevel:
|
|
263
|
-
permission:
|
|
250
|
+
originalAccessLevel: _this.translatedPermissionLevel(_this.originalPermissionForEntity(entity)),
|
|
251
|
+
permission: _this.translatedPermissionLevel(permission)
|
|
264
252
|
});
|
|
265
|
-
|
|
253
|
+
_this.props.withConfirm((0, _partial["default"])(_this.updatePermission, entity, permission), {
|
|
266
254
|
title: (0, _formatMessage["default"])('Change Permission'),
|
|
267
255
|
text: confirmText,
|
|
268
256
|
continueText: (0, _formatMessage["default"])('Confirm')
|
|
269
257
|
});
|
|
270
258
|
});
|
|
271
|
-
(0, _defineProperty2["default"])(
|
|
272
|
-
|
|
259
|
+
(0, _defineProperty2["default"])(_this, "handleEntityPermissionChange", function (entity, permission) {
|
|
260
|
+
_this.confirmPermissionChange(entity, permission);
|
|
273
261
|
});
|
|
274
|
-
(0, _defineProperty2["default"])(
|
|
275
|
-
|
|
262
|
+
(0, _defineProperty2["default"])(_this, "toggleAccountShare", function (event) {
|
|
263
|
+
_this.setState(function (prevState) {
|
|
276
264
|
return {
|
|
277
|
-
accountPermission:
|
|
265
|
+
accountPermission: _this.isSharedWithAccount(prevState) ? _quizCommon.REMOVED_ACCESS : _quizCommon.READ_ONLY
|
|
278
266
|
};
|
|
279
267
|
});
|
|
280
268
|
});
|
|
281
|
-
(0, _defineProperty2["default"])(
|
|
269
|
+
(0, _defineProperty2["default"])(_this, "handleAccountPermissionChange", function (e, _ref6) {
|
|
282
270
|
var value = _ref6.value;
|
|
283
|
-
return
|
|
271
|
+
return _this.setState({
|
|
284
272
|
accountPermission: value
|
|
285
273
|
});
|
|
286
274
|
});
|
|
287
|
-
(0, _defineProperty2["default"])(
|
|
288
|
-
|
|
275
|
+
(0, _defineProperty2["default"])(_this, "handleShareListRef", function (node) {
|
|
276
|
+
_this.shareListRef = node;
|
|
289
277
|
});
|
|
290
|
-
(0, _defineProperty2["default"])(
|
|
291
|
-
|
|
278
|
+
(0, _defineProperty2["default"])(_this, "handleShareButtonRef", function (node) {
|
|
279
|
+
_this.shareButtonRef = node;
|
|
292
280
|
});
|
|
293
|
-
(0, _defineProperty2["default"])(
|
|
294
|
-
if (
|
|
281
|
+
(0, _defineProperty2["default"])(_this, "renderSearchSection", function (searchType) {
|
|
282
|
+
if (_this.props.bank.canEdit()) {
|
|
295
283
|
return (0, _emotion.jsx)(_react["default"].Fragment, null, (0, _emotion.jsx)(_uiGrid.Grid, {
|
|
296
284
|
vAlign: "bottom",
|
|
297
285
|
colSpacing: "small"
|
|
298
286
|
}, (0, _emotion.jsx)(_uiGrid.Grid.Row, null, (0, _emotion.jsx)(_uiGrid.Grid.Col, null, (0, _emotion.jsx)(_AsyncSearch["default"], {
|
|
299
|
-
getShareableCourses:
|
|
300
|
-
getShareableUsers:
|
|
301
|
-
getShareableSubaccounts:
|
|
302
|
-
minChars:
|
|
303
|
-
onSelectionChange:
|
|
287
|
+
getShareableCourses: _this.props.getShareableCourses,
|
|
288
|
+
getShareableUsers: _this.props.getShareableUsers,
|
|
289
|
+
getShareableSubaccounts: _this.props.getShareableSubaccounts,
|
|
290
|
+
minChars: _this.props.minChars,
|
|
291
|
+
onSelectionChange: _this.handleSearchSelectionChange,
|
|
304
292
|
searchType: searchType,
|
|
305
|
-
selectedOption:
|
|
306
|
-
selectionFilter:
|
|
293
|
+
selectedOption: _this.state.searchSelection,
|
|
294
|
+
selectionFilter: _this.handleSearchFilter
|
|
307
295
|
})), (0, _emotion.jsx)(_uiGrid.Grid.Col, {
|
|
308
296
|
width: "auto"
|
|
309
297
|
}, (0, _emotion.jsx)(_quizCommon.SimpleSelect, {
|
|
310
|
-
onChange:
|
|
311
|
-
value:
|
|
298
|
+
onChange: _this.handleSearchPermissionChange,
|
|
299
|
+
value: _this.state.searchPermission,
|
|
312
300
|
renderLabel: (0, _formatMessage["default"])('Access')
|
|
313
301
|
}, (0, _emotion.jsx)(_quizCommon.SimpleSelect.Option, {
|
|
314
302
|
id: "sharing-modal-search-section-select-option-can-view",
|
|
@@ -320,24 +308,24 @@ var SharingModalPresenter = exports.SharingModalPresenter = (_dec = (0, _quizCom
|
|
|
320
308
|
width: "auto"
|
|
321
309
|
}, (0, _emotion.jsx)(_uiButtons.Button, {
|
|
322
310
|
"data-automation": "sdk-shared-bank-add-user-button",
|
|
323
|
-
ref:
|
|
324
|
-
onClick:
|
|
325
|
-
color:
|
|
311
|
+
ref: _this.handleShareButtonRef,
|
|
312
|
+
onClick: _this.handleShare,
|
|
313
|
+
color: _this.state.searchSelection.length ? 'success' : 'secondary'
|
|
326
314
|
}, (0, _formatMessage["default"])('Add'))))), (0, _emotion.jsx)("div", {
|
|
327
|
-
css:
|
|
315
|
+
css: _this.props.styles.separator
|
|
328
316
|
}));
|
|
329
317
|
}
|
|
330
318
|
});
|
|
331
|
-
(0, _defineProperty2["default"])(
|
|
319
|
+
(0, _defineProperty2["default"])(_this, "renderShareList", function (entities) {
|
|
332
320
|
return (0, _emotion.jsx)(_ShareList["default"], {
|
|
333
|
-
canEdit:
|
|
321
|
+
canEdit: _this.props.bank.canEdit(),
|
|
334
322
|
entities: entities,
|
|
335
|
-
onPermissionChange:
|
|
336
|
-
onEntityRemove:
|
|
337
|
-
sharedBanks:
|
|
323
|
+
onPermissionChange: _this.handleEntityPermissionChange,
|
|
324
|
+
onEntityRemove: _this.handleEntityRemove,
|
|
325
|
+
sharedBanks: _this.props.sharedBanks
|
|
338
326
|
});
|
|
339
327
|
});
|
|
340
|
-
return
|
|
328
|
+
return _this;
|
|
341
329
|
}
|
|
342
330
|
(0, _inherits2["default"])(SharingModalPresenter, _Component);
|
|
343
331
|
return (0, _createClass2["default"])(SharingModalPresenter, [{
|
|
@@ -41,8 +41,8 @@ var _callHandlers = require("../../common/api/callHandlers");
|
|
|
41
41
|
var _quizzes2 = require("../../common/api/quizzes");
|
|
42
42
|
var _QuizEntry = _interopRequireDefault(require("../../common/records/QuizEntry"));
|
|
43
43
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
44
|
-
function ownKeys(
|
|
45
|
-
function _objectSpread(
|
|
44
|
+
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; }
|
|
45
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
46
46
|
// Actions that involve an API call should happen in order, to prevent race
|
|
47
47
|
// conditions (a user moving a question into a stimulus then immediately
|
|
48
48
|
// deleting the stimulus, for example). We use this queue to make sure requests
|
|
@@ -19,22 +19,10 @@ var _Item2 = _interopRequireDefault(require("../../../../common/records/Item"));
|
|
|
19
19
|
var _QuizEntry2 = _interopRequireDefault(require("../../../../common/records/QuizEntry"));
|
|
20
20
|
var _Stimulus = _interopRequireDefault(require("../../../../common/records/Stimulus"));
|
|
21
21
|
var _excluded = ["nestedEntryCount"];
|
|
22
|
-
function ownKeys(
|
|
23
|
-
function _objectSpread(
|
|
24
|
-
function _callSuper(
|
|
25
|
-
|
|
26
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
27
|
-
if (Reflect.construct.sham) return false;
|
|
28
|
-
if (typeof Proxy === "function") return true;
|
|
29
|
-
try {
|
|
30
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
31
|
-
} catch (e) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
36
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
37
|
-
}
|
|
22
|
+
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; }
|
|
23
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
24
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
38
26
|
var _default = exports["default"] = {
|
|
39
27
|
propValues: {
|
|
40
28
|
sidebarOpen: [false, true]
|
|
@@ -83,26 +71,26 @@ var FakeItem = /*#__PURE__*/function (_Item) {
|
|
|
83
71
|
}(_Item2["default"]);
|
|
84
72
|
var FakeQuizEntry = /*#__PURE__*/function (_QuizEntry) {
|
|
85
73
|
function FakeQuizEntry(entry) {
|
|
86
|
-
var
|
|
74
|
+
var _this;
|
|
87
75
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
88
76
|
_ref$nestedEntryCount = _ref.nestedEntryCount,
|
|
89
77
|
nestedEntryCount = _ref$nestedEntryCount === void 0 ? 0 : _ref$nestedEntryCount,
|
|
90
78
|
params = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
91
79
|
(0, _classCallCheck2["default"])(this, FakeQuizEntry);
|
|
92
80
|
var id = (++quizEntryId).toString();
|
|
93
|
-
|
|
81
|
+
_this = _callSuper(this, FakeQuizEntry, [_objectSpread({
|
|
94
82
|
id: id,
|
|
95
83
|
entryType: entry.constructor.name.replace(/^Fake/, '')
|
|
96
84
|
}, params)]);
|
|
97
|
-
|
|
85
|
+
_this._entry = entry;
|
|
98
86
|
var nestedEntries = [];
|
|
99
87
|
for (var i = 0; i < nestedEntryCount; i++) {
|
|
100
88
|
nestedEntries.push(new FakeQuizEntry(new FakeItem(), {
|
|
101
89
|
stimulusQuizEntryId: id
|
|
102
90
|
}));
|
|
103
91
|
}
|
|
104
|
-
|
|
105
|
-
return
|
|
92
|
+
_this._nestedEntries = (0, _immutable.List)(nestedEntries);
|
|
93
|
+
return _this;
|
|
106
94
|
}
|
|
107
95
|
(0, _inherits2["default"])(FakeQuizEntry, _QuizEntry);
|
|
108
96
|
return (0, _createClass2["default"])(FakeQuizEntry, [{
|
|
@@ -24,20 +24,8 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
24
24
|
var _quizCommon = require("@instructure/quiz-common");
|
|
25
25
|
var _dec, _class, _BuildingSidebarItem;
|
|
26
26
|
/** @jsx jsx */
|
|
27
|
-
function _callSuper(
|
|
28
|
-
|
|
29
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
30
|
-
if (Reflect.construct.sham) return false;
|
|
31
|
-
if (typeof Proxy === "function") return true;
|
|
32
|
-
try {
|
|
33
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
39
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
40
|
-
}
|
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
28
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
41
29
|
var BuildingSidebarItem = exports.BuildingSidebarItem = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default"], _theme["default"]), _dec(_class = (_BuildingSidebarItem = /*#__PURE__*/function (_Component) {
|
|
42
30
|
function BuildingSidebarItem() {
|
|
43
31
|
(0, _classCallCheck2["default"])(this, BuildingSidebarItem);
|