@digabi/exam-engine-core 22.1.6-alpha.4 → 22.1.6-move-to-em.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (283) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/components/context/GradingInstructionContext.d.ts +4 -2
  3. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -1
  4. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  5. package/dist/components/grading-instructions/AnswerGradingInstruction.js +2 -3
  6. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  7. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +1 -1
  8. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -1
  9. package/dist/components/grading-instructions/GradingInstructionProvider.js +4 -2
  10. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -1
  11. package/dist/components/grading-instructions/GradingInstructions.js +2 -2
  12. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  13. package/dist/main-bundle.js +1 -1
  14. package/dist/main.css +1 -1
  15. package/package.json +2 -11
  16. package/dist/__tests__/EditableGradingInsatruction.test.d.ts +0 -1
  17. package/dist/__tests__/EditableGradingInsatruction.test.d.ts.map +0 -1
  18. package/dist/__tests__/EditableGradingInsatruction.test.js +0 -2
  19. package/dist/__tests__/EditableGradingInsatruction.test.js.map +0 -1
  20. package/dist/__tests__/EditableGradingInstruction.test.d.ts +0 -2
  21. package/dist/__tests__/EditableGradingInstruction.test.d.ts.map +0 -1
  22. package/dist/__tests__/EditableGradingInstruction.test.js +0 -174
  23. package/dist/__tests__/EditableGradingInstruction.test.js.map +0 -1
  24. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts +0 -2
  25. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts.map +0 -1
  26. package/dist/__tests__/EditableGradingInstructionLocalization.test.js +0 -75
  27. package/dist/__tests__/EditableGradingInstructionLocalization.test.js.map +0 -1
  28. package/dist/__tests__/FormatButton.test.d.ts +0 -2
  29. package/dist/__tests__/FormatButton.test.d.ts.map +0 -1
  30. package/dist/__tests__/FormatButton.test.js +0 -94
  31. package/dist/__tests__/FormatButton.test.js.map +0 -1
  32. package/dist/__tests__/editor/FormatButton.test.d.ts +0 -2
  33. package/dist/__tests__/editor/FormatButton.test.d.ts.map +0 -1
  34. package/dist/__tests__/editor/FormatButton.test.js +0 -98
  35. package/dist/__tests__/editor/FormatButton.test.js.map +0 -1
  36. package/dist/__tests__/editor/Formula.test.d.ts +0 -2
  37. package/dist/__tests__/editor/Formula.test.d.ts.map +0 -1
  38. package/dist/__tests__/editor/Formula.test.js +0 -61
  39. package/dist/__tests__/editor/Formula.test.js.map +0 -1
  40. package/dist/__tests__/editor/ImageUploadButton.test.d.ts +0 -2
  41. package/dist/__tests__/editor/ImageUploadButton.test.d.ts.map +0 -1
  42. package/dist/__tests__/editor/ImageUploadButton.test.js +0 -94
  43. package/dist/__tests__/editor/ImageUploadButton.test.js.map +0 -1
  44. package/dist/__tests__/editor/List.test.d.ts +0 -2
  45. package/dist/__tests__/editor/List.test.d.ts.map +0 -1
  46. package/dist/__tests__/editor/List.test.js +0 -72
  47. package/dist/__tests__/editor/List.test.js.map +0 -1
  48. package/dist/__tests__/editor/NBSP.test.d.ts +0 -2
  49. package/dist/__tests__/editor/NBSP.test.d.ts.map +0 -1
  50. package/dist/__tests__/editor/NBSP.test.js +0 -55
  51. package/dist/__tests__/editor/NBSP.test.js.map +0 -1
  52. package/dist/__tests__/editor/Table.test.d.ts +0 -2
  53. package/dist/__tests__/editor/Table.test.d.ts.map +0 -1
  54. package/dist/__tests__/editor/Table.test.js +0 -172
  55. package/dist/__tests__/editor/Table.test.js.map +0 -1
  56. package/dist/__tests__/editor/br.test.d.ts +0 -2
  57. package/dist/__tests__/editor/br.test.d.ts.map +0 -1
  58. package/dist/__tests__/editor/br.test.js +0 -39
  59. package/dist/__tests__/editor/br.test.js.map +0 -1
  60. package/dist/__tests__/editor/hr.test.d.ts +0 -2
  61. package/dist/__tests__/editor/hr.test.d.ts.map +0 -1
  62. package/dist/__tests__/editor/hr.test.js +0 -39
  63. package/dist/__tests__/editor/hr.test.js.map +0 -1
  64. package/dist/__tests__/editor/no-wrap.test.d.ts +0 -2
  65. package/dist/__tests__/editor/no-wrap.test.d.ts.map +0 -1
  66. package/dist/__tests__/editor/no-wrap.test.js +0 -43
  67. package/dist/__tests__/editor/no-wrap.test.js.map +0 -1
  68. package/dist/__tests__/editor/noWrap.test.d.ts +0 -2
  69. package/dist/__tests__/editor/noWrap.test.d.ts.map +0 -1
  70. package/dist/__tests__/editor/noWrap.test.js +0 -62
  71. package/dist/__tests__/editor/noWrap.test.js.map +0 -1
  72. package/dist/__tests__/editor/spanLang.test.d.ts +0 -2
  73. package/dist/__tests__/editor/spanLang.test.d.ts.map +0 -1
  74. package/dist/__tests__/editor/spanLang.test.js +0 -50
  75. package/dist/__tests__/editor/spanLang.test.js.map +0 -1
  76. package/dist/__tests__/editor/spanWithLang.test.d.ts +0 -2
  77. package/dist/__tests__/editor/spanWithLang.test.d.ts.map +0 -1
  78. package/dist/__tests__/editor/spanWithLang.test.js +0 -38
  79. package/dist/__tests__/editor/spanWithLang.test.js.map +0 -1
  80. package/dist/__tests__/editor/sub.test.d.ts +0 -2
  81. package/dist/__tests__/editor/sub.test.d.ts.map +0 -1
  82. package/dist/__tests__/editor/sub.test.js +0 -62
  83. package/dist/__tests__/editor/sub.test.js.map +0 -1
  84. package/dist/__tests__/editor/subSup.test.d.ts +0 -2
  85. package/dist/__tests__/editor/subSup.test.d.ts.map +0 -1
  86. package/dist/__tests__/editor/subSup.test.js +0 -50
  87. package/dist/__tests__/editor/subSup.test.js.map +0 -1
  88. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts +0 -1
  89. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts.map +0 -1
  90. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js +0 -2
  91. package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js.map +0 -1
  92. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts +0 -8
  93. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts.map +0 -1
  94. package/dist/__tests__/utils/ProseMirrorWrapper.js +0 -44
  95. package/dist/__tests__/utils/ProseMirrorWrapper.js.map +0 -1
  96. package/dist/__tests__/utils/prosemirror.d.ts +0 -2
  97. package/dist/__tests__/utils/prosemirror.d.ts.map +0 -1
  98. package/dist/__tests__/utils/prosemirror.js +0 -30
  99. package/dist/__tests__/utils/prosemirror.js.map +0 -1
  100. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts +0 -4
  101. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts.map +0 -1
  102. package/dist/__tests__/utils/renderEditableGradingInstruction.js +0 -22
  103. package/dist/__tests__/utils/renderEditableGradingInstruction.js.map +0 -1
  104. package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts +0 -1
  105. package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts.map +0 -1
  106. package/dist/__tests__/utils/renderEditableGradingInstructions.js +0 -2
  107. package/dist/__tests__/utils/renderEditableGradingInstructions.js.map +0 -1
  108. package/dist/__tests__/utils/util.d.ts +0 -2
  109. package/dist/__tests__/utils/util.d.ts.map +0 -1
  110. package/dist/__tests__/utils/util.js +0 -10
  111. package/dist/__tests__/utils/util.js.map +0 -1
  112. package/dist/components/LexicalEditor.d.ts +0 -3
  113. package/dist/components/LexicalEditor.d.ts.map +0 -1
  114. package/dist/components/LexicalEditor.js +0 -44
  115. package/dist/components/LexicalEditor.js.map +0 -1
  116. package/dist/components/RTE.d.ts +0 -3
  117. package/dist/components/RTE.d.ts.map +0 -1
  118. package/dist/components/RTE.js +0 -23
  119. package/dist/components/RTE.js.map +0 -1
  120. package/dist/components/TablePlugin.d.ts +0 -1
  121. package/dist/components/TablePlugin.d.ts.map +0 -1
  122. package/dist/components/TablePlugin.js +0 -2
  123. package/dist/components/TablePlugin.js.map +0 -1
  124. package/dist/components/ToolBarPlugin.d.ts +0 -10
  125. package/dist/components/ToolBarPlugin.d.ts.map +0 -1
  126. package/dist/components/ToolBarPlugin.js +0 -111
  127. package/dist/components/ToolBarPlugin.js.map +0 -1
  128. package/dist/components/context/AnnotationContext.d.ts +0 -8
  129. package/dist/components/context/AnnotationContext.d.ts.map +0 -1
  130. package/dist/components/context/AnnotationContext.js +0 -3
  131. package/dist/components/context/AnnotationContext.js.map +0 -1
  132. package/dist/components/exam/ExamineExam.d.ts +0 -5
  133. package/dist/components/exam/ExamineExam.d.ts.map +0 -1
  134. package/dist/components/exam/ExamineExam.js +0 -20
  135. package/dist/components/exam/ExamineExam.js.map +0 -1
  136. package/dist/components/exam/FinishExam.d.ts +0 -5
  137. package/dist/components/exam/FinishExam.d.ts.map +0 -1
  138. package/dist/components/exam/FinishExam.js +0 -17
  139. package/dist/components/exam/FinishExam.js.map +0 -1
  140. package/dist/components/grading/reactAnnotation.d.ts +0 -4
  141. package/dist/components/grading/reactAnnotation.d.ts.map +0 -1
  142. package/dist/components/grading/reactAnnotation.js +0 -54
  143. package/dist/components/grading/reactAnnotation.js.map +0 -1
  144. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +0 -6
  145. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +0 -1
  146. package/dist/components/grading-instructions/EditableGradingInstruction.js +0 -125
  147. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +0 -1
  148. package/dist/components/grading-instructions/SlateTableEditor.d.ts +0 -22
  149. package/dist/components/grading-instructions/SlateTableEditor.d.ts.map +0 -1
  150. package/dist/components/grading-instructions/SlateTableEditor.js +0 -44
  151. package/dist/components/grading-instructions/SlateTableEditor.js.map +0 -1
  152. package/dist/components/grading-instructions/SlateUtils.d.ts +0 -5
  153. package/dist/components/grading-instructions/SlateUtils.d.ts.map +0 -1
  154. package/dist/components/grading-instructions/SlateUtils.js +0 -28
  155. package/dist/components/grading-instructions/SlateUtils.js.map +0 -1
  156. package/dist/components/grading-instructions/editor/FormatButton.d.ts +0 -9
  157. package/dist/components/grading-instructions/editor/FormatButton.d.ts.map +0 -1
  158. package/dist/components/grading-instructions/editor/FormatButton.js +0 -26
  159. package/dist/components/grading-instructions/editor/FormatButton.js.map +0 -1
  160. package/dist/components/grading-instructions/editor/Formula.d.ts +0 -15
  161. package/dist/components/grading-instructions/editor/Formula.d.ts.map +0 -1
  162. package/dist/components/grading-instructions/editor/Formula.js +0 -41
  163. package/dist/components/grading-instructions/editor/Formula.js.map +0 -1
  164. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts +0 -7
  165. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts.map +0 -1
  166. package/dist/components/grading-instructions/editor/FormulaPopup.js +0 -49
  167. package/dist/components/grading-instructions/editor/FormulaPopup.js.map +0 -1
  168. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts +0 -6
  169. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts.map +0 -1
  170. package/dist/components/grading-instructions/editor/ImageUploadButton.js +0 -77
  171. package/dist/components/grading-instructions/editor/ImageUploadButton.js.map +0 -1
  172. package/dist/components/grading-instructions/editor/List.d.ts +0 -9
  173. package/dist/components/grading-instructions/editor/List.d.ts.map +0 -1
  174. package/dist/components/grading-instructions/editor/List.js +0 -41
  175. package/dist/components/grading-instructions/editor/List.js.map +0 -1
  176. package/dist/components/grading-instructions/editor/MathPopup.d.ts +0 -10
  177. package/dist/components/grading-instructions/editor/MathPopup.d.ts.map +0 -1
  178. package/dist/components/grading-instructions/editor/MathPopup.js +0 -94
  179. package/dist/components/grading-instructions/editor/MathPopup.js.map +0 -1
  180. package/dist/components/grading-instructions/editor/Menu.d.ts +0 -1
  181. package/dist/components/grading-instructions/editor/Menu.d.ts.map +0 -1
  182. package/dist/components/grading-instructions/editor/Menu.js +0 -2
  183. package/dist/components/grading-instructions/editor/Menu.js.map +0 -1
  184. package/dist/components/grading-instructions/editor/NBSP.d.ts +0 -4
  185. package/dist/components/grading-instructions/editor/NBSP.d.ts.map +0 -1
  186. package/dist/components/grading-instructions/editor/NBSP.js +0 -17
  187. package/dist/components/grading-instructions/editor/NBSP.js.map +0 -1
  188. package/dist/components/grading-instructions/editor/Table.d.ts +0 -6
  189. package/dist/components/grading-instructions/editor/Table.d.ts.map +0 -1
  190. package/dist/components/grading-instructions/editor/Table.js +0 -186
  191. package/dist/components/grading-instructions/editor/Table.js.map +0 -1
  192. package/dist/components/grading-instructions/editor/findNode.d.ts +0 -3
  193. package/dist/components/grading-instructions/editor/findNode.d.ts.map +0 -1
  194. package/dist/components/grading-instructions/editor/findNode.js +0 -10
  195. package/dist/components/grading-instructions/editor/findNode.js.map +0 -1
  196. package/dist/components/grading-instructions/editor/keymap.d.ts +0 -2
  197. package/dist/components/grading-instructions/editor/keymap.d.ts.map +0 -1
  198. package/dist/components/grading-instructions/editor/keymap.js +0 -12
  199. package/dist/components/grading-instructions/editor/keymap.js.map +0 -1
  200. package/dist/components/grading-instructions/editor/localization.d.ts +0 -3
  201. package/dist/components/grading-instructions/editor/localization.d.ts.map +0 -1
  202. package/dist/components/grading-instructions/editor/localization.js +0 -36
  203. package/dist/components/grading-instructions/editor/localization.js.map +0 -1
  204. package/dist/components/grading-instructions/editor/math-svg.d.ts +0 -2
  205. package/dist/components/grading-instructions/editor/math-svg.d.ts.map +0 -1
  206. package/dist/components/grading-instructions/editor/math-svg.js +0 -22
  207. package/dist/components/grading-instructions/editor/math-svg.js.map +0 -1
  208. package/dist/components/grading-instructions/editor/math.d.ts +0 -4
  209. package/dist/components/grading-instructions/editor/math.d.ts.map +0 -1
  210. package/dist/components/grading-instructions/editor/math.js +0 -55
  211. package/dist/components/grading-instructions/editor/math.js.map +0 -1
  212. package/dist/components/grading-instructions/editor/noWrap.d.ts +0 -3
  213. package/dist/components/grading-instructions/editor/noWrap.d.ts.map +0 -1
  214. package/dist/components/grading-instructions/editor/noWrap.js +0 -13
  215. package/dist/components/grading-instructions/editor/noWrap.js.map +0 -1
  216. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts +0 -4
  217. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts.map +0 -1
  218. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js +0 -62
  219. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js.map +0 -1
  220. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts +0 -4
  221. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts.map +0 -1
  222. package/dist/components/grading-instructions/editor/schemas/image-schema.js +0 -47
  223. package/dist/components/grading-instructions/editor/schemas/image-schema.js.map +0 -1
  224. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts +0 -4
  225. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts.map +0 -1
  226. package/dist/components/grading-instructions/editor/schemas/imageSchema.js +0 -61
  227. package/dist/components/grading-instructions/editor/schemas/imageSchema.js.map +0 -1
  228. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts +0 -72
  229. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts.map +0 -1
  230. package/dist/components/grading-instructions/editor/schemas/listSchema.js +0 -7
  231. package/dist/components/grading-instructions/editor/schemas/listSchema.js.map +0 -1
  232. package/dist/components/grading-instructions/editor/schemas/spanLang.d.ts +0 -3
  233. package/dist/components/grading-instructions/editor/schemas/spanLang.d.ts.map +0 -1
  234. package/dist/components/grading-instructions/editor/schemas/spanLang.js +0 -23
  235. package/dist/components/grading-instructions/editor/schemas/spanLang.js.map +0 -1
  236. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts +0 -3
  237. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts.map +0 -1
  238. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js +0 -19
  239. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js.map +0 -1
  240. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts +0 -3
  241. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts.map +0 -1
  242. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js +0 -19
  243. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js.map +0 -1
  244. package/dist/components/grading-instructions/editor/schemas/subSup.d.ts +0 -3
  245. package/dist/components/grading-instructions/editor/schemas/subSup.d.ts.map +0 -1
  246. package/dist/components/grading-instructions/editor/schemas/subSup.js +0 -23
  247. package/dist/components/grading-instructions/editor/schemas/subSup.js.map +0 -1
  248. package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts +0 -3
  249. package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts.map +0 -1
  250. package/dist/components/grading-instructions/editor/schemas/subSupSchema.js +0 -23
  251. package/dist/components/grading-instructions/editor/schemas/subSupSchema.js.map +0 -1
  252. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts +0 -3
  253. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts.map +0 -1
  254. package/dist/components/grading-instructions/editor/schemas/tableSchema.js +0 -43
  255. package/dist/components/grading-instructions/editor/schemas/tableSchema.js.map +0 -1
  256. package/dist/components/grading-instructions/editor/spanWithClass.d.ts +0 -3
  257. package/dist/components/grading-instructions/editor/spanWithClass.d.ts.map +0 -1
  258. package/dist/components/grading-instructions/editor/spanWithClass.js +0 -19
  259. package/dist/components/grading-instructions/editor/spanWithClass.js.map +0 -1
  260. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts +0 -3
  261. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts.map +0 -1
  262. package/dist/components/grading-instructions/editor/spanWithNowrap.js +0 -19
  263. package/dist/components/grading-instructions/editor/spanWithNowrap.js.map +0 -1
  264. package/dist/components/grading-instructions/prosemirror.d.ts +0 -8
  265. package/dist/components/grading-instructions/prosemirror.d.ts.map +0 -1
  266. package/dist/components/grading-instructions/prosemirror.js +0 -108
  267. package/dist/components/grading-instructions/prosemirror.js.map +0 -1
  268. package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
  269. package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
  270. package/dist/components/results/isExamFinishPageHook.js +0 -7
  271. package/dist/components/results/isExamFinishPageHook.js.map +0 -1
  272. package/dist/components/shared/CreateAnnotationPopup.d.ts +0 -6
  273. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +0 -1
  274. package/dist/components/shared/CreateAnnotationPopup.js +0 -11
  275. package/dist/components/shared/CreateAnnotationPopup.js.map +0 -1
  276. package/dist/components/shared/PopupUtils.d.ts +0 -4
  277. package/dist/components/shared/PopupUtils.d.ts.map +0 -1
  278. package/dist/components/shared/PopupUtils.js +0 -26
  279. package/dist/components/shared/PopupUtils.js.map +0 -1
  280. package/dist/store/listenerMiddleware.d.ts +0 -89
  281. package/dist/store/listenerMiddleware.d.ts.map +0 -1
  282. package/dist/store/listenerMiddleware.js +0 -6
  283. package/dist/store/listenerMiddleware.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-wrap.test.js","sourceRoot":"","sources":["../../../__tests__/editor/no-wrap.test.tsx"],"names":[],"mappings":";;AAAA,kDAAkE;AAClE,sDAAsD;AACtD,gGAAoF;AAEpF,MAAM,GAAG,GAAG,WAAuD,CAAA;AAEnE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,OAA4B,CAAA;IAChC,IAAI,mBAA8B,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IACjC,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,SAAS,GAAG,iBAAiB,CAAA;QACnC,MAAM,cAAc,GAAG,gBAAgB,CAAA;QACvC,MAAM,MAAM,GAAG,IAAA,2DAAwB,EAAC,SAAS,CAAC,CAAA;QAClD,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAC5D,MAAM,CAAC,KAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IAC/C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;QACtE,OAAO,GAAG,IAAA,6BAAe,GAAE,CAAA;QAC3B,MAAM,SAAS,GAAG,2BAA2B,CAAA;QAC7C,MAAM,cAAc,GAAG,2BAA2B,CAAA;QAClD,MAAM,MAAM,GAAG,IAAA,2DAAwB,EAAC,SAAS,EAAE,mBAAmB,CAAC,CAAA;QACvE,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,mBAAmB,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;QACpD,MAAM,CAAC,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,UAAU,CAAC,OAAoB,EAAE,IAAY;IACpD,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=noWrap.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"noWrap.test.d.ts","sourceRoot":"","sources":["../../../__tests__/editor/noWrap.test.tsx"],"names":[],"mappings":""}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("@testing-library/react");
4
- const prosemirror_1 = require("../utils/prosemirror");
5
- const renderEditableGradingInstruction_1 = require("../utils/renderEditableGradingInstruction");
6
- const act = react_1.act;
7
- describe('Editor - e-nowrap', () => {
8
- let cleanup;
9
- let onContentChangeMock;
10
- beforeEach(() => {
11
- onContentChangeMock = jest.fn();
12
- cleanup = (0, prosemirror_1.mockCreateRange)();
13
- });
14
- afterEach(() => {
15
- if (cleanup) {
16
- cleanup();
17
- }
18
- cleanup = null;
19
- });
20
- it('e-nowrap is rendered and returned as expected outside paragraph', async () => {
21
- const inputData = '<p>bar</p><span class="e-nowrap">foo</span>';
22
- const expectedDom = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
23
- const expectedOutput = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
24
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
25
- await act(async () => {
26
- insertText(await result.findByText('bar'), 'foo');
27
- });
28
- const element = result.container.querySelector('.ProseMirror');
29
- expect(element.innerHTML).toBe(expectedDom);
30
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
31
- });
32
- it('e:formula is rendered as expected when wrapped inside e-nowrap', async () => {
33
- const inputData = '<p>bar</p><span class="e-nowrap"><e:formula data-editor-id=e-formula>foo</e:formula></span>';
34
- const expectedDom = '<p>foo</p><p><span class="e-nowrap"><img alt="foo" formula="true" src="/math.svg?latex=foo"><img class="ProseMirror-separator" alt=""></span><br class="ProseMirror-trailingBreak"></p>';
35
- const expectedOutput = '<p>foo</p><p><span class="e-nowrap"><e:formula>foo</e:formula></span></p>';
36
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
37
- await act(async () => {
38
- insertText(await result.findByText('bar'), 'foo');
39
- });
40
- const element = result.container.querySelector('.ProseMirror');
41
- expect(element.innerHTML).toBe(expectedDom);
42
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
43
- });
44
- it('e-nowrap is rendered as expected inside paragraph', async () => {
45
- const inputData = '<p>bar</p><p><span class="e-nowrap">foo</span></p>';
46
- const expectedDom = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
47
- const expectedOutput = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
48
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
49
- await act(async () => {
50
- insertText(await result.findByText('bar'), 'foo');
51
- });
52
- const element = result.container.querySelector('.ProseMirror');
53
- expect(element.innerHTML).toBe(expectedDom);
54
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
55
- });
56
- });
57
- function insertText(element, text) {
58
- react_1.fireEvent.input(element, {
59
- target: { innerText: text, innerHTML: text }
60
- });
61
- }
62
- //# sourceMappingURL=noWrap.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"noWrap.test.js","sourceRoot":"","sources":["../../../__tests__/editor/noWrap.test.tsx"],"names":[],"mappings":";;AAAA,kDAAkE;AAClE,sDAAsD;AACtD,gGAAoF;AAEpF,MAAM,GAAG,GAAG,WAAuD,CAAA;AAEnE,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,IAAI,OAA4B,CAAA;IAChC,IAAI,mBAA8B,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;QAC/B,OAAO,GAAG,IAAA,6BAAe,GAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,SAAS,GAAG,6CAA6C,CAAA;QAC/D,MAAM,WAAW,GAAG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AmD,EAAE,KAAK,IAAI,EAAE;QACjE,MAAM,SAAS,GAAG,oDAAoD,CAAA;QACtE,MAAM,WAAW,GAAG,oDAAoD,CAAA;QACxE,MAAM,cAAc,GAAG,oDAAoD,CAAA;QAC3E,MAAM,MAAM,GAAG,IAAA,2DAAwB,EAAC,SAAS,EAAE,mBAAmB,CAAC,CAAA;QACvE,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAC9D,MAAM,CAAC,OAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC5C,MAAM,CAAC,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,UAAU,CAAC,OAAoB,EAAE,IAAY;IACpD,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=spanLang.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanLang.test.d.ts","sourceRoot":"","sources":["../../../__tests__/editor/spanLang.test.tsx"],"names":[],"mappings":""}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("@testing-library/react");
4
- const prosemirror_1 = require("../utils/prosemirror");
5
- const renderEditableGradingInstruction_1 = require("../utils/renderEditableGradingInstruction");
6
- const act = react_1.act;
7
- describe('Editor - sub and sup', () => {
8
- let cleanup;
9
- let onContentChangeMock;
10
- beforeEach(() => {
11
- onContentChangeMock = jest.fn();
12
- cleanup = (0, prosemirror_1.mockCreateRange)();
13
- });
14
- afterEach(() => {
15
- if (cleanup) {
16
- cleanup();
17
- }
18
- cleanup = null;
19
- });
20
- it('sub is rendered and returned as expected', async () => {
21
- const inputData = '<p>bar</p><sub>foo</sub>';
22
- const expectedDom = '<p>foo</p><p><sub>foo</sub></p>';
23
- const expectedOutput = '<p>foo</p><p><sub>foo</sub></p>';
24
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
25
- await act(async () => {
26
- insertText(await result.findByText('bar'), 'foo');
27
- });
28
- const element = result.container.querySelector('.ProseMirror');
29
- expect(element.innerHTML).toBe(expectedDom);
30
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
31
- });
32
- it('sup is rendered and returned as expected', async () => {
33
- const inputData = '<p>bar</p><sup>foo</sup>';
34
- const expectedDom = '<p>foo</p><p><sup>foo</sup></p>';
35
- const expectedOutput = '<p>foo</p><p><sup>foo</sup></p>';
36
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
37
- await act(async () => {
38
- insertText(await result.findByText('bar'), 'foo');
39
- });
40
- const element = result.container.querySelector('.ProseMirror');
41
- expect(element.innerHTML).toBe(expectedDom);
42
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
43
- });
44
- });
45
- function insertText(element, text) {
46
- react_1.fireEvent.input(element, {
47
- target: { innerText: text, innerHTML: text }
48
- });
49
- }
50
- //# sourceMappingURL=spanLang.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanLang.test.js","sourceRoot":"","sources":["../../../__tests__/editor/spanLang.test.tsx"],"names":[],"mappings":";;AAAA,kDAAkE;AAClE,sDAAsD;AACtD,gGAAoF;AAEpF,MAAM,GAAG,GAAG,WAAuD,CAAA;AAEnE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,E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AAE,mBAAmB,CAAC,CAAA;QACvE,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAC9D,MAAM,CAAC,OAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC5C,MAAM,CAAC,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,UAAU,CAAC,OAAoB,EAAE,IAAY;IACpD,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=spanWithLang.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanWithLang.test.d.ts","sourceRoot":"","sources":["../../../__tests__/editor/spanWithLang.test.tsx"],"names":[],"mappings":""}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("@testing-library/react");
4
- const prosemirror_1 = require("../utils/prosemirror");
5
- const renderEditableGradingInstruction_1 = require("../utils/renderEditableGradingInstruction");
6
- const act = react_1.act;
7
- describe('Editor - span with lang attribute', () => {
8
- let cleanup;
9
- let onContentChangeMock;
10
- beforeEach(() => {
11
- onContentChangeMock = jest.fn();
12
- cleanup = (0, prosemirror_1.mockCreateRange)();
13
- });
14
- afterEach(() => {
15
- if (cleanup) {
16
- cleanup();
17
- }
18
- cleanup = null;
19
- });
20
- it('span with lang attribute is rendered and returned as expected', async () => {
21
- const inputData = '<p>bar</p><span lang="en-GB">foo</span>';
22
- const expectedDom = '<p>foo</p><p><span lang="en-GB">foo</span></p>';
23
- const expectedOutput = '<p>foo</p><p><span lang="en-GB">foo</span></p>';
24
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
25
- await act(async () => {
26
- insertText(await result.findByText('bar'), 'foo');
27
- });
28
- const element = result.container.querySelector('.ProseMirror');
29
- expect(element.innerHTML).toBe(expectedDom);
30
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
31
- });
32
- });
33
- function insertText(element, text) {
34
- react_1.fireEvent.input(element, {
35
- target: { innerText: text, innerHTML: text }
36
- });
37
- }
38
- //# sourceMappingURL=spanWithLang.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanWithLang.test.js","sourceRoot":"","sources":["../../../__tests__/editor/spanWithLang.test.tsx"],"names":[],"mappings":";;AAAA,kDAAkE;AAClE,sDAAsD;AACtD,gGAAoF;AAEpF,MAAM,GAAG,GAAG,WAAuD,CAAA;AAEnE,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,IAAI,OAA4B,CAAA;IAChC,IAAI,mBAA8B,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;QAC/B,OAAO,GAAG,IAAA,6BAAe,GAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,SAAS,GAAG,yCAAyC,CAAA;QAC3D,MAAM,WAAW,GAAG,gDAAgD,CAAA;QACpE,MAAM,cAAc,GAAG,gDAAgD,CAAA;QACvE,MAAM,MAAM,GAAG,IAAA,2DAAwB,EAAC,SAAS,EAAE,mBAAmB,CAAC,CAAA;QACvE,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAC9D,MAAM,CAAC,OAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC5C,MAAM,CAAC,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,UAAU,CAAC,OAAoB,EAAE,IAAY;IACpD,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=sub.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sub.test.d.ts","sourceRoot":"","sources":["../../../__tests__/editor/sub.test.tsx"],"names":[],"mappings":""}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("@testing-library/react");
4
- const prosemirror_1 = require("../utils/prosemirror");
5
- const renderEditableGradingInstruction_1 = require("../utils/renderEditableGradingInstruction");
6
- const act = react_1.act;
7
- describe('Editor - sub and sup', () => {
8
- let cleanup;
9
- let onContentChangeMock;
10
- beforeEach(() => {
11
- onContentChangeMock = jest.fn();
12
- cleanup = (0, prosemirror_1.mockCreateRange)();
13
- });
14
- afterEach(() => {
15
- if (cleanup) {
16
- cleanup();
17
- }
18
- cleanup = null;
19
- });
20
- it('e-nowrap is rendered and returned as expected outside paragraph', async () => {
21
- const inputData = '<p>bar</p><span class="e-nowrap">foo</span>';
22
- const expectedDom = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
23
- const expectedOutput = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
24
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
25
- await act(async () => {
26
- insertText(await result.findByText('bar'), 'foo');
27
- });
28
- const element = result.container.querySelector('.ProseMirror');
29
- expect(element.innerHTML).toBe(expectedDom);
30
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
31
- });
32
- it('e:formula is rendered as expected when wrapped inside e-nowrap', async () => {
33
- const inputData = '<p>bar</p><span class="e-nowrap"><e:formula data-editor-id=e-formula>foo</e:formula></span>';
34
- const expectedDom = '<p>foo</p><p><span class="e-nowrap"><img alt="foo" formula="true" src="/math.svg?latex=foo"><img class="ProseMirror-separator" alt=""></span><br class="ProseMirror-trailingBreak"></p>';
35
- const expectedOutput = '<p>foo</p><p><span class="e-nowrap"><e:formula>foo</e:formula></span></p>';
36
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
37
- await act(async () => {
38
- insertText(await result.findByText('bar'), 'foo');
39
- });
40
- const element = result.container.querySelector('.ProseMirror');
41
- expect(element.innerHTML).toBe(expectedDom);
42
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
43
- });
44
- it('e-nowrap is rendered as expected inside paragraph', async () => {
45
- const inputData = '<p>bar</p><p><span class="e-nowrap">foo</span></p>';
46
- const expectedDom = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
47
- const expectedOutput = '<p>foo</p><p><span class="e-nowrap">foo</span></p>';
48
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
49
- await act(async () => {
50
- insertText(await result.findByText('bar'), 'foo');
51
- });
52
- const element = result.container.querySelector('.ProseMirror');
53
- expect(element.innerHTML).toBe(expectedDom);
54
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
55
- });
56
- });
57
- function insertText(element, text) {
58
- react_1.fireEvent.input(element, {
59
- target: { innerText: text, innerHTML: text }
60
- });
61
- }
62
- //# sourceMappingURL=sub.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sub.test.js","sourceRoot":"","sources":["../../../__tests__/editor/sub.test.tsx"],"names":[],"mappings":";;AAAA,kDAAkE;AAClE,sDAAsD;AACtD,gGAAoF;AAEpF,MAAM,GAAG,GAAG,WAAuD,CAAA;AAEnE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,OAA4B,CAAA;IAChC,IAAI,mBAA8B,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;QAC/B,OAAO,GAAG,IAAA,6BAAe,GAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,SAAS,GAAG,6CAA6C,CAAA;QAC/D,MAAM,WAAW,GAAG,oDAAoD,CAAA;QACxE,MAAM,cAAc,GAAG,oDAAoD,CAAA;QAC3E,MAAM,MAAM,GAAG,IAAA,2DAAwB,EAAC,SAAS,EAAE,mBAAmB,CAAC,CAAA;QACvE,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,c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CAAA;QACnD,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAC9D,MAAM,CAAC,OAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC5C,MAAM,CAAC,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,UAAU,CAAC,OAAoB,EAAE,IAAY;IACpD,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=subSup.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subSup.test.d.ts","sourceRoot":"","sources":["../../../__tests__/editor/subSup.test.tsx"],"names":[],"mappings":""}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("@testing-library/react");
4
- const prosemirror_1 = require("../utils/prosemirror");
5
- const renderEditableGradingInstruction_1 = require("../utils/renderEditableGradingInstruction");
6
- const act = react_1.act;
7
- describe('Editor - sub and sup', () => {
8
- let cleanup;
9
- let onContentChangeMock;
10
- beforeEach(() => {
11
- onContentChangeMock = jest.fn();
12
- cleanup = (0, prosemirror_1.mockCreateRange)();
13
- });
14
- afterEach(() => {
15
- if (cleanup) {
16
- cleanup();
17
- }
18
- cleanup = null;
19
- });
20
- it('sub is rendered and returned as expected', async () => {
21
- const inputData = '<p>bar</p><sub>foo</sub>';
22
- const expectedDom = '<p>foo</p><p><sub>foo</sub></p>';
23
- const expectedOutput = '<p>foo</p><p><sub>foo</sub></p>';
24
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
25
- await act(async () => {
26
- insertText(await result.findByText('bar'), 'foo');
27
- });
28
- const element = result.container.querySelector('.ProseMirror');
29
- expect(element.innerHTML).toBe(expectedDom);
30
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
31
- });
32
- it('sup is rendered and returned as expected', async () => {
33
- const inputData = '<p>bar</p><sup>foo</sup>';
34
- const expectedDom = '<p>foo</p><p><sup>foo</sup></p>';
35
- const expectedOutput = '<p>foo</p><p><sup>foo</sup></p>';
36
- const result = (0, renderEditableGradingInstruction_1.renderGradingInstruction)(inputData, onContentChangeMock);
37
- await act(async () => {
38
- insertText(await result.findByText('bar'), 'foo');
39
- });
40
- const element = result.container.querySelector('.ProseMirror');
41
- expect(element.innerHTML).toBe(expectedDom);
42
- expect(onContentChangeMock).toHaveBeenCalledWith(expectedOutput, '');
43
- });
44
- });
45
- function insertText(element, text) {
46
- react_1.fireEvent.input(element, {
47
- target: { innerText: text, innerHTML: text }
48
- });
49
- }
50
- //# sourceMappingURL=subSup.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subSup.test.js","sourceRoot":"","sources":["../../../__tests__/editor/subSup.test.tsx"],"names":[],"mappings":";;AAAA,kDAAkE;AAClE,sDAAsD;AACtD,gGAAoF;AAEpF,MAAM,GAAG,GAAG,WAAuD,CAAA;AAEnE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,OAA4B,CAAA;IAChC,IAAI,mBAA8B,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;QAC/B,OAAO,GAAG,IAAA,6BAAe,GAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;QACD,OAAO,GAAG,IAAI,CAAA;IAChB,CAAC,CAAC,CAA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C,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,UAAU,CAAC,OAAoB,EAAE,IAAY;IACpD,iBAAS,CAAC,KAAK,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=EditableGradingInstructionsWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditableGradingInstructionsWrapper.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/EditableGradingInstructionsWrapper.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=EditableGradingInstructionsWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditableGradingInstructionsWrapper.js","sourceRoot":"","sources":["../../../__tests__/utils/EditableGradingInstructionsWrapper.tsx"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- interface WrapperProps {
3
- children?: ReactNode;
4
- innerHtml?: string;
5
- }
6
- declare const ProseMirrorWrapper: React.FC<WrapperProps>;
7
- export default ProseMirrorWrapper;
8
- //# sourceMappingURL=ProseMirrorWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProseMirrorWrapper.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/ProseMirrorWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAMlD,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAmB9C,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const react_1 = __importStar(require("react"));
27
- const react_prosemirror_1 = require("@nytimes/react-prosemirror");
28
- const prosemirror_schema_basic_1 = require("prosemirror-schema-basic");
29
- const prosemirror_model_1 = require("prosemirror-model");
30
- const prosemirror_state_1 = require("prosemirror-state");
31
- const ProseMirrorWrapper = ({ children, innerHtml = '' }) => {
32
- const [mount, setMount] = (0, react_1.useState)(null);
33
- const container = document.createElement('div');
34
- container.innerHTML = innerHtml;
35
- const doc = prosemirror_model_1.DOMParser.fromSchema(prosemirror_schema_basic_1.schema).parse(container);
36
- const [state, setState] = (0, react_1.useState)(prosemirror_state_1.EditorState.create({ schema: prosemirror_schema_basic_1.schema, doc }));
37
- return (react_1.default.createElement(react_prosemirror_1.ProseMirror, { state: state, mount: mount, dispatchTransaction: tr => {
38
- setState(s => s.apply(tr));
39
- } },
40
- react_1.default.createElement("div", { ref: setMount }),
41
- children));
42
- };
43
- exports.default = ProseMirrorWrapper;
44
- //# sourceMappingURL=ProseMirrorWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProseMirrorWrapper.js","sourceRoot":"","sources":["../../../__tests__/utils/ProseMirrorWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkD;AAClD,kEAAwD;AACxD,uEAAiD;AACjD,yDAA+D;AAC/D,yDAA+C;AAO/C,MAAM,kBAAkB,GAA2B,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE;IAClF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAqB,IAAI,CAAC,CAAA;IAC5D,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAC/C,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;IAC/B,MAAM,GAAG,GAAG,6BAAc,CAAC,UAAU,CAAC,iCAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAC9D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,+BAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAN,iCAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;IAEvE,OAAO,CACL,8BAAC,+BAAW,IACV,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,mBAAmB,EAAE,EAAE,CAAC,EAAE;YACxB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;QAC5B,CAAC;QAED,uCAAK,GAAG,EAAE,QAAQ,GAAI;QACrB,QAAQ,CACG,CACf,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,kBAAkB,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function mockCreateRange(): () => () => Range;
2
- //# sourceMappingURL=prosemirror.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prosemirror.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/prosemirror.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,sBA2B9B"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mockCreateRange = mockCreateRange;
4
- function mockCreateRange() {
5
- const originalCreateRange = global.window.document.createRange;
6
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
- // @ts-expect-error
8
- global.Range = function Range() { };
9
- const createContextualFragment = (html) => {
10
- const div = document.createElement('div');
11
- div.innerHTML = html;
12
- return div.children[0];
13
- };
14
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
- // @ts-expect-error
16
- Range.prototype.createContextualFragment = (html) => createContextualFragment(html);
17
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
18
- // @ts-expect-error
19
- global.window.document.createRange = function createRange() {
20
- return {
21
- setEnd: () => { },
22
- setStart: () => { },
23
- getBoundingClientRect: () => ({ right: 0 }),
24
- getClientRects: () => [],
25
- createContextualFragment
26
- };
27
- };
28
- return () => (global.window.document.createRange = originalCreateRange);
29
- }
30
- //# sourceMappingURL=prosemirror.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prosemirror.js","sourceRoot":"","sources":["../../../__tests__/utils/prosemirror.ts"],"names":[],"mappings":";;AAAA,0CA2BC;AA3BD,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,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,4 +0,0 @@
1
- export declare const mockedPermanentUrl = "mocked-permanent-url";
2
- export declare const mockedResolvedPath = "mock-resolved-path";
3
- export declare function renderGradingInstruction(inputData: string, onContentChangeMock?: () => void): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
4
- //# sourceMappingURL=renderEditableGradingInstruction.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.mockedResolvedPath = exports.mockedPermanentUrl = void 0;
7
- exports.renderGradingInstruction = renderGradingInstruction;
8
- const react_1 = require("@testing-library/react");
9
- const GradingInstructionProvider_1 = require("../../src/components/grading-instructions/GradingInstructionProvider");
10
- const EditableGradingInstruction_1 = __importDefault(require("../../src/components/grading-instructions/EditableGradingInstruction"));
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);
16
- function renderGradingInstruction(inputData, onContentChangeMock = () => { }) {
17
- const doc = new DOMParser().parseFromString(inputData, 'text/html');
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"));
21
- }
22
- //# sourceMappingURL=renderEditableGradingInstruction.js.map
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=renderEditableGradingInstructions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderEditableGradingInstructions.d.ts","sourceRoot":"","sources":["../../../__tests__/utils/renderEditableGradingInstructions.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=renderEditableGradingInstructions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderEditableGradingInstructions.js","sourceRoot":"","sources":["../../../__tests__/utils/renderEditableGradingInstructions.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare function insertText(element: HTMLElement, text: string): void;
2
- //# sourceMappingURL=util.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,10 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare function LexicalEditor(): React.JSX.Element;
3
- //# sourceMappingURL=LexicalEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../src/components/LexicalEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAsCzB,wBAAgB,aAAa,sBAiB5B"}
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import { LexicalComposer } from '@lexical/react/LexicalComposer';
3
- import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin';
4
- import { ContentEditable } from '@lexical/react/LexicalContentEditable';
5
- import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
6
- import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
7
- import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';
8
- import { ToolbarPlugin } from './ToolBarPlugin';
9
- import { TablePlugin } from '@lexical/react/LexicalTablePlugin';
10
- import { ListPlugin } from '@lexical/react/LexicalListPlugin';
11
- import { TableCellNode, TableNode, TableRowNode } from '@lexical/table';
12
- import { ListNode, ListItemNode } from '@lexical/list';
13
- const theme = {
14
- // Add your custom styling here
15
- ltr: 'ltr',
16
- rtl: 'rtl',
17
- placeholder: 'editor-placeholder',
18
- paragraph: 'editor-paragraph'
19
- };
20
- function Placeholder() {
21
- return React.createElement("div", { className: "editor-placeholder" }, "Enter some text...");
22
- }
23
- function onChange(editorState) {
24
- console.log(editorState);
25
- }
26
- const initialConfig = {
27
- namespace: 'MyEditor',
28
- theme,
29
- onError(error) {
30
- throw error;
31
- },
32
- nodes: [TableCellNode, TableNode, TableRowNode, ListNode, ListItemNode]
33
- };
34
- export function LexicalEditor() {
35
- return (React.createElement(LexicalComposer, { initialConfig: initialConfig },
36
- React.createElement(ToolbarPlugin, null),
37
- React.createElement(TablePlugin, null),
38
- React.createElement(ListPlugin, null),
39
- React.createElement("div", { className: "editor-container" },
40
- React.createElement(RichTextPlugin, { contentEditable: React.createElement(ContentEditable, { className: "editor-input" }), placeholder: React.createElement(Placeholder, null), ErrorBoundary: LexicalErrorBoundary }),
41
- React.createElement(HistoryPlugin, null),
42
- React.createElement(OnChangePlugin, { onChange: onChange }))));
43
- }
44
- //# sourceMappingURL=LexicalEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LexicalEditor.js","sourceRoot":"","sources":["../../src/components/LexicalEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAA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