@digabi/exam-engine-core 16.2.3 → 16.4.1-alpha.1

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 (341) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/components/AttachmentContext.d.ts +14 -0
  3. package/dist/components/AttachmentContext.d.ts.map +1 -0
  4. package/dist/components/AttachmentContext.js +12 -0
  5. package/dist/components/AttachmentContext.js.map +1 -0
  6. package/dist/components/AttachmentLink.d.ts +5 -0
  7. package/dist/components/AttachmentLink.d.ts.map +1 -0
  8. package/dist/components/AttachmentLink.js +28 -0
  9. package/dist/components/AttachmentLink.js.map +1 -0
  10. package/dist/components/AttachmentLinkAnchor.d.ts +7 -0
  11. package/dist/components/AttachmentLinkAnchor.d.ts.map +1 -0
  12. package/dist/components/AttachmentLinkAnchor.js +4 -0
  13. package/dist/components/AttachmentLinkAnchor.js.map +1 -0
  14. package/dist/components/AttachmentLinks.d.ts +5 -0
  15. package/dist/components/AttachmentLinks.d.ts.map +1 -0
  16. package/dist/components/AttachmentLinks.js +62 -0
  17. package/dist/components/AttachmentLinks.js.map +1 -0
  18. package/dist/components/Attachments.d.ts +6 -0
  19. package/dist/components/Attachments.d.ts.map +1 -0
  20. package/dist/components/Attachments.js +55 -0
  21. package/dist/components/Attachments.js.map +1 -0
  22. package/dist/components/AttachmentsAttachment.d.ts +5 -0
  23. package/dist/components/AttachmentsAttachment.d.ts.map +1 -0
  24. package/dist/components/AttachmentsAttachment.js +8 -0
  25. package/dist/components/AttachmentsAttachment.js.map +1 -0
  26. package/dist/components/AttachmentsAttachmentTitle.d.ts +6 -0
  27. package/dist/components/AttachmentsAttachmentTitle.d.ts.map +1 -0
  28. package/dist/components/AttachmentsAttachmentTitle.js +12 -0
  29. package/dist/components/AttachmentsAttachmentTitle.js.map +1 -0
  30. package/dist/components/AttachmentsExternalMaterial.d.ts +9 -0
  31. package/dist/components/AttachmentsExternalMaterial.d.ts.map +1 -0
  32. package/dist/components/AttachmentsExternalMaterial.js +40 -0
  33. package/dist/components/AttachmentsExternalMaterial.js.map +1 -0
  34. package/dist/components/AttachmentsQuestion.d.ts +5 -0
  35. package/dist/components/AttachmentsQuestion.d.ts.map +1 -0
  36. package/dist/components/AttachmentsQuestion.js +17 -0
  37. package/dist/components/AttachmentsQuestion.js.map +1 -0
  38. package/dist/components/AttachmentsQuestionTitle.d.ts +6 -0
  39. package/dist/components/AttachmentsQuestionTitle.d.ts.map +1 -0
  40. package/dist/components/AttachmentsQuestionTitle.js +13 -0
  41. package/dist/components/AttachmentsQuestionTitle.js.map +1 -0
  42. package/dist/components/Audio.d.ts +6 -0
  43. package/dist/components/Audio.d.ts.map +1 -0
  44. package/dist/components/Audio.js +31 -0
  45. package/dist/components/Audio.js.map +1 -0
  46. package/dist/components/AudioGroup.d.ts +6 -0
  47. package/dist/components/AudioGroup.d.ts.map +1 -0
  48. package/dist/components/AudioGroup.js +9 -0
  49. package/dist/components/AudioGroup.js.map +1 -0
  50. package/dist/components/AudioPlaybackError.d.ts +7 -0
  51. package/dist/components/AudioPlaybackError.d.ts.map +1 -0
  52. package/dist/components/AudioPlaybackError.js +13 -0
  53. package/dist/components/AudioPlaybackError.js.map +1 -0
  54. package/dist/components/AudioTest.d.ts +6 -0
  55. package/dist/components/AudioTest.d.ts.map +1 -0
  56. package/dist/components/AudioTest.js +29 -0
  57. package/dist/components/AudioTest.js.map +1 -0
  58. package/dist/components/ChoiceAnswer.d.ts +12 -0
  59. package/dist/components/ChoiceAnswer.d.ts.map +1 -0
  60. package/dist/components/ChoiceAnswer.js +62 -0
  61. package/dist/components/ChoiceAnswer.js.map +1 -0
  62. package/dist/components/CommonExamContext.d.ts +19 -0
  63. package/dist/components/CommonExamContext.d.ts.map +1 -0
  64. package/dist/components/CommonExamContext.js +25 -0
  65. package/dist/components/CommonExamContext.js.map +1 -0
  66. package/dist/components/DropdownAnswer.d.ts +12 -0
  67. package/dist/components/DropdownAnswer.d.ts.map +1 -0
  68. package/dist/components/DropdownAnswer.js +100 -0
  69. package/dist/components/DropdownAnswer.js.map +1 -0
  70. package/dist/components/ErrorIndicator.d.ts +4 -0
  71. package/dist/components/ErrorIndicator.d.ts.map +1 -0
  72. package/dist/components/ErrorIndicator.js +43 -0
  73. package/dist/components/ErrorIndicator.js.map +1 -0
  74. package/dist/components/Exam.d.ts +32 -0
  75. package/dist/components/Exam.d.ts.map +1 -0
  76. package/dist/components/Exam.js +103 -0
  77. package/dist/components/Exam.js.map +1 -0
  78. package/dist/components/ExamAttachment.d.ts +5 -0
  79. package/dist/components/ExamAttachment.d.ts.map +1 -0
  80. package/dist/components/ExamAttachment.js +8 -0
  81. package/dist/components/ExamAttachment.js.map +1 -0
  82. package/dist/components/ExamContext.d.ts +10 -0
  83. package/dist/components/ExamContext.d.ts.map +1 -0
  84. package/dist/components/ExamContext.js +11 -0
  85. package/dist/components/ExamContext.js.map +1 -0
  86. package/dist/components/ExamFooter.d.ts +6 -0
  87. package/dist/components/ExamFooter.d.ts.map +1 -0
  88. package/dist/components/ExamFooter.js +7 -0
  89. package/dist/components/ExamFooter.js.map +1 -0
  90. package/dist/components/ExamInstruction.d.ts +6 -0
  91. package/dist/components/ExamInstruction.d.ts.map +1 -0
  92. package/dist/components/ExamInstruction.js +6 -0
  93. package/dist/components/ExamInstruction.js.map +1 -0
  94. package/dist/components/ExamQuestion.d.ts +5 -0
  95. package/dist/components/ExamQuestion.d.ts.map +1 -0
  96. package/dist/components/ExamQuestion.js +16 -0
  97. package/dist/components/ExamQuestion.js.map +1 -0
  98. package/dist/components/ExamQuestionInstruction.d.ts +6 -0
  99. package/dist/components/ExamQuestionInstruction.d.ts.map +1 -0
  100. package/dist/components/ExamQuestionInstruction.js +6 -0
  101. package/dist/components/ExamQuestionInstruction.js.map +1 -0
  102. package/dist/components/ExamQuestionTitle.d.ts +5 -0
  103. package/dist/components/ExamQuestionTitle.d.ts.map +1 -0
  104. package/dist/components/ExamQuestionTitle.js +24 -0
  105. package/dist/components/ExamQuestionTitle.js.map +1 -0
  106. package/dist/components/ExamSection.d.ts +5 -0
  107. package/dist/components/ExamSection.d.ts.map +1 -0
  108. package/dist/components/ExamSection.js +31 -0
  109. package/dist/components/ExamSection.js.map +1 -0
  110. package/dist/components/ExamSectionTitle.d.ts +6 -0
  111. package/dist/components/ExamSectionTitle.d.ts.map +1 -0
  112. package/dist/components/ExamSectionTitle.js +22 -0
  113. package/dist/components/ExamSectionTitle.js.map +1 -0
  114. package/dist/components/ExternalMaterialList.d.ts +10 -0
  115. package/dist/components/ExternalMaterialList.d.ts.map +1 -0
  116. package/dist/components/ExternalMaterialList.js +33 -0
  117. package/dist/components/ExternalMaterialList.js.map +1 -0
  118. package/dist/components/File.d.ts +6 -0
  119. package/dist/components/File.d.ts.map +1 -0
  120. package/dist/components/File.js +15 -0
  121. package/dist/components/File.js.map +1 -0
  122. package/dist/components/Formula.d.ts +6 -0
  123. package/dist/components/Formula.d.ts.map +1 -0
  124. package/dist/components/Formula.js +13 -0
  125. package/dist/components/Formula.js.map +1 -0
  126. package/dist/components/Hints.d.ts +5 -0
  127. package/dist/components/Hints.d.ts.map +1 -0
  128. package/dist/components/Hints.js +30 -0
  129. package/dist/components/Hints.js.map +1 -0
  130. package/dist/components/Image.d.ts +6 -0
  131. package/dist/components/Image.d.ts.map +1 -0
  132. package/dist/components/Image.js +28 -0
  133. package/dist/components/Image.js.map +1 -0
  134. package/dist/components/ImageOverlay.d.ts +6 -0
  135. package/dist/components/ImageOverlay.d.ts.map +1 -0
  136. package/dist/components/ImageOverlay.js +44 -0
  137. package/dist/components/ImageOverlay.js.map +1 -0
  138. package/dist/components/ProgressBar.d.ts +7 -0
  139. package/dist/components/ProgressBar.d.ts.map +1 -0
  140. package/dist/components/ProgressBar.js +19 -0
  141. package/dist/components/ProgressBar.js.map +1 -0
  142. package/dist/components/QuestionContext.d.ts +14 -0
  143. package/dist/components/QuestionContext.d.ts.map +1 -0
  144. package/dist/components/QuestionContext.js +20 -0
  145. package/dist/components/QuestionContext.js.map +1 -0
  146. package/dist/components/Reference.d.ts +6 -0
  147. package/dist/components/Reference.d.ts.map +1 -0
  148. package/dist/components/Reference.js +71 -0
  149. package/dist/components/Reference.js.map +1 -0
  150. package/dist/components/References.d.ts +6 -0
  151. package/dist/components/References.d.ts.map +1 -0
  152. package/dist/components/References.js +25 -0
  153. package/dist/components/References.js.map +1 -0
  154. package/dist/components/ResponsiveMediaContainer.d.ts +18 -0
  155. package/dist/components/ResponsiveMediaContainer.d.ts.map +1 -0
  156. package/dist/components/ResponsiveMediaContainer.js +21 -0
  157. package/dist/components/ResponsiveMediaContainer.js.map +1 -0
  158. package/dist/components/RestrictedAudioPlayer.d.ts +12 -0
  159. package/dist/components/RestrictedAudioPlayer.d.ts.map +1 -0
  160. package/dist/components/RestrictedAudioPlayer.js +32 -0
  161. package/dist/components/RestrictedAudioPlayer.js.map +1 -0
  162. package/dist/components/RichTextAnswer.d.ts +33 -0
  163. package/dist/components/RichTextAnswer.d.ts.map +1 -0
  164. package/dist/components/RichTextAnswer.js +61 -0
  165. package/dist/components/RichTextAnswer.js.map +1 -0
  166. package/dist/components/SaveIndicator.d.ts +5 -0
  167. package/dist/components/SaveIndicator.d.ts.map +1 -0
  168. package/dist/components/SaveIndicator.js +16 -0
  169. package/dist/components/SaveIndicator.js.map +1 -0
  170. package/dist/components/Score.d.ts +8 -0
  171. package/dist/components/Score.d.ts.map +1 -0
  172. package/dist/components/Score.js +13 -0
  173. package/dist/components/Score.js.map +1 -0
  174. package/dist/components/Section.d.ts +4 -0
  175. package/dist/components/Section.d.ts.map +1 -0
  176. package/dist/components/Section.js +8 -0
  177. package/dist/components/Section.js.map +1 -0
  178. package/dist/components/SectionContext.d.ts +13 -0
  179. package/dist/components/SectionContext.d.ts.map +1 -0
  180. package/dist/components/SectionContext.js +21 -0
  181. package/dist/components/SectionContext.js.map +1 -0
  182. package/dist/components/SectionInstruction.d.ts +6 -0
  183. package/dist/components/SectionInstruction.d.ts.map +1 -0
  184. package/dist/components/SectionInstruction.js +6 -0
  185. package/dist/components/SectionInstruction.js.map +1 -0
  186. package/dist/components/TableOfContents.d.ts +13 -0
  187. package/dist/components/TableOfContents.d.ts.map +1 -0
  188. package/dist/components/TableOfContents.js +66 -0
  189. package/dist/components/TableOfContents.js.map +1 -0
  190. package/dist/components/TextAnswer.d.ts +6 -0
  191. package/dist/components/TextAnswer.d.ts.map +1 -0
  192. package/dist/components/TextAnswer.js +17 -0
  193. package/dist/components/TextAnswer.js.map +1 -0
  194. package/dist/components/TextAnswerInput.d.ts +36 -0
  195. package/dist/components/TextAnswerInput.d.ts.map +1 -0
  196. package/dist/components/TextAnswerInput.js +145 -0
  197. package/dist/components/TextAnswerInput.js.map +1 -0
  198. package/dist/components/Video.d.ts +6 -0
  199. package/dist/components/Video.d.ts.map +1 -0
  200. package/dist/components/Video.js +15 -0
  201. package/dist/components/Video.js.map +1 -0
  202. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  203. package/dist/components/exam/RichTextAnswer.js +7 -9
  204. package/dist/components/exam/RichTextAnswer.js.map +1 -1
  205. package/dist/components/exam/TableOfContents.d.ts +13 -0
  206. package/dist/components/exam/TableOfContents.d.ts.map +1 -0
  207. package/dist/components/exam/TableOfContents.js +66 -0
  208. package/dist/components/exam/TableOfContents.js.map +1 -0
  209. package/dist/components/grading-instruction/AnswerGradingInstruction.d.ts +5 -0
  210. package/dist/components/grading-instruction/AnswerGradingInstruction.d.ts.map +1 -0
  211. package/dist/components/grading-instruction/AnswerGradingInstruction.js +6 -0
  212. package/dist/components/grading-instruction/AnswerGradingInstruction.js.map +1 -0
  213. package/dist/components/grading-instruction/Audio.d.ts +5 -0
  214. package/dist/components/grading-instruction/Audio.d.ts.map +1 -0
  215. package/dist/components/grading-instruction/Audio.js +6 -0
  216. package/dist/components/grading-instruction/Audio.js.map +1 -0
  217. package/dist/components/grading-instruction/AudioTitle.d.ts +5 -0
  218. package/dist/components/grading-instruction/AudioTitle.d.ts.map +1 -0
  219. package/dist/components/grading-instruction/AudioTitle.js +10 -0
  220. package/dist/components/grading-instruction/AudioTitle.js.map +1 -0
  221. package/dist/components/grading-instruction/AutogradedAnswer.d.ts +5 -0
  222. package/dist/components/grading-instruction/AutogradedAnswer.d.ts.map +1 -0
  223. package/dist/components/grading-instruction/AutogradedAnswer.js +31 -0
  224. package/dist/components/grading-instruction/AutogradedAnswer.js.map +1 -0
  225. package/dist/components/grading-instruction/AutogradedAnswerOption.d.ts +5 -0
  226. package/dist/components/grading-instruction/AutogradedAnswerOption.d.ts.map +1 -0
  227. package/dist/components/grading-instruction/AutogradedAnswerOption.js +14 -0
  228. package/dist/components/grading-instruction/AutogradedAnswerOption.js.map +1 -0
  229. package/dist/components/grading-instruction/ExamGradingInstruction.d.ts +5 -0
  230. package/dist/components/grading-instruction/ExamGradingInstruction.d.ts.map +1 -0
  231. package/dist/components/grading-instruction/ExamGradingInstruction.js +6 -0
  232. package/dist/components/grading-instruction/ExamGradingInstruction.js.map +1 -0
  233. package/dist/components/grading-instruction/GradingInstruction.d.ts +5 -0
  234. package/dist/components/grading-instruction/GradingInstruction.d.ts.map +1 -0
  235. package/dist/components/grading-instruction/GradingInstruction.js +85 -0
  236. package/dist/components/grading-instruction/GradingInstruction.js.map +1 -0
  237. package/dist/components/grading-instruction/Question.d.ts +5 -0
  238. package/dist/components/grading-instruction/Question.d.ts.map +1 -0
  239. package/dist/components/grading-instruction/Question.js +12 -0
  240. package/dist/components/grading-instruction/Question.js.map +1 -0
  241. package/dist/components/grading-instruction/QuestionTitle.d.ts +5 -0
  242. package/dist/components/grading-instruction/QuestionTitle.d.ts.map +1 -0
  243. package/dist/components/grading-instruction/QuestionTitle.js +19 -0
  244. package/dist/components/grading-instruction/QuestionTitle.js.map +1 -0
  245. package/dist/components/grading-instruction/Section.d.ts +5 -0
  246. package/dist/components/grading-instruction/Section.d.ts.map +1 -0
  247. package/dist/components/grading-instruction/Section.js +10 -0
  248. package/dist/components/grading-instruction/Section.js.map +1 -0
  249. package/dist/components/grading-instruction/SectionTitle.d.ts +5 -0
  250. package/dist/components/grading-instruction/SectionTitle.d.ts.map +1 -0
  251. package/dist/components/grading-instruction/SectionTitle.js +16 -0
  252. package/dist/components/grading-instruction/SectionTitle.js.map +1 -0
  253. package/dist/components/results/AnnotationList.d.ts +5 -0
  254. package/dist/components/results/AnnotationList.d.ts.map +1 -0
  255. package/dist/components/results/AnnotationList.js +43 -0
  256. package/dist/components/results/AnnotationList.js.map +1 -0
  257. package/dist/components/results/GradingStructure.d.ts +5 -0
  258. package/dist/components/results/GradingStructure.d.ts.map +1 -0
  259. package/dist/components/results/GradingStructure.js +21 -0
  260. package/dist/components/results/GradingStructure.js.map +1 -0
  261. package/dist/components/results/Hvp.d.ts +15 -0
  262. package/dist/components/results/Hvp.d.ts.map +1 -0
  263. package/dist/components/results/Hvp.js +73 -0
  264. package/dist/components/results/Hvp.js.map +1 -0
  265. package/dist/components/results/HvpTextAnswer.d.ts +6 -0
  266. package/dist/components/results/HvpTextAnswer.d.ts.map +1 -0
  267. package/dist/components/results/HvpTextAnswer.js +51 -0
  268. package/dist/components/results/HvpTextAnswer.js.map +1 -0
  269. package/dist/components/results/ResultsChoiceAnswer.d.ts +6 -0
  270. package/dist/components/results/ResultsChoiceAnswer.d.ts.map +1 -0
  271. package/dist/components/results/ResultsChoiceAnswer.js +57 -0
  272. package/dist/components/results/ResultsChoiceAnswer.js.map +1 -0
  273. package/dist/components/results/ResultsContext.d.ts +18 -0
  274. package/dist/components/results/ResultsContext.d.ts.map +1 -0
  275. package/dist/components/results/ResultsContext.js +68 -0
  276. package/dist/components/results/ResultsContext.js.map +1 -0
  277. package/dist/components/results/ResultsDropdownAnswer.d.ts +6 -0
  278. package/dist/components/results/ResultsDropdownAnswer.d.ts.map +1 -0
  279. package/dist/components/results/ResultsDropdownAnswer.js +43 -0
  280. package/dist/components/results/ResultsDropdownAnswer.js.map +1 -0
  281. package/dist/components/results/ResultsExamQuestion.d.ts +5 -0
  282. package/dist/components/results/ResultsExamQuestion.d.ts.map +1 -0
  283. package/dist/components/results/ResultsExamQuestion.js +23 -0
  284. package/dist/components/results/ResultsExamQuestion.js.map +1 -0
  285. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +10 -0
  286. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +1 -0
  287. package/dist/components/results/ResultsExamQuestionAutoScore.js +17 -0
  288. package/dist/components/results/ResultsExamQuestionAutoScore.js.map +1 -0
  289. package/dist/components/results/ResultsExamQuestionManualScore.d.ts +12 -0
  290. package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +1 -0
  291. package/dist/components/results/ResultsExamQuestionManualScore.js +61 -0
  292. package/dist/components/results/ResultsExamQuestionManualScore.js.map +1 -0
  293. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +10 -0
  294. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +1 -0
  295. package/dist/components/results/ResultsExamQuestionScoresContainer.js +12 -0
  296. package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +1 -0
  297. package/dist/components/results/ResultsExamQuestionTitle.d.ts +6 -0
  298. package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +1 -0
  299. package/dist/components/results/ResultsExamQuestionTitle.js +21 -0
  300. package/dist/components/results/ResultsExamQuestionTitle.js.map +1 -0
  301. package/dist/components/results/ResultsExamSection.d.ts +5 -0
  302. package/dist/components/results/ResultsExamSection.d.ts.map +1 -0
  303. package/dist/components/results/ResultsExamSection.js +18 -0
  304. package/dist/components/results/ResultsExamSection.js.map +1 -0
  305. package/dist/components/results/ResultsMultiLineAnswer.d.ts +8 -0
  306. package/dist/components/results/ResultsMultiLineAnswer.d.ts.map +1 -0
  307. package/dist/components/results/ResultsMultiLineAnswer.js +19 -0
  308. package/dist/components/results/ResultsMultiLineAnswer.js.map +1 -0
  309. package/dist/components/results/ResultsScoredTextAnswer.d.ts +6 -0
  310. package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +1 -0
  311. package/dist/components/results/ResultsScoredTextAnswer.js +22 -0
  312. package/dist/components/results/ResultsScoredTextAnswer.js.map +1 -0
  313. package/dist/components/results/ResultsSingleLineAnswer.d.ts +12 -0
  314. package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +1 -0
  315. package/dist/components/results/ResultsSingleLineAnswer.js +23 -0
  316. package/dist/components/results/ResultsSingleLineAnswer.js.map +1 -0
  317. package/dist/components/results/ResultsTextAnswer.d.ts +6 -0
  318. package/dist/components/results/ResultsTextAnswer.d.ts.map +1 -0
  319. package/dist/components/results/ResultsTextAnswer.js +50 -0
  320. package/dist/components/results/ResultsTextAnswer.js.map +1 -0
  321. package/dist/components/results/helpers.d.ts +9 -0
  322. package/dist/components/results/helpers.d.ts.map +1 -0
  323. package/dist/components/results/helpers.js +11 -0
  324. package/dist/components/results/helpers.js.map +1 -0
  325. package/dist/components/withContext.d.ts +3 -0
  326. package/dist/components/withContext.d.ts.map +1 -0
  327. package/dist/components/withContext.js +12 -0
  328. package/dist/components/withContext.js.map +1 -0
  329. package/dist/main-bundle.js +9 -17
  330. package/dist/main.css +1 -1
  331. package/dist/types/GradingStructure.d.ts +1 -0
  332. package/dist/types/GradingStructure.d.ts.map +1 -1
  333. package/package.json +3 -3
  334. package/dist/components/grading-instructions/RecordingTitle.d.ts +0 -5
  335. package/dist/components/grading-instructions/RecordingTitle.d.ts.map +0 -1
  336. package/dist/components/grading-instructions/RecordingTitle.js +0 -11
  337. package/dist/components/grading-instructions/RecordingTitle.js.map +0 -1
  338. package/dist/components/shared/ImageTitle.d.ts +0 -5
  339. package/dist/components/shared/ImageTitle.d.ts.map +0 -1
  340. package/dist/components/shared/ImageTitle.js +0 -7
  341. package/dist/components/shared/ImageTitle.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare const mkAttachmentLink: (type: 'link' | 'plain') => React.FunctionComponent<ExamComponentProps>;
