@digabi/exam-engine-core 20.5.0 → 20.5.1-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/components/context/GradingInstructionContext.d.ts +17 -0
  3. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -0
  4. package/dist/components/context/GradingInstructionContext.js +3 -0
  5. package/dist/components/context/GradingInstructionContext.js.map +1 -0
  6. package/dist/components/exam/FinishExam.d.ts.map +1 -1
  7. package/dist/components/exam/FinishExam.js +3 -7
  8. package/dist/components/exam/FinishExam.js.map +1 -1
  9. package/dist/components/exam/RichTextAnswer.d.ts +1 -1
  10. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  11. package/dist/components/exam/internal/ProgressBar.d.ts.map +1 -1
  12. package/dist/components/exam/internal/ProgressBar.js +1 -0
  13. package/dist/components/exam/internal/ProgressBar.js.map +1 -1
  14. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  15. package/dist/components/grading-instructions/AnswerGradingInstruction.js +7 -2
  16. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  17. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +5 -0
  18. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -0
  19. package/dist/components/grading-instructions/EditableGradingInstruction.js +39 -0
  20. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -0
  21. package/dist/components/grading-instructions/ExamGradingInstruction.d.ts.map +1 -1
  22. package/dist/components/grading-instructions/ExamGradingInstruction.js +7 -2
  23. package/dist/components/grading-instructions/ExamGradingInstruction.js.map +1 -1
  24. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +4 -0
  25. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -0
  26. package/dist/components/grading-instructions/GradingInstructionProvider.js +7 -0
  27. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -0
  28. package/dist/components/grading-instructions/GradingInstructions.d.ts +2 -1
  29. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  30. package/dist/components/grading-instructions/GradingInstructions.js +18 -15
  31. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  32. package/dist/i18n/index.d.ts +1 -2
  33. package/dist/i18n/index.d.ts.map +1 -1
  34. package/dist/i18n/index.js.map +1 -1
  35. package/dist/main-bundle.js +1 -1
  36. package/dist/store/audio/sagas.d.ts.map +1 -1
  37. package/dist/store/audio/sagas.js +3 -1
  38. package/dist/store/audio/sagas.js.map +1 -1
  39. package/dist/store/index.d.ts +1 -2
  40. package/dist/store/index.d.ts.map +1 -1
  41. package/package.json +3 -3
  42. package/dist/components/context/AnnotationContext.d.ts +0 -8
  43. package/dist/components/context/AnnotationContext.d.ts.map +0 -1
  44. package/dist/components/context/AnnotationContext.js +0 -3
  45. package/dist/components/context/AnnotationContext.js.map +0 -1
  46. package/dist/components/exam/ExamineExam.d.ts +0 -5
  47. package/dist/components/exam/ExamineExam.d.ts.map +0 -1
  48. package/dist/components/exam/ExamineExam.js +0 -20
  49. package/dist/components/exam/ExamineExam.js.map +0 -1
  50. package/dist/components/grading/reactAnnotation.d.ts +0 -4
  51. package/dist/components/grading/reactAnnotation.d.ts.map +0 -1
  52. package/dist/components/grading/reactAnnotation.js +0 -54
  53. package/dist/components/grading/reactAnnotation.js.map +0 -1
  54. package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
  55. package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
  56. package/dist/components/results/isExamFinishPageHook.js +0 -7
  57. package/dist/components/results/isExamFinishPageHook.js.map +0 -1
  58. package/dist/components/shared/CreateAnnotationPopup.d.ts +0 -6
  59. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +0 -1
  60. package/dist/components/shared/CreateAnnotationPopup.js +0 -11
  61. package/dist/components/shared/CreateAnnotationPopup.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.d.ts","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAWA,OAAO,EAAyB,aAAa,EAAE,MAAM,OAAO,CAAA;AA2E5D,MAAM,CAAC,OAAO,UAAW,SAAS,CAAC,aAAa,EAAE,aAAa,4EAE9D"}
1
+ {"version":3,"file":"sagas.d.ts","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAWA,OAAO,EAAyB,aAAa,EAAE,MAAM,OAAO,CAAA;AA6E5D,MAAM,CAAC,OAAO,UAAW,SAAS,CAAC,aAAa,EAAE,aAAa,4EAE9D"}
@@ -55,7 +55,9 @@ function* performPlayAudio(examServerApi, action) {
55
55
  yield delay(5000);
56
56
  yield put(hideAudioError(audio));
57
57
  }
58
- result.cleanup && result.cleanup();
58
+ if (result.cleanup) {
59
+ result.cleanup();
60
+ }
59
61
  }
