@magmamath/students-features 1.3.14 → 1.3.16-rc.22
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/FreeTextInputBlock.js +2 -2
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +2 -2
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +3 -3
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +3 -4
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +4 -2
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +3 -4
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +4 -8
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -1
- package/dist/commonjs/features/feedback/components/EmptyComment.js +2 -2
- package/dist/commonjs/features/feedback/components/EmptyComment.js.map +1 -1
- package/dist/commonjs/features/feedback/model/comments.js +2 -2
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/components/Gif.js +2 -2
- package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/Numpad/Numpad.js +2 -2
- package/dist/commonjs/features/keyboard/components/Numpad/Numpad.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +2 -2
- package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +1 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js +7 -11
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +2 -2
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js +2 -2
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +1 -1
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +2 -2
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +2 -2
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js +2 -2
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js +2 -2
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +1 -1
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js +2 -2
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +2 -2
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +8 -3
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -1
- package/dist/commonjs/features/pmProgress/hooks/useNextUpDomain.js +42 -0
- package/dist/commonjs/features/pmProgress/hooks/useNextUpDomain.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +18 -16
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +1 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +1 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +11 -7
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +2 -2
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +2 -2
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +2 -2
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +2 -2
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -1
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +2 -2
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -1
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +2 -2
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -1
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +7 -7
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/commonjs/i18n/i18n.js +19 -0
- package/dist/commonjs/i18n/i18n.js.map +1 -0
- package/dist/commonjs/i18n/i18next.d.js +5 -0
- package/dist/commonjs/i18n/i18next.d.js.map +1 -0
- package/dist/commonjs/index.js +26 -41
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js +12 -12
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +1 -1
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +2 -3
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +3 -2
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +3 -4
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +5 -9
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -1
- package/dist/module/features/feedback/components/EmptyComment.js +1 -1
- package/dist/module/features/feedback/components/EmptyComment.js.map +1 -1
- package/dist/module/features/feedback/model/comments.js +1 -1
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/gifCelebrations/components/Gif.js +1 -1
- package/dist/module/features/gifCelebrations/components/Gif.js.map +1 -1
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/module/features/keyboard/components/Numpad/Numpad.js +1 -1
- package/dist/module/features/keyboard/components/Numpad/Numpad.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js +1 -1
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -1
- package/dist/module/features/pmProgress/components/header/NextUp.js +7 -11
- package/dist/module/features/pmProgress/components/header/NextUp.js.map +1 -1
- 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/components/header/StartButton.js +1 -1
- package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -1
- package/dist/module/features/pmProgress/components/insights/PmInsights.js +1 -1
- package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +1 -1
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +2 -3
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/Fluency.js +1 -1
- package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/ListCard.js +2 -2
- package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/ListItem.js +2 -2
- package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/PmDomainList.js +1 -1
- package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -1
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js +1 -1
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -1
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +2 -2
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
- package/dist/module/features/pmProgress/components/standard/StandardTag.js +8 -3
- package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -1
- package/dist/module/features/pmProgress/hooks/useNextUpDomain.js +37 -0
- package/dist/module/features/pmProgress/hooks/useNextUpDomain.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js +20 -18
- package/dist/module/features/pmProgress/model/PmTreeModel.js.map +1 -1
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +1 -1
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +3 -1
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +1 -1
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -1
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +1 -1
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -1
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +1 -1
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/module/i18n/i18n.js +12 -0
- package/dist/module/i18n/i18n.js.map +1 -0
- package/dist/module/i18n/i18next.d.js +5 -0
- package/dist/module/i18n/i18next.d.js.map +1 -0
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/helpers/helpers.js +1 -1
- package/dist/module/lib/helpers/helpers.js.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +2 -2
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/header/NextUp.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/hooks/useNextUpDomain.d.ts +5 -0
- package/dist/typescript/commonjs/features/pmProgress/hooks/useNextUpDomain.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +3 -3
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +5 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +2 -2
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -1
- package/dist/typescript/commonjs/i18n/i18n.d.ts +8 -0
- package/dist/typescript/commonjs/i18n/i18n.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +2 -2
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/header/NextUp.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/hooks/useNextUpDomain.d.ts +5 -0
- package/dist/typescript/module/features/pmProgress/hooks/useNextUpDomain.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +3 -3
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +1 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +5 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +2 -2
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -1
- package/dist/typescript/module/i18n/i18n.d.ts +8 -0
- package/dist/typescript/module/i18n/i18n.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +11 -6
- package/src/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.tsx +1 -1
- package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +1 -1
- package/src/features/chatbot/helpers.ts +1 -1
- package/src/features/chatbot/model/ChatBoxTextManager.ts +4 -8
- package/src/features/chatbot/model/DefaultMessageCreator.ts +3 -3
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +3 -4
- package/src/features/exampleSolution/model/ExampleSolutionApi.ts +5 -9
- package/src/features/feedback/components/EmptyComment.tsx +1 -1
- package/src/features/feedback/model/comments.ts +1 -1
- package/src/features/gifCelebrations/components/Gif.tsx +1 -1
- package/src/features/gifCelebrations/helpers.ts +2 -2
- package/src/features/keyboard/components/Numpad/Numpad.tsx +1 -1
- package/src/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.ts +1 -1
- package/src/features/pmProgress/components/chart/components/SlicesPaths.tsx +1 -1
- package/src/features/pmProgress/components/header/NextUp.tsx +7 -14
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +2 -2
- package/src/features/pmProgress/components/header/StartButton.tsx +1 -1
- package/src/features/pmProgress/components/insights/PmInsights.tsx +1 -1
- package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +2 -2
- package/src/features/pmProgress/components/list/Fluency.tsx +1 -1
- package/src/features/pmProgress/components/list/ListCard.tsx +3 -2
- package/src/features/pmProgress/components/list/ListItem.tsx +2 -2
- package/src/features/pmProgress/components/list/PmDomainList.tsx +1 -1
- package/src/features/pmProgress/components/locked/PmStatusOverlay.tsx +4 -12
- package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +2 -2
- package/src/features/pmProgress/components/standard/StandardTag.tsx +4 -3
- package/src/features/pmProgress/hooks/useNextUpDomain.ts +31 -0
- package/src/features/pmProgress/model/PmTreeModel.ts +26 -17
- package/src/features/pmProgress/shared/pmProgress.constants.ts +1 -1
- package/src/features/pmProgress/shared/pmProgress.helpers.ts +13 -2
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +1 -1
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +1 -1
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +1 -1
- package/src/features/voice/recording/modal/ModalFooterButtons.tsx +2 -3
- package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +1 -1
- package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +1 -1
- package/src/features/voice/recording/model/VoiceRecord.model.ts +1 -1
- package/{dist/commonjs/shared/translation/localization/en.json → src/i18n/.generated/schema.json} +67 -62
- package/src/i18n/i18n.ts +13 -0
- package/src/i18n/i18next.d.ts +20 -0
- package/src/index.ts +0 -1
- package/src/lib/helpers/helpers.ts +1 -1
- package/dist/commonjs/lib/types/keys.js +0 -2
- package/dist/commonjs/lib/types/keys.js.map +0 -1
- package/dist/commonjs/shared/translation/constants.js +0 -23
- package/dist/commonjs/shared/translation/constants.js.map +0 -1
- package/dist/commonjs/shared/translation/helpers.js +0 -47
- package/dist/commonjs/shared/translation/helpers.js.map +0 -1
- package/dist/commonjs/shared/translation/hooks.js +0 -25
- package/dist/commonjs/shared/translation/hooks.js.map +0 -1
- package/dist/commonjs/shared/translation/index.js +0 -45
- package/dist/commonjs/shared/translation/index.js.map +0 -1
- package/dist/commonjs/shared/translation/localization/ca.json +0 -85
- package/dist/commonjs/shared/translation/localization/de.json +0 -85
- package/dist/commonjs/shared/translation/localization/gb.json +0 -85
- package/dist/commonjs/shared/translation/localization/sct.json +0 -85
- package/dist/commonjs/shared/translation/localization/sw.json +0 -85
- package/dist/commonjs/shared/translation/model.js +0 -15
- package/dist/commonjs/shared/translation/model.js.map +0 -1
- package/dist/commonjs/shared/translation/types.js +0 -6
- package/dist/commonjs/shared/translation/types.js.map +0 -1
- package/dist/commonjs/shared/translation/validation.types.js +0 -6
- package/dist/commonjs/shared/translation/validation.types.js.map +0 -1
- package/dist/module/lib/types/keys.js +0 -2
- package/dist/module/lib/types/keys.js.map +0 -1
- package/dist/module/shared/translation/constants.js +0 -18
- package/dist/module/shared/translation/constants.js.map +0 -1
- package/dist/module/shared/translation/helpers.js +0 -38
- package/dist/module/shared/translation/helpers.js.map +0 -1
- package/dist/module/shared/translation/hooks.js +0 -19
- package/dist/module/shared/translation/hooks.js.map +0 -1
- package/dist/module/shared/translation/index.js +0 -6
- package/dist/module/shared/translation/index.js.map +0 -1
- package/dist/module/shared/translation/localization/ca.json +0 -85
- package/dist/module/shared/translation/localization/de.json +0 -85
- package/dist/module/shared/translation/localization/en.json +0 -85
- package/dist/module/shared/translation/localization/gb.json +0 -85
- package/dist/module/shared/translation/localization/sct.json +0 -85
- package/dist/module/shared/translation/localization/sw.json +0 -85
- package/dist/module/shared/translation/model.js +0 -11
- package/dist/module/shared/translation/model.js.map +0 -1
- package/dist/module/shared/translation/types.js +0 -4
- package/dist/module/shared/translation/types.js.map +0 -1
- package/dist/module/shared/translation/validation.types.js +0 -4
- package/dist/module/shared/translation/validation.types.js.map +0 -1
- package/dist/typescript/commonjs/lib/types/keys.d.ts +0 -8
- package/dist/typescript/commonjs/lib/types/keys.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -513
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts +0 -7
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts +0 -5
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/index.d.ts +0 -4
- package/dist/typescript/commonjs/shared/translation/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -173
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +0 -6
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +0 -21
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/types/keys.d.ts +0 -8
- package/dist/typescript/module/lib/types/keys.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -513
- package/dist/typescript/module/shared/translation/constants.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/helpers.d.ts +0 -7
- package/dist/typescript/module/shared/translation/helpers.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/hooks.d.ts +0 -5
- package/dist/typescript/module/shared/translation/hooks.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/index.d.ts +0 -4
- package/dist/typescript/module/shared/translation/index.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -173
- package/dist/typescript/module/shared/translation/model.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/types.d.ts +0 -6
- package/dist/typescript/module/shared/translation/types.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +0 -21
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +0 -1
- package/src/lib/types/keys.ts +0 -18
- package/src/shared/translation/constants.ts +0 -16
- package/src/shared/translation/helpers.ts +0 -47
- package/src/shared/translation/hooks.ts +0 -25
- package/src/shared/translation/index.ts +0 -3
- package/src/shared/translation/localization/ca.json +0 -85
- package/src/shared/translation/localization/de.json +0 -85
- package/src/shared/translation/localization/en.json +0 -85
- package/src/shared/translation/localization/gb.json +0 -85
- package/src/shared/translation/localization/sct.json +0 -85
- package/src/shared/translation/localization/sw.json +0 -85
- package/src/shared/translation/model.ts +0 -16
- package/src/shared/translation/types.ts +0 -21
- package/src/shared/translation/validation.types.ts +0 -34
|
@@ -3,34 +3,27 @@ import { StyleSheet, View } from 'react-native'
|
|
|
3
3
|
import { COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
4
|
import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
|
|
5
5
|
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
6
|
-
import {
|
|
7
|
-
import { useUnit, useStoreMap } from 'effector-react'
|
|
6
|
+
import { useUnit } from 'effector-react'
|
|
8
7
|
import { usePmProgress } from '../../context/PmProgressContext'
|
|
9
|
-
import { isFluencyDomain } from '../../shared/pmProgress.helpers'
|
|
10
8
|
import { OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
|
|
11
9
|
import { StartButton } from './StartButton'
|
|
10
|
+
import { useNextUpDomain } from '../../hooks/useNextUpDomain'
|
|
11
|
+
import { useText } from '../../../../i18n/i18n'
|
|
12
12
|
|
|
13
13
|
export const NextUp = () => {
|
|
14
14
|
const t = useText()
|
|
15
15
|
const { model, onStartPress } = usePmProgress()
|
|
16
|
+
const nextUp = useNextUpDomain()
|
|
16
17
|
|
|
17
18
|
const status = useUnit(model.tree.$status)
|
|
18
19
|
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
19
20
|
|
|
20
|
-
const nextUp = useStoreMap(model.tree.$domains, (domains) =>
|
|
21
|
-
domains.find((domain) => {
|
|
22
|
-
const isFluency = isFluencyDomain(domain.title)
|
|
23
|
-
const isDomainCompleted = domain.standards.every((standard) => standard.isCompleted)
|
|
24
|
-
return !isFluency && !isDomainCompleted
|
|
25
|
-
}),
|
|
26
|
-
)
|
|
27
|
-
|
|
28
21
|
const isLoading = loaderOpeningId === OpeningLoaderId.START_BUTTON
|
|
29
22
|
const isSkillOpeningActionPending = !!(loaderOpeningId !== null || status)
|
|
30
23
|
|
|
31
24
|
return (
|
|
32
25
|
<View style={styles.container}>
|
|
33
|
-
{nextUp && !status && (
|
|
26
|
+
{nextUp.domain && !status && (
|
|
34
27
|
<>
|
|
35
28
|
<View style={styles.content}>
|
|
36
29
|
<View style={styles.subtitle}>
|
|
@@ -40,10 +33,10 @@ export const NextUp = () => {
|
|
|
40
33
|
</View>
|
|
41
34
|
<View style={[styles.row, styles.tilted]}>
|
|
42
35
|
<Typography variant={HeadingVariants.H7} style={styles.muted}>
|
|
43
|
-
{nextUp
|
|
36
|
+
{nextUp.domain.title}
|
|
44
37
|
</Typography>
|
|
45
38
|
<View style={styles.diamond}>
|
|
46
|
-
<SliceDiamondIcon color={nextUp
|
|
39
|
+
<SliceDiamondIcon color={nextUp.domain.color} />
|
|
47
40
|
</View>
|
|
48
41
|
</View>
|
|
49
42
|
</View>
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
Typography,
|
|
15
15
|
} from '@magmamath/react-native-ui'
|
|
16
16
|
import { isWeb } from '../../../../shared/common.constants'
|
|
17
|
-
import {
|
|
18
|
-
import { useUnit, useStoreMap } from 'effector-react'
|
|
17
|
+
import { useStoreMap, useUnit } from 'effector-react'
|
|
19
18
|
import { usePmProgress } from '../../context/PmProgressContext'
|
|
20
19
|
import { formatGradeLabel } from '../../shared/pmProgress.helpers'
|
|
21
20
|
import { MenuIcon } from '../../../../shared/icons/MenuIcon'
|
|
22
21
|
import { NextUp } from './NextUp'
|
|
23
22
|
import { BURGER_MENU_BREAKPOINT, MENU_MAX_HEIGHT } from '@magmamath/students-features'
|
|
23
|
+
import { useText } from '../../../../i18n/i18n'
|
|
24
24
|
|
|
25
25
|
const menuItemProps: MenuItemProps = {
|
|
26
26
|
style: {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
export const PmInsights = () => {
|
|
16
16
|
const { model } = usePmProgress()
|
|
17
17
|
const [chartSize, setChartSize] = useState(MAX_PIE_CHART_SIZE)
|
|
18
|
-
const chartData = useStoreMap(model.tree.$
|
|
18
|
+
const chartData = useStoreMap(model.tree.$domainsInGrade, (domains) =>
|
|
19
19
|
domains.map((domain) => ({
|
|
20
20
|
value: 1,
|
|
21
21
|
fillPercent: Math.round(domain.scorePercentage),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
|
+
BORDER_RADIUS,
|
|
4
5
|
COLORS,
|
|
5
6
|
FONT_FAMILY,
|
|
6
7
|
SelectGroup,
|
|
@@ -12,12 +13,11 @@ import {
|
|
|
12
13
|
import { StatsCard } from './StatsCard'
|
|
13
14
|
import { StarIcon } from '../../../../shared/icons/StarIcon'
|
|
14
15
|
import { TimerIcon } from '../../../../shared/icons/TimerIcon'
|
|
15
|
-
import { BORDER_RADIUS } from '@magmamath/react-native-ui'
|
|
16
|
-
import { useText } from '../../../../shared/translation'
|
|
17
16
|
import { useUnit } from 'effector-react'
|
|
18
17
|
import { formatTime } from '../../shared/pmProgress.helpers'
|
|
19
18
|
import { InsightsTimeframe, STATS_MAX_HEIGHT } from '../../shared/pmProgress.constants'
|
|
20
19
|
import { usePmProgress } from '../../context/PmProgressContext'
|
|
20
|
+
import { useText } from '../../../../i18n/i18n'
|
|
21
21
|
|
|
22
22
|
const optionStyle: SelectOptionProps['style'] = {
|
|
23
23
|
text: {
|
|
@@ -3,11 +3,11 @@ import { StyleSheet, View } from 'react-native'
|
|
|
3
3
|
import { ListCard } from './ListCard'
|
|
4
4
|
import { COLORS, SPACING } from '@magmamath/react-native-ui'
|
|
5
5
|
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
6
|
-
import { useText } from '../../../../shared/translation'
|
|
7
6
|
import { useUnit } from 'effector-react'
|
|
8
7
|
import { SolvingFlow } from '../../shared/pmProgress.constants'
|
|
9
8
|
import { Domain } from '../../shared/pmProgress.types'
|
|
10
9
|
import { usePmProgress } from '../../context/PmProgressContext'
|
|
10
|
+
import { useText } from '../../../../i18n/i18n'
|
|
11
11
|
|
|
12
12
|
type FluencyProps = {
|
|
13
13
|
data: Domain | undefined
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { Platform, Pressable, StyleSheet, View, ViewStyle } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
BORDER_RADIUS,
|
|
5
5
|
CaretDownIcon,
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
Typography,
|
|
11
11
|
} from '@magmamath/react-native-ui'
|
|
12
12
|
import { ListItem } from './ListItem'
|
|
13
|
-
import { useText } from '../../../../
|
|
13
|
+
import { useText } from '../../../../i18n/i18n'
|
|
14
|
+
|
|
14
15
|
const HEADER_HEIGHT = 60
|
|
15
16
|
const PROGRESS_BAR_WIDTH = 50
|
|
16
17
|
const PROGRESS_BAR_HEIGHT = 10
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { ActivityIndicator,
|
|
2
|
+
import { ActivityIndicator, Pressable, StyleSheet, Text, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
ArrowRightIcon,
|
|
5
5
|
BORDER_RADIUS,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
SPACING,
|
|
12
12
|
Typography,
|
|
13
13
|
} from '@magmamath/react-native-ui'
|
|
14
|
-
import { useText } from '../../../../
|
|
14
|
+
import { useText } from '../../../../i18n/i18n'
|
|
15
15
|
|
|
16
16
|
const CARD_HEIGHT = 52
|
|
17
17
|
const ICON_SIZE = 25
|
|
@@ -11,7 +11,7 @@ import { SolvingFlow } from '../../shared/pmProgress.constants'
|
|
|
11
11
|
|
|
12
12
|
export const PmDomainList = () => {
|
|
13
13
|
const { model, onStandardPress } = usePmProgress()
|
|
14
|
-
const domains = useUnit(model.tree.$
|
|
14
|
+
const domains = useUnit(model.tree.$domainsInGrade)
|
|
15
15
|
const expandedId = useUnit(model.highlight.$expandedId)
|
|
16
16
|
const hoveredId = useUnit(model.highlight.$hoveredId)
|
|
17
17
|
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react'
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
|
-
import {
|
|
4
|
-
COLORS,
|
|
5
|
-
ErrorIcon,
|
|
6
|
-
HeadingVariants,
|
|
7
|
-
LockIcon,
|
|
8
|
-
SPACING,
|
|
9
|
-
Typography,
|
|
10
|
-
} from '@magmamath/react-native-ui'
|
|
11
|
-
import { useText } from '../../../../shared/translation'
|
|
12
|
-
import { TranslationKeys } from '../../../../shared/translation/types'
|
|
3
|
+
import { COLORS, ErrorIcon, HeadingVariants, LockIcon, SPACING, Typography, } from '@magmamath/react-native-ui'
|
|
13
4
|
import { PmProgressStatus } from '../../shared/pmProgress.constants'
|
|
5
|
+
import { TranslationKey, useText } from '../../../../i18n/i18n'
|
|
14
6
|
|
|
15
7
|
type EmptyStateVariant = {
|
|
16
8
|
icon: ReactNode
|
|
17
9
|
circleColor: string
|
|
18
|
-
titleKey:
|
|
19
|
-
subtitleKey:
|
|
10
|
+
titleKey: TranslationKey
|
|
11
|
+
subtitleKey: TranslationKey
|
|
20
12
|
}
|
|
21
13
|
|
|
22
14
|
const PM_EMPTY_STATE_VARIANTS: Record<PmProgressStatus, EmptyStateVariant> = {
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
SHADOWS,
|
|
12
12
|
SPACING,
|
|
13
13
|
} from '@magmamath/react-native-ui'
|
|
14
|
-
import {
|
|
15
|
-
import { useUnit, useStoreMap } from 'effector-react'
|
|
14
|
+
import { useStoreMap, useUnit } from 'effector-react'
|
|
16
15
|
import { CustomDomain, OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
|
|
17
16
|
import { usePmProgress } from '../../context/PmProgressContext'
|
|
17
|
+
import { useText } from '../../../../i18n/i18n'
|
|
18
18
|
|
|
19
19
|
export const PmTeacherRecs = () => {
|
|
20
20
|
const t = useText()
|
|
@@ -4,6 +4,7 @@ import { PmProgressModel } from '@magmamath/students-features'
|
|
|
4
4
|
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
5
5
|
import { COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
|
|
6
6
|
import { useStoreMap } from 'effector-react'
|
|
7
|
+
import { isWeb } from '../../../../shared/common.constants'
|
|
7
8
|
|
|
8
9
|
type ColorPreset = {
|
|
9
10
|
background: string
|
|
@@ -118,7 +119,7 @@ type StandardTagProps = {
|
|
|
118
119
|
|
|
119
120
|
export const StandardTag = ({ skillId, model }: StandardTagProps) => {
|
|
120
121
|
const standardInfo = useStoreMap({
|
|
121
|
-
store: model.tree.$
|
|
122
|
+
store: model.tree.$domainsInGrade,
|
|
122
123
|
keys: [skillId],
|
|
123
124
|
fn: (domains, [skillId]) => {
|
|
124
125
|
const domain = domains.find((d) => d.standards.some((s) => s.skillIds.includes(skillId)))
|
|
@@ -150,7 +151,7 @@ export const StandardTag = ({ skillId, model }: StandardTagProps) => {
|
|
|
150
151
|
const styles = StyleSheet.create({
|
|
151
152
|
container: {
|
|
152
153
|
minWidth: 110,
|
|
153
|
-
maxWidth: 350,
|
|
154
|
+
maxWidth: isWeb ? 350 : 280,
|
|
154
155
|
paddingHorizontal: 8,
|
|
155
156
|
paddingVertical: 4,
|
|
156
157
|
borderRadius: 12,
|
|
@@ -165,7 +166,7 @@ const styles = StyleSheet.create({
|
|
|
165
166
|
elevation: 2,
|
|
166
167
|
},
|
|
167
168
|
textContainer: {
|
|
168
|
-
flex: 1,
|
|
169
|
+
...(isWeb ? { flex: 1 } : { flexShrink: 1 }),
|
|
169
170
|
flexDirection: 'column',
|
|
170
171
|
justifyContent: 'center',
|
|
171
172
|
alignItems: 'flex-start',
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useUnit, useStoreMap } from 'effector-react'
|
|
2
|
+
import { usePmProgress } from '../context/PmProgressContext'
|
|
3
|
+
import { findDomainBySkillId, isFluencyDomain } from '../shared/pmProgress.helpers'
|
|
4
|
+
|
|
5
|
+
export const useNextUpDomain = () => {
|
|
6
|
+
const { model } = usePmProgress()
|
|
7
|
+
const magmaRecs = useUnit(model.recommendations.$magma)
|
|
8
|
+
const domainsInTree = useUnit(model.tree.$domains)
|
|
9
|
+
|
|
10
|
+
return useStoreMap({
|
|
11
|
+
store: model.tree.$domainsInGrade,
|
|
12
|
+
keys: [magmaRecs, domainsInTree],
|
|
13
|
+
fn: (domainsInGrade) => {
|
|
14
|
+
const firstRec = magmaRecs.items[0]
|
|
15
|
+
if (firstRec) {
|
|
16
|
+
const allDomains = Object.values(domainsInTree).flat()
|
|
17
|
+
const domain = findDomainBySkillId(firstRec._id, allDomains) ?? null
|
|
18
|
+
return { domain, isFromRecommendation: true }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const domain =
|
|
22
|
+
domainsInGrade.find((domain) => {
|
|
23
|
+
const isFluency = isFluencyDomain(domain.title)
|
|
24
|
+
const isDomainCompleted = domain.standards.every((standard) => standard.isCompleted)
|
|
25
|
+
return !isFluency && !isDomainCompleted
|
|
26
|
+
}) ?? null
|
|
27
|
+
|
|
28
|
+
return { domain, isFromRecommendation: false }
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { attach, createEffect, createEvent, createStore, restore, sample } from 'effector'
|
|
1
|
+
import { attach, combine, createEffect, createEvent, createStore, restore, sample } from 'effector'
|
|
2
2
|
import { createAction } from 'effector-action'
|
|
3
3
|
import {
|
|
4
4
|
Domain,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
getInitialPmGrade,
|
|
19
19
|
getTreeGrades,
|
|
20
20
|
isTreeDataReady,
|
|
21
|
+
isTreeDataWithoutGradeReady,
|
|
21
22
|
} from '../shared/pmProgress.helpers'
|
|
22
23
|
import { TreeNormalizer } from '../shared/TreeNormalizer'
|
|
23
24
|
import { persist } from 'effector-storage/session'
|
|
@@ -30,12 +31,14 @@ export class PmTreeModel {
|
|
|
30
31
|
private readonly $user = createStore<User | null>(null)
|
|
31
32
|
|
|
32
33
|
private readonly setupInitialGrade = createEvent<SetupInitialGradeProps>()
|
|
33
|
-
private readonly setDomains = createEvent<Domain[]>()
|
|
34
34
|
public readonly setGrade = createEvent<number | null>()
|
|
35
35
|
|
|
36
36
|
public readonly $isInitialized = createStore(false)
|
|
37
37
|
public readonly $grade = restore(this.setGrade, null)
|
|
38
|
-
public readonly $domains =
|
|
38
|
+
public readonly $domains = createStore<Record<number, Domain[]>>({})
|
|
39
|
+
public readonly $domainsInGrade = combine(this.$domains, this.$grade, (domains, grade) =>
|
|
40
|
+
grade !== null ? (domains[grade] ?? []) : [],
|
|
41
|
+
)
|
|
39
42
|
public readonly $grades = createStore<Grade[]>([])
|
|
40
43
|
public readonly $status = createStore<PmProgressStatus | null>(null)
|
|
41
44
|
|
|
@@ -48,7 +51,7 @@ export class PmTreeModel {
|
|
|
48
51
|
this.setupFailedAndLockedStatus()
|
|
49
52
|
this.setupTreeInit()
|
|
50
53
|
this.setupGradeInit()
|
|
51
|
-
this.
|
|
54
|
+
this.setupDomainsInTree()
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
public readonly initTreeFx = createEffect(async ({ user }: PmProgressGateProps) => {
|
|
@@ -150,22 +153,28 @@ export class PmTreeModel {
|
|
|
150
153
|
})
|
|
151
154
|
}
|
|
152
155
|
|
|
153
|
-
private
|
|
156
|
+
private setupDomainsInTree() {
|
|
154
157
|
sample({
|
|
155
|
-
clock:
|
|
156
|
-
source: { tree: this.$tree, stats: this.$stats, user: this.$user
|
|
157
|
-
filter:
|
|
158
|
-
fn: ({ tree, stats, user
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
grade
|
|
158
|
+
clock: this.initTreeFx.doneData,
|
|
159
|
+
source: { tree: this.$tree, stats: this.$stats, user: this.$user },
|
|
160
|
+
filter: isTreeDataWithoutGradeReady,
|
|
161
|
+
fn: ({ tree, stats, user }) => {
|
|
162
|
+
const treeNodes = Object.values(tree.treeMapping)
|
|
163
|
+
const grades = getTreeGrades(tree, user).filter((g) => !g.isLocked)
|
|
164
|
+
|
|
165
|
+
return Object.fromEntries(
|
|
166
|
+
grades.map((grade) => {
|
|
167
|
+
const [treeWithStats] = enhanceProgressMatrixData(
|
|
168
|
+
treeNodes,
|
|
169
|
+
stats,
|
|
170
|
+
[{ entityId: user._id, name: user.fullName }],
|
|
171
|
+
grade.value,
|
|
172
|
+
)
|
|
173
|
+
return [grade.value, getDomainStructure(treeWithStats, tree.treeMapping)]
|
|
174
|
+
}),
|
|
164
175
|
)
|
|
165
|
-
|
|
166
|
-
return getDomainStructure(treeWithUserStats, tree.treeMapping)
|
|
167
176
|
},
|
|
168
|
-
target: this
|
|
177
|
+
target: this.$domains,
|
|
169
178
|
})
|
|
170
179
|
}
|
|
171
180
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { COLORS } from '@magmamath/react-native-ui'
|
|
2
2
|
import type { ProgressMatrixStatsDto } from '@matteappen/skills-utils/enhanceProgressData/types'
|
|
3
|
+
import type { GradeLabelsMap } from './pmProgress.types'
|
|
3
4
|
import {
|
|
4
5
|
Domain,
|
|
5
6
|
DomainStandard,
|
|
@@ -13,8 +14,7 @@ import {
|
|
|
13
14
|
import { CustomDomain, DOMAIN_BORDER_COLORS, DOMAIN_COLORS } from './pmProgress.constants'
|
|
14
15
|
import { dynamicCornerRadius, dynamicInnerRadius } from '../components/chart/chart.helpers'
|
|
15
16
|
import type { PieChartManagerConfig } from '../components/chart/chart.types'
|
|
16
|
-
import { getText } from '../../../
|
|
17
|
-
import type { GradeLabelsMap } from './pmProgress.types'
|
|
17
|
+
import { getText } from '../../../i18n/i18n'
|
|
18
18
|
|
|
19
19
|
const groupStandardsByDomain = (
|
|
20
20
|
standardStats: ProgressMatrixStatsDto[number]['standardStats'],
|
|
@@ -171,6 +171,14 @@ type TreeDataReady = {
|
|
|
171
171
|
export const isTreeDataReady = (source: TreeDataSource): source is TreeDataReady =>
|
|
172
172
|
source.tree !== null && source.stats !== null && source.user !== null && source.grade !== null
|
|
173
173
|
|
|
174
|
+
type TreeDataWithoutGrade = Omit<TreeDataSource, 'grade'>
|
|
175
|
+
type TreeDataWithoutGradeReady = Omit<TreeDataReady, 'grade'>
|
|
176
|
+
|
|
177
|
+
export const isTreeDataWithoutGradeReady = (
|
|
178
|
+
source: TreeDataWithoutGrade,
|
|
179
|
+
): source is TreeDataWithoutGradeReady =>
|
|
180
|
+
source.tree !== null && source.stats !== null && source.user !== null
|
|
181
|
+
|
|
174
182
|
export const createChartConfig = (size: number): PieChartManagerConfig => {
|
|
175
183
|
const OUTER_MARGIN = 5
|
|
176
184
|
return {
|
|
@@ -261,6 +269,9 @@ export const withoutDuplicates = (skills: (Skill | undefined)[]): Skill[] => {
|
|
|
261
269
|
})
|
|
262
270
|
}
|
|
263
271
|
|
|
272
|
+
export const findDomainBySkillId = (skillId: string, domains: Domain[]): Domain | undefined =>
|
|
273
|
+
domains.find((d) => d.standards.some((s) => s.skillIds.includes(skillId)))
|
|
274
|
+
|
|
264
275
|
// Reorders grades starting from the given grade, wrapping around. [1,2,3] with start=2 → [2,3,1]
|
|
265
276
|
export const startGradesFrom = (grades: Grade[], startGrade: number): Grade[] => {
|
|
266
277
|
const index = grades.findIndex(({ value }) => value === startGrade)
|
|
@@ -24,7 +24,7 @@ import { useVoiceTranscriptionsDropdown } from '../hooks/useVoiceTranscriptionsD
|
|
|
24
24
|
import { VoicePlayerModel, PlayerState } from '../model'
|
|
25
25
|
import { VoiceTranscriptionsDropdownItem } from './VoiceTranscriptionsDropdownItem'
|
|
26
26
|
import { DROPDOWN_MAX_CONTENT_HEIGHT, NO_AUDIO_BE_MESSAGE } from '../../constants'
|
|
27
|
-
import { useText } from '../../../../
|
|
27
|
+
import { useText } from '../../../../i18n/i18n'
|
|
28
28
|
import { PlayButton } from '../../../../shared/components/PlayButton'
|
|
29
29
|
import { getActiveAttempt, getAudioStatus } from '../../helpers'
|
|
30
30
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '@magmamath/react-native-ui'
|
|
13
13
|
import Animated, { runOnJS, useAnimatedReaction } from 'react-native-reanimated'
|
|
14
14
|
import { useVoiceTranscriptionsDropdownItemAnimation } from '../hooks/useVoiceTranscriptionsDropdownItemAnimation'
|
|
15
|
-
import { useText } from '../../../../
|
|
15
|
+
import { useText } from '../../../../i18n/i18n'
|
|
16
16
|
|
|
17
17
|
type VoiceTranscriptionsDropdownItemProps = {
|
|
18
18
|
attempt: number
|
|
@@ -16,8 +16,8 @@ import { Pressable, StyleSheet } from 'react-native'
|
|
|
16
16
|
import { VoiceRecordModel } from '../model/VoiceRecord.model'
|
|
17
17
|
import { useUnit } from 'effector-react'
|
|
18
18
|
import { VOICE_RECORD_SHADOWS, VoiceRecorderState } from '../../constants'
|
|
19
|
-
import { useText } from '../../../../shared/translation'
|
|
20
19
|
import { RecordButtonVariant } from '../../types'
|
|
20
|
+
import { useText } from '../../../../i18n/i18n'
|
|
21
21
|
|
|
22
22
|
type VoiceRecordButtonProps = {
|
|
23
23
|
model: VoiceRecordModel
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Button, ButtonColor, ButtonSize, ButtonVariant, SPACING } from '@magmamath/react-native-ui'
|
|
3
3
|
import { StyleSheet, View } from 'react-native'
|
|
4
|
-
import { useText } from '../../../../
|
|
5
|
-
import { TranslationKeys } from '../../../../shared/translation/types'
|
|
4
|
+
import { TranslationKey, useText } from '../../../../i18n/i18n'
|
|
6
5
|
|
|
7
6
|
type ModalFooterButtonsProps = {
|
|
8
7
|
onCancel: () => void
|
|
9
8
|
onConfirm: () => void
|
|
10
|
-
confirmLabel:
|
|
9
|
+
confirmLabel: TranslationKey
|
|
11
10
|
confirmColor?: ButtonColor
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -3,7 +3,7 @@ import { BaseModal, ButtonColor } from '@magmamath/react-native-ui'
|
|
|
3
3
|
import { StyleSheet } from 'react-native'
|
|
4
4
|
import { useUnit } from 'effector-react'
|
|
5
5
|
import { VoiceRecorderState } from '../../constants'
|
|
6
|
-
import { useText } from '../../../../
|
|
6
|
+
import { useText } from '../../../../i18n/i18n'
|
|
7
7
|
import { ModalFooterButtons } from './ModalFooterButtons'
|
|
8
8
|
import { VoiceRecordModalParams } from '../../types'
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { BaseModal } from '@magmamath/react-native-ui'
|
|
3
3
|
import { StyleSheet } from 'react-native'
|
|
4
|
-
import { useText } from '../../../../
|
|
4
|
+
import { useText } from '../../../../i18n/i18n'
|
|
5
5
|
import { ModalFooterButtons } from './ModalFooterButtons'
|
|
6
6
|
import { VoiceRecordModalParams } from '../../types'
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '../../types'
|
|
11
11
|
import { ensureRecordingPermissions, getAvailableInputs } from '../../helpers'
|
|
12
12
|
import { VOICE_RECORDER_MIN_DURATION_MS } from '../../constants'
|
|
13
|
-
import { t } from '../../../../
|
|
13
|
+
import { getText as t } from '../../../../i18n/i18n'
|
|
14
14
|
|
|
15
15
|
type VoiceRecordModelParams = {
|
|
16
16
|
api: VoiceRecorderApi
|
package/{dist/commonjs/shared/translation/localization/en.json → src/i18n/.generated/schema.json}
RENAMED
|
@@ -1,85 +1,90 @@
|
|
|
1
1
|
{
|
|
2
|
-
"locale": "en-SE",
|
|
3
|
-
"teacherFeedback.noComments": "No comments yet",
|
|
4
|
-
"time.justNow": "just now",
|
|
5
|
-
"time.minuteAgo": "minute ago",
|
|
6
|
-
"time.minutesAgo": "{{count}} minutes ago",
|
|
7
|
-
"time.hourAgo": "hour ago",
|
|
8
|
-
"time.hoursAgo": "{{count}} hours ago",
|
|
9
|
-
"time.dayAgo": "day ago",
|
|
10
|
-
"time.daysAgo": "{{count}} days ago",
|
|
11
|
-
"time.monthAgo": "month ago",
|
|
12
|
-
"time.monthsAgo": "{{count}} months ago",
|
|
13
|
-
"time.yearAgo": "year ago",
|
|
14
|
-
"time.yearsAgo": "{{count}} years ago",
|
|
15
2
|
"chat": {
|
|
16
3
|
"anotherHint": "Give me another hint",
|
|
17
|
-
"getHint": "Get a hint",
|
|
18
|
-
"needHint": "I need a hint",
|
|
19
|
-
"giveHintOpenChat": "I need a hint",
|
|
20
4
|
"answerAgain": "Answer again to get another hint!",
|
|
21
5
|
"errorMessage": "Something went wrong! Try again",
|
|
6
|
+
"getHint": "Get a hint",
|
|
7
|
+
"giveHint": "I need a hint",
|
|
8
|
+
"giveHintOpenChat": "I need a hint",
|
|
22
9
|
"howCanIHelp": "Hi! Do you want help?",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"gifCelebrations": {
|
|
27
|
-
"greatStart": "Great start!",
|
|
28
|
-
"onTheWay": "On the way!",
|
|
29
|
-
"almostThere": "Almost there"
|
|
10
|
+
"inputPlaceholder": "Type...",
|
|
11
|
+
"needHint": "I need a hint",
|
|
12
|
+
"showError": "Show error"
|
|
30
13
|
},
|
|
31
14
|
"exampleSolution": {
|
|
32
|
-
"exampleSolution": "Example solution",
|
|
33
|
-
"letMeThink": "Let me think...",
|
|
34
15
|
"aha": "Aha!",
|
|
35
|
-
"errorMessage": "Something went wrong with generating an example solution"
|
|
16
|
+
"errorMessage": "Something went wrong with generating an example solution",
|
|
17
|
+
"exampleSolution": "Example solution",
|
|
18
|
+
"letMeThink": "Let me think..."
|
|
19
|
+
},
|
|
20
|
+
"gifCelebrations": {
|
|
21
|
+
"almostThere": "Almost there",
|
|
22
|
+
"greatStart": "Great start!",
|
|
23
|
+
"onTheWay": "On the way!"
|
|
36
24
|
},
|
|
37
25
|
"keyboard": {
|
|
38
|
-
"length": "Length",
|
|
39
26
|
"area": "Area",
|
|
27
|
+
"length": "Length",
|
|
28
|
+
"time": "Time",
|
|
40
29
|
"volume": "Volume",
|
|
41
|
-
"weight": "Weight"
|
|
42
|
-
|
|
30
|
+
"weight": "Weight"
|
|
31
|
+
},
|
|
32
|
+
"locale": "en-SE",
|
|
33
|
+
"pmProgress": {
|
|
34
|
+
"allLockedSubtitle": "Your teacher has locked all grades.\nAsk them to unlock grades so you can start practicing.",
|
|
35
|
+
"allLockedTitle": "All grades are locked",
|
|
36
|
+
"allTime": "All time",
|
|
37
|
+
"andMore": "and '{{'count'}}' more...",
|
|
38
|
+
"fluency": "Fluency",
|
|
39
|
+
"grade": "Grade",
|
|
40
|
+
"gradeK": "K",
|
|
41
|
+
"gradeOther": "Other",
|
|
42
|
+
"initErrorSubtitle": "We couldn't load your progress.\nPlease try again later.",
|
|
43
|
+
"initErrorTitle": "Something went wrong",
|
|
44
|
+
"lastWeek": "Last week",
|
|
45
|
+
"loading": "Loading...",
|
|
46
|
+
"nextUp": "Next up!",
|
|
47
|
+
"practiceButton": "PRACTICE",
|
|
48
|
+
"skillLeft": "skill left",
|
|
49
|
+
"skillsLeft": "skills left",
|
|
50
|
+
"stars": "Practice stars",
|
|
51
|
+
"startButton": "START",
|
|
52
|
+
"teacherRecs": "Teacher recommendations",
|
|
53
|
+
"thisWeek": "This week",
|
|
54
|
+
"time": "Practice time",
|
|
55
|
+
"title": "Practice & Progress"
|
|
56
|
+
},
|
|
57
|
+
"teacherFeedback": {
|
|
58
|
+
"noComments": "No comments yet"
|
|
59
|
+
},
|
|
60
|
+
"time": {
|
|
61
|
+
"dayAgo": "day ago",
|
|
62
|
+
"daysAgo": "{{count}} days ago",
|
|
63
|
+
"hourAgo": "hour ago",
|
|
64
|
+
"hoursAgo": "{{count}} hours ago",
|
|
65
|
+
"justNow": "just now",
|
|
66
|
+
"minuteAgo": "minute ago",
|
|
67
|
+
"minutesAgo": "{{count}} minutes ago",
|
|
68
|
+
"monthAgo": "month ago",
|
|
69
|
+
"monthsAgo": "{{count}} months ago",
|
|
70
|
+
"yearAgo": "year ago",
|
|
71
|
+
"yearsAgo": "{{count}} years ago"
|
|
43
72
|
},
|
|
44
73
|
"voice": {
|
|
45
|
-
"
|
|
46
|
-
"youWontBeAbleToRecover": "You won't be able to recover this file once it's gone.",
|
|
47
|
-
"recordingDeleted": "Recording successfully deleted.",
|
|
48
|
-
"delete": "Delete",
|
|
74
|
+
"attempt": "Attempt {{ number }}",
|
|
49
75
|
"cancel": "Cancel",
|
|
76
|
+
"delete": "Delete",
|
|
77
|
+
"deleteRecording": "Delete recording?",
|
|
50
78
|
"noMicrophoneAccess": "No microphone access.",
|
|
51
79
|
"noMicrophoneAccessBySystem": "Microphone access denied by system settings.",
|
|
52
80
|
"noMicrophoneFound": "No microphone found.",
|
|
53
|
-
"
|
|
54
|
-
"redoRecording": "Redo recording?",
|
|
81
|
+
"recordingDeleted": "Recording successfully deleted.",
|
|
55
82
|
"redo": "Redo",
|
|
83
|
+
"redoRecording": "Redo recording?",
|
|
56
84
|
"thisWillRemoveRecording": "This will remove your previous recording.",
|
|
57
85
|
"transcriptions": "Transcriptions",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
"pmProgress": {
|
|
62
|
-
"title": "Practice & Progress",
|
|
63
|
-
"startButton": "START",
|
|
64
|
-
"nextUp": "Next up!",
|
|
65
|
-
"teacherRecs": "Teacher recommendations",
|
|
66
|
-
"practiceButton": "PRACTICE",
|
|
67
|
-
"stars": "Practice stars",
|
|
68
|
-
"time": "Practice time",
|
|
69
|
-
"thisWeek": "This week",
|
|
70
|
-
"lastWeek": "Last week",
|
|
71
|
-
"allTime": "All time",
|
|
72
|
-
"fluency": "Fluency",
|
|
73
|
-
"andMore": "and {{count}} more...",
|
|
74
|
-
"skillsLeft": "skills left",
|
|
75
|
-
"skillLeft": "skill left",
|
|
76
|
-
"grade": "Grade",
|
|
77
|
-
"gradeK": "K",
|
|
78
|
-
"gradeOther": "Other",
|
|
79
|
-
"loading": "Loading...",
|
|
80
|
-
"allLockedTitle": "All grades are locked",
|
|
81
|
-
"allLockedSubtitle": "Your teacher has locked all grades.\nAsk them to unlock grades so you can start practicing.",
|
|
82
|
-
"initErrorTitle": "Something went wrong",
|
|
83
|
-
"initErrorSubtitle": "We couldn't load your progress.\nPlease try again later."
|
|
86
|
+
"transcriptNotAvailable": "Transcript not available",
|
|
87
|
+
"uploadFailed": "Upload failed. Please try again.",
|
|
88
|
+
"youWontBeAbleToRecover": "You won't be able to recover this file once it's gone."
|
|
84
89
|
}
|
|
85
|
-
}
|
|
90
|
+
}
|