@digabi/exam-engine-core 20.3.1 → 20.3.2-annoteta-react.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/dist/__tests__/annotations.test.d.ts +2 -0
  2. package/dist/__tests__/annotations.test.d.ts.map +1 -0
  3. package/dist/__tests__/annotations.test.js +179 -0
  4. package/dist/__tests__/annotations.test.js.map +1 -0
  5. package/dist/__tests__/testExamRendering.js.map +1 -1
  6. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  7. package/dist/components/attachments/Attachments.d.ts.map +1 -1
  8. package/dist/components/attachments/Attachments.js +17 -13
  9. package/dist/components/attachments/Attachments.js.map +1 -1
  10. package/dist/components/context/AnnotationContext.d.ts +9 -0
  11. package/dist/components/context/AnnotationContext.d.ts.map +1 -0
  12. package/dist/components/context/AnnotationContext.js +3 -0
  13. package/dist/components/context/AnnotationContext.js.map +1 -0
  14. package/dist/components/context/AnnotationProvider.d.ts +16 -0
  15. package/dist/components/context/AnnotationProvider.d.ts.map +1 -0
  16. package/dist/components/context/AnnotationProvider.js +19 -0
  17. package/dist/components/context/AnnotationProvider.js.map +1 -0
  18. package/dist/components/exam/DropdownAnswer.d.ts.map +1 -1
  19. package/dist/components/exam/DropdownAnswer.js +9 -1
  20. package/dist/components/exam/DropdownAnswer.js.map +1 -1
  21. package/dist/components/exam/Exam.d.ts +6 -1
  22. package/dist/components/exam/Exam.d.ts.map +1 -1
  23. package/dist/components/exam/Exam.js +35 -31
  24. package/dist/components/exam/Exam.js.map +1 -1
  25. package/dist/components/grading/editAnnotations.d.ts.map +1 -1
  26. package/dist/components/grading/editAnnotations.js +1 -0
  27. package/dist/components/grading/editAnnotations.js.map +1 -1
  28. package/dist/components/grading/examAnnotationUtils.d.ts +4 -0
  29. package/dist/components/grading/examAnnotationUtils.d.ts.map +1 -0
  30. package/dist/components/grading/examAnnotationUtils.js +53 -0
  31. package/dist/components/grading/examAnnotationUtils.js.map +1 -0
  32. package/dist/components/grading/reactAnnotation.d.ts +4 -0
  33. package/dist/components/grading/reactAnnotation.d.ts.map +1 -0
  34. package/dist/components/grading/reactAnnotation.js +54 -0
  35. package/dist/components/grading/reactAnnotation.js.map +1 -0
  36. package/dist/components/grading-instructions/GradingInstructions.d.ts +2 -2
  37. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  38. package/dist/components/grading-instructions/GradingInstructions.js +19 -14
  39. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  40. package/dist/components/shared/AnnotationPopup.d.ts +3 -0
  41. package/dist/components/shared/AnnotationPopup.d.ts.map +1 -0
  42. package/dist/components/shared/AnnotationPopup.js +61 -0
  43. package/dist/components/shared/AnnotationPopup.js.map +1 -0
  44. package/dist/components/shared/CreateAnnotationPopup.d.ts +6 -0
  45. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +1 -0
  46. package/dist/components/shared/CreateAnnotationPopup.js +11 -0
  47. package/dist/components/shared/CreateAnnotationPopup.js.map +1 -0
  48. package/dist/createRenderChildNodes.d.ts.map +1 -1
  49. package/dist/createRenderChildNodes.js +85 -6
  50. package/dist/createRenderChildNodes.js.map +1 -1
  51. package/dist/main-bundle.js +1 -1
  52. package/dist/main.css +1 -1
  53. package/dist/types/Score.d.ts +17 -8
  54. package/dist/types/Score.d.ts.map +1 -1
  55. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { CommonExamProps } from '../exam/Exam';
2
+ import { AnnotationProps, CommonExamProps } from '../exam/Exam';
3
3
  export declare const GradingInstructionsPageTitle: React.FunctionComponent;
4
- declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps>>;
4
+ declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps>>;
5
5
  export default _default;
6
6
  //# 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,MAAM,cAAc,CAAA;AA2H9C,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;AA6I/D,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;AAED,wBAAqE"}
