@digabi/exam-engine-core 23.2.0-alpha.0 → 23.2.1-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.js +10 -6
  2. package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.js.map +1 -1
  3. package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.d.ts.map +1 -1
  4. package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.js +0 -1
  5. package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.js.map +1 -1
  6. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  7. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  8. package/dist/components/context/ResultsContext.js +3 -1
  9. package/dist/components/context/ResultsContext.js.map +1 -1
  10. package/dist/components/exam/AllDNDOptions.d.ts.map +1 -1
  11. package/dist/components/exam/AllDNDOptions.js +2 -2
  12. package/dist/components/exam/AllDNDOptions.js.map +1 -1
  13. package/dist/components/exam/DNDAnswer.d.ts.map +1 -1
  14. package/dist/components/exam/DNDAnswer.js +1 -1
  15. package/dist/components/exam/DNDAnswer.js.map +1 -1
  16. package/dist/components/exam/DNDAnswerContainer.d.ts +3 -1
  17. package/dist/components/exam/DNDAnswerContainer.d.ts.map +1 -1
  18. package/dist/components/exam/DNDAnswerContainer.js +46 -44
  19. package/dist/components/exam/DNDAnswerContainer.js.map +1 -1
  20. package/dist/components/exam/DNDAnswerOption.d.ts +1 -1
  21. package/dist/components/exam/DNDAnswerOption.d.ts.map +1 -1
  22. package/dist/components/exam/DNDAnswerOption.js +1 -1
  23. package/dist/components/exam/DNDAnswerOption.js.map +1 -1
  24. package/dist/components/exam/DNDAnswerTitleCommon.d.ts +4 -0
  25. package/dist/components/exam/DNDAnswerTitleCommon.d.ts.map +1 -0
  26. package/dist/components/exam/DNDAnswerTitleCommon.js +14 -0
  27. package/dist/components/exam/DNDAnswerTitleCommon.js.map +1 -0
  28. package/dist/components/exam/DragAndDrop.d.ts +3 -0
  29. package/dist/components/exam/DragAndDrop.d.ts.map +1 -0
  30. package/dist/components/exam/DragAndDrop.js +7 -0
  31. package/dist/components/exam/DragAndDrop.js.map +1 -0
  32. package/dist/components/exam/NativeDND.d.ts +3 -0
  33. package/dist/components/exam/NativeDND.d.ts.map +1 -0
  34. package/dist/components/exam/NativeDND.js +75 -0
  35. package/dist/components/exam/NativeDND.js.map +1 -0
  36. package/dist/components/exam/getter.d.ts +3 -0
  37. package/dist/components/exam/getter.d.ts.map +1 -0
  38. package/dist/components/exam/getter.js +86 -0
  39. package/dist/components/exam/getter.js.map +1 -0
  40. package/dist/components/grading/AnnotatableGradingAnswer.d.ts +4 -0
  41. package/dist/components/grading/AnnotatableGradingAnswer.d.ts.map +1 -0
  42. package/dist/components/grading/AnnotatableGradingAnswer.js +24 -0
  43. package/dist/components/grading/AnnotatableGradingAnswer.js.map +1 -0
  44. package/dist/components/results/AudioContainer.d.ts +4 -0
  45. package/dist/components/results/AudioContainer.d.ts.map +1 -0
  46. package/dist/components/results/AudioContainer.js +26 -0
  47. package/dist/components/results/AudioContainer.js.map +1 -0
  48. package/dist/components/results/CorrectDNDAnswer.d.ts +4 -0
  49. package/dist/components/results/CorrectDNDAnswer.d.ts.map +1 -0
  50. package/dist/components/results/CorrectDNDAnswer.js +22 -0
  51. package/dist/components/results/CorrectDNDAnswer.js.map +1 -0
  52. package/dist/components/results/CorrectDNDAnswers.d.ts.map +1 -1
  53. package/dist/components/results/CorrectDNDAnswers.js +6 -8
  54. package/dist/components/results/CorrectDNDAnswers.js.map +1 -1
  55. package/dist/components/results/DNDAnswer.d.ts.map +1 -1
  56. package/dist/components/results/DNDAnswer.js +11 -9
  57. package/dist/components/results/DNDAnswer.js.map +1 -1
  58. package/dist/components/results/DNDAnswerContainer.d.ts.map +1 -1
  59. package/dist/components/results/DNDAnswerContainer.js +5 -18
  60. package/dist/components/results/DNDAnswerContainer.js.map +1 -1
  61. package/dist/components/results/DNDAnswerOptionResults.d.ts +4 -0
  62. package/dist/components/results/DNDAnswerOptionResults.d.ts.map +1 -0
  63. package/dist/components/results/DNDAnswerOptionResults.js +4 -0
  64. package/dist/components/results/DNDAnswerOptionResults.js.map +1 -0
  65. package/dist/components/results/Results.js +2 -2
  66. package/dist/components/results/Results.js.map +1 -1
  67. package/dist/components/shared/AnnotationWrapper.d.ts +5 -0
  68. package/dist/components/shared/AnnotationWrapper.d.ts.map +1 -0
  69. package/dist/components/shared/AnnotationWrapper.js +24 -0
  70. package/dist/components/shared/AnnotationWrapper.js.map +1 -0
  71. package/dist/components/shared/DNDAnswerCommon.d.ts +1 -2
  72. package/dist/components/shared/DNDAnswerCommon.d.ts.map +1 -1
  73. package/dist/components/shared/DNDAnswerCommon.js +5 -2
  74. package/dist/components/shared/DNDAnswerCommon.js.map +1 -1
  75. package/dist/components/shared/DNDAnswerDroppable.d.ts +2 -3
  76. package/dist/components/shared/DNDAnswerDroppable.d.ts.map +1 -1
  77. package/dist/components/shared/DNDAnswerDroppable.js +7 -8
  78. package/dist/components/shared/DNDAnswerDroppable.js.map +1 -1
  79. package/dist/components/shared/DNDAnswerDroppableCommon.d.ts +13 -0
  80. package/dist/components/shared/DNDAnswerDroppableCommon.d.ts.map +1 -0
  81. package/dist/components/shared/DNDAnswerDroppableCommon.js +30 -0
  82. package/dist/components/shared/DNDAnswerDroppableCommon.js.map +1 -0
  83. package/dist/components/shared/DNDAnswerOption.d.ts +7 -0
  84. package/dist/components/shared/DNDAnswerOption.d.ts.map +1 -0
  85. package/dist/components/shared/DNDAnswerOption.js +14 -0
  86. package/dist/components/shared/DNDAnswerOption.js.map +1 -0
  87. package/dist/components/shared/DNDAnswerOptionCommon.d.ts +1 -1
  88. package/dist/components/shared/DNDAnswerOptionCommon.d.ts.map +1 -1
  89. package/dist/components/shared/DNDAnswerOptionCommon.js +1 -1
  90. package/dist/components/shared/DNDAnswerOptionCommon.js.map +1 -1
  91. package/dist/components/shared/DNDAnswerTitleCommon.d.ts +4 -0
  92. package/dist/components/shared/DNDAnswerTitleCommon.d.ts.map +1 -0
  93. package/dist/components/shared/DNDAnswerTitleCommon.js +14 -0
  94. package/dist/components/shared/DNDAnswerTitleCommon.js.map +1 -0
  95. package/dist/components/shared/DNDTitleAndAnswer.d.ts +12 -0
  96. package/dist/components/shared/DNDTitleAndAnswer.d.ts.map +1 -0
  97. package/dist/components/shared/DNDTitleAndAnswer.js +48 -0
  98. package/dist/components/shared/DNDTitleAndAnswer.js.map +1 -0
  99. package/dist/components/shared/DNDTitleAndAnswerCommon.d.ts +3 -4
  100. package/dist/components/shared/DNDTitleAndAnswerCommon.d.ts.map +1 -1
  101. package/dist/components/shared/DNDTitleAndAnswerCommon.js +30 -9
  102. package/dist/components/shared/DNDTitleAndAnswerCommon.js.map +1 -1
  103. package/dist/components/shared/DNDTitleAndDroppable.d.ts.map +1 -1
  104. package/dist/components/shared/DNDTitleAndDroppable.js +10 -25
  105. package/dist/components/shared/DNDTitleAndDroppable.js.map +1 -1
  106. package/dist/components/shared/Mark.d.ts +9 -0
  107. package/dist/components/shared/Mark.d.ts.map +1 -0
  108. package/dist/components/shared/Mark.js +14 -0
  109. package/dist/components/shared/Mark.js.map +1 -0
  110. package/dist/components/shared/internal/RestrictedAudioPlayerCommon.d.ts +12 -0
  111. package/dist/components/shared/internal/RestrictedAudioPlayerCommon.d.ts.map +1 -0
  112. package/dist/components/shared/internal/RestrictedAudioPlayerCommon.js +29 -0
  113. package/dist/components/shared/internal/RestrictedAudioPlayerCommon.js.map +1 -0
  114. package/dist/components/shared/internal/RestrictedAudioPlayerExam.d.ts +13 -0
  115. package/dist/components/shared/internal/RestrictedAudioPlayerExam.d.ts.map +1 -0
  116. package/dist/components/shared/internal/RestrictedAudioPlayerExam.js +33 -0
  117. package/dist/components/shared/internal/RestrictedAudioPlayerExam.js.map +1 -0
  118. package/dist/i18n/fi-FI.js +1 -1
  119. package/dist/i18n/fi-FI.js.map +1 -1
  120. package/dist/i18n/sv-FI.js +6 -6
  121. package/dist/i18n/sv-FI.js.map +1 -1
  122. package/dist/main-bundle.js +3 -3
  123. package/dist/main.css +1 -1
  124. package/dist/parser/parseExam.js +1 -1
  125. package/dist/parser/parseExam.js.map +1 -1
  126. package/package.json +3 -3
  127. package/dist/__tests__/playwright/DNDAnswerContainer.test.d.ts +0 -2
  128. package/dist/__tests__/playwright/DNDAnswerContainer.test.d.ts.map +0 -1
  129. package/dist/__tests__/playwright/DNDAnswerContainer.test.js +0 -77
  130. package/dist/__tests__/playwright/DNDAnswerContainer.test.js.map +0 -1
  131. package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.d.ts +0 -10
  132. package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.d.ts.map +0 -1
  133. package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.js +0 -21
  134. package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.js.map +0 -1
  135. package/dist/__tests__/playwright/utils/ComponentWrapper.d.ts +0 -9
  136. package/dist/__tests__/playwright/utils/ComponentWrapper.d.ts.map +0 -1
  137. package/dist/__tests__/playwright/utils/ComponentWrapper.js +0 -26
  138. package/dist/__tests__/playwright/utils/ComponentWrapper.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ExamComponentProps } from '../..';
