@instructure/quiz-core 22.6.0 → 22.7.1-rc.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 +34 -33
|
@@ -8,8 +8,8 @@ exports["default"] = exports.QuizEntry = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
12
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
+
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
@@ -26,39 +26,28 @@ var _immutableHelpers = require("../util/immutableHelpers");
|
|
|
26
26
|
var _withStateCache = _interopRequireDefault(require("../util/withStateCache"));
|
|
27
27
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
28
28
|
var _dec, _class;
|
|
29
|
-
function _getRequireWildcardCache(
|
|
30
|
-
function _interopRequireWildcard(
|
|
31
|
-
function _callSuper(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (Reflect.construct.sham) return false;
|
|
35
|
-
if (typeof Proxy === "function") return true;
|
|
36
|
-
try {
|
|
37
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
38
|
-
} catch (e) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
43
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
44
|
-
}
|
|
29
|
+
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); }
|
|
30
|
+
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; }
|
|
31
|
+
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)); }
|
|
32
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
|
+
function _superPropGet(t, o, e, r) { var p = (0, _get2["default"])((0, _getPrototypeOf2["default"])(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
45
34
|
var acceptedVerbs = [_quizCommon.REMOVE, _quizCommon.MOVE, _quizCommon.EDIT, _quizCommon.COPY];
|
|
46
35
|
var QuizEntry = exports.QuizEntry = (_dec = (0, _withStateCache["default"])(function () {
|
|
47
36
|
return [['quizEntries'], ['modifications', 'quizEntries']];
|
|
48
37
|
}), _class = /*#__PURE__*/function (_ReduxRecord) {
|
|
49
38
|
function QuizEntry() {
|
|
50
|
-
var
|
|
39
|
+
var _this;
|
|
51
40
|
(0, _classCallCheck2["default"])(this, QuizEntry);
|
|
52
41
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
53
42
|
args[_key] = arguments[_key];
|
|
54
43
|
}
|
|
55
|
-
|
|
56
|
-
(0, _defineProperty2["default"])(
|
|
57
|
-
var childEntries =
|
|
58
|
-
return entry.get('stimulusQuizEntryId') ===
|
|
44
|
+
_this = _callSuper(this, QuizEntry, [].concat(args));
|
|
45
|
+
(0, _defineProperty2["default"])(_this, "__getStimulusEntries", function () {
|
|
46
|
+
var childEntries = _this.getState().get('quizEntries', (0, _immutable.Map)()).filter(function (entry) {
|
|
47
|
+
return entry.get('stimulusQuizEntryId') === _this.id;
|
|
59
48
|
});
|
|
60
|
-
var temporaryItem =
|
|
61
|
-
if (temporaryItem && temporaryItem.get('stimulusQuizEntryId') ===
|
|
49
|
+
var temporaryItem = _this.getState().getIn(['modifications', 'quizEntries', _quizCommon.TEMPORARY_QUIZ_ENTRY_ID]);
|
|
50
|
+
if (temporaryItem && temporaryItem.get('stimulusQuizEntryId') === _this.id) {
|
|
62
51
|
childEntries = childEntries.set(temporaryItem.id, QuizEntry.create(temporaryItem));
|
|
63
52
|
}
|
|
64
53
|
var quizEntries = childEntries.map(function (entry) {
|
|
@@ -68,20 +57,20 @@ var QuizEntry = exports.QuizEntry = (_dec = (0, _withStateCache["default"])(func
|
|
|
68
57
|
}).toList();
|
|
69
58
|
return quizEntries || (0, _immutable.List)();
|
|
70
59
|
});
|
|
71
|
-
(0, _defineProperty2["default"])(
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
60
|
+
(0, _defineProperty2["default"])(_this, "__getBankEntryEntries", function () {
|
|
61
|
+
if (_this.hasStimulus) {
|
|
62
|
+
return _this.__getStimulusEntries();
|
|
74
63
|
} else {
|
|
75
|
-
return (0, _immutable.List)([
|
|
64
|
+
return (0, _immutable.List)([_this]);
|
|
76
65
|
}
|
|
77
66
|
});
|
|
78
|
-
return
|
|
67
|
+
return _this;
|
|
79
68
|
}
|
|
80
69
|
(0, _inherits2["default"])(QuizEntry, _ReduxRecord);
|
|
81
70
|
return (0, _createClass2["default"])(QuizEntry, [{
|
|
82
71
|
key: "getErrors",
|
|
83
72
|
value: function getErrors() {
|
|
84
|
-
return (
|
|
73
|
+
return _superPropGet(QuizEntry, "getErrors", this, 3)([this]).merge({
|
|
85
74
|
sampleNum: this.sampleNumErrors(),
|
|
86
75
|
deletedBank: this.deletedBankErrors(),
|
|
87
76
|
pointsPossible: this.pointsPossibleErrors()
|
|
@@ -140,7 +129,7 @@ var QuizEntry = exports.QuizEntry = (_dec = (0, _withStateCache["default"])(func
|
|
|
140
129
|
}, {
|
|
141
130
|
key: "getEntry",
|
|
142
131
|
value: function getEntry() {
|
|
143
|
-
var
|
|
132
|
+
var _this2 = this;
|
|
144
133
|
var entry;
|
|
145
134
|
if (this.entry === _quizCommon.TEMPORARY_ITEM_ID) {
|
|
146
135
|
entry = _Item2["default"].create(this.getState().getIn(['modifications', 'items', _quizCommon.TEMPORARY_ITEM_ID]));
|
|
@@ -151,16 +140,16 @@ var QuizEntry = exports.QuizEntry = (_dec = (0, _withStateCache["default"])(func
|
|
|
151
140
|
var entryId = this.entryId || this.entry.get('id');
|
|
152
141
|
var entryCreator = {
|
|
153
142
|
Bank: function Bank() {
|
|
154
|
-
return _Bank2["default"].create(
|
|
143
|
+
return _Bank2["default"].create(_this2.getState().getIn(['banks', entryId]));
|
|
155
144
|
},
|
|
156
145
|
BankEntry: function BankEntry() {
|
|
157
|
-
return _BankEntry2["default"].create(
|
|
146
|
+
return _BankEntry2["default"].create(_this2.getState().getIn(['bankEntries', entryId]));
|
|
158
147
|
},
|
|
159
148
|
Item: function Item() {
|
|
160
|
-
return _Item2["default"].create(
|
|
149
|
+
return _Item2["default"].create(_this2.getState().getIn(['items', entryId]));
|
|
161
150
|
},
|
|
162
151
|
Stimulus: function Stimulus() {
|
|
163
|
-
return _Stimulus2["default"].create(
|
|
152
|
+
return _Stimulus2["default"].create(_this2.getState().getIn(['stimuli', entryId]));
|
|
164
153
|
}
|
|
165
154
|
};
|
|
166
155
|
if (!entryCreator[this.entryType]) return;
|
|
@@ -197,14 +186,14 @@ var QuizEntry = exports.QuizEntry = (_dec = (0, _withStateCache["default"])(func
|
|
|
197
186
|
// Possibly the `withStateCache` decorator could be made more sophisticated to deal
|
|
198
187
|
// with this flaw.
|
|
199
188
|
function getNestedEntries() {
|
|
200
|
-
var
|
|
189
|
+
var _this3 = this;
|
|
201
190
|
var getNestedEntriesFunction = {
|
|
202
191
|
Bank: function Bank() {
|
|
203
|
-
return (0, _immutable.List)([
|
|
192
|
+
return (0, _immutable.List)([_this3]);
|
|
204
193
|
},
|
|
205
194
|
BankEntry: this.__getBankEntryEntries,
|
|
206
195
|
Item: function Item() {
|
|
207
|
-
return (0, _immutable.List)([
|
|
196
|
+
return (0, _immutable.List)([_this3]);
|
|
208
197
|
},
|
|
209
198
|
Stimulus: this.__getStimulusEntries
|
|
210
199
|
}[this.entryType];
|
|
@@ -18,20 +18,8 @@ var _quizzes = require("../selectors/quizzes");
|
|
|
18
18
|
var _quizSessionResults = require("../selectors/quizSessionResults");
|
|
19
19
|
var _taking = require("../selectors/taking");
|
|
20
20
|
var _sessionItems = require("../selectors/sessionItems");
|
|
21
|
-
function _callSuper(
|
|
22
|
-
|
|
23
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
24
|
-
if (Reflect.construct.sham) return false;
|
|
25
|
-
if (typeof Proxy === "function") return true;
|
|
26
|
-
try {
|
|
27
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
28
|
-
} catch (e) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
33
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
34
|
-
}
|
|
21
|
+
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)); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
23
|
var QuizSession = exports.QuizSession = /*#__PURE__*/function (_ReduxRecord) {
|
|
36
24
|
function QuizSession() {
|
|
37
25
|
(0, _classCallCheck2["default"])(this, QuizSession);
|
|
@@ -12,20 +12,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _reduxRecord = _interopRequireDefault(require("./reduxRecord"));
|
|
14
14
|
var _sessionItems = require("../selectors/sessionItems");
|
|
15
|
-
function _callSuper(
|
|
16
|
-
|
|
17
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
18
|
-
if (Reflect.construct.sham) return false;
|
|
19
|
-
if (typeof Proxy === "function") return true;
|
|
20
|
-
try {
|
|
21
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
22
|
-
} catch (e) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
27
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
28
|
-
}
|
|
15
|
+
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)); }
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
17
|
var QuizSessionEvent = exports.QuizSessionEvent = /*#__PURE__*/function (_ReduxRecord) {
|
|
30
18
|
function QuizSessionEvent() {
|
|
31
19
|
(0, _classCallCheck2["default"])(this, QuizSessionEvent);
|
|
@@ -14,20 +14,8 @@ var _immutable = require("immutable");
|
|
|
14
14
|
var _reduxRecord = _interopRequireDefault(require("./reduxRecord"));
|
|
15
15
|
var _quizCommon = require("@instructure/quiz-common");
|
|
16
16
|
var _sessionItemResults = require("../selectors/sessionItemResults");
|
|
17
|
-
function _callSuper(
|
|
18
|
-
|
|
19
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
20
|
-
if (Reflect.construct.sham) return false;
|
|
21
|
-
if (typeof Proxy === "function") return true;
|
|
22
|
-
try {
|
|
23
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
24
|
-
} catch (e) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
29
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
30
|
-
}
|
|
17
|
+
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)); }
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
19
|
var QuizSessionResult = exports.QuizSessionResult = /*#__PURE__*/function (_ReduxRecord) {
|
|
32
20
|
function QuizSessionResult() {
|
|
33
21
|
(0, _classCallCheck2["default"])(this, QuizSessionResult);
|
|
@@ -14,20 +14,8 @@ var _reduxRecord = _interopRequireDefault(require("./reduxRecord"));
|
|
|
14
14
|
var _instructureValidations = require("instructure-validations");
|
|
15
15
|
var _quizCommon = require("@instructure/quiz-common");
|
|
16
16
|
var _sessionItems = require("../selectors/sessionItems");
|
|
17
|
-
function _callSuper(
|
|
18
|
-
|
|
19
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
20
|
-
if (Reflect.construct.sham) return false;
|
|
21
|
-
if (typeof Proxy === "function") return true;
|
|
22
|
-
try {
|
|
23
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
24
|
-
} catch (e) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
29
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
30
|
-
}
|
|
17
|
+
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)); }
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
19
|
var Response = exports.Response = /*#__PURE__*/function (_ReduxRecord) {
|
|
32
20
|
function Response() {
|
|
33
21
|
(0, _classCallCheck2["default"])(this, Response);
|
|
@@ -15,20 +15,8 @@ var _reduxRecord = _interopRequireDefault(require("./reduxRecord"));
|
|
|
15
15
|
var _Item = _interopRequireDefault(require("./Item"));
|
|
16
16
|
var _Stimulus = _interopRequireDefault(require("./Stimulus"));
|
|
17
17
|
var _SessionItemResult = _interopRequireDefault(require("./SessionItemResult"));
|
|
18
|
-
function _callSuper(
|
|
19
|
-
|
|
20
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
21
|
-
if (Reflect.construct.sham) return false;
|
|
22
|
-
if (typeof Proxy === "function") return true;
|
|
23
|
-
try {
|
|
24
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
25
|
-
} catch (e) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
30
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
31
|
-
}
|
|
18
|
+
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)); }
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
32
20
|
var SessionItem = exports.SessionItem = /*#__PURE__*/function (_ReduxRecord) {
|
|
33
21
|
function SessionItem() {
|
|
34
22
|
(0, _classCallCheck2["default"])(this, SessionItem);
|
|
@@ -53,17 +41,17 @@ var SessionItem = exports.SessionItem = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
53
41
|
}, {
|
|
54
42
|
key: "getNestedEntries",
|
|
55
43
|
value: function getNestedEntries() {
|
|
56
|
-
var
|
|
44
|
+
var _this = this;
|
|
57
45
|
var fromState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
58
46
|
if (this.stimulus) {
|
|
59
47
|
if (this.items && !fromState) {
|
|
60
48
|
return this.items;
|
|
61
49
|
}
|
|
62
50
|
var stimulusIdFilter = function stimulusIdFilter(si) {
|
|
63
|
-
return si.get('quizSessionId') ===
|
|
51
|
+
return si.get('quizSessionId') === _this.quizSessionId && si.getIn(['stimulus', 'id']) === _this.getIn(['stimulus', 'id']);
|
|
64
52
|
};
|
|
65
53
|
var stimulusKeyFilter = function stimulusKeyFilter(si) {
|
|
66
|
-
return si.get('quizSessionId') ===
|
|
54
|
+
return si.get('quizSessionId') === _this.quizSessionId && si.get('stimulusKey') === _this.stimulusKey;
|
|
67
55
|
};
|
|
68
56
|
|
|
69
57
|
// fallback to use the stimulus id when stimulusKey is not present
|
|
@@ -13,20 +13,8 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
13
13
|
var _immutable = require("immutable");
|
|
14
14
|
var _reduxRecord = _interopRequireDefault(require("./reduxRecord"));
|
|
15
15
|
var _sessionItems = require("../selectors/sessionItems");
|
|
16
|
-
function _callSuper(
|
|
17
|
-
|
|
18
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
19
|
-
if (Reflect.construct.sham) return false;
|
|
20
|
-
if (typeof Proxy === "function") return true;
|
|
21
|
-
try {
|
|
22
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
23
|
-
} catch (e) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
28
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
29
|
-
}
|
|
16
|
+
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)); }
|
|
17
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
18
|
var SessionItemResult = exports.SessionItemResult = /*#__PURE__*/function (_ReduxRecord) {
|
|
31
19
|
function SessionItemResult() {
|
|
32
20
|
(0, _classCallCheck2["default"])(this, SessionItemResult);
|
|
@@ -16,20 +16,8 @@ var _quizCommon = require("@instructure/quiz-common");
|
|
|
16
16
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
17
17
|
var _instructureValidations = require("instructure-validations");
|
|
18
18
|
var _quizInteractions = require("@instructure/quiz-interactions");
|
|
19
|
-
function _callSuper(
|
|
20
|
-
|
|
21
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
22
|
-
if (Reflect.construct.sham) return false;
|
|
23
|
-
if (typeof Proxy === "function") return true;
|
|
24
|
-
try {
|
|
25
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
26
|
-
} catch (e) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
31
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
32
|
-
}
|
|
19
|
+
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)); }
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
21
|
var Stimulus = exports.Stimulus = /*#__PURE__*/function (_ReduxRecord) {
|
|
34
22
|
function Stimulus() {
|
|
35
23
|
(0, _classCallCheck2["default"])(this, Stimulus);
|
|
@@ -15,22 +15,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _immutable = require("immutable");
|
|
16
16
|
var _maxContent = _interopRequireDefault(require("../util/maxContent"));
|
|
17
17
|
var _instructureValidations = require("instructure-validations");
|
|
18
|
-
function ownKeys(
|
|
19
|
-
function _objectSpread(
|
|
20
|
-
function _callSuper(
|
|
21
|
-
|
|
22
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
23
|
-
if (Reflect.construct.sham) return false;
|
|
24
|
-
if (typeof Proxy === "function") return true;
|
|
25
|
-
try {
|
|
26
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
27
|
-
} catch (e) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
32
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
33
|
-
}
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
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)); }
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
34
22
|
(0, _instructureValidations.addValidator)('maxContent', _maxContent["default"]);
|
|
35
23
|
function mixinBaseRecord(schema) {
|
|
36
24
|
return /*#__PURE__*/function (_Record) {
|
|
@@ -12,20 +12,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _baseRecord = _interopRequireDefault(require("./baseRecord"));
|
|
14
14
|
var _reduxStore = _interopRequireDefault(require("../../reduxStore"));
|
|
15
|
-
function _callSuper(
|
|
16
|
-
|
|
17
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
18
|
-
if (Reflect.construct.sham) return false;
|
|
19
|
-
if (typeof Proxy === "function") return true;
|
|
20
|
-
try {
|
|
21
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
22
|
-
} catch (e) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
27
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
28
|
-
}
|
|
15
|
+
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)); }
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
17
|
function mixinReduxRecord(schema) {
|
|
30
18
|
return /*#__PURE__*/function (_BaseRecord) {
|
|
31
19
|
function ReduxRecord() {
|
|
@@ -10,8 +10,8 @@ var _immutable = require("immutable");
|
|
|
10
10
|
var _quizCommon = require("@instructure/quiz-common");
|
|
11
11
|
var _immutableHelpers = require("../util/immutableHelpers");
|
|
12
12
|
var _Stimulus = _interopRequireDefault(require("../records/Stimulus"));
|
|
13
|
-
function ownKeys(
|
|
14
|
-
function _objectSpread(
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
15
|
var defaultObjMods = function defaultObjMods(objId) {
|
|
16
16
|
var keyAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';
|
|
17
17
|
return (0, _immutable.Map)((0, _defineProperty2["default"])({}, keyAttr, objId));
|
|
@@ -12,28 +12,17 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _get3 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
16
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
+
var _get3 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
17
17
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
18
18
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
19
19
|
var _Fetcher = _interopRequireDefault(require("./Fetcher"));
|
|
20
20
|
var _excluded = ["SuperClass"];
|
|
21
|
-
function ownKeys(
|
|
22
|
-
function _objectSpread(
|
|
23
|
-
function _callSuper(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (Reflect.construct.sham) return false;
|
|
27
|
-
if (typeof Proxy === "function") return true;
|
|
28
|
-
try {
|
|
29
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
30
|
-
} catch (e) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
35
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
36
|
-
}
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
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)); }
|
|
24
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
+
function _superPropGet(t, o, e, r) { var p = (0, _get3["default"])((0, _getPrototypeOf2["default"])(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
37
26
|
// Always call this with `new` to make the abstraction over the inner class
|
|
38
27
|
// transparent to module consumers
|
|
39
28
|
var ExhaustivePaginatedFetcher = function ExhaustivePaginatedFetcher() {
|
|
@@ -58,7 +47,7 @@ var ExhaustivePaginatedFetcher = function ExhaustivePaginatedFetcher() {
|
|
|
58
47
|
key: "get",
|
|
59
48
|
value: function () {
|
|
60
49
|
var _get2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(url) {
|
|
61
|
-
var
|
|
50
|
+
var _this = this;
|
|
62
51
|
var additionalParams,
|
|
63
52
|
params,
|
|
64
53
|
totalItems,
|
|
@@ -70,9 +59,9 @@ var ExhaustivePaginatedFetcher = function ExhaustivePaginatedFetcher() {
|
|
|
70
59
|
additionalParams = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
71
60
|
params = {
|
|
72
61
|
method: 'GET',
|
|
73
|
-
headers: (
|
|
62
|
+
headers: _superPropGet(ExhaustivePaginatedFetcher, "callHeaders", this, 3)([])
|
|
74
63
|
};
|
|
75
|
-
return _context.abrupt("return", (
|
|
64
|
+
return _context.abrupt("return", _superPropGet(ExhaustivePaginatedFetcher, "fetch", this, 3)([_superPropGet(ExhaustivePaginatedFetcher, "appendQueryParams", this, 3)([url, additionalParams]), params]).then(function (response) {
|
|
76
65
|
// analyze properties of the first page response
|
|
77
66
|
// before getting its json body
|
|
78
67
|
totalItems = parseInt(response.headers.get('total'), 10);
|
|
@@ -84,13 +73,13 @@ var ExhaustivePaginatedFetcher = function ExhaustivePaginatedFetcher() {
|
|
|
84
73
|
// get calls to the same url, but with different page numbers
|
|
85
74
|
var pageCount = Math.ceil(totalItems / itemsPerPage) - 1;
|
|
86
75
|
var pages = (0, _toConsumableArray2["default"])(Array(pageCount).keys()).map(function (p) {
|
|
87
|
-
return (
|
|
76
|
+
return _superPropGet(ExhaustivePaginatedFetcher, "get", _this, 3)([url, _objectSpread(_objectSpread({}, additionalParams), {}, {
|
|
88
77
|
page: p + 2,
|
|
89
78
|
per_page: itemsPerPage
|
|
90
|
-
}));
|
|
79
|
+
})]);
|
|
91
80
|
});
|
|
92
81
|
return Promise.all(pages).then(function (pageResponses) {
|
|
93
|
-
return [].concat((0, _toConsumableArray2["default"])(initial), (0, _toConsumableArray2["default"])(
|
|
82
|
+
return [].concat((0, _toConsumableArray2["default"])(initial), (0, _toConsumableArray2["default"])(_this.combinePages(pageResponses)));
|
|
94
83
|
});
|
|
95
84
|
} else {
|
|
96
85
|
return initial;
|
|
@@ -20,8 +20,8 @@ var _reduxStore = _interopRequireDefault(require("../../reduxStore"));
|
|
|
20
20
|
var _callHelpers = require("./callHelpers");
|
|
21
21
|
var _alerts = require("../actions/alerts");
|
|
22
22
|
var _quizCommon = require("@instructure/quiz-common");
|
|
23
|
-
function ownKeys(
|
|
24
|
-
function _objectSpread(
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
25
25
|
/*
|
|
26
26
|
Note that this error extends the Error prototype in the old way because babel doesn't support extending from built-in
|
|
27
27
|
classes using the ES6 class syntax. Follows pattern from here:
|
|
@@ -11,53 +11,42 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
15
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
+
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _map = _interopRequireDefault(require("lodash/map"));
|
|
18
18
|
var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
19
19
|
var _Fetcher2 = _interopRequireDefault(require("./Fetcher"));
|
|
20
20
|
var _jsonify = _interopRequireDefault(require("./jsonify"));
|
|
21
21
|
var _excluded = ["getRecordIds"];
|
|
22
|
-
function _callSuper(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (Reflect.construct.sham) return false;
|
|
26
|
-
if (typeof Proxy === "function") return true;
|
|
27
|
-
try {
|
|
28
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
29
|
-
} catch (e) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
34
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
35
|
-
}
|
|
22
|
+
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)); }
|
|
23
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
+
function _superPropGet(t, o, e, r) { var p = (0, _get2["default"])((0, _getPrototypeOf2["default"])(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
36
25
|
var PaginatedFetcher = exports.PaginatedFetcher = /*#__PURE__*/function (_Fetcher) {
|
|
37
26
|
function PaginatedFetcher() {
|
|
38
|
-
var
|
|
27
|
+
var _this;
|
|
39
28
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
40
29
|
getRecordIds = _ref.getRecordIds,
|
|
41
30
|
args = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
42
31
|
(0, _classCallCheck2["default"])(this, PaginatedFetcher);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
_this = _callSuper(this, PaginatedFetcher, [args]);
|
|
33
|
+
_this.asyncResponseHandler = _this.paginatedResponseHandler;
|
|
34
|
+
_this.getRecordIds = getRecordIds || function (json) {
|
|
46
35
|
return (0, _map["default"])(json, 'id');
|
|
47
36
|
};
|
|
48
|
-
return
|
|
37
|
+
return _this;
|
|
49
38
|
}
|
|
50
39
|
(0, _inherits2["default"])(PaginatedFetcher, _Fetcher);
|
|
51
40
|
return (0, _createClass2["default"])(PaginatedFetcher, [{
|
|
52
41
|
key: "paginatedResponseHandler",
|
|
53
42
|
value: function paginatedResponseHandler(response, request) {
|
|
54
|
-
var
|
|
43
|
+
var _this2 = this;
|
|
55
44
|
return (0, _jsonify["default"])(response).then(function (json) {
|
|
56
45
|
var total = parseInt(response.headers.get('total'), 10);
|
|
57
46
|
var perPage = parseInt(response.headers.get('per-page'), 10);
|
|
58
47
|
var paginationData = {
|
|
59
48
|
totalPages: 1,
|
|
60
|
-
records:
|
|
49
|
+
records: _this2.getRecordIds(json)
|
|
61
50
|
};
|
|
62
51
|
if (perPage > 0) paginationData.totalPages = Math.ceil(total / perPage);
|
|
63
52
|
return [json, paginationData];
|
|
@@ -66,7 +55,7 @@ var PaginatedFetcher = exports.PaginatedFetcher = /*#__PURE__*/function (_Fetche
|
|
|
66
55
|
}, {
|
|
67
56
|
key: "appendQueryParams",
|
|
68
57
|
value: function appendQueryParams(url, params) {
|
|
69
|
-
return (
|
|
58
|
+
return _superPropGet(PaginatedFetcher, "appendQueryParams", this, 3)([url, (0, _omit["default"])(params, 'stateKey')]);
|
|
70
59
|
}
|
|
71
60
|
}, {
|
|
72
61
|
key: "fetch",
|
|
@@ -75,7 +64,7 @@ var PaginatedFetcher = exports.PaginatedFetcher = /*#__PURE__*/function (_Fetche
|
|
|
75
64
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
76
65
|
while (1) switch (_context.prev = _context.next) {
|
|
77
66
|
case 0:
|
|
78
|
-
return _context.abrupt("return", (
|
|
67
|
+
return _context.abrupt("return", _superPropGet(PaginatedFetcher, "fetch", this, 3)([url, (0, _omit["default"])(params, 'stateKey')]));
|
|
79
68
|
case 1:
|
|
80
69
|
case "end":
|
|
81
70
|
return _context.stop();
|