@digabi/exam-engine-core 22.1.7-alpha.1 → 22.2.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (273) hide show
  1. package/dist/__tests__/annotations.test.js +4 -3
  2. package/dist/__tests__/annotations.test.js.map +1 -1
  3. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  4. package/dist/components/context/AttachmentContext.d.ts.map +1 -1
  5. package/dist/components/context/ExamContext.d.ts.map +1 -1
  6. package/dist/components/context/GradingInstructionContext.d.ts +6 -11
  7. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -1
  8. package/dist/components/context/GradingInstructionContext.js.map +1 -1
  9. package/dist/components/context/QuestionContext.d.ts.map +1 -1
  10. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  11. package/dist/components/context/SectionContext.d.ts.map +1 -1
  12. package/dist/components/exam/RichTextAnswer.d.ts +2 -9
  13. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  14. package/dist/components/exam/RichTextAnswer.js +14 -33
  15. package/dist/components/exam/RichTextAnswer.js.map +1 -1
  16. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  17. package/dist/components/grading-instructions/AnswerGradingInstruction.js +4 -3
  18. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  19. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +1 -1
  20. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -1
  21. package/dist/components/grading-instructions/GradingInstructionProvider.js +1 -4
  22. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -1
  23. package/dist/components/grading-instructions/GradingInstructions.d.ts +6 -2
  24. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  25. package/dist/components/grading-instructions/GradingInstructions.js +2 -3
  26. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  27. package/dist/components/shared/Popup.d.ts +0 -1
  28. package/dist/components/shared/Popup.d.ts.map +1 -1
  29. package/dist/components/shared/Popup.js +14 -27
  30. package/dist/components/shared/Popup.js.map +1 -1
  31. package/dist/dom-utils.d.ts.map +1 -1
  32. package/dist/dom-utils.js +4 -2
  33. package/dist/dom-utils.js.map +1 -1
  34. package/dist/main-bundle.js +356 -1
  35. package/dist/main-bundle.js.LICENSE.txt +11 -1
  36. package/dist/main.css +1 -1
  37. package/package.json +5 -14
  38. package/dist/__tests__/EditableGradingInsatruction.test.d.ts +0 -1
  39. package/dist/__tests__/EditableGradingInsatruction.test.d.ts.map +0 -1
  40. package/dist/__tests__/EditableGradingInsatruction.test.js +0 -2
  41. package/dist/__tests__/EditableGradingInsatruction.test.js.map +0 -1
  42. package/dist/__tests__/EditableGradingInstruction.test.d.ts +0 -2
  43. package/dist/__tests__/EditableGradingInstruction.test.d.ts.map +0 -1
  44. package/dist/__tests__/EditableGradingInstruction.test.js +0 -174
  45. package/dist/__tests__/EditableGradingInstruction.test.js.map +0 -1
  46. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts +0 -2
  47. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts.map +0 -1
  48. package/dist/__tests__/EditableGradingInstructionLocalization.test.js +0 -75
  49. package/dist/__tests__/EditableGradingInstructionLocalization.test.js.map +0 -1
  50. package/dist/__tests__/FormatButton.test.d.ts +0 -2
  51. package/dist/__tests__/FormatButton.test.d.ts.map +0 -1
  52. package/dist/__tests__/FormatButton.test.js +0 -94
  53. package/dist/__tests__/FormatButton.test.js.map +0 -1
  54. package/dist/__tests__/editor/FormatButton.test.d.ts +0 -2
  55. package/dist/__tests__/editor/FormatButton.test.d.ts.map +0 -1
  56. package/dist/__tests__/editor/FormatButton.test.js +0 -98
  57. package/dist/__tests__/editor/FormatButton.test.js.map +0 -1
  58. package/dist/__tests__/editor/Formula.test.d.ts +0 -2
  59. package/dist/__tests__/editor/Formula.test.d.ts.map +0 -1
  60. package/dist/__tests__/editor/Formula.test.js +0 -50
  61. package/dist/__tests__/editor/Formula.test.js.map +0 -1
  62. package/dist/__tests__/editor/ImageUploadButton.test.d.ts +0 -2
  63. package/dist/__tests__/editor/ImageUploadButton.test.d.ts.map +0 -1
  64. package/dist/__tests__/editor/ImageUploadButton.test.js +0 -69
  65. package/dist/__tests__/editor/ImageUploadButton.test.js.map +0 -1
  66. package/dist/__tests__/editor/List.test.d.ts +0 -2
  67. package/dist/__tests__/editor/List.test.d.ts.map +0 -1
  68. package/dist/__tests__/editor/List.test.js +0 -72
  69. package/dist/__tests__/editor/List.test.js.map +0 -1
  70. package/dist/__tests__/editor/NBSP.test.d.ts +0 -2
  71. package/dist/__tests__/editor/NBSP.test.d.ts.map +0 -1
  72. package/dist/__tests__/editor/NBSP.test.js +0 -55
  73. package/dist/__tests__/editor/NBSP.test.js.map +0 -1
  74. package/dist/__tests__/editor/Table.test.d.ts +0 -2
  75. package/dist/__tests__/editor/Table.test.d.ts.map +0 -1
  76. package/dist/__tests__/editor/Table.test.js +0 -172
  77. package/dist/__tests__/editor/Table.test.js.map +0 -1
  78. package/dist/__tests__/editor/br.test.d.ts +0 -2
  79. package/dist/__tests__/editor/br.test.d.ts.map +0 -1
  80. package/dist/__tests__/editor/br.test.js +0 -39
  81. package/dist/__tests__/editor/br.test.js.map +0 -1
  82. package/dist/__tests__/editor/hr.test.d.ts +0 -2
  83. package/dist/__tests__/editor/hr.test.d.ts.map +0 -1
  84. package/dist/__tests__/editor/hr.test.js +0 -39
  85. package/dist/__tests__/editor/hr.test.js.map +0 -1
  86. package/dist/__tests__/editor/no-wrap.test.d.ts +0 -2
  87. package/dist/__tests__/editor/no-wrap.test.d.ts.map +0 -1
  88. package/dist/__tests__/editor/no-wrap.test.js +0 -43
  89. package/dist/__tests__/editor/no-wrap.test.js.map +0 -1
  90. package/dist/__tests__/editor/noWrap.test.d.ts +0 -2
  91. package/dist/__tests__/editor/noWrap.test.d.ts.map +0 -1
  92. package/dist/__tests__/editor/noWrap.test.js +0 -62
  93. package/dist/__tests__/editor/noWrap.test.js.map +0 -1
  94. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts +0 -1
  95. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts.map +0 -1
  96. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js +0 -2
  97. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js.map +0 -1
  98. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts +0 -8
  99. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts.map +0 -1
  100. package/dist/__tests__/utils/ProseMirrorWrapper.js +0 -44
  101. package/dist/__tests__/utils/ProseMirrorWrapper.js.map +0 -1
  102. package/dist/__tests__/utils/prosemirror.d.ts +0 -2
  103. package/dist/__tests__/utils/prosemirror.d.ts.map +0 -1
  104. package/dist/__tests__/utils/prosemirror.js +0 -30
  105. package/dist/__tests__/utils/prosemirror.js.map +0 -1
  106. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts +0 -4
  107. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts.map +0 -1
  108. package/dist/__tests__/utils/renderEditableGradingInstruction.js +0 -22
  109. package/dist/__tests__/utils/renderEditableGradingInstruction.js.map +0 -1
  110. package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts +0 -1
  111. package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts.map +0 -1
  112. package/dist/__tests__/utils/renderEditableGradingInstructions.js +0 -2
  113. package/dist/__tests__/utils/renderEditableGradingInstructions.js.map +0 -1
  114. package/dist/__tests__/utils/util.d.ts +0 -2
  115. package/dist/__tests__/utils/util.d.ts.map +0 -1
  116. package/dist/__tests__/utils/util.js +0 -10
  117. package/dist/__tests__/utils/util.js.map +0 -1
  118. package/dist/components/LexicalEditor.d.ts +0 -3
  119. package/dist/components/LexicalEditor.d.ts.map +0 -1
  120. package/dist/components/LexicalEditor.js +0 -44
  121. package/dist/components/LexicalEditor.js.map +0 -1
  122. package/dist/components/RTE.d.ts +0 -3
  123. package/dist/components/RTE.d.ts.map +0 -1
  124. package/dist/components/RTE.js +0 -23
  125. package/dist/components/RTE.js.map +0 -1
  126. package/dist/components/TablePlugin.d.ts +0 -1
  127. package/dist/components/TablePlugin.d.ts.map +0 -1
  128. package/dist/components/TablePlugin.js +0 -2
  129. package/dist/components/TablePlugin.js.map +0 -1
  130. package/dist/components/ToolBarPlugin.d.ts +0 -10
  131. package/dist/components/ToolBarPlugin.d.ts.map +0 -1
  132. package/dist/components/ToolBarPlugin.js +0 -111
  133. package/dist/components/ToolBarPlugin.js.map +0 -1
  134. package/dist/components/context/AnnotationContext.d.ts +0 -8
  135. package/dist/components/context/AnnotationContext.d.ts.map +0 -1
  136. package/dist/components/context/AnnotationContext.js +0 -3
  137. package/dist/components/context/AnnotationContext.js.map +0 -1
  138. package/dist/components/exam/ExamineExam.d.ts +0 -5
  139. package/dist/components/exam/ExamineExam.d.ts.map +0 -1
  140. package/dist/components/exam/ExamineExam.js +0 -20
  141. package/dist/components/exam/ExamineExam.js.map +0 -1
  142. package/dist/components/exam/FinishExam.d.ts +0 -5
  143. package/dist/components/exam/FinishExam.d.ts.map +0 -1
  144. package/dist/components/exam/FinishExam.js +0 -17
  145. package/dist/components/exam/FinishExam.js.map +0 -1
  146. package/dist/components/grading/reactAnnotation.d.ts +0 -4
  147. package/dist/components/grading/reactAnnotation.d.ts.map +0 -1
  148. package/dist/components/grading/reactAnnotation.js +0 -54
  149. package/dist/components/grading/reactAnnotation.js.map +0 -1
  150. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +0 -6
  151. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +0 -1
  152. package/dist/components/grading-instructions/EditableGradingInstruction.js +0 -113
  153. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +0 -1
  154. package/dist/components/grading-instructions/SlateTableEditor.d.ts +0 -22
  155. package/dist/components/grading-instructions/SlateTableEditor.d.ts.map +0 -1
  156. package/dist/components/grading-instructions/SlateTableEditor.js +0 -44
  157. package/dist/components/grading-instructions/SlateTableEditor.js.map +0 -1
  158. package/dist/components/grading-instructions/SlateUtils.d.ts +0 -5
  159. package/dist/components/grading-instructions/SlateUtils.d.ts.map +0 -1
  160. package/dist/components/grading-instructions/SlateUtils.js +0 -28
  161. package/dist/components/grading-instructions/SlateUtils.js.map +0 -1
  162. package/dist/components/grading-instructions/editor/FormatButton.d.ts +0 -9
  163. package/dist/components/grading-instructions/editor/FormatButton.d.ts.map +0 -1
  164. package/dist/components/grading-instructions/editor/FormatButton.js +0 -26
  165. package/dist/components/grading-instructions/editor/FormatButton.js.map +0 -1
  166. package/dist/components/grading-instructions/editor/Formula.d.ts +0 -15
  167. package/dist/components/grading-instructions/editor/Formula.d.ts.map +0 -1
  168. package/dist/components/grading-instructions/editor/Formula.js +0 -41
  169. package/dist/components/grading-instructions/editor/Formula.js.map +0 -1
  170. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts +0 -7
  171. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts.map +0 -1
  172. package/dist/components/grading-instructions/editor/FormulaPopup.js +0 -49
  173. package/dist/components/grading-instructions/editor/FormulaPopup.js.map +0 -1
  174. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts +0 -6
  175. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts.map +0 -1
  176. package/dist/components/grading-instructions/editor/ImageUploadButton.js +0 -77
  177. package/dist/components/grading-instructions/editor/ImageUploadButton.js.map +0 -1
  178. package/dist/components/grading-instructions/editor/List.d.ts +0 -9
  179. package/dist/components/grading-instructions/editor/List.d.ts.map +0 -1
  180. package/dist/components/grading-instructions/editor/List.js +0 -41
  181. package/dist/components/grading-instructions/editor/List.js.map +0 -1
  182. package/dist/components/grading-instructions/editor/MathPopup.d.ts +0 -10
  183. package/dist/components/grading-instructions/editor/MathPopup.d.ts.map +0 -1
  184. package/dist/components/grading-instructions/editor/MathPopup.js +0 -94
  185. package/dist/components/grading-instructions/editor/MathPopup.js.map +0 -1
  186. package/dist/components/grading-instructions/editor/Menu.d.ts +0 -1
  187. package/dist/components/grading-instructions/editor/Menu.d.ts.map +0 -1
  188. package/dist/components/grading-instructions/editor/Menu.js +0 -2
  189. package/dist/components/grading-instructions/editor/Menu.js.map +0 -1
  190. package/dist/components/grading-instructions/editor/NBSP.d.ts +0 -4
  191. package/dist/components/grading-instructions/editor/NBSP.d.ts.map +0 -1
  192. package/dist/components/grading-instructions/editor/NBSP.js +0 -17
  193. package/dist/components/grading-instructions/editor/NBSP.js.map +0 -1
  194. package/dist/components/grading-instructions/editor/Table.d.ts +0 -6
  195. package/dist/components/grading-instructions/editor/Table.d.ts.map +0 -1
  196. package/dist/components/grading-instructions/editor/Table.js +0 -186
  197. package/dist/components/grading-instructions/editor/Table.js.map +0 -1
  198. package/dist/components/grading-instructions/editor/findNode.d.ts +0 -3
  199. package/dist/components/grading-instructions/editor/findNode.d.ts.map +0 -1
  200. package/dist/components/grading-instructions/editor/findNode.js +0 -10
  201. package/dist/components/grading-instructions/editor/findNode.js.map +0 -1
  202. package/dist/components/grading-instructions/editor/keymap.d.ts +0 -2
  203. package/dist/components/grading-instructions/editor/keymap.d.ts.map +0 -1
  204. package/dist/components/grading-instructions/editor/keymap.js +0 -12
  205. package/dist/components/grading-instructions/editor/keymap.js.map +0 -1
  206. package/dist/components/grading-instructions/editor/localization.d.ts +0 -3
  207. package/dist/components/grading-instructions/editor/localization.d.ts.map +0 -1
  208. package/dist/components/grading-instructions/editor/localization.js +0 -36
  209. package/dist/components/grading-instructions/editor/localization.js.map +0 -1
  210. package/dist/components/grading-instructions/editor/math-svg.d.ts +0 -2
  211. package/dist/components/grading-instructions/editor/math-svg.d.ts.map +0 -1
  212. package/dist/components/grading-instructions/editor/math-svg.js +0 -22
  213. package/dist/components/grading-instructions/editor/math-svg.js.map +0 -1
  214. package/dist/components/grading-instructions/editor/math.d.ts +0 -4
  215. package/dist/components/grading-instructions/editor/math.d.ts.map +0 -1
  216. package/dist/components/grading-instructions/editor/math.js +0 -55
  217. package/dist/components/grading-instructions/editor/math.js.map +0 -1
  218. package/dist/components/grading-instructions/editor/noWrap.d.ts +0 -3
  219. package/dist/components/grading-instructions/editor/noWrap.d.ts.map +0 -1
  220. package/dist/components/grading-instructions/editor/noWrap.js +0 -13
  221. package/dist/components/grading-instructions/editor/noWrap.js.map +0 -1
  222. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts +0 -4
  223. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts.map +0 -1
  224. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js +0 -55
  225. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js.map +0 -1
  226. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts +0 -4
  227. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts.map +0 -1
  228. package/dist/components/grading-instructions/editor/schemas/image-schema.js +0 -47
  229. package/dist/components/grading-instructions/editor/schemas/image-schema.js.map +0 -1
  230. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts +0 -4
  231. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts.map +0 -1
  232. package/dist/components/grading-instructions/editor/schemas/imageSchema.js +0 -47
  233. package/dist/components/grading-instructions/editor/schemas/imageSchema.js.map +0 -1
  234. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts +0 -72
  235. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts.map +0 -1
  236. package/dist/components/grading-instructions/editor/schemas/listSchema.js +0 -7
  237. package/dist/components/grading-instructions/editor/schemas/listSchema.js.map +0 -1
  238. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts +0 -3
  239. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts.map +0 -1
  240. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js +0 -19
  241. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js.map +0 -1
  242. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts +0 -3
  243. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts.map +0 -1
  244. package/dist/components/grading-instructions/editor/schemas/tableSchema.js +0 -43
  245. package/dist/components/grading-instructions/editor/schemas/tableSchema.js.map +0 -1
  246. package/dist/components/grading-instructions/editor/spanWithClass.d.ts +0 -3
  247. package/dist/components/grading-instructions/editor/spanWithClass.d.ts.map +0 -1
  248. package/dist/components/grading-instructions/editor/spanWithClass.js +0 -19
  249. package/dist/components/grading-instructions/editor/spanWithClass.js.map +0 -1
  250. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts +0 -3
  251. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts.map +0 -1
  252. package/dist/components/grading-instructions/editor/spanWithNowrap.js +0 -19
  253. package/dist/components/grading-instructions/editor/spanWithNowrap.js.map +0 -1
  254. package/dist/components/grading-instructions/prosemirror.d.ts +0 -8
  255. package/dist/components/grading-instructions/prosemirror.d.ts.map +0 -1
  256. package/dist/components/grading-instructions/prosemirror.js +0 -108
  257. package/dist/components/grading-instructions/prosemirror.js.map +0 -1
  258. package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
  259. package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
  260. package/dist/components/results/isExamFinishPageHook.js +0 -7
  261. package/dist/components/results/isExamFinishPageHook.js.map +0 -1
  262. package/dist/components/shared/CreateAnnotationPopup.d.ts +0 -6
  263. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +0 -1
  264. package/dist/components/shared/CreateAnnotationPopup.js +0 -11
  265. package/dist/components/shared/CreateAnnotationPopup.js.map +0 -1
  266. package/dist/components/shared/PopupUtils.d.ts +0 -4
  267. package/dist/components/shared/PopupUtils.d.ts.map +0 -1
  268. package/dist/components/shared/PopupUtils.js +0 -26
  269. package/dist/components/shared/PopupUtils.js.map +0 -1
  270. package/dist/store/listenerMiddleware.d.ts +0 -89
  271. package/dist/store/listenerMiddleware.d.ts.map +0 -1
  272. package/dist/store/listenerMiddleware.js +0 -6
  273. package/dist/store/listenerMiddleware.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/AttachmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,MAAM,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,mEASjC,CAAA"}