3
- export declare const DNDAnswerOptionCommon: ({ element, renderChildNodes, style, classes }: ExamComponentProps & {
3
+ export declare const DNDAnswerOption: ({ element, renderChildNodes, style, classes }: ExamComponentProps & {
4
4
  style?: React.CSSProperties;
5
5
  classes?: string[];
6
6
  }) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DNDAnswerOptionCommon.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDAnswerOptionCommon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAG1C,eAAO,MAAM,qBAAqB,kDAK/B,kBAAkB,GAAG;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,sBAmBA,CAAA"}
1
+ {"version":3,"file":"DNDAnswerOptionCommon.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDAnswerOptionCommon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAG1C,eAAO,MAAM,eAAe,kDAKzB,kBAAkB,GAAG;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,sBAmBA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import React from 'react';
3
3
  import { query } from '../../dom-utils';
4
- export const DNDAnswerOptionCommon = ({ element, renderChildNodes, style, classes = [] }) => {
4
+ export const DNDAnswerOption = ({ element, renderChildNodes, style, classes = [] }) => {
5
5
  const hasImages = !!query(element, 'image');
6
6
  const hasFormula = !!query(element, 'formula');
7
7
  const hasTitle = renderChildNodes(element).length > 0;
@@ -1 +1 @@
1
- {"version":3,"file":"DNDAnswerOptionCommon.js","sourceRoot":"","sources":["../../../src/components/shared/DNDAnswerOptionCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,OAAO,EACP,gBAAgB,EAChB,KAAK,EACL,OAAO,GAAG,EAAE,EAIb,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC3C,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CA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,SAAS,EAAC,gBAAgB,IAC5B,CAAC,QAAQ,CAAC,CAAC,CAAC,2BAAG,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,uCAA4B,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAC5F,CACF,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../..';
3
+ export declare const DNDAnswerTitle: ({ element, renderChildNodes }: ExamComponentProps) => React.JSX.Element;
4
+ //# sourceMappingURL=DNDAnswerTitleCommon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DNDAnswerTitleCommon.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDAnswerTitleCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAI1C,eAAO,MAAM,cAAc,kCAAmC,kBAAkB,sBAe/E,CAAA"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+ import { query } from '../../dom-utils';
4
+ export const DNDAnswerTitle = ({ element, renderChildNodes }) => {
5
+ const hasImages = !!query(element, 'image');
6
+ if (!renderChildNodes(element).length) {
7
+ return React.createElement("i", { style: { color: 'grey' } }, "T\u00E4h\u00E4n tulee kysymys...");
8
+ }
9
+ else
10
+ return (React.createElement("span", { className: classNames('e-dnd-answer-title', {
11
+ 'has-images': hasImages
12
+ }) }, renderChildNodes(element)));
13
+ };
14
+ //# sourceMappingURL=DNDAnswerTitleCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DNDAnswerTitleCommon.js","sourceRoot":"","sources":["../../../src/components/shared/DNDAnswerTitleCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB,EAAE,EAAE;IAClF,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAE3C,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;QACtC,OAAO,2BAAG,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,uCAA4B,CAAA;IAChE,CAAC;;QACC,OAAO,CACL,8BACE,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE;gBAC1C,YAAY,EAAE,SAAS;aACxB,CAAC,IAED,gBAAgB,CAAC,OAAO,CAAC,CACrB,CACR,CAAA;AACL,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { UniqueIdentifier } from '@dnd-kit/core';
2
+ import React from 'react';
3
+ import { ExamComponentProps } from '../..';
4
+ import { ItemsState } from '../exam/DNDAnswerContainer';
5
+ export declare const DNDTitleAndAnswerCommon: ({ element, renderChildNodes, items, answerOptionsByQuestionId, page }: {
6
+ element: Element;
7
+ renderChildNodes: ExamComponentProps["renderChildNodes"];
8
+ items: ItemsState;
9
+ answerOptionsByQuestionId: Record<UniqueIdentifier, Element>;
10
+ page: "exam" | "results";
11
+ }) => React.JSX.Element;
12
+ //# sourceMappingURL=DNDTitleAndAnswer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DNDTitleAndAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAKvD,eAAO,MAAM,uBAAuB,0EAMjC;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,KAAK,EAAE,UAAU,CAAA;IACjB,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC5D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,sBA6DA,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { useDroppable } from '@dnd-kit/core';
2
+ import { SortableContext } from '@dnd-kit/sortable';
3
+ import classNames from 'classnames';
4
+ import React, { useContext } from 'react';
5
+ import { getNumericAttribute, query } from '../../dom-utils';
6
+ import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
7
+ import ResultsExamQuestionAutoScore from '../results/internal/QuestionAutoScore';
8
+ import { DNDAnswerDroppableCommon } from './DNDAnswerDroppable';
9
+ import { Score } from './Score';
10
+ export const DNDTitleAndAnswerCommon = ({ element, renderChildNodes, items, answerOptionsByQuestionId, page }) => {
11
+ var _a;
12
+ const questionId = element.getAttribute('question-id');
13
+ const questionIdNumber = Number(questionId);
14
+ const displayNumber = element.getAttribute('display-number');
15
+ const maxScore = getNumericAttribute(element, 'max-score');
16
+ const hasImages = !!query(element, 'image');
17
+ const titleElement = query(element, 'dnd-answer-title');
18
+ const hasTitle = titleElement && renderChildNodes(titleElement).length > 0;
19
+ const { gradingStructure, answersByQuestionId } = useContext(ResultsContext);
20
+ const isStudentsExam = !gradingStructure;
21
+ const hasAnswer = answersByQuestionId && !!((_a = answersByQuestionId[questionIdNumber]) === null || _a === void 0 ? void 0 : _a.value);
22
+ const { correctOptionIds, scoreValue } = getCorrectOptionIds(questionIdNumber, displayNumber);
23
+ const { setNodeRef, isOver } = useDroppable({ id: questionId });
24
+ return (React.createElement(SortableContext, { id: String(questionId), items: items[questionId] || [] },
25
+ React.createElement("span", { ref: setNodeRef },
26
+ React.createElement("div", { className: classNames('e-dnd-answer', { 'no-answer': !hasAnswer }), "data-question-id": questionId, key: questionId },
27
+ React.createElement("div", { className: "anchor", id: `question-nr-${displayNumber}` }),
28
+ titleElement &&
29
+ (!hasTitle ? (React.createElement("i", { style: { color: 'grey' } }, "T\u00E4st\u00E4 puuttuu kysymys...")) : (React.createElement("span", { className: classNames('e-dnd-answer-title', { 'has-images': hasImages, hovered: isOver }) }, renderChildNodes(titleElement)))),
30
+ React.createElement("div", { className: "connection-line" }),
31
+ React.createElement(DNDAnswerDroppableCommon, { renderChildNodes: renderChildNodes, items: items[questionId] || [], answerOptionsByQuestionId: answerOptionsByQuestionId, questionId: questionId, correctIds: correctOptionIds, page: page }),
32
+ isStudentsExam ? (maxScore && React.createElement(Score, { score: maxScore, size: "small" })) : (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber, questionId: Number(questionId) }))))));
33
+ };
34
+ const getCorrectOptionIds = (questionId, displayNumber) => {
35
+ var _a, _b, _c, _d;
36
+ const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
37
+ const hasAnswer = !!answersByQuestionId && ((_a = answersByQuestionId[questionId]) === null || _a === void 0 ? void 0 : _a.value);
38
+ const answer = hasAnswer ? answersByQuestionId[questionId] : undefined;
39
+ const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
40
+ const scoreValue = !(answer === null || answer === void 0 ? void 0 : answer.value)
41
+ ? undefined
42
+ : ((_c = (_b = choice === null || choice === void 0 ? void 0 : choice.options.find(option => option.id === Number(answer.value) && option.correct)) === null || _b === void 0 ? void 0 : _b.score) !== null && _c !== void 0 ? _c : 0);
43
+ const thisQuestion = gradingStructure === null || gradingStructure === void 0 ? void 0 : gradingStructure.questions.find(q => q.displayNumber === displayNumber);
44
+ const options = ((_d = thisQuestion === null || thisQuestion === void 0 ? void 0 : thisQuestion.choices.find(c => c.id === questionId)) === null || _d === void 0 ? void 0 : _d.options) || [];
45
+ const correctOptionIds = options === null || options === void 0 ? void 0 : options.filter(o => o.correct).map(o => o.id);
46
+ return { correctOptionIds, scoreValue };
47
+ };
48
+ //# sourceMappingURL=DNDTitleAndAnswer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DNDTitleAndAnswer.js","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/F,OAAO,4BAA4B,MAAM,uCAAuC,CAAA;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,OAAO,EACP,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,IAAI,EAOL,EAAE,EAAE;;IACH,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAE,CAAA;IACvD,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IAC3C,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAA;IAC7D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;IAC1D,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAA;IACvD,MAAM,QAAQ,GA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,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,0CAAE,KAAK,mCAAI,CAAC,CAAC,CAAA;IACtG,MAAM,YAAY,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,aAAa,CAAwB,CAAA;IACpH,MAAM,OAAO,GAAG,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,0CAAE,OAAO,KAAI,EAAE,CAAA;IACnF,MAAM,gBAAgB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACvE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA;AACzC,CAAC,CAAA"}
@@ -1,13 +1,12 @@
1
1
  import { UniqueIdentifier } from '@dnd-kit/core';
2
2
  import React from 'react';
3
3
  import { ExamComponentProps } from '../..';
4
- import { ItemsState } from '../exam/DNDAnswer';
5
- export declare const DNDTitleAndAnswerCommon: ({ element, renderChildNodes, items, answerOptionsByQuestionId, isInExam, hasAnswer }: {
4
+ import { ItemsState } from '../exam/DNDAnswerContainer';
5
+ export declare const DNDTitleAndAnswerCommon: ({ element, renderChildNodes, items, answerOptionsByQuestionId, page }: {
6
6
  element: Element;
7
7
  renderChildNodes: ExamComponentProps["renderChildNodes"];
8
8
  items: ItemsState;
9
9
  answerOptionsByQuestionId: Record<UniqueIdentifier, Element>;
10
- isInExam?: boolean;
11
- hasAnswer?: boolean;
10
+ page: "exam" | "results";
12
11
  }) => React.JSX.Element;
13
12
  //# sourceMappingURL=DNDTitleAndAnswerCommon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DNDTitleAndAnswerCommon.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndAnswerCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,EAA8B,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAI1E,eAAO,MAAM,uBAAuB,yFAOjC;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,KAAK,EAAE,UAAU,CAAA;IACjB,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,sBAwDA,CAAA"}
1
+ {"version":3,"file":"DNDTitleAndAnswerCommon.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndAnswerCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAKvD,eAAO,MAAM,uBAAuB,0EAMjC;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,KAAK,EAAE,UAAU,CAAA;IACjB,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC5D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,sBA6DA,CAAA"}
@@ -1,27 +1,48 @@
1
1
  import { useDroppable } from '@dnd-kit/core';
2
+ import { SortableContext } from '@dnd-kit/sortable';
2
3
  import classNames from 'classnames';
3
- import React from 'react';
4
+ import React, { useContext } from 'react';
4
5
  import { getNumericAttribute, query } from '../../dom-utils';
5
- import { DNDAnswer as DNDAnswerExam } from '../exam/DNDAnswer';
6
- import { DNDAnswer as DNDAnswerResults } from '../results/DNDAnswer';
7
- import { SortableContext } from '@dnd-kit/sortable';
8
- export const DNDTitleAndAnswerCommon = ({ element, renderChildNodes, items, answerOptionsByQuestionId, isInExam, hasAnswer }) => {
6
+ import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
7
+ import ResultsExamQuestionAutoScore from '../results/internal/QuestionAutoScore';
8
+ import { DNDAnswerDroppableCommon } from './DNDAnswerDroppableCommon';
9
+ import { Score } from './Score';
10
+ export const DNDTitleAndAnswerCommon = ({ element, renderChildNodes, items, answerOptionsByQuestionId, page }) => {
11
+ var _a;
9
12
  const questionId = element.getAttribute('question-id');
13
+ const questionIdNumber = Number(questionId);
10
14
  const displayNumber = element.getAttribute('display-number');
11
15
  const maxScore = getNumericAttribute(element, 'max-score');
12
16
  const hasImages = !!query(element, 'image');
13
17
  const titleElement = query(element, 'dnd-answer-title');
14
18
  const hasTitle = titleElement && renderChildNodes(titleElement).length > 0;
19
+ const { gradingStructure, answersByQuestionId } = useContext(ResultsContext);
20
+ const isStudentsExam = !gradingStructure;
21
+ const hasAnswer = answersByQuestionId && !!((_a = answersByQuestionId[questionIdNumber]) === null || _a === void 0 ? void 0 : _a.value);
22
+ const { correctOptionIds, scoreValue } = getCorrectOptionIds(questionIdNumber, displayNumber);
15
23
  const { setNodeRef, isOver } = useDroppable({ id: questionId });
16
24
  return (React.createElement(SortableContext, { id: String(questionId), items: items[questionId] || [] },
17
25
  React.createElement("span", { ref: setNodeRef },
18
- React.createElement("div", { className: classNames('e-dnd-answer', {
19
- 'no-answer': !hasAnswer
20
- }), "data-question-id": questionId, key: questionId },
26
+ React.createElement("div", { className: classNames('e-dnd-answer', { 'no-answer': !hasAnswer }), "data-question-id": questionId, key: questionId },
21
27
  React.createElement("div", { className: "anchor", id: `question-nr-${displayNumber}` }),
22
28
  titleElement &&
23
29
  (!hasTitle ? (React.createElement("i", { style: { color: 'grey' } }, "T\u00E4st\u00E4 puuttuu kysymys...")) : (React.createElement("span", { className: classNames('e-dnd-answer-title', { 'has-images': hasImages, hovered: isOver }) }, renderChildNodes(titleElement)))),
24
30
  React.createElement("div", { className: "connection-line" }),
25
- isInExam ? (React.createElement(DNDAnswerExam, { renderChildNodes: renderChildNodes, items: items[questionId], answerOptionsByQuestionId: answerOptionsByQuestionId, questionId: questionId, displayNumber: displayNumber, maxScore: maxScore })) : (React.createElement(DNDAnswerResults, { renderChildNodes: renderChildNodes, items: items[questionId], answerOptionsByQuestionId: answerOptionsByQuestionId, questionId: questionId, displayNumber: displayNumber, maxScore: maxScore }))))));
31
+ React.createElement(DNDAnswerDroppableCommon, { renderChildNodes: renderChildNodes, items: items[questionId] || [], answerOptionsByQuestionId: answerOptionsByQuestionId, questionId: questionId, correctIds: correctOptionIds, page: page }),
32
+ isStudentsExam ? (maxScore && React.createElement(Score, { score: maxScore, size: "small" })) : (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber, questionId: Number(questionId) }))))));
33
+ };
34
+ const getCorrectOptionIds = (questionId, displayNumber) => {
35
+ var _a, _b, _c, _d;
36
+ const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
37
+ const hasAnswer = !!answersByQuestionId && ((_a = answersByQuestionId[questionId]) === null || _a === void 0 ? void 0 : _a.value);
38
+ const answer = hasAnswer ? answersByQuestionId[questionId] : undefined;
39
+ const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
40
+ const scoreValue = !(answer === null || answer === void 0 ? void 0 : answer.value)
41
+ ? undefined
42
+ : ((_c = (_b = choice === null || choice === void 0 ? void 0 : choice.options.find(option => option.id === Number(answer.value) && option.correct)) === null || _b === void 0 ? void 0 : _b.score) !== null && _c !== void 0 ? _c : 0);
43
+ const thisQuestion = gradingStructure === null || gradingStructure === void 0 ? void 0 : gradingStructure.questions.find(q => q.displayNumber === displayNumber);
44
+ const options = ((_d = thisQuestion === null || thisQuestion === void 0 ? void 0 : thisQuestion.choices.find(c => c.id === questionId)) === null || _d === void 0 ? void 0 : _d.options) || [];
45
+ const correctOptionIds = options === null || options === void 0 ? void 0 : options.filter(o => o.correct).map(o => o.id);
46
+ return { correctOptionIds, scoreValue };
26
47
  };
27
48
  //# sourceMappingURL=DNDTitleAndAnswerCommon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DNDTitleAndAnswerCommon.js","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndAnswerCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,SAAS,IAAI,aAAa,EAAc,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,OAAO,EACP,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,QAAQ,EACR,SAAS,EAQV,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAE,CAAA;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAA;IAC7D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,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kBAAkB,EAAE,MAAM,OAAO,CAAA;AAS/D,eAAO,MAAM,oBAAoB,uEAM9B;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,oBAAoB,EAAE,OAAO,EAAE,CAAA;CAChC,sBA+DA,CAAA"}
1
+ {"version":3,"file":"DNDTitleAndDroppable.d.ts","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndDroppable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAS1C,eAAO,MAAM,oBAAoB,uEAM9B;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,oBAAoB,EAAE,OAAO,EAAE,CAAA;CAChC,sBAoEA,CAAA"}
@@ -3,14 +3,14 @@ import { SortableContext } from '@dnd-kit/sortable';
3
3
  import classNames from 'classnames';
4
4
  import React, { useContext } from 'react';
5
5
  import { getNumericAttribute, query } from '../../dom-utils';
6
+ import { useExamTranslation } from '../../i18n';
7
+ import { shortDisplayNumber } from '../../shortDisplayNumber';
6
8
  import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
7
9
  import ResultsExamQuestionAutoScore from '../results/internal/QuestionAutoScore';
8
10
  import { DNDDroppable } from './DNDDroppable';
9
11
  import { Score } from './Score';
10
- import { useExamTranslation } from '../../i18n';
11
- import { shortDisplayNumber } from '../../shortDisplayNumber';
12
12
  export const DNDTitleAndDroppable = ({ element, renderChildNodes, itemIds, page, answerOptionElements }) => {
13
- var _a;
13
+ var _a, _b, _c, _d;
14
14
  const { t } = useExamTranslation();
15
15
  const questionId = element.getAttribute('question-id');
16
16
  const questionIdNumber = Number(questionId);
@@ -21,35 +21,20 @@ export const DNDTitleAndDroppable = ({ element, renderChildNodes, itemIds, page,
21
21
  const hasTitle = titleElement && renderChildNodes(titleElement).length > 0;
22
22
  const { gradingStructure, answersByQuestionId } = useContext(ResultsContext);
23
23
  const isStudentsExam = !gradingStructure;
24
- const hasAnswer = answersByQuestionId && !!((_a = answersByQuestionId[questionIdNumber]) === null || _a === void 0 ? void 0 : _a.value);
25
- const { correctOptionIds, scoreValue } = getCorrectOptionIds(questionIdNumber, displayNumber);
26
- const { setNodeRef, isOver } = useDroppable({ id: questionId });
24
+ const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionIdNumber);
25
+ const correctOptionIds = (_a = choice === null || choice === void 0 ? void 0 : choice.options) === null || _a === void 0 ? void 0 : _a.filter(o => o.correct).map(o => o.id);
26
+ const answer = (_b = answersByQuestionId === null || answersByQuestionId === void 0 ? void 0 : answersByQuestionId[questionIdNumber]) !== null && _b !== void 0 ? _b : undefined;
27
+ const scoreValue = (answer && ((_d = (_c = choice === null || choice === void 0 ? void 0 : choice.options) === null || _c === void 0 ? void 0 : _c.find(option => option.id === Number(answer === null || answer === void 0 ? void 0 : answer.value) && option.correct)) === null || _d === void 0 ? void 0 : _d.score)) || 0;
27
28
  const lastLevelOfDisplayNumber = shortDisplayNumber(displayNumber);
29
+ const { setNodeRef, isOver } = useDroppable({ id: questionId });
28
30
  return (React.createElement(SortableContext, { id: questionId, items: itemIds },
29
31
  React.createElement("span", { ref: setNodeRef },
30
- React.createElement("div", { className: classNames('e-dnd-answer', { 'no-answer': page === 'results' && !hasAnswer }), "data-question-id": questionId, key: questionId },
32
+ React.createElement("div", { className: classNames('e-dnd-answer', { 'no-answer': page === 'results' && !(answer === null || answer === void 0 ? void 0 : answer.value) }), "data-question-id": questionId, key: questionId },
31
33
  React.createElement("div", { className: "anchor", id: `question-nr-${displayNumber}` }),
32
34
  titleElement &&
33
35
  (!hasTitle ? (React.createElement("i", { style: { color: 'grey' } }, t('dnd-answers.question-missing'))) : (React.createElement("span", { className: classNames('e-dnd-answer-title', { 'has-images': hasImages, hovered: isOver }) }, renderChildNodes(titleElement)))),
34
36
  React.createElement("div", { className: "connection-line" }),
35
37
  React.createElement(DNDDroppable, { page: page, answerOptionElements: answerOptionElements, questionId: questionId, renderChildNodes: renderChildNodes, correctIds: correctOptionIds }),
36
- isStudentsExam ? (maxScore && React.createElement(Score, { score: maxScore, size: "small" })) : (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: lastLevelOfDisplayNumber, questionId: questionIdNumber }))))));
37
- };
38
- const getCorrectOptionIds = (questionId, displayNumber) => {
39
- var _a, _b, _c, _d;
40
- const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
41
- if (!gradingStructure) {
42
- return { correctOptionIds: undefined, scoreValue: undefined };
43
- }
44
- const hasAnswer = !!answersByQuestionId && ((_a = answersByQuestionId[questionId]) === null || _a === void 0 ? void 0 : _a.value);
45
- const answer = hasAnswer ? answersByQuestionId[questionId] : undefined;
46
- const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
47
- const scoreValue = !(answer === null || answer === void 0 ? void 0 : answer.value)
48
- ? undefined
49
- : ((_c = (_b = choice === null || choice === void 0 ? void 0 : choice.options.find(option => option.id === Number(answer.value) && option.correct)) === null || _b === void 0 ? void 0 : _b.score) !== null && _c !== void 0 ? _c : 0);
50
- const thisQuestion = gradingStructure === null || gradingStructure === void 0 ? void 0 : gradingStructure.questions.find(q => q.displayNumber === displayNumber);
51
- const options = ((_d = thisQuestion === null || thisQuestion === void 0 ? void 0 : thisQuestion.choices.find(c => c.id === questionId)) === null || _d === void 0 ? void 0 : _d.options) || [];
52
- const correctOptionIds = options === null || options === void 0 ? void 0 : options.filter(o => o.correct).map(o => o.id);
53
- return { correctOptionIds, scoreValue };
38
+ isStudentsExam ? (maxScore && React.createElement(Score, { score: maxScore, size: "small" })) : (React.createElement(ResultsExamQuestionAutoScore, { score: (answer === null || answer === void 0 ? void 0 : answer.value) ? scoreValue : undefined, maxScore: maxScore, displayNumber: lastLevelOfDisplayNumber, questionId: questionIdNumber }))))));
54
39
  };
