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

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/attachments/QuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,4BAQvE;;AAED,wBAAwC"}
1
+ {"version":3,"file":"QuestionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/attachments/QuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,4BAWvE;;AAED,wBAAwC"}
@@ -4,10 +4,12 @@ import { questionTitleId } from '../../ids';
4
4
  import { formatQuestionDisplayNumber } from '../../formatting';
5
5
  function QuestionTitle({ element, renderChildNodes }) {
6
6
  const { displayNumber, hasExternalMaterial } = useContext(QuestionContext);
7
- return hasExternalMaterial ? (React.createElement("h2", { id: questionTitleId(displayNumber) },
8
- formatQuestionDisplayNumber(displayNumber),
9
- " ",
10
- renderChildNodes(element))) : null;
7
+ return hasExternalMaterial ? (React.createElement(React.Fragment, null,
8
+ React.createElement("div", { className: "anchor", id: `question-nr-${displayNumber}` }),
9
+ React.createElement("h2", { id: questionTitleId(displayNumber) },
10
+ formatQuestionDisplayNumber(displayNumber),
11
+ " ",
12
+ renderChildNodes(element)))) : null;
11
13
  }
12
14
  export default React.memo(QuestionTitle);
13
15
  //# sourceMappingURL=QuestionTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionTitle.js","sourceRoot":"","sources":["../../../src/components/attachments/QuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAE9D,SAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACtE,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAE1E,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B,4BAAI,EAAE,EAAE,eAAe,CAAC,aAAa,CAAC;QACnC,2BAA2B,CAAC,aAAa,CAAC;;QAAG,gBAAgB,CAAC,OAAO,CAAC,CACpE,CACN,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA"}