60
62
  catch (error) {
61
63
  console.error(error);
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","sourceRoot":"","sources":["../../../src/store/audio/sagas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,cAAc,EAEd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EAChB,MAAM,WAAW,CAAA;AAMlB,KAAK,UAAU,0BAA0B,CACvC,aAA4B,EAC5B,iBAAyB,EACzB,KAAuB,EACvB,aAAqB;IAErB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,kBAAkB,CAAC,EAAE,EAAE,iBAAiB,EAAE,aAAa,CAAC,CAAA;QAC7F,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAE,CAAA;QAC7C,MAAM,CAAC,GAAG,GAAG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ACnE,MAAM,MAAM,GACV,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO;YACtC,CAAC,CAAC,MAAM,kBAAkB,CAAC,aAAa,EAAE,KAAK,EAAE,aAAa,CAAC;YAC/D,CAAC,CAAC,MAAM,kBAAkB,CAAC,aAAa,EAAE,KAAK,EAAE,aAAa,CAAC,CAAA;QAEnE,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC7B,MAAM,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAA;YAClC,MAAM,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAA;YACtD,MAAM,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAA;QAChC,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;YACjD,MAAM,KAAK,CAAC,IAAI,CAAC,CAAA;YACjB,MAAM,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAA;QAClC,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,CAAC,OAAO,EAAE,CAAA;QAClB,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC,SAAS,CAAC,aAA4B;IAC7D,MAAM,SAAS,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAA;AAChE,CAAC"}
@@ -70,8 +70,7 @@ declare const rootReducer: import("redux").Reducer<{
70
70
  }>>;
71
71
  export type AppState = ReturnType<typeof rootReducer>;
72
72
  declare module 'react-redux' {
73
- interface DefaultRootState extends AppState {
74
- }
73
+ type DefaultRootState = AppState;
75
74
  }
76
75
  export declare function initializeExamStore(examStructure: RootElement, casStatus: InitialCasStatus, initialAnswers: ExamAnswer[], restrictedAudioPlaybackStats: RestrictedAudioPlaybackStats[], examServerApi: ExamServerAPI): Store<AppState>;
77
76
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA0D,KAAK,EAAE,MAAM,OAAO,CAAA;AASrF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,IAAI,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIf,CAAA;AAQF,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAUrD,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,gBAAiB,SAAQ,QAAQ;KAAG;CAC/C;AAED,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,WAAW,EAC1B,SAAS,EAAE,gBAAgB,EAC3B,cAAc,EAAE,UAAU,EAAE,EAC5B,4BAA4B,EAAE,4BAA4B,EAAE,EAC5D,aAAa,EAAE,aAAa,GAC3B,KAAK,CAAC,QAAQ,CAAC,CA+BjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA0D,KAAK,EAAE,MAAM,OAAO,CAAA;AASrF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,IAAI,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIf,CAAA;AAQF,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAUrD,OAAO,QAAQ,aAAa,CAAC;IAC3B,KAAK,gBAAgB,GAAG,QAAQ,CAAA;CACjC;AAED,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,WAAW,EAC1B,SAAS,EAAE,gBAAgB,EAC3B,cAAc,EAAE,UAAU,EAAE,EAC5B,4BAA4B,EAAE,4BAA4B,EAAE,EAC5D,aAAa,EAAE,aAAa,GAC3B,KAAK,CAAC,QAAQ,CAAC,CA+BjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digabi/exam-engine-core",
3
- "version": "20.5.0",
3
+ "version": "20.5.1-alpha.1",
4
4
  "main": "dist/main-bundle.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Matriculation Examination Board, Finland",
@@ -40,7 +40,7 @@
40
40
  "mini-css-extract-plugin": "^2.6.0",
41
41
  "postcss": "^8.0.5",
42
42
  "postcss-loader": "^8.1.0",
43
- "postcss-preset-env": "^9.1.0",
43
+ "postcss-preset-env": "^10.0.0",
44
44
  "react": "^18.2.0",
45
45
  "react-css-transition-replace": "^5.0.1",
46
46
  "react-dom": "^18.2.0",
@@ -58,5 +58,5 @@
58
58
  "webpack-bundle-analyzer": "^4.1.0",
59
59
  "webpack-cli": "^5.0.2"
60
60
  },
61
- "gitHead": "04680383b87684263cfd322ffe0df72cb3dfad2a"
61
+ "gitHead": "68662acd17b4005eecaea94742b44ebbdefb3ae3"
62
62
  }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { TextAnnotation } from '../../types/Score';
