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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/dist/__tests__/annotations.test.d.ts.map +1 -1
  2. package/dist/__tests__/annotations.test.js +148 -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/attachments/QuestionTitle.d.ts.map +1 -1
  10. package/dist/components/attachments/QuestionTitle.js +6 -4
  11. package/dist/components/attachments/QuestionTitle.js.map +1 -1
  12. package/dist/components/context/AnnotationContext.d.ts +4 -5
  13. package/dist/components/context/AnnotationContext.d.ts.map +1 -1
  14. package/dist/components/context/AnnotationContext.js.map +1 -1
  15. package/dist/components/context/AnnotationProvider.d.ts +9 -4
  16. package/dist/components/context/AnnotationProvider.d.ts.map +1 -1
  17. package/dist/components/context/AnnotationProvider.js +29 -3
  18. package/dist/components/context/AnnotationProvider.js.map +1 -1
  19. package/dist/components/context/IsInSidebarContext.d.ts +0 -1
  20. package/dist/components/context/IsInSidebarContext.d.ts.map +1 -1
  21. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  22. package/dist/components/context/ResultsContext.js.map +1 -1
  23. package/dist/components/context/TOCContext.d.ts +0 -1
  24. package/dist/components/context/TOCContext.d.ts.map +1 -1
  25. package/dist/components/context/withContext.d.ts.map +1 -1
  26. package/dist/components/exam/ChoiceAnswer.d.ts.map +1 -1
  27. package/dist/components/exam/ChoiceAnswer.js +16 -14
  28. package/dist/components/exam/ChoiceAnswer.js.map +1 -1
  29. package/dist/components/exam/Exam.d.ts +4 -4
  30. package/dist/components/exam/Exam.d.ts.map +1 -1
  31. package/dist/components/exam/Exam.js +0 -2
  32. package/dist/components/exam/Exam.js.map +1 -1
  33. package/dist/components/exam/RichTextAnswer.d.ts +1 -1
  34. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  35. package/dist/components/exam/TextAnswer.d.ts.map +1 -1
  36. package/dist/components/exam/TextAnswer.js +6 -4
  37. package/dist/components/exam/TextAnswer.js.map +1 -1
  38. package/dist/components/exam/internal/ProgressBar.d.ts.map +1 -1
  39. package/dist/components/exam/internal/ProgressBar.js +1 -0
  40. package/dist/components/exam/internal/ProgressBar.js.map +1 -1
  41. package/dist/components/grading/editAnnotations.d.ts.map +1 -1
  42. package/dist/components/grading/editAnnotations.js +2 -2
  43. package/dist/components/grading/editAnnotations.js.map +1 -1
  44. package/dist/components/grading/examAnnotationUtils.d.ts +0 -1
  45. package/dist/components/grading/examAnnotationUtils.d.ts.map +1 -1
  46. package/dist/components/grading/examAnnotationUtils.js +88 -37
  47. package/dist/components/grading/examAnnotationUtils.js.map +1 -1
  48. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  49. package/dist/components/grading-instructions/GradingInstructions.js +23 -25
  50. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  51. package/dist/components/shared/AnnotatableText.d.ts +5 -0
  52. package/dist/components/shared/AnnotatableText.d.ts.map +1 -0
  53. package/dist/components/shared/AnnotatableText.js +25 -0
  54. package/dist/components/shared/AnnotatableText.js.map +1 -0
  55. package/dist/components/shared/AnnotationMark.d.ts +9 -0
  56. package/dist/components/shared/AnnotationMark.d.ts.map +1 -0
  57. package/dist/components/shared/AnnotationMark.js +14 -0
  58. package/dist/components/shared/AnnotationMark.js.map +1 -0
  59. package/dist/components/shared/AnnotationPopup.d.ts.map +1 -1
  60. package/dist/components/shared/AnnotationPopup.js +16 -6
  61. package/dist/components/shared/AnnotationPopup.js.map +1 -1
  62. package/dist/components/shared/AnswerIndicator.d.ts +1 -1
  63. package/dist/components/shared/AnswerIndicator.d.ts.map +1 -1
  64. package/dist/components/shared/AnswerIndicator.js +10 -9
  65. package/dist/components/shared/AnswerIndicator.js.map +1 -1
  66. package/dist/components/shared/AnswerLengthInfo.d.ts +1 -1
  67. package/dist/components/shared/AnswerLengthInfo.d.ts.map +1 -1
  68. package/dist/components/shared/AttachmentLink.d.ts +1 -1
  69. package/dist/components/shared/AttachmentLink.d.ts.map +1 -1
  70. package/dist/components/shared/AttachmentLinks.d.ts +1 -1
  71. package/dist/components/shared/AttachmentLinks.d.ts.map +1 -1
  72. package/dist/components/shared/References.d.ts.map +1 -1
  73. package/dist/components/shared/References.js +1 -0
  74. package/dist/components/shared/References.js.map +1 -1
  75. package/dist/components/shared/TOCQuestion.js +1 -1
  76. package/dist/components/shared/TOCQuestion.js.map +1 -1
  77. package/dist/components/shared/markText.d.ts +5 -0
  78. package/dist/components/shared/markText.d.ts.map +1 -0
  79. package/dist/components/shared/markText.js +57 -0
  80. package/dist/components/shared/markText.js.map +1 -0
  81. package/dist/createRenderChildNodes.d.ts.map +1 -1
  82. package/dist/createRenderChildNodes.js +6 -83
  83. package/dist/createRenderChildNodes.js.map +1 -1
  84. package/dist/dom-utils.d.ts +1 -0
  85. package/dist/dom-utils.d.ts.map +1 -1
  86. package/dist/dom-utils.js +16 -0
  87. package/dist/dom-utils.js.map +1 -1
  88. package/dist/i18n/index.d.ts +1 -2
  89. package/dist/i18n/index.d.ts.map +1 -1
  90. package/dist/i18n/index.js.map +1 -1
  91. package/dist/main-bundle.js +1 -1
  92. package/dist/main.css +1 -1
  93. package/dist/store/answers/reducer.d.ts.map +1 -1
  94. package/dist/store/audio/reducer.d.ts.map +1 -1
  95. package/dist/store/audio/sagas.d.ts.map +1 -1
  96. package/dist/store/audio/sagas.js +3 -1
  97. package/dist/store/audio/sagas.js.map +1 -1
  98. package/dist/store/cas/reducer.d.ts.map +1 -1
  99. package/dist/store/index.d.ts +1 -2
  100. package/dist/store/index.d.ts.map +1 -1
  101. package/dist/store/listenerMiddleware.d.ts +89 -0
  102. package/dist/store/listenerMiddleware.d.ts.map +1 -0
  103. package/dist/store/listenerMiddleware.js +6 -0
  104. package/dist/store/listenerMiddleware.js.map +1 -0
  105. package/dist/store/selectors.d.ts +1 -1
  106. package/dist/types/Score.d.ts +19 -2
  107. package/dist/types/Score.d.ts.map +1 -1
  108. package/package.json +4 -4
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { NewRenderableAnnotation, RenderableAnnotation } from '../../types/Score';
3
+ export declare function isExamAnnotation(annotation: NewRenderableAnnotation | RenderableAnnotation): annotation is RenderableAnnotation;
4
+ export declare function markText(text: string, annotations: (RenderableAnnotation | NewRenderableAnnotation)[], onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, a: RenderableAnnotation) => void, setNewAnnotationRef: (ref: HTMLElement | undefined) => void): React.ReactNode[];
5
+ //# sourceMappingURL=markText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markText.d.ts","sourceRoot":"","sources":["../../../src/components/shared/markText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAOjF,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,uBAAuB,GAAG,oBAAoB,GACzD,UAAU,IAAI,oBAAoB,CAEpC;AAMD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,CAAC,oBAAoB,GAAG,uBAAuB,CAAC,EAAE,EAC/D,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,oBAAoB,KAAK,IAAI,EAClG,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,qBAsF5D"}
@@ -0,0 +1,57 @@
1
+ import * as _ from 'lodash-es';
2
+ import React from 'react';
3
+ import { AnnotationMark } from './AnnotationMark';
4
+ function getKey(annotation) {
5
+ return isExamAnnotation(annotation) ? annotation.annotationId + annotation.startIndex : annotation.startIndex;
6
+ }
7
+ export function isExamAnnotation(annotation) {
8
+ return 'annotationId' in annotation;
9
+ }
10
+ function getMarkedText(text, startIndex, length) {
11
+ return text.substring(startIndex, startIndex + length);
12
+ }
13
+ export function markText(text, annotations, onClickAnnotation, setNewAnnotationRef) {
14
+ var _a;
15
+ if (annotations.length === 0) {
16
+ return [text];
17
+ }
18
+ annotations.sort((a, b) => a.startIndex - b.startIndex);
19
+ const [hiddenAnnotations, visibleAnnotations] = _.partition(annotations, a => a.hidden);
20
+ const nodes = [];
21
+ hiddenAnnotations.forEach(annotation => {
22
+ const key = getKey(annotation);
23
+ nodes.push(React.createElement("mark", { key: key, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "true" }));
24
+ });
25
+ let lastIndex = 0;
26
+ const onlyLeadingSpacesRemoved = text.replace(/^\s+/, ' ');
27
+ const indentationSize = text.length - onlyLeadingSpacesRemoved.length;
28
+ for (const annotation of visibleAnnotations) {
29
+ /* "August 2024 annotation" refers to annotations made on or after 7.8.2024, and on or before x.8.2024.
30
+ * They use trimmed exam content (textWithoutLineBreaksAndExtraSpaces) for calculating startIndex.
31
+ * Support for "August 2024 annotations" can be removed at least when S25 exams are held.
32
+ */
33
+ const textWithoutLineBreaksAndExtraSpaces = text.replace(/\n/g, ' ').replace(/\s+/g, ' ');
34
+ const annotatedTextAugust2024 = getMarkedText(textWithoutLineBreaksAndExtraSpaces, annotation.startIndex, annotation.length);
35
+ const isAugust2024Annotation = annotatedTextAugust2024 === annotation.selectedText;
36
+ /**
37
+ * index difference is defined by how much indentation the text paragraph has in xml,
38
+ * and by how many line breaks there are before the annotated text.
39
+ * */
40
+ const amountOfLineBreaksBeforeAnnotation = ((_a = text.split(annotation.selectedText)[0].match(/\n/g)) === null || _a === void 0 ? void 0 : _a.length) || 0;
41
+ const startIndexDifference = amountOfLineBreaksBeforeAnnotation * indentationSize;
42
+ const correctStartIndex = annotation.startIndex + (isAugust2024Annotation ? startIndexDifference : 0);
43
+ const annotatedTextWithCorrectedStartIndex = getMarkedText(text, correctStartIndex, annotation.length);
44
+ // Add unmarked text before this mark
45
+ if (correctStartIndex > lastIndex) {
46
+ nodes.push(text.substring(lastIndex, correctStartIndex));
47
+ }
48
+ // Add marked text
49
+ const key = getKey(annotation);
50
+ nodes.push(annotation.hidden ? (React.createElement("mark", { key: key, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "true" })) : (React.createElement(AnnotationMark, { key: key, annotation: annotation, markedText: annotatedTextWithCorrectedStartIndex, onClickAnnotation: onClickAnnotation, setNewAnnotationRef: setNewAnnotationRef })));
51
+ lastIndex = correctStartIndex + annotation.length;
52
+ }
53
+ // Add remaining unmarked text
54
+ nodes.push(text.substring(lastIndex));
55
+ return nodes;
56
+ }
57
+ //# sourceMappingURL=markText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markText.js","sourceRoot":"","sources":["../../../src/components/shared/markText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,SAAS,MAAM,CAAC,UAA0D;IACxE,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAA;AAC/G,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,UAA0D;IAE1D,OAAO,cAAc,IAAI,UAAU,CAAA;AACrC,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,UAAkB,EAAE,MAAc;IACrE,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,CAAA;AACxD,CAAC;AAED,MAAM,UAAU,QAAQ,CACt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;QAED,SAAS,GAAG,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAA;IACnD,CAAC;IAED,8BAA8B;IAC9B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;IACrC,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -1 +1 @@
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
+ {"version":3,"file":"createRenderChildNodes.d.ts","sourceRoot":"","sources":["../src/createRenderChildNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,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,32 +1,14 @@
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';
1
+ import React from 'react';
2
+ import { getElementPath, mapChildNodes } from './dom-utils';
3
+ import { AnnotatableText } from './components/shared/AnnotatableText';
6
4
  export const ExamNamespaceURI = 'http://ylioppilastutkinto.fi/exam.xsd';
7
5
  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
6
  export function createRenderChildNodes(componentMap) {
24
7
  function renderChildNode(node, index, options) {
25
8
  switch (node.nodeType) {
26
9
  case Node.TEXT_NODE:
27
10
  case Node.CDATA_SECTION_NODE: {
28
- const path = getElementPath(node);
29
- return options === 0 /* RenderOptions.RenderHTML */ ? renderTextNode(node, path) : null;
11
+ return options === 0 /* RenderOptions.RenderHTML */ ? renderTextNode(node) : null;
30
12
  }
31
13
  case Node.ELEMENT_NODE:
32
14
  return renderElement(node, index, options);
@@ -65,68 +47,9 @@ export function createRenderChildNodes(componentMap) {
65
47
  }
66
48
  return renderChildNodes;
67
49
  }
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
+ function renderTextNode(node) {
51
+ return React.createElement(AnnotatableText, { node: node, key: getElementPath(node) });
118
52
  }
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
- };
130
53
  function htmlAttributes2props(element, index) {
131
54
  const props = { key: key(element, index) };
132
55
  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,EAAE,MAAM,yCAAyC,CAAA;AAC3E,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,KAAK,CAAC,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,UAAU,KAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAClG,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,aAAa,0CAAE,QAAQ,KAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACvF,IAAI,IAAI,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC1E,IAAI,cAAc,GAAG,OAAO,CAAA;IAC5B,OAAO,cAAc,CAAC,aAAa,EAAE,CAAC;QACpC,cAAc,GAAG,cAAc,CAAC,aAAa,CAAA;QAC7C,MAAM,aAAa,GAAG,cAAc,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAA;QACnE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AI,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,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,UAAO,GAAG,OAAO,EAAE,CAoBrF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAQxF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAS1F;AACD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExF;AAED,wB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AAgB,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 index = !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 : index}`;
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,EAAE,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACtB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAID,SAAS,WAAW,CAAC,QAAkB;IACrC,OAAO,OAAO,QAAQ,KAAK,UAAU;QACnC,CAAC,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,KAAK,gBAAgB,IAAI,QAAQ,CAAC,OAAO,CAAC;QACtF,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YACvB,CAAC,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY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,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QAChG,MAAM,SAAS,GAAG,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;QACnD,IAAI,GAAG,GAAG,SAAS,IAAI,cAAc,CAAC,QAAQ,IAAI,KAAK,MAAM,IAAI,EAAE,CAAA;IACrE,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -4,8 +4,7 @@ declare module 'react-i18next' {
4
4
  type ExamEngineI18nResources = {
5
5
  translation: typeof fi_FI;
6
6
  };
7
- interface Resources extends ExamEngineI18nResources {
8
- }
7
+ type Resources = ExamEngineI18nResources;
9
8
  }
10
9
  export declare function initI18n(language: string, examCode?: string, dayCode?: string): typeof i18n;
11
10
  export declare function useExamTranslation(): {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAuB,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAUxE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAgD/B,OAAO,QAAQ,eAAe,CAAC;IAC7B,KAAK,uBAAuB,GAAG;QAAE,WAAW,EAAE,OAAO,KAAK,CAAA;KAAE,CAAA;IAG5D,UAAU,SAAU,SAAQ,uBAAuB;KAAG;CACvD;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,IAAI,CAwC3F;AAED,wBAAgB,kBAAkB;;;cAGxB,MAAM,GAAG,MAAM,EAAE,YAAY,QAAQ,GAAG,MAAM,GAAG,WAAW;aAC7D,SAAS;;EAKjB;AAgCD,eAAO,MAAM,cAAc,UAAW,WAAW,YAAY,MAAM,WAAS,IAI3E,CAAA;AAED,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src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