@@ -29,6 +29,8 @@ import Recording from './Recording';
29
29
  import QuestionInstruction from '../exam/QuestionInstruction';
30
30
  import { QuestionNumber } from '../shared/QuestionNumber';
31
31
  import ExamTranslation from '../shared/ExamTranslation';
32
+ import { AnnotationProvider } from '../context/AnnotationProvider';
33
+ import { AnnotationPopup } from '../shared/AnnotationPopup';
32
34
  const renderIfWithinGradingInstructionContent = renderIf(({ element }) => queryAncestors(element, [
33
35
  // Keep in sync with lists in mastering/index.ts
34
36
  'answer-grading-instruction',
@@ -69,7 +71,7 @@ const renderChildNodes = createRenderChildNodes({
69
71
  'section-title': SectionTitle,
70
72
  video: Recording
71
73
  });
72
- const GradingInstructions = ({ doc }) => {
74
+ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation }) => {
73
75
  const root = doc.documentElement;
74
76
  const { date, dateTimeFormatter, dayCode, examCode, language, subjectLanguage } = useContext(CommonExamContext);
75
77
  const examTitle = findChildElement(root, 'exam-title');
@@ -83,19 +85,22 @@ const GradingInstructions = ({ doc }) => {
83
85
  const i18n = useCached(() => initI18n(language, examCode, dayCode));
84
86
  useEffect(changeLanguage(i18n, language));
85
87
  useEffect(scrollToHash, []);
86
- return (React.createElement(I18nextProvider, { i18n: i18n },
87
- React.createElement("main", { className: "e-exam e-grading-instructions", lang: subjectLanguage },
88
- React.createElement(React.StrictMode, null),
89
- React.createElement(SectionElement, { "aria-labelledby": examTitleId },
90
- React.createElement(DocumentTitle, { id: examTitleId },
91
- React.createElement(GradingInstructionsPageTitle, null),
92
- " ",
93
- examTitle && renderChildNodes(examTitle)),
94
- date && (React.createElement("p", null,
95
- React.createElement("strong", null, dateTimeFormatter.format(date)))),
96
- examGradingInstruction && (React.createElement(ExamGradingInstruction, { element: examGradingInstruction, renderChildNodes })),
97
- tableOfContents && React.createElement(TableOfContents, { element: tableOfContents, renderChildNodes })),
98
- renderChildNodes(root))));
88
+ 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)))));
99
104
  };
100
105
  // Wrap to a separate component, since we can't use translation hooks in the root component.
101
106
  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,EAA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a,IAAC,EAAE,EAAE,WAAW;oBAC5B,oBAAC,4BAA4B,OAAG;;oBAAE,SAAS,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAC5D;gBACf,IAAI,IAAI,CACP;oBACE,oCAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;gBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;gBACA,eAAe,IAAI,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CAC5E;YAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACnB,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;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,CAAA;AAC/B,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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"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function AnnotationPopup(): React.JSX.Element | null;
