@digabi/exam-engine-core 22.1.3-alpha.0 → 22.1.3-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/editor/{NBSP.test.js → nbsp.test.js} +1 -1
- package/dist/__tests__/editor/{NBSP.test.js.map → nbsp.test.js.map} +1 -1
- 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 +47 -20
- package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -1
- package/dist/components/grading-instructions/ExamGradingInstruction.d.ts.map +1 -1
- package/dist/components/grading-instructions/ExamGradingInstruction.js +2 -7
- package/dist/components/grading-instructions/ExamGradingInstruction.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/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 +5 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.js +17 -0
- package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +1 -0
- 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/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/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/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
- package/dist/__tests__/EditableGradingInsatruction.test.d.ts +0 -1
- package/dist/__tests__/EditableGradingInsatruction.test.d.ts.map +0 -1
- package/dist/__tests__/EditableGradingInsatruction.test.js +0 -2
- package/dist/__tests__/EditableGradingInsatruction.test.js.map +0 -1
- package/dist/__tests__/editor/no-wrap.test.d.ts +0 -2
- package/dist/__tests__/editor/no-wrap.test.d.ts.map +0 -1
- package/dist/__tests__/editor/no-wrap.test.js +0 -43
- package/dist/__tests__/editor/no-wrap.test.js.map +0 -1
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts +0 -1
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts.map +0 -1
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js +0 -2
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js.map +0 -1
- package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts +0 -1
- package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts.map +0 -1
- package/dist/__tests__/utils/renderEditableGradingInstructions.js +0 -2
- package/dist/__tests__/utils/renderEditableGradingInstructions.js.map +0 -1
- package/dist/components/LexicalEditor.d.ts +0 -3
- package/dist/components/LexicalEditor.d.ts.map +0 -1
- package/dist/components/LexicalEditor.js +0 -44
- package/dist/components/LexicalEditor.js.map +0 -1
- package/dist/components/RTE.d.ts +0 -3
- package/dist/components/RTE.d.ts.map +0 -1
- package/dist/components/RTE.js +0 -23
- package/dist/components/RTE.js.map +0 -1
- package/dist/components/TablePlugin.d.ts +0 -1
- package/dist/components/TablePlugin.d.ts.map +0 -1
- package/dist/components/TablePlugin.js +0 -2
- package/dist/components/TablePlugin.js.map +0 -1
- package/dist/components/ToolBarPlugin.d.ts +0 -10
- package/dist/components/ToolBarPlugin.d.ts.map +0 -1
- package/dist/components/ToolBarPlugin.js +0 -111
- package/dist/components/ToolBarPlugin.js.map +0 -1
- package/dist/components/context/AnnotationContext.d.ts +0 -8
- package/dist/components/context/AnnotationContext.d.ts.map +0 -1
- package/dist/components/context/AnnotationContext.js +0 -3
- package/dist/components/context/AnnotationContext.js.map +0 -1
- package/dist/components/exam/ExamineExam.d.ts +0 -5
- package/dist/components/exam/ExamineExam.d.ts.map +0 -1
- package/dist/components/exam/ExamineExam.js +0 -20
- package/dist/components/exam/ExamineExam.js.map +0 -1
- package/dist/components/exam/FinishExam.d.ts +0 -5
- package/dist/components/exam/FinishExam.d.ts.map +0 -1
- package/dist/components/exam/FinishExam.js +0 -17
- package/dist/components/exam/FinishExam.js.map +0 -1
- package/dist/components/grading/reactAnnotation.d.ts +0 -4
- package/dist/components/grading/reactAnnotation.d.ts.map +0 -1
- package/dist/components/grading/reactAnnotation.js +0 -54
- package/dist/components/grading/reactAnnotation.js.map +0 -1
- package/dist/components/grading-instructions/SlateTableEditor.d.ts +0 -22
- package/dist/components/grading-instructions/SlateTableEditor.d.ts.map +0 -1
- package/dist/components/grading-instructions/SlateTableEditor.js +0 -44
- package/dist/components/grading-instructions/SlateTableEditor.js.map +0 -1
- package/dist/components/grading-instructions/SlateUtils.d.ts +0 -5
- package/dist/components/grading-instructions/SlateUtils.d.ts.map +0 -1
- package/dist/components/grading-instructions/SlateUtils.js +0 -28
- package/dist/components/grading-instructions/SlateUtils.js.map +0 -1
- package/dist/components/grading-instructions/editor/MathPopup.d.ts +0 -10
- package/dist/components/grading-instructions/editor/MathPopup.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/MathPopup.js +0 -94
- package/dist/components/grading-instructions/editor/MathPopup.js.map +0 -1
- package/dist/components/grading-instructions/editor/math-svg.d.ts +0 -2
- package/dist/components/grading-instructions/editor/math-svg.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/math-svg.js +0 -22
- package/dist/components/grading-instructions/editor/math-svg.js.map +0 -1
- package/dist/components/grading-instructions/editor/math.d.ts +0 -4
- package/dist/components/grading-instructions/editor/math.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/math.js +0 -55
- package/dist/components/grading-instructions/editor/math.js.map +0 -1
- package/dist/components/grading-instructions/editor/noWrap.d.ts +0 -3
- package/dist/components/grading-instructions/editor/noWrap.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/noWrap.js +0 -13
- package/dist/components/grading-instructions/editor/noWrap.js.map +0 -1
- package/dist/components/grading-instructions/editor/spanWithClass.d.ts +0 -3
- package/dist/components/grading-instructions/editor/spanWithClass.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/spanWithClass.js +0 -19
- package/dist/components/grading-instructions/editor/spanWithClass.js.map +0 -1
- package/dist/components/grading-instructions/prosemirror.d.ts +0 -8
- package/dist/components/grading-instructions/prosemirror.d.ts.map +0 -1
- package/dist/components/grading-instructions/prosemirror.js +0 -108
- package/dist/components/grading-instructions/prosemirror.js.map +0 -1
- package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
- package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
- package/dist/components/results/isExamFinishPageHook.js +0 -7
- package/dist/components/results/isExamFinishPageHook.js.map +0 -1
- package/dist/components/shared/CreateAnnotationPopup.d.ts +0 -6
- package/dist/components/shared/CreateAnnotationPopup.d.ts.map +0 -1
- package/dist/components/shared/CreateAnnotationPopup.js +0 -11
- package/dist/components/shared/CreateAnnotationPopup.js.map +0 -1
- package/dist/components/shared/PopupUtils.d.ts +0 -4
- package/dist/components/shared/PopupUtils.d.ts.map +0 -1
- package/dist/components/shared/PopupUtils.js +0 -26
- package/dist/components/shared/PopupUtils.js.map +0 -1
- package/dist/store/listenerMiddleware.d.ts +0 -89
- package/dist/store/listenerMiddleware.d.ts.map +0 -1
- package/dist/store/listenerMiddleware.js +0 -6
- package/dist/store/listenerMiddleware.js.map +0 -1
- /package/dist/__tests__/editor/{NBSP.test.d.ts → nbsp.test.d.ts} +0 -0
- /package/dist/__tests__/editor/{NBSP.test.d.ts.map → nbsp.test.d.ts.map} +0 -0
@@ -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":"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M,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,KAA+B,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAA;AA8CnD,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBAkEpE;AAED,eAAe,0BAA0B,CAAA"}
|
@@ -12,21 +12,24 @@ import { FormulaPopup } from './editor/FormulaPopup';
|
|
12
12
|
import FormatButton from './editor/FormatButton';
|
13
13
|
import { NbspButton, nbspPlugin } from './editor/NBSP';
|
14
14
|
import { spanWithNowrap } from './editor/spanWithNowrap';
|
15
|
+
import { localization } from './editor/localization';
|
16
|
+
import { CurrentLocalization } from './editor/CurrentLocalization';
|
15
17
|
const schema = new Schema({
|
16
18
|
nodes: baseSchema.spec.nodes.append(formulaSchema).append(tableSchema),
|
17
|
-
marks: baseSchema.spec.marks.append(spanWithNowrap)
|
19
|
+
marks: baseSchema.spec.marks.append(spanWithNowrap).append(localization(true))
|
18
20
|
});
|
19
21
|
const outputSchema = new Schema({
|
20
22
|
nodes: baseSchema.spec.nodes.append(formulaOutputSchema).append(tableSchema),
|
21
|
-
marks: baseSchema.spec.marks.append(spanWithNowrap)
|
23
|
+
marks: baseSchema.spec.marks.append(spanWithNowrap).append(localization(false))
|
22
24
|
});
|
23
|
-
function Menu(
|
24
|
-
return (React.createElement(
|
25
|
+
function Menu({ setFormulaState, currentElement }) {
|
26
|
+
return (React.createElement("div", { className: "ProseMirror-menu" },
|
25
27
|
React.createElement(FormatButton, { markName: "strong", displayName: "Bold" }),
|
26
28
|
React.createElement(FormatButton, { markName: "em", displayName: "Italic" }),
|
27
29
|
React.createElement(TableMenu, null),
|
28
|
-
React.createElement(FormulaButton, { setFormulaState:
|
29
|
-
React.createElement(NbspButton, null)
|
30
|
+
React.createElement(FormulaButton, { setFormulaState: setFormulaState }),
|
31
|
+
React.createElement(NbspButton, null),
|
32
|
+
React.createElement(CurrentLocalization, { currentElement: currentElement })));
|
30
33
|
}
|
31
34
|
function EditableGradingInstruction({ element }) {
|
32
35
|
const { onContentChange } = useContext(GradingInstructionContext);
|
@@ -35,22 +38,46 @@ function EditableGradingInstruction({ element }) {
|
|
35
38
|
const [formulaState, setFormulaState] = useState(null);
|
36
39
|
const formulaPlugin = new FormulaPlugin(setFormulaState);
|
37
40
|
const [state, setState] = useState(EditorState.create({ schema, doc, plugins: [keymap(baseKeymap), formulaPlugin, nbspPlugin] }));
|
41
|
+
const [currentElement, setCurrentElement] = useState(null);
|
42
|
+
function findElementFromPosition(rootNode, pos) {
|
43
|
+
var _a;
|
44
|
+
if (rootNode == null) {
|
45
|
+
return null;
|
46
|
+
}
|
47
|
+
const node = rootNode.nodeAt(pos);
|
48
|
+
if (!node) {
|
49
|
+
return null;
|
50
|
+
}
|
51
|
+
const serializedNode = DOMSerializer.fromSchema(outputSchema).serializeNode(node);
|
52
|
+
const element = serializedNode;
|
53
|
+
if (((_a = element.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'e:localization') {
|
54
|
+
return element;
|
55
|
+
}
|
56
|
+
const parent = serializedNode.parentNode;
|
57
|
+
return findElementFromPosition(parent, pos);
|
58
|
+
}
|
38
59
|
return (React.createElement(ProseMirror, { mount: mount, state: state, dispatchTransaction: tr => {
|
39
|
-
|
40
|
-
setState(s =>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
60
|
+
setCurrentElement(findElementFromPosition(tr.doc, tr.selection.from));
|
61
|
+
setState(s => {
|
62
|
+
var _a;
|
63
|
+
const newContent = s.apply(tr);
|
64
|
+
if (tr.docChanged) {
|
65
|
+
const fragment = DOMSerializer.fromSchema(outputSchema).serializeFragment(tr.doc.content);
|
66
|
+
const div = document.createElement('div');
|
67
|
+
div.appendChild(fragment);
|
68
|
+
const path = (_a = element.getAttribute('path')) !== null && _a !== void 0 ? _a : '';
|
69
|
+
if (onContentChange) {
|
70
|
+
const nbspFixed = div.innerHTML
|
71
|
+
.replace(/ /g, ' ')
|
72
|
+
.replace(/<br>/g, '<br/>')
|
73
|
+
.replace(/<hr>/g, '<hr/>');
|
74
|
+
onContentChange(nbspFixed, path);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
return newContent;
|
78
|
+
});
|
52
79
|
} },
|
53
|
-
React.createElement(Menu, { setFormulaState: setFormulaState }),
|
80
|
+
React.createElement(Menu, { setFormulaState: setFormulaState, currentElement: currentElement }),
|
54
81
|
React.createElement("div", { ref: setMount }),
|
55
82
|
formulaState && (React.createElement(FormulaPopup, { state: formulaState, onFinish: () => {
|
56
83
|
setFormulaState(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,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnD,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,
|
1
|
+
{"version":3,"file":"EditableGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnD,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,EAAQ,MAAM,mBAAmB,CAAA;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAsB,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAElE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;IACxB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,C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ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"ExamGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAIvE,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
@@ -1,9 +1,4 @@
|
|
1
|
-
import React
|
2
|
-
|
3
|
-
import EditableGradingInstruction from './EditableGradingInstruction';
|
4
|
-
const ExamGradingInstruction = ({ element, renderChildNodes }) => {
|
5
|
-
const { editable } = useContext(GradingInstructionContext);
|
6
|
-
return (React.createElement("div", { className: "e-exam-grading-instruction notification e-pad-4", "data-annotation-anchor": "exam-grading-instruction" }, editable ? React.createElement(EditableGradingInstruction, { element: element }) : renderChildNodes(element)));
|
7
|
-
};
|
1
|
+
import React from 'react';
|
2
|
+
const ExamGradingInstruction = ({ element, renderChildNodes }) => (React.createElement("div", { className: "e-exam-grading-instruction notification e-pad-4", "data-annotation-anchor": "exam-grading-instruction" }, renderChildNodes(element)));
|
8
3
|
export default ExamGradingInstruction;
|
9
4
|
//# sourceMappingURL=ExamGradingInstruction.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExamGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"ExamGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/ExamGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,sBAAsB,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAC7G,6BAAK,SAAS,EAAC,iDAAiD,4BAAwB,0BAA0B,IAC/G,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;AAED,eAAe,sBAAsB,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 @@
|
|
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;AAEzB,wBAAgB,mBAAmB,CAAC,EAAE,cAAc,EAAE,EAAE;IAAE,cAAc,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,qBAYzF"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export function CurrentLocalization({ currentElement }) {
|
3
|
+
var _a;
|
4
|
+
const locale = currentElement === null || currentElement === void 0 ? void 0 : currentElement.getAttribute('lang');
|
5
|
+
const lang = (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
6
|
+
const examType = currentElement === null || currentElement === void 0 ? void 0 : currentElement.getAttribute('exam-type');
|
7
|
+
return (React.createElement("span", { className: "element-target" },
|
8
|
+
React.createElement("span", null, "Kohdennus:"),
|
9
|
+
React.createElement("span", { className: "enabled" }, lang ? `${lang} yleinen` : 'Yleinen'),
|
10
|
+
React.createElement("span", { className: examType == 'hearing-impaired' ? 'enabled' : 'disabled' },
|
11
|
+
lang,
|
12
|
+
" / KV"),
|
13
|
+
React.createElement("span", { className: examType == 'visually-impaired' ? 'enabled' : 'disabled' },
|
14
|
+
lang,
|
15
|
+
" / NV")));
|
16
|
+
}
|
17
|
+
//# 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;AAEzB,MAAM,UAAU,mBAAmB,CAAC,EAAE,cAAc,EAAsC;;IACxF,MAAM,MAAM,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IACnD,MAAM,IAAI,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,0CAAE,WAAW,EAAE,CAAA;IACjD,MAAM,QAAQ,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,CAAC,WAAW,CAAC,CAAA;IAC1D,OAAO,CACL,8BAAM,SAAS,EAAC,gBAAgB;QAC9B,+CAAuB;QACvB,8BAAM,SAAS,EAAC,SAAS,IAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,SAAS,CAAQ;QACvE,8BAAM,SAAS,EAAE,QAAQ,IAAI,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU;YAAG,IAAI;oBAAa;QAC5F,8BAAM,SAAS,EAAE,QAAQ,IAAI,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU;YAAG,IAAI;oBAAa,CACxF,CACR,CAAA;AACH,CAAC"}
|
@@ -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":"localizatio.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/localizatio.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=localizatio.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localizatio.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/localizatio.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,IAAI;wBACrB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;wBAChC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;qBAC5C;oBACD,CAAC;iBACF,CAAA;YACH,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localizationSpan.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/localizationSpan.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=localizationSpan.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"localizationSpan.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/localizationSpan.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,IAAI;wBACrB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;wBAChC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;qBAC5C;oBACD,CAAC;iBACF,CAAA;YACH,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanWithPath.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/spanWithPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,cAAc,EAAE,QAqB5B,CAAA"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export const spanWithNowrap = {
|
2
|
+
spanWithClass: {
|
3
|
+
attrs: {
|
4
|
+
class: { default: null }
|
5
|
+
},
|
6
|
+
parseDOM: [
|
7
|
+
{
|
8
|
+
tag: 'span[path]',
|
9
|
+
getAttrs(dom) {
|
10
|
+
var _a, _b, _c;
|
11
|
+
return {
|
12
|
+
path: (_a = dom.getAttribute('path')) !== null && _a !== void 0 ? _a : null,
|
13
|
+
lang: (_b = dom.getAttribute('lang')) !== null && _b !== void 0 ? _b : null,
|
14
|
+
examType: (_c = dom.getAttribute('exam-type')) !== null && _c !== void 0 ? _c : null
|
15
|
+
};
|
16
|
+
}
|
17
|
+
}
|
18
|
+
],
|
19
|
+
toDOM(node) {
|
20
|
+
return ['span', { path: node.attrs.path, lang: node.attrs.lang, 'exam-type': node.attrs.examType }, 0];
|
21
|
+
}
|
22
|
+
}
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=spanWithPath.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanWithPath.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/spanWithPath.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAa;IACtC,aAAa,EAAE;QACb,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACzB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,YAAY;gBACjB,QAAQ,CAAC,GAAgB;;oBACvB,OAAO;wBACL,IAAI,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,IAAI;wBACtC,IAAI,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mCAAI,IAAI;wBACtC,QAAQ,EAAE,MAAA,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,IAAI;qBAChD,CAAA;gBACH,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAA;QAClH,CAAC;KACF;CACF,CAAA"}
|