@digabi/exam-engine-core 23.0.4 → 23.0.5-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (651) hide show
  1. package/dist/main-bundle.js +3 -3
  2. package/package.json +3 -3
  3. package/dist/components/exam/ExamineExam.d.ts +0 -5
  4. package/dist/components/exam/ExamineExam.d.ts.map +0 -1
  5. package/dist/components/exam/ExamineExam.js +0 -20
  6. package/dist/components/exam/ExamineExam.js.map +0 -1
  7. package/dist/src/components/AnswerToolbar.d.ts +0 -18
  8. package/dist/src/components/AnswerToolbar.d.ts.map +0 -1
  9. package/dist/src/components/AnswerToolbar.js +0 -36
  10. package/dist/src/components/AnswerToolbar.js.map +0 -1
  11. package/dist/src/components/AnsweringInstructions.d.ts +0 -12
  12. package/dist/src/components/AnsweringInstructions.d.ts.map +0 -1
  13. package/dist/src/components/AnsweringInstructions.js +0 -24
  14. package/dist/src/components/AnsweringInstructions.js.map +0 -1
  15. package/dist/src/components/DocumentTitle.d.ts +0 -5
  16. package/dist/src/components/DocumentTitle.d.ts.map +0 -1
  17. package/dist/src/components/DocumentTitle.js +0 -13
  18. package/dist/src/components/DocumentTitle.js.map +0 -1
  19. package/dist/src/components/NotificationIcon.d.ts +0 -4
  20. package/dist/src/components/NotificationIcon.d.ts.map +0 -1
  21. package/dist/src/components/NotificationIcon.js +0 -6
  22. package/dist/src/components/NotificationIcon.js.map +0 -1
  23. package/dist/src/components/RenderChildNodes.d.ts +0 -5
  24. package/dist/src/components/RenderChildNodes.d.ts.map +0 -1
  25. package/dist/src/components/RenderChildNodes.js +0 -7
  26. package/dist/src/components/RenderChildNodes.js.map +0 -1
  27. package/dist/src/components/RenderExamElements.d.ts +0 -6
  28. package/dist/src/components/RenderExamElements.d.ts.map +0 -1
  29. package/dist/src/components/RenderExamElements.js +0 -6
  30. package/dist/src/components/RenderExamElements.js.map +0 -1
  31. package/dist/src/components/RenderIf.d.ts +0 -4
  32. package/dist/src/components/RenderIf.d.ts.map +0 -1
  33. package/dist/src/components/RenderIf.js +0 -8
  34. package/dist/src/components/RenderIf.js.map +0 -1
  35. package/dist/src/components/ScreenReaderOnly.d.ts +0 -5
  36. package/dist/src/components/ScreenReaderOnly.d.ts.map +0 -1
  37. package/dist/src/components/ScreenReaderOnly.js +0 -3
  38. package/dist/src/components/ScreenReaderOnly.js.map +0 -1
  39. package/dist/src/components/SectionElement.d.ts +0 -4
  40. package/dist/src/components/SectionElement.d.ts.map +0 -1
  41. package/dist/src/components/SectionElement.js +0 -8
  42. package/dist/src/components/SectionElement.js.map +0 -1
  43. package/dist/src/components/attachments/Attachment.d.ts +0 -4
  44. package/dist/src/components/attachments/Attachment.d.ts.map +0 -1
  45. package/dist/src/components/attachments/Attachment.js +0 -8
  46. package/dist/src/components/attachments/Attachment.js.map +0 -1
  47. package/dist/src/components/attachments/AttachmentTitle.d.ts +0 -6
  48. package/dist/src/components/attachments/AttachmentTitle.d.ts.map +0 -1
  49. package/dist/src/components/attachments/AttachmentTitle.js +0 -12
  50. package/dist/src/components/attachments/AttachmentTitle.js.map +0 -1
  51. package/dist/src/components/attachments/Attachments.d.ts +0 -5
  52. package/dist/src/components/attachments/Attachments.d.ts.map +0 -1
  53. package/dist/src/components/attachments/Attachments.js +0 -55
  54. package/dist/src/components/attachments/Attachments.js.map +0 -1
  55. package/dist/src/components/attachments/ExternalMaterial.d.ts +0 -9
  56. package/dist/src/components/attachments/ExternalMaterial.d.ts.map +0 -1
  57. package/dist/src/components/attachments/ExternalMaterial.js +0 -46
  58. package/dist/src/components/attachments/ExternalMaterial.js.map +0 -1
  59. package/dist/src/components/attachments/Question.d.ts +0 -4
  60. package/dist/src/components/attachments/Question.d.ts.map +0 -1
  61. package/dist/src/components/attachments/Question.js +0 -16
  62. package/dist/src/components/attachments/Question.js.map +0 -1
  63. package/dist/src/components/attachments/QuestionTitle.d.ts +0 -6
  64. package/dist/src/components/attachments/QuestionTitle.d.ts.map +0 -1
  65. package/dist/src/components/attachments/QuestionTitle.js +0 -15
  66. package/dist/src/components/attachments/QuestionTitle.js.map +0 -1
  67. package/dist/src/components/context/AnnotationProvider.d.ts +0 -16
  68. package/dist/src/components/context/AnnotationProvider.d.ts.map +0 -1
  69. package/dist/src/components/context/AnnotationProvider.js +0 -35
  70. package/dist/src/components/context/AnnotationProvider.js.map +0 -1
  71. package/dist/src/components/context/AttachmentContext.d.ts +0 -13
  72. package/dist/src/components/context/AttachmentContext.d.ts.map +0 -1
  73. package/dist/src/components/context/AttachmentContext.js +0 -12
  74. package/dist/src/components/context/AttachmentContext.js.map +0 -1
  75. package/dist/src/components/context/CommonExamContext.d.ts +0 -22
  76. package/dist/src/components/context/CommonExamContext.d.ts.map +0 -1
  77. package/dist/src/components/context/CommonExamContext.js +0 -28
  78. package/dist/src/components/context/CommonExamContext.js.map +0 -1
  79. package/dist/src/components/context/ExamContext.d.ts +0 -9
  80. package/dist/src/components/context/ExamContext.d.ts.map +0 -1
  81. package/dist/src/components/context/ExamContext.js +0 -11
  82. package/dist/src/components/context/ExamContext.js.map +0 -1
  83. package/dist/src/components/context/IsInSidebarContext.d.ts +0 -6
  84. package/dist/src/components/context/IsInSidebarContext.d.ts.map +0 -1
  85. package/dist/src/components/context/IsInSidebarContext.js +0 -3
  86. package/dist/src/components/context/IsInSidebarContext.js.map +0 -1
  87. package/dist/src/components/context/QuestionContext.d.ts +0 -14
  88. package/dist/src/components/context/QuestionContext.d.ts.map +0 -1
  89. package/dist/src/components/context/QuestionContext.js +0 -27
  90. package/dist/src/components/context/QuestionContext.js.map +0 -1
  91. package/dist/src/components/context/ResultsContext.d.ts +0 -17
  92. package/dist/src/components/context/ResultsContext.d.ts.map +0 -1
  93. package/dist/src/components/context/ResultsContext.js +0 -69
  94. package/dist/src/components/context/ResultsContext.js.map +0 -1
  95. package/dist/src/components/context/SectionContext.d.ts +0 -12
  96. package/dist/src/components/context/SectionContext.d.ts.map +0 -1
  97. package/dist/src/components/context/SectionContext.js +0 -21
  98. package/dist/src/components/context/SectionContext.js.map +0 -1
  99. package/dist/src/components/context/TOCContext.d.ts +0 -7
  100. package/dist/src/components/context/TOCContext.d.ts.map +0 -1
  101. package/dist/src/components/context/TOCContext.js +0 -3
  102. package/dist/src/components/context/TOCContext.js.map +0 -1
  103. package/dist/src/components/context/withContext.d.ts +0 -3
  104. package/dist/src/components/context/withContext.d.ts.map +0 -1
  105. package/dist/src/components/context/withContext.js +0 -12
  106. package/dist/src/components/context/withContext.js.map +0 -1
  107. package/dist/src/components/exam/Attachment.d.ts +0 -4
  108. package/dist/src/components/exam/Attachment.d.ts.map +0 -1
  109. package/dist/src/components/exam/Attachment.js +0 -8
  110. package/dist/src/components/exam/Attachment.js.map +0 -1
  111. package/dist/src/components/exam/ChoiceAnswer.d.ts +0 -5
  112. package/dist/src/components/exam/ChoiceAnswer.d.ts.map +0 -1
  113. package/dist/src/components/exam/ChoiceAnswer.js +0 -53
  114. package/dist/src/components/exam/ChoiceAnswer.js.map +0 -1
  115. package/dist/src/components/exam/DropdownAnswer.d.ts +0 -5
  116. package/dist/src/components/exam/DropdownAnswer.d.ts.map +0 -1
  117. package/dist/src/components/exam/DropdownAnswer.js +0 -101
  118. package/dist/src/components/exam/DropdownAnswer.js.map +0 -1
  119. package/dist/src/components/exam/Exam.d.ts +0 -48
  120. package/dist/src/components/exam/Exam.d.ts.map +0 -1
  121. package/dist/src/components/exam/Exam.js +0 -195
  122. package/dist/src/components/exam/Exam.js.map +0 -1
  123. package/dist/src/components/exam/ExamFooter.d.ts +0 -6
  124. package/dist/src/components/exam/ExamFooter.d.ts.map +0 -1
  125. package/dist/src/components/exam/ExamFooter.js +0 -6
  126. package/dist/src/components/exam/ExamFooter.js.map +0 -1
  127. package/dist/src/components/exam/ExamInstruction.d.ts +0 -6
  128. package/dist/src/components/exam/ExamInstruction.d.ts.map +0 -1
  129. package/dist/src/components/exam/ExamInstruction.js +0 -6
  130. package/dist/src/components/exam/ExamInstruction.js.map +0 -1
  131. package/dist/src/components/exam/ExternalMaterial.d.ts +0 -10
  132. package/dist/src/components/exam/ExternalMaterial.d.ts.map +0 -1
  133. package/dist/src/components/exam/ExternalMaterial.js +0 -33
  134. package/dist/src/components/exam/ExternalMaterial.js.map +0 -1
  135. package/dist/src/components/exam/GoToExamineAnswersButton.d.ts +0 -5
  136. package/dist/src/components/exam/GoToExamineAnswersButton.d.ts.map +0 -1
  137. package/dist/src/components/exam/GoToExamineAnswersButton.js +0 -18
  138. package/dist/src/components/exam/GoToExamineAnswersButton.js.map +0 -1
  139. package/dist/src/components/exam/Hints.d.ts +0 -5
  140. package/dist/src/components/exam/Hints.d.ts.map +0 -1
  141. package/dist/src/components/exam/Hints.js +0 -31
  142. package/dist/src/components/exam/Hints.js.map +0 -1
  143. package/dist/src/components/exam/Question.d.ts +0 -8
  144. package/dist/src/components/exam/Question.d.ts.map +0 -1
  145. package/dist/src/components/exam/Question.js +0 -75
  146. package/dist/src/components/exam/Question.js.map +0 -1
  147. package/dist/src/components/exam/QuestionInstruction.d.ts +0 -6
  148. package/dist/src/components/exam/QuestionInstruction.d.ts.map +0 -1
  149. package/dist/src/components/exam/QuestionInstruction.js +0 -8
  150. package/dist/src/components/exam/QuestionInstruction.js.map +0 -1
  151. package/dist/src/components/exam/QuestionTitle.d.ts +0 -5
  152. package/dist/src/components/exam/QuestionTitle.d.ts.map +0 -1
  153. package/dist/src/components/exam/QuestionTitle.js +0 -26
  154. package/dist/src/components/exam/QuestionTitle.js.map +0 -1
  155. package/dist/src/components/exam/RichTextAnswer.d.ts +0 -41
  156. package/dist/src/components/exam/RichTextAnswer.d.ts.map +0 -1
  157. package/dist/src/components/exam/RichTextAnswer.js +0 -79
  158. package/dist/src/components/exam/RichTextAnswer.js.map +0 -1
  159. package/dist/src/components/exam/Section.d.ts +0 -4
  160. package/dist/src/components/exam/Section.d.ts.map +0 -1
  161. package/dist/src/components/exam/Section.js +0 -49
  162. package/dist/src/components/exam/Section.js.map +0 -1
  163. package/dist/src/components/exam/SectionInstruction.d.ts +0 -6
  164. package/dist/src/components/exam/SectionInstruction.d.ts.map +0 -1
  165. package/dist/src/components/exam/SectionInstruction.js +0 -6
  166. package/dist/src/components/exam/SectionInstruction.js.map +0 -1
  167. package/dist/src/components/exam/SectionTitle.d.ts +0 -6
  168. package/dist/src/components/exam/SectionTitle.d.ts.map +0 -1
  169. package/dist/src/components/exam/SectionTitle.js +0 -30
  170. package/dist/src/components/exam/SectionTitle.js.map +0 -1
  171. package/dist/src/components/exam/StudentNameHeader.d.ts +0 -8
  172. package/dist/src/components/exam/StudentNameHeader.d.ts.map +0 -1
  173. package/dist/src/components/exam/StudentNameHeader.js +0 -3
  174. package/dist/src/components/exam/StudentNameHeader.js.map +0 -1
  175. package/dist/src/components/exam/TextAnswer.d.ts +0 -6
  176. package/dist/src/components/exam/TextAnswer.d.ts.map +0 -1
  177. package/dist/src/components/exam/TextAnswer.js +0 -20
  178. package/dist/src/components/exam/TextAnswer.js.map +0 -1
  179. package/dist/src/components/exam/UndoHistoryEntry.d.ts +0 -19
  180. package/dist/src/components/exam/UndoHistoryEntry.d.ts.map +0 -1
  181. package/dist/src/components/exam/UndoHistoryEntry.js +0 -39
  182. package/dist/src/components/exam/UndoHistoryEntry.js.map +0 -1
  183. package/dist/src/components/exam/UndoView.d.ts +0 -35
  184. package/dist/src/components/exam/UndoView.d.ts.map +0 -1
  185. package/dist/src/components/exam/UndoView.js +0 -162
  186. package/dist/src/components/exam/UndoView.js.map +0 -1
  187. package/dist/src/components/exam/internal/ErrorIndicator.d.ts +0 -9
  188. package/dist/src/components/exam/internal/ErrorIndicator.d.ts.map +0 -1
  189. package/dist/src/components/exam/internal/ErrorIndicator.js +0 -63
  190. package/dist/src/components/exam/internal/ErrorIndicator.js.map +0 -1
  191. package/dist/src/components/exam/internal/ProgressBar.d.ts +0 -8
  192. package/dist/src/components/exam/internal/ProgressBar.d.ts.map +0 -1
  193. package/dist/src/components/exam/internal/ProgressBar.js +0 -19
  194. package/dist/src/components/exam/internal/ProgressBar.js.map +0 -1
  195. package/dist/src/components/exam/internal/SaveIndicator.d.ts +0 -5
  196. package/dist/src/components/exam/internal/SaveIndicator.d.ts.map +0 -1
  197. package/dist/src/components/exam/internal/SaveIndicator.js +0 -16
  198. package/dist/src/components/exam/internal/SaveIndicator.js.map +0 -1
  199. package/dist/src/components/exam/internal/TextAnswerInput.d.ts +0 -6
  200. package/dist/src/components/exam/internal/TextAnswerInput.d.ts.map +0 -1
  201. package/dist/src/components/exam/internal/TextAnswerInput.js +0 -128
  202. package/dist/src/components/exam/internal/TextAnswerInput.js.map +0 -1
  203. package/dist/src/components/grading/AnswerCharacterCounter.d.ts +0 -6
  204. package/dist/src/components/grading/AnswerCharacterCounter.d.ts.map +0 -1
  205. package/dist/src/components/grading/AnswerCharacterCounter.js +0 -21
  206. package/dist/src/components/grading/AnswerCharacterCounter.js.map +0 -1
  207. package/dist/src/components/grading/GradingAnswer.d.ts +0 -24
  208. package/dist/src/components/grading/GradingAnswer.d.ts.map +0 -1
  209. package/dist/src/components/grading/GradingAnswer.js +0 -306
  210. package/dist/src/components/grading/GradingAnswer.js.map +0 -1
  211. package/dist/src/components/grading/GradingAnswerAnnotationList.d.ts +0 -9
  212. package/dist/src/components/grading/GradingAnswerAnnotationList.d.ts.map +0 -1
  213. package/dist/src/components/grading/GradingAnswerAnnotationList.js +0 -19
  214. package/dist/src/components/grading/GradingAnswerAnnotationList.js.map +0 -1
  215. package/dist/src/components/grading/editAnnotations.d.ts +0 -29
  216. package/dist/src/components/grading/editAnnotations.d.ts.map +0 -1
  217. package/dist/src/components/grading/editAnnotations.js +0 -190
  218. package/dist/src/components/grading/editAnnotations.js.map +0 -1
  219. package/dist/src/components/grading/examAnnotationUtils.d.ts +0 -3
  220. package/dist/src/components/grading/examAnnotationUtils.d.ts.map +0 -1
  221. package/dist/src/components/grading/examAnnotationUtils.js +0 -44
  222. package/dist/src/components/grading/examAnnotationUtils.js.map +0 -1
  223. package/dist/src/components/grading/largeImageDetector.d.ts +0 -3
  224. package/dist/src/components/grading/largeImageDetector.d.ts.map +0 -1
  225. package/dist/src/components/grading/largeImageDetector.js +0 -45
  226. package/dist/src/components/grading/largeImageDetector.js.map +0 -1
  227. package/dist/src/components/grading-instructions/AnswerGradingInstruction.d.ts +0 -5
  228. package/dist/src/components/grading-instructions/AnswerGradingInstruction.d.ts.map +0 -1
  229. package/dist/src/components/grading-instructions/AnswerGradingInstruction.js +0 -4
  230. package/dist/src/components/grading-instructions/AnswerGradingInstruction.js.map +0 -1
  231. package/dist/src/components/grading-instructions/AutogradedAnswer.d.ts +0 -5
  232. package/dist/src/components/grading-instructions/AutogradedAnswer.d.ts.map +0 -1
  233. package/dist/src/components/grading-instructions/AutogradedAnswer.js +0 -34
  234. package/dist/src/components/grading-instructions/AutogradedAnswer.js.map +0 -1
  235. package/dist/src/components/grading-instructions/AutogradedAnswerOption.d.ts +0 -5
  236. package/dist/src/components/grading-instructions/AutogradedAnswerOption.d.ts.map +0 -1
  237. package/dist/src/components/grading-instructions/AutogradedAnswerOption.js +0 -17
  238. package/dist/src/components/grading-instructions/AutogradedAnswerOption.js.map +0 -1
  239. package/dist/src/components/grading-instructions/ExamGradingInstruction.d.ts +0 -5
  240. package/dist/src/components/grading-instructions/ExamGradingInstruction.d.ts.map +0 -1
  241. package/dist/src/components/grading-instructions/ExamGradingInstruction.js +0 -4
  242. package/dist/src/components/grading-instructions/ExamGradingInstruction.js.map +0 -1
  243. package/dist/src/components/grading-instructions/GradingInstructions.d.ts +0 -6
  244. package/dist/src/components/grading-instructions/GradingInstructions.d.ts.map +0 -1
  245. package/dist/src/components/grading-instructions/GradingInstructions.js +0 -109
  246. package/dist/src/components/grading-instructions/GradingInstructions.js.map +0 -1
  247. package/dist/src/components/grading-instructions/Question.d.ts +0 -4
  248. package/dist/src/components/grading-instructions/Question.d.ts.map +0 -1
  249. package/dist/src/components/grading-instructions/Question.js +0 -14
  250. package/dist/src/components/grading-instructions/Question.js.map +0 -1
  251. package/dist/src/components/grading-instructions/QuestionTitle.d.ts +0 -5
  252. package/dist/src/components/grading-instructions/QuestionTitle.d.ts.map +0 -1
  253. package/dist/src/components/grading-instructions/QuestionTitle.js +0 -19
  254. package/dist/src/components/grading-instructions/QuestionTitle.js.map +0 -1
  255. package/dist/src/components/grading-instructions/Recording.d.ts +0 -5
  256. package/dist/src/components/grading-instructions/Recording.d.ts.map +0 -1
  257. package/dist/src/components/grading-instructions/Recording.js +0 -19
  258. package/dist/src/components/grading-instructions/Recording.js.map +0 -1
  259. package/dist/src/components/grading-instructions/Section.d.ts +0 -4
  260. package/dist/src/components/grading-instructions/Section.d.ts.map +0 -1
  261. package/dist/src/components/grading-instructions/Section.js +0 -10
  262. package/dist/src/components/grading-instructions/Section.js.map +0 -1
  263. package/dist/src/components/grading-instructions/SectionTitle.d.ts +0 -5
  264. package/dist/src/components/grading-instructions/SectionTitle.d.ts.map +0 -1
  265. package/dist/src/components/grading-instructions/SectionTitle.js +0 -16
  266. package/dist/src/components/grading-instructions/SectionTitle.js.map +0 -1
  267. package/dist/src/components/results/ChoiceAnswer.d.ts +0 -6
  268. package/dist/src/components/results/ChoiceAnswer.d.ts.map +0 -1
  269. package/dist/src/components/results/ChoiceAnswer.js +0 -57
  270. package/dist/src/components/results/ChoiceAnswer.js.map +0 -1
  271. package/dist/src/components/results/DropdownAnswer.d.ts +0 -6
  272. package/dist/src/components/results/DropdownAnswer.d.ts.map +0 -1
  273. package/dist/src/components/results/DropdownAnswer.js +0 -43
  274. package/dist/src/components/results/DropdownAnswer.js.map +0 -1
  275. package/dist/src/components/results/EndExamSession.d.ts +0 -8
  276. package/dist/src/components/results/EndExamSession.d.ts.map +0 -1
  277. package/dist/src/components/results/EndExamSession.js +0 -20
  278. package/dist/src/components/results/EndExamSession.js.map +0 -1
  279. package/dist/src/components/results/MultiLineAnswer.d.ts +0 -8
  280. package/dist/src/components/results/MultiLineAnswer.d.ts.map +0 -1
  281. package/dist/src/components/results/MultiLineAnswer.js +0 -22
  282. package/dist/src/components/results/MultiLineAnswer.js.map +0 -1
  283. package/dist/src/components/results/Question.d.ts +0 -4
  284. package/dist/src/components/results/Question.d.ts.map +0 -1
  285. package/dist/src/components/results/Question.js +0 -31
  286. package/dist/src/components/results/Question.js.map +0 -1
  287. package/dist/src/components/results/QuestionTitle.d.ts +0 -6
  288. package/dist/src/components/results/QuestionTitle.d.ts.map +0 -1
  289. package/dist/src/components/results/QuestionTitle.js +0 -26
  290. package/dist/src/components/results/QuestionTitle.js.map +0 -1
  291. package/dist/src/components/results/Results.d.ts +0 -19
  292. package/dist/src/components/results/Results.d.ts.map +0 -1
  293. package/dist/src/components/results/Results.js +0 -136
  294. package/dist/src/components/results/Results.js.map +0 -1
  295. package/dist/src/components/results/ScoredTextAnswer.d.ts +0 -6
  296. package/dist/src/components/results/ScoredTextAnswer.d.ts.map +0 -1
  297. package/dist/src/components/results/ScoredTextAnswer.js +0 -22
  298. package/dist/src/components/results/ScoredTextAnswer.js.map +0 -1
  299. package/dist/src/components/results/Section.d.ts +0 -4
  300. package/dist/src/components/results/Section.d.ts.map +0 -1
  301. package/dist/src/components/results/Section.js +0 -11
  302. package/dist/src/components/results/Section.js.map +0 -1
  303. package/dist/src/components/results/SingleLineAnswer.d.ts +0 -12
  304. package/dist/src/components/results/SingleLineAnswer.d.ts.map +0 -1
  305. package/dist/src/components/results/SingleLineAnswer.js +0 -26
  306. package/dist/src/components/results/SingleLineAnswer.js.map +0 -1
  307. package/dist/src/components/results/TextAnswer.d.ts +0 -7
  308. package/dist/src/components/results/TextAnswer.d.ts.map +0 -1
  309. package/dist/src/components/results/TextAnswer.js +0 -48
  310. package/dist/src/components/results/TextAnswer.js.map +0 -1
  311. package/dist/src/components/results/internal/AnnotationList.d.ts +0 -5
  312. package/dist/src/components/results/internal/AnnotationList.d.ts.map +0 -1
  313. package/dist/src/components/results/internal/AnnotationList.js +0 -32
  314. package/dist/src/components/results/internal/AnnotationList.js.map +0 -1
  315. package/dist/src/components/results/internal/QuestionAutoScore.d.ts +0 -11
  316. package/dist/src/components/results/internal/QuestionAutoScore.d.ts.map +0 -1
  317. package/dist/src/components/results/internal/QuestionAutoScore.js +0 -17
  318. package/dist/src/components/results/internal/QuestionAutoScore.js.map +0 -1
  319. package/dist/src/components/results/internal/QuestionManualScore.d.ts +0 -13
  320. package/dist/src/components/results/internal/QuestionManualScore.d.ts.map +0 -1
  321. package/dist/src/components/results/internal/QuestionManualScore.js +0 -66
  322. package/dist/src/components/results/internal/QuestionManualScore.js.map +0 -1
  323. package/dist/src/components/results/internal/QuestionScoresContainer.d.ts +0 -11
  324. package/dist/src/components/results/internal/QuestionScoresContainer.d.ts.map +0 -1
  325. package/dist/src/components/results/internal/QuestionScoresContainer.js +0 -27
  326. package/dist/src/components/results/internal/QuestionScoresContainer.js.map +0 -1
  327. package/dist/src/components/results/isExamineExamPageHook.d.ts +0 -2
  328. package/dist/src/components/results/isExamineExamPageHook.d.ts.map +0 -1
  329. package/dist/src/components/results/isExamineExamPageHook.js +0 -7
  330. package/dist/src/components/results/isExamineExamPageHook.js.map +0 -1
  331. package/dist/src/components/shared/AnnotatableText.d.ts +0 -5
  332. package/dist/src/components/shared/AnnotatableText.d.ts.map +0 -1
  333. package/dist/src/components/shared/AnnotatableText.js +0 -73
  334. package/dist/src/components/shared/AnnotatableText.js.map +0 -1
  335. package/dist/src/components/shared/AnnotationLists.d.ts +0 -13
  336. package/dist/src/components/shared/AnnotationLists.d.ts.map +0 -1
  337. package/dist/src/components/shared/AnnotationLists.js +0 -17
  338. package/dist/src/components/shared/AnnotationLists.js.map +0 -1
  339. package/dist/src/components/shared/AnnotationPopup.d.ts +0 -3
  340. package/dist/src/components/shared/AnnotationPopup.d.ts.map +0 -1
  341. package/dist/src/components/shared/AnnotationPopup.js +0 -74
  342. package/dist/src/components/shared/AnnotationPopup.js.map +0 -1
  343. package/dist/src/components/shared/AnswerIndicator.d.ts +0 -12
  344. package/dist/src/components/shared/AnswerIndicator.d.ts.map +0 -1
  345. package/dist/src/components/shared/AnswerIndicator.js +0 -27
  346. package/dist/src/components/shared/AnswerIndicator.js.map +0 -1
  347. package/dist/src/components/shared/AnswerLengthInfo.d.ts +0 -7
  348. package/dist/src/components/shared/AnswerLengthInfo.d.ts.map +0 -1
  349. package/dist/src/components/shared/AnswerLengthInfo.js +0 -11
  350. package/dist/src/components/shared/AnswerLengthInfo.js.map +0 -1
  351. package/dist/src/components/shared/AttachmentLink.d.ts +0 -5
  352. package/dist/src/components/shared/AttachmentLink.d.ts.map +0 -1
  353. package/dist/src/components/shared/AttachmentLink.js +0 -28
  354. package/dist/src/components/shared/AttachmentLink.js.map +0 -1
  355. package/dist/src/components/shared/AttachmentLinks.d.ts +0 -5
  356. package/dist/src/components/shared/AttachmentLinks.d.ts.map +0 -1
  357. package/dist/src/components/shared/AttachmentLinks.js +0 -58
  358. package/dist/src/components/shared/AttachmentLinks.js.map +0 -1
  359. package/dist/src/components/shared/Audio.d.ts +0 -6
  360. package/dist/src/components/shared/Audio.d.ts.map +0 -1
  361. package/dist/src/components/shared/Audio.js +0 -31
  362. package/dist/src/components/shared/Audio.js.map +0 -1
  363. package/dist/src/components/shared/AudioGroup.d.ts +0 -6
  364. package/dist/src/components/shared/AudioGroup.d.ts.map +0 -1
  365. package/dist/src/components/shared/AudioGroup.js +0 -9
  366. package/dist/src/components/shared/AudioGroup.js.map +0 -1
  367. package/dist/src/components/shared/AudioTest.d.ts +0 -6
  368. package/dist/src/components/shared/AudioTest.d.ts.map +0 -1
  369. package/dist/src/components/shared/AudioTest.js +0 -34
  370. package/dist/src/components/shared/AudioTest.js.map +0 -1
  371. package/dist/src/components/shared/ExamTranslation.d.ts +0 -6
  372. package/dist/src/components/shared/ExamTranslation.d.ts.map +0 -1
  373. package/dist/src/components/shared/ExamTranslation.js +0 -9
  374. package/dist/src/components/shared/ExamTranslation.js.map +0 -1
  375. package/dist/src/components/shared/File.d.ts +0 -6
  376. package/dist/src/components/shared/File.d.ts.map +0 -1
  377. package/dist/src/components/shared/File.js +0 -15
  378. package/dist/src/components/shared/File.js.map +0 -1
  379. package/dist/src/components/shared/Footer.d.ts +0 -5
  380. package/dist/src/components/shared/Footer.d.ts.map +0 -1
  381. package/dist/src/components/shared/Footer.js +0 -3
  382. package/dist/src/components/shared/Footer.js.map +0 -1
  383. package/dist/src/components/shared/Formula.d.ts +0 -6
  384. package/dist/src/components/shared/Formula.d.ts.map +0 -1
  385. package/dist/src/components/shared/Formula.js +0 -13
  386. package/dist/src/components/shared/Formula.js.map +0 -1
  387. package/dist/src/components/shared/Image.d.ts +0 -6
  388. package/dist/src/components/shared/Image.d.ts.map +0 -1
  389. package/dist/src/components/shared/Image.js +0 -30
  390. package/dist/src/components/shared/Image.js.map +0 -1
  391. package/dist/src/components/shared/ImageOverlay.d.ts +0 -6
  392. package/dist/src/components/shared/ImageOverlay.d.ts.map +0 -1
  393. package/dist/src/components/shared/ImageOverlay.js +0 -43
  394. package/dist/src/components/shared/ImageOverlay.js.map +0 -1
  395. package/dist/src/components/shared/QuestionNumber.d.ts +0 -4
  396. package/dist/src/components/shared/QuestionNumber.d.ts.map +0 -1
  397. package/dist/src/components/shared/QuestionNumber.js +0 -12
  398. package/dist/src/components/shared/QuestionNumber.js.map +0 -1
  399. package/dist/src/components/shared/Reference.d.ts +0 -6
  400. package/dist/src/components/shared/Reference.d.ts.map +0 -1
  401. package/dist/src/components/shared/Reference.js +0 -72
  402. package/dist/src/components/shared/Reference.js.map +0 -1
  403. package/dist/src/components/shared/References.d.ts +0 -6
  404. package/dist/src/components/shared/References.d.ts.map +0 -1
  405. package/dist/src/components/shared/References.js +0 -26
  406. package/dist/src/components/shared/References.js.map +0 -1
  407. package/dist/src/components/shared/Score.d.ts +0 -8
  408. package/dist/src/components/shared/Score.d.ts.map +0 -1
  409. package/dist/src/components/shared/Score.js +0 -13
  410. package/dist/src/components/shared/Score.js.map +0 -1
  411. package/dist/src/components/shared/TOCQuestion.d.ts +0 -4
  412. package/dist/src/components/shared/TOCQuestion.d.ts.map +0 -1
  413. package/dist/src/components/shared/TOCQuestion.js +0 -77
  414. package/dist/src/components/shared/TOCQuestion.js.map +0 -1
  415. package/dist/src/components/shared/TOCSection.d.ts +0 -7
  416. package/dist/src/components/shared/TOCSection.d.ts.map +0 -1
  417. package/dist/src/components/shared/TOCSection.js +0 -15
  418. package/dist/src/components/shared/TOCSection.js.map +0 -1
  419. package/dist/src/components/shared/TOCSectionTitle.d.ts +0 -4
  420. package/dist/src/components/shared/TOCSectionTitle.d.ts.map +0 -1
  421. package/dist/src/components/shared/TOCSectionTitle.js +0 -34
  422. package/dist/src/components/shared/TOCSectionTitle.js.map +0 -1
  423. package/dist/src/components/shared/TableOfContents.d.ts +0 -8
  424. package/dist/src/components/shared/TableOfContents.d.ts.map +0 -1
  425. package/dist/src/components/shared/TableOfContents.js +0 -61
  426. package/dist/src/components/shared/TableOfContents.js.map +0 -1
  427. package/dist/src/components/shared/VersionNumber.d.ts +0 -3
  428. package/dist/src/components/shared/VersionNumber.d.ts.map +0 -1
  429. package/dist/src/components/shared/VersionNumber.js +0 -10
  430. package/dist/src/components/shared/VersionNumber.js.map +0 -1
  431. package/dist/src/components/shared/Video.d.ts +0 -6
  432. package/dist/src/components/shared/Video.d.ts.map +0 -1
  433. package/dist/src/components/shared/Video.js +0 -22
  434. package/dist/src/components/shared/Video.js.map +0 -1
  435. package/dist/src/components/shared/internal/AttachmentLinkAnchor.d.ts +0 -8
  436. package/dist/src/components/shared/internal/AttachmentLinkAnchor.d.ts.map +0 -1
  437. package/dist/src/components/shared/internal/AttachmentLinkAnchor.js +0 -4
  438. package/dist/src/components/shared/internal/AttachmentLinkAnchor.js.map +0 -1
  439. package/dist/src/components/shared/internal/AudioPlaybackError.d.ts +0 -8
  440. package/dist/src/components/shared/internal/AudioPlaybackError.d.ts.map +0 -1
  441. package/dist/src/components/shared/internal/AudioPlaybackError.js +0 -17
  442. package/dist/src/components/shared/internal/AudioPlaybackError.js.map +0 -1
  443. package/dist/src/components/shared/internal/ResponsiveMediaContainer.d.ts +0 -18
  444. package/dist/src/components/shared/internal/ResponsiveMediaContainer.d.ts.map +0 -1
  445. package/dist/src/components/shared/internal/ResponsiveMediaContainer.js +0 -21
  446. package/dist/src/components/shared/internal/ResponsiveMediaContainer.js.map +0 -1
  447. package/dist/src/components/shared/internal/RestrictedAudioPlayer.d.ts +0 -12
  448. package/dist/src/components/shared/internal/RestrictedAudioPlayer.d.ts.map +0 -1
  449. package/dist/src/components/shared/internal/RestrictedAudioPlayer.js +0 -46
  450. package/dist/src/components/shared/internal/RestrictedAudioPlayer.js.map +0 -1
  451. package/dist/src/components/surround.d.ts +0 -8
  452. package/dist/src/components/surround.d.ts.map +0 -1
  453. package/dist/src/components/surround.js +0 -19
  454. package/dist/src/components/surround.js.map +0 -1
  455. package/dist/src/createRenderChildNodes.d.ts +0 -17
  456. package/dist/src/createRenderChildNodes.d.ts.map +0 -1
  457. package/dist/src/createRenderChildNodes.js +0 -64
  458. package/dist/src/createRenderChildNodes.js.map +0 -1
  459. package/dist/src/dom-utils.d.ts +0 -20
  460. package/dist/src/dom-utils.d.ts.map +0 -1
  461. package/dist/src/dom-utils.js +0 -164
  462. package/dist/src/dom-utils.js.map +0 -1
  463. package/dist/src/fonts.d.ts +0 -5
  464. package/dist/src/fonts.d.ts.map +0 -1
  465. package/dist/src/fonts.js +0 -16
  466. package/dist/src/fonts.js.map +0 -1
  467. package/dist/src/formatting.d.ts +0 -2
  468. package/dist/src/formatting.d.ts.map +0 -1
  469. package/dist/src/formatting.js +0 -4
  470. package/dist/src/formatting.js.map +0 -1
  471. package/dist/src/getDisplayName.d.ts +0 -4
  472. package/dist/src/getDisplayName.d.ts.map +0 -1
  473. package/dist/src/getDisplayName.js +0 -5
  474. package/dist/src/getDisplayName.js.map +0 -1
  475. package/dist/src/i18n/A_E.d.ts +0 -3
  476. package/dist/src/i18n/A_E.d.ts.map +0 -1
  477. package/dist/src/i18n/A_E.js +0 -8
  478. package/dist/src/i18n/A_E.js.map +0 -1
  479. package/dist/src/i18n/BA.d.ts +0 -3
  480. package/dist/src/i18n/BA.d.ts.map +0 -1
  481. package/dist/src/i18n/BA.js +0 -11
  482. package/dist/src/i18n/BA.js.map +0 -1
  483. package/dist/src/i18n/CA.d.ts +0 -3
  484. package/dist/src/i18n/CA.d.ts.map +0 -1
  485. package/dist/src/i18n/CA.js +0 -11
  486. package/dist/src/i18n/CA.js.map +0 -1
  487. package/dist/src/i18n/EA.d.ts +0 -3
  488. package/dist/src/i18n/EA.d.ts.map +0 -1
  489. package/dist/src/i18n/EA.js +0 -16
  490. package/dist/src/i18n/EA.js.map +0 -1
  491. package/dist/src/i18n/FA.d.ts +0 -3
  492. package/dist/src/i18n/FA.d.ts.map +0 -1
  493. package/dist/src/i18n/FA.js +0 -17
  494. package/dist/src/i18n/FA.js.map +0 -1
  495. package/dist/src/i18n/GC.d.ts +0 -3
  496. package/dist/src/i18n/GC.d.ts.map +0 -1
  497. package/dist/src/i18n/GC.js +0 -16
  498. package/dist/src/i18n/GC.js.map +0 -1
  499. package/dist/src/i18n/I.d.ts +0 -3
  500. package/dist/src/i18n/I.d.ts.map +0 -1
  501. package/dist/src/i18n/I.js +0 -21
  502. package/dist/src/i18n/I.js.map +0 -1
  503. package/dist/src/i18n/M.d.ts +0 -3
  504. package/dist/src/i18n/M.d.ts.map +0 -1
  505. package/dist/src/i18n/M.js +0 -4
  506. package/dist/src/i18n/M.js.map +0 -1
  507. package/dist/src/i18n/O_E.d.ts +0 -3
  508. package/dist/src/i18n/O_E.d.ts.map +0 -1
  509. package/dist/src/i18n/O_E.js +0 -7
  510. package/dist/src/i18n/O_E.js.map +0 -1
  511. package/dist/src/i18n/PA.d.ts +0 -3
  512. package/dist/src/i18n/PA.d.ts.map +0 -1
  513. package/dist/src/i18n/PA.js +0 -16
  514. package/dist/src/i18n/PA.js.map +0 -1
  515. package/dist/src/i18n/SA.d.ts +0 -3
  516. package/dist/src/i18n/SA.d.ts.map +0 -1
  517. package/dist/src/i18n/SA.js +0 -16
  518. package/dist/src/i18n/SA.js.map +0 -1
  519. package/dist/src/i18n/TC.d.ts +0 -3
  520. package/dist/src/i18n/TC.d.ts.map +0 -1
  521. package/dist/src/i18n/TC.js +0 -16
  522. package/dist/src/i18n/TC.js.map +0 -1
  523. package/dist/src/i18n/VA.d.ts +0 -3
  524. package/dist/src/i18n/VA.d.ts.map +0 -1
  525. package/dist/src/i18n/VA.js +0 -16
  526. package/dist/src/i18n/VA.js.map +0 -1
  527. package/dist/src/i18n/Z.d.ts +0 -3
  528. package/dist/src/i18n/Z.d.ts.map +0 -1
  529. package/dist/src/i18n/Z.js +0 -22
  530. package/dist/src/i18n/Z.js.map +0 -1
  531. package/dist/src/i18n/fi-FI.d.ts +0 -192
  532. package/dist/src/i18n/fi-FI.d.ts.map +0 -1
  533. package/dist/src/i18n/fi-FI.js +0 -182
  534. package/dist/src/i18n/fi-FI.js.map +0 -1
  535. package/dist/src/i18n/index.d.ts +0 -20
  536. package/dist/src/i18n/index.d.ts.map +0 -1
  537. package/dist/src/i18n/index.js +0 -128
  538. package/dist/src/i18n/index.js.map +0 -1
  539. package/dist/src/i18n/sv-FI.d.ts +0 -3
  540. package/dist/src/i18n/sv-FI.d.ts.map +0 -1
  541. package/dist/src/i18n/sv-FI.js +0 -181
  542. package/dist/src/i18n/sv-FI.js.map +0 -1
  543. package/dist/src/ids.d.ts +0 -14
  544. package/dist/src/ids.d.ts.map +0 -1
  545. package/dist/src/ids.js +0 -28
  546. package/dist/src/ids.js.map +0 -1
  547. package/dist/src/index.d.ts +0 -19
  548. package/dist/src/index.d.ts.map +0 -1
  549. package/dist/src/index.js +0 -12
  550. package/dist/src/index.js.map +0 -1
  551. package/dist/src/parser/parseExam.d.ts +0 -2
  552. package/dist/src/parser/parseExam.d.ts.map +0 -1
  553. package/dist/src/parser/parseExam.js +0 -54
  554. package/dist/src/parser/parseExam.js.map +0 -1
  555. package/dist/src/parser/parseExamStructure.d.ts +0 -58
  556. package/dist/src/parser/parseExamStructure.d.ts.map +0 -1
  557. package/dist/src/parser/parseExamStructure.js +0 -40
  558. package/dist/src/parser/parseExamStructure.js.map +0 -1
  559. package/dist/src/renderAnnotations.d.ts +0 -7
  560. package/dist/src/renderAnnotations.d.ts.map +0 -1
  561. package/dist/src/renderAnnotations.js +0 -193
  562. package/dist/src/renderAnnotations.js.map +0 -1
  563. package/dist/src/scrollToHash.d.ts +0 -2
  564. package/dist/src/scrollToHash.d.ts.map +0 -1
  565. package/dist/src/scrollToHash.js +0 -24
  566. package/dist/src/scrollToHash.js.map +0 -1
  567. package/dist/src/shortDisplayNumber.d.ts +0 -2
  568. package/dist/src/shortDisplayNumber.d.ts.map +0 -1
  569. package/dist/src/shortDisplayNumber.js +0 -5
  570. package/dist/src/shortDisplayNumber.js.map +0 -1
  571. package/dist/src/store/answers/actions.d.ts +0 -33
  572. package/dist/src/store/answers/actions.d.ts.map +0 -1
  573. package/dist/src/store/answers/actions.js +0 -9
  574. package/dist/src/store/answers/actions.js.map +0 -1
  575. package/dist/src/store/answers/reducer.d.ts +0 -39
  576. package/dist/src/store/answers/reducer.d.ts.map +0 -1
  577. package/dist/src/store/answers/reducer.js +0 -55
  578. package/dist/src/store/answers/reducer.js.map +0 -1
  579. package/dist/src/store/answers/sagas.d.ts +0 -8
  580. package/dist/src/store/answers/sagas.d.ts.map +0 -1
  581. package/dist/src/store/answers/sagas.js +0 -60
  582. package/dist/src/store/answers/sagas.js.map +0 -1
  583. package/dist/src/store/audio/actions.d.ts +0 -29
  584. package/dist/src/store/audio/actions.d.ts.map +0 -1
  585. package/dist/src/store/audio/actions.js +0 -9
  586. package/dist/src/store/audio/actions.js.map +0 -1
  587. package/dist/src/store/audio/reducer.d.ts +0 -27
  588. package/dist/src/store/audio/reducer.d.ts.map +0 -1
  589. package/dist/src/store/audio/reducer.js +0 -55
  590. package/dist/src/store/audio/reducer.js.map +0 -1
  591. package/dist/src/store/audio/sagas.d.ts +0 -3
  592. package/dist/src/store/audio/sagas.d.ts.map +0 -1
  593. package/dist/src/store/audio/sagas.js +0 -68
  594. package/dist/src/store/audio/sagas.js.map +0 -1
  595. package/dist/src/store/cas/actions.d.ts +0 -19
  596. package/dist/src/store/cas/actions.d.ts.map +0 -1
  597. package/dist/src/store/cas/actions.js +0 -9
  598. package/dist/src/store/cas/actions.js.map +0 -1
  599. package/dist/src/store/cas/reducer.d.ts +0 -14
  600. package/dist/src/store/cas/reducer.d.ts.map +0 -1
  601. package/dist/src/store/cas/reducer.js +0 -24
  602. package/dist/src/store/cas/reducer.js.map +0 -1
  603. package/dist/src/store/cas/sagas.d.ts +0 -18
  604. package/dist/src/store/cas/sagas.d.ts.map +0 -1
  605. package/dist/src/store/cas/sagas.js +0 -36
  606. package/dist/src/store/cas/sagas.js.map +0 -1
  607. package/dist/src/store/countdown.d.ts +0 -4
  608. package/dist/src/store/countdown.d.ts.map +0 -1
  609. package/dist/src/store/countdown.js +0 -33
  610. package/dist/src/store/countdown.js.map +0 -1
  611. package/dist/src/store/index.d.ts +0 -78
  612. package/dist/src/store/index.d.ts.map +0 -1
  613. package/dist/src/store/index.js +0 -53
  614. package/dist/src/store/index.js.map +0 -1
  615. package/dist/src/store/selectors.d.ts +0 -9
  616. package/dist/src/store/selectors.d.ts.map +0 -1
  617. package/dist/src/store/selectors.js +0 -35
  618. package/dist/src/store/selectors.js.map +0 -1
  619. package/dist/src/types/ExamAnswer.d.ts +0 -22
  620. package/dist/src/types/ExamAnswer.d.ts.map +0 -1
  621. package/dist/src/types/ExamAnswer.js +0 -2
  622. package/dist/src/types/ExamAnswer.js.map +0 -1
  623. package/dist/src/types/ExamServerAPI.d.ts +0 -78
  624. package/dist/src/types/ExamServerAPI.d.ts.map +0 -1
  625. package/dist/src/types/ExamServerAPI.js +0 -2
  626. package/dist/src/types/ExamServerAPI.js.map +0 -1
  627. package/dist/src/types/GradingStructure.d.ts +0 -40
  628. package/dist/src/types/GradingStructure.d.ts.map +0 -1
  629. package/dist/src/types/GradingStructure.js +0 -2
  630. package/dist/src/types/GradingStructure.js.map +0 -1
  631. package/dist/src/types/Score.d.ts +0 -92
  632. package/dist/src/types/Score.d.ts.map +0 -1
  633. package/dist/src/types/Score.js +0 -2
  634. package/dist/src/types/Score.js.map +0 -1
  635. package/dist/src/url.d.ts +0 -7
  636. package/dist/src/url.d.ts.map +0 -1
  637. package/dist/src/url.js +0 -12
  638. package/dist/src/url.js.map +0 -1
  639. package/dist/src/useCached.d.ts +0 -3
  640. package/dist/src/useCached.d.ts.map +0 -1
  641. package/dist/src/useCached.js +0 -6
  642. package/dist/src/useCached.js.map +0 -1
  643. package/dist/src/utils.d.ts +0 -15
  644. package/dist/src/utils.d.ts.map +0 -1
  645. package/dist/src/utils.js +0 -35
  646. package/dist/src/utils.js.map +0 -1
  647. package/dist/src/validateAnswers.d.ts +0 -16
  648. package/dist/src/validateAnswers.d.ts.map +0 -1
  649. package/dist/src/validateAnswers.js +0 -89
  650. package/dist/src/validateAnswers.js.map +0 -1
  651. package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/src/index.js DELETED
