@digabi/exam-engine-core 22.1.3-alpha.3 → 22.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/components/context/GradingInstructionContext.d.ts +6 -11
  3. package/dist/components/context/GradingInstructionContext.d.ts.map +1 -1
  4. package/dist/components/context/GradingInstructionContext.js.map +1 -1
  5. package/dist/components/exam/DNDAnswer.d.ts +4 -0
  6. package/dist/components/exam/DNDAnswer.d.ts.map +1 -0
  7. package/dist/components/exam/DNDAnswer.js +36 -0
  8. package/dist/components/exam/DNDAnswer.js.map +1 -0
  9. package/dist/components/exam/DragAndDrop.d.ts +3 -0
  10. package/dist/components/exam/DragAndDrop.d.ts.map +1 -0
  11. package/dist/components/exam/DragAndDrop.js +7 -0
  12. package/dist/components/exam/DragAndDrop.js.map +1 -0
  13. package/dist/components/exam/NativeDND.d.ts +3 -0
  14. package/dist/components/exam/NativeDND.d.ts.map +1 -0
  15. package/dist/components/exam/NativeDND.js +75 -0
  16. package/dist/components/exam/NativeDND.js.map +1 -0
  17. package/dist/components/grading/AnnotatableGradingAnswer.d.ts +4 -0
  18. package/dist/components/grading/AnnotatableGradingAnswer.d.ts.map +1 -0
  19. package/dist/components/grading/AnnotatableGradingAnswer.js +24 -0
  20. package/dist/components/grading/AnnotatableGradingAnswer.js.map +1 -0
  21. package/dist/components/grading/GradingAnswer.d.ts.map +1 -1
  22. package/dist/components/grading/GradingAnswer.js +38 -16
  23. package/dist/components/grading/GradingAnswer.js.map +1 -1
  24. package/dist/components/grading-instructions/AnswerGradingInstruction.d.ts.map +1 -1
  25. package/dist/components/grading-instructions/AnswerGradingInstruction.js +4 -3
  26. package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
  27. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts +1 -1
  28. package/dist/components/grading-instructions/GradingInstructionProvider.d.ts.map +1 -1
  29. package/dist/components/grading-instructions/GradingInstructionProvider.js +1 -4
  30. package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -1
  31. package/dist/components/grading-instructions/GradingInstructions.d.ts +6 -2
  32. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  33. package/dist/components/grading-instructions/GradingInstructions.js +2 -3
  34. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  35. package/dist/components/shared/AnnotationWrapper.d.ts +5 -0
  36. package/dist/components/shared/AnnotationWrapper.d.ts.map +1 -0
  37. package/dist/components/shared/AnnotationWrapper.js +24 -0
  38. package/dist/components/shared/AnnotationWrapper.js.map +1 -0
  39. package/dist/components/shared/Mark.d.ts +9 -0
  40. package/dist/components/shared/Mark.d.ts.map +1 -0
  41. package/dist/components/shared/Mark.js +14 -0
  42. package/dist/components/shared/Mark.js.map +1 -0
  43. package/dist/components/shared/Popup.js +2 -2
  44. package/dist/components/shared/Popup.js.map +1 -1
  45. package/dist/dom-utils.d.ts.map +1 -1
  46. package/dist/dom-utils.js +4 -2
  47. package/dist/dom-utils.js.map +1 -1
  48. package/dist/i18n/fi-FI.d.ts +1 -0
  49. package/dist/i18n/fi-FI.d.ts.map +1 -1
  50. package/dist/i18n/fi-FI.js +2 -1
  51. package/dist/i18n/fi-FI.js.map +1 -1
  52. package/dist/i18n/sv-FI.d.ts.map +1 -1
  53. package/dist/i18n/sv-FI.js +2 -1
  54. package/dist/i18n/sv-FI.js.map +1 -1
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +1 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/main-bundle.js +1 -1
  60. package/dist/main.css +1 -1
  61. package/package.json +4 -12
  62. package/dist/__tests__/EditableGradingInstruction.test.d.ts +0 -2
  63. package/dist/__tests__/EditableGradingInstruction.test.d.ts.map +0 -1
  64. package/dist/__tests__/EditableGradingInstruction.test.js +0 -171
  65. package/dist/__tests__/EditableGradingInstruction.test.js.map +0 -1
  66. package/dist/__tests__/FormatButton.test.d.ts +0 -2
  67. package/dist/__tests__/FormatButton.test.d.ts.map +0 -1
  68. package/dist/__tests__/FormatButton.test.js +0 -94
  69. package/dist/__tests__/FormatButton.test.js.map +0 -1
  70. package/dist/__tests__/editor/Formula.test.d.ts +0 -2
  71. package/dist/__tests__/editor/Formula.test.d.ts.map +0 -1
  72. package/dist/__tests__/editor/Formula.test.js +0 -43
  73. package/dist/__tests__/editor/Formula.test.js.map +0 -1
  74. package/dist/__tests__/editor/br.test.d.ts +0 -2
  75. package/dist/__tests__/editor/br.test.d.ts.map +0 -1
  76. package/dist/__tests__/editor/br.test.js +0 -43
  77. package/dist/__tests__/editor/br.test.js.map +0 -1
  78. package/dist/__tests__/editor/hr.test.d.ts +0 -2
  79. package/dist/__tests__/editor/hr.test.d.ts.map +0 -1
  80. package/dist/__tests__/editor/hr.test.js +0 -43
  81. package/dist/__tests__/editor/hr.test.js.map +0 -1
  82. package/dist/__tests__/editor/nbsp.test.d.ts +0 -2
  83. package/dist/__tests__/editor/nbsp.test.d.ts.map +0 -1
  84. package/dist/__tests__/editor/nbsp.test.js +0 -59
  85. package/dist/__tests__/editor/nbsp.test.js.map +0 -1
  86. package/dist/__tests__/editor/noWrap.test.d.ts +0 -2
  87. package/dist/__tests__/editor/noWrap.test.d.ts.map +0 -1
  88. package/dist/__tests__/editor/noWrap.test.js +0 -62
  89. package/dist/__tests__/editor/noWrap.test.js.map +0 -1
  90. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts +0 -8
  91. package/dist/__tests__/utils/ProseMirrorWrapper.d.ts.map +0 -1
  92. package/dist/__tests__/utils/ProseMirrorWrapper.js +0 -44
  93. package/dist/__tests__/utils/ProseMirrorWrapper.js.map +0 -1
  94. package/dist/__tests__/utils/prosemirror.d.ts +0 -3
  95. package/dist/__tests__/utils/prosemirror.d.ts.map +0 -1
  96. package/dist/__tests__/utils/prosemirror.js +0 -38
  97. package/dist/__tests__/utils/prosemirror.js.map +0 -1
  98. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts +0 -2
  99. package/dist/__tests__/utils/renderEditableGradingInstruction.d.ts.map +0 -1
  100. package/dist/__tests__/utils/renderEditableGradingInstruction.js +0 -16
  101. package/dist/__tests__/utils/renderEditableGradingInstruction.js.map +0 -1
  102. package/dist/components/Localization.d.ts +0 -5
  103. package/dist/components/Localization.d.ts.map +0 -1
  104. package/dist/components/Localization.js +0 -9
  105. package/dist/components/Localization.js.map +0 -1
  106. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts +0 -6
  107. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +0 -1
  108. package/dist/components/grading-instructions/EditableGradingInstruction.js +0 -87
  109. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +0 -1
  110. package/dist/components/grading-instructions/GradingInstruction.d.ts +0 -7
  111. package/dist/components/grading-instructions/GradingInstruction.d.ts.map +0 -1
  112. package/dist/components/grading-instructions/GradingInstruction.js +0 -9
  113. package/dist/components/grading-instructions/GradingInstruction.js.map +0 -1
  114. package/dist/components/grading-instructions/editor/CurrentElement.d.ts +0 -2
  115. package/dist/components/grading-instructions/editor/CurrentElement.d.ts.map +0 -1
  116. package/dist/components/grading-instructions/editor/CurrentElement.js +0 -8
  117. package/dist/components/grading-instructions/editor/CurrentElement.js.map +0 -1
  118. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts +0 -5
  119. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +0 -1
  120. package/dist/components/grading-instructions/editor/CurrentLocalization.js +0 -17
  121. package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +0 -1
  122. package/dist/components/grading-instructions/editor/FormatButton.d.ts +0 -8
  123. package/dist/components/grading-instructions/editor/FormatButton.d.ts.map +0 -1
  124. package/dist/components/grading-instructions/editor/FormatButton.js +0 -23
  125. package/dist/components/grading-instructions/editor/FormatButton.js.map +0 -1
  126. package/dist/components/grading-instructions/editor/Formula.d.ts +0 -17
  127. package/dist/components/grading-instructions/editor/Formula.d.ts.map +0 -1
  128. package/dist/components/grading-instructions/editor/Formula.js +0 -81
  129. package/dist/components/grading-instructions/editor/Formula.js.map +0 -1
  130. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts +0 -7
  131. package/dist/components/grading-instructions/editor/FormulaPopup.d.ts.map +0 -1
  132. package/dist/components/grading-instructions/editor/FormulaPopup.js +0 -49
  133. package/dist/components/grading-instructions/editor/FormulaPopup.js.map +0 -1
  134. package/dist/components/grading-instructions/editor/Localization.d.ts +0 -3
  135. package/dist/components/grading-instructions/editor/Localization.d.ts.map +0 -1
  136. package/dist/components/grading-instructions/editor/Localization.js +0 -36
  137. package/dist/components/grading-instructions/editor/Localization.js.map +0 -1
  138. package/dist/components/grading-instructions/editor/NBSP.d.ts +0 -4
  139. package/dist/components/grading-instructions/editor/NBSP.d.ts.map +0 -1
  140. package/dist/components/grading-instructions/editor/NBSP.js +0 -17
  141. package/dist/components/grading-instructions/editor/NBSP.js.map +0 -1
  142. package/dist/components/grading-instructions/editor/Table.d.ts +0 -5
  143. package/dist/components/grading-instructions/editor/Table.d.ts.map +0 -1
  144. package/dist/components/grading-instructions/editor/Table.js +0 -181
  145. package/dist/components/grading-instructions/editor/Table.js.map +0 -1
  146. package/dist/components/grading-instructions/editor/localizatio.d.ts +0 -3
  147. package/dist/components/grading-instructions/editor/localizatio.d.ts.map +0 -1
  148. package/dist/components/grading-instructions/editor/localizatio.js +0 -36
  149. package/dist/components/grading-instructions/editor/localizatio.js.map +0 -1
  150. package/dist/components/grading-instructions/editor/localizationSpan.d.ts +0 -3
  151. package/dist/components/grading-instructions/editor/localizationSpan.d.ts.map +0 -1
  152. package/dist/components/grading-instructions/editor/localizationSpan.js +0 -36
  153. package/dist/components/grading-instructions/editor/localizationSpan.js.map +0 -1
  154. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts +0 -3
  155. package/dist/components/grading-instructions/editor/spanWithNowrap.d.ts.map +0 -1
  156. package/dist/components/grading-instructions/editor/spanWithNowrap.js +0 -19
  157. package/dist/components/grading-instructions/editor/spanWithNowrap.js.map +0 -1
  158. package/dist/components/grading-instructions/editor/spanWithPath.d.ts +0 -3
  159. package/dist/components/grading-instructions/editor/spanWithPath.d.ts.map +0 -1
  160. package/dist/components/grading-instructions/editor/spanWithPath.js +0 -24
  161. package/dist/components/grading-instructions/editor/spanWithPath.js.map +0 -1
@@ -2,16 +2,11 @@ import React from 'react';
2
2
  export interface GradingInstructionPropsBase {
3
3
  children?: React.ReactNode;
4
4
  }
5
- export interface EditableProps extends GradingInstructionPropsBase {
6
- editable: true;
7
- onContentChange: (answerHTML: string, path: string) => void;
8
- saveScreenshot: (type: string, data: Buffer, displayNumber?: string) => Promise<string>;
9
- }
10
- export interface NotEditableProps extends GradingInstructionPropsBase {
11
- editable?: false;
12
- onContentChange?: never;
13
- saveScreenshot?: never;
14
- }
15
- export type GradingInstructionProps = EditableProps | NotEditableProps;
5
+ export type GradingInstructionProps = GradingInstructionPropsBase & {
6
+ EditorComponent?: React.ComponentType<{
7
+ element: Element;
8
+ displayNumber: string;
9
+ }>;
10
+ };
16
11
  export declare const GradingInstructionContext: React.Context<GradingInstructionProps>;
17
12
  //# sourceMappingURL=GradingInstructionContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,2BAA2B;IAChE,QAAQ,EAAE,IAAI,CAAA;IACd,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3D,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACxF;AAED,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B;IACnE,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,cAAc,CAAC,EAAE,KAAK,CAAA;CACvB;AAED,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAEtE,eAAO,MAAM,yBAAyB,wCAAqD,CAAA"}
1
+ {"version":3,"file":"GradingInstructionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAAG;IAClE,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACnF,CAAA;AAED,eAAO,MAAM,yBAAyB,wCAAqD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionContext.js","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAoBzB,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,aAAa,CAAC,EAA6B,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructionContext.js","sourceRoot":"","sources":["../../../src/components/context/GradingInstructionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,aAAa,CAAC,EAA6B,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../..';
3
+ export declare const DNDAnswer: ({ element, renderChildNodes }: ExamComponentProps) => React.JSX.Element;
4
+ //# sourceMappingURL=DNDAnswer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DNDAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAG1C,eAAO,MAAM,SAAS,kCAAmC,kBAAkB,sBA6B1E,CAAA"}
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { getNumericAttribute, mapChildElements, queryAll } from '../../dom-utils';
3
+ export const DNDAnswer = ({ element, renderChildNodes }) => {
4
+ console.log('answer', element);
5
+ const questionId = getNumericAttribute(element, 'question-id');
6
+ const displayNumber = element.getAttribute('display-number');
7
+ console.log('questionId', questionId);
8
+ console.log('displayNumber', displayNumber);
9
+ const dndAnswerGroups = queryAll(element, 'dnd-answer-group');
10
+ console.log('dndAnswerGroups', dndAnswerGroups);
11
+ const dndAnswerOptions = queryAll(element, 'dnd-answer-option');
12
+ console.log('dndAnswerOptions', dndAnswerOptions);
13
+ const defaultItems = {
14
+ root: dndAnswerOptions.map((_option, index) => index),
15
+ ...dndAnswerGroups.reduce((acc, group, groupIndex) => {
16
+ const options = queryAll(group, 'dnd-answer-option');
17
+ return { ...acc, [groupIndex]: options.map((_option, index) => index) };
18
+ })
19
+ };
20
+ console.log('defaultItems', defaultItems);
21
+ return (React.createElement("div", null, mapChildElements(element, childElement => (React.createElement(DNDAnswerGroup, { element: childElement, renderChildNodes: renderChildNodes })))));
22
+ };
23
+ const DNDAnswerGroup = ({ element, renderChildNodes }) => {
24
+ console.log('group');
25
+ return (React.createElement("div", { className: "e-dnd-answer-group" },
26
+ "Group:",
27
+ renderChildNodes(element),
28
+ mapChildElements(element, childElement => (React.createElement(DNDAnswerOption, { element: childElement, renderChildNodes: renderChildNodes })))));
29
+ };
30
+ const DNDAnswerOption = ({ element, renderChildNodes }) => {
31
+ console.log('option');
32
+ return React.createElement("div", { className: "e-dnd-answer-option" },
33
+ "Option: ",
34
+ renderChildNodes(element));
35
+ };
36
+ //# sourceMappingURL=DNDAnswer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DNDAnswer.js","sourceRoot":"","sources":["../../../src/components/exam/DNDAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAEjF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB,EAAE,EAAE;IAC7E,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;IAC/D,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAA;IAC7D,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IACrC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;IAE3C,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAA;IAC7D,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAA;IAC/C,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;IAC/D,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAA;IAEjD,MAAM,YAAY,GAAG;QACnB,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;QACrD,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE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rop.d.ts.map
@@ -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,7 @@
1
+ import React from 'react';
2
+ export const DragAndDrop = () => {
3
+ console.log('DD');
4
+ return (React.createElement("div", null,
5
+ React.createElement("h1", null, "DragAndDrop")));
6
+ };
7
+ //# sourceMappingURL=DragAndDrop.js.map
@@ -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,3 @@
1
+ import React from 'react';
2
+ export declare const NativeDND: () => React.JSX.Element;
3
+ //# sourceMappingURL=NativeDND.d.ts.map
@@ -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,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,SAAS,eAAe,CAAC,CAAkC;QACzD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAqB,CAAA;QACtC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC5B,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAA;IAClC,CAAC;IAED,SAAS,eAAe,CAAC,CAAkC;QACzD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAqB,CAAA;QACtC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC5B,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;IACpC,CAAC;IAED,SAAS,UAAU,CAAC,CAAkC;;QACpD,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;YACtB,CAAC,CAAC,eAAe,EAAE,CAAA,CAAC,sCAAsC;QAC5D,CAAC;QAED,IAAI,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@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { GradingAnswerProps } from './GradingAnswer';
3
+ export declare function AnnotatableGradingAnswer(props: GradingAnswerProps): string | React.JSX.Element;
4
+ //# sourceMappingURL=AnnotatableGradingAnswer.d.ts.map
@@ -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":["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AO,CACL,8BAAM,SAAS,EAAC,eAAe,0BAAuB,IAAI,iBAAc,KAAK,GAMtE,CACR,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GradingAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/GradingAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAA;AACtF,OAAO,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAA;AA0BlD,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,UAAU,EAAE,CAAC;IAAC,SAAS,EAAE,UAAU,EAAE,CAAA;CAAE,CAAA;AAExE,KAAK,WAAW,GAAG,YAAY,GAAG,WAAW,CAAA;AAE7C,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE;QAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5E,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,eAAe,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;IACnD,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAQtD"}
1
+ {"version":3,"file":"GradingAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/GradingAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAA;AAEtF,OAAO,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAA;AAyBlD,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,UAAU,EAAE,CAAC;IAAC,SAAS,EAAE,UAAU,EAAE,CAAA;CAAE,CAAA;AAExE,KAAK,WAAW,GAAG,YAAY,GAAG,WAAW,CAAA;AAE7C,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE;QAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5E,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,eAAe,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;IACnD,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAQtD"}
@@ -1,12 +1,12 @@
1
1
  import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
2
- import { annotationFromMousePosition, getOverlappingMessages, hasTextSelectedInAnswerText, imageAnnotationMouseDownInfo, isDesktopVersion, mergeAnnotation, preventDefaults, showAndPositionElement, textAnnotationFromRange, toggle } from './editAnnotations';
3
- import { renderAnnotations, renderImageAnnotationByImage, updateImageAnnotationMarkSize, wrapAllImages } from '../../renderAnnotations';
4
- import GradingAnswerAnnotationList from './GradingAnswerAnnotationList';
5
- import { changeLanguage, initI18n, useExamTranslation } from '../../i18n';
6
- import { updateLargeImageWarnings } from './largeImageDetector';
7
2
  import { I18nextProvider } from 'react-i18next';
3
+ import { changeLanguage, initI18n, useExamTranslation } from '../../i18n';
4
+ import { renderAnnotations, renderImageAnnotationByImage, updateImageAnnotationMarkSize, wrapAllImages } from '../../renderAnnotations';
8
5
  import { useCached } from '../../useCached';
9
6
  import { AnswerCharacterCounter } from './AnswerCharacterCounter';
7
+ import { annotationFromMousePosition, getOverlappingMessages, hasTextSelectedInAnswerText, imageAnnotationMouseDownInfo, isDesktopVersion, mergeAnnotation, preventDefaults, showAndPositionElement, textAnnotationFromRange, toggle } from './editAnnotations';
8
+ import GradingAnswerAnnotationList from './GradingAnswerAnnotationList';
9
+ import { updateLargeImageWarnings } from './largeImageDetector';
10
10
  export function GradingAnswer(props) {
11
11
  const i18n = useCached(() => initI18n(props.language));
12
12
  useEffect(changeLanguage(i18n, props.language));
@@ -29,19 +29,38 @@ function GradingAnswerWithTranslations({ answer: { type, characterCount, value }
29
29
  let selectionChangeTimeout;
30
30
  const [loadedCount, setLoadedCount] = useState(0);
31
31
  const [totalImages, setTotalImages] = useState(0);
32
+ const [failedImages, setFailedImages] = useState(0);
32
33
  useEffect(() => {
33
- const nonEmptyImages = document.querySelectorAll('img[src]');
34
- setLoadedCount(0);
35
- setTotalImages(nonEmptyImages.length);
36
- function checkAllImagesLoaded() {
34
+ const nonEmptyImages = document.querySelectorAll('.e-grading-answer img[src]');
35
+ function handleImageLoaded() {
37
36
  setLoadedCount(prevCount => prevCount + 1);
38
37
  }
39
- nonEmptyImages.forEach(img => {
40
- img.addEventListener('load', checkAllImagesLoaded);
38
+ function handleImageError(img) {
39
+ console.error('Image failed to load:', img.src);
40
+ setFailedImages(prevCount => prevCount + 1);
41
+ img.alt = 'Image failed to load';
42
+ img.style.border = '1px solid red';
43
+ }
44
+ setTotalImages((nonEmptyImages === null || nonEmptyImages === void 0 ? void 0 : nonEmptyImages.length) || 0);
45
+ setLoadedCount(0);
46
+ setFailedImages(0);
47
+ nonEmptyImages === null || nonEmptyImages === void 0 ? void 0 : nonEmptyImages.forEach(img => {
48
+ if (img instanceof HTMLImageElement) {
49
+ if (img.complete) {
50
+ handleImageLoaded();
51
+ }
52
+ else {
53
+ img.addEventListener('load', handleImageLoaded);
54
+ img.addEventListener('error', () => handleImageError(img));
55
+ }
56
+ }
41
57
  });
42
58
  return () => {
43
- nonEmptyImages.forEach(img => {
44
- img.removeEventListener('load', checkAllImagesLoaded);
59
+ nonEmptyImages === null || nonEmptyImages === void 0 ? void 0 : nonEmptyImages.forEach(img => {
60
+ if (img instanceof HTMLImageElement) {
61
+ img.removeEventListener('load', handleImageLoaded);
62
+ img.removeEventListener('error', () => handleImageError(img));
63
+ }
45
64
  });
46
65
  };
47
66
  }, [value]);
@@ -65,15 +84,18 @@ function GradingAnswerWithTranslations({ answer: { type, characterCount, value }
65
84
  };
66
85
  });
67
86
  const { t } = useExamTranslation();
87
+ const allImagesNotLoaded = totalImages > 0 && loadedCount !== totalImages;
88
+ const someImagesFailedToLoad = failedImages > 0;
68
89
  return (React.createElement("div", { onClick: e => onAnnotationOrListClick(e), className: "e-grading-answer-wrapper" },
69
- totalImages !== 0 && loadedCount !== totalImages && (React.createElement("div", { className: "loading-images" },
70
- React.createElement("span", null,
90
+ allImagesNotLoaded && (React.createElement("div", { className: "loading-images" },
91
+ React.createElement("span", { className: "loading" },
71
92
  t('grading.loading-images'),
72
93
  " (",
73
94
  loadedCount,
74
95
  "/",
75
96
  totalImages,
76
- ")"))),
97
+ ")"),
98
+ someImagesFailedToLoad && React.createElement("span", { className: "failed" }, t('grading.some-images-failed')))),
77
99
  React.createElement("div", { className: "e-grading-answer e-line-height-l e-mrg-b-1", ref: answerRef, onMouseDown: e => onAnswerMouseDown(e), onMouseOver: e => onMouseOverAnnotation(e.target) }),
78
100
  React.createElement(AnswerCharacterCounter, { characterCount: characterCount, maxLength: maxLength }),
79
101
  React.createElement(GradingAnswerAnnotationList, { censoring: annotations.censoring, pregrading: annotations.pregrading, singleGrading: gradingRole === 'pregrading' }),
@@ -1 +1 @@
1
- {"version":3,"file":"GradingAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/GradingAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEtF,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,eAAe,EAEf,eAAe,EACf,sBAAsB,EACtB,uBAA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AC1D,CAAA;QACH,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,OAAQ,EAAE,KAAK,CAAC,CAAA;QAChC,eAAe,CAAC,gBAAgB,CAAC,CAAA;IACnC,CAAC;IAED,SAAS,wBAAwB,CAAC,CAAgB;QAChD,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,4BAA4B,EAAE,CAAC;YACvD,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,6BAA6B,EAAE,CAAA;QACjC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnswerGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAOzE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
1
+ {"version":3,"file":"AnswerGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAazE,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,9 +1,10 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
- import EditableGradingInstruction from './EditableGradingInstruction';
3
+ import { QuestionContext } from '../context/QuestionContext';
4
4
  const AnswerGradingInstruction = ({ element, renderChildNodes }) => {
5
- const { editable } = useContext(GradingInstructionContext);
6
- return (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
5
+ const { EditorComponent } = useContext(GradingInstructionContext);
6
+ const { displayNumber } = useContext(QuestionContext);
7
+ return (React.createElement("div", { className: "e-answer-grading-instruction e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2" }, EditorComponent ? (React.createElement(EditorComponent, { element: element, displayNumber: displayNumber })) : (renderChildNodes(element))));
7
8
  };
8
9
  export default AnswerGradingInstruction;
9
10
  //# sourceMappingURL=AnswerGradingInstruction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnswerGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,0BAA0B,MAAM,8BAA8B,CAAA;AAErE,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC9G,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IAC1D,OAAO,CACL,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,QAAQ,CAAC,CAAC,CAAC,oBAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CACpF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,wBAAwB,CAAA"}
1
+ {"version":3,"file":"AnswerGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AnswerGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,MAAM,wBAAwB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC9G,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IACjE,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAErD,OAAO,CACL,6BAAK,SAAS,EAAC,kFAAkF,IAC9F,eAAe,CAAC,CAAC,CAAC,CACjB,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAI,CACpE,CAAC,CAAC,CAAC,CACF,gBAAgB,CAAC,OAAO,CAAC,CAC1B,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { GradingInstructionProps } from '../context/GradingInstructionContext';
3
- export declare const GradingInstructionProvider: ({ editable, onContentChange, saveScreenshot, children }: GradingInstructionProps) => React.JSX.Element;
3
+ export declare const GradingInstructionProvider: ({ EditorComponent, children }: GradingInstructionProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=GradingInstructionProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionProvider.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA6B,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAEzG,eAAO,MAAM,0BAA0B,4DAKpC,uBAAuB,sBAGzB,CAAA"}
1
+ {"version":3,"file":"GradingInstructionProvider.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA6B,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAEzG,eAAO,MAAM,0BAA0B,kCAAmC,uBAAuB,sBAIhG,CAAA"}
@@ -1,7 +1,4 @@
1
1
  import React from 'react';
2
2
  import { GradingInstructionContext } from '../context/GradingInstructionContext';
3
- export const GradingInstructionProvider = ({ editable, onContentChange, saveScreenshot, children }) => {
4
- const contextValue = editable ? { editable, onContentChange, saveScreenshot } : { editable };
5
- return React.createElement(GradingInstructionContext.Provider, { value: contextValue }, children);
6
- };
3
+ export const GradingInstructionProvider = ({ EditorComponent, children }) => (React.createElement(GradingInstructionContext.Provider, { value: { EditorComponent: EditorComponent } }, children));
7
4
  //# sourceMappingURL=GradingInstructionProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructionProvider.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAA2B,MAAM,sCAAsC,CAAA;AAEzG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,QAAQ,EACR,eAAe,EACf,cAAc,EACd,QAAQ,EACgB,EAAE,EAAE;IAC5B,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC5F,OAAO,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAsC,CAAA;AACjH,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructionProvider.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAA2B,MAAM,sCAAsC,CAAA;AAEzG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAE,eAAe,EAAE,QAAQ,EAA2B,EAAE,EAAE,CAAC,CACpG,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,eAAe,EAAE,eAAe,EAAE,IAC5E,QAAQ,CAC0B,CACtC,CAAA"}
@@ -1,7 +1,11 @@
1
1
  import React from 'react';
2
2
  import { AnnotationProps, CommonExamProps } from '../exam/Exam';
3
- import { GradingInstructionProps } from '../context/GradingInstructionContext';
4
3
  export declare const GradingInstructionsPageTitle: React.FunctionComponent;
5
- declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & (AnnotationProps & GradingInstructionProps)>>;
4
+ declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps & import("../context/GradingInstructionContext").GradingInstructionPropsBase & {
5
+ EditorComponent?: React.ComponentType<{
6
+ element: Element;
7
+ displayNumber: string;
8
+ }>;
9
+ }>>;
6
10
  export default _default;
7
11
  //# sourceMappingURL=GradingInstructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructions.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAcpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAoB/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAmH9E,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;AAED,wBAAqE"}
1
+ {"version":3,"file":"GradingInstructions.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAcpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAmI/D,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,iBAGhD,CAAA;;sBAjJuB,MAAO,aAAa;;;;;AAmJ5C,wBAAqE"}
@@ -71,7 +71,7 @@ const renderChildNodes = createRenderChildNodes({
71
71
  'section-title': SectionTitle,
72
72
  video: Recording
73
73
  });
74
- const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation, editable, onContentChange, saveScreenshot }) => {
74
+ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnotation, EditorComponent }) => {
75
75
  const root = doc.documentElement;
76
76
  const { date, dateTimeFormatter, dayCode, examCode, language, subjectLanguage } = useContext(CommonExamContext);
77
77
  const examTitle = findChildElement(root, 'exam-title');
@@ -85,9 +85,8 @@ const GradingInstructions = ({ doc, annotations, onClickAnnotation, onSaveAnnota
85
85
  const i18n = useCached(() => initI18n(language, examCode, dayCode));
86
86
  useEffect(changeLanguage(i18n, language));
87
87
  useEffect(scrollToHash, []);
88
- const props = editable ? { editable, onContentChange, saveScreenshot } : { editable };
89
88
  return (React.createElement(AnnotationProvider, { annotations: annotations, onClickAnnotation: onClickAnnotation, onSaveAnnotation: onSaveAnnotation },
90
- React.createElement(GradingInstructionProvider, { ...props },
89
+ React.createElement(GradingInstructionProvider, { EditorComponent: EditorComponent },
91
90
  React.createElement(I18nextProvider, { i18n: i18n },
92
91
  React.createElement("main", { className: "e-exam e-grading-instructions", lang: subjectLanguage },
93
92
  React.createElement(React.StrictMode, null),
@@ -1 +1 @@
1
- {"version":3,"file":"GradingInstructions.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,WAAW,EAA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BAA0B,OAAK,KAAK;YACnC,oBAAC,eAAe,IAAC,IAAI,EAAE,IAAI;gBACzB,8BAAM,SAAS,EAAC,+BAA+B,EAAC,IAAI,EAAE,eAAe;oBACnE,oBAAC,KAAK,CAAC,UAAU,OAAG;oBACpB,oBAAC,cAAc,uBAAkB,WAAW;wBAC1C,oBAAC,aAAa,IAAC,EAAE,EAAE,WAAW;4BAC5B,oBAAC,4BAA4B,OAAG;;4BAAE,SAAS,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAC5D;wBACf,IAAI,IAAI,CACP;4BACE,oCAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;wBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;wBACA,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;4BACjC,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CACnE,CACP,CACc;oBAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACS,CACV,CACtB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAA4B,GAAG,EAAE;IACxE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,iCAAiC,CAAC,CAAI,CAAA;AACpD,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"GradingInstructions.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstructions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAA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AiB,EACpC,gBAAgB,EAAE,gBAAgB;QAElC,oBAAC,0BAA0B,IAAC,eAAe,EAAE,eAAe;YAC1D,oBAAC,eAAe,IAAC,IAAI,EAAE,IAAI;gBACzB,8BAAM,SAAS,EAAC,+BAA+B,EAAC,IAAI,EAAE,eAAe;oBACnE,oBAAC,KAAK,CAAC,UAAU,OAAG;oBACpB,oBAAC,cAAc,uBAAkB,WAAW;wBAC1C,oBAAC,aAAa,IAAC,EAAE,EAAE,WAAW;4BAC5B,oBAAC,4BAA4B,OAAG;;4BAAE,SAAS,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAC5D;wBACf,IAAI,IAAI,CACP;4BACE,oCAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;wBACA,sBAAsB,IAAI,CACzB,oBAAC,sBAAsB,IAAO,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,GAAM,CACtF;wBACA,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;4BACjC,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM,CACnE,CACP,CACc;oBAChB,gBAAgB,CAAC,IAAI,CAAC,CAClB,CACS,CACS,CACV,CACtB,CAAA;AACH,CAAC,CAAA;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,4BAA4B,GAA4B,GAAG,EAAE;IACxE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,OAAO,0CAAG,CAAC,CAAC,iCAAiC,CAAC,CAAI,CAAA;AACpD,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const AnnotationWrapper: React.FunctionComponent<{
3
+ children: React.ReactNode;
4
+ }>;
5
+ //# sourceMappingURL=AnnotationWrapper.d.ts.map
@@ -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"}
@@ -0,0 +1,24 @@
1
+ import React, { useContext } from 'react';
2
+ import { AnnotationContext } from '../context/AnnotationProvider';
3
+ import { onMouseDownForAnnotation } from '../grading/examAnnotationUtils';
4
+ import { AnnotationPopup } from './AnnotationPopup';
5
+ export const AnnotationWrapper = ({ children }) => {
6
+ const { setNewAnnotation } = useContext(AnnotationContext);
7
+ const mouseUpCallback = (annotation) => {
8
+ console.log('UP');
9
+ setNewAnnotation(annotation);
10
+ };
11
+ function onMouseDown(e) {
12
+ console.log('DOWN');
13
+ const target = e.target;
14
+ const clickIsInPopup = target.closest('.annotation-popup');
15
+ if (!clickIsInPopup) {
16
+ setNewAnnotation(null);
17
+ }
18
+ onMouseDownForAnnotation(e, mouseUpCallback);
19
+ }
20
+ return (React.createElement("span", { onMouseDown: onMouseDown },
21
+ React.createElement(AnnotationPopup, null),
22
+ children));
23
+ };
24
+ //# sourceMappingURL=AnnotationWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnotationWrapper.js","sourceRoot":"","sources":["../../../src/components/shared/AnnotationWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAA2D,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxG,MAAM,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAE1D,MAAM,eAAe,GAAG,CAAC,UAA6B,EAAE,EAAE;QACxD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACjB,gBAAgB,CAAC,UAAU,CAAC,CAAA;IAC9B,CAAC,CAAA;IAED,SAAS,WAAW,CAAC,CAAmB;QACtC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAiB,CAAA;QAClC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;QAC1D,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,gBAAgB,CAAC,IAAI,CAAC,CAAA;QACxB,CAAC;QAED,wBAAwB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAA;IAC9C,CAAC;IAED,OAAO,CACL,8BAAM,WAAW,EAAE,WAAW;QAC5B,oBAAC,eAAe,OAAG;QAClB,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { NewRenderableAnnotation, RenderableAnnotation } from '../../types/Score';
3
+ export declare const Mark: ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }: {
4
+ annotation: RenderableAnnotation | NewRenderableAnnotation;
5
+ markedText: string;
6
+ onClickAnnotation: (e: React.MouseEvent<HTMLElement, MouseEvent>, a: RenderableAnnotation) => void;
7
+ setNewAnnotationRef: (ref: HTMLElement | undefined) => void;
8
+ }) => React.JSX.Element;
9
+ //# sourceMappingURL=Mark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mark.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Mark.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAGjF,eAAO,MAAM,IAAI,uEAKd;IACD,UAAU,EAAE,oBAAoB,GAAG,uBAAuB,CAAA;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAClG,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5D,sBAsBA,CAAA"}
@@ -0,0 +1,14 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { isExamAnnotation } from './markText';
3
+ export const Mark = ({ annotation, markedText, onClickAnnotation, setNewAnnotationRef }) => {
4
+ const markRef = useRef(null);
5
+ useEffect(() => {
6
+ if (markRef.current && !isExamAnnotation(annotation)) {
7
+ setNewAnnotationRef(markRef.current);
8
+ }
9
+ }, []);
10
+ return (React.createElement("mark", { ref: markRef, className: "e-annotation", "data-annotation-id": isExamAnnotation(annotation) ? annotation.annotationId : '', "data-hidden": "false", "data-annotation-path": annotation.annotationAnchor, onClick: e => (isExamAnnotation(annotation) ? onClickAnnotation(e, annotation) : undefined) },
11
+ markedText,
12
+ (annotation === null || annotation === void 0 ? void 0 : annotation.markNumber) && React.createElement("sup", { className: "e-annotation", "data-content": annotation === null || annotation === void 0 ? void 0 : annotation.markNumber })));
13
+ };
14
+ //# sourceMappingURL=Mark.js.map