1
+ {"version":3,"file":"AttachmentContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/AttachmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,MAAM,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,cAR2B,MAE5D,aAAa,UAAO,MAAO,aACnB,KAcR,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExamContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ExamContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,WAAW,WAAW;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,eAAO,MAAM,WAAW,4BAAyC,CAAA;AAEjE,eAAO,MAAM,eAAe,mEAO1B,CAAA"}
1
+ {"version":3,"file":"ExamContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ExamContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,WAAW,WAAW;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,eAAO,MAAM,WAAW,4BAAyC,CAAA;AAEjE,eAAO,MAAM,eAAe,cAPJ,MACtB,aAAW,UAAO,MAAO,aAClB,KAYP,CAAA"}
@@ -2,16 +2,11 @@ import React from 'react';
2
2
  export interface GradingInstructionPropsBase {
3
3
  children?: React.ReactNode;
4
4
  }
5
- export interface EditableProps extends GradingInstructionPropsBase {
6
- editable: true;
7
- onContentChange: (answerHTML: string, path: string) => void;
8
- onSaveImage: (file: File, displayNumber?: string) => Promise<string>;
9
- }
10
- export interface NotEditableProps extends GradingInstructionPropsBase {
11
- editable?: false;
12
- onContentChange?: never;
13
- onSaveImage?: never;
14
- }
15
- export type GradingInstructionProps = EditableProps | NotEditableProps;
5
+ export type GradingInstructionProps = GradingInstructionPropsBase & {
6
+ EditorComponent?: React.ComponentType<{
7
+ element: Element;
8
+ displayNumber: string;
9
+ }>;
10
+ };
16
11
  export declare const GradingInstructionContext: React.Context<GradingInstructionProps>;
