@digabi/exam-engine-core 22.0.2 → 22.0.4-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (298) hide show
  1. package/dist/__tests__/EditableGradingInstruction.test.d.ts +1 -1
  2. package/dist/__tests__/EditableGradingInstruction.test.d.ts.map +1 -1
  3. package/dist/__tests__/EditableGradingInstruction.test.js +13 -10
  4. package/dist/__tests__/EditableGradingInstruction.test.js.map +1 -1
  5. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts +2 -0
  6. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts.map +1 -0
  7. package/dist/__tests__/EditableGradingInstructionLocalization.test.js +112 -0
  8. package/dist/__tests__/EditableGradingInstructionLocalization.test.js.map +1 -0
  9. package/dist/__tests__/annotations.test.js +7 -7
  10. package/dist/__tests__/annotations.test.js.map +1 -1
  11. package/dist/__tests__/editor/FormatButton.test.d.ts +2 -0
  12. package/dist/__tests__/editor/FormatButton.test.d.ts.map +1 -0
  13. package/dist/__tests__/editor/FormatButton.test.js +98 -0
  14. package/dist/__tests__/editor/FormatButton.test.js.map +1 -0
  15. package/dist/__tests__/editor/Formula.test.js +27 -9
  16. package/dist/__tests__/editor/Formula.test.js.map +1 -1
  17. package/dist/__tests__/editor/ImageUploadButton.test.d.ts +2 -0
  18. package/dist/__tests__/editor/ImageUploadButton.test.d.ts.map +1 -0
  19. package/dist/__tests__/editor/ImageUploadButton.test.js +94 -0
  20. package/dist/__tests__/editor/ImageUploadButton.test.js.map +1 -0
  21. package/dist/__tests__/editor/List.test.d.ts +2 -0
  22. package/dist/__tests__/editor/List.test.d.ts.map +1 -0
  23. package/dist/__tests__/editor/List.test.js +72 -0
  24. package/dist/__tests__/editor/List.test.js.map +1 -0
  25. package/dist/__tests__/editor/Table.test.d.ts +2 -0
  26. package/dist/__tests__/editor/Table.test.d.ts.map +1 -0
  27. package/dist/__tests__/editor/Table.test.js +172 -0
  28. package/dist/__tests__/editor/Table.test.js.map +1 -0
  29. package/dist/__tests__/editor/br.test.js +2 -6
  30. package/dist/__tests__/editor/br.test.js.map +1 -1
  31. package/dist/__tests__/editor/hr.test.js +2 -6
  32. package/dist/__tests__/editor/hr.test.js.map +1 -1
  33. package/dist/__tests__/editor/{NBSP.test.js → nbsp.test.js} +3 -7
  34. package/dist/__tests__/editor/nbsp.test.js.map +1 -0
  35. package/dist/__tests__/editor/noWrap.test.js +1 -1
  36. package/dist/__tests__/editor/noWrap.test.js.map +1 -1
  37. package/dist/__tests__/editor/spanWithLang.test.d.ts +2 -0
  38. package/dist/__tests__/editor/spanWithLang.test.d.ts.map +1 -0
  39. package/dist/__tests__/editor/{no-wrap.test.js → spanWithLang.test.js} +9 -14
  40. package/dist/__tests__/editor/spanWithLang.test.js.map +1 -0
  41. package/dist/__tests__/editor/subSup.test.d.ts +2 -0
  42. package/dist/__tests__/editor/subSup.test.d.ts.map +1 -0
  43. package/dist/__tests__/editor/subSup.test.js +50 -0
  44. package/dist/__tests__/editor/subSup.test.js.map +1 -0
  45. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  46. package/dist/__tests__/utils/prosemirror.d.ts +0 -1
  47. package/dist/__tests__/utils/prosemirror.d.ts.map +1 -1
  48. package/dist/__tests__/utils/prosemirror.js +0 -8
  49. package/dist/__tests__/utils/prosemirror.js.map +1 -1
  50. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts +2 -0
  51. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts.map +1 -1
  52. package/dist/__tests__/utils/renderEditableGradingInstruction.js +8 -2
  53. package/dist/__tests__/utils/renderEditableGradingInstruction.js.map +1 -1
  54. package/dist/__tests__/utils/util.d.ts +2 -0
  55. package/dist/__tests__/utils/util.d.ts.map +1 -0
  56. package/dist/__tests__/utils/util.js +10 -0
  57. package/dist/__tests__/utils/util.js.map +1 -0
  58. package/dist/components/Localization.d.ts +5 -0
  59. package/dist/components/Localization.d.ts.map +1 -0
  60. package/dist/components/Localization.js +9 -0
  61. package/dist/components/Localization.js.map +1 -0
  62. package/dist/components/context/AnnotationProvider.d.ts +2 -2
  63. package/dist/components/context/AnnotationProvider.d.ts.map +1 -1
  64. package/dist/components/context/AnnotationProvider.js +3 -2
  65. package/dist/components/context/AnnotationProvider.js.map +1 -1
  66. package/dist/components/context/CommonExamContext.d.ts +1 -0
  67. package/dist/components/context/CommonExamContext.d.ts.map +1 -1
  68. package/dist/components/context/CommonExamContext.js +3 -0
  69. package/dist/components/context/CommonExamContext.js.map +1 -1
  70. package/dist/components/context/GradingInstructionContext.d.ts +2 -2
  71. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -1
  72. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  73. package/dist/components/grading-instructions/AnswerGradingInstruction.js +7 -2
  74. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  75. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -1
  76. package/dist/components/grading-instructions/EditableGradingInstruction.js +76 -40
  77. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -1
  78. package/dist/components/grading-instructions/GradingInstruction.d.ts +7 -0
  79. package/dist/components/grading-instructions/GradingInstruction.d.ts.map +1 -0
  80. package/dist/components/grading-instructions/GradingInstruction.js +9 -0
  81. package/dist/components/grading-instructions/GradingInstruction.js.map +1 -0
  82. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +1 -1
  83. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -1
  84. package/dist/components/grading-instructions/GradingInstructionProvider.js +2 -2
  85. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -1
  86. package/dist/components/grading-instructions/GradingInstructions.d.ts +2 -1
  87. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  88. package/dist/components/grading-instructions/GradingInstructions.js +18 -15
  89. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  90. package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts +9 -0
  91. package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts.map +1 -0
  92. package/dist/components/grading-instructions/editor/AttributeToggleButton.js +53 -0
  93. package/dist/components/grading-instructions/editor/AttributeToggleButton.js.map +1 -0
  94. package/dist/components/grading-instructions/editor/CurrentElement.d.ts +2 -0
  95. package/dist/components/grading-instructions/editor/CurrentElement.d.ts.map +1 -0
  96. package/dist/components/grading-instructions/editor/CurrentElement.js +8 -0
  97. package/dist/components/grading-instructions/editor/CurrentElement.js.map +1 -0
  98. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts +7 -0
  99. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +1 -0
  100. package/dist/components/grading-instructions/editor/CurrentLocalization.js +13 -0
  101. package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +1 -0
  102. package/dist/components/grading-instructions/editor/FormatButton.d.ts +0 -1
  103. package/dist/components/grading-instructions/editor/FormatButton.d.ts.map +1 -1
  104. package/dist/components/grading-instructions/editor/FormatButton.js +1 -1
  105. package/dist/components/grading-instructions/editor/FormatButton.js.map +1 -1
  106. package/dist/components/grading-instructions/editor/Formula.d.ts +1 -3
  107. package/dist/components/grading-instructions/editor/Formula.d.ts.map +1 -1
  108. package/dist/components/grading-instructions/editor/Formula.js +1 -41
  109. package/dist/components/grading-instructions/editor/Formula.js.map +1 -1
  110. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts +6 -0
  111. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts.map +1 -0
  112. package/dist/components/grading-instructions/editor/ImageUploadButton.js +77 -0
  113. package/dist/components/grading-instructions/editor/ImageUploadButton.js.map +1 -0
  114. package/dist/components/grading-instructions/editor/List.d.ts +9 -0
  115. package/dist/components/grading-instructions/editor/List.d.ts.map +1 -0
  116. package/dist/components/grading-instructions/editor/List.js +41 -0
  117. package/dist/components/grading-instructions/editor/List.js.map +1 -0
  118. package/dist/components/grading-instructions/editor/Localization.d.ts +3 -0
  119. package/dist/components/grading-instructions/editor/Localization.d.ts.map +1 -0
  120. package/dist/components/grading-instructions/editor/Localization.js +36 -0
  121. package/dist/components/grading-instructions/editor/Localization.js.map +1 -0
  122. package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts +6 -0
  123. package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts.map +1 -0
  124. package/dist/components/grading-instructions/editor/LocalizationButtons.js +14 -0
  125. package/dist/components/grading-instructions/editor/LocalizationButtons.js.map +1 -0
  126. package/dist/components/grading-instructions/editor/NBSP.d.ts.map +1 -1
  127. package/dist/components/grading-instructions/editor/NBSP.js +1 -1
  128. package/dist/components/grading-instructions/editor/NBSP.js.map +1 -1
  129. package/dist/components/grading-instructions/editor/Table.d.ts +4 -3
  130. package/dist/components/grading-instructions/editor/Table.d.ts.map +1 -1
  131. package/dist/components/grading-instructions/editor/Table.js +66 -80
  132. package/dist/components/grading-instructions/editor/Table.js.map +1 -1
  133. package/dist/components/grading-instructions/editor/findNode.d.ts +3 -0
  134. package/dist/components/grading-instructions/editor/findNode.d.ts.map +1 -0
  135. package/dist/components/grading-instructions/editor/findNode.js +10 -0
  136. package/dist/components/grading-instructions/editor/findNode.js.map +1 -0
  137. package/dist/components/grading-instructions/editor/localizatio.d.ts +3 -0
  138. package/dist/components/grading-instructions/editor/localizatio.d.ts.map +1 -0
  139. package/dist/components/grading-instructions/editor/localizatio.js +36 -0
  140. package/dist/components/grading-instructions/editor/localizatio.js.map +1 -0
  141. package/dist/components/grading-instructions/editor/localizationSpan.d.ts +3 -0
  142. package/dist/components/grading-instructions/editor/localizationSpan.d.ts.map +1 -0
  143. package/dist/components/grading-instructions/editor/localizationSpan.js +36 -0
  144. package/dist/components/grading-instructions/editor/localizationSpan.js.map +1 -0
  145. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts +4 -0
  146. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts.map +1 -0
  147. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js +62 -0
  148. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js.map +1 -0
  149. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts +4 -0
  150. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts.map +1 -0
  151. package/dist/components/grading-instructions/editor/schemas/image-schema.js +47 -0
  152. package/dist/components/grading-instructions/editor/schemas/image-schema.js.map +1 -0
  153. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts +4 -0
  154. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts.map +1 -0
  155. package/dist/components/grading-instructions/editor/schemas/imageSchema.js +61 -0
  156. package/dist/components/grading-instructions/editor/schemas/imageSchema.js.map +1 -0
  157. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts +72 -0
  158. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts.map +1 -0
  159. package/dist/components/grading-instructions/editor/schemas/listSchema.js +7 -0
  160. package/dist/components/grading-instructions/editor/schemas/listSchema.js.map +1 -0
  161. package/dist/components/grading-instructions/editor/schemas/localizationSchema.d.ts +3 -0
  162. package/dist/components/grading-instructions/editor/schemas/localizationSchema.d.ts.map +1 -0
  163. package/dist/components/grading-instructions/editor/schemas/localizationSchema.js +39 -0
  164. package/dist/components/grading-instructions/editor/schemas/localizationSchema.js.map +1 -0
  165. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts +3 -0
  166. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts.map +1 -0
  167. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js +19 -0
  168. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js.map +1 -0
  169. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts +3 -0
  170. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts.map +1 -0
  171. package/dist/components/grading-instructions/editor/{spanWithClass.js → schemas/spanWithNowrapSchema.js} +4 -4
  172. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js.map +1 -0
  173. package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts +3 -0
  174. package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts.map +1 -0
  175. package/dist/components/grading-instructions/editor/schemas/subSupSchema.js +23 -0
  176. package/dist/components/grading-instructions/editor/schemas/subSupSchema.js.map +1 -0
  177. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts +3 -0
  178. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts.map +1 -0
  179. package/dist/components/grading-instructions/editor/schemas/tableSchema.js +43 -0
  180. package/dist/components/grading-instructions/editor/schemas/tableSchema.js.map +1 -0
  181. package/dist/components/grading-instructions/editor/spanWithPath.d.ts +3 -0
  182. package/dist/components/grading-instructions/editor/spanWithPath.d.ts.map +1 -0
  183. package/dist/components/grading-instructions/editor/spanWithPath.js +24 -0
  184. package/dist/components/grading-instructions/editor/spanWithPath.js.map +1 -0
  185. package/dist/components/grading-instructions/editor/util.d.ts +6 -0
  186. package/dist/components/grading-instructions/editor/util.d.ts.map +1 -0
  187. package/dist/components/grading-instructions/editor/util.js +10 -0
  188. package/dist/components/grading-instructions/editor/util.js.map +1 -0
  189. package/dist/components/shared/AnnotationMark.d.ts +1 -1
  190. package/dist/components/shared/AnnotationMark.d.ts.map +1 -1
  191. package/dist/components/shared/AnnotationPopup.d.ts +1 -1
  192. package/dist/components/shared/AnnotationPopup.d.ts.map +1 -1
  193. package/dist/components/shared/AnnotationPopup.js +11 -70
  194. package/dist/components/shared/AnnotationPopup.js.map +1 -1
  195. package/dist/components/shared/markText.d.ts +1 -1
  196. package/dist/components/shared/markText.d.ts.map +1 -1
  197. package/dist/components/shared/markText.js.map +1 -1
  198. package/dist/main-bundle.js +1 -1
  199. package/dist/main-bundle.js.LICENSE.txt +1 -1
  200. package/dist/main.css +1 -1
  201. package/package.json +12 -3
  202. package/dist/__tests__/EditableGradingInsatruction.test.d.ts +0 -1
  203. package/dist/__tests__/EditableGradingInsatruction.test.d.ts.map +0 -1
  204. package/dist/__tests__/EditableGradingInsatruction.test.js +0 -2
  205. package/dist/__tests__/EditableGradingInsatruction.test.js.map +0 -1
  206. package/dist/__tests__/editor/NBSP.test.js.map +0 -1
  207. package/dist/__tests__/editor/no-wrap.test.d.ts +0 -2
  208. package/dist/__tests__/editor/no-wrap.test.d.ts.map +0 -1
  209. package/dist/__tests__/editor/no-wrap.test.js.map +0 -1
  210. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts +0 -1
  211. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts.map +0 -1
  212. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js +0 -2
  213. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js.map +0 -1
  214. package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts +0 -1
  215. package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts.map +0 -1
  216. package/dist/__tests__/utils/renderEditableGradingInstructions.js +0 -2
  217. package/dist/__tests__/utils/renderEditableGradingInstructions.js.map +0 -1
  218. package/dist/components/LexicalEditor.d.ts +0 -3
  219. package/dist/components/LexicalEditor.d.ts.map +0 -1
  220. package/dist/components/LexicalEditor.js +0 -44
  221. package/dist/components/LexicalEditor.js.map +0 -1
  222. package/dist/components/RTE.d.ts +0 -3
  223. package/dist/components/RTE.d.ts.map +0 -1
  224. package/dist/components/RTE.js +0 -23
  225. package/dist/components/RTE.js.map +0 -1
  226. package/dist/components/TablePlugin.d.ts +0 -1
  227. package/dist/components/TablePlugin.d.ts.map +0 -1
  228. package/dist/components/TablePlugin.js +0 -2
  229. package/dist/components/TablePlugin.js.map +0 -1
  230. package/dist/components/ToolBarPlugin.d.ts +0 -10
  231. package/dist/components/ToolBarPlugin.d.ts.map +0 -1
  232. package/dist/components/ToolBarPlugin.js +0 -111
  233. package/dist/components/ToolBarPlugin.js.map +0 -1
  234. package/dist/components/context/AnnotationContext.d.ts +0 -8
  235. package/dist/components/context/AnnotationContext.d.ts.map +0 -1
  236. package/dist/components/context/AnnotationContext.js +0 -3
  237. package/dist/components/context/AnnotationContext.js.map +0 -1
  238. package/dist/components/exam/ExamineExam.d.ts +0 -5
  239. package/dist/components/exam/ExamineExam.d.ts.map +0 -1
  240. package/dist/components/exam/ExamineExam.js +0 -20
  241. package/dist/components/exam/ExamineExam.js.map +0 -1
  242. package/dist/components/exam/FinishExam.d.ts +0 -5
  243. package/dist/components/exam/FinishExam.d.ts.map +0 -1
  244. package/dist/components/exam/FinishExam.js +0 -17
  245. package/dist/components/exam/FinishExam.js.map +0 -1
  246. package/dist/components/grading/reactAnnotation.d.ts +0 -4
  247. package/dist/components/grading/reactAnnotation.d.ts.map +0 -1
  248. package/dist/components/grading/reactAnnotation.js +0 -54
  249. package/dist/components/grading/reactAnnotation.js.map +0 -1
  250. package/dist/components/grading-instructions/SlateTableEditor.d.ts +0 -22
  251. package/dist/components/grading-instructions/SlateTableEditor.d.ts.map +0 -1
  252. package/dist/components/grading-instructions/SlateTableEditor.js +0 -44
  253. package/dist/components/grading-instructions/SlateTableEditor.js.map +0 -1
  254. package/dist/components/grading-instructions/SlateUtils.d.ts +0 -5
  255. package/dist/components/grading-instructions/SlateUtils.d.ts.map +0 -1
  256. package/dist/components/grading-instructions/SlateUtils.js +0 -28
  257. package/dist/components/grading-instructions/SlateUtils.js.map +0 -1
  258. package/dist/components/grading-instructions/editor/MathPopup.d.ts +0 -10
  259. package/dist/components/grading-instructions/editor/MathPopup.d.ts.map +0 -1
  260. package/dist/components/grading-instructions/editor/MathPopup.js +0 -94
  261. package/dist/components/grading-instructions/editor/MathPopup.js.map +0 -1
  262. package/dist/components/grading-instructions/editor/math-svg.d.ts +0 -2
  263. package/dist/components/grading-instructions/editor/math-svg.d.ts.map +0 -1
  264. package/dist/components/grading-instructions/editor/math-svg.js +0 -22
  265. package/dist/components/grading-instructions/editor/math-svg.js.map +0 -1
  266. package/dist/components/grading-instructions/editor/math.d.ts +0 -4
  267. package/dist/components/grading-instructions/editor/math.d.ts.map +0 -1
  268. package/dist/components/grading-instructions/editor/math.js +0 -55
  269. package/dist/components/grading-instructions/editor/math.js.map +0 -1
  270. package/dist/components/grading-instructions/editor/noWrap.d.ts +0 -3
  271. package/dist/components/grading-instructions/editor/noWrap.d.ts.map +0 -1
  272. package/dist/components/grading-instructions/editor/noWrap.js +0 -13
  273. package/dist/components/grading-instructions/editor/noWrap.js.map +0 -1
  274. package/dist/components/grading-instructions/editor/spanWithClass.d.ts +0 -3
  275. package/dist/components/grading-instructions/editor/spanWithClass.d.ts.map +0 -1
  276. package/dist/components/grading-instructions/editor/spanWithClass.js.map +0 -1
  277. package/dist/components/grading-instructions/prosemirror.d.ts +0 -8
  278. package/dist/components/grading-instructions/prosemirror.d.ts.map +0 -1
  279. package/dist/components/grading-instructions/prosemirror.js +0 -108
  280. package/dist/components/grading-instructions/prosemirror.js.map +0 -1
  281. package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
  282. package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
  283. package/dist/components/results/isExamFinishPageHook.js +0 -7
  284. package/dist/components/results/isExamFinishPageHook.js.map +0 -1
  285. package/dist/components/shared/CreateAnnotationPopup.d.ts +0 -6
  286. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +0 -1
  287. package/dist/components/shared/CreateAnnotationPopup.js +0 -11
  288. package/dist/components/shared/CreateAnnotationPopup.js.map +0 -1
  289. package/dist/components/shared/PopupUtils.d.ts +0 -4
  290. package/dist/components/shared/PopupUtils.d.ts.map +0 -1
  291. package/dist/components/shared/PopupUtils.js +0 -26
  292. package/dist/components/shared/PopupUtils.js.map +0 -1
  293. package/dist/store/listenerMiddleware.d.ts +0 -89
  294. package/dist/store/listenerMiddleware.d.ts.map +0 -1
  295. package/dist/store/listenerMiddleware.js +0 -6
  296. package/dist/store/listenerMiddleware.js.map +0 -1
  297. /package/dist/__tests__/editor/{NBSP.test.d.ts → nbsp.test.d.ts} +0 -0
  298. /package/dist/__tests__/editor/{NBSP.test.d.ts.map → nbsp.test.d.ts.map} +0 -0