1
+ {"version":3,"file":"QuestionTitle.js","sourceRoot":"","sources":["../../../src/components/attachments/QuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAE9D,SAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACtE,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAE1E,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B;QACE,6BAAK,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAE,eAAe,aAAa,EAAE,GAAI;QAC9D,4BAA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"}
@@ -50,7 +50,6 @@ export function showAndPositionElement(annotationRect, container, popup, topMarg
50
50
  style.display = 'block';
51
51
  const containerRect = container.getBoundingClientRect();
52
52
  const popupRect = popup.getBoundingClientRect();
53
- console.log('annotationRect', annotationRect, 'containerRect', containerRect, 'popupRect', popupRect);
54
53
  const left = annotationRect.left - containerRect.left;
55
54
  const top = annotationRect.bottom - containerRect.top + topMargin;
56
55
  style.top = `${String(top)}px`;
@@ -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,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,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,CAAC,OAAO,CAAA;IACzB,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"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { AnnotationContextType } from '../context/AnnotationProvider';
3
+ export declare const AnnotatableText: ({ node, annotationContextData }: {
4
+ node: Node;
5
+ annotationContextData: AnnotationContextType;
6
+ }) => React.JSX.Element;
7
+ //# sourceMappingURL=AnnotatableText.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,63 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { getElementPath, queryAncestors } from '../../dom-utils';
3
+ import { onMouseDownForAnnotation } from '../grading/examAnnotationUtils';
4
+ const isExamAnnotation = (annotation) => 'annotationId' in annotation;
5
+ export const AnnotatableText = ({ node, annotationContextData }) => {
6
+ const { annotations, onClickAnnotation, setNewAnnotation, setNewAnnotationRef, newAnnotation } = annotationContextData;
7
+ const path = getElementPath(node);
8
+ const newAnnotationForThisNode = (newAnnotation === null || newAnnotation === void 0 ? void 0 : newAnnotation.annotationAnchor) === path ? newAnnotation : null;
9
+ const thisNodeAnnotations = [
10
+ ...((annotations === null || annotations === void 0 ? void 0 : annotations[path]) || []),
11
+ ...(newAnnotationForThisNode ? [newAnnotationForThisNode] : [])
12
+ ];
13
+ const mouseUpCallback = (annotation) => {
14
+ var _a;
15
+ const displayNumber = ((_a = queryAncestors(node.parentElement, 'question')) === null || _a === void 0 ? void 0 : _a.getAttribute('display-number')) || '';
16
+ setNewAnnotation({ ...annotation, annotationAnchor: path, displayNumber });
17
+ };
18
+ function onMouseDown(e) {
19
+ const target = e.target;
20
+ const clickIsInPopup = target.closest('.annotation-popup');
21
+ if (!clickIsInPopup) {
22
+ setNewAnnotation(null);
23
+ }
24
+ onMouseDownForAnnotation(e, mouseUpCallback);
25
+ }
26
+ return (React.createElement("span", { onMouseDown: onMouseDown, className: "e-annotatable", key: path }, (thisNodeAnnotations === null || thisNodeAnnotations === void 0 ? void 0 : thisNodeAnnotations.length) > 0 ? markText(node.textContent, thisNodeAnnotations) : node.textContent));
27
+ function markText(text, annotations) {
28
+ if (annotations.length === 0) {
29
+ return [text];
30
+ }
31
+ const nodes = [];
32
+ let lastIndex = 0;
33
+ annotations.sort((a, b) => a.startIndex - b.startIndex);
34
+ for (const annotation of annotations) {
35
+ if (annotation.startIndex < 0 || annotation.length <= 0) {
36
+ return [text];
37
+ }
38
+ // Add unmarked text before this mark
39
+ if (annotation.startIndex > lastIndex) {
40
+ nodes.push(text.substring(lastIndex, annotation.startIndex));
41
+ }
42
+ // Add marked text
43
+ const markedText = text.substring(annotation.startIndex, annotation.startIndex + annotation.length);
44
+ nodes.push(annotation.hidden ? (React.createElement("mark", { key: annotation.startIndex, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "true" })) : (React.createElement(Mark, { key: annotation.startIndex, annotation: annotation, markedText: markedText, onClickAnnotation: onClickAnnotation, setNewAnnotationRef: setNewAnnotationRef })));
45
+ lastIndex = annotation.startIndex + annotation.length;
46
+ }
47
+ // Add remaining unmarked text
48
+ nodes.push(text.substring(lastIndex));
49
+ return nodes;
50
+ }
51
+ };
52
+ const Mark = ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }) => {
53
+ const markRef = useRef(null);
54
+ useEffect(() => {
55
+ if (markRef.current && !isExamAnnotation(annotation)) {
56
+ setNewAnnotationRef(markRef.current);
57
+ }
58
+ }, []);
59
+ return (React.createElement("mark", { ref: markRef, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "false", onClick: e => (isExamAnnotation(annotation) ? onClickAnnotation(e, annotation) : undefined) },
60
+ markedText,
61
+ (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 })));
62
+ };
63
+ //# sourceMappingURL=AnnotatableText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnotatableText.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotatableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAGz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BAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE1F,UAAU;QACV,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,KAAI,6BAAK,SAAS,EAAC,cAAc,kBAAe,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,GAAI,CAC5F,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -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,6BA4E9B"}
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"}
@@ -29,6 +29,7 @@ export function AnnotationPopup() {
29
29
  }
30
30
  const closeEditor = () => {
31
31
  setNewAnnotation(null);
32
+ closeMathEditor(textAreaRef.current);
32
33
  };
33
34
  function updateComment(annotation, comment) {
34
35
  onSaveAnnotation({ ...annotation, message: comment });
@@ -40,6 +41,7 @@ export function AnnotationPopup() {
40
41
  React.createElement("span", null,
41
42
  React.createElement("button", { className: "button", onClick: e => {
42
43
  e.stopPropagation();
44
+ closeMathEditor(textAreaRef.current);
43
45
  updateComment(newAnnotation, comment);
44
46
  }, "data-testid": "save-comment", disabled: !saveEnabled }, "Vastaa"),
45
47
  React.createElement("button", { className: "button text-button", onClick: closeEditor }, "Peru")))));
@@ -63,4 +65,10 @@ function showAndPositionElement(mark, popupRef) {
63
65
  }
64
66
  }
65
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 }));
73
+ }
66
74
  //# 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,CAA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,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,CAgDlB"}
