eat-js-sdk 2.0.52 → 2.0.54

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.
@@ -5956,20 +5956,20 @@ function useMCQFeedback(isResultCorrect, isSkipped, resultFeedback) {
5956
5956
  if (isSkipped) {
5957
5957
  return {
5958
5958
  type: "skipped",
5959
- message: resultFeedback || "No answer provided",
5959
+ message: resultFeedback,
5960
5960
  showIcon: true
5961
5961
  };
5962
5962
  }
5963
5963
  if (isResultCorrect) {
5964
5964
  return {
5965
5965
  type: "correct",
5966
- message: resultFeedback || "Correct answer!",
5966
+ message: resultFeedback,
5967
5967
  showIcon: true
5968
5968
  };
5969
5969
  }
5970
5970
  return {
5971
5971
  type: "incorrect",
5972
- message: resultFeedback || "Incorrect answer",
5972
+ message: resultFeedback,
5973
5973
  showIcon: true
5974
5974
  };
5975
5975
  }
@@ -9680,9 +9680,9 @@ const createMCQInteraction = (config, sessionData) => {
9680
9680
  const generateMCQFeedback = (selected, correct) => {
9681
9681
  const { correct: correctCount, incorrect: incorrectCount, total } = calculateMCQScore(selected, correct);
9682
9682
  if (correctCount === total && incorrectCount === 0) {
9683
- return config.feedback.correct || "Excellent! All correct answers selected.";
9683
+ return config.feedback.correct;
9684
9684
  }
9685
- return config.feedback.incorrect || "Please review your selections and try again.";
9685
+ return config.feedback.incorrect;
9686
9686
  };
9687
9687
  return {
9688
9688
  type: "mcq",
@@ -11513,12 +11513,12 @@ const createTypeInInteraction = (config, sessionData) => {
11513
11513
  const allEmpty = safeAnswers.every((a) => !a || a.trim() === "");
11514
11514
  const isSkipped = allEmpty;
11515
11515
  if (isSkipped) {
11516
- return "No answer provided";
11516
+ return "";
11517
11517
  }
11518
11518
  if (validation.isValid) {
11519
- return config.feedback.correct || "Correct answer";
11519
+ return config.feedback.correct;
11520
11520
  }
11521
- return config.feedback.incorrect || "Incorrect answer";
11521
+ return config.feedback.incorrect;
11522
11522
  };
11523
11523
  return {
11524
11524
  type: "typein",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "2.0.52",
3
+ "version": "2.0.54",
4
4
  "change version": "2.0.0",
5
5
  "description": "Authoring tool frontend SDK",
6
6
  "contributors": [