@@ -1,3 +1,2 @@
1
1
  export declare function mockCreateRange(): () => () => Range;
2
- export declare function promisifiedFireEventInput(element: Element, options: object): Promise<void>;
3
2
  //# sourceMappingURL=prosemirror.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosemirror.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/prosemirror.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,sBA2B9B;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAK1E"}
1
+ {"version":3,"file":"prosemirror.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/prosemirror.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,sBA2B9B"}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mockCreateRange = mockCreateRange;
4
- exports.promisifiedFireEventInput = promisifiedFireEventInput;
5
- const react_1 = require("@testing-library/react");
6
4
  function mockCreateRange() {
7
5
  const originalCreateRange = global.window.document.createRange;
8
6
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -29,10 +27,4 @@ function mockCreateRange() {
29
27
  };
30
28
  return () => (global.window.document.createRange = originalCreateRange);
31
29
  }
32
- function promisifiedFireEventInput(element, options) {
33
- return new Promise(resolve => {
34
- react_1.fireEvent.input(element, options);
35
- resolve();
36
- });
37
- }
38
30
  //# sourceMappingURL=prosemirror.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosemirror.js","sourceRoot":"","sources":["../../../__tests__/utils/prosemirror.ts"],"names":[],"mappings":";;AAEA,0CA2BC;AAED,8DAKC;AApCD,kDAAkD;AAElD,SAAgB,eAAe;IAC7B,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAA;IAC9D,6DAA6D;IAC7D,mBAAmB;IACnB,MAAM,CAAC,KAAK,GAAG,SAAS,KAAK,KAAI,CAAC,CAAA;IAElC,MAAM,wBAAwB,GAAG,C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AC9D,6DAA6D;IAC7D,mBAAmB;IACnB,MAAM,CAAC,KAAK,GAAG,SAAS,KAAK,KAAI,CAAC,CAAA;IAElC,MAAM,wBAAwB,GAAG,CAAC,IAAY,EAAE,EAAE;QAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACzC,GAAG,CAAC,SAAS,GAAG,IAAI,CAAA;QACpB,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC,CAAA;IACD,6DAA6D;IAC7D,mBAAmB;IACnB,KAAK,CAAC,SAAS,CAAC,wBAAwB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAA;IAE3F,6DAA6D;IAC7D,mBAAmB;IACnB,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,GAAG,SAAS,WAAW;QACvD,OAAO;YACL,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;YAChB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;YAClB,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAC3C,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE;YACxB,wBAAwB;SACzB,CAAA;IACH,CAAC,CAAA;IACD,OAAO,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,GAAG,mBAAmB,CAAC,CAAA;AACzE,CAAC"}
