@digabi/exam-engine-core 21.0.4-annoteta-react.0 → 22.0.1-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/__tests__/annotations.test.d.ts.map +1 -1
  2. package/dist/__tests__/annotations.test.js +175 -60
  3. package/dist/__tests__/annotations.test.js.map +1 -1
  4. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  5. package/dist/components/RenderIf.d.ts.map +1 -1
  6. package/dist/components/attachments/Attachments.d.ts.map +1 -1
  7. package/dist/components/attachments/Attachments.js +7 -9
  8. package/dist/components/attachments/Attachments.js.map +1 -1
  9. package/dist/components/context/AnnotationProvider.d.ts +7 -2
  10. package/dist/components/context/AnnotationProvider.d.ts.map +1 -1
  11. package/dist/components/context/AnnotationProvider.js +30 -4
  12. package/dist/components/context/AnnotationProvider.js.map +1 -1
  13. package/dist/components/context/CommonExamContext.d.ts +1 -0
  14. package/dist/components/context/CommonExamContext.d.ts.map +1 -1
  15. package/dist/components/context/CommonExamContext.js +3 -0
  16. package/dist/components/context/CommonExamContext.js.map +1 -1
  17. package/dist/components/context/GradingInstructionContext.d.ts +17 -0
  18. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -0
  19. package/dist/components/context/GradingInstructionContext.js +3 -0
  20. package/dist/components/context/GradingInstructionContext.js.map +1 -0
  21. package/dist/components/context/IsInSidebarContext.d.ts +0 -1
  22. package/dist/components/context/IsInSidebarContext.d.ts.map +1 -1
  23. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  24. package/dist/components/context/ResultsContext.js.map +1 -1
  25. package/dist/components/context/TOCContext.d.ts +0 -1
  26. package/dist/components/context/TOCContext.d.ts.map +1 -1
  27. package/dist/components/context/withContext.d.ts.map +1 -1
  28. package/dist/components/exam/ChoiceAnswer.d.ts.map +1 -1
  29. package/dist/components/exam/ChoiceAnswer.js +16 -14
  30. package/dist/components/exam/ChoiceAnswer.js.map +1 -1
  31. package/dist/components/exam/Exam.d.ts +4 -4
  32. package/dist/components/exam/Exam.d.ts.map +1 -1
  33. package/dist/components/exam/Exam.js +0 -2
  34. package/dist/components/exam/Exam.js.map +1 -1
  35. package/dist/components/exam/RichTextAnswer.d.ts +1 -1
  36. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  37. package/dist/components/exam/TextAnswer.d.ts.map +1 -1
  38. package/dist/components/exam/TextAnswer.js +6 -4
  39. package/dist/components/exam/TextAnswer.js.map +1 -1
  40. package/dist/components/exam/internal/ProgressBar.d.ts.map +1 -1
  41. package/dist/components/exam/internal/ProgressBar.js +1 -0
  42. package/dist/components/exam/internal/ProgressBar.js.map +1 -1
  43. package/dist/components/grading/editAnnotations.d.ts.map +1 -1
  44. package/dist/components/grading/editAnnotations.js +2 -1
  45. package/dist/components/grading/editAnnotations.js.map +1 -1
  46. package/dist/components/grading/examAnnotationUtils.d.ts +0 -1
  47. package/dist/components/grading/examAnnotationUtils.d.ts.map +1 -1
  48. package/dist/components/grading/examAnnotationUtils.js +88 -37
  49. package/dist/components/grading/examAnnotationUtils.js.map +1 -1
  50. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  51. package/dist/components/grading-instructions/AnswerGradingInstruction.js +7 -2
  52. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  53. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +5 -0
  54. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -0
  55. package/dist/components/grading-instructions/EditableGradingInstruction.js +40 -0
  56. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -0
  57. package/dist/components/grading-instructions/ExamGradingInstruction.d.ts.map +1 -1
  58. package/dist/components/grading-instructions/ExamGradingInstruction.js +7 -2
  59. package/dist/components/grading-instructions/ExamGradingInstruction.js.map +1 -1
  60. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +4 -0
  61. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -0
  62. package/dist/components/grading-instructions/GradingInstructionProvider.js +7 -0
  63. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -0
  64. package/dist/components/grading-instructions/GradingInstructions.d.ts +2 -1
  65. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  66. package/dist/components/grading-instructions/GradingInstructions.js +41 -40
  67. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  68. package/dist/components/shared/AnnotatableText.d.ts +2 -4
  69. package/dist/components/shared/AnnotatableText.d.ts.map +1 -1
  70. package/dist/components/shared/AnnotatableText.js +22 -60
  71. package/dist/components/shared/AnnotatableText.js.map +1 -1
  72. package/dist/components/shared/AnnotationMark.d.ts +9 -0
  73. package/dist/components/shared/AnnotationMark.d.ts.map +1 -0
  74. package/dist/components/shared/AnnotationMark.js +14 -0
  75. package/dist/components/shared/AnnotationMark.js.map +1 -0
  76. package/dist/components/shared/AnnotationPopup.js +4 -4
  77. package/dist/components/shared/AnnotationPopup.js.map +1 -1
  78. package/dist/components/shared/AnswerIndicator.d.ts +1 -1
  79. package/dist/components/shared/AnswerIndicator.d.ts.map +1 -1
  80. package/dist/components/shared/AnswerIndicator.js +10 -9
  81. package/dist/components/shared/AnswerIndicator.js.map +1 -1
  82. package/dist/components/shared/AnswerLengthInfo.d.ts +1 -1
  83. package/dist/components/shared/AnswerLengthInfo.d.ts.map +1 -1
  84. package/dist/components/shared/AttachmentLink.d.ts +1 -1
  85. package/dist/components/shared/AttachmentLink.d.ts.map +1 -1
  86. package/dist/components/shared/AttachmentLinks.d.ts +1 -1
  87. package/dist/components/shared/AttachmentLinks.d.ts.map +1 -1
  88. package/dist/components/shared/References.d.ts.map +1 -1
  89. package/dist/components/shared/References.js +1 -0
  90. package/dist/components/shared/References.js.map +1 -1
  91. package/dist/components/shared/TOCQuestion.js +1 -1
  92. package/dist/components/shared/TOCQuestion.js.map +1 -1
  93. package/dist/components/shared/markText.d.ts +5 -0
  94. package/dist/components/shared/markText.d.ts.map +1 -0
  95. package/dist/components/shared/markText.js +72 -0
  96. package/dist/components/shared/markText.js.map +1 -0
  97. package/dist/createRenderChildNodes.d.ts.map +1 -1
  98. package/dist/createRenderChildNodes.js +2 -12
  99. package/dist/createRenderChildNodes.js.map +1 -1
  100. package/dist/dom-utils.js +2 -2
  101. package/dist/dom-utils.js.map +1 -1
  102. package/dist/i18n/index.d.ts +1 -2
  103. package/dist/i18n/index.d.ts.map +1 -1
  104. package/dist/i18n/index.js.map +1 -1
  105. package/dist/main-bundle.js +1 -1
  106. package/dist/main.css +1 -1
  107. package/dist/store/answers/reducer.d.ts.map +1 -1
  108. package/dist/store/audio/reducer.d.ts.map +1 -1
  109. package/dist/store/audio/sagas.d.ts.map +1 -1
  110. package/dist/store/audio/sagas.js +3 -1
  111. package/dist/store/audio/sagas.js.map +1 -1
  112. package/dist/store/cas/reducer.d.ts.map +1 -1
  113. package/dist/store/index.d.ts +1 -2
  114. package/dist/store/index.d.ts.map +1 -1
  115. package/dist/store/selectors.d.ts +1 -1
  116. package/dist/types/Score.d.ts +18 -3
  117. package/dist/types/Score.d.ts.map +1 -1
  118. package/package.json +4 -4
  119. package/dist/components/context/AnnotationContext.d.ts +0 -9
  120. package/dist/components/context/AnnotationContext.d.ts.map +0 -1
  121. package/dist/components/context/AnnotationContext.js +0 -3
  122. package/dist/components/context/AnnotationContext.js.map +0 -1
  123. package/dist/components/exam/ExamineExam.d.ts +0 -5
  124. package/dist/components/exam/ExamineExam.d.ts.map +0 -1
  125. package/dist/components/exam/ExamineExam.js +0 -20
  126. package/dist/components/exam/ExamineExam.js.map +0 -1
  127. package/dist/components/exam/FinishExam.d.ts +0 -5
  128. package/dist/components/exam/FinishExam.d.ts.map +0 -1
  129. package/dist/components/exam/FinishExam.js +0 -17
  130. package/dist/components/exam/FinishExam.js.map +0 -1
  131. package/dist/components/grading/reactAnnotation.d.ts +0 -4
  132. package/dist/components/grading/reactAnnotation.d.ts.map +0 -1
  133. package/dist/components/grading/reactAnnotation.js +0 -54
  134. package/dist/components/grading/reactAnnotation.js.map +0 -1
  135. package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
  136. package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
  137. package/dist/components/results/isExamFinishPageHook.js +0 -7
  138. package/dist/components/results/isExamFinishPageHook.js.map +0 -1
  139. package/dist/components/shared/CreateAnnotationPopup.d.ts +0 -6
  140. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +0 -1
  141. package/dist/components/shared/CreateAnnotationPopup.js +0 -11
  142. package/dist/components/shared/CreateAnnotationPopup.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"editAnnotations.js","sourceRoot":"","sources":["../../../src/components/grading/editAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAI9B,MAAM,UAAU,uBAAuB,CAAC,cAAuB,EAAE,KAAY;IAC3E,IAAI,8BAA8B,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,MAAM,WAAW,GAAG,aAAa,CAAC,cAAc,CAAC,CAAA;IACjD,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,WAAW,EAAE,cAAc,CAAC,CAAA;IAC3G,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;IACzG,MAAM,MAAM,GAAG,kBAAkB,GAAG,gBAAgB,CAAA;IACpD,2FAA2F;IAC3F,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QAChB,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,OAAO;QACL,UAAU,EAAE,gBAAgB;QAC5B,MAAM;KACP,CAAA;IAED,SAAS,yBAAyB,CAAC,cAAoB,EAAE,MAAc,EAAE,cAAuB;QAC9F,MAAM,cAAc,GAAG,cAAc,KAAK,cAAc,CAAA;QACxD,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,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MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAA;IACxD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;AACpE,CAAC;AAED,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAQ;IACtC,CAAC,CAAC,cAAc,EAAE,CAAA;IAClB,CAAC,CAAC,eAAe,EAAE,CAAA;AACrB,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,OAAoB,EAAE,SAAkB;IAC7D,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAA;AACxD,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,UAAU,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAA;AAC7C,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
2
  export declare function onMouseDownForAnnotation(e: React.MouseEvent, mouseUpCallback: (e: any) => void): void;
3
- export declare function hasTextSelectedInAnswerText(): boolean;
4
3
  //# sourceMappingURL=examAnnotationUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"examAnnotationUtils.d.ts","sourceRoot":"","sources":["../../../src/components/grading/examAnnotationUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,QAuB9F;AAED,wBAAgB,2BAA2B,IAAI,OAAO,CAwCrD"}
1
+ {"version":3,"file":"examAnnotationUtils.d.ts","sourceRoot":"","sources":["../../../src/components/grading/examAnnotationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,QAuC9F"}
@@ -1,18 +1,30 @@
1
1
  import { textAnnotationFromRange } from './editAnnotations';
2
2
  export function onMouseDownForAnnotation(e, mouseUpCallback) {
3
- function onMouseUpAfterAnswerMouseDown(e) {
4
- const target = e.target;
3
+ function onMouseUpAfterAnswerMouseDown() {
4
+ var _a, _b;
5
5
  window.removeEventListener('mouseup', onMouseUpAfterAnswerMouseDown);
6
- // Text annotation
6
+ /**
7
+ * selection.anchorNode = where mouse is pressed down (chronologically first)
8
+ * selection.getRangeAt(0).startContainer = where selection starts (first in DOM)
9
+ */
7
10
  const selection = window.getSelection();
8
- if (selection && hasTextSelectedInAnswerText()) {
9
- const range = selection.getRangeAt(0);
10
- const position = textAnnotationFromRange(target, range);
11
- if (!position) {
12
- return;
11
+ const startNode = (_a = selection === null || selection === void 0 ? void 0 : selection.anchorNode) === null || _a === void 0 ? void 0 : _a.parentElement;
12
+ const endNode = (_b = selection === null || selection === void 0 ? void 0 : selection.focusNode) === null || _b === void 0 ? void 0 : _b.parentElement;
13
+ if (selection && startNode && endNode && selection.toString().length > 0) {
14
+ const hasMarks = selectionContainsNonhiddenMarks(selection);
15
+ const startNodedisplayNumber = getDisplayNumber(startNode);
16
+ const endNodeDisplayNumber = getDisplayNumber(endNode);
17
+ if (startNodedisplayNumber === endNodeDisplayNumber &&
18
+ isAnnotatable(startNode) &&
19
+ isAnnotatable(endNode) &&
20
+ !hasMarks) {
21
+ const annotations = extractAnnotationsFromSelection(selection);
22
+ mouseUpCallback({
23
+ annotationParts: annotations,
24
+ displayNumber: startNodedisplayNumber,
25
+ selectedText: annotations.map(a => a.selectedText).join(' ')
26
+ });
13
27
  }
14
- const selectedText = selection.toString();
15
- mouseUpCallback({ ...position, selectedText });
16
28
  }
17
29
  }
18
30
  // Do annotations only with left mouse buttons
@@ -21,33 +33,72 @@ export function onMouseDownForAnnotation(e, mouseUpCallback) {
21
33
  }
22
34
  window.addEventListener('mouseup', onMouseUpAfterAnswerMouseDown);
23
35
  }
24
- export function hasTextSelectedInAnswerText() {
25
- const selection = window.getSelection();
26
- return (selection !== null &&
27
- selectionInAnswerText(selection) &&
28
- (isRangeSelection(selection) || textSelectedInRange(selection)));
29
- function selectionInAnswerText(sel) {
30
- if (sel.type === 'None' || sel.type === 'Caret' || sel.rangeCount === 0) {
31
- return false;
32
- }
33
- const startContainer = sel.getRangeAt(0).startContainer;
34
- const endContainer = sel.getRangeAt(0).endContainer;
35
- const startParent = startContainer.parentElement;
36
- const endParent = endContainer.parentElement;
37
- const markTagExistsInSelection = Array.from(sel.getRangeAt(0).cloneContents().children).some(child => child.tagName === 'MARK' && child.getAttribute('data-annotation-id'));
38
- return (sel.rangeCount > 0 && startParent === endParent && (startParent === null || startParent === void 0 ? void 0 : startParent.tagName) !== 'MARK' && !markTagExistsInSelection);
39
- }
40
- function isRangeSelection(sel) {
41
- return (sel === null || sel === void 0 ? void 0 : sel.type) === 'Range';
42
- }
43
- function textSelectedInRange(sel) {
44
- const range = sel === null || sel === void 0 ? void 0 : sel.getRangeAt(0);
45
- return ((!!sel.rangeCount && range.toString().length > 0) ||
46
- isParentContainer(range.startContainer) ||
47
- isParentContainer(range.endContainer));
36
+ const selectionContainsNonhiddenMarks = (selection) => {
37
+ const rangeChildren = Array.from(selection === null || selection === void 0 ? void 0 : selection.getRangeAt(0).cloneContents().children);
38
+ const childIsNonHiddenMark = rangeChildren === null || rangeChildren === void 0 ? void 0 : rangeChildren.some(child => child.tagName === 'MARK' && child.getAttribute('data-hidden') === 'false');
39
+ const childContainsNonHiddenMark = rangeChildren.some(child => child.querySelector('mark[data-hidden="false"]'));
40
+ return childIsNonHiddenMark || childContainsNonHiddenMark;
41
+ };
42
+ const getDisplayNumber = (node) => { var _a; return (_a = node === null || node === void 0 ? void 0 : node.closest('div[data-annotation-anchor]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-annotation-anchor'); };
43
+ const isAnnotatable = (node) => (node === null || node === void 0 ? void 0 : node.getAttribute('data-annotation-path')) && node.tagName !== 'MARK';
44
+ const extractAnnotationsFromSelection = (selection) => {
45
+ var _a, _b;
46
+ const range = selection.getRangeAt(0);
47
+ const rangeChildren = Array.from(selection === null || selection === void 0 ? void 0 : selection.getRangeAt(0).cloneContents().children);
48
+ const firstSelectedNodeInDOM = range.startContainer.parentElement;
49
+ if (!(rangeChildren === null || rangeChildren === void 0 ? void 0 : rangeChildren.length)) {
50
+ // selection is plain text
51
+ const annotationAnchor = (_b = (_a = selection === null || selection === void 0 ? void 0 : selection.focusNode) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getAttribute('data-annotation-path');
52
+ const startAndLength = textAnnotationFromRange(firstSelectedNodeInDOM, range);
53
+ return [
54
+ {
55
+ annotationAnchor,
56
+ selectedText: (selection === null || selection === void 0 ? void 0 : selection.toString()) || '',
57
+ startIndex: (startAndLength === null || startAndLength === void 0 ? void 0 : startAndLength.startIndex) || 0,
58
+ length: (startAndLength === null || startAndLength === void 0 ? void 0 : startAndLength.length) || 0
59
+ }
60
+ ];
48
61
  }
49
- function isParentContainer(container) {
50
- return container.classList.contains('answer');
62
+ else {
63
+ // selection is in multiple elements
64
+ const annotations = rangeChildren === null || rangeChildren === void 0 ? void 0 : rangeChildren.reduce((acc, child, index, arr) => {
65
+ var _a;
66
+ const childsAnnotationPath = child.getAttribute('data-annotation-path');
67
+ const isLastRangeChild = index === arr.length - 1;
68
+ if (childsAnnotationPath) {
69
+ // child is a text node, like <span> text </span>
70
+ const newElement = {
71
+ annotationAnchor: childsAnnotationPath,
72
+ selectedText: child.textContent || '',
73
+ startIndex: index === 0 ? range.startOffset : 0,
74
+ length: isLastRangeChild ? range.endOffset : ((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.length) || 0
75
+ };
76
+ return [...acc, newElement];
77
+ }
78
+ else {
79
+ // child is a node with children, like <b> <span> text </span> </b>
80
+ const allChildrenWithAnnotationPath = child.querySelectorAll('[data-annotation-path]');
81
+ allChildrenWithAnnotationPath === null || allChildrenWithAnnotationPath === void 0 ? void 0 : allChildrenWithAnnotationPath.forEach((grandChild, kidIndex) => {
82
+ var _a;
83
+ const dataAnnotationPath = grandChild.getAttribute('data-annotation-path');
84
+ if (dataAnnotationPath) {
85
+ const isFirstOfAll = index === 0 && kidIndex === 0;
86
+ const isLastGrandChild = kidIndex === allChildrenWithAnnotationPath.length - 1;
87
+ const isLastOfAll = isLastRangeChild && isLastGrandChild;
88
+ const startAndLength = textAnnotationFromRange(firstSelectedNodeInDOM, range);
89
+ const newElement = {
90
+ annotationAnchor: dataAnnotationPath,
91
+ selectedText: grandChild.textContent || '',
92
+ startIndex: isFirstOfAll ? (startAndLength === null || startAndLength === void 0 ? void 0 : startAndLength.startIndex) || 0 : 0,
93
+ length: isLastOfAll ? range.endOffset : ((_a = grandChild.textContent) === null || _a === void 0 ? void 0 : _a.length) || 0
94
+ };
95
+ acc.push(newElement);
96
+ }
97
+ });
98
+ return acc;
99
+ }
100
+ }, []);
101
+ return annotations;
51
102
  }
52
- }
103
+ };
53
104
  //# sourceMappingURL=examAnnotationUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"examAnnotationUtils.js","sourceRoot":"","sources":["../../../src/components/grading/examAnnotationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAG3D,MAAM,UAAU,wBAAwB,CAAC,CAAmB,EAAE,eAAiC;IAC7F,SAAS,6BAA6B,CAAC,CAAa;QAClD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAqB,CAAA;QACtC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAA;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,KAAI,CAAC;yBAC5E,CAAA;wBACD,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;oBACtB,CAAC;gBACH,CAAC,CAAC,CAAA;gBACF,OAAO,GAAG,CAAA;YACZ,CAAC;QACH,CAAC,EAAE,EAAsB,CAAC,CAAA;QAE1B,OAAO,WAAW,CAAA;IACpB,CAAC;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnswerGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAIzE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
1
+ {"version":3,"file":"AnswerGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAOzE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,4 +1,9 @@
1
- import React from 'react';
2
- const AnswerGradingInstruction = ({ element, renderChildNodes }) => (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, renderChildNodes(element)));
1
+ import React, { useContext } from 'react';
2
+ import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
+ import { EditableGradingInstruction } from './EditableGradingInstruction';
4
+ const AnswerGradingInstruction = ({ element, renderChildNodes }) => {
5
+ const { editable } = useContext(GradingInstructionContext);
6
+ return (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
7
+ };
3
8
  export default AnswerGradingInstruction;
4
9
  //# sourceMappingURL=AnswerGradingInstruction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnswerGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAC/G,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AAED,eAAe,wBAAwB,CAAA"}
1
+ {"version":3,"file":"AnswerGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAEzE,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC9G,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IAC1D,OAAO,CACL,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,QAAQ,CAAC,CAAC,CAAC,oBAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CACpF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare function EditableGradingInstruction({ element }: {
3
+ element: Element;
4
+ }): React.JSX.Element;
5
+ //# sourceMappingURL=EditableGradingInstruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAM5D,wBAAgB,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBA8B3E"}
@@ -0,0 +1,40 @@
1
+ import React, { useContext, useEffect, useRef } from 'react';
2
+ import { makeRichText } from 'rich-text-editor';
3
+ import { GradingInstructionContext } from '../context/GradingInstructionContext';
4
+ import { CommonExamContext } from '../context/CommonExamContext';
5
+ import { QuestionContext } from '../context/QuestionContext';
6
+ export function EditableGradingInstruction({ element }) {
7
+ const { language, examType } = useContext(CommonExamContext);
8
+ const { displayNumber } = useContext(QuestionContext);
9
+ const { onContentChange, saveScreenshot } = useContext(GradingInstructionContext);
10
+ const answerGradingInstructionDiv = useRef(null);
11
+ useEffect(() => {
12
+ if (answerGradingInstructionDiv.current) {
13
+ const xpath = answerGradingInstructionDiv.current.getAttribute('data-xpath');
14
+ makeRichText(answerGradingInstructionDiv.current, {
15
+ locale: language.startsWith('sv') ? 'SV' : 'FI',
16
+ screenshotSaver: saveScreenshot ? ({ type, data }) => saveScreenshot(type, data, displayNumber) : undefined,
17
+ screenshotImageSelector: 'img[src^="data:image/png"], img[src^="data:image/jpeg"]',
18
+ fileTypes: ['image/png', 'image/jpeg']
19
+ }, ({ answerHTML }) => (onContentChange ? onContentChange(answerHTML, xpath) : () => { }));
20
+ answerGradingInstructionDiv.current.replaceChildren(element);
21
+ }
22
+ }, [language]);
23
+ return (React.createElement("div", { ref: answerGradingInstructionDiv, "data-xpath": xpathOf(element), "data-language": language, "data-exam-type": examType }));
24
+ }
25
+ function indexOf(element) {
26
+ if (element.parentElement) {
27
+ const siblings = Array.from(element.parentElement.querySelectorAll(`:scope > ${element.localName}`));
28
+ const index = siblings.findIndex(s => s == element);
29
+ return `[${index + 1}]`;
30
+ }
31
+ return '';
32
+ }
33
+ function xpathOf(element) {
34
+ const index = indexOf(element);
35
+ if (element.parentElement) {
36
+ return `${xpathOf(element.parentElement)}/${element.nodeName}${index}`;
37
+ }
38
+ return `/${element.nodeName}${index}`;
39
+ }
40
+ //# sourceMappingURL=EditableGradingInstruction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditableGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,MAAM,UAAU,0BAA0B,CAAC,EAAE,OAAO,EAAwB;IAC1E,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC5D,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IACrD,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IACjF,MAAM,2BAA2B,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAEhE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,2BAA2B,CAAC,OAAO,EAAE,CAAC;YACxC,MAAM,KAAK,GAAG,2BAA2B,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;YAC5E,YAAY,CACV,2BAA2B,CAAC,OAAO,EACnC;gBACE,MAAM,EAAE,QAAQ,CAAC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AO,CAAC,CAAA;IAC9B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,QAAQ,GAAG,KAAK,EAAE,CAAA;IACxE,CAAC;IACD,OAAO,IAAI,OAAO,CAAC,QAAQ,GAAG,KAAK,EAAE,CAAA;AACvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExamGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAIvE,CAAA;AAED,eAAe,sBAAsB,CAAA"}
1
+ {"version":3,"file":"ExamGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAQvE,CAAA;AACD,eAAe,sBAAsB,CAAA"}
@@ -1,4 +1,9 @@
1
- import React from 'react';
2
- const ExamGradingInstruction = ({ element, renderChildNodes }) => (React.createElement("div", { className: "e-exam-grading-instruction notification e-pad-4", "data-annotation-anchor": "exam-grading-instruction" }, renderChildNodes(element)));
1
+ import React, { useContext } from 'react';
2
+ import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
+ import { EditableGradingInstruction } from './EditableGradingInstruction';
4
+ const ExamGradingInstruction = ({ element, renderChildNodes }) => {
5
+ const { editable } = useContext(GradingInstructionContext);
6
+ return (React.createElement("div", { className: "e-exam-grading-instruction notification e-pad-4", "data-annotation-anchor": "exam-grading-instruction" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
7
+ };
3
8
  export default ExamGradingInstruction;
4
9
  //# sourceMappingURL=ExamGradingInstruction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExamGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,sBAAsB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAC7G,6BAAK,SAAS,EAAC,iDAAiD,4BAAwB,0BAA0B,IAC/G,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AAED,eAAe,sBAAsB,CAAA"}
1
+ {"version":3,"file":"ExamGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAEzE,MAAM,sBAAsB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC5G,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IAE1D,OAAO,CACL,6BAAK,SAAS,EAAC,iDAAiD,4BAAwB,0BAA0B,IAC/G,QAAQ,CAAC,CAAC,CAAC,oBAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CACpF,CACP,CAAA;AACH,CAAC,CAAA;AACD,eAAe,sBAAsB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { GradingInstructionProps } from '../context/GradingInstructionContext';
3
+ export declare const GradingInstructionProvider: ({ editable, onContentChange, saveScreenshot, children }: GradingInstructionProps) => React.JSX.Element;
4
+ //# sourceMappingURL=GradingInstructionProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstructionProvider.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA6B,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAEzG,eAAO,MAAM,0BAA0B,4DAKpC,uBAAuB,sBAGzB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
+ export const GradingInstructionProvider = ({ editable, onContentChange, saveScreenshot, children }) => {
4
+ const contextValue = editable ? { editable, onContentChange, saveScreenshot } : { editable };
5
+ return React.createElement(GradingInstructionContext.Provider, { value: contextValue }, children);
6
+ };
7
+ //# sourceMappingURL=GradingInstructionProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstructionProvider.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAA2B,MAAM,sCAAsC,CAAA;AAEzG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,QAAQ,EACR,eAAe,EACf,cAAc,EACd,QAAQ,EACgB,EAAE,EAAE;IAC5B,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC5F,OAAO,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAsC,CAAA;AACjH,CAAC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { AnnotationProps, CommonExamProps } from '../exam/Exam';
3
+ import { GradingInstructionProps } from '../context/GradingInstructionContext';
3
4
  export declare const GradingInstructionsPageTitle: React.FunctionComponent;
4
- declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps>>;
5
+ declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps & GradingInstructionProps>>;
5
6
  export default _default;
6
7
  //# sourceMappingURL=GradingInstructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructions.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AA6I/D,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;AAED,wBAAqE"}
1
+ {"version":3,"file":"GradingInstructions.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAcpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAoB/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAmH9E,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;AAED,wBAAqE"}
@@ -1,36 +1,36 @@
1
1
  import React, { useContext, useEffect } from 'react';
2
- import { CommonExamContext, withCommonExamContext } from '../context/CommonExamContext';
3
- import { useCached } from '../../useCached';
4
- import { changeLanguage, initI18n, useExamTranslation } from '../../i18n';
5
- import { scrollToHash } from '../../scrollToHash';
6
2
  import { I18nextProvider } from 'react-i18next';
7
- import Section from './Section';
8
- import SectionTitle from './SectionTitle';
9
- import Question from './Question';
10
- import File from '../shared/File';
11
- import ExamGradingInstruction from './ExamGradingInstruction';
12
- import AutogradedAnswer from './AutogradedAnswer';
13
- import Image from '../shared/Image';
14
- import Formula from '../shared/Formula';
15
- import AutogradedAnswerOption from './AutogradedAnswerOption';
16
- import QuestionTitle from './QuestionTitle';
17
3
  import { createRenderChildNodes } from '../../createRenderChildNodes';
4
+ import { findChildElement, queryAncestors } from '../../dom-utils';
5
+ import { changeLanguage, initI18n, useExamTranslation } from '../../i18n';
18
6
  import { examTitleId } from '../../ids';
7
+ import { scrollToHash } from '../../scrollToHash';
8
+ import { useCached } from '../../useCached';
19
9
  import DocumentTitle from '../DocumentTitle';
20
- import SectionElement from '../SectionElement';
21
- import { findChildElement, queryAncestors } from '../../dom-utils';
22
- import { renderIf } from '../RenderIf';
23
10
  import RenderExamElements from '../RenderExamElements';
24
- import { mkTableOfContents } from '../shared/TableOfContents';
25
- import AnswerGradingInstruction from './AnswerGradingInstruction';
11
+ import { renderIf } from '../RenderIf';
12
+ import SectionElement from '../SectionElement';
13
+ import { AnnotationProvider } from '../context/AnnotationProvider';
14
+ import { CommonExamContext, withCommonExamContext } from '../context/CommonExamContext';
15
+ import QuestionInstruction from '../exam/QuestionInstruction';
26
16
  import mkAttachmentLink from '../shared/AttachmentLink';
27
17
  import mkAttachmentLinks from '../shared/AttachmentLinks';
28
- import Recording from './Recording';
29
- import QuestionInstruction from '../exam/QuestionInstruction';
30
- import { QuestionNumber } from '../shared/QuestionNumber';
31
18
  import ExamTranslation from '../shared/ExamTranslation';
32
- import { AnnotationProvider } from '../context/AnnotationProvider';
33
- import { AnnotationPopup } from '../shared/AnnotationPopup';
19
+ import File from '../shared/File';
20
+ import Formula from '../shared/Formula';
21
+ import Image from '../shared/Image';
22
+ import { QuestionNumber } from '../shared/QuestionNumber';
23
+ import { mkTableOfContents } from '../shared/TableOfContents';
24
+ import AnswerGradingInstruction from './AnswerGradingInstruction';
25
+ import AutogradedAnswer from './AutogradedAnswer';
26
+ import AutogradedAnswerOption from './AutogradedAnswerOption';
27
+ import ExamGradingInstruction from './ExamGradingInstruction';
28
+ import Question from './Question';
29
+ import QuestionTitle from './QuestionTitle';
30
+ import Recording from './Recording';
31
+ import Section from './Section';
32
+ import SectionTitle from './SectionTitle';
33
+ import { GradingInstructionProvider } from './GradingInstructionProvider';
34
34
  const renderIfWithinGradingInstructionContent = renderIf(({ element }) => queryAncestors(element, [
35
35
  // Keep in sync with lists in mastering/index.ts
36
36
  'answer-grading-instruction',
@@ -71,7 +71,7 @@ const renderChildNodes = createRenderChildNodes({
71
71
  'section-title': SectionTitle,
72
72
  video: Recording
73
73
  });
74
- const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation }) => {
74
+ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation, editable, onContentChange, saveScreenshot }) => {
75
75
  const root = doc.documentElement;
76
76
  const { date, dateTimeFormatter, dayCode, examCode, language, subjectLanguage } = useContext(CommonExamContext);
77
77
  const examTitle = findChildElement(root, 'exam-title');
@@ -85,22 +85,23 @@ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnota
85
85
  const i18n = useCached(() => initI18n(language, examCode, dayCode));
86
86
  useEffect(changeLanguage(i18n, language));
87
87
  useEffect(scrollToHash, []);
88
+ const props = editable ? { editable, onContentChange, saveScreenshot } : { editable };
88
89
  return (React.createElement(AnnotationProvider, { annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation },
89
- React.createElement(I18nextProvider, { i18n: i18n },
90
- React.createElement("main", { className: "e-exam e-grading-instructions", lang: subjectLanguage },
91
- React.createElement(AnnotationPopup, null),
92
- React.createElement(React.StrictMode, null),
93
- React.createElement(SectionElement, { "aria-labelledby": examTitleId },
94
- React.createElement(DocumentTitle, { id: examTitleId },
95
- React.createElement(GradingInstructionsPageTitle, null),
96
- " ",
97
- examTitle && renderChildNodes(examTitle)),
98
- date && (React.createElement("p", null,
99
- React.createElement("strong", null, dateTimeFormatter.format(date)))),
100
- examGradingInstruction && (React.createElement(ExamGradingInstruction, { element: examGradingInstruction, renderChildNodes })),
101
- tableOfContents && (React.createElement("div", { className: "main-toc-container" },
102
- React.createElement(TableOfContents, { element: tableOfContents, renderChildNodes })))),
103
- renderChildNodes(root)))));
90
+ React.createElement(GradingInstructionProvider, { ...props },
91
+ React.createElement(I18nextProvider, { i18n: i18n },
92
+ React.createElement("main", { className: "e-exam e-grading-instructions", lang: subjectLanguage },
93
+ React.createElement(React.StrictMode, null),
94
+ React.createElement(SectionElement, { "aria-labelledby": examTitleId },
95
+ React.createElement(DocumentTitle, { id: examTitleId },
96
+ React.createElement(GradingInstructionsPageTitle, null),
97
+ " ",
98
+ examTitle && renderChildNodes(examTitle)),
99
+ date && (React.createElement("p", null,
100
+ React.createElement("strong", null, dateTimeFormatter.format(date)))),
101
+ examGradingInstruction && (React.createElement(ExamGradingInstruction, { element: examGradingInstruction, renderChildNodes })),
102
+ tableOfContents && (React.createElement("div", { className: "main-toc-container" },
103
+ React.createElement(TableOfContents, { element: tableOfContents, renderChildNodes })))),
104
+ renderChildNodes(root))))));
104
105
  };
105
106
  // Wrap to a separate component, since we can't use translation hooks in the root component.
106
107
  export const GradingInstructionsPageTitle = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructions.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,OAAO,MAAM,WAAW,C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AW;wBAC5B,oBAAC,4BAA4B,OAAG;;wBAAE,SAAS,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAC5D;oBACf,IAAI,IAAI,CACP;wBACE,oCAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;oBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;oBACA,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;wBACjC,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CACnE,CACP,CACc;gBAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACC,CACtB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAA4B,GAAG,EAAE;IACxE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,iCAAiC,CAAC,CAAI,CAAA;AACpD,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructions.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAA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e,IAAC,IAAI,EAAE,IAAI;gBACzB,8BAAM,SAAS,EAAC,+BAA+B,EAAC,IAAI,EAAE,eAAe;oBACnE,oBAAC,KAAK,CAAC,UAAU,OAAG;oBACpB,oBAAC,cAAc,uBAAkB,WAAW;wBAC1C,oBAAC,aAAa,IAAC,EAAE,EAAE,WAAW;4BAC5B,oBAAC,4BAA4B,OAAG;;4BAAE,SAAS,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAC5D;wBACf,IAAI,IAAI,CACP;4BACE,oCAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;wBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;wBACA,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;4BACjC,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CACnE,CACP,CACc;oBAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACS,CACV,CACtB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAA4B,GAAG,EAAE;IACxE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,iCAAiC,CAAC,CAAI,CAAA;AACpD,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
- import { AnnotationContextType } from '../context/AnnotationProvider';
3
- export declare const AnnotatableText: ({ node, annotationContextData }: {
2
+ export declare const AnnotatableText: ({ node }: {
4
3
  node: Node;
5
- annotationContextData: AnnotationContextType;
6
- }) => React.JSX.Element;
4
+ }) => string | React.JSX.Element;
7
5
  //# sourceMappingURL=AnnotatableText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotatableText.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotatableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAQrE,eAAO,MAAM,eAAe,oCAGzB;IACD,IAAI,EAAE,IAAI,CAAA;IACV,qBAAqB,EAAE,qBAAqB,CAAA;CAC7C,sBA8EA,CAAA"}
1
+ {"version":3,"file":"AnnotatableText.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotatableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,eAAO,MAAM,eAAe,aAAc;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,+BA2BvD,CAAA"}