@digabi/exam-engine-core 23.2.0 → 23.2.1-alpha.0
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/exam/AllDNDOptions.d.ts.map +1 -1
- package/dist/components/exam/AllDNDOptions.js +2 -2
- package/dist/components/exam/AllDNDOptions.js.map +1 -1
- package/dist/components/exam/DNDAnswer.d.ts.map +1 -1
- package/dist/components/exam/DNDAnswer.js +1 -1
- package/dist/components/exam/DNDAnswer.js.map +1 -1
- package/dist/components/exam/DNDAnswerContainer.d.ts.map +1 -1
- package/dist/components/exam/DNDAnswerContainer.js +17 -19
- package/dist/components/exam/DNDAnswerContainer.js.map +1 -1
- package/dist/components/exam/DNDAnswerOption.d.ts +1 -1
- package/dist/components/exam/DNDAnswerOption.d.ts.map +1 -1
- package/dist/components/exam/DNDAnswerOption.js +1 -1
- package/dist/components/exam/DNDAnswerOption.js.map +1 -1
- package/dist/components/exam/DNDAnswerTitleCommon.d.ts +4 -0
- package/dist/components/exam/DNDAnswerTitleCommon.d.ts.map +1 -0
- package/dist/components/exam/DNDAnswerTitleCommon.js +14 -0
- package/dist/components/exam/DNDAnswerTitleCommon.js.map +1 -0
- package/dist/components/exam/DragAndDrop.d.ts +3 -0
- package/dist/components/exam/DragAndDrop.d.ts.map +1 -0
- package/dist/components/exam/DragAndDrop.js +7 -0
- package/dist/components/exam/DragAndDrop.js.map +1 -0
- package/dist/components/exam/NativeDND.d.ts +3 -0
- package/dist/components/exam/NativeDND.d.ts.map +1 -0
- package/dist/components/exam/NativeDND.js +75 -0
- package/dist/components/exam/NativeDND.js.map +1 -0
- package/dist/components/exam/getter.d.ts +3 -0
- package/dist/components/exam/getter.d.ts.map +1 -0
- package/dist/components/exam/getter.js +86 -0
- package/dist/components/exam/getter.js.map +1 -0
- package/dist/components/grading/AnnotatableGradingAnswer.d.ts +4 -0
- package/dist/components/grading/AnnotatableGradingAnswer.d.ts.map +1 -0
- package/dist/components/grading/AnnotatableGradingAnswer.js +24 -0
- package/dist/components/grading/AnnotatableGradingAnswer.js.map +1 -0
- package/dist/components/results/CorrectDNDAnswer.d.ts +4 -0
- package/dist/components/results/CorrectDNDAnswer.d.ts.map +1 -0
- package/dist/components/results/CorrectDNDAnswer.js +22 -0
- package/dist/components/results/CorrectDNDAnswer.js.map +1 -0
- package/dist/components/results/DNDAnswer.d.ts.map +1 -1
- package/dist/components/results/DNDAnswer.js +11 -9
- package/dist/components/results/DNDAnswer.js.map +1 -1
- package/dist/components/results/DNDAnswerOptionResults.d.ts +4 -0
- package/dist/components/results/DNDAnswerOptionResults.d.ts.map +1 -0
- package/dist/components/results/DNDAnswerOptionResults.js +4 -0
- package/dist/components/results/DNDAnswerOptionResults.js.map +1 -0
- package/dist/components/shared/AnnotationWrapper.d.ts +5 -0
- package/dist/components/shared/AnnotationWrapper.d.ts.map +1 -0
- package/dist/components/shared/AnnotationWrapper.js +24 -0
- package/dist/components/shared/AnnotationWrapper.js.map +1 -0
- package/dist/components/shared/DNDAnswerCommon.d.ts +1 -2
- package/dist/components/shared/DNDAnswerCommon.d.ts.map +1 -1
- package/dist/components/shared/DNDAnswerCommon.js +5 -2
- package/dist/components/shared/DNDAnswerCommon.js.map +1 -1
- package/dist/components/shared/DNDAnswerDroppable.d.ts +2 -3
- package/dist/components/shared/DNDAnswerDroppable.d.ts.map +1 -1
- package/dist/components/shared/DNDAnswerDroppable.js +7 -8
- package/dist/components/shared/DNDAnswerDroppable.js.map +1 -1
- package/dist/components/shared/DNDAnswerDroppableCommon.d.ts +13 -0
- package/dist/components/shared/DNDAnswerDroppableCommon.d.ts.map +1 -0
- package/dist/components/shared/DNDAnswerDroppableCommon.js +30 -0
- package/dist/components/shared/DNDAnswerDroppableCommon.js.map +1 -0
- package/dist/components/shared/DNDAnswerOption.d.ts +7 -0
- package/dist/components/shared/DNDAnswerOption.d.ts.map +1 -0
- package/dist/components/shared/DNDAnswerOption.js +14 -0
- package/dist/components/shared/DNDAnswerOption.js.map +1 -0
- package/dist/components/shared/DNDAnswerOptionCommon.d.ts +1 -1
- package/dist/components/shared/DNDAnswerOptionCommon.d.ts.map +1 -1
- package/dist/components/shared/DNDAnswerOptionCommon.js +1 -1
- package/dist/components/shared/DNDAnswerOptionCommon.js.map +1 -1
- package/dist/components/shared/DNDAnswerTitleCommon.d.ts +4 -0
- package/dist/components/shared/DNDAnswerTitleCommon.d.ts.map +1 -0
- package/dist/components/shared/DNDAnswerTitleCommon.js +14 -0
- package/dist/components/shared/DNDAnswerTitleCommon.js.map +1 -0
- package/dist/components/shared/DNDTitleAndAnswer.d.ts +12 -0
- package/dist/components/shared/DNDTitleAndAnswer.d.ts.map +1 -0
- package/dist/components/shared/DNDTitleAndAnswer.js +48 -0
- package/dist/components/shared/DNDTitleAndAnswer.js.map +1 -0
- package/dist/components/shared/DNDTitleAndAnswerCommon.d.ts +3 -4
- package/dist/components/shared/DNDTitleAndAnswerCommon.d.ts.map +1 -1
- package/dist/components/shared/DNDTitleAndAnswerCommon.js +30 -9
- package/dist/components/shared/DNDTitleAndAnswerCommon.js.map +1 -1
- package/dist/components/shared/Mark.d.ts +9 -0
- package/dist/components/shared/Mark.d.ts.map +1 -0
- package/dist/components/shared/Mark.js +14 -0
- package/dist/components/shared/Mark.js.map +1 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerCommon.d.ts +12 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerCommon.d.ts.map +1 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerCommon.js +29 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerCommon.js.map +1 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerExam.d.ts +13 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerExam.d.ts.map +1 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerExam.js +33 -0
- package/dist/components/shared/internal/RestrictedAudioPlayerExam.js.map +1 -0
- package/dist/main-bundle.js +5 -5
- package/package.json +2 -2
- package/dist/__tests__/playwright/DNDAnswerContainer.test.d.ts +0 -2
- package/dist/__tests__/playwright/DNDAnswerContainer.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/DNDAnswerContainer.test.js +0 -77
- package/dist/__tests__/playwright/DNDAnswerContainer.test.js.map +0 -1
- package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.d.ts +0 -10
- package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.d.ts.map +0 -1
- package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.js +0 -21
- package/dist/__tests__/playwright/stories/DNDAnswerContainer.story.js.map +0 -1
- package/dist/__tests__/playwright/utils/ComponentWrapper.d.ts +0 -9
- package/dist/__tests__/playwright/utils/ComponentWrapper.d.ts.map +0 -1
- package/dist/__tests__/playwright/utils/ComponentWrapper.js +0 -26
- package/dist/__tests__/playwright/utils/ComponentWrapper.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AllDNDOptions.d.ts","sourceRoot":"","sources":["../../../src/components/exam/AllDNDOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"AllDNDOptions.d.ts","sourceRoot":"","sources":["../../../src/components/exam/AllDNDOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAG/D,eAAO,MAAM,aAAa,yDAIvB;IACD,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,uBAAuB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;CAC3D,sBAkBA,CAAA"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { useDroppable } from '@dnd-kit/core';
|
2
2
|
import { SortableContext } from '@dnd-kit/sortable';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
4
|
+
import { DNDAnswerDroppableCommon } from '../shared/DNDAnswerDroppableCommon';
|
5
5
|
export const AllDNDOptions = ({ items, renderChildNodes, answerOptionsByOptionId }) => {
|
6
6
|
const { setNodeRef } = useDroppable({ id: 'root' });
|
7
7
|
return (React.createElement(SortableContext, { items: items },
|
8
8
|
React.createElement("span", { className: "droppable-title" }, "Vastausvaihtoehdot:"),
|
9
9
|
React.createElement("span", { ref: setNodeRef },
|
10
|
-
React.createElement(
|
10
|
+
React.createElement(DNDAnswerDroppableCommon, { renderChildNodes: renderChildNodes, questionId: "root", items: items, answerOptionsByQuestionId: answerOptionsByOptionId, page: "exam", classes: { root: true } }))));
|
11
11
|
};
|
12
12
|
//# sourceMappingURL=AllDNDOptions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AllDNDOptions.js","sourceRoot":"","sources":["../../../src/components/exam/AllDNDOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"AllDNDOptions.js","sourceRoot":"","sources":["../../../src/components/exam/AllDNDOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAA;AAE7E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,KAAK,EACL,gBAAgB,EAChB,uBAAuB,EAKxB,EAAE,EAAE;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAA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{"version":3,"file":"DNDAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAI1C,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,gBAAgB,EAAE,CAAA;IACxB,CAAC,GAAG,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,SAAS,iFAMnB;IACD,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC5D,UAAU,EAAE,gBAAgB,CAAA;IAC5B,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,sBAYA,CAAA"}
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
2
2
|
import { DNDAnswerCommon } from '../shared/DNDAnswerCommon';
|
3
3
|
import { Score } from '../shared/Score';
|
4
4
|
export const DNDAnswer = ({ renderChildNodes, items, answerOptionsByQuestionId, questionId, maxScore }) => (React.createElement(React.Fragment, null,
|
5
|
-
React.createElement(DNDAnswerCommon, { renderChildNodes: renderChildNodes, items: items, answerOptionsByQuestionId: answerOptionsByQuestionId, classes: { root: questionId === 'root' },
|
5
|
+
React.createElement(DNDAnswerCommon, { renderChildNodes: renderChildNodes, items: items, answerOptionsByQuestionId: answerOptionsByQuestionId, classes: { root: questionId === 'root' }, questionId: questionId }),
|
6
6
|
maxScore ? React.createElement(Score, { score: maxScore, size: "small" }) : null));
|
7
7
|
//# sourceMappingURL=DNDAnswer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswer.js","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAWvC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,UAAU,EACV,QAAQ,EAST,EAAE,EAAE,CAAC,CACJ;IACE,oBAAC,eAAe,IACd,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,KAAK,EACZ,yBAAyB,EAAE,yBAAyB,EACpD,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,KAAK,MAAM,EAAE,EACxC,
|
1
|
+
{"version":3,"file":"DNDAnswer.js","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAWvC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,UAAU,EACV,QAAQ,EAST,EAAE,EAAE,CAAC,CACJ;IACE,oBAAC,eAAe,IACd,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,KAAK,EACZ,yBAAyB,EAAE,yBAAyB,EACpD,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,KAAK,MAAM,EAAE,EACxC,UAAU,EAAE,UAAU,GACtB;IAED,QAAQ,CAAC,CAAC,CAAC,oBAAC,KAAK,IAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,CACzD,CACJ,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswerContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,gBAAgB,EAGjB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAA8B,MAAM,OAAO,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAQlE,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,gBAAgB,EAAE,CAAA;IACxB,CAAC,GAAG,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,8BAA8B,YAAa,OAAO,eAAe,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,eAiB3G,CAAA;AAED,eAAO,MAAM,0BAA0B,YAAa,OAAO,sCAO1D,CAAA;AAED,eAAO,MAAM,kBAAkB,kCAAmC,kBAAkB,
|
1
|
+
{"version":3,"file":"DNDAnswerContainer.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswerContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,gBAAgB,EAGjB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAA8B,MAAM,OAAO,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAQlE,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,gBAAgB,EAAE,CAAA;IACxB,CAAC,GAAG,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,8BAA8B,YAAa,OAAO,eAAe,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,eAiB3G,CAAA;AAED,eAAO,MAAM,0BAA0B,YAAa,OAAO,sCAO1D,CAAA;AAED,eAAO,MAAM,kBAAkB,kCAAmC,kBAAkB,sBA6HnF,CAAA"}
|
@@ -62,35 +62,33 @@ export const DNDAnswerContainer = ({ element, renderChildNodes }) => {
|
|
62
62
|
}
|
63
63
|
function getContainers(event) {
|
64
64
|
const { active, over } = event;
|
65
|
-
const
|
66
|
-
const
|
67
|
-
const
|
68
|
-
|
69
|
-
return { activeId, activeContainer, overContainer };
|
65
|
+
const optionId = active.id;
|
66
|
+
const questionIdFrom = findContainer(optionId);
|
67
|
+
const questionIdTo = over === null || over === void 0 ? void 0 : over.id;
|
68
|
+
return { optionId, questionIdFrom, questionIdTo };
|
70
69
|
}
|
71
70
|
function handleDragStart(event) {
|
72
71
|
setActiveId(event.active.id);
|
73
72
|
}
|
74
73
|
function handleDragEnd(event) {
|
75
|
-
const {
|
76
|
-
if (!
|
74
|
+
const { optionId, questionIdFrom, questionIdTo } = getContainers(event);
|
75
|
+
if (!questionIdFrom || !questionIdTo || questionIdFrom === questionIdTo) {
|
77
76
|
return;
|
78
77
|
}
|
79
|
-
setOptionIdsByQuestionId(optionIdsByQuestionId => moveValue(optionIdsByQuestionId,
|
78
|
+
setOptionIdsByQuestionId(optionIdsByQuestionId => moveValue(optionIdsByQuestionId, questionIdFrom, questionIdTo, optionId));
|
79
|
+
if (questionIdFrom !== 'root') {
|
80
|
+
saveAnswerToStore(questionIdFrom, '');
|
81
|
+
}
|
82
|
+
if (questionIdTo !== 'root') {
|
83
|
+
saveAnswerToStore(questionIdTo, optionId);
|
84
|
+
}
|
80
85
|
setActiveId(null);
|
81
86
|
}
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
saveAnswerToStore(questionId, answerValue === null || answerValue === void 0 ? void 0 : answerValue.toString());
|
86
|
-
}
|
87
|
-
});
|
88
|
-
}, [optionIdsByQuestionId]);
|
89
|
-
function saveAnswerToStore(overContainer, activeId) {
|
90
|
-
const questionId = Number(overContainer);
|
91
|
-
const value = (activeId === null || activeId === void 0 ? void 0 : activeId.toString()) || '';
|
87
|
+
function saveAnswerToStore(questionId, optionId) {
|
88
|
+
const questionIdNumber = Number(questionId);
|
89
|
+
const value = (optionId === null || optionId === void 0 ? void 0 : optionId.toString()) || '';
|
92
90
|
const displayNumber = displayNumbersById[questionId];
|
93
|
-
dispatch(saveAnswer({ type: 'choice', questionId, value, displayNumber }));
|
91
|
+
dispatch(saveAnswer({ type: 'choice', questionId: questionIdNumber, value, displayNumber }));
|
94
92
|
}
|
95
93
|
const dndAnswersWithQuestion = queryAll(element, 'dnd-answer').filter(e => !!query(e, 'dnd-answer-title'));
|
96
94
|
const allAnswerOptionElements = (_a = optionIdsByQuestionId.root) === null || _a === void 0 ? void 0 : _a.map(id => answerOptionsById[id] || null).filter(Boolean);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.js","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswerContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EAEX,cAAc,EACd,aAAa,EAEb,SAAS,EACT,UAAU,EACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAOrE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC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AC,CAAA;IACxB,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ExamComponentProps } from '../..';
|
3
|
-
export declare const
|
3
|
+
export declare const DNDAnswerOptionDraggable: ({ element, renderChildNodes }: ExamComponentProps) => React.JSX.Element;
|
4
4
|
//# sourceMappingURL=DNDAnswerOption.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerOption.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswerOption.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAI1C,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"DNDAnswerOption.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswerOption.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAI1C,eAAO,MAAM,wBAAwB,kCAAmC,kBAAkB,sBAkBzF,CAAA"}
|
@@ -4,7 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
4
|
import React from 'react';
|
5
5
|
import { getNumericAttribute } from '../../dom-utils';
|
6
6
|
import { DNDAnswerOptionCommon } from '../shared/DNDAnswerOptionCommon';
|
7
|
-
export const
|
7
|
+
export const DNDAnswerOptionDraggable = ({ element, renderChildNodes }) => {
|
8
8
|
const optionId = getNumericAttribute(element, 'option-id');
|
9
9
|
const { attributes, listeners, setNodeRef, isDragging, setActivatorNodeRef } = useDraggable({
|
10
10
|
id: optionId
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerOption.js","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswerOption.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,M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gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAI;QAE7F,gCAAS,SAAS,KAAM,UAAU,EAAE,GAAG,EAAE,mBAAmB,EAAE,SAAS,EAAC,aAAa;YACnF,oBAAC,eAAe,IAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,iBAAiB,GAAI,CAClD,CACF,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DNDAnswerTitleCommon.d.ts","sourceRoot":"","sources":["../../../src/components/exam/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/exam/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 @@
|
|
1
|
+
{"version":3,"file":"DragAndDrop.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DragAndDrop.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,WAAW,yBAOvB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DragAndDrop.js","sourceRoot":"","sources":["../../../src/components/exam/DragAndDrop.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACjB,OAAO,CACL;QACE,8CAAoB,CAChB,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"NativeDND.d.ts","sourceRoot":"","sources":["../../../src/components/exam/NativeDND.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,SAAS,yBAoHrB,CAAA"}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export const NativeDND = () => {
|
3
|
+
let dragSrcEl;
|
4
|
+
function handleDragOver(e) {
|
5
|
+
if (e.preventDefault) {
|
6
|
+
e.preventDefault();
|
7
|
+
}
|
8
|
+
if (e.dataTransfer) {
|
9
|
+
e.dataTransfer.dropEffect = 'move';
|
10
|
+
}
|
11
|
+
return false;
|
12
|
+
}
|
13
|
+
function handleDragEnter(e) {
|
14
|
+
const target = e.target;
|
15
|
+
target.classList.add('over');
|
16
|
+
target.style.borderColor = 'red';
|
17
|
+
}
|
18
|
+
function handleDragLeave(e) {
|
19
|
+
const target = e.target;
|
20
|
+
target.classList.add('over');
|
21
|
+
target.style.borderColor = 'black';
|
22
|
+
}
|
23
|
+
function handleDrop(e) {
|
24
|
+
var _a;
|
25
|
+
if (e.stopPropagation) {
|
26
|
+
e.stopPropagation(); // stops the browser from redirecting.
|
27
|
+
}
|
28
|
+
if (dragSrcEl !== e.target) {
|
29
|
+
dragSrcEl.innerHTML = e.target.innerHTML;
|
30
|
+
const target = e.target;
|
31
|
+
const data = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData('text/html');
|
32
|
+
console.log(data);
|
33
|
+
target.innerHTML = e.dataTransfer.getData('text/html');
|
34
|
+
}
|
35
|
+
return false;
|
36
|
+
}
|
37
|
+
function handleDragEnd(e) {
|
38
|
+
const target = e.target;
|
39
|
+
target.style.opacity = '1';
|
40
|
+
target.style.borderColor = 'black';
|
41
|
+
items.forEach(item => {
|
42
|
+
item.classList.remove('over');
|
43
|
+
});
|
44
|
+
}
|
45
|
+
function handleDragStart(e) {
|
46
|
+
const target = e.target;
|
47
|
+
target.style.opacity = '0.4';
|
48
|
+
dragSrcEl = e.target;
|
49
|
+
if (e.dataTransfer) {
|
50
|
+
e.dataTransfer.effectAllowed = 'move';
|
51
|
+
e.dataTransfer.setData('text/html', e.target.innerHTML);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
const items = document.querySelectorAll('.container .box');
|
55
|
+
const data = [
|
56
|
+
React.createElement("div", { key: 1 }, "A"),
|
57
|
+
React.createElement("div", { key: 2 }, "B"),
|
58
|
+
React.createElement("div", { key: 3 },
|
59
|
+
React.createElement("img", { style: { pointerEvents: 'none' }, src: "https://its-finland.fi/wp-content/uploads/2023/06/ytl-toimiliitto-1-uai-780x438-1.jpg", width: "50" }))
|
60
|
+
];
|
61
|
+
return (React.createElement("div", null,
|
62
|
+
React.createElement("div", { className: "container", style: { minWidth: '100px', minHeight: '200px', background: '#fcf' } }, data.map((item, index) => (React.createElement("div", { key: index, draggable: "true", className: "box", onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, style: {
|
63
|
+
width: '50px',
|
64
|
+
height: '50px',
|
65
|
+
padding: '0 50px',
|
66
|
+
border: '2px solid black',
|
67
|
+
display: 'grid',
|
68
|
+
placeContent: 'center',
|
69
|
+
marginBottom: '10px',
|
70
|
+
transition: 'all 0.3s',
|
71
|
+
background: 'lightblue'
|
72
|
+
} }, item)))),
|
73
|
+
React.createElement("div", { className: "container", style: { minWidth: '100px', minHeight: '200px', background: '#ffc' }, onDragOver: e => e.preventDefault(), onDrop: handleDrop })));
|
74
|
+
};
|
75
|
+
//# sourceMappingURL=NativeDND.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"NativeDND.js","sourceRoot":"","sources":["../../../src/components/exam/NativeDND.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,IAAI,SAAsB,CAAA;IAE1B,SAAS,cAAc,CAAC,CAAkC;QACxD,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;YACrB,CAAC,CAAC,cAAc,EAAE,CAAA;QACpB,CAAC;QAED,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;YACnB,CAAC,CAAC,YAAY,CAAC,UAAU,GAAG,MAAM,CAAA;QACpC,CA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,eAAe,EAC5B,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,QAAQ;gBACjB,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,MAAM;gBACf,YAAY,EAAE,QAAQ;gBACtB,YAAY,EAAE,MAAM;gBACpB,UAAU,EAAE,UAAU;gBACtB,UAAU,EAAE,WAAW;aACxB,IAEA,IAAI,CACD,CACP,CAAC,CACE;QACN,6BACE,SAAS,EAAC,WAAW,EACrB,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,EACpE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,EACnC,MAAM,EAAE,UAAU,GACb,CACH,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getter.d.ts","sourceRoot":"","sources":["../../../src/components/exam/getter.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,EACzB,MAAM,eAAe,CAAA;AAItB,eAAO,MAAM,gBAAgB,EAAE,wBAiG9B,CAAA"}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { closestCorners, getFirstCollision, KeyboardCode } from '@dnd-kit/core';
|
2
|
+
const directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
|
3
|
+
export const coordinateGetter = (event, { context: { active, droppableRects, droppableContainers, collisionRect } }) => {
|
4
|
+
var _a;
|
5
|
+
if (directions.includes(event.code)) {
|
6
|
+
event.preventDefault();
|
7
|
+
if (!active || !collisionRect) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
const filteredContainers = [];
|
11
|
+
droppableContainers.getEnabled().forEach(entry => {
|
12
|
+
var _a;
|
13
|
+
if (!entry || (entry === null || entry === void 0 ? void 0 : entry.disabled)) {
|
14
|
+
return;
|
15
|
+
}
|
16
|
+
const rect = droppableRects.get(entry.id);
|
17
|
+
if (!rect) {
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
const data = entry.data.current;
|
21
|
+
if (data) {
|
22
|
+
const { type, children } = data;
|
23
|
+
if (type === 'container' && Array.isArray(children) && (children === null || children === void 0 ? void 0 : children.length) > 0) {
|
24
|
+
if (((_a = active.data.current) === null || _a === void 0 ? void 0 : _a.type) !== 'container') {
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
switch (event.code) {
|
30
|
+
case KeyboardCode.Down:
|
31
|
+
if (collisionRect.top < rect.top) {
|
32
|
+
filteredContainers.push(entry);
|
33
|
+
}
|
34
|
+
break;
|
35
|
+
case KeyboardCode.Up:
|
36
|
+
if (collisionRect.top > rect.top) {
|
37
|
+
filteredContainers.push(entry);
|
38
|
+
}
|
39
|
+
break;
|
40
|
+
case KeyboardCode.Left:
|
41
|
+
if (collisionRect.left >= rect.left + rect.width) {
|
42
|
+
filteredContainers.push(entry);
|
43
|
+
}
|
44
|
+
break;
|
45
|
+
case KeyboardCode.Right:
|
46
|
+
if (collisionRect.left + collisionRect.width <= rect.left) {
|
47
|
+
filteredContainers.push(entry);
|
48
|
+
}
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
});
|
52
|
+
const collisions = closestCorners({
|
53
|
+
active,
|
54
|
+
collisionRect: collisionRect,
|
55
|
+
droppableRects,
|
56
|
+
droppableContainers: filteredContainers,
|
57
|
+
pointerCoordinates: null
|
58
|
+
});
|
59
|
+
const closestId = getFirstCollision(collisions, 'id');
|
60
|
+
if (closestId != null) {
|
61
|
+
const newDroppable = droppableContainers.get(closestId);
|
62
|
+
const newNode = newDroppable === null || newDroppable === void 0 ? void 0 : newDroppable.node.current;
|
63
|
+
const newRect = newDroppable === null || newDroppable === void 0 ? void 0 : newDroppable.rect.current;
|
64
|
+
if (newNode && newRect) {
|
65
|
+
if (newDroppable.id === 'placeholder') {
|
66
|
+
return {
|
67
|
+
x: newRect.left + (newRect.width - collisionRect.width) / 2,
|
68
|
+
y: newRect.top + (newRect.height - collisionRect.height) / 2
|
69
|
+
};
|
70
|
+
}
|
71
|
+
if (((_a = newDroppable.data.current) === null || _a === void 0 ? void 0 : _a.type) === 'container') {
|
72
|
+
return {
|
73
|
+
x: newRect.left + 20,
|
74
|
+
y: newRect.top + 74
|
75
|
+
};
|
76
|
+
}
|
77
|
+
return {
|
78
|
+
x: newRect.left,
|
79
|
+
y: newRect.top
|
80
|
+
};
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
return undefined;
|
85
|
+
};
|
86
|
+
//# sourceMappingURL=getter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../src/components/exam/getter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,YAAY,EAGb,MAAM,eAAe,CAAA;AAEtB,MAAM,UAAU,GAAa,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;AAExG,MAAM,CAAC,MAAM,gBAAgB,GAA6B,CACxD,KAAK,EACL,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,EAAE,EAC3E,EAAE;;IACF,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,cAAc,EAAE,CAAA;QAEtB,IAAI,CAAC,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;YAC9B,OAAM;QACR,CAAC;QAED,MAAM,kBAAkB,GAAyB,EAAE,CAAA;QAEnD,mBAAmB,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;;YAC/C,IAAI,CAAC,KA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,EAAE,CAAC;oBACpD,OAAO;wBACL,CAAC,EAAE,OAAO,CAAC,IAAI,GAAG,EAAE;wBACpB,CAAC,EAAE,OAAO,CAAC,GAAG,GAAG,EAAE;qBACpB,CAAA;gBACH,CAAC;gBAED,OAAO;oBACL,CAAC,EAAE,OAAO,CAAC,IAAI;oBACf,CAAC,EAAE,OAAO,CAAC,GAAG;iBACf,CAAA;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AnnotatableGradingAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/AnnotatableGradingAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,8BAoCjE"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { AnnotationContext } from '../context/AnnotationProvider';
|
3
|
+
export function AnnotatableGradingAnswer(props) {
|
4
|
+
const path = 'pregrading';
|
5
|
+
const answer = props.answer.value;
|
6
|
+
console.log(props.answer);
|
7
|
+
const annotationContextData = useContext(AnnotationContext);
|
8
|
+
const { newAnnotation, annotations, } = annotationContextData;
|
9
|
+
const canNotBeAnnotated = (annotationContextData === null || annotationContextData === void 0 ? void 0 : annotationContextData.annotations) === undefined || answer.length === 0;
|
10
|
+
if (canNotBeAnnotated) {
|
11
|
+
return answer;
|
12
|
+
}
|
13
|
+
const newAnnotationForThisNode = (newAnnotation === null || newAnnotation === void 0 ? void 0 : newAnnotation.annotationParts.some(p => p.annotationAnchor === path))
|
14
|
+
? newAnnotation
|
15
|
+
: null;
|
16
|
+
const thisNodeAnnotations = [
|
17
|
+
...((annotations === null || annotations === void 0 ? void 0 : annotations[path]) || []),
|
18
|
+
...(newAnnotationForThisNode ? [newAnnotationForThisNode] : [])
|
19
|
+
];
|
20
|
+
console.log(answer);
|
21
|
+
console.log(thisNodeAnnotations);
|
22
|
+
return (React.createElement("span", { className: "e-annotatable", "data-annotation-path": path, "data-testid": "123" }));
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=AnnotatableGradingAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AnnotatableGradingAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/AnnotatableGradingAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAGjE,MAAM,UAAU,wBAAwB,CAAC,KAAyB;IAChE,MAAM,IAAI,GAAG,YAAY,CAAA;IACzB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAA;IAEjC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAEzB,MAAM,qBAAqB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC3D,MAAM,EAAE,aAAa,EAAE,WAAW,GAAI,GAAG,qBAAqB,CAAA;IAE9D,MAAM,iBAAiB,GAAG,CAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,WAAW,MAAK,SAAS,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAA;IAEjG,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,wBAAwB,GAAG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,KAAK,IAAI,CAAC;QACpG,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,IAAI,CAAA;IAER,MAAM,mBAAmB,GAAG;QAC1B,GAAG,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,IAAI,CAAC,KAAI,EAAE,CAAC;QAC9B,GAAG,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAA;IAED,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAEhC,OAAO,CACL,8BAAM,SAAS,EAAC,eAAe,0BAAuB,IAAI,iBAAc,KAAK,GAMtE,CACR,CAAA;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CorrectDNDAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/CorrectDNDAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAK/D,eAAO,MAAM,iBAAiB,kCAAmC,kBAAkB,sBA+BlF,CAAA"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { queryAll } from '../../dom-utils';
|
3
|
+
import { ResultsContext } from '../context/ResultsContext';
|
4
|
+
import { DNDAnswerCommon } from '../shared/DNDAnswerCommon';
|
5
|
+
export const CorrectDNDAnswers = ({ element, renderChildNodes }) => {
|
6
|
+
var _a;
|
7
|
+
const { gradingStructure } = useContext(ResultsContext);
|
8
|
+
const dndAnswerOptions = queryAll(element, 'dnd-answer-option');
|
9
|
+
const answerOptionsByOptionId = dndAnswerOptions.reduce((acc, el) => {
|
10
|
+
const optionId = el.getAttribute('option-id');
|
11
|
+
return { ...acc, [optionId]: el };
|
12
|
+
}, {});
|
13
|
+
const displayNumber = element.getAttribute('display-number');
|
14
|
+
const questionId = Number(element.getAttribute('question-id'));
|
15
|
+
const thisQuestion = gradingStructure === null || gradingStructure === void 0 ? void 0 : gradingStructure.questions.find(q => q.displayNumber === displayNumber);
|
16
|
+
const options = ((_a = thisQuestion === null || thisQuestion === void 0 ? void 0 : thisQuestion.choices.find(c => c.id === questionId)) === null || _a === void 0 ? void 0 : _a.options) || [];
|
17
|
+
const correctOptionIds = options === null || options === void 0 ? void 0 : options.filter(o => o.correct).map(o => o.id);
|
18
|
+
return (React.createElement(React.Fragment, null,
|
19
|
+
React.createElement("span", { className: "droppable-title align-right" }, "Oikeat vastaukset"),
|
20
|
+
React.createElement(DNDAnswerCommon, { renderChildNodes: renderChildNodes, items: correctOptionIds, answerOptionsByQuestionId: answerOptionsByOptionId, correctIds: correctOptionIds, questionId: questionId, classes: { 'correct-answers': true } })));
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=CorrectDNDAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CorrectDNDAnswer.js","sourceRoot":"","sources":["../../../src/components/results/CorrectDNDAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB,EAAE,EAAE;;IACrF,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACvD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;IAE/D,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CACrD,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE;QACV,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;QAC9C,OAAO,EAAE,GAAG,GAAG,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,MAAM,eAAe,CAAA;AAChD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAK/D,eAAO,MAAM,SAAS,gGAOnB;IACD,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC5D,UAAU,EAAE,gBAAgB,CAAA;IAC5B,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,
|
1
|
+
{"version":3,"file":"DNDAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/DNDAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAK/D,eAAO,MAAM,SAAS,gGAOnB;IACD,gBAAgB,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;IACxD,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;IAC5D,UAAU,EAAE,gBAAgB,CAAA;IAC5B,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,sBAiCA,CAAA"}
|
@@ -1,21 +1,23 @@
|
|
1
1
|
import React, { useContext } from 'react';
|
2
2
|
import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
|
3
|
-
import {
|
3
|
+
import { DNDAnswerDroppableCommon } from '../shared/DNDAnswerDroppableCommon';
|
4
4
|
import ResultsExamQuestionAutoScore from './internal/QuestionAutoScore';
|
5
5
|
export const DNDAnswer = ({ renderChildNodes, items, answerOptionsByQuestionId, questionId, displayNumber, maxScore }) => {
|
6
|
-
var _a, _b, _c;
|
6
|
+
var _a, _b, _c, _d;
|
7
7
|
const questionIdNumber = Number(questionId);
|
8
8
|
const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
|
9
|
-
|
9
|
+
console.log(gradingStructure);
|
10
|
+
const hasAnswer = !!answersByQuestionId && ((_a = answersByQuestionId[questionIdNumber]) === null || _a === void 0 ? void 0 : _a.value);
|
11
|
+
const answer = hasAnswer ? answersByQuestionId[questionIdNumber] : undefined;
|
10
12
|
const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionIdNumber);
|
11
|
-
const scoreValue = (answer === null || answer === void 0 ? void 0 : answer.value)
|
13
|
+
const scoreValue = !(answer === null || answer === void 0 ? void 0 : answer.value)
|
12
14
|
? undefined
|
13
|
-
: ((
|
14
|
-
const thisQuestion = gradingStructure.questions.find(q => q.displayNumber === displayNumber);
|
15
|
-
const options = ((
|
16
|
-
const correctOptionIds = options.filter(o => o.correct).map(o => o.id);
|
15
|
+
: ((_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);
|
16
|
+
const thisQuestion = gradingStructure === null || gradingStructure === void 0 ? void 0 : gradingStructure.questions.find(q => q.displayNumber === displayNumber);
|
17
|
+
const options = ((_d = thisQuestion === null || thisQuestion === void 0 ? void 0 : thisQuestion.choices.find(c => c.id === questionIdNumber)) === null || _d === void 0 ? void 0 : _d.options) || [];
|
18
|
+
const correctOptionIds = options === null || options === void 0 ? void 0 : options.filter(o => o.correct).map(o => o.id);
|
17
19
|
return (React.createElement(React.Fragment, null,
|
18
|
-
React.createElement(
|
20
|
+
React.createElement(DNDAnswerDroppableCommon, { renderChildNodes: renderChildNodes, items: items, answerOptionsByQuestionId: answerOptionsByQuestionId, questionId: questionId, correctIds: correctOptionIds }),
|
19
21
|
React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber, questionId: questionIdNumber })));
|
20
22
|
};
|
21
23
|
//# sourceMappingURL=DNDAnswer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswer.js","sourceRoot":"","sources":["../../../src/components/results/DNDAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"DNDAnswer.js","sourceRoot":"","sources":["../../../src/components/results/DNDAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAA;AAC7E,OAAO,4BAA4B,MAAM,8BAA8B,CAAA;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,UAAU,EACV,aAAa,EACb,QAAQ,EAQT,EAAE,EAAE;;IACH,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IAC3C,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAC5E,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IAC7B,MAAM,SAAS,GAAG,CAAC,CAAC,mBAAmB,KAAI,MAAA,mBAAmB,CAAC,gBAAgB,CAAC,0CAAE,KAAK,CAAA,CAAA;IACvF,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC5E,MAAM,MAAM,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aAAa,EAC5B,UAAU,EAAE,gBAAgB,GAC5B,CACD,CACJ,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DNDAnswerOptionResults.d.ts","sourceRoot":"","sources":["../../../src/components/results/DNDAnswerOptionResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAG1C,eAAO,MAAM,eAAe,kCAAmC,kBAAkB,sBAEhF,CAAA"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { DNDAnswerOptionCommon } from '../shared/DNDAnswerOptionCommon';
|
3
|
+
export const DNDAnswerOption = ({ element, renderChildNodes }) => (React.createElement(DNDAnswerOptionCommon, { element: element, renderChildNodes: renderChildNodes }));
|
4
|
+
//# sourceMappingURL=DNDAnswerOptionResults.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DNDAnswerOptionResults.js","sourceRoot":"","sources":["../../../src/components/results/DNDAnswerOptionResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAEvE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB,EAAE,EAAE,CAAC,CACpF,oBAAC,qBAAqB,IAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,CAChF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AnnotationWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AnnotationWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAyBpF,CAAA"}
|