3
+ //# sourceMappingURL=AnnotationPopup.d.ts.map
@@ -0,0 +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,6BAuE9B"}
@@ -0,0 +1,61 @@
1
+ import React, { useContext, useEffect, useState } from 'react';
2
+ import { AnnotationContext } from '../context/AnnotationProvider';
3
+ import { makeRichText } from 'rich-text-editor';
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
+ return null;
26
+ }
27
+ const closeEditor = () => setNewAnnotation(null);
28
+ function updateComment(annotation, comment) {
29
+ onSaveAnnotation({ ...annotation, message: comment, annotationId: annotation.annotationId });
30
+ closeEditor();
31
+ }
32
+ return (React.createElement("div", { className: "annotation-popup", style: { position: 'absolute', opacity: 0 }, ref: popupRef, "data-testid": "annotation-popup" },
33
+ React.createElement("div", { className: "comment-content", "data-testid": "edit-comment", role: "textbox", "aria-multiline": "true", ref: textAreaRef }),
34
+ React.createElement("span", { className: "comment-button-area" },
35
+ React.createElement("span", null,
36
+ React.createElement("button", { className: "button", onClick: e => {
37
+ e.stopPropagation();
38
+ updateComment(newAnnotation, comment);
39
+ }, "data-testid": "save-comment", disabled: !saveEnabled }, "Vastaa"),
40
+ React.createElement("button", { className: "button text-button", onClick: closeEditor }, "Peru")))));
41
+ }
42
+ function showAndPositionElement(mark, popupRef) {
43
+ const popup = popupRef.current;
44
+ if (mark && popup) {
45
+ const style = popup.style;
46
+ const markRect = mark === null || mark === void 0 ? void 0 : mark.getBoundingClientRect();
47
+ const popupRect = popup.getBoundingClientRect();
48
+ const top = markRect.height + markRect.top + window.scrollY;
49
+ const windowWidth = window.innerWidth;
50
+ style.top = `${String(top)}px`;
51
+ style.opacity = '1';
52
+ const popupHitsWindowRight = markRect.left + popupRect.width > windowWidth;
53
+ if (popupHitsWindowRight) {
54
+ style.left = `${markRect.right - popupRect.width}px`;
55
+ }
56
+ else {
57
+ style.left = `${markRect.left}px`;
58
+ }
59
+ }
60
+ }
61
+ //# sourceMappingURL=AnnotationPopup.js.map
@@ -0,0 +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,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,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,CA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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"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare function CreateAnnotationPopup({ updateComment, closeEditor }: {
3
+ updateComment: (value: string) => void;
4
+ closeEditor: () => void;
5
+ }): React.JSX.Element;
6
+ //# sourceMappingURL=CreateAnnotationPopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateAnnotationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/CreateAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,wBAAgB,qBAAqB,CAAC,EACpC,aAAa,EACb,WAAW,EACZ,EAAE;IACD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,qBAyBA"}
@@ -0,0 +1,11 @@
1
+ import React, { useState } from 'react';
2
+ export function CreateAnnotationPopup({ updateComment, closeEditor }) {
3
+ const [comment, setComment] = useState('');
4
+ return (React.createElement("span", { className: "annotation-popup", style: { position: 'absolute' } },
5
+ React.createElement("textarea", { className: "comment-content", role: "textbox", "aria-multiline": "true", onChange: e => setComment(e.target.value), value: comment, autoFocus: true }),
6
+ React.createElement("span", { className: "comment-button-area" },
7
+ React.createElement("span", null,
8
+ React.createElement("button", { onClick: () => updateComment(comment), disabled: comment.trim().length === 0 }, "Vastaa"),
9
+ React.createElement("button", { className: "text-button", onClick: () => closeEditor() }, "Peru")))));
10
+ }
11
+ //# sourceMappingURL=CreateAnnotationPopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateAnnotationPopup.js","sourceRoot":"","sources":["../../../src/components/shared/CreateAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,MAAM,UAAU,qBAAqB,CAAC,EACpC,aAAa,EACb,WAAW,EAIZ;IACC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAA;IAElD,OAAO,CACL,8BAAM,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;QAChE,kCACE,SAAS,EAAC,iBAAiB,EAC3B,IAAI,EAAC,SAAS,oBACC,MAAM,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,IAAI,GACf;QACF,8BAAM,SAAS,EAAC,qBAAqB;YACnC;gBACE,gCAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,aAE3E;gBACT,gCAAQ,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,WAEnD,CACJ,CACF,CACF,CACR,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createRenderChildNodes.d.ts","sourceRoot":"","sources":["../src/createRenderChildNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,gBAAgB,0CAA0C,CAAA;AACvE,eAAO,MAAM,iBAAiB,iCAAiC,CAAA;AAE/D,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,2EAA2E;IAC3E,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED,0BAAkB,aAAa;IAC7B,UAAU,IAAA;IACV,QAAQ,IAAA;CACT;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,KAAK,CAAC,SAAS,EAAE,CAAA;AAE/F,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,GACpE,gBAAgB,CA+ClB"}
1
+ {"version":3,"file":"createRenderChildNodes.d.ts","sourceRoot":"","sources":["../src/createRenderChildNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAO5D,eAAO,MAAM,gBAAgB,0CAA0C,CAAA;AACvE,eAAO,MAAM,iBAAiB,iCAAiC,CAAA;AAE/D,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,2EAA2E;IAC3E,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED,0BAAkB,aAAa;IAC7B,UAAU,IAAA;IACV,QAAQ,IAAA;CACT;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,KAAK,CAAC,SAAS,EAAE,CAAA;AAmB/F,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,GACpE,gBAAgB,CAiDlB"}
@@ -1,13 +1,33 @@
1
- import React from 'react';
2
- import { mapChildNodes } from './dom-utils';
1
+ import React, { useContext, useEffect, useRef } from 'react';
2
+ import { AnnotationContext } from './components/context/AnnotationProvider';
3
+ import { onMouseDownForAnnotation } from './components/grading/examAnnotationUtils';
4
+ import { mapChildNodes, queryAncestors } from './dom-utils';
5
+ import { IsInSidebarContext } from './components/context/IsInSidebarContext';
3
6
  export const ExamNamespaceURI = 'http://ylioppilastutkinto.fi/exam.xsd';
4
7
  export const XHTMLNamespaceURI = 'http://www.w3.org/1999/xhtml';
8
+ function getElementPath(element) {
9
+ var _a, _b, _c;
10
+ const temp = !element.tagName && Array.from(((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.childNodes) || []).indexOf(element);
11
+ const elementIndex = Array.from(((_b = element.parentElement) === null || _b === void 0 ? void 0 : _b.children) || []).indexOf(element);
12
+ let path = `${element.nodeName}:${elementIndex > 0 ? elementIndex : temp}`;
13
+ let currentElement = element;
14
+ while (currentElement.parentElement) {
15
+ currentElement = currentElement.parentElement;
16
+ const displayNumber = currentElement.getAttribute('display-number');
17
+ const index = Number(displayNumber) || Array.from(((_c = currentElement.parentElement) === null || _c === void 0 ? void 0 : _c.children) || []).indexOf(currentElement);
18
+ const elementId = currentElement.getAttribute('id');
19
+ path = `${elementId || currentElement.nodeName}:${index} > ${path}`;
20
+ }
21
+ return path;
22
+ }
5
23
  export function createRenderChildNodes(componentMap) {
6
24
  function renderChildNode(node, index, options) {
7
25
  switch (node.nodeType) {
8
26
  case Node.TEXT_NODE:
9
- case Node.CDATA_SECTION_NODE:
10
- return options === 0 /* RenderOptions.RenderHTML */ ? renderTextNode(node) : null;
27
+ case Node.CDATA_SECTION_NODE: {
28
+ const path = getElementPath(node);
29
+ return options === 0 /* RenderOptions.RenderHTML */ ? renderTextNode(node, path) : null;
30
+ }
11
31
  case Node.ELEMENT_NODE:
12
32
  return renderElement(node, index, options);
13
33
  default:
@@ -45,9 +65,68 @@ export function createRenderChildNodes(componentMap) {
45
65
  }
46
66
  return renderChildNodes;
47
67
  }
48
- function renderTextNode(node) {
49
- return node.textContent;
68
+ function renderTextNode(node, key) {
69
+ var _a;
70
+ const annotationContextData = useContext(AnnotationContext);
71
+ const { isInSidebar } = useContext(IsInSidebarContext);
72
+ if ((annotationContextData === null || annotationContextData === void 0 ? void 0 : annotationContextData.annotations) === undefined ||
73
+ ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim().length) === 0 ||
74
+ isInSidebar !== undefined) {
75
+ return node.textContent;
76
+ }
77
+ const { annotations, onClickAnnotation, setNewAnnotation, setNewAnnotationRef, newAnnotation } = annotationContextData;
78
+ const newAnnotationForThisNode = (newAnnotation === null || newAnnotation === void 0 ? void 0 : newAnnotation.annotationAnchor) === key ? newAnnotation : null;
79
+ const thisNodeAnnotations = ((annotations === null || annotations === void 0 ? void 0 : annotations[key]) || []).concat(newAnnotationForThisNode || []);
80
+ const mouseUpCallback = (annotation) => {
81
+ var _a;
82
+ const displayNumber = ((_a = queryAncestors(node.parentElement, 'question')) === null || _a === void 0 ? void 0 : _a.getAttribute('display-number')) || '';
83
+ setNewAnnotation({ ...annotation, annotationAnchor: key, displayNumber });
84
+ };
85
+ function onMouseDown(e) {
86
+ const target = e.target;
87
+ const clickIsInPopup = target.closest('.annotation-popup');
88
+ if (!clickIsInPopup) {
89
+ setNewAnnotation(null);
90
+ }
91
+ onMouseDownForAnnotation(e, mouseUpCallback);
92
+ }
93
+ return (React.createElement("span", { onMouseDown: onMouseDown, className: "e-annotatable", key: key }, (thisNodeAnnotations === null || thisNodeAnnotations === void 0 ? void 0 : thisNodeAnnotations.length) > 0 ? markText(node.textContent, thisNodeAnnotations) : node.textContent));
94
+ function markText(text, annotations) {
95
+ if (annotations.length === 0) {
96
+ return [text];
97
+ }
98
+ const nodes = [];
99
+ let lastIndex = 0;
100
+ annotations.sort((a, b) => a.startIndex - b.startIndex);
101
+ for (const annotation of annotations) {
102
+ if (annotation.startIndex < 0 || annotation.length <= 0) {
103
+ return [text];
104
+ }
105
+ // Add unmarked text before this mark
106
+ if (annotation.startIndex > lastIndex) {
107
+ nodes.push(text.substring(lastIndex, annotation.startIndex));
108
+ }
109
+ // Add marked text
110
+ const markedText = text.substring(annotation.startIndex, annotation.startIndex + annotation.length);
111
+ nodes.push(annotation.hidden ? (React.createElement("mark", { key: annotation.startIndex, className: "e-annotation", "data-annotation-id": annotation.annotationId, "data-hidden": "true" })) : (React.createElement(Mark, { key: annotation.startIndex, annotation: annotation, markedText: markedText, onClickAnnotation: onClickAnnotation, setNewAnnotationRef: setNewAnnotationRef })));
112
+ lastIndex = annotation.startIndex + annotation.length;
113
+ }
114
+ // Add remaining unmarked text
115
+ nodes.push(text.substring(lastIndex));
116
+ return nodes;
117
+ }
50
118
  }
119
+ const Mark = ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }) => {
120
+ const markRef = useRef(null);
121
+ useEffect(() => {
122
+ if (markRef.current && !annotation.annotationId) {
123
+ setNewAnnotationRef(markRef.current);
124
+ }
125
+ }, []);
126
+ return (React.createElement("mark", { key: annotation.startIndex, ref: markRef, className: "e-annotation", "data-annotation-id": annotation.annotationId || '', "data-hidden": "false", onClick: e => onClickAnnotation(e, annotation) },
127
+ markedText,
128
+ (annotation === null || annotation === void 0 ? void 0 : annotation.markNumber) && React.createElement("sup", { className: "e-annotation", "data-content": annotation === null || annotation === void 0 ? void 0 : annotation.markNumber })));
129
+ };
51
130
  function htmlAttributes2props(element, index) {
52
131
  const props = { key: key(element, index) };
53
132
  for (const attribute of element.attributes) {
@@ -1 +1 @@
1
- {"version":3,"file":"createRenderChildNodes.js","sourceRoot":"","sources":["../src/createRenderChildNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,uCAAuC,CAAA;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8BAA8B,CAAA;AAiB/D,MAAM,UAAU,sBAAsB,CACpC,YAAqE;IAErE,SAAS,eAAe,CAAC,IAAe,EAAE,KAAa,EAAE,OAAsB;QAC7E,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtB,KAAK,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,IAAI,CAAC,kBAAkB;gBAC1B,OAAO,OAAO,qCAA6B,CAAC,CAAC,CAAC,cAAc,CAAC,IAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;YACnF,KAAK,IAAI,CAAC,YAAY;gBACpB,OAAO,aAAa,CAAC,IAAe,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YACvD;gBACE,OAAO,IAAI,CAAA;QACf,CAAC;IACH,CAAC;IAED,SAAS,aAAa,CAAC,OAAgB,EAAE,KAAa,EAAE,OAAsB;QAC5E,QAAQ,OAAO,CAAC,YAAY,EAAE,CAAC;YAC7B,KAAK,iBAAiB;gBACpB,OAAO,kBAAkB,CAAC,OAAsB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YACnE,KAAK,gBAAgB;gBACnB,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