@nualang/nualang-ui-components 0.1.1263 → 0.1.1265
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/Assignments/AssignmentBotSelection/package.json +5 -6
- package/dist/Assignments/AssignmentCard/AssignmentCard.js +1 -1
- package/dist/Assignments/AssignmentCard/package.json +5 -6
- package/dist/Assignments/AssignmentCardsList/package.json +5 -6
- package/dist/Assignments/AssignmentCourseSelection/package.json +5 -6
- package/dist/Assignments/AssignmentExerciseSelection/AssignmentExerciseSelection.js +12 -3
- package/dist/Assignments/AssignmentExerciseSelection/package.json +5 -6
- package/dist/Assignments/AssignmentExerciseSelector/package.json +5 -6
- package/dist/Assignments/AssignmentRoleplaySelection/AssignmentRoleplaySelection.js +6 -3
- package/dist/Assignments/AssignmentRoleplaySelection/package.json +5 -6
- package/dist/Assignments/CreateAssignmentDialog/package.json +5 -6
- package/dist/Assignments/SelectAssignmentTypeDialog/SelectAssignmentTypeDialog.js +8 -8
- package/dist/Assignments/SelectAssignmentTypeDialog/package.json +5 -6
- package/dist/Cards/Course/Course.js +3 -3
- package/dist/Cards/RecordingCard/RecordingCard.js +1 -1
- package/dist/Cards/ScheduleCard/ScheduleCard.js +1 -1
- package/dist/Cards/SubmissionsCard/SubmissionsCard.js +1 -1
- package/dist/Chat/ChatLoading/ChatLoading.js +206 -0
- package/dist/Chat/ChatLoading/package.json +6 -0
- package/dist/Chat/Messages/Messages.js +9 -2
- package/dist/Chat/Messages/Question/Question.js +1 -1
- package/dist/Chat/TopBar/TopBar.js +2 -2
- package/dist/Containers/App/App.js +6 -6
- package/dist/Dialogs/AddToClassroom/AddToClassroom.js +1 -1
- package/dist/Dialogs/CreatePhrase/CreatePhrase.js +3 -3
- package/dist/Dialogs/ExerciseMenu/Menus/CloseExercise/CloseExercise.js +1 -1
- package/dist/Dialogs/ExerciseMenu/Menus/CompletedExcercise/CompletedExcercise.js +1 -1
- package/dist/Dialogs/ExerciseMenu/Menus/InProgressExercise/InProgressExercise.js +1 -1
- package/dist/Dialogs/FeedbackInfoDialog/FeedbackInfoDialog.js +1 -1
- package/dist/Dialogs/GenerateBot/GenerateBot.js +15 -10
- package/dist/Dialogs/GeneratePhrases/GeneratePhrases.js +1 -1
- package/dist/Dialogs/GenerateQuestion/GenerateQuestion.js +1 -1
- package/dist/Dialogs/GenerateRoleplay/GenerateRoleplay.js +3 -3
- package/dist/Dialogs/PDFViewer/PDFViewer.js +1 -1
- package/dist/Dialogs/RecordingDialog/RecordingDialog.js +1 -1
- package/dist/Dialogs/ReportProblem/ReportProblem.js +1 -1
- package/dist/Dialogs/SelectActor/SelectActor.js +1 -1
- package/dist/Dialogs/WaveformDialog/WaveformDialog.js +2 -2
- package/dist/Editors/Bot/Bot.js +1 -1
- package/dist/Editors/Bot/Editor/BotDesigner/VarList.js +1 -1
- package/dist/Editors/Bot/Editor/Editor.js +2 -2
- package/dist/Editors/Phrases/Phrases.js +4 -4
- package/dist/Exercises/Bot/Bot.js +7 -1
- package/dist/Exercises/Listener/Listener.js +10 -10
- package/dist/Exercises/Pronouncer/Pronouncer.js +9 -9
- package/dist/Exercises/Roleplay/Games/ActItOutGame/ActItOutGame.js +1 -1
- package/dist/Exercises/Roleplay/Games/ActItOutGameListening/ActItOutGameListening.js +1 -1
- package/dist/Exercises/Roleplay/Games/ActItOutGameListeningAndSpeaking/ActItOutGame.js +1 -1
- package/dist/Exercises/Roleplay/Games/ActItOutGameSpeaking/ActItOutGame.js +1 -1
- package/dist/Exercises/Roleplay/Games/TopBarActions.js +2 -2
- package/dist/Exercises/Roleplay/OriginalRoleplay.js +3 -3
- package/dist/Exercises/Roleplay/Roleplay.js +1 -1
- package/dist/Exercises/Roleplay/RoleplayInfo/RoleplayInfo.js +1 -1
- package/dist/Exercises/Translator/Translator.js +10 -10
- package/dist/Forms/ChipInput/ChipInput.js +3 -3
- package/dist/Forms/CreateBot/Steps/BotInformation/BotInformation.js +7 -7
- package/dist/Forms/CreateBot/Steps/BotSettings/BotSettings.js +29 -25
- package/dist/Forms/CreateClassroom/Steps/ClassroomInformation/ClassroomInformation.js +1 -1
- package/dist/Forms/CreateClassroom/Steps/ClassroomSettings/ClassroomSettings.js +5 -3
- package/dist/Forms/CreateClassroom/Steps/Confirmation/Confirmation.js +1 -1
- package/dist/Forms/CreateClassroom/Steps/CourseSettings/CourseSettings.js +77 -30
- package/dist/Forms/CreateClassroom/Steps/Customization/Customization.js +1 -1
- package/dist/Forms/CreateCourse/Steps/Confirmation/Confirmation.js +1 -1
- package/dist/Forms/CreateCourse/Steps/CourseInformation/CourseInformation.js +1 -1
- package/dist/Forms/CreateCourse/Steps/CourseSettings/CourseSettings.js +10 -9
- package/dist/Forms/CreateCourse/Steps/Customization/Customization.js +1 -1
- package/dist/Forms/CreateGroup/Steps/Confirmation/Confirmation.js +1 -1
- package/dist/Forms/CreateGroup/Steps/GroupInformation/GroupInformation.js +1 -1
- package/dist/Forms/CreateGroup/Steps/GroupSettings/GroupSettings.js +1 -1
- package/dist/Forms/CreateMeetingMultiStepForm/GroupAssignment.js +3 -3
- package/dist/Forms/CreateMeetingMultiStepForm/MeetingForm.js +2 -2
- package/dist/Forms/CreateRoleplay/Steps/Confirmation/Confirmation.js +1 -1
- package/dist/Forms/CreateRoleplay/Steps/RoleplayInformation/RoleplayInformation.js +1 -1
- package/dist/Forms/CreateRoleplay/Steps/RoleplaySettings/RoleplaySettings.js +1 -1
- package/dist/Forms/CreateRoleplayHook/Steps/Confirmation/Confirmation.js +1 -1
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplayInformation/RoleplayInformation.js +1 -1
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplaySettings/RoleplaySettings.js +1 -1
- package/dist/Forms/CreateTopic/Steps/Confirmation/Confirmation.js +1 -1
- package/dist/Forms/CreateTopic/Steps/Customization/Customization.js +1 -1
- package/dist/Forms/CreateTopic/Steps/TopicInformation/TopicInformation.js +1 -1
- package/dist/Forms/CreateTopic/Steps/TopicSettings/TopicSettings.js +15 -13
- package/dist/Forms/DiscussImageSelector/ImageSelector.js +1 -1
- package/dist/Forms/DiscussMultiStepFormDialog/MultiStepFormDialog.js +2 -2
- package/dist/Forms/FeedbackForm/FeedbackForm.js +8 -8
- package/dist/Forms/FeedbackInfo/FeedbackInfo.js +1 -1
- package/dist/Forms/ImageSelector/ImageSelector.js +2 -2
- package/dist/Forms/MultiStepForm/MultiStepForm.js +2 -2
- package/dist/Forms/MultiStepFormDialog/MultiStepFormDialog.js +2 -2
- package/dist/Forms/PdfUploader/PdfUploader.js +1 -1
- package/dist/Forms/RecordingInfo/RecordingInfo.js +1 -1
- package/dist/Forms/Settings/Tabs/Display/Display.js +2 -2
- package/dist/Forms/Settings/Tabs/EmailNotifications/EmailNotifications.js +2 -2
- package/dist/Forms/Settings/Tabs/General/General.js +3 -3
- package/dist/Forms/Settings/Tabs/Subscription/Subscription.js +2 -2
- package/dist/Forms/UpdateBot/UpdateBot.js +2 -2
- package/dist/Forms/UpdateClassroom/UpdateClassroom.js +8 -6
- package/dist/Forms/UpdateCourse/UpdateCourse.js +3 -3
- package/dist/Forms/UpdateGroup/UpdateGroup.js +2 -2
- package/dist/Forms/UpdateRoleplay/UpdateRoleplay.js +2 -2
- package/dist/Forms/UpdateTopic/UpdateTopic.js +3 -3
- package/dist/Forms/VideoUploader/VideoUploader.js +1 -1
- package/dist/Forms/VoiceSelector/VoiceSelector.js +3 -3
- package/dist/Lists/Avatars/Avatars.js +2 -2
- package/dist/Lists/Bots/Bots.js +2 -2
- package/dist/Lists/Categories/Categories.js +1 -1
- package/dist/Lists/Classrooms/Classrooms.js +2 -2
- package/dist/Lists/Courses/Courses.js +2 -2
- package/dist/Lists/Leaderboard/Leaderboard.js +2 -2
- package/dist/Lists/ListElements/index.js +4 -4
- package/dist/Lists/Phrases/Phrases.js +1 -0
- package/dist/Lists/Roleplays/Roleplays.js +2 -2
- package/dist/Lists/Sections/Sections.js +2 -2
- package/dist/Lists/TopicPreview/TopicPreview.js +2 -2
- package/dist/Lists/Topics/Topics.js +2 -2
- package/dist/Lists/Voices/Voices.js +1 -1
- package/dist/Live/GameSettings/GameSettings.js +1 -1
- package/dist/Live/LiveListener/LiveListener.js +3 -3
- package/dist/Live/LiveTranslator/LiveTranslator.js +3 -3
- package/dist/Live/WaitingRoom/WaitingRoom.js +2 -2
- package/dist/Misc/AnswerResult/AnswerResult.js +1 -1
- package/dist/Misc/AvatarSelector/AvatarSelector.js +2 -2
- package/dist/Misc/EmojiInput/css/emoji-mart.css +3 -2
- package/dist/Misc/ExerciseBottomBar/ExerciseBottomBar.js +1 -1
- package/dist/Misc/LanguageSelector/LanguageSelector.js +1 -1
- package/dist/Misc/NotFound/ClassCourses.js +2 -2
- package/dist/Misc/Testimonials/Testimonials.js +1 -1
- package/dist/Navigation/ResponsiveDrawer/ResponsiveDrawer.js +3 -3
- package/dist/Navigation/ResponsiveStepper/ResponsiveStepper.js +2 -2
- package/dist/Payments/BillingInfo/BillingInfo.js +1 -1
- package/dist/Payments/CardDetails/CardDetails.js +1 -1
- package/dist/Payments/Subscription/Subscription.js +2 -2
- package/dist/Screens/Activity/Activity.js +2 -2
- package/dist/Screens/Activity/Exercise/Attempt/Attempt.js +3 -3
- package/dist/Screens/Activity/Exercise/Exercise.js +1 -1
- package/dist/Screens/Courses/SearchCourses/SearchCourses.js +1 -1
- package/dist/Screens/Courses/ViewCourse/ViewTopic/ViewTopic.js +2 -2
- package/dist/Screens/GenerateAudio/GenerateAudio.js +3 -3
- package/dist/Screens/Onboard/Steps/RoleSelection.js +1 -1
- package/dist/Tables/Progress/Progress.js +2 -2
- package/dist/Tables/Progress/ProgressList.js +2 -2
- package/dist/Tables/Progress/ProgressTable.js +9 -9
- package/dist/Tables/SubmissionsTableCards/SubmissionsTableCards.js +1 -1
- package/dist/hooks/useExerciseState.js +46 -3
- package/dist/hooks/useRecognition.js +2 -2
- package/dist/utils/dragAndDrop/dragAndDrop.js +19 -11
- package/dist/utils/voiceImages.js +2 -2
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ function Exercise({
|
|
|
41
41
|
selectedExercises,
|
|
42
42
|
useCase,
|
|
43
43
|
assignment,
|
|
44
|
+
viewOnly,
|
|
44
45
|
progressHelpers,
|
|
45
46
|
username,
|
|
46
47
|
preferred_username,
|
|
@@ -231,6 +232,7 @@ function Exercise({
|
|
|
231
232
|
ml: 7,
|
|
232
233
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AssignmentRoleplaySelection.default, {
|
|
233
234
|
roleplays: roleplays,
|
|
235
|
+
viewOnly: viewOnly,
|
|
234
236
|
courseSectionTopicId: courseSectionTopicId,
|
|
235
237
|
t: t,
|
|
236
238
|
isExerciseSelected: isExerciseSelected,
|
|
@@ -252,6 +254,7 @@ function Exercise({
|
|
|
252
254
|
ml: 7,
|
|
253
255
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AssignmentBotSelection.default, {
|
|
254
256
|
bots: bots,
|
|
257
|
+
viewOnly: viewOnly,
|
|
255
258
|
courseSectionTopicId: courseSectionTopicId,
|
|
256
259
|
t: t,
|
|
257
260
|
isExerciseSelected: isExerciseSelected,
|
|
@@ -284,6 +287,7 @@ function ExerciseList({
|
|
|
284
287
|
handleSelectExercise,
|
|
285
288
|
selectedExercises,
|
|
286
289
|
useCase,
|
|
290
|
+
viewOnly,
|
|
287
291
|
assignment,
|
|
288
292
|
handleStartExercise,
|
|
289
293
|
isCreator,
|
|
@@ -303,6 +307,7 @@ function ExerciseList({
|
|
|
303
307
|
const keyId = `exerc_${courseSectionTopicId}_${exercise}_${i}`;
|
|
304
308
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Exercise, {
|
|
305
309
|
t: t,
|
|
310
|
+
viewOnly: viewOnly,
|
|
306
311
|
...exercise,
|
|
307
312
|
isMember: isMember,
|
|
308
313
|
courseSectionTopicId: courseSectionTopicId,
|
|
@@ -361,6 +366,7 @@ function Topic({
|
|
|
361
366
|
memberCourseCompletions,
|
|
362
367
|
lastClickedExerciseId,
|
|
363
368
|
completion,
|
|
369
|
+
viewOnly,
|
|
364
370
|
getRoleplays,
|
|
365
371
|
getBots,
|
|
366
372
|
...otherProps
|
|
@@ -606,9 +612,9 @@ function Topic({
|
|
|
606
612
|
label: `${selectedCount} / ${totalCount}`,
|
|
607
613
|
size: "medium",
|
|
608
614
|
disabled: selectedCount === 0,
|
|
609
|
-
color: selectedCount === totalCount ?
|
|
615
|
+
color: selectedCount === totalCount ? "primary" : "default",
|
|
610
616
|
sx: {
|
|
611
|
-
fontWeight:
|
|
617
|
+
fontWeight: "bold",
|
|
612
618
|
marginRight: 3
|
|
613
619
|
}
|
|
614
620
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ListItemIcon, {
|
|
@@ -629,6 +635,7 @@ function Topic({
|
|
|
629
635
|
unmountOnExit: true,
|
|
630
636
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ExerciseList, {
|
|
631
637
|
t: t,
|
|
638
|
+
viewOnly: viewOnly,
|
|
632
639
|
topicInfo: {
|
|
633
640
|
topicName,
|
|
634
641
|
description
|
|
@@ -733,6 +740,7 @@ function Section({
|
|
|
733
740
|
sx: root,
|
|
734
741
|
children: viewOnly ? filteredTopics.map((topic, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Topic, {
|
|
735
742
|
index: i,
|
|
743
|
+
viewOnly: viewOnly,
|
|
736
744
|
topics: topics,
|
|
737
745
|
topicLength: topics.length,
|
|
738
746
|
sectionId: sectionId,
|
|
@@ -760,6 +768,7 @@ function Section({
|
|
|
760
768
|
progressHelpers: progressHelpers,
|
|
761
769
|
memberCourseCompletions: memberCourseCompletions
|
|
762
770
|
}, `${sectionId}-${topic.topicId}`)) : topics.map((topic, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Topic, {
|
|
771
|
+
viewOnly: viewOnly,
|
|
763
772
|
index: i,
|
|
764
773
|
topics: topics,
|
|
765
774
|
topicLength: topics.length,
|
|
@@ -861,6 +870,7 @@ function AssignmentExerciseSelection({
|
|
|
861
870
|
t = text => text,
|
|
862
871
|
sections = [],
|
|
863
872
|
isMember,
|
|
873
|
+
handleSelectExercise = () => {},
|
|
864
874
|
isCreator,
|
|
865
875
|
courseId,
|
|
866
876
|
handleFetchTopic,
|
|
@@ -872,7 +882,6 @@ function AssignmentExerciseSelection({
|
|
|
872
882
|
setIsExerciseSelected,
|
|
873
883
|
getRoleplays,
|
|
874
884
|
getBots,
|
|
875
|
-
handleSelectExercise,
|
|
876
885
|
selectedExercises,
|
|
877
886
|
useCase,
|
|
878
887
|
assignment,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "AssignmentExerciseSelection",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentExerciseSelection.js"
|
|
6
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "AssignmentExerciseSelector",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentExerciseSelector.js"
|
|
6
|
+
}
|
|
@@ -361,18 +361,21 @@ function AssignmentRoleplaySelection({
|
|
|
361
361
|
t,
|
|
362
362
|
isExerciseSelected,
|
|
363
363
|
handleSelectExercise,
|
|
364
|
-
selectedExercises,
|
|
364
|
+
selectedExercises = [],
|
|
365
365
|
useCase,
|
|
366
366
|
assignment,
|
|
367
367
|
memberCourseCompletions,
|
|
368
368
|
topicProgress,
|
|
369
369
|
topics,
|
|
370
370
|
isCreator,
|
|
371
|
-
lastClickedExerciseId
|
|
371
|
+
lastClickedExerciseId,
|
|
372
|
+
viewOnly
|
|
372
373
|
}) {
|
|
373
374
|
const [isRoleplaySelected, setIsRoleplaySelected] = (0, _react.useState)(false);
|
|
374
375
|
const filteredCompletions = Array.isArray(memberCourseCompletions) && memberCourseCompletions.length > 0 ? memberCourseCompletions.filter(completion => completion.courseSectionTopicId === courseSectionTopicId) : [];
|
|
375
|
-
|
|
376
|
+
const selectedRoleplayIds = new Set(selectedExercises.map(sE => sE.roleplayId));
|
|
377
|
+
const filteredRoleplays = !viewOnly ? roleplays : roleplays.filter(e => selectedRoleplayIds.has(e.roleplayId));
|
|
378
|
+
return filteredRoleplays.map(roleplay => /*#__PURE__*/(0, _jsxRuntime.jsx)(Roleplay, {
|
|
376
379
|
roleplay: roleplay,
|
|
377
380
|
isRoleplaySelected: isRoleplaySelected,
|
|
378
381
|
setIsRoleplaySelected: setIsRoleplaySelected,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "AssignmentRoleplaySelection",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./AssignmentRoleplaySelection.js"
|
|
6
|
+
}
|
|
@@ -74,7 +74,7 @@ function SelectAssignmentTypeDialog({
|
|
|
74
74
|
},
|
|
75
75
|
children: [dialogTitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogTitle, {
|
|
76
76
|
sx: {
|
|
77
|
-
fontWeight:
|
|
77
|
+
fontWeight: "bold"
|
|
78
78
|
},
|
|
79
79
|
children: dialogTitle
|
|
80
80
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogContent, {
|
|
@@ -94,7 +94,7 @@ function SelectAssignmentTypeDialog({
|
|
|
94
94
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Grid, {
|
|
95
95
|
container: true,
|
|
96
96
|
sx: {
|
|
97
|
-
width:
|
|
97
|
+
width: "100%"
|
|
98
98
|
},
|
|
99
99
|
spacing: 2,
|
|
100
100
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
|
|
@@ -112,9 +112,9 @@ function SelectAssignmentTypeDialog({
|
|
|
112
112
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
113
113
|
variant: "h4",
|
|
114
114
|
sx: {
|
|
115
|
-
fontWeight:
|
|
115
|
+
fontWeight: "bold"
|
|
116
116
|
},
|
|
117
|
-
children: t(
|
|
117
|
+
children: t("assign_exercises")
|
|
118
118
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Assignment.default, {
|
|
119
119
|
sx: theme => ({
|
|
120
120
|
width: "100%",
|
|
@@ -124,7 +124,7 @@ function SelectAssignmentTypeDialog({
|
|
|
124
124
|
})
|
|
125
125
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
126
126
|
variant: "subtitle1",
|
|
127
|
-
children: t(
|
|
127
|
+
children: t("assign_exercises_desc")
|
|
128
128
|
})]
|
|
129
129
|
})
|
|
130
130
|
})
|
|
@@ -143,9 +143,9 @@ function SelectAssignmentTypeDialog({
|
|
|
143
143
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
144
144
|
variant: "h4",
|
|
145
145
|
sx: {
|
|
146
|
-
fontWeight:
|
|
146
|
+
fontWeight: "bold"
|
|
147
147
|
},
|
|
148
|
-
children: t(
|
|
148
|
+
children: t("assign_discuss")
|
|
149
149
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoCall.default, {
|
|
150
150
|
sx: theme => ({
|
|
151
151
|
width: "100%",
|
|
@@ -155,7 +155,7 @@ function SelectAssignmentTypeDialog({
|
|
|
155
155
|
})
|
|
156
156
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
157
157
|
variant: "subtitle1",
|
|
158
|
-
children: t(
|
|
158
|
+
children: t("assign_discuss_desc")
|
|
159
159
|
})]
|
|
160
160
|
})
|
|
161
161
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "SelectAssignmentTypeDialog",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./SelectAssignmentTypeDialog.js"
|
|
6
|
+
}
|
|
@@ -114,7 +114,7 @@ function OverflowMenu({
|
|
|
114
114
|
onClick: async () => {
|
|
115
115
|
await handleDuplicateCourse(course, classroomId);
|
|
116
116
|
},
|
|
117
|
-
disabled: !canDuplicateCourse || course.duplicated && course.duplicatedBy !==
|
|
117
|
+
disabled: !canDuplicateCourse || course.duplicated && course.duplicatedBy !== "creator",
|
|
118
118
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CardElements.CardMenuIcon, {
|
|
119
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCopy.default, {
|
|
120
120
|
fontSize: "small"
|
|
@@ -351,8 +351,8 @@ function CourseCard({
|
|
|
351
351
|
// const memberCount = membersQuery.isSuccess ? membersQuery.data.Items.length : 0;
|
|
352
352
|
|
|
353
353
|
const isPlaysVisible = !disablePlays && exerciseStartTotal > -1;
|
|
354
|
-
const isCollaborator = Array.isArray(course.collaborators) && course.collaborators.some(collab => (typeof collab ===
|
|
355
|
-
const canDuplicateCourse = isCreator || course.isShareable ===
|
|
354
|
+
const isCollaborator = Array.isArray(course.collaborators) && course.collaborators.some(collab => (typeof collab === "string" ? collab : collab?.S) === email);
|
|
355
|
+
const canDuplicateCourse = isCreator || course.isShareable === "everyone" || course.isShareable === "collaborators" && isCollaborator;
|
|
356
356
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CardElements.CardContainer, {
|
|
357
357
|
sx: disableRaised ? {} : _CardElements.classes.hover,
|
|
358
358
|
raised: disableRaised ? false : anchorEl || isOutlineOpen,
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = ChatLoading;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _mui = require("tss-react/mui");
|
|
9
|
+
var _styles = require("@mui/material/styles");
|
|
10
|
+
var _Avatar = _interopRequireDefault(require("@mui/material/Avatar"));
|
|
11
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
12
|
+
var _Person = _interopRequireDefault(require("@mui/icons-material/Person"));
|
|
13
|
+
var _material = require("@mui/material");
|
|
14
|
+
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const useStyles = (0, _mui.makeStyles)()((theme, {
|
|
18
|
+
isMyMessage,
|
|
19
|
+
isButton,
|
|
20
|
+
hideAvatar,
|
|
21
|
+
isHighlighted
|
|
22
|
+
}) => ({
|
|
23
|
+
root: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: isMyMessage ? isButton || hideAvatar ? "flex-start" : "flex-end" : null,
|
|
26
|
+
marginBottom: isButton ? null : theme.spacing(3)
|
|
27
|
+
},
|
|
28
|
+
message: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
maxWidth: 500,
|
|
31
|
+
gap: "3px"
|
|
32
|
+
},
|
|
33
|
+
avatar: {
|
|
34
|
+
[theme.breakpoints.down("md")]: {
|
|
35
|
+
height: 40,
|
|
36
|
+
width: 40
|
|
37
|
+
},
|
|
38
|
+
[theme.breakpoints.up("md")]: {
|
|
39
|
+
height: 60,
|
|
40
|
+
width: 60
|
|
41
|
+
},
|
|
42
|
+
marginRight: theme.spacing(2),
|
|
43
|
+
display: isButton || hideAvatar ? "none" : null
|
|
44
|
+
},
|
|
45
|
+
bubble: {
|
|
46
|
+
display: "block",
|
|
47
|
+
backgroundColor: theme.palette.common.white,
|
|
48
|
+
color: theme.palette.mode === "dark" ? theme.palette.primary.dark : theme.palette.primary.main,
|
|
49
|
+
padding: theme.spacing(1, 2),
|
|
50
|
+
borderRadius: theme.spacing(2),
|
|
51
|
+
boxShadow: theme.shadows[2],
|
|
52
|
+
minWidth: 150,
|
|
53
|
+
borderTopLeftRadius: 0,
|
|
54
|
+
borderStyle: "solid",
|
|
55
|
+
borderColor: theme.palette.primary.main,
|
|
56
|
+
borderWidth: "thin",
|
|
57
|
+
transition: isButton ? theme.transitions.create("background-color") : null,
|
|
58
|
+
"& img": {
|
|
59
|
+
paddingTop: theme.spacing(1),
|
|
60
|
+
paddingBottom: theme.spacing(1)
|
|
61
|
+
},
|
|
62
|
+
"& svg": {
|
|
63
|
+
marginTop: theme.spacing(1),
|
|
64
|
+
marginBottom: theme.spacing(1),
|
|
65
|
+
color: isMyMessage ? theme.palette.grey[400] : isHighlighted ? theme.palette.primary.main : theme.palette.grey[600]
|
|
66
|
+
},
|
|
67
|
+
"&:hover": {
|
|
68
|
+
backgroundColor: theme.palette.grey[300],
|
|
69
|
+
borderColor: isButton ? theme.palette.primary.dark : null
|
|
70
|
+
},
|
|
71
|
+
"@media print": {
|
|
72
|
+
"-webkit-print-color-adjust": "exact",
|
|
73
|
+
"-moz-print-color-adjust": "exact",
|
|
74
|
+
" -ms-print-color-adjust": "exact",
|
|
75
|
+
"print-color-adjust": "exact",
|
|
76
|
+
"page-break-inside": "avoid",
|
|
77
|
+
boxShadow: "none"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
function LoadingIndicator({
|
|
82
|
+
loading,
|
|
83
|
+
setLoading
|
|
84
|
+
}) {
|
|
85
|
+
const theme = (0, _styles.useTheme)();
|
|
86
|
+
(0, _react.useEffect)(() => {
|
|
87
|
+
const interval = setInterval(() => {
|
|
88
|
+
setLoading(prevChecked => !prevChecked);
|
|
89
|
+
}, 500);
|
|
90
|
+
return () => {
|
|
91
|
+
clearInterval(interval);
|
|
92
|
+
};
|
|
93
|
+
}, []);
|
|
94
|
+
const icon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Paper, {
|
|
95
|
+
sx: {
|
|
96
|
+
m: 1,
|
|
97
|
+
width: 9,
|
|
98
|
+
height: 9,
|
|
99
|
+
borderRadius: "50%",
|
|
100
|
+
backgroundColor: theme.palette.primary.main
|
|
101
|
+
},
|
|
102
|
+
elevation: 4
|
|
103
|
+
});
|
|
104
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
105
|
+
sx: {
|
|
106
|
+
display: "flex",
|
|
107
|
+
height: "auto",
|
|
108
|
+
overflow: "hidden"
|
|
109
|
+
},
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grow, {
|
|
111
|
+
in: loading,
|
|
112
|
+
children: icon
|
|
113
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grow, {
|
|
114
|
+
in: loading,
|
|
115
|
+
style: {
|
|
116
|
+
transformOrigin: "0 0 0"
|
|
117
|
+
},
|
|
118
|
+
timeout: loading ? 400 : 0,
|
|
119
|
+
children: icon
|
|
120
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grow, {
|
|
121
|
+
in: loading,
|
|
122
|
+
style: {
|
|
123
|
+
transformOrigin: "0 0 0"
|
|
124
|
+
},
|
|
125
|
+
timeout: loading ? 800 : 0,
|
|
126
|
+
children: icon
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function ChatLoading({
|
|
131
|
+
t = text => text,
|
|
132
|
+
isMyMessage,
|
|
133
|
+
userImage,
|
|
134
|
+
name,
|
|
135
|
+
botMessageIndex,
|
|
136
|
+
hideAvatar,
|
|
137
|
+
messages = [],
|
|
138
|
+
index
|
|
139
|
+
}) {
|
|
140
|
+
const theme = (0, _styles.useTheme)();
|
|
141
|
+
const messageContainerId = `message${botMessageIndex}`;
|
|
142
|
+
const {
|
|
143
|
+
classes
|
|
144
|
+
} = useStyles({
|
|
145
|
+
isMyMessage,
|
|
146
|
+
hideAvatar,
|
|
147
|
+
messages,
|
|
148
|
+
index
|
|
149
|
+
});
|
|
150
|
+
const [isBotMessageLoading, setIsBotMessageLoading] = (0, _react.useState)(false);
|
|
151
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
152
|
+
className: classes.root,
|
|
153
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
154
|
+
className: classes.message,
|
|
155
|
+
children: [userImage ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
156
|
+
className: classes.avatar,
|
|
157
|
+
src: userImage,
|
|
158
|
+
alt: ""
|
|
159
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
160
|
+
className: classes.avatar,
|
|
161
|
+
sx: {
|
|
162
|
+
backgroundColor: theme.palette.mode === "dark" ? "white" : "",
|
|
163
|
+
color: theme.palette.mode === "dark" ? theme.palette.background.default : ""
|
|
164
|
+
},
|
|
165
|
+
alt: "",
|
|
166
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Person.default, {
|
|
167
|
+
fontSize: "large"
|
|
168
|
+
})
|
|
169
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
170
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
171
|
+
className: classes.bubble,
|
|
172
|
+
id: messageContainerId,
|
|
173
|
+
style: {
|
|
174
|
+
display: "flex",
|
|
175
|
+
alignItems: "center",
|
|
176
|
+
justifyContent: "space-between"
|
|
177
|
+
},
|
|
178
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
179
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, {
|
|
180
|
+
container: true,
|
|
181
|
+
alignItems: "center",
|
|
182
|
+
justifyContent: "space-between",
|
|
183
|
+
sx: {
|
|
184
|
+
display: "flex"
|
|
185
|
+
},
|
|
186
|
+
spacing: 4,
|
|
187
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, {
|
|
188
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
189
|
+
variant: "subtitle2",
|
|
190
|
+
component: "h4",
|
|
191
|
+
gutterBottom: true,
|
|
192
|
+
fontWeight: "bold",
|
|
193
|
+
align: "left",
|
|
194
|
+
children: name
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(LoadingIndicator, {
|
|
198
|
+
loading: isBotMessageLoading,
|
|
199
|
+
setLoading: setIsBotMessageLoading
|
|
200
|
+
})]
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
})]
|
|
204
|
+
})
|
|
205
|
+
});
|
|
206
|
+
}
|
|
@@ -12,6 +12,7 @@ var _Question = _interopRequireDefault(require("./Question"));
|
|
|
12
12
|
var _material = require("@mui/material");
|
|
13
13
|
var _dragAndDrop = require("../../utils/dragAndDrop/dragAndDrop");
|
|
14
14
|
var _core = require("@dnd-kit/core");
|
|
15
|
+
var _ChatLoading = _interopRequireDefault(require("../ChatLoading/ChatLoading"));
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
const useStyles = (0, _mui.makeStyles)()(theme => ({
|
|
@@ -220,7 +221,13 @@ function Messages({
|
|
|
220
221
|
messages: messages,
|
|
221
222
|
...m,
|
|
222
223
|
...otherProps
|
|
223
|
-
}, `messx_${i}`), !m?.question && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
224
|
+
}, `messx_${i}`), !m?.question && (m.isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatLoading.default, {
|
|
225
|
+
t: t,
|
|
226
|
+
index: i,
|
|
227
|
+
messages: messages,
|
|
228
|
+
...m,
|
|
229
|
+
...otherProps
|
|
230
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Message.default, {
|
|
224
231
|
t: t,
|
|
225
232
|
languageTag: languageTag,
|
|
226
233
|
disableTranslation: disableTranslation,
|
|
@@ -242,7 +249,7 @@ function Messages({
|
|
|
242
249
|
siteLanguage: siteLanguage,
|
|
243
250
|
...m,
|
|
244
251
|
...otherProps
|
|
245
|
-
}, `messy_${i}`)]
|
|
252
|
+
}, `messy_${i}`))]
|
|
246
253
|
});
|
|
247
254
|
})]
|
|
248
255
|
})
|
|
@@ -72,8 +72,8 @@ function TopBar({
|
|
|
72
72
|
children: [handleBack && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Paper.default, {
|
|
73
73
|
sx: {
|
|
74
74
|
display: {
|
|
75
|
-
xl:
|
|
76
|
-
xs:
|
|
75
|
+
xl: "none",
|
|
76
|
+
xs: "block"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|