@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.
@@ -134,7 +134,7 @@ function Course({
134
134
  }, index);
135
135
  }
136
136
  function AssignmentCourseSelection({
137
- courses,
137
+ courses = [],
138
138
  getCourseSections,
139
139
  getRoleplays,
140
140
  username,
@@ -15,7 +15,7 @@ function AssignmentSelectExercise({
15
15
  t = text => text,
16
16
  open,
17
17
  handleClose,
18
- courses,
18
+ courses = [],
19
19
  getCourseSections,
20
20
  getRoleplays,
21
21
  username,
@@ -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 autoFillTranslation = async () => {
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 autoFillTranslation = async () => {
224
+ const generateTranslation = async () => {
225
225
  try {
226
226
  let chatGptResponse = await makeChatGptApiRequest({
227
227
  model: "gpt-4o-mini",
228
- promptKey: "autoFillTranslation",
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: autoFillTranslation,
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.add(1, "hour").format("h:mm A");
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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1228",
3
+ "version": "0.1.1229",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",