@digabi/exam-engine-core 23.6.3 → 23.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/__tests__/annotations.test.d.ts +2 -0
  2. package/dist/__tests__/annotations.test.d.ts.map +1 -0
  3. package/dist/__tests__/annotations.test.js +306 -0
  4. package/dist/__tests__/annotations.test.js.map +1 -0
  5. package/dist/__tests__/playwright/Annotations.test.d.ts +2 -0
  6. package/dist/__tests__/playwright/Annotations.test.d.ts.map +1 -0
  7. package/dist/__tests__/playwright/Annotations.test.js +201 -0
  8. package/dist/__tests__/playwright/Annotations.test.js.map +1 -0
  9. package/dist/__tests__/playwright/attachments/Attachments.test.d.ts +2 -0
  10. package/dist/__tests__/playwright/attachments/Attachments.test.d.ts.map +1 -0
  11. package/dist/__tests__/playwright/attachments/Attachments.test.js +30 -0
  12. package/dist/__tests__/playwright/attachments/Attachments.test.js.map +1 -0
  13. package/dist/__tests__/playwright/exam/Exam.test.d.ts +2 -0
  14. package/dist/__tests__/playwright/exam/Exam.test.d.ts.map +1 -0
  15. package/dist/__tests__/playwright/exam/Exam.test.js +30 -0
  16. package/dist/__tests__/playwright/exam/Exam.test.js.map +1 -0
  17. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.d.ts +2 -0
  18. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.d.ts.map +1 -0
  19. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.js +30 -0
  20. package/dist/__tests__/playwright/grading-instructions/GradingInstructions.test.js.map +1 -0
  21. package/dist/__tests__/playwright/stories/Annotations.story.d.ts +15 -0
  22. package/dist/__tests__/playwright/stories/Annotations.story.d.ts.map +1 -0
  23. package/dist/__tests__/playwright/stories/Annotations.story.js +27 -0
  24. package/dist/__tests__/playwright/stories/Annotations.story.js.map +1 -0
  25. package/dist/__tests__/playwright/stories/attachments/Attachments.story.d.ts +13 -0
  26. package/dist/__tests__/playwright/stories/attachments/Attachments.story.d.ts.map +1 -0
  27. package/dist/__tests__/playwright/stories/attachments/Attachments.story.js +17 -0
  28. package/dist/__tests__/playwright/stories/attachments/Attachments.story.js.map +1 -0
  29. package/dist/__tests__/playwright/stories/exam/Exam.story.d.ts +12 -0
  30. package/dist/__tests__/playwright/stories/exam/Exam.story.d.ts.map +1 -0
  31. package/dist/__tests__/playwright/stories/exam/Exam.story.js +56 -0
  32. package/dist/__tests__/playwright/stories/exam/Exam.story.js.map +1 -0
  33. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.d.ts +13 -0
  34. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.d.ts.map +1 -0
  35. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.js +16 -0
  36. package/dist/__tests__/playwright/stories/grading-intructions/GradingInstructions.story.js.map +1 -0
  37. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  38. package/dist/assets/closeButton.svg +1 -0
  39. package/dist/assets/collapse.svg +12 -0
  40. package/dist/assets/expand.svg +12 -0
  41. package/dist/assets/helpButton.svg +9 -0
  42. package/dist/assets/redoButton.svg +5 -0
  43. package/dist/assets/undoButton.svg +5 -0
  44. package/dist/components/RenderIf.d.ts.map +1 -1
  45. package/dist/components/context/withContext.d.ts.map +1 -1
  46. package/dist/components/exam/DNDAllOptions.d.ts.map +1 -1
  47. package/dist/components/exam/DNDAnswerContainer.d.ts.map +1 -1
  48. package/dist/components/exam/DNDAnswerOptionDraggable.d.ts.map +1 -1
  49. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  50. package/dist/components/exam/StudentNameHeader.d.ts.map +1 -1
  51. package/dist/components/exam/UndoView.d.ts.map +1 -1
  52. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -1
  53. package/dist/components/results/CorrectDNDAnswers.d.ts.map +1 -1
  54. package/dist/components/results/DNDAnswerContainer.d.ts +4 -0
  55. package/dist/components/results/DNDAnswerContainer.d.ts.map +1 -0
  56. package/dist/components/results/DNDAnswerContainer.js +22 -0
  57. package/dist/components/results/DNDAnswerContainer.js.map +1 -0
  58. package/dist/components/results/DNDAnswerOption.d.ts.map +1 -1
  59. package/dist/components/results/EndExamSession.d.ts.map +1 -1
  60. package/dist/components/shared/AnnotatableText.d.ts +5 -0
  61. package/dist/components/shared/AnnotatableText.d.ts.map +1 -0
  62. package/dist/components/shared/AnnotatableText.js +25 -0
  63. package/dist/components/shared/AnnotatableText.js.map +1 -0
  64. package/dist/components/shared/AnnotationImageMark.d.ts +16 -0
  65. package/dist/components/shared/AnnotationImageMark.d.ts.map +1 -0
  66. package/dist/components/shared/AnnotationImageMark.js +99 -0
  67. package/dist/components/shared/AnnotationImageMark.js.map +1 -0
  68. package/dist/components/shared/AnnotationMark.d.ts +9 -0
  69. package/dist/components/shared/AnnotationMark.d.ts.map +1 -0
  70. package/dist/components/shared/AnnotationMark.js +14 -0
  71. package/dist/components/shared/AnnotationMark.js.map +1 -0
  72. package/dist/components/shared/AnnotationPopup.d.ts +3 -0
  73. package/dist/components/shared/AnnotationPopup.d.ts.map +1 -0
  74. package/dist/components/shared/AnnotationPopup.js +24 -0
  75. package/dist/components/shared/AnnotationPopup.js.map +1 -0
  76. package/dist/components/shared/AnnotationTextMark.d.ts +11 -0
  77. package/dist/components/shared/AnnotationTextMark.d.ts.map +1 -0
  78. package/dist/components/shared/AnnotationTextMark.js +21 -0
  79. package/dist/components/shared/AnnotationTextMark.js.map +1 -0
  80. package/dist/components/shared/AttachmentLink.d.ts.map +1 -1
  81. package/dist/components/shared/AttachmentLinks.d.ts.map +1 -1
  82. package/dist/components/shared/DNDAnswerContainer.d.ts.map +1 -1
  83. package/dist/components/shared/DNDDroppable.d.ts.map +1 -1
  84. package/dist/components/shared/DNDTitleAndDroppable.d.ts.map +1 -1
  85. package/dist/components/shared/TableOfContents.d.ts.map +1 -1
  86. package/dist/components/shared/markText.d.ts +6 -0
  87. package/dist/components/shared/markText.d.ts.map +1 -0
  88. package/dist/components/shared/markText.js +77 -0
  89. package/dist/components/shared/markText.js.map +1 -0
  90. package/dist/createRenderChildNodes.d.ts.map +1 -1
  91. package/dist/dom-utils.d.ts.map +1 -1
  92. package/dist/eslint.config.d.ts +22 -0
  93. package/dist/eslint.config.d.ts.map +1 -0
  94. package/dist/eslint.config.js +31 -0
  95. package/dist/eslint.config.js.map +1 -0
  96. package/dist/i18n/exam_titles_fi-FI.d.ts +46 -0
  97. package/dist/i18n/exam_titles_fi-FI.d.ts.map +1 -0
  98. package/dist/i18n/exam_titles_fi-FI.js +46 -0
  99. package/dist/i18n/exam_titles_fi-FI.js.map +1 -0
  100. package/dist/i18n/exam_titles_fi-FI.json +45 -0
  101. package/dist/i18n/exam_titles_sv-FI.d.ts +46 -0
  102. package/dist/i18n/exam_titles_sv-FI.d.ts.map +1 -0
  103. package/dist/i18n/exam_titles_sv-FI.js +46 -0
  104. package/dist/i18n/exam_titles_sv-FI.js.map +1 -0
  105. package/dist/i18n/exam_titles_sv-FI.json +45 -0
  106. package/dist/i18n/exams.d.ts +11 -0
  107. package/dist/i18n/exams.d.ts.map +1 -0
  108. package/dist/i18n/exams.js +10 -0
  109. package/dist/i18n/exams.js.map +1 -0
  110. package/dist/i18n/index.d.ts.map +1 -1
  111. package/dist/main-bundle.js +164 -164
  112. package/dist/main.css +1 -1
  113. package/dist/renderAnnotations.js +7 -1
  114. package/dist/renderAnnotations.js.map +1 -1
  115. package/dist/store/answers/actions.d.ts.map +1 -1
  116. package/dist/store/audio/actions.d.ts.map +1 -1
  117. package/dist/store/cas/actions.d.ts.map +1 -1
  118. package/dist/store/selectors.d.ts.map +1 -1
  119. package/package.json +2 -2
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
8
+ const utils_1 = require("../utils/utils");
9
+ const Exam_story_1 = require("../stories/exam/Exam.story");
10
+ experimental_ct_react_1.test.describe('Annotations', () => {
11
+ let masteredExam;
12
+ experimental_ct_react_1.test.beforeAll(async () => {
13
+ masteredExam = await (0, utils_1.setupMasteredExam)('FF');
14
+ });
15
+ (0, experimental_ct_react_1.test)('text can be annotated inside exam', async ({ mount, page }) => {
16
+ let callbackArg = '';
17
+ const component = await mount(react_1.default.createElement(Exam_story_1.ExamStory, { masteredExam: masteredExam, annotations: [], onClickAnnotation: () => { }, onSaveAnnotation: (_newAnnotation, comment) => {
18
+ callbackArg = comment;
19
+ } }));
20
+ const annottatableElement = component.locator('.e-annotatable').first();
21
+ const textbox = component.locator('.comment-content');
22
+ await (0, experimental_ct_react_1.expect)(annottatableElement).toBeVisible();
23
+ await (0, utils_1.annotateText)(annottatableElement, page);
24
+ await (0, experimental_ct_react_1.expect)(component.getByTestId('e-popup')).toBeVisible();
25
+ await textbox.fill('New comment');
26
+ await component.getByText('Tallenna').click();
27
+ (0, experimental_ct_react_1.expect)(callbackArg).toBe('New comment');
28
+ });
29
+ });
30
+ //# sourceMappingURL=Exam.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Exam.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/Exam.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,6EAAgE;AAChE,0CAAgE;AAChE,2DAAsD;AAEtD,4BAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAChC,IAAI,YAA2D,CAAA;IAE/D,4BAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACxB,YAAY,GAAG,MAAM,IAAA,yBAAiB,EAAC,IAAI,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;IAEF,IAAA,4BAAI,EAAC,mCAAmC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QAClE,IAAI,WAAW,GAAG,EAAE,CAAA;QACpB,MAAM,SAAS,GAAG,MAAM,KAAK,CAC3B,8BAAC,sBAAS,IACR,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,EAAE,EACf,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC,EAC3B,gBAAgB,EAAE,CAAC,cAAc,EAAE,OAAe,EAAE,EAAE;gBACpD,WAAW,GAAG,OAAO,CAAA;YACvB,CAAC,GACD,CACH,CAAA;QACD,MAAM,mBAAmB,GAAG,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAA;QACvE,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;QAErD,MAAM,IAAA,8BAAM,EAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE,CAAA;QAC/C,MAAM,IAAA,oBAAY,EAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;QAC7C,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAE5D,MAAM,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACjC,MAAM,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAA;QAC7C,IAAA,8BAAM,EAAC,WAAW,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GradingInstructions.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstructions.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/grading-instructions/GradingInstructions.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
8
+ const utils_1 = require("../utils/utils");
9
+ const GradingInstructions_story_1 = require("../stories/grading-intructions/GradingInstructions.story");
10
+ experimental_ct_react_1.test.describe('Grading Instructions', () => {
11
+ let masteredExam;
12
+ experimental_ct_react_1.test.beforeAll(async () => {
13
+ masteredExam = await (0, utils_1.setupMasteredExam)('FF');
14
+ });
15
+ (0, experimental_ct_react_1.test)('text can be annotated inside grading instructions', async ({ mount, page }) => {
16
+ let callbackArg = '';
17
+ const component = await mount(react_1.default.createElement(GradingInstructions_story_1.GradingInstructionStory, { masteredExam: masteredExam, annotations: [], onClickAnnotation: () => { }, onSaveAnnotation: (_newAnnotation, comment) => {
18
+ callbackArg = comment;
19
+ } }));
20
+ const annottatableElement = component.locator('.e-annotatable').first();
21
+ const textbox = component.locator('.comment-content');
22
+ await (0, experimental_ct_react_1.expect)(annottatableElement).toBeVisible();
23
+ await (0, utils_1.annotateText)(annottatableElement, page);
24
+ await (0, experimental_ct_react_1.expect)(component.getByTestId('e-popup')).toBeVisible();
25
+ await textbox.fill('New comment');
26
+ await component.getByText('Tallenna').click();
27
+ (0, experimental_ct_react_1.expect)(callbackArg).toBe('New comment');
28
+ });
29
+ });
30
+ //# sourceMappingURL=GradingInstructions.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstructions.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/grading-instructions/GradingInstructions.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,6EAAgE;AAChE,0CAAgE;AAChE,wGAAkG;AAElG,4BAAI,CAAC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACzC,IAAI,YAA2D,CAAA;IAE/D,4BAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACxB,YAAY,GAAG,MAAM,IAAA,yBAAiB,EAAC,IAAI,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;IAEF,IAAA,4BAAI,EAAC,mDAAmD,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QAClF,IAAI,WAAW,GAAG,EAAE,CAAA;QACpB,MAAM,SAAS,GAAG,MAAM,KAAK,CAC3B,8BAAC,mDAAuB,IACtB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,EAAE,EACf,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC,EAC3B,gBAAgB,EAAE,CAAC,cAAc,EAAE,OAAe,EAAE,EAAE;gBACpD,WAAW,GAAG,OAAO,CAAA;YACvB,CAAC,GACD,CACH,CAAA;QACD,MAAM,mBAAmB,GAAG,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAA;QACvE,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;QAErD,MAAM,IAAA,8BAAM,EAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE,CAAA;QAC/C,MAAM,IAAA,oBAAY,EAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;QAC7C,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAE5D,MAAM,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACjC,MAAM,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAA;QAC7C,IAAA,8BAAM,EAAC,WAAW,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { MasteringResult } from '@digabi/exam-engine-mastering';
3
+ import { ExamAnnotation, NewExamAnnotation } from '../../../src';
4
+ interface AnnotationsStoryProps {
5
+ masteredExam: MasteringResult;
6
+ annotations?: ExamAnnotation[];
7
+ onClickAnnotation?: (e: React.MouseEvent<HTMLElement, MouseEvent>, annotationId: number) => void;
8
+ onSaveAnnotation?: {
9
+ fn: (annotation: NewExamAnnotation, comment: string) => void;
10
+ result?: string;
11
+ };
12
+ }
13
+ export declare const AnnotationsStory: React.FC<AnnotationsStoryProps>;
14
+ export {};
15
+ //# sourceMappingURL=Annotations.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotations.story.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/stories/Annotations.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAO/D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,UAAU,qBAAqB;IAC7B,YAAY,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,cAAc,EAAE,CAAA;IAC9B,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAChG,gBAAgB,CAAC,EAAE;QAAE,EAAE,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACrG;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA6B5D,CAAA"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AnnotationsStory = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Exam_1 = require("../../../src/components/exam/Exam");
9
+ const ExamComponentWrapper_1 = require("../utils/ExamComponentWrapper");
10
+ const parseExam_1 = __importDefault(require("../../../src/parser/parseExam"));
11
+ const dom_utils_1 = require("../../../src/dom-utils");
12
+ const Question_1 = __importDefault(require("../../../src/components/exam/Question"));
13
+ const AnnotationProvider_1 = require("../../../src/components/context/AnnotationProvider");
14
+ const AnnotationsStory = ({ masteredExam, annotations, onClickAnnotation, onSaveAnnotation }) => {
15
+ const doc = (0, parseExam_1.default)(masteredExam.xml, true);
16
+ const [_question1, question2] = (0, dom_utils_1.queryAll)(doc.documentElement, 'question', false);
17
+ return (react_1.default.createElement(ExamComponentWrapper_1.ExamComponentWrapper, { doc: doc, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}` },
18
+ react_1.default.createElement(AnnotationProvider_1.AnnotationProvider, { annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation
19
+ ? (...args) => {
20
+ onSaveAnnotation.fn(...args);
21
+ return Promise.resolve(onSaveAnnotation.result);
22
+ }
23
+ : undefined },
24
+ react_1.default.createElement(Question_1.default, { element: question2, renderChildNodes: Exam_1.renderChildNodes }))));
25
+ };
26
+ exports.AnnotationsStory = AnnotationsStory;
27
+ //# sourceMappingURL=Annotations.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotations.story.js","sourceRoot":"","sources":["../../../../__tests__/playwright/stories/Annotations.story.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4DAAoE;AACpE,wEAAoE;AACpE,8EAAqD;AACrD,sDAAiD;AACjD,qFAA4D;AAC5D,2FAAuF;AAUhF,MAAM,gBAAgB,GAAoC,CAAC,EAChE,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACjB,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,mBAAS,EAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC7C,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,IAAA,oBAAQ,EAAC,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;IAChF,OAAO,CACL,8BAAC,2CAAoB,IACnB,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE;QAE5F,8BAAC,uCAAkB,IACjB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EACd,gBAAgB;gBACd,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE;oBACV,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;oBAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAA;gBACjD,CAAC;gBACH,CAAC,CAAC,SAAS;YAGf,8BAAC,kBAAQ,IAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,uBAAgB,GAAI,CACjD,CACA,CACxB,CAAA;AACH,CAAC,CAAA;AA7BY,QAAA,gBAAgB,oBA6B5B"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { MasteringResult } from '@digabi/exam-engine-mastering';
3
+ import { ExamAnnotation, NewExamAnnotation } from '../../../../src';
4
+ import '../../../../src/css/main.less';
5
+ interface AttachmentsStoryProps {
6
+ masteredExam: MasteringResult;
7
+ annotations?: ExamAnnotation[];
8
+ onClickAnnotation?: (e: React.MouseEvent<HTMLElement, MouseEvent>, annotationId: number) => void;
9
+ onSaveAnnotation?: (annotation: NewExamAnnotation, comment: string) => void;
10
+ }
11
+ export declare const AttachmentsStory: React.FC<AttachmentsStoryProps>;
12
+ export {};
13
+ //# sourceMappingURL=Attachments.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attachments.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/attachments/Attachments.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,+BAA+B,CAAA;AAEtC,UAAU,qBAAqB;IAC7B,YAAY,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,cAAc,EAAE,CAAA;IAC9B,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAChG,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkB5D,CAAA"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AttachmentsStory = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const parseExam_1 = __importDefault(require("../../../../src/parser/parseExam"));
9
+ const Attachments_1 = __importDefault(require("../../../../src/components/attachments/Attachments"));
10
+ const examServerApi_1 = require("../../../examServerApi");
11
+ require("../../../../src/css/main.less");
12
+ const AttachmentsStory = ({ masteredExam, annotations, onClickAnnotation, onSaveAnnotation }) => {
13
+ const doc = (0, parseExam_1.default)(masteredExam.xml, true);
14
+ return (react_1.default.createElement(Attachments_1.default, { doc: doc, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}`, attachmentsURL: "/attachments", annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation, examServerApi: examServerApi_1.examServerApi }));
15
+ };
16
+ exports.AttachmentsStory = AttachmentsStory;
17
+ //# sourceMappingURL=Attachments.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Attachments.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/attachments/Attachments.story.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,iFAAwD;AACxD,qGAA4E;AAE5E,0DAAsD;AACtD,yCAAsC;AAS/B,MAAM,gBAAgB,GAAoC,CAAC,EAChE,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACjB,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,mBAAS,EAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC7C,OAAO,CACL,8BAAC,qBAAW,IACV,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE,EAC5F,cAAc,EAAC,cAAc,EAC7B,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,6BAAa,GAC5B,CACH,CAAA;AACH,CAAC,CAAA;AAlBY,QAAA,gBAAgB,oBAkB5B"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { MasteringResult } from '@digabi/exam-engine-mastering';
3
+ import { ExamAnnotation, NewExamAnnotation } from '../../../../src';
4
+ interface ExamStoryProps {
5
+ masteredExam: MasteringResult;
6
+ annotations?: ExamAnnotation[];
7
+ onClickAnnotation?: (e: React.MouseEvent<HTMLElement, MouseEvent>, annotationId: number) => void;
8
+ onSaveAnnotation?: (annotation: NewExamAnnotation, comment: string) => void;
9
+ }
10
+ export declare const ExamStory: React.FC<ExamStoryProps>;
11
+ export {};
12
+ //# sourceMappingURL=Exam.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Exam.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/Exam.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAI/D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGnE,UAAU,cAAc;IACtB,YAAY,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,cAAc,EAAE,CAAA;IAC9B,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAChG,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkC9C,CAAA"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ExamStory = void 0;
40
+ const react_1 = __importDefault(require("react"));
41
+ const Exam_1 = __importStar(require("../../../../src/components/exam/Exam"));
42
+ const ExamComponentWrapper_1 = require("../../utils/ExamComponentWrapper");
43
+ const parseExam_1 = __importDefault(require("../../../../src/parser/parseExam"));
44
+ const examServerApi_1 = require("../../../examServerApi");
45
+ const ExamStory = ({ masteredExam, annotations, onClickAnnotation, onSaveAnnotation }) => {
46
+ const doc = (0, parseExam_1.default)(masteredExam.xml, true);
47
+ return (react_1.default.createElement(ExamComponentWrapper_1.ExamComponentWrapper, { doc: doc, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}` },
48
+ react_1.default.createElement(Exam_1.default, { doc: doc, renderChildNodes: Exam_1.renderChildNodes, annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}`, answers: [], attachmentsURL: "/attachments", casStatus: "forbidden", examServerApi: examServerApi_1.examServerApi, studentName: "[Kokelaan Nimi]", showUndoView: false, undoViewProps: {
49
+ questionId: 0,
50
+ title: '',
51
+ close: () => undefined,
52
+ restoreAnswer: () => undefined
53
+ } })));
54
+ };
55
+ exports.ExamStory = ExamStory;
56
+ //# sourceMappingURL=Exam.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Exam.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/Exam.story.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,6EAA6E;AAC7E,2EAAuE;AACvE,iFAAwD;AAExD,0DAAsD;AAS/C,MAAM,SAAS,GAA6B,CAAC,EAClD,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACjB,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,mBAAS,EAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC7C,OAAO,CACL,8BAAC,2CAAoB,IACnB,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE;QAE5F,8BAAC,cAAI,IACH,GAAG,EAAE,GAAG,EACR,gBAAgB,EAAE,uBAAgB,EAClC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE,EAC5F,OAAO,EAAE,EAAE,EACX,cAAc,EAAC,cAAc,EAC7B,SAAS,EAAC,WAAW,EACrB,aAAa,EAAE,6BAAa,EAC5B,WAAW,EAAC,iBAAiB,EAC7B,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE;gBACb,UAAU,EAAE,CAAC;gBACb,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS;gBACtB,aAAa,EAAE,GAAG,EAAE,CAAC,SAAS;aAC/B,GACD,CACmB,CACxB,CAAA;AACH,CAAC,CAAA;AAlCY,QAAA,SAAS,aAkCrB"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { MasteringResult } from '@digabi/exam-engine-mastering';
3
+ import { ExamAnnotation, NewExamAnnotation } from '../../../../src';
4
+ import '../../../../src/css/main.less';
5
+ interface GradingInstructionsStoryProps {
6
+ masteredExam: MasteringResult;
7
+ annotations?: ExamAnnotation[];
8
+ onClickAnnotation?: (e: React.MouseEvent<HTMLElement, MouseEvent>, annotationId: number) => void;
9
+ onSaveAnnotation?: (annotation: NewExamAnnotation, comment: string) => void;
10
+ }
11
+ export declare const GradingInstructionStory: React.FC<GradingInstructionsStoryProps>;
12
+ export {};
13
+ //# sourceMappingURL=GradingInstructions.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstructions.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/grading-intructions/GradingInstructions.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,+BAA+B,CAAA;AAEtC,UAAU,6BAA6B;IACrC,YAAY,EAAE,eAAe,CAAA;IAC7B,WAAW,CAAC,EAAE,cAAc,EAAE,CAAA;IAC9B,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAChG,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAoB3E,CAAA"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GradingInstructionStory = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const parseExam_1 = __importDefault(require("../../../../src/parser/parseExam"));
9
+ const GradingInstructions_1 = __importDefault(require("../../../../src/components/grading-instructions/GradingInstructions"));
10
+ require("../../../../src/css/main.less");
11
+ const GradingInstructionStory = ({ masteredExam, annotations, onClickAnnotation, onSaveAnnotation }) => {
12
+ const doc = (0, parseExam_1.default)(masteredExam.xml, true);
13
+ return (react_1.default.createElement(GradingInstructions_1.default, { doc: doc, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}`, answers: [], attachmentsURL: "/attachments", annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation ? (...args) => { var _a; return Promise.resolve((_a = onSaveAnnotation(...args)) !== null && _a !== void 0 ? _a : undefined); } : undefined }));
14
+ };
15
+ exports.GradingInstructionStory = GradingInstructionStory;
16
+ //# sourceMappingURL=GradingInstructions.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradingInstructions.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/grading-intructions/GradingInstructions.story.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,iFAAwD;AACxD,8HAAqG;AAErG,yCAAsC;AAS/B,MAAM,uBAAuB,GAA4C,CAAC,EAC/E,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACjB,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,mBAAS,EAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC7C,OAAO,CACL,8BAAC,6BAAmB,IAClB,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE,EAC5F,OAAO,EAAE,EAAE,EACX,cAAc,EAAC,cAAc,EAC7B,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EACd,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,WAAC,OAAA,OAAO,CAAC,OAAO,CAAC,MAAA,gBAAgB,CAAC,GAAG,IAAI,CAAC,mCAAI,SAAS,CAAC,CAAA,EAAA,CAAC,CAAC,CAAC,SAAS,GAErG,CACH,CAAA;AACH,CAAC,CAAA;AApBY,QAAA,uBAAuB,2BAoBnC"}