@magmamath/students-features 1.3.26-rc.19 → 1.3.26-rc.20
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/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +0 -145
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +0 -44
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -70
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -255
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -144
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -56
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -68
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -53
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -82
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -70
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -113
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -83
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -305
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -63
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js +1 -1
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -1
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js +3 -17
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.js +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.js +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +1 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js +1 -1
- package/dist/commonjs/features/fluency/components/mobile-menu/MobileMenu.js +1 -2
- package/dist/commonjs/features/fluency/components/mobile-menu/MobileMenu.js.map +1 -1
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +1 -1
- package/dist/commonjs/features/fluency/components/session-results/FluencySessionResults.js +2 -2
- package/dist/commonjs/features/fluency/components/session-results/FluencySessionResults.js.map +1 -1
- package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js +6 -8
- package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyNumpad.js +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyNumpad.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencySolvingPreset.js +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencySolvingPreset.js.map +1 -1
- package/dist/commonjs/features/fluency/index.js +3 -3
- package/dist/commonjs/features/fluency/model/FluencyApiModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js +2 -2
- package/dist/commonjs/features/fluency/model/FluencyModel.js +1 -1
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js +2 -2
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js.map +1 -1
- package/dist/commonjs/features/fluency/{fluency.constants.js → shared/fluency.constants.js} +2 -1
- package/dist/commonjs/features/fluency/shared/fluency.constants.js.map +1 -0
- package/dist/commonjs/features/fluency/{fluency.helpers.js → shared/fluency.helpers.js} +16 -1
- package/dist/commonjs/features/fluency/shared/fluency.helpers.js.map +1 -0
- package/dist/commonjs/features/fluency/shared/fluency.types.js.map +1 -0
- package/dist/commonjs/features/fluency/{components/fluency-solving → shared}/fluencySolving.constants.js +1 -1
- package/dist/commonjs/features/fluency/shared/fluencySolving.constants.js.map +1 -0
- package/dist/commonjs/features/fluency/{components/fluency-solving → shared}/fluencySolving.helpers.js +1 -1
- package/dist/commonjs/features/fluency/shared/fluencySolving.helpers.js.map +1 -0
- package/dist/commonjs/features/fluency/shared/fluencySolving.types.js.map +1 -0
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.js +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/AverageSortButton.js +4 -2
- package/dist/commonjs/features/fluency-teacher/components/table/AverageSortButton.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js +9 -25
- package/dist/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.js +2 -1
- package/dist/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.constants.js +13 -5
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.constants.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.helpers.js +1 -1
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.helpers.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.js +6 -4
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyModel.js +1 -1
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyModel.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyTableModel.js +27 -14
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyTableModel.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +0 -35
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js +0 -50
- package/dist/commonjs/features/keyboard/components/BasicLayout/CurrencyBasicLayout.js +0 -35
- package/dist/commonjs/features/keyboard/components/BasicLayout/TimeBasicLayout.js +0 -55
- package/dist/commonjs/features/keyboard/components/BasicPlusLayout/BasicPlusLayout.js +0 -45
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +0 -45
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +0 -25
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js +0 -2
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +0 -44
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +0 -91
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js +0 -49
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js +0 -23
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js +0 -79
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js +0 -48
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js +0 -125
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +0 -140
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js +0 -137
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +0 -71
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +0 -108
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js +0 -74
- package/dist/commonjs/features/pmProgress/components/list/DomainCard.js +0 -194
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +0 -82
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +0 -100
- package/dist/commonjs/features/pmProgress/components/list/StandardItem.js +0 -143
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js +0 -101
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +0 -142
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +0 -207
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +1 -2
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -245
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -109
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +0 -50
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -34
- package/dist/commonjs/features/voice/playing/model/Player.model.js +0 -98
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -66
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +0 -39
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +0 -223
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +0 -41
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +0 -15
- package/dist/commonjs/features/voice/playing/model/index.js +0 -20
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +0 -137
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +0 -37
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js +0 -27
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +0 -52
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +0 -59
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +0 -22
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +0 -57
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +0 -82
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +0 -55
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js +0 -55
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js +0 -44
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +0 -248
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +0 -30
- package/dist/commonjs/lib/components/GradientView.js +2 -4
- package/dist/commonjs/lib/components/GradientView.js.map +1 -1
- package/dist/commonjs/shared/common.constants.js +7 -1
- package/dist/commonjs/shared/common.constants.js.map +1 -1
- package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js +1 -1
- package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -1
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js +2 -16
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.js +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js.map +1 -1
- package/dist/module/features/fluency/components/mobile-menu/MobileMenu.js +1 -2
- package/dist/module/features/fluency/components/mobile-menu/MobileMenu.js.map +1 -1
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +1 -1
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/module/features/fluency/components/session-results/FluencySessionResults.js +2 -2
- package/dist/module/features/fluency/components/session-results/FluencySessionResults.js.map +1 -1
- package/dist/module/features/fluency/components/start-banner/MathFlashcard.js.map +1 -1
- package/dist/module/features/fluency/components/start-banner/StartBanner.js +6 -8
- package/dist/module/features/fluency/components/start-banner/StartBanner.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js +1 -1
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencyNumpad.js +1 -1
- package/dist/module/features/fluency/hooks/useFluencyNumpad.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencySolvingPreset.js +1 -1
- package/dist/module/features/fluency/hooks/useFluencySolvingPreset.js.map +1 -1
- package/dist/module/features/fluency/index.js +3 -3
- package/dist/module/features/fluency/index.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyApiModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyMatrixModel.js +2 -2
- package/dist/module/features/fluency/model/FluencyMatrixModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyModel.js +1 -1
- package/dist/module/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencySolvingModel.js +2 -2
- package/dist/module/features/fluency/model/FluencySolvingModel.js.map +1 -1
- package/dist/module/features/fluency/{fluency.constants.js → shared/fluency.constants.js} +1 -0
- package/dist/module/features/fluency/shared/fluency.constants.js.map +1 -0
- package/dist/module/features/fluency/{fluency.helpers.js → shared/fluency.helpers.js} +15 -1
- package/dist/module/features/fluency/shared/fluency.helpers.js.map +1 -0
- package/dist/module/features/fluency/shared/fluency.types.js.map +1 -0
- package/dist/module/features/fluency/{components/fluency-solving → shared}/fluencySolving.constants.js +1 -1
- package/dist/module/features/fluency/shared/fluencySolving.constants.js.map +1 -0
- package/dist/module/features/fluency/{components/fluency-solving → shared}/fluencySolving.helpers.js +1 -1
- package/dist/module/features/fluency/shared/fluencySolving.helpers.js.map +1 -0
- package/dist/module/features/fluency/shared/fluencySolving.types.js.map +1 -0
- package/dist/module/features/fluency-teacher/components/drawer/DrawerHeader.js +2 -2
- package/dist/module/features/fluency-teacher/components/drawer/DrawerHeader.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/AllPupilsTableRow.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/AverageSortButton.js +4 -2
- package/dist/module/features/fluency-teacher/components/table/AverageSortButton.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js +11 -27
- package/dist/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/TableColumnSortButton.js +2 -1
- package/dist/module/features/fluency-teacher/components/table/TableColumnSortButton.js.map +1 -1
- package/dist/module/features/fluency-teacher/fluencyTeacher.constants.js +12 -4
- package/dist/module/features/fluency-teacher/fluencyTeacher.constants.js.map +1 -1
- package/dist/module/features/fluency-teacher/fluencyTeacher.helpers.js +1 -1
- package/dist/module/features/fluency-teacher/fluencyTeacher.helpers.js.map +1 -1
- package/dist/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.js +6 -4
- package/dist/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.js.map +1 -1
- package/dist/module/features/fluency-teacher/model/TeacherFluencyModel.js +1 -1
- package/dist/module/features/fluency-teacher/model/TeacherFluencyModel.js.map +1 -1
- package/dist/module/features/fluency-teacher/model/TeacherFluencyTableModel.js +28 -15
- package/dist/module/features/fluency-teacher/model/TeacherFluencyTableModel.js.map +1 -1
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +0 -32
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +2 -2
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +0 -1
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +1 -1
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -29
- package/dist/module/lib/components/GradientView.js +1 -3
- package/dist/module/lib/components/GradientView.js.map +1 -1
- package/dist/module/shared/common.constants.js +6 -0
- package/dist/module/shared/common.constants.js.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/mobile-menu/MobileMenu.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/session-results/FluencySessionResults.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/context/FluencyContext.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/context/FluencyContext.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyCardDeckAnimation.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyCardDeckAnimation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencySolvingPreset.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencySolvingPreset.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/index.d.ts +3 -3
- package/dist/typescript/commonjs/features/fluency/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts +3 -3
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/{fluency.constants.d.ts → shared/fluency.constants.d.ts} +1 -0
- package/dist/typescript/commonjs/features/fluency/shared/fluency.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/shared/fluency.helpers.d.ts +14 -0
- package/dist/typescript/commonjs/features/fluency/shared/fluency.helpers.d.ts.map +1 -0
- package/dist/typescript/{module/features/fluency → commonjs/features/fluency/shared}/fluency.types.d.ts +2 -3
- package/dist/typescript/commonjs/features/fluency/shared/fluency.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/{components/fluency-solving → shared}/fluencySolving.constants.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/shared/fluencySolving.constants.d.ts.map +1 -0
- package/dist/typescript/{module/features/fluency/components/fluency-solving → commonjs/features/fluency/shared}/fluencySolving.helpers.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/shared/fluencySolving.helpers.d.ts.map +1 -0
- package/dist/typescript/{module/features/fluency/components/fluency-solving → commonjs/features/fluency/shared}/fluencySolving.types.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/shared/fluencySolving.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageSortButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.constants.d.ts +8 -0
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.helpers.d.ts +2 -13
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.types.d.ts +7 -13
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts +3 -2
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyTableModel.d.ts +5 -13
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyTableModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +0 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/components/GradientView.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/common.constants.d.ts +5 -0
- package/dist/typescript/commonjs/shared/common.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts +2 -2
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts +1 -1
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts +2 -2
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts +2 -2
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts +2 -2
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/mobile-menu/MobileMenu.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/session-results/FluencySessionResults.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts +1 -1
- package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/context/FluencyContext.d.ts +1 -1
- package/dist/typescript/module/features/fluency/context/FluencyContext.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencyCardDeckAnimation.d.ts +2 -2
- package/dist/typescript/module/features/fluency/hooks/useFluencyCardDeckAnimation.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts +2 -2
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencySolvingPreset.d.ts +2 -2
- package/dist/typescript/module/features/fluency/hooks/useFluencySolvingPreset.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/index.d.ts +3 -3
- package/dist/typescript/module/features/fluency/index.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts +2 -2
- package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts +2 -2
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts +3 -3
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/{fluency.constants.d.ts → shared/fluency.constants.d.ts} +1 -0
- package/dist/typescript/module/features/fluency/shared/fluency.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/shared/fluency.helpers.d.ts +14 -0
- package/dist/typescript/module/features/fluency/shared/fluency.helpers.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/fluency → module/features/fluency/shared}/fluency.types.d.ts +2 -3
- package/dist/typescript/module/features/fluency/shared/fluency.types.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/{components/fluency-solving → shared}/fluencySolving.constants.d.ts +1 -1
- package/dist/typescript/module/features/fluency/shared/fluencySolving.constants.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/fluency/components/fluency-solving → module/features/fluency/shared}/fluencySolving.helpers.d.ts +2 -2
- package/dist/typescript/module/features/fluency/shared/fluencySolving.helpers.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/fluency/components/fluency-solving → module/features/fluency/shared}/fluencySolving.types.d.ts +1 -1
- package/dist/typescript/module/features/fluency/shared/fluencySolving.types.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/AverageSortButton.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/TableColumnSortButton.d.ts +2 -2
- package/dist/typescript/module/features/fluency-teacher/components/table/TableColumnSortButton.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.constants.d.ts +8 -0
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.helpers.d.ts +2 -13
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.types.d.ts +7 -13
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.types.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts +3 -2
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyTableModel.d.ts +5 -13
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyTableModel.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +0 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
- package/dist/typescript/module/lib/components/GradientView.d.ts.map +1 -1
- package/dist/typescript/module/shared/common.constants.d.ts +5 -0
- package/dist/typescript/module/shared/common.constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/fluency/components/Fluency.tsx +2 -2
- package/src/features/fluency/components/day-streak-counter/DayStreak.tsx +1 -1
- package/src/features/fluency/components/day-streak-counter/DayStreakCounter.tsx +2 -19
- package/src/features/fluency/components/fluency-solving/components/EquationContent.tsx +5 -1
- package/src/features/fluency/components/fluency-solving/components/FluencyCardDeck.tsx +6 -3
- package/src/features/fluency/components/fluency-solving/components/FluencyEquationCard.tsx +2 -2
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingCard.tsx +1 -1
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx +2 -2
- package/src/features/fluency/components/matrix/components/MatrixCell.tsx +2 -2
- package/src/features/fluency/components/mobile-menu/MobileMenu.tsx +1 -2
- package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +1 -1
- package/src/features/fluency/components/session-results/FluencySessionResults.tsx +2 -5
- package/src/features/fluency/components/start-banner/BannerFlashcards.tsx +1 -1
- package/src/features/fluency/components/start-banner/MathFlashcard.tsx +6 -2
- package/src/features/fluency/components/start-banner/StartBanner.tsx +6 -9
- package/src/features/fluency/context/FluencyContext.ts +1 -1
- package/src/features/fluency/hooks/useFluencyCardDeckAnimation.ts +2 -2
- package/src/features/fluency/hooks/useFluencyModePreset.ts +18 -6
- package/src/features/fluency/hooks/useFluencyNumpad.tsx +1 -1
- package/src/features/fluency/hooks/useFluencySolvingPreset.ts +6 -2
- package/src/features/fluency/index.ts +3 -3
- package/src/features/fluency/model/FluencyApiModel.ts +2 -3
- package/src/features/fluency/model/FluencyDaysStreakModel.ts +1 -1
- package/src/features/fluency/model/FluencyMatrixModel.ts +3 -3
- package/src/features/fluency/model/FluencyModel.ts +2 -2
- package/src/features/fluency/model/FluencySolvingModel.ts +4 -12
- package/src/features/fluency/{fluency.constants.ts → shared/fluency.constants.ts} +2 -0
- package/src/features/fluency/{fluency.helpers.ts → shared/fluency.helpers.ts} +26 -2
- package/src/features/fluency/{fluency.types.ts → shared/fluency.types.ts} +3 -5
- package/src/features/fluency/{components/fluency-solving → shared}/fluencySolving.constants.ts +1 -1
- package/src/features/fluency/{components/fluency-solving → shared}/fluencySolving.helpers.ts +2 -2
- package/src/features/fluency/{components/fluency-solving → shared}/fluencySolving.types.ts +1 -1
- package/src/features/fluency-teacher/components/drawer/DrawerHeader.tsx +2 -1
- package/src/features/fluency-teacher/components/table/AllPupilsTableRow.tsx +2 -2
- package/src/features/fluency-teacher/components/table/AverageSortButton.tsx +4 -2
- package/src/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.tsx +12 -22
- package/src/features/fluency-teacher/components/table/TableColumnSortButton.tsx +3 -3
- package/src/features/fluency-teacher/fluencyTeacher.constants.ts +14 -4
- package/src/features/fluency-teacher/fluencyTeacher.helpers.ts +13 -5
- package/src/features/fluency-teacher/fluencyTeacher.types.ts +7 -14
- package/src/features/fluency-teacher/model/TeacherFluencyFiltersModel.ts +13 -10
- package/src/features/fluency-teacher/model/TeacherFluencyModel.ts +1 -1
- package/src/features/fluency-teacher/model/TeacherFluencyTableModel.ts +36 -12
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +2 -2
- package/src/features/pmProgress/shared/pmProgress.constants.ts +0 -1
- package/src/lib/components/GradientView.tsx +14 -6
- package/src/shared/common.constants.ts +7 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.constants.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.js.map +0 -1
- package/dist/commonjs/features/fluency/fluency.constants.js.map +0 -1
- package/dist/commonjs/features/fluency/fluency.helpers.js.map +0 -1
- package/dist/commonjs/features/fluency/fluency.types.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.constants.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.types.js.map +0 -1
- package/dist/module/features/fluency/fluency.constants.js.map +0 -1
- package/dist/module/features/fluency/fluency.helpers.js.map +0 -1
- package/dist/module/features/fluency/fluency.types.js.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts +0 -13
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.constants.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.types.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts +0 -13
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/fluency.types.d.ts.map +0 -1
- /package/dist/commonjs/features/fluency/{fluency.types.js → shared/fluency.types.js} +0 -0
- /package/dist/commonjs/features/fluency/{components/fluency-solving → shared}/fluencySolving.types.js +0 -0
- /package/dist/module/features/fluency/{fluency.types.js → shared/fluency.types.js} +0 -0
- /package/dist/module/features/fluency/{components/fluency-solving → shared}/fluencySolving.types.js +0 -0
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ChatTextInput = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _studentsFeatures = require("@magmamath/students-features");
|
|
12
|
-
var _useKeyboard = require("../../../../../shared/hooks/useKeyboard.js");
|
|
13
|
-
var _constants = require("../../../../../lib/constants.js");
|
|
14
|
-
var _SendMessageButton = require("./SendMessageButton.js");
|
|
15
|
-
var _studentsQa = require("@magmamath/students-qa");
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
-
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; }
|
|
19
|
-
const MAX_AVAILABLE_MESSAGE_LENGTH = 500;
|
|
20
|
-
const COMPACT_WIDTH = 134;
|
|
21
|
-
const FULL_WIDTH = _reactNativeUi.IS_WEB ? 303 : 301;
|
|
22
|
-
const ANIMATION_DURATION = 200;
|
|
23
|
-
const ChatTextInput = ({
|
|
24
|
-
value,
|
|
25
|
-
submitDisabled,
|
|
26
|
-
onSubmit,
|
|
27
|
-
onChangeText,
|
|
28
|
-
onBlur,
|
|
29
|
-
onFocus,
|
|
30
|
-
colorScheme = _studentsFeatures.ColorScheme.Blue,
|
|
31
|
-
placeholder
|
|
32
|
-
}) => {
|
|
33
|
-
const inputRef = (0, _react.useRef)(null);
|
|
34
|
-
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
35
|
-
const widthSv = (0, _reactNativeReanimated.useSharedValue)(value ? FULL_WIDTH : COMPACT_WIDTH);
|
|
36
|
-
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
37
|
-
width: widthSv.value
|
|
38
|
-
}), [widthSv]);
|
|
39
|
-
const handleInputChange = text => {
|
|
40
|
-
if (text.length > MAX_AVAILABLE_MESSAGE_LENGTH) return;
|
|
41
|
-
onChangeText?.(text);
|
|
42
|
-
const hasText = text.trim().length > 0;
|
|
43
|
-
const isExpanded = widthSv.value > COMPACT_WIDTH;
|
|
44
|
-
const shouldCollapseInput = !hasText && isExpanded;
|
|
45
|
-
const shouldExpandInput = hasText && !isExpanded;
|
|
46
|
-
if (shouldExpandInput) {
|
|
47
|
-
widthSv.value = (0, _reactNativeReanimated.withTiming)(FULL_WIDTH, {
|
|
48
|
-
duration: ANIMATION_DURATION
|
|
49
|
-
});
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (shouldCollapseInput) {
|
|
53
|
-
widthSv.value = (0, _reactNativeReanimated.withTiming)(COMPACT_WIDTH, {
|
|
54
|
-
duration: ANIMATION_DURATION
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const handleSendMessage = () => {
|
|
59
|
-
if (submitDisabled || value.trim().length < 1 || value.length > MAX_AVAILABLE_MESSAGE_LENGTH) return;
|
|
60
|
-
onSubmit?.();
|
|
61
|
-
handleInputChange('');
|
|
62
|
-
inputRef.current?.focus();
|
|
63
|
-
};
|
|
64
|
-
const handleOnFocus = e => {
|
|
65
|
-
setIsFocused(true);
|
|
66
|
-
onFocus?.(e);
|
|
67
|
-
};
|
|
68
|
-
const handleOnBlur = e => {
|
|
69
|
-
setIsFocused(false);
|
|
70
|
-
onBlur?.(e);
|
|
71
|
-
};
|
|
72
|
-
(0, _useKeyboard.useKeyBoard)({
|
|
73
|
-
enabled: isFocused,
|
|
74
|
-
callback: event => {
|
|
75
|
-
if (event.key === _constants.KeyboardKeys.ENTER) {
|
|
76
|
-
void handleSendMessage();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
81
|
-
style: [styles.inputWrapper, animatedStyle],
|
|
82
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
83
|
-
ref: inputRef,
|
|
84
|
-
value: value,
|
|
85
|
-
onChangeText: handleInputChange,
|
|
86
|
-
onBlur: handleOnBlur,
|
|
87
|
-
onFocus: handleOnFocus,
|
|
88
|
-
placeholder: placeholder,
|
|
89
|
-
placeholderTextColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
90
|
-
style: styles.input,
|
|
91
|
-
testID: _studentsQa.TEST_IDS.OPEN_CHAT_TEXT_INPUT
|
|
92
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SendMessageButton.SendMessageButton, {
|
|
93
|
-
onPress: handleSendMessage,
|
|
94
|
-
disabled: !!submitDisabled,
|
|
95
|
-
colorScheme: colorScheme
|
|
96
|
-
})]
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
exports.ChatTextInput = ChatTextInput;
|
|
100
|
-
const styles = _reactNative.StyleSheet.create({
|
|
101
|
-
container: {
|
|
102
|
-
position: 'relative',
|
|
103
|
-
width: '100%',
|
|
104
|
-
alignItems: 'flex-end',
|
|
105
|
-
justifyContent: 'center'
|
|
106
|
-
},
|
|
107
|
-
inputWrapper: {
|
|
108
|
-
height: 52,
|
|
109
|
-
position: 'absolute',
|
|
110
|
-
zIndex: 1,
|
|
111
|
-
left: 0,
|
|
112
|
-
flexDirection: 'row',
|
|
113
|
-
borderWidth: 1,
|
|
114
|
-
borderColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
115
|
-
borderRadius: 200,
|
|
116
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
117
|
-
paddingHorizontal: _reactNativeUi.SPACING[100],
|
|
118
|
-
paddingVertical: _reactNativeUi.SPACING[100],
|
|
119
|
-
elevation: 3,
|
|
120
|
-
shadowColor: '#333',
|
|
121
|
-
shadowOffset: {
|
|
122
|
-
width: 0,
|
|
123
|
-
height: 1
|
|
124
|
-
},
|
|
125
|
-
shadowOpacity: 0.25,
|
|
126
|
-
shadowRadius: 3
|
|
127
|
-
},
|
|
128
|
-
input: {
|
|
129
|
-
flex: 1,
|
|
130
|
-
fontSize: 16,
|
|
131
|
-
minWidth: 60,
|
|
132
|
-
minHeight: 22,
|
|
133
|
-
fontWeight: '400',
|
|
134
|
-
fontFamily: _reactNativeUi.FONT_FAMILY.buenosAires,
|
|
135
|
-
paddingHorizontal: _reactNativeUi.SPACING[200],
|
|
136
|
-
paddingVertical: _reactNativeUi.SPACING[200],
|
|
137
|
-
...(_reactNative.Platform.OS === 'web' && {
|
|
138
|
-
outlineStyle: 'none'
|
|
139
|
-
})
|
|
140
|
-
},
|
|
141
|
-
arrowWrapper: {
|
|
142
|
-
marginLeft: _reactNativeUi.SPACING[200]
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
//# sourceMappingURL=ChatTextInput.js.map
|
package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AssessmentScoreCard = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const AssessmentScoreCard = ({
|
|
13
|
-
textContent,
|
|
14
|
-
solvedAmount = 0,
|
|
15
|
-
problemsAmount = 0
|
|
16
|
-
}) => {
|
|
17
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
18
|
-
style: styles.container,
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
20
|
-
style: styles.text,
|
|
21
|
-
children: [solvedAmount, " / ", problemsAmount, " ", textContent.stats?.score ?? 'pt']
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
exports.AssessmentScoreCard = AssessmentScoreCard;
|
|
26
|
-
const styles = _reactNative.StyleSheet.create({
|
|
27
|
-
container: {
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center',
|
|
30
|
-
minHeight: 130,
|
|
31
|
-
minWidth: 410,
|
|
32
|
-
padding: _reactNativeUi.SPACING['400'],
|
|
33
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS['400'],
|
|
34
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
35
|
-
..._reactNativeUi.SHADOWS['1']
|
|
36
|
-
},
|
|
37
|
-
text: {
|
|
38
|
-
fontSize: 96,
|
|
39
|
-
fontWeight: '700',
|
|
40
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9,
|
|
41
|
-
fontFamily: _reactNativeUi.FONT_FAMILY.buenosAires
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=AssessmentScoreCard.js.map
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CheatDetected = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _useKeyboard = require("../../../../shared/hooks/useKeyboard.js");
|
|
11
|
-
var _constants = require("../../../../lib/constants.js");
|
|
12
|
-
var _studentsQa = require("@magmamath/students-qa");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const CheatDetected = ({
|
|
16
|
-
textContent,
|
|
17
|
-
model
|
|
18
|
-
}) => {
|
|
19
|
-
(0, _useKeyboard.useKeyBoard)({
|
|
20
|
-
callback: event => {
|
|
21
|
-
if (event.key === _constants.KeyboardKeys.ENTER) {
|
|
22
|
-
model.hidePopUpAndLeave();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
27
|
-
style: styles.container,
|
|
28
|
-
testID: _studentsQa.TEST_IDS.EOA_CHEAT_DETECTED,
|
|
29
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
30
|
-
variant: "h2",
|
|
31
|
-
style: styles.title,
|
|
32
|
-
children: textContent.title
|
|
33
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
34
|
-
variant: "h1",
|
|
35
|
-
style: styles.description,
|
|
36
|
-
children: textContent.description
|
|
37
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
38
|
-
variant: _reactNativeUi.ButtonVariant.PRIMARY,
|
|
39
|
-
colorScheme: _reactNativeUi.ButtonColor.RED,
|
|
40
|
-
size: _reactNativeUi.ButtonSize.LARGE,
|
|
41
|
-
style: {
|
|
42
|
-
text: styles.buttonText
|
|
43
|
-
},
|
|
44
|
-
onPress: model.hidePopUpAndLeave,
|
|
45
|
-
testID: _studentsQa.TEST_IDS.EOA_LEAVE_BUTTON,
|
|
46
|
-
children: textContent.leftButtonText
|
|
47
|
-
})]
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
exports.CheatDetected = CheatDetected;
|
|
51
|
-
const styles = _reactNative.StyleSheet.create({
|
|
52
|
-
container: {
|
|
53
|
-
flex: 1,
|
|
54
|
-
gap: _reactNativeUi.SPACING[800],
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
justifyContent: 'space-between'
|
|
57
|
-
},
|
|
58
|
-
title: {
|
|
59
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
60
|
-
},
|
|
61
|
-
description: {
|
|
62
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9,
|
|
63
|
-
textAlign: 'center',
|
|
64
|
-
fontWeight: '700'
|
|
65
|
-
},
|
|
66
|
-
buttonText: {
|
|
67
|
-
textTransform: 'uppercase'
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=CheatDetected.js.map
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AnimatedCard = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _GoodDrawingSparks = require("./GoodDrawingSparks.js");
|
|
12
|
-
var _CorrectAnswerSparks = require("./CorrectAnswerSparks.js");
|
|
13
|
-
var _EOABadge = require("../../ui/EOABadge.js");
|
|
14
|
-
var _SparkIcon = require("../../ui/SparkIcon.js");
|
|
15
|
-
var _types = require("../../types.js");
|
|
16
|
-
var _constants = require("../../constants.js");
|
|
17
|
-
var _types2 = require("../../../celebrations/types.js");
|
|
18
|
-
var _Celebrations = require("../../../celebrations/components/Celebrations.js");
|
|
19
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
|
-
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; }
|
|
22
|
-
const AnimatedCard = exports.AnimatedCard = /*#__PURE__*/(0, _react.memo)(({
|
|
23
|
-
variant,
|
|
24
|
-
textContent,
|
|
25
|
-
shouldTriggerSparkles,
|
|
26
|
-
solvedAmount = 0,
|
|
27
|
-
problemsAmount = 0,
|
|
28
|
-
gbdAmount = 0,
|
|
29
|
-
delay = 0,
|
|
30
|
-
onAnimationEnd
|
|
31
|
-
}) => {
|
|
32
|
-
const celebrationsRef = (0, _react.useRef)(null);
|
|
33
|
-
const cardOpacity = (0, _reactNativeReanimated.useSharedValue)(_constants.OPACITY.initial);
|
|
34
|
-
const cardWidth = (0, _reactNativeReanimated.useSharedValue)(_constants.CARD_DIMENSIONS.initialWidth);
|
|
35
|
-
const badgeTranslateX = (0, _reactNativeReanimated.useSharedValue)(_constants.BADGE_PARAMS.initialTranslateX);
|
|
36
|
-
const badgeRotation = (0, _reactNativeReanimated.useSharedValue)(_constants.BADGE_PARAMS.initialRotation);
|
|
37
|
-
const badgeScale = (0, _reactNativeReanimated.useSharedValue)(_constants.BADGE_PARAMS.initialScale);
|
|
38
|
-
const statsOpacity = (0, _reactNativeReanimated.useSharedValue)(_constants.OPACITY.initial);
|
|
39
|
-
const delaySv = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
40
|
-
const starOffsetLeft = gbdAmount > 9 ? 70 : 55;
|
|
41
|
-
const animatedCardStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
42
|
-
const progress = (0, _reactNativeReanimated.interpolate)(statsOpacity.value, [_constants.OPACITY.initial, _constants.OPACITY.final], [_constants.OPACITY.initial, _constants.OPACITY.final]);
|
|
43
|
-
const backgroundColor = (0, _reactNativeReanimated.interpolateColor)(progress, [_constants.OPACITY.initial, _constants.OPACITY.final], [_constants.VARIANT_COLORS[variant].initial, _constants.VARIANT_COLORS[variant].final]);
|
|
44
|
-
const height = (0, _reactNativeReanimated.interpolate)(cardWidth.value, [_constants.CARD_DIMENSIONS.initialWidth, _constants.CARD_DIMENSIONS.finalWidth], [_constants.CARD_DIMENSIONS.initialHeight, _constants.CARD_DIMENSIONS.finalHeight]);
|
|
45
|
-
return {
|
|
46
|
-
opacity: cardOpacity.value,
|
|
47
|
-
width: cardWidth.value,
|
|
48
|
-
height,
|
|
49
|
-
backgroundColor
|
|
50
|
-
};
|
|
51
|
-
}, [statsOpacity, cardOpacity, cardWidth]);
|
|
52
|
-
const animatedBadgeStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
53
|
-
transform: [{
|
|
54
|
-
translateX: badgeTranslateX.value
|
|
55
|
-
}, {
|
|
56
|
-
rotate: `${badgeRotation.value}deg`
|
|
57
|
-
}, {
|
|
58
|
-
scale: badgeScale.value
|
|
59
|
-
}]
|
|
60
|
-
}), [badgeTranslateX, badgeRotation, badgeScale]);
|
|
61
|
-
const animatedStatsStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
62
|
-
return {
|
|
63
|
-
opacity: statsOpacity.value
|
|
64
|
-
};
|
|
65
|
-
}, [statsOpacity]);
|
|
66
|
-
const statsSubtitle = (() => {
|
|
67
|
-
if (variant === _types.AnimatedCardVariant.CORRECT_ANSWER) {
|
|
68
|
-
if (solvedAmount > 1) {
|
|
69
|
-
return textContent.stats?.correctAnswersPlural;
|
|
70
|
-
}
|
|
71
|
-
return textContent.stats?.correctAnswers;
|
|
72
|
-
} else {
|
|
73
|
-
if (gbdAmount > 1) {
|
|
74
|
-
return textContent.stats?.goodCalculationsPlural;
|
|
75
|
-
}
|
|
76
|
-
return textContent.stats?.goodCalculations;
|
|
77
|
-
}
|
|
78
|
-
})();
|
|
79
|
-
const runCelebration = () => {
|
|
80
|
-
if (variant === _types.AnimatedCardVariant.CORRECT_ANSWER) {
|
|
81
|
-
celebrationsRef.current?.play(_types2.CelebrationVariant.CORRECT_FINISH_ASSIGNMENT);
|
|
82
|
-
} else {
|
|
83
|
-
celebrationsRef.current?.play(_types2.CelebrationVariant.GBD_FINISH_ASSIGNMENT);
|
|
84
|
-
}
|
|
85
|
-
onAnimationEnd?.();
|
|
86
|
-
};
|
|
87
|
-
(0, _react.useEffect)(() => {
|
|
88
|
-
(0, _reactNativeReanimated.runOnUI)(() => {
|
|
89
|
-
'worklet';
|
|
90
|
-
|
|
91
|
-
const step3 = () => {
|
|
92
|
-
badgeTranslateX.value = (0, _reactNativeReanimated.withSpring)(_constants.BADGE_PARAMS.finalTranslateX, _constants.SPRING_CONFIG_STEP_3);
|
|
93
|
-
statsOpacity.value = (0, _reactNativeReanimated.withDelay)(80, (0, _reactNativeReanimated.withSpring)(_constants.OPACITY.final, _constants.SPRING_CONFIG_STEP_3));
|
|
94
|
-
};
|
|
95
|
-
const step2 = () => {
|
|
96
|
-
badgeTranslateX.value = (0, _reactNativeReanimated.withSpring)(_constants.BADGE_PARAMS.intermediateTranslateX, _constants.SPRING_CONFIG);
|
|
97
|
-
cardWidth.value = (0, _reactNativeReanimated.withSpring)(_constants.CARD_DIMENSIONS.finalWidth, _constants.SPRING_CONFIG);
|
|
98
|
-
badgeRotation.value = (0, _reactNativeReanimated.withSpring)(0, _constants.SPRING_CONFIG);
|
|
99
|
-
badgeScale.value = (0, _reactNativeReanimated.withSpring)(1, _constants.SPRING_CONFIG, () => {
|
|
100
|
-
delaySv.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
101
|
-
duration: _constants.ANIMATION_DELAYS.step3
|
|
102
|
-
}, () => {
|
|
103
|
-
step3();
|
|
104
|
-
delaySv.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
105
|
-
duration: 100
|
|
106
|
-
}, finished => {
|
|
107
|
-
if (finished) {
|
|
108
|
-
(0, _reactNativeReanimated.runOnJS)(runCelebration)();
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
const step1 = () => {
|
|
115
|
-
cardOpacity.value = (0, _reactNativeReanimated.withDelay)(delay, (0, _reactNativeReanimated.withSpring)(_constants.OPACITY.final, _constants.SPRING_CONFIG, () => {
|
|
116
|
-
step2();
|
|
117
|
-
}));
|
|
118
|
-
};
|
|
119
|
-
step1();
|
|
120
|
-
})();
|
|
121
|
-
}, []);
|
|
122
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
123
|
-
style: styles.cardContainer,
|
|
124
|
-
children: [variant === _types.AnimatedCardVariant.CORRECT_ANSWER ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CorrectAnswerSparks.CorrectAnswerSparks, {
|
|
125
|
-
color: _reactNativeUi.COLORS.GREEN_3,
|
|
126
|
-
shouldStartAnimation: shouldTriggerSparkles
|
|
127
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GoodDrawingSparks.GoodDrawingSparks, {
|
|
128
|
-
color: _reactNativeUi.COLORS.ORANGE_3,
|
|
129
|
-
shouldStartAnimation: shouldTriggerSparkles
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Celebrations.Celebrations, {
|
|
131
|
-
modelRef: celebrationsRef,
|
|
132
|
-
style: styles.celebrations
|
|
133
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
134
|
-
style: [styles.card, animatedCardStyle],
|
|
135
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
136
|
-
style: styles.cardContent,
|
|
137
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
138
|
-
style: [styles.badgeContainer, animatedBadgeStyle],
|
|
139
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EOABadge.EOABadge, {
|
|
140
|
-
variant: variant,
|
|
141
|
-
color: _constants.VARIANT_COLORS[variant].primary,
|
|
142
|
-
size: 88,
|
|
143
|
-
iconSize: 56
|
|
144
|
-
})
|
|
145
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
146
|
-
style: [styles.statsWrapper, animatedStatsStyle],
|
|
147
|
-
children: [variant === _types.AnimatedCardVariant.GOOD_DRAWING && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
148
|
-
style: [styles.starContainer, {
|
|
149
|
-
left: starOffsetLeft
|
|
150
|
-
}],
|
|
151
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SparkIcon.SparkIcon, {
|
|
152
|
-
size: 20,
|
|
153
|
-
color: _constants.VARIANT_COLORS[variant].initial
|
|
154
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
155
|
-
style: styles.starCircle
|
|
156
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SparkIcon.SparkIcon, {
|
|
157
|
-
size: 12,
|
|
158
|
-
color: _constants.VARIANT_COLORS[variant].initial
|
|
159
|
-
})]
|
|
160
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
161
|
-
style: styles.statsValueContainer,
|
|
162
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
163
|
-
variant: "h1",
|
|
164
|
-
style: [styles.largeText, {
|
|
165
|
-
color: _constants.VARIANT_COLORS[variant].primary
|
|
166
|
-
}],
|
|
167
|
-
children: variant === _types.AnimatedCardVariant.CORRECT_ANSWER ? solvedAmount : gbdAmount
|
|
168
|
-
}), variant === _types.AnimatedCardVariant.CORRECT_ANSWER && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeUi.Typography, {
|
|
169
|
-
variant: "h5",
|
|
170
|
-
style: styles.smallText,
|
|
171
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
172
|
-
style: styles.slash,
|
|
173
|
-
children: '/'
|
|
174
|
-
}), problemsAmount]
|
|
175
|
-
})]
|
|
176
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
177
|
-
variant: "h3",
|
|
178
|
-
style: styles.cardTitle,
|
|
179
|
-
children: statsSubtitle
|
|
180
|
-
})]
|
|
181
|
-
})]
|
|
182
|
-
})
|
|
183
|
-
})]
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
const styles = _reactNative.StyleSheet.create({
|
|
187
|
-
cardContainer: {
|
|
188
|
-
height: _constants.CARD_DIMENSIONS.finalHeight,
|
|
189
|
-
width: _constants.CARD_DIMENSIONS.finalWidth,
|
|
190
|
-
justifyContent: 'center',
|
|
191
|
-
alignItems: 'center'
|
|
192
|
-
},
|
|
193
|
-
card: {
|
|
194
|
-
padding: _reactNativeUi.SPACING[200],
|
|
195
|
-
borderRadius: _reactNativeUi.SPACING[400]
|
|
196
|
-
},
|
|
197
|
-
cardContent: {
|
|
198
|
-
flex: 1,
|
|
199
|
-
gap: _reactNativeUi.SPACING[100],
|
|
200
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[200],
|
|
201
|
-
flexDirection: 'row',
|
|
202
|
-
alignItems: 'center',
|
|
203
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
204
|
-
},
|
|
205
|
-
badgeContainer: {
|
|
206
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[400],
|
|
207
|
-
marginRight: 50
|
|
208
|
-
},
|
|
209
|
-
statsWrapper: {
|
|
210
|
-
padding: _reactNativeUi.SPACING[100],
|
|
211
|
-
gap: _reactNativeUi.SPACING[100]
|
|
212
|
-
},
|
|
213
|
-
statsValueContainer: {
|
|
214
|
-
flexDirection: 'row',
|
|
215
|
-
height: _reactNativeUi.IS_MOBILE ? 42 : 'auto',
|
|
216
|
-
paddingHorizontal: _reactNativeUi.SPACING[100],
|
|
217
|
-
marginVertical: _reactNativeUi.SPACING[100]
|
|
218
|
-
},
|
|
219
|
-
largeText: {
|
|
220
|
-
textAlign: 'center',
|
|
221
|
-
textAlignVertical: 'bottom',
|
|
222
|
-
fontSize: _reactNativeUi.IS_MOBILE ? 56 : 60,
|
|
223
|
-
fontWeight: '700',
|
|
224
|
-
lineHeight: _reactNativeUi.IS_MOBILE ? 54 : 46
|
|
225
|
-
},
|
|
226
|
-
slash: {
|
|
227
|
-
paddingRight: 1
|
|
228
|
-
},
|
|
229
|
-
smallText: {
|
|
230
|
-
fontSize: 16,
|
|
231
|
-
fontWeight: '700',
|
|
232
|
-
lineHeight: 16,
|
|
233
|
-
color: _reactNativeUi.COLORS.NEUTRAL_6,
|
|
234
|
-
alignSelf: 'flex-end'
|
|
235
|
-
},
|
|
236
|
-
cardTitle: {
|
|
237
|
-
color: _reactNativeUi.COLORS.NEUTRAL_7,
|
|
238
|
-
padding: _reactNativeUi.SPACING[100]
|
|
239
|
-
},
|
|
240
|
-
starContainer: {
|
|
241
|
-
position: 'absolute',
|
|
242
|
-
top: 10
|
|
243
|
-
},
|
|
244
|
-
starCircle: {
|
|
245
|
-
width: 4,
|
|
246
|
-
height: 4,
|
|
247
|
-
borderRadius: 5,
|
|
248
|
-
backgroundColor: _reactNativeUi.COLORS.ORANGE_2
|
|
249
|
-
},
|
|
250
|
-
celebrations: {
|
|
251
|
-
top: 0,
|
|
252
|
-
zIndex: 100000
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
//# sourceMappingURL=AnimatedCard.js.map
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CorrectAnswer = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _effectorReact = require("effector-react");
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _AnimatedCard = require("./AnimatedCard.js");
|
|
12
|
-
var _PracticeButtonGroup = require("../../ui/PracticeButtonGroup.js");
|
|
13
|
-
var _constants = require("../../constants.js");
|
|
14
|
-
var _types = require("../../types.js");
|
|
15
|
-
var _useKeyboard = require("../../../../shared/hooks/useKeyboard.js");
|
|
16
|
-
var _constants2 = require("../../../../lib/constants.js");
|
|
17
|
-
var _helpers = require("../../helpers.js");
|
|
18
|
-
var _AssessmentScoreCard = require("../AssessmentScoreCard/AssessmentScoreCard.js");
|
|
19
|
-
var _studentsQa = require("@magmamath/students-qa");
|
|
20
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
22
|
-
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; }
|
|
23
|
-
const CorrectAnswer = ({
|
|
24
|
-
textContent,
|
|
25
|
-
model,
|
|
26
|
-
onPracticePress
|
|
27
|
-
}) => {
|
|
28
|
-
const popUpData = (0, _effectorReact.useUnit)(model.$popUpData);
|
|
29
|
-
const modalVariant = (0, _effectorReact.useUnit)(model.$modalVariant);
|
|
30
|
-
const [cardsAnimationCompleted, setCardsAnimationCompleted] = (0, _react.useState)(false);
|
|
31
|
-
const {
|
|
32
|
-
user,
|
|
33
|
-
stats,
|
|
34
|
-
hasRecommendations,
|
|
35
|
-
isExam = false,
|
|
36
|
-
isAssessment = false,
|
|
37
|
-
newerAssignmentAvailable
|
|
38
|
-
} = popUpData ?? {};
|
|
39
|
-
const isPracticeButtonVisible = !!(user?.practiceMode && user.practiceButtonVisible && !newerAssignmentAvailable && (isExam || hasRecommendations));
|
|
40
|
-
const handlePracticeButtonPress = () => {
|
|
41
|
-
onPracticePress?.();
|
|
42
|
-
model.hidePopUp();
|
|
43
|
-
};
|
|
44
|
-
const onCorrectAnswerAnimationEnd = (0, _react.useCallback)(() => {
|
|
45
|
-
if (stats?.goodDrawingAmount === 0) {
|
|
46
|
-
setCardsAnimationCompleted(true);
|
|
47
|
-
}
|
|
48
|
-
}, []);
|
|
49
|
-
const onGBDAnimationEnd = (0, _react.useCallback)(() => {
|
|
50
|
-
setCardsAnimationCompleted(true);
|
|
51
|
-
}, []);
|
|
52
|
-
(0, _useKeyboard.useKeyBoard)({
|
|
53
|
-
callback: event => {
|
|
54
|
-
if (event.key === _constants2.KeyboardKeys.ENTER) {
|
|
55
|
-
isPracticeButtonVisible ? handlePracticeButtonPress() : model.hidePopUpAndLeave();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
60
|
-
testID: _studentsQa.TEST_IDS.EOA_WITH_CORRECT_ANSWER,
|
|
61
|
-
style: [styles.wrapper, modalVariant !== _types.EOAModalVariant.HAS_GOOD_DRAWING && {
|
|
62
|
-
alignItems: 'center'
|
|
63
|
-
}],
|
|
64
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
65
|
-
style: styles.header,
|
|
66
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
67
|
-
variant: "large",
|
|
68
|
-
style: styles.title,
|
|
69
|
-
children: textContent?.title
|
|
70
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
71
|
-
variant: "h4",
|
|
72
|
-
style: styles.subtitle,
|
|
73
|
-
children: `${textContent?.subtitle} ${user?.firstName}!`
|
|
74
|
-
})]
|
|
75
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
76
|
-
style: styles.animationContainer,
|
|
77
|
-
children: [isAssessment ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AssessmentScoreCard.AssessmentScoreCard, {
|
|
78
|
-
textContent: textContent,
|
|
79
|
-
solvedAmount: stats?.solvedAmount,
|
|
80
|
-
problemsAmount: stats?.problemsAmount
|
|
81
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedCard.AnimatedCard, {
|
|
82
|
-
variant: _types.AnimatedCardVariant.CORRECT_ANSWER,
|
|
83
|
-
textContent: textContent,
|
|
84
|
-
solvedAmount: stats?.solvedAmount,
|
|
85
|
-
problemsAmount: stats?.problemsAmount,
|
|
86
|
-
shouldTriggerSparkles: cardsAnimationCompleted,
|
|
87
|
-
onAnimationEnd: onCorrectAnswerAnimationEnd
|
|
88
|
-
}), modalVariant === _types.EOAModalVariant.HAS_GOOD_DRAWING && /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedCard.AnimatedCard, {
|
|
89
|
-
variant: _types.AnimatedCardVariant.GOOD_DRAWING,
|
|
90
|
-
textContent: textContent,
|
|
91
|
-
gbdAmount: stats?.goodDrawingAmount,
|
|
92
|
-
shouldTriggerSparkles: cardsAnimationCompleted,
|
|
93
|
-
onAnimationEnd: onGBDAnimationEnd,
|
|
94
|
-
delay: _constants.GOOD_DRAWING_CARD_APPEARENCE_DELAY
|
|
95
|
-
})]
|
|
96
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PracticeButtonGroup.PracticeButtonGroup, {
|
|
97
|
-
textContent: textContent,
|
|
98
|
-
isPracticeButtonVisible: isPracticeButtonVisible,
|
|
99
|
-
onLeftButtonPress: model.hidePopUpAndLeave,
|
|
100
|
-
onRightButtonPress: handlePracticeButtonPress,
|
|
101
|
-
buttonColor: (0, _helpers.getEoaButtonColor)(popUpData)
|
|
102
|
-
})]
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
exports.CorrectAnswer = CorrectAnswer;
|
|
106
|
-
const styles = _reactNative.StyleSheet.create({
|
|
107
|
-
wrapper: {
|
|
108
|
-
flex: 1,
|
|
109
|
-
gap: _reactNativeUi.SPACING[400]
|
|
110
|
-
},
|
|
111
|
-
header: {
|
|
112
|
-
gap: _reactNativeUi.SPACING[100],
|
|
113
|
-
alignItems: 'center'
|
|
114
|
-
},
|
|
115
|
-
title: {
|
|
116
|
-
fontWeight: '900',
|
|
117
|
-
lineHeight: 54,
|
|
118
|
-
fontSize: 36,
|
|
119
|
-
paddingVertical: _reactNativeUi.SPACING[100],
|
|
120
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9,
|
|
121
|
-
fontFamily: _reactNativeUi.FONT_FAMILY.buenosAires
|
|
122
|
-
},
|
|
123
|
-
subtitle: {
|
|
124
|
-
color: _reactNativeUi.COLORS.NEUTRAL_7,
|
|
125
|
-
paddingVertical: _reactNativeUi.SPACING[100],
|
|
126
|
-
lineHeight: 25
|
|
127
|
-
},
|
|
128
|
-
animationContainer: {
|
|
129
|
-
flex: 1,
|
|
130
|
-
flexDirection: 'row',
|
|
131
|
-
justifyContent: 'center',
|
|
132
|
-
gap: _reactNativeUi.SPACING[800],
|
|
133
|
-
paddingTop: _reactNativeUi.SPACING[800],
|
|
134
|
-
paddingBottom: _reactNativeUi.SPACING[1600]
|
|
135
|
-
},
|
|
136
|
-
buttonsContainer: {
|
|
137
|
-
height: 62,
|
|
138
|
-
flexDirection: 'row',
|
|
139
|
-
alignItems: 'center',
|
|
140
|
-
gap: _reactNativeUi.SPACING[200],
|
|
141
|
-
paddingVertical: _reactNativeUi.SPACING[300]
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
//# sourceMappingURL=CorrectAnswer.js.map
|