@@ -1,2 +1,4 @@
1
+ export declare const mockedPermanentUrl = "mocked-permanent-url";
2
+ export declare const mockedResolvedPath = "mock-resolved-path";
1
3
  export declare function renderGradingInstruction(inputData: string, onContentChangeMock?: () => void): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
2
4
  //# sourceMappingURL=renderEditableGradingInstruction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderEditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/renderEditableGradingInstruction.tsx"],"names":[],"mappings":"AAKA,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,mBAAmB,aAAW,gIAWzF"}
1
+ {"version":3,"file":"renderEditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/renderEditableGradingInstruction.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB,yBAAyB,CAAA;AACxD,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AAMtD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,mBAAmB,aAAW,gIAezF"}
@@ -3,14 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.mockedResolvedPath = exports.mockedPermanentUrl = void 0;
6
7
  exports.renderGradingInstruction = renderGradingInstruction;
7
8
  const react_1 = require("@testing-library/react");
8
9
  const GradingInstructionProvider_1 = require("../../src/components/grading-instructions/GradingInstructionProvider");
9
10
  const EditableGradingInstruction_1 = __importDefault(require("../../src/components/grading-instructions/EditableGradingInstruction"));
10
11
  const react_2 = __importDefault(require("react"));
12
+ const CommonExamContext_1 = require("../../src/components/context/CommonExamContext");
13
+ exports.mockedPermanentUrl = 'mocked-permanent-url';
14
+ exports.mockedResolvedPath = 'mock-resolved-path';
15
+ const WrappedGradingInstructionProvider = (0, CommonExamContext_1.withCommonExamContext)(GradingInstructionProvider_1.GradingInstructionProvider);
11
16
  function renderGradingInstruction(inputData, onContentChangeMock = () => { }) {
12
17
  const doc = new DOMParser().parseFromString(inputData, 'text/html');
13
- return (0, react_1.render)(react_2.default.createElement(GradingInstructionProvider_1.GradingInstructionProvider, { editable: true, onContentChange: onContentChangeMock, saveScreenshot: () => Promise.resolve('') },
14
- react_2.default.createElement(EditableGradingInstruction_1.default, { element: doc.documentElement })));
18
+ return (0, react_1.render)(react_2.default.createElement(WrappedGradingInstructionProvider, { editable: true, onContentChange: onContentChangeMock, onSaveImage: () => Promise.resolve(exports.mockedPermanentUrl), answers: [], attachmentsURL: "", resolveAttachment: filename => `/${exports.mockedResolvedPath}/${filename}`, doc: doc },
19
+ react_2.default.createElement(EditableGradingInstruction_1.default, { element: doc.documentElement }),
20
+ "x"));
15
21
  }
