@digabi/exam-engine-core 19.15.4-y.0 → 19.15.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. package/dist/__tests__/results/ResultsContext.test.js +1 -1
  2. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  3. package/dist/components/exam/Hints.d.ts.map +1 -1
  4. package/dist/components/exam/Hints.js +3 -2
  5. package/dist/components/exam/Hints.js.map +1 -1
  6. package/dist/components/exam/TextAnswer.d.ts.map +1 -1
  7. package/dist/components/exam/TextAnswer.js +4 -3
  8. package/dist/components/exam/TextAnswer.js.map +1 -1
  9. package/dist/components/results/SingleLineAnswer.d.ts +1 -1
  10. package/dist/components/results/SingleLineAnswer.d.ts.map +1 -1
  11. package/dist/components/results/SingleLineAnswer.js +3 -3
  12. package/dist/components/results/SingleLineAnswer.js.map +1 -1
  13. package/dist/dom-utils.d.ts +1 -0
  14. package/dist/dom-utils.d.ts.map +1 -1
  15. package/dist/dom-utils.js +5 -0
  16. package/dist/dom-utils.js.map +1 -1
  17. package/dist/main-bundle.js +1 -1
  18. package/dist/main.css +1 -1
  19. package/package.json +3 -3
  20. package/dist/components/AttachmentContext.d.ts +0 -14
  21. package/dist/components/AttachmentContext.d.ts.map +0 -1
  22. package/dist/components/AttachmentContext.js +0 -12
  23. package/dist/components/AttachmentContext.js.map +0 -1
  24. package/dist/components/AttachmentLink.d.ts +0 -6
  25. package/dist/components/AttachmentLink.d.ts.map +0 -1
  26. package/dist/components/AttachmentLink.js +0 -24
  27. package/dist/components/AttachmentLink.js.map +0 -1
  28. package/dist/components/AttachmentLinkAnchor.d.ts +0 -7
  29. package/dist/components/AttachmentLinkAnchor.d.ts.map +0 -1
  30. package/dist/components/AttachmentLinkAnchor.js +0 -4
  31. package/dist/components/AttachmentLinkAnchor.js.map +0 -1
  32. package/dist/components/AttachmentLinks.d.ts +0 -6
  33. package/dist/components/AttachmentLinks.d.ts.map +0 -1
  34. package/dist/components/AttachmentLinks.js +0 -58
  35. package/dist/components/AttachmentLinks.js.map +0 -1
  36. package/dist/components/Attachments.d.ts +0 -5
  37. package/dist/components/Attachments.d.ts.map +0 -1
  38. package/dist/components/Attachments.js +0 -43
  39. package/dist/components/Attachments.js.map +0 -1
  40. package/dist/components/AttachmentsAttachment.d.ts +0 -5
  41. package/dist/components/AttachmentsAttachment.d.ts.map +0 -1
  42. package/dist/components/AttachmentsAttachment.js +0 -8
  43. package/dist/components/AttachmentsAttachment.js.map +0 -1
  44. package/dist/components/AttachmentsAttachmentTitle.d.ts +0 -6
  45. package/dist/components/AttachmentsAttachmentTitle.d.ts.map +0 -1
  46. package/dist/components/AttachmentsAttachmentTitle.js +0 -12
  47. package/dist/components/AttachmentsAttachmentTitle.js.map +0 -1
  48. package/dist/components/AttachmentsExternalMaterial.d.ts +0 -9
  49. package/dist/components/AttachmentsExternalMaterial.d.ts.map +0 -1
  50. package/dist/components/AttachmentsExternalMaterial.js +0 -40
  51. package/dist/components/AttachmentsExternalMaterial.js.map +0 -1
  52. package/dist/components/AttachmentsQuestion.d.ts +0 -5
  53. package/dist/components/AttachmentsQuestion.d.ts.map +0 -1
  54. package/dist/components/AttachmentsQuestion.js +0 -16
  55. package/dist/components/AttachmentsQuestion.js.map +0 -1
  56. package/dist/components/AttachmentsQuestionTitle.d.ts +0 -6
  57. package/dist/components/AttachmentsQuestionTitle.d.ts.map +0 -1
  58. package/dist/components/AttachmentsQuestionTitle.js +0 -13
  59. package/dist/components/AttachmentsQuestionTitle.js.map +0 -1
  60. package/dist/components/Audio.d.ts +0 -6
  61. package/dist/components/Audio.d.ts.map +0 -1
  62. package/dist/components/Audio.js +0 -29
  63. package/dist/components/Audio.js.map +0 -1
  64. package/dist/components/AudioGroup.d.ts +0 -6
  65. package/dist/components/AudioGroup.d.ts.map +0 -1
  66. package/dist/components/AudioGroup.js +0 -9
  67. package/dist/components/AudioGroup.js.map +0 -1
  68. package/dist/components/AudioPlaybackError.d.ts +0 -7
  69. package/dist/components/AudioPlaybackError.d.ts.map +0 -1
  70. package/dist/components/AudioPlaybackError.js +0 -12
  71. package/dist/components/AudioPlaybackError.js.map +0 -1
  72. package/dist/components/AudioTest.d.ts +0 -6
  73. package/dist/components/AudioTest.d.ts.map +0 -1
  74. package/dist/components/AudioTest.js +0 -29
  75. package/dist/components/AudioTest.js.map +0 -1
  76. package/dist/components/ChoiceAnswer.d.ts +0 -12
  77. package/dist/components/ChoiceAnswer.d.ts.map +0 -1
  78. package/dist/components/ChoiceAnswer.js +0 -60
  79. package/dist/components/ChoiceAnswer.js.map +0 -1
  80. package/dist/components/CommonExamContext.d.ts +0 -16
  81. package/dist/components/CommonExamContext.d.ts.map +0 -1
  82. package/dist/components/CommonExamContext.js +0 -22
  83. package/dist/components/CommonExamContext.js.map +0 -1
  84. package/dist/components/DropdownAnswer.d.ts +0 -12
  85. package/dist/components/DropdownAnswer.d.ts.map +0 -1
  86. package/dist/components/DropdownAnswer.js +0 -85
  87. package/dist/components/DropdownAnswer.js.map +0 -1
  88. package/dist/components/Exam.d.ts +0 -40
  89. package/dist/components/Exam.d.ts.map +0 -1
  90. package/dist/components/Exam.js +0 -106
  91. package/dist/components/Exam.js.map +0 -1
  92. package/dist/components/ExamAttachment.d.ts +0 -5
  93. package/dist/components/ExamAttachment.d.ts.map +0 -1
  94. package/dist/components/ExamAttachment.js +0 -8
  95. package/dist/components/ExamAttachment.js.map +0 -1
  96. package/dist/components/ExamContext.d.ts +0 -10
  97. package/dist/components/ExamContext.d.ts.map +0 -1
  98. package/dist/components/ExamContext.js +0 -11
  99. package/dist/components/ExamContext.js.map +0 -1
  100. package/dist/components/ExamFooter.d.ts +0 -6
  101. package/dist/components/ExamFooter.d.ts.map +0 -1
  102. package/dist/components/ExamFooter.js +0 -7
  103. package/dist/components/ExamFooter.js.map +0 -1
  104. package/dist/components/ExamInstruction.d.ts +0 -6
  105. package/dist/components/ExamInstruction.d.ts.map +0 -1
  106. package/dist/components/ExamInstruction.js +0 -6
  107. package/dist/components/ExamInstruction.js.map +0 -1
  108. package/dist/components/ExamQuestion.d.ts +0 -5
  109. package/dist/components/ExamQuestion.d.ts.map +0 -1
  110. package/dist/components/ExamQuestion.js +0 -16
  111. package/dist/components/ExamQuestion.js.map +0 -1
  112. package/dist/components/ExamQuestionInstruction.d.ts +0 -6
  113. package/dist/components/ExamQuestionInstruction.d.ts.map +0 -1
  114. package/dist/components/ExamQuestionInstruction.js +0 -6
  115. package/dist/components/ExamQuestionInstruction.js.map +0 -1
  116. package/dist/components/ExamQuestionTitle.d.ts +0 -6
  117. package/dist/components/ExamQuestionTitle.d.ts.map +0 -1
  118. package/dist/components/ExamQuestionTitle.js +0 -25
  119. package/dist/components/ExamQuestionTitle.js.map +0 -1
  120. package/dist/components/ExamSection.d.ts +0 -5
  121. package/dist/components/ExamSection.d.ts.map +0 -1
  122. package/dist/components/ExamSection.js +0 -30
  123. package/dist/components/ExamSection.js.map +0 -1
  124. package/dist/components/ExamSectionTitle.d.ts +0 -6
  125. package/dist/components/ExamSectionTitle.d.ts.map +0 -1
  126. package/dist/components/ExamSectionTitle.js +0 -21
  127. package/dist/components/ExamSectionTitle.js.map +0 -1
  128. package/dist/components/ExternalMaterialList.d.ts +0 -10
  129. package/dist/components/ExternalMaterialList.d.ts.map +0 -1
  130. package/dist/components/ExternalMaterialList.js +0 -31
  131. package/dist/components/ExternalMaterialList.js.map +0 -1
  132. package/dist/components/File.d.ts +0 -6
  133. package/dist/components/File.d.ts.map +0 -1
  134. package/dist/components/File.js +0 -15
  135. package/dist/components/File.js.map +0 -1
  136. package/dist/components/Formula.d.ts +0 -6
  137. package/dist/components/Formula.d.ts.map +0 -1
  138. package/dist/components/Formula.js +0 -12
  139. package/dist/components/Formula.js.map +0 -1
  140. package/dist/components/Hints.d.ts +0 -6
  141. package/dist/components/Hints.d.ts.map +0 -1
  142. package/dist/components/Hints.js +0 -32
  143. package/dist/components/Hints.js.map +0 -1
  144. package/dist/components/Image.d.ts +0 -6
  145. package/dist/components/Image.d.ts.map +0 -1
  146. package/dist/components/Image.js +0 -25
  147. package/dist/components/Image.js.map +0 -1
  148. package/dist/components/ImageOverlay.d.ts +0 -6
  149. package/dist/components/ImageOverlay.d.ts.map +0 -1
  150. package/dist/components/ImageOverlay.js +0 -45
  151. package/dist/components/ImageOverlay.js.map +0 -1
  152. package/dist/components/ProgressBar.d.ts +0 -6
  153. package/dist/components/ProgressBar.d.ts.map +0 -1
  154. package/dist/components/ProgressBar.js +0 -18
  155. package/dist/components/ProgressBar.js.map +0 -1
  156. package/dist/components/QuestionContext.d.ts +0 -14
  157. package/dist/components/QuestionContext.d.ts.map +0 -1
  158. package/dist/components/QuestionContext.js +0 -20
  159. package/dist/components/QuestionContext.js.map +0 -1
  160. package/dist/components/Reference.d.ts +0 -6
  161. package/dist/components/Reference.d.ts.map +0 -1
  162. package/dist/components/Reference.js +0 -63
  163. package/dist/components/Reference.js.map +0 -1
  164. package/dist/components/References.d.ts +0 -6
  165. package/dist/components/References.d.ts.map +0 -1
  166. package/dist/components/References.js +0 -23
  167. package/dist/components/References.js.map +0 -1
  168. package/dist/components/ResponsiveMediaContainer.d.ts +0 -17
  169. package/dist/components/ResponsiveMediaContainer.d.ts.map +0 -1
  170. package/dist/components/ResponsiveMediaContainer.js +0 -20
  171. package/dist/components/ResponsiveMediaContainer.js.map +0 -1
  172. package/dist/components/RestrictedAudioPlayer.d.ts +0 -11
  173. package/dist/components/RestrictedAudioPlayer.d.ts.map +0 -1
  174. package/dist/components/RestrictedAudioPlayer.js +0 -29
  175. package/dist/components/RestrictedAudioPlayer.js.map +0 -1
  176. package/dist/components/RichTextAnswer.d.ts +0 -31
  177. package/dist/components/RichTextAnswer.d.ts.map +0 -1
  178. package/dist/components/RichTextAnswer.js +0 -70
  179. package/dist/components/RichTextAnswer.js.map +0 -1
  180. package/dist/components/SaveIndicator.d.ts +0 -5
  181. package/dist/components/SaveIndicator.d.ts.map +0 -1
  182. package/dist/components/SaveIndicator.js +0 -15
  183. package/dist/components/SaveIndicator.js.map +0 -1
  184. package/dist/components/Score.d.ts +0 -6
  185. package/dist/components/Score.d.ts.map +0 -1
  186. package/dist/components/Score.js +0 -13
  187. package/dist/components/Score.js.map +0 -1
  188. package/dist/components/Section.d.ts +0 -3
  189. package/dist/components/Section.d.ts.map +0 -1
  190. package/dist/components/Section.js +0 -7
  191. package/dist/components/Section.js.map +0 -1
  192. package/dist/components/SectionContext.d.ts +0 -13
  193. package/dist/components/SectionContext.d.ts.map +0 -1
  194. package/dist/components/SectionContext.js +0 -21
  195. package/dist/components/SectionContext.js.map +0 -1
  196. package/dist/components/SectionInstruction.d.ts +0 -6
  197. package/dist/components/SectionInstruction.d.ts.map +0 -1
  198. package/dist/components/SectionInstruction.js +0 -6
  199. package/dist/components/SectionInstruction.js.map +0 -1
  200. package/dist/components/TableOfContents.d.ts +0 -13
  201. package/dist/components/TableOfContents.d.ts.map +0 -1
  202. package/dist/components/TableOfContents.js +0 -66
  203. package/dist/components/TableOfContents.js.map +0 -1
  204. package/dist/components/TextAnswer.d.ts +0 -6
  205. package/dist/components/TextAnswer.d.ts.map +0 -1
  206. package/dist/components/TextAnswer.js +0 -16
  207. package/dist/components/TextAnswer.js.map +0 -1
  208. package/dist/components/TextAnswerInput.d.ts +0 -37
  209. package/dist/components/TextAnswerInput.d.ts.map +0 -1
  210. package/dist/components/TextAnswerInput.js +0 -145
  211. package/dist/components/TextAnswerInput.js.map +0 -1
  212. package/dist/components/Video.d.ts +0 -6
  213. package/dist/components/Video.d.ts.map +0 -1
  214. package/dist/components/Video.js +0 -15
  215. package/dist/components/Video.js.map +0 -1
  216. package/dist/components/results/AnnotationList.d.ts +0 -5
  217. package/dist/components/results/AnnotationList.d.ts.map +0 -1
  218. package/dist/components/results/AnnotationList.js +0 -40
  219. package/dist/components/results/AnnotationList.js.map +0 -1
  220. package/dist/components/results/ResultsChoiceAnswer.d.ts +0 -6
  221. package/dist/components/results/ResultsChoiceAnswer.d.ts.map +0 -1
  222. package/dist/components/results/ResultsChoiceAnswer.js +0 -60
  223. package/dist/components/results/ResultsChoiceAnswer.js.map +0 -1
  224. package/dist/components/results/ResultsContext.d.ts +0 -20
  225. package/dist/components/results/ResultsContext.d.ts.map +0 -1
  226. package/dist/components/results/ResultsContext.js +0 -68
  227. package/dist/components/results/ResultsContext.js.map +0 -1
  228. package/dist/components/results/ResultsDropdownAnswer.d.ts +0 -6
  229. package/dist/components/results/ResultsDropdownAnswer.d.ts.map +0 -1
  230. package/dist/components/results/ResultsDropdownAnswer.js +0 -41
  231. package/dist/components/results/ResultsDropdownAnswer.js.map +0 -1
  232. package/dist/components/results/ResultsExamQuestion.d.ts +0 -5
  233. package/dist/components/results/ResultsExamQuestion.d.ts.map +0 -1
  234. package/dist/components/results/ResultsExamQuestion.js +0 -23
  235. package/dist/components/results/ResultsExamQuestion.js.map +0 -1
  236. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +0 -10
  237. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +0 -1
  238. package/dist/components/results/ResultsExamQuestionAutoScore.js +0 -16
  239. package/dist/components/results/ResultsExamQuestionAutoScore.js.map +0 -1
  240. package/dist/components/results/ResultsExamQuestionManualScore.d.ts +0 -11
  241. package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +0 -1
  242. package/dist/components/results/ResultsExamQuestionManualScore.js +0 -62
  243. package/dist/components/results/ResultsExamQuestionManualScore.js.map +0 -1
  244. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +0 -9
  245. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +0 -1
  246. package/dist/components/results/ResultsExamQuestionScoresContainer.js +0 -8
  247. package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +0 -1
  248. package/dist/components/results/ResultsExamQuestionTitle.d.ts +0 -6
  249. package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +0 -1
  250. package/dist/components/results/ResultsExamQuestionTitle.js +0 -22
  251. package/dist/components/results/ResultsExamQuestionTitle.js.map +0 -1
  252. package/dist/components/results/ResultsExamSection.d.ts +0 -5
  253. package/dist/components/results/ResultsExamSection.d.ts.map +0 -1
  254. package/dist/components/results/ResultsExamSection.js +0 -17
  255. package/dist/components/results/ResultsExamSection.js.map +0 -1
  256. package/dist/components/results/ResultsScoredTextAnswer.d.ts +0 -6
  257. package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +0 -1
  258. package/dist/components/results/ResultsScoredTextAnswer.js +0 -22
  259. package/dist/components/results/ResultsScoredTextAnswer.js.map +0 -1
  260. package/dist/components/results/ResultsSingleLineAnswer.d.ts +0 -12
  261. package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +0 -1
  262. package/dist/components/results/ResultsSingleLineAnswer.js +0 -12
  263. package/dist/components/results/ResultsSingleLineAnswer.js.map +0 -1
  264. package/dist/components/results/ResultsTextAnswer.d.ts +0 -6
  265. package/dist/components/results/ResultsTextAnswer.d.ts.map +0 -1
  266. package/dist/components/results/ResultsTextAnswer.js +0 -51
  267. package/dist/components/results/ResultsTextAnswer.js.map +0 -1
  268. package/dist/components/results/helpers.d.ts +0 -9
  269. package/dist/components/results/helpers.d.ts.map +0 -1
  270. package/dist/components/results/helpers.js +0 -10
  271. package/dist/components/results/helpers.js.map +0 -1
  272. package/dist/components/types.d.ts +0 -110
  273. package/dist/components/types.d.ts.map +0 -1
  274. package/dist/components/types.js +0 -1
  275. package/dist/components/types.js.map +0 -1
  276. package/dist/components/withContext.d.ts +0 -3
  277. package/dist/components/withContext.d.ts.map +0 -1
  278. package/dist/components/withContext.js +0 -12
  279. package/dist/components/withContext.js.map +0 -1
