touchstudy-core 0.1.121 → 0.1.122

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.
Files changed (44) hide show
  1. package/README.md +46 -46
  2. package/dist/components/List/List.d.ts +7 -0
  3. package/dist/containers/ExamResult/components/Dialog/CreateNewQuestion2.d.ts +9 -0
  4. package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +2 -3
  5. package/dist/containers/ExamResult/components/Notes/components/ActionItem.d.ts +7 -0
  6. package/dist/containers/ExamResult/components/Notes/components/ActionsTooltip.d.ts +14 -0
  7. package/dist/containers/ExamResult/components/Notes/components/ContentTooltip.d.ts +14 -0
  8. package/dist/containers/ExamResult/components/Notes/components/NewNoteButton.d.ts +6 -0
  9. package/dist/containers/ExamResult/components/Notes/components/NoteItem.d.ts +9 -0
  10. package/dist/containers/ExamResult/components/Notes/components/NoteList.d.ts +12 -0
  11. package/dist/containers/ExamResult/components/Notes/configs/constants.d.ts +2 -0
  12. package/dist/containers/ExamResult/components/Notes/configs/interfaces.d.ts +4 -0
  13. package/dist/containers/ExamResult/components/Notes/hooks/useNotes.d.ts +8 -0
  14. package/dist/containers/ExamResult/components/Notes/styles/styles.d.ts +67 -0
  15. package/dist/containers/ExamResult/components/StudentNotes/components/ActionItem.d.ts +7 -0
  16. package/dist/containers/ExamResult/components/StudentNotes/components/ActionsTooltip.d.ts +14 -0
  17. package/dist/containers/ExamResult/components/StudentNotes/components/NewNoteButton.d.ts +6 -0
  18. package/dist/containers/ExamResult/components/StudentNotes/components/NoteItem.d.ts +9 -0
  19. package/dist/containers/ExamResult/components/StudentNotes/configs/constants.d.ts +2 -0
  20. package/dist/containers/ExamResult/components/StudentNotes/configs/interfaces.d.ts +7 -0
  21. package/dist/containers/ExamResult/components/StudentNotes/hooks/useStudentNotes.d.ts +12 -0
  22. package/dist/containers/ExamResult/components/StudentNotes/index.d.ts +4 -0
  23. package/dist/containers/ExamResult/components/StudentNotes/styles/styles.d.ts +67 -0
  24. package/dist/containers/ExamResult/hooks/useExamNoteDialog.d.ts +18 -0
  25. package/dist/containers/Login/views/LoginQRCode.d.ts +10 -0
  26. package/dist/containers/Notes/components/ActionItem.d.ts +7 -0
  27. package/dist/containers/Notes/components/ActionsTooltip.d.ts +16 -0
  28. package/dist/containers/Notes/components/NoteDialog.d.ts +4 -0
  29. package/dist/containers/Textbooks/components/TextbookShareDialog.d.ts +26 -0
  30. package/dist/index.css +9 -9
  31. package/dist/index.js +114 -48
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.modern.js +114 -48
  34. package/dist/index.modern.js.map +1 -1
  35. package/dist/utils/enums/examStatus.d.ts +3 -2
  36. package/package.json +102 -102
  37. package/dist/StudyTouch_Character_v1_Question~jLFvuYmI.png +0 -0
  38. package/dist/components/Selectors/InActiveAcademySelector.d.ts +0 -16
  39. package/dist/containers/Academies/hooks/usePassCodeDialog.d.ts +0 -10
  40. package/dist/containers/PreparedTextbook/apiClients/academyService.d.ts +0 -1
  41. package/dist/tests/performances/do-exam-session-list-student.d.ts +0 -19
  42. package/dist/tests/performances/do-exam-session-request-answer-one-time.d.ts +0 -19
  43. package/dist/tests/performances/do-exam-session-skip-answer.d.ts +0 -19
  44. package/dist/tests/performances/do-exam-session2.d.ts +0 -19