16
22
  //# sourceMappingURL=renderEditableGradingInstruction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderEditableGradingInstruction.js","sourceRoot":"","sources":["../../../__tests__/utils/renderEditableGradingInstruction.tsx"],"names":[],"mappings":";;;;;AAKA,4DAWC;AAhBD,kDAA+C;AAC/C,qHAAiH;AACjH,sIAA6G;AAC7G,kDAAyB;AAEzB,SAAgB,wBAAwB,CAAC,SAAiB,EAAE,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC;IACxF,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IACnE,OAAO,IAAA,cAAM,EACX,8BAAC,uDAA0B,IACzB,QAAQ,EAAE,IAAI,EACd,eAAe,EAAE,mBAAmB,EACpC,cAAc,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAEzC,8BAAC,oCAA0B,IAAC,OAAO,EAAE,GAAG,CAAC,eAAe,GAAI,CACjC,CAC9B,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"renderEditableGradingInstruction.js","sourceRoot":"","sources":["../../../__tests__/utils/renderEditableGradingInstruction.tsx"],"names":[],"mappings":";;;;;;AAeA,4DAeC;AA9BD,kDAA+C;AAC/C,qHAAiH;AACjH,sIAA6G;AAC7G,kDAAyB;AACzB,sFAAsF;AAIzE,QAAA,kBAAkB,GAAG,sBAAsB,CAAA;AAC3C,QAAA,kBAAkB,GAAG,oBAAoB,CAAA;AAEtD,MAAM,iCAAiC,GAAG,IAAA,yCAAqB,EAC7D,uDAA0B,CAC3B,CAAA;AAED,SAAgB,wBAAwB,CAAC,SAAiB,EAAE,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC;IACxF,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IACnE,OAAO,IAAA,cAAM,EACX,8BAAC,iCAAiC,IAChC,QAAQ,EAAE,IAAI,EACd,eAAe,EAAE,mBAAmB,EACpC,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,0BAAkB,CAAC,EACtD,OAAO,EAAE,EAAE,EACX,cAAc,EAAC,EAAE,EACjB,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,0BAAkB,IAAI,QAAQ,EAAE,EACnE,GAAG,EAAE,GAAG;QAER,8BAAC,oCAA0B,IAAC,OAAO,EAAE,GAAG,CAAC,eAAe,GAAI;YAC1B,CACrC,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function insertText(element: HTMLElement, text: string): void;