@@ -1,12 +0,0 @@
1
- import '../src/css/main.less';
2
- import Attachments from './components/attachments/Attachments';
3
- import Exam from './components/exam/Exam';
4
- import GradingInstructions from './components/grading-instructions/GradingInstructions';
5
- import Results from './components/results/Results';
6
- import parseExam from './parser/parseExam';
7
- export { Attachments, Exam, GradingInstructions, Results, parseExam };
8
- export * from './types/ExamAnswer';
9
- export * from './types/ExamServerAPI';
10
- export * from './types/GradingStructure';
11
- export * from './types/Score';
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,WAAW,MAAM,sCAAsC,CAAA;AAC9D,OAAO,IAAI,MAAM,wBAAwB,CAAA;AACzC,OAAO,mBAAmB,MAAM,uDAAuD,CAAA;AACvF,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AAErE,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA"}
@@ -1,2 +0,0 @@
1
- export default function parseExam(examXml: string, deterministicRendering?: boolean): XMLDocument;
2
- //# sourceMappingURL=parseExam.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseExam.d.ts","sourceRoot":"","sources":["../../../src/parser/parseExam.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,sBAAsB,UAAQ,GAAG,WAAW,CAkB9F"}
@@ -1,54 +0,0 @@
1
- import * as _ from 'lodash-es';
2
- import { findChildElement, getAttribute, queryAll } from '../dom-utils';
3
- export default function parseExam(examXml, deterministicRendering = false) {
4
- const doc = new DOMParser().parseFromString(examXml, 'application/xml');
5
- if (!deterministicRendering) {
6
- queryAll(doc.documentElement, ['choice-answer', 'dropdown-answer'])
7
- .filter(e => getAttribute(e, 'ordering') !== 'fixed')
8
- .forEach(randomizeOptions);
9
- }
10
- // The reference parts (e.g. author, title and so on) are displayed as inline
11
- // elements. We also want to add separators between them. To avoid
12
- // whitespace between an reference part and the separator, (e.g. `<span> foo
13
- // </span>separator<span> bar </span>` is rendered as `foo separator bar` on
14
- // the screen) trim the excess whitespace from the reference parts here.
15
- queryAll(doc.documentElement, 'reference').forEach(reference => {
16
- queryAll(reference, () => true, false).forEach(trimWhitespace);
17
- });
18
- return doc;
19
- }
20
- function randomizeOptions(elem) {
21
- for (let i = elem.children.length; i > 0; i--) {
22
- const j = Math.floor(Math.random() * i);
23
- elem.appendChild(elem.children[j]);
24
- }
25
- // A no-answer option should always be the last
26
- const noAnswerOption = findChildElement(elem, option => getAttribute(option, 'type') === 'no-answer');
27
- if (noAnswerOption)
28
- elem.appendChild(noAnswerOption);
29
- }
30
- function trimWhitespace(element) {
31
- const nonWhitespaceNode = (node) => /\S/.test(node.textContent);
32
- const getTextNodes = () => {
33
- const result = [];
34
- const treeWalker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT);
35
- while (treeWalker.nextNode()) {
36
- result.push(treeWalker.currentNode);
37
- }
38
- return result;
39
- };
40
- const textNodes = getTextNodes();
41
- const firstNonWhitespaceTextNode = _.findIndex(textNodes, nonWhitespaceNode);
42
- const lastNonWhitespaceTextNode = _.findLastIndex(textNodes, nonWhitespaceNode);
43
- // Remove leading whitespace from the start
44
- if (firstNonWhitespaceTextNode !== -1) {
45
- textNodes.slice(0, firstNonWhitespaceTextNode).forEach(node => node.remove());
46
- textNodes[firstNonWhitespaceTextNode].textContent = _.trimStart(textNodes[firstNonWhitespaceTextNode].textContent);
47
- }
48
- // ...and trailing whitespace from the end.
49
- if (lastNonWhitespaceTextNode !== -1) {
50
- textNodes.slice(lastNonWhitespaceTextNode + 1).forEach(node => node.remove());
51
- textNodes[lastNonWhitespaceTextNode].textContent = _.trimEnd(textNodes[lastNonWhitespaceTextNode].textContent);
52
- }
53
- }
54
- //# sourceMappingURL=parseExam.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseExam.js","sourceRoot":"","sources":["../../../src/parser/parseExam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAe,EAAE,sBAAsB,GAAG,KAAK;IAC/E,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA;IACvE,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC5B,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;aACh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- childNodes: ExamElement[];
4
- }
5
- export interface RootElement extends BaseElement {
6
- name: 'exam';
7
- attributes: {
8
- maxAnswers?: number;
9
- };
10
- }
11
- export interface SectionElement extends BaseElement {
12
- name: 'section';
13
- attributes: {
14
- displayNumber: string;
15
- maxAnswers?: number;
16
- minAnswers?: number;
17
- };
18
- }
19
- export interface QuestionElement extends BaseElement {
20
- name: 'question';
21
- attributes: {
22
- displayNumber: string;
23
- maxAnswers?: number;
24
- };
25
- }
26
- export interface TextAnswerElement extends BaseElement {
27
- name: 'text-answer';
28
- attributes: {
29
- displayNumber: string;
30
- questionId: number;
31
- maxLength?: number;
32
- };
33
- }
34
- export interface ScoredTextAnswerElement extends BaseElement {
35
- name: 'scored-text-answer';
36
- attributes: {
37
- displayNumber: string;
38
- questionId: number;
39
- };
40
- }
41
- export interface ChoiceAnswerElement extends BaseElement {
42
- name: 'choice-answer';
43
- attributes: {
44
- displayNumber: string;
45
- questionId: number;
46
- };
47
- }
48
- export interface DropdownAnswerElement extends BaseElement {
49
- name: 'dropdown-answer';
50
- attributes: {
51
- displayNumber: string;
52
- questionId: number;
53
- };
54
- }
55
- export type ExamElement = RootElement | SectionElement | QuestionElement | AnswerElement;
56
- export type AnswerElement = TextAnswerElement | ScoredTextAnswerElement | ChoiceAnswerElement | DropdownAnswerElement;
57
- export declare function parseExamStructure(doc: XMLDocument): RootElement;
58
- //# sourceMappingURL=parseExamStructure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseExamStructure.d.ts","sourceRoot":"","sources":["../../../src/parser/parseExamStructure.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,WAAW,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE;QACV,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAA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kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAIhE"}
@@ -1,40 +0,0 @@
1
- import { getAttribute, getNumericAttribute, queryAll } from '../dom-utils';
2
- export function parseExamStructure(doc) {
3
- const root = doc.documentElement;
4
- const sections = queryAll(root, 'section', false).map(parseSection);
5
- return parseElement(root, sections, { maxAnswers: getNumericAttribute(root, 'max-answers') });
6
- }
7
- function parseSection(section) {
8
- const questions = queryAll(section, 'question', false).map(parseQuestion);
9
- return parseElement(section, questions, {
10
- displayNumber: getAttribute(section, 'display-number'),
11
- minAnswers: getNumericAttribute(section, 'min-answers'),
12
- maxAnswers: getNumericAttribute(section, 'max-answers')
13
- });
14
- }
15
- function parseQuestion(question) {
16
- const childQuestions = queryAll(question, 'question', false);
17
- const childElements = childQuestions.length
18
- ? childQuestions.map(parseQuestion)
19
- : queryAll(question, ['text-answer', 'scored-text-answer', 'choice-answer', 'dropdown-answer'], false).map(parseAnswer);
20
- return parseElement(question, childElements, {
21
- displayNumber: getAttribute(question, 'display-number'),
22
- maxAnswers: getNumericAttribute(question, 'max-answers')
23
- });
24
- }
25
- function parseAnswer(answer) {
26
- const attributes = {
27
- displayNumber: getAttribute(answer, 'display-number'),
28
- questionId: getNumericAttribute(answer, 'question-id'),
29
- maxLength: getNumericAttribute(answer, 'max-length')
30
- };
31
- return parseElement(answer, [], attributes);
32
- }
33
- function parseElement(element, childNodes, attributes) {
34
- return {
35
- name: element.localName,
36
- attributes,
37
- childNodes
38
- };
39
- }
40
- //# sourceMappingURL=parseExamStructure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseExamStructure.js","sourceRoot":"","sources":["../../../src/parser/parseExamStructure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAoE1E,MAAM,UAAU,kBAAkB,CAAC,GAAgB;IACjD,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAA;IAChC,MA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AAU,GAAG;QACjB,aAAa,EAAE,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAE;QACtD,UAAU,EAAE,mBAAmB,CAAC,MAAM,EAAE,aAAa,CAAE;QACvD,SAAS,EAAE,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC;KACrD,CAAA;IACD,OAAO,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;AAC7C,CAAC;AAED,SAAS,YAAY,CACnB,OAAgB,EAChB,UAAyB,EACzB,UAA2B;IAE3B,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,SAAS;QACvB,UAAU;QACV,UAAU;KACN,CAAA;AACR,CAAC"}
@@ -1,7 +0,0 @@
1
- import { Annotation, ImageAnnotation, LineAnnotation, RectAnnotation } from './types/Score';
2
- export declare function renderAnnotations(element: HTMLElement, pregradingAnnotations: Annotation[], censoringAnnotations: Annotation[], showTitle?: boolean): void;
3
- export declare function updateImageAnnotationMarkSize(mark: HTMLElement, annotation: LineAnnotation | RectAnnotation): void;
4
- export declare function wrapAllImages(answerElement: HTMLElement): void;
5
- export declare function renderImageAnnotation(answerElement: HTMLElement, annotation: ImageAnnotation, type: 'pregrading' | 'censoring', listIndex: number, index: number | undefined, showTitle: boolean): HTMLElement;
6
- export declare function renderImageAnnotationByImage(image: HTMLImageElement, title: string, annotation: ImageAnnotation, type: 'pregrading' | 'censoring', listIndex: number, index?: number): HTMLElement;
7
- //# sourceMappingURL=renderAnnotations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderAnnotations.d.ts","sourceRoot":"","sources":["../../src/renderAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAkB,MAAM,eAAe,CAAA;AAM3G,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,qBAAqB,EAAE,UAAU,EAAE,EACnC,oBAAoB,EAAE,UAAU,EAAE,EAClC,SAAS,UAAO,GACf,IAAI,CAiBN;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI,CAclH;AAgBD,wBAAgB,aAAa,CAAC,aAAa,EAAE,WAAW,QAEvD;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,WAAW,EAC1B,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,YAAY,GAAG,WAAW,EAChC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,EAAE,OAAO,GACjB,WAAW,CAKb;AACD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,YAAY,GAAG,WAAW,EAChC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,GACb,WAAW,CA6Bb"}
@@ -1,193 +0,0 @@
1
- import { createElement } from './dom-utils';
2
- import classNames from 'classnames';
3
- const messageLengthThreshold = 5;
4
- export function renderAnnotations(element, pregradingAnnotations, censoringAnnotations, showTitle = true) {
5
- const annotations = [...pregradingAnnotations, ...censoringAnnotations];
6
- const annotationsWithMessages = annotations.filter(a => a.message);
7
- for (const [i, annotation] of annotations.entries()) {
8
- const type = pregradingAnnotations.includes(annotation) ? 'pregrading' : 'censoring';
9
- const index = annotationsWithMessages.indexOf(annotation) + 1 || undefined;
10
- const listIndex = type === 'pregrading' ? i : i - pregradingAnnotations.length;
11
- switch (annotation.type) {
12
- case 'line':
13
- case 'rect':
14
- renderImageAnnotation(element, annotation, type, listIndex, index, showTitle);
15
- break;
16
- default:
17
- renderTextAnnotation(element, annotation, type, listIndex, index, showTitle);
18
- }
19
- }
20
- }
21
- export function updateImageAnnotationMarkSize(mark, annotation) {
22
- const style = mark.style;
23
- const pct = (n) => `${n * 100}%`;
24
- if (annotation.type === 'rect') {
25
- style.left = pct(annotation.x);
26
- style.top = pct(annotation.y);
27
- style.right = pct(1 - (annotation.x + annotation.width));
28
- style.bottom = pct(1 - (annotation.y + annotation.height));
29
- }
30
- else {
31
- style.left = pct(annotation.x1);
32
- style.top = pct(annotation.y1);
33
- style.right = pct(1 - annotation.x2);
34
- style.bottom = pct(1 - annotation.y2);
35
- }
36
- }
37
- function getWrapper(image) {
38
- const parent = image.parentElement;
39
- if (parent instanceof HTMLSpanElement) {
40
- return parent;
41
- }
42
- const wrapper = createElement('span', { className: 'e-annotation-wrapper' });
43
- parent.insertBefore(wrapper, image);
44
- wrapper.appendChild(image);
45
- return wrapper;
46
- }
47
- export function wrapAllImages(answerElement) {
48
- answerElement.querySelectorAll('img').forEach(getWrapper);
49
- }
50
- export function renderImageAnnotation(answerElement, annotation, type, listIndex, index, showTitle) {
51
- const { attachmentIndex } = annotation;
52
- const image = answerElement.querySelectorAll('img')[attachmentIndex];
53
- const title = showTitle ? annotation.message : '';
54
- return renderImageAnnotationByImage(image, title, annotation, type, listIndex, index);
55
- }
56
- export function renderImageAnnotationByImage(image, title, annotation, type, listIndex, index) {
57
- const wrapper = getWrapper(image);
58
- const shape = mkShape();
59
- wrapper.appendChild(shape);
60
- function mkShape() {
61
- const mark = createElement('mark', {
62
- ...{
63
- className: classNames('e-annotation e-annotation--shape', {
64
- 'e-annotation--pregrading': type === 'pregrading',
65
- 'e-annotation--censoring': type === 'censoring'
66
- }),
67
- title,
68
- 'data-list-index': String(listIndex),
69
- 'data-type': type
70
- },
71
- ...(index && { 'data-index': String(index) }),
72
- ...(annotation.message && { 'data-message': annotation.message })
73
- });
74
- updateImageAnnotationMarkSize(mark, annotation);
75
- if (index) {
76
- mark.appendChild(createSup(index, 'shape', annotation.message));
77
- }
78
- return mark;
79
- }
80
- return shape;
81
- }
82
- function renderTextAnnotation(rootElement, annotation, type, listIndex, index, showTitle) {
83
- const { startIndex, length: annotationLength } = annotation;
84
- return go(rootElement.childNodes[0], 0, annotationLength);
85
- function go(
86
- /* The current node in the answer HTML. */
87
- node,
88
- /** The current index corresponding to the node. */
89
- currentIndex,
90
- /* The remaining number of characters from the annotation to render. */
91
- remaining) {
92
- var _a;
93
- if (!isMark(node) && !isSup(node) && !isBr(node) && currentIndex >= startIndex) {
94
- // We found the correct spot to start an annotation. So let's create a mark element.
95
- const mark = mkMark();
96
- // Insert it before the node.
97
- (_a = node.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(mark, node);
98
- // Move the node and its next siblings inside the mark until the mark
99
- // contains the required amount of content or we run out of sibling nodes.
100
- // If the node is a Text node and it is too long for the annotation, we
101
- // split it in two and move the first part inside the mark, leaving the
102
- // rest in place.
103
- const stillRemaining = move(mark, node, remaining);
104
- // If we have run out of sibling nodes but still have characters to mark,
105
- // create another mark at the next text node. This means that marks have
106
- // been nested.
107
- if (stillRemaining > 0) {
108
- go(nextSibling(mark), currentIndex + annotationLength - stillRemaining, stillRemaining);
109
- }
110
- // We know that we're at the last mark of this annotation.
111
- // Render the superscript index after it, if necessary.
112
- else if (index) {
113
- mark.appendChild(createSup(index, 'text', annotation.message));
114
- }
115
- }
116
- else {
117
- if (node instanceof Text && currentIndex + length(node) > startIndex) {
118
- // The annotation should start in the middle of this text node. We need to split it in two.
119
- node.splitText(startIndex - currentIndex);
120
- }
121
- go(next(node), currentIndex + length(node), remaining);
122
- }
123
- }
124
- function isBr(node) {
125
- return node.nodeName === 'BR';
126
- }
127
- function isMark(node) {
128
- return node.nodeName === 'MARK';
129
- }
130
- function isSup(node) {
131
- return node.nodeName === 'SUP';
132
- }
133
- function isImage(node) {
134
- // If we've already added an image annotation to the image, it will be wrapped
135
- // in a <span> element.
136
- return node.nodeName === 'IMG' || node.nodeName === 'SPAN';
137
- }
138
- function next(node) {
139
- return isMark(node) ? node.childNodes[0] : nextSibling(node);
140
- }
141
- function nextSibling(node) {
142
- const sibling = node.nextSibling;
143
- if (sibling) {
144
- return sibling;
145
- }
146
- const parent = node.parentElement;
147
- // If we encounter the root element, we've run out of text to annotate. This
148
- // could be a bug in the annotation code or perhaps the annotations are invalid.
149
- // To err on the side of caution, throw an exception in this case.
150
- if (parent === null || parent === rootElement) {
151
- throw new Error('Bug: the answer seems to be too short for the current set of annotations.');
152
- }
153
- return nextSibling(parent);
154
- }
155
- function length(node) {
156
- return node instanceof Text ? node.length : isImage(node) ? 1 : 0;
157
- }
158
- function mkMark() {
159
- return createElement('mark', {
160
- ...{
161
- className: classNames('e-annotation', {
162
- 'e-annotation--pregrading': type === 'pregrading',
163
- 'e-annotation--censoring': type === 'censoring'
164
- }),
165
- title: showTitle ? annotation.message : '',
166
- 'data-list-index': String(listIndex),
167
- 'data-type': type
168
- },
169
- ...(index && { 'data-index': String(index) }),
170
- ...(annotation.message && { 'data-message': annotation.message })
171
- });
172
- }
173
- function move(mark, node, remaining) {
174
- if (!node || isMark(node) || remaining === 0) {
175
- return remaining;
176
- }
177
- // Split text nodes if they are too long.
178
- if (node instanceof Text && length(node) > 0 && length(node) > remaining) {
179
- node.splitText(remaining);
180
- }
181
- const nextSibling = node.nextSibling;
182
- mark.appendChild(node);
183
- return move(mark, nextSibling, remaining - length(node));
184
- }
185
- }
186
- function createSup(index, type, message) {
187
- return createElement('sup', {
188
- className: `e-annotation__index e-annotation__index--${type}`,
189
- 'data-content': message.length > messageLengthThreshold ? `${index})` : message,
190
- 'data-message': message
191
- });
192
- }
193
- //# sourceMappingURL=renderAnnotations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderAnnotations.js","sourceRoot":"","sources":["../../src/renderAnnotations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,MAAM,sBAAsB,GAAG,CAAC,CAAA;AAEhC,MAAM,UAAU,iBAAiB,CAC/B,OAAoB,EACpB,qBAAmC,EACnC,oBAAkC,EAClC,SAAS,GAAG,IAAI;IAEhB,MAAM,WAAW,GAAG,CAAC,GAAG,qBAAqB,EA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AO,SAAS,CAAA;QAClB,CAAC;QAED,yCAAyC;QACzC,IAAI,IAAI,YAAY,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,EAAE,CAAC;YACzE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QAC3B,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACtB,OAAO,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,IAAsB,EAAE,OAAe;IACvE,OAAO,aAAa,CAAC,KAAK,EAAE;QAC1B,SAAS,EAAE,4CAA4C,IAAI,EAAE;QAC7D,cAAc,EAAE,OAAO,CAAC,MAAM,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO;QAC/E,cAAc,EAAE,OAAO;KACxB,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function scrollToHash(): () => void;
2
- //# sourceMappingURL=scrollToHash.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scrollToHash.d.ts","sourceRoot":"","sources":["../../src/scrollToHash.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,IAAI,MAAM,IAAI,CAYzC"}
@@ -1,24 +0,0 @@
1
- export function scrollToHash() {
2
- const maybeId = decodeURIComponent(window.location.hash).slice(1);
3
- if (maybeId) {
4
- const maybeElement = document.getElementById(maybeId);
5
- if (maybeElement) {
6
- focusElement(maybeElement);
7
- }
8
- }
9
- window.addEventListener('hashchange', scrollToHash);
10
- return () => window.removeEventListener('hashchange', scrollToHash);
11
- }
12
- function focusElement(element) {
13
- // Make the element temporarily focusable for screen readers.
14
- element.setAttribute('tabindex', '-1');
15
- // We don't want to show an outline for our sighted users.
16
- element.style.outline = 'none';
17
- element.addEventListener('blur', () => {
18
- element.removeAttribute('tabindex');
19
- element.style.outline = '';
20
- }, { once: true });
21
- element.focus();
22
- element.scrollIntoView();
23
- }
24
- //# sourceMappingURL=scrollToHash.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scrollToHash.js","sourceRoot":"","sources":["../../src/scrollToHash.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY;IAC1B,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAEjE,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QACrD,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,CAAC,YAAY,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;IACnD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,YAAY,CAAC,OAAoB;IACxC,6DAA6D;IAC7D,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IACtC,0DAA0D;IAC1D,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA;IAE9B,OAAO,CAAC,gBAAgB,CACtB,MAAM,EACN,GAAG,EAAE;QACH,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;QACnC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAA;IAC5B,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAA;IAED,OAAO,CAAC,KAAK,EAAE,CAAA;IACf,OAAO,CAAC,cAAc,EAAE,CAAA;AAC1B,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function shortDisplayNumber(displayName: string): string;
2
- //# sourceMappingURL=shortDisplayNumber.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shortDisplayNumber.d.ts","sourceRoot":"","sources":["../../src/shortDisplayNumber.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -1,5 +0,0 @@
1
- import * as _ from 'lodash-es';
2
- export function shortDisplayNumber(displayName) {
3
- return `${_.last(displayName.split('.'))}.`;
4
- }
5
- //# sourceMappingURL=shortDisplayNumber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shortDisplayNumber.js","sourceRoot":"","sources":["../../src/shortDisplayNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAE9B,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACpD,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAE,GAAG,CAAA;AAC9C,CAAC"}
@@ -1,33 +0,0 @@
1
- import { ExamAnswer, QuestionId } from '../..';
2
- export declare const saveAnswer: (answer: ExamAnswer) => {
3
- type: "SAVE_ANSWER";
4
- payload: ExamAnswer;
5
- };
6
- export declare const saveAnswerSucceeded: (answer: ExamAnswer) => {
7
- type: "SAVE_ANSWER_SUCCEEDED";
8
- payload: ExamAnswer;
9
- };
10
- export declare const saveAnswerFailed: (answer: ExamAnswer, error: unknown) => {
11
- type: "SAVE_ANSWER_FAILED";
12
- payload: {
13
- answer: ExamAnswer;
14
- error: unknown;
15
- };
16
- error: boolean;
17
- };
18
- export declare const selectAnswerVersion: (questionId: QuestionId, questionText: string) => {
19
- type: "SELECT_ANSWER_VERSION";
20
- payload: {
21
- questionId: number;
22
- questionText: string;
23
- };
24
- };
25
- export declare const answerFocused: (questionId: QuestionId) => {
26
- type: "ANSWER_FOCUSED";
27
- payload: number;
28
- };
29
- export declare const answerBlurred: (questionId: QuestionId) => {
30
- type: "ANSWER_BLURRED";
31
- payload: number;
32
- };
33
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/store/answers/actions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAE9C,eAAO,MAAM,UAAU,WAAY,UAAU;;;CAAkC,CAAA;AAE/E,eAAO,MAAM,mBAAmB,WAAY,UAAU;;;CAA4C,CAAA;AAElG,eAAO,MAAM,gBAAgB,WAAY,UAAU,SAAS,OAAO;;;;;;;CACD,CAAA;AAElE,eAAO,MAAM,mBAAmB,eAAgB,UAAU,gBAAgB,MAAM;;;;;;CACjB,CAAA;AAE/D,eAAO,MAAM,aAAa,eAAgB,UAAU;;;CAAyC,CAAA;AAE7F,eAAO,MAAM,aAAa,eAAgB,UAAU;;;CAAyC,CAAA"}
@@ -1,9 +0,0 @@
1
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2
- import { action } from 'typesafe-actions';
3
- export const saveAnswer = (answer) => action('SAVE_ANSWER', answer);
4
- export const saveAnswerSucceeded = (answer) => action('SAVE_ANSWER_SUCCEEDED', answer);
5
- export const saveAnswerFailed = (answer, error) => action('SAVE_ANSWER_FAILED', { answer, error }, undefined, true);
6
- export const selectAnswerVersion = (questionId, questionText) => action('SELECT_ANSWER_VERSION', { questionId, questionText });
7
- export const answerFocused = (questionId) => action('ANSWER_FOCUSED', questionId);
8
- export const answerBlurred = (questionId) => action('ANSWER_BLURRED', questionId);
9
- //# sourceMappingURL=actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../src/store/answers/actions.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAGzC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAkB,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;AAE/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAkB,EAAE,EAAE,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAA;AAElG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAkB,EAAE,KAAc,EAAE,EAAE,CACrE,MAAM,CAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AAElE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAsB,EAAE,YAAoB,EAAE,EAAE,CAClF,MAAM,CAAC,uBAAuB,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAA;AAE/D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAsB,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAE7F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAsB,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA"}
@@ -1,39 +0,0 @@
1
- import { ActionType } from 'typesafe-actions';
2
- import * as actions from './actions';
3
- import { ExamAnswer, QuestionId } from '../..';
4
- import { ValidationError } from '../../validateAnswers';
5
- import { RootElement } from '../../parser/parseExamStructure';
6
- type AnswersAction = ActionType<typeof actions>;
7
- export interface AnswersState {
8
- answersById: Record<QuestionId, ExamAnswer>;
9
- /** The (text) answer that is focused right now. Used for e.g. highlighting the correct hint in scored text answers. */
10
- focusedQuestionId: QuestionId | null;
11
- /**
12
- * The set of answers that (to the best of our knowledge) have been
13
- * successfully saved to the server. That is, the questions that we
14
- * show the "Tallennettu" indicator for.
15
- */
16
- savedQuestionIds: Set<QuestionId>;
17
- /**
18
- * The set of questions that have been saved to the server at some point. Or
19
- * in short, the set of questions that we show the answer history link for.
20
- */
21
- serverQuestionIds: Set<QuestionId>;
22
- /**
23
- * Whether or not the Exam API has implemented the optional answer history
24
- * feature. For now, only the real ktp has implemented it. it.
25
- */
26
- supportsAnswerHistory: boolean;
27
- /**
28
- * The simplified structure of the exam (only sections, questions and answers)
29
- * that we use for validation purposes.
30
- */
31
- examStructure: RootElement;
32
- /**
33
- * An array of warning messages about answers that the user has input.
34
- */
35
- validationErrors: ValidationError[];
36
- }
37
- export default function answersReducer(state: AnswersState | undefined, action: AnswersAction): AnswersState;
38
- export {};
39
- //# sourceMappingURL=reducer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/store/answers/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAmB,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE7D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAE/C,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IAC3C,uHAAuH;IACvH,iBAAiB,EAAE,UAAU,GAAG,IAAI,CAAA;IACpC;;;;OAIG;IACH,gBAAgB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAA;IACjC;;;OAGG;IACH,iBAAiB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC;;;OAGG;IACH,qBAAqB,EAAE,OAAO,CAAA;IAC9B;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAA;IAC1B;;OAEG;IACH,gBAAgB,EAAE,eAAe,EAAE,CAAA;CACpC;AAgBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,YAAY,YAAe,EAAE,MAAM,EAAE,aAAa,GAAG,YAAY,CA6B9G"}
@@ -1,55 +0,0 @@
1
- import { validateAnswers } from '../../validateAnswers';
2
- const initialState = {
3
- answersById: {},
4
- examStructure: {
5
- name: 'exam',
6
- attributes: {},
7
- childNodes: []
8
- },
9
- focusedQuestionId: null,
10
- supportsAnswerHistory: false,
11
- serverQuestionIds: new Set(),
12
- savedQuestionIds: new Set(),
13
- validationErrors: []
14
- };
15
- export default function answersReducer(state = initialState, action) {
16
- switch (action.type) {
17
- case 'SAVE_ANSWER': {
18
- const { questionId } = action.payload;
19
- const synchronizedQuestionIds = setDelete(state.savedQuestionIds, questionId);
20
- const answersById = { ...state.answersById, [questionId]: action.payload };
21
- return { ...state, savedQuestionIds: synchronizedQuestionIds, answersById };
22
- }
23
- case 'SAVE_ANSWER_FAILED': {
24
- return state;
25
- }
26
- case 'SAVE_ANSWER_SUCCEEDED': {
27
- const { questionId } = action.payload;
28
- const savedQuestionIds = setAdd(state.savedQuestionIds, questionId);
29
- const serverQuestionIds = setAdd(state.serverQuestionIds, questionId);
30
- const validationErrors = validateAnswers(state.examStructure, state.answersById);
31
- return { ...state, serverQuestionIds, savedQuestionIds, validationErrors };
32
- }
33
- case 'ANSWER_FOCUSED': {
34
- const questionId = action.payload;
35
- return { ...state, focusedQuestionId: questionId };
36
- }
37
- case 'ANSWER_BLURRED': {
38
- const questionId = action.payload;
39
- return { ...state, focusedQuestionId: state.focusedQuestionId === questionId ? null : state.focusedQuestionId };
40
- }
41
- default:
42
- return state;
43
- }
44
- }
45
- function setAdd(set, value) {
46
- const copy = new Set(set);
47
- copy.add(value);
48
- return copy;
49
- }
50
- function setDelete(set, value) {
51
- const copy = new Set(set);
52
- copy.delete(value);
53
- return copy;
54
- }
55
- //# sourceMappingURL=reducer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducer.js","sourceRoot":"","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