@digabi/exam-engine-core 23.2.1 → 23.2.2
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/context/ResultsContext.d.ts.map +1 -1
- package/dist/components/context/ResultsContext.js +2 -3
- package/dist/components/context/ResultsContext.js.map +1 -1
- package/dist/main-bundle.js +2 -2
- package/dist/main-bundle.js.LICENSE.txt +3 -3
- 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
- package/dist/assets/closeButton.svg +0 -1
- package/dist/assets/collapse.svg +0 -12
- package/dist/assets/expand.svg +0 -12
- package/dist/assets/helpButton.svg +0 -9
- package/dist/assets/redoButton.svg +0 -5
- package/dist/assets/undoButton.svg +0 -5
- package/dist/components/exam/AllDNDOptions.d.ts +0 -9
- package/dist/components/exam/AllDNDOptions.d.ts.map +0 -1
- package/dist/components/exam/AllDNDOptions.js +0 -12
- package/dist/components/exam/AllDNDOptions.js.map +0 -1
- package/dist/components/exam/DNDAnswer.d.ts +0 -20
- package/dist/components/exam/DNDAnswer.d.ts.map +0 -1
- package/dist/components/exam/DNDAnswer.js +0 -7
- package/dist/components/exam/DNDAnswer.js.map +0 -1
- package/dist/components/exam/DNDAnswerOption.d.ts +0 -4
- package/dist/components/exam/DNDAnswerOption.d.ts.map +0 -1
- package/dist/components/exam/DNDAnswerOption.js +0 -18
- package/dist/components/exam/DNDAnswerOption.js.map +0 -1
- package/dist/components/results/AudioPlaceholder.d.ts +0 -4
- package/dist/components/results/AudioPlaceholder.d.ts.map +0 -1
- package/dist/components/results/AudioPlaceholder.js +0 -25
- package/dist/components/results/AudioPlaceholder.js.map +0 -1
- package/dist/components/results/DNDAnswer.d.ts +0 -12
- package/dist/components/results/DNDAnswer.d.ts.map +0 -1
- package/dist/components/results/DNDAnswer.js +0 -21
- package/dist/components/results/DNDAnswer.js.map +0 -1
- package/dist/components/shared/DNDAnswerCommon.d.ts +0 -13
- package/dist/components/shared/DNDAnswerCommon.d.ts.map +0 -1
- package/dist/components/shared/DNDAnswerCommon.js +0 -30
- package/dist/components/shared/DNDAnswerCommon.js.map +0 -1
- package/dist/components/shared/DNDAnswerDroppable.d.ts +0 -13
- package/dist/components/shared/DNDAnswerDroppable.d.ts.map +0 -1
- package/dist/components/shared/DNDAnswerDroppable.js +0 -30
- package/dist/components/shared/DNDAnswerDroppable.js.map +0 -1
- package/dist/components/shared/DNDAnswerOptionCommon.d.ts +0 -7
- package/dist/components/shared/DNDAnswerOptionCommon.d.ts.map +0 -1
- package/dist/components/shared/DNDAnswerOptionCommon.js +0 -14
- package/dist/components/shared/DNDAnswerOptionCommon.js.map +0 -1
- package/dist/components/shared/DNDTitleAndAnswerCommon.d.ts +0 -13
- package/dist/components/shared/DNDTitleAndAnswerCommon.d.ts.map +0 -1
- package/dist/components/shared/DNDTitleAndAnswerCommon.js +0 -27
- package/dist/components/shared/DNDTitleAndAnswerCommon.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerDroppable.js","sourceRoot":"","sources":["../../../src/components/shared/DNDAnswerDroppable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,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|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../..';
|
3
|
-
export declare const DNDAnswerOptionCommon: ({ element, renderChildNodes, style, classes }: ExamComponentProps & {
|
4
|
-
style?: React.CSSProperties;
|
5
|
-
classes?: string[];
|
6
|
-
}) => React.JSX.Element;
|
7
|
-
//# sourceMappingURL=DNDAnswerOptionCommon.d.ts.map
|
@@ -1 +0,0 @@
|
|
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,14 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React from 'react';
|
3
|
-
import { query } from '../../dom-utils';
|
4
|
-
export const DNDAnswerOptionCommon = ({ element, renderChildNodes, style, classes = [] }) => {
|
5
|
-
const hasImages = !!query(element, 'image');
|
6
|
-
const hasFormula = !!query(element, 'formula');
|
7
|
-
const hasTitle = renderChildNodes(element).length > 0;
|
8
|
-
return (React.createElement("div", { className: classNames([...classes], {
|
9
|
-
'has-images': hasImages,
|
10
|
-
'has-formula': hasFormula
|
11
|
-
}), style: style },
|
12
|
-
React.createElement("div", { className: "option-content" }, !hasTitle ? React.createElement("i", { style: { color: 'grey' } }, "T\u00E4h\u00E4n tulee vastaus...") : renderChildNodes(element))));
|
13
|
-
};
|
14
|
-
//# sourceMappingURL=DNDAnswerOptionCommon.js.map
|
@@ -1 +0,0 @@
|
|
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,CAAC,CAAA;IAE9C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;IAErD,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CAAC,CAAC,GAAG,OAAO,CAAC,EAAE;YAClC,YAAY,EAAE,SAAS;YACvB,aAAa,EAAE,UAAU;SAC1B,CAAC,EACF,KAAK,EAAE,KAAK;QAEZ,6BAAK,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"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { UniqueIdentifier } from '@dnd-kit/core';
|
2
|
-
import React from 'react';
|
3
|
-
import { ExamComponentProps } from '../..';
|
4
|
-
import { ItemsState } from '../exam/DNDAnswer';
|
5
|
-
export declare const DNDTitleAndAnswerCommon: ({ element, renderChildNodes, items, answerOptionsByQuestionId, isInExam, hasAnswer }: {
|
6
|
-
element: Element;
|
7
|
-
renderChildNodes: ExamComponentProps["renderChildNodes"];
|
8
|
-
items: ItemsState;
|
9
|
-
answerOptionsByQuestionId: Record<UniqueIdentifier, Element>;
|
10
|
-
isInExam?: boolean;
|
11
|
-
hasAnswer?: boolean;
|
12
|
-
}) => React.JSX.Element;
|
13
|
-
//# sourceMappingURL=DNDTitleAndAnswerCommon.d.ts.map
|
@@ -1 +0,0 @@
|
|
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,27 +0,0 @@
|
|
1
|
-
import { useDroppable } from '@dnd-kit/core';
|
2
|
-
import classNames from 'classnames';
|
3
|
-
import React from 'react';
|
4
|
-
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 }) => {
|
9
|
-
const questionId = element.getAttribute('question-id');
|
10
|
-
const displayNumber = element.getAttribute('display-number');
|
11
|
-
const maxScore = getNumericAttribute(element, 'max-score');
|
12
|
-
const hasImages = !!query(element, 'image');
|
13
|
-
const titleElement = query(element, 'dnd-answer-title');
|
14
|
-
const hasTitle = titleElement && renderChildNodes(titleElement).length > 0;
|
15
|
-
const { setNodeRef, isOver } = useDroppable({ id: questionId });
|
16
|
-
return (React.createElement(SortableContext, { id: String(questionId), items: items[questionId] || [] },
|
17
|
-
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 },
|
21
|
-
React.createElement("div", { className: "anchor", id: `question-nr-${displayNumber}` }),
|
22
|
-
titleElement &&
|
23
|
-
(!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
|
-
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 }))))));
|
26
|
-
};
|
27
|
-
//# sourceMappingURL=DNDTitleAndAnswerCommon.js.map
|
@@ -1 +0,0 @@
|
|
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,m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