@digabi/exam-engine-core 21.0.4-annoteta-react.0 → 22.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/__tests__/annotations.test.d.ts.map +1 -1
  2. package/dist/__tests__/annotations.test.js +175 -60
  3. package/dist/__tests__/annotations.test.js.map +1 -1
  4. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  5. package/dist/components/RenderIf.d.ts.map +1 -1
  6. package/dist/components/attachments/Attachments.d.ts.map +1 -1
  7. package/dist/components/attachments/Attachments.js +7 -9
  8. package/dist/components/attachments/Attachments.js.map +1 -1
  9. package/dist/components/context/AnnotationContext.d.ts +4 -5
  10. package/dist/components/context/AnnotationContext.d.ts.map +1 -1
  11. package/dist/components/context/AnnotationContext.js.map +1 -1
  12. package/dist/components/context/AnnotationProvider.d.ts +7 -2
  13. package/dist/components/context/AnnotationProvider.d.ts.map +1 -1
  14. package/dist/components/context/AnnotationProvider.js +30 -4
  15. package/dist/components/context/AnnotationProvider.js.map +1 -1
  16. package/dist/components/context/GradingInstructionContext.d.ts +9 -0
  17. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -0
  18. package/dist/components/context/GradingInstructionContext.js +3 -0
  19. package/dist/components/context/GradingInstructionContext.js.map +1 -0
  20. package/dist/components/context/IsInSidebarContext.d.ts +0 -1
  21. package/dist/components/context/IsInSidebarContext.d.ts.map +1 -1
  22. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  23. package/dist/components/context/ResultsContext.js.map +1 -1
  24. package/dist/components/context/TOCContext.d.ts +0 -1
  25. package/dist/components/context/TOCContext.d.ts.map +1 -1
  26. package/dist/components/context/withContext.d.ts.map +1 -1
  27. package/dist/components/exam/ChoiceAnswer.d.ts.map +1 -1
  28. package/dist/components/exam/ChoiceAnswer.js +16 -14
  29. package/dist/components/exam/ChoiceAnswer.js.map +1 -1
  30. package/dist/components/exam/Exam.d.ts +4 -4
  31. package/dist/components/exam/Exam.d.ts.map +1 -1
  32. package/dist/components/exam/Exam.js +0 -2
  33. package/dist/components/exam/Exam.js.map +1 -1
  34. package/dist/components/exam/RichTextAnswer.d.ts +1 -1
  35. package/dist/components/exam/RichTextAnswer.d.ts.map +1 -1
  36. package/dist/components/exam/TextAnswer.d.ts.map +1 -1
  37. package/dist/components/exam/TextAnswer.js +6 -4
  38. package/dist/components/exam/TextAnswer.js.map +1 -1
  39. package/dist/components/exam/internal/ProgressBar.d.ts.map +1 -1
  40. package/dist/components/exam/internal/ProgressBar.js +1 -0
  41. package/dist/components/exam/internal/ProgressBar.js.map +1 -1
  42. package/dist/components/grading/editAnnotations.d.ts.map +1 -1
  43. package/dist/components/grading/editAnnotations.js +2 -1
  44. package/dist/components/grading/editAnnotations.js.map +1 -1
  45. package/dist/components/grading/examAnnotationUtils.d.ts +0 -1
  46. package/dist/components/grading/examAnnotationUtils.d.ts.map +1 -1
  47. package/dist/components/grading/examAnnotationUtils.js +88 -37
  48. package/dist/components/grading/examAnnotationUtils.js.map +1 -1
  49. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +5 -0
  50. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -0
  51. package/dist/components/grading-instructions/EditableGradingInstruction.js +25 -0
  52. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -0
  53. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +4 -0
  54. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -0
  55. package/dist/components/grading-instructions/GradingInstructionProvider.js +8 -0
  56. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -0
  57. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  58. package/dist/components/grading-instructions/GradingInstructions.js +23 -25
  59. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  60. package/dist/components/shared/AnnotatableText.d.ts +2 -4
  61. package/dist/components/shared/AnnotatableText.d.ts.map +1 -1
  62. package/dist/components/shared/AnnotatableText.js +22 -60
  63. package/dist/components/shared/AnnotatableText.js.map +1 -1
  64. package/dist/components/shared/AnnotationMark.d.ts +9 -0
  65. package/dist/components/shared/AnnotationMark.d.ts.map +1 -0
  66. package/dist/components/shared/AnnotationMark.js +14 -0
  67. package/dist/components/shared/AnnotationMark.js.map +1 -0
  68. package/dist/components/shared/AnnotationPopup.js +4 -4
  69. package/dist/components/shared/AnnotationPopup.js.map +1 -1
  70. package/dist/components/shared/AnswerIndicator.d.ts +1 -1
  71. package/dist/components/shared/AnswerIndicator.d.ts.map +1 -1
  72. package/dist/components/shared/AnswerIndicator.js +10 -9
  73. package/dist/components/shared/AnswerIndicator.js.map +1 -1
  74. package/dist/components/shared/AnswerLengthInfo.d.ts +1 -1
  75. package/dist/components/shared/AnswerLengthInfo.d.ts.map +1 -1
  76. package/dist/components/shared/AttachmentLink.d.ts +1 -1
  77. package/dist/components/shared/AttachmentLink.d.ts.map +1 -1
  78. package/dist/components/shared/AttachmentLinks.d.ts +1 -1
  79. package/dist/components/shared/AttachmentLinks.d.ts.map +1 -1
  80. package/dist/components/shared/References.d.ts.map +1 -1
  81. package/dist/components/shared/References.js +1 -0
  82. package/dist/components/shared/References.js.map +1 -1
  83. package/dist/components/shared/TOCQuestion.js +1 -1
  84. package/dist/components/shared/TOCQuestion.js.map +1 -1
  85. package/dist/components/shared/markText.d.ts +5 -0
  86. package/dist/components/shared/markText.d.ts.map +1 -0
  87. package/dist/components/shared/markText.js +72 -0
  88. package/dist/components/shared/markText.js.map +1 -0
  89. package/dist/createRenderChildNodes.d.ts.map +1 -1
  90. package/dist/createRenderChildNodes.js +2 -12
  91. package/dist/createRenderChildNodes.js.map +1 -1
  92. package/dist/dom-utils.js +2 -2
  93. package/dist/dom-utils.js.map +1 -1
  94. package/dist/i18n/index.d.ts +1 -2
  95. package/dist/i18n/index.d.ts.map +1 -1
  96. package/dist/i18n/index.js.map +1 -1
  97. package/dist/main-bundle.js +1 -1
  98. package/dist/main.css +1 -1
  99. package/dist/store/answers/reducer.d.ts.map +1 -1
  100. package/dist/store/audio/reducer.d.ts.map +1 -1
  101. package/dist/store/audio/sagas.d.ts.map +1 -1
  102. package/dist/store/audio/sagas.js +3 -1
  103. package/dist/store/audio/sagas.js.map +1 -1
  104. package/dist/store/cas/reducer.d.ts.map +1 -1
  105. package/dist/store/index.d.ts +1 -2
  106. package/dist/store/index.d.ts.map +1 -1
  107. package/dist/store/listenerMiddleware.d.ts +89 -0
  108. package/dist/store/listenerMiddleware.d.ts.map +1 -0
  109. package/dist/store/listenerMiddleware.js +6 -0
  110. package/dist/store/listenerMiddleware.js.map +1 -0
  111. package/dist/store/selectors.d.ts +1 -1
  112. package/dist/types/Score.d.ts +18 -3
  113. package/dist/types/Score.d.ts.map +1 -1
  114. package/package.json +4 -4
@@ -45,15 +45,30 @@ export interface TextAnnotation extends BaseAnnotation {
45
45
  /** The length of the annotation in characters. Images are counted as 1 character. */
46
46
  length: number;
47
47
  }
48
- export interface NewExamAnnotation extends TextAnnotation {
48
+ export interface NewExamAnnotation {
49
+ type: 'text';
49
50
  displayNumber: string;
50
- annotationAnchor: string;
51
- hidden: boolean;
52
51
  selectedText: string;
52
+ annotationParts: AnnotationPart[];
53
+ hidden: boolean;
54
+ markNumber?: number;
53
55
  }
54
56
  export interface ExamAnnotation extends NewExamAnnotation {
55
57
  annotationId: number;
58
+ imported?: boolean;
59
+ }
60
+ export interface AnnotationPart {
61
+ annotationAnchor: string;
62
+ selectedText: string;
63
+ startIndex: number;
64
+ length: number;
65
+ markNumber?: number;
66
+ hidden?: boolean;
67
+ }
68
+ export interface RenderableAnnotation extends AnnotationPart {
69
+ annotationId: number;
56
70
  }
71
+ export type NewRenderableAnnotation = AnnotationPart;
57
72
  interface ShapeAnnotation extends BaseAnnotation {
58
73
  /** A 0-indexed number describing which <img /> in the answer the annotation is attached to. */
59
74
  attachmentIndex: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Score.d.ts","sourceRoot":"","sources":["../../src/types/Score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM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,GAAG,cAAc,CAAA;AAE7D,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,eAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digabi/exam-engine-core",
3
- "version": "21.0.4-annoteta-react.0",
3
+ "version": "22.0.0",
4
4
  "main": "dist/main-bundle.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Matriculation Examination Board, Finland",
@@ -40,11 +40,11 @@
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",
47
- "react-i18next": "^14.0.5",
47
+ "react-i18next": "^15.0.0",
48
48
  "react-redux": "^9.1.0",
49
49
  "react-test-renderer": "^18.2.0",
50
50
  "redux": "^5.0.1",
@@ -58,5 +58,5 @@
58
58
  "webpack-bundle-analyzer": "^4.1.0",
59
59
  "webpack-cli": "^5.0.2"
60
60
  },
61
- "gitHead": "1d05ce505b08f936196aebc2d04085441458c281"
61
+ "gitHead": "563a5cc1ffb2a2e02c0009bd4b4f715be6b1c3ee"
62
62
  }