@digabi/exam-engine-core 22.1.6-alpha.0 → 22.1.6-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts +2 -0
- package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts.map +1 -0
- package/dist/__tests__/EditableGradingInstructionLocalization.test.js +75 -0
- package/dist/__tests__/EditableGradingInstructionLocalization.test.js.map +1 -0
- package/dist/__tests__/editor/Table.test.d.ts +2 -0
- package/dist/__tests__/editor/Table.test.d.ts.map +1 -0
- package/dist/__tests__/editor/Table.test.js +172 -0
- package/dist/__tests__/editor/Table.test.js.map +1 -0
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/Localization.d.ts +5 -0
- package/dist/components/Localization.d.ts.map +1 -0
- package/dist/components/Localization.js +9 -0
- package/dist/components/Localization.js.map +1 -0
- package/dist/components/context/AttachmentContext.d.ts.map +1 -1
- package/dist/components/context/ExamContext.d.ts.map +1 -1
- package/dist/components/context/QuestionContext.d.ts.map +1 -1
- package/dist/components/context/ResultsContext.d.ts.map +1 -1
- package/dist/components/context/SectionContext.d.ts.map +1 -1
- package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -1
- package/dist/components/grading-instructions/EditableGradingInstruction.js +9 -6
- package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -1
- package/dist/components/grading-instructions/GradingInstruction.d.ts +7 -0
- package/dist/components/grading-instructions/GradingInstruction.d.ts.map +1 -0
- package/dist/components/grading-instructions/GradingInstruction.js +9 -0
- package/dist/components/grading-instructions/GradingInstruction.js.map +1 -0
- package/dist/components/grading-instructions/GradingInstructions.d.ts +1 -1
- package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts +9 -0
- package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/AttributeToggleButton.js +53 -0
- package/dist/components/grading-instructions/editor/AttributeToggleButton.js.map +1 -0
- package/dist/components/grading-instructions/editor/CurrentElement.d.ts +2 -0
- package/dist/components/grading-instructions/editor/CurrentElement.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/CurrentElement.js +8 -0
- package/dist/components/grading-instructions/editor/CurrentElement.js.map +1 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts +7 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.js +13 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +1 -0
- package/dist/components/grading-instructions/editor/Formula.d.ts +0 -3
- package/dist/components/grading-instructions/editor/Formula.d.ts.map +1 -1
- package/dist/components/grading-instructions/editor/Formula.js +0 -54
- package/dist/components/grading-instructions/editor/Formula.js.map +1 -1
- package/dist/components/grading-instructions/editor/Localization.d.ts +3 -0
- package/dist/components/grading-instructions/editor/Localization.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/Localization.js +36 -0
- package/dist/components/grading-instructions/editor/Localization.js.map +1 -0
- package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts +6 -0
- package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/LocalizationButtons.js +14 -0
- package/dist/components/grading-instructions/editor/LocalizationButtons.js.map +1 -0
- package/dist/components/grading-instructions/editor/Table.d.ts +0 -2
- package/dist/components/grading-instructions/editor/Table.d.ts.map +1 -1
- package/dist/components/grading-instructions/editor/Table.js +1 -42
- package/dist/components/grading-instructions/editor/Table.js.map +1 -1
- package/dist/components/grading-instructions/editor/localizatio.d.ts +3 -0
- package/dist/components/grading-instructions/editor/localizatio.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/localizatio.js +36 -0
- package/dist/components/grading-instructions/editor/localizatio.js.map +1 -0
- package/dist/components/grading-instructions/editor/localizationSpan.d.ts +3 -0
- package/dist/components/grading-instructions/editor/localizationSpan.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/localizationSpan.js +36 -0
- package/dist/components/grading-instructions/editor/localizationSpan.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts +4 -0
- package/dist/components/grading-instructions/editor/schemas/formulaSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/formulaSchema.js +55 -0
- package/dist/components/grading-instructions/editor/schemas/formulaSchema.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts +4 -0
- package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/imageSchema.js +47 -0
- package/dist/components/grading-instructions/editor/schemas/imageSchema.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts +3 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js +19 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts +3 -0
- package/dist/components/grading-instructions/editor/schemas/tableSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/tableSchema.js +43 -0
- package/dist/components/grading-instructions/editor/schemas/tableSchema.js.map +1 -0
- package/dist/components/grading-instructions/editor/spanWithPath.d.ts +3 -0
- package/dist/components/grading-instructions/editor/spanWithPath.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/spanWithPath.js +24 -0
- package/dist/components/grading-instructions/editor/spanWithPath.js.map +1 -0
- package/dist/components/grading-instructions/editor/util.d.ts +6 -0
- package/dist/components/grading-instructions/editor/util.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/util.js +10 -0
- package/dist/components/grading-instructions/editor/util.js.map +1 -0
- package/dist/main-bundle.js +1 -1
- package/dist/main-bundle.js.LICENSE.txt +1 -1
- package/dist/main.css +1 -1
- package/package.json +2 -2
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../src/components/Localization.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAI9D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAW7D,CAAA;AACD,eAAe,YAAY,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { GradingInstructionContext } from './context/GradingInstructionContext';
|
3
|
+
import EditableGradingInstruction from './grading-instructions/EditableGradingInstruction';
|
4
|
+
const Localization = ({ element, renderChildNodes }) => {
|
5
|
+
const { editable } = useContext(GradingInstructionContext);
|
6
|
+
return (React.createElement("div", { className: "e-exam-grading-instruction-localization notification e-pad-4", "data-annotation-anchor": "exam-grading-instruction-localization" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
|
7
|
+
};
|
8
|
+
export default Localization;
|
9
|
+
//# sourceMappingURL=Localization.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/components/Localization.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,0BAA0B,MAAM,mDAAmD,CAAA;AAE1F,MAAM,YAAY,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAClG,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAA;IAE1D,OAAO,CACL,6BACE,SAAS,EAAC,8DAA8D,4BACjD,uCAAuC,IAE7D,QAAQ,CAAC,CAAC,CAAC,oBAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CACpF,CACP,CAAA;AACH,CAAC,CAAA;AACD,eAAe,YAAY,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachmentContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/AttachmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;IAAC,aAAa,EAAE,IAAI,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpE,eAAO,MAAM,iBAAiB,kCAAkE,CAAA;AAEhG,eAAO,MAAM,qBAAqB,
|
1
|
+
{"version":3,"file":"AttachmentContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/AttachmentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;IAAC,aAAa,EAAE,IAAI,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpE,eAAO,MAAM,iBAAiB,kCAAkE,CAAA;AAEhG,eAAO,MAAM,qBAAqB,cAR2B,MAE5D,aAAa,UAAO,MAAO,aACnB,KAcR,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExamContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ExamContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,WAAW,WAAW;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,eAAO,MAAM,WAAW,4BAAyC,CAAA;AAEjE,eAAO,MAAM,eAAe,
|
1
|
+
{"version":3,"file":"ExamContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ExamContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,WAAW,WAAW;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,eAAO,MAAM,WAAW,4BAAyC,CAAA;AAEjE,eAAO,MAAM,eAAe,cAPJ,MACtB,aAAW,UAAO,MAAO,aAClB,KAYP,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QuestionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/QuestionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,EAAE,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,eAAe,gCAA8D,CAAA;AAE1F,eAAO,MAAM,mBAAmB,
|
1
|
+
{"version":3,"file":"QuestionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/QuestionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,EAAE,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,eAAe,gCAA8D,CAAA;AAE1F,eAAO,MAAM,mBAAmB,cAhBpB,MAAO,aAAa,UAAO,MAAO,aAAa,KAsCzD,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ResultsContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ResultsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAgB,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAI9G,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IACnD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"ResultsContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ResultsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAgB,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAI9G,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IACnD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,cAfR,MAAM,aAAa,UAAO,MAAO,aAAa,KA+BpE,CAAA;AAED,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,gBAAgB,EAClC,EAAE,EAAE,MAAM,GACT,iBAAiB,GAAG,SAAS,CAY/B;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAEhF;AAED,wBAAgB,+BAA+B,CAC7C,iBAAiB,EAAE,OAAO,EAAE,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EAAE,EACf,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAClD,MAAM,CAMR;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,OAAO,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EAAE,EACf,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAC1C,MAAM,CAgCR"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SectionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/SectionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,OAAO,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"SectionContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/SectionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,OAAO,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,cAbd,MAAO,aAAa,UAAO,MAAO,aAAa,KA+B9D,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;AAiE9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBAkEpE;AAED,eAAe,0BAA0B,CAAA"}
|
@@ -6,16 +6,19 @@ import { GradingInstructionContext } from '../context/GradingInstructionContext'
|
|
6
6
|
import { ProseMirror } from '@nytimes/react-prosemirror';
|
7
7
|
import { DOMParser as ProseDOMParser, DOMSerializer, Schema } from 'prosemirror-model';
|
8
8
|
import { keymap } from 'prosemirror-keymap';
|
9
|
-
import { FormulaButton,
|
10
|
-
import { TableMenu, tablePlugin
|
9
|
+
import { FormulaButton, FormulaPlugin } from './editor/Formula';
|
10
|
+
import { TableMenu, tablePlugin } from './editor/Table';
|
11
11
|
import { FormulaPopup } from './editor/FormulaPopup';
|
12
12
|
import FormatButton from './editor/FormatButton';
|
13
13
|
import { NbspButton, nbspPlugin } from './editor/NBSP';
|
14
|
-
import { spanWithNowrap } from './editor/spanWithNowrap';
|
15
14
|
import { ImageUploadButton } from './editor/ImageUploadButton';
|
16
|
-
import { imageInputSchema, imageOutputSchema } from './editor/schemas/
|
15
|
+
import { imageInputSchema, imageOutputSchema } from './editor/schemas/imageSchema';
|
17
16
|
import { CommonExamContext } from '../context/CommonExamContext';
|
18
17
|
import { faBold, faItalic } from '@fortawesome/free-solid-svg-icons';
|
18
|
+
import { formulaOutputSchema, formulaSchema } from './editor/schemas/formulaSchema';
|
19
|
+
import { tableSchema } from './editor/schemas/tableSchema';
|
20
|
+
import { spanWithNowrapSchema } from './editor/schemas/spanWithNowrapSchema';
|
21
|
+
import { localization } from './editor/localization';
|
19
22
|
function Menu(props) {
|
20
23
|
const { onSaveImage } = useContext(GradingInstructionContext);
|
21
24
|
const [isFloating, setIsFloating] = useState(false);
|
@@ -56,11 +59,11 @@ function EditableGradingInstruction({ element }) {
|
|
56
59
|
.append(formulaSchema)
|
57
60
|
.append(tableSchema)
|
58
61
|
.update('image', imageInputSchema(resolveAttachment)),
|
59
|
-
marks: baseSchema.spec.marks.append(
|
62
|
+
marks: baseSchema.spec.marks.append(spanWithNowrapSchema).append(localization(true))
|
60
63
|
});
|
61
64
|
const outputSchema = new Schema({
|
62
65
|
nodes: baseSchema.spec.nodes.append(formulaOutputSchema).append(tableSchema).update('image', imageOutputSchema),
|
63
|
-
marks: baseSchema.spec.marks.append(
|
66
|
+
marks: baseSchema.spec.marks.append(spanWithNowrapSchema).append(localization(false))
|
64
67
|
});
|
65
68
|
const doc = ProseDOMParser.fromSchema(inputSchema).parse(element);
|
66
69
|
const [mount, setMount] = useState(null);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EditableGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAsB,
|
1
|
+
{"version":3,"file":"EditableGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MA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G,EAAE;gBACb,eAAe,CAAC,IAAI,CAAC,CAAA;YACvB,CAAC,GACD,CACH,CACW,CACf,CAAA;AACH,CAAC;AAED,eAAe,0BAA0B,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAO9F,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { createRenderChildNodes } from '../../createRenderChildNodes';
|
3
|
+
import Localization from '../Localization';
|
4
|
+
const renderChildNodes = createRenderChildNodes({
|
5
|
+
'e:localization': Localization
|
6
|
+
});
|
7
|
+
const GradingInstruction = ({ element, instructionType }) => (React.createElement("div", { className: `${instructionType} e-multiline-results-text-answer e-mrg-b-2 e-pad-l-2` }, renderChildNodes(element)));
|
8
|
+
export default GradingInstruction;
|
9
|
+
//# sourceMappingURL=GradingInstruction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/GradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;IAC9C,gBAAgB,EAAE,YAAY;CAC/B,CAAC,CAAA;AAEF,MAAM,kBAAkB,GAA2E,CAAC,EAClG,OAAO,EACP,eAAe,EAChB,EAAE,EAAE,CAAC,CACJ,6BAAK,SAAS,EAAE,GAAG,eAAe,sDAAsD,IACrF,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
2
2
|
import { AnnotationProps, CommonExamProps } from '../exam/Exam';
|
3
3
|
import { GradingInstructionProps } from '../context/GradingInstructionContext';
|
4
4
|
export declare const GradingInstructionsPageTitle: React.FunctionComponent;
|
5
|
-
declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & AnnotationProps & GradingInstructionProps>>;
|
5
|
+
declare const _default: React.MemoExoticComponent<React.ComponentType<CommonExamProps & (AnnotationProps & GradingInstructionProps)>>;
|
6
6
|
export default _default;
|
7
7
|
//# sourceMappingURL=GradingInstructions.d.ts.map
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare function AttributeToggleButton({ markType, attributeName, attributeValue, displayName }: {
|
3
|
+
markType: string;
|
4
|
+
attributeName: string;
|
5
|
+
attributeValue: string;
|
6
|
+
displayName: string;
|
7
|
+
}): React.JSX.Element;
|
8
|
+
export default AttributeToggleButton;
|
9
|
+
//# sourceMappingURL=AttributeToggleButton.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AttributeToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/AttributeToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,iBAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,aAAa,EACb,cAAc,EACd,WAAW,EACZ,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB,qBAuDA;AAED,eAAe,qBAAqB,CAAA"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { useEditorEventCallback, useEditorState } from '@nytimes/react-prosemirror';
|
3
|
+
import { findAttributesFromCursor } from './util';
|
4
|
+
function AttributeToggleButton({ markType, attributeName, attributeValue, displayName }) {
|
5
|
+
const editorState = useEditorState();
|
6
|
+
const [isActive, setIsActive] = useState(false);
|
7
|
+
useEffect(() => {
|
8
|
+
const attributes = findAttributesFromCursor(editorState.tr, markType);
|
9
|
+
setIsActive(attributes[attributeName] == attributeValue);
|
10
|
+
}, [editorState]);
|
11
|
+
const onClick = useEditorEventCallback(view => {
|
12
|
+
const { state } = view;
|
13
|
+
const tr = state.tr
|
14
|
+
//.insertText('paska')
|
15
|
+
.setNodeAttribute(state.selection.$head.before(), 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'b');
|
16
|
+
view.dispatch(tr);
|
17
|
+
view.focus();
|
18
|
+
return true;
|
19
|
+
});
|
20
|
+
/*const onClick2 = useEditorEventCallback(view => {
|
21
|
+
const { state } = view
|
22
|
+
const node = state.tr.doc.nodeAt(state.tr.selection.from)
|
23
|
+
if (node) {
|
24
|
+
const newAttributeValue = node.attrs[attributeName] ? undefined : attributeValue
|
25
|
+
const tr = state.tr.setNodeAttribute(state.selection.$from.before(), attributeName, newAttributeValue)
|
26
|
+
view.dispatch(tr)
|
27
|
+
view.focus()
|
28
|
+
return true
|
29
|
+
}
|
30
|
+
return false
|
31
|
+
//console.info(state.selection, state.selection.$from, state.selection.$from.parent)
|
32
|
+
if (state.selection instanceof NodeSelection) {
|
33
|
+
state.selection.$from.node()
|
34
|
+
const node = state.tr.doc.nodeAt(state.tr.selection.from)
|
35
|
+
if (node) {
|
36
|
+
const mark = node?.marks.find(mark => mark.type.name == markType)
|
37
|
+
if (mark) {
|
38
|
+
state.tr.addMark()
|
39
|
+
const attrs = { ...mark.attrs, [attributeName]: attributeValue }
|
40
|
+
node.
|
41
|
+
|
42
|
+
mark.addToSet(node.marks)
|
43
|
+
const newMark = { ...mark, attrs }
|
44
|
+
newMark.addToSet(node.marks)
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
//const a = findTagAttributesFromCursor(state.tr, 'localization')
|
49
|
+
})*/
|
50
|
+
return (React.createElement("button", { onClick: onClick, style: { fontWeight: isActive ? 'bold' : 'normal' } }, displayName));
|
51
|
+
}
|
52
|
+
export default AttributeToggleButton;
|
53
|
+
//# sourceMappingURL=AttributeToggleButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AttributeToggleButton.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/AttributeToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAEjD,SAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,aAAa,EACb,cAAc,EACd,WAAW,EAMZ;IACC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE/C,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,wBAAwB,CAAC,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QACrE,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,cAAc,CAAC,CAAA;IAC1D,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;IAEjB,MAAM,OAAO,GAAG,sBAAsB,CAAC,IAAI,CAAC,EAAE;QAC5C,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;QACtB,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE;YACjB,sBAAsB;aACrB,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,yDAAyD,EAAE,GAAG,CAAC,CAAA;QACnH,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QACjB,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6BI;IAEJ,OAAO,CACL,gCAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,IAC1E,WAAW,CACL,CACV,CAAA;AACH,CAAC;AAED,eAAe,qBAAqB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CurrentElement.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/CurrentElement.tsx"],"names":[],"mappings":""}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
function CurrentElement({ currentElement }) {
|
3
|
+
return (React.createElement("div", null,
|
4
|
+
props.currentElement.getAttribute('lang'),
|
5
|
+
" ",
|
6
|
+
props.currentElement.getAttribute('exam-type')));
|
7
|
+
}
|
8
|
+
//# sourceMappingURL=CurrentElement.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CurrentElement.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/CurrentElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,SAAS,cAAc,CAAC,EAAE,cAAc,EAAsC;IAC5E,OAAO,CACL;QACG,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC;;QAAG,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,WAAW,CAAC,CACvF,CACP,CAAA;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CurrentLocalization.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/CurrentLocalization.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,wBAAgB,mBAAmB,CAAC,EAAE,iBAAiB,EAAE,EAAE;IAAE,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAAE,qBAsB1G"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import AttributeToggleButton from './AttributeToggleButton';
|
3
|
+
export function CurrentLocalization({ currentAttributes }) {
|
4
|
+
const { lang, examType } = currentAttributes;
|
5
|
+
console.info(lang, examType);
|
6
|
+
return (React.createElement("span", { className: "element-target" },
|
7
|
+
React.createElement("span", null, "Kohdennus:"),
|
8
|
+
React.createElement(AttributeToggleButton, { markType: "localization", attributeName: "lang", attributeValue: "fi-FI", displayName: "FI" }),
|
9
|
+
React.createElement(AttributeToggleButton, { markType: "localization", attributeName: "lang", attributeValue: "sv-FI", displayName: "SV" }),
|
10
|
+
React.createElement(AttributeToggleButton, { markType: "localization", attributeName: "examType", attributeValue: "visually-impaired", displayName: "NV" }),
|
11
|
+
React.createElement(AttributeToggleButton, { markType: "localization", attributeName: "examType", attributeValue: "hearing-impaired", displayName: "KV" })));
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=CurrentLocalization.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CurrentLocalization.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/CurrentLocalization.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAE3D,MAAM,UAAU,mBAAmB,CAAC,EAAE,iBAAiB,EAAoD;IACzG,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAA;IAC5C,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IAC5B,OAAO,CACL,8BAAM,SAAS,EAAC,gBAAgB;QAC9B,+CAAuB;QACvB,oBAAC,qBAAqB,IAAC,QAAQ,EAAC,cAAc,EAAC,aAAa,EAAC,MAAM,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,GAAG;QAC9G,oBAAC,qBAAqB,IAAC,QAAQ,EAAC,cAAc,EAAC,aAAa,EAAC,MAAM,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,GAAG;QAC9G,oBAAC,qBAAqB,IACpB,QAAQ,EAAC,cAAc,EACvB,aAAa,EAAC,UAAU,EACxB,cAAc,EAAC,mBAAmB,EAClC,WAAW,EAAC,IAAI,GAChB;QACF,oBAAC,qBAAqB,IACpB,QAAQ,EAAC,cAAc,EACvB,aAAa,EAAC,UAAU,EACxB,cAAc,EAAC,kBAAkB,EACjC,WAAW,EAAC,IAAI,GAChB,CACG,CACR,CAAA;AACH,CAAC"}
|
@@ -1,13 +1,10 @@
|
|
1
1
|
import { Plugin } from 'prosemirror-state';
|
2
|
-
import { NodeSpec } from 'prosemirror-model';
|
3
2
|
import React from 'react';
|
4
3
|
export type FormulaEditorState = {
|
5
4
|
pos: number;
|
6
5
|
latex: string;
|
7
6
|
element: Element;
|
8
7
|
};
|
9
|
-
export declare const formulaSchema: NodeSpec;
|
10
|
-
export declare const formulaOutputSchema: NodeSpec;
|
11
8
|
export declare function FormulaButton(props: {
|
12
9
|
disabled: boolean;
|
13
10
|
setFormulaState: (values: FormulaEditorState) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Formula.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Formula.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,mBAAmB,CAAA;
|
1
|
+
{"version":3,"file":"Formula.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Formula.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,mBAAmB,CAAA;AAIlE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,MAAM,kBAAkB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAA;AAEjF,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;CAAE,qBAoBhH;AAED,qBAAa,aAAc,SAAQ,MAAM;gBAC3B,kBAAkB,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI;CAmBrE"}
|
@@ -2,60 +2,6 @@ import { Plugin, PluginKey } from 'prosemirror-state';
|
|
2
2
|
import { Fragment } from 'prosemirror-model';
|
3
3
|
import { useEditorEventCallback } from '@nytimes/react-prosemirror';
|
4
4
|
import React from 'react';
|
5
|
-
export const formulaSchema = {
|
6
|
-
formula: {
|
7
|
-
inline: true,
|
8
|
-
group: 'inline',
|
9
|
-
atom: true,
|
10
|
-
attrs: {
|
11
|
-
latex: {},
|
12
|
-
mode: { default: '' },
|
13
|
-
assistiveTitle: { default: '' }
|
14
|
-
},
|
15
|
-
parseDOM: [
|
16
|
-
{
|
17
|
-
tag: '[data-editor-id=e-formula]',
|
18
|
-
getAttrs(dom) {
|
19
|
-
return {
|
20
|
-
latex: dom.textContent,
|
21
|
-
mode: dom.getAttribute('mode'),
|
22
|
-
assistiveTitle: dom.getAttribute('assistive-title')
|
23
|
-
};
|
24
|
-
}
|
25
|
-
}
|
26
|
-
],
|
27
|
-
toDOM(node) {
|
28
|
-
const container = document.createElement('img');
|
29
|
-
if (node.attrs.latex) {
|
30
|
-
container.setAttribute('alt', node.attrs.latex);
|
31
|
-
container.setAttribute('formula', 'true');
|
32
|
-
container.setAttribute('src', `/math.svg?latex=${encodeURIComponent(node.attrs.latex)}`);
|
33
|
-
}
|
34
|
-
return container;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
};
|
38
|
-
export const formulaOutputSchema = {
|
39
|
-
formula: {
|
40
|
-
...formulaSchema.formula,
|
41
|
-
toDOM(node) {
|
42
|
-
if (!node.attrs.latex) {
|
43
|
-
return '';
|
44
|
-
}
|
45
|
-
const formulaElement = document.createElement('e:formula');
|
46
|
-
if (node.attrs.mode) {
|
47
|
-
formulaElement.setAttribute('mode', node.attrs.mode);
|
48
|
-
}
|
49
|
-
if (node.attrs.assistiveTitle) {
|
50
|
-
formulaElement.setAttribute('assistive-title', node.attrs.assistiveTitle);
|
51
|
-
}
|
52
|
-
formulaElement.textContent = node.attrs.latex;
|
53
|
-
const container = document.createElement('span');
|
54
|
-
container.appendChild(formulaElement);
|
55
|
-
return container.firstElementChild;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
};
|
59
5
|
export function FormulaButton(props) {
|
60
6
|
const onClick = useEditorEventCallback(view => {
|
61
7
|
const transaction = view.state.tr;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Formula.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Formula.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAe,MAAM,mBAAmB,CAAA;AAElE,OAAO,
|
1
|
+
{"version":3,"file":"Formula.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Formula.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAe,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,UAAU,aAAa,CAAC,KAAmF;IAC/G,MAAM,OAAO,GAAG,sBAAsB,CAAC,IAAI,CAAC,EAAE;QAC5C,MAAM,WAAW,GAAgB,IAAI,CAAC,KA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,CAAC;wBACzC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;wBACjC,IAAI,OAAO,YAAY,OAAO,EAAE,CAAC;4BAC/B,kBAAkB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAe,EAAE,CAAC,CAAA;4BAChF,OAAO,IAAI,CAAA;wBACb,CAAC;oBACH,CAAC;oBACD,OAAO,KAAK,CAAA;gBACd,CAAC;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/localization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAElD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAiCxD"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
export function localization(hideable) {
|
2
|
+
return {
|
3
|
+
localization: {
|
4
|
+
attrs: {
|
5
|
+
lang: { default: null },
|
6
|
+
examType: { default: null },
|
7
|
+
hidden: { default: null }
|
8
|
+
},
|
9
|
+
parseDOM: [
|
10
|
+
{
|
11
|
+
tag: '[e-localization]',
|
12
|
+
getAttrs(dom) {
|
13
|
+
var _a, _b, _c;
|
14
|
+
return {
|
15
|
+
lang: (_a = dom.getAttribute('lang')) !== null && _a !== void 0 ? _a : null,
|
16
|
+
examType: (_b = dom.getAttribute('exam-type')) !== null && _b !== void 0 ? _b : null,
|
17
|
+
hidden: hideable ? ((_c = dom.getAttribute('hidden')) !== null && _c !== void 0 ? _c : null) : null
|
18
|
+
};
|
19
|
+
}
|
20
|
+
}
|
21
|
+
],
|
22
|
+
toDOM(node) {
|
23
|
+
return [
|
24
|
+
'e:localization',
|
25
|
+
{
|
26
|
+
lang: node.attrs.lang,
|
27
|
+
'exam-type': node.attrs.examType,
|
28
|
+
hidden: hideable ? node.attrs.hidden : null
|
29
|
+
},
|
30
|
+
0
|
31
|
+
];
|
32
|
+
}
|
33
|
+
}
|
34
|
+
};
|
35
|
+
}
|
36
|
+
//# sourceMappingURL=localization.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localization.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/localization.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAAC,QAAiB;IAC5C,OAAO;QACL,YAAY,EAAE;YACZ,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;gBACvB,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;gBAC3B,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAC1B;YACD,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,kBAAkB;oBACvB,QAAQ,CAAC,GAAgB;;wBACvB,OAAO;4BACL,IAAI,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,IAAI;4BACtC,QAAQ,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,IAAI;4BAC/C,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAA,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;yBAC/D,CAAA;oBACH,CAAC;iBACF;aACF;YACD,KAAK,CAAC,IAAU;gBACd,OAAO;oBACL,gBAAgB;oBAChB;wBACE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc;wBAC/B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,QAAkB;wBAC1C,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,MAAiB,CAAC,CAAC,CAAC,IAAI;qBACxD;oBACD,CAAC;iBACF,CAAA;YACH,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LocalizationButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/LocalizationButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,qBAwBzF"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import AttributeToggleButton from './AttributeToggleButton';
|
3
|
+
import FormatButton from './FormatButton';
|
4
|
+
const languageButtons = { 'fi-FI': 'FI', 'sv-FI': 'SV' };
|
5
|
+
const examTypeButtons = { normal: 'normaali', 'hearing-impaired': 'KV', 'visually-impaired': 'NV' };
|
6
|
+
export function LocalizationButtons({ lang, examType }) {
|
7
|
+
//console.info(languageButtons[lang], examTypeButtons[examType])
|
8
|
+
return (React.createElement("span", { className: "element-target" },
|
9
|
+
React.createElement("span", null, "Kohdennus: "),
|
10
|
+
React.createElement(FormatButton, { markName: "localization", displayName: languageButtons[lang], attributes: { lang, examType } }),
|
11
|
+
languageButtons[lang] && (React.createElement(AttributeToggleButton, { markType: "localization", attributeName: "lang", attributeValue: lang, displayName: languageButtons[lang] })),
|
12
|
+
examTypeButtons[examType] && (React.createElement(AttributeToggleButton, { markType: "localization", attributeName: "examType", attributeValue: examType, displayName: examTypeButtons[examType] }))));
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=LocalizationButtons.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LocalizationButtons.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/LocalizationButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,eAAe,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAA+B,CAAA;AACrF,MAAM,eAAe,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAEhG,CAAA;AAED,MAAM,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAsC;IACxF,gEAAgE;IAChE,OAAO,CACL,8BAAM,SAAS,EAAC,gBAAgB;QAC9B,gDAAwB;QACxB,oBAAC,YAAY,IAAC,QAAQ,EAAC,cAAc,EAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAI;QAC3G,eAAe,CAAC,IAAI,CAAC,IAAI,CACxB,oBAAC,qBAAqB,IACpB,QAAQ,EAAC,cAAc,EACvB,aAAa,EAAC,MAAM,EACpB,cAAc,EAAE,IAAI,EACpB,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,GAClC,CACH;QACA,eAAe,CAAC,QAAQ,CAAC,IAAI,CAC5B,oBAAC,qBAAqB,IACpB,QAAQ,EAAC,cAAc,EACvB,aAAa,EAAC,UAAU,EACxB,cAAc,EAAE,QAAQ,EACxB,WAAW,EAAE,eAAe,CAAC,QAAQ,CAAC,GACtC,CACH,CACI,CACR,CAAA;AACH,CAAC"}
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
2
1
|
import React from 'react';
|
3
|
-
export declare const tableSchema: NodeSpec;
|
4
2
|
export declare function tablePlugin(): import("prosemirror-state").Plugin<any>;
|
5
3
|
export declare function TableMenu(props: {
|
6
4
|
dropdownsBelow: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Table.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AASlD,wBAAgB,WAAW,4CAK1B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,cAAc,EAAE,OAAO,CAAA;CAAE,qBA0L3D"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { addColumnAfter, addRowAfter, deleteColumn, deleteRow, deleteTable, goToNextCell
|
1
|
+
import { addColumnAfter, addRowAfter, deleteColumn, deleteRow, deleteTable, goToNextCell } from 'prosemirror-tables';
|
2
2
|
import { Fragment } from 'prosemirror-model';
|
3
3
|
import React, { useEffect, useState } from 'react';
|
4
4
|
import { useEditorEventCallback, useEditorState } from '@nytimes/react-prosemirror';
|
@@ -7,47 +7,6 @@ import { faTable, faAngleUp, faAngleDown } from '@fortawesome/free-solid-svg-ico
|
|
7
7
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
8
8
|
import classNames from 'classnames';
|
9
9
|
import { keymap } from 'prosemirror-keymap';
|
10
|
-
const defaultSchema = tableNodes({
|
11
|
-
tableGroup: 'block',
|
12
|
-
cellContent: 'inline*',
|
13
|
-
cellAttributes: { class: { default: '' } }
|
14
|
-
});
|
15
|
-
export const tableSchema = {
|
16
|
-
...defaultSchema,
|
17
|
-
table: {
|
18
|
-
...defaultSchema.table,
|
19
|
-
parseDOM: [
|
20
|
-
{
|
21
|
-
tag: 'table',
|
22
|
-
getAttrs: (dom) => ({ class: dom.getAttribute('class') })
|
23
|
-
}
|
24
|
-
],
|
25
|
-
attrs: { class: { default: '' } },
|
26
|
-
toDOM(node) {
|
27
|
-
const classNames = node.attrs.class || undefined;
|
28
|
-
return [
|
29
|
-
'table',
|
30
|
-
{
|
31
|
-
class: classNames
|
32
|
-
},
|
33
|
-
['tbody', 0]
|
34
|
-
];
|
35
|
-
}
|
36
|
-
},
|
37
|
-
table_cell: {
|
38
|
-
...defaultSchema.table_cell,
|
39
|
-
parseDOM: [
|
40
|
-
{
|
41
|
-
tag: 'td',
|
42
|
-
getAttrs: (dom) => ({ class: dom.getAttribute('class') })
|
43
|
-
}
|
44
|
-
],
|
45
|
-
toDOM(node) {
|
46
|
-
const classNames = node.attrs.class || undefined;
|
47
|
-
return ['td', { class: classNames }, 0];
|
48
|
-
}
|
49
|
-
}
|
50
|
-
};
|
51
10
|
export function tablePlugin() {
|
52
11
|
return keymap({
|
53
12
|
Tab: goToNextCell(1),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAA+B,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AACnF,OAAO,EAAe,aAAa,EAAe,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAEhE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,MAAM,aAAa,GAAG,UAAU,CAAC;IAC/B,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,SAAS;IACtB,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE;CAC3C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAa;IACnC,GA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