@digabi/exam-engine-core 20.0.1 → 20.0.2-images-loading.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/components/grading/GradingAnswer.d.ts.map +1 -1
  3. package/dist/components/grading/GradingAnswer.js +25 -1
  4. package/dist/components/grading/GradingAnswer.js.map +1 -1
  5. package/dist/main-bundle.js +1 -1
  6. package/package.json +2 -2
  7. package/dist/components/AttachmentContext.d.ts +0 -14
  8. package/dist/components/AttachmentContext.d.ts.map +0 -1
  9. package/dist/components/AttachmentContext.js +0 -12
  10. package/dist/components/AttachmentContext.js.map +0 -1
  11. package/dist/components/AttachmentLink.d.ts +0 -6
  12. package/dist/components/AttachmentLink.d.ts.map +0 -1
  13. package/dist/components/AttachmentLink.js +0 -24
  14. package/dist/components/AttachmentLink.js.map +0 -1
  15. package/dist/components/AttachmentLinkAnchor.d.ts +0 -7
  16. package/dist/components/AttachmentLinkAnchor.d.ts.map +0 -1
  17. package/dist/components/AttachmentLinkAnchor.js +0 -4
  18. package/dist/components/AttachmentLinkAnchor.js.map +0 -1
  19. package/dist/components/AttachmentLinks.d.ts +0 -6
  20. package/dist/components/AttachmentLinks.d.ts.map +0 -1
  21. package/dist/components/AttachmentLinks.js +0 -58
  22. package/dist/components/AttachmentLinks.js.map +0 -1
  23. package/dist/components/Attachments.d.ts +0 -5
  24. package/dist/components/Attachments.d.ts.map +0 -1
  25. package/dist/components/Attachments.js +0 -43
  26. package/dist/components/Attachments.js.map +0 -1
  27. package/dist/components/AttachmentsAttachment.d.ts +0 -5
  28. package/dist/components/AttachmentsAttachment.d.ts.map +0 -1
  29. package/dist/components/AttachmentsAttachment.js +0 -8
  30. package/dist/components/AttachmentsAttachment.js.map +0 -1
  31. package/dist/components/AttachmentsAttachmentTitle.d.ts +0 -6
  32. package/dist/components/AttachmentsAttachmentTitle.d.ts.map +0 -1
  33. package/dist/components/AttachmentsAttachmentTitle.js +0 -12
  34. package/dist/components/AttachmentsAttachmentTitle.js.map +0 -1
  35. package/dist/components/AttachmentsExternalMaterial.d.ts +0 -9
  36. package/dist/components/AttachmentsExternalMaterial.d.ts.map +0 -1
  37. package/dist/components/AttachmentsExternalMaterial.js +0 -40
  38. package/dist/components/AttachmentsExternalMaterial.js.map +0 -1
  39. package/dist/components/AttachmentsQuestion.d.ts +0 -5
  40. package/dist/components/AttachmentsQuestion.d.ts.map +0 -1
  41. package/dist/components/AttachmentsQuestion.js +0 -16
  42. package/dist/components/AttachmentsQuestion.js.map +0 -1
  43. package/dist/components/AttachmentsQuestionTitle.d.ts +0 -6
  44. package/dist/components/AttachmentsQuestionTitle.d.ts.map +0 -1
  45. package/dist/components/AttachmentsQuestionTitle.js +0 -13
  46. package/dist/components/AttachmentsQuestionTitle.js.map +0 -1
  47. package/dist/components/Audio.d.ts +0 -6
  48. package/dist/components/Audio.d.ts.map +0 -1
  49. package/dist/components/Audio.js +0 -29
  50. package/dist/components/Audio.js.map +0 -1
  51. package/dist/components/AudioGroup.d.ts +0 -6
  52. package/dist/components/AudioGroup.d.ts.map +0 -1
  53. package/dist/components/AudioGroup.js +0 -9
  54. package/dist/components/AudioGroup.js.map +0 -1
  55. package/dist/components/AudioPlaybackError.d.ts +0 -7
  56. package/dist/components/AudioPlaybackError.d.ts.map +0 -1
  57. package/dist/components/AudioPlaybackError.js +0 -12
  58. package/dist/components/AudioPlaybackError.js.map +0 -1
  59. package/dist/components/AudioTest.d.ts +0 -6
  60. package/dist/components/AudioTest.d.ts.map +0 -1
  61. package/dist/components/AudioTest.js +0 -29
  62. package/dist/components/AudioTest.js.map +0 -1
  63. package/dist/components/ChoiceAnswer.d.ts +0 -12
  64. package/dist/components/ChoiceAnswer.d.ts.map +0 -1
  65. package/dist/components/ChoiceAnswer.js +0 -60
  66. package/dist/components/ChoiceAnswer.js.map +0 -1
  67. package/dist/components/CommonExamContext.d.ts +0 -16
  68. package/dist/components/CommonExamContext.d.ts.map +0 -1
  69. package/dist/components/CommonExamContext.js +0 -22
  70. package/dist/components/CommonExamContext.js.map +0 -1
  71. package/dist/components/DropdownAnswer.d.ts +0 -12
  72. package/dist/components/DropdownAnswer.d.ts.map +0 -1
  73. package/dist/components/DropdownAnswer.js +0 -85
  74. package/dist/components/DropdownAnswer.js.map +0 -1
  75. package/dist/components/Exam.d.ts +0 -40
  76. package/dist/components/Exam.d.ts.map +0 -1
  77. package/dist/components/Exam.js +0 -106
  78. package/dist/components/Exam.js.map +0 -1
  79. package/dist/components/ExamAttachment.d.ts +0 -5
  80. package/dist/components/ExamAttachment.d.ts.map +0 -1
  81. package/dist/components/ExamAttachment.js +0 -8
  82. package/dist/components/ExamAttachment.js.map +0 -1
  83. package/dist/components/ExamContext.d.ts +0 -10
  84. package/dist/components/ExamContext.d.ts.map +0 -1
  85. package/dist/components/ExamContext.js +0 -11
  86. package/dist/components/ExamContext.js.map +0 -1
  87. package/dist/components/ExamFooter.d.ts +0 -6
  88. package/dist/components/ExamFooter.d.ts.map +0 -1
  89. package/dist/components/ExamFooter.js +0 -7
  90. package/dist/components/ExamFooter.js.map +0 -1
  91. package/dist/components/ExamInstruction.d.ts +0 -6
  92. package/dist/components/ExamInstruction.d.ts.map +0 -1
  93. package/dist/components/ExamInstruction.js +0 -6
  94. package/dist/components/ExamInstruction.js.map +0 -1
  95. package/dist/components/ExamQuestion.d.ts +0 -5
  96. package/dist/components/ExamQuestion.d.ts.map +0 -1
  97. package/dist/components/ExamQuestion.js +0 -16
  98. package/dist/components/ExamQuestion.js.map +0 -1
  99. package/dist/components/ExamQuestionInstruction.d.ts +0 -6
  100. package/dist/components/ExamQuestionInstruction.d.ts.map +0 -1
  101. package/dist/components/ExamQuestionInstruction.js +0 -6
  102. package/dist/components/ExamQuestionInstruction.js.map +0 -1
  103. package/dist/components/ExamQuestionTitle.d.ts +0 -6
  104. package/dist/components/ExamQuestionTitle.d.ts.map +0 -1
  105. package/dist/components/ExamQuestionTitle.js +0 -25
  106. package/dist/components/ExamQuestionTitle.js.map +0 -1
  107. package/dist/components/ExamSection.d.ts +0 -5
  108. package/dist/components/ExamSection.d.ts.map +0 -1
  109. package/dist/components/ExamSection.js +0 -30
  110. package/dist/components/ExamSection.js.map +0 -1
  111. package/dist/components/ExamSectionTitle.d.ts +0 -6
  112. package/dist/components/ExamSectionTitle.d.ts.map +0 -1
  113. package/dist/components/ExamSectionTitle.js +0 -21
  114. package/dist/components/ExamSectionTitle.js.map +0 -1
  115. package/dist/components/ExternalMaterialList.d.ts +0 -10
  116. package/dist/components/ExternalMaterialList.d.ts.map +0 -1
  117. package/dist/components/ExternalMaterialList.js +0 -31
  118. package/dist/components/ExternalMaterialList.js.map +0 -1
  119. package/dist/components/File.d.ts +0 -6
  120. package/dist/components/File.d.ts.map +0 -1
  121. package/dist/components/File.js +0 -15
  122. package/dist/components/File.js.map +0 -1
  123. package/dist/components/Formula.d.ts +0 -6
  124. package/dist/components/Formula.d.ts.map +0 -1
  125. package/dist/components/Formula.js +0 -12
  126. package/dist/components/Formula.js.map +0 -1
  127. package/dist/components/Hints.d.ts +0 -6
  128. package/dist/components/Hints.d.ts.map +0 -1
  129. package/dist/components/Hints.js +0 -32
  130. package/dist/components/Hints.js.map +0 -1
  131. package/dist/components/Image.d.ts +0 -6
  132. package/dist/components/Image.d.ts.map +0 -1
  133. package/dist/components/Image.js +0 -25
  134. package/dist/components/Image.js.map +0 -1
  135. package/dist/components/ImageOverlay.d.ts +0 -6
  136. package/dist/components/ImageOverlay.d.ts.map +0 -1
  137. package/dist/components/ImageOverlay.js +0 -45
  138. package/dist/components/ImageOverlay.js.map +0 -1
  139. package/dist/components/ProgressBar.d.ts +0 -6
  140. package/dist/components/ProgressBar.d.ts.map +0 -1
  141. package/dist/components/ProgressBar.js +0 -18
  142. package/dist/components/ProgressBar.js.map +0 -1
  143. package/dist/components/QuestionContext.d.ts +0 -14
  144. package/dist/components/QuestionContext.d.ts.map +0 -1
  145. package/dist/components/QuestionContext.js +0 -20
  146. package/dist/components/QuestionContext.js.map +0 -1
  147. package/dist/components/Reference.d.ts +0 -6
  148. package/dist/components/Reference.d.ts.map +0 -1
  149. package/dist/components/Reference.js +0 -63
  150. package/dist/components/Reference.js.map +0 -1
  151. package/dist/components/References.d.ts +0 -6
  152. package/dist/components/References.d.ts.map +0 -1
  153. package/dist/components/References.js +0 -23
  154. package/dist/components/References.js.map +0 -1
  155. package/dist/components/ResponsiveMediaContainer.d.ts +0 -17
  156. package/dist/components/ResponsiveMediaContainer.d.ts.map +0 -1
  157. package/dist/components/ResponsiveMediaContainer.js +0 -20
  158. package/dist/components/ResponsiveMediaContainer.js.map +0 -1
  159. package/dist/components/RestrictedAudioPlayer.d.ts +0 -11
  160. package/dist/components/RestrictedAudioPlayer.d.ts.map +0 -1
  161. package/dist/components/RestrictedAudioPlayer.js +0 -29
  162. package/dist/components/RestrictedAudioPlayer.js.map +0 -1
  163. package/dist/components/RichTextAnswer.d.ts +0 -31
  164. package/dist/components/RichTextAnswer.d.ts.map +0 -1
  165. package/dist/components/RichTextAnswer.js +0 -70
  166. package/dist/components/RichTextAnswer.js.map +0 -1
  167. package/dist/components/SaveIndicator.d.ts +0 -5
  168. package/dist/components/SaveIndicator.d.ts.map +0 -1
  169. package/dist/components/SaveIndicator.js +0 -15
  170. package/dist/components/SaveIndicator.js.map +0 -1
  171. package/dist/components/Score.d.ts +0 -6
  172. package/dist/components/Score.d.ts.map +0 -1
  173. package/dist/components/Score.js +0 -13
  174. package/dist/components/Score.js.map +0 -1
  175. package/dist/components/Section.d.ts +0 -3
  176. package/dist/components/Section.d.ts.map +0 -1
  177. package/dist/components/Section.js +0 -7
  178. package/dist/components/Section.js.map +0 -1
  179. package/dist/components/SectionContext.d.ts +0 -13
  180. package/dist/components/SectionContext.d.ts.map +0 -1
  181. package/dist/components/SectionContext.js +0 -21
  182. package/dist/components/SectionContext.js.map +0 -1
  183. package/dist/components/SectionInstruction.d.ts +0 -6
  184. package/dist/components/SectionInstruction.d.ts.map +0 -1
  185. package/dist/components/SectionInstruction.js +0 -6
  186. package/dist/components/SectionInstruction.js.map +0 -1
  187. package/dist/components/TableOfContents.d.ts +0 -13
  188. package/dist/components/TableOfContents.d.ts.map +0 -1
  189. package/dist/components/TableOfContents.js +0 -66
  190. package/dist/components/TableOfContents.js.map +0 -1
  191. package/dist/components/TextAnswer.d.ts +0 -6
  192. package/dist/components/TextAnswer.d.ts.map +0 -1
  193. package/dist/components/TextAnswer.js +0 -16
  194. package/dist/components/TextAnswer.js.map +0 -1
  195. package/dist/components/TextAnswerInput.d.ts +0 -37
  196. package/dist/components/TextAnswerInput.d.ts.map +0 -1
  197. package/dist/components/TextAnswerInput.js +0 -145
  198. package/dist/components/TextAnswerInput.js.map +0 -1
  199. package/dist/components/Video.d.ts +0 -6
  200. package/dist/components/Video.d.ts.map +0 -1
  201. package/dist/components/Video.js +0 -15
  202. package/dist/components/Video.js.map +0 -1
  203. package/dist/components/results/AnnotationList.d.ts +0 -5
  204. package/dist/components/results/AnnotationList.d.ts.map +0 -1
  205. package/dist/components/results/AnnotationList.js +0 -40
  206. package/dist/components/results/AnnotationList.js.map +0 -1
  207. package/dist/components/results/ResultsChoiceAnswer.d.ts +0 -6
  208. package/dist/components/results/ResultsChoiceAnswer.d.ts.map +0 -1
  209. package/dist/components/results/ResultsChoiceAnswer.js +0 -60
  210. package/dist/components/results/ResultsChoiceAnswer.js.map +0 -1
  211. package/dist/components/results/ResultsContext.d.ts +0 -20
  212. package/dist/components/results/ResultsContext.d.ts.map +0 -1
  213. package/dist/components/results/ResultsContext.js +0 -68
  214. package/dist/components/results/ResultsContext.js.map +0 -1
  215. package/dist/components/results/ResultsDropdownAnswer.d.ts +0 -6
  216. package/dist/components/results/ResultsDropdownAnswer.d.ts.map +0 -1
  217. package/dist/components/results/ResultsDropdownAnswer.js +0 -41
  218. package/dist/components/results/ResultsDropdownAnswer.js.map +0 -1
  219. package/dist/components/results/ResultsExamQuestion.d.ts +0 -5
  220. package/dist/components/results/ResultsExamQuestion.d.ts.map +0 -1
  221. package/dist/components/results/ResultsExamQuestion.js +0 -23
  222. package/dist/components/results/ResultsExamQuestion.js.map +0 -1
  223. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +0 -10
  224. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +0 -1
  225. package/dist/components/results/ResultsExamQuestionAutoScore.js +0 -16
  226. package/dist/components/results/ResultsExamQuestionAutoScore.js.map +0 -1
  227. package/dist/components/results/ResultsExamQuestionManualScore.d.ts +0 -11
  228. package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +0 -1
  229. package/dist/components/results/ResultsExamQuestionManualScore.js +0 -62
  230. package/dist/components/results/ResultsExamQuestionManualScore.js.map +0 -1
  231. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +0 -9
  232. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +0 -1
  233. package/dist/components/results/ResultsExamQuestionScoresContainer.js +0 -8
  234. package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +0 -1
  235. package/dist/components/results/ResultsExamQuestionTitle.d.ts +0 -6
  236. package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +0 -1
  237. package/dist/components/results/ResultsExamQuestionTitle.js +0 -22
  238. package/dist/components/results/ResultsExamQuestionTitle.js.map +0 -1
  239. package/dist/components/results/ResultsExamSection.d.ts +0 -5
  240. package/dist/components/results/ResultsExamSection.d.ts.map +0 -1
  241. package/dist/components/results/ResultsExamSection.js +0 -17
  242. package/dist/components/results/ResultsExamSection.js.map +0 -1
  243. package/dist/components/results/ResultsScoredTextAnswer.d.ts +0 -6
  244. package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +0 -1
  245. package/dist/components/results/ResultsScoredTextAnswer.js +0 -22
  246. package/dist/components/results/ResultsScoredTextAnswer.js.map +0 -1
  247. package/dist/components/results/ResultsSingleLineAnswer.d.ts +0 -12
  248. package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +0 -1
  249. package/dist/components/results/ResultsSingleLineAnswer.js +0 -12
  250. package/dist/components/results/ResultsSingleLineAnswer.js.map +0 -1
  251. package/dist/components/results/ResultsTextAnswer.d.ts +0 -6
  252. package/dist/components/results/ResultsTextAnswer.d.ts.map +0 -1
  253. package/dist/components/results/ResultsTextAnswer.js +0 -51
  254. package/dist/components/results/ResultsTextAnswer.js.map +0 -1
  255. package/dist/components/results/helpers.d.ts +0 -9
  256. package/dist/components/results/helpers.d.ts.map +0 -1
  257. package/dist/components/results/helpers.js +0 -10
  258. package/dist/components/results/helpers.js.map +0 -1
  259. package/dist/components/types.d.ts +0 -110
  260. package/dist/components/types.d.ts.map +0 -1
  261. package/dist/components/types.js +0 -1
  262. package/dist/components/types.js.map +0 -1
  263. package/dist/components/withContext.d.ts +0 -3
  264. package/dist/components/withContext.d.ts.map +0 -1
  265. package/dist/components/withContext.js +0 -12
  266. package/dist/components/withContext.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digabi/exam-engine-core",
