@nualang/nualang-ui-components 0.1.1228 → 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/CreateMeetingMultiStepForm/MeetingForm.js +2 -7
- 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,
|
|
@@ -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)([]);
|
|
@@ -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
|
},
|