4
+ export default mkAttachmentLink;
5
+ //# sourceMappingURL=AttachmentLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLink.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAO9D,QAAA,MAAM,gBAAgB,SAAU,MAAM,GAAG,OAAO,KAAG,MAAM,iBAAiB,CAAC,kBAAkB,CAyB5F,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import React, { useContext } from 'react';
2
+ import { query } from '../dom-utils';
3
+ import { useExamTranslation } from '../i18n';
4
+ import { url } from '../url';
5
+ import AttachmentLinkAnchor from './AttachmentLinkAnchor';
6
+ import { CommonExamContext } from './CommonExamContext';
7
+ const mkAttachmentLink = (type) => {
8
+ const AttachmentLink = ({ element }) => {
9
+ const name = element.getAttribute('ref');
10
+ const { root } = useContext(CommonExamContext);
11
+ const { attachmentsURL } = useContext(CommonExamContext);
12
+ const { t } = useExamTranslation();
13
+ const attachment = query(root, (el) => el.localName === 'attachment' && el.getAttribute('name') === name);
14
+ const displayNumber = attachment.getAttribute('display-number');
15
+ const isShort = element.getAttribute('type') === 'short';
16
+ const href = url(attachmentsURL, { hash: displayNumber });
17
+ return isShort ? (React.createElement(AttachmentLinkAnchor, Object.assign({}, { href, type }), displayNumber)) : (React.createElement(React.Fragment, null,
18
+ '(',
19
+ React.createElement(AttachmentLinkAnchor, Object.assign({}, { href, type }),
20
+ t('material', { postProcess: 'lowercase' }),
21
+ " ",
22
+ displayNumber),
23
+ ')'));
24
+ };
25
+ return React.memo(AttachmentLink);
26
+ };
27
+ export default mkAttachmentLink;
28
+ //# sourceMappingURL=AttachmentLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLink.js","sourceRoot":"","sources":["../../src/components/AttachmentLink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ACjF,CAAC,CAAC,CAAC,CACF;YACG,GAAG;YACJ,oBAAC,oBAAoB,oBAAK,EAAE,IAAI,EAAE,IAAI,EAAE;gBACrC,CAAC,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;;gBAAG,aAAa,CACvC;YACtB,GAAG,CACH,CACJ,CAAA;IACH,CAAC,CAAA;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const AttachmentLinkAnchor: React.FunctionComponent<{
3
+ href: string;
4
+ type: 'link' | 'plain';
5
+ }>;
6
+ export default AttachmentLinkAnchor;
7
+ //# sourceMappingURL=AttachmentLinkAnchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLinkAnchor.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentLinkAnchor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAWzF,CAAA;AAEH,eAAe,oBAAoB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ const AttachmentLinkAnchor = ({ children, href, type, }) => type === 'link' ? (React.createElement("a", { href: href, className: "attachment-link e-nowrap", target: "attachments" }, children)) : (React.createElement("span", { className: "attachment-link e-nowrap" }, children));
3
+ export default AttachmentLinkAnchor;
4
+ //# sourceMappingURL=AttachmentLinkAnchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLinkAnchor.js","sourceRoot":"","sources":["../../src/components/AttachmentLinkAnchor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,oBAAoB,GAAsE,CAAC,EAC/F,QAAQ,EACR,IAAI,EACJ,IAAI,GACL,EAAE,EAAE,CACH,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAChB,2BAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,0BAA0B,EAAC,MAAM,EAAC,aAAa,IACrE,QAAQ,CACP,CACL,CAAC,CAAC,CAAC,CACF,8BAAM,SAAS,EAAC,0BAA0B,IAAE,QAAQ,CAAQ,CAC7D,CAAA;AAEH,eAAe,oBAAoB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare const mkAttachmentLinks: (type: 'link' | 'plain') => React.FunctionComponent<ExamComponentProps>;
4
+ export default mkAttachmentLinks;
5
+ //# sourceMappingURL=AttachmentLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLinks.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAO9D,QAAA,MAAM,iBAAiB,SAAU,MAAM,GAAG,OAAO,KAAG,MAAM,iBAAiB,CAAC,kBAAkB,CAoC7F,CAAA;AAgCD,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,62 @@
1
+ import React, { useContext } from 'react';
2
+ import { mapChildElements, query } from '../dom-utils';
3
+ import { useExamTranslation } from '../i18n';
4
+ import { url } from '../url';
5
+ import AttachmentLinkAnchor from './AttachmentLinkAnchor';
6
+ import { CommonExamContext } from './CommonExamContext';
7
+ const mkAttachmentLinks = (type) => {
8
+ const AttachmentLinks = ({ element }) => {
9
+ const { root, attachmentsURL } = useContext(CommonExamContext);
10
+ const { t } = useExamTranslation();
11
+ const displayNumbers = mapChildElements(element, (attachmentLink) => {
12
+ const name = attachmentLink.getAttribute('ref');
13
+ const attachment = query(root, (el) => el.localName === 'attachment' && el.getAttribute('name') === name);
14
+ return attachment.getAttribute('display-number');
15
+ });
16
+ const groupedDisplayNumbers = splitWhen(displayNumbers, (displayNumber, i) => {
17
+ return i > 0 && !isSuccessive(displayNumbers[i - 1], displayNumber);
18
+ });
19
+ const isShort = element.getAttribute('type') === 'short';
20
+ const href = url(attachmentsURL, { hash: displayNumbers[0] });
21
+ const displayNumbersString = groupedDisplayNumbers
22
+ .map((group) => {
23
+ return group.length > 1 ? `${group[0]}–${group[group.length - 1]}` : group[0];
24
+ })
25
+ .join(', ');
26
+ const count = groupedDisplayNumbers[0].length;
27
+ return isShort ? (React.createElement(AttachmentLinkAnchor, Object.assign({}, { href, type }), displayNumbersString)) : (React.createElement(React.Fragment, null,
28
+ '(',
29
+ React.createElement(AttachmentLinkAnchor, Object.assign({}, { href, type }),
30
+ t('material', { count, postProcess: 'lowercase' }),
31
+ " ",
32
+ displayNumbersString),
33
+ ')'));
34
+ };
35
+ return React.memo(AttachmentLinks);
36
+ };
37
+ function splitWhen(array, predicate) {
38
+ const result = [[]];
39
+ let prev;
40
+ for (let i = 0; i < array.length; i++) {
41
+ const elem = array[i];
42
+ if (prev && predicate(elem, i, array)) {
43
+ const group = [elem];
44
+ result.push(group);
45
+ }
46
+ else {
47
+ const lastGroup = result[result.length - 1];
48
+ lastGroup.push(elem);
49
+ }
50
+ prev = elem;
51
+ }
52
+ return result;
53
+ }
54
+ function isSuccessive(a, b) {
55
+ const length = a.length;
56
+ if (length !== b.length) {
57
+ return false;
58
+ }
59
+ return a.startsWith(b.slice(0, length - 1)) && b.charCodeAt(length - 1) - a.charCodeAt(length - 1) === 1;
60
+ }
61
+ export default mkAttachmentLinks;
62
+ //# sourceMappingURL=AttachmentLinks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLinks.js","sourceRoot":"","sources":["../../src/components/AttachmentLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,C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,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;YACrC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAA;YACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;SACnB;aAAM;YACL,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YAC3C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACrB;QAED,IAAI,GAAG,IAAI,CAAA;KACZ;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,YAAY,CAAC,CAAS,EAAE,CAAS;IACxC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAA;IAEvB,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;QACvB,OAAO,KAAK,CAAA;KACb;IACD,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAA;AAC1G,CAAC;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ExamProps } from './Exam';
3
+ export declare const AttachmentsPageTitle: React.FunctionComponent;
4
+ declare const _default: React.MemoExoticComponent<React.ComponentType<ExamProps>>;
5
+ export default _default;
6
+ //# sourceMappingURL=Attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attachments.d.ts","sourceRoot":"","sources":["../../src/components/Attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAapD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAsDlC,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,iBAGxC,CAAA;;AAED,wBAA8E"}
@@ -0,0 +1,55 @@
1
+ import React, { useContext, useEffect } from 'react';
2
+ import { I18nextProvider } from 'react-i18next';
3
+ import { createRenderChildNodes } from '../createRenderChildNodes';
4
+ import { findChildElement, NBSP } from '../dom-utils';
5
+ import { changeLanguage, initI18n, useExamTranslation } from '../i18n';
6
+ import { examTitleId } from '../ids';
7
+ import { scrollToHash } from '../scrollToHash';
8
+ import { useCached } from '../useCached';
9
+ import AttachmentsExternalMaterial from './AttachmentsExternalMaterial';
10
+ import AttachmentsQuestion from './AttachmentsQuestion';
11
+ import AttachmentsQuestionTitle from './AttachmentsQuestionTitle';
12
+ import { CommonExamContext, withCommonExamContext } from './CommonExamContext';
13
+ import DocumentTitle from './DocumentTitle';
14
+ import { withExamContext } from './ExamContext';
15
+ import RenderChildNodes from './RenderChildNodes';
16
+ import RenderExamElements from './RenderExamElements';
17
+ import Section from './Section';
18
+ import { withSectionContext } from './SectionContext';
19
+ const renderChildNodes = createRenderChildNodes({
20
+ 'audio-group': RenderExamElements,
21
+ 'external-material': AttachmentsExternalMaterial,
22
+ 'question-title': AttachmentsQuestionTitle,
23
+ question: AttachmentsQuestion,
24
+ section: withSectionContext(RenderChildNodes),
25
+ });
26
+ const Attachments = () => {
27
+ const { root, language, date, dateTimeFormatter, resolveAttachment, subjectLanguage } = useContext(CommonExamContext);
28
+ const examTitle = findChildElement(root, 'exam-title');
29
+ const examStylesheet = root.getAttribute('exam-stylesheet');
30
+ const externalMaterial = findChildElement(root, 'external-material');
31
+ const examCode = root.getAttribute('exam-code');
32
+ const dayCode = root.getAttribute('day-code');
33
+ const i18n = useCached(() => initI18n(language, examCode, dayCode));
34
+ useEffect(changeLanguage(i18n, language));
35
+ useEffect(scrollToHash, []);
36
+ return (React.createElement(I18nextProvider, { i18n: i18n },
37
+ React.createElement("main", { className: "e-exam attachments", lang: subjectLanguage, "aria-labelledby": examTitleId },
38
+ React.createElement(React.StrictMode, null),
39
+ examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
40
+ React.createElement(Section, { "aria-labelledby": examTitleId },
41
+ examTitle && (React.createElement(DocumentTitle, { id: examTitleId },
42
+ React.createElement(AttachmentsPageTitle, null),
43
+ NBSP,
44
+ renderChildNodes(examTitle))),
45
+ React.createElement("div", { className: "e-semibold e-mrg-b-6" }, dateTimeFormatter.format(date)),
46
+ externalMaterial && (React.createElement(AttachmentsExternalMaterial, Object.assign({}, { element: externalMaterial, renderChildNodes, forceRender: true })))),
47
+ renderChildNodes(root))));
48
+ };
49
+ // Wrap to a separate component, since we can't use translation hooks in the root component.
50
+ export const AttachmentsPageTitle = () => {
51
+ const { t } = useExamTranslation();
52
+ return React.createElement(React.Fragment, null, t('attachments-page-title'));
53
+ };
54
+ export default React.memo(withExamContext(withCommonExamContext(Attachments)));
55
+ //# sourceMappingURL=Attachments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attachments.js","sourceRoot":"","sources":["../../src/components/Attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,2BAA2B,MAAM,+BAA+B,CAAA;AACvE,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AACvD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,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C,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAE3B,OAAO,CACL,oBAAC,eAAe,IAAC,IAAI,EAAE,IAAI;QACzB,8BAAM,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAE,eAAe,qBAAmB,WAAW;YACtF,oBAAC,KAAK,CAAC,UAAU,OAAG;YACnB,cAAc,IAAI,8BAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAI;YACrF,oBAAC,OAAO,uBAAkB,WAAW;gBAClC,SAAS,IAAI,CACZ,oBAAC,aAAa,IAAC,EAAE,EAAE,WAAW;oBAC5B,oBAAC,oBAAoB,OAAG;oBACvB,IAAI;oBACJ,gBAAgB,CAAC,SAAS,CAAC,CACd,CACjB;gBACD,6BAAK,SAAS,EAAC,sBAAsB,IAAE,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAO;gBAC3E,gBAAgB,IAAI,CACnB,oBAAC,2BAA2B,oBAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,IAAI,EAAE,EAAI,CACxG,CACO;YACT,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACnB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAA4B,GAAG,EAAE;IAChE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,wBAAwB,CAAC,CAAI,CAAA;AAC3C,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare const _default: React.MemoExoticComponent<React.ComponentType<ExamComponentProps>>;
4
+ export default _default;
5
+ //# sourceMappingURL=AttachmentsAttachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsAttachment.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentsAttachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;;AAY9D,wBAAuE"}
@@ -0,0 +1,8 @@
1
+ import React, { useContext } from 'react';
2
+ import { AttachmentContext, withAttachmentContext } from './AttachmentContext';
3
+ function AttachmentsAttachment({ element, renderChildNodes }) {
4
+ const { displayNumber, isExternal } = useContext(AttachmentContext);
5
+ return isExternal ? (React.createElement("div", { id: displayNumber, className: "attachments-attachment e-mrg-0 e-mrg-t-8" }, renderChildNodes(element))) : null;
6
+ }
7
+ export default React.memo(withAttachmentContext(AttachmentsAttachment));
8
+ //# sourceMappingURL=AttachmentsAttachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsAttachment.js","sourceRoot":"","sources":["../../src/components/AttachmentsAttachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG9E,SAAS,qBAAqB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IAC9E,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAEnE,OAAO,UAAU,CAAC,CAAC,CAAC,CAClB,6BAAK,EAAE,EAAE,aAAc,EAAE,SAAS,EAAC,0CAA0C,IAC1E,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare function AttachmentsAttachmentTitle({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof AttachmentsAttachmentTitle>;
5
+ export default _default;
6
+ //# sourceMappingURL=AttachmentsAttachmentTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsAttachmentTitle.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentsAttachmentTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAUpF;;AAED,wBAAqD"}
@@ -0,0 +1,12 @@
1
+ import React, { useContext } from 'react';
2
+ import { NBSP } from '../dom-utils';
3
+ import { AttachmentContext } from './AttachmentContext';
4
+ function AttachmentsAttachmentTitle({ element, renderChildNodes }) {
5
+ const { displayNumber } = useContext(AttachmentContext);
6
+ return (React.createElement("h3", null,
7
+ displayNumber,
8
+ NBSP,
9
+ renderChildNodes(element)));
10
+ }
11
+ export default React.memo(AttachmentsAttachmentTitle);
12
+ //# sourceMappingURL=AttachmentsAttachmentTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsAttachmentTitle.js","sourceRoot":"","sources":["../../src/components/AttachmentsAttachmentTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,SAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACnF,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAEvD,OAAO,CACL;QACG,aAAa;QACb,IAAI;QACJ,gBAAgB,CAAC,OAAO,CAAC,CACvB,CACN,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ interface AttachmentsExternalMaterialProps extends ExamComponentProps {
4
+ forceRender?: boolean;
5
+ }
6
+ declare function AttachmentsExternalMaterial({ element, forceRender }: AttachmentsExternalMaterialProps): JSX.Element | null;
7
+ declare const _default: React.MemoExoticComponent<typeof AttachmentsExternalMaterial>;
8
+ export default _default;
9
+ //# sourceMappingURL=AttachmentsExternalMaterial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsExternalMaterial.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentsExternalMaterial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA0B,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AA8BtF,UAAU,gCAAiC,SAAQ,kBAAkB;IACnE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,iBAAS,2BAA2B,CAAC,EAAE,OAAO,EAAE,WAAmB,EAAE,EAAE,gCAAgC,sBAetG;;AAED,wBAAsD"}
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { createRenderChildNodes } from '../createRenderChildNodes';
3
+ import { queryAncestors } from '../dom-utils';
4
+ import mkAttachmentLink from './AttachmentLink';
5
+ import mkAttachmentLinks from './AttachmentLinks';
6
+ import AttachmentsAttachment from './AttachmentsAttachment';
7
+ import AttachmentsAttachmentTitle from './AttachmentsAttachmentTitle';
8
+ import Audio from './Audio';
9
+ import ExternalMaterialList from './ExternalMaterialList';
10
+ import File from './File';
11
+ import Formula from './Formula';
12
+ import Image from './Image';
13
+ import Reference from './Reference';
14
+ import surround from './surround';
15
+ import Video from './Video';
16
+ import ImageOverlay from './ImageOverlay';
17
+ const renderChildNodes = createRenderChildNodes({
18
+ 'attachment-link': mkAttachmentLink('link'),
19
+ 'attachment-links': mkAttachmentLinks('link'),
20
+ 'attachment-title': AttachmentsAttachmentTitle,
21
+ attachment: AttachmentsAttachment,
22
+ audio: Audio,
23
+ file: File,
24
+ image: Image,
25
+ video: Video,
26
+ formula: Formula,
27
+ reference: surround(Reference, 'div', { className: 'e-color-darkgrey e-mrg-y-2 e-font-size-s e-light' }),
28
+ 'image-overlay': ImageOverlay,
29
+ });
30
+ function AttachmentsExternalMaterial({ element, forceRender = false }) {
31
+ if (queryAncestors(element, 'question') == null && !forceRender) {
32
+ return null;
33
+ }
34
+ const attachmentCount = element.children.length;
35
+ return (React.createElement(React.Fragment, null,
36
+ attachmentCount > 1 && (React.createElement(ExternalMaterialList, Object.assign({}, { element, renderChildNodes, showTitle: false, forceRender }))),
37
+ renderChildNodes(element)));
38
+ }
39
+ export default React.memo(AttachmentsExternalMaterial);
40
+ //# sourceMappingURL=AttachmentsExternalMaterial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsExternalMaterial.js","sourceRoot":"","sources":["../../src/components/AttachmentsExternalMaterial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAsB,MAAM,2BAA2B,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,gBAAgB,MAAM,kBAAkB,CAAA;AAC/C,OAAO,iBAAiB,MAAM,mBAAmB,CAAA;AACjD,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,0BAA0B,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AACzD,OAAO,IAAI,MAAM,QAAQ,CAAA;AACzB,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,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default: React.MemoExoticComponent<React.ComponentType<ExamComponentProps>>;
4
+ export default _default;
5
+ //# sourceMappingURL=AttachmentsQuestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsQuestion.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentsQuestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAiB,MAAM,2BAA2B,CAAA;;AA4B7E,wBAAmE"}
@@ -0,0 +1,17 @@
1
+ import React, { useContext } from 'react';
2
+ import { RenderOptions } from '../createRenderChildNodes';
3
+ import { findChildElement, parentElements } from '../dom-utils';
4
+ import { QuestionContext, withQuestionContext } from './QuestionContext';
5
+ import Section from './Section';
6
+ import { questionTitleId } from '../ids';
7
+ function AttachmentsQuestion({ element, renderChildNodes }) {
8
+ const { displayNumber, hasExternalMaterial, level } = useContext(QuestionContext);
9
+ return isTopmostQuestionContainingExternalMaterial(element, hasExternalMaterial, level) ? (React.createElement(Section, { id: displayNumber, "aria-labelledby": questionTitleId(displayNumber) }, renderChildNodes(element, RenderOptions.SkipHTML))) : (React.createElement(React.Fragment, null, renderChildNodes(element, RenderOptions.SkipHTML)));
10
+ }
11
+ function isTopmostQuestionContainingExternalMaterial(element, hasExternalMaterial, level) {
12
+ return (hasExternalMaterial &&
13
+ (level === 0 ||
14
+ parentElements(element).every((parent) => parent.localName === 'question' ? !findChildElement(parent, 'external-material') : true)));
15
+ }
16
+ export default React.memo(withQuestionContext(AttachmentsQuestion));
17
+ //# sourceMappingURL=AttachmentsQuestion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsQuestion.js","sourceRoot":"","sources":["../../src/components/AttachmentsQuestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAsB,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAExC,SAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IAC5E,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAEjF,OAAO,2CAA2C,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CACxF,oBAAC,OAAO,IAAC,EAAE,EAAE,aAAa,qBAAmB,eAAe,CAAC,aAAa,CAAC,IACxE,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAC1C,CACX,CAAC,CAAC,CAAC,CACF,0CAAG,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAI,CACzD,CAAA;AACH,CAAC;AAED,SAAS,2CAA2C,CAAC,OAAgB,EAAE,mBAA4B,EAAE,KAAa;IAChH,OAAO,CACL,mBAAmB;QACnB,CAAC,KAAK,KAAK,CAAC;YACV,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CACvC,MAAM,CAAC,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI,CACxF,CAAC,CACL,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare function AttachmentsQuestionTitle({ element, renderChildNodes }: ExamComponentProps): JSX.Element | null;
4
+ declare const _default: React.MemoExoticComponent<typeof AttachmentsQuestionTitle>;
5
+ export default _default;
6
+ //# sourceMappingURL=AttachmentsQuestionTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsQuestionTitle.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentsQuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAI9D,iBAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,sBAQlF;;AAED,wBAAmD"}
@@ -0,0 +1,13 @@
1
+ import React, { useContext } from 'react';
2
+ import { QuestionContext } from './QuestionContext';
3
+ import { questionTitleId } from '../ids';
4
+ import { formatQuestionDisplayNumber } from '../formatting';
5
+ function AttachmentsQuestionTitle({ element, renderChildNodes }) {
6
+ const { displayNumber, hasExternalMaterial } = useContext(QuestionContext);
7
+ return hasExternalMaterial ? (React.createElement("h2", { id: questionTitleId(displayNumber) },
8
+ formatQuestionDisplayNumber(displayNumber),
9
+ " ",
10
+ renderChildNodes(element))) : null;
11
+ }
12
+ export default React.memo(AttachmentsQuestionTitle);
13
+ //# sourceMappingURL=AttachmentsQuestionTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentsQuestionTitle.js","sourceRoot":"","sources":["../../src/components/AttachmentsQuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAE3D,SAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACjF,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAE1E,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B,4BAAI,EAAE,EAAE,eAAe,CAAC,aAAa,CAAC;QACnC,2BAA2B,CAAC,aAAa,CAAC;;QAAG,gBAAgB,CAAC,OAAO,CAAC,CACpE,CACN,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare function Audio({ element, className, renderChildNodes }: ExamComponentProps): JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof Audio>;
5
+ export default _default;
6
+ //# sourceMappingURL=Audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Audio.d.ts","sourceRoot":"","sources":["../../src/components/Audio.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAS9D,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAgC1E;;AAED,wBAAgC"}
@@ -0,0 +1,31 @@
1
+ import classNames from 'classnames';
2
+ import React, { useContext } from 'react';
3
+ import { useSelector } from 'react-redux';
4
+ import { getNumericAttribute } from '../dom-utils';
5
+ import { useExamTranslation } from '../i18n';
6
+ import { audioLabelId } from '../ids';
7
+ import { getAudioPlaybackError, getPlaybackTimesRemaining } from '../store/selectors';
8
+ import AudioPlaybackError from './AudioPlaybackError';
9
+ import { CommonExamContext } from './CommonExamContext';
10
+ import RestrictedAudioPlayer from './RestrictedAudioPlayer';
11
+ function Audio({ element, className, renderChildNodes }) {
12
+ const src = element.getAttribute('src');
13
+ const restrictedAudioId = getNumericAttribute(element, 'restricted-audio-id');
14
+ const times = getNumericAttribute(element, 'times');
15
+ const duration = getNumericAttribute(element, 'duration');
16
+ const { t } = useExamTranslation();
17
+ const audioPlaybackError = times != null && restrictedAudioId != null ? useSelector(getAudioPlaybackError(src, restrictedAudioId)) : undefined;
18
+ const playbackTimesRemaining = times != null && restrictedAudioId != null
19
+ ? useSelector(getPlaybackTimesRemaining(restrictedAudioId, times))
20
+ : undefined;
21
+ const { resolveAttachment } = useContext(CommonExamContext);
22
+ const labelId = audioLabelId(element);
23
+ return (React.createElement("div", { className: classNames('audio e-columns e-columns--center-v e-mrg-b-2', className) },
24
+ restrictedAudioId != null && times != null ? (React.createElement(RestrictedAudioPlayer, Object.assign({}, { src, restrictedAudioId, duration, times, labelId }))) : (React.createElement("audio", { className: "e-column e-column--narrow", preload: "metadata", controls: true },
25
+ React.createElement("source", { src: resolveAttachment(src) }))),
26
+ React.createElement("div", { className: "e-column", id: labelId },
27
+ React.createElement(AudioPlaybackError, { error: audioPlaybackError }, element.hasChildNodes() && renderChildNodes(element)),
28
+ playbackTimesRemaining != null && React.createElement("em", null, t('listen-times-remaining', { count: playbackTimesRemaining })))));
29
+ }
30
+ export default React.memo(Audio);
31
+ //# sourceMappingURL=Audio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Audio.js","sourceRoot":"","sources":["../../src/components/Audio.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,kBAAkB,MAAM,s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O,EAAE,EAAI,CACpF,CAAC,CAAC,CAAC,CACF,+BAAO,SAAS,EAAC,2BAA2B,EAAC,OAAO,EAAC,UAAU,EAAC,QAAQ;YACtE,gCAAQ,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,GAAI,CACjC,CACT;QACD,6BAAK,SAAS,EAAC,UAAU,EAAC,EAAE,EAAE,OAAO;YACnC,oBAAC,kBAAkB,IAAC,KAAK,EAAE,kBAAkB,IAC1C,OAAO,CAAC,aAAa,EAAE,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAClC;YACpB,sBAAsB,IAAI,IAAI,IAAI,gCAAK,CAAC,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAM,CACxG,CACF,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare function AudioGroup({ element, className, renderChildNodes }: ExamComponentProps): JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof AudioGroup>;
5
+ export default _default;
6
+ //# sourceMappingURL=AudioGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioGroup.d.ts","sourceRoot":"","sources":["../../src/components/AudioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAS/E;;AAED,wBAAqC"}
@@ -0,0 +1,9 @@
1
+ import classNames from 'classnames';
2
+ import React from 'react';
3
+ function AudioGroup({ element, className, renderChildNodes }) {
4
+ return (React.createElement("div", { className: classNames('e-audio-group', className) },
5
+ React.createElement("div", { className: "e-audio-group--separator e-font-size-xl e-mrg-y-4 e-color-link", role: "separator" }, "\u2732\u2732\u2732"),
6
+ renderChildNodes(element)));
7
+ }
8
+ export default React.memo(AudioGroup);
9
+ //# sourceMappingURL=AudioGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioGroup.js","sourceRoot":"","sources":["../../src/components/AudioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAsB;IAC9E,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC;QACpD,6BAAK,SAAS,EAAC,gEAAgE,EAAC,IAAI,EAAC,WAAW,yBAE1F;QACL,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { AudioPlaybackError } from '..';
3
+ declare const AudioPlaybackError: React.FunctionComponent<{
4
+ error?: AudioPlaybackError;
5
+ }>;
6
+ export default AudioPlaybackError;
7
+ //# sourceMappingURL=AudioPlaybackError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlaybackError.d.ts","sourceRoot":"","sources":["../../src/components/AudioPlaybackError.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAA;AAGvC,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAChD,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAC3B,CAeA,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
2
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import React from 'react';
4
+ import ReactCSSTransitionReplace from 'react-css-transition-replace';
5
+ import { useExamTranslation } from '../i18n';
6
+ const AudioPlaybackError = ({ error, children }) => {
7
+ const { t } = useExamTranslation();
8
+ return (React.createElement(ReactCSSTransitionReplace, { transitionName: "e-crossfade", transitionEnterTimeout: 500, transitionLeaveTimeout: 500 }, error != null ? (React.createElement("div", { className: "e-color-error", role: "alert" },
9
+ React.createElement(FontAwesomeIcon, { icon: faExclamationTriangle, className: "e-mrg-r-1" }),
10
+ t(`audio-errors.${error}`))) : (React.createElement("div", { key: "no-error" }, children))));
11
+ };
12
+ export default AudioPlaybackError;
13
+ //# sourceMappingURL=AudioPlaybackError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlaybackError.js","sourceRoot":"","sources":["../../src/components/AudioPlaybackError.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,yBAAyB,MAAM,8BAA8B,CAAA;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C,MAAM,kBAAkB,GAEnB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3B,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAElC,OAAO,CACL,oBAAC,yBAAyB,IAAC,cAAc,EAAC,aAAa,EAAC,sBAAsB,EAAE,GAAG,EAAE,sBAAsB,EAAE,GAAG,IAC7G,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CACf,6BAAK,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO;QACzC,oBAAC,eAAe,IAAC,IAAI,EAAE,qBAAqB,EAAE,SAAS,EAAC,WAAW,GAAG;QACrE,CAAC,CAAC,gBAAgB,KAAK,EAAW,CAAC,CAChC,CACP,CAAC,CAAC,CAAC,CACF,6BAAK,GAAG,EAAC,UAAU,IAAE,QAAQ,CAAO,CACrC,CACyB,CAC7B,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare function AudioTest({ element }: ExamComponentProps): JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof AudioTest>;
5
+ export default _default;
6
+ //# sourceMappingURL=AudioTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioTest.d.ts","sourceRoot":"","sources":["../../src/components/AudioTest.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAO9D,iBAAS,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eA6BjD;;AAED,wBAAoC"}
@@ -0,0 +1,29 @@
1
+ import { faPlay } from '@fortawesome/free-solid-svg-icons';
2
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import React from 'react';
4
+ import { useDispatch, useSelector } from 'react-redux';
5
+ import { getNumericAttribute, NBSP } from '../dom-utils';
6
+ import { useExamTranslation } from '../i18n';
7
+ import { playAudio } from '../store/audio/actions';
8
+ import { getAudioPlaybackError, getAudioState } from '../store/selectors';
9
+ import AudioPlaybackError from './AudioPlaybackError';
10
+ function AudioTest({ element }) {
11
+ const src = element.getAttribute('src');
12
+ const duration = getNumericAttribute(element, 'duration');
13
+ const { t } = useExamTranslation();
14
+ const audioState = useSelector(getAudioState(src));
15
+ const audioPlaybackError = useSelector(getAudioPlaybackError(src));
16
+ const dispatch = useDispatch();
17
+ return (React.createElement("div", { className: "e-audio-test notification e-pad-2 e-mrg-b-4" },
18
+ React.createElement("p", null, t('audio-test.instructions')),
19
+ React.createElement("div", { className: "e-columns e-columns--center-v e-mrg-b-2" },
20
+ React.createElement("div", { className: "e-column e-column--narrow" },
21
+ React.createElement("button", { className: "e-button", disabled: audioState !== 'stopped', onClick: () => audioState === 'stopped' && dispatch(playAudio({ src, duration })) },
22
+ React.createElement(FontAwesomeIcon, { className: "e-mrg-r-1", icon: faPlay, fixedWidth: true }),
23
+ t('audio-test.play'))),
24
+ React.createElement("div", { className: "e-column" },
25
+ React.createElement(AudioPlaybackError, { error: audioPlaybackError }, NBSP))),
26
+ React.createElement("div", null, t('audio-test.volume'))));
27
+ }
28
+ export default React.memo(AudioTest);
29
+ //# sourceMappingURL=AudioTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioTest.js","sourceRoot":"","sources":["../../src/components/AudioTest.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,kBAAkB,MAAM,sBAAsB,CAAA;AAErD,SAAS,SAAS,CAAC,EAAE,OAAO,EAAsB;IAChD,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACxC,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAE,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;IAClD,MAAM,kBAAkB,GAAG,WAAW,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IAClE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,OAAO,CACL,6BAAK,SAAS,EAAC,6CAA6C;QAC1D,+BAAI,CAAC,CAAC,yBAAyB,CAAC,CAAK;QACrC,6BAAK,SAAS,EAAC,yCAAyC;YACtD,6BAAK,SAAS,EAAC,2BAA2B;gBACxC,gCACE,SAAS,EAAC,UAAU,EACpB,QAAQ,EAAE,UAAU,KAAK,SAAS,EAClC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,KAAK,SAAS,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;oBAEjF,oBAAC,eAAe,IAAC,SAAS,EAAC,WAAW,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,SAAG;oBACjE,CAAC,CAAC,iBAAiB,CAAC,CACd,CACL;YACN,6BAAK,SAAS,EAAC,UAAU;gBACvB,oBAAC,kBAAkB,IAAC,KAAK,EAAE,kBAAkB,IAAG,IAAI,CAAsB,CACtE,CACF;QACN,iCAAM,CAAC,CAAC,mBAAmB,CAAC,CAAO,CAC/B,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import * as actions from '../store/answers/actions';
3
+ import { ExamComponentProps } from '../createRenderChildNodes';
4
+ import { ChoiceAnswer as ChoiceAnswerT } from '../types/ExamAnswer';
5
+ interface ChoiceAnswerProps extends ExamComponentProps {
6
+ answer?: ChoiceAnswerT;
7
+ saveAnswer: typeof actions.saveAnswer;
8
+ }
9
+ declare function ChoiceAnswer({ answer, saveAnswer, element, renderChildNodes }: ChoiceAnswerProps): JSX.Element;
10
+ declare const _default: import("react-redux").ConnectedComponent<typeof ChoiceAnswer, import("react-redux").Omit<ChoiceAnswerProps, "answer" | "saveAnswer"> & ExamComponentProps>;
11
+ export default _default;
12
+ //# sourceMappingURL=ChoiceAnswer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChoiceAnswer.d.ts","sourceRoot":"","sources":["../../src/components/ChoiceAnswer.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,YAAY,IAAI,aAAa,EAAc,MAAM,qBAAqB,CAAA;AAmE/E,UAAU,iBAAkB,SAAQ,kBAAkB;IACpD,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,UAAU,EAAE,OAAO,OAAO,CAAC,UAAU,CAAA;CACtC;AAED,iBAAS,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,iBAAiB,eA+CzF;;AAQD,wBAEgB"}