@nualang/nualang-ui-components 0.1.1227 → 0.1.1229
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/AssignmentCourseSelection/AssignmentCourseSelection.js +1 -1
- package/dist/Assignments/AssignmentSelectExercise/AssignmentSelectExercise.js +1 -1
- package/dist/Chat/BottomBar/BottomBar.js +8 -0
- package/dist/Dialogs/CreatePhrase/CreatePhrase.js +4 -4
- package/dist/Forms/CreateClassroom/CreateClassroom.js +4 -2
- package/dist/Forms/CreateClassroom/Steps/ClassroomSettings/ClassroomSettings.js +4 -8
- package/dist/Forms/CreateMeetingMultiStepForm/MeetingForm.js +2 -7
- package/dist/Forms/UpdateClassroom/UpdateClassroom.js +3 -1
- package/dist/Screens/Classrooms/ViewClassroom/ViewClassroom.js +7 -17
- package/dist/Tables/MeetingPrompstList/MeetingPromptsList.js +1 -1
- package/package.json +1 -1
|
@@ -182,6 +182,13 @@ function BottomBar({
|
|
|
182
182
|
activeRef.current.focus();
|
|
183
183
|
}
|
|
184
184
|
}, [isListening, activeRef, disableInput]);
|
|
185
|
+
(0, _react.useEffect)(() => {
|
|
186
|
+
if (activeRef.current) {
|
|
187
|
+
activeRef.current.focus();
|
|
188
|
+
const length = inputValue.length;
|
|
189
|
+
activeRef.current.setSelectionRange(length, length);
|
|
190
|
+
}
|
|
191
|
+
}, [inputValue]);
|
|
185
192
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Paper.default, {
|
|
186
193
|
square: true,
|
|
187
194
|
className: classes.paper,
|
|
@@ -207,6 +214,7 @@ function BottomBar({
|
|
|
207
214
|
id: "voiceInput",
|
|
208
215
|
disabled: disableInput,
|
|
209
216
|
size: "large",
|
|
217
|
+
ref: buttonRef,
|
|
210
218
|
children: isListening ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_MicOff.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Mic.default, {})
|
|
211
219
|
})
|
|
212
220
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -208,7 +208,7 @@ function CreatePhrase({
|
|
|
208
208
|
};
|
|
209
209
|
|
|
210
210
|
// // translation
|
|
211
|
-
// const
|
|
211
|
+
// const generateTranslation = async () => {
|
|
212
212
|
// const translatedText = await handleTranslate(phrase, learnLang, forLang);
|
|
213
213
|
// if (translatedText && translatedText !== "") {
|
|
214
214
|
// setAutoTranslatedText(translatedText);
|
|
@@ -221,11 +221,11 @@ function CreatePhrase({
|
|
|
221
221
|
// }
|
|
222
222
|
// };
|
|
223
223
|
|
|
224
|
-
const
|
|
224
|
+
const generateTranslation = async () => {
|
|
225
225
|
try {
|
|
226
226
|
let chatGptResponse = await makeChatGptApiRequest({
|
|
227
227
|
model: "gpt-4o-mini",
|
|
228
|
-
promptKey: "
|
|
228
|
+
promptKey: "generateTranslation",
|
|
229
229
|
promptVariables: {
|
|
230
230
|
learnLang,
|
|
231
231
|
forLang,
|
|
@@ -409,7 +409,7 @@ function CreatePhrase({
|
|
|
409
409
|
children: t("add_alternative_version")
|
|
410
410
|
})
|
|
411
411
|
}), learnLang !== forLang && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DefaultColourButton.default, {
|
|
412
|
-
onClick:
|
|
412
|
+
onClick: generateTranslation,
|
|
413
413
|
disabled: !phrase || Array.isArray(translationList) && translationList.includes(autoTranslatedText),
|
|
414
414
|
size: "sm",
|
|
415
415
|
className: classes.alternativeVersionButton,
|
|
@@ -25,7 +25,8 @@ function CreateClassroom({
|
|
|
25
25
|
isUpgradePossible: true
|
|
26
26
|
},
|
|
27
27
|
learnLang,
|
|
28
|
-
verificationStatus
|
|
28
|
+
verificationStatus,
|
|
29
|
+
isVideoChatEnabled
|
|
29
30
|
}) {
|
|
30
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MultiStepForm.default, {
|
|
31
32
|
initialValues: {
|
|
@@ -50,7 +51,8 @@ function CreateClassroom({
|
|
|
50
51
|
forLanguages: forLanguages,
|
|
51
52
|
fileSizeLimit: fileSizeLimit,
|
|
52
53
|
subscription: subscription,
|
|
53
|
-
verificationStatus: verificationStatus
|
|
54
|
+
verificationStatus: verificationStatus,
|
|
55
|
+
isVideoChatEnabled: isVideoChatEnabled
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
58
|
CreateClassroom.propTypes = {};
|
|
@@ -25,21 +25,17 @@ function ClassroomSettings({
|
|
|
25
25
|
classroomId,
|
|
26
26
|
isUpdateClassroom = false,
|
|
27
27
|
scrollToDiscuss = false,
|
|
28
|
-
setScrollToDiscuss
|
|
28
|
+
setScrollToDiscuss,
|
|
29
|
+
isVideoChatEnabled
|
|
29
30
|
}) {
|
|
30
31
|
const {
|
|
31
32
|
visibility,
|
|
32
33
|
enrolmentKey,
|
|
33
34
|
allowedDomains,
|
|
34
35
|
collaborators,
|
|
35
|
-
vchatEnabledInSettings
|
|
36
|
-
vchatEnabled
|
|
36
|
+
vchatEnabledInSettings
|
|
37
37
|
} = values;
|
|
38
38
|
const vchatEnabledInSettingsRef = (0, _react.useRef)(null);
|
|
39
|
-
const [isWaysideClassroom, setIsWaysideClassroom] = (0, _react.useState)(false);
|
|
40
|
-
if (!isWaysideClassroom && classroomId && classroomId.toLowerCase().includes("wayside")) {
|
|
41
|
-
setIsWaysideClassroom(true);
|
|
42
|
-
}
|
|
43
39
|
const generateRandomEnrolmentKey = () => {
|
|
44
40
|
return String(Math.floor(Math.random() * 90000) + 10000);
|
|
45
41
|
};
|
|
@@ -236,7 +232,7 @@ function ClassroomSettings({
|
|
|
236
232
|
fullWidth: true
|
|
237
233
|
})]
|
|
238
234
|
})]
|
|
239
|
-
}),
|
|
235
|
+
}), isVideoChatEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
|
|
240
236
|
item: true,
|
|
241
237
|
xs: 12,
|
|
242
238
|
md: 12,
|
|
@@ -46,13 +46,8 @@ function MeetingForm({
|
|
|
46
46
|
const [selectedSample, setSelectedSample] = (0, _react.useState)("");
|
|
47
47
|
const [showForm, setShowForm] = (0, _react.useState)(false);
|
|
48
48
|
const currentDateTime = (0, _dayjs.default)();
|
|
49
|
-
let defaultMeetingDate = currentDateTime.format("MM/DD/YYYY");
|
|
50
|
-
const defaultMeetingTime = currentDateTime.
|
|
51
|
-
|
|
52
|
-
// Check if adding one hour goes to the next day and adjust the date if necessary
|
|
53
|
-
if (currentDateTime.add(1, "hour").date() !== currentDateTime.date()) {
|
|
54
|
-
defaultMeetingDate = currentDateTime.add(1, "hour").format("MM/DD/YYYY");
|
|
55
|
-
}
|
|
49
|
+
let defaultMeetingDate = currentDateTime.add(1, 'day').format("MM/DD/YYYY");
|
|
50
|
+
const defaultMeetingTime = currentDateTime.format("h:mm A");
|
|
56
51
|
const [newMeetingDate, setNewMeetingDate] = (0, _react.useState)(defaultMeetingDate);
|
|
57
52
|
const [newMeetingTime, setNewMeetingTime] = (0, _react.useState)(defaultMeetingTime);
|
|
58
53
|
const [initialBackgroundImages, setInitialBackgroundImages] = (0, _react.useState)([]);
|
|
@@ -47,7 +47,8 @@ function UpdateClassroom({
|
|
|
47
47
|
scrollToDiscuss,
|
|
48
48
|
setScrollToDiscuss,
|
|
49
49
|
isClassroomArchived = false,
|
|
50
|
-
verificationStatus
|
|
50
|
+
verificationStatus,
|
|
51
|
+
isVideoChatEnabled
|
|
51
52
|
}) {
|
|
52
53
|
const {
|
|
53
54
|
classes
|
|
@@ -217,6 +218,7 @@ function UpdateClassroom({
|
|
|
217
218
|
values: values,
|
|
218
219
|
scrollToDiscuss: scrollToDiscuss,
|
|
219
220
|
setScrollToDiscuss: setScrollToDiscuss,
|
|
221
|
+
isVideoChatEnabled: isVideoChatEnabled,
|
|
220
222
|
...otherProps
|
|
221
223
|
})
|
|
222
224
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Divider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CardActions, {
|
|
@@ -431,7 +431,9 @@ function Classroom({
|
|
|
431
431
|
setSelectedDiscussion,
|
|
432
432
|
meetingRecsData,
|
|
433
433
|
hasBadLanguage,
|
|
434
|
-
handleArchiveSubmissions
|
|
434
|
+
handleArchiveSubmissions,
|
|
435
|
+
isVideoChatEnabled,
|
|
436
|
+
isVideoChatEnabledInSettings
|
|
435
437
|
} = vchatProps;
|
|
436
438
|
const isSmallScreen = (0, _useMediaQuery.default)("(max-width:410px)");
|
|
437
439
|
const {
|
|
@@ -444,9 +446,7 @@ function Classroom({
|
|
|
444
446
|
const [isPictureDialogOpen, setIsPictureDialogOpen] = (0, _react.useState)(false);
|
|
445
447
|
const [overwriteValue, setOverwriteValue] = (0, _react.useState)(null);
|
|
446
448
|
const [scrollToDiscuss, setScrollToDiscuss] = (0, _react.useState)(false);
|
|
447
|
-
const
|
|
448
|
-
const [isVideoChatEnabled, setIsVideoChatEnabled] = (0, _react.useState)(false);
|
|
449
|
-
const [isVideoChatEnabledInSettings, setIsVideoChatEnabledInSettings] = (0, _react.useState)(false);
|
|
449
|
+
const isWaysideClassroom = classroom?.classroomId?.toLowerCase().includes("wayside");
|
|
450
450
|
const [isSubscriptionExpired, setIsSubscriptionExpired] = (0, _react.useState)(false);
|
|
451
451
|
let tabs;
|
|
452
452
|
(0, _react.useEffect)(() => {
|
|
@@ -721,8 +721,6 @@ function Classroom({
|
|
|
721
721
|
picture,
|
|
722
722
|
pictureXs,
|
|
723
723
|
isCreator,
|
|
724
|
-
vchatEnabled,
|
|
725
|
-
vchatEnabledInSettings,
|
|
726
724
|
createdBy,
|
|
727
725
|
userImage,
|
|
728
726
|
verificationStatus,
|
|
@@ -798,15 +796,6 @@ function Classroom({
|
|
|
798
796
|
window.location.hash = "#Settings";
|
|
799
797
|
setScrollToDiscuss(true);
|
|
800
798
|
};
|
|
801
|
-
if (!isWaysideClassroom && classroomId && classroomId.toLowerCase().includes("wayside")) {
|
|
802
|
-
setIsWaysideClassroom(true);
|
|
803
|
-
}
|
|
804
|
-
if (!isVideoChatEnabled && (vchatEnabled === true || localStorage.getItem("vchat-enabled") === "true" || isCreator && vchatEnabled !== false || isMember && vchatEnabled !== false && vchatEnabledInSettings)) {
|
|
805
|
-
setIsVideoChatEnabled(true);
|
|
806
|
-
}
|
|
807
|
-
if (!isVideoChatEnabledInSettings && (isVideoChatEnabled && (vchatEnabledInSettings === true || vchatEnabled === true && isWaysideClassroom && vchatEnabledInSettings !== false) || localStorage.getItem("vchat-enabled") === "true")) {
|
|
808
|
-
setIsVideoChatEnabledInSettings(true);
|
|
809
|
-
}
|
|
810
799
|
tabs = [{
|
|
811
800
|
label: t("courses"),
|
|
812
801
|
id: "Courses",
|
|
@@ -907,7 +896,7 @@ function Classroom({
|
|
|
907
896
|
refreshAssignments: refreshAssignments
|
|
908
897
|
})
|
|
909
898
|
}, `tab-content-assignments`)
|
|
910
|
-
}] : []), ...(
|
|
899
|
+
}] : []), ...(isVideoChatEnabled && isNualangLiveEnabled && (isMember && isVideoChatEnabledInSettings || isCreator) ? [{
|
|
911
900
|
label: t("discuss"),
|
|
912
901
|
id: "Discuss",
|
|
913
902
|
disabled: false,
|
|
@@ -1084,7 +1073,8 @@ function Classroom({
|
|
|
1084
1073
|
setScrollToDiscuss: setScrollToDiscuss,
|
|
1085
1074
|
isClassroomArchived: isArchived,
|
|
1086
1075
|
classroomMembers: classroomMembers,
|
|
1087
|
-
verificationStatus: verificationStatus
|
|
1076
|
+
verificationStatus: verificationStatus,
|
|
1077
|
+
isVideoChatEnabled: isVideoChatEnabled
|
|
1088
1078
|
})
|
|
1089
1079
|
}, `tab-content-settings`)
|
|
1090
1080
|
}] : [])];
|
|
@@ -235,7 +235,7 @@ const MeetingPromptsList = (0, _mui.withStyles)(({
|
|
|
235
235
|
initialGroups: meetingMembers,
|
|
236
236
|
groups: meetingMembers,
|
|
237
237
|
members: userData,
|
|
238
|
-
recordTimeLimit: 1,
|
|
238
|
+
recordTimeLimit: selectedGroup?.recordTimeLimit || 1,
|
|
239
239
|
editMeetingImages,
|
|
240
240
|
editBackgroundImages
|
|
241
241
|
},
|