@nualang/nualang-ui-components 0.1.1224 → 0.1.1225

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.
@@ -9,9 +9,7 @@ var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
9
9
  var _system = require("@mui/system");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const StyledCardTitle = (0, _system.styled)(_Typography.default, {
13
- shouldForwardProp: props => !["noWrap"].includes(props)
14
- })(({
12
+ const StyledCardTitle = (0, _system.styled)(_Typography.default)(({
15
13
  theme
16
14
  }) => ({
17
15
  fontSize: "1.125rem",
@@ -27,7 +25,7 @@ function CardTitle({
27
25
  component: component,
28
26
  noWrap: true,
29
27
  "aria-label": title,
30
- children: title.length > 25 ? title.substring(0, 25) + "..." : title
28
+ children: title
31
29
  });
32
30
  }
33
31
  CardTitle.propTypes = {
@@ -224,7 +224,7 @@ function CreatePhrase({
224
224
  const autoFillTranslation = async () => {
225
225
  try {
226
226
  let chatGptResponse = await makeChatGptApiRequest({
227
- model: "gpt-3.5-turbo",
227
+ model: "gpt-4o-mini",
228
228
  promptKey: "autoFillTranslation",
229
229
  promptVariables: {
230
230
  learnLang,
@@ -139,7 +139,7 @@ function GenerateBotDialog({
139
139
  setErrorMessage("");
140
140
  let response;
141
141
  let chatGptResponse = await makeChatGptApiRequest({
142
- model: "gpt-3.5-turbo",
142
+ model: "gpt-4o-mini",
143
143
  promptKey: "generateBot",
144
144
  promptVariables: {
145
145
  botTopic: values.botTopic,
@@ -112,7 +112,7 @@ function GeneratePhrases({
112
112
  setIsGenerating(true);
113
113
  setErrorMessage(null);
114
114
  const chatGptResponse = await makeChatGptApiRequest({
115
- model: "gpt-3.5-turbo",
115
+ model: "gpt-4o-mini",
116
116
  promptKey: "generatePhrases",
117
117
  promptVariables: {
118
118
  topicGoal: values.topicGoal,
@@ -88,7 +88,7 @@ function GenerateQuestion({
88
88
  setIsMessageGenerating(true);
89
89
  setErrorMessage(null);
90
90
  const chatGptResponse = await makeChatGptApiRequest({
91
- model: "gpt-3.5-turbo",
91
+ model: "gpt-4o-mini",
92
92
  promptKey: "generateAnswer",
93
93
  promptVariables: {
94
94
  script,
@@ -211,7 +211,7 @@ function GenerateRoleplayDialog({
211
211
  response = (0, _jsonrepair.jsonrepair)(text);
212
212
  } else {
213
213
  let chatGptResponse = await makeChatGptApiRequest({
214
- model: "gpt-3.5-turbo",
214
+ model: "gpt-4o-mini",
215
215
  promptKey: "generateRoleplay",
216
216
  promptVariables: {
217
217
  learnLang: learnLang,
@@ -234,7 +234,7 @@ function GenerateRoleplayDialog({
234
234
  while (!isComplete) {
235
235
  if (chatGptResponse.endsWith("...") || chatGptResponse.trim().endsWith(",")) {
236
236
  const continuationResponse = await makeChatGptApiRequest({
237
- model: "gpt-3.5-turbo",
237
+ model: "gpt-4o-mini",
238
238
  prompt: "Continue: " + chatGptResponse
239
239
  });
240
240
  chatGptResponse += continuationResponse;
@@ -36,6 +36,10 @@ function ClassroomSettings({
36
36
  vchatEnabled
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
+ }
39
43
  const generateRandomEnrolmentKey = () => {
40
44
  return String(Math.floor(Math.random() * 90000) + 10000);
41
45
  };
@@ -232,7 +236,7 @@ function ClassroomSettings({
232
236
  fullWidth: true
233
237
  })]
234
238
  })]
235
- }), vchatEnabled !== false && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
239
+ }), isWaysideClassroom && vchatEnabled !== false && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
236
240
  item: true,
237
241
  xs: 12,
238
242
  md: 12,
@@ -1589,10 +1589,10 @@ function Exercises(props) {
1589
1589
  in: true,
1590
1590
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ExerciseAvatarGroup, {
1591
1591
  max: 3,
1592
- children: roleplays.map((roleplay, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
1592
+ children: roleplays.map((roleplay, idx) => !roleplay.isRoleplayHidden ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
1593
1593
  alt: "",
1594
1594
  src: roleplay.picture || roleplay.actor1 && roleplay.actor1.picture || roleplay.actor2 && roleplay.actor2.picture || _index.default.roleplay
1595
- }, idx))
1595
+ }, idx) : null)
1596
1596
  })
1597
1597
  })]
1598
1598
  })
@@ -1685,11 +1685,11 @@ function Exercises(props) {
1685
1685
  in: true,
1686
1686
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ExerciseAvatarGroup, {
1687
1687
  max: 3,
1688
- children: botsArray.map((bot, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
1688
+ children: botsArray.map((bot, idx) => !bot.isBotHidden ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
1689
1689
  src: bot.picture || bot.botAvatar || _index.default.bot,
1690
1690
  alt: "",
1691
1691
  "aria-label": bot.botName
1692
- }, idx))
1692
+ }, idx) : null)
1693
1693
  })
1694
1694
  })]
1695
1695
  })
@@ -870,7 +870,7 @@ function Classroom({
870
870
  deleteAssignment: deleteAssignment
871
871
  })
872
872
  }, `tab-content-assignments`)
873
- }] : []), ...(isVideoChatEnabled && isNualangLiveEnabled && (isMember && isVideoChatEnabledInSettings || isCreator) ? [{
873
+ }] : []), ...(isWaysideClassroom && isVideoChatEnabled && isNualangLiveEnabled && (isMember && isVideoChatEnabledInSettings || isCreator) ? [{
874
874
  label: t("discuss"),
875
875
  id: "Discuss",
876
876
  disabled: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1224",
3
+ "version": "0.1.1225",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",