55
40
  //# sourceMappingURL=DNDTitleAndDroppable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DNDTitleAndDroppable.js","sourceRoot":"","sources":["../../../src/components/shared/DNDTitleAndDroppable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,4BAA4B,MAAM,uCAAuC,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,OAAO,EACP,gBAAgB,EAChB,OAAO,EACP,IAAI,EACJ,oBAAoB,EAOrB,EAAE,EAAE;;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAE,CAAA;IACvD,MAAM,gBAAgB,GAA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
+ import { NewRenderableAnnotation, RenderableAnnotation } from '../../types/Score';
3
+ export declare const Mark: ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }: {
4
+ annotation: RenderableAnnotation | NewRenderableAnnotation;
5
+ markedText: string;
6
+ onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, a: RenderableAnnotation) => void;
7
+ setNewAnnotationRef: (ref: HTMLElement | undefined) => void;
8
+ }) => React.JSX.Element;
9
+ //# sourceMappingURL=Mark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mark.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Mark.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAGjF,eAAO,MAAM,IAAI,uEAKd;IACD,UAAU,EAAE,oBAAoB,GAAG,uBAAuB,CAAA;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAClG,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5D,sBAsBA,CAAA"}
@@ -0,0 +1,14 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { isExamAnnotation } from './markText';
3
+ export const Mark = ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }) => {
4
+ const markRef = useRef(null);
5
+ useEffect(() => {
6
+ if (markRef.current && !isExamAnnotation(annotation)) {
7
+ setNewAnnotationRef(markRef.current);
8
+ }
9
+ }, []);
10
+ return (React.createElement("mark", { ref: markRef, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "false", "data-annotation-path": annotation.annotationAnchor, onClick: e => (isExamAnnotation(annotation) ? onClickAnnotation(e, annotation) : undefined) },
11
+ markedText,
12
+ (annotation === null || annotation === void 0 ? void 0 : annotation.markNumber) && React.createElement("sup", { className: "e-annotation", "data-content": annotation === null || annotation === void 0 ? void 0 : annotation.markNumber })));
13
+ };
14
+ //# sourceMappingURL=Mark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mark.js","sourceRoot":"","sources":["../../../src/components/shared/Mark.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACnB,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EAMpB,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IAEzC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;YACrD,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACtC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,8BACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,cAAc,wBACJ,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,iBACnE,OAAO,0BACG,UAAU,CAAC,gBAAgB,EACjD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE1F,UAAU;QACV,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,KAAI,6BAAK,SAAS,EAAC,cAAc,kBAAe,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,GAAI,CAC5F,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare function RestrictedAudioPlayerCommon({ duration, durationRemaining, disabled, restrictedAudioId, playing, labelId, onClick }: {
3
+ durationRemaining?: number;
4
+ disabled: boolean;
5
+ playing: boolean;
6
+ restrictedAudioId: number;
7
+ duration: number;
8
+ labelId: string;
9
+ onClick: () => void;
10
+ }): React.JSX.Element;
11
+ export declare function formatDuration(duration: number): string;
12
+ //# sourceMappingURL=RestrictedAudioPlayerCommon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestrictedAudioPlayerCommon.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/internal/RestrictedAudioPlayerCommon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAIjD,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,OAAO,EACR,EAAE;IACD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,qBAmCA;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKvD"}
@@ -0,0 +1,29 @@
1
+ import { faPlay } from '@fortawesome/free-solid-svg-icons';
2
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import classNames from 'classnames';
4
+ import React, { useContext, useRef } from 'react';
5
+ import { useExamTranslation } from '../../../i18n';
6
+ import { CommonExamContext } from '../../context/CommonExamContext';
7
+ export function RestrictedAudioPlayerCommon({ duration, durationRemaining, disabled, restrictedAudioId, playing, labelId, onClick }) {
8
+ const { abitti2 } = useContext(CommonExamContext);
9
+ const remainingLabelId = `audio-remaining-${restrictedAudioId}`;
10
+ const audioRef = useRef(null);
11
+ const { i18n } = useExamTranslation();
12
+ const labels = playing ? [] : [remainingLabelId, labelId];
13
+ return (React.createElement("div", { className: classNames('restricted-audio-player e-column e-column--narrow e-columns e-columns--inline e-columns--center-v e-pad-1', { 'restricted-audio-player--disabled': disabled }), lang: i18n.language },
14
+ abitti2 && (React.createElement("audio", { ref: audioRef, preload: "none" },
15
+ React.createElement("source", null))),
16
+ React.createElement("button", { className: classNames('restricted-audio-player__play e-column e-column--narrow', {
17
+ 'restricted-audio-player__play--playing': playing
18
+ }), disabled: disabled, onClick: onClick, "aria-labelledby": labels.join(' ') }, !playing && React.createElement(FontAwesomeIcon, { icon: faPlay, fixedWidth: true })),
19
+ React.createElement("span", { className: "restricted-audio-player__duration e-column e-text-right", id: remainingLabelId }, formatDuration(durationRemaining !== null && durationRemaining !== void 0 ? durationRemaining : duration))));
20
+ }
21
+ export function formatDuration(duration) {
22
+ const minutes = Math.floor(duration / 60);
23
+ const seconds = duration % 60;
24
+ return `${padWithZeroes(minutes)}:${padWithZeroes(seconds)}`;
25
+ }
26
+ function padWithZeroes(num) {
27
+ return num.toString().padStart(2, '0');
28
+ }
29
+ //# sourceMappingURL=RestrictedAudioPlayerCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestrictedAudioPlayerCommon.js","sourceRoot":"","sources":["../../../../src/components/shared/internal/RestrictedAudioPlayerCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC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,CAAA;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzC,MAAM,OAAO,GAAG,QAAQ,GAAG,EAAE,CAAA;IAE7B,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAA;AAC9D,CAAC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;AACxC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { RestrictedAudioId } from '../../../index';
3
+ declare function RestrictedAudioPlayer({ src, restrictedAudioId, duration, times, labelId }: {
4
+ src: string;
5
+ restrictedAudioId: RestrictedAudioId;
6
+ duration: number;
7
+ times: number;
8
+ labelId: string;
9
+ }): React.JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof RestrictedAudioPlayer>;
11
+ export default _default;
12
+ export declare function formatDuration(duration: number): string;
13
+ //# sourceMappingURL=RestrictedAudioPlayerExam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestrictedAudioPlayerExam.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/internal/RestrictedAudioPlayerExam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAKlD,iBAAS,qBAAqB,CAAC,EAC7B,GAAG,EACH,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,OAAO,EACR,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB,qBAgCA;;AAED,wBAAgD;AAEhD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKvD"}
@@ -0,0 +1,33 @@
1
+ import React, { useRef } from 'react';
2
+ import { useDispatch, useSelector } from 'react-redux';
3
+ import { playAudio } from '../../../store/audio/actions';
4
+ import { getAudioState, getDurationRemaining, getPlaybackTimesRemaining } from '../../../store/selectors';
5
+ import { RestrictedAudioPlayerCommon } from './RestrictedAudioPlayerCommon';
6
+ function RestrictedAudioPlayer({ src, restrictedAudioId, duration, times, labelId }) {
7
+ const audioState = useSelector(getAudioState(src, restrictedAudioId));
8
+ const durationRemaining = useSelector(getDurationRemaining(src, restrictedAudioId));
9
+ const playbackTimesRemaining = useSelector(getPlaybackTimesRemaining(restrictedAudioId, times));
10
+ const dispatch = useDispatch();
11
+ const playing = audioState === 'playing';
12
+ const stopped = audioState === 'stopped';
13
+ const disabled = !stopped || playbackTimesRemaining === 0;
14
+ const audioRef = useRef(null);
15
+ const onClick = () => stopped &&
16
+ dispatch(playAudio({
17
+ src,
18
+ restrictedAudioId,
19
+ duration,
20
+ audioRef
21
+ }));
22
+ return (React.createElement(RestrictedAudioPlayerCommon, { disabled: disabled, onClick: onClick, restrictedAudioId: restrictedAudioId, duration: duration, durationRemaining: durationRemaining, labelId: labelId, playing: playing }));
23
+ }
24
+ export default React.memo(RestrictedAudioPlayer);
25
+ export function formatDuration(duration) {
26
+ const minutes = Math.floor(duration / 60);
27
+ const seconds = duration % 60;
28
+ return `${padWithZeroes(minutes)}:${padWithZeroes(seconds)}`;
29
+ }
30
+ function padWithZeroes(num) {
31
+ return num.toString().padStart(2, '0');
32
+ }
33
+ //# sourceMappingURL=RestrictedAudioPlayerExam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestrictedAudioPlayerExam.js","sourceRoot":"","sources":["../../../../src/components/shared/internal/RestrictedAudioPlayerExam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM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AAE,OAAO,EAChB,OAAO,EAAE,OAAO,GAChB,CACH,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;AAEhD,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzC,MAAM,OAAO,GAAG,QAAQ,GAAG,EAAE,CAAA;IAE7B,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAA;AAC9D,CAAC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;AACxC,CAAC"}
@@ -70,7 +70,7 @@ export const fi_FI = {
70
70
  'dnd-answers': {
71
71
  'all-answer-options': 'Vastausvaihtoehdot:',
72
72
  'correct-answers': 'Oikeat vastaukset',
73
- 'question-missing': 'Tästä puuttuu tehtävä...',
73
+ 'question-missing': 'Tästä puuttuu osio...',
74
74
  'answer-missing': 'Tästä puuttuu vastaus...',
75
75
  'drop-here': 'Pudota tänne',
76
76
  'no-answer': '(Ei vastausta)'
@@ -1 +1 @@
1
- {"version":3,"file":"fi-FI.js","sourceRoot":"","sources":["../../src/i18n/fi-FI.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,UAAU;IAC3B,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,WAAW;IAC5B,wBAAwB,EAAE,WAAW;IACrC,yBAAyB,EAAE,UAAU;IACrC,iCAAiC,EAAE,4BAA4B;IAC/D,OAAO,EAAE,wBAAwB;IACjC,QAAQ,EAAE,4BAA4B;IACtC,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,cAAc;IACtB,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AE,6BAA6B;QACpD,mBAAmB,EAAE,wCAAwC;QAC7D,mBAAmB,EAAE,qEAAqE;QAC1F,mBAAmB,EAAE,0CAA0C;KAChE;IACD,eAAe,EAAE;QACf,oBAAoB,EAClB,0GAA0G;QAC5G,+BAA+B,EAC7B,kHAAkH;QACpH,0BAA0B,EAAE,qDAAqD;QACjF,iBAAiB,EAAE,yBAAyB;KAC7C;IACD,eAAe,EAAE;QACf,cAAc,EAAE,iBAAiB;QACjC,YAAY,EAAE,mBAAmB;QACjC,gBAAgB,EAAE,sBAAsB;KACzC;CACF,CAAA"}
@@ -67,12 +67,12 @@ export const sv_FI = {
67
67
  instructions: 'Efter att du granskat dina svar kan du ännu gå tillbaka och redigera svaren eller avsluta provet.'
68
68
  },
69
69
  'dnd-answers': {
70
- 'all-answer-options': 'TODO TODO:',
71
- 'correct-answers': 'TODO TODO',
72
- 'question-missing': 'Här saknas ett objekt...',
73
- 'answer-missing': 'Här kommer rätta alternativet...',
74
- 'drop-here': 'TODO TODO',
75
- 'no-answer': '(TODO TODO)'
70
+ 'all-answer-options': 'Svarsalternativ:',
71
+ 'correct-answers': 'Rätta svar',
72
+ 'question-missing': 'Här fattas en item...',
73
+ 'answer-missing': 'Här fattas svaret...',
74
+ 'drop-here': 'Släpp här',
75
+ 'no-answer': '(Inget svar)'
76
76
  },
77
77
  undo: {
78
78
  loading: 'Laddar...',
@@ -1 +1 @@
1
- {"version":3,"file":"sv-FI.js","sourceRoot":"","sources":["../../src/i18n/sv-FI.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAiB;IACjC,YAAY,EAAE,mBAAmB;IACjC,eAAe,EAAE,YAAY;IAC7B,QAAQ,EAAE,UAAU;IACpB,wBAAwB,EAAE,WAAW;IACrC,yBAAyB,EAAE,UAAU;IACrC,iCAAiC,EAAE,6BAA6B;IAChE,OAAO,EAAE,wBAAwB;IACjC,QAAQ,EAAE,4BAA4B;IACtC,KAAK,EAAE,SAAS;IAChB,OA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