@digabi/exam-engine-core 22.1.6-alpha.1 → 22.1.7-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/EditableGradingInsatruction.test.d.ts +1 -0
- package/dist/__tests__/EditableGradingInsatruction.test.d.ts.map +1 -0
- package/dist/__tests__/EditableGradingInsatruction.test.js +2 -0
- package/dist/__tests__/EditableGradingInsatruction.test.js.map +1 -0
- package/dist/__tests__/editor/List.test.d.ts +2 -0
- package/dist/__tests__/editor/List.test.d.ts.map +1 -0
- package/dist/__tests__/editor/List.test.js +54 -0
- package/dist/__tests__/editor/List.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__/editor/no-wrap.test.d.ts +2 -0
- package/dist/__tests__/editor/no-wrap.test.d.ts.map +1 -0
- package/dist/__tests__/editor/no-wrap.test.js +43 -0
- package/dist/__tests__/editor/no-wrap.test.js.map +1 -0
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts +1 -0
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.d.ts.map +1 -0
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js +2 -0
- package/dist/__tests__/utils/EditableGradingInstructionsWrapper.js.map +1 -0
- package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts +1 -0
- package/dist/__tests__/utils/renderEditableGradingInstructions.d.ts.map +1 -0
- package/dist/__tests__/utils/renderEditableGradingInstructions.js +2 -0
- package/dist/__tests__/utils/renderEditableGradingInstructions.js.map +1 -0
- package/dist/components/LexicalEditor.d.ts +3 -0
- package/dist/components/LexicalEditor.d.ts.map +1 -0
- package/dist/components/LexicalEditor.js +44 -0
- package/dist/components/LexicalEditor.js.map +1 -0
- package/dist/components/RTE.d.ts +3 -0
- package/dist/components/RTE.d.ts.map +1 -0
- package/dist/components/RTE.js +23 -0
- package/dist/components/RTE.js.map +1 -0
- package/dist/components/TablePlugin.d.ts +1 -0
- package/dist/components/TablePlugin.d.ts.map +1 -0
- package/dist/components/TablePlugin.js +2 -0
- package/dist/components/TablePlugin.js.map +1 -0
- package/dist/components/ToolBarPlugin.d.ts +10 -0
- package/dist/components/ToolBarPlugin.d.ts.map +1 -0
- package/dist/components/ToolBarPlugin.js +111 -0
- package/dist/components/ToolBarPlugin.js.map +1 -0
- package/dist/components/context/AnnotationContext.d.ts +8 -0
- package/dist/components/context/AnnotationContext.d.ts.map +1 -0
- package/dist/components/context/AnnotationContext.js +3 -0
- package/dist/components/context/AnnotationContext.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/exam/ExamineExam.d.ts +5 -0
- package/dist/components/exam/ExamineExam.d.ts.map +1 -0
- package/dist/components/exam/ExamineExam.js +20 -0
- package/dist/components/exam/ExamineExam.js.map +1 -0
- package/dist/components/exam/FinishExam.d.ts +5 -0
- package/dist/components/exam/FinishExam.d.ts.map +1 -0
- package/dist/components/exam/FinishExam.js +17 -0
- package/dist/components/exam/FinishExam.js.map +1 -0
- package/dist/components/grading/reactAnnotation.d.ts +4 -0
- package/dist/components/grading/reactAnnotation.d.ts.map +1 -0
- package/dist/components/grading/reactAnnotation.js +54 -0
- package/dist/components/grading/reactAnnotation.js.map +1 -0
- package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -1
- package/dist/components/grading-instructions/EditableGradingInstruction.js +19 -9
- package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -1
- package/dist/components/grading-instructions/GradingInstructions.d.ts +1 -1
- package/dist/components/grading-instructions/SlateTableEditor.d.ts +22 -0
- package/dist/components/grading-instructions/SlateTableEditor.d.ts.map +1 -0
- package/dist/components/grading-instructions/SlateTableEditor.js +44 -0
- package/dist/components/grading-instructions/SlateTableEditor.js.map +1 -0
- package/dist/components/grading-instructions/SlateUtils.d.ts +5 -0
- package/dist/components/grading-instructions/SlateUtils.d.ts.map +1 -0
- package/dist/components/grading-instructions/SlateUtils.js +28 -0
- package/dist/components/grading-instructions/SlateUtils.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/List.d.ts +7 -0
- package/dist/components/grading-instructions/editor/List.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/List.js +41 -0
- package/dist/components/grading-instructions/editor/List.js.map +1 -0
- package/dist/components/grading-instructions/editor/MathPopup.d.ts +10 -0
- package/dist/components/grading-instructions/editor/MathPopup.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/MathPopup.js +94 -0
- package/dist/components/grading-instructions/editor/MathPopup.js.map +1 -0
- package/dist/components/grading-instructions/editor/Menu.d.ts +1 -0
- package/dist/components/grading-instructions/editor/Menu.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/Menu.js +2 -0
- package/dist/components/grading-instructions/editor/Menu.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 +3 -52
- package/dist/components/grading-instructions/editor/Table.js.map +1 -1
- package/dist/components/grading-instructions/editor/findNode.d.ts +3 -0
- package/dist/components/grading-instructions/editor/findNode.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/findNode.js +10 -0
- package/dist/components/grading-instructions/editor/findNode.js.map +1 -0
- package/dist/components/grading-instructions/editor/keymap.d.ts +2 -0
- package/dist/components/grading-instructions/editor/keymap.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/keymap.js +12 -0
- package/dist/components/grading-instructions/editor/keymap.js.map +1 -0
- package/dist/components/grading-instructions/editor/math-svg.d.ts +2 -0
- package/dist/components/grading-instructions/editor/math-svg.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/math-svg.js +22 -0
- package/dist/components/grading-instructions/editor/math-svg.js.map +1 -0
- package/dist/components/grading-instructions/editor/math.d.ts +4 -0
- package/dist/components/grading-instructions/editor/math.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/math.js +55 -0
- package/dist/components/grading-instructions/editor/math.js.map +1 -0
- package/dist/components/grading-instructions/editor/noWrap.d.ts +3 -0
- package/dist/components/grading-instructions/editor/noWrap.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/noWrap.js +13 -0
- package/dist/components/grading-instructions/editor/noWrap.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/listSchema.d.ts +72 -0
- package/dist/components/grading-instructions/editor/schemas/listSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/listSchema.js +7 -0
- package/dist/components/grading-instructions/editor/schemas/listSchema.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/spanWithClass.d.ts +3 -0
- package/dist/components/grading-instructions/editor/spanWithClass.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/spanWithClass.js +19 -0
- package/dist/components/grading-instructions/editor/spanWithClass.js.map +1 -0
- package/dist/components/grading-instructions/prosemirror.d.ts +8 -0
- package/dist/components/grading-instructions/prosemirror.d.ts.map +1 -0
- package/dist/components/grading-instructions/prosemirror.js +108 -0
- package/dist/components/grading-instructions/prosemirror.js.map +1 -0
- package/dist/components/results/isExamFinishPageHook.d.ts +2 -0
- package/dist/components/results/isExamFinishPageHook.d.ts.map +1 -0
- package/dist/components/results/isExamFinishPageHook.js +7 -0
- package/dist/components/results/isExamFinishPageHook.js.map +1 -0
- package/dist/components/shared/CreateAnnotationPopup.d.ts +6 -0
- package/dist/components/shared/CreateAnnotationPopup.d.ts.map +1 -0
- package/dist/components/shared/CreateAnnotationPopup.js +11 -0
- package/dist/components/shared/CreateAnnotationPopup.js.map +1 -0
- package/dist/components/shared/PopupUtils.d.ts +4 -0
- package/dist/components/shared/PopupUtils.d.ts.map +1 -0
- package/dist/components/shared/PopupUtils.js +26 -0
- package/dist/components/shared/PopupUtils.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/dist/store/listenerMiddleware.d.ts +89 -0
- package/dist/store/listenerMiddleware.d.ts.map +1 -0
- package/dist/store/listenerMiddleware.js +6 -0
- package/dist/store/listenerMiddleware.js.map +1 -0
- package/package.json +3 -2
- package/dist/components/Localization.d.ts +0 -5
- package/dist/components/Localization.d.ts.map +0 -1
- package/dist/components/Localization.js +0 -9
- package/dist/components/Localization.js.map +0 -1
- package/dist/components/grading-instructions/GradingInstruction.d.ts +0 -7
- package/dist/components/grading-instructions/GradingInstruction.d.ts.map +0 -1
- package/dist/components/grading-instructions/GradingInstruction.js +0 -9
- package/dist/components/grading-instructions/GradingInstruction.js.map +0 -1
- package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts +0 -9
- package/dist/components/grading-instructions/editor/AttributeToggleButton.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/AttributeToggleButton.js +0 -53
- package/dist/components/grading-instructions/editor/AttributeToggleButton.js.map +0 -1
- package/dist/components/grading-instructions/editor/CurrentElement.d.ts +0 -2
- package/dist/components/grading-instructions/editor/CurrentElement.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/CurrentElement.js +0 -8
- package/dist/components/grading-instructions/editor/CurrentElement.js.map +0 -1
- package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts +0 -7
- package/dist/components/grading-instructions/editor/CurrentLocalization.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/CurrentLocalization.js +0 -13
- package/dist/components/grading-instructions/editor/CurrentLocalization.js.map +0 -1
- package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts +0 -6
- package/dist/components/grading-instructions/editor/LocalizationButtons.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/LocalizationButtons.js +0 -14
- package/dist/components/grading-instructions/editor/LocalizationButtons.js.map +0 -1
- package/dist/components/grading-instructions/editor/localizatio.d.ts +0 -3
- package/dist/components/grading-instructions/editor/localizatio.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/localizatio.js +0 -36
- package/dist/components/grading-instructions/editor/localizatio.js.map +0 -1
- package/dist/components/grading-instructions/editor/localizationSpan.d.ts +0 -3
- package/dist/components/grading-instructions/editor/localizationSpan.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/localizationSpan.js +0 -36
- package/dist/components/grading-instructions/editor/localizationSpan.js.map +0 -1
- package/dist/components/grading-instructions/editor/spanWithPath.d.ts +0 -3
- package/dist/components/grading-instructions/editor/spanWithPath.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/spanWithPath.js +0 -24
- package/dist/components/grading-instructions/editor/spanWithPath.js.map +0 -1
- package/dist/components/grading-instructions/editor/util.d.ts +0 -6
- package/dist/components/grading-instructions/editor/util.d.ts.map +0 -1
- package/dist/components/grading-instructions/editor/util.js +0 -10
- package/dist/components/grading-instructions/editor/util.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
- /package/dist/__tests__/editor/{nbsp.test.js → NBSP.test.js} +0 -0
- /package/dist/__tests__/editor/{nbsp.test.js.map → NBSP.test.js.map} +0 -0
- /package/dist/components/grading-instructions/editor/{Localization.d.ts → localization.d.ts} +0 -0
- /package/dist/components/grading-instructions/editor/{Localization.d.ts.map → localization.d.ts.map} +0 -0
- /package/dist/components/grading-instructions/editor/{Localization.js → localization.js} +0 -0
- /package/dist/components/grading-instructions/editor/{Localization.js.map → localization.js.map} +0 -0
@@ -1,9 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,53 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CurrentElement.d.ts","sourceRoot":"","sources":["../../../../src/components/grading-instructions/editor/CurrentElement.tsx"],"names":[],"mappings":""}
|
@@ -1,8 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,13 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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 +0,0 @@
|
|
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"}
|
@@ -1,14 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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 +0,0 @@
|
|
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"}
|
@@ -1,36 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,36 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,24 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,6 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,10 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/dist/components/grading-instructions/editor/{Localization.d.ts → localization.d.ts}
RENAMED
File without changes
|
/package/dist/components/grading-instructions/editor/{Localization.d.ts.map → localization.d.ts.map}
RENAMED
File without changes
|
File without changes
|
/package/dist/components/grading-instructions/editor/{Localization.js.map → localization.js.map}
RENAMED
File without changes
|