@nualang/nualang-ui-components 0.1.1259 → 0.1.1261
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 +64 -64
- package/dist/Assignments/AssignmentBotSelection/package.json +6 -6
- package/dist/Assignments/AssignmentCard/package.json +6 -6
- package/dist/Assignments/AssignmentCardsList/package.json +6 -6
- package/dist/Assignments/AssignmentCourseSelection/package.json +6 -6
- package/dist/Assignments/AssignmentExerciseSelection/package.json +6 -6
- package/dist/Assignments/AssignmentExerciseSelector/package.json +6 -6
- package/dist/Assignments/AssignmentRoleplaySelection/package.json +6 -6
- package/dist/Assignments/CreateAssignmentDialog/CreateAssignmentDialog.js +78 -92
- package/dist/Assignments/CreateAssignmentDialog/package.json +6 -6
- package/dist/Assignments/SelectAssignmentTypeDialog/package.json +6 -6
- package/dist/Cards/CardElements/CardVisibility/CardVisibility.js +3 -1
- package/dist/Cards/Course/Course.js +2 -2
- package/dist/Cards/SubscriptionPlan/nuala.svg +28 -28
- package/dist/Cards/SubscriptionPlan/plus.svg +4 -4
- package/dist/Dialogs/AvatarDialog/AvatarDialog.js +5 -5
- package/dist/Dialogs/UploadPhrases/UploadPhrases.js +6 -6
- package/dist/Dialogs/UploadRoleplayScript/UploadRoleplayScript.js +11 -11
- package/dist/Editors/Bot/Editor/BotFlow/BotFlow.js +3 -3
- package/dist/Editors/Phrases/Phrases.js +2 -2
- package/dist/Exercises/Bot/Bot.js +3 -3
- package/dist/Lists/Categories/package.json +6 -6
- package/dist/Misc/AxiosRestExample/AxiosRestExample.js +3 -3
- package/dist/Misc/AxiosRestExample/AxiosRestPostExample.js +6 -6
- package/dist/Misc/ColorLinearProgress/package.json +6 -6
- package/dist/Screens/Search/package.json +6 -6
- package/dist/Tables/Progress/ProgressList.js +3 -3
- package/dist/hooks/useRecognition.js +6 -6
- package/dist/hooks/useSpreadsheetState.js +7 -7
- package/dist/img/0-nuala-001.svg +34 -34
- package/dist/img/1-teacher-001.svg +38 -38
- package/dist/img/AudioNuala.svg +165 -165
- package/dist/img/Bronze Medal.svg +545 -545
- package/dist/img/Bronze.svg +349 -349
- package/dist/img/BronzeBadge.svg +493 -493
- package/dist/img/BronzeBadgeWithoutRibbon.svg +317 -317
- package/dist/img/Frame 51.svg +98 -98
- package/dist/img/Frame 52.svg +131 -131
- package/dist/img/Frame 53.svg +139 -139
- package/dist/img/Gold Badge.svg +362 -362
- package/dist/img/Gold Medal.svg +481 -481
- package/dist/img/GoldBadge.svg +470 -470
- package/dist/img/GoldBadgeWithoutRibbon.svg +324 -324
- package/dist/img/NewText.svg +5 -5
- package/dist/img/NualaCreateImage.svg +129 -129
- package/dist/img/NualangLiveAnswerQuickly.svg +103 -103
- package/dist/img/NualangLiveAnwerQuicklyListening.svg +3607 -3607
- package/dist/img/NualangLiveListen.svg +42 -42
- package/dist/img/NualangLiveListenToPhrase.svg +4285 -4285
- package/dist/img/NualangLivePickAnswer.svg +134 -134
- package/dist/img/NualangLiveResult.svg +1235 -1235
- package/dist/img/NualangLiveRoleplayAnswer.svg +334 -334
- package/dist/img/NualangLiveRoleplayConvo.svg +282 -282
- package/dist/img/NualangLiveSeePlace.svg +134 -134
- package/dist/img/NualangLiveTranslate.svg +54 -54
- package/dist/img/NualangLiveTranslateQuickly.svg +197 -197
- package/dist/img/NualangLiveViewConversations.svg +135 -135
- package/dist/img/Polly.svg +17 -17
- package/dist/img/Silver Badge.svg +523 -523
- package/dist/img/Silver Medal.svg +549 -549
- package/dist/img/SilverBadge.svg +655 -655
- package/dist/img/SilverBadgeWithoutRibbon.svg +491 -491
- package/dist/img/avatars/0-nuala-001.svg +34 -34
- package/dist/img/avatars/0-nuala-002.svg +25 -25
- package/dist/img/avatars/0-nuala-003.svg +27 -27
- package/dist/img/avatars/0-nuala-004.svg +41 -41
- package/dist/img/avatars/0-nuala-005.svg +33 -33
- package/dist/img/avatars/0-nuala-006.svg +32 -32
- package/dist/img/avatars/0-nuala-007.svg +37 -37
- package/dist/img/avatars/0-nuala-008.svg +21 -21
- package/dist/img/avatars/0-nuala-009.svg +21 -21
- package/dist/img/avatars/0-nuala-010.svg +39 -39
- package/dist/img/avatars/0-nuala-011.svg +33 -33
- package/dist/img/avatars/0-nuala-012.svg +43 -43
- package/dist/img/avatars/0-nuala-013.svg +36 -36
- package/dist/img/avatars/0-nuala-014.svg +30 -30
- package/dist/img/avatars/0-nuala-015.svg +28 -28
- package/dist/img/avatars/0-nuala-016.svg +24 -24
- package/dist/img/avatars/0-nuala-017.svg +31 -31
- package/dist/img/avatars/0-nuala-018.svg +29 -29
- package/dist/img/avatars/0-nuala-019.svg +57 -57
- package/dist/img/avatars/0-nuala-020.svg +30 -30
- package/dist/img/avatars/0-nuala-021.svg +28 -28
- package/dist/img/avatars/1-teacher-001.svg +38 -38
- package/dist/img/avatars/1-teacher-002.svg +52 -52
- package/dist/img/avatars/1-teacher-003.svg +86 -86
- package/dist/img/avatars/nuala_10_celebrating.svg +44 -44
- package/dist/img/avatars/nuala_10_speaking.svg +45 -45
- package/dist/img/avatars/nuala_11_celebrating.svg +38 -38
- package/dist/img/avatars/nuala_11_speaking.svg +41 -41
- package/dist/img/avatars/nuala_12_celebrating.svg +48 -48
- package/dist/img/avatars/nuala_12_speaking.svg +49 -49
- package/dist/img/avatars/nuala_13_celebrating.svg +41 -41
- package/dist/img/avatars/nuala_13_speaking.svg +44 -44
- package/dist/img/avatars/nuala_14_celebrating.svg +35 -35
- package/dist/img/avatars/nuala_14_speaking.svg +36 -36
- package/dist/img/avatars/nuala_15_celebrating.svg +33 -33
- package/dist/img/avatars/nuala_15_speaking.svg +36 -36
- package/dist/img/avatars/nuala_16_celebrating.svg +29 -29
- package/dist/img/avatars/nuala_16_speaking.svg +32 -32
- package/dist/img/avatars/nuala_17_celebrating.svg +36 -36
- package/dist/img/avatars/nuala_17_speaking.svg +39 -39
- package/dist/img/avatars/nuala_18_celebrating.svg +34 -34
- package/dist/img/avatars/nuala_18_speaking.svg +37 -37
- package/dist/img/avatars/nuala_19_celebrating.svg +62 -62
- package/dist/img/avatars/nuala_19_speaking.svg +65 -65
- package/dist/img/avatars/nuala_1_celebrating.svg +30 -30
- package/dist/img/avatars/nuala_1_speaking.svg +37 -37
- package/dist/img/avatars/nuala_20_celebrating.svg +35 -35
- package/dist/img/avatars/nuala_20_speaking.svg +38 -38
- package/dist/img/avatars/nuala_21_celebrating.svg +33 -33
- package/dist/img/avatars/nuala_21_speaking.svg +36 -36
- package/dist/img/avatars/nuala_2_celebrating.svg +21 -21
- package/dist/img/avatars/nuala_2_speaking.svg +29 -29
- package/dist/img/avatars/nuala_3_celebrating.svg +20 -20
- package/dist/img/avatars/nuala_3_speaking.svg +28 -28
- package/dist/img/avatars/nuala_4_celebrating.svg +33 -33
- package/dist/img/avatars/nuala_4_speaking.svg +41 -41
- package/dist/img/avatars/nuala_5_celebrating.svg +30 -30
- package/dist/img/avatars/nuala_5_speaking.svg +36 -36
- package/dist/img/avatars/nuala_6_celebrating.svg +37 -37
- package/dist/img/avatars/nuala_6_speaking.svg +36 -36
- package/dist/img/avatars/nuala_7_celebrating.svg +42 -42
- package/dist/img/avatars/nuala_7_speaking.svg +43 -43
- package/dist/img/avatars/nuala_8_celebrating.svg +26 -26
- package/dist/img/avatars/nuala_8_speaking.svg +29 -29
- package/dist/img/avatars/nuala_9_celebrating.svg +26 -26
- package/dist/img/avatars/nuala_9_speaking.svg +27 -27
- package/dist/img/aws.svg +5 -5
- package/dist/img/azure.svg +9 -9
- package/dist/img/bot-error.svg +28 -28
- package/dist/img/bot_nuala.svg +45 -45
- package/dist/img/classroom.svg +178 -178
- package/dist/img/course.svg +113 -113
- package/dist/img/dashboard.svg +103 -103
- package/dist/img/nuala_1_celebrating.svg +33 -33
- package/dist/img/nuala_2_celebrating.svg +20 -20
- package/dist/img/nuala_3_celebrating.svg +21 -21
- package/dist/img/nuala_4_celebrating.svg +30 -30
- package/dist/img/nuala_5_celebrating.svg +30 -30
- package/dist/img/nuala_celebrating.svg +39 -39
- package/dist/img/nuala_sign_in.svg +62 -62
- package/dist/img/nuala_speaking.svg +41 -41
- package/dist/img/nuala_speaking_2.svg +41 -41
- package/dist/img/nuala_speaking_3.svg +41 -41
- package/dist/img/nuala_speaking_4.svg +41 -41
- package/dist/img/nualang-logo-primary.svg +17 -17
- package/dist/img/nualangSquareIcon.svg +18 -18
- package/dist/img/nualas.svg +185 -185
- package/dist/img/sentiment_dissatisfied_24px.svg +3 -3
- package/dist/img/sentiment_satisfied_24px.svg +3 -3
- package/dist/img/sentiment_very_satisfied_24px.svg +3 -3
- package/dist/img/stars1.svg +44 -44
- package/dist/img/stars2.svg +30 -30
- package/dist/img/structuring.svg +76 -76
- package/dist/img/teacher-create-2.svg +81 -81
- package/dist/img/teacher-create.svg +49 -49
- package/dist/img/teacher-world.svg +271 -271
- package/dist/img/teacher.svg +89 -89
- package/dist/img/world.svg +41 -41
- package/dist/utils/canvasUtils.js +5 -5
- package/dist/utils/index.js +8 -8
- package/package.json +190 -190
package/README.md
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
# Nualang ui-components
|
|
2
|
-
This is the ui-components repository for the Nualang product. The components
|
|
3
|
-
are developed, reviewed and tested with storybook and a library is then published
|
|
4
|
-
to `npm` and consumed from there by nualang web apps.
|
|
5
|
-
|
|
6
|
-
## Getting Started
|
|
7
|
-
Clone this repository and then execute `npm install`. `npm start` will start
|
|
8
|
-
[stoybook](https://storybook.js.org) and allow you to brrowse the available components.
|
|
9
|
-
|
|
10
|
-
## Develop
|
|
11
|
-
```
|
|
12
|
-
npm start
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Create Local Package
|
|
16
|
-
Compile and pack (This will create a '.tgz' file):
|
|
17
|
-
```
|
|
18
|
-
npm run localpack
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Install package (Inside webapp):
|
|
22
|
-
```
|
|
23
|
-
npm i ../ui-components/fathomtech-nualang-ui-components-0.1.XXX.tgz
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
If webapp is caching previous versions (Add a character to the end of the .tgz, e.g 'a') and install again:
|
|
27
|
-
```
|
|
28
|
-
yarn add ../ui-components/fathomtech-nualang-ui-components-0.1.XXXa.tgz
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Publish to npm
|
|
32
|
-
Make sure that the version number has been updayed in package.json.
|
|
33
|
-
Ensure that you have committed the latest version to git.
|
|
34
|
-
Execute:-
|
|
35
|
-
```bash
|
|
36
|
-
npm run postversion
|
|
37
|
-
```
|
|
38
|
-
npm will complain if you try to re-publish a previously used version number.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Additional Scripts
|
|
42
|
-
In the project directory, you can run:
|
|
43
|
-
|
|
44
|
-
### `npm run storybook`
|
|
45
|
-
Runs the app in the development mode.<br />
|
|
46
|
-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
47
|
-
|
|
48
|
-
The page will reload if you make edits.<br />
|
|
49
|
-
You should also see any lint errors in the console.
|
|
50
|
-
|
|
51
|
-
### `npm run test`
|
|
52
|
-
Launches the test runner in interactive watch mode.<br />
|
|
53
|
-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
54
|
-
|
|
55
|
-
### `npm run lint`
|
|
56
|
-
Check for any lint errors or warnings.
|
|
57
|
-
|
|
58
|
-
### `npm run compile`
|
|
59
|
-
Run the babel compiler to compile es6 to js.
|
|
60
|
-
|
|
61
|
-
### `npm run postversion`
|
|
62
|
-
Publish a new version of the pacakage to npm. npm will complain
|
|
63
|
-
|
|
64
|
-
### `npm run chromatic`
|
|
1
|
+
# Nualang ui-components
|
|
2
|
+
This is the ui-components repository for the Nualang product. The components
|
|
3
|
+
are developed, reviewed and tested with storybook and a library is then published
|
|
4
|
+
to `npm` and consumed from there by nualang web apps.
|
|
5
|
+
|
|
6
|
+
## Getting Started
|
|
7
|
+
Clone this repository and then execute `npm install`. `npm start` will start
|
|
8
|
+
[stoybook](https://storybook.js.org) and allow you to brrowse the available components.
|
|
9
|
+
|
|
10
|
+
## Develop
|
|
11
|
+
```
|
|
12
|
+
npm start
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Create Local Package
|
|
16
|
+
Compile and pack (This will create a '.tgz' file):
|
|
17
|
+
```
|
|
18
|
+
npm run localpack
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Install package (Inside webapp):
|
|
22
|
+
```
|
|
23
|
+
npm i ../ui-components/fathomtech-nualang-ui-components-0.1.XXX.tgz
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If webapp is caching previous versions (Add a character to the end of the .tgz, e.g 'a') and install again:
|
|
27
|
+
```
|
|
28
|
+
yarn add ../ui-components/fathomtech-nualang-ui-components-0.1.XXXa.tgz
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Publish to npm
|
|
32
|
+
Make sure that the version number has been updayed in package.json.
|
|
33
|
+
Ensure that you have committed the latest version to git.
|
|
34
|
+
Execute:-
|
|
35
|
+
```bash
|
|
36
|
+
npm run postversion
|
|
37
|
+
```
|
|
38
|
+
npm will complain if you try to re-publish a previously used version number.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Additional Scripts
|
|
42
|
+
In the project directory, you can run:
|
|
43
|
+
|
|
44
|
+
### `npm run storybook`
|
|
45
|
+
Runs the app in the development mode.<br />
|
|
46
|
+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
47
|
+
|
|
48
|
+
The page will reload if you make edits.<br />
|
|
49
|
+
You should also see any lint errors in the console.
|
|
50
|
+
|
|
51
|
+
### `npm run test`
|
|
52
|
+
Launches the test runner in interactive watch mode.<br />
|
|
53
|
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
54
|
+
|
|
55
|
+
### `npm run lint`
|
|
56
|
+
Check for any lint errors or warnings.
|
|
57
|
+
|
|
58
|
+
### `npm run compile`
|
|
59
|
+
Run the babel compiler to compile es6 to js.
|
|
60
|
+
|
|
61
|
+
### `npm run postversion`
|
|
62
|
+
Publish a new version of the pacakage to npm. npm will complain
|
|
63
|
+
|
|
64
|
+
### `npm run chromatic`
|
|
65
65
|
Publish a new version of the pacakage to https://www.chromatic.com/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentBotSelection",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentBotSelection.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentBotSelection",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentBotSelection.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentCard",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentCard.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentCard",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentCard.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentCardsList",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentCardsList.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentCardsList",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentCardsList.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentCourseSelection",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentCourseSelection.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentCourseSelection",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentCourseSelection.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentExerciseSelection",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentExerciseSelection.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentExerciseSelection",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentExerciseSelection.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentExerciseSelector",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentExerciseSelector.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentExerciseSelector",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentExerciseSelector.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "AssignmentRoleplaySelection",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./AssignmentRoleplaySelection.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "AssignmentRoleplaySelection",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentRoleplaySelection.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -14,8 +14,6 @@ var _AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
|
14
14
|
var _LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
15
15
|
var _DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
16
16
|
var _mui = require("tss-react/mui");
|
|
17
|
-
var _ArrowDropDown = _interopRequireDefault(require("@mui/icons-material/ArrowDropDown"));
|
|
18
|
-
var _ArrowDropUp = _interopRequireDefault(require("@mui/icons-material/ArrowDropUp"));
|
|
19
17
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
20
18
|
var _AssignmentSelectExercise = _interopRequireDefault(require("../AssignmentSelectExercise/AssignmentSelectExercise"));
|
|
21
19
|
var _AssignmentExerciseSelector = _interopRequireDefault(require("../AssignmentExerciseSelector/AssignmentExerciseSelector"));
|
|
@@ -57,7 +55,7 @@ function CreateAssignmentDialog({
|
|
|
57
55
|
getCourses,
|
|
58
56
|
initialData = {},
|
|
59
57
|
dialogTitle,
|
|
60
|
-
userEmail =
|
|
58
|
+
userEmail = ""
|
|
61
59
|
}) {
|
|
62
60
|
const {
|
|
63
61
|
classes
|
|
@@ -71,8 +69,8 @@ function CreateAssignmentDialog({
|
|
|
71
69
|
const [assignment, setAssignment] = (0, _react.useState)({
|
|
72
70
|
classroomId: classroom?.length > 0 ? [classroom] : [],
|
|
73
71
|
assignedStudents: members?.map(member => member.memberId),
|
|
74
|
-
title:
|
|
75
|
-
instructions: "",
|
|
72
|
+
title: initialData.title ? initialData.title : undefined,
|
|
73
|
+
instructions: initialData.instructions ? initialData.instructions : t("default_assignment_instructions"),
|
|
76
74
|
type: "assignment",
|
|
77
75
|
scheduleDate: (0, _dayjs.default)(),
|
|
78
76
|
dueDate: (0, _dayjs.default)().add(1, "day"),
|
|
@@ -182,6 +180,15 @@ function CreateAssignmentDialog({
|
|
|
182
180
|
...assignment,
|
|
183
181
|
courses: filteredCourses
|
|
184
182
|
});
|
|
183
|
+
const selectedTopicIds = new Set(submittedExercises.map(ex => ex.courseSectionTopicId));
|
|
184
|
+
const topicNames = Array.from(new Set(filteredCourses.flatMap(course => course.sections?.flatMap(section => section.topics?.flatMap(topic => {
|
|
185
|
+
const topicKey = `${course.courseId}|${section.sectionId}|${topic.topicId}`;
|
|
186
|
+
return selectedTopicIds.has(topicKey) ? topic.topicName : [];
|
|
187
|
+
}))).filter(Boolean)));
|
|
188
|
+
setAssignment(prev => ({
|
|
189
|
+
...prev,
|
|
190
|
+
title: topicNames.length ? topicNames.join(", ") : undefined
|
|
191
|
+
}));
|
|
185
192
|
}, [selectedCourses, submittedExercises]);
|
|
186
193
|
const classroomMembers = async uniqueClassroomMembers => {
|
|
187
194
|
const formattedMembers = await getMemberDetails(uniqueClassroomMembers);
|
|
@@ -212,13 +219,6 @@ function CreateAssignmentDialog({
|
|
|
212
219
|
const handleCloseSelectExercise = () => {
|
|
213
220
|
setIsSelectExerciseOpen(false);
|
|
214
221
|
};
|
|
215
|
-
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
216
|
-
const handleMenuOpen = event => {
|
|
217
|
-
setAnchorEl(event.currentTarget);
|
|
218
|
-
};
|
|
219
|
-
const handleMenuClose = () => {
|
|
220
|
-
setAnchorEl(null);
|
|
221
|
-
};
|
|
222
222
|
const handleChange = field => event => {
|
|
223
223
|
let value = event?.target?.value ?? event;
|
|
224
224
|
setAssignment(prev => {
|
|
@@ -331,7 +331,7 @@ function CreateAssignmentDialog({
|
|
|
331
331
|
MenuProps: {
|
|
332
332
|
PaperProps: {
|
|
333
333
|
sx: {
|
|
334
|
-
width:
|
|
334
|
+
width: "auto",
|
|
335
335
|
maxWidth: 400
|
|
336
336
|
}
|
|
337
337
|
},
|
|
@@ -390,21 +390,6 @@ function CreateAssignmentDialog({
|
|
|
390
390
|
})
|
|
391
391
|
}, c.classroomId))
|
|
392
392
|
})]
|
|
393
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
394
|
-
"data-cy": "assignment-title-input",
|
|
395
|
-
label: t("assignment_title"),
|
|
396
|
-
fullWidth: true,
|
|
397
|
-
value: assignment.title,
|
|
398
|
-
onChange: handleChange("title"),
|
|
399
|
-
required: true
|
|
400
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
401
|
-
"data-cy": "assignment-description-input",
|
|
402
|
-
label: t("assignment_description"),
|
|
403
|
-
fullWidth: true,
|
|
404
|
-
multiline: true,
|
|
405
|
-
rows: 3,
|
|
406
|
-
value: assignment.instructions,
|
|
407
|
-
onChange: handleChange("instructions")
|
|
408
393
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
409
394
|
disableHoverListener: selectedCourses?.length > 0,
|
|
410
395
|
disableFocusListener: selectedCourses?.length > 0,
|
|
@@ -412,7 +397,7 @@ function CreateAssignmentDialog({
|
|
|
412
397
|
title: t("no_shared_courses"),
|
|
413
398
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
414
399
|
style: {
|
|
415
|
-
display:
|
|
400
|
+
display: "inline-block"
|
|
416
401
|
},
|
|
417
402
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
418
403
|
"data-cy": "assignment-exercise-selector-button",
|
|
@@ -453,7 +438,25 @@ function CreateAssignmentDialog({
|
|
|
453
438
|
flexDirection: "column",
|
|
454
439
|
gap: 2
|
|
455
440
|
},
|
|
456
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
441
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
442
|
+
"data-cy": "assignment-title-input",
|
|
443
|
+
label: t("assignment_title"),
|
|
444
|
+
fullWidth: true,
|
|
445
|
+
value: assignment.title,
|
|
446
|
+
onChange: handleChange("title"),
|
|
447
|
+
required: true,
|
|
448
|
+
InputLabelProps: {
|
|
449
|
+
shrink: true
|
|
450
|
+
}
|
|
451
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
452
|
+
"data-cy": "assignment-description-input",
|
|
453
|
+
label: t("assignment_description"),
|
|
454
|
+
fullWidth: true,
|
|
455
|
+
multiline: true,
|
|
456
|
+
rows: 3,
|
|
457
|
+
value: assignment.instructions,
|
|
458
|
+
onChange: handleChange("instructions")
|
|
459
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
|
|
457
460
|
fullWidth: true,
|
|
458
461
|
disabled: !assignment.classroomId,
|
|
459
462
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
@@ -484,17 +487,49 @@ function CreateAssignmentDialog({
|
|
|
484
487
|
})]
|
|
485
488
|
}, member.memberId))
|
|
486
489
|
})]
|
|
487
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
490
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
491
|
+
sx: {
|
|
492
|
+
display: "flex",
|
|
493
|
+
width: "100%",
|
|
494
|
+
alignItems: "center",
|
|
495
|
+
justifyContent: "space-between"
|
|
496
|
+
},
|
|
497
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LocalizationProvider.LocalizationProvider, {
|
|
498
|
+
dateAdapter: _AdapterDayjs.AdapterDayjs,
|
|
499
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DatePicker.DatePicker, {
|
|
500
|
+
label: t("assign_date"),
|
|
501
|
+
value: assignment.scheduleDate,
|
|
502
|
+
onChange: date => setAssignment(prev => ({
|
|
503
|
+
...prev,
|
|
504
|
+
scheduleDate: date
|
|
505
|
+
})),
|
|
506
|
+
disablePast: true,
|
|
507
|
+
maxDate: assignment.dueDate,
|
|
508
|
+
sx: {
|
|
509
|
+
width: "45%"
|
|
510
|
+
},
|
|
511
|
+
format: "DD MMM YYYY"
|
|
512
|
+
})
|
|
513
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
514
|
+
variant: "h4",
|
|
515
|
+
children: "-"
|
|
516
|
+
}), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_LocalizationProvider.LocalizationProvider, {
|
|
517
|
+
dateAdapter: _AdapterDayjs.AdapterDayjs,
|
|
518
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DatePicker.DatePicker, {
|
|
519
|
+
"data-cy": "assignment-date-picker",
|
|
520
|
+
label: t("due"),
|
|
521
|
+
value: assignment.dueDate,
|
|
522
|
+
disablePast: true,
|
|
523
|
+
onChange: date => setAssignment(prev => ({
|
|
524
|
+
...prev,
|
|
525
|
+
dueDate: date
|
|
526
|
+
})),
|
|
527
|
+
sx: {
|
|
528
|
+
width: "45%"
|
|
529
|
+
},
|
|
530
|
+
format: "DD MMM YYYY"
|
|
531
|
+
})
|
|
532
|
+
})]
|
|
498
533
|
})]
|
|
499
534
|
})
|
|
500
535
|
})]
|
|
@@ -517,66 +552,17 @@ function CreateAssignmentDialog({
|
|
|
517
552
|
},
|
|
518
553
|
onClick: handleClose,
|
|
519
554
|
children: t("cancel")
|
|
520
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
555
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ButtonGroup, {
|
|
521
556
|
variant: "contained",
|
|
522
557
|
color: "primary",
|
|
523
558
|
sx: {
|
|
524
559
|
borderRadius: 10
|
|
525
560
|
},
|
|
526
|
-
children:
|
|
561
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
527
562
|
"data-cy": "assignment-assign-button",
|
|
528
563
|
disabled: !assignment.assignedStudents?.length || !assignment.scheduleDate || !assignment.dueDate || !assignment.title || !assignment.classroomId || !assignment.exercises?.length,
|
|
529
564
|
onClick: async () => await handleCreateAssignment(),
|
|
530
565
|
children: t("assign")
|
|
531
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
532
|
-
color: "primary",
|
|
533
|
-
onClick: handleMenuOpen,
|
|
534
|
-
sx: {
|
|
535
|
-
minWidth: "40px",
|
|
536
|
-
padding: "6px"
|
|
537
|
-
},
|
|
538
|
-
disabled: !assignment.assignedStudents?.length || !assignment.scheduleDate || !assignment.dueDate || !assignment.title || !assignment.classroomId || !assignment.exercises?.length,
|
|
539
|
-
children: anchorEl ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDropUp.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDropDown.default, {})
|
|
540
|
-
})]
|
|
541
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Popover, {
|
|
542
|
-
anchorEl: anchorEl,
|
|
543
|
-
open: Boolean(anchorEl),
|
|
544
|
-
onClose: handleMenuClose,
|
|
545
|
-
anchorOrigin: {
|
|
546
|
-
vertical: "top",
|
|
547
|
-
horizontal: "left"
|
|
548
|
-
},
|
|
549
|
-
transformOrigin: {
|
|
550
|
-
vertical: "bottom",
|
|
551
|
-
horizontal: "left"
|
|
552
|
-
},
|
|
553
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
554
|
-
display: "flex",
|
|
555
|
-
flexDirection: "column",
|
|
556
|
-
width: "100%",
|
|
557
|
-
gap: 1,
|
|
558
|
-
padding: 2,
|
|
559
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LocalizationProvider.LocalizationProvider, {
|
|
560
|
-
dateAdapter: _AdapterDayjs.AdapterDayjs,
|
|
561
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DatePicker.DatePicker, {
|
|
562
|
-
label: t("assign_date"),
|
|
563
|
-
value: assignment.scheduleDate,
|
|
564
|
-
onChange: date => setAssignment(prev => ({
|
|
565
|
-
...prev,
|
|
566
|
-
scheduleDate: date
|
|
567
|
-
}))
|
|
568
|
-
})
|
|
569
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
570
|
-
variant: "outlined",
|
|
571
|
-
color: "primary",
|
|
572
|
-
fullWidth: true,
|
|
573
|
-
"data-cy": "assignment-schedule-button",
|
|
574
|
-
onClick: async () => {
|
|
575
|
-
await handleCreateAssignment();
|
|
576
|
-
handleMenuClose();
|
|
577
|
-
},
|
|
578
|
-
children: t("schedule_assignment")
|
|
579
|
-
})]
|
|
580
566
|
})
|
|
581
567
|
})]
|
|
582
568
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AssignmentSelectExercise.default, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "CreateAssignmentDialog",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./CreateAssignmentDialog.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "CreateAssignmentDialog",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./CreateAssignmentDialog.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SelectAssignmentTypeDialog",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./SelectAssignmentTypeDialog.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "SelectAssignmentTypeDialog",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./SelectAssignmentTypeDialog.js"
|
|
6
|
+
}
|
|
7
7
|
|
|
@@ -47,6 +47,7 @@ function CardVisibility({
|
|
|
47
47
|
icon: icon,
|
|
48
48
|
label: t(visibility),
|
|
49
49
|
sx: theme => ({
|
|
50
|
+
border: "1px solid",
|
|
50
51
|
position: "absolute",
|
|
51
52
|
bottom: "8px",
|
|
52
53
|
right: "8px",
|
|
@@ -66,13 +67,14 @@ function CardVisibility({
|
|
|
66
67
|
}),
|
|
67
68
|
label: t("hidden"),
|
|
68
69
|
sx: theme => ({
|
|
70
|
+
border: "1px solid",
|
|
69
71
|
position: "absolute",
|
|
70
72
|
bottom: "8px",
|
|
71
73
|
right: "108px",
|
|
72
74
|
fontWeight: "bold",
|
|
73
75
|
textTransform: "capitalize",
|
|
74
76
|
pointerEvents: "none",
|
|
75
|
-
boxShadow: theme.shadows[
|
|
77
|
+
boxShadow: theme.shadows[1],
|
|
76
78
|
backgroundColor: theme.palette.background.paper,
|
|
77
79
|
color: theme.palette.text.secondary
|
|
78
80
|
})
|
|
@@ -132,7 +132,7 @@ function OverflowMenu({
|
|
|
132
132
|
fontSize: "small"
|
|
133
133
|
})
|
|
134
134
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
135
|
-
children: t("
|
|
135
|
+
children: t("hide_from_students")
|
|
136
136
|
})]
|
|
137
137
|
}), handleUnhideCourse && hiddenCourses.includes(courseId) && !isClassroomArchived && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
|
|
138
138
|
onClick: () => handleUnhideCourse(courseId),
|
|
@@ -150,7 +150,7 @@ function OverflowMenu({
|
|
|
150
150
|
fontSize: "small"
|
|
151
151
|
})
|
|
152
152
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
153
|
-
children: t("
|
|
153
|
+
children: t("remove_course")
|
|
154
154
|
})]
|
|
155
155
|
})]
|
|
156
156
|
});
|