@digabi/exam-engine-core 23.8.5-alpha.0 → 23.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/main-bundle.js +1 -1
  2. package/package.json +3 -3
  3. package/dist/__tests__/annotations.test.d.ts +0 -2
  4. package/dist/__tests__/annotations.test.d.ts.map +0 -1
  5. package/dist/__tests__/annotations.test.js +0 -306
  6. package/dist/__tests__/annotations.test.js.map +0 -1
  7. package/dist/__tests__/playwright/Annotations.test.d.ts +0 -2
  8. package/dist/__tests__/playwright/Annotations.test.d.ts.map +0 -1
  9. package/dist/__tests__/playwright/Annotations.test.js +0 -201
  10. package/dist/__tests__/playwright/Annotations.test.js.map +0 -1
  11. package/dist/__tests__/playwright/attachments/Attachments.test.d.ts +0 -2
  12. package/dist/__tests__/playwright/attachments/Attachments.test.d.ts.map +0 -1
  13. package/dist/__tests__/playwright/attachments/Attachments.test.js +0 -30
  14. package/dist/__tests__/playwright/attachments/Attachments.test.js.map +0 -1
  15. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.d.ts +0 -2
  16. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.d.ts.map +0 -1
  17. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.js +0 -30
  18. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.js.map +0 -1
  19. package/dist/__tests__/playwright/stories/Annotations.story.d.ts +0 -15
  20. package/dist/__tests__/playwright/stories/Annotations.story.d.ts.map +0 -1
  21. package/dist/__tests__/playwright/stories/Annotations.story.js +0 -27
  22. package/dist/__tests__/playwright/stories/Annotations.story.js.map +0 -1
  23. package/dist/__tests__/playwright/stories/attachments/Attachments.story.d.ts +0 -13
  24. package/dist/__tests__/playwright/stories/attachments/Attachments.story.d.ts.map +0 -1
  25. package/dist/__tests__/playwright/stories/attachments/Attachments.story.js +0 -17
  26. package/dist/__tests__/playwright/stories/attachments/Attachments.story.js.map +0 -1
  27. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.d.ts +0 -13
  28. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.d.ts.map +0 -1
  29. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.js +0 -16
  30. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.js.map +0 -1
  31. package/dist/assets/NotoMono.ttf +0 -0
  32. package/dist/assets/NotoSans-Bold.ttf +0 -0
  33. package/dist/assets/NotoSans-BoldItalic.ttf +0 -0
  34. package/dist/assets/NotoSans-Italic.ttf +0 -0
  35. package/dist/assets/NotoSans-Light.ttf +0 -0
  36. package/dist/assets/NotoSans-LightItalic.ttf +0 -0
  37. package/dist/assets/NotoSans-Regular.ttf +0 -0
  38. package/dist/assets/NotoSans-SemiBold.ttf +0 -0
  39. package/dist/assets/NotoSans-SemiBoldItalic.ttf +0 -0
  40. package/dist/assets/closeButton.svg +0 -1
  41. package/dist/assets/collapse.svg +0 -12
  42. package/dist/assets/expand.svg +0 -12
  43. package/dist/assets/helpButton.svg +0 -9
  44. package/dist/assets/redoButton.svg +0 -5
  45. package/dist/assets/undoButton.svg +0 -5
  46. package/dist/components/grading/examAnnotationUtils.d.ts +0 -4
  47. package/dist/components/grading/examAnnotationUtils.d.ts.map +0 -1
  48. package/dist/components/grading/examAnnotationUtils.js +0 -123
  49. package/dist/components/grading/examAnnotationUtils.js.map +0 -1
  50. package/dist/components/results/DNDAnswerContainer.d.ts +0 -4
  51. package/dist/components/results/DNDAnswerContainer.d.ts.map +0 -1
  52. package/dist/components/results/DNDAnswerContainer.js +0 -22
  53. package/dist/components/results/DNDAnswerContainer.js.map +0 -1
  54. package/dist/components/shared/AnnotatableText.d.ts +0 -5
  55. package/dist/components/shared/AnnotatableText.d.ts.map +0 -1
  56. package/dist/components/shared/AnnotatableText.js +0 -25
  57. package/dist/components/shared/AnnotatableText.js.map +0 -1
  58. package/dist/components/shared/AnnotationImageMark.d.ts +0 -16
  59. package/dist/components/shared/AnnotationImageMark.d.ts.map +0 -1
  60. package/dist/components/shared/AnnotationImageMark.js +0 -99
  61. package/dist/components/shared/AnnotationImageMark.js.map +0 -1
  62. package/dist/components/shared/AnnotationMark.d.ts +0 -9
  63. package/dist/components/shared/AnnotationMark.d.ts.map +0 -1
  64. package/dist/components/shared/AnnotationMark.js +0 -14
  65. package/dist/components/shared/AnnotationMark.js.map +0 -1
  66. package/dist/components/shared/AnnotationPopup.d.ts +0 -3
  67. package/dist/components/shared/AnnotationPopup.d.ts.map +0 -1
  68. package/dist/components/shared/AnnotationPopup.js +0 -24
  69. package/dist/components/shared/AnnotationPopup.js.map +0 -1
  70. package/dist/components/shared/AnnotationTextMark.d.ts +0 -11
  71. package/dist/components/shared/AnnotationTextMark.d.ts.map +0 -1
  72. package/dist/components/shared/AnnotationTextMark.js +0 -21
  73. package/dist/components/shared/AnnotationTextMark.js.map +0 -1
  74. package/dist/components/shared/markText.d.ts +0 -6
  75. package/dist/components/shared/markText.d.ts.map +0 -1
  76. package/dist/components/shared/markText.js +0 -77
  77. package/dist/components/shared/markText.js.map +0 -1
  78. package/dist/components/surround.d.ts +0 -8
  79. package/dist/components/surround.d.ts.map +0 -1
  80. package/dist/components/surround.js +0 -19
  81. package/dist/components/surround.js.map +0 -1
  82. package/dist/eslint.config.d.ts +0 -22
  83. package/dist/eslint.config.d.ts.map +0 -1
  84. package/dist/eslint.config.js +0 -31
  85. package/dist/eslint.config.js.map +0 -1
  86. package/dist/i18n/exam_titles_fi-FI.d.ts +0 -46
  87. package/dist/i18n/exam_titles_fi-FI.d.ts.map +0 -1
  88. package/dist/i18n/exam_titles_fi-FI.js +0 -46
  89. package/dist/i18n/exam_titles_fi-FI.js.map +0 -1
  90. package/dist/i18n/exam_titles_fi-FI.json +0 -45
  91. package/dist/i18n/exam_titles_sv-FI.d.ts +0 -46
  92. package/dist/i18n/exam_titles_sv-FI.d.ts.map +0 -1
  93. package/dist/i18n/exam_titles_sv-FI.js +0 -46
  94. package/dist/i18n/exam_titles_sv-FI.js.map +0 -1
  95. package/dist/i18n/exam_titles_sv-FI.json +0 -45
  96. package/dist/i18n/exams.d.ts +0 -11
  97. package/dist/i18n/exams.d.ts.map +0 -1
  98. package/dist/i18n/exams.js +0 -10
  99. package/dist/i18n/exams.js.map +0 -1
  100. package/dist/types/ExamAnnotations.d.ts +0 -46
  101. package/dist/types/ExamAnnotations.d.ts.map +0 -1
  102. package/dist/types/ExamAnnotations.js +0 -2
  103. package/dist/types/ExamAnnotations.js.map +0 -1