@@ -4501,12 +4501,11 @@ function _objectDestructuringEmpty(obj) {
4501
4501
  function _objectWithoutPropertiesLoose(source, excluded) {
4502
4502
  if (source == null) return {};
4503
4503
  var target = {};
4504
- var sourceKeys = Object.keys(source);
4505
- var key, i;
4506
- for (i = 0; i < sourceKeys.length; i++) {
4507
- key = sourceKeys[i];
4508
- if (excluded.indexOf(key) >= 0) continue;
4509
- target[key] = source[key];
4504
+ for (var key in source) {
4505
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
4506
+ if (excluded.indexOf(key) >= 0) continue;
4507
+ target[key] = source[key];
4508
+ }
4510
4509
  }
4511
4510
  return target;
4512
4511
  }
@@ -6139,8 +6138,9 @@ var ExamStatus;
6139
6138
  })(ExamStatus || (ExamStatus = {}));
6140
6139
  var QuestionAnswerType;
6141
6140
  (function (QuestionAnswerType) {
6142
- QuestionAnswerType[QuestionAnswerType["ChoiceOption"] = 0] = "ChoiceOption";
6143
- QuestionAnswerType[QuestionAnswerType["Textual"] = 1] = "Textual";
6141
+ QuestionAnswerType[QuestionAnswerType["SingleChoice"] = 0] = "SingleChoice";
6142
+ QuestionAnswerType[QuestionAnswerType["MultipleChoice"] = 1] = "MultipleChoice";
6143
+ QuestionAnswerType[QuestionAnswerType["ShortAnswer"] = 2] = "ShortAnswer";
6144
6144
  })(QuestionAnswerType || (QuestionAnswerType = {}));
6145
6145
 
6146
6146
  var OrderType;