1
+ {"version":3,"file":"createRenderChildNodes.d.ts","sourceRoot":"","sources":["../src/createRenderChildNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,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,CAgDlB"}
@@ -1,25 +1,10 @@
1
- import React, { useContext, useEffect, useRef } from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import { AnnotationContext } from './components/context/AnnotationProvider';
3
- import { onMouseDownForAnnotation } from './components/grading/examAnnotationUtils';
4
- import { mapChildNodes, queryAncestors } from './dom-utils';
5
3
  import { IsInSidebarContext } from './components/context/IsInSidebarContext';
4
+ import { getElementPath, mapChildNodes } from './dom-utils';
5
+ import { AnnotatableText } from './components/shared/AnnotatableText';
6
6
  export const ExamNamespaceURI = 'http://ylioppilastutkinto.fi/exam.xsd';
7
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
- }
23
8
  export function createRenderChildNodes(componentMap) {
24
9
  function renderChildNode(node, index, options) {
25
10
  switch (node.nodeType) {
@@ -73,67 +58,8 @@ function renderTextNode(node) {
73
58
  isInSidebar !== undefined) {
74
59
  return node.textContent;
75
60
  }
76
- return React.createElement(AnnotatableText, { node: node, annotationContextData: annotationContextData });
61
+ return (React.createElement(AnnotatableText, { node: node, annotationContextData: annotationContextData, key: getElementPath(node) }));
77
62
  }
78
- const isExamAnnotation = (annotation) => 'annotationId' in annotation;
79
- const AnnotatableText = ({ node, annotationContextData }) => {
80
- const { annotations, onClickAnnotation, setNewAnnotation, setNewAnnotationRef, newAnnotation } = annotationContextData;
81
- const path = getElementPath(node);
82
- const newAnnotationForThisNode = (newAnnotation === null || newAnnotation === void 0 ? void 0 : newAnnotation.annotationAnchor) === path ? newAnnotation : null;
83
- const thisNodeAnnotations = [
84
- ...((annotations === null || annotations === void 0 ? void 0 : annotations[path]) || []),
85
- ...(newAnnotationForThisNode ? [newAnnotationForThisNode] : [])
86
- ];
87
- const mouseUpCallback = (annotation) => {
88
- var _a;
89
- const displayNumber = ((_a = queryAncestors(node.parentElement, 'question')) === null || _a === void 0 ? void 0 : _a.getAttribute('display-number')) || '';
90
- setNewAnnotation({ ...annotation, annotationAnchor: path, displayNumber });
91
- };
92
- function onMouseDown(e) {
93
- const target = e.target;
94
- const clickIsInPopup = target.closest('.annotation-popup');
95
- if (!clickIsInPopup) {
96
- setNewAnnotation(null);
97
- }
98
- onMouseDownForAnnotation(e, mouseUpCallback);
99
- }
100
- return (React.createElement("span", { onMouseDown: onMouseDown, className: "e-annotatable", key: path }, (thisNodeAnnotations === null || thisNodeAnnotations === void 0 ? void 0 : thisNodeAnnotations.length) > 0 ? markText(node.textContent, thisNodeAnnotations) : node.textContent));
101
- function markText(text, annotations) {
102
- if (annotations.length === 0) {
103
- return [text];
104
- }
105
- const nodes = [];
106
- let lastIndex = 0;
107
- annotations.sort((a, b) => a.startIndex - b.startIndex);
108
- for (const annotation of annotations) {
109
- if (annotation.startIndex < 0 || annotation.length <= 0) {
110
- return [text];
111
- }
112
- // Add unmarked text before this mark
113
- if (annotation.startIndex > lastIndex) {
114
- nodes.push(text.substring(lastIndex, annotation.startIndex));
115
- }
116
- // Add marked text
117
- const markedText = text.substring(annotation.startIndex, annotation.startIndex + annotation.length);
118
- nodes.push(annotation.hidden ? (React.createElement("mark", { key: annotation.startIndex, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "true" })) : (React.createElement(Mark, { key: annotation.startIndex, annotation: annotation, markedText: markedText, onClickAnnotation: onClickAnnotation, setNewAnnotationRef: setNewAnnotationRef })));
119
- lastIndex = annotation.startIndex + annotation.length;
120
- }
121
- // Add remaining unmarked text
122
- nodes.push(text.substring(lastIndex));
123
- return nodes;
124
- }
125
- };
126
- const Mark = ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }) => {
127
- const markRef = useRef(null);
128
- useEffect(() => {
129
- if (markRef.current && !isExamAnnotation(annotation)) {
130
- setNewAnnotationRef(markRef.current);
131
- }
132
- }, []);
133
- return (React.createElement("mark", { key: annotation.startIndex, ref: markRef, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "false", onClick: e => (isExamAnnotation(annotation) ? onClickAnnotation(e, annotation) : undefined) },
134
- markedText,
135
- (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 })));
136
- };
137
63
  function htmlAttributes2props(element, index) {
138
64
  const props = { key: key(element, index) };
139
65
  for (const attribute of element.attributes) {
@@ -1 +1 @@
1
- {"version":3,"file":"createRenderChildNodes.js","sourceRoot":"","sources":["../src/createRenderChildNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAyB,MAAM,yCAAyC,CAAA;AAClG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAE5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,uCAAuC,CAAA;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8BAA8B,CAAA;AAiB/D,SAAS,cAAc,CAAC,OAAgB;;IACtC,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,KA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G,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAA;IAC9D,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAE,SAAS,CAAC,SAAsC,CAAA;QAC9G,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,KAAK,CAAA;IAC/B,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAED,SAAS,GAAG,CAAC,OAAgB,EAAE,KAAa;IAC1C,OAAO,GAAG,OAAO,CAAC,SAAS,IAAI,KAAK,EAAE,CAAA;AACxC,CAAC"}
@@ -15,5 +15,6 @@ export declare function hasSiblingQuestions(answer: Element): boolean | undefine
15
15
  export declare function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, properties?: Record<string, string> | null, ...children: Array<string | ChildNode>): HTMLElementTagNameMap[K];
16
16
  export declare function setProperties(element: HTMLElement, properties?: Record<string, string> | null): void;
17
17
  export declare function useIsElementInViewport(elementType: 'question' | 'section', displayNumber: string): boolean;
18
+ export declare function getElementPath(element: Element): string;
18
19
  export {};
19
20
  //# sourceMappingURL=dom-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-utils.d.ts","sourceRoot":"","sources":["../src/dom-utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,WAAW,CAAA;AAE5B,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,EAAE,CAU/E;AAED,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAA;AAUnE,wBAAgB,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAiB5E;AAED,w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F;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAEpF;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAOtG;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAO1G;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAE/D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,uBAIlD;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,OAAO,EAAE,CAAC,EACV,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAC1C,GAAG,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GACrC,qBAAqB,CAAC,CAAC,CAAC,CAK1B;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAWpG;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,UAAU,GAAG,SAAS,EAAE,aAAa,EAAE,MAAM,WAehG;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAgBvD"}
package/dist/dom-utils.js CHANGED
@@ -145,4 +145,20 @@ export function useIsElementInViewport(elementType, displayNumber) {
145
145
  }, [visibleTOCElements]);
146
146
  return isVisible;
147
147
  }