@@ -1,43 +0,0 @@
1
- import React, { useContext, useEffect } from 'react';
2
- import { I18nextProvider, Translation } from 'react-i18next';
3
- import { createRenderChildNodes } from '../createRenderChildNodes';
4
- import { findChildElement } from '../dom-utils';
5
- import { initI18n } from '../i18n';
6
- import { scrollToHash } from '../scrollToHash';
7
- import AttachmentsExternalMaterial from './AttachmentsExternalMaterial';
8
- import AttachmentsQuestion from './AttachmentsQuestion';
9
- import AttachmentsQuestionTitle from './AttachmentsQuestionTitle';
10
- import { CommonExamContext, withCommonExamContext } from './CommonExamContext';
11
- import DocumentTitle from './DocumentTitle';
12
- import { withExamContext } from './ExamContext';
13
- import RenderChildNodes from './RenderChildNodes';
14
- import Section from './Section';
15
- import { withSectionContext } from './SectionContext';
16
- const renderChildNodes = createRenderChildNodes({
17
- 'external-material': AttachmentsExternalMaterial,
18
- 'question-title': AttachmentsQuestionTitle,
19
- question: AttachmentsQuestion,
20
- section: withSectionContext(RenderChildNodes),
21
- });
22
- function Attachments(_props) {
23
- const { root, language, date, dateTimeFormatter, resolveAttachment } = useContext(CommonExamContext);
24
- const examTitle = findChildElement(root, 'exam-title');
25
- const examStylesheet = root.getAttribute('exam-stylesheet');
26
- const externalMaterial = findChildElement(root, 'external-material');
27
- const i18n = initI18n(language, root.getAttribute('exam-code'), root.getAttribute('day-code'));
28
- useEffect(scrollToHash, []);
29
- return (React.createElement(I18nextProvider, { i18n: i18n },
30
- React.createElement("main", { className: "e-exam attachments" },
31
- React.createElement(React.StrictMode, null),
32
- examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
33
- React.createElement(Section, { "aria-labelledby": "title" },
34
- examTitle && (React.createElement(DocumentTitle, { id: "title" },
35
- renderChildNodes(examTitle),
36
- examTitle.textContent.includes(',') ? '; ' : ', ',
37
- React.createElement(Translation, null, (t) => t('attachments-page-title').toLowerCase()))),
38
- React.createElement("div", { className: "e-semibold e-mrg-b-6" }, dateTimeFormatter.format(date)),
39
- externalMaterial && (React.createElement(AttachmentsExternalMaterial, Object.assign({}, { element: externalMaterial, renderChildNodes, forceRender: true })))),
40
- renderChildNodes(root))));
41
- }
42
- export default React.memo(withExamContext(withCommonExamContext(Attachments)));
43
- //# sourceMappingURL=Attachments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Attachments.js","sourceRoot":"","sources":["../../src/components/Attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UA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
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare const _default: React.MemoExoticComponent<React.ComponentType<ExamComponentProps>>;
4
- export default _default;
5
- //# sourceMappingURL=AttachmentsAttachment.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,8 +0,0 @@
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("figure", { 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
@@ -1 +0,0 @@
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,gCAAQ,EAAE,EAAE,aAAc,EAAE,SAAS,EAAC,0CAA0C,IAC7E,gBAAgB,CAAC,OAAO,CAAC,CACnB,CACV,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import { createRenderChildNodes } from '../createRenderChildNodes';
3
- import { queryAncestors } from '../dom-utils';
4
- import AttachmentLink from './AttachmentLink';
5
- import AttachmentLinks 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': AttachmentLink,
19
- 'attachment-links': AttachmentLinks,
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, 'figcaption', { 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
@@ -1 +0,0 @@
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,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,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,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;IAC9C,iBAAiB,EAAE,cAAc;IACjC,kBAAkB,EAAE,eAAe;IACnC,kBAAkB,EAAE,0BAA0B;IAC9C,UAAU,EAAE,qBAAqB;IACjC,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,YAAY,EAAE,EAAE,SAAS,EAAE,kDAAkD,EAAE,CAAC;IAC/G,eAAe,EAAE,YAAY;CAC9B,CAAC,CAAA;AAMF,SAAS,2BAA2B,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,KAAK,EAAoC;IACrG,IAAI,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE;QAC/D,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAA;IAE/C,OAAO,CACL;QACG,eAAe,GAAG,CAAC,IAAI,CACtB,oBAAC,oBAAoB,oBAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,EAAI,CAC3F;QACA,gBAAgB,CAAC,OAAO,CAAC,CACzB,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA"}
@@ -1,5 +0,0 @@
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=AttachmentsQuestion.d.ts.map
@@ -1 +0,0 @@
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;;AA2B7E,wBAAmE"}
@@ -1,16 +0,0 @@
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
- function AttachmentsQuestion({ element, renderChildNodes }) {
7
- const { displayNumber, hasExternalMaterial, level } = useContext(QuestionContext);
8
- return isTopmostQuestionContainingExternalMaterial(element, hasExternalMaterial, level) ? (React.createElement(Section, { id: displayNumber, "aria-labelledby": displayNumber + '-title' }, renderChildNodes(element, RenderOptions.SkipHTML))) : (React.createElement(React.Fragment, null, renderChildNodes(element, RenderOptions.SkipHTML)));
9
- }
10
- function isTopmostQuestionContainingExternalMaterial(element, hasExternalMaterial, level) {
11
- return (hasExternalMaterial &&
12
- (level === 0 ||
13
- parentElements(element).every((parent) => parent.localName === 'question' ? !findChildElement(parent, 'external-material') : true)));
14
- }
15
- export default React.memo(withQuestionContext(AttachmentsQuestion));
16
- //# sourceMappingURL=AttachmentsQuestion.js.map
@@ -1 +0,0 @@
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;AAE/B,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,aAAa,GAAG,QAAQ,IAClE,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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentsQuestionTitle.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentsQuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,sBASlF;;AAED,wBAAmD"}
@@ -1,13 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { useTranslation } from 'react-i18next';
3
- import { QuestionContext } from './QuestionContext';
4
- function AttachmentsQuestionTitle({ element, renderChildNodes }) {
5
- const { displayNumber, hasExternalMaterial } = useContext(QuestionContext);
6
- const { t } = useTranslation();
7
- return hasExternalMaterial ? (React.createElement("h2", { id: displayNumber + '-title' },
8
- t('question', { displayNumber }),
9
- ". ",
10
- renderChildNodes(element))) : null;
11
- }
12
- export default React.memo(AttachmentsQuestionTitle);
13
- //# sourceMappingURL=AttachmentsQuestionTitle.js.map
@@ -1 +0,0 @@
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,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGnD,SAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACjF,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC1E,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAE9B,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B,4BAAI,EAAE,EAAE,aAAa,GAAG,QAAQ;QAC7B,CAAC,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,CAAC;;QAAI,gBAAgB,CAAC,OAAO,CAAC,CAC3D,CACN,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"Audio.d.ts","sourceRoot":"","sources":["../../src/components/Audio.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAQzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA+B1E;;AAED,wBAAgC"}
@@ -1,29 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { useSelector } from 'react-redux';
5
- import { getNumericAttribute } from '../dom-utils';
6
- import { getAudioPlaybackError, getPlaybackTimesRemaining } from '../store/selectors';
7
- import AudioPlaybackError from './AudioPlaybackError';
8
- import { CommonExamContext } from './CommonExamContext';
9
- import RestrictedAudioPlayer from './RestrictedAudioPlayer';
10
- function Audio({ element, className, renderChildNodes }) {
11
- const src = element.getAttribute('src');
12
- const restrictedAudioId = getNumericAttribute(element, 'restricted-audio-id');
13
- const times = getNumericAttribute(element, 'times');
14
- const duration = getNumericAttribute(element, 'duration');
15
- const { t } = useTranslation();
16
- const audioPlaybackError = times != null && restrictedAudioId != null ? useSelector(getAudioPlaybackError(src, restrictedAudioId)) : undefined;
17
- const playbackTimesRemaining = times != null && restrictedAudioId != null
18
- ? useSelector(getPlaybackTimesRemaining(restrictedAudioId, times))
19
- : undefined;
20
- const { resolveAttachment } = useContext(CommonExamContext);
21
- return (React.createElement("div", { className: classNames('audio e-columns e-columns--center-v e-mrg-b-2', className) },
22
- restrictedAudioId != null && times != null ? (React.createElement(RestrictedAudioPlayer, Object.assign({}, { src, restrictedAudioId, duration, times }))) : (React.createElement("audio", { className: "e-column e-column--narrow", preload: "metadata", controls: true },
23
- React.createElement("source", { src: resolveAttachment(src) }))),
24
- React.createElement("div", { className: "e-column" },
25
- React.createElement(AudioPlaybackError, { error: audioPlaybackError }, element.hasChildNodes() && renderChildNodes(element)),
26
- playbackTimesRemaining != null && React.createElement("em", null, t('listen-times-remaining', { count: playbackTimesRemaining })))));
27
- }
28
- export default React.memo(Audio);
29
- //# sourceMappingURL=Audio.js.map
@@ -1 +0,0 @@
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,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,kBAAkB,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAG3D,SAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAsB;IACzE,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAA;IAC7E,MAAM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E,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAM,CACxG,CACF,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { AudioPlaybackError } from '../types/ExamServerAPI';
3
- export default function AudioPlaybackError({ error, children, }: {
4
- error?: AudioPlaybackError;
5
- children?: React.ReactNode;
6
- }): JSX.Element;
7
- //# sourceMappingURL=AudioPlaybackError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioPlaybackError.d.ts","sourceRoot":"","sources":["../../src/components/AudioPlaybackError.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,CAAC,EAAE,kBAAkB,CAAA;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,eAeA"}
@@ -1,12 +0,0 @@
1
- import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons/faExclamationTriangle';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import React from 'react';
4
- import ReactCSSTransitionReplace from 'react-css-transition-replace';
5
- import { useTranslation } from 'react-i18next';
6
- export default function AudioPlaybackError({ error, children, }) {
7
- const { t } = useTranslation();
8
- return (React.createElement(ReactCSSTransitionReplace, { transitionName: "e-crossfade", transitionEnterTimeout: 500, transitionLeaveTimeout: 500 }, error != null ? (React.createElement("div", { className: "e-color-error" },
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
- //# sourceMappingURL=AudioPlaybackError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioPlaybackError.js","sourceRoot":"","sources":["../../src/components/AudioPlaybackError.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAA;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,yBAAyB,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG9C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,QAAQ,GAIT;IACC,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAE9B,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;QAC5B,oBAAC,eAAe,IAAC,IAAI,EAAE,qBAAqB,EAAE,SAAS,EAAC,WAAW,GAAG;QACrE,CAAC,CAAC,gBAAgB,KAAK,EAAE,CAAC,CACvB,CACP,CAAC,CAAC,CAAC,CACF,6BAAK,GAAG,EAAC,UAAU,IAAE,QAAQ,CAAO,CACrC,CACyB,CAC7B,CAAA;AACH,CAAC"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioTest.d.ts","sourceRoot":"","sources":["../../src/components/AudioTest.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eA6BjD;;AAED,wBAAoC"}
@@ -1,29 +0,0 @@
1
- import { faPlay } from '@fortawesome/free-solid-svg-icons/faPlay';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import React from 'react';
4
- import { useTranslation } from 'react-i18next';
5
- import { useDispatch, useSelector } from 'react-redux';
6
- import { getNumericAttribute, NBSP } from '../dom-utils';
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 } = useTranslation();
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioTest.js","sourceRoot":"","sources":["../../src/components/AudioTest.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAA;AACjE,OA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,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"}
@@ -1,12 +0,0 @@
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, Pick<ChoiceAnswerProps, "className" | "element" | "renderChildNodes"> & ExamComponentProps>;
11
- export default _default;
12
- //# sourceMappingURL=ChoiceAnswer.d.ts.map
@@ -1 +0,0 @@
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;AAiE/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,eA2CzF;;AAQD,wBAEgB"}
@@ -1,60 +0,0 @@
1
- import classNames from 'classnames';
2
- import React from 'react';
3
- import { connect } from 'react-redux';
4
- import { getNumericAttribute, mapChildElements, query } from '../dom-utils';
5
- import * as actions from '../store/answers/actions';
6
- import AnswerToolbar from './AnswerToolbar';
7
- function ChoiceAnswerOption({ selected, element, renderChildNodes, questionId, onSelect, direction, }) {
8
- const className = element.getAttribute('class');
9
- const optionId = element.getAttribute('option-id');
10
- const content = (React.createElement("div", { className: classNames('e-choice-answer-option e-column', className, {
11
- 'e-choice-answer-option--selected': selected,
12
- }) }, renderChildNodes(element)));
13
- return direction === 'vertical' ? (React.createElement("div", { className: "e-mrg-b-1" },
14
- React.createElement("label", { className: classNames('e-columns', {
15
- 'e-columns--inline': query(element, ['image', 'video']) == null /* Force full width for options containing responsive media */,
16
- }) },
17
- React.createElement("input", { type: "radio", className: "e-radio-button e-column e-column--narrow", name: String(questionId), onChange: onSelect, value: optionId, checked: selected }),
18
- content))) : (React.createElement("div", { className: "e-column e-mrg-b-1" },
19
- React.createElement("label", { className: "e-block e-text-center" },
20
- React.createElement("input", { type: "radio", className: "e-radio-button", name: String(questionId), onChange: onSelect, value: optionId, checked: selected }),
21
- content)));
22
- }
23
- function ChoiceAnswer({ answer, saveAnswer, element, renderChildNodes }) {
24
- const questionId = getNumericAttribute(element, 'question-id');
25
- const direction = element.getAttribute('direction') || 'vertical';
26
- const className = element.getAttribute('class');
27
- const displayNumber = element.getAttribute('display-number');
28
- const onSelect = (event) => {
29
- saveAnswer({ type: 'choice', questionId, value: event.currentTarget.value, displayNumber });
30
- };
31
- return (React.createElement(React.Fragment, null,
32
- React.createElement("div", { className: classNames('e-choice-answer', className, {
33
- 'e-columns': direction === 'horizontal',
34
- }) }, mapChildElements(element, (childElement) => {
35
- const optionId = childElement.getAttribute('option-id');
36
- const selected = answer != null && answer.value === optionId;
37
- return (React.createElement(ChoiceAnswerOption, Object.assign({}, {
38
- element: childElement,
39
- onSelect,
40
- renderChildNodes,
41
- questionId,
42
- key: optionId,
43
- direction,
44
- selected,
45
- })));
46
- })),
47
- React.createElement(AnswerToolbar, Object.assign({}, {
48
- answer,
49
- element,
50
- }))));
51
- }
52
- function mapStateToProps(state, { element }) {
53
- const questionId = getNumericAttribute(element, 'question-id');
54
- const answer = state.answers.answersById[questionId];
55
- return { answer };
56
- }
57
- export default connect(mapStateToProps, {
58
- saveAnswer: actions.saveAnswer,
59
- })(ChoiceAnswer);
60
- //# sourceMappingURL=ChoiceAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChoiceAnswer.js","sourceRoot":"","sources":["../../src/components/ChoiceAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAE3E,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AACnD,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAW3C,SAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,SAAS,GACe;IACxB,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;IACnD,MAAM,OAAO,GAAG,CACd,6BACE,SAAS,EAAE,UAAU,CAAC,iCAAiC,EAAE,SAAS,EAAE;YAClE,kCAAkC,EAAE,QAAQ;SAC7C,CAAC,IAED,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;IAED,OAAO,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,CAChC,6BAAK,SAA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a,EAAE,CAAC,CAAA;IAC7F,CAAC,CAAA;IAED,OAAO,CACL;QACE,6BACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;gBAClD,WAAW,EAAE,SAAS,KAAK,YAAY;aACxC,CAAC,IAED,gBAAgB,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC1C,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;YACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAA;YAE5D,OAAO,CACL,oBAAC,kBAAkB,oBACb;gBACF,OAAO,EAAE,YAAY;gBACrB,QAAQ;gBACR,gBAAgB;gBAChB,UAAU;gBACV,GAAG,EAAE,QAAQ;gBACb,SAAS;gBACT,QAAQ;aACT,EACD,CACH,CAAA;QACH,CAAC,CAAC,CACE;QACN,oBAAC,aAAa,oBACR;YACF,MAAM;YACN,OAAO;SACR,EACD,CACD,CACJ,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAe,EAAE,EAAE,OAAO,EAAsB;IACvE,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;IAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAA8B,CAAA;IACjF,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC;AAED,eAAe,OAAO,CAAC,eAAe,EAAE;IACtC,UAAU,EAAE,OAAO,CAAC,UAAU;CAC/B,CAAC,CAAC,YAAY,CAAC,CAAA"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { CommonExamProps } from './Exam';
3
- export interface CommonExamContext {
4
- attachmentsURL: string;
5
- date?: Date;
6
- dateTimeFormatter: Intl.DateTimeFormat;
7
- language: string;
8
- maxAnswers?: number;
9
- maxScore?: number;
10
- numberOfSections: number;
11
- resolveAttachment: (filename: string) => string;
12
- root: Element;
13
- }
14
- export declare const CommonExamContext: React.Context<CommonExamContext>;
15
- export declare function withCommonExamContext<P extends CommonExamProps>(Component: React.ComponentType<P>): React.ComponentType<P>;
16
- //# sourceMappingURL=CommonExamContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommonExamContext.d.ts","sourceRoot":"","sources":["../../src/components/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAGxC,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,IAAI,EAAE,OAAO,CAAA;CACd;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAA;AAE7E,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,eAAe,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,0BAoBjG"}
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { getNumericAttribute, queryAll } from '../dom-utils';
3
- import { withContext } from './withContext';
4
- export const CommonExamContext = React.createContext({});
5
- export function withCommonExamContext(Component) {
6
- return withContext(CommonExamContext, ({ attachmentsURL, resolveAttachment, doc, language }) => {
7
- const root = doc.documentElement;
8
- const maybeDate = root.getAttribute('date');
9
- return {
10
- attachmentsURL,
11
- resolveAttachment,
12
- root,
13
- date: maybeDate ? new Date(maybeDate) : undefined,
14
- dateTimeFormatter: new Intl.DateTimeFormat('fi-FI', { timeZone: 'UTC' }),
15
- language,
16
- maxAnswers: getNumericAttribute(root, 'max-answers'),
17
- maxScore: getNumericAttribute(root, 'max-score'),
18
- numberOfSections: queryAll(root, 'section').length,
19
- };
20
- })(Component);
21
- }
22
- //# sourceMappingURL=CommonExamContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommonExamContext.js","sourceRoot":"","sources":["../../src/components/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAc3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,EAAuB,CAAC,CAAA;AAE7E,MAAM,UAAU,qBAAqB,CAA4B,SAAiC;IAChG,OAAO,WAAW,CAChB,iBAAiB,EACjB,CAAC,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE;QACvD,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAA;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;QAE3C,OAAO;YACL,cAAc;YACd,iBAAiB;YACjB,IAAI;YACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;YACjD,iBAAiB,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YACxE,QAAQ;YACR,UAAU,EAAE,mBAAmB,CAAC,IAAI,EAAE,aAAa,CAAC;YACpD,QAAQ,EAAE,mBAAmB,CAAC,IAAI,EAAE,WAAW,CAAC;YAChD,gBAAgB,EAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,MAAM;SACnD,CAAA;IACH,CAAC,CACF,CAAC,SAAS,CAAC,CAAA;AACd,CAAC"}
@@ -1,12 +0,0 @@
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 DropdownAnswerProps extends ExamComponentProps {
6
- saveAnswer: typeof actions.saveAnswer;
7
- answer?: ChoiceAnswerT;
8
- }
9
- declare function DropdownAnswer({ element, renderChildNodes, saveAnswer, answer }: DropdownAnswerProps): JSX.Element;
10
- declare const _default: import("react-redux").ConnectedComponent<typeof DropdownAnswer, Pick<DropdownAnswerProps, "className" | "element" | "renderChildNodes"> & ExamComponentProps>;
11
- export default _default;
12
- //# sourceMappingURL=DropdownAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownAnswer.d.ts","sourceRoot":"","sources":["../../src/components/DropdownAnswer.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnE,UAAU,mBAAoB,SAAQ,kBAAkB;IACtD,UAAU,EAAE,OAAO,OAAO,CAAC,UAAU,CAAA;IACrC,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB;AASD,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,mBAAmB,eAoH7F;;AAQD,wBAEkB"}