@digabi/exam-engine-core 19.14.5-alpha.0 → 19.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/dist/__tests__/results/AnnotationList.test.js +1 -1
  2. package/dist/__tests__/testExamRendering.js +4 -3
  3. package/dist/__tests__/testExamRendering.js.map +1 -1
  4. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  5. package/dist/components/context/ResultsContext.js +1 -1
  6. package/dist/components/context/ResultsContext.js.map +1 -1
  7. package/dist/components/exam/Exam.js +1 -1
  8. package/dist/components/exam/Exam.js.map +1 -1
  9. package/dist/components/exam/FinishExam.d.ts.map +1 -1
  10. package/dist/components/exam/FinishExam.js +7 -3
  11. package/dist/components/exam/FinishExam.js.map +1 -1
  12. package/dist/components/exam/internal/ErrorIndicator.js +2 -2
  13. package/dist/components/exam/internal/ErrorIndicator.js.map +1 -1
  14. package/dist/components/grading/GradingAnswerAnnotationList.js +1 -1
  15. package/dist/components/grading/GradingAnswerAnnotationList.js.map +1 -1
  16. package/dist/components/results/ChoiceAnswer.js +6 -5
  17. package/dist/components/results/ChoiceAnswer.js.map +1 -1
  18. package/dist/components/results/DropdownAnswer.d.ts +1 -1
  19. package/dist/components/results/DropdownAnswer.d.ts.map +1 -1
  20. package/dist/components/results/DropdownAnswer.js +24 -24
  21. package/dist/components/results/DropdownAnswer.js.map +1 -1
  22. package/dist/components/results/MultiLineAnswer.d.ts.map +1 -1
  23. package/dist/components/results/MultiLineAnswer.js +5 -2
  24. package/dist/components/results/MultiLineAnswer.js.map +1 -1
  25. package/dist/components/results/Question.d.ts.map +1 -1
  26. package/dist/components/results/Question.js +8 -5
  27. package/dist/components/results/Question.js.map +1 -1
  28. package/dist/components/results/QuestionTitle.d.ts.map +1 -1
  29. package/dist/components/results/QuestionTitle.js +7 -2
  30. package/dist/components/results/QuestionTitle.js.map +1 -1
  31. package/dist/components/results/Results.d.ts +1 -0
  32. package/dist/components/results/Results.d.ts.map +1 -1
  33. package/dist/components/results/Results.js +36 -4
  34. package/dist/components/results/Results.js.map +1 -1
  35. package/dist/components/results/Section.d.ts.map +1 -1
  36. package/dist/components/results/Section.js +2 -9
  37. package/dist/components/results/Section.js.map +1 -1
  38. package/dist/components/results/SingleLineAnswer.d.ts.map +1 -1
  39. package/dist/components/results/SingleLineAnswer.js +5 -2
  40. package/dist/components/results/SingleLineAnswer.js.map +1 -1
  41. package/dist/components/results/internal/AnnotationList.js +1 -1
  42. package/dist/components/results/internal/AnnotationList.js.map +1 -1
  43. package/dist/components/results/internal/QuestionAutoScore.d.ts.map +1 -1
  44. package/dist/components/results/internal/QuestionAutoScore.js.map +1 -1
  45. package/dist/components/results/internal/QuestionScoresContainer.d.ts +1 -1
  46. package/dist/components/results/internal/QuestionScoresContainer.d.ts.map +1 -1
  47. package/dist/components/results/internal/QuestionScoresContainer.js +5 -0
  48. package/dist/components/results/internal/QuestionScoresContainer.js.map +1 -1
  49. package/dist/components/results/isExamFinishPageHook.d.ts +2 -0
  50. package/dist/components/results/isExamFinishPageHook.d.ts.map +1 -0
  51. package/dist/components/results/isExamFinishPageHook.js +7 -0
  52. package/dist/components/results/isExamFinishPageHook.js.map +1 -0
  53. package/dist/i18n/fi-FI.d.ts +11 -0
  54. package/dist/i18n/fi-FI.d.ts.map +1 -1
  55. package/dist/i18n/fi-FI.js +12 -1
  56. package/dist/i18n/fi-FI.js.map +1 -1
  57. package/dist/i18n/sv-FI.d.ts.map +1 -1
  58. package/dist/i18n/sv-FI.js +12 -1
  59. package/dist/i18n/sv-FI.js.map +1 -1
  60. package/dist/main-bundle.js +1 -1
  61. package/dist/main.css +1 -1
  62. package/dist/renderAnnotations.js +2 -2
  63. package/dist/renderAnnotations.js.map +1 -1
  64. package/package.json +2 -2
@@ -89,7 +89,7 @@ describe('<AnnotationList />', () => {
89
89
  },
90
90
  {
91
91
  startIndex: 1,
92
- length: 0,
92
+ length: 1,
93
93
  message: ''
94
94
  },
95
95
  {
@@ -47,7 +47,8 @@ describe.each((0, exam_engine_exams_1.listExams)().map(exam => [path_1.default.b
47
47
  ...commonProps,
48
48
  gradingStructure,
49
49
  answers: (0, exam_engine_generator_1.generateAnswers)(gradingStructure),
50
- scores: mkScores(gradingStructure)
50
+ scores: mkScores(gradingStructure),
51
+ returnToExam: () => { }
51
52
  };
52
53
  expect((0, react_test_renderer_1.create)(react_1.default.createElement(exam_engine_core_1.Exam, { ...examProps })).toJSON()).toMatchSnapshot('<Exam />');
53
54
  expect((0, react_test_renderer_1.create)(react_1.default.createElement(exam_engine_core_1.Attachments, { ...examProps })).toJSON()).toMatchSnapshot('<Attachments />');
@@ -68,7 +69,7 @@ function generateScore(question, i) {
68
69
  pregrading: {
69
70
  score: Math.min(question.maxScore, i),
70
71
  comment: `Pregading comment to question ${question.displayNumber}`,
71
- annotations: [{ startIndex: 0, length: 1, message: `Pregading annotation to question ${question.displayNumber}` }]
72
+ annotations: [{ startIndex: 0, length: 0, message: `Pregading annotation to question ${question.displayNumber}` }]
72
73
  },
73
74
  censoring: {
74
75
  scores: [
@@ -87,7 +88,7 @@ function generateScore(question, i) {
87
88
  ],
88
89
  comment: `Censor comment to question ${question.displayNumber}`,
89
90
  annotations: [
90
- { startIndex: 0, length: 1, message: `Censoring annotation to question ${question.displayNumber}` }
91
+ { startIndex: 0, length: 0, message: `Censoring annotation to question ${question.displayNumber}` }
91
92
  ],
92
93
  nonAnswerDetails: { shortCode: 'CEN' }
93
94
  },
@@ -1 +1 @@
1
- {"version":3,"file":"testExamRendering.js","sourceRoot":"","sources":["../../__tests__/testExamRendering.tsx"],"names":[],"mappings":";;;;;AAAA,+DAQiC;AACjC,+FAAsE;AACtE,iEAAqD;AACrD,yEAAyF;AACzF,2BAAmC;AACnC,gDAAuB;AACvB,kDAAyB;AACzB,6DAA4C;AAG5C,mDAA+C;AAC/C,yEAA+D;AAE/D,QAAQ,CAAC,IAAI,CAAC,IAAA,6BAAS,GAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,cAAI,CAAC,QAAQ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