17
12
  //# sourceMappingURL=GradingInstructionContext.d.ts.map
@@ -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,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
+ {"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,MAAM,uBAAuB,GAAG,2BAA2B,GAAG;IAClE,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACnF,CAAA;AAED,eAAO,MAAM,yBAAyB,wCAAqD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionContext.js","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAoBzB,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,aAAa,CAAC,EAA6B,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructionContext.js","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,aAAa,CAAC,EAA6B,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/QuestionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,EAAE,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,eAAe,gCAA8D,CAAA;AAE1F,eAAO,MAAM,mBAAmB,mEAsB9B,CAAA"}
1
+ {"version":3,"file":"QuestionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/QuestionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,EAAE,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,eAAe,gCAA8D,CAAA;AAE1F,eAAO,MAAM,mBAAmB,cAhBpB,MAAO,aAAa,UAAO,MAAO,aAAa,KAsCzD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResultsContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ResultsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAgB,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAI9G,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IACnD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,mEAgB9B,CAAA;AAED,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,gBAAgB,EAClC,EAAE,EAAE,MAAM,GACT,iBAAiB,GAAG,SAAS,CAY/B;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAEhF;AAED,wBAAgB,+BAA+B,CAC7C,iBAAiB,EAAE,OAAO,EAAE,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EAAE,EACf,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAClD,MAAM,CAMR;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,OAAO,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EAAE,EACf,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAC1C,MAAM,CAgCR"}
1
+ {"version":3,"file":"ResultsContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ResultsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAA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,WAAW,cAAc;IAC7B,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,OAAO,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,mEAkB7B,CAAA"}
1
+ {"version":3,"file":"SectionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/SectionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,OAAO,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,cAbd,MAAO,aAAa,UAAO,MAAO,aAAa,KA+B9D,CAAA"}
@@ -2,6 +2,7 @@ import { TOptions } from 'i18next';
2
2
  import React from 'react';