3
- export interface AnnotationContext {
4
- annotations: Record<string, TextAnnotation>;
5
- onClickAnnotation: (a: TextAnnotation) => void;
6
- }
7
- export declare const AnnotationContext: React.Context<AnnotationContext>;
8
- //# sourceMappingURL=AnnotationContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/AnnotationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC3C,iBAAiB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;CAC/C;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAA"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export const AnnotationContext = React.createContext({});
3
- //# sourceMappingURL=AnnotationContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationContext.js","sourceRoot":"","sources":["../../../src/components/context/AnnotationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,EAAuB,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- declare function ExamineExam(): React.JSX.Element;
3
- declare const _default: React.MemoExoticComponent<typeof ExamineExam>;
4
- export default _default;
5
- //# sourceMappingURL=ExamineExam.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamineExam.d.ts","sourceRoot":"","sources":["../../../src/components/exam/ExamineExam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,iBAAS,WAAW,sBA4BnB;;AAED,wBAAsC"}
@@ -1,20 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { useExamTranslation } from '../../i18n';
3
- import { ExamContext } from '../context/ExamContext';
4
- function ExamineExam() {
5
- const { examServerApi } = useContext(ExamContext);
6
- const { examineExam } = examServerApi;
7
- const { t } = useExamTranslation();
8
- const goToInspectAnswers = () => {
9
- if (!examineExam) {
10
- return;
11
- }
12
- examineExam();
13
- window.scrollTo(0, 0);
14
- };
15
- return (React.createElement("div", { className: "e-examine-exam" },
16
- React.createElement("button", { className: "e-button", id: "examineExam", onClick: goToInspectAnswers, "aria-describedby": "examineExamInstructions" }, t('examine-exam.examine')),
17
- React.createElement("div", { className: "e-examine-exam-instructions", id: "examineExamInstructions" }, t('examine-exam.instructions'))));
18
- }
19
- export default React.memo(ExamineExam);
20
- //# sourceMappingURL=ExamineExam.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamineExam.js","sourceRoot":"","sources":["../../../src/components/exam/ExamineExam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD,SAAS,WAAW;IAClB,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,EAAE,WAAW,EAAE,GAAkB,aAAa,CAAA;IACpD,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAElC,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAM;QACR,CAAC;QACD,WAAW,EAAE,CAAA;QACb,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,gBAAgB;QAC7B,gCACE,SAAS,EAAC,UAAU,EACpB,EAAE,EAAC,aAAa,EAChB,OAAO,EAAE,kBAAkB,sBACV,yBAAyB,IAEzC,CAAC,CAAC,sBAAsB,CAAC,CACnB;QACT,6BAAK,SAAS,EAAC,6BAA6B,EAAC,EAAE,EAAC,yBAAyB,IACtE,CAAC,CAAC,2BAA2B,CAAC,CAC3B,CACF,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare function onMouseDownForAnnotation(e: React.MouseEvent, mouseUpCallback: (e: any) => void): void;
3
- export declare function hasTextSelectedInAnswerText(): boolean;
4
- //# sourceMappingURL=reactAnnotation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactAnnotation.d.ts","sourceRoot":"","sources":["../../../src/components/grading/reactAnnotation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,QAwB9F;AAED,wBAAgB,2BAA2B,IAAI,OAAO,CAoCrD"}
@@ -1,54 +0,0 @@
1
- import { textAnnotationFromRange } from './editAnnotations';
2
- export function onMouseDownForAnnotation(e, mouseUpCallback) {
3
- function onWindowMouseUpAfterAnswerMouseDown(e) {
4
- const target = e.target;
5
- window.removeEventListener('mouseup', onWindowMouseUpAfterAnswerMouseDown);
6
- // Text annotation
7
- const selection = window.getSelection();
8
- if (selection && hasTextSelectedInAnswerText()) {
9
- const range = selection.getRangeAt(0);
10
- const position = textAnnotationFromRange(target, range);
11
- if (!position) {
12
- return;
13
- }
14
- const selectedText = selection.toString();
15
- mouseUpCallback({ ...position, selectedText, range: selection.getRangeAt(0) });
16
- }
17
- }
18
- const isReadOnly = false;
19
- // Do annotations only with left mouse buttons and when permitted
20
- if (isReadOnly || e.button !== 0) {
21
- return;
22
- }
23
- window.addEventListener('mouseup', onWindowMouseUpAfterAnswerMouseDown);
24
- }
25
- export function hasTextSelectedInAnswerText() {
26
- const selection = window.getSelection();
27
- return (selection !== null &&
28
- selectionInAnswerText(selection) &&
29
- (isRangeSelection(selection) || textSelectedInRange(selection)));
30
- function selectionInAnswerText(sel) {
31
- if (sel.type === 'None' || sel.type === 'Caret' || sel.rangeCount === 0) {
32
- return false;
33
- }
34
- const startContainer = sel.getRangeAt(0).startContainer;
35
- const endContainer = sel.getRangeAt(0).endContainer;
36
- const startParent = startContainer.parentElement;
37
- const endParent = endContainer.parentElement;
38
- return sel.rangeCount > 0 && startParent === endParent;
39
- }
40
- function isRangeSelection(sel) {
41
- return (sel === null || sel === void 0 ? void 0 : sel.type) === 'Range';
42
- }
43
- function textSelectedInRange(sel) {
44
- const range = sel.getRangeAt(0);
45
- return (!!sel.rangeCount &&
46
- (range.toString().length > 0 ||
47
- isParentContainer(range.startContainer) ||
48
- isParentContainer(range.endContainer)));
49
- }
50
- function isParentContainer(container) {
51
- return container.classList.contains('answer');
52
- }
53
- }
54
- //# sourceMappingURL=reactAnnotation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactAnnotation.js","sourceRoot":"","sources":["../../../src/components/grading/reactAnnotation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAG3D,MAAM,UAAU,wBAAwB,CAAC,CAAmB,EAAE,eAAiC;IAC7F,SAAS,mCAAmC,CAAC,CAAa;QACxD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAqB,CAAA;QACtC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,mCAAmC,CAAC,CAAA;QAE1E,kBAAkB;QAClB,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAA;QACvC,IAAI,SAAS,IAAI,2BAA2B,EAAE,EAAE,CAAC;YAC/C,MAAM,KAAK,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;YACrC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;YACvD,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,OAAM;YACR,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAA;YACzC,eAAe,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AAC;IAED,SAAS,mBAAmB,CAAC,GAAc;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;QAC/B,OAAO,CACL,CAAC,CAAC,GAAG,CAAC,UAAU;YAChB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC;gBAC1B,iBAAiB,CAAC,KAAK,CAAC,cAAyB,CAAC;gBAClD,iBAAiB,CAAC,KAAK,CAAC,YAAuB,CAAC,CAAC,CACpD,CAAA;IACH,CAAC;IAED,SAAS,iBAAiB,CAAC,SAAkB;QAC3C,OAAO,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC/C,CAAC;AACH,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const useIsStudentsFinishExamPage: () => boolean;
2
- //# sourceMappingURL=isExamFinishPageHook.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isExamFinishPageHook.d.ts","sourceRoot":"","sources":["../../../src/components/results/isExamFinishPageHook.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B,eAGvC,CAAA"}
@@ -1,7 +0,0 @@
1
- import { useContext } from 'react';
2
- import { ResultsContext } from '../context/ResultsContext';
3
- export const useIsStudentsFinishExamPage = () => {
4
- const { gradingStructure } = useContext(ResultsContext);
5
- return gradingStructure === undefined;
6
- };
7
- //# sourceMappingURL=isExamFinishPageHook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isExamFinishPageHook.js","sourceRoot":"","sources":["../../../src/components/results/isExamFinishPageHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACvD,OAAO,gBAAgB,KAAK,SAAS,CAAA;AACvC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export declare function CreateAnnotationPopup({ updateComment, closeEditor }: {
3
- updateComment: (value: string) => void;
4
- closeEditor: () => void;
5
- }): React.JSX.Element;
6
- //# sourceMappingURL=CreateAnnotationPopup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateAnnotationPopup.d.ts","sourceRoot":"","sources":["../../../src/components/shared/CreateAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,wBAAgB,qBAAqB,CAAC,EACpC,aAAa,EACb,WAAW,EACZ,EAAE;IACD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,qBAyBA"}
@@ -1,11 +0,0 @@
1
- import React, { useState } from 'react';
2
- export function CreateAnnotationPopup({ updateComment, closeEditor }) {
3
- const [comment, setComment] = useState('');
4
- return (React.createElement("span", { className: "annotation-popup", style: { position: 'absolute' } },
5
- React.createElement("textarea", { className: "comment-content", role: "textbox", "aria-multiline": "true", onChange: e => setComment(e.target.value), value: comment, autoFocus: true }),
6
- React.createElement("span", { className: "comment-button-area" },
7
- React.createElement("span", null,
8
- React.createElement("button", { onClick: () => updateComment(comment), disabled: comment.trim().length === 0 }, "Vastaa"),
9
- React.createElement("button", { className: "text-button", onClick: () => closeEditor() }, "Peru")))));
10
- }
11
- //# sourceMappingURL=CreateAnnotationPopup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateAnnotationPopup.js","sourceRoot":"","sources":["../../../src/components/shared/CreateAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,MAAM,UAAU,qBAAqB,CAAC,EACpC,aAAa,EACb,WAAW,EAIZ;IACC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAA;IAElD,OAAO,CACL,8BAAM,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;QAChE,kCACE,SAAS,EAAC,iBAAiB,EAC3B,IAAI,EAAC,SAAS,oBACC,MAAM,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,IAAI,GACf;QACF,8BAAM,SAAS,EAAC,qBAAqB;YACnC;gBACE,gCAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,aAE3E;gBACT,gCAAQ,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,WAEnD,CACJ,CACF,CACF,CACR,CAAA;AACH,CAAC"}