3
- "version": "20.0.1",
3
+ "version": "20.0.2-images-loading.3",
4
4
  "main": "dist/main-bundle.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Matriculation Examination Board, Finland",
@@ -58,5 +58,5 @@
58
58
  "webpack-bundle-analyzer": "^4.1.0",
59
59
  "webpack-cli": "^5.0.2"
60
60
  },
61
- "gitHead": "7d2821712ee207132d349f8d967633283ad8f41f"
61
+ "gitHead": "4dc47cc13d1f82845f317ecdb85ca7b71a4b0c83"
62
62
  }
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- export declare type AttachmentContext = {
4
- name: string | null;
5
- isExternal: false;
6
- displayNumber: null;
7
- } | {
8
- name: string | null;
9
- isExternal: true;
10
- displayNumber: string;
11
- };
12
- export declare const AttachmentContext: React.Context<AttachmentContext>;
13
- export declare const withAttachmentContext: (Component: React.ComponentType<ExamComponentProps>) => React.ComponentType<ExamComponentProps>;
14
- //# sourceMappingURL=AttachmentContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentContext.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,oBAAY,iBAAiB,GACzB;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;IAAC,aAAa,EAAE,IAAI,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpE,eAAO,MAAM,iBAAiB,kCAAkE,CAAA;AAEhG,eAAO,MAAM,qBAAqB,iGASjC,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { queryAncestors } from '../dom-utils';
3
- import { withContext } from './withContext';
4
- export const AttachmentContext = React.createContext({});
5
- export const withAttachmentContext = withContext(AttachmentContext, ({ element }) => {
6
- const isExternal = queryAncestors(element, 'external-material') != null;
7
- const name = element.getAttribute('name');
8
- return isExternal
9
- ? { displayNumber: element.getAttribute('display-number'), isExternal, name }
10
- : { displayNumber: null, isExternal, name };
11
- });
12
- //# sourceMappingURL=AttachmentContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentContext.js","sourceRoot":"","sources":["../../src/components/AttachmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAO3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAoB,EAAuB,CAAC,CAAA;AAEhG,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAC9C,iBAAiB,EACjB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACd,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,IAAI,IAAI,CAAA;IACvE,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;IACzC,OAAO,UAAU;QACf,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,EAAE,UAAU,EAAE,IAAI,EAAE;QAC9E,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;AAC/C,CAAC,CACF,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare function AttachmentLink({ element }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof AttachmentLink>;
5
- export default _default;
6
- //# sourceMappingURL=AttachmentLink.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentLink.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAoBtD;;AAED,wBAAyC"}
@@ -1,24 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { Translation } from 'react-i18next';
3
- import { query } from '../dom-utils';
4
- import { url } from '../url';
5
- import AttachmentLinkAnchor from './AttachmentLinkAnchor';
6
- import { CommonExamContext } from './CommonExamContext';
7
- function AttachmentLink({ element }) {
8
- const name = element.getAttribute('ref');
9
- const { root } = useContext(CommonExamContext);
10
- const { attachmentsURL } = useContext(CommonExamContext);
11
- const attachment = query(root, (el) => el.localName === 'attachment' && el.getAttribute('name') === name);
12
- const displayNumber = attachment.getAttribute('display-number');
13
- const isShort = element.getAttribute('type') === 'short';
14
- const href = url(attachmentsURL, { hash: displayNumber });
15
- return isShort ? (React.createElement(AttachmentLinkAnchor, { href: href }, displayNumber)) : (React.createElement(React.Fragment, null,
16
- '(',
17
- React.createElement(AttachmentLinkAnchor, { href: href },
18
- React.createElement(Translation, null, (t) => t('material').toLowerCase()),
19
- " ",
20
- displayNumber),
21
- ')'));
22
- }
23
- export default React.memo(AttachmentLink);
24
- //# sourceMappingURL=AttachmentLink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentLink.js","sourceRoot":"","sources":["../../src/components/AttachmentLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,SAAS,cAAc,CAAC,EAAE,OAAO,EAAsB;IACrD,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC9C,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IACxD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,KAAK,YAAY,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,CAAE,CAAA;IAC1G,MAAM,aAAa,GAAG,UAAU,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAA;IAChE,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,OAAO,CAAA;IACxD,MAAM,IAAI,GAAG,GAAG,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAA;IAEzD,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,oBAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,IAAG,aAAa,CAAwB,CACzE,CAAC,CAAC,CAAC,CACF;QACG,GAAG;QACJ,oBAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI;YAC9B,oBAAC,WAAW,QAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAe;;YAAE,aAAa,CACzD;QACtB,GAAG,CACH,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare const AttachmentLinkAnchor: ({ children, href }: {
3
- children: React.ReactNode;
4
- href: string;
5
- }) => JSX.Element;
6
- export default AttachmentLinkAnchor;
7
- //# sourceMappingURL=AttachmentLinkAnchor.d.ts.map
@@ -1 +0,0 @@
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;;;iBAIzB,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- const AttachmentLinkAnchor = ({ children, href }) => (React.createElement("a", { href: href, className: "attachment-link e-nowrap", target: "attachments" }, children));
3
- export default AttachmentLinkAnchor;
4
- //# sourceMappingURL=AttachmentLinkAnchor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentLinkAnchor.js","sourceRoot":"","sources":["../../src/components/AttachmentLinkAnchor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,oBAAoB,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAA+C,EAAE,EAAE,CAAC,CAChG,2BAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,0BAA0B,EAAC,MAAM,EAAC,aAAa,IACrE,QAAQ,CACP,CACL,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare function AttachmentLinks({ element }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof AttachmentLinks>;
5
- export default _default;
6
- //# sourceMappingURL=AttachmentLinks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentLinks.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eA+BvD;;AAgCD,wBAA0C"}
@@ -1,58 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { Translation } from 'react-i18next';
3
- import { mapChildElements, query } from '../dom-utils';
4
- import { url } from '../url';
5
- import AttachmentLinkAnchor from './AttachmentLinkAnchor';
6
- import { CommonExamContext } from './CommonExamContext';
7
- function AttachmentLinks({ element }) {
8
- const { root, attachmentsURL } = useContext(CommonExamContext);
9
- const displayNumbers = mapChildElements(element, (attachmentLink) => {
10
- const name = attachmentLink.getAttribute('ref');
11
- const attachment = query(root, (el) => el.localName === 'attachment' && el.getAttribute('name') === name);
12
- return attachment.getAttribute('display-number');
13
- });
14
- const groupedDisplayNumbers = splitWhen(displayNumbers, (displayNumber, i) => {
15
- return i > 0 && !isSuccessive(displayNumbers[i - 1], displayNumber);
16
- });
17
- const isShort = element.getAttribute('type') === 'short';
18
- const href = url(attachmentsURL, { hash: displayNumbers[0] });
19
- const displayNumbersString = groupedDisplayNumbers
20
- .map((group) => {
21
- return group.length > 1 ? `${group[0]}–${group[group.length - 1]}` : group[0];
22
- })
23
- .join(', ');
24
- const count = groupedDisplayNumbers[0].length;
25
- return isShort ? (React.createElement(AttachmentLinkAnchor, { href: href }, displayNumbersString)) : (React.createElement(React.Fragment, null,
26
- '(',
27
- React.createElement(AttachmentLinkAnchor, { href: href },
28
- React.createElement(Translation, null, (t) => t('material', { count }).toLowerCase()),
29
- " ",
30
- displayNumbersString),
31
- ')'));
32
- }
33
- function splitWhen(array, predicate) {
34
- const result = [[]];
35
- let prev;
36
- for (let i = 0; i < array.length; i++) {
37
- const elem = array[i];
38
- if (prev && predicate(elem, i, array)) {
39
- const group = [elem];
40
- result.push(group);
41
- }
42
- else {
43
- const lastGroup = result[result.length - 1];
44
- lastGroup.push(elem);
45
- }
46
- prev = elem;
47
- }
48
- return result;
49
- }
50
- function isSuccessive(a, b) {
51
- const length = a.length;
52
- if (length !== b.length) {
53
- return false;
54
- }
55
- return a.startsWith(b.slice(0, length - 1)) && b.charCodeAt(length - 1) - a.charCodeAt(length - 1) === 1;
56
- }
57
- export default React.memo(AttachmentLinks);
58
- //# sourceMappingURL=AttachmentLinks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentLinks.js","sourceRoot":"","sources":["../../src/components/AttachmentLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,SAAS,eAA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AK,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,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ExamProps } from './Exam';
3
- declare const _default: React.MemoExoticComponent<React.ComponentType<ExamProps>>;
4
- export default _default;
5
- //# sourceMappingURL=Attachments.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Attachments.d.ts","sourceRoot":"","sources":["../../src/components/Attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAWpD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;;AAgDlC,wBAA8E"}
@@ -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,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC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BAAC,eAAe,IAAC,IAAI,EAAE,IAAI;QACzB,8BAAM,SAAS,EAAC,oBAAoB;YAClC,oBAAC,KAAK,CAAC,UAAU,OAAG;YACnB,cAAc,IAAI,8BAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAI;YACrF,oBAAC,OAAO,uBAAiB,OAAO;gBAC7B,SAAS,IAAI,CACZ,oBAAC,aAAa,IAAC,EAAE,EAAC,OAAO;oBACtB,gBAAgB,CAAC,SAAS,CAAC;oBAC3B,SAAS,CAAC,WAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;oBACnD,oBAAC,WAAW,QAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,WAAW,EAAE,CAAe,CAC/D,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;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,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=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,KAAK,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACnD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAE,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,kBAAkB,GACtB,KAAK,IAAI,IAAI,IAAI,iBAAiB,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACrH,MAAM,sBAAsB,GAC1B,KAAK,IAAI,IAAI,IAAI,iBAAiB,IAAI,IAAI;QACxC,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QAClE,CAAC,CAAC,SAAS,CAAA;IACf,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAE3D,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,+CAA+C,EAAE,SAAS,CAAC;QACnF,iBAAiB,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAC5C,oBAAC,qBAAqB,oBAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAI,CAC3E,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;YACvB,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"}
@@ -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,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxD,OAA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