148
+ export function getElementPath(element) {
149
+ var _a, _b, _c;
150
+ const temp = !element.tagName && Array.from(((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.childNodes) || []).indexOf(element);
151
+ const elementIndex = Array.from(((_b = element.parentElement) === null || _b === void 0 ? void 0 : _b.children) || []).indexOf(element);
152
+ let path = `${element.nodeName}:${elementIndex > 0 ? elementIndex : temp}`;
153
+ let currentElement = element;
154
+ while (currentElement.parentElement) {
155
+ currentElement = currentElement.parentElement;
156
+ const displayNumber = currentElement.getAttribute('display-number');
157
+ const index = Number(displayNumber) ||
158
+ Array.from(((_c = currentElement.parentElement) === null || _c === void 0 ? void 0 : _c.children) || [currentElement]).indexOf(currentElement);
159
+ const elementId = currentElement.getAttribute('id');
160
+ path = `${elementId || currentElement.nodeName}:${index} > ${path}`;
161
+ }
162
+ return path;
163
+ }
148
164
  //# sourceMappingURL=dom-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-utils.js","sourceRoot":"","sources":["../src/dom-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE5D,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAA;AAE5B,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,QAAmB;IAClE,MAAM,SAAS,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACtE,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,OAAO,OAAO,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;QACrC,OAAO,GAAG,OAAO,CAAC,aAAa,CAAA;QAC/B,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC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