@digabi/exam-engine-core 19.7.1-alpha.0 → 19.8.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/AnsweringInstructions.test.js +11 -11
- package/dist/__tests__/AnsweringInstructions.test.js.map +1 -1
- package/dist/__tests__/examServerApi.js +2 -2
- package/dist/__tests__/examServerApi.js.map +1 -1
- package/dist/__tests__/renderAnnotations.test.js +18 -18
- package/dist/__tests__/results/AnnotationList.test.js +27 -27
- package/dist/__tests__/results/ResultsContext.test.js +37 -37
- package/dist/__tests__/results/ResultsContext.test.js.map +1 -1
- package/dist/__tests__/results/ResultsExamQuestionAutoScore.test.js +4 -4
- package/dist/__tests__/results/ResultsExamQuestionManualScore.test.js +19 -19
- package/dist/__tests__/testExamRendering.js +14 -16
- package/dist/__tests__/testExamRendering.js.map +1 -1
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/__tests__/validateAnswers.test.js +28 -28
- package/dist/__tests__/validateAnswers.test.js.map +1 -1
- package/dist/components/AnswerToolbar.d.ts +1 -1
- package/dist/components/AnswerToolbar.d.ts.map +1 -1
- package/dist/components/AnswerToolbar.js +2 -2
- package/dist/components/AnswerToolbar.js.map +1 -1
- package/dist/components/AnsweringInstructions.js +1 -1
- package/dist/components/AnsweringInstructions.js.map +1 -1
- package/dist/components/DocumentTitle.js +1 -1
- package/dist/components/DocumentTitle.js.map +1 -1
- package/dist/components/SectionElement.js +1 -1
- package/dist/components/SectionElement.js.map +1 -1
- package/dist/components/attachments/Attachments.js +1 -1
- package/dist/components/attachments/ExternalMaterial.d.ts.map +1 -1
- package/dist/components/attachments/ExternalMaterial.js +5 -1
- package/dist/components/attachments/ExternalMaterial.js.map +1 -1
- package/dist/components/attachments/Question.js +1 -1
- package/dist/components/attachments/Question.js.map +1 -1
- package/dist/components/context/CommonExamContext.js +1 -1
- package/dist/components/context/ExamContext.js +1 -1
- package/dist/components/context/QuestionContext.js +1 -1
- package/dist/components/context/ResultsContext.js +6 -6
- package/dist/components/context/ResultsContext.js.map +1 -1
- package/dist/components/context/SectionContext.js +2 -2
- package/dist/components/context/SectionContext.js.map +1 -1
- package/dist/components/exam/ChoiceAnswer.js +6 -6
- package/dist/components/exam/ChoiceAnswer.js.map +1 -1
- package/dist/components/exam/DropdownAnswer.js +10 -10
- package/dist/components/exam/DropdownAnswer.js.map +1 -1
- package/dist/components/exam/Exam.d.ts.map +1 -1
- package/dist/components/exam/Exam.js +11 -7
- package/dist/components/exam/Exam.js.map +1 -1
- package/dist/components/exam/ExternalMaterial.js +1 -1
- package/dist/components/exam/Hints.js +3 -3
- package/dist/components/exam/Hints.js.map +1 -1
- package/dist/components/exam/Question.d.ts +4 -0
- package/dist/components/exam/Question.d.ts.map +1 -1
- package/dist/components/exam/Question.js +41 -8
- package/dist/components/exam/Question.js.map +1 -1
- package/dist/components/exam/QuestionTitle.js +1 -1
- package/dist/components/exam/RichTextAnswer.d.ts +6 -1
- package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
- package/dist/components/exam/RichTextAnswer.js +14 -2
- package/dist/components/exam/RichTextAnswer.js.map +1 -1
- package/dist/components/exam/Section.js +2 -2
- package/dist/components/exam/Section.js.map +1 -1
- package/dist/components/exam/internal/ErrorIndicator.d.ts +1 -1
- package/dist/components/exam/internal/ErrorIndicator.d.ts.map +1 -1
- package/dist/components/exam/internal/ErrorIndicator.js +4 -4
- package/dist/components/exam/internal/ErrorIndicator.js.map +1 -1
- package/dist/components/exam/internal/ProgressBar.js +1 -1
- package/dist/components/exam/internal/ProgressBar.js.map +1 -1
- package/dist/components/exam/internal/TextAnswerInput.d.ts.map +1 -1
- package/dist/components/exam/internal/TextAnswerInput.js +42 -12
- package/dist/components/exam/internal/TextAnswerInput.js.map +1 -1
- package/dist/components/grading/AnswerCharacterCounter.d.ts +1 -1
- package/dist/components/grading/AnswerCharacterCounter.d.ts.map +1 -1
- package/dist/components/grading/AnswerCharacterCounter.js +3 -3
- package/dist/components/grading/AnswerCharacterCounter.js.map +1 -1
- package/dist/components/grading/GradingAnswer.js +9 -9
- package/dist/components/grading/GradingAnswer.js.map +1 -1
- package/dist/components/grading/GradingAnswerAnnotationList.d.ts +1 -1
- package/dist/components/grading/GradingAnswerAnnotationList.d.ts.map +1 -1
- package/dist/components/grading/GradingAnswerAnnotationList.js +2 -2
- package/dist/components/grading/GradingAnswerAnnotationList.js.map +1 -1
- package/dist/components/grading/editAnnotations.js +14 -14
- package/dist/components/grading/editAnnotations.js.map +1 -1
- package/dist/components/grading/largeImageDetector.js +2 -2
- package/dist/components/grading/largeImageDetector.js.map +1 -1
- package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
- package/dist/components/grading-instructions/GradingInstructions.js +7 -3
- package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
- package/dist/components/grading-instructions/Question.js +1 -1
- package/dist/components/grading-instructions/QuestionTitle.js +1 -1
- package/dist/components/results/ChoiceAnswer.js +7 -7
- package/dist/components/results/ChoiceAnswer.js.map +1 -1
- package/dist/components/results/DropdownAnswer.js +5 -5
- package/dist/components/results/DropdownAnswer.js.map +1 -1
- package/dist/components/results/Question.js +3 -3
- package/dist/components/results/Question.js.map +1 -1
- package/dist/components/results/QuestionTitle.js +1 -1
- package/dist/components/results/Results.d.ts.map +1 -1
- package/dist/components/results/Results.js +5 -1
- package/dist/components/results/Results.js.map +1 -1
- package/dist/components/results/Section.js +1 -1
- package/dist/components/results/Section.js.map +1 -1
- package/dist/components/results/SingleLineAnswer.d.ts +1 -1
- package/dist/components/results/SingleLineAnswer.d.ts.map +1 -1
- package/dist/components/results/SingleLineAnswer.js +1 -1
- package/dist/components/results/SingleLineAnswer.js.map +1 -1
- package/dist/components/results/internal/AnnotationList.js +2 -2
- package/dist/components/results/internal/AnnotationList.js.map +1 -1
- package/dist/components/results/internal/QuestionAutoScore.js +1 -1
- package/dist/components/results/internal/QuestionAutoScore.js.map +1 -1
- package/dist/components/results/internal/QuestionManualScore.js +3 -3
- package/dist/components/results/internal/QuestionScoresContainer.d.ts +1 -1
- package/dist/components/results/internal/QuestionScoresContainer.d.ts.map +1 -1
- package/dist/components/results/internal/QuestionScoresContainer.js +4 -4
- package/dist/components/results/internal/QuestionScoresContainer.js.map +1 -1
- package/dist/components/shared/AnnotationLists.d.ts +1 -1
- package/dist/components/shared/AnnotationLists.d.ts.map +1 -1
- package/dist/components/shared/AnnotationLists.js +1 -1
- package/dist/components/shared/AnnotationLists.js.map +1 -1
- package/dist/components/shared/AnswerIndicator.js +1 -1
- package/dist/components/shared/AttachmentLink.js +1 -1
- package/dist/components/shared/AttachmentLink.js.map +1 -1
- package/dist/components/shared/AttachmentLinks.js +3 -3
- package/dist/components/shared/AttachmentLinks.js.map +1 -1
- package/dist/components/shared/ImageOverlay.js +3 -3
- package/dist/components/shared/ImageOverlay.js.map +1 -1
- package/dist/components/shared/Reference.js +1 -1
- package/dist/components/shared/References.js +1 -1
- package/dist/components/shared/References.js.map +1 -1
- package/dist/components/shared/Score.js +1 -1
- package/dist/components/shared/TableOfContents.js +15 -17
- package/dist/components/shared/TableOfContents.js.map +1 -1
- package/dist/components/shared/internal/ResponsiveMediaContainer.js +3 -3
- package/dist/components/shared/internal/ResponsiveMediaContainer.js.map +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.d.ts +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.d.ts.map +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.js +2 -2
- package/dist/components/shared/internal/RestrictedAudioPlayer.js.map +1 -1
- package/dist/dom-utils.js +1 -1
- package/dist/dom-utils.js.map +1 -1
- package/dist/fonts.js +1 -1
- package/dist/fonts.js.map +1 -1
- package/dist/i18n/A_E.js +2 -2
- package/dist/i18n/BA.js +1 -1
- package/dist/i18n/CA.js +1 -1
- package/dist/i18n/EA.js +2 -2
- package/dist/i18n/FA.js +2 -2
- package/dist/i18n/GC.js +2 -2
- package/dist/i18n/I.js +3 -3
- package/dist/i18n/M.js +1 -1
- package/dist/i18n/O_E.js +2 -2
- package/dist/i18n/PA.js +2 -2
- package/dist/i18n/SA.js +2 -2
- package/dist/i18n/TC.js +2 -2
- package/dist/i18n/VA.js +2 -2
- package/dist/i18n/Z.js +3 -3
- package/dist/i18n/fi-FI.d.ts +3 -0
- package/dist/i18n/fi-FI.d.ts.map +1 -1
- package/dist/i18n/fi-FI.js +17 -14
- package/dist/i18n/fi-FI.js.map +1 -1
- package/dist/i18n/index.d.ts +2 -137
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +8 -8
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/sv-FI.d.ts.map +1 -1
- package/dist/i18n/sv-FI.js +18 -14
- package/dist/i18n/sv-FI.js.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/dist/main-bundle.js.LICENSE.txt +0 -5
- package/dist/main.css +1 -1
- package/dist/parser/parseExam.js +5 -5
- package/dist/parser/parseExam.js.map +1 -1
- package/dist/parser/parseExamStructure.js +4 -4
- package/dist/renderAnnotations.js +8 -8
- package/dist/renderAnnotations.js.map +1 -1
- package/dist/store/answers/reducer.js +2 -2
- package/dist/store/audio/reducer.js +3 -3
- package/dist/store/audio/sagas.js +1 -1
- package/dist/store/audio/sagas.js.map +1 -1
- package/dist/store/cas/reducer.js +1 -1
- package/dist/store/cas/sagas.js +1 -1
- package/dist/store/countdown.js +1 -1
- package/dist/store/countdown.js.map +1 -1
- package/dist/store/index.js +4 -4
- package/dist/validateAnswers.js +8 -8
- package/dist/validateAnswers.js.map +1 -1
- package/package.json +18 -18
- package/dist/utils/exifDataAndImageHandler.d.ts +0 -2
- package/dist/utils/exifDataAndImageHandler.d.ts.map +0 -1
- package/dist/utils/exifDataAndImageHandler.js +0 -61
- package/dist/utils/exifDataAndImageHandler.js.map +0 -1
@@ -8,16 +8,16 @@ function Question({ element, renderChildNodes }) {
|
|
8
8
|
const { answersByQuestionId } = useContext(ResultsContext);
|
9
9
|
const { displayNumber, level } = useContext(QuestionContext);
|
10
10
|
const hasAnswers = questionHasAnswers(element, answersByQuestionId);
|
11
|
-
return hasAnswers ? (React.createElement("div", { className: classNames('exam-question', {
|
11
|
+
return hasAnswers ? (React.createElement("div", { className: classNames('e-exam-question', {
|
12
12
|
'e-mrg-b-8 e-clearfix': level === 0,
|
13
|
-
'e-mrg-l-8 e-mrg-y-4': level > 0
|
13
|
+
'e-mrg-l-8 e-mrg-y-4': level > 0
|
14
14
|
}), id: displayNumber },
|
15
15
|
renderChildNodes(element),
|
16
16
|
React.createElement(AnnotationList, null))) : null;
|
17
17
|
}
|
18
18
|
function questionHasAnswers(element, answers) {
|
19
19
|
const answerElems = findChildrenAnswers(element);
|
20
|
-
return answerElems.some(
|
20
|
+
return answerElems.some(e => answers[getNumericAttribute(e, 'question-id')]);
|
21
21
|
}
|
22
22
|
export default React.memo(withQuestionContext(Question));
|
23
23
|
//# sourceMappingURL=Question.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../src/components/results/Question.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,cAAc,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAI1D,SAAS,QAAQ,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACjE,MAAM,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAC1D,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC5D,MAAM,UAAU,GAAG,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;IA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C,mBAAmB,CAAC,CAAC,EAAE,aAAa,CAAE,CAAC,CAAC,CAAA;AAC/E,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAA"}
|
@@ -10,7 +10,7 @@ function QuestionTitle({ element, renderChildNodes }) {
|
|
10
10
|
return (React.createElement(React.Fragment, null,
|
11
11
|
React.createElement(Tag, { className: classNames('exam-question-title', { 'e-normal e-font-size-m': level > 0 }) },
|
12
12
|
React.createElement("strong", { className: classNames('exam-question-title__display-number', {
|
13
|
-
'exam-question-title__display-number--indented': level > 0
|
13
|
+
'exam-question-title__display-number--indented': level > 0
|
14
14
|
}) }, `${formatQuestionDisplayNumber(displayNumber)} `),
|
15
15
|
renderChildNodes(element)),
|
16
16
|
maxAnswers != null && childQuestions.length > 0 && (React.createElement("p", { className: "e-italic" },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAU/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;
|
1
|
+
{"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAU/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAqB9C,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,8GAA8G;IAC9G,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;;AAoFD,wBAA6E"}
|
@@ -26,6 +26,8 @@ import TextAnswer from './TextAnswer';
|
|
26
26
|
import { ErrorIndicatorForErrors } from '../exam/internal/ErrorIndicator';
|
27
27
|
import { validateAnswers } from '../../validateAnswers';
|
28
28
|
import { parseExamStructure } from '../../parser/parseExamStructure';
|
29
|
+
import { QuestionNumber } from '../shared/QuestionNumber';
|
30
|
+
import ExamTranslation from '../shared/ExamTranslation';
|
29
31
|
const renderChildNodes = createRenderChildNodes({
|
30
32
|
attachment: RenderChildNodes,
|
31
33
|
'attachment-link': mkAttachmentLink('plain'),
|
@@ -38,12 +40,14 @@ const renderChildNodes = createRenderChildNodes({
|
|
38
40
|
hints: RenderChildNodes,
|
39
41
|
image: renderIf(({ element }) => queryAncestors(element, 'choice-answer') != null)(Image),
|
40
42
|
'question-instruction': ExamQuestionInstruction,
|
43
|
+
'question-number': QuestionNumber,
|
44
|
+
translation: ExamTranslation,
|
41
45
|
'question-title': QuestionTitle,
|
42
46
|
section: Section,
|
43
47
|
'section-title': ExamSectionTitle,
|
44
48
|
'text-answer': TextAnswer,
|
45
49
|
'scored-text-answer': ScoredTextAnswer,
|
46
|
-
'scored-text-answers': RenderChildNodes
|
50
|
+
'scored-text-answers': RenderChildNodes
|
47
51
|
});
|
48
52
|
const Results = ({ doc }) => {
|
49
53
|
const { date, dateTimeFormatter, dayCode, examCode, language, resolveAttachment, root, subjectLanguage } = useContext(CommonExamContext);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MA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CACL,6BAAK,SAAS,EAAC,kBAAkB;QAC/B,+BAAO,SAAS,EAAC,uCAAuC;YACtD;gBACE;oBACE,4BAAI,SAAS,EAAC,oBAAoB,IAAE,CAAC,CAAC,eAAe,CAAC,CAAM;oBAC5D,4BAAI,SAAS,EAAC,mCAAmC,IAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAM,CACxF;gBACJ,WAAW,IAAI,CACd;oBACE,4BAAI,SAAS,EAAC,oBAAoB,IAAE,CAAC,CAAC,OAAO,CAAC,CAAM;oBACpD,4BAAI,SAAS,EAAC,mCAAmC,IAAE,WAAW,CAAM,CACjE,CACN,CACK,CACF,CACJ,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA"}
|
@@ -7,7 +7,7 @@ import { sectionTitleId } from '../../ids';
|
|
7
7
|
function Section({ element, renderChildNodes }) {
|
8
8
|
const { displayNumber } = useContext(SectionContext);
|
9
9
|
const { answersByQuestionId } = useContext(ResultsContext);
|
10
|
-
const containsAnswers = query(element,
|
10
|
+
const containsAnswers = query(element, e => {
|
11
11
|
const maybeQuestionId = e.getAttribute('question-id');
|
12
12
|
return maybeQuestionId != null && Object.prototype.hasOwnProperty.call(answersByQuestionId, maybeQuestionId);
|
13
13
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../src/components/results/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2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AAc,uBAAkB,cAAc,CAAC,aAAa,CAAC;QAC5D,6BAAK,SAAS,EAAC,2BAA2B,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAO,CAC7D,CAClB,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Score } from '../..';
|
3
|
-
declare function SingleLineAnswer({ displayNumber, score, value, children
|
3
|
+
declare function SingleLineAnswer({ displayNumber, score, value, children }: {
|
4
4
|
answers: Element[];
|
5
5
|
score?: Score;
|
6
6
|
displayNumber?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SingleLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/SingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,iBAAS,gBAAgB,CAAC,EACxB,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,
|
1
|
+
{"version":3,"file":"SingleLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/SingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,iBAAS,gBAAgB,CAAC,EACxB,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,EACT,EAAE;IACD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,eAuBA;;AAED,wBAA2C"}
|
@@ -2,7 +2,7 @@ import React, { useLayoutEffect, useRef } from 'react';
|
|
2
2
|
import { useExamTranslation } from '../../i18n';
|
3
3
|
import { renderAnnotations } from '../../renderAnnotations';
|
4
4
|
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
5
|
-
function SingleLineAnswer({ displayNumber, score, value, children
|
5
|
+
function SingleLineAnswer({ displayNumber, score, value, children }) {
|
6
6
|
const { t } = useExamTranslation();
|
7
7
|
const answerRef = useRef(null);
|
8
8
|
useLayoutEffect(() => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SingleLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/SingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,SAAS,gBAAgB,CAAC,EACxB,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,
|
1
|
+
{"version":3,"file":"SingleLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/SingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,SAAS,gBAAgB,CAAC,EACxB,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,EAOT;IACC,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAE/C,eAAe,CAAC,GAAG,EAAE;;QACnB,IAAI,SAAS,CAAC,OAAO,EAAE;YACrB,iBAAiB,CAAC,SAAS,CAAC,OAAO,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,mCAAI,EAAE,CAAC,CAAA;SAChH;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CACL;QACG,aAAa,IAAI,iCAAM,aAAa,CAAO;QAC5C,8BAAM,SAAS,EAAC,sCAAsC;YACpD,oBAAC,gBAAgB,QAAE,CAAC,CAAC,4BAA4B,CAAC,CAAoB;YACtE,8BAAM,SAAS,EAAC,gBAAgB,EAAC,GAAG,EAAE,SAAS,IAC5C,KAAK,CACD;YACP,oBAAC,gBAAgB,QAAE,CAAC,CAAC,0BAA0B,CAAC,CAAoB,CAC/D;QACN,QAAQ,CACR,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA"}
|
@@ -11,14 +11,14 @@ const getPrefix = (answers, answer) => answers.length > 1 ? shortDisplayNumber(a
|
|
11
11
|
function ResultsAnnotationList() {
|
12
12
|
const { answers } = useContext(QuestionContext);
|
13
13
|
const { scores, singleGrading } = useContext(ResultsContext);
|
14
|
-
const answersAndScores = mapMaybe(answers || [],
|
14
|
+
const answersAndScores = mapMaybe(answers || [], answer => {
|
15
15
|
const questionId = getNumericAttribute(answer, 'question-id');
|
16
16
|
const score = findScore(scores, questionId);
|
17
17
|
return score && answer && hasAnnotations(score) ? [answer, score] : undefined;
|
18
18
|
});
|
19
19
|
const getListOfAnnotations = (answerElementAndScores, annotationsFrom, listNumberOffset = 0) => _.flatMap(answerElementAndScores, ([answer, score]) => {
|
20
20
|
var _a, _b, _c;
|
21
|
-
return (_c = (_b = (_a = score[annotationsFrom]) === null || _a === void 0 ? void 0 : _a.annotations) === null || _b === void 0 ? void 0 : _b.filter(
|
21
|
+
return (_c = (_b = (_a = score[annotationsFrom]) === null || _a === void 0 ? void 0 : _a.annotations) === null || _b === void 0 ? void 0 : _b.filter(a => a.message.length).map((annotation, i) => {
|
22
22
|
const numbering = `${getPrefix(answers, answer) + String(listNumberOffset + i + 1)})`;
|
23
23
|
const message = annotation.message;
|
24
24
|
return { numbering, message };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnnotationList.js","sourceRoot":"","sources":["../../../../src/components/results/internal/AnnotationList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAE9D,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE,uBACtC,OAAA,OAAO,CAAC,CAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,0CAAE,MAAM,MAAI,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,0CAAE,MAAM,CAAA,CAAC,CAAA,EAAA,CAAA;AAE1F,MAAM,SAAS,GAAG,CAAC,OAAkB,EAAE,MAAe,EAAE,EAAE,CACxD,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CA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AE,OAAO,EAAE,CAAA;QAC/B,CAAC,CAAC,mCAAI,EAAE,CAAA;KAAA,CACb,CAAA;IAEH,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA;IAClF,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,gBAAgB,EAAE,WAAW,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAE9G,OAAO,CACL,oBAAC,eAAe,IACd,qBAAqB,EAAE,qBAAqB,EAC5C,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE,CAAC,CAAC,aAAa,GAC9B,CACH,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA"}
|
@@ -7,7 +7,7 @@ function QuestionAutoScore({ score, maxScore, displayNumber }) {
|
|
7
7
|
const { t } = useExamTranslation();
|
8
8
|
const containerProps = { answers, displayNumber };
|
9
9
|
return (React.createElement(ResultsExamQuestionScoresContainer, { ...containerProps },
|
10
|
-
typeof score === 'number' ? React.createElement("b", null, score) : React.createElement("
|
10
|
+
typeof score === 'number' ? React.createElement("b", null, score) : React.createElement("span", { className: "e-result-scorecount-empty" }),
|
11
11
|
' ',
|
12
12
|
maxScore ? `/ ${maxScore} ` : null,
|
13
13
|
" ",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QuestionAutoScore.js","sourceRoot":"","sources":["../../../../src/components/results/internal/QuestionAutoScore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,kCAAkC,MAAM,2BAA2B,CAAA;AAQ1E,SAAS,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAA0B;IACnF,MAAM,EAAE,OAAO,EA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AC,iBAAiB,CAAC,CAAA"}
|
@@ -16,7 +16,7 @@ function renderNormalizedScores(scores, maxScore) {
|
|
16
16
|
const normalizedScores = [
|
17
17
|
scores.inspection && normalizeInspectionScore(scores.inspection),
|
18
18
|
...(scores.censoring ? normalizeCensoringScores(scores.censoring) : []),
|
19
|
-
scores.pregrading && normalizePregradingScore(scores.pregrading)
|
19
|
+
scores.pregrading && normalizePregradingScore(scores.pregrading)
|
20
20
|
].filter(Boolean);
|
21
21
|
return normalizedScores.map((score, i) => React.createElement(ScoreRow, { key: i, ...score, latest: i === 0, maxScore: maxScore }));
|
22
22
|
}
|
@@ -52,14 +52,14 @@ function normalizeCensoringScores(score) {
|
|
52
52
|
return score.scores.map((s, i) => ({
|
53
53
|
score: s.score,
|
54
54
|
shortCode: s.shortCode || '',
|
55
|
-
type: `grading.round.${score.scores.length - i}
|
55
|
+
type: `grading.round.${score.scores.length - i}`
|
56
56
|
}));
|
57
57
|
}
|
58
58
|
function normalizeInspectionScore(score) {
|
59
59
|
return {
|
60
60
|
score: score.score,
|
61
61
|
shortCode: score.shortCodes ? score.shortCodes.join(', ') : '',
|
62
|
-
type: 'grading.inspection-grading-abbrev'
|
62
|
+
type: 'grading.inspection-grading-abbrev'
|
63
63
|
};
|
64
64
|
}
|
65
65
|
export default React.memo(QuestionManualScore);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
declare function QuestionScoresContainer({ answers, displayNumber, children, multilineAnswer
|
2
|
+
declare function QuestionScoresContainer({ answers, displayNumber, children, multilineAnswer }: {
|
3
3
|
answers: Element[];
|
4
4
|
displayNumber?: string;
|
5
5
|
children: React.ReactNode;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QuestionScoresContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/results/internal/QuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,iBAAS,uBAAuB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,eAAe,
|
1
|
+
{"version":3,"file":"QuestionScoresContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/results/internal/QuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,iBAAS,uBAAuB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,eAAe,EAChB,EAAE;IACD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,eAoBA;;AAED,wBAAkD"}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React, { useContext } from 'react';
|
2
2
|
import classnames from 'classnames';
|
3
3
|
import { QuestionContext } from '../../context/QuestionContext';
|
4
|
-
function QuestionScoresContainer({ answers, displayNumber, children, multilineAnswer
|
4
|
+
function QuestionScoresContainer({ answers, displayNumber, children, multilineAnswer }) {
|
5
5
|
const { displayNumber: topLevelDisplayNumber } = useContext(QuestionContext);
|
6
6
|
const fullDisplayNumber = displayNumber ? `${topLevelDisplayNumber}.${displayNumber === null || displayNumber === void 0 ? void 0 : displayNumber.replace('.', '')}` : undefined;
|
7
|
-
return (React.createElement("
|
8
|
-
'e-result-scorecount-multiline-answer': multilineAnswer
|
7
|
+
return (React.createElement("span", { className: classnames('e-result-scorecount', 'e-float-right', {
|
8
|
+
'e-result-scorecount-multiline-answer': multilineAnswer
|
9
9
|
}), id: fullDisplayNumber },
|
10
|
-
React.createElement("
|
10
|
+
React.createElement("span", { className: "e-result-scorecount-border-wrap" },
|
11
11
|
answers.length > 1 && displayNumber && (React.createElement("sup", { className: "e-result-scorecount-sup e-mrg-r-1", "aria-hidden": "true" }, displayNumber)),
|
12
12
|
children)));
|
13
13
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QuestionScoresContainer.js","sourceRoot":"","sources":["../../../../src/components/results/internal/QuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,eAAe,
|
1
|
+
{"version":3,"file":"QuestionScoresContainer.js","sourceRoot":"","sources":["../../../../src/components/results/internal/QuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,eAAe,EAMhB;IACC,MAAM,EAAE,aAAa,EAAE,qBAAqB,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC5E,MAAM,iBAAiB,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,qBAAqB,IAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;IACnH,OAAO,CACL,8BACE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,eAAe,EAAE;YAC5D,sCAAsC,EAAE,eAAe;SACxD,CAAC,EACF,EAAE,EAAE,iBAAiB;QAErB,8BAAM,SAAS,EAAC,iCAAiC;YAC9C,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,IAAI,CACtC,6BAAK,SAAS,EAAC,mCAAmC,iBAAa,MAAM,IAClE,aAAa,CACV,CACP;YACA,QAAQ,CACJ,CACF,CACR,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export declare function AnnotationLists({ pregradingAnnotations, censoringAnnotations, singleGrading
|
2
|
+
export declare function AnnotationLists({ pregradingAnnotations, censoringAnnotations, singleGrading }: {
|
3
3
|
pregradingAnnotations: {
|
4
4
|
numbering: string;
|
5
5
|
message: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnnotationLists.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationLists.tsx"],"names":[],"mappings":";AAGA,wBAAgB,eAAe,CAAC,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,
|
1
|
+
{"version":3,"file":"AnnotationLists.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationLists.tsx"],"names":[],"mappings":";AAGA,wBAAgB,eAAe,CAAC,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACd,EAAE;IACD,qBAAqB,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC/D,oBAAoB,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC9D,aAAa,EAAE,OAAO,CAAA;CACvB,sBAsBA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useExamTranslation } from '../../i18n';
|
3
|
-
export function AnnotationLists({ pregradingAnnotations, censoringAnnotations, singleGrading
|
3
|
+
export function AnnotationLists({ pregradingAnnotations, censoringAnnotations, singleGrading }) {
|
4
4
|
return pregradingAnnotations.length || censoringAnnotations.length ? (React.createElement("div", { className: "e-annotation-list e-columns e-mrg-t-2" }, singleGrading ? (React.createElement("div", { className: "e-column e-column--10" },
|
5
5
|
React.createElement(AnnotationListComponent, { annotations: pregradingAnnotations }))) : (React.createElement(React.Fragment, null,
|
6
6
|
React.createElement("div", { className: "e-column e-column--6" },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnnotationLists.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationLists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,UAAU,eAAe,CAAC,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,
|
1
|
+
{"version":3,"file":"AnnotationLists.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationLists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,UAAU,eAAe,CAAC,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EAKd;IACC,OAAO,qBAAqB,CAAC,MAAM,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CACnE,6BAAK,SAAS,EAAC,uCAAuC,IACnD,aAAa,CAAC,CAAC,CAAC,CACf,6BAAK,SAAS,EAAC,uBAAuB;QACpC,oBAAC,uBAAuB,IAAC,WAAW,EAAE,qBAAqB,GAAI,CAC3D,CACP,CAAC,CAAC,CAAC,CACF;QACE,6BAAK,SAAS,EAAC,sBAAsB;YACnC,oBAAC,uBAAuB,IACtB,YAAY,EAAE,gCAAgC,EAC9C,WAAW,EAAE,qBAAqB,GAClC,CACE;QACN,6BAAK,SAAS,EAAC,sBAAsB;YACnC,oBAAC,uBAAuB,IAAC,YAAY,EAAE,4BAA4B,EAAE,WAAW,EAAE,oBAAoB,GAAI,CACtG,CACL,CACJ,CACG,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,MAAM,uBAAuB,GAAG,CAAC,EAAE,YAAY,EAAE,WAAW,EAAuB,EAAE,EAAE;IACrF,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAElC,OAAO,WAAW,CAAC,CAAC,CAAC,CACnB;QACG,YAAY,IAAI,gCAAK,CAAC,CAAC,YAAY,CAAC,CAAM;QAC3C,4BAAI,SAAS,EAAC,qCAAqC,IAChD,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC3C,gDAAsB,SAAS,EAAE,GAAG,EAAE,SAAS,IAC5C,OAAO,CACL,CACN,CAAC,CACC,CACJ,CACJ,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAA"}
|
@@ -11,7 +11,7 @@ const AnswerIndicator = (props) => {
|
|
11
11
|
React.createElement("div", { key: id, className: classNames('answer-indicator', {
|
12
12
|
ok: answer === null || answer === void 0 ? void 0 : answer.value,
|
13
13
|
error,
|
14
|
-
big: type === 'rich-text'
|
14
|
+
big: type === 'rich-text'
|
15
15
|
}), "data-indicator-id": id }, (answer === null || answer === void 0 ? void 0 : answer.type) === 'richText' && (React.createElement(React.Fragment, null,
|
16
16
|
answerIsFormula && '∑',
|
17
17
|
answerIsImage && React.createElement(FontAwesomeIcon, { icon: faImage, size: "lg" }),
|
@@ -10,7 +10,7 @@ const mkAttachmentLink = (type) => {
|
|
10
10
|
const { root } = useContext(CommonExamContext);
|
11
11
|
const { attachmentsURL } = useContext(CommonExamContext);
|
12
12
|
const { t } = useExamTranslation();
|
13
|
-
const attachment = query(root,
|
13
|
+
const attachment = query(root, el => el.localName === 'attachment' && el.getAttribute('name') === name);
|
14
14
|
const displayNumber = attachment.getAttribute('display-number');
|
15
15
|
const isShort = element.getAttribute('type') === 'short';
|
16
16
|
const href = url(attachmentsURL, { hash: displayNumber });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachmentLink.js","sourceRoot":"","sources":["../../../src/components/shared/AttachmentLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE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AAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;QACzC,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;QAC9C,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;QACxD,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;QAClC,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,KAAK,YAAY,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,CAAE,CAAA;QACxG,MAAM,aAAa,GAAG,UAAU,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAA;QAChE,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,OAAO,CAAA;QACxD,MAAM,IAAI,GAAG,GAAG,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAA;QAEzD,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,oBAAC,oBAAoB,IAAO,IAAI,EAAE,IAAI,IAAK,aAAa,CAAwB,CACjF,CAAC,CAAC,CAAC,CACF;YACG,GAAG;YACJ,oBAAC,oBAAoB,IAAO,IAAI,EAAE,IAAI;gBACnC,CAAC,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;;gBAAG,aAAa,CACvC;YACtB,GAAG,CACH,CACJ,CAAA;IACH,CAAC,CAAA;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
@@ -8,16 +8,16 @@ const mkAttachmentLinks = (type) => {
|
|
8
8
|
const AttachmentLinks = ({ element }) => {
|
9
9
|
const { root, attachmentsURL } = useContext(CommonExamContext);
|
10
10
|
const { t } = useExamTranslation();
|
11
|
-
const displayNumbers = mapChildElements(element,
|
11
|
+
const displayNumbers = mapChildElements(element, attachmentLink => {
|
12
12
|
const name = attachmentLink.getAttribute('ref');
|
13
|
-
const attachment = query(root,
|
13
|
+
const attachment = query(root, el => el.localName === 'attachment' && el.getAttribute('name') === name);
|
14
14
|
return attachment.getAttribute('display-number');
|
15
15
|
});
|
16
16
|
const groupedDisplayNumbers = splitWhen(displayNumbers, (displayNumber, i) => i > 0 && !isSuccessive(displayNumbers[i - 1], displayNumber));
|
17
17
|
const isShort = element.getAttribute('type') === 'short';
|
18
18
|
const href = url(attachmentsURL, { hash: displayNumbers[0] });
|
19
19
|
const displayNumbersString = groupedDisplayNumbers
|
20
|
-
.map(
|
20
|
+
.map(group => (group.length > 1 ? `${group[0]}–${group[group.length - 1]}` : group[0]))
|
21
21
|
.join(', ');
|
22
22
|
const count = groupedDisplayNumbers[0].length;
|
23
23
|
return isShort ? (React.createElement(AttachmentLinkAnchor, { href, type }, displayNumbersString)) : (React.createElement(React.Fragment, null,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachmentLinks.js","sourceRoot":"","sources":["../../../src/components/shared/AttachmentLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC/B,OAAO,oBAAoB,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAEhE,MAAM,iBAAiB,GAAG,CAAC,IAAsB,EAA+C,EAAE;IAChG,MAAM,eAAe,GAAgD,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QACnF,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,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,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QAErB,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;YACrC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAA;YACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;SACnB;aAAM;YACL,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YAC3C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACrB;QAED,IAAI,GAAG,IAAI,CAAA;KACZ;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,YAAY,CAAC,CAAS,EAAE,CAAS;IACxC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAA;IAEvB,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;QACvB,OAAO,KAAK,CAAA;KACb;IACD,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAA;AAC1G,CAAC;AAED,eAAe,iBAAiB,CAAA"}
|
@@ -7,7 +7,7 @@ import { findChildElement, getNumericAttribute, mapChildElements } from '../../d
|
|
7
7
|
import { CommonExamContext } from '../context/CommonExamContext';
|
8
8
|
import ResponsiveMediaContainer from './internal/ResponsiveMediaContainer';
|
9
9
|
function ImageOverlay({ element, renderChildNodes }) {
|
10
|
-
const [opacities, setOpacities] = useState(() => _.times(element.children.length,
|
10
|
+
const [opacities, setOpacities] = useState(() => _.times(element.children.length, i => (i === 0 ? 1 : 0)));
|
11
11
|
const mkSetOpacity = (index) => (opacity) => {
|
12
12
|
const updatedOpacities = [...opacities];
|
13
13
|
updatedOpacities[index] = opacity;
|
@@ -24,7 +24,7 @@ function Slider({ opacity, setOpacity, element, renderChildNodes }) {
|
|
24
24
|
return (React.createElement("div", { className: "e-columns e-columns--center-v e-mrg-b-1" },
|
25
25
|
React.createElement("div", { className: "e-column e-text-right e-mrg-r-1" }, title && renderChildNodes(title)),
|
26
26
|
React.createElement(FontAwesomeIcon, { icon: faEyeSlash, className: "e-mrg-r-1 e-pointer", onClick: () => setOpacity(0) }),
|
27
|
-
React.createElement("input", { type: "range", min: 0, max: 1, step: 0.01, value: opacity, onChange:
|
27
|
+
React.createElement("input", { type: "range", min: 0, max: 1, step: 0.01, value: opacity, onChange: e => setOpacity(Number(e.target.value)) }),
|
28
28
|
React.createElement(FontAwesomeIcon, { icon: faEye, className: "e-mrg-l-1 e-pointer", onClick: () => setOpacity(1) })));
|
29
29
|
}
|
30
30
|
function ImageOverlayImage({ element, absolute, opacity }) {
|
@@ -33,7 +33,7 @@ function ImageOverlayImage({ element, absolute, opacity }) {
|
|
33
33
|
const height = getNumericAttribute(element, 'height');
|
34
34
|
const imgUrl = useContext(CommonExamContext).resolveAttachment(src);
|
35
35
|
return (React.createElement("div", { className: classNames('e-columns e-columns--center-h', { 'e-image-overlay__image-absolute': absolute }), style: {
|
36
|
-
opacity: opacity
|
36
|
+
opacity: opacity
|
37
37
|
} },
|
38
38
|
React.createElement(ResponsiveMediaContainer, { width,
|
39
39
|
height },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ImageOverlay.js","sourceRoot":"","sources":["../../../src/components/shared/ImageOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,UAAU,MAAM,YA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AM;YAGR,6BAAK,SAAS,EAAC,SAAS,EAAC,GAAG,EAAE,MAAM,GAAI,CACf,CACvB,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA"}
|
@@ -38,7 +38,7 @@ function Reference({ element, renderChildNodes }) {
|
|
38
38
|
renderWithPrefix('reference-date', 'references.reference-date', AsDate),
|
39
39
|
renderWithPrefix('translator', 'references.translator', RenderChildNodes),
|
40
40
|
renderWithPrefix('modified-by', 'references.modified-by', RenderChildNodes),
|
41
|
-
renderWith('note', RenderChildNodes)
|
41
|
+
renderWith('note', RenderChildNodes)
|
42
42
|
])));
|
43
43
|
}
|
44
44
|
function Italic({ element, renderChildNodes }) {
|
@@ -11,7 +11,7 @@ const renderChildNodes = createRenderChildNodes({});
|
|
11
11
|
function References(_props) {
|
12
12
|
const { root } = useContext(CommonExamContext);
|
13
13
|
const { t } = useExamTranslation();
|
14
|
-
const internalReferences = queryAll(root, 'reference').filter(
|
14
|
+
const internalReferences = queryAll(root, 'reference').filter(reference => queryAncestors(reference, 'external-material') == null);
|
15
15
|
return internalReferences.length > 0 ? (React.createElement(SectionElement, { "aria-labelledby": referencesTitleId },
|
16
16
|
React.createElement("h2", { id: referencesTitleId }, t('references.heading')),
|
17
17
|
React.createElement("ol", { className: "e-list-data" }, internalReferences.map((reference, i) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"References.js","sourceRoot":"","sources":["../../../src/components/shared/References.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAsB,MAAM,8BAA8B,CAAA;AACzF,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/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CAAA;IAClC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,MAAM,CAC3D,SAAS,CAAC,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,mBAAmB,CAAC,IAAI,IAAI,CACpE,CAAA;IAED,OAAO,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACrC,oBAAC,cAAc,uBAAkB,iBAAiB;QAChD,4BAAI,EAAE,EAAE,iBAAiB,IAAG,CAAC,CAAC,oBAAoB,CAAC,CAAM;QACzD,4BAAI,SAAS,EAAC,aAAa,IACxB,kBAAkB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,QAAQ,GAAG,cAAc,CAAC,SAAS,EAAE,UAAU,CAAE,CAAA;YACvD,MAAM,aAAa,GAAG,QAAQ,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAA;YAC9D,OAAO,CACL,gDAAsB,2BAA2B,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,GAAG,aAAa,GAAG,CAAC,EAAE;gBAC3F,oBAAC,SAAS,IAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,CAClE,CACN,CAAA;QACH,CAAC,CAAC,CACC,CACU,CAClB,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA"}
|
@@ -7,7 +7,7 @@ export const Score = ({ id, size = 'small', score }) => {
|
|
7
7
|
return (React.createElement(Tag, { className: classNames('e-score e-nowrap', {
|
8
8
|
'e-score--small e-font-size-m e-semibold': size === 'small',
|
9
9
|
'e-score--large e-font-size-l e-semibold': size === 'large',
|
10
|
-
'e-score--inline e-font-size-xs': size === 'inline'
|
10
|
+
'e-score--inline e-font-size-xs': size === 'inline'
|
11
11
|
}), id: id }, t('points', { count: score })));
|
12
12
|
};
|
13
13
|
//# sourceMappingURL=Score.js.map
|
@@ -21,7 +21,7 @@ export const mkTableOfContents = (options) => {
|
|
21
21
|
const { t } = useExamTranslation();
|
22
22
|
const hasSectionValidationErrors = () => {
|
23
23
|
var _a;
|
24
|
-
return (_a = useSelector((state) => state.answers)) === null || _a === void 0 ? void 0 : _a.validationErrors.find(
|
24
|
+
return (_a = useSelector((state) => state.answers)) === null || _a === void 0 ? void 0 : _a.validationErrors.find(i => i.displayNumber === displayNumber && (i === null || i === void 0 ? void 0 : i.elementType) === 'section');
|
25
25
|
};
|
26
26
|
return (React.createElement(React.Fragment, null,
|
27
27
|
element.hasChildNodes() && (React.createElement("div", { className: "toc-section-header-container" },
|
@@ -34,7 +34,7 @@ export const mkTableOfContents = (options) => {
|
|
34
34
|
isInSidebar && hasSectionValidationErrors() && React.createElement("div", { className: "error-mark" }, "!"),
|
35
35
|
React.createElement(AnsweringInstructions, { maxAnswers, minAnswers, childQuestions, elementType: 'toc-section' }))))));
|
36
36
|
};
|
37
|
-
const TOCSection = ({ element, answers, renderChildNodes
|
37
|
+
const TOCSection = ({ element, answers, renderChildNodes }) => {
|
38
38
|
const { displayNumber } = useContext(SectionContext);
|
39
39
|
const sectionTitle = findChildElement(element, 'section-title');
|
40
40
|
return (React.createElement("li", { "data-section-id": displayNumber },
|
@@ -57,20 +57,20 @@ export const mkTableOfContents = (options) => {
|
|
57
57
|
const answers = useSelector((state) => state.answers);
|
58
58
|
answersById = (answers === null || answers === void 0 ? void 0 : answers.answersById) || {};
|
59
59
|
const subquestionNodes = element.querySelectorAll('[question-id]');
|
60
|
-
const questionValidationErrors = (_a = answers.validationErrors) === null || _a === void 0 ? void 0 : _a.filter(
|
61
|
-
hasQuestionValidationError = !!(questionValidationErrors === null || questionValidationErrors === void 0 ? void 0 : questionValidationErrors.find(
|
62
|
-
subquestionNodes.forEach(
|
60
|
+
const questionValidationErrors = (_a = answers.validationErrors) === null || _a === void 0 ? void 0 : _a.filter(i => (i === null || i === void 0 ? void 0 : i.elementType) === 'question');
|
61
|
+
hasQuestionValidationError = !!(questionValidationErrors === null || questionValidationErrors === void 0 ? void 0 : questionValidationErrors.find(i => i.displayNumber === displayNumber));
|
62
|
+
subquestionNodes.forEach(e => {
|
63
63
|
const id = Number(e.getAttribute('question-id'));
|
64
64
|
const type = e.getAttribute('type') || '';
|
65
65
|
const subQuestionDisplayNumber = e.getAttribute('display-number') || '';
|
66
|
-
const error = !!(questionValidationErrors === null || questionValidationErrors === void 0 ? void 0 : questionValidationErrors.find(
|
66
|
+
const error = !!(questionValidationErrors === null || questionValidationErrors === void 0 ? void 0 : questionValidationErrors.find(i => i.displayNumber === subQuestionDisplayNumber));
|
67
67
|
if (id) {
|
68
68
|
subquestions.push({ id, type, error });
|
69
69
|
}
|
70
70
|
});
|
71
71
|
}
|
72
|
-
const subQuestionError = !!subquestions.find(
|
73
|
-
const subquestionsAnswered = subquestions === null || subquestions === void 0 ? void 0 : subquestions.filter(
|
72
|
+
const subQuestionError = !!subquestions.find(i => i.error);
|
73
|
+
const subquestionsAnswered = subquestions === null || subquestions === void 0 ? void 0 : subquestions.filter(i => { var _a; return (_a = answersById[i.id]) === null || _a === void 0 ? void 0 : _a.value; }).length;
|
74
74
|
const maxAnswers = Number(element.getAttribute('max-answers'));
|
75
75
|
const requiredAnswers = maxAnswers || subquestions.length;
|
76
76
|
return (React.createElement("li", { "data-list-number": `${displayNumber}.`, onClick: () => (isInSidebar ? (window.location.href = `#${displayNumber}`) : undefined), className: `level-${level} ${hasQuestionValidationError ? 'error' : ''}` },
|
@@ -80,42 +80,40 @@ export const mkTableOfContents = (options) => {
|
|
80
80
|
questionTitle && React.createElement("span", { className: "question-title" }, renderChildNodes(questionTitle)))),
|
81
81
|
React.createElement("div", { className: classNames('numeric-answer-indicator', {
|
82
82
|
error: subQuestionError,
|
83
|
-
ok: subquestionsAnswered === requiredAnswers
|
83
|
+
ok: subquestionsAnswered === requiredAnswers
|
84
84
|
}) },
|
85
85
|
subquestionsAnswered,
|
86
86
|
"/",
|
87
87
|
requiredAnswers),
|
88
88
|
!isInSidebar && externalMaterial && (React.createElement("span", { className: "e-column e-column--narrow e-external-material" },
|
89
89
|
React.createElement("a", { href: url(attachmentsURL, {
|
90
|
-
hash: getAttribute(queryAncestors(externalMaterial, 'question'), 'display-number')
|
90
|
+
hash: getAttribute(queryAncestors(externalMaterial, 'question'), 'display-number')
|
91
91
|
}), target: "attachments" }, t('material')))),
|
92
92
|
React.createElement("span", { className: "e-column e-column--narrow table-of-contents--score-column" }, t('points', { count: maxScore })),
|
93
93
|
isInSidebar && (React.createElement("span", { className: "e-column e-column--narrow e-external-material" }, externalMaterial && (React.createElement("a", { href: url(attachmentsURL, {
|
94
|
-
hash: getAttribute(queryAncestors(externalMaterial, 'question'), 'display-number')
|
94
|
+
hash: getAttribute(queryAncestors(externalMaterial, 'question'), 'display-number')
|
95
95
|
}), target: "attachments" },
|
96
96
|
React.createElement(FontAwesomeIcon, { size: "sm", icon: faPaperclip, fixedWidth: true }))))),
|
97
97
|
React.createElement("div", { className: "answers" },
|
98
|
-
subquestions.map(
|
98
|
+
subquestions.map(i => (React.createElement(Indicator, { key: i.id, type: i.type, id: i.id, answer: answersById[i.id], error: i.error }))),
|
99
99
|
' ')));
|
100
100
|
};
|
101
101
|
const renderChildNodes = createRenderChildNodes({
|
102
102
|
section: withSectionContext(TOCSection),
|
103
|
-
question: withQuestionContext(TOCQuestion)
|
103
|
+
question: withQuestionContext(TOCQuestion)
|
104
104
|
});
|
105
105
|
const TableOfContents = () => {
|
106
106
|
const { root, maxScore } = useContext(CommonExamContext);
|
107
107
|
const { t } = useExamTranslation();
|
108
108
|
const maxAnswers = getNumericAttribute(root, 'max-answers');
|
109
|
-
const hasExamValidationErrors = () => !!useSelector((state) => { var _a; return (_a = state.answers.validationErrors) === null || _a === void 0 ? void 0 : _a.find(
|
109
|
+
const hasExamValidationErrors = () => !!useSelector((state) => { var _a; return (_a = state.answers.validationErrors) === null || _a === void 0 ? void 0 : _a.find(i => (i === null || i === void 0 ? void 0 : i.elementType) === 'exam'); });
|
110
110
|
return (React.createElement("nav", { className: "table-of-contents", "aria-labelledby": tocTitleId },
|
111
111
|
React.createElement("h2", { id: tocTitleId },
|
112
112
|
React.createElement("span", { className: "e-toc-heading" }, t('toc-heading'))),
|
113
113
|
maxAnswers && (React.createElement("div", { style: { display: 'grid' } },
|
114
114
|
React.createElement("div", { className: classNames('answer-instructions', { error: isInSidebar && hasExamValidationErrors() }) },
|
115
115
|
isInSidebar && hasExamValidationErrors() && React.createElement("div", { className: "error-mark exam" }, "!"),
|
116
|
-
|
117
|
-
maxAnswers,
|
118
|
-
" teht\u00E4v\u00E4\u00E4n"))),
|
116
|
+
t('max-answers-warning', { count: maxAnswers })))),
|
119
117
|
React.createElement("ol", { className: "e-list-plain e-pad-l-0" }, renderChildNodes(root)),
|
120
118
|
React.createElement("div", { className: "e-columns" },
|
121
119
|
React.createElement("strong", { className: "e-column e-total" }, t('exam-total')),
|