@nualang/nualang-ui-components 0.1.1393 → 0.1.1395
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/README.md +66 -26
- package/dist/Assignments/AssignmentBotSelection/AssignmentBotSelection.js +15 -9
- package/dist/Assignments/AssignmentCard/AssignmentCard.js +44 -24
- package/dist/Assignments/AssignmentCardsList/AssignmentCardsList.js +26 -18
- package/dist/Assignments/AssignmentCourseSelection/AssignmentCourseSelection.js +18 -8
- package/dist/Assignments/AssignmentExerciseSelection/AssignmentExerciseSelection.js +60 -34
- package/dist/Assignments/AssignmentPhraseListSelection/AssignmentPhraseListSelection.js +15 -9
- package/dist/Assignments/AssignmentRoleplaySelection/AssignmentRoleplaySelection.js +32 -20
- package/dist/Assignments/AssignmentSelectExercise/AssignmentSelectExercise.js +3 -1
- package/dist/Assignments/CreateAssignmentDialog/CreateAssignmentDialog.js +20 -12
- package/dist/Cards/Bot/Bot.js +6 -2
- package/dist/Cards/Classroom/Classroom.js +6 -2
- package/dist/Cards/Course/Course.js +6 -2
- package/dist/Cards/FeedbackCard/FeedbackCard.js +25 -15
- package/dist/Cards/RecordingCard/RecordingCard.js +9 -7
- package/dist/Cards/Roleplay/Roleplay.js +6 -2
- package/dist/Cards/ScheduleCard/ScheduleCard.js +5 -3
- package/dist/Cards/SubmissionsCard/SubmissionsCard.js +4 -2
- package/dist/Cards/SubscriptionPlan/SubscriptionPlan.js +9 -5
- package/dist/Cards/Topic/Topic.js +6 -2
- package/dist/Charts/Bar/TotalGrades/TotalGrades.js +4 -2
- package/dist/Charts/Doughnut/RecordingAttendance/RecordingAttendance.js +4 -2
- package/dist/Charts/Doughnut/SubmittedRecordings/SubmittedRecordings.js +4 -2
- package/dist/Chat/ChatLoading/ChatLoading.js +6 -4
- package/dist/Chat/Messages/Message/Message.js +22 -12
- package/dist/Chat/Messages/Question/Question.js +5 -3
- package/dist/Containers/App/App.js +3 -1
- package/dist/Dialogs/AvatarDialog/AvatarDialog.js +4 -2
- package/dist/Dialogs/BotPreview/BotPreview.js +3 -1
- package/dist/Dialogs/Code/Code.js +5 -3
- package/dist/Dialogs/CreatePhrase/CreatePhrase.js +16 -49
- package/dist/Dialogs/CreatePhraseGroupDialog/CreatePhraseGroupDialog.js +16 -10
- package/dist/Dialogs/CreateQuestion/CreateQuestion.js +7 -3
- package/dist/Dialogs/CreateTopic/CreateTopic.js +8 -4
- package/dist/Dialogs/DynamicAIWarning/DynamicAIWarning.js +38 -22
- package/dist/Dialogs/Feedback/FeedbackDialog.js +9 -5
- package/dist/Dialogs/GenerateBot/GenerateBot.js +37 -29
- package/dist/Dialogs/GenerateDefinitions/GenerateDefinitions.js +23 -11
- package/dist/Dialogs/GenerateDiscussion/GenerateDiscussion.js +25 -17
- package/dist/Dialogs/GeneratePhrases/GeneratePhrases.js +34 -24
- package/dist/Dialogs/GenerateQuestion/GenerateQuestion.js +17 -9
- package/dist/Dialogs/GenerateRoleplay/GenerateRoleplay.js +73 -47
- package/dist/Dialogs/GroupedFeedbackDialog/GroupedFeedbackDialog.js +13 -9
- package/dist/Dialogs/InviteDialog/InviteDialog.js +26 -14
- package/dist/Dialogs/PDFViewer/PDFViewer.js +28 -21
- package/dist/Dialogs/RecordingDialog/RecordingDialog.js +1 -1
- package/dist/Dialogs/ReportProblem/ReportProblem.js +19 -9
- package/dist/Dialogs/ResponsiveDialog/ResponsiveDialog.js +3 -1
- package/dist/Dialogs/RewardEarned/RewardEarned.js +3 -1
- package/dist/Dialogs/SearchTopic/SearchTopic.js +7 -3
- package/dist/Dialogs/SelectExercise/SelectExercise.js +3 -1
- package/dist/Dialogs/TransferPhrase/TransferPhrase.js +4 -2
- package/dist/Dialogs/Trigger/Trigger.js +4 -2
- package/dist/Dialogs/UploadBotVars/UploadBotVars.js +11 -5
- package/dist/Dialogs/UploadPhrases/UploadPhrases.js +79 -23
- package/dist/Dialogs/UploadRoleplayScript/UploadRoleplayScript.js +13 -5
- package/dist/Dialogs/UploadVideo/UploadVideo.js +6 -2
- package/dist/Dialogs/WaveformDialog/WaveformDialog.js +10 -9
- package/dist/Editors/Bot/Bot.js +9 -3
- package/dist/Editors/Bot/Editor/BotDesigner/AlternativesList.js +7 -3
- package/dist/Editors/Bot/Editor/BotDesigner/VarList.js +47 -23
- package/dist/Editors/Bot/Editor/Editor.js +15 -7
- package/dist/Editors/PhraseList/PhraseList.js +3 -1
- package/dist/Editors/Phrases/SpreadsheetEditor/SpreadsheetEditor.js +6 -2
- package/dist/Editors/Roleplay/Roleplay.js +9 -3
- package/dist/Exercises/Bot/Bot.js +7 -3
- package/dist/Exercises/Listener/Listener.js +27 -16
- package/dist/Exercises/Meaning/Meaning.js +27 -17
- package/dist/Exercises/PhraseGroup/PhraseGroup.js +3 -1
- package/dist/Exercises/Pronouncer/Pronouncer.js +35 -21
- package/dist/Exercises/Roleplay/Games/ActItOutGame/ActItOutGame.js +3 -1
- package/dist/Exercises/Roleplay/Games/ActItOutGameListening/ActItOutGameListening.js +3 -1
- package/dist/Exercises/Roleplay/Games/ActItOutGameListeningAndSpeaking/ActItOutGame.js +10 -4
- package/dist/Exercises/Roleplay/Games/ActItOutGameSpeaking/ActItOutGame.js +10 -4
- package/dist/Exercises/Roleplay/Games/BeforeElements.js +3 -1
- package/dist/Exercises/Roleplay/Games/FillInTheBlanksGame/FillInTheBlanksGame.js +3 -1
- package/dist/Exercises/Roleplay/Games/StoryGame/StoryGame.js +3 -1
- package/dist/Exercises/Roleplay/OriginalRoleplay.js +6 -2
- package/dist/Exercises/Roleplay/Roleplay.js +3 -1
- package/dist/Exercises/Roleplay/RoleplayInfo/RoleplayInfo.js +4 -2
- package/dist/Exercises/Translator/Translator.js +29 -17
- package/dist/Forms/AppContact/AppContact.js +13 -9
- package/dist/Forms/Contact/Contact.js +41 -25
- package/dist/Forms/CreateBot/Steps/BotInformation/BotInformation.js +23 -9
- package/dist/Forms/CreateBot/Steps/Confirmation/Confirmation.js +12 -4
- package/dist/Forms/CreateClassroom/Steps/ClassroomInformation/ClassroomInformation.js +1 -1
- package/dist/Forms/CreateClassroom/Steps/ClassroomSettings/ClassroomSettings.js +1 -1
- package/dist/Forms/CreateClassroom/Steps/CourseSettings/CourseSettings.js +22 -10
- package/dist/Forms/CreateCourse/Steps/CourseInformation/CourseInformation.js +1 -1
- package/dist/Forms/CreateCourse/Steps/CourseSettings/CourseSettings.js +1 -1
- package/dist/Forms/CreateGroup/Steps/Confirmation/Confirmation.js +6 -2
- package/dist/Forms/CreateGroup/Steps/GroupInformation/GroupInformation.js +1 -1
- package/dist/Forms/CreateGroup/Steps/GroupSettings/GroupSettings.js +13 -9
- package/dist/Forms/CreateMeetingMultiStepForm/GroupAssignment.js +25 -13
- package/dist/Forms/CreateMeetingMultiStepForm/MeetingForm.js +11 -7
- package/dist/Forms/CreateRoleplay/Steps/RoleplayInformation/RoleplayInformation.js +7 -3
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplayInformation/RoleplayInformation.js +1 -1
- package/dist/Forms/CreateTopic/Steps/Confirmation/Confirmation.js +3 -1
- package/dist/Forms/CreateTopic/Steps/TopicInformation/TopicInformation.js +15 -13
- package/dist/Forms/CreateUser/CreateUser.js +8 -4
- package/dist/Forms/DiscussMultiStepFormDialog/MultiStepFormDialog.js +3 -1
- package/dist/Forms/FeedbackForm/FeedbackForm.js +53 -33
- package/dist/Forms/FeedbackInfo/FeedbackInfo.js +48 -37
- package/dist/Forms/MultiStepFormDialog/MultiStepFormDialog.js +3 -1
- package/dist/Forms/PdfUploader/PdfUploader.js +9 -5
- package/dist/Forms/RecordingInfo/RecordingInfo.js +22 -11
- package/dist/Forms/Settings/Settings.js +12 -4
- package/dist/Forms/Settings/Tabs/General/General.js +12 -8
- package/dist/Forms/UpdatePhraseList/UpdatePhraseList.js +1 -1
- package/dist/Forms/VideoUploader/VideoUploader.js +5 -3
- package/dist/Forms/VoiceSelector/VoiceSelector.js +118 -61
- package/dist/Lists/Avatars/Avatars.js +4 -4
- package/dist/Lists/Categories/Categories.js +10 -6
- package/dist/Lists/CourseOutline/CourseOutline.js +91 -45
- package/dist/Lists/CourseSelection/CourseSelection.js +12 -6
- package/dist/Lists/ExerciseSelection/ExerciseSelection.js +23 -9
- package/dist/Lists/Exercises/Exercises.js +14 -6
- package/dist/Lists/Leaderboard/Leaderboard.js +18 -12
- package/dist/Lists/Members/Members.js +21 -11
- package/dist/Lists/PhraseListSelection/PhraseListSelection.js +28 -18
- package/dist/Lists/Phrases/Phrases.js +35 -15
- package/dist/Lists/RoleplaySelection/RoleplaySelection.js +20 -12
- package/dist/Lists/Sections/Sections.js +13 -5
- package/dist/Lists/SubscriptionPlans/SubscriptionPlans.js +4 -2
- package/dist/Lists/TopicPreview/TopicPreview.js +31 -13
- package/dist/Lists/Voices/Voices.js +8 -4
- package/dist/Live/Game/Game.js +15 -9
- package/dist/Live/GameControls/GameControls.js +14 -9
- package/dist/Live/GameMembers/GameMembers.js +15 -11
- package/dist/Live/GameQuestionResults/GameQuestionResults.js +30 -21
- package/dist/Live/GameSettings/GameSettings.js +4 -2
- package/dist/Live/HowToJoin/HowToJoin.js +4 -2
- package/dist/Live/LiveListener/LiveListener.js +31 -17
- package/dist/Live/LiveMeaning/LiveMeaning.js +25 -15
- package/dist/Live/LiveRoleplay/LiveStory/LiveStory.js +3 -3
- package/dist/Live/LiveTranslator/LiveTranslator.js +44 -23
- package/dist/Live/Misc/FinalScoreDrawer/FinalScoreDrawer.js +26 -16
- package/dist/Live/WaitingRoom/WaitingRoom.js +10 -6
- package/dist/Misc/AnswerResult/AnswerResult.js +34 -32
- package/dist/Misc/AvatarSelector/AvatarSelector.js +20 -10
- package/dist/Misc/DiscussionTopicSelector/TopicSelector.js +8 -4
- package/dist/Misc/ExerciseBottomBar/ExerciseBottomBar.js +4 -2
- package/dist/Misc/ExerciseProgressBar/ExerciseProgressBar.js +9 -5
- package/dist/Misc/HoverText/HoverText.js +75 -30
- package/dist/Misc/ImageLibrary/ImageLibrary.js +17 -15
- package/dist/Misc/LanguageSelector/LanguageSelector.js +6 -8
- package/dist/Misc/MedalSelector/MedalSelector.js +5 -4
- package/dist/Misc/NotFound/ClassCourses.js +24 -12
- package/dist/Misc/PhraseDisplay/PhraseDisplay.js +6 -2
- package/dist/Misc/PronunciationScore/PronunciationScore.js +21 -15
- package/dist/Misc/SubmitTextField/SubmitTextField.js +19 -17
- package/dist/Misc/Testimonials/Testimonials.js +3 -3
- package/dist/Misc/WhatsNew/WhatsNew.js +1 -1
- package/dist/Navigation/Header/Header.js +3 -1
- package/dist/Navigation/ResponsiveDrawer/ResponsiveDrawer.js +29 -15
- package/dist/Payments/FreeTrial/FreeTrial.js +6 -4
- package/dist/Tables/Bots/Bots.js +3 -1
- package/dist/Tables/Classrooms/Classrooms.js +3 -1
- package/dist/Tables/Courses/Courses.js +3 -1
- package/dist/Tables/CreatedDiscussionsTable/CreatedDiscussionsTable.js +42 -16
- package/dist/Tables/Games/Games.js +3 -1
- package/dist/Tables/MeetingPrompstList/MeetingPromptsList.js +8 -8
- package/dist/Tables/Phrases/Phrases.js +5 -3
- package/dist/Tables/Plans/Plans.js +2 -2
- package/dist/Tables/Progress/Header.js +6 -4
- package/dist/Tables/Progress/Progress.js +6 -2
- package/dist/Tables/Progress/ProgressList.js +81 -85
- package/dist/Tables/Progress/ProgressTable.js +6 -4
- package/dist/Tables/Progress/TableToolbar.js +11 -7
- package/dist/Tables/Progress/cells/index.js +6 -2
- package/dist/Tables/RecordingListCards/RecordingListCards.js +4 -2
- package/dist/Tables/Roleplays/Roleplays.js +3 -1
- package/dist/Tables/SubmissionsTableCards/SubmissionsTableCards.js +11 -5
- package/dist/Tables/TrialUsers/TrialUsers.js +3 -1
- package/dist/Tables/User/UserTable.js +3 -1
- package/dist/Tables/Users/UsersTable.js +3 -1
- package/dist/config.js +12 -3
- package/dist/hooks/useExerciseState.js +9 -112
- package/dist/hooks/useLanguageTokens.js +73 -0
- package/dist/hooks/usePhonetics.js +28 -6
- package/dist/hooks/useRecognition.js +1 -1
- package/dist/index.js +3 -1
- package/dist/theme/colors/primary.js +17 -0
- package/dist/theme/colors/secondary.js +17 -0
- package/dist/theme/getComponents.js +234 -0
- package/dist/theme/index.js +82 -0
- package/dist/utils/japaneseTokenizer.js +39 -3
- package/dist/utils/languageHelpers.js +41 -0
- package/package.json +24 -24
- package/dist/Screens/Courses/ViewCourse/ViewCourse.js +0 -1056
- package/dist/Screens/Courses/ViewCourse/ViewTopic/ViewTopic.js +0 -1219
package/README.md
CHANGED
|
@@ -3,19 +3,26 @@ This is the ui-components repository for the Nualang product. The components
|
|
|
3
3
|
are developed, reviewed and tested with storybook and a library is then published
|
|
4
4
|
to `npm` and consumed from there by nualang web apps.
|
|
5
5
|
|
|
6
|
+
## Package Manager
|
|
7
|
+
**NB** `pnpm` is used as the package manager in this repository. The principal reason
|
|
8
|
+
for this is its greater flexibility than `npm` in respect to pacakeg minimum age options.
|
|
9
|
+
|
|
10
|
+
Use `pnpm install`, `pnpm run <script>`, and `pnpm add <package>` instead of npm equivalents.
|
|
11
|
+
CI uses `pnpm install --frozen-lockfile`.
|
|
12
|
+
|
|
6
13
|
## Getting Started
|
|
7
|
-
Clone this repository and then execute `
|
|
14
|
+
Clone this repository and then execute `pnpm install`. `pnpm start` will start
|
|
8
15
|
[storybook](https://storybook.js.org) and allow you to browse the available components.
|
|
9
16
|
|
|
10
17
|
## Develop
|
|
11
18
|
```bash
|
|
12
|
-
|
|
19
|
+
pnpm start
|
|
13
20
|
```
|
|
14
21
|
|
|
15
22
|
## Create Local Package
|
|
16
23
|
Compile and pack (This will create a '.tgz' file):
|
|
17
24
|
```bash
|
|
18
|
-
|
|
25
|
+
pnpm run localpack
|
|
19
26
|
```
|
|
20
27
|
|
|
21
28
|
Install package (Inside webapp):
|
|
@@ -25,62 +32,91 @@ npm i ../ui-components/nualang-ui-components-0.1.XXX.tgz
|
|
|
25
32
|
|
|
26
33
|
If webapp is caching previous versions (Add a character to the end of the .tgz, e.g 'a') and install again:
|
|
27
34
|
```bash
|
|
28
|
-
|
|
35
|
+
pnpm add ../ui-components/nualang-ui-components-0.1.XXXa.tgz
|
|
29
36
|
```
|
|
30
37
|
|
|
31
38
|
## Publish to npm
|
|
32
|
-
|
|
39
|
+
Normall, you should just update the version number in package.json and commit
|
|
40
|
+
your updates. When you updated are merged to main, gitlab CI/CD will add a
|
|
41
|
+
manual publish task. Running the manual task will publish to npm and tag
|
|
42
|
+
the version in gitlab.
|
|
43
|
+
|
|
44
|
+
### Manual Publish
|
|
45
|
+
Manual publishing is not normally necessary and is discouraged.
|
|
46
|
+
|
|
47
|
+
Make sure that the version number has been updated in package.json.
|
|
33
48
|
Ensure that you have committed the latest version to git.
|
|
34
49
|
Execute:-
|
|
35
50
|
```bash
|
|
36
|
-
|
|
51
|
+
pnpm run version
|
|
37
52
|
```
|
|
38
|
-
|
|
53
|
+
pnpm will complain if you try to re-publish a previously used version number.
|
|
39
54
|
|
|
40
55
|
|
|
41
56
|
## Additional Scripts
|
|
42
57
|
In the project directory, you can run:
|
|
43
58
|
|
|
44
|
-
### `
|
|
45
|
-
Runs
|
|
46
|
-
Open [http://localhost:
|
|
59
|
+
### `pnpm run storybook`
|
|
60
|
+
Runs storybook in development mode.<br />
|
|
61
|
+
Open [http://localhost:9009](http://localhost:9009) to view it in the browser.
|
|
47
62
|
|
|
48
63
|
The page will reload if you make edits.<br />
|
|
49
64
|
You should also see any lint errors in the console.
|
|
50
65
|
|
|
51
|
-
### `
|
|
66
|
+
### `pnpm run test`
|
|
52
67
|
Launches the test runner in interactive watch mode.<br />
|
|
53
68
|
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
54
69
|
|
|
55
|
-
### `
|
|
70
|
+
### `pnpm run lint`
|
|
56
71
|
Check for any lint errors or warnings.
|
|
57
72
|
|
|
58
|
-
### `
|
|
73
|
+
### `pnpm run compile`
|
|
59
74
|
Run the babel compiler to compile es6 to js.
|
|
60
75
|
|
|
61
|
-
### `
|
|
62
|
-
Publish a new version of the package to npm.
|
|
63
|
-
|
|
64
|
-
### `npm run chromatic`
|
|
65
|
-
Publish a new version of the package to https://www.chromatic.com/
|
|
76
|
+
### `pnpm run version`
|
|
77
|
+
Publish a new version of the package to npm.
|
|
66
78
|
|
|
67
79
|
## Testing & Coverage
|
|
68
80
|
|
|
69
81
|
Run unit tests with Vitest in watch mode:
|
|
70
82
|
|
|
71
83
|
```bash
|
|
72
|
-
|
|
84
|
+
pnpm run vitest
|
|
73
85
|
```
|
|
74
86
|
|
|
75
87
|
To generate code coverage (uses V8 provider):
|
|
76
88
|
|
|
77
89
|
```bash
|
|
78
|
-
|
|
90
|
+
pnpm run test:coverage
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Coverage reports will be written to the `coverage` directory. A text summary is printed to the console; an LCOV file (`coverage/lcov.info`) and a JSON report are also generated. This coverage step is intentionally not wired into CI — run it locally when you want to inspect or publish coverage results.
|
|
94
|
+
|
|
95
|
+
## Japanese tokenizer setup
|
|
96
|
+
|
|
97
|
+
The Japanese phonetics feature uses [kuromoji](https://github.com/takuyaa/kuromoji), which loads binary dictionary files via HTTP at runtime. These files are included in the `kuromoji` npm package but must be served from your own app — they cannot be bundled.
|
|
98
|
+
|
|
99
|
+
**1. Copy the dict files to your public folder** (add to your build script or `package.json`):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cp node_modules/kuromoji/dict/*.dat.gz public/kuromoji-dict/
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Or with `pnpm run` scripts (cross-platform):
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
"copy:kuromoji-dict": "cpx \"node_modules/kuromoji/dict/*.dat.gz\" public/kuromoji-dict"
|
|
79
109
|
```
|
|
80
110
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
111
|
+
**2. Call `configureJapaneseDict` once at app startup** (before any Japanese text is rendered):
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
import { configureJapaneseDict } from "@nualang/nualang-ui-components";
|
|
115
|
+
|
|
116
|
+
configureJapaneseDict({ dicPath: "/kuromoji-dict/" });
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The `KUROMOJI_DICT_FILES` export lists all 12 filenames if you need to reference them programmatically.
|
|
84
120
|
|
|
85
121
|
## Supply-Chain Security
|
|
86
122
|
|
|
@@ -96,6 +132,10 @@ This means `pnpm install` will reject any package version published to the npm r
|
|
|
96
132
|
|
|
97
133
|
Internal `@nualang/*` packages are excluded from this policy via `minimumReleaseAgeExclude`, so freshly-published internal packages can be installed immediately.
|
|
98
134
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
135
|
+
## CI/CD
|
|
136
|
+
gitlab CI/CD is used to run ci/cd jobs when code is committed.
|
|
137
|
+
Lint and unit tests are run on every commit. Make suer they pass before you submit
|
|
138
|
+
a merge request. The package is published to `npm` when the main brabch is updated,
|
|
139
|
+
usually via merge request. Version numbers are not automatically bumped in CI/CD.
|
|
140
|
+
If you have forgotten to update the version, you will see a CI/CD error. Just fix
|
|
141
|
+
that in pacakge/json and commit.
|
|
@@ -116,11 +116,13 @@ function Bot({
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
sx: {
|
|
120
|
+
display: "flex",
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
width: {
|
|
123
|
+
xs: "100%",
|
|
124
|
+
sm: "85%"
|
|
125
|
+
}
|
|
124
126
|
},
|
|
125
127
|
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
126
128
|
src: bot.picture || bot.botAvatar,
|
|
@@ -134,9 +136,11 @@ function Bot({
|
|
|
134
136
|
marginLeft: 2
|
|
135
137
|
},
|
|
136
138
|
primary: /*#__PURE__*/_jsxs(Box, {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
sx: {
|
|
140
|
+
display: "flex",
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
gap: 1
|
|
143
|
+
},
|
|
140
144
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
141
145
|
variant: "body1",
|
|
142
146
|
children: bot.botName
|
|
@@ -263,7 +267,9 @@ function AssignmentBotSelection({
|
|
|
263
267
|
},
|
|
264
268
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
265
269
|
variant: "body2",
|
|
266
|
-
|
|
270
|
+
sx: {
|
|
271
|
+
color: "text.secondary"
|
|
272
|
+
},
|
|
267
273
|
children: t("exercise_no_longer_available")
|
|
268
274
|
})
|
|
269
275
|
}, id))]
|
|
@@ -135,38 +135,50 @@ export default function AssignmentCard({
|
|
|
135
135
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
|
136
136
|
container: true,
|
|
137
137
|
spacing: 2,
|
|
138
|
-
|
|
138
|
+
sx: {
|
|
139
|
+
alignItems: "center"
|
|
140
|
+
},
|
|
139
141
|
children: [/*#__PURE__*/_jsx(Grid, {
|
|
140
142
|
size: "grow",
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
sx: {
|
|
144
|
+
flexDirection: "column",
|
|
145
|
+
display: "flex"
|
|
146
|
+
},
|
|
143
147
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
sx: {
|
|
149
|
+
display: "flex",
|
|
150
|
+
alignItems: "center"
|
|
151
|
+
},
|
|
146
152
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
147
153
|
variant: "body1",
|
|
148
|
-
fontWeight: 600,
|
|
149
154
|
sx: {
|
|
155
|
+
fontWeight: 600,
|
|
150
156
|
color: "text.primary"
|
|
151
157
|
},
|
|
152
158
|
children: assignment.title
|
|
153
159
|
}), isNew && /*#__PURE__*/_jsx(Box, {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
sx: {
|
|
161
|
+
ml: 2,
|
|
162
|
+
px: 1,
|
|
163
|
+
py: 0.25,
|
|
164
|
+
bgcolor: "#8300A1",
|
|
165
|
+
color: "white",
|
|
166
|
+
fontSize: "0.75rem",
|
|
167
|
+
borderRadius: 1,
|
|
168
|
+
fontWeight: "bold"
|
|
169
|
+
},
|
|
162
170
|
children: t("NEW")
|
|
163
171
|
})]
|
|
164
172
|
})
|
|
165
173
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
166
|
-
|
|
174
|
+
sx: {
|
|
175
|
+
textAlign: "right"
|
|
176
|
+
},
|
|
167
177
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
168
178
|
variant: "button",
|
|
169
|
-
|
|
179
|
+
sx: {
|
|
180
|
+
color: "text.secondary"
|
|
181
|
+
},
|
|
170
182
|
children: formatAssignmentDueText(assignment.scheduleDate, assignment.dueDate, t)
|
|
171
183
|
})
|
|
172
184
|
}), isCreator && /*#__PURE__*/_jsxs(Grid, {
|
|
@@ -189,7 +201,9 @@ export default function AssignmentCard({
|
|
|
189
201
|
})]
|
|
190
202
|
})]
|
|
191
203
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
192
|
-
|
|
204
|
+
sx: {
|
|
205
|
+
mt: 2
|
|
206
|
+
},
|
|
193
207
|
children: [/*#__PURE__*/_jsx(Divider, {
|
|
194
208
|
sx: {
|
|
195
209
|
marginBottom: "12px",
|
|
@@ -207,8 +221,10 @@ export default function AssignmentCard({
|
|
|
207
221
|
variant: "body2",
|
|
208
222
|
children: assignment.instructions
|
|
209
223
|
}), /*#__PURE__*/_jsx(Box, {
|
|
210
|
-
|
|
211
|
-
|
|
224
|
+
sx: {
|
|
225
|
+
mt: 2,
|
|
226
|
+
width: isCreator ? "80%" : "100%"
|
|
227
|
+
},
|
|
212
228
|
children: /*#__PURE__*/_jsx(AssignmentExerciseSelector, {
|
|
213
229
|
t: t,
|
|
214
230
|
assignment: assignment,
|
|
@@ -233,17 +249,21 @@ export default function AssignmentCard({
|
|
|
233
249
|
md: 2
|
|
234
250
|
},
|
|
235
251
|
children: isCreator && /*#__PURE__*/_jsxs(Box, {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
252
|
+
sx: {
|
|
253
|
+
display: "flex",
|
|
254
|
+
flexDirection: "column",
|
|
255
|
+
alignItems: "center",
|
|
256
|
+
textAlign: "center"
|
|
257
|
+
},
|
|
240
258
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
241
259
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
242
260
|
variant: "h4",
|
|
243
261
|
children: assignedStudents?.length
|
|
244
262
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
245
263
|
variant: "body2",
|
|
246
|
-
|
|
264
|
+
sx: {
|
|
265
|
+
color: "text.secondary"
|
|
266
|
+
},
|
|
247
267
|
children: t("assigned")
|
|
248
268
|
})]
|
|
249
269
|
}), /*#__PURE__*/_jsx(Button, {
|
|
@@ -88,12 +88,14 @@ const AssignmentCardsList = ({
|
|
|
88
88
|
});
|
|
89
89
|
if (isLoadingAssignments) {
|
|
90
90
|
return /*#__PURE__*/_jsxs(Box, {
|
|
91
|
-
|
|
91
|
+
sx: {
|
|
92
|
+
mb: 1
|
|
93
|
+
},
|
|
92
94
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
93
|
-
display: "flex",
|
|
94
|
-
justifyContent: "space-between",
|
|
95
|
-
alignItems: "center",
|
|
96
95
|
sx: {
|
|
96
|
+
display: "flex",
|
|
97
|
+
justifyContent: "space-between",
|
|
98
|
+
alignItems: "center",
|
|
97
99
|
mb: 2
|
|
98
100
|
},
|
|
99
101
|
children: [/*#__PURE__*/_jsx(Skeleton, {
|
|
@@ -130,8 +132,10 @@ const AssignmentCardsList = ({
|
|
|
130
132
|
borderRadius: 1
|
|
131
133
|
}
|
|
132
134
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
sx: {
|
|
136
|
+
display: "flex",
|
|
137
|
+
gap: 1
|
|
138
|
+
},
|
|
135
139
|
children: [/*#__PURE__*/_jsx(Skeleton, {
|
|
136
140
|
variant: "rectangular",
|
|
137
141
|
width: 120,
|
|
@@ -186,12 +190,14 @@ const AssignmentCardsList = ({
|
|
|
186
190
|
};
|
|
187
191
|
const emptyState = getEmptyStateMessage();
|
|
188
192
|
return /*#__PURE__*/_jsxs(Box, {
|
|
189
|
-
|
|
193
|
+
sx: {
|
|
194
|
+
mb: 1
|
|
195
|
+
},
|
|
190
196
|
children: [isCreator && /*#__PURE__*/_jsxs(Box, {
|
|
191
|
-
display: "flex",
|
|
192
|
-
justifyContent: "space-between",
|
|
193
|
-
alignItems: "center",
|
|
194
197
|
sx: {
|
|
198
|
+
display: "flex",
|
|
199
|
+
justifyContent: "space-between",
|
|
200
|
+
alignItems: "center",
|
|
195
201
|
mb: 3,
|
|
196
202
|
mt: "8px"
|
|
197
203
|
},
|
|
@@ -232,16 +238,16 @@ const AssignmentCardsList = ({
|
|
|
232
238
|
})
|
|
233
239
|
})]
|
|
234
240
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
235
|
-
alignItems: "center",
|
|
236
241
|
sx: {
|
|
242
|
+
alignItems: "center",
|
|
243
|
+
display: "flex",
|
|
244
|
+
flexDirection: "column",
|
|
237
245
|
my: 2
|
|
238
246
|
},
|
|
239
|
-
display: "flex",
|
|
240
|
-
flexDirection: "column",
|
|
241
247
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
242
248
|
variant: "h5",
|
|
243
|
-
fontWeight: "bold",
|
|
244
249
|
sx: {
|
|
250
|
+
fontWeight: "bold",
|
|
245
251
|
textAlign: "center"
|
|
246
252
|
},
|
|
247
253
|
children: emptyState.title
|
|
@@ -276,12 +282,14 @@ const AssignmentCardsList = ({
|
|
|
276
282
|
});
|
|
277
283
|
}
|
|
278
284
|
return /*#__PURE__*/_jsxs(Box, {
|
|
279
|
-
|
|
285
|
+
sx: {
|
|
286
|
+
mb: 1
|
|
287
|
+
},
|
|
280
288
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
281
|
-
display: "flex",
|
|
282
|
-
justifyContent: isCreator ? "space-between" : "flex-end",
|
|
283
|
-
alignItems: "center",
|
|
284
289
|
sx: {
|
|
290
|
+
display: "flex",
|
|
291
|
+
justifyContent: isCreator ? "space-between" : "flex-end",
|
|
292
|
+
alignItems: "center",
|
|
285
293
|
mb: 3,
|
|
286
294
|
mt: "8px"
|
|
287
295
|
},
|
|
@@ -99,13 +99,17 @@ function Course({
|
|
|
99
99
|
onClick: () => setOpen(!open),
|
|
100
100
|
disabled: isCourseEmpty || isExerciseSelected,
|
|
101
101
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
102
|
-
|
|
103
|
-
alignItems: "center",
|
|
104
|
-
justifyContent: "space-between",
|
|
105
|
-
width: "100%",
|
|
106
|
-
children: [/*#__PURE__*/_jsxs(Box, {
|
|
102
|
+
sx: {
|
|
107
103
|
display: "flex",
|
|
108
104
|
alignItems: "center",
|
|
105
|
+
justifyContent: "space-between",
|
|
106
|
+
width: "100%"
|
|
107
|
+
},
|
|
108
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
109
|
+
sx: {
|
|
110
|
+
display: "flex",
|
|
111
|
+
alignItems: "center"
|
|
112
|
+
},
|
|
109
113
|
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
110
114
|
src: course.picture,
|
|
111
115
|
alt: ""
|
|
@@ -117,7 +121,9 @@ function Course({
|
|
|
117
121
|
color: "textSecondary",
|
|
118
122
|
children: course.description
|
|
119
123
|
}), !isCreator && courseSectionCompletion && courseSectionCompletion !== null && /*#__PURE__*/_jsx(Box, {
|
|
120
|
-
|
|
124
|
+
sx: {
|
|
125
|
+
mt: 1
|
|
126
|
+
},
|
|
121
127
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
122
128
|
title: `Completed ${courseSectionCompletion.completed} / ${courseSectionCompletion.total} exercises`,
|
|
123
129
|
children: /*#__PURE__*/_jsx(ColorLinearProgress, {
|
|
@@ -151,7 +157,9 @@ function Course({
|
|
|
151
157
|
timeout: "auto",
|
|
152
158
|
unmountOnExit: true,
|
|
153
159
|
children: /*#__PURE__*/_jsx(Box, {
|
|
154
|
-
|
|
160
|
+
sx: {
|
|
161
|
+
ml: 3.5
|
|
162
|
+
},
|
|
155
163
|
children: /*#__PURE__*/_jsx(AssignmentExerciseSelection, {
|
|
156
164
|
t: t,
|
|
157
165
|
sections: viewOnly ? filteredSections : courseSections,
|
|
@@ -179,7 +187,9 @@ function Course({
|
|
|
179
187
|
})
|
|
180
188
|
})]
|
|
181
189
|
}, index) : /*#__PURE__*/_jsx(Box, {
|
|
182
|
-
|
|
190
|
+
sx: {
|
|
191
|
+
ml: 3.5
|
|
192
|
+
},
|
|
183
193
|
children: /*#__PURE__*/_jsx(AssignmentExerciseSelection, {
|
|
184
194
|
t: t,
|
|
185
195
|
sections: viewOnly ? filteredSections : courseSections,
|
|
@@ -158,9 +158,11 @@ function Exercise({
|
|
|
158
158
|
}
|
|
159
159
|
}),
|
|
160
160
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
sx: {
|
|
162
|
+
display: {
|
|
163
|
+
xs: "none",
|
|
164
|
+
sm: "flex"
|
|
165
|
+
}
|
|
164
166
|
},
|
|
165
167
|
children: [name.toLowerCase() === "roleplays" && /*#__PURE__*/_jsx(ListItemIcon, {
|
|
166
168
|
children: /*#__PURE__*/_jsx(ForumIcon, {})
|
|
@@ -170,7 +172,9 @@ function Exercise({
|
|
|
170
172
|
children: /*#__PURE__*/_jsx(MenuBookIcon, {})
|
|
171
173
|
})]
|
|
172
174
|
}), /*#__PURE__*/_jsx(Box, {
|
|
173
|
-
|
|
175
|
+
sx: {
|
|
176
|
+
width: "100%"
|
|
177
|
+
},
|
|
174
178
|
children: /*#__PURE__*/_jsx(ListItemText, {
|
|
175
179
|
primary: t(name),
|
|
176
180
|
secondary: t(description)
|
|
@@ -196,9 +200,11 @@ function Exercise({
|
|
|
196
200
|
timeout: "auto",
|
|
197
201
|
unmountOnExit: true,
|
|
198
202
|
children: /*#__PURE__*/_jsx(Box, {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
sx: {
|
|
204
|
+
ml: {
|
|
205
|
+
sm: 0,
|
|
206
|
+
md: 7
|
|
207
|
+
}
|
|
202
208
|
},
|
|
203
209
|
children: /*#__PURE__*/_jsx(AssignmentPhraseListSelection, {
|
|
204
210
|
t: t,
|
|
@@ -223,9 +229,11 @@ function Exercise({
|
|
|
223
229
|
timeout: "auto",
|
|
224
230
|
unmountOnExit: true,
|
|
225
231
|
children: /*#__PURE__*/_jsx(Box, {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
232
|
+
sx: {
|
|
233
|
+
ml: {
|
|
234
|
+
sm: 0,
|
|
235
|
+
md: 7
|
|
236
|
+
}
|
|
229
237
|
},
|
|
230
238
|
children: /*#__PURE__*/_jsx(AssignmentRoleplaySelection, {
|
|
231
239
|
roleplays: roleplays,
|
|
@@ -250,9 +258,11 @@ function Exercise({
|
|
|
250
258
|
timeout: "auto",
|
|
251
259
|
unmountOnExit: true,
|
|
252
260
|
children: /*#__PURE__*/_jsx(Box, {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
261
|
+
sx: {
|
|
262
|
+
ml: {
|
|
263
|
+
sm: 0,
|
|
264
|
+
md: 7
|
|
265
|
+
}
|
|
256
266
|
},
|
|
257
267
|
children: /*#__PURE__*/_jsx(AssignmentBotSelection, {
|
|
258
268
|
bots: bots,
|
|
@@ -560,12 +570,16 @@ function Topic({
|
|
|
560
570
|
children: /*#__PURE__*/_jsx(ImageSearchIcon, {})
|
|
561
571
|
})
|
|
562
572
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
563
|
-
|
|
564
|
-
|
|
573
|
+
sx: {
|
|
574
|
+
fontWeight: "fontWeightBold",
|
|
575
|
+
width: "100%"
|
|
576
|
+
},
|
|
565
577
|
children: [/*#__PURE__*/_jsx(ListItemText, {
|
|
566
578
|
primary: isLargeScreen ? topicName || "" : /*#__PURE__*/_jsxs(_Fragment, {
|
|
567
579
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
568
|
-
|
|
580
|
+
sx: {
|
|
581
|
+
mb: 1
|
|
582
|
+
},
|
|
569
583
|
children: picture ? /*#__PURE__*/_jsx(Avatar, {
|
|
570
584
|
src: picture,
|
|
571
585
|
alt: topicName
|
|
@@ -587,14 +601,18 @@ function Topic({
|
|
|
587
601
|
})
|
|
588
602
|
})
|
|
589
603
|
}), !isCreator && completion && completion !== null && /*#__PURE__*/_jsx(Box, {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
604
|
+
sx: {
|
|
605
|
+
display: "flex",
|
|
606
|
+
alignItems: "center",
|
|
607
|
+
justifyContent: "space-between",
|
|
608
|
+
mt: 1,
|
|
609
|
+
mb: 1
|
|
610
|
+
},
|
|
595
611
|
children: /*#__PURE__*/_jsx(Box, {
|
|
596
|
-
|
|
597
|
-
|
|
612
|
+
sx: {
|
|
613
|
+
display: "inline",
|
|
614
|
+
flexGrow: 1
|
|
615
|
+
},
|
|
598
616
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
599
617
|
title: `Completed ${completion.completed} / ${completion.total} exercises`,
|
|
600
618
|
children: /*#__PURE__*/_jsx(ColorLinearProgress, {
|
|
@@ -604,27 +622,35 @@ function Topic({
|
|
|
604
622
|
})
|
|
605
623
|
})
|
|
606
624
|
}), isMember && !isCreator && /*#__PURE__*/_jsx(Box, {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
625
|
+
sx: {
|
|
626
|
+
display: "flex",
|
|
627
|
+
alignItems: "center",
|
|
628
|
+
justifyContent: "space-between",
|
|
629
|
+
mt: 1,
|
|
630
|
+
width: isLargeScreen ? "40%" : "100%"
|
|
631
|
+
},
|
|
612
632
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
633
|
+
sx: {
|
|
634
|
+
ml: 1,
|
|
635
|
+
fontSize: 14,
|
|
636
|
+
minWidth: 35
|
|
637
|
+
},
|
|
616
638
|
children: [completion && completion.percentage ? completion.percentage.toFixed(0) : 0, "%"]
|
|
617
639
|
})
|
|
618
640
|
}), videoUrl && /*#__PURE__*/_jsx(Box, {
|
|
619
|
-
|
|
620
|
-
|
|
641
|
+
sx: {
|
|
642
|
+
display: "flex",
|
|
643
|
+
alignItems: "center"
|
|
644
|
+
},
|
|
621
645
|
children: /*#__PURE__*/_jsxs(CardInfoSectionItem, {
|
|
622
646
|
component: "span",
|
|
623
647
|
color: "textSecondary",
|
|
624
648
|
children: [/*#__PURE__*/_jsx(OndemandVideoIcon, {}), /*#__PURE__*/_jsx(Typography, {
|
|
625
649
|
variant: "body2",
|
|
626
|
-
ml: 0.5,
|
|
627
650
|
color: "textSecondary",
|
|
651
|
+
sx: {
|
|
652
|
+
ml: 0.5
|
|
653
|
+
},
|
|
628
654
|
children: t("video_included")
|
|
629
655
|
})]
|
|
630
656
|
})
|
|
@@ -262,11 +262,13 @@ function PhraseList({
|
|
|
262
262
|
}
|
|
263
263
|
},
|
|
264
264
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
sx: {
|
|
266
|
+
display: "flex",
|
|
267
|
+
alignItems: "center",
|
|
268
|
+
width: {
|
|
269
|
+
xs: "100%",
|
|
270
|
+
sm: "85%"
|
|
271
|
+
}
|
|
270
272
|
},
|
|
271
273
|
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
272
274
|
src: phraseList.picture,
|
|
@@ -280,9 +282,11 @@ function PhraseList({
|
|
|
280
282
|
marginLeft: 2
|
|
281
283
|
},
|
|
282
284
|
primary: /*#__PURE__*/_jsx(Box, {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
sx: {
|
|
286
|
+
display: "flex",
|
|
287
|
+
alignItems: "center",
|
|
288
|
+
gap: 1
|
|
289
|
+
},
|
|
286
290
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
287
291
|
variant: "body1",
|
|
288
292
|
children: phraseList.phraseListName
|
|
@@ -455,7 +459,9 @@ export default function AssignmentPhraseListSelection({
|
|
|
455
459
|
},
|
|
456
460
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
457
461
|
variant: "body2",
|
|
458
|
-
|
|
462
|
+
sx: {
|
|
463
|
+
color: "text.secondary"
|
|
464
|
+
},
|
|
459
465
|
children: t("exercise_no_longer_available")
|
|
460
466
|
})
|
|
461
467
|
}, id))]
|