@nualang/nualang-ui-components 0.1.1287 → 0.1.1289

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.
@@ -501,6 +501,7 @@ function BotListItem({
501
501
  botIndex,
502
502
  moveBot,
503
503
  onDropBot,
504
+ parentClassroom,
504
505
  ...otherProps
505
506
  }) {
506
507
  const params = (0, _reactRouterDom.useParams)();
@@ -636,11 +637,6 @@ function BotListItem({
636
637
  marginBottom: "8px"
637
638
  },
638
639
  children: t("challenge_bot_desc")
639
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
640
- style: {
641
- fontSize: "12px"
642
- },
643
- children: t("freely_changed")
644
640
  })]
645
641
  })
646
642
  }))(({
@@ -761,7 +757,7 @@ function BotListItem({
761
757
  display: "flex",
762
758
  alignItems: "center",
763
759
  gap: "8px",
764
- children: [bot.botName || "", isCreator ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ChallengeBotHtmlTooltip, {
760
+ children: [bot.botName || "", isCreator || parentClassroom?.isCreator ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ChallengeBotHtmlTooltip, {
765
761
  placement: "right",
766
762
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Chip, {
767
763
  label: t("challenge_mode"),
@@ -796,7 +792,7 @@ function BotListItem({
796
792
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
797
793
  variant: "body1",
798
794
  children: bot.botName || ""
799
- }), isCreator ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ChallengeBotHtmlTooltip, {
795
+ }), isCreator || parentClassroom?.isCreator ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ChallengeBotHtmlTooltip, {
800
796
  placement: "right",
801
797
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Chip, {
802
798
  label: t("challenge_mode"),
@@ -1821,6 +1817,7 @@ function Exercises(props) {
1821
1817
  botIndex: idx,
1822
1818
  moveBot: moveBot,
1823
1819
  onDropBot: onDropBot,
1820
+ parentClassroom: parentClassroom,
1824
1821
  ...props
1825
1822
  }, bot.botId)), isCreator ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.ListItemButton, {
1826
1823
  "data-cy": "add-bot-exercise",
@@ -1584,6 +1584,8 @@ function useExerciseState({
1584
1584
  const response = await handleMessageBot(bot.botId, body);
1585
1585
  if (response.errorMessage) {
1586
1586
  openSnackbar(t("problem_getting_reply"), "error");
1587
+ setBotMessages(prevMessages => prevMessages.filter(message => message.isLoading !== true));
1588
+ addBotMessage('I made a mistake in my response. please try again!', false, true);
1587
1589
  } else if (typeof response === "string" && response.startsWith("Syntax error:")) {
1588
1590
  openSnackbar(response, "error");
1589
1591
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1287",
3
+ "version": "0.1.1289",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",