@@ -1,99 +0,0 @@
1
- import classNames from 'classnames';
2
- import { clamp } from 'lodash-es';
3
- import React, { useCallback, useEffect, useRef, useState } from 'react';
4
- // eslint-disable-next-line prefer-arrow-callback
5
- export const AnnotationImageMark = React.memo(function AnnotationImageMark({ rect: { x1, y1, x2, y2 }, onClickAnnotation, setNewAnnotationRef, annotationId, markNumber, resolved }) {
6
- const markRef = useRef(null);
7
- const supRef = useRef(null);
8
- useEffect(() => {
9
- if (markRef.current) {
10
- markRef.current.style['inset'] =
11
- `${100 * Math.min(y1, y2)}% ${100 * (1 - Math.max(x1, x2))}% ${100 * (1 - Math.max(y1, y2))}% ${100 * Math.min(x1, x2)}%`;
12
- }
13
- if (supRef.current) {
14
- supRef.current.style['left'] = `${100 * Math.max(x1, x2)}%`;
15
- supRef.current.style['top'] = `${100 * Math.min(y1, y2)}%`;
16
- }
17
- }, [x1, y1, x2, y2]);
18
- useEffect(() => {
19
- if (markRef.current && annotationId === undefined) {
20
- setNewAnnotationRef(markRef.current);
21
- }
22
- }, []);
23
- const onMouseDown = useCallback((e) => {
24
- if (annotationId) {
25
- e.stopPropagation();
26
- onClickAnnotation(e, annotationId);
27
- }
28
- }, [annotationId, onClickAnnotation]);
29
- return (React.createElement(React.Fragment, null,
30
- React.createElement("mark", { ref: markRef, className: classNames('e-annotation e-annotation--shape', { resolved }), "data-annotation-id": annotationId, "data-hidden": "false", onMouseDown: onMouseDown }),
31
- markNumber && React.createElement("sup", { ref: supRef, className: "e-annotation", "data-content": markNumber })));
32
- });
33
- export function useImageAnnotation(anchor, description, setNewAnnotation) {
34
- const elementRef = useRef(null);
35
- const [annotationRect, setAnnotationRect] = useState();
36
- const annotationRectRef = useRef();
37
- useEffect(() => {
38
- annotationRectRef.current = annotationRect;
39
- }, [annotationRect]);
40
- const onMouseMove = useCallback((e) => {
41
- const el = elementRef.current;
42
- if (el === null) {
43
- return;
44
- }
45
- e.preventDefault();
46
- e.stopPropagation();
47
- const [x2, y2] = getMousePosition(el, e);
48
- setAnnotationRect(rect => {
49
- if (rect) {
50
- const { x1, y1 } = rect;
51
- return { x1, y1, x2, y2 };
52
- }
53
- return rect;
54
- });
55
- }, []);
56
- const onMouseUp = useCallback((e) => {
57
- var _a, _b;
58
- const el = elementRef.current;
59
- if (el === null) {
60
- return;
61
- }
62
- window.removeEventListener('mouseup', onMouseUp);
63
- window.removeEventListener('mousemove', onMouseMove);
64
- const displayNumber = (_b = (_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.closest('div[data-annotation-anchor]')) === null || _b === void 0 ? void 0 : _b.getAttribute('data-annotation-anchor');
65
- if (!displayNumber || !annotationRectRef.current) {
66
- setAnnotationRect(undefined);
67
- return;
68
- }
69
- const { x1, y1 } = annotationRectRef.current;
70
- const [x2, y2] = getMousePosition(el, e);
71
- setNewAnnotation({
72
- annotationType: 'image',
73
- displayNumber,
74
- annotationAnchor: anchor,
75
- rect: { x1, y1, x2, y2 },
76
- description
77
- });
78
- setAnnotationRect(undefined);
79
- }, []);
80
- const onMouseDown = useCallback((e) => {
81
- const el = elementRef.current;
82
- if (el === null || e.button !== 0) {
83
- return;
84
- }
85
- e.preventDefault();
86
- e.stopPropagation();
87
- window.addEventListener('mouseup', onMouseUp);
88
- window.addEventListener('mousemove', onMouseMove);
89
- const [x1, y1] = getMousePosition(el, e);
90
- setAnnotationRect({ x1, y1, x2: x1, y2: y1 });
91
- setNewAnnotation(null);
92
- }, []);
93
- return { elementRef, annotationRect, onMouseDown };
94
- }
95
- function getMousePosition(el, e) {
96
- const bbox = el.getBoundingClientRect();
97
- return [clamp((e.clientX - bbox.left) / bbox.width, 0, 1), clamp((e.clientY - bbox.top) / bbox.height, 0, 1)];
98
- }
99
- //# sourceMappingURL=AnnotationImageMark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationImageMark.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationImageMark.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGvE,iDAAiD;AACjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,EACzE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,QAAQ,EAQT;IACC,MAAM,OAAO,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IACzC,MAAM,MAAM,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;gBAC5B,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,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,CAAC,CAAA;QACxC,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QAC7C,gBAAgB,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,CAAA;AACpD,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAe,EAAE,CAAuC;IAChF,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAA;IACvC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC/G,CAAC"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { NewRenderableAnnotation, RenderableAnnotation } from '../../types/Score';
3
- export declare const AnnotationMark: ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }: {
4
- annotation: RenderableAnnotation | NewRenderableAnnotation;
5
- markedText: string;
6
- onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, a: RenderableAnnotation) => void;
7
- setNewAnnotationRef: (ref: HTMLElement | null) => void;
8
- }) => React.JSX.Element;
9
- //# sourceMappingURL=AnnotationMark.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationMark.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationMark.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAGjF,eAAO,MAAM,cAAc,uEAKxB;IACD,UAAU,EAAE,oBAAoB,GAAG,uBAAuB,CAAA;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAClG,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACvD,sBAsBA,CAAA"}
@@ -1,14 +0,0 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import { isExistingAnnotation } from './markText';
3
- export const AnnotationMark = ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }) => {
4
- const markRef = useRef(null);
5
- useEffect(() => {
6
- if (markRef.current && !isExistingAnnotation(annotation)) {
7
- setNewAnnotationRef(markRef.current);
8
- }
9
- }, []);
10
- return (React.createElement("mark", { ref: markRef, className: `e-annotation ${annotation.resolved ? 'resolved' : ''}`, "data-annotation-id": isExistingAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "false", "data-annotation-path": annotation.annotationAnchor, onClick: e => (isExistingAnnotation(annotation) ? onClickAnnotation(e, annotation) : undefined) },
11
- markedText,
12
- (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 })));
13
- };
14
- //# sourceMappingURL=AnnotationMark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationMark.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationMark.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EAMpB,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IAEzC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE,CAAC;YACzD,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACtC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,8BACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,gBAAgB,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,wBAC9C,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,iBACvE,OAAO,0BACG,UAAU,CAAC,gBAAgB,EACjD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9F,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,3 +0,0 @@
1
- import React from 'react';
2
- export declare function AnnotationPopup(): React.JSX.Element | null;
3
- //# sourceMappingURL=AnnotationPopup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,wBAAgB,eAAe,6BAgC9B"}
@@ -1,24 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { AnnotationContext } from '../context/AnnotationProvider';
3
- import { Popup } from './Popup';
4
- export function AnnotationPopup() {
5
- const annotationContext = useContext(AnnotationContext);
6
- if (!annotationContext.annotationsEnabled ||
7
- !annotationContext.newAnnotation ||
8
- !annotationContext.newAnnotationRef) {
9
- return null;
10
- }
11
- const { newAnnotation, newAnnotationRef, setNewAnnotation, setNewAnnotationRef, onSaveAnnotation } = annotationContext;
12
- return (React.createElement(Popup, { element: newAnnotationRef, initialTextContent: '', onValueSave: async (comment) => {
13
- const error = await onSaveAnnotation(newAnnotation, comment);
14
- if (!error) {
15
- setNewAnnotation(null);
16
- setNewAnnotationRef(null);
17
- }
18
- return error;
19
- }, enableDelete: false, onCancel: () => {
20
- setNewAnnotation(null);
21
- setNewAnnotationRef(null);
22
- } }));
23
- }
24
- //# sourceMappingURL=AnnotationPopup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationPopup.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,UAAU,eAAe;IAC7B,MAAM,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAEvD,IACE,CAAC,iBAAiB,CAAC,kBAAkB;QACrC,CAAC,iBAAiB,CAAC,aAAa;QAChC,CAAC,iBAAiB,CAAC,gBAAgB,EACnC,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAA;IAEtH,OAAO,CACL,oBAAC,KAAK,IACJ,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE;YACrC,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;YAC5D,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,gBAAgB,CAAC,IAAI,CAAC,CAAA;gBACtB,mBAAmB,CAAC,IAAI,CAAC,CAAA;YAC3B,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC,EACD,YAAY,EAAE,KAAK,EACnB,QAAQ,EAAE,GAAG,EAAE;YACb,gBAAgB,CAAC,IAAI,CAAC,CAAA;YACtB,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAC3B,CAAC,GACD,CACH,CAAA;AACH,CAAC"}
@@ -1,11 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { AnnotationPart } from '../../types/ExamAnnotations';
3
- declare function AnnotationMark({ annotation, onClickAnnotation, setNewAnnotationRef, __html, children }: PropsWithChildren<{
4
- annotation: AnnotationPart;
5
- onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, annotationId: number) => void;
6
- setNewAnnotationRef: (ref: HTMLElement | null) => void;
7
- __html?: string;
8
- }>): React.JSX.Element;
9
- declare const _default: React.MemoExoticComponent<typeof AnnotationMark>;
10
- export default _default;
11
- //# sourceMappingURL=AnnotationTextMark.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationTextMark.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationTextMark.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAG5D,iBAAS,cAAc,CAAC,EACtB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACT,EAAE,iBAAiB,CAAC;IACnB,UAAU,EAAE,cAAc,CAAA;IAC1B,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/F,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC,qBAgCD;;AAED,wBAAyC"}
@@ -1,21 +0,0 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import { isExistingAnnotation } from './markText';
3
- function AnnotationMark({ annotation, onClickAnnotation, setNewAnnotationRef, __html, children }) {
4
- const markRef = useRef(null);
5
- useEffect(() => {
6
- if (markRef.current && !isExistingAnnotation(annotation)) {
7
- setNewAnnotationRef(markRef.current);
8
- }
9
- }, []);
10
- const dangerouslySetInnerHTML = __html ? { dangerouslySetInnerHTML: { __html } } : {};
11
- return (React.createElement(React.Fragment, null,
12
- React.createElement("mark", { ref: markRef, className: `e-annotation ${annotation.resolved ? 'resolved' : ''}`, "data-annotation-id": isExistingAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "false", "data-annotation-path": annotation.annotationAnchor, onClick: e => {
13
- if (isExistingAnnotation(annotation)) {
14
- e.stopPropagation();
15
- onClickAnnotation(e, annotation.annotationId);
16
- }
17
- }, ...dangerouslySetInnerHTML }, __html ? null : children),
18
- (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 })));
19
- }
20
- export default React.memo(AnnotationMark);
21
- //# sourceMappingURL=AnnotationTextMark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationTextMark.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationTextMark.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAA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ED,eAAe,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { AnnotationPart, WithAnnotationId } from '../../types/ExamAnnotations';
3
- export declare function getKey(annotation: AnnotationPart): string;
4
- export declare function isExistingAnnotation(annotation: AnnotationPart): annotation is WithAnnotationId<AnnotationPart>;
5
- export declare function markText(text: string, annotations: AnnotationPart[], onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, annotationId: number) => void, setNewAnnotationRef: (ref: HTMLElement | null) => void): React.ReactNode[];
6
- //# sourceMappingURL=markText.d.ts.map
@@ -1 +0,0 @@
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,cAAc,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAI9E,wBAAgB,MAAM,CAAC,UAAU,EAAE,cAAc,UAIhD;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,cAAc,GAAG,UAAU,IAAI,gBAAgB,CAAC,cAAc,CAAC,CAE/G;AAMD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,cAAc,EAAE,EAC7B,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,EAC/F,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,qBAgGvD"}
@@ -1,77 +0,0 @@
1
- import * as _ from 'lodash-es';
2
- import React from 'react';
3
- import AnnotationTextMark from './AnnotationTextMark';
4
- import HiddenAnnotationMark from './HiddenAnnotationMark';
5
- export function getKey(annotation) {
6
- return isExistingAnnotation(annotation)
7
- ? annotation.annotationId + annotation.annotationAnchor
8
- : annotation.annotationAnchor;
9
- }
10
- export function isExistingAnnotation(annotation) {
11
- return 'annotationId' in annotation;
12
- }
13
- function getMarkedText(text, startIndex, length) {
14
- return text.substring(startIndex, startIndex + length);
15
- }
16
- export function markText(text, annotations, onClickAnnotation, setNewAnnotationRef) {
17
- var _a;
18
- if (annotations.length === 0) {
19
- return [text];
20
- }
21
- annotations.sort((a, b) => a.startIndex - b.startIndex);
22
- const [hiddenAnnotations, visibleAnnotations] = _.partition(annotations, a => a.hidden);
23
- const nodes = [];
24
- hiddenAnnotations.forEach(annotation => {
25
- const key = getKey(annotation);
26
- const annotationId = isExistingAnnotation(annotation) ? annotation.annotationId : null;
27
- nodes.push(React.createElement(HiddenAnnotationMark, { key: key, annotationId: annotationId }));
28
- });
29
- let lastIndex = 0;
30
- const onlyLeadingSpacesRemoved = text.replace(/^\s+/, ' ');
31
- const indentationSize = text.length - onlyLeadingSpacesRemoved.length;
32
- const notOverlappingAnnotations = visibleAnnotations.reduce((acc, annotation) => {
33
- const overlapsWithAnyVisibleAnnotation = acc.some(a => annotation.startIndex < a.startIndex + a.length &&
34
- a.startIndex < annotation.startIndex + annotation.length &&
35
- !a.hidden);
36
- acc.push({
37
- ...annotation,
38
- hidden: annotation.hidden || overlapsWithAnyVisibleAnnotation
39
- });
40
- return acc;
41
- }, []);
42
- for (const annotation of notOverlappingAnnotations) {
43
- /* "August 2024 annotation" refers to annotations made on or after 7.8.2024, and on or before x.8.2024.
44
- * They use trimmed exam content (textWithoutLineBreaksAndExtraSpaces) for calculating startIndex.
45
- * Support for "August 2024 annotations" can be removed at least when S25 exams are held.
46
- *
47
- * TODO:
48
- * When support for Aug 2024 annotations can be removed, just do:
49
- * const correctStartIndex = annotation.startIndex
50
- * and remove any unused code left behind
51
- */
52
- const textWithoutLineBreaksAndExtraSpaces = text.replace(/\n/g, ' ').replace(/\s+/g, ' ');
53
- const annotatedTextAugust2024 = getMarkedText(textWithoutLineBreaksAndExtraSpaces, annotation.startIndex, annotation.length);
54
- const isAugust2024Annotation = annotatedTextAugust2024 === annotation.selectedText;
55
- /**
56
- * index difference is defined by how much indentation the text paragraph has in xml,
57
- * and by how many line breaks there are before the annotated text.
58
- * */
59
- const amountOfLineBreaksBeforeAnnotation = ((_a = text.split(annotation.selectedText)[0].match(/\n/g)) === null || _a === void 0 ? void 0 : _a.length) || 0;
60
- const startIndexDifference = amountOfLineBreaksBeforeAnnotation * indentationSize;
61
- const correctStartIndex = annotation.startIndex + (isAugust2024Annotation ? startIndexDifference : 0);
62
- const annotatedTextWithCorrectedStartIndex = getMarkedText(text, correctStartIndex, annotation.length);
63
- // Add unmarked text before this mark
64
- if (correctStartIndex > lastIndex) {
65
- nodes.push(text.substring(lastIndex, correctStartIndex));
66
- }
67
- // Add marked text
68
- const key = getKey(annotation);
69
- const annotationId = isExistingAnnotation(annotation) ? annotation.annotationId : null;
70
- nodes.push(annotation.hidden ? (React.createElement(HiddenAnnotationMark, { key: key, annotationId: annotationId })) : (React.createElement(AnnotationTextMark, { key: key, annotation: annotation, onClickAnnotation: onClickAnnotation, setNewAnnotationRef: setNewAnnotationRef }, annotatedTextWithCorrectedStartIndex)));
71
- lastIndex = correctStartIndex + annotation.length;
72
- }
73
- // Add remaining unmarked text
74
- nodes.push(text.substring(lastIndex));
75
- return nodes;
76
- }
77
- //# sourceMappingURL=markText.js.map
@@ -1 +0,0 @@
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,kBAAkB,MAAM,sBAAsB,CAAA;AACrD,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AAEzD,MAAM,UAAU,MAAM,CAAC,UAA0B;IAC/C,OAAO,oBAAoB,CAAC,UAAU,CAAC;QACrC,CAAC,CAAC,UAAU,CAAC,YAAY,GAAG,UAAU,CAAC,gBAAgB;QACvD,CAAC,CAAC,UAAU,CAAC,g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AC,UAAU,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACrG,MAAM,oCAAoC,GAAG,aAAa,CAAC,IAAI,EAAE,iBAAiB,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;QAEtG,qCAAqC;QACrC,IAAI,iBAAiB,GAAG,SAAS,EAAE,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAA;QAC1D,CAAC;QAED,kBAAkB;QAClB,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;QAC9B,MAAM,YAAY,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAA;QACtF,KAAK,CAAC,IAAI,CACR,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,oBAAC,oBAAoB,IAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,GAAI,CAC/D,CAAC,CAAC,CAAC,CACF,oBAAC,kBAAkB,IACjB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,IAEvC,oCAAoC,CAClB,CACtB,CACF,CAAA;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,8 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- /** Surrounds an Exam component with a static HTML element.
4
- *
5
- * @example surround(Question, 'div', {className: 'foobar'})
6
- */
7
- export default function surround<K extends keyof JSX.IntrinsicElements>(Component: React.ComponentType<ExamComponentProps>, Tag: K, props?: JSX.IntrinsicElements[K]): React.ComponentType<ExamComponentProps>;
8
- //# sourceMappingURL=surround.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"surround.d.ts","sourceRoot":"","sources":["../../src/components/surround.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,EACpE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAClD,GAAG,EAAE,CAAC,EACN,KAAK,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAC/B,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAczC"}
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { getDisplayName } from '../getDisplayName';
3
- /** Surrounds an Exam component with a static HTML element.
4
- *
5
- * @example surround(Question, 'div', {className: 'foobar'})
6
- */
7
- export default function surround(Component, Tag, props) {
8
- const Wrapped = (componentProps) => {
9
- // Can't seem to be able to limit the type to HTML elements that accept children.
10
- // So as a hack, type them as any inside the function to make the compiler happy.
11
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
12
- const TagAsAny = Tag;
13
- return (React.createElement(TagAsAny, { ...props },
14
- React.createElement(Component, { ...componentProps })));
15
- };
16
- Wrapped.displayName = `Surround(${getDisplayName(Component)})`;
17
- return Wrapped;
18
- }
19
- //# sourceMappingURL=surround.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"surround.js","sourceRoot":"","sources":["../../src/components/surround.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,SAAkD,EAClD,GAAM,EACN,KAAgC;IAEhC,MAAM,OAAO,GAAG,CAAC,cAAkC,EAAE,EAAE;QACrD,iFAAiF;QACjF,iFAAiF;QACjF,mEAAmE;QACnE,MAAM,QAAQ,GAAG,GAAU,CAAA;QAC3B,OAAO,CACL,oBAAC,QAAQ,OAAK,KAAK;YACjB,oBAAC,SAAS,OAAK,cAAc,GAAI,CACxB,CACZ,CAAA;IACH,CAAC,CAAA;IACD,OAAO,CAAC,WAAW,GAAG,YAAY,cAAc,CAAC,SAAS,CAAC,GAAG,CAAA;IAC9D,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -1,22 +0,0 @@
1
- declare const _exports: ({
2
- parserOptions: {
3
- project: string;
4
- tsconfigRootDir: string;
5
- };
6
- rules: {
7
- 'no-restricted-imports': (string | {
8
- paths: ({
9
- name: string;
10
- message: string;
11
- } | {
12
- name: string;
13
- importNames: string[];
14
- message: string;
15
- })[];
16
- })[];
17
- };
18
- } | {
19
- ignores: string[];
20
- })[];
21
- export = _exports;
22
- //# sourceMappingURL=eslint.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../src/eslint.config.js"],"names":[],"mappings":""}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- module.exports = [
3
- {
4
- parserOptions: {
5
- project: '../tsconfig.json',
6
- tsconfigRootDir: __dirname
7
- },
8
- rules: {
9
- 'no-restricted-imports': [
10
- 'error',
11
- {
12
- paths: [
13
- {
14
- name: 'lodash',
15
- message: "Please use import * as _ from 'lodash-es' in the core module for better tree shaking."
16
- },
17
- {
18
- name: 'react-i18next',
19
- importNames: ['useTranslation', 'Translation'],
20
- message: 'Please use the `useExamTranslation` wrapper instead.'
21
- }
22
- ]
23
- }
24
- ]
25
- }
26
- },
27
- {
28
- ignores: ['dist/**/*', 'node_modules/**/*']
29
- }
30
- ];
31
- //# sourceMappingURL=eslint.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.config.js","sourceRoot":"","sources":["../src/eslint.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf;QACE,aAAa,EAAE;YACb,OAAO,EAAE,kBAAkB;YAC3B,eAAe,EAAE,SAAS;SAC3B;QACD,KAAK,EAAE;YACL,uBAAuB,EAAE;gBACvB,OAAO;gBACP;oBACE,KAAK,EAAE;wBACL;4BACE,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,uFAAuF;yBACjG;wBACD;4BACE,IAAI,EAAE,eAAe;4BACrB,WAAW,EAAE,CAAC,gBAAgB,EAAE,aAAa,CAAC;4BAC9C,OAAO,EAAE,sDAAsD;yBAChE;qBACF;iBACF;aACF;SACF;KACF;IACD;QACE,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;KAC5C;CACF,CAAA"}
@@ -1,46 +0,0 @@
1
- export declare const examTitlesFi: {
2
- codes: {
3
- A5: string;
4
- A_E: string;
5
- A_X: string;
6
- BA: string;
7
- BB: string;
8
- BI: string;
9
- DC: string;
10
- EA: string;
11
- EC: string;
12
- ET: string;
13
- FA: string;
14
- FC: string;
15
- FF: string;
16
- FY: string;
17
- GC: string;
18
- GE: string;
19
- HI: string;
20
- I: string;
21
- IC: string;
22
- KE: string;
23
- L1: string;
24
- L7: string;
25
- M: string;
26
- N: string;
27
- PA: string;
28
- PC: string;
29
- PS: string;
30
- QC: string;
31
- SA: string;
32
- SC: string;
33
- TC: string;
34
- TE: string;
35
- UE: string;
36
- UO: string;
37
- VA: string;
38
- VC: string;
39
- W: string;
40
- YH: string;
41
- Z: string;
42
- };
43
- 'hearing-impaired': string;
44
- 'visually-impaired': string;
45
- };
46
- //# sourceMappingURL=exam_titles_fi-FI.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exam_titles_fi-FI.d.ts","sourceRoot":"","sources":["../../src/i18n/exam_titles_fi-FI.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CxB,CAAA"}
@@ -1,46 +0,0 @@
1
- export const examTitlesFi = {
2
- codes: {
3
- A5: 'FI – Suomi toisena kielenä ja kirjallisuus',
4
- A_E: 'FI – Äidinkieli ja kirjallisuus, kirjoitustaidon koe',
5
- A_X: 'FI – Äidinkieli ja kirjallisuus, lukutaidon koe',
6
- BA: 'FI – Ruotsi, pitkä oppimäärä',
7
- BB: 'FI – Ruotsi, keskipitkä oppimäärä',
8
- BI: 'FI – Biologia',
9
- DC: 'FI – Pohjoissaame, lyhyt oppimäärä',
10
- EA: 'FI – Englanti, pitkä oppimäärä',
11
- EC: 'FI – Englanti, lyhyt oppimäärä',
12
- ET: 'FI – Elämänkatsomustieto',
13
- FA: 'FI – Ranska, pitkä oppimäärä',
14
- FC: 'FI – Ranska, lyhyt oppimäärä',
15
- FF: 'FI – Filosofia',
16
- FY: 'FI – Fysiikka',
17
- GC: 'FI – Portugali, lyhyt oppimäärä',
18
- GE: 'FI – Maantiede',
19
- HI: 'FI – Historia',
20
- I: 'Eenikielâ já kirjálâšvuotâ, anarâškielâ',
21
- IC: 'FI – Inarinsaame, lyhyt oppimäärä',
22
- KE: 'FI – Kemia',
23
- L1: 'FI – Latina, lyhyt oppimäärä',
24
- L7: 'FI – Latina, laajempi lyhyt oppimäärä',
25
- M: 'FI – Matematiikka, pitkä oppimäärä',
26
- N: 'FI – Matematiikka, lyhyt oppimäärä',
27
- PA: 'FI – Espanja, pitkä oppimäärä',
28
- PC: 'FI – Espanja, lyhyt oppimäärä',
29
- PS: 'FI – Psykologia',
30
- QC: 'FI – Koltansaame, lyhyt oppimäärä',
31
- SA: 'FI – Saksa, pitkä oppimäärä',
32
- SC: 'FI – Saksa, lyhyt oppimäärä',
33
- TC: 'FI – Italia, lyhyt oppimäärä',
34
- TE: 'FI – Terveystieto',
35
- UE: 'FI – Evankelisluterilainen uskonto',
36
- UO: 'FI – Ortodoksinen uskonto',
37
- VA: 'FI – Venäjä, pitkä oppimäärä',
38
- VC: 'FI – Venäjä, lyhyt oppimäärä',
39
- W: 'Jieʹnnǩiõll da ǩeʹrjjlažvuõtt, sääʹmǩiõll',
40
- YH: 'FI – Yhteiskuntaoppi',
41
- Z: 'Eatnigiella ja girjjálašvuohta, davvisámegiella'
42
- },
43
- 'hearing-impaired': '(kuulovammaiset)',
44
- 'visually-impaired': '(näkövammaiset)'
45
- };
46
- //# sourceMappingURL=exam_titles_fi-FI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exam_titles_fi-FI.js","sourceRoot":"","sources":["../../src/i18n/exam_titles_fi-FI.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE;QACL,EAAE,EAAE,4CAA4C;QAChD,GAAG,EAAE,sDAAsD;QAC3D,GAAG,EAAE,iDAAiD;QACtD,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,mCAAmC;QACvC,EAAE,EAAE,eAAe;QACnB,EAAE,EAAE,oCAAoC;QACxC,EAAE,EAAE,gCAAgC;QACpC,EAAE,EAAE,gCAAgC;QACpC,EAAE,EAAE,0BAA0B;QAC9B,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,gBAAgB;QACpB,EAAE,EAAE,eAAe;QACnB,EAAE,EAAE,iCAAiC;QACrC,EAAE,EAAE,gBAAgB;QACpB,EAAE,EAAE,eAAe;QACnB,CAAC,EAAE,yCAAyC;QAC5C,EAAE,EAAE,mCAAmC;QACvC,EAAE,EAAE,YAAY;QAChB,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,uCAAuC;QAC3C,CAAC,EAAE,oCAAoC;QACvC,CAAC,EAAE,oCAAoC;QACvC,EAAE,EAAE,+BAA+B;QACnC,EAAE,EAAE,+BAA+B;QACnC,EAAE,EAAE,iBAAiB;QACrB,EAAE,EAAE,mCAAmC;QACvC,EAAE,EAAE,6BAA6B;QACjC,EAAE,EAAE,6BAA6B;QACjC,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,mBAAmB;QACvB,EAAE,EAAE,oCAAoC;QACxC,EAAE,EAAE,2BAA2B;QAC/B,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,8BAA8B;QAClC,CAAC,EAAE,2CAA2C;QAC9C,EAAE,EAAE,sBAAsB;QAC1B,CAAC,EAAE,iDAAiD;KACrD;IACD,kBAAkB,EAAE,kBAAkB;IACtC,mBAAmB,EAAE,iBAAiB;CACvC,CAAA"}
@@ -1,45 +0,0 @@
1
- {
2
- "codes": {
3
- "A5": "FI – Suomi toisena kielenä ja kirjallisuus",
4
- "A_E": "FI – Äidinkieli ja kirjallisuus, kirjoitustaidon koe",
5
- "A_X": "FI – Äidinkieli ja kirjallisuus, lukutaidon koe",
6
- "BA": "FI – Ruotsi, pitkä oppimäärä",
7
- "BB": "FI – Ruotsi, keskipitkä oppimäärä",
8
- "BI": "FI – Biologia",
9
- "DC": "FI – Pohjoissaame, lyhyt oppimäärä",
10
- "EA": "FI – Englanti, pitkä oppimäärä",
11
- "EC": "FI – Englanti, lyhyt oppimäärä",
12
- "ET": "FI – Elämänkatsomustieto",
13
- "FA": "FI – Ranska, pitkä oppimäärä",
14
- "FC": "FI – Ranska, lyhyt oppimäärä",
15
- "FF": "FI – Filosofia",
16
- "FY": "FI – Fysiikka",
17
- "GC": "FI – Portugali, lyhyt oppimäärä",
18
- "GE": "FI – Maantiede",
19
- "HI": "FI – Historia",
20
- "I": "Eenikielâ já kirjálâšvuotâ, anarâškielâ",
21
- "IC": "FI – Inarinsaame, lyhyt oppimäärä",
22
- "KE": "FI – Kemia",
23
- "L1": "FI – Latina, lyhyt oppimäärä",
24
- "L7": "FI – Latina, laajempi lyhyt oppimäärä",
25
- "M": "FI – Matematiikka, pitkä oppimäärä",
26
- "N": "FI – Matematiikka, lyhyt oppimäärä",
27
- "PA": "FI – Espanja, pitkä oppimäärä",
28
- "PC": "FI – Espanja, lyhyt oppimäärä",
29
- "PS": "FI – Psykologia",
30
- "QC": "FI – Koltansaame, lyhyt oppimäärä",
31
- "SA": "FI – Saksa, pitkä oppimäärä",
32
- "SC": "FI – Saksa, lyhyt oppimäärä",
33
- "TC": "FI – Italia, lyhyt oppimäärä",
34
- "TE": "FI – Terveystieto",
35
- "UE": "FI – Evankelisluterilainen uskonto",
36
- "UO": "FI – Ortodoksinen uskonto",
37
- "VA": "FI – Venäjä, pitkä oppimäärä",
38
- "VC": "FI – Venäjä, lyhyt oppimäärä",
39
- "W": "Jieʹnnǩiõll da ǩeʹrjjlažvuõtt, sääʹmǩiõll",
40
- "YH": "FI – Yhteiskuntaoppi",
41
- "Z": "Eatnigiella ja girjjálašvuohta, davvisámegiella"
42
- },
43
- "hearing-impaired": "(kuulovammaiset)",
44
- "visually-impaired": "(näkövammaiset)"
45
- }
@@ -1,46 +0,0 @@
1
- export declare const examTitlesSv: {
2
- codes: {
3
- BI: string;
4
- CA: string;
5
- CB: string;
6
- EA: string;
7
- EC: string;
8
- ET: string;
9
- FA: string;
10
- FC: string;
11
- FF: string;
12
- FY: string;
13
- GC: string;
14
- GE: string;
15
- HI: string;
16
- KE: string;
17
- L1: string;
18
- L7: string;
19
- M: string;
20
- N: string;
21
- O5: string;
22
- O_E: string;
23
- O_X: string;
24
- PA: string;
25
- PC: string;
26
- PS: string;
27
- SA: string;
28
- SC: string;
29
- TC: string;
30
- TE: string;
31
- UE: string;
32
- UO: string;
33
- VA: string;
34
- VC: string;
35
- YH: string;
36
- W: string;
37
- Z: string;
38
- I: string;
39
- DC: string;
40
- QC: string;
41
- IC: string;
42
- };
43
- 'hearing-impaired': string;
44
- 'visually-impaired': string;
45
- };
46
- //# sourceMappingURL=exam_titles_sv-FI.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exam_titles_sv-FI.d.ts","sourceRoot":"","sources":["../../src/i18n/exam_titles_sv-FI.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CxB,CAAA"}