@magmamath/students-features 0.9.14-rc.6 → 0.9.91
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/celebrations/helpers.js +1 -4
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +2 -2
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +6 -8
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +3 -4
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +2 -3
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/feedback/model/sockets.js +5 -8
- package/dist/commonjs/features/feedback/model/sockets.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.js +1 -5
- package/dist/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/Keyboard.js +7 -9
- package/dist/commonjs/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/{MainLayout/MainLayout.js → MainLayout.js} +11 -9
- package/dist/commonjs/features/keyboard/components/MainLayout.js.map +1 -0
- package/dist/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js +2 -3
- package/dist/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.js +1 -2
- package/dist/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/{MainLayout/constants.js → constants.js} +1 -1
- package/dist/commonjs/features/keyboard/components/constants.js.map +1 -0
- package/dist/commonjs/features/keyboard/constants/constants.js +2 -3
- package/dist/commonjs/features/keyboard/constants/constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +0 -20
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +0 -7
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/commonjs/features/keyboard/helpers.js +0 -16
- package/dist/commonjs/features/keyboard/helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js +29 -2
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/specialOperators.js +0 -27
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/specialOperators.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js +0 -1
- package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js +5 -28
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/shared/translation/constants.js +1 -3
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +5 -5
- package/dist/commonjs/shared/translation/localization/en.json +5 -5
- package/dist/commonjs/shared/translation/localization/gb.json +5 -5
- package/dist/commonjs/shared/translation/localization/sct.json +5 -5
- package/dist/commonjs/shared/translation/localization/sw.json +5 -5
- package/dist/commonjs/shared/translation/types.js +0 -1
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/features/celebrations/helpers.js +1 -4
- package/dist/module/features/celebrations/helpers.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +2 -2
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +6 -8
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +3 -4
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +2 -3
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/feedback/model/sockets.js +5 -8
- package/dist/module/features/feedback/model/sockets.js.map +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
- package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicLayout/keyboardGroups.js +0 -4
- package/dist/module/features/keyboard/components/BasicLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +1 -1
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/Keyboard.js +4 -6
- package/dist/module/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/module/features/keyboard/components/KeysList/KeysList.js.map +1 -1
- package/dist/module/features/keyboard/components/{MainLayout/MainLayout.js → MainLayout.js} +12 -10
- package/dist/module/features/keyboard/components/MainLayout.js.map +1 -0
- package/dist/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js +2 -3
- package/dist/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.js +1 -2
- package/dist/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/{MainLayout/constants.js → constants.js} +1 -1
- package/dist/module/features/keyboard/components/constants.js.map +1 -0
- package/dist/module/features/keyboard/constants/constants.js +1 -2
- package/dist/module/features/keyboard/constants/constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +1 -21
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardLayouts.js +0 -6
- package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/module/features/keyboard/helpers.js +0 -13
- package/dist/module/features/keyboard/helpers.js.map +1 -1
- package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js +29 -2
- package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
- package/dist/module/features/keyboard/types/MathKeysGroups/specialOperators.js +0 -27
- package/dist/module/features/keyboard/types/MathKeysGroups/specialOperators.js.map +1 -1
- package/dist/module/features/keyboard/types/keyboardGroupIds.js +0 -1
- package/dist/module/features/keyboard/types/keyboardGroupIds.js.map +1 -1
- package/dist/module/lib/helpers/helpers.js +5 -28
- package/dist/module/lib/helpers/helpers.js.map +1 -1
- package/dist/module/shared/translation/constants.js +1 -3
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +5 -5
- package/dist/module/shared/translation/localization/en.json +5 -5
- package/dist/module/shared/translation/localization/gb.json +5 -5
- package/dist/module/shared/translation/localization/sct.json +5 -5
- package/dist/module/shared/translation/localization/sw.json +5 -5
- package/dist/module/shared/translation/types.js +0 -1
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +7 -8
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +1 -11
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +5 -8
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts +1 -4
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/sockets.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts +2 -3
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/{MainLayout/MainLayout.d.ts → MainLayout.d.ts} +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/MainLayout.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts +1 -5
- package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnderlinedLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/constants/constants.d.ts +1 -2
- package/dist/typescript/commonjs/features/keyboard/constants/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/helpers.d.ts +0 -2
- package/dist/typescript/commonjs/features/keyboard/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +18 -0
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/specialOperators.d.ts +0 -18
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/specialOperators.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -42
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +1 -2
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +7 -8
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +1 -11
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +5 -8
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/model.d.ts +1 -4
- package/dist/typescript/module/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/sockets.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/components/BasicLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts +2 -3
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/{MainLayout/MainLayout.d.ts → MainLayout.d.ts} +1 -1
- package/dist/typescript/module/features/keyboard/components/MainLayout.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts +1 -5
- package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnderlinedLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/constants/constants.d.ts +1 -2
- package/dist/typescript/module/features/keyboard/constants/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/helpers.d.ts +0 -2
- package/dist/typescript/module/features/keyboard/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +18 -0
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/specialOperators.d.ts +0 -18
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/specialOperators.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -42
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +1 -2
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/celebrations/helpers.ts +33 -35
- package/src/features/chatbot/components/Chatbot.tsx +2 -2
- package/src/features/chatbot/model/ChatBotModel.ts +5 -10
- package/src/features/chatbot/model/t2s.ts +2 -3
- package/src/features/chatbot/types/api.types.ts +1 -14
- package/src/features/chatbot/types/model.types.ts +5 -12
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +3 -4
- package/src/features/feedback/model/model.ts +1 -4
- package/src/features/feedback/model/sockets.ts +6 -8
- package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +1 -2
- package/src/features/keyboard/components/BasicLayout/BasicLayout.tsx +2 -2
- package/src/features/keyboard/components/BasicLayout/keyboardGroups.ts +0 -4
- package/src/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.tsx +1 -2
- package/src/features/keyboard/components/Keyboard.tsx +7 -19
- package/src/features/keyboard/components/KeysList/KeysList.tsx +1 -1
- package/src/features/keyboard/components/{MainLayout/MainLayout.tsx → MainLayout.tsx} +12 -8
- package/src/features/keyboard/components/UnderlinedLayout/UnderlinedLayout.tsx +2 -7
- package/src/features/keyboard/components/UnderlinedLayout/keyboardGroups.ts +3 -5
- package/src/features/keyboard/components/{MainLayout/constants.ts → constants.ts} +1 -1
- package/src/features/keyboard/constants/constants.ts +1 -3
- package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +0 -21
- package/src/features/keyboard/constants/keyboardLayouts.ts +0 -11
- package/src/features/keyboard/helpers.ts +0 -16
- package/src/features/keyboard/types/MathKeysGroups/basicOperators.tsx +23 -2
- package/src/features/keyboard/types/MathKeysGroups/specialOperators.tsx +0 -21
- package/src/features/keyboard/types/keyboardGroupIds.ts +0 -1
- package/src/lib/helpers/helpers.ts +8 -23
- package/src/shared/translation/constants.ts +0 -2
- package/src/shared/translation/localization/ca.json +5 -5
- package/src/shared/translation/localization/en.json +5 -5
- package/src/shared/translation/localization/gb.json +5 -5
- package/src/shared/translation/localization/sct.json +5 -5
- package/src/shared/translation/localization/sw.json +5 -5
- package/src/shared/translation/types.ts +0 -4
- package/.editorconfig +0 -15
- package/.eslintignore +0 -2
- package/.eslintrc +0 -22
- package/.gitattributes +0 -3
- package/.github/actions/setup/action.yml +0 -37
- package/.github/workflows/ci.yml +0 -73
- package/.gitignore +0 -84
- package/.idea/.gitignore +0 -8
- package/.idea/codeStyles/Project.xml +0 -62
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -8
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -7
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_29_12_2025,_13_10_[Changes]/shelved.patch +0 -18
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_29_12_2025,_13_11_[Changes]/shelved.patch +0 -19
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_29_12_2025__13_10__Changes_.xml +0 -4
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_29_12_2025__13_11__Changes_.xml +0 -4
- package/.idea/students-features.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -648
- package/.nvmrc +0 -1
- package/.prettierrc +0 -11
- package/.release-it.json +0 -17
- package/.watchmanconfig +0 -1
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
- package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +0 -28
- package/.yarn/releases/yarn-3.6.1.cjs +0 -874
- package/babel.config.js +0 -5
- package/bob.config.js +0 -25
- package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js.map +0 -1
- package/dist/commonjs/features/keyboard/components/MainLayout/constants.js.map +0 -1
- package/dist/commonjs/lib/types/requests.js +0 -2
- package/dist/commonjs/lib/types/requests.js.map +0 -1
- package/dist/commonjs/shared/translation/localization/de.json +0 -42
- package/dist/module/features/keyboard/components/MainLayout/MainLayout.js.map +0 -1
- package/dist/module/features/keyboard/components/MainLayout/constants.js.map +0 -1
- package/dist/module/lib/types/requests.js +0 -2
- package/dist/module/lib/types/requests.js.map +0 -1
- package/dist/module/shared/translation/localization/de.json +0 -42
- package/dist/typescript/commonjs/features/keyboard/components/MainLayout/MainLayout.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/MainLayout/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/types/requests.d.ts +0 -4
- package/dist/typescript/commonjs/lib/types/requests.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/MainLayout/MainLayout.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/MainLayout/constants.d.ts.map +0 -1
- package/dist/typescript/module/lib/types/requests.d.ts +0 -4
- package/dist/typescript/module/lib/types/requests.d.ts.map +0 -1
- package/example/.expo/README.md +0 -8
- package/example/.expo/devices.json +0 -3
- package/example/.expo/web/cache/production/images/favicon/favicon-24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb-contain-transparent/favicon-48.png +0 -0
- package/example/app.json +0 -30
- package/example/assets/adaptive-icon.png +0 -0
- package/example/assets/favicon.png +0 -0
- package/example/assets/icon.png +0 -0
- package/example/assets/splash-icon.png +0 -0
- package/example/babel.config.js +0 -28
- package/example/index.js +0 -8
- package/example/metro.config.js +0 -18
- package/example/package.json +0 -25
- package/example/src/App.tsx +0 -8
- package/example/tsconfig.json +0 -6
- package/example/yarn.lock +0 -6552
- package/src/lib/types/requests.ts +0 -1
- package/src/shared/translation/localization/de.json +0 -42
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -34
- package/yarn.lock +0 -8623
- /package/dist/typescript/commonjs/features/keyboard/components/{MainLayout/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/typescript/module/features/keyboard/components/{MainLayout/constants.d.ts → constants.d.ts} +0 -0
|
@@ -209,47 +209,5 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
209
209
|
weight: string;
|
|
210
210
|
};
|
|
211
211
|
};
|
|
212
|
-
"de-DE": {
|
|
213
|
-
locale: string;
|
|
214
|
-
"teacherFeedback.noComments": string;
|
|
215
|
-
"time.justNow": string;
|
|
216
|
-
"time.minuteAgo": string;
|
|
217
|
-
"time.minutesAgo": string;
|
|
218
|
-
"time.hourAgo": string;
|
|
219
|
-
"time.hoursAgo": string;
|
|
220
|
-
"time.dayAgo": string;
|
|
221
|
-
"time.daysAgo": string;
|
|
222
|
-
"time.monthAgo": string;
|
|
223
|
-
"time.monthsAgo": string;
|
|
224
|
-
"time.yearAgo": string;
|
|
225
|
-
"time.yearsAgo": string;
|
|
226
|
-
chat: {
|
|
227
|
-
anotherHint: string;
|
|
228
|
-
giveHint: string;
|
|
229
|
-
giveHintOpenChat: string;
|
|
230
|
-
answerAgain: string;
|
|
231
|
-
errorMessage: string;
|
|
232
|
-
howCanIHelp: string;
|
|
233
|
-
showError: string;
|
|
234
|
-
inputPlaceholder: string;
|
|
235
|
-
};
|
|
236
|
-
gifCelebrations: {
|
|
237
|
-
greatStart: string;
|
|
238
|
-
onTheWay: string;
|
|
239
|
-
almostThere: string;
|
|
240
|
-
};
|
|
241
|
-
exampleSolution: {
|
|
242
|
-
exampleSolution: string;
|
|
243
|
-
letMeThink: string;
|
|
244
|
-
aha: string;
|
|
245
|
-
errorMessage: string;
|
|
246
|
-
};
|
|
247
|
-
keyboard: {
|
|
248
|
-
length: string;
|
|
249
|
-
area: string;
|
|
250
|
-
volume: string;
|
|
251
|
-
weight: string;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
212
|
};
|
|
255
213
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AAKnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,MAAM,CAAA;AAE5F,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,GAAG,WAAW;CACf"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
import { ParticlesBatch } from './components/ParticleBatch'
|
|
2
|
-
import { Spark } from './components/Spark'
|
|
3
|
-
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from './config'
|
|
4
|
-
import { CelebrationVariant } from './types'
|
|
1
|
+
import { ParticlesBatch } from './components/ParticleBatch';
|
|
2
|
+
import { Spark } from './components/Spark';
|
|
3
|
+
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from './config';
|
|
4
|
+
import { CelebrationVariant } from './types';
|
|
5
5
|
|
|
6
|
-
export const randomRange = (min: number, max: number) => Math.random() * (max - min) + min
|
|
6
|
+
export const randomRange = (min: number, max: number) => Math.random() * (max - min) + min;
|
|
7
7
|
|
|
8
8
|
const isDateInRange = (currentDate: Date, startDateStr: string, endDateStr: string) => {
|
|
9
|
-
const [startDay, startMonth] = startDateStr.split('-').map(Number)
|
|
10
|
-
const [endDay, endMonth] = endDateStr.split('-').map(Number)
|
|
9
|
+
const [startDay, startMonth] = startDateStr.split('-').map(Number);
|
|
10
|
+
const [endDay, endMonth] = endDateStr.split('-').map(Number);
|
|
11
11
|
|
|
12
|
-
const currentYear = currentDate.getFullYear()
|
|
13
|
-
const startDate = new Date(currentYear, startMonth - 1, startDay)
|
|
12
|
+
const currentYear = currentDate.getFullYear();
|
|
13
|
+
const startDate = new Date(currentYear, startMonth - 1, startDay);
|
|
14
|
+
const endDate = new Date(currentYear, endMonth - 1, endDay + 1);
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const endDate = new Date(endYear, endMonth - 1, endDay + 1)
|
|
18
|
-
|
|
19
|
-
return currentDate >= startDate && currentDate <= endDate
|
|
20
|
-
}
|
|
16
|
+
return currentDate >= startDate && currentDate <= endDate;
|
|
17
|
+
};
|
|
21
18
|
|
|
22
19
|
export const getIconForCurrentDate = () => {
|
|
23
|
-
const currentDate = new Date()
|
|
20
|
+
const currentDate = new Date();
|
|
24
21
|
|
|
25
22
|
for (const celebration of CELEBRATION_ICON_CONFIG) {
|
|
26
23
|
if (celebration.activePeriod) {
|
|
27
|
-
const { start, end } = celebration.activePeriod
|
|
24
|
+
const { start, end } = celebration.activePeriod;
|
|
28
25
|
if (isDateInRange(currentDate, start, end)) {
|
|
29
|
-
return celebration.Icon
|
|
26
|
+
return celebration.Icon;
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
|
|
34
|
-
return CELEBRATION_ICON_CONFIG[0].Icon
|
|
35
|
-
}
|
|
31
|
+
return CELEBRATION_ICON_CONFIG[0].Icon;
|
|
32
|
+
};
|
|
36
33
|
|
|
37
|
-
const MainIcon = getIconForCurrentDate()
|
|
38
|
-
export const generateParticle = (variant: CelebrationVariant
|
|
34
|
+
const MainIcon = getIconForCurrentDate();
|
|
35
|
+
export const generateParticle = (variant: CelebrationVariant
|
|
36
|
+
) => {
|
|
39
37
|
const {
|
|
40
38
|
elementsCount,
|
|
41
39
|
angle,
|
|
@@ -46,20 +44,20 @@ export const generateParticle = (variant: CelebrationVariant) => {
|
|
|
46
44
|
friction,
|
|
47
45
|
life,
|
|
48
46
|
angularAcceleration,
|
|
49
|
-
speedRange
|
|
50
|
-
} = CELEBRATION_VARIANTS[variant]
|
|
47
|
+
speedRange
|
|
48
|
+
} = CELEBRATION_VARIANTS[variant];
|
|
51
49
|
|
|
52
50
|
const sparkSpeedMin = speedRange?.spark?.[0]
|
|
53
51
|
const sparkSpeedMax = speedRange?.spark?.[1]
|
|
54
52
|
const mainSpeedMin = speedRange?.main?.[0]
|
|
55
53
|
const mainSpeedMax = speedRange?.main?.[1]
|
|
56
54
|
|
|
57
|
-
const particles: ParticlesBatch[] = []
|
|
55
|
+
const particles: ParticlesBatch[] = [];
|
|
58
56
|
|
|
59
57
|
for (let i = 0; i < elementsCount.spark; i++) {
|
|
60
|
-
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180)
|
|
61
|
-
const randomSpeed = randomRange(sparkSpeedMin, sparkSpeedMax)
|
|
62
|
-
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to)
|
|
58
|
+
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180);
|
|
59
|
+
const randomSpeed = randomRange(sparkSpeedMin, sparkSpeedMax);
|
|
60
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
63
61
|
|
|
64
62
|
particles.push({
|
|
65
63
|
id: Math.random(),
|
|
@@ -76,12 +74,12 @@ export const generateParticle = (variant: CelebrationVariant) => {
|
|
|
76
74
|
friction,
|
|
77
75
|
Component: Spark,
|
|
78
76
|
life,
|
|
79
|
-
})
|
|
77
|
+
});
|
|
80
78
|
}
|
|
81
79
|
for (let i = 0; i < elementsCount.star; i++) {
|
|
82
|
-
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180)
|
|
83
|
-
const randomSpeed = randomRange(mainSpeedMin, mainSpeedMax)
|
|
84
|
-
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to)
|
|
80
|
+
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180);
|
|
81
|
+
const randomSpeed = randomRange(mainSpeedMin, mainSpeedMax);
|
|
82
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
85
83
|
|
|
86
84
|
particles.push({
|
|
87
85
|
id: Math.random(),
|
|
@@ -98,8 +96,8 @@ export const generateParticle = (variant: CelebrationVariant) => {
|
|
|
98
96
|
friction,
|
|
99
97
|
Component: MainIcon,
|
|
100
98
|
life,
|
|
101
|
-
})
|
|
99
|
+
});
|
|
102
100
|
}
|
|
103
101
|
|
|
104
|
-
return particles
|
|
105
|
-
}
|
|
102
|
+
return particles;
|
|
103
|
+
};
|
|
@@ -30,14 +30,14 @@ export const Chatbot = ({
|
|
|
30
30
|
iconSize,
|
|
31
31
|
colorScheme = ColorScheme.Blue,
|
|
32
32
|
}: ChatbotProps) => {
|
|
33
|
-
const
|
|
33
|
+
const alternatives = useUnit(model.$alternatives)
|
|
34
34
|
const isAvailable = useStoreMap(model.$currentChatData, ({ isAvailable }) => isAvailable)
|
|
35
35
|
model.t2s.setAudioConfig(textToSpeechConfig ?? null)
|
|
36
36
|
|
|
37
37
|
const openChat = () => model.setIsOpen(true)
|
|
38
38
|
const closeChat = () => model.setIsOpen(false)
|
|
39
39
|
|
|
40
|
-
if (!isAvailable ||
|
|
40
|
+
if (!isAvailable || alternatives?.chatAccess === false) {
|
|
41
41
|
return null
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
restore,
|
|
8
8
|
sample,
|
|
9
9
|
type Store,
|
|
10
|
-
StoreWritable
|
|
11
10
|
} from 'effector'
|
|
12
11
|
import {
|
|
13
12
|
ChatbotContext,
|
|
@@ -75,18 +74,14 @@ export class ChatbotModel {
|
|
|
75
74
|
|
|
76
75
|
private readonly cache = new ChatsCacheModel()
|
|
77
76
|
|
|
78
|
-
public readonly $chatAccess: StoreWritable<boolean>
|
|
79
|
-
|
|
80
77
|
public readonly $currentChatData = combine(
|
|
81
78
|
{ data: this.cache.$data, key: this.$currentKey },
|
|
82
79
|
({ data, key }) => (data[key] ? { ...data[key], key } : { ...defaultChatData(), key }),
|
|
83
80
|
)
|
|
84
81
|
|
|
85
|
-
constructor({ api, $key, threadMessagesLimit, settings = {}
|
|
82
|
+
constructor({ api, $key, threadMessagesLimit, settings = {} }: ChatbotModelProps) {
|
|
86
83
|
this.api = new ChatbotAPI({ ...api, postMessage: this.threadManager.postMessage })
|
|
87
84
|
|
|
88
|
-
this.$chatAccess = chatAccess
|
|
89
|
-
|
|
90
85
|
this.threadManager.setApi({ getHint: api.requestHint, sendMessage: api.sendMessage })
|
|
91
86
|
if (threadMessagesLimit) {
|
|
92
87
|
this.threadManager.setMessagesLimit(threadMessagesLimit)
|
|
@@ -150,16 +145,16 @@ export class ChatbotModel {
|
|
|
150
145
|
}
|
|
151
146
|
|
|
152
147
|
this.startConversation = attach({
|
|
153
|
-
source: { currentChatData: this.$currentChatData,
|
|
148
|
+
source: { currentChatData: this.$currentChatData, alternatives: this.$alternatives },
|
|
154
149
|
mapParams: (props: StartConversationProps | void, source) => ({
|
|
155
150
|
...props,
|
|
156
151
|
...source,
|
|
157
152
|
}),
|
|
158
153
|
effect: createEffect(
|
|
159
|
-
({ currentChatData,
|
|
154
|
+
({ currentChatData, alternatives, initOnly }: StartConversationFxData) => {
|
|
160
155
|
const { key, messages } = currentChatData
|
|
161
156
|
|
|
162
|
-
if (!chatAccess) return
|
|
157
|
+
if (!alternatives?.chatAccess) return
|
|
163
158
|
|
|
164
159
|
if (messages.length) {
|
|
165
160
|
if (initOnly) return
|
|
@@ -176,7 +171,7 @@ export class ChatbotModel {
|
|
|
176
171
|
|
|
177
172
|
this.api.getAlternativesFx.doneData.watch((alternatives) => {
|
|
178
173
|
// Use short text for another hint option if openChatEnabled
|
|
179
|
-
if (alternatives?.isOpenChatEnabled && IS_WEB) {
|
|
174
|
+
if (alternatives?.chatAccess && alternatives?.isOpenChatEnabled && IS_WEB) {
|
|
180
175
|
this.textManager.update((creator) => ({
|
|
181
176
|
anotherHintOption: creator.createOption('chat.giveHintOpenChat'),
|
|
182
177
|
}))
|
|
@@ -86,12 +86,11 @@ export class ChatTextToSpeechModel {
|
|
|
86
86
|
input: { text },
|
|
87
87
|
voice: config?.voice ?? DEFAULT_VOICE,
|
|
88
88
|
audioConfig: config?.audioConfig ?? AUDIO_CONFIG,
|
|
89
|
-
enableTimePointing: [],
|
|
90
89
|
})
|
|
91
90
|
|
|
92
91
|
// Response might be different type based on provided AUDIO_CONFIG
|
|
93
|
-
if (typeof response
|
|
94
|
-
audioPath = `data:audio/mpeg;base64,${response
|
|
92
|
+
if (typeof response === 'string') {
|
|
93
|
+
audioPath = `data:audio/mpeg;base64,${response}`
|
|
95
94
|
} else {
|
|
96
95
|
audioPath = response?.audioContent ?? ''
|
|
97
96
|
}
|
|
@@ -11,9 +11,6 @@ export type AlternativesOptions = {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export type GetAlternativesResponse = {
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated chatAccess depends on assignment.lavaChat or class grade
|
|
16
|
-
*/
|
|
17
14
|
chatAccess?: boolean
|
|
18
15
|
isOpenChatEnabled?: boolean
|
|
19
16
|
version: string
|
|
@@ -59,7 +56,6 @@ export type PostMessageResponse = {
|
|
|
59
56
|
export type GoogleTranslatePayload = {
|
|
60
57
|
text: string[]
|
|
61
58
|
targetLanguage: string
|
|
62
|
-
sourceLanguage?: string
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
export type GoogleTranslateResponse = {
|
|
@@ -81,18 +77,9 @@ export type GoogleText2SpeechPayload = {
|
|
|
81
77
|
pitch: number
|
|
82
78
|
speakingRate: number
|
|
83
79
|
}
|
|
84
|
-
enableTimePointing?: string[]
|
|
85
80
|
}
|
|
86
81
|
|
|
87
|
-
export type
|
|
88
|
-
markName: string
|
|
89
|
-
timeSeconds: number
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export type GoogleText2SpeechResponse = {
|
|
93
|
-
audioContent?: string
|
|
94
|
-
timepoints?: Timepoint[]
|
|
95
|
-
}
|
|
82
|
+
export type GoogleText2SpeechResponse = string | undefined | { audioContent?: string }
|
|
96
83
|
|
|
97
84
|
export type ChatHintPayload = {
|
|
98
85
|
problemDescription: string
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Store
|
|
1
|
+
import type { Store } from 'effector'
|
|
2
2
|
import {
|
|
3
3
|
ChatHintPayload,
|
|
4
4
|
ChatHintResponse,
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from './api.types'
|
|
18
18
|
import { ExtendWithOptional } from '../../../lib/helpers/types'
|
|
19
19
|
import { ChatAnswer, ChatItem, ConversationMessage, FullStrokeData } from './units.types'
|
|
20
|
-
import { WithAbortSignal } from '../../../lib/types/requests'
|
|
21
20
|
|
|
22
21
|
export type ChatbotMessages = {
|
|
23
22
|
error: ConversationMessage
|
|
@@ -28,14 +27,10 @@ export type ChatbotMessages = {
|
|
|
28
27
|
|
|
29
28
|
export type ChatbotApiRequests = {
|
|
30
29
|
getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>
|
|
31
|
-
sendMessage: (props:
|
|
32
|
-
postMessage: (props:
|
|
33
|
-
postTranslateText: (
|
|
34
|
-
|
|
35
|
-
) => Promise<GoogleTranslateResponse>
|
|
36
|
-
postTextToSpeech: (
|
|
37
|
-
props: WithAbortSignal<GoogleText2SpeechPayload>,
|
|
38
|
-
) => Promise<GoogleText2SpeechResponse>
|
|
30
|
+
sendMessage: (props: SendMessagePayload) => Promise<SendMessageResponse>
|
|
31
|
+
postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>
|
|
32
|
+
postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
|
|
33
|
+
postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>
|
|
39
34
|
/**
|
|
40
35
|
* @deprecated merged with hint
|
|
41
36
|
*/
|
|
@@ -52,7 +47,6 @@ export type ChatbotModelProps = {
|
|
|
52
47
|
requestHint: (props: ChatHintPayload) => Promise<ChatHintResponse>
|
|
53
48
|
}
|
|
54
49
|
threadMessagesLimit?: number
|
|
55
|
-
chatAccess: StoreWritable<boolean>
|
|
56
50
|
settings?: ChatbotSettings
|
|
57
51
|
}
|
|
58
52
|
|
|
@@ -83,7 +77,6 @@ export type StartConversationFxData = {
|
|
|
83
77
|
messages: ConversationMessage[]
|
|
84
78
|
}
|
|
85
79
|
alternatives?: GetAlternativesResponse | null
|
|
86
|
-
chatAccess: boolean
|
|
87
80
|
} & StartConversationProps
|
|
88
81
|
|
|
89
82
|
export enum MessageVariant {
|
|
@@ -11,6 +11,7 @@ import Animated, {
|
|
|
11
11
|
import { ButtonVariant, SPACING, Button, ButtonSize, ButtonColor } from '@magmamath/react-native-ui'
|
|
12
12
|
|
|
13
13
|
import { PracticeButton } from './PracticeButton'
|
|
14
|
+
import { getEoaButtonColor } from '../helpers'
|
|
14
15
|
|
|
15
16
|
type PracticeButtonGroupProps = {
|
|
16
17
|
textContent: { leftButtonText?: string; rightButtonText?: string }
|
|
@@ -20,8 +21,6 @@ type PracticeButtonGroupProps = {
|
|
|
20
21
|
buttonColor?: ButtonColor
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
const APPEARANCE_DELAY = 1600
|
|
24
|
-
|
|
25
24
|
export const PracticeButtonGroup = ({
|
|
26
25
|
textContent,
|
|
27
26
|
isPracticeButtonVisible,
|
|
@@ -32,7 +31,7 @@ export const PracticeButtonGroup = ({
|
|
|
32
31
|
const buttonsContainerOpacity = useSharedValue(0)
|
|
33
32
|
|
|
34
33
|
useEffect(() => {
|
|
35
|
-
buttonsContainerOpacity.value = withDelay(
|
|
34
|
+
buttonsContainerOpacity.value = withDelay(1000, withTiming(1, { duration: 500 }))
|
|
36
35
|
}, [])
|
|
37
36
|
|
|
38
37
|
return (
|
|
@@ -40,7 +39,7 @@ export const PracticeButtonGroup = ({
|
|
|
40
39
|
<Animated.View
|
|
41
40
|
entering={
|
|
42
41
|
isPracticeButtonVisible
|
|
43
|
-
? FadeInRight.delay(
|
|
42
|
+
? FadeInRight.delay(1000).duration(500).easing(Easing.ease)
|
|
44
43
|
: FadeInUp.duration(500)
|
|
45
44
|
}
|
|
46
45
|
>
|
|
@@ -11,10 +11,7 @@ export type TeacherFeedbackModelProps = {
|
|
|
11
11
|
getComments: (props: GetCommentsPayload) => Promise<GetCommentsResponse>
|
|
12
12
|
updateCommentStatusSeen: (props: UpdateCommentStatusSeenPayload) => Promise<void>
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
* @deprecated - use socket and events directly in the client
|
|
16
|
-
*/
|
|
17
|
-
socket?: any
|
|
14
|
+
socket: any
|
|
18
15
|
credits: {
|
|
19
16
|
$assignmentId: Store<string>
|
|
20
17
|
$problemId: Store<string>
|
|
@@ -2,23 +2,21 @@ import { createEvent } from 'effector'
|
|
|
2
2
|
import { TeacherComment, FeedbackSocketEvents } from '../types'
|
|
3
3
|
|
|
4
4
|
export class TeacherFeedbackSockets {
|
|
5
|
-
private readonly socket: any
|
|
5
|
+
private readonly socket: any
|
|
6
6
|
public readonly commentAdded = createEvent<TeacherComment>()
|
|
7
7
|
public readonly commentDeleted = createEvent<TeacherComment>()
|
|
8
8
|
|
|
9
9
|
constructor(socket: any) {
|
|
10
|
-
|
|
11
|
-
this.socket = socket
|
|
12
|
-
}
|
|
10
|
+
this.socket = socket
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
connect() {
|
|
16
|
-
this.socket
|
|
17
|
-
this.socket
|
|
14
|
+
this.socket.on(FeedbackSocketEvents.COMMENT_ADDED, this.commentAdded)
|
|
15
|
+
this.socket.on(FeedbackSocketEvents.COMMENT_DELETED, this.commentDeleted)
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
off() {
|
|
21
|
-
this.socket
|
|
22
|
-
this.socket
|
|
19
|
+
this.socket.off(FeedbackSocketEvents.COMMENT_ADDED, this.commentAdded)
|
|
20
|
+
this.socket.off(FeedbackSocketEvents.COMMENT_DELETED, this.commentDeleted)
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -4,12 +4,11 @@ import { StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
|
4
4
|
import { COLORS, SelectGroup, SelectOptionSize, IS_MOBILE } from '@magmamath/react-native-ui'
|
|
5
5
|
import { Locale, useText } from '../../../../shared/translation'
|
|
6
6
|
import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
|
|
7
|
+
import { MOBILE_LAYOUT_WIDTH } from '../../constants/constants'
|
|
7
8
|
import { SelectedLayout } from './types'
|
|
8
9
|
import { getKeyboardGroup } from '../../helpers'
|
|
9
10
|
import { getSelectOptions } from './helpers'
|
|
10
11
|
|
|
11
|
-
const MOBILE_LAYOUT_WIDTH = 1300
|
|
12
|
-
|
|
13
12
|
export const AlgebraLayout = ({ onLayoutChange, ...props }: KeyboardLayoutProps) => {
|
|
14
13
|
const [selectedLayout, setSelectedLayout] = useState<SelectedLayout>(SelectedLayout.BASIC)
|
|
15
14
|
const t = useText()
|
|
@@ -2,17 +2,17 @@ import React, { PropsWithChildren } from 'react'
|
|
|
2
2
|
import { KeysList } from '../KeysList/KeysList'
|
|
3
3
|
import { StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
4
4
|
import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
|
|
5
|
+
import { MOBILE_LAYOUT_WIDTH } from '../../constants/constants'
|
|
5
6
|
import { Locale, useText } from '../../../../shared/translation'
|
|
6
7
|
import { KEYBOARD_GROUPS_BY_LOCALE } from '../../constants/keyboardGroupsByLocale'
|
|
7
8
|
import { IS_MOBILE } from '@magmamath/react-native-ui'
|
|
8
|
-
import { BASIC_MOBILE_LAYOUT_WIDTH } from '../../constants/constants'
|
|
9
9
|
|
|
10
10
|
export const BasicLayout = (props: KeyboardLayoutProps & PropsWithChildren) => {
|
|
11
11
|
const t = useText()
|
|
12
12
|
const keysByLocale = KEYBOARD_GROUPS_BY_LOCALE[t('locale') as Locale][KeyboardType.Basic]
|
|
13
13
|
const keys = props.children ? keysByLocale.keys : keysByLocale.keys.slice(0, -1)
|
|
14
14
|
const { width } = useWindowDimensions()
|
|
15
|
-
const isMobile = width <=
|
|
15
|
+
const isMobile = width <= MOBILE_LAYOUT_WIDTH || IS_MOBILE
|
|
16
16
|
|
|
17
17
|
if (isMobile && !props.children) {
|
|
18
18
|
return null
|
|
@@ -58,7 +58,3 @@ export const MATH_CURRENCY_US_KEYBOARD_GROUP: KeyboardGroup = {
|
|
|
58
58
|
id: MathEntryKeyboardGroupId.CURRENCY_US,
|
|
59
59
|
keys: [MATH_CURRENCY_UNITS.DOLLAR, MATH_CURRENCY_UNITS.CENT],
|
|
60
60
|
}
|
|
61
|
-
export const MATH_CURRENCY_DE_KEYBOARD_GROUP: KeyboardGroup = {
|
|
62
|
-
id: MathEntryKeyboardGroupId.CURRENCY_DE,
|
|
63
|
-
keys: [MATH_CURRENCY_UNITS.EURO, MATH_CURRENCY_UNITS.DOLLAR, MATH_CURRENCY_UNITS.POUND],
|
|
64
|
-
}
|
|
@@ -3,11 +3,10 @@ import { StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
|
3
3
|
import { KeysList } from '../KeysList/KeysList'
|
|
4
4
|
import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
|
|
5
5
|
import { Locale, useText } from '../../../../shared/translation'
|
|
6
|
+
import { MOBILE_LAYOUT_WIDTH } from '../../constants/constants'
|
|
6
7
|
import { getKeyboardGroup } from '../../helpers'
|
|
7
8
|
import { IS_MOBILE } from '@magmamath/react-native-ui'
|
|
8
9
|
|
|
9
|
-
const MOBILE_LAYOUT_WIDTH = 1220
|
|
10
|
-
|
|
11
10
|
export const BasicPlusPlusLayout = (props: KeyboardLayoutProps) => {
|
|
12
11
|
const t = useText()
|
|
13
12
|
const { width } = useWindowDimensions()
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef } from 'react'
|
|
2
2
|
import { Animated, StyleProp, StyleSheet, useWindowDimensions, ViewStyle } from 'react-native'
|
|
3
3
|
import { COLORS, IS_MOBILE, IS_WEB, SelectOptionColor, SHADOWS } from '@magmamath/react-native-ui'
|
|
4
|
-
import { KeyboardKey, KeyboardKeyValue
|
|
4
|
+
import { KeyboardKey, KeyboardKeyValue } from '../types/types'
|
|
5
5
|
import { Numpad } from './Numpad/Numpad'
|
|
6
|
-
import {
|
|
6
|
+
import { MOBILE_LAYOUT_WIDTH } from '../constants/constants'
|
|
7
7
|
import {
|
|
8
8
|
getLayoutConfigStyles,
|
|
9
9
|
KEYBOARD_SLIDE_DISTANCE,
|
|
10
10
|
slideInAnimationSettings,
|
|
11
|
-
} from './
|
|
12
|
-
import {
|
|
13
|
-
import { KEYBOARD_LAYOUTS } from '../constants/keyboardLayouts'
|
|
14
|
-
import { isBasicLayout, isMobileWidth } from '../helpers'
|
|
11
|
+
} from './constants'
|
|
12
|
+
import { MainLayout } from './MainLayout'
|
|
15
13
|
|
|
16
14
|
type KeyboardProps = {
|
|
17
15
|
onKeyPress: (key: KeyboardKeyValue) => void
|
|
@@ -19,21 +17,15 @@ type KeyboardProps = {
|
|
|
19
17
|
style?: StyleProp<ViewStyle>
|
|
20
18
|
color?: SelectOptionColor
|
|
21
19
|
isDisabled?: boolean
|
|
22
|
-
isMainLayoutDisabled?: boolean
|
|
23
20
|
showUnderlinedKeys?: boolean
|
|
24
21
|
disabledKeys?: KeyboardKey[]
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
export const Keyboard = ({
|
|
28
|
-
style,
|
|
29
|
-
characterType,
|
|
30
|
-
isMainLayoutDisabled,
|
|
31
|
-
...props
|
|
32
|
-
}: KeyboardProps) => {
|
|
24
|
+
export const Keyboard = ({ style, characterType, ...props }: KeyboardProps) => {
|
|
33
25
|
const slideAnim = useRef(new Animated.Value(KEYBOARD_SLIDE_DISTANCE)).current
|
|
34
26
|
|
|
35
27
|
const { width } = useWindowDimensions()
|
|
36
|
-
const isMobile =
|
|
28
|
+
const isMobile = width <= MOBILE_LAYOUT_WIDTH || IS_MOBILE
|
|
37
29
|
const mobileStyles = useMemo(
|
|
38
30
|
() => getLayoutConfigStyles(characterType, isMobile),
|
|
39
31
|
[characterType, isMobile],
|
|
@@ -62,11 +54,7 @@ export const Keyboard = ({
|
|
|
62
54
|
},
|
|
63
55
|
]}
|
|
64
56
|
>
|
|
65
|
-
<MainLayout
|
|
66
|
-
{...props}
|
|
67
|
-
isDisabled={isMainLayoutDisabled || props.isDisabled}
|
|
68
|
-
characterType={characterType}
|
|
69
|
-
/>
|
|
57
|
+
<MainLayout {...props} characterType={characterType} />
|
|
70
58
|
<Numpad {...props} style={mobileStyles} />
|
|
71
59
|
</Animated.View>
|
|
72
60
|
)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState, useCallback } from 'react'
|
|
2
|
-
import { Animated, StyleSheet, View } from 'react-native'
|
|
2
|
+
import { Animated, StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
3
3
|
import { SelectOptionColor, IS_MOBILE, IS_WEB } from '@magmamath/react-native-ui'
|
|
4
|
-
import { getLayoutByCharType
|
|
5
|
-
import { KeyboardKey, KeyboardKeyValue } from '
|
|
6
|
-
import { UnderlinedLayout } from '
|
|
4
|
+
import { getLayoutByCharType } from '../constants/keyboardLayouts'
|
|
5
|
+
import { KeyboardKey, KeyboardKeyValue } from '../types/types'
|
|
6
|
+
import { UnderlinedLayout } from './UnderlinedLayout/UnderlinedLayout'
|
|
7
|
+
import { MOBILE_LAYOUT_WIDTH } from '../constants/constants'
|
|
7
8
|
|
|
8
9
|
type LayoutProps = {
|
|
9
10
|
onKeyPress: (key: KeyboardKeyValue) => void
|
|
@@ -26,8 +27,11 @@ export const MainLayout = ({
|
|
|
26
27
|
const fadeAnim = useRef(new Animated.Value(showUnderlinedKeys ? 1 : 0)).current
|
|
27
28
|
const fadeRef = useRef<Animated.CompositeAnimation | null>(null)
|
|
28
29
|
|
|
30
|
+
const { width } = useWindowDimensions()
|
|
31
|
+
const isMobile = width <= MOBILE_LAYOUT_WIDTH || IS_MOBILE
|
|
32
|
+
|
|
29
33
|
const Layout = useMemo(() => getLayoutByCharType(characterType), [characterType])
|
|
30
|
-
const isUnderlinedLayoutVisible = isUnderlinedVisible && !isSecondaryLayoutSelected && !
|
|
34
|
+
const isUnderlinedLayoutVisible = isUnderlinedVisible && !isSecondaryLayoutSelected && !isMobile
|
|
31
35
|
|
|
32
36
|
const animateFade = useCallback(
|
|
33
37
|
(toValue: number, onComplete?: () => void) => {
|
|
@@ -56,11 +60,11 @@ export const MainLayout = ({
|
|
|
56
60
|
}, [showUnderlinedKeys, animateFade])
|
|
57
61
|
|
|
58
62
|
return (
|
|
59
|
-
<View style={
|
|
63
|
+
<View style={styles.container}>
|
|
60
64
|
<Layout {...props} onLayoutChange={setIsSecondaryLayoutSelected} />
|
|
61
65
|
{isUnderlinedLayoutVisible && (
|
|
62
66
|
<Animated.View style={{ opacity: fadeAnim }}>
|
|
63
|
-
<UnderlinedLayout {...props}
|
|
67
|
+
<UnderlinedLayout {...props} />
|
|
64
68
|
</Animated.View>
|
|
65
69
|
)}
|
|
66
70
|
</View>
|
|
@@ -69,6 +73,6 @@ export const MainLayout = ({
|
|
|
69
73
|
|
|
70
74
|
const styles = StyleSheet.create({
|
|
71
75
|
container: {
|
|
72
|
-
|
|
76
|
+
flex: 1,
|
|
73
77
|
},
|
|
74
78
|
})
|
|
@@ -4,14 +4,9 @@ import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
|
|
|
4
4
|
import { Locale, useText } from '../../../../shared/translation'
|
|
5
5
|
import { getKeyboardGroup } from '../../helpers'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
showSlashKey?: boolean
|
|
9
|
-
} & KeyboardLayoutProps
|
|
10
|
-
|
|
11
|
-
export const UnderlinedLayout = (props: UnderlinedLayoutProps) => {
|
|
7
|
+
export const UnderlinedLayout = (props: KeyboardLayoutProps) => {
|
|
12
8
|
const t = useText()
|
|
13
9
|
const keysGroup = getKeyboardGroup(t('locale') as Locale, KeyboardType.Underlined)
|
|
14
|
-
const keys = props.showSlashKey ? keysGroup.keys : keysGroup.keys.slice(0, -1)
|
|
15
10
|
|
|
16
|
-
return <KeysList keys={keys} numOfRows={
|
|
11
|
+
return <KeysList keys={keysGroup.keys} numOfRows={keysGroup.keys.length} {...props} />
|
|
17
12
|
}
|