@@ -16005,6 +16005,28 @@ var CompareGrass = function CompareGrass(_ref2) {
16005
16005
  var effectSize = _ref2.effectSize;
16006
16006
  var _useTranslation = useTranslation(),
16007
16007
  t = _useTranslation.t;
16008
+ var renderAnswer = function renderAnswer(type, content) {
16009
+ var _content$split, _content$split$map;
16010
+ if (!content) return "";
16011
+ switch (type) {
16012
+ case QuestionAnswerType.ShortAnswer:
16013
+ return React__default.createElement(MathJaxContainer, {
16014
+ content: content
16015
+ });
16016
+ case QuestionAnswerType.SingleChoice:
16017
+ return t("number_question", {
16018
+ number: content
16019
+ });
16020
+ case QuestionAnswerType.MultipleChoice:
16021
+ return content === null || content === void 0 ? void 0 : (_content$split = content.split("|")) === null || _content$split === void 0 ? void 0 : (_content$split$map = _content$split.map(function (i) {
16022
+ return t("number_question", {
16023
+ number: i
16024
+ });
16025
+ })) === null || _content$split$map === void 0 ? void 0 : _content$split$map.join(",");
16026
+ default:
16027
+ return content;
16028
+ }
16029
+ };
16008
16030
  var renderTableBody = function renderTableBody(effectSize) {
16009
16031
  return effectSize.map(function (item, index) {
16010
16032
  return React__default.createElement("tr", {
@@ -16022,29 +16044,17 @@ var CompareGrass = function CompareGrass(_ref2) {
16022
16044
  textAlign: "center",
16023
16045
  color: "#202B37"
16024
16046
  }
16025
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
16026
- content: item === null || item === void 0 ? void 0 : item.correctAnswers
16027
- }) : t("number_question", {
16028
- number: item.correctAnswers
16029
- })), React__default.createElement("td", {
16047
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.correctAnswers)), React__default.createElement("td", {
16030
16048
  className: styles$3["tdcolumn3"],
16031
16049
  style: {
16032
16050
  color: item.isCorrect ? styles$3.green_support_900 : styles$3.red_900
16033
16051
  }
16034
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
16035
- content: item === null || item === void 0 ? void 0 : item.selectedAnswers
16036
- }) : t("number_question", {
16037
- number: item.selectedAnswers
16038
- })), React__default.createElement("td", {
16052
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.selectedAnswers)), React__default.createElement("td", {
16039
16053
  style: {
16040
16054
  textAlign: "center",
16041
16055
  color: "#414E62"
16042
16056
  }
16043
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
16044
- content: item === null || item === void 0 ? void 0 : item.mostSelectedAnswers
16045
- }) : t("number_question", {
16046
- number: item.mostSelectedAnswers
16047
- })), React__default.createElement("td", {
16057
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.mostSelectedAnswers)), React__default.createElement("td", {
16048
16058
  className: "" + printStyles["avoid-break-inside"]
16049
16059
  }, React__default.createElement("div", {
16050
16060
  className: styles$3["classification"] + " " + printStyles["avoid-break-inside"]
@@ -16397,6 +16407,28 @@ var Vulnerable = function Vulnerable(_ref) {
16397
16407
  return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
16398
16408
  }).slice(0, limitQuestions);
16399
16409
  }, [JSON.stringify(data.questions)]);
16410
+ var renderAnswer = function renderAnswer(type, content) {
16411
+ var _content$split, _content$split$map;
16412
+ if (!content) return "";
16413
+ switch (type) {
16414
+ case QuestionAnswerType.ShortAnswer:
16415
+ return React__default.createElement(MathJaxContainer, {
16416
+ content: content
16417
+ });
16418
+ case QuestionAnswerType.SingleChoice:
16419
+ return t("number_question", {
16420
+ number: content
16421
+ });
16422
+ case QuestionAnswerType.MultipleChoice:
16423
+ return content === null || content === void 0 ? void 0 : (_content$split = content.split("|")) === null || _content$split === void 0 ? void 0 : (_content$split$map = _content$split.map(function (i) {
16424
+ return t("number_question", {
16425
+ number: i
16426
+ });
16427
+ })) === null || _content$split$map === void 0 ? void 0 : _content$split$map.join(",");
16428
+ default:
16429
+ return content;
16430
+ }
16431
+ };
16400
16432
  var renderTableBody = function renderTableBody(data) {
16401
16433
  return data.map(function (item, index) {
16402
16434
  return React__default.createElement("tr", {
@@ -16431,20 +16463,12 @@ var Vulnerable = function Vulnerable(_ref) {
16431
16463
  fontSize: "13px",
16432
16464
  fontWeight: 500
16433
16465
  }
16434
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
16435
- content: item === null || item === void 0 ? void 0 : item.selectedAnswers
16436
- }) : t("number_question", {
16437
- number: item.selectedAnswers
16438
- })), React__default.createElement("td", {
16466
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.selectedAnswers)), React__default.createElement("td", {
16439
16467
  style: {
16440
16468
  textAlign: "center",
16441
16469
  color: styles$3.gray_700
16442
16470
  }
16443
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
16444
- content: item === null || item === void 0 ? void 0 : item.correctAnswers
16445
- }) : t("number_question", {
16446
- number: item.correctAnswers
16447
- })), React__default.createElement("td", {
16471
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.correctAnswers)), React__default.createElement("td", {
16448
16472
  style: {
16449
16473
  textAlign: "center",
16450
16474
  color: styles$3.gray_700
@@ -16454,6 +16478,7 @@ var Vulnerable = function Vulnerable(_ref) {
16454
16478
  };
16455
16479
  var renderQuestions = function renderQuestions(questions) {
16456
16480
  return questions.map(function (question) {
16481
+ var _question$selectedAns, _question$selectedAns2, _question$correctAnsw, _question$correctAnsw2, _question$correctAnsw3;
16457
16482
  return React__default.createElement(Grid, {
16458
16483
  container: true,
16459
16484
  flexWrap: "nowrap",
@@ -16480,7 +16505,23 @@ var Vulnerable = function Vulnerable(_ref) {
16480
16505
  className: styles$3["span2"]
16481
16506
  }, t("my_wrong_answer"))), React__default.createElement("div", null, React__default.createElement("span", {
16482
16507
  className: styles$3["overallCorrectRate"]
16483
- }, question.overallCorrectRate.toFixed(2), "%"), React__default.createElement("span", {
16508
+ }, question.overallCorrectRate.toFixed(2), "%"), question.questionAnswerType === QuestionAnswerType.ShortAnswer ? React__default.createElement("span", {
16509
+ className: styles$3["answer"]
16510
+ }, React__default.createElement(MathJaxContainer, {
16511
+ content: question.selectedAnswers
16512
+ }), " ", t("answer"), " ", React__default.createElement(MathJaxContainer, {
16513
+ content: question.correctAnswers
16514
+ })) : question.questionAnswerType === QuestionAnswerType.MultipleChoice ? React__default.createElement("span", {
16515
+ className: styles$3["answer"]
16516
+ }, (_question$selectedAns = question.selectedAnswers.split("|")) === null || _question$selectedAns === void 0 ? void 0 : (_question$selectedAns2 = _question$selectedAns.map(function (i) {
16517
+ return t("number_question", {
16518
+ number: i
16519
+ });
16520
+ })) === null || _question$selectedAns2 === void 0 ? void 0 : _question$selectedAns2.join(","), " (", t("answer"), " ", (_question$correctAnsw = question.correctAnswers) === null || _question$correctAnsw === void 0 ? void 0 : (_question$correctAnsw2 = _question$correctAnsw.split("|")) === null || _question$correctAnsw2 === void 0 ? void 0 : (_question$correctAnsw3 = _question$correctAnsw2.map(function (i) {
16521
+ return t("number_question", {
16522
+ number: i
16523
+ });
16524
+ })) === null || _question$correctAnsw3 === void 0 ? void 0 : _question$correctAnsw3.join(","), ")") : React__default.createElement("span", {
16484
16525
  className: styles$3["answer"]
16485
16526
  }, t("number_question", {
16486
16527
  number: question.selectedAnswers
@@ -18244,6 +18285,28 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
18244
18285
  return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
18245
18286
  }).slice(0, limitQuestions$1);
18246
18287
  }, [JSON.stringify(data === null || data === void 0 ? void 0 : data.studentQuestionResults)]);
18288
+ var renderAnswer = function renderAnswer(type, content) {
18289
+ var _content$split, _content$split$map;
18290
+ if (!content) return "";
18291
+ switch (type) {
18292
+ case QuestionAnswerType.ShortAnswer:
18293
+ return React__default.createElement(MathJaxContainer, {
18294
+ content: content
18295
+ });
18296
+ case QuestionAnswerType.SingleChoice:
18297
+ return t("number_question", {
18298
+ number: content
18299
+ });
18300
+ case QuestionAnswerType.MultipleChoice:
18301
+ return content === null || content === void 0 ? void 0 : (_content$split = content.split("|")) === null || _content$split === void 0 ? void 0 : (_content$split$map = _content$split.map(function (i) {
18302
+ return t("number_question", {
18303
+ number: i
18304
+ });
18305
+ })) === null || _content$split$map === void 0 ? void 0 : _content$split$map.join(",");
18306
+ default:
18307
+ return content;
18308
+ }
18309
+ };
18247
18310
  var renderTableBody = function renderTableBody(data) {
18248
18311
  return data === null || data === void 0 ? void 0 : data.map(function (item, index) {
18249
18312
  return React__default.createElement("tr", {
@@ -18278,20 +18341,12 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
18278
18341
  fontSize: "13px",
18279
18342
  fontWeight: 500
18280
18343
  }
18281
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
18282
- content: item === null || item === void 0 ? void 0 : item.selectedAnswers
18283
- }) : t("number_question", {
18284
- number: item.selectedAnswers
18285
- })), React__default.createElement("td", {
18344
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.selectedAnswers)), React__default.createElement("td", {
18286
18345
  style: {
18287
18346
  textAlign: "center",
18288
18347
  color: styles$3.gray_700
18289
18348
  }
18290
- }, (item === null || item === void 0 ? void 0 : item.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement(MathJaxContainer, {
18291
- content: item === null || item === void 0 ? void 0 : item.correctAnswers
18292
- }) : t("number_question", {
18293
- number: item.correctAnswers
18294
- })), React__default.createElement("td", {
18349
+ }, renderAnswer(item === null || item === void 0 ? void 0 : item.questionAnswerType, item === null || item === void 0 ? void 0 : item.correctAnswers)), React__default.createElement("td", {
18295
18350
  style: {
18296
18351
  textAlign: "center",
18297
18352
  color: styles$3.gray_700
@@ -18303,6 +18358,7 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
18303
18358
  };
18304
18359
  var renderQuestions = function renderQuestions(questions) {
18305
18360
  return questions.map(function (question) {
18361
+ var _question$selectedAns, _question$selectedAns2, _question$selectedAns3, _question$correctAnsw, _question$correctAnsw2, _question$correctAnsw3;
18306
18362
  return React__default.createElement(Grid, {
18307
18363
  container: true,
18308
18364
  flexWrap: "nowrap",
@@ -18329,17 +18385,27 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
18329
18385
  className: styles$3["span2"]
18330
18386
  }, t("my_wrong_answer"))), React__default.createElement("div", null, React__default.createElement("span", {
18331
18387
  className: styles$3["overallCorrectRate"]
18332
- }, question.overallCorrectRate.toFixed(2), "%"), (question === null || question === void 0 ? void 0 : question.questionAnswerType) === QuestionAnswerType.Textual ? React__default.createElement("span", {
18388
+ }, question.overallCorrectRate.toFixed(2), "%"), (question === null || question === void 0 ? void 0 : question.questionAnswerType) === QuestionAnswerType.ShortAnswer ? React__default.createElement("span", {
18333
18389
  className: styles$3["answer"]
18334
18390
  }, React__default.createElement(MathJaxContainer, {
18335
18391
  content: question === null || question === void 0 ? void 0 : question.selectedAnswers
18336
18392
  }), " ", React__default.createElement(MathJaxContainer, {
18337
18393
  content: question === null || question === void 0 ? void 0 : question.correctAnswers
18338
- })) : React__default.createElement("span", {
18394
+ })) : QuestionAnswerType.MultipleChoice ? React__default.createElement("span", {
18395
+ className: styles$3["answer"]
18396
+ }, (_question$selectedAns = question.selectedAnswers) === null || _question$selectedAns === void 0 ? void 0 : (_question$selectedAns2 = _question$selectedAns.split("|")) === null || _question$selectedAns2 === void 0 ? void 0 : (_question$selectedAns3 = _question$selectedAns2.map(function (i) {
18397
+ return t("number_question", {
18398
+ number: i
18399
+ });
18400
+ })) === null || _question$selectedAns3 === void 0 ? void 0 : _question$selectedAns3.join(","), " ", "(", t("answer"), " ", (_question$correctAnsw = question.correctAnswers) === null || _question$correctAnsw === void 0 ? void 0 : (_question$correctAnsw2 = _question$correctAnsw.split("|")) === null || _question$correctAnsw2 === void 0 ? void 0 : (_question$correctAnsw3 = _question$correctAnsw2.map(function (i) {
18401
+ return t("number_question", {
18402
+ number: i
18403
+ });
18404
+ })) === null || _question$correctAnsw3 === void 0 ? void 0 : _question$correctAnsw3.join(","), ")", " ") : React__default.createElement("span", {
18339
18405
  className: styles$3["answer"]
18340
18406
  }, t("number_question", {
18341
18407
  number: question.selectedAnswers
18342
- }), " (", t("answer"), " ", t("number_question", {
18408
+ }), " ", "(", t("answer"), " ", t("number_question", {
18343
18409
  number: question.correctAnswers
18344
18410
  }), ")"))));
18345
18411
  });
@@ -26752,7 +26818,7 @@ var DefaultQuestion = {
26752
26818
  author: "",
26753
26819
  subjectId: null,
26754
26820
  preparedType: null,
26755
- questionAnswerType: QuestionAnswerType.ChoiceOption,
26821
+ questionAnswerType: QuestionAnswerType.SingleChoice,
26756
26822
  textualAnswer: ""
26757
26823
  };
26758
26824
  var DefaultArticle = {