@digabi/exam-engine-core 20.0.1 → 20.0.2-images-loading.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/grading/GradingAnswer.d.ts.map +1 -1
- package/dist/components/grading/GradingAnswer.js +25 -1
- package/dist/components/grading/GradingAnswer.js.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/package.json +2 -2
- package/dist/components/AttachmentContext.d.ts +0 -14
- package/dist/components/AttachmentContext.d.ts.map +0 -1
- package/dist/components/AttachmentContext.js +0 -12
- package/dist/components/AttachmentContext.js.map +0 -1
- package/dist/components/AttachmentLink.d.ts +0 -6
- package/dist/components/AttachmentLink.d.ts.map +0 -1
- package/dist/components/AttachmentLink.js +0 -24
- package/dist/components/AttachmentLink.js.map +0 -1
- package/dist/components/AttachmentLinkAnchor.d.ts +0 -7
- package/dist/components/AttachmentLinkAnchor.d.ts.map +0 -1
- package/dist/components/AttachmentLinkAnchor.js +0 -4
- package/dist/components/AttachmentLinkAnchor.js.map +0 -1
- package/dist/components/AttachmentLinks.d.ts +0 -6
- package/dist/components/AttachmentLinks.d.ts.map +0 -1
- package/dist/components/AttachmentLinks.js +0 -58
- package/dist/components/AttachmentLinks.js.map +0 -1
- package/dist/components/Attachments.d.ts +0 -5
- package/dist/components/Attachments.d.ts.map +0 -1
- package/dist/components/Attachments.js +0 -43
- package/dist/components/Attachments.js.map +0 -1
- package/dist/components/AttachmentsAttachment.d.ts +0 -5
- package/dist/components/AttachmentsAttachment.d.ts.map +0 -1
- package/dist/components/AttachmentsAttachment.js +0 -8
- package/dist/components/AttachmentsAttachment.js.map +0 -1
- package/dist/components/AttachmentsAttachmentTitle.d.ts +0 -6
- package/dist/components/AttachmentsAttachmentTitle.d.ts.map +0 -1
- package/dist/components/AttachmentsAttachmentTitle.js +0 -12
- package/dist/components/AttachmentsAttachmentTitle.js.map +0 -1
- package/dist/components/AttachmentsExternalMaterial.d.ts +0 -9
- package/dist/components/AttachmentsExternalMaterial.d.ts.map +0 -1
- package/dist/components/AttachmentsExternalMaterial.js +0 -40
- package/dist/components/AttachmentsExternalMaterial.js.map +0 -1
- package/dist/components/AttachmentsQuestion.d.ts +0 -5
- package/dist/components/AttachmentsQuestion.d.ts.map +0 -1
- package/dist/components/AttachmentsQuestion.js +0 -16
- package/dist/components/AttachmentsQuestion.js.map +0 -1
- package/dist/components/AttachmentsQuestionTitle.d.ts +0 -6
- package/dist/components/AttachmentsQuestionTitle.d.ts.map +0 -1
- package/dist/components/AttachmentsQuestionTitle.js +0 -13
- package/dist/components/AttachmentsQuestionTitle.js.map +0 -1
- package/dist/components/Audio.d.ts +0 -6
- package/dist/components/Audio.d.ts.map +0 -1
- package/dist/components/Audio.js +0 -29
- package/dist/components/Audio.js.map +0 -1
- package/dist/components/AudioGroup.d.ts +0 -6
- package/dist/components/AudioGroup.d.ts.map +0 -1
- package/dist/components/AudioGroup.js +0 -9
- package/dist/components/AudioGroup.js.map +0 -1
- package/dist/components/AudioPlaybackError.d.ts +0 -7
- package/dist/components/AudioPlaybackError.d.ts.map +0 -1
- package/dist/components/AudioPlaybackError.js +0 -12
- package/dist/components/AudioPlaybackError.js.map +0 -1
- package/dist/components/AudioTest.d.ts +0 -6
- package/dist/components/AudioTest.d.ts.map +0 -1
- package/dist/components/AudioTest.js +0 -29
- package/dist/components/AudioTest.js.map +0 -1
- package/dist/components/ChoiceAnswer.d.ts +0 -12
- package/dist/components/ChoiceAnswer.d.ts.map +0 -1
- package/dist/components/ChoiceAnswer.js +0 -60
- package/dist/components/ChoiceAnswer.js.map +0 -1
- package/dist/components/CommonExamContext.d.ts +0 -16
- package/dist/components/CommonExamContext.d.ts.map +0 -1
- package/dist/components/CommonExamContext.js +0 -22
- package/dist/components/CommonExamContext.js.map +0 -1
- package/dist/components/DropdownAnswer.d.ts +0 -12
- package/dist/components/DropdownAnswer.d.ts.map +0 -1
- package/dist/components/DropdownAnswer.js +0 -85
- package/dist/components/DropdownAnswer.js.map +0 -1
- package/dist/components/Exam.d.ts +0 -40
- package/dist/components/Exam.d.ts.map +0 -1
- package/dist/components/Exam.js +0 -106
- package/dist/components/Exam.js.map +0 -1
- package/dist/components/ExamAttachment.d.ts +0 -5
- package/dist/components/ExamAttachment.d.ts.map +0 -1
- package/dist/components/ExamAttachment.js +0 -8
- package/dist/components/ExamAttachment.js.map +0 -1
- package/dist/components/ExamContext.d.ts +0 -10
- package/dist/components/ExamContext.d.ts.map +0 -1
- package/dist/components/ExamContext.js +0 -11
- package/dist/components/ExamContext.js.map +0 -1
- package/dist/components/ExamFooter.d.ts +0 -6
- package/dist/components/ExamFooter.d.ts.map +0 -1
- package/dist/components/ExamFooter.js +0 -7
- package/dist/components/ExamFooter.js.map +0 -1
- package/dist/components/ExamInstruction.d.ts +0 -6
- package/dist/components/ExamInstruction.d.ts.map +0 -1
- package/dist/components/ExamInstruction.js +0 -6
- package/dist/components/ExamInstruction.js.map +0 -1
- package/dist/components/ExamQuestion.d.ts +0 -5
- package/dist/components/ExamQuestion.d.ts.map +0 -1
- package/dist/components/ExamQuestion.js +0 -16
- package/dist/components/ExamQuestion.js.map +0 -1
- package/dist/components/ExamQuestionInstruction.d.ts +0 -6
- package/dist/components/ExamQuestionInstruction.d.ts.map +0 -1
- package/dist/components/ExamQuestionInstruction.js +0 -6
- package/dist/components/ExamQuestionInstruction.js.map +0 -1
- package/dist/components/ExamQuestionTitle.d.ts +0 -6
- package/dist/components/ExamQuestionTitle.d.ts.map +0 -1
- package/dist/components/ExamQuestionTitle.js +0 -25
- package/dist/components/ExamQuestionTitle.js.map +0 -1
- package/dist/components/ExamSection.d.ts +0 -5
- package/dist/components/ExamSection.d.ts.map +0 -1
- package/dist/components/ExamSection.js +0 -30
- package/dist/components/ExamSection.js.map +0 -1
- package/dist/components/ExamSectionTitle.d.ts +0 -6
- package/dist/components/ExamSectionTitle.d.ts.map +0 -1
- package/dist/components/ExamSectionTitle.js +0 -21
- package/dist/components/ExamSectionTitle.js.map +0 -1
- package/dist/components/ExternalMaterialList.d.ts +0 -10
- package/dist/components/ExternalMaterialList.d.ts.map +0 -1
- package/dist/components/ExternalMaterialList.js +0 -31
- package/dist/components/ExternalMaterialList.js.map +0 -1
- package/dist/components/File.d.ts +0 -6
- package/dist/components/File.d.ts.map +0 -1
- package/dist/components/File.js +0 -15
- package/dist/components/File.js.map +0 -1
- package/dist/components/Formula.d.ts +0 -6
- package/dist/components/Formula.d.ts.map +0 -1
- package/dist/components/Formula.js +0 -12
- package/dist/components/Formula.js.map +0 -1
- package/dist/components/Hints.d.ts +0 -6
- package/dist/components/Hints.d.ts.map +0 -1
- package/dist/components/Hints.js +0 -32
- package/dist/components/Hints.js.map +0 -1
- package/dist/components/Image.d.ts +0 -6
- package/dist/components/Image.d.ts.map +0 -1
- package/dist/components/Image.js +0 -25
- package/dist/components/Image.js.map +0 -1
- package/dist/components/ImageOverlay.d.ts +0 -6
- package/dist/components/ImageOverlay.d.ts.map +0 -1
- package/dist/components/ImageOverlay.js +0 -45
- package/dist/components/ImageOverlay.js.map +0 -1
- package/dist/components/ProgressBar.d.ts +0 -6
- package/dist/components/ProgressBar.d.ts.map +0 -1
- package/dist/components/ProgressBar.js +0 -18
- package/dist/components/ProgressBar.js.map +0 -1
- package/dist/components/QuestionContext.d.ts +0 -14
- package/dist/components/QuestionContext.d.ts.map +0 -1
- package/dist/components/QuestionContext.js +0 -20
- package/dist/components/QuestionContext.js.map +0 -1
- package/dist/components/Reference.d.ts +0 -6
- package/dist/components/Reference.d.ts.map +0 -1
- package/dist/components/Reference.js +0 -63
- package/dist/components/Reference.js.map +0 -1
- package/dist/components/References.d.ts +0 -6
- package/dist/components/References.d.ts.map +0 -1
- package/dist/components/References.js +0 -23
- package/dist/components/References.js.map +0 -1
- package/dist/components/ResponsiveMediaContainer.d.ts +0 -17
- package/dist/components/ResponsiveMediaContainer.d.ts.map +0 -1
- package/dist/components/ResponsiveMediaContainer.js +0 -20
- package/dist/components/ResponsiveMediaContainer.js.map +0 -1
- package/dist/components/RestrictedAudioPlayer.d.ts +0 -11
- package/dist/components/RestrictedAudioPlayer.d.ts.map +0 -1
- package/dist/components/RestrictedAudioPlayer.js +0 -29
- package/dist/components/RestrictedAudioPlayer.js.map +0 -1
- package/dist/components/RichTextAnswer.d.ts +0 -31
- package/dist/components/RichTextAnswer.d.ts.map +0 -1
- package/dist/components/RichTextAnswer.js +0 -70
- package/dist/components/RichTextAnswer.js.map +0 -1
- package/dist/components/SaveIndicator.d.ts +0 -5
- package/dist/components/SaveIndicator.d.ts.map +0 -1
- package/dist/components/SaveIndicator.js +0 -15
- package/dist/components/SaveIndicator.js.map +0 -1
- package/dist/components/Score.d.ts +0 -6
- package/dist/components/Score.d.ts.map +0 -1
- package/dist/components/Score.js +0 -13
- package/dist/components/Score.js.map +0 -1
- package/dist/components/Section.d.ts +0 -3
- package/dist/components/Section.d.ts.map +0 -1
- package/dist/components/Section.js +0 -7
- package/dist/components/Section.js.map +0 -1
- package/dist/components/SectionContext.d.ts +0 -13
- package/dist/components/SectionContext.d.ts.map +0 -1
- package/dist/components/SectionContext.js +0 -21
- package/dist/components/SectionContext.js.map +0 -1
- package/dist/components/SectionInstruction.d.ts +0 -6
- package/dist/components/SectionInstruction.d.ts.map +0 -1
- package/dist/components/SectionInstruction.js +0 -6
- package/dist/components/SectionInstruction.js.map +0 -1
- package/dist/components/TableOfContents.d.ts +0 -13
- package/dist/components/TableOfContents.d.ts.map +0 -1
- package/dist/components/TableOfContents.js +0 -66
- package/dist/components/TableOfContents.js.map +0 -1
- package/dist/components/TextAnswer.d.ts +0 -6
- package/dist/components/TextAnswer.d.ts.map +0 -1
- package/dist/components/TextAnswer.js +0 -16
- package/dist/components/TextAnswer.js.map +0 -1
- package/dist/components/TextAnswerInput.d.ts +0 -37
- package/dist/components/TextAnswerInput.d.ts.map +0 -1
- package/dist/components/TextAnswerInput.js +0 -145
- package/dist/components/TextAnswerInput.js.map +0 -1
- package/dist/components/Video.d.ts +0 -6
- package/dist/components/Video.d.ts.map +0 -1
- package/dist/components/Video.js +0 -15
- package/dist/components/Video.js.map +0 -1
- package/dist/components/results/AnnotationList.d.ts +0 -5
- package/dist/components/results/AnnotationList.d.ts.map +0 -1
- package/dist/components/results/AnnotationList.js +0 -40
- package/dist/components/results/AnnotationList.js.map +0 -1
- package/dist/components/results/ResultsChoiceAnswer.d.ts +0 -6
- package/dist/components/results/ResultsChoiceAnswer.d.ts.map +0 -1
- package/dist/components/results/ResultsChoiceAnswer.js +0 -60
- package/dist/components/results/ResultsChoiceAnswer.js.map +0 -1
- package/dist/components/results/ResultsContext.d.ts +0 -20
- package/dist/components/results/ResultsContext.d.ts.map +0 -1
- package/dist/components/results/ResultsContext.js +0 -68
- package/dist/components/results/ResultsContext.js.map +0 -1
- package/dist/components/results/ResultsDropdownAnswer.d.ts +0 -6
- package/dist/components/results/ResultsDropdownAnswer.d.ts.map +0 -1
- package/dist/components/results/ResultsDropdownAnswer.js +0 -41
- package/dist/components/results/ResultsDropdownAnswer.js.map +0 -1
- package/dist/components/results/ResultsExamQuestion.d.ts +0 -5
- package/dist/components/results/ResultsExamQuestion.d.ts.map +0 -1
- package/dist/components/results/ResultsExamQuestion.js +0 -23
- package/dist/components/results/ResultsExamQuestion.js.map +0 -1
- package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +0 -10
- package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +0 -1
- package/dist/components/results/ResultsExamQuestionAutoScore.js +0 -16
- package/dist/components/results/ResultsExamQuestionAutoScore.js.map +0 -1
- package/dist/components/results/ResultsExamQuestionManualScore.d.ts +0 -11
- package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +0 -1
- package/dist/components/results/ResultsExamQuestionManualScore.js +0 -62
- package/dist/components/results/ResultsExamQuestionManualScore.js.map +0 -1
- package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +0 -9
- package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +0 -1
- package/dist/components/results/ResultsExamQuestionScoresContainer.js +0 -8
- package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +0 -1
- package/dist/components/results/ResultsExamQuestionTitle.d.ts +0 -6
- package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +0 -1
- package/dist/components/results/ResultsExamQuestionTitle.js +0 -22
- package/dist/components/results/ResultsExamQuestionTitle.js.map +0 -1
- package/dist/components/results/ResultsExamSection.d.ts +0 -5
- package/dist/components/results/ResultsExamSection.d.ts.map +0 -1
- package/dist/components/results/ResultsExamSection.js +0 -17
- package/dist/components/results/ResultsExamSection.js.map +0 -1
- package/dist/components/results/ResultsScoredTextAnswer.d.ts +0 -6
- package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +0 -1
- package/dist/components/results/ResultsScoredTextAnswer.js +0 -22
- package/dist/components/results/ResultsScoredTextAnswer.js.map +0 -1
- package/dist/components/results/ResultsSingleLineAnswer.d.ts +0 -12
- package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +0 -1
- package/dist/components/results/ResultsSingleLineAnswer.js +0 -12
- package/dist/components/results/ResultsSingleLineAnswer.js.map +0 -1
- package/dist/components/results/ResultsTextAnswer.d.ts +0 -6
- package/dist/components/results/ResultsTextAnswer.d.ts.map +0 -1
- package/dist/components/results/ResultsTextAnswer.js +0 -51
- package/dist/components/results/ResultsTextAnswer.js.map +0 -1
- package/dist/components/results/helpers.d.ts +0 -9
- package/dist/components/results/helpers.d.ts.map +0 -1
- package/dist/components/results/helpers.js +0 -10
- package/dist/components/results/helpers.js.map +0 -1
- package/dist/components/types.d.ts +0 -110
- package/dist/components/types.d.ts.map +0 -1
- package/dist/components/types.js +0 -1
- package/dist/components/types.js.map +0 -1
- package/dist/components/withContext.d.ts +0 -3
- package/dist/components/withContext.d.ts.map +0 -1
- package/dist/components/withContext.js +0 -12
- package/dist/components/withContext.js.map +0 -1
@@ -1,25 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React, { useContext } from 'react';
|
3
|
-
import AnsweringInstructions from './AnsweringInstructions';
|
4
|
-
import NotificationIcon from './NotificationIcon';
|
5
|
-
import { QuestionContext } from './QuestionContext';
|
6
|
-
import { Score } from './Score';
|
7
|
-
function ExamQuestionTitle({ element, renderChildNodes }) {
|
8
|
-
const { displayNumber, maxScore, level, maxAnswers, childQuestions } = useContext(QuestionContext);
|
9
|
-
const Tag = ('h' + Math.min(3 + level, 6));
|
10
|
-
return (React.createElement(React.Fragment, null,
|
11
|
-
React.createElement(Tag, { className: classNames('exam-question-title', { 'e-normal e-font-size-m': level > 0 }) },
|
12
|
-
React.createElement("strong", { className: classNames('exam-question-title__display-number', {
|
13
|
-
'exam-question-title__display-number--indented': level > 0,
|
14
|
-
}) },
|
15
|
-
displayNumber,
|
16
|
-
'. '),
|
17
|
-
renderChildNodes(element),
|
18
|
-
" ",
|
19
|
-
React.createElement(Score, { score: maxScore, size: level === 0 ? 'large' : 'small' })),
|
20
|
-
maxAnswers != null && childQuestions.length > 0 && (React.createElement("p", { className: "e-italic" },
|
21
|
-
React.createElement(NotificationIcon, null),
|
22
|
-
React.createElement(AnsweringInstructions, { maxAnswers: maxAnswers, childQuestions: childQuestions, type: "question" })))));
|
23
|
-
}
|
24
|
-
export default React.memo(ExamQuestionTitle);
|
25
|
-
//# sourceMappingURL=ExamQuestionTitle.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ExamQuestionTitle.js","sourceRoot":"","sources":["../../src/components/ExamQuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG/B,SAAS,iBAAiB,CAAC,EAAE,OAAO,EAAE,g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1,30 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import { useTranslation } from 'react-i18next';
|
3
|
-
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
4
|
-
import { allowCas, allowCasCancelled } from '../store/cas/actions';
|
5
|
-
import { ExamContext } from './ExamContext';
|
6
|
-
import ProgressBar from './ProgressBar';
|
7
|
-
import Section from './Section';
|
8
|
-
import { SectionContext, withSectionContext } from './SectionContext';
|
9
|
-
function ExamSection({ element, renderChildNodes }) {
|
10
|
-
const casState = useSelector((state) => state.cas, shallowEqual);
|
11
|
-
const { casForbidden, displayNumber } = useContext(SectionContext);
|
12
|
-
return (React.createElement(Section, { className: "exam-section", "aria-labelledby": displayNumber + '-title' },
|
13
|
-
renderChildNodes(element),
|
14
|
-
casForbidden && React.createElement(CasControls, Object.assign({}, casState))));
|
15
|
-
}
|
16
|
-
function CasControls(props) {
|
17
|
-
const dispatch = useDispatch();
|
18
|
-
const { t } = useTranslation();
|
19
|
-
const { casCountdownDuration } = useContext(ExamContext);
|
20
|
-
return (React.createElement("div", { className: "e-cas-controls" }, props.casStatus === 'forbidden' ? (React.createElement("div", { className: "e-text-center" },
|
21
|
-
React.createElement("hr", { className: "e-exam-separator" }),
|
22
|
-
React.createElement("p", null, t('cas.forbidden.infoText')),
|
23
|
-
React.createElement("button", { className: "e-button", id: "allow-cas", onClick: () => dispatch(allowCas(casCountdownDuration)) }, t('cas.forbidden.buttonText')))) : props.casStatus === 'allowing' ? (React.createElement("div", { className: "e-text-center", ref: (e) => e != null && casCountdownDuration === props.durationRemaining && e.scrollIntoView() },
|
24
|
-
React.createElement("hr", { className: "e-exam-separator" }),
|
25
|
-
React.createElement("p", null, t('cas.allowing.infoText')),
|
26
|
-
React.createElement(ProgressBar, { className: "e-mrg-b-2", duration: casCountdownDuration }),
|
27
|
-
React.createElement("button", { className: "e-button", id: "allow-cas-cancelled", onClick: () => dispatch(allowCasCancelled()) }, t('cas.allowing.buttonText', { count: props.durationRemaining })))) : (React.createElement("div", { className: "notification e-text-left e-mrg-b-0" }, t('cas.allowed.infoText')))));
|
28
|
-
}
|
29
|
-
export default React.memo(withSectionContext(ExamSection));
|
30
|
-
//# sourceMappingURL=ExamSection.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ExamSection.js","sourceRoot":"","sources":["../../src/components/ExamSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAGrE,SAAS,WAAW,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACpE,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,KAAe,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,YAAY,CAAC,CAAA;IAC1E,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAElE,OAAO,CACL,oBAAC,OAAO,IAAC,SAAS,EAAC,cAAc,qBAAkB,aAAa,GAAG,QAAQ;QACxE,gBAAgB,CAAC,OAAO,CAAC;QACzB,YAAY,IAAI,oBAAC,WAAW,oBAAK,QAAQ,EAAI,CACtC,CACX,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAe;IAClC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,EAAE,CAAC,EAAE,GA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A;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function ExamSectionTitle({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof ExamSectionTitle>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=ExamSectionTitle.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ExamSectionTitle.d.ts","sourceRoot":"","sources":["../../src/components/ExamSectionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,gBAAgB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAyB1E;;AAED,wBAA2C"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import { useTranslation } from 'react-i18next';
|
3
|
-
import AnsweringInstructions from './AnsweringInstructions';
|
4
|
-
import { CommonExamContext } from './CommonExamContext';
|
5
|
-
import NotificationIcon from './NotificationIcon';
|
6
|
-
import { SectionContext } from './SectionContext';
|
7
|
-
function ExamSectionTitle({ element, renderChildNodes }) {
|
8
|
-
const { numberOfSections } = useContext(CommonExamContext);
|
9
|
-
const { displayNumber, minAnswers, maxAnswers, childQuestions } = useContext(SectionContext);
|
10
|
-
const { t } = useTranslation();
|
11
|
-
return (React.createElement(React.Fragment, null,
|
12
|
-
element.hasChildNodes() && (React.createElement("h2", { className: "exam-section-title", id: displayNumber + '-title' },
|
13
|
-
numberOfSections > 1 && t('part', { displayNumber }),
|
14
|
-
" ",
|
15
|
-
renderChildNodes(element))),
|
16
|
-
maxAnswers != null && (React.createElement("span", { className: "notification notification--inline" },
|
17
|
-
React.createElement(NotificationIcon, null),
|
18
|
-
React.createElement(AnsweringInstructions, { maxAnswers: maxAnswers, minAnswers: minAnswers, childQuestions: childQuestions, type: "section" })))));
|
19
|
-
}
|
20
|
-
export default React.memo(ExamSectionTitle);
|
21
|
-
//# sourceMappingURL=ExamSectionTitle.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ExamSectionTitle.js","sourceRoot":"","sources":["../../src/components/ExamSectionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD,SAAS,gBAAgB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACzE,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC1D,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAC5F,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAE9B,OAAO,CACL;QACG,OAAO,CAAC,aAAa,EAAE,IAAI,CAC1B,4BAAI,SAAS,EAAC,oBAAoB,EAAC,EAAE,EAAE,aAAa,GAAG,QAAQ;YAC5D,gBAAgB,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,CAAC;;YAAG,gBAAgB,CAAC,OAAO,CAAC,CAC9E,CACN;QACA,UAAU,IAAI,IAAI,IAAI,CACrB,8BAAM,SAAS,EAAC,mCAAmC;YACjD,oBAAC,gBAAgB,OAAG;YACpB,oBAAC,qBAAqB,IACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAC,SAAS,GACd,CACG,CACR,CACA,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
interface ExternalMaterialListProps extends ExamComponentProps {
|
4
|
-
forceRender?: boolean;
|
5
|
-
showTitle?: boolean;
|
6
|
-
}
|
7
|
-
declare function ExternalMaterialList({ element, showTitle, forceRender }: ExternalMaterialListProps): JSX.Element | null;
|
8
|
-
declare const _default: React.MemoExoticComponent<typeof ExternalMaterialList>;
|
9
|
-
export default _default;
|
10
|
-
//# sourceMappingURL=ExternalMaterialList.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ExternalMaterialList.d.ts","sourceRoot":"","sources":["../../src/components/ExternalMaterialList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAA0B,kBAAkB,EAAiB,MAAM,2BAA2B,CAAA;AAgCrG,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,iBAAS,oBAAoB,CAAC,EAAE,OAAO,EAAE,SAAgB,EAAE,WAAmB,EAAE,EAAE,yBAAyB,sBAa1G;;AAED,wBAA+C"}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import { useTranslation } from 'react-i18next';
|
3
|
-
import { createRenderChildNodes, RenderOptions } from '../createRenderChildNodes';
|
4
|
-
import { queryAncestors } from '../dom-utils';
|
5
|
-
import { url } from '../url';
|
6
|
-
import { AttachmentContext, withAttachmentContext } from './AttachmentContext';
|
7
|
-
import { CommonExamContext } from './CommonExamContext';
|
8
|
-
const renderChildNodes = createRenderChildNodes({
|
9
|
-
attachment: withAttachmentContext(Attachment),
|
10
|
-
'attachment-title': AttachmentTitle,
|
11
|
-
});
|
12
|
-
function Attachment({ element }) {
|
13
|
-
const { displayNumber } = useContext(AttachmentContext);
|
14
|
-
return (React.createElement("li", { "data-list-number": displayNumber, "aria-label": displayNumber.replace(' ', '') }, renderChildNodes(element, RenderOptions.SkipHTML)));
|
15
|
-
}
|
16
|
-
function AttachmentTitle({ element }) {
|
17
|
-
const { attachmentsURL } = useContext(CommonExamContext);
|
18
|
-
const { displayNumber } = useContext(AttachmentContext);
|
19
|
-
return (React.createElement("a", { href: url(attachmentsURL, { hash: displayNumber }), className: "exam-attachment-title", target: "attachments" }, renderChildNodes(element)));
|
20
|
-
}
|
21
|
-
function ExternalMaterialList({ element, showTitle = true, forceRender = false }) {
|
22
|
-
if (queryAncestors(element, 'question') == null && !forceRender) {
|
23
|
-
return null;
|
24
|
-
}
|
25
|
-
const { t } = useTranslation();
|
26
|
-
return (React.createElement("div", { className: "external-material-list e-mrg-b-4" },
|
27
|
-
showTitle && React.createElement("div", { className: "e-font-size-l e-semibold" }, t('external-material-title')),
|
28
|
-
React.createElement("ol", { className: "e-list-data e-pad-l-0 e-mrg-0" }, renderChildNodes(element))));
|
29
|
-
}
|
30
|
-
export default React.memo(ExternalMaterialList);
|
31
|
-
//# sourceMappingURL=ExternalMaterialList.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ExternalMaterialList.js","sourceRoot":"","sources":["../../src/components/ExternalMaterialList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAsB,aAAa,EAAE,MAAM,2BAA2B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AI,CAAA;KACZ;IAED,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAE9B,OAAO,CACL,6BAAK,SAAS,EAAC,kCAAkC;QAC9C,SAAS,IAAI,6BAAK,SAAS,EAAC,0BAA0B,IAAE,CAAC,CAAC,yBAAyB,CAAC,CAAO;QAC5F,4BAAI,SAAS,EAAC,+BAA+B,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAM,CAC1E,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function File({ element, className, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof File>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=File.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/components/File.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAgBzE;;AAED,wBAA+B"}
|
package/dist/components/File.js
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React, { useContext } from 'react';
|
3
|
-
import { CommonExamContext } from './CommonExamContext';
|
4
|
-
function File({ element, className, renderChildNodes }) {
|
5
|
-
const src = element.getAttribute('src');
|
6
|
-
const hasDescription = element.hasChildNodes();
|
7
|
-
const { resolveAttachment } = useContext(CommonExamContext);
|
8
|
-
return (React.createElement("a", { className: classNames('file e-nowrap', className), href: resolveAttachment(src), download: true }, hasDescription ? (React.createElement(React.Fragment, null,
|
9
|
-
renderChildNodes(element),
|
10
|
-
" (",
|
11
|
-
src,
|
12
|
-
")")) : (src)));
|
13
|
-
}
|
14
|
-
export default React.memo(File);
|
15
|
-
//# sourceMappingURL=File.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../src/components/File.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,SAAS,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAsB;IACxE,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACxC,MAAM,cAAc,GAAG,OAAO,CAAC,aAAa,EAAE,CAAA;IAC9C,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAE3D,OAAO,CACL,2BAAG,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,QAAQ,UACzF,cAAc,CAAC,CAAC,CAAC,CAChB;QACG,gBAAgB,CAAC,OAAO,CAAC;;QAAI,GAAG;YAChC,CACJ,CAAC,CAAC,CAAC,CACF,GAAG,CACJ,CACC,CACL,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function Formula({ element, className }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof Formula>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=Formula.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Formula.d.ts","sourceRoot":"","sources":["../../src/components/Formula.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,kBAAkB,eAQ1D;;AAED,wBAAkC"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React from 'react';
|
3
|
-
function Formula({ element, className }) {
|
4
|
-
const svg = element.getAttribute('svg');
|
5
|
-
const mml = element.getAttribute('mml');
|
6
|
-
const mode = element.getAttribute('mode') || 'inline';
|
7
|
-
const Tag = mode === 'inline' ? 'span' : 'div';
|
8
|
-
const html = svg + '<span class="e-screen-reader-only" role="presentation">' + mml + '</span>';
|
9
|
-
return React.createElement(Tag, { className: classNames('e-formula', className), dangerouslySetInnerHTML: { __html: html } });
|
10
|
-
}
|
11
|
-
export default React.memo(Formula);
|
12
|
-
//# sourceMappingURL=Formula.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Formula.js","sourceRoot":"","sources":["../../src/components/Formula.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,SAAS,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,EAAsB;IACzD,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACxC,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACxC,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAA;IACrD,MAAM,GAAG,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;IAE9C,MAAM,IAAI,GAAG,GAAG,GAAG,yDAAyD,GAAG,GAAG,GAAG,SAAS,CAAA;IAC9F,OAAO,oBAAC,GAAG,IAAC,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAI,CAAA;AAC1G,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
export default function mkHints({ stateful }: {
|
4
|
-
stateful: boolean;
|
5
|
-
}): React.MemoExoticComponent<({ element, renderChildNodes }: ExamComponentProps) => JSX.Element>;
|
6
|
-
//# sourceMappingURL=Hints.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Hints.d.ts","sourceRoot":"","sources":["../../src/components/Hints.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAoB,MAAM,2BAA2B,CAAA;AAMhF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,iGAuBlE"}
|
package/dist/components/Hints.js
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React from 'react';
|
3
|
-
import { useSelector } from 'react-redux';
|
4
|
-
import { findChildElement, getNumericAttribute, NBSP, queryAll } from '../dom-utils';
|
5
|
-
import { shortDisplayNumber } from '../shortDisplayNumber';
|
6
|
-
export default function mkHints({ stateful }) {
|
7
|
-
function Hints({ element, renderChildNodes }) {
|
8
|
-
const focusedQuestionId = stateful ? useSelector((state) => state.answers.focusedQuestionId) : null;
|
9
|
-
const answersWithHints = queryAll(element, ['text-answer', 'scored-text-answer']).filter((answer) => findChildElement(answer, 'hint') != null);
|
10
|
-
return (React.createElement("div", { className: "e-columns" },
|
11
|
-
React.createElement("div", { className: "e-column e-column--8" }, renderChildNodes(element)),
|
12
|
-
React.createElement("div", { className: "e-hints e-column e-column--4", "aria-hidden": "true" }, answersWithHints.map((answer, i) => (React.createElement(Hint, Object.assign({}, { answer, focusedQuestionId, renderChildNodes }, { key: i })))))));
|
13
|
-
}
|
14
|
-
return React.memo(Hints);
|
15
|
-
}
|
16
|
-
function Hint({ answer, focusedQuestionId, renderChildNodes, }) {
|
17
|
-
const questionId = getNumericAttribute(answer, 'question-id');
|
18
|
-
const displayNumber = answer.getAttribute('display-number');
|
19
|
-
const hint = findChildElement(answer, 'hint');
|
20
|
-
return (React.createElement("p", { className: classNames('e-hints__hint', {
|
21
|
-
'e-hints__hint--focused': focusedQuestionId === questionId,
|
22
|
-
}), onClick: () => {
|
23
|
-
const question = document.querySelector(`.text-answer[data-question-id="${questionId}"]`);
|
24
|
-
if (question) {
|
25
|
-
question.focus();
|
26
|
-
}
|
27
|
-
}, "data-question-id": questionId },
|
28
|
-
shortDisplayNumber(displayNumber),
|
29
|
-
NBSP,
|
30
|
-
renderChildNodes(hint)));
|
31
|
-
}
|
32
|
-
//# sourceMappingURL=Hints.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Hints.js","sourceRoot":"","sources":["../../src/components/Hints.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAI1D,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAyB;IACjE,SAAS,KAAK,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB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AAE;YACZ,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAc,kCAAkC,UAAU,IAAI,CAAC,CAAA;YACtG,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,KAAK,EAAE,CAAA;aACjB;QACH,CAAC,sBACiB,UAAU;QAE3B,kBAAkB,CAAC,aAAa,CAAC;QACjC,IAAI;QACJ,gBAAgB,CAAC,IAAI,CAAC,CACrB,CACL,CAAA;AACH,CAAC"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function Image({ element, className, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof Image>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=Image.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/components/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA6B1E;;AAED,wBAAgC"}
|
package/dist/components/Image.js
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import { useTranslation } from 'react-i18next';
|
3
|
-
import { getNumericAttribute, queryAncestors } from '../dom-utils';
|
4
|
-
import { CommonExamContext } from './CommonExamContext';
|
5
|
-
import ResponsiveMediaContainer from './ResponsiveMediaContainer';
|
6
|
-
function Image({ element, className, renderChildNodes }) {
|
7
|
-
const { t } = useTranslation();
|
8
|
-
const src = element.getAttribute('src');
|
9
|
-
const width = getNumericAttribute(element, 'width');
|
10
|
-
const height = getNumericAttribute(element, 'height');
|
11
|
-
const caption = element.hasChildNodes() ? renderChildNodes(element) : undefined;
|
12
|
-
const imgUrl = useContext(CommonExamContext).resolveAttachment(src);
|
13
|
-
const Img = () => React.createElement("img", { className: "e-image", src: imgUrl });
|
14
|
-
return (React.createElement(React.Fragment, null,
|
15
|
-
React.createElement(ResponsiveMediaContainer, Object.assign({}, {
|
16
|
-
className,
|
17
|
-
width,
|
18
|
-
height,
|
19
|
-
caption,
|
20
|
-
bordered: caption != null || queryAncestors(element, 'choice-answer') != null,
|
21
|
-
}), queryAncestors(element, ['choice-answer', 'hint']) != null ? (React.createElement(Img, null)) : (React.createElement("a", { title: t('zoom-in'), href: imgUrl, target: "original-picture", className: "e-zoomable" },
|
22
|
-
React.createElement(Img, null))))));
|
23
|
-
}
|
24
|
-
export default React.memo(Image);
|
25
|
-
//# sourceMappingURL=Image.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/components/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAGjE,SAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAsB;IACzE,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAE,CAAA;IACxC,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAE,CAAA;IACpD,MAAM,MAAM,GAAG,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAE,CAAA;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC/E,MAAM,MAAM,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA;IACnE,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,6BAAK,SAAS,EAAC,SAAS,EAAC,GAAG,EAAE,MAAM,GAAI,CAAA;IAC1D,OAAO,CACL;QACE,oBAAC,wBAAwB,oBACnB;YACF,SAAS;YACT,KAAK;YACL,MAAM;YACN,OAAO;YACP,QAAQ,EAAE,OAAO,IAAI,IAAI,IAAI,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,IAAI,IAAI;SAC9E,GAEA,cAAc,CAAC,OAAO,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAC5D,oBAAC,GAAG,OAAG,CACR,CAAC,CAAC,CAAC,CACF,2BAAG,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAC,kBAAkB,EAAC,SAAS,EAAC,YAAY;YACpF,oBAAC,GAAG,OAAG,CACL,CACL,CACwB,CAC1B,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function ImageOverlay({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof ImageOverlay>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=ImageOverlay.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ImageOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ImageOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAU9D,iBAAS,YAAY,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAuCtE;;AA+CD,wBAAuC"}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import React, { useContext, useState } from 'react';
|
2
|
-
import { getNumericAttribute, mapChildElements } from '../dom-utils';
|
3
|
-
import { faEye } from '@fortawesome/free-solid-svg-icons/faEye';
|
4
|
-
import { faEyeSlash } from '@fortawesome/free-solid-svg-icons/faEyeSlash';
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
6
|
-
import ResponsiveMediaContainer from './ResponsiveMediaContainer';
|
7
|
-
import { CommonExamContext } from './CommonExamContext';
|
8
|
-
import classNames from 'classnames';
|
9
|
-
import * as _ from 'lodash-es';
|
10
|
-
function ImageOverlay({ element, renderChildNodes }) {
|
11
|
-
const [opacities, setOpacities] = useState(() => _.times(element.children.length, (i) => (i === 0 ? 1 : 0)));
|
12
|
-
const onSetSliderValue = (event, index) => {
|
13
|
-
const updatedSliders = [...opacities];
|
14
|
-
updatedSliders[index] = Number(event.target.value);
|
15
|
-
setOpacities(updatedSliders);
|
16
|
-
};
|
17
|
-
return (React.createElement("div", { className: "e-image-overlay e-mrg-b-1" },
|
18
|
-
React.createElement("div", { className: "e-columns e-columns--center-h" },
|
19
|
-
React.createElement("div", null, mapChildElements(element, (child, index) => (React.createElement(Slider, { key: index, opacity: opacities[index], element: child, setSliderValue: (e) => onSetSliderValue(e, index), renderChildNodes: renderChildNodes }))))),
|
20
|
-
React.createElement("div", null,
|
21
|
-
React.createElement("div", { className: "e-image-overlay__images-wrapper" }, mapChildElements(element, (child, index) => (React.createElement(ImageOverlayImage, { key: index, element: child, renderChildNodes: renderChildNodes, opacity: opacities[index], absolute: index > 0 })))))));
|
22
|
-
}
|
23
|
-
function Slider({ opacity, setSliderValue, element, renderChildNodes }) {
|
24
|
-
return (React.createElement("div", { className: "e-columns e-columns--center-v e-mrg-b-1" },
|
25
|
-
React.createElement("div", { className: "e-column e-text-right e-mrg-r-1" }, renderChildNodes(element)),
|
26
|
-
React.createElement(FontAwesomeIcon, { icon: faEyeSlash, className: "e-mrg-r-1" }),
|
27
|
-
React.createElement("input", { type: "range", min: 0, max: 1, step: 0.01, value: opacity, onChange: setSliderValue }),
|
28
|
-
React.createElement(FontAwesomeIcon, { icon: faEye, className: "e-mrg-l-1" })));
|
29
|
-
}
|
30
|
-
function ImageOverlayImage({ element, absolute, opacity }) {
|
31
|
-
const src = element.getAttribute('src');
|
32
|
-
const width = getNumericAttribute(element, 'width');
|
33
|
-
const height = getNumericAttribute(element, 'height');
|
34
|
-
const imgUrl = useContext(CommonExamContext).resolveAttachment(src);
|
35
|
-
return (React.createElement("div", { className: classNames('e-columns e-columns--center-h', { 'e-image-overlay__image-absolute': absolute }), style: {
|
36
|
-
opacity: opacity,
|
37
|
-
} },
|
38
|
-
React.createElement(ResponsiveMediaContainer, Object.assign({}, {
|
39
|
-
width,
|
40
|
-
height,
|
41
|
-
}),
|
42
|
-
React.createElement("img", { className: "e-image", src: imgUrl }))));
|
43
|
-
}
|
44
|
-
export default React.memo(ImageOverlay);
|
45
|
-
//# sourceMappingURL=ImageOverlay.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ImageOverlay.js","sourceRoot":"","sources":["../../src/components/ImageOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,wBAAwB,MAAM,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E,QAAQ,EAAE,CAAC,EACvG,KAAK,EAAE;YACL,OAAO,EAAE,OAAO;SACjB;QAED,oBAAC,wBAAwB,oBACnB;YACF,KAAK;YACL,MAAM;SACP;YAED,6BAAK,SAAS,EAAC,SAAS,EAAC,GAAG,EAAE,MAAM,GAAI,CACf,CACvB,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../src/components/ProgressBar.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,eAqBpG"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React, { useEffect, useRef, useState } from 'react';
|
3
|
-
export default function ProgressBar({ duration, className }) {
|
4
|
-
const progressBarRef = useRef(null);
|
5
|
-
const [animating, setAnimating] = useState(false);
|
6
|
-
useEffect(() => {
|
7
|
-
// when this code runs as bundled inside koe for some reason or another
|
8
|
-
// there is only a single render and the element in dom immeadiately has
|
9
|
-
// "--animating" class which breaks the css transformation (the progress
|
10
|
-
// bar is completely filled from start). By reading clientTop we force a
|
11
|
-
// synchronous layout/reflow in a browser
|
12
|
-
progressBarRef.current.clientTop;
|
13
|
-
setAnimating(true);
|
14
|
-
}, []);
|
15
|
-
return (React.createElement("div", { className: classNames('e-progress-bar', className), ref: progressBarRef },
|
16
|
-
React.createElement("div", { className: classNames('e-progress-bar__fill', { 'e-progress-bar__fill--animating': animating }), style: { transitionDuration: duration + 's' } })));
|
17
|
-
}
|
18
|
-
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../src/components/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE1D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAA4C;IACnG,MAAM,cAAc,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACnD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjD,SAAS,CAAC,GAAG,EAAE;QACb,uEAAuE;QACvE,wEAAwE;QACxE,wEAAwE;QACxE,wEAAwE;QACxE,yCAAyC;QACzC,cAAc,CAAC,OAAQ,CAAC,SAAS,CAAA;QACjC,YAAY,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,cAAc;QAC1E,6BACE,SAAS,EAAE,UAAU,CAAC,sBAAsB,EAAE,EAAE,iCAAiC,EAAE,SAAS,EAAE,CAAC,EAC/F,KAAK,EAAE,EAAE,kBAAkB,EAAE,QAAQ,GAAG,GAAG,EAAE,GAC7C,CACE,CACP,CAAA;AACH,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
export interface QuestionContext {
|
4
|
-
answers: Element[];
|
5
|
-
displayNumber: string;
|
6
|
-
hasExternalMaterial: boolean;
|
7
|
-
maxAnswers?: number;
|
8
|
-
maxScore: number;
|
9
|
-
level: number;
|
10
|
-
childQuestions: Element[];
|
11
|
-
}
|
12
|
-
export declare const QuestionContext: React.Context<QuestionContext>;
|
13
|
-
export declare const withQuestionContext: (Component: React.ComponentType<ExamComponentProps>) => React.ComponentType<ExamComponentProps>;
|
14
|
-
//# sourceMappingURL=QuestionContext.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QuestionContext.d.ts","sourceRoot":"","sources":["../../src/components/QuestionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,eAAe,gCAA8D,CAAA;AAE1F,eAAO,MAAM,mBAAmB,iGAe9B,CAAA"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { findChildElement, getNumericAttribute, parentElements, queryAll } from '../dom-utils';
|
3
|
-
import { withContext } from './withContext';
|
4
|
-
export const QuestionContext = React.createContext({});
|
5
|
-
export const withQuestionContext = withContext(QuestionContext, ({ element }) => {
|
6
|
-
const childQuestions = queryAll(element, 'question', false);
|
7
|
-
const answers = childQuestions.length
|
8
|
-
? []
|
9
|
-
: queryAll(element, ['text-answer', 'scored-text-answer', 'dropdown-answer', 'choice-answer'], false);
|
10
|
-
return {
|
11
|
-
answers,
|
12
|
-
displayNumber: element.getAttribute('display-number'),
|
13
|
-
hasExternalMaterial: findChildElement(element, 'external-material') != null,
|
14
|
-
maxAnswers: getNumericAttribute(element, 'max-answers'),
|
15
|
-
maxScore: getNumericAttribute(element, 'max-score'),
|
16
|
-
level: parentElements(element, 'question').length,
|
17
|
-
childQuestions,
|
18
|
-
};
|
19
|
-
});
|
20
|
-
//# sourceMappingURL=QuestionContext.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QuestionContext.js","sourceRoot":"","sources":["../../src/components/QuestionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAa3C,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAkB,EAAqB,CAAC,CAAA;AAE1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAsC,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACnH,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;IAC3D,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM;QACnC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,CAAA;IAEvG,OAAO;QACL,OAAO;QACP,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE;QACtD,mBAAmB,EAAE,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,CAAC,IAAI,IAAI;QAC3E,UAAU,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC;QACvD,QAAQ,EAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAE;QACpD,KAAK,EAAE,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,MAAM;QACjD,cAAc;KACf,CAAA;AACH,CAAC,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function Reference({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof Reference>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=Reference.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,SAAS,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA0CnE;;AA+BD,wBAAoC"}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import { useTranslation } from 'react-i18next';
|
3
|
-
import { findChildElement, NBSP } from '../dom-utils';
|
4
|
-
import { CommonExamContext } from './CommonExamContext';
|
5
|
-
import RenderChildNodes from './RenderChildNodes';
|
6
|
-
function Reference({ element, renderChildNodes }) {
|
7
|
-
const { t } = useTranslation();
|
8
|
-
function renderWith(localName, Component) {
|
9
|
-
const childElement = findChildElement(element, localName);
|
10
|
-
return childElement && React.createElement(Component, Object.assign({}, { element: childElement, renderChildNodes, key: childElement.localName }));
|
11
|
-
}
|
12
|
-
function renderWithPrefix(localName, translationKey, Component) {
|
13
|
-
const childElement = findChildElement(element, localName);
|
14
|
-
return (childElement && (React.createElement(React.Fragment, { key: childElement.localName },
|
15
|
-
t(translationKey),
|
16
|
-
' ',
|
17
|
-
React.createElement(Component, Object.assign({}, { element: childElement, renderChildNodes, key: childElement.localName })))));
|
18
|
-
}
|
19
|
-
return (React.createElement("span", { className: "e-break-word" },
|
20
|
-
t('references.source'),
|
21
|
-
NBSP,
|
22
|
-
intersperse('. ', [
|
23
|
-
renderWith('author', RenderChildNodes),
|
24
|
-
renderWith('title', Italic),
|
25
|
-
renderWith('publisher', RenderChildNodes),
|
26
|
-
renderWith('publication', RenderChildNodes),
|
27
|
-
renderWith('howpublished', RenderChildNodes),
|
28
|
-
renderWith('url', Link),
|
29
|
-
renderWithPrefix('publication-date', 'references.date', AsDate),
|
30
|
-
renderWithPrefix('reference-date', 'references.reference-date', AsDate),
|
31
|
-
renderWithPrefix('translator', 'references.translator', RenderChildNodes),
|
32
|
-
renderWithPrefix('modified-by', 'references.modified-by', RenderChildNodes),
|
33
|
-
renderWith('note', RenderChildNodes),
|
34
|
-
])));
|
35
|
-
}
|
36
|
-
function Italic({ element, renderChildNodes }) {
|
37
|
-
return React.createElement("em", null, renderChildNodes(element));
|
38
|
-
}
|
39
|
-
function Link({ element, renderChildNodes }) {
|
40
|
-
return React.createElement("a", { href: element.textContent }, renderChildNodes(element));
|
41
|
-
}
|
42
|
-
function AsDate({ element }) {
|
43
|
-
const textContent = element.textContent;
|
44
|
-
if (/^[0-9]{4}$/.test(textContent)) {
|
45
|
-
return React.createElement(React.Fragment, null, textContent);
|
46
|
-
}
|
47
|
-
else {
|
48
|
-
const date = new Date(textContent);
|
49
|
-
const { dateTimeFormatter } = useContext(CommonExamContext);
|
50
|
-
return React.createElement(React.Fragment, null, dateTimeFormatter.format(date));
|
51
|
-
}
|
52
|
-
}
|
53
|
-
function intersperse(separator, contents) {
|
54
|
-
return contents.filter(Boolean).reduce((acc, curr, i) => {
|
55
|
-
acc.push(curr);
|
56
|
-
if (i !== contents.length - 1) {
|
57
|
-
acc.push(separator);
|
58
|
-
}
|
59
|
-
return acc;
|
60
|
-
}, []);
|
61
|
-
}
|
62
|
-
export default React.memo(Reference);
|
63
|
-
//# sourceMappingURL=Reference.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,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E,IAAI,EAAE,CAAC,EAAE,EAAE;QACzE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACd,IAAI,CAAC,KAAK,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7B,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;SACpB;QACD,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../createRenderChildNodes';
|
3
|
-
declare function References(_props: ExamComponentProps): JSX.Element | null;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof References>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=References.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"References.d.ts","sourceRoot":"","sources":["../../src/components/References.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAA0B,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAOtF,iBAAS,UAAU,CAAC,MAAM,EAAE,kBAAkB,sBAwB7C;;AAED,wBAAqC"}
|