3
3
  import { RichTextAnswer as RichTextAnswerT } from '../../types/ExamAnswer';
4
4
  import { CommonExamContext } from '../context/CommonExamContext';
5
+ import { Answer } from 'rich-text-editor';
5
6
  export interface ScreenshotError {
6
7
  key: 'screenshot-too-big' | 'screenshot-byte-limit-reached' | 'screenshot-upload-failed';
7
8
  options?: TOptions;
@@ -25,16 +26,8 @@ interface Props {
25
26
  export default class RichTextAnswer extends React.PureComponent<Props> {
26
27
  static contextType: React.Context<CommonExamContext>;
27
28
  context: React.ContextType<typeof CommonExamContext>;
28
- private ref;
29
- private lastHTML;
30
- constructor(props: Props);
31
- componentDidMount(): void;
32
29
  handleSaveError: (err: ErrorResponse) => void;
33
- handleChange: (data: {
34
- answerHTML: string;
35
- answerText: string;
36
- }) => void;
37
- componentDidUpdate(): void;
30
+ handleChange: (answer: Answer) => void;
38
31
  render(): React.ReactNode;
39
32
  }
40
33
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/exam/RichTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAOhE,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,oBAAoB,GAAG,+BAA+B,GAAG,0BAA0B,CAAA;IACxF,OAAO,CAAC,EAAE,QAAQ,CAAA;CACnB;AAED,KAAK,aAAa,GAAG;IAAE,QAAQ,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAAG,KAAK,CAAA;AAE7D,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IACzC,cAAc,EAAE,CAAC,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACrD,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IACpE,M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,MAAM,KAAK,IAAI,CAAA;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IACzC,cAAc,EAAE,CAAC,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACrD,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IACpE,MAAM,CAAC,WAAW,mCAAoB;IAC9B,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5D,eAAe,QAAS,aAAa,KAAG,IAAI,CAa3C;IAED,YAAY,WAAY,MAAM,KAAG,IAAI,CAIpC;IAED,MAAM,IAAI,KAAK,CAAC,SAAS;CAoC1B"}
@@ -1,14 +1,14 @@
1
1
  import * as _ from 'lodash-es';
2
2
  import React from 'react';
3
3
  import { CommonExamContext } from '../context/CommonExamContext';
4
- import { makeRichText } from 'rich-text-editor';
4
+ import RichTextEditor from 'rich-text-editor';
5
5
  import { ExpandQuestionContext } from './Question';
6
6
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
7
  import { faExpandAlt } from '@fortawesome/free-solid-svg-icons';
8
8
  import { useExamTranslation } from '../../i18n';
9
9
  class RichTextAnswer extends React.PureComponent {
10
- constructor(props) {
11
- super(props);
10
+ constructor() {
11
+ super(...arguments);
12
12
  this.handleSaveError = (err) => {
13
13
  const key = (() => {
14
14
  switch (_.get(err, 'response.status')) {
@@ -22,41 +22,22 @@ class RichTextAnswer extends React.PureComponent {
22
22
  })();
23
23
  this.props.onError({ key });
24
24
  };
25
- this.handleChange = (data) => {
25
+ this.handleChange = (answer) => {
26
26
  const { onChange } = this.props;
27
- this.lastHTML = data.answerHTML;
28
- onChange(data.answerHTML, data.answerText);
27
+ onChange(answer.answerHtml, answer.answerText);
29
28
  };
30
- this.ref = React.createRef();
31
- this.lastHTML = this.props.answer ? this.props.answer.value : '';
32
- }
33
- componentDidMount() {
34
- const { current } = this.ref;
35
- const { answer, saveScreenshot } = this.props;
36
- if (current) {
37
- if (answer) {
38
- current.innerHTML = answer.value;
39
- }
40
- makeRichText(current, {
41
- locale: this.context.language.slice(0, 2).toUpperCase(),
42
- screenshotSaver: ({ data, type }) => saveScreenshot(data instanceof Blob ? data : new Blob([data], { type })).catch((err) => {
43
- this.handleSaveError(err);
44
- throw err; // Rethrow error so rich-text-editor can handle it.
45
- })
46
- }, this.handleChange);
47
- }
48
- }
49
- componentDidUpdate() {
50
- const { current } = this.ref;
51
- // Don't update element unless value has changed from last known value to prevent cursor jumping
52
- if (current && this.props.answer && this.props.answer.value !== this.lastHTML) {
53
- current.innerHTML = this.lastHTML = this.props.answer.value;
54
- }
55
29
  }
56
30
  render() {
57
- const { className, questionId, invalid, lang, labelledBy } = this.props;
31
+ const { questionId, className, labelledBy, answer, lang, invalid } = this.props;
58
32
  return (React.createElement(ExpandQuestionContext.Consumer, null, ({ expanded, toggleWriterMode }) => (React.createElement(React.Fragment, null,
59
- React.createElement("div", { ref: this.ref, className: className, "data-question-id": questionId, role: "textbox", "aria-multiline": "true", "aria-invalid": invalid, tabIndex: 0, lang: lang, "aria-labelledby": labelledBy, id: String(questionId) }),
33
+ React.createElement(RichTextEditor, { baseUrl: '', initialValue: answer === null || answer === void 0 ? void 0 : answer.value, language: this.context.language.slice(0, 2).toUpperCase(), onValueChange: this.handleChange, textAreaProps: {
34
+ ariaInvalid: invalid,
35
+ ariaLabelledBy: labelledBy,
36
+ id: questionId.toString(),
37
+ questionId,
38
+ className,
39
+ lang
40
+ } }),
60
41
  !expanded && (React.createElement("button", { className: "expand open", onClick: () => toggleWriterMode(true), "aria-labelledby": "expand-label", "aria-owns": String(questionId) },
61
42
  React.createElement(ExpandButtonLabel, null),
62
43
  React.createElement(FontAwesomeIcon, { icon: faExpandAlt })))))));
@@ -1 +1 @@
1
- {"version":3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":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
+ {"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,CAazE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,9 +1,10 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
- import EditableGradingInstruction from './EditableGradingInstruction';
3
+ import { QuestionContext } from '../context/QuestionContext';
4
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)));
5
+ const { EditorComponent } = useContext(GradingInstructionContext);
6
+ const { displayNumber } = useContext(QuestionContext);
7
+ return (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, EditorComponent ? (React.createElement(EditorComponent, { element: element, displayNumber: displayNumber })) : (renderChildNodes(element))));
7
8
  };
8
9
  export default AnswerGradingInstruction;
9
10
  //# 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,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
+ {"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,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC9G,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IACjE,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAErD,OAAO,CACL,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,eAAe,CAAC,CAAC,CAAC,CACjB,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAI,CACpE,CAAC,CAAC,CAAC,CACF,gBAAgB,CAAC,OAAO,CAAC,CAC1B,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,wBAAwB,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, onSaveImage, children }: GradingInstructionProps) => React.JSX.Element;
3
+ export declare const GradingInstructionProvider: ({ EditorComponent, 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,yDAKpC,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,kCAAmC,uBAAuB,sBAIhG,CAAA"}
@@ -1,7 +1,4 @@
1
1
  import React from 'react';
2
2
  import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
- export const GradingInstructionProvider = ({ editable, onContentChange, onSaveImage, children }) => {
4
- const contextValue = editable ? { editable, onContentChange, onSaveImage } : { editable };
5
- return React.createElement(GradingInstructionContext.Provider, { value: contextValue }, children);
6
- };
3
+ export const GradingInstructionProvider = ({ EditorComponent, children }) => (React.createElement(GradingInstructionContext.Provider, { value: { EditorComponent: EditorComponent } }, children));
7
4
  //# 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,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
+ {"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,EAAE,eAAe,EAAE,QAAQ,EAA2B,EAAE,EAAE,CAAC,CACpG,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,eAAe,EAAE,eAAe,EAAE,IAC5E,QAAQ,CAC0B,CACtC,CAAA"}
@@ -1,7 +1,11 @@
1
1
  import React from 'react';
2
2
  import { AnnotationProps, CommonExamProps } from '../exam/Exam';
3
- import { GradingInstructionProps } from '../context/GradingInstructionContext';
4
3
  export declare const GradingInstructionsPageTitle: React.FunctionComponent;
5
- declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps & GradingInstructionProps>>;
4
+ declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps & import("../context/GradingInstructionContext").GradingInstructionPropsBase & {
5
+ EditorComponent?: React.ComponentType<{
6
+ element: Element;
7
+ displayNumber: string;
8
+ }>;
9
+ }>>;
6
10
  export default _default;
7
11
  //# 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;AAoB/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAmH9E,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;AAmI/D,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;sBAjJuB,MAAO,aAAa;;;;;AAmJ5C,wBAAqE"}
@@ -71,7 +71,7 @@ const renderChildNodes = createRenderChildNodes({
71
71
  'section-title': SectionTitle,
72
72
  video: Recording
73
73
  });
74
- const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation, editable, onContentChange, onSaveImage }) => {
74
+ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation, EditorComponent }) => {
75
75
  const root = doc.documentElement;
76
76
  const { date, dateTimeFormatter, dayCode, examCode, language, subjectLanguage } = useContext(CommonExamContext);
77
77
  const examTitle = findChildElement(root, 'exam-title');
@@ -85,9 +85,8 @@ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnota
85
85
  const i18n = useCached(() => initI18n(language, examCode, dayCode));
86
86
  useEffect(changeLanguage(i18n, language));
87
87
  useEffect(scrollToHash, []);
88
- const props = editable ? { editable, onContentChange, onSaveImage } : { editable };
89
88
  return (React.createElement(AnnotationProvider, { annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation },
90
- React.createElement(GradingInstructionProvider, { ...props },
89
+ React.createElement(GradingInstructionProvider, { EditorComponent: EditorComponent },
91
90
  React.createElement(I18nextProvider, { i18n: i18n },
92
91
  React.createElement("main", { className: "e-exam e-grading-instructions", lang: subjectLanguage },
93
92
  React.createElement(React.StrictMode, null),
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructions.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAC5C,OAAO,kBAAkB,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,iBA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iB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;wBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;wBACA,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;4BACjC,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CACnE,CACP,CACc;oBAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACS,CACV,CACtB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAA4B,GAAG,EAAE;IACxE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,iCAAiC,CAAC,CAAI,CAAA;AACpD,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructions.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,aAAa,MAAM,kBAAkB,CAAA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,SAAS,CAAC,CAC5D;wBACf,IAAI,IAAI,CACP;4BACE,oCAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;wBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;wBACA,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;4BACjC,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CACnE,CACP,CACc;oBAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACS,CACV,CACtB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAA4B,GAAG,EAAE;IACxE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,iCAAiC,CAAC,CAAI,CAAA;AACpD,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
@@ -10,6 +10,5 @@ type PopupProps = {
10
10
  };
11
11
  export declare function Popup(props: PopupProps): React.JSX.Element | null;
12
12
  export declare function showAndPositionElement(mark: Element | null, popupRef: React.RefObject<HTMLElement>): void;
13
- export declare function closeMathEditor(element: HTMLDivElement): void;
14
13
  export {};
15
14
  //# sourceMappingURL=Popup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAMlD,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAC/C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,YAAY,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,4BA6FtC;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,QAkBlG;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,QAKtD"}
1
+ {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAMlD,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAC/C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,YAAY,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,4BAiFtC;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,QAkBlG"}
@@ -1,50 +1,44 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { makeRichText } from 'rich-text-editor';
2
+ import RichTextEditor from 'rich-text-editor';
3
3
  import classNames from 'classnames';
4
4
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
5
  import { faTrashCan } from '@fortawesome/free-solid-svg-icons';
6
6
  export function Popup(props) {
7
7
  const popupRef = React.createRef();
8
- const textAreaRef = React.createRef();
9
8
  const [textContent, setTextContent] = useState(props.initialTextContent || '');
10
9
  const [saveEnabled, setSaveEnabled] = useState(false);
11
10
  const [verifyDelete, setVerifyDelete] = useState(false);
12
11
  const [errorMessage, setErrorMessage] = useState(null);
13
12
  useEffect(() => {
14
- if (props.element && textAreaRef.current) {
13
+ if (props.element) {
15
14
  showAndPositionElement(props.element, popupRef);
16
- textAreaRef.current.innerHTML = textContent;
17
- makeRichText(textAreaRef.current, {
18
- locale: 'FI',
19
- screenshotSaver: () => Promise.resolve('')
20
- }, value => {
21
- if (props.onValueChange) {
22
- const error = props.onValueChange(value.answerHTML);
23
- setErrorMessage(error);
24
- }
25
- setTextContent(value.answerHTML);
26
- setSaveEnabled(value.answerHTML.trim().length > 0);
27
- });
28
- textAreaRef.current.focus();
29
15
  }
30
- setTextContent('');
16
+ setTextContent(props.initialTextContent || '');
31
17
  setSaveEnabled(props.initialTextContent.length > 0);
32
18
  }, [props.element]);
33
19
  if (!props.element) {
34
20
  return null;
35
21
  }
36
22
  return (React.createElement("div", { className: "e-popup", style: { position: 'absolute', opacity: 0 }, ref: popupRef, "data-testid": "e-popup" },
37
- React.createElement("div", { className: "e-popup-content", "data-testid": "e-popup-content", role: "textbox", "aria-multiline": "true", ref: textAreaRef }),
23
+ React.createElement(RichTextEditor, { language: "FI", baseUrl: '', initialValue: props.initialTextContent, onValueChange: value => {
24
+ if (props.onValueChange) {
25
+ const error = props.onValueChange(value.answerHtml);
26
+ setErrorMessage(error);
27
+ }
28
+ setTextContent(value.answerHtml);
29
+ setSaveEnabled(value.answerHtml.trim().length > 0);
30
+ }, textAreaProps: {
31
+ className: 'comment-content'
32
+ } }),
33
+ ' ',
38
34
  errorMessage && React.createElement("span", { className: "e-popup-error" }, errorMessage),
39
35
  React.createElement("span", { className: "e-popup-button-area" },
40
36
  React.createElement("span", null,
41
37
  React.createElement("button", { className: "button", onClick: e => {
42
38
  e.stopPropagation();
43
- closeMathEditor(textAreaRef.current);
44
39
  props.onValueSave(textContent);
45
40
  }, "data-testid": "e-popup-save", disabled: !saveEnabled || !!errorMessage }, "Tallenna"),
46
41
  React.createElement("button", { className: "button text-button", "data-testid": "e-popup-cancel", onClick: () => {
47
- closeMathEditor(textAreaRef.current);
48
42
  props.onCancel();
49
43
  } }, "Peru")),
50
44
  props.enableDelete && (React.createElement("button", { className: classNames('button', 'e-popup-delete', 'round', { confirm: verifyDelete }), "data-testid": "e-popup-delete", onClick: () => {
@@ -53,7 +47,6 @@ export function Popup(props) {
53
47
  }
54
48
  else {
55
49
  if (props.onDelete) {
56
- closeMathEditor(textAreaRef.current);
57
50
  props.onDelete();
58
51
  }
59
52
  }
@@ -81,10 +74,4 @@ export function showAndPositionElement(mark, popupRef) {
81
74
  }
82
75
  }
83
76
  }
84
- export function closeMathEditor(element) {
85
- // rich-text-editor does not properly support several rich-text-editor instances created at different times.
86
- // In order to close math editor that is open, we need to dispatch events like this.
87
- element.dispatchEvent(new Event('focus', { bubbles: true, cancelable: true }));
88
- element.dispatchEvent(new Event('blur', { bubbles: true, cancelable: true }));
89
- }
90
77
  //# sourceMappingURL=Popup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","sourceRoot":"","sources":["../../../src/components/shared/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAY9D,MAAM,UAAU,KAAK,CAAC,KAAiB;IACrC,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAA;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EAAE,MAAM,GAAG,OAAO,CAEpF;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAOtG;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAO1G;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAE/D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,uBAIlD;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,OAAO,EAAE,CAAC,EACV,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAC1C,GAAG,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GACrC,qBAAqB,CAAC,CAAC,CAAC,CAK1B;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAWpG;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,UAAU,GAAG,SAAS,EAAE,aAAa,EAAE,MAAM,WAehG;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAiBvD"}
package/dist/dom-utils.js CHANGED
@@ -154,8 +154,10 @@ export function getElementPath(element) {
154
154
  while (currentElement.parentElement) {
155
155
  currentElement = currentElement.parentElement;
156
156
  const displayNumber = currentElement.getAttribute('display-number');
157
- const index = Number(displayNumber) ||
158
- Array.from(((_c = currentElement.parentElement) === null || _c === void 0 ? void 0 : _c.children) || [currentElement]).indexOf(currentElement);
157
+ const isNumber = Number(displayNumber);
158
+ const index = isNumber
159
+ ? displayNumber
160
+ : Array.from(((_c = currentElement.parentElement) === null || _c === void 0 ? void 0 : _c.children) || [currentElement]).indexOf(currentElement);
159
161
  const elementId = currentElement.getAttribute('id');
160
162
  path = `${elementId || currentElement.nodeName}:${index} > ${path}`;
161
163
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dom-utils.js","sourceRoot":"","sources":["../src/dom-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE5D,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAA;AAE5B,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,QAAmB;IAClE,MAAM,SAAS,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACtE,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,OAAO,OAAO,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;QACrC,OAAO,GAAG,OAAO,CAAC,aAAa,CAAA;QAC/B,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACtB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAID,SAAS,WAAW,CAAC,QAAkB;IACrC,OAAO,OAAO,QAAQ,KAAK,UAAU;QACnC,CAAC,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,KAAK,gBAAgB,IAAI,QAAQ,CAAC,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