2
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/util.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,QAI5D"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.insertText = insertText;
4
+ const react_1 = require("@testing-library/react");
5
+ function insertText(element, text) {
6
+ react_1.fireEvent.input(element, {
7
+ target: { innerText: text, innerHTML: text }
8
+ });
9
+ }
10
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../__tests__/utils/util.ts"],"names":[],"mappings":";;AAEA,gCAIC;AAND,kDAAkD;AAElD,SAAgB,UAAU,CAAC,OAAoB,EAAE,IAAY;IAC3D,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare const Localization: React.FunctionComponent<ExamComponentProps>;
4
+ export default Localization;
5
+ //# sourceMappingURL=Localization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../src/components/Localization.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAI9D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAW7D,CAAA;AACD,eAAe,YAAY,CAAA"}
@@ -0,0 +1,9 @@
1
+ import React, { useContext } from 'react';
2
+ import { GradingInstructionContext } from './context/GradingInstructionContext';
3
+ import EditableGradingInstruction from './grading-instructions/EditableGradingInstruction';
4
+ const Localization = ({ element, renderChildNodes }) => {
5
+ const { editable } = useContext(GradingInstructionContext);
6
+ return (React.createElement("div", { className: "e-exam-grading-instruction-localization notification e-pad-4", "data-annotation-anchor": "exam-grading-instruction-localization" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
7
+ };
8
+ export default Localization;
9
+ //# sourceMappingURL=Localization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/components/Localization.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,0BAA0B,MAAM,mDAAmD,CAAA;AAE1F,MAAM,YAAY,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAClG,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IAE1D,OAAO,CACL,6BACE,SAAS,EAAC,8DAA8D,4BACjD,uCAAuC,IAE7D,QAAQ,CAAC,CAAC,CAAC,oBAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CACpF,CACP,CAAA;AACH,CAAC,CAAA;AACD,eAAe,YAAY,CAAA"}
@@ -12,8 +12,8 @@ export interface RenderableAnnotationProps {
12
12
  export interface AnnotationContextType extends RenderableAnnotationProps {
13
13
  newAnnotation: NewExamAnnotation | null;
14
14
  setNewAnnotation: (a: NewExamAnnotation | null) => void;
15
- newAnnotationRef: HTMLElement | undefined;
16
- setNewAnnotationRef: (ref: HTMLElement | undefined) => void;
15
+ newAnnotationRef: HTMLElement | null;
16
+ setNewAnnotationRef: (ref: HTMLElement | null) => void;
17
17
  }
18
18
  export declare const AnnotationContext: React.Context<AnnotationContextType>;
19
19
  export declare const AnnotationProvider: ({ children, annotations, onClickAnnotation, onSaveAnnotation }: Props & AnnotationProps) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationProvider.d.ts","sourceRoot":"","sources":["../../../src/components/context/AnnotationProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAA;IACnD,i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AAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5E;AAED,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB;IACtE,aAAa,EAAE,iBAAiB,GAAG,IAAI,CAAA;IACvC,gBAAgB,EAAE,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAA;IACvD,gBAAgB,EAAE,WAAW,GAAG,IAAI,CAAA;IACpC,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACvD;AAED,eAAO,MAAM,iBAAiB,sCAAmD,CAAA;AAEjF,eAAO,MAAM,kBAAkB,mEAK5B,KAAK,GAAG,eAAe,iGA2DzB,CAAA"}
@@ -5,15 +5,16 @@ import { AnnotationPopup } from '../shared/AnnotationPopup';
5
5
  export const AnnotationContext = React.createContext({});
6
6
  export const AnnotationProvider = ({ children, annotations, onClickAnnotation, onSaveAnnotation }) => {
7
7
  const [newAnnotation, setNewAnnotation] = React.useState(null);
8
- const [newAnnotationRef, setNewAnnotationRef] = React.useState();
8
+ const [newAnnotationRef, setNewAnnotationRef] = React.useState(null);
9
9
  const mouseUpCallback = (annotation) => {
10
10
  setNewAnnotation(annotation);
11
11
  };
12
12
  function onMouseDown(e) {
13
13
  const target = e.target;
14
- const clickIsInPopup = !!target.closest('.annotation-popup');
14
+ const clickIsInPopup = !!target.closest('.e-popup');
15
15
  if (!clickIsInPopup) {
16
16
  setNewAnnotation(null);
17
+ setNewAnnotationRef(null);
17
18
  }
18
19
  onMouseDownForAnnotation(e, mouseUpCallback);
19
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationProvider.js","sourceRoot":"","sources":["../../../src/components/context/AnnotationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCA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AK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAA;QAC5C,OAAO;YACL,GAAG,CAAC;YACJ,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YAClD,MAAM,EAAE,CAAC,CAAC,MAAM;SACjB,CAAA;IACH,CAAC,CAAC,CACH,KAAI,EAAE,EACP,kBAAkB,CACnB,EACH,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAC9B,CAAA;IAED,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACL,WAAW,EAAE,sCAAsC;YACnD,iBAAiB;YACjB,gBAAgB;YAChB,aAAa;YACb,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;SACpB;QAED,8BAAM,WAAW,EAAE,WAAW;YAC5B,oBAAC,eAAe,OAAG;YAClB,QAAQ,CACJ,CACoB,CAC9B,CAAA;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"AnnotationProvider.js","sourceRoot":"","sources":["../../../src/components/context/AnnotationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAmB3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,EAA2B,CAAC,CAAA;AAEjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACQ,EAAE,EAAE;IAC5B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA2B,IAAI,CAA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C,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAC9B,CAAA;IAED,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACL,WAAW,EAAE,sCAAsC;YACnD,iBAAiB;YACjB,gBAAgB;YAChB,aAAa;YACb,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;SACpB;QAED,8BAAM,WAAW,EAAE,WAAW;YAC5B,oBAAC,eAAe,OAAG;YAClB,QAAQ,CACJ,CACoB,CAC9B,CAAA;AACH,CAAC,CAAA"}
@@ -8,6 +8,7 @@ export interface CommonExamContext {
8
8
  examCode?: string;
9
9
  /** The language of the exam. */
10
10
  language: string;
11
+ examType: string;
11
12
  /** The language of the subject matter. Differs from the language in foreign language exams. */
12
13
  subjectLanguage: string;
13
14
  maxAnswers?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"CommonExamContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG9C,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAA;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,+FAA+F;IAC/F,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAA;AAE7E,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,eAAe,EAC7D,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAChC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAuBxB"}
1
+ {"version":3,"file":"CommonExamContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG9C,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAA;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,+FAA+F;IAC/F,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAA;AAE7E,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,eAAe,EAC7D,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAChC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAyBxB"}
@@ -4,9 +4,11 @@ import { withContext } from './withContext';
4
4
  export const CommonExamContext = React.createContext({});
5
5
  export function withCommonExamContext(Component) {
6
6
  return withContext(CommonExamContext, ({ attachmentsURL, resolveAttachment, doc, abitti2 }) => {
7
+ var _a;
7
8
  const root = doc.documentElement;
8
9
  const maybeDate = getAttribute(root, 'date');
9
10
  const language = getAttribute(root, 'exam-lang');
11
+ const examType = (_a = getAttribute(root, 'exam-type')) !== null && _a !== void 0 ? _a : 'normal';
10
12
  const subjectLanguage = getAttribute(root, 'lang') || language;
11
13
  return {
12
14
  attachmentsURL,
@@ -16,6 +18,7 @@ export function withCommonExamContext(Component) {
16
18
  examCode: getAttribute(root, 'exam-code'),
17
19
  language,
18
20
  subjectLanguage,
21
+ examType,
19
22
  maxAnswers: getNumericAttribute(root, 'max-answers'),
20
23
  maxScore: getNumericAttribute(root, 'max-score'),
21
24
  sections: queryAll(root, 'section'),
@@ -1 +1 @@
1
- {"version":3,"file":"CommonExamContext.js","sourceRoot":"","sources":["../../../src/components/context/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAoB3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,EAAuB,CAAC,CAAA;AAE7E,MAAM,UAAU,qBAAqB,CACnC,SAAiC;IAEjC,OAAO,WAAW,CAAuB,iBAAiB,EAAE,CAAC,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QAClH,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAA;QAChC,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAC5C,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,WAAW,CAAE,CAAA;QACjD,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,C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AG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAC5C,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,WAAW,CAAE,CAAA;QACjD,MAAM,QAAQ,GAAG,MAAA,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,mCAAI,QAAQ,CAAA;QAC5D,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAA;QAE9D,OAAO;YACL,cAAc;YACd,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,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC;YACvC,QAAQ,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC;YACzC,QAAQ;YACR,eAAe;YACf,QAAQ;YACR,UAAU,EAAE,mBAAmB,CAAC,IAAI,EAAE,aAAa,CAAC;YACpD,QAAQ,EAAE,mBAAmB,CAAC,IAAI,EAAE,WAAW,CAAC;YAChD,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;YACnC,iBAAiB;YACjB,OAAO,EAAE,OAAO,IAAI,KAAK;YACzB,IAAI;SACL,CAAA;IACH,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;AACf,CAAC"}
@@ -5,12 +5,12 @@ export interface GradingInstructionPropsBase {
5
5
  export interface EditableProps extends GradingInstructionPropsBase {
6
6
  editable: true;
7
7
  onContentChange: (answerHTML: string, path: string) => void;
8
- saveScreenshot: (type: string, data: Buffer, displayNumber?: string) => Promise<string>;
8
+ onSaveImage: (file: File, displayNumber?: string) => Promise<string>;
9
9
  }
10
10
  export interface NotEditableProps extends GradingInstructionPropsBase {
11
11
  editable?: false;
12
12
  onContentChange?: never;
13
- saveScreenshot?: never;
13
+ onSaveImage?: never;
14
14
  }
15
15
  export type GradingInstructionProps = EditableProps | NotEditableProps;
16
16
  export declare const GradingInstructionContext: React.Context<GradingInstructionProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,2BAA2B;IAChE,QAAQ,EAAE,IAAI,CAAA;IACd,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3D,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACxF;AAED,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B;IACnE,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,cAAc,CAAC,EAAE,KAAK,CAAA;CACvB;AAED,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAEtE,eAAO,MAAM,yBAAyB,wCAAqD,CAAA"}
1
+ {"version":3,"file":"GradingInstructionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,2BAA2B;IAChE,QAAQ,EAAE,IAAI,CAAA;IACd,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3D,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACrE;AAED,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B;IACnE,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB;AAED,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAEtE,eAAO,MAAM,yBAAyB,wCAAqD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnswerGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAIzE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
1
+ {"version":3,"file":"AnswerGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAOzE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,4 +1,9 @@
1
- import React from 'react';
2
- const AnswerGradingInstruction = ({ element, renderChildNodes }) => (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, renderChildNodes(element)));
1
+ import React, { useContext } from 'react';
2
+ import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
+ import EditableGradingInstruction from './EditableGradingInstruction';
4
+ const AnswerGradingInstruction = ({ element, renderChildNodes }) => {
5
+ const { editable } = useContext(GradingInstructionContext);
6
+ return (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
7
+ };
3
8
  export default AnswerGradingInstruction;
4
9
  //# sourceMappingURL=AnswerGradingInstruction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnswerGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAC/G,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AAED,eAAe,wBAAwB,CAAA"}
1
+ {"version":3,"file":"AnswerGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,0BAA0B,MAAM,8BAA8B,CAAA;AAErE,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC9G,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IAC1D,OAAO,CACL,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,QAAQ,CAAC,CAAC,CAAC,oBAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CACpF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;AAkE9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBA0CpE;AAED,eAAe,0BAA0B,CAAA"}
1
+ {"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;AAwE9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBAoFpE;AAED,eAAe,0BAA0B,CAAA"}
@@ -6,77 +6,113 @@ import { GradingInstructionContext } from '../context/GradingInstructionContext'
6
6
  import { ProseMirror } from '@nytimes/react-prosemirror';
7
7
  import { DOMParser as ProseDOMParser, DOMSerializer, Schema } from 'prosemirror-model';
8
8
  import { keymap } from 'prosemirror-keymap';
9
- import { FormulaButton, formulaOutputSchema, FormulaPlugin, formulaSchema } from './editor/Formula';
10
- import { TableMenu, tableSchema } from './editor/Table';
9
+ import { FormulaButton, FormulaPlugin } from './editor/Formula';
10
+ import { TableMenu, tablePlugin } from './editor/Table';
11
11
  import { FormulaPopup } from './editor/FormulaPopup';
12
12
  import FormatButton from './editor/FormatButton';
13
13
  import { NbspButton, nbspPlugin } from './editor/NBSP';
14
- import { spanWithNowrap } from './editor/spanWithNowrap';
15
- import { faBold, faItalic } from '@fortawesome/free-solid-svg-icons';
16
- const schema = new Schema({
17
- nodes: baseSchema.spec.nodes.append(formulaSchema).append(tableSchema),
18
- marks: baseSchema.spec.marks.append(spanWithNowrap)
19
- });
20
- const outputSchema = new Schema({
21
- nodes: baseSchema.spec.nodes.append(formulaOutputSchema).append(tableSchema),
22
- marks: baseSchema.spec.marks.append(spanWithNowrap)
23
- });
14
+ import { ImageUploadButton } from './editor/ImageUploadButton';
15
+ import { imageInputSchema, imageOutputSchema } from './editor/schemas/imageSchema';
16
+ import { CommonExamContext } from '../context/CommonExamContext';
17
+ import { faBold, faItalic, faList, faListOl } from '@fortawesome/free-solid-svg-icons';
18
+ import { formulaOutputSchema, formulaSchema } from './editor/schemas/formulaSchema';
19
+ import { tableSchema } from './editor/schemas/tableSchema';
20
+ import { spanWithNowrapSchema } from './editor/schemas/spanWithNowrapSchema';
21
+ import { localizationSchema } from './editor/schemas/localizationSchema';
22
+ import { listSchema } from './editor/schemas/listSchema';
23
+ import { createListPlugin, ListButton } from './editor/List';
24
+ import { subSupSchema } from './editor/schemas/subSupSchema';
25
+ import { spanWithLangSchema } from './editor/schemas/spanWithLangSchema';
24
26
  function Menu(props) {
25
- const [isFixed, setIsFixed] = useState(false);
27
+ const { onSaveImage } = useContext(GradingInstructionContext);
28
+ const [isFloating, setIsFloating] = useState(false);
26
29
  useEffect(() => {
27
30
  const handleScroll = () => {
28
- if (!props.textAreaElement) {
29
- return;
30
- }
31
- const rect = props.textAreaElement.getBoundingClientRect();
31
+ const rect = props.editorElement.getBoundingClientRect();
32
32
  if (rect.top < 25 && rect.bottom > 100) {
33
- setIsFixed(true);
33
+ setIsFloating(true);
34
34
  }
35
35
  else {
36
- setIsFixed(false);
36
+ setIsFloating(false);
37
37
  }
38
38
  };
39
39
  window.addEventListener('scroll', handleScroll);
40
40
  return () => {
41
41
  window.removeEventListener('scroll', handleScroll);
42
42
  };
43
- }, [props.textAreaElement]);
43
+ }, []);
44
44
  return (React.createElement(React.Fragment, null,
45
45
  React.createElement("div", { className: "editor-menu-placeholder" },
46
- React.createElement("div", { className: `editor-menu ${isFixed ? 'fixed' : ''}` },
46
+ React.createElement("div", { className: `editor-menu ${isFloating ? 'floating' : ''}` },
47
47
  React.createElement(FormatButton, { markName: "strong", icon: faBold }),
48
48
  React.createElement(FormatButton, { markName: "em", icon: faItalic }),
49
49
  React.createElement("span", { className: "editor-menu-separator" }),
50
- React.createElement(FormulaButton, { setFormulaState: props.setFormulaState }),
50
+ React.createElement(ListButton, { nodeType: props.schema.nodes.bullet_list, icon: faList }),
51
+ React.createElement(ListButton, { nodeType: props.schema.nodes.ordered_list, icon: faListOl }),
52
+ onSaveImage && React.createElement(ImageUploadButton, { saveImage: onSaveImage }),
53
+ React.createElement("span", { className: "editor-menu-separator" }),
54
+ React.createElement(FormulaButton, { disabled: !!props.formulaState, setFormulaState: props.setFormulaState }),
51
55
  React.createElement("span", { className: "editor-menu-separator" }),
52
- React.createElement(TableMenu, null),
56
+ React.createElement(TableMenu, { dropdownsBelow: isFloating }),
53
57
  React.createElement("span", { className: "editor-menu-separator" }),
54
58
  React.createElement(NbspButton, null)))));
55
59
  }
56
60
  function EditableGradingInstruction({ element }) {
57
61
  const { onContentChange } = useContext(GradingInstructionContext);
58
- const doc = ProseDOMParser.fromSchema(schema).parse(element);
62
+ const { resolveAttachment } = useContext(CommonExamContext);
63
+ const inputSchema = new Schema({
64
+ nodes: baseSchema.spec.nodes
65
+ .append(formulaSchema)
66
+ .append(tableSchema)
67
+ .append(listSchema)
68
+ .update('image', imageInputSchema(resolveAttachment))
69
+ .append(localizationSchema(true, 'inline'))
70
+ .append(localizationSchema(true, 'block')),
71
+ marks: baseSchema.spec.marks.append(spanWithNowrapSchema).append(subSupSchema).append(spanWithLangSchema)
72
+ });
73
+ const outputSchema = new Schema({
74
+ nodes: baseSchema.spec.nodes
75
+ .append(formulaOutputSchema)
76
+ .append(tableSchema)
77
+ .append(listSchema)
78
+ .update('image', imageOutputSchema)
79
+ .append(localizationSchema(false, 'inline'))
80
+ .append(localizationSchema(false, 'block')),
81
+ marks: baseSchema.spec.marks.append(spanWithNowrapSchema).append(subSupSchema).append(spanWithLangSchema)
82
+ });
83
+ const doc = ProseDOMParser.fromSchema(inputSchema).parse(element);
59
84
  const [mount, setMount] = useState(null);
60
85
  const [formulaState, setFormulaState] = useState(null);
61
86
  const formulaPlugin = new FormulaPlugin(setFormulaState);
62
- const [state, setState] = useState(EditorState.create({ schema, doc, plugins: [keymap(baseKeymap), formulaPlugin, nbspPlugin] }));
87
+ const [state, setState] = useState(EditorState.create({
88
+ schema: inputSchema,
89
+ doc,
90
+ plugins: [tablePlugin(), createListPlugin(inputSchema), keymap(baseKeymap), formulaPlugin, nbspPlugin]
91
+ }));
63
92
  return (React.createElement(ProseMirror, { mount: mount, state: state, dispatchTransaction: tr => {
64
- var _a;
65
- setState(s => s.apply(tr));
66
- const fragment = DOMSerializer.fromSchema(outputSchema).serializeFragment(tr.doc.content);
67
- const div = document.createElement('div');
68
- div.appendChild(fragment);
69
- const path = (_a = element.getAttribute('path')) !== null && _a !== void 0 ? _a : '';
70
- if (onContentChange) {
71
- const nbspFixed = div.innerHTML
72
- .replace(/&nbsp;/g, '&#160;')
73
- .replace(/<br>/g, '<br/>')
74
- .replace(/<hr>/g, '<hr/>');
75
- onContentChange(nbspFixed, path);
76
- }
93
+ setState(s => {
94
+ var _a;
95
+ const newContent = s.apply(tr);
96
+ if (tr.docChanged) {
97
+ const fragment = DOMSerializer.fromSchema(outputSchema).serializeFragment(tr.doc.content);
98
+ const div = document.createElement('div');
99
+ div.appendChild(fragment);
100
+ const path = (_a = element.getAttribute('path')) !== null && _a !== void 0 ? _a : '';
101
+ if (onContentChange) {
102
+ const fixedHtml = div.innerHTML
103
+ .replace(/&nbsp;/g, '&#160;')
104
+ .replace(/<br>/g, '<br/>')
105
+ .replace(/<hr>/g, '<hr/>')
106
+ .replace(/&amp;gt;/g, '&gt;')
107
+ .replace(/&amp;lt;/g, '&lt;');
108
+ onContentChange(fixedHtml, path);
109
+ }
110
+ }
111
+ return newContent;
112
+ });
77
113
  } },
78
- React.createElement(Menu, { setFormulaState: setFormulaState, textAreaElement: mount }),
79
- React.createElement("div", { className: "ProseMirror-focused", ref: setMount }),
114
+ mount && (React.createElement(Menu, { schema: inputSchema, formulaState: formulaState, setFormulaState: setFormulaState, editorElement: mount })),
115
+ React.createElement("div", { ref: setMount }),
80
116
  formulaState && (React.createElement(FormulaPopup, { state: formulaState, onFinish: () => {
81
117
  setFormulaState(null);
82
118
  } }))));
@@ -1 +1 @@
1
- {"version":3,"file":"EditableGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAsB,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAEpE,M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AW,EACnB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,KAAK,GACpB,CACH;QACD,6BAAK,GAAG,EAAE,QAAQ,GAAI;QAErB,YAAY,IAAI,CACf,oBAAC,YAAY,IACX,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,GAAG,EAAE;gBACb,eAAe,CAAC,IAAI,CAAC,CAAA;YACvB,CAAC,GACD,CACH,CACW,CACf,CAAA;AACH,CAAC;AAED,eAAe,0BAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const GradingInstruction: React.FunctionComponent<{
3
+ element: Element;
4
+ instructionType: string;
5
+ }>;
6
+ export default GradingInstruction;
7
+ //# sourceMappingURL=GradingInstruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAO9F,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { createRenderChildNodes } from '../../createRenderChildNodes';
3
+ import Localization from '../Localization';
4
+ const renderChildNodes = createRenderChildNodes({
5
+ 'e:localization': Localization
6
+ });
7
+ const GradingInstruction = ({ element, instructionType }) => (React.createElement("div", { className: `${instructionType} e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2` }, renderChildNodes(element)));
8
+ export default GradingInstruction;
9
+ //# sourceMappingURL=GradingInstruction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;IAC9C,gBAAgB,EAAE,YAAY;CAC/B,CAAC,CAAA;AAEF,MAAM,kBAAkB,GAA2E,CAAC,EAClG,OAAO,EACP,eAAe,EAChB,EAAE,EAAE,CAAC,CACJ,6BAAK,SAAS,EAAE,GAAG,eAAe,sDAAsD,IACrF,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { GradingInstructionProps } from '../context/GradingInstructionContext';
3
- export declare const GradingInstructionProvider: ({ editable, onContentChange, saveScreenshot, children }: GradingInstructionProps) => React.JSX.Element;
3
+ export declare const GradingInstructionProvider: ({ editable, onContentChange, onSaveImage, children }: GradingInstructionProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=GradingInstructionProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionProvider.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA6B,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAEzG,eAAO,MAAM,0BAA0B,4DAKpC,uBAAuB,sBAGzB,CAAA"}
1
+ {"version":3,"file":"GradingInstructionProvider.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA6B,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAEzG,eAAO,MAAM,0BAA0B,yDAKpC,uBAAuB,sBAGzB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
- export const GradingInstructionProvider = ({ editable, onContentChange, saveScreenshot, children }) => {
4
- const contextValue = editable ? { editable, onContentChange, saveScreenshot } : { editable };
3
+ export const GradingInstructionProvider = ({ editable, onContentChange, onSaveImage, children }) => {
4
+ const contextValue = editable ? { editable, onContentChange, onSaveImage } : { editable };
5
5
  return React.createElement(GradingInstructionContext.Provider, { value: contextValue }, children);
6
6
  };
7
7
  //# sourceMappingURL=GradingInstructionProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionProvider.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAA2B,MAAM,sCAAsC,CAAA;AAEzG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,QAAQ,EACR,eAAe,EACf,cAAc,EACd,QAAQ,EACgB,EAAE,EAAE;IAC5B,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC5F,OAAO,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAsC,CAAA;AACjH,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructionProvider.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAA2B,MAAM,sCAAsC,CAAA;AAEzG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,QAAQ,EACR,eAAe,EACf,WAAW,EACX,QAAQ,EACgB,EAAE,EAAE;IAC5B,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAA;IACzF,OAAO,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAsC,CAAA;AACjH,CAAC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { AnnotationProps, CommonExamProps } from '../exam/Exam';
3
+ import { GradingInstructionProps } from '../context/GradingInstructionContext';
3
4
  export declare const GradingInstructionsPageTitle: React.FunctionComponent;
4
- declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps>>;
5
+ declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps & GradingInstructionProps>>;
5
6
  export default _default;
6
7
  //# sourceMappingURL=GradingInstructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructions.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAcpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AA8H/D,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;AAED,wBAAqE"}
1
+ {"version":3,"file":"GradingInstructions.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAcpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAoB/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAmH9E,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;AAED,wBAAqE"}