@yungu-fed/question-editor 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6843 -2030
- package/dist/index.mjs +5381 -1583
- package/dist/model/classification.d.ts +10 -0
- package/dist/model/classification.d.ts.map +1 -0
- package/dist/model/line-connect.d.ts +28 -0
- package/dist/model/line-connect.d.ts.map +1 -0
- package/dist/model/matching.d.ts +27 -0
- package/dist/model/matching.d.ts.map +1 -0
- package/dist/model/question-element-specs.d.ts +3 -3
- package/dist/model/question-element-specs.d.ts.map +1 -1
- package/dist/model/question-structure.d.ts +56 -3
- package/dist/model/question-structure.d.ts.map +1 -1
- package/dist/model/rich-text-blank.d.ts.map +1 -1
- package/dist/model/text-marker.d.ts +18 -0
- package/dist/model/text-marker.d.ts.map +1 -0
- package/dist/model/types.d.ts +143 -8
- package/dist/model/types.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentClassificationEditor.d.ts +14 -0
- package/dist/question/content-editor/QuestionContentClassificationEditor.d.ts.map +1 -0
- package/dist/question/content-editor/QuestionContentEditor.d.ts +3 -1
- package/dist/question/content-editor/QuestionContentEditor.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentElementEditor.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentLineConnectEditor.d.ts +15 -0
- package/dist/question/content-editor/QuestionContentLineConnectEditor.d.ts.map +1 -0
- package/dist/question/content-editor/QuestionContentMatchingEditor.d.ts +15 -0
- package/dist/question/content-editor/QuestionContentMatchingEditor.d.ts.map +1 -0
- package/dist/question/content-editor/QuestionContentOrderingEditor.d.ts +14 -0
- package/dist/question/content-editor/QuestionContentOrderingEditor.d.ts.map +1 -0
- package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentTextMarkerEditor.d.ts +14 -0
- package/dist/question/content-editor/QuestionContentTextMarkerEditor.d.ts.map +1 -0
- package/dist/question/content-editor/QuestionContentWordBuilderEditor.d.ts +16 -0
- package/dist/question/content-editor/QuestionContentWordBuilderEditor.d.ts.map +1 -0
- package/dist/question/content-editor/QuestionRichTextField.d.ts.map +1 -1
- package/dist/question/content-editor/helpers.d.ts +42 -6
- package/dist/question/content-editor/helpers.d.ts.map +1 -1
- package/dist/question/content-editor/i18n.d.ts.map +1 -1
- package/dist/question/content-editor/structure.d.ts +3 -2
- package/dist/question/content-editor/structure.d.ts.map +1 -1
- package/dist/question/content-editor/subquestion-template.d.ts +4 -0
- package/dist/question/content-editor/subquestion-template.d.ts.map +1 -0
- package/dist/question/content-editor/types.d.ts +159 -13
- package/dist/question/content-editor/types.d.ts.map +1 -1
- package/dist/question/elements/text-marker/text-marker-plugin.d.ts +3 -0
- package/dist/question/elements/text-marker/text-marker-plugin.d.ts.map +1 -0
- package/dist/question/i18n/messages.d.ts +5 -0
- package/dist/question/i18n/messages.d.ts.map +1 -1
- package/dist/question/line-connect/lineConnectLines.d.ts +37 -0
- package/dist/question/line-connect/lineConnectLines.d.ts.map +1 -0
- package/dist/question/player/QuestionBlankGroupPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionClassificationPlayer.d.ts +14 -0
- package/dist/question/player/QuestionClassificationPlayer.d.ts.map +1 -0
- package/dist/question/player/QuestionFillTextContentPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionLineConnectPlayer.d.ts +14 -0
- package/dist/question/player/QuestionLineConnectPlayer.d.ts.map +1 -0
- package/dist/question/player/QuestionMatchingPlayer.d.ts +14 -0
- package/dist/question/player/QuestionMatchingPlayer.d.ts.map +1 -0
- package/dist/question/player/QuestionOptionGroupPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionOrderingPlayer.d.ts +14 -0
- package/dist/question/player/QuestionOrderingPlayer.d.ts.map +1 -0
- package/dist/question/player/QuestionPlayerComposite.d.ts.map +1 -1
- package/dist/question/player/QuestionPlayerElement.d.ts.map +1 -1
- package/dist/question/player/QuestionTextMarkerPlayer.d.ts +14 -0
- package/dist/question/player/QuestionTextMarkerPlayer.d.ts.map +1 -0
- package/dist/question/player/QuestionWordBuilderPlayer.d.ts +15 -0
- package/dist/question/player/QuestionWordBuilderPlayer.d.ts.map +1 -0
- package/dist/question/player/helpers.d.ts +13 -2
- package/dist/question/player/helpers.d.ts.map +1 -1
- package/dist/question/player/types.d.ts +32 -2
- package/dist/question/player/types.d.ts.map +1 -1
- package/dist/question/preview/QuestionCompositePreview.d.ts.map +1 -1
- package/dist/question/renderers/QuestionBlankGroupView.d.ts.map +1 -1
- package/dist/question/renderers/QuestionClassificationView.d.ts +10 -0
- package/dist/question/renderers/QuestionClassificationView.d.ts.map +1 -0
- package/dist/question/renderers/QuestionContentElementView.d.ts.map +1 -1
- package/dist/question/renderers/QuestionLineConnectView.d.ts +10 -0
- package/dist/question/renderers/QuestionLineConnectView.d.ts.map +1 -0
- package/dist/question/renderers/QuestionMatchingView.d.ts +10 -0
- package/dist/question/renderers/QuestionMatchingView.d.ts.map +1 -0
- package/dist/question/renderers/QuestionOptionGroupView.d.ts.map +1 -1
- package/dist/question/renderers/QuestionOrderingView.d.ts +10 -0
- package/dist/question/renderers/QuestionOrderingView.d.ts.map +1 -0
- package/dist/question/renderers/QuestionRichContentView.d.ts.map +1 -1
- package/dist/question/renderers/QuestionRichContentWithBlankView.d.ts +14 -0
- package/dist/question/renderers/QuestionRichContentWithBlankView.d.ts.map +1 -0
- package/dist/question/renderers/QuestionTextMarkerContent.d.ts +12 -0
- package/dist/question/renderers/QuestionTextMarkerContent.d.ts.map +1 -0
- package/dist/question/renderers/QuestionTextMarkerView.d.ts +10 -0
- package/dist/question/renderers/QuestionTextMarkerView.d.ts.map +1 -0
- package/dist/question/renderers/QuestionWordBuilderView.d.ts +11 -0
- package/dist/question/renderers/QuestionWordBuilderView.d.ts.map +1 -0
- package/dist/question/renderers/classificationAnswers.d.ts +4 -0
- package/dist/question/renderers/classificationAnswers.d.ts.map +1 -0
- package/dist/question/renderers/lineConnectAnswers.d.ts +4 -0
- package/dist/question/renderers/lineConnectAnswers.d.ts.map +1 -0
- package/dist/question/renderers/matchingAnswers.d.ts +4 -0
- package/dist/question/renderers/matchingAnswers.d.ts.map +1 -0
- package/dist/question/renderers/optionGroupAnswers.d.ts +4 -0
- package/dist/question/renderers/optionGroupAnswers.d.ts.map +1 -0
- package/dist/question/renderers/orderingAnswerGroups.d.ts +4 -0
- package/dist/question/renderers/orderingAnswerGroups.d.ts.map +1 -0
- package/dist/question/renderers/wordBuilderAnswers.d.ts +4 -0
- package/dist/question/renderers/wordBuilderAnswers.d.ts.map +1 -0
- package/dist/question/rich-text/RichTextField.d.ts +3 -2
- package/dist/question/rich-text/RichTextField.d.ts.map +1 -1
- package/dist/question/structure-editor/QuestionStructureCanvas.d.ts +2 -2
- package/dist/question/structure-editor/QuestionStructureCanvas.d.ts.map +1 -1
- package/dist/question/structure-editor/QuestionStructureEditor.d.ts.map +1 -1
- package/dist/question/structure-editor/QuestionStructureSettings.d.ts +6 -3
- package/dist/question/structure-editor/QuestionStructureSettings.d.ts.map +1 -1
- package/dist/question/structure-editor/structure-editor-labels.d.ts +22 -2
- package/dist/question/structure-editor/structure-editor-labels.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { QuestionContentEditorTranslator } from "./i18n";
|
|
3
|
+
import type { QuestionContentItem, QuestionContentOrderingItem, QuestionContentRichTextControls } from "./types";
|
|
4
|
+
type QuestionContentOrderingEditorProps = {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
hasAnswer: boolean;
|
|
7
|
+
item: QuestionContentOrderingItem;
|
|
8
|
+
onChange: (item: QuestionContentItem) => void;
|
|
9
|
+
richTextControls: QuestionContentRichTextControls;
|
|
10
|
+
translator: QuestionContentEditorTranslator;
|
|
11
|
+
};
|
|
12
|
+
export declare function QuestionContentOrderingEditor({ disabled, hasAnswer, item, onChange, richTextControls, translator, }: Readonly<QuestionContentOrderingEditorProps>): ReactElement;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=QuestionContentOrderingEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionContentOrderingEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentOrderingEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,+BAA+B,EAEhC,MAAM,SAAS,CAAC;AAmBjB,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,2BAA2B,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,+BAA+B,CAAC;IAClD,UAAU,EAAE,+BAA+B,CAAC;CAC7C,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,EAC5C,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,UAAU,GACX,EAAE,QAAQ,CAAC,kCAAkC,CAAC,GAAG,YAAY,CA2I7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionContentSubquestionChildEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentSubquestionChildEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EACV,+BAA+B,EAChC,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EACV,oBAAoB,EACpB,+BAA+B,EAE/B,kCAAkC,EACnC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"QuestionContentSubquestionChildEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentSubquestionChildEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EACV,+BAA+B,EAChC,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EACV,oBAAoB,EACpB,+BAA+B,EAE/B,kCAAkC,EACnC,MAAM,SAAS,CAAC;AAuBjB,KAAK,0CAA0C,GAAG;IAChD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpC,gBAAgB,EAAE,+BAA+B,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,kCAAkC,EAAE,CAAC;IAC3D,UAAU,EAAE,+BAA+B,CAAC;CAC7C,CAAC;AAEF,wBAAgB,qCAAqC,CAAC,EACpD,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,UAAU,GACX,EAAE,QAAQ,CAAC,0CAA0C,CAAC,GAAG,YAAY,CA2IrE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { QuestionContentEditorTranslator } from "./i18n";
|
|
3
|
+
import type { QuestionContentItem, QuestionContentRichTextControls, QuestionContentTextMarkerItem } from "./types";
|
|
4
|
+
type QuestionContentTextMarkerEditorProps = {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
hasAnswer: boolean;
|
|
7
|
+
item: QuestionContentTextMarkerItem;
|
|
8
|
+
onChange: (item: QuestionContentItem) => void;
|
|
9
|
+
richTextControls: QuestionContentRichTextControls;
|
|
10
|
+
translator: QuestionContentEditorTranslator;
|
|
11
|
+
};
|
|
12
|
+
export declare function QuestionContentTextMarkerEditor({ disabled, hasAnswer, item, onChange, richTextControls, translator, }: Readonly<QuestionContentTextMarkerEditorProps>): ReactElement;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=QuestionContentTextMarkerEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionContentTextMarkerEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentTextMarkerEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAejB,KAAK,oCAAoC,GAAG;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,6BAA6B,CAAC;IACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,+BAA+B,CAAC;IAClD,UAAU,EAAE,+BAA+B,CAAC;CAC7C,CAAC;AAEF,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,UAAU,GACX,EAAE,QAAQ,CAAC,oCAAoC,CAAC,GAAG,YAAY,CAyF/D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { QuestionContentEditorTranslator } from "./i18n";
|
|
3
|
+
import type { QuestionContentItem, QuestionContentRichTextControls, QuestionContentWordBuilderItem, QuestionContentWordBuilderStructureElement } from "./types";
|
|
4
|
+
type QuestionContentWordBuilderEditorProps = {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
element: QuestionContentWordBuilderStructureElement;
|
|
7
|
+
hasAnswer: boolean;
|
|
8
|
+
item: QuestionContentWordBuilderItem;
|
|
9
|
+
onChange: (item: QuestionContentItem) => void;
|
|
10
|
+
richTextControls: QuestionContentRichTextControls;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
translator: QuestionContentEditorTranslator;
|
|
13
|
+
};
|
|
14
|
+
export declare function QuestionContentWordBuilderEditor({ disabled, element, hasAnswer, item, onChange, richTextControls, title, translator, }: Readonly<QuestionContentWordBuilderEditorProps>): ReactElement;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=QuestionContentWordBuilderEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionContentWordBuilderEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentWordBuilderEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,8BAA8B,EAC9B,0CAA0C,EAC3C,MAAM,SAAS,CAAC;AAgBjB,KAAK,qCAAqC,GAAG;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,0CAA0C,CAAC;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,8BAA8B,CAAC;IACrC,QAAQ,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,+BAA+B,CAAC;IAClD,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,+BAA+B,CAAC;CAC7C,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACR,OAAO,EACP,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,KAAK,EACL,UAAU,GACX,EAAE,QAAQ,CAAC,qCAAqC,CAAC,GAAG,YAAY,CAwJhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionRichTextField.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionRichTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"QuestionRichTextField.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionRichTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EACV,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAIjB,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,+BAA+B,CAAC;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,wBAAwB,CAAC;IAChC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,EACR,WAAW,EACX,KAAK,EACL,OAAmB,GACpB,EAAE,QAAQ,CAAC,0BAA0B,CAAC,GAAG,YAAY,CAkBrD"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import type { RichTextEditorValue } from "@yungu-fed/rich-text-editor";
|
|
2
|
-
import type { QuestionContentCandidateOption, QuestionContentCandidateOptionGroup, QuestionContentBlankGroupItem, QuestionContentDraft, QuestionContentExtraItem, QuestionContentExtraStructureItem, QuestionContentFillTextItem, QuestionContentFillTextStructureElement, QuestionContentItem, QuestionContentJudgeAnswerMode, QuestionContentOptionGroupItem, QuestionContentOptionLabelStyle, QuestionContentSerializedDraft, QuestionContentSerializedExtraItem, QuestionContentSerializedItem, QuestionContentStructure, QuestionContentStructureElement, QuestionFillTextAnswer, QuestionRichBlankAnswerGroup, QuestionRichContentValue, QuestionTableOptions } from "./types";
|
|
1
|
+
import type { RichTextEditorPlugin, RichTextEditorValue } from "@yungu-fed/rich-text-editor";
|
|
2
|
+
import type { QuestionContentCandidateOption, QuestionContentCandidateOptionGroup, QuestionContentBlankGroupItem, QuestionContentClassificationAnswer, QuestionContentClassificationItem, QuestionContentDraft, QuestionContentExtraItem, QuestionContentExtraStructureItem, QuestionContentFillTextItem, QuestionContentFillTextStructureElement, QuestionContentItem, QuestionContentJudgeAnswerMode, QuestionContentLineConnectAnswer, QuestionContentLineConnectItem, QuestionContentLineConnectLabelStyle, QuestionContentLineConnectStructureElement, QuestionContentMatchingAnswer, QuestionContentMatchingItem, QuestionContentMatchingStructureElement, QuestionContentOrderingItem, QuestionContentOrderingOption, QuestionContentTextMarkerItem, QuestionContentOptionGroupItem, QuestionContentOptionLabelStyle, QuestionContentSerializedDraft, QuestionContentSerializedExtraItem, QuestionContentSerializedItem, QuestionContentStructure, QuestionContentStructureElement, QuestionContentWordBuilderItem, QuestionContentWordBuilderMode, QuestionContentWordBuilderStructureElement, QuestionFillTextAnswer, QuestionRichBlankAnswerGroup, QuestionRichContentValue, QuestionTableOptions } from "./types";
|
|
3
3
|
export type SharedBlankAnswerGroup = {
|
|
4
4
|
group: QuestionRichBlankAnswerGroup;
|
|
5
5
|
groupIndex: number;
|
|
6
6
|
};
|
|
7
7
|
export declare function isCompositeQuestionContentStructure(structure: QuestionContentStructure): boolean;
|
|
8
8
|
export declare function createEmptyQuestionContentDraft(structure: QuestionContentStructure, questionTypeKey?: null | number): QuestionContentDraft;
|
|
9
|
-
export declare function createRichContentValue(
|
|
10
|
-
export declare function createRichContentValueFromDocument(document: RichTextEditorValue): QuestionRichContentValue;
|
|
9
|
+
export declare function createRichContentValue(text?: string, json?: RichTextEditorValue): QuestionRichContentValue;
|
|
10
|
+
export declare function createRichContentValueFromDocument(document: RichTextEditorValue, plugins?: RichTextEditorPlugin[]): QuestionRichContentValue;
|
|
11
|
+
export declare function createTextMarkerRichContentValue(text?: string, json?: RichTextEditorValue, html?: string): QuestionRichContentValue;
|
|
12
|
+
export declare function getQuestionContentTextMarkerAnswerText(item: QuestionContentTextMarkerItem): string;
|
|
11
13
|
export declare function getRichContentDocument(content: QuestionRichContentValue): RichTextEditorValue;
|
|
12
14
|
export declare function getQuestionContentItem(draft: QuestionContentDraft, element: QuestionContentStructureElement, hasAnswer: boolean): QuestionContentItem;
|
|
13
15
|
export declare function getQuestionContentExtraItem(draft: QuestionContentDraft, extra: QuestionContentExtraStructureItem): QuestionContentExtraItem;
|
|
14
16
|
export declare function getQuestionContentOptionMarker(labelStyle: QuestionContentOptionLabelStyle, index: number): string;
|
|
17
|
+
export declare function getQuestionContentLineConnectMarker(labelStyle: QuestionContentLineConnectLabelStyle, index: number): string;
|
|
18
|
+
export declare function getQuestionContentMatchingMarker(labelStyle: QuestionContentLineConnectLabelStyle, index: number): string;
|
|
15
19
|
export declare function getQuestionContentJudgementOptions(mode: QuestionContentJudgeAnswerMode): string[];
|
|
16
20
|
export declare function isQuestionContentDraftEmpty(draft: QuestionContentDraft): boolean;
|
|
17
21
|
export declare function serializeQuestionContentDraft(draft: QuestionContentDraft): QuestionContentSerializedDraft;
|
|
@@ -19,8 +23,8 @@ export declare function createQuestionContentDraftFromSerialized(structure: Ques
|
|
|
19
23
|
questionTypeKey?: null | number;
|
|
20
24
|
children?: QuestionContentDraft[];
|
|
21
25
|
elements: (QuestionContentItem | QuestionContentSerializedItem)[];
|
|
22
|
-
|
|
23
|
-
id?: null |
|
|
26
|
+
extras?: (QuestionContentExtraItem | QuestionContentSerializedExtraItem)[];
|
|
27
|
+
id?: null | number;
|
|
24
28
|
version: string;
|
|
25
29
|
}): QuestionContentDraft;
|
|
26
30
|
export declare function updateQuestionContentItem(draft: QuestionContentDraft, nextItem: QuestionContentItem): QuestionContentDraft;
|
|
@@ -28,9 +32,13 @@ export declare function updateQuestionContentExtraItem(draft: QuestionContentDra
|
|
|
28
32
|
export declare function getQuestionContentBlankIdsFromDocument(document: RichTextEditorValue): string[];
|
|
29
33
|
export declare function getNextQuestionContentBlankId(blanks: string[]): string;
|
|
30
34
|
export declare function syncFillTextContent(item: QuestionContentFillTextItem, content: QuestionRichContentValue, hasAnswer: boolean, element: QuestionContentFillTextStructureElement): QuestionContentFillTextItem;
|
|
35
|
+
export declare function syncWordBuilderContent(item: QuestionContentWordBuilderItem, content: QuestionRichContentValue, hasAnswer: boolean, element: QuestionContentWordBuilderStructureElement): QuestionContentWordBuilderItem;
|
|
36
|
+
export declare function syncTextMarkerContent(item: QuestionContentTextMarkerItem, content: QuestionRichContentValue, hasAnswer: boolean): QuestionContentTextMarkerItem;
|
|
37
|
+
export declare function normalizeWordBuilderContentItem(item: QuestionContentWordBuilderItem, hasAnswer: boolean, element: QuestionContentWordBuilderStructureElement): QuestionContentWordBuilderItem;
|
|
31
38
|
export declare function normalizeFillTextCandidateState(item: QuestionContentFillTextItem, element: QuestionContentFillTextStructureElement, hasAnswer: boolean): QuestionContentFillTextItem;
|
|
32
39
|
export declare function createQuestionContentCandidateOption(optionId: string, content?: QuestionRichContentValue): QuestionContentCandidateOption;
|
|
33
40
|
export declare function normalizeCandidateOptions(options: QuestionContentCandidateOption[] | undefined, optionIdPrefix?: string, defaultCount?: number): QuestionContentCandidateOption[];
|
|
41
|
+
export declare function normalizeWordBuilderCandidateOptions(options: string[] | undefined, mode: QuestionContentWordBuilderMode): string[];
|
|
34
42
|
export declare function normalizeCandidateOptionGroup(group: QuestionContentCandidateOptionGroup | undefined, blankId: string): QuestionContentCandidateOptionGroup;
|
|
35
43
|
export declare function normalizeBlankOptionGroups(groups: QuestionContentCandidateOptionGroup[] | undefined, blanks: string[]): QuestionContentCandidateOptionGroup[];
|
|
36
44
|
export declare function getCandidateAnswerOptionIds(group: QuestionFillTextAnswer | undefined): string[];
|
|
@@ -59,4 +67,32 @@ export declare function deleteTableRow(item: QuestionContentOptionGroupItem, row
|
|
|
59
67
|
export declare function replaceTableCell(tableOptions: QuestionTableOptions, rowIndex: number, columnIndex: number, nextCell: QuestionRichContentValue): QuestionTableOptions;
|
|
60
68
|
export declare function replaceTableHeader(tableOptions: QuestionTableOptions, columnIndex: number, nextHeader: QuestionRichContentValue): QuestionTableOptions;
|
|
61
69
|
export declare function getQuestionTableOptions(item: QuestionContentOptionGroupItem): QuestionTableOptions;
|
|
70
|
+
export declare function normalizeLineConnectContentItem(item: QuestionContentLineConnectItem, element: QuestionContentLineConnectStructureElement, hasAnswer: boolean): QuestionContentLineConnectItem;
|
|
71
|
+
export declare function addLineConnectColumn(item: QuestionContentLineConnectItem): QuestionContentLineConnectItem;
|
|
72
|
+
export declare function deleteLineConnectColumn(item: QuestionContentLineConnectItem, columnId: string): QuestionContentLineConnectItem;
|
|
73
|
+
export declare function updateLineConnectColumnLabelStyle(item: QuestionContentLineConnectItem, columnId: string, labelStyle: QuestionContentLineConnectLabelStyle): QuestionContentLineConnectItem;
|
|
74
|
+
export declare function addLineConnectColumnItem(item: QuestionContentLineConnectItem, columnId: string): QuestionContentLineConnectItem;
|
|
75
|
+
export declare function deleteLineConnectColumnItem(item: QuestionContentLineConnectItem, itemId: string): QuestionContentLineConnectItem;
|
|
76
|
+
export declare function replaceLineConnectColumnItemContent(item: QuestionContentLineConnectItem, itemId: string, content: QuestionRichContentValue): QuestionContentLineConnectItem;
|
|
77
|
+
export declare function toggleLineConnectAnswer(answer: QuestionContentLineConnectAnswer, fromItemId: string, toItemId: string): QuestionContentLineConnectAnswer;
|
|
78
|
+
export declare function normalizeMatchingContentItem(item: QuestionContentMatchingItem, element: QuestionContentMatchingStructureElement, hasAnswer: boolean): QuestionContentMatchingItem;
|
|
79
|
+
export declare function updateMatchingColumnLabelStyle(item: QuestionContentMatchingItem, columnId: string, labelStyle: QuestionContentLineConnectLabelStyle): QuestionContentMatchingItem;
|
|
80
|
+
export declare function addMatchingColumnItem(item: QuestionContentMatchingItem, columnId: string): QuestionContentMatchingItem;
|
|
81
|
+
export declare function deleteMatchingColumnItem(item: QuestionContentMatchingItem, itemId: string): QuestionContentMatchingItem;
|
|
82
|
+
export declare function replaceMatchingColumnItemContent(item: QuestionContentMatchingItem, itemId: string, content: QuestionRichContentValue): QuestionContentMatchingItem;
|
|
83
|
+
export declare function toggleMatchingAnswer(answer: QuestionContentMatchingAnswer, fromItemId: string, toItemId: string): QuestionContentMatchingAnswer;
|
|
84
|
+
export declare function normalizeClassificationContentItem(item: QuestionContentClassificationItem, hasAnswer: boolean): QuestionContentClassificationItem;
|
|
85
|
+
export declare function addClassificationCategory(item: QuestionContentClassificationItem): QuestionContentClassificationItem;
|
|
86
|
+
export declare function deleteClassificationCategory(item: QuestionContentClassificationItem, categoryId: string): QuestionContentClassificationItem;
|
|
87
|
+
export declare function replaceClassificationCategoryContent(item: QuestionContentClassificationItem, categoryId: string, content: QuestionRichContentValue): QuestionContentClassificationItem;
|
|
88
|
+
export declare function addClassificationCard(item: QuestionContentClassificationItem): QuestionContentClassificationItem;
|
|
89
|
+
export declare function deleteClassificationCard(item: QuestionContentClassificationItem, itemId: string): QuestionContentClassificationItem;
|
|
90
|
+
export declare function replaceClassificationCardContent(item: QuestionContentClassificationItem, itemId: string, content: QuestionRichContentValue): QuestionContentClassificationItem;
|
|
91
|
+
export declare function setClassificationAnswer(answer: QuestionContentClassificationAnswer, itemId: string, categoryId: string): QuestionContentClassificationAnswer;
|
|
92
|
+
export declare function normalizeOrderingContentItem(item: QuestionContentOrderingItem, hasAnswer: boolean): QuestionContentOrderingItem;
|
|
93
|
+
export declare function addOrderingOption(item: QuestionContentOrderingItem, hasAnswer: boolean): QuestionContentOrderingItem;
|
|
94
|
+
export declare function deleteOrderingOption(item: QuestionContentOrderingItem, optionId: string, hasAnswer: boolean): QuestionContentOrderingItem;
|
|
95
|
+
export declare function replaceOrderingOptionContent(item: QuestionContentOrderingItem, optionId: string, content: QuestionRichContentValue, hasAnswer: boolean): QuestionContentOrderingItem;
|
|
96
|
+
export declare function moveOrderingAnswer(item: QuestionContentOrderingItem, optionId: string, direction: -1 | 1, hasAnswer: boolean): QuestionContentOrderingItem;
|
|
97
|
+
export declare function reorderOrderingResponse(orderedOptionIds: readonly string[], sortOptions: readonly QuestionContentOrderingOption[], optionId: string, direction: -1 | 1): string[];
|
|
62
98
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,KAAK,EACV,8BAA8B,EAC9B,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EAGnC,iCAAiC,EACjC,oBAAoB,EAC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E,MAAM,SAAS,CAAC;AAE9C,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;AAgY5E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,KAAK,MAAM,CAAC;CACxD,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,MAAM,GAAE,cAAwB,GAC/B,+BAA+B,CAMjC"}
|
|
@@ -5,16 +5,17 @@ export type QuestionStructureDraftChangeKind = "metadata" | "shape";
|
|
|
5
5
|
export declare function createQuestionContentStructureFromDraft(draft: QuestionStructureDraft, locale?: QuestionLocale): QuestionContentStructure;
|
|
6
6
|
export declare function createQuestionPreviewDraft(questionContent: QuestionContentSerializedDraft | null, contentStructure: QuestionContentStructure | null, subquestionTemplates: readonly QuestionContentSubquestionTemplate[]): QuestionContentDraft | null;
|
|
7
7
|
export declare function serializeQuestionStructureDraft(draft: QuestionStructureDraft): {
|
|
8
|
+
description: string | undefined;
|
|
8
9
|
elements: QuestionStructureElement[];
|
|
9
|
-
|
|
10
|
+
extras: QuestionStructureExtra[];
|
|
10
11
|
globalConfig: {
|
|
11
12
|
canPrint: boolean;
|
|
12
13
|
hasAnswer: boolean;
|
|
13
14
|
id: string;
|
|
14
15
|
name: string;
|
|
15
16
|
enName: string;
|
|
16
|
-
description?: string;
|
|
17
17
|
};
|
|
18
|
+
isSubjective: boolean;
|
|
18
19
|
version: string;
|
|
19
20
|
};
|
|
20
21
|
export declare function getQuestionStructureDraftChangeKind(currentDraft: QuestionStructureDraft, nextDraft: QuestionStructureDraft): QuestionStructureDraftChangeKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,sBAAsB,EAGtB,wBAAwB,EACxB,sBAAsB,EAIvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EACV,oBAAoB,EACpB,8BAA8B,EAC9B,wBAAwB,EAExB,kCAAkC,EACnC,MAAM,SAAS,CAAA;AAkBhB,MAAM,MAAM,gCAAgC,GAAG,UAAU,GAAG,OAAO,CAAA;AAWnE,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,sBAAsB,EAC7B,MAAM,CAAC,EAAE,cAAc,GACtB,wBAAwB,CAkB1B;AAED,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,8BAA8B,GAAG,IAAI,EACtD,gBAAgB,EAAE,wBAAwB,GAAG,IAAI,EACjD,oBAAoB,EAAE,SAAS,kCAAkC,EAAE,GAClE,oBAAoB,GAAG,IAAI,CA6B7B;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,sBAAsB;;;;;;;;;;;;;EAS5E;AAED,wBAAgB,mCAAmC,CACjD,YAAY,EAAE,sBAAsB,EACpC,SAAS,EAAE,sBAAsB,GAChC,gCAAgC,CAiBlC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { QuestionContentSubquestionTemplate } from "./types";
|
|
2
|
+
export declare function isQuestionContentSubquestionTemplateMatch(template: QuestionContentSubquestionTemplate, questionTypeKey: null | number): boolean;
|
|
3
|
+
export declare function findQuestionContentSubquestionTemplate(templates: readonly QuestionContentSubquestionTemplate[], questionTypeKey: null | number): QuestionContentSubquestionTemplate | undefined;
|
|
4
|
+
//# sourceMappingURL=subquestion-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subquestion-template.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/subquestion-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EACnC,MAAM,SAAS,CAAC;AAEjB,wBAAgB,yCAAyC,CACvD,QAAQ,EAAE,kCAAkC,EAC5C,eAAe,EAAE,IAAI,GAAG,MAAM,GAC7B,OAAO,CAET;AAED,wBAAgB,sCAAsC,CACpD,SAAS,EAAE,SAAS,kCAAkC,EAAE,EACxD,eAAe,EAAE,IAAI,GAAG,MAAM,GAC7B,kCAAkC,GAAG,SAAS,CAIhD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { RichTextEditorPlugin, RichTextEditorValue } from "@yungu-fed/rich-text-editor";
|
|
1
|
+
import type { RichTextEditorPlugin, RichTextEditorRootProps, RichTextEditorValue } from "@yungu-fed/rich-text-editor";
|
|
2
2
|
import type { QuestionStructureExtraKey } from "../../model/question-structure";
|
|
3
|
-
export type QuestionContentElementType = "fill" | "inlineFill" | "judgement" | "choice" | "richText";
|
|
3
|
+
export type QuestionContentElementType = "classification" | "fill" | "inlineFill" | "judgement" | "lineConnect" | "matching" | "ordering" | "choice" | "richText" | "textMarker" | "wordBuilder";
|
|
4
4
|
export type QuestionContentCandidateMode = "none" | "perBlankOptions" | "sharedPool";
|
|
5
5
|
export type QuestionContentOptionLabelStyle = "lowerAlpha" | "number" | "upperAlpha";
|
|
6
|
+
export type QuestionContentLineConnectLabelStyle = "chineseNumber" | "lowerAlpha" | "lowerRoman" | "none" | "number" | "upperAlpha";
|
|
6
7
|
export type QuestionContentOptionRenderer = "standard" | "table";
|
|
7
8
|
export type QuestionContentSelectionType = "multiple" | "single";
|
|
9
|
+
export type QuestionContentWordBuilderMode = "sentence" | "spelling";
|
|
8
10
|
export type QuestionContentJudgeAnswerMode = "checkCross" | "correctWrong" | "rightWrong" | "tf" | "validInvalid" | "yesNo";
|
|
9
11
|
export type QuestionContentStructureElementBase = {
|
|
10
12
|
elementKey: string;
|
|
@@ -21,6 +23,12 @@ export type QuestionContentFillTextStructureElement = QuestionContentStructureEl
|
|
|
21
23
|
};
|
|
22
24
|
type: "inlineFill";
|
|
23
25
|
};
|
|
26
|
+
export type QuestionContentWordBuilderStructureElement = QuestionContentStructureElementBase & {
|
|
27
|
+
config: {
|
|
28
|
+
builderMode: QuestionContentWordBuilderMode;
|
|
29
|
+
};
|
|
30
|
+
type: "wordBuilder";
|
|
31
|
+
};
|
|
24
32
|
export type QuestionContentBlankGroupStructureElement = QuestionContentStructureElementBase & {
|
|
25
33
|
config: Record<string, never>;
|
|
26
34
|
type: "fill";
|
|
@@ -39,20 +47,51 @@ export type QuestionContentJudgementGroupStructureElement = QuestionContentStruc
|
|
|
39
47
|
};
|
|
40
48
|
type: "judgement";
|
|
41
49
|
};
|
|
42
|
-
export type
|
|
50
|
+
export type QuestionContentClassificationStructureElement = QuestionContentStructureElementBase & {
|
|
51
|
+
config: Record<string, never>;
|
|
52
|
+
type: "classification";
|
|
53
|
+
};
|
|
54
|
+
export type QuestionContentLineConnectColumnConfig = {
|
|
55
|
+
labelStyle: QuestionContentLineConnectLabelStyle;
|
|
56
|
+
};
|
|
57
|
+
export type QuestionContentLineConnectStructureElement = QuestionContentStructureElementBase & {
|
|
58
|
+
config: {
|
|
59
|
+
columns: QuestionContentLineConnectColumnConfig[];
|
|
60
|
+
};
|
|
61
|
+
type: "lineConnect";
|
|
62
|
+
};
|
|
63
|
+
export type QuestionContentMatchingColumnConfig = {
|
|
64
|
+
labelStyle: QuestionContentLineConnectLabelStyle;
|
|
65
|
+
};
|
|
66
|
+
export type QuestionContentMatchingStructureElement = QuestionContentStructureElementBase & {
|
|
67
|
+
config: {
|
|
68
|
+
columns: QuestionContentMatchingColumnConfig[];
|
|
69
|
+
};
|
|
70
|
+
type: "matching";
|
|
71
|
+
};
|
|
72
|
+
export type QuestionContentTextMarkerStructureElement = QuestionContentStructureElementBase & {
|
|
73
|
+
config: Record<string, never>;
|
|
74
|
+
type: "textMarker";
|
|
75
|
+
};
|
|
76
|
+
export type QuestionContentOrderingStructureElement = QuestionContentStructureElementBase & {
|
|
77
|
+
config: Record<string, never>;
|
|
78
|
+
type: "ordering";
|
|
79
|
+
};
|
|
80
|
+
export type QuestionContentStructureElement = QuestionContentBlankGroupStructureElement | QuestionContentClassificationStructureElement | QuestionContentFillTextStructureElement | QuestionContentJudgementGroupStructureElement | QuestionContentLineConnectStructureElement | QuestionContentMatchingStructureElement | QuestionContentOrderingStructureElement | QuestionContentOptionGroupStructureElement | QuestionContentRichTextStructureElement | QuestionContentTextMarkerStructureElement | QuestionContentWordBuilderStructureElement;
|
|
43
81
|
export type QuestionContentStructure = {
|
|
44
82
|
elements: QuestionContentStructureElement[];
|
|
45
|
-
|
|
83
|
+
extras: QuestionContentExtraStructureItem[];
|
|
46
84
|
hasAnswer: boolean;
|
|
47
85
|
systemQuestionType: string;
|
|
48
86
|
};
|
|
49
87
|
export type QuestionContentRichTextControls = {
|
|
50
88
|
plugins: RichTextEditorPlugin[];
|
|
89
|
+
uploadImage?: RichTextEditorRootProps["uploadImage"];
|
|
51
90
|
};
|
|
52
91
|
export type QuestionRichContentValue = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
92
|
+
html: string;
|
|
93
|
+
json: RichTextEditorValue;
|
|
94
|
+
text: string;
|
|
56
95
|
};
|
|
57
96
|
export type QuestionContentExtraStructureItem = {
|
|
58
97
|
extraKey: string;
|
|
@@ -105,6 +144,14 @@ export type QuestionContentFillTextItem = {
|
|
|
105
144
|
elementKey: string;
|
|
106
145
|
type: "inlineFill";
|
|
107
146
|
};
|
|
147
|
+
export type QuestionContentWordBuilderItem = {
|
|
148
|
+
answer: Record<string, string>;
|
|
149
|
+
blanks: string[];
|
|
150
|
+
candidateOptions: string[];
|
|
151
|
+
content: QuestionRichContentValue;
|
|
152
|
+
elementKey: string;
|
|
153
|
+
type: "wordBuilder";
|
|
154
|
+
};
|
|
108
155
|
export type QuestionTableOptions = {
|
|
109
156
|
data: QuestionRichContentValue[][];
|
|
110
157
|
headers: QuestionRichContentValue[];
|
|
@@ -121,13 +168,78 @@ export type QuestionContentJudgementGroupItem = {
|
|
|
121
168
|
elementKey: string;
|
|
122
169
|
type: "judgement";
|
|
123
170
|
};
|
|
124
|
-
export type
|
|
171
|
+
export type QuestionContentClassificationCategory = {
|
|
172
|
+
content: QuestionRichContentValue;
|
|
173
|
+
id: string;
|
|
174
|
+
};
|
|
175
|
+
export type QuestionContentClassificationCard = {
|
|
176
|
+
content: QuestionRichContentValue;
|
|
177
|
+
id: string;
|
|
178
|
+
};
|
|
179
|
+
export type QuestionContentClassificationAnswer = Record<string, string>;
|
|
180
|
+
export type QuestionContentClassificationItem = {
|
|
181
|
+
answer: QuestionContentClassificationAnswer;
|
|
182
|
+
categories: QuestionContentClassificationCategory[];
|
|
183
|
+
elementKey: string;
|
|
184
|
+
items: QuestionContentClassificationCard[];
|
|
185
|
+
type: "classification";
|
|
186
|
+
};
|
|
187
|
+
export type QuestionContentLineConnectColumnItem = {
|
|
188
|
+
content: QuestionRichContentValue;
|
|
189
|
+
itemId: string;
|
|
190
|
+
};
|
|
191
|
+
export type QuestionContentLineConnectColumn = {
|
|
192
|
+
columnId: string;
|
|
193
|
+
items: QuestionContentLineConnectColumnItem[];
|
|
194
|
+
labelStyle: QuestionContentLineConnectLabelStyle;
|
|
195
|
+
};
|
|
196
|
+
export type QuestionContentLineConnectAnswer = Record<string, string[]>;
|
|
197
|
+
export type QuestionContentLineConnectItem = {
|
|
198
|
+
answer: QuestionContentLineConnectAnswer;
|
|
199
|
+
columns: QuestionContentLineConnectColumn[];
|
|
200
|
+
elementKey: string;
|
|
201
|
+
type: "lineConnect";
|
|
202
|
+
};
|
|
203
|
+
export type QuestionContentMatchingColumnItem = {
|
|
204
|
+
content: QuestionRichContentValue;
|
|
205
|
+
itemId: string;
|
|
206
|
+
};
|
|
207
|
+
export type QuestionContentMatchingColumn = {
|
|
208
|
+
columnId: string;
|
|
209
|
+
items: QuestionContentMatchingColumnItem[];
|
|
210
|
+
labelStyle: QuestionContentLineConnectLabelStyle;
|
|
211
|
+
};
|
|
212
|
+
export type QuestionContentMatchingAnswer = Record<string, string[]>;
|
|
213
|
+
export type QuestionContentMatchingItem = {
|
|
214
|
+
answer: QuestionContentMatchingAnswer;
|
|
215
|
+
columns: QuestionContentMatchingColumn[];
|
|
216
|
+
elementKey: string;
|
|
217
|
+
type: "matching";
|
|
218
|
+
};
|
|
219
|
+
export type QuestionContentTextMarkerItem = {
|
|
220
|
+
answer: string[];
|
|
221
|
+
content: QuestionRichContentValue;
|
|
222
|
+
elementKey: string;
|
|
223
|
+
markers: string[];
|
|
224
|
+
type: "textMarker";
|
|
225
|
+
};
|
|
226
|
+
export type QuestionContentOrderingOption = {
|
|
227
|
+
content: QuestionRichContentValue;
|
|
228
|
+
id: string;
|
|
229
|
+
};
|
|
230
|
+
export type QuestionContentOrderingItem = {
|
|
231
|
+
answer: string[];
|
|
232
|
+
elementKey: string;
|
|
233
|
+
sortOptions: QuestionContentOrderingOption[];
|
|
234
|
+
type: "ordering";
|
|
235
|
+
};
|
|
236
|
+
export type QuestionContentItem = QuestionContentBlankGroupItem | QuestionContentClassificationItem | QuestionContentFillTextItem | QuestionContentJudgementGroupItem | QuestionContentLineConnectItem | QuestionContentMatchingItem | QuestionContentOrderingItem | QuestionContentOptionGroupItem | QuestionContentRichTextItem | QuestionContentTextMarkerItem | QuestionContentWordBuilderItem;
|
|
125
237
|
export type QuestionContentDraft = {
|
|
126
238
|
questionTypeKey: null | number;
|
|
127
239
|
children: QuestionContentDraft[];
|
|
128
240
|
elements: QuestionContentItem[];
|
|
129
|
-
|
|
130
|
-
id: null |
|
|
241
|
+
extras: QuestionContentExtraItem[];
|
|
242
|
+
id: null | number;
|
|
131
243
|
version: string;
|
|
132
244
|
};
|
|
133
245
|
export type QuestionContentSerializedRichTextItem = {
|
|
@@ -147,6 +259,13 @@ export type QuestionContentSerializedFillTextItem = {
|
|
|
147
259
|
content: QuestionRichContentValue;
|
|
148
260
|
type: "inlineFill";
|
|
149
261
|
};
|
|
262
|
+
export type QuestionContentSerializedWordBuilderItem = {
|
|
263
|
+
answer: Record<string, string>;
|
|
264
|
+
blanks: string[];
|
|
265
|
+
candidateOptions: string[];
|
|
266
|
+
content: QuestionRichContentValue;
|
|
267
|
+
type: "wordBuilder";
|
|
268
|
+
};
|
|
150
269
|
export type QuestionContentSerializedOptionGroupItem = {
|
|
151
270
|
answer: number[];
|
|
152
271
|
options?: QuestionRichContentValue[];
|
|
@@ -157,7 +276,34 @@ export type QuestionContentSerializedJudgementGroupItem = {
|
|
|
157
276
|
answer: string[];
|
|
158
277
|
type: "judgement";
|
|
159
278
|
};
|
|
160
|
-
export type
|
|
279
|
+
export type QuestionContentSerializedClassificationItem = {
|
|
280
|
+
answer: QuestionContentClassificationAnswer;
|
|
281
|
+
categories: QuestionContentClassificationCategory[];
|
|
282
|
+
items: QuestionContentClassificationCard[];
|
|
283
|
+
type: "classification";
|
|
284
|
+
};
|
|
285
|
+
export type QuestionContentSerializedLineConnectItem = {
|
|
286
|
+
answer: QuestionContentLineConnectAnswer;
|
|
287
|
+
columns: QuestionContentLineConnectColumn[];
|
|
288
|
+
type: "lineConnect";
|
|
289
|
+
};
|
|
290
|
+
export type QuestionContentSerializedMatchingItem = {
|
|
291
|
+
answer: QuestionContentMatchingAnswer;
|
|
292
|
+
columns: QuestionContentMatchingColumn[];
|
|
293
|
+
type: "matching";
|
|
294
|
+
};
|
|
295
|
+
export type QuestionContentSerializedTextMarkerItem = {
|
|
296
|
+
answer: string[];
|
|
297
|
+
content: QuestionRichContentValue;
|
|
298
|
+
markers: string[];
|
|
299
|
+
type: "textMarker";
|
|
300
|
+
};
|
|
301
|
+
export type QuestionContentSerializedOrderingItem = {
|
|
302
|
+
answer: string[];
|
|
303
|
+
sortOptions: QuestionContentOrderingOption[];
|
|
304
|
+
type: "ordering";
|
|
305
|
+
};
|
|
306
|
+
export type QuestionContentSerializedItem = QuestionContentSerializedBlankGroupItem | QuestionContentSerializedClassificationItem | QuestionContentSerializedFillTextItem | QuestionContentSerializedJudgementGroupItem | QuestionContentSerializedLineConnectItem | QuestionContentSerializedMatchingItem | QuestionContentSerializedOrderingItem | QuestionContentSerializedOptionGroupItem | QuestionContentSerializedRichTextItem | QuestionContentSerializedTextMarkerItem | QuestionContentSerializedWordBuilderItem;
|
|
161
307
|
export type QuestionContentSerializedExtraItem = {
|
|
162
308
|
content: QuestionRichContentValue;
|
|
163
309
|
type: QuestionStructureExtraKey;
|
|
@@ -166,8 +312,8 @@ export type QuestionContentSerializedDraft = {
|
|
|
166
312
|
questionTypeKey: null | number;
|
|
167
313
|
children: QuestionContentSerializedDraft[];
|
|
168
314
|
elements: QuestionContentSerializedItem[];
|
|
169
|
-
|
|
170
|
-
id: null |
|
|
315
|
+
extras: QuestionContentSerializedExtraItem[];
|
|
316
|
+
id: null | number;
|
|
171
317
|
version: string;
|
|
172
318
|
};
|
|
173
319
|
export type QuestionContentSubquestionTemplate = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEhF,MAAM,MAAM,0BAA0B,GAClC,MAAM,GACN,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/types.ts"],"names":[],"mappings":"A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-marker/text-marker-plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAMxE,eAAO,MAAM,gBAAgB,EAAE,oBAM9B,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type QuestionLocale = "en-US" | "zh-CN";
|
|
2
2
|
export type QuestionMessages = {
|
|
3
3
|
readonly addBlank: string;
|
|
4
|
+
readonly addCard: string;
|
|
5
|
+
readonly addCategory: string;
|
|
4
6
|
readonly addElement: string;
|
|
5
7
|
readonly addOption: string;
|
|
6
8
|
readonly addSubquestion: string;
|
|
@@ -14,6 +16,8 @@ export type QuestionMessages = {
|
|
|
14
16
|
readonly allowReuse: string;
|
|
15
17
|
readonly candidateMode: string;
|
|
16
18
|
readonly candidateOptions: string;
|
|
19
|
+
readonly card: string;
|
|
20
|
+
readonly category: string;
|
|
17
21
|
readonly choiceRenderer: string;
|
|
18
22
|
readonly choiceSelectionType: string;
|
|
19
23
|
readonly confirm: string;
|
|
@@ -51,6 +55,7 @@ export type QuestionMessages = {
|
|
|
51
55
|
readonly tableColumn: string;
|
|
52
56
|
readonly tableRenderer: string;
|
|
53
57
|
readonly trueLabel: string;
|
|
58
|
+
readonly unassigned: string;
|
|
54
59
|
readonly userAnswer: string;
|
|
55
60
|
readonly wholeQuestion: string;
|
|
56
61
|
readonly moveDown: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/question/i18n/messages.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,C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C,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC;AAqIF,wBAAgB,mBAAmB,CACjC,MAAM,GAAE,cAAwB,GAC/B,gBAAgB,CAOlB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
type LineConnectLineSource = {
|
|
2
|
+
readonly columns: readonly {
|
|
3
|
+
readonly items: readonly {
|
|
4
|
+
readonly itemId: string;
|
|
5
|
+
}[];
|
|
6
|
+
}[];
|
|
7
|
+
};
|
|
8
|
+
type LineConnectColumnRule = (fromColumnIndex: number, toColumnIndex: number) => boolean;
|
|
9
|
+
export type LineConnectLineViewModel = {
|
|
10
|
+
readonly fromColumnIndex: number;
|
|
11
|
+
readonly fromItemId: string;
|
|
12
|
+
readonly fromItemIndex: number;
|
|
13
|
+
readonly key: string;
|
|
14
|
+
readonly toColumnIndex: number;
|
|
15
|
+
readonly toItemId: string;
|
|
16
|
+
readonly toItemIndex: number;
|
|
17
|
+
};
|
|
18
|
+
export type LineConnectMeasuredLineSegment = {
|
|
19
|
+
readonly key: string;
|
|
20
|
+
readonly x1: number;
|
|
21
|
+
readonly x2: number;
|
|
22
|
+
readonly y1: number;
|
|
23
|
+
readonly y2: number;
|
|
24
|
+
};
|
|
25
|
+
export type LineConnectLineMeasurement = {
|
|
26
|
+
readonly height: number;
|
|
27
|
+
readonly lines: readonly LineConnectMeasuredLineSegment[];
|
|
28
|
+
readonly width: number;
|
|
29
|
+
};
|
|
30
|
+
export declare function createLineConnectLineViewModels(item: LineConnectLineSource, connections: Record<string, readonly string[]>, canConnectColumns?: LineConnectColumnRule): LineConnectLineViewModel[];
|
|
31
|
+
export declare function getLineConnectMeasuredCenterX(elementRect: DOMRect, boardRect: DOMRect, scrollLeft: number): number;
|
|
32
|
+
export declare function getLineConnectMeasuredCenterY(elementRect: DOMRect, boardRect: DOMRect, scrollTop: number): number;
|
|
33
|
+
export declare function getLineConnectMeasuredLeftX(elementRect: DOMRect, boardRect: DOMRect, scrollLeft: number): number;
|
|
34
|
+
export declare function getLineConnectMeasuredRightX(elementRect: DOMRect, boardRect: DOMRect, scrollLeft: number): number;
|
|
35
|
+
export declare function setLineConnectLineMeasurementIfChanged(setLineMeasurement: (updater: (current: LineConnectLineMeasurement | null) => LineConnectLineMeasurement | null) => void, nextMeasurement: LineConnectLineMeasurement): void;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=lineConnectLines.d.ts.map
|