@digabi/exam-engine-core 22.0.3 → 22.0.4-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. package/dist/__tests__/EditableGradingInstruction.test.d.ts +2 -0
  2. package/dist/__tests__/EditableGradingInstruction.test.d.ts.map +1 -0
  3. package/dist/__tests__/EditableGradingInstruction.test.js +174 -0
  4. package/dist/__tests__/EditableGradingInstruction.test.js.map +1 -0
  5. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts +2 -0
  6. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts.map +1 -0
  7. package/dist/__tests__/EditableGradingInstructionLocalization.test.js +112 -0
  8. package/dist/__tests__/EditableGradingInstructionLocalization.test.js.map +1 -0
  9. package/dist/__tests__/FormatButton.test.d.ts +2 -0
  10. package/dist/__tests__/FormatButton.test.d.ts.map +1 -0
  11. package/dist/__tests__/FormatButton.test.js +94 -0
  12. package/dist/__tests__/FormatButton.test.js.map +1 -0
  13. package/dist/__tests__/annotations.test.js +7 -7
  14. package/dist/__tests__/annotations.test.js.map +1 -1
  15. package/dist/__tests__/editor/FormatButton.test.d.ts +2 -0
  16. package/dist/__tests__/editor/FormatButton.test.d.ts.map +1 -0
  17. package/dist/__tests__/editor/FormatButton.test.js +98 -0
  18. package/dist/__tests__/editor/FormatButton.test.js.map +1 -0
  19. package/dist/__tests__/editor/Formula.test.d.ts +2 -0
  20. package/dist/__tests__/editor/Formula.test.d.ts.map +1 -0
  21. package/dist/__tests__/editor/Formula.test.js +61 -0
  22. package/dist/__tests__/editor/Formula.test.js.map +1 -0
  23. package/dist/__tests__/editor/ImageUploadButton.test.d.ts +2 -0
  24. package/dist/__tests__/editor/ImageUploadButton.test.d.ts.map +1 -0
  25. package/dist/__tests__/editor/ImageUploadButton.test.js +94 -0
  26. package/dist/__tests__/editor/ImageUploadButton.test.js.map +1 -0
  27. package/dist/__tests__/editor/List.test.d.ts +2 -0
  28. package/dist/__tests__/editor/List.test.d.ts.map +1 -0
  29. package/dist/__tests__/editor/List.test.js +72 -0
  30. package/dist/__tests__/editor/List.test.js.map +1 -0
  31. package/dist/__tests__/editor/Table.test.d.ts +2 -0
  32. package/dist/__tests__/editor/Table.test.d.ts.map +1 -0
  33. package/dist/__tests__/editor/Table.test.js +172 -0
  34. package/dist/__tests__/editor/Table.test.js.map +1 -0
  35. package/dist/__tests__/editor/br.test.d.ts +2 -0
  36. package/dist/__tests__/editor/br.test.d.ts.map +1 -0
  37. package/dist/__tests__/editor/br.test.js +39 -0
  38. package/dist/__tests__/editor/br.test.js.map +1 -0
  39. package/dist/__tests__/editor/hr.test.d.ts +2 -0
  40. package/dist/__tests__/editor/hr.test.d.ts.map +1 -0
  41. package/dist/__tests__/editor/hr.test.js +39 -0
  42. package/dist/__tests__/editor/hr.test.js.map +1 -0
  43. package/dist/__tests__/editor/nbsp.test.d.ts +2 -0
  44. package/dist/__tests__/editor/nbsp.test.d.ts.map +1 -0
  45. package/dist/__tests__/editor/nbsp.test.js +55 -0
  46. package/dist/__tests__/editor/nbsp.test.js.map +1 -0
  47. package/dist/__tests__/editor/noWrap.test.d.ts +2 -0
  48. package/dist/__tests__/editor/noWrap.test.d.ts.map +1 -0
  49. package/dist/__tests__/editor/noWrap.test.js +62 -0
  50. package/dist/__tests__/editor/noWrap.test.js.map +1 -0
  51. package/dist/__tests__/editor/spanWithLang.test.d.ts +2 -0
  52. package/dist/__tests__/editor/spanWithLang.test.d.ts.map +1 -0
  53. package/dist/__tests__/editor/spanWithLang.test.js +38 -0
  54. package/dist/__tests__/editor/spanWithLang.test.js.map +1 -0
  55. package/dist/__tests__/editor/subSup.test.d.ts +2 -0
  56. package/dist/__tests__/editor/subSup.test.d.ts.map +1 -0
  57. package/dist/__tests__/editor/subSup.test.js +50 -0
  58. package/dist/__tests__/editor/subSup.test.js.map +1 -0
  59. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  60. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts +8 -0
  61. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts.map +1 -0
  62. package/dist/__tests__/utils/ProseMirrorWrapper.js +44 -0
  63. package/dist/__tests__/utils/ProseMirrorWrapper.js.map +1 -0
  64. package/dist/__tests__/utils/prosemirror.d.ts +2 -0
  65. package/dist/__tests__/utils/prosemirror.d.ts.map +1 -0
  66. package/dist/__tests__/utils/prosemirror.js +30 -0
  67. package/dist/__tests__/utils/prosemirror.js.map +1 -0
  68. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts +4 -0
  69. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts.map +1 -0
  70. package/dist/__tests__/utils/renderEditableGradingInstruction.js +22 -0
  71. package/dist/__tests__/utils/renderEditableGradingInstruction.js.map +1 -0
  72. package/dist/__tests__/utils/util.d.ts +2 -0
  73. package/dist/__tests__/utils/util.d.ts.map +1 -0
  74. package/dist/__tests__/utils/util.js +10 -0
  75. package/dist/__tests__/utils/util.js.map +1 -0
  76. package/dist/components/Localization.d.ts +5 -0
  77. package/dist/components/Localization.d.ts.map +1 -0
  78. package/dist/components/Localization.js +9 -0
  79. package/dist/components/Localization.js.map +1 -0
  80. package/dist/components/context/AnnotationProvider.d.ts +2 -2
  81. package/dist/components/context/AnnotationProvider.d.ts.map +1 -1
  82. package/dist/components/context/AnnotationProvider.js +3 -2
  83. package/dist/components/context/AnnotationProvider.js.map +1 -1
  84. package/dist/components/context/AttachmentContext.d.ts.map +1 -1
  85. package/dist/components/context/CommonExamContext.d.ts +1 -0
  86. package/dist/components/context/CommonExamContext.d.ts.map +1 -1
  87. package/dist/components/context/CommonExamContext.js +3 -0
  88. package/dist/components/context/CommonExamContext.js.map +1 -1
  89. package/dist/components/context/ExamContext.d.ts.map +1 -1
  90. package/dist/components/context/GradingInstructionContext.d.ts +17 -0
  91. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -0
  92. package/dist/components/context/GradingInstructionContext.js +3 -0
  93. package/dist/components/context/GradingInstructionContext.js.map +1 -0
  94. package/dist/components/context/QuestionContext.d.ts.map +1 -1
  95. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  96. package/dist/components/context/SectionContext.d.ts.map +1 -1
  97. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  98. package/dist/components/grading-instructions/AnswerGradingInstruction.js +7 -2
  99. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  100. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +6 -0
  101. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -0
  102. package/dist/components/grading-instructions/EditableGradingInstruction.js +121 -0
  103. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -0
  104. package/dist/components/grading-instructions/GradingInstruction.d.ts +7 -0
  105. package/dist/components/grading-instructions/GradingInstruction.d.ts.map +1 -0
  106. package/dist/components/grading-instructions/GradingInstruction.js +9 -0
  107. package/dist/components/grading-instructions/GradingInstruction.js.map +1 -0
  108. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +4 -0
  109. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -0
  110. package/dist/components/grading-instructions/GradingInstructionProvider.js +7 -0
  111. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -0
  112. package/dist/components/grading-instructions/GradingInstructions.d.ts +2 -1
  113. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  114. package/dist/components/grading-instructions/GradingInstructions.js +18 -15
  115. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  116. package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts +9 -0
  117. package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts.map +1 -0
  118. package/dist/components/grading-instructions/editor/AttributeToggleButton.js +53 -0
  119. package/dist/components/grading-instructions/editor/AttributeToggleButton.js.map +1 -0
  120. package/dist/components/grading-instructions/editor/CurrentElement.d.ts +2 -0
  121. package/dist/components/grading-instructions/editor/CurrentElement.d.ts.map +1 -0
  122. package/dist/components/grading-instructions/editor/CurrentElement.js +8 -0
  123. package/dist/components/grading-instructions/editor/CurrentElement.js.map +1 -0
  124. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts +7 -0
  125. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +1 -0
  126. package/dist/components/grading-instructions/editor/CurrentLocalization.js +13 -0
  127. package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +1 -0
  128. package/dist/components/grading-instructions/editor/FormatButton.d.ts +9 -0
  129. package/dist/components/grading-instructions/editor/FormatButton.d.ts.map +1 -0
  130. package/dist/components/grading-instructions/editor/FormatButton.js +26 -0
  131. package/dist/components/grading-instructions/editor/FormatButton.js.map +1 -0
  132. package/dist/components/grading-instructions/editor/Formula.d.ts +15 -0
  133. package/dist/components/grading-instructions/editor/Formula.d.ts.map +1 -0
  134. package/dist/components/grading-instructions/editor/Formula.js +41 -0
  135. package/dist/components/grading-instructions/editor/Formula.js.map +1 -0
  136. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts +7 -0
  137. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts.map +1 -0
  138. package/dist/components/grading-instructions/editor/FormulaPopup.js +49 -0
  139. package/dist/components/grading-instructions/editor/FormulaPopup.js.map +1 -0
  140. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts +6 -0
  141. package/dist/components/grading-instructions/editor/ImageUploadButton.d.ts.map +1 -0
  142. package/dist/components/grading-instructions/editor/ImageUploadButton.js +77 -0
  143. package/dist/components/grading-instructions/editor/ImageUploadButton.js.map +1 -0
  144. package/dist/components/grading-instructions/editor/List.d.ts +9 -0
  145. package/dist/components/grading-instructions/editor/List.d.ts.map +1 -0
  146. package/dist/components/grading-instructions/editor/List.js +41 -0
  147. package/dist/components/grading-instructions/editor/List.js.map +1 -0
  148. package/dist/components/grading-instructions/editor/Localization.d.ts +3 -0
  149. package/dist/components/grading-instructions/editor/Localization.d.ts.map +1 -0
  150. package/dist/components/grading-instructions/editor/Localization.js +36 -0
  151. package/dist/components/grading-instructions/editor/Localization.js.map +1 -0
  152. package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts +6 -0
  153. package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts.map +1 -0
  154. package/dist/components/grading-instructions/editor/LocalizationButtons.js +14 -0
  155. package/dist/components/grading-instructions/editor/LocalizationButtons.js.map +1 -0
  156. package/dist/components/grading-instructions/editor/NBSP.d.ts +4 -0
  157. package/dist/components/grading-instructions/editor/NBSP.d.ts.map +1 -0
  158. package/dist/components/grading-instructions/editor/NBSP.js +17 -0
  159. package/dist/components/grading-instructions/editor/NBSP.js.map +1 -0
  160. package/dist/components/grading-instructions/editor/Table.d.ts +6 -0
  161. package/dist/components/grading-instructions/editor/Table.d.ts.map +1 -0
  162. package/dist/components/grading-instructions/editor/Table.js +186 -0
  163. package/dist/components/grading-instructions/editor/Table.js.map +1 -0
  164. package/dist/components/grading-instructions/editor/findNode.d.ts +3 -0
  165. package/dist/components/grading-instructions/editor/findNode.d.ts.map +1 -0
  166. package/dist/components/grading-instructions/editor/findNode.js +10 -0
  167. package/dist/components/grading-instructions/editor/findNode.js.map +1 -0
  168. package/dist/components/grading-instructions/editor/localizatio.d.ts +3 -0
  169. package/dist/components/grading-instructions/editor/localizatio.d.ts.map +1 -0
  170. package/dist/components/grading-instructions/editor/localizatio.js +36 -0
  171. package/dist/components/grading-instructions/editor/localizatio.js.map +1 -0
  172. package/dist/components/grading-instructions/editor/localizationSpan.d.ts +3 -0
  173. package/dist/components/grading-instructions/editor/localizationSpan.d.ts.map +1 -0
  174. package/dist/components/grading-instructions/editor/localizationSpan.js +36 -0
  175. package/dist/components/grading-instructions/editor/localizationSpan.js.map +1 -0
  176. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts +4 -0
  177. package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts.map +1 -0
  178. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js +62 -0
  179. package/dist/components/grading-instructions/editor/schemas/formulaSchema.js.map +1 -0
  180. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts +4 -0
  181. package/dist/components/grading-instructions/editor/schemas/image-schema.d.ts.map +1 -0
  182. package/dist/components/grading-instructions/editor/schemas/image-schema.js +47 -0
  183. package/dist/components/grading-instructions/editor/schemas/image-schema.js.map +1 -0
  184. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts +4 -0
  185. package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts.map +1 -0
  186. package/dist/components/grading-instructions/editor/schemas/imageSchema.js +61 -0
  187. package/dist/components/grading-instructions/editor/schemas/imageSchema.js.map +1 -0
  188. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts +72 -0
  189. package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts.map +1 -0
  190. package/dist/components/grading-instructions/editor/schemas/listSchema.js +7 -0
  191. package/dist/components/grading-instructions/editor/schemas/listSchema.js.map +1 -0
  192. package/dist/components/grading-instructions/editor/schemas/localizationSchema.d.ts +3 -0
  193. package/dist/components/grading-instructions/editor/schemas/localizationSchema.d.ts.map +1 -0
  194. package/dist/components/grading-instructions/editor/schemas/localizationSchema.js +39 -0
  195. package/dist/components/grading-instructions/editor/schemas/localizationSchema.js.map +1 -0
  196. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts +3 -0
  197. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts.map +1 -0
  198. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js +19 -0
  199. package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js.map +1 -0
  200. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts +3 -0
  201. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts.map +1 -0
  202. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js +19 -0
  203. package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js.map +1 -0
  204. package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts +3 -0
  205. package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts.map +1 -0
  206. package/dist/components/grading-instructions/editor/schemas/subSupSchema.js +23 -0
  207. package/dist/components/grading-instructions/editor/schemas/subSupSchema.js.map +1 -0
  208. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts +3 -0
  209. package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts.map +1 -0
  210. package/dist/components/grading-instructions/editor/schemas/tableSchema.js +43 -0
  211. package/dist/components/grading-instructions/editor/schemas/tableSchema.js.map +1 -0
  212. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts +3 -0
  213. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts.map +1 -0
  214. package/dist/components/grading-instructions/editor/spanWithNowrap.js +19 -0
  215. package/dist/components/grading-instructions/editor/spanWithNowrap.js.map +1 -0
  216. package/dist/components/grading-instructions/editor/spanWithPath.d.ts +3 -0
  217. package/dist/components/grading-instructions/editor/spanWithPath.d.ts.map +1 -0
  218. package/dist/components/grading-instructions/editor/spanWithPath.js +24 -0
  219. package/dist/components/grading-instructions/editor/spanWithPath.js.map +1 -0
  220. package/dist/components/grading-instructions/editor/util.d.ts +6 -0
  221. package/dist/components/grading-instructions/editor/util.d.ts.map +1 -0
  222. package/dist/components/grading-instructions/editor/util.js +10 -0
  223. package/dist/components/grading-instructions/editor/util.js.map +1 -0
  224. package/dist/components/shared/AnnotationMark.d.ts +1 -1
  225. package/dist/components/shared/AnnotationMark.d.ts.map +1 -1
  226. package/dist/components/shared/AnnotationPopup.d.ts +1 -1
  227. package/dist/components/shared/AnnotationPopup.d.ts.map +1 -1
  228. package/dist/components/shared/AnnotationPopup.js +11 -70
  229. package/dist/components/shared/AnnotationPopup.js.map +1 -1
  230. package/dist/components/shared/Popup.d.ts +15 -0
  231. package/dist/components/shared/Popup.d.ts.map +1 -0
  232. package/dist/components/shared/Popup.js +90 -0
  233. package/dist/components/shared/Popup.js.map +1 -0
  234. package/dist/components/shared/markText.d.ts +1 -1
  235. package/dist/components/shared/markText.d.ts.map +1 -1
  236. package/dist/components/shared/markText.js.map +1 -1
  237. package/dist/main-bundle.js +1 -1
  238. package/dist/main-bundle.js.LICENSE.txt +1 -1
  239. package/dist/main.css +1 -1
  240. package/package.json +11 -2
@@ -0,0 +1,61 @@
1
+ import * as _ from 'lodash-es';
2
+ import { schema as baseSchema } from 'prosemirror-schema-basic';
3
+ const existingImageNode = baseSchema.spec.nodes.get('image');
4
+ export const imageInputSchema = (resolveAttachment) => ({
5
+ ...existingImageNode,
6
+ content: 'inline*',
7
+ marks: '_',
8
+ attrs: {
9
+ ...existingImageNode === null || existingImageNode === void 0 ? void 0 : existingImageNode.attrs,
10
+ width: { default: null },
11
+ height: { default: null },
12
+ class: { default: null },
13
+ lang: { default: null },
14
+ hasTitle: { default: false }
15
+ },
16
+ parseDOM: [
17
+ {
18
+ tag: '[data-editor-id="e-image"], img',
19
+ getAttrs(element) {
20
+ const src = element.getAttribute('src');
21
+ if (!src || src.startsWith('data:')) {
22
+ return false;
23
+ }
24
+ const attrs = {
25
+ ...Object.fromEntries(Array.from(element.attributes).map(attr => [attr.name, attr.value])),
26
+ src: resolveAttachment(element.getAttribute('src') || ''),
27
+ hasTitle: !!element.querySelector('[data-editor-id="e-image-title"]')
28
+ };
29
+ return attrs;
30
+ }
31
+ }
32
+ ],
33
+ toDOM(node) {
34
+ if (node.attrs.hasTitle) {
35
+ return ['figure', {}, ['img', node.attrs], ['figcaption', {}, 0]];
36
+ }
37
+ else {
38
+ return ['img', node.attrs];
39
+ }
40
+ }
41
+ });
42
+ const pathToFilename = (path) => path.split('/').pop();
43
+ export const imageOutputSchema = {
44
+ toDOM(node) {
45
+ const attrs = _.pick(node.attrs, ['lang', 'class', 'src']);
46
+ const filteredAttrs = _.pickBy(attrs, _.isString);
47
+ const attributes = _.mapValues(filteredAttrs, (value, key) => {
48
+ if (key === 'src') {
49
+ return pathToFilename(value);
50
+ }
51
+ return value;
52
+ });
53
+ if (node.attrs.hasTitle) {
54
+ return ['e:image', attributes, ['e:image-title', {}, 0]];
55
+ }
56
+ else {
57
+ return ['e:image', attributes];
58
+ }
59
+ }
60
+ };
61
+ //# sourceMappingURL=imageSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/imageSchema.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,72 @@
1
+ export declare const listSchema: {
2
+ ordered_list: {
3
+ content: string;
4
+ group: string;
5
+ marks?: string;
6
+ inline?: boolean;
7
+ atom?: boolean;
8
+ attrs?: {
9
+ [name: string]: import("prosemirror-model").AttributeSpec;
10
+ };
11
+ selectable?: boolean;
12
+ draggable?: boolean;
13
+ code?: boolean;
14
+ whitespace?: "pre" | "normal";
15
+ definingAsContext?: boolean;
16
+ definingForContent?: boolean;
17
+ defining?: boolean;
18
+ isolating?: boolean;
19
+ toDOM?: (node: import("prosemirror-model").Node) => import("prosemirror-model").DOMOutputSpec;
20
+ parseDOM?: readonly import("prosemirror-model").TagParseRule[];
21
+ toDebugString?: (node: import("prosemirror-model").Node) => string;
22
+ leafText?: (node: import("prosemirror-model").Node) => string;
23
+ linebreakReplacement?: boolean;
24
+ };
25
+ bullet_list: {
26
+ content: string;
27
+ group: string;
28
+ marks?: string;
29
+ inline?: boolean;
30
+ atom?: boolean;
31
+ attrs?: {
32
+ [name: string]: import("prosemirror-model").AttributeSpec;
33
+ };
34
+ selectable?: boolean;
35
+ draggable?: boolean;
36
+ code?: boolean;
37
+ whitespace?: "pre" | "normal";
38
+ definingAsContext?: boolean;
39
+ definingForContent?: boolean;
40
+ defining?: boolean;
41
+ isolating?: boolean;
42
+ toDOM?: (node: import("prosemirror-model").Node) => import("prosemirror-model").DOMOutputSpec;
43
+ parseDOM?: readonly import("prosemirror-model").TagParseRule[];
44
+ toDebugString?: (node: import("prosemirror-model").Node) => string;
45
+ leafText?: (node: import("prosemirror-model").Node) => string;
46
+ linebreakReplacement?: boolean;
47
+ };
48
+ list_item: {
49
+ content: string;
50
+ marks?: string;
51
+ group?: string;
52
+ inline?: boolean;
53
+ atom?: boolean;
54
+ attrs?: {
55
+ [name: string]: import("prosemirror-model").AttributeSpec;
56
+ };
57
+ selectable?: boolean;
58
+ draggable?: boolean;
59
+ code?: boolean;
60
+ whitespace?: "pre" | "normal";
61
+ definingAsContext?: boolean;
62
+ definingForContent?: boolean;
63
+ defining?: boolean;
64
+ isolating?: boolean;
65
+ toDOM?: (node: import("prosemirror-model").Node) => import("prosemirror-model").DOMOutputSpec;
66
+ parseDOM?: readonly import("prosemirror-model").TagParseRule[];
67
+ toDebugString?: (node: import("prosemirror-model").Node) => string;
68
+ leafText?: (node: import("prosemirror-model").Node) => string;
69
+ linebreakReplacement?: boolean;
70
+ };
71
+ };
72
+ //# sourceMappingURL=listSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/listSchema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAItB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { bulletList, listItem, orderedList } from 'prosemirror-schema-list';
2
+ export const listSchema = {
3
+ ordered_list: { ...orderedList, content: 'list_item+', group: 'block' },
4
+ bullet_list: { ...bulletList, content: 'list_item+', group: 'block' },
5
+ list_item: { ...listItem, content: 'paragraph block*' }
6
+ };
7
+ //# sourceMappingURL=listSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/listSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE3E,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,YAAY,EAAE,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE;IACvE,WAAW,EAAE,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE;IACrE,SAAS,EAAE,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE;CACxD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare function localizationSchema(isInputSchema: boolean, mode: 'inline' | 'block'): NodeSpec;
3
+ //# sourceMappingURL=localizationSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localizationSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/localizationSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAElD,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAoC7F"}
@@ -0,0 +1,39 @@
1
+ export function localizationSchema(isInputSchema, mode) {
2
+ return {
3
+ [`localization_${mode}`]: {
4
+ content: `${mode}*`,
5
+ inline: mode === 'inline',
6
+ group: mode,
7
+ attrs: {
8
+ lang: { default: null },
9
+ examType: { default: null },
10
+ hidden: { default: null }
11
+ },
12
+ parseDOM: [
13
+ {
14
+ tag: `[data-editor-id="e-localization-${mode}"]`,
15
+ getAttrs(dom) {
16
+ var _a, _b, _c;
17
+ return {
18
+ lang: (_a = dom.getAttribute('lang')) !== null && _a !== void 0 ? _a : null,
19
+ examType: (_b = dom.getAttribute('exam-type')) !== null && _b !== void 0 ? _b : null,
20
+ hidden: isInputSchema ? ((_c = dom.getAttribute('hidden')) !== null && _c !== void 0 ? _c : null) : null
21
+ };
22
+ }
23
+ }
24
+ ],
25
+ toDOM(node) {
26
+ return [
27
+ `${isInputSchema ? (mode === 'inline' ? 'span' : 'div') : 'e:localization'}`,
28
+ {
29
+ lang: node.attrs.lang,
30
+ 'exam-type': node.attrs.examType,
31
+ hidden: isInputSchema ? node.attrs.hidden : null
32
+ },
33
+ 0
34
+ ];
35
+ }
36
+ }
37
+ };
38
+ }
39
+ //# sourceMappingURL=localizationSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localizationSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/localizationSchema.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,aAAsB,EAAE,IAAwB;IACjF,OAAO;QACL,CAAC,gBAAgB,IAAI,EAAE,CAAC,EAAE;YACxB,OAAO,EAAE,GAAG,IAAI,GAAG;YACnB,MAAM,EAAE,IAAI,KAAK,QAAQ;YACzB,KAAK,EAAE,IAAI;YACX,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;gBACvB,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;gBAC3B,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAC1B;YACD,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,mCAAmC,IAAI,IAAI;oBAChD,QAAQ,CAAC,GAAgB;;wBACvB,OAAO;4BACL,IAAI,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,IAAI;4BACtC,QAAQ,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,IAAI;4BAC/C,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,MAAA,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;yBACpE,CAAA;oBACH,CAAC;iBACF;aACF;YACD,KAAK,CAAC,IAAU;gBACd,OAAO;oBACL,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE;oBAC5E;wBACE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc;wBAC/B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,QAAkB;wBAC1C,MAAM,EAAE,aAAa,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,MAAiB,CAAC,CAAC,CAAC,IAAI;qBAC7D;oBACD,CAAC;iBACF,CAAA;YACH,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare const spanWithLangSchema: MarkSpec;
3
+ //# sourceMappingURL=spanWithLangSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithLangSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithLangSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,kBAAkB,EAAE,QAiBhC,CAAA"}
@@ -0,0 +1,19 @@
1
+ export const spanWithLangSchema = {
2
+ spanWithLang: {
3
+ attrs: {
4
+ lang: { default: null }
5
+ },
6
+ parseDOM: [
7
+ {
8
+ tag: 'span[lang]:not([data-editor-id])',
9
+ getAttrs(dom) {
10
+ return { lang: dom.getAttribute('lang') || null };
11
+ }
12
+ }
13
+ ],
14
+ toDOM(node) {
15
+ return ['span', { lang: node.attrs.lang }, 0];
16
+ }
17
+ }
18
+ };
19
+ //# sourceMappingURL=spanWithLangSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithLangSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithLangSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAa;IAC1C,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACxB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,kCAAkC;gBACvC,QAAQ,CAAC,GAAgB;oBACvB,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAA;gBACnD,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,CAAA;QACzD,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare const spanWithNowrapSchema: MarkSpec;
3
+ //# sourceMappingURL=spanWithNowrapSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithNowrapSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithNowrapSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,oBAAoB,EAAE,QAiBlC,CAAA"}
@@ -0,0 +1,19 @@
1
+ export const spanWithNowrapSchema = {
2
+ spanWithNowrap: {
3
+ attrs: {
4
+ class: { default: null }
5
+ },
6
+ parseDOM: [
7
+ {
8
+ tag: 'span[class="e-nowrap"]',
9
+ getAttrs(dom) {
10
+ return { class: dom.getAttribute('class') || null };
11
+ }
12
+ }
13
+ ],
14
+ toDOM(node) {
15
+ return ['span', { class: node.attrs.class }, 0];
16
+ }
17
+ }
18
+ };
19
+ //# sourceMappingURL=spanWithNowrapSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithNowrapSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithNowrapSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC5C,cAAc,EAAE;QACd,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACzB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,wBAAwB;gBAC7B,QAAQ,CAAC,GAAgB;oBACvB,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA;gBACrD,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,CAAA;QAC3D,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare const subSupSchema: MarkSpec;
3
+ //# sourceMappingURL=subSupSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subSupSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/subSupSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,eAAO,MAAM,YAAY,EAAE,QAqB1B,CAAA"}
@@ -0,0 +1,23 @@
1
+ export const subSupSchema = {
2
+ sub: {
3
+ parseDOM: [
4
+ {
5
+ tag: 'sub'
6
+ }
7
+ ],
8
+ toDOM() {
9
+ return ['sub', 0];
10
+ }
11
+ },
12
+ sup: {
13
+ parseDOM: [
14
+ {
15
+ tag: 'sup'
16
+ }
17
+ ],
18
+ toDOM() {
19
+ return ['sup', 0];
20
+ }
21
+ }
22
+ };
23
+ //# sourceMappingURL=subSupSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subSupSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/subSupSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;IACD,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { NodeSpec } from 'prosemirror-model';
2
+ export declare const tableSchema: NodeSpec;
3
+ //# sourceMappingURL=tableSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/tableSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAQlD,eAAO,MAAM,WAAW,EAAE,QAmCzB,CAAA"}
@@ -0,0 +1,43 @@
1
+ import { tableNodes } from 'prosemirror-tables';
2
+ const defaultSchema = tableNodes({
3
+ tableGroup: 'block',
4
+ cellContent: 'inline*',
5
+ cellAttributes: { class: { default: '' } }
6
+ });
7
+ export const tableSchema = {
8
+ ...defaultSchema,
9
+ table: {
10
+ ...defaultSchema.table,
11
+ parseDOM: [
12
+ {
13
+ tag: 'table',
14
+ getAttrs: (dom) => ({ class: dom.getAttribute('class') })
15
+ }
16
+ ],
17
+ attrs: { class: { default: '' } },
18
+ toDOM(node) {
19
+ const classNames = node.attrs.class || undefined;
20
+ return [
21
+ 'table',
22
+ {
23
+ class: classNames
24
+ },
25
+ ['tbody', 0]
26
+ ];
27
+ }
28
+ },
29
+ table_cell: {
30
+ ...defaultSchema.table_cell,
31
+ parseDOM: [
32
+ {
33
+ tag: 'td',
34
+ getAttrs: (dom) => ({ class: dom.getAttribute('class') })
35
+ }
36
+ ],
37
+ toDOM(node) {
38
+ const classNames = node.attrs.class || undefined;
39
+ return ['td', { class: classNames }, 0];
40
+ }
41
+ }
42
+ };
43
+ //# sourceMappingURL=tableSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/tableSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAG/C,MAAM,aAAa,GAAG,UAAU,CAAC;IAC/B,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,SAAS;IACtB,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE;CAC3C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAa;IACnC,GAAG,aAAa;IAChB,KAAK,EAAE;QACL,GAAG,aAAa,CAAC,KAAK;QACtB,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,OAAO;gBACZ,QAAQ,EAAE,CAAC,GAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;aACvE;SACF;QACD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE;QACjC,KAAK,CAAC,IAAU;YACd,MAAM,UAAU,GAAI,IAAI,CAAC,KAAK,CAAC,KAAgB,IAAI,SAAS,CAAA;YAC5D,OAAO;gBACL,OAAO;gBACP;oBACE,KAAK,EAAE,UAAU;iBAClB;gBACD,CAAC,OAAO,EAAE,CAAC,CAAC;aACb,CAAA;QACH,CAAC;KACF;IACD,UAAU,EAAE;QACV,GAAG,aAAa,CAAC,UAAU;QAC3B,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,IAAI;gBACT,QAAQ,EAAE,CAAC,GAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;aACvE;SACF;QACD,KAAK,CAAC,IAAU;YACd,MAAM,UAAU,GAAI,IAAI,CAAC,KAAK,CAAC,KAAgB,IAAI,SAAS,CAAA;YAC5D,OAAO,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,CAAA;QACzC,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare const spanWithNowrap: MarkSpec;
3
+ //# sourceMappingURL=spanWithNowrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithNowrap.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/spanWithNowrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,cAAc,EAAE,QAiB5B,CAAA"}
@@ -0,0 +1,19 @@
1
+ export const spanWithNowrap = {
2
+ spanWithClass: {
3
+ attrs: {
4
+ class: { default: null }
5
+ },
6
+ parseDOM: [
7
+ {
8
+ tag: 'span[class="e-nowrap"]',
9
+ getAttrs(dom) {
10
+ return { class: dom.getAttribute('class') || null };
11
+ }
12
+ }
13
+ ],
14
+ toDOM(node) {
15
+ return ['span', { class: node.attrs.class }, 0];
16
+ }
17
+ }
18
+ };
19
+ //# sourceMappingURL=spanWithNowrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithNowrap.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/spanWithNowrap.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAa;IACtC,aAAa,EAAE;QACb,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACzB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,wBAAwB;gBAC7B,QAAQ,CAAC,GAAgB;oBACvB,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA;gBACrD,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,CAAA;QAC3D,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare const spanWithNowrap: MarkSpec;
3
+ //# sourceMappingURL=spanWithPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithPath.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/spanWithPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,cAAc,EAAE,QAqB5B,CAAA"}
@@ -0,0 +1,24 @@
1
+ export const spanWithNowrap = {
2
+ spanWithClass: {
3
+ attrs: {
4
+ class: { default: null }
5
+ },
6
+ parseDOM: [
7
+ {
8
+ tag: 'span[path]',
9
+ getAttrs(dom) {
10
+ var _a, _b, _c;
11
+ return {
12
+ path: (_a = dom.getAttribute('path')) !== null && _a !== void 0 ? _a : null,
13
+ lang: (_b = dom.getAttribute('lang')) !== null && _b !== void 0 ? _b : null,
14
+ examType: (_c = dom.getAttribute('exam-type')) !== null && _c !== void 0 ? _c : null
15
+ };
16
+ }
17
+ }
18
+ ],
19
+ toDOM(node) {
20
+ return ['span', { path: node.attrs.path, lang: node.attrs.lang, 'exam-type': node.attrs.examType }, 0];
21
+ }
22
+ }
23
+ };
24
+ //# sourceMappingURL=spanWithPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spanWithPath.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/spanWithPath.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAa;IACtC,aAAa,EAAE;QACb,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACzB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,YAAY;gBACjB,QAAQ,CAAC,GAAgB;;oBACvB,OAAO;wBACL,IAAI,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,IAAI;wBACtC,IAAI,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,IAAI;wBACtC,QAAQ,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,IAAI;qBAChD,CAAA;gBACH,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAA;QAClH,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Transaction } from 'prosemirror-state';
2
+ export declare function findMark(tr: Transaction, markType: string): import("prosemirror-model").Mark | undefined;
3
+ export declare function findAttributesFromCursor(tr: Transaction, markType: string): {
4
+ [key: string]: string;
5
+ };
6
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gDAIzD;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAGrG"}
@@ -0,0 +1,10 @@
1
+ export function findMark(tr, markType) {
2
+ const node = tr.doc.nodeAt(tr.selection.from);
3
+ return node === null || node === void 0 ? void 0 : node.marks.find(mark => mark.type.name == markType);
4
+ }
5
+ export function findAttributesFromCursor(tr, markType) {
6
+ var _a;
7
+ const mark = findMark(tr, markType);
8
+ return (_a = mark === null || mark === void 0 ? void 0 : mark.attrs) !== null && _a !== void 0 ? _a : {};
9
+ }
10
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/util.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CAAC,EAAe,EAAE,QAAgB;IACxD,MAAM,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAE7C,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EAAe,EAAE,QAAgB;;IACxE,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;IACnC,OAAO,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,mCAAI,EAAE,CAAA;AAC1B,CAAC"}
@@ -4,6 +4,6 @@ export declare const AnnotationMark: ({ annotation, markedText, onClickAnnotatio
4
4
  annotation: RenderableAnnotation | NewRenderableAnnotation;
5
5
  markedText: string;
6
6
  onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, a: RenderableAnnotation) => void;
7
- setNewAnnotationRef: (ref: HTMLElement | undefined) => void;
7
+ setNewAnnotationRef: (ref: HTMLElement | null) => void;
8
8
  }) => React.JSX.Element;
9
9
  //# sourceMappingURL=AnnotationMark.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationMark.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationMark.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAGjF,eAAO,MAAM,cAAc,uEAKxB;IACD,UAAU,EAAE,oBAAoB,GAAG,uBAAuB,CAAA;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAClG,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5D,sBAsBA,CAAA"}
1
+ {"version":3,"file":"AnnotationMark.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationMark.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAGjF,eAAO,MAAM,cAAc,uEAKxB;IACD,UAAU,EAAE,oBAAoB,GAAG,uBAAuB,CAAA;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAClG,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACvD,sBAsBA,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare function AnnotationPopup(): React.JSX.Element | null;
2
+ export declare function AnnotationPopup(): React.JSX.Element;
3
3
  //# sourceMappingURL=AnnotationPopup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;AAK9D,wBAAgB,eAAe,6BA8E9B"}
1
+ {"version":3,"file":"AnnotationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,wBAAgB,eAAe,sBAmB9B"}
@@ -1,74 +1,15 @@
1
- import React, { useContext, useEffect, useState } from 'react';
2
- import { makeRichText } from 'rich-text-editor';
1
+ import React, { useContext } from 'react';
3
2
  import { AnnotationContext } from '../context/AnnotationProvider';
3
+ import { Popup } from './Popup';
4
4
  export function AnnotationPopup() {
5
- const popupRef = React.createRef();
6
- const textAreaRef = React.createRef();
7
- const { newAnnotation, setNewAnnotation, newAnnotationRef, onSaveAnnotation } = useContext(AnnotationContext);
8
- const [comment, setComment] = useState('');
9
- const [saveEnabled, setSaveEnabled] = useState(false);
10
- useEffect(() => {
11
- if (newAnnotationRef && textAreaRef.current) {
12
- showAndPositionElement(newAnnotationRef, popupRef);
13
- textAreaRef.current.innerHTML = comment;
14
- makeRichText(textAreaRef.current, {
15
- locale: 'FI',
16
- screenshotSaver: () => Promise.resolve('')
17
- }, value => {
18
- setComment(value.answerHTML);
19
- setSaveEnabled(value.answerHTML.trim().length > 0);
20
- });
21
- textAreaRef.current.focus();
22
- }
23
- }, [newAnnotationRef]);
24
- if (!newAnnotation) {
25
- if (comment) {
26
- setComment('');
27
- }
28
- return null;
29
- }
30
- const closeEditor = () => {
31
- setNewAnnotation(null);
32
- closeMathEditor(textAreaRef.current);
33
- };
34
- function createNewAnnotation(annotation, comment) {
35
- onSaveAnnotation(annotation, comment);
36
- closeEditor();
37
- }
38
- return (React.createElement("div", { className: "annotation-popup", style: { position: 'absolute', opacity: 0 }, ref: popupRef, "data-testid": "annotation-popup" },
39
- React.createElement("div", { className: "comment-content", "data-testid": "edit-comment", role: "textbox", "aria-multiline": "true", ref: textAreaRef }),
40
- React.createElement("span", { className: "comment-button-area" },
41
- React.createElement("span", null,
42
- React.createElement("button", { className: "button", onClick: e => {
43
- e.stopPropagation();
44
- closeMathEditor(textAreaRef.current);
45
- createNewAnnotation(newAnnotation, comment);
46
- }, "data-testid": "save-comment", disabled: !saveEnabled }, "Tallenna"),
47
- React.createElement("button", { className: "button text-button", onClick: closeEditor }, "Peru")))));
48
- }
49
- function showAndPositionElement(mark, popupRef) {
50
- const popup = popupRef.current;
51
- if (mark && popup) {
52
- const style = popup.style;
53
- const markRect = mark === null || mark === void 0 ? void 0 : mark.getBoundingClientRect();
54
- const popupRect = popup.getBoundingClientRect();
55
- const top = markRect.height + markRect.top + window.scrollY;
56
- const windowWidth = window.innerWidth;
57
- style.top = `${String(top)}px`;
58
- style.opacity = '1';
59
- const popupHitsWindowRight = markRect.left + popupRect.width > windowWidth;
60
- if (popupHitsWindowRight) {
61
- style.left = `${markRect.right - popupRect.width}px`;
62
- }
63
- else {
64
- style.left = `${markRect.left}px`;
65
- }
66
- }
67
- }
68
- function closeMathEditor(element) {
69
- // rich-text-editor does not properly support several rich-text-editor instances created at different times.
70
- // In order to close math editor that is open, we need to dispatch events like this.
71
- element.dispatchEvent(new Event('focus', { bubbles: true, cancelable: true }));
72
- element.dispatchEvent(new Event('blur', { bubbles: true, cancelable: true }));
5
+ const { newAnnotation, setNewAnnotation, newAnnotationRef, setNewAnnotationRef, onSaveAnnotation } = useContext(AnnotationContext);
6
+ return (React.createElement(Popup, { element: newAnnotationRef, initialTextContent: '', onValueSave: (comment) => {
7
+ onSaveAnnotation(newAnnotation, comment);
8
+ setNewAnnotation(null);
9
+ setNewAnnotationRef(null);
10
+ }, enableDelete: false, onCancel: () => {
11
+ setNewAnnotation(null);
12
+ setNewAnnotationRef(null);
13
+ } }));
73
14
  }
74
15
  //# sourceMappingURL=AnnotationPopup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationPopup.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEjE,MAAM,UAAU,eAAe;IAC7B,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAA;IAClD,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAA;IACrD,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC7G,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAA;IAClD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAA;IAE9D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,gBAAgB,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YAC5C,sBAAsB,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;YAClD,WAAW,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAA;YACvC,YAAY,CACV,WAAW,CAAC,OAAO,EACnB;gBACE,MAAM,EAAE,IAAI;gBACZ,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;aAC3C,EACD,KAAK,CAAC,EAAE;gBACN,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;gBAC5B,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YACpD,CAAC,CACF,CAAA;YACD,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;QAC7B,CAAC;IACH,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAEtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,IAAI,OAAO,EAAE,CAAC;YACZ,UAAU,CAAC,EAAE,CAAC,CAAA;QAChB,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,gBAAgB,CAAC,IAAI,CAAC,CAAA;QACtB,eAAe,CAAC,WAAW,CAAC,OAAQ,CAAC,CAAA;IACvC,CAAC,CAAA;IAED,SAAS,mBAAmB,CAAC,UAA6B,EAAE,OAAe;QACzE,gBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;QACtC,WAAW,EAAE,CAAA;IACf,CAAC;IAED,OAAO,CACL,6BACE,SAAS,EAAC,kBAAkB,EAC5B,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,EAAE,EAC3C,GAAG,EAAE,QAAQ,iBACD,kBAAkB;QAE9B,6BACE,SAAS,EAAC,iBAAiB,iBACf,cAAc,EAC1B,IAAI,EAAC,SAAS,oBACC,MAAM,EACrB,GAAG,EAAE,WAAW,GAChB;QACF,8BAAM,SAAS,EAAC,qBAAqB;YACnC;gBACE,gCACE,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE;wBACX,CAAC,CAAC,eAAe,EAAE,CAAA;wBACnB,eAAe,CAAC,WAAW,CAAC,OAAQ,CAAC,CAAA;wBACrC,mBAAmB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;oBAC7C,CAAC,iBACW,cAAc,EAC1B,QAAQ,EAAE,CAAC,WAAW,eAGf;gBACT,gCAAQ,SAAS,EAAC,oBAAoB,EAAC,OAAO,EAAE,WAAW,WAElD,CACJ,CACF,CACH,CACP,CAAA;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAwB,EAAE,QAAsC;IAC9F,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAA;IAC9B,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;QAClB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;QACzB,MAAM,QAAQ,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,qBAAqB,EAAE,CAAA;QAC9C,MAAM,SAAS,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC/C,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,CAAA;QAC3D,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAA;QACrC,KAAK,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAA;QAC9B,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;QACnB,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,KAAK,GAAG,WAAW,CAAA;QAE1E,IAAI,oBAAoB,EAAE,CAAC;YACzB,KAAK,CAAC,IAAI,GAAG,GAAG,QAAQ,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,IAAI,CAAA;QACtD,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,IAAI,CAAA;QACnC,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,OAAuB;IAC9C,4GAA4G;IAC5G,oFAAoF;IACpF,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAC9E,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAC/E,CAAC"}
1
+ {"version":3,"file":"AnnotationPopup.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,UAAU,eAAe;IAC7B,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAChG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/B,OAAO,CACL,oBAAC,KAAK,IACJ,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,CAAC,OAAe,EAAE,EAAE;YAC/B,gBAAiB,CAAC,aAAc,EAAE,OAAO,CAAC,CAAA;YAC1C,gBAAgB,CAAC,IAAI,CAAC,CAAA;YACtB,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAC3B,CAAC,EACD,YAAY,EAAE,KAAK,EACnB,QAAQ,EAAE,GAAG,EAAE;YACb,gBAAgB,CAAC,IAAI,CAAC,CAAA;YACtB,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAC3B,CAAC,GACD,CACH,CAAA;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ type PopupProps = {
3
+ element: Element | null;
4
+ initialTextContent: string;
5
+ onValueChange?: (text: string) => string | null;
6
+ onValueSave: (text: string) => void;
7
+ enableDelete: boolean;
8
+ onDelete?: () => void;
9
+ onCancel: () => void;
10
+ };
11
+ export declare function Popup(props: PopupProps): React.JSX.Element | null;
12
+ export declare function showAndPositionElement(mark: Element | null, popupRef: React.RefObject<HTMLElement>): void;
13
+ export declare function closeMathEditor(element: HTMLDivElement): void;
14
+ export {};
15
+ //# sourceMappingURL=Popup.d.ts.map
@@ -0,0 +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"}