@digabi/exam-engine-core 22.1.6-alpha.0 → 22.1.6-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts +2 -0
  2. package/dist/__tests__/EditableGradingInstructionLocalization.test.d.ts.map +1 -0
  3. package/dist/__tests__/EditableGradingInstructionLocalization.test.js +75 -0
  4. package/dist/__tests__/EditableGradingInstructionLocalization.test.js.map +1 -0
  5. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  6. package/dist/components/Localization.d.ts +5 -0
  7. package/dist/components/Localization.d.ts.map +1 -0
  8. package/dist/components/Localization.js +9 -0
  9. package/dist/components/Localization.js.map +1 -0
  10. package/dist/components/context/AttachmentContext.d.ts.map +1 -1
  11. package/dist/components/context/ExamContext.d.ts.map +1 -1
  12. package/dist/components/context/QuestionContext.d.ts.map +1 -1
  13. package/dist/components/context/ResultsContext.d.ts.map +1 -1
  14. package/dist/components/context/SectionContext.d.ts.map +1 -1
  15. package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -1
  16. package/dist/components/grading-instructions/EditableGradingInstruction.js +3 -2
  17. package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -1
  18. package/dist/components/grading-instructions/GradingInstruction.d.ts +7 -0
  19. package/dist/components/grading-instructions/GradingInstruction.d.ts.map +1 -0
  20. package/dist/components/grading-instructions/GradingInstruction.js +9 -0
  21. package/dist/components/grading-instructions/GradingInstruction.js.map +1 -0
  22. package/dist/components/grading-instructions/GradingInstructions.d.ts +1 -1
  23. package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts +9 -0
  24. package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts.map +1 -0
  25. package/dist/components/grading-instructions/editor/AttributeToggleButton.js +53 -0
  26. package/dist/components/grading-instructions/editor/AttributeToggleButton.js.map +1 -0
  27. package/dist/components/grading-instructions/editor/CurrentElement.d.ts +2 -0
  28. package/dist/components/grading-instructions/editor/CurrentElement.d.ts.map +1 -0
  29. package/dist/components/grading-instructions/editor/CurrentElement.js +8 -0
  30. package/dist/components/grading-instructions/editor/CurrentElement.js.map +1 -0
  31. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts +7 -0
  32. package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +1 -0
  33. package/dist/components/grading-instructions/editor/CurrentLocalization.js +13 -0
  34. package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +1 -0
  35. package/dist/components/grading-instructions/editor/Localization.d.ts +3 -0
  36. package/dist/components/grading-instructions/editor/Localization.d.ts.map +1 -0
  37. package/dist/components/grading-instructions/editor/Localization.js +36 -0
  38. package/dist/components/grading-instructions/editor/Localization.js.map +1 -0
  39. package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts +6 -0
  40. package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts.map +1 -0
  41. package/dist/components/grading-instructions/editor/LocalizationButtons.js +14 -0
  42. package/dist/components/grading-instructions/editor/LocalizationButtons.js.map +1 -0
  43. package/dist/components/grading-instructions/editor/localizatio.d.ts +3 -0
  44. package/dist/components/grading-instructions/editor/localizatio.d.ts.map +1 -0
  45. package/dist/components/grading-instructions/editor/localizatio.js +36 -0
  46. package/dist/components/grading-instructions/editor/localizatio.js.map +1 -0
  47. package/dist/components/grading-instructions/editor/localizationSpan.d.ts +3 -0
  48. package/dist/components/grading-instructions/editor/localizationSpan.d.ts.map +1 -0
  49. package/dist/components/grading-instructions/editor/localizationSpan.js +36 -0
  50. package/dist/components/grading-instructions/editor/localizationSpan.js.map +1 -0
  51. package/dist/components/grading-instructions/editor/spanWithPath.d.ts +3 -0
  52. package/dist/components/grading-instructions/editor/spanWithPath.d.ts.map +1 -0
  53. package/dist/components/grading-instructions/editor/spanWithPath.js +24 -0
  54. package/dist/components/grading-instructions/editor/spanWithPath.js.map +1 -0
  55. package/dist/components/grading-instructions/editor/util.d.ts +6 -0
  56. package/dist/components/grading-instructions/editor/util.d.ts.map +1 -0
  57. package/dist/components/grading-instructions/editor/util.js +10 -0
  58. package/dist/components/grading-instructions/editor/util.js.map +1 -0
  59. package/dist/main-bundle.js +1 -1
  60. package/dist/main-bundle.js.LICENSE.txt +1 -1
  61. package/dist/main.css +1 -1
  62. package/package.json +2 -2
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ExamComponentProps } from '../createRenderChildNodes';
3
+ declare const Localization: React.FunctionComponent<ExamComponentProps>;
4
+ export default Localization;
5
+ //# sourceMappingURL=Localization.d.ts.map
@@ -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,mEASjC,CAAA"}
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,mEAO1B,CAAA"}
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,mEAsB9B,CAAA"}
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;AAEv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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,mEAkB7B,CAAA"}
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;AA8D9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBAkEpE;AAED,eAAe,0BAA0B,CAAA"}
1
+ {"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;AA+D9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBAkEpE;AAED,eAAe,0BAA0B,CAAA"}
@@ -16,6 +16,7 @@ import { ImageUploadButton } from './editor/ImageUploadButton';
16
16
  import { imageInputSchema, imageOutputSchema } from './editor/schemas/image-schema';
17
17
  import { CommonExamContext } from '../context/CommonExamContext';
18
18
  import { faBold, faItalic } from '@fortawesome/free-solid-svg-icons';
19
+ import { localization } from './editor/localization';
19
20
  function Menu(props) {
20
21
  const { onSaveImage } = useContext(GradingInstructionContext);
21
22
  const [isFloating, setIsFloating] = useState(false);
@@ -56,11 +57,11 @@ function EditableGradingInstruction({ element }) {
56
57
  .append(formulaSchema)
57
58
  .append(tableSchema)
58
59
  .update('image', imageInputSchema(resolveAttachment)),
59
- marks: baseSchema.spec.marks.append(spanWithNowrap)
60
+ marks: baseSchema.spec.marks.append(spanWithNowrap).append(localization(true))
60
61
  });
61
62
  const outputSchema = new Schema({
62
63
  nodes: baseSchema.spec.nodes.append(formulaOutputSchema).append(tableSchema).update('image', imageOutputSchema),
63
- marks: baseSchema.spec.marks.append(spanWithNowrap)
64
+ marks: baseSchema.spec.marks.append(spanWithNowrap).append(localization(false))
64
65
  });
65
66
  const doc = ProseDOMParser.fromSchema(inputSchema).parse(element);
66
67
  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,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;A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,MAAM,CAAC,mCAAI,EAAE,CAAA;oBAC/C,IAAI,eAAe,EAAE,CAAC;wBACpB,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS;6BAC5B,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC;6BAC5B,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC;6BACzB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;wBAC5B,eAAe,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;oBAClC,CAAC;gBACH,CAAC;gBACD,OAAO,UAAU,CAAA;YACnB,CAAC,CAAC,CAAA;QACJ,CAAC;QAEA,KAAK,IAAI,oBAAC,IAAI,IAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,GAAI;QACtG,6BAAK,GAAG,EAAE,QAAQ,GAAI;QAErB,YAAY,IAAI,CACf,oBAAC,YAAY,IACX,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,GAAG,EAAE;gBACb,eAAe,CAAC,IAAI,CAAC,CAAA;YACvB,CAAC,GACD,CACH,CACW,CACf,CAAA;AACH,CAAC;AAED,eAAe,0BAA0B,CAAA"}
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,aA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CACH,CACW,CACf,CAAA;AACH,CAAC;AAED,eAAe,0BAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const GradingInstruction: React.FunctionComponent<{
3
+ element: Element;
4
+ instructionType: string;
5
+ }>;
6
+ export default GradingInstruction;
7
+ //# sourceMappingURL=GradingInstruction.d.ts.map
@@ -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":"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AC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,IAC1E,WAAW,CACL,CACV,CAAA;AACH,CAAC;AAED,eAAe,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CurrentElement.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,7 @@
1
+ import React from 'react';
2
+ export declare function CurrentLocalization({ currentAttributes }: {
3
+ currentAttributes: {
4
+ [key: string]: string;
5
+ };
6
+ }): React.JSX.Element;
7
+ //# sourceMappingURL=CurrentLocalization.d.ts.map
@@ -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"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare function localization(hideable: boolean): MarkSpec;
3
+ //# sourceMappingURL=localization.d.ts.map
@@ -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,6 @@
1
+ import React from 'react';
2
+ export declare function LocalizationButtons({ lang, examType }: {
3
+ lang: string;
4
+ examType: string;
5
+ }): React.JSX.Element;
6
+ //# sourceMappingURL=LocalizationButtons.d.ts.map
@@ -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"}
@@ -0,0 +1,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare function localization(hideable: boolean): MarkSpec;
3
+ //# sourceMappingURL=localizatio.d.ts.map
@@ -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,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare function localization(hideable: boolean): MarkSpec;
3
+ //# sourceMappingURL=localizationSpan.d.ts.map
@@ -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,3 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare const spanWithNowrap: MarkSpec;
3
+ //# sourceMappingURL=spanWithPath.d.ts.map
@@ -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"}
@@ -0,0 +1,6 @@
1
+ import { Transaction } from 'prosemirror-state';
2
+ export declare function findMark(tr: Transaction, markType: string): import("prosemirror-model").Mark | undefined;
3
+ export declare function findAttributesFromCursor(tr: Transaction, markType: string): {
4
+ [key: string]: string;
5
+ };
6
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gDAIzD;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAGrG"}
@@ -0,0 +1,10 @@
1
+ export function findMark(tr, markType) {
2
+ const node = tr.doc.nodeAt(tr.selection.from);
3
+ return node === null || node === void 0 ? void 0 : node.marks.find(mark => mark.type.name == markType);
4
+ }
5
+ export function findAttributesFromCursor(tr, markType) {
6
+ var _a;
7
+ const mark = findMark(tr, markType);
8
+ return (_a = mark === null || mark === void 0 ? void 0 : mark.attrs) !== null && _a !== void 0 ? _a : {};
9
+ }
10
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/util.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CAAC,EAAe,EAAE,QAAgB;IACxD,MAAM,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAE7C,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EAAe,EAAE,QAAgB;;IACxE,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;IACnC,OAAO,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,mCAAI,EAAE,CAAA;AAC1B,CAAC"}