@yungu-fed/question-editor 0.1.7 → 0.1.9
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/README.md +6 -4
- package/dist/index.d.ts +5 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3162 -4456
- package/dist/index.mjs +2560 -3564
- package/dist/model/choice.d.ts +3 -11
- package/dist/model/choice.d.ts.map +1 -1
- package/dist/model/classification.d.ts +1 -3
- package/dist/model/classification.d.ts.map +1 -1
- package/dist/model/line-connect.d.ts +1 -4
- package/dist/model/line-connect.d.ts.map +1 -1
- package/dist/model/matching.d.ts +1 -4
- package/dist/model/matching.d.ts.map +1 -1
- package/dist/model/question-structure.d.ts +6 -18
- package/dist/model/question-structure.d.ts.map +1 -1
- package/dist/model/rich-text.d.ts +7 -2
- package/dist/model/rich-text.d.ts.map +1 -1
- package/dist/model/types.d.ts +0 -276
- package/dist/model/types.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentEditor.d.ts +3 -4
- package/dist/question/content-editor/QuestionContentEditor.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentFillTextEditor.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentSubquestionAddChildDropdown.d.ts +3 -3
- package/dist/question/content-editor/QuestionContentSubquestionAddChildDropdown.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts +3 -3
- package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentSubquestionChildElements.d.ts.map +1 -1
- package/dist/question/content-editor/QuestionContentSubquestionGroupEditor.d.ts +3 -3
- package/dist/question/content-editor/QuestionContentSubquestionGroupEditor.d.ts.map +1 -1
- package/dist/question/content-editor/helpers.d.ts +3 -2
- 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/question-type-template.d.ts +7 -0
- package/dist/question/content-editor/question-type-template.d.ts.map +1 -0
- package/dist/question/content-editor/structure.d.ts +2 -2
- package/dist/question/content-editor/structure.d.ts.map +1 -1
- package/dist/question/content-editor/subquestion-editable-children.d.ts +7 -0
- package/dist/question/content-editor/subquestion-editable-children.d.ts.map +1 -0
- package/dist/question/content-editor/subquestion-group-editor-helpers.d.ts +4 -5
- package/dist/question/content-editor/subquestion-group-editor-helpers.d.ts.map +1 -1
- package/dist/question/content-editor/types.d.ts +13 -23
- package/dist/question/content-editor/types.d.ts.map +1 -1
- package/dist/question/i18n/messages.d.ts +1 -1
- package/dist/question/i18n/messages.d.ts.map +1 -1
- package/dist/question/player/QuestionBlankGroupPlayer.d.ts +2 -1
- package/dist/question/player/QuestionBlankGroupPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionClassificationPlayer.d.ts +2 -1
- package/dist/question/player/QuestionClassificationPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionFillTextPlayer.d.ts +2 -1
- package/dist/question/player/QuestionFillTextPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionJudgementGroupPlayer.d.ts +2 -1
- package/dist/question/player/QuestionJudgementGroupPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionLineConnectPlayer.d.ts +2 -1
- package/dist/question/player/QuestionLineConnectPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionMatchingPlayer.d.ts +2 -1
- package/dist/question/player/QuestionMatchingPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionOptionGroupPlayer.d.ts +2 -1
- package/dist/question/player/QuestionOptionGroupPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionOrderingPlayer.d.ts +2 -1
- package/dist/question/player/QuestionOrderingPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionPlayerComposite.d.ts +3 -4
- package/dist/question/player/QuestionPlayerComposite.d.ts.map +1 -1
- package/dist/question/player/QuestionPlayerElement.d.ts +2 -1
- package/dist/question/player/QuestionPlayerElement.d.ts.map +1 -1
- package/dist/question/player/QuestionTextMarkerPlayer.d.ts +2 -1
- package/dist/question/player/QuestionTextMarkerPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionWordBuilderPlayer.d.ts +2 -1
- package/dist/question/player/QuestionWordBuilderPlayer.d.ts.map +1 -1
- package/dist/question/player/helpers.d.ts +13 -13
- package/dist/question/player/helpers.d.ts.map +1 -1
- package/dist/question/player/types.d.ts +2 -13
- package/dist/question/player/types.d.ts.map +1 -1
- package/dist/question/preview/QuestionCompositePreview.d.ts +3 -4
- package/dist/question/preview/QuestionCompositePreview.d.ts.map +1 -1
- package/dist/question/preview/QuestionPreview.d.ts +2 -3
- package/dist/question/preview/QuestionPreview.d.ts.map +1 -1
- package/dist/question/structure-editor/QuestionStructurePalette.d.ts +3 -3
- package/dist/question/structure-editor/QuestionStructurePalette.d.ts.map +1 -1
- package/dist/question/structure-editor/structure-editor-labels.d.ts +5 -5
- package/dist/question/structure-editor/structure-editor-labels.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/model/question-element-specs.d.ts +0 -25
- package/dist/model/question-element-specs.d.ts.map +0 -1
- package/dist/model/question-model.d.ts +0 -14
- package/dist/model/question-model.d.ts.map +0 -1
- package/dist/question/content-editor/subquestion-template.d.ts +0 -4
- package/dist/question/content-editor/subquestion-template.d.ts.map +0 -1
package/dist/model/choice.d.ts
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import type { ChoiceAnswers, ChoiceColumn, ChoiceOption,
|
|
2
|
-
export declare function createChoiceDataElement(elementType: ChoiceQuestionTypeElement): ChoiceQuestionDataElement;
|
|
3
|
-
export declare function normalizeChoiceDataElement(elementType: ChoiceQuestionTypeElement, element?: QuestionDataElement): ChoiceQuestionDataElement;
|
|
4
|
-
export declare function updateChoiceColumnContent(element: ChoiceQuestionDataElement, columnId: string, content: RichTextContent): ChoiceQuestionDataElement;
|
|
5
|
-
export declare function updateChoiceCellContent(element: ChoiceQuestionDataElement, optionId: string, columnIndex: number, content: RichTextContent): ChoiceQuestionDataElement;
|
|
6
|
-
export declare function addChoiceOption(element: ChoiceQuestionDataElement): ChoiceQuestionDataElement;
|
|
7
|
-
export declare function removeChoiceOption(element: ChoiceQuestionDataElement, optionId: string): ChoiceQuestionDataElement;
|
|
8
|
-
export declare function addChoiceColumn(element: ChoiceQuestionDataElement): ChoiceQuestionDataElement;
|
|
9
|
-
export declare function removeChoiceColumn(element: ChoiceQuestionDataElement, columnId: string): ChoiceQuestionDataElement;
|
|
1
|
+
import type { ChoiceAnswers, ChoiceColumn, ChoiceOption, ChoiceRenderer, ChoiceSelectionType } from "./types";
|
|
10
2
|
export declare function removeChoiceColumnAtIndex<TElement extends {
|
|
11
3
|
readonly columns: readonly ChoiceColumn[];
|
|
12
4
|
readonly options: readonly ChoiceOption[];
|
|
13
5
|
}>(element: TElement, columnIndex: number): TElement;
|
|
14
6
|
export declare function toggleChoiceOptionIds(currentOptionIds: readonly string[], optionId: string, selectionType: ChoiceSelectionType): string[];
|
|
15
|
-
export declare function createChoiceColumns(renderer:
|
|
16
|
-
export declare function normalizeChoiceColumns(columns: readonly ChoiceColumn[], renderer:
|
|
7
|
+
export declare function createChoiceColumns(renderer: ChoiceRenderer): ChoiceColumn[];
|
|
8
|
+
export declare function normalizeChoiceColumns(columns: readonly ChoiceColumn[], renderer: ChoiceRenderer): ChoiceColumn[];
|
|
17
9
|
export declare function createChoiceOptions(columns: readonly ChoiceColumn[]): ChoiceOption[];
|
|
18
10
|
export declare function createNextChoiceOption(options: readonly ChoiceOption[], columns: readonly ChoiceColumn[]): ChoiceOption;
|
|
19
11
|
export declare function normalizeChoiceOptions(options: readonly ChoiceOption[], columns: readonly ChoiceColumn[]): ChoiceOption[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choice.d.ts","sourceRoot":"","sources":["../../src/model/choice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,YAAY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AAY,EAAE,GAC/B,YAAY,CAOd"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { ClassificationAnswer
|
|
2
|
-
export declare function createClassificationDataElement(elementType: ClassificationQuestionTypeElement): ClassificationQuestionDataElement;
|
|
3
|
-
export declare function normalizeClassificationDataElement(elementType: ClassificationQuestionTypeElement, element?: QuestionDataElement): ClassificationQuestionDataElement;
|
|
1
|
+
import type { ClassificationAnswer } from "./types";
|
|
4
2
|
export declare function normalizeClassificationAnswer(answers: ClassificationAnswer | undefined, categories: readonly {
|
|
5
3
|
readonly id: string;
|
|
6
4
|
}[], items: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classification.d.ts","sourceRoot":"","sources":["../../src/model/classification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"classification.d.ts","sourceRoot":"","sources":["../../src/model/classification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,oBAAoB,GAAG,SAAS,EACzC,UAAU,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAC9C,KAAK,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,GACxC,oBAAoB,CAWtB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAa/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LineConnectLabelStyle, LineConnectQuestionTypeColumnConfig } from "./types";
|
|
2
2
|
export declare const lineConnectLabelStyles: readonly ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"];
|
|
3
3
|
export declare const lineConnectColumnLimits: {
|
|
4
4
|
readonly max: 5;
|
|
@@ -16,9 +16,6 @@ export declare function normalizeLineConnectConnectionDirection(firstItem: {
|
|
|
16
16
|
readonly columnIndex: number;
|
|
17
17
|
readonly itemId: string;
|
|
18
18
|
}): NormalizedLineConnectConnection | null;
|
|
19
|
-
export declare function createLineConnectDataElement(elementType: LineConnectQuestionTypeElement): LineConnectQuestionDataElement;
|
|
20
|
-
export declare function normalizeLineConnectDataElement(elementType: LineConnectQuestionTypeElement, element?: QuestionDataElement): LineConnectQuestionDataElement;
|
|
21
|
-
export declare function normalizeLineConnectAnswers(answers: LineConnectAnswers | undefined, columns: readonly LineConnectColumn[]): LineConnectAnswers;
|
|
22
19
|
export declare function normalizeLineConnectAnswerMap<TAnswer extends Record<string, readonly string[]>>(answers: TAnswer | undefined, itemColumnIndex: ReadonlyMap<string, number>): TAnswer;
|
|
23
20
|
export declare function toggleLineConnectAnswerMap<TAnswer extends Record<string, readonly string[]>>(answers: TAnswer, fromItemId: string, toItemId: string): TAnswer;
|
|
24
21
|
export declare function normalizeLineConnectColumnConfigs(configs: readonly LineConnectQuestionTypeColumnConfig[] | undefined): LineConnectQuestionTypeColumnConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-connect.d.ts","sourceRoot":"","sources":["../../src/model/line-connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"line-connect.d.ts","sourceRoot":"","sources":["../../src/model/line-connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,mCAAmC,EACpC,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,sBAAsB,wFAOzB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,GACpB,OAAO,CAET;AAED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{ MatchingQuestionTypeColumnConfig } from "./types";
|
|
2
2
|
export declare const matchingColumnLimits: {
|
|
3
3
|
readonly max: 2;
|
|
4
4
|
readonly min: 2;
|
|
@@ -16,9 +16,6 @@ export declare function normalizeMatchingConnectionDirection(firstItem: {
|
|
|
16
16
|
readonly columnIndex: number;
|
|
17
17
|
readonly itemId: string;
|
|
18
18
|
}): NormalizedMatchingConnection | null;
|
|
19
|
-
export declare function createMatchingDataElement(elementType: MatchingQuestionTypeElement): MatchingQuestionDataElement;
|
|
20
|
-
export declare function normalizeMatchingDataElement(elementType: MatchingQuestionTypeElement, element?: QuestionDataElement): MatchingQuestionDataElement;
|
|
21
|
-
export declare function normalizeMatchingAnswers(answers: MatchingAnswers | undefined, columns: readonly MatchingColumn[]): MatchingAnswers;
|
|
22
19
|
export declare function normalizeMatchingAnswerMap<TAnswer extends Record<string, readonly string[]>>(answers: TAnswer | undefined, itemColumnIndex: ReadonlyMap<string, number>): TAnswer;
|
|
23
20
|
export declare function toggleMatchingAnswerMap<TAnswer extends Record<string, readonly string[]>>(answers: TAnswer, fromItemId: string, toItemId: string): TAnswer;
|
|
24
21
|
export declare function normalizeMatchingColumnConfigs(configs: readonly MatchingQuestionTypeColumnConfig[] | undefined): MatchingQuestionTypeColumnConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matching.d.ts","sourceRoot":"","sources":["../../src/model/matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"matching.d.ts","sourceRoot":"","sources":["../../src/model/matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAQhE,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,mBAAmB,wFAAyB,CAAC;AAE1D,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,GACpB,OAAO,CAET;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAgB,oCAAoC,CAClD,SAAS,EAAE;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACpE,UAAU,EAAE;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACpE,4BAA4B,GAAG,IAAI,CAerC;AAID,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,EAEjD,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3C,OAAO,CA0BT;AAED,wBAAgB,uBAAuB,CACrC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,EACjD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CA4BjE;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,SAAS,gCAAgC,EAAE,GAAG,SAAS,GAC/D,gCAAgC,EAAE,CAqBpC;AAED,wBAAgB,kCAAkC,IAAI,gCAAgC,EAAE,CAEvF;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,gCAAgC,CAAC,YAAY,CAAC,EAC1D,KAAK,EAAE,MAAM,GACZ,MAAM,CAER"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const questionStructureElementTypes: readonly ["richText", "inlineFill", "wordBuilder", "fill", "choice", "judgement", "classification", "lineConnect", "matching", "ordering", "textMarker"];
|
|
2
2
|
export type QuestionStructureElementType = (typeof questionStructureElementTypes)[number];
|
|
3
|
-
export declare const
|
|
4
|
-
export type
|
|
3
|
+
export declare const questionStructureExtraTypes: readonly ["solvingProcess", "solvingStrategy", "keyInformation", "commonMistake", "solvingHint", "scoringRule", "sampleAnswer", "extensionExplanation"];
|
|
4
|
+
export type QuestionStructureExtraType = (typeof questionStructureExtraTypes)[number];
|
|
5
5
|
export type QuestionStructureCandidateMode = "none" | "perBlankOptions" | "sharedPool";
|
|
6
6
|
export type QuestionStructureOptionLabelStyle = "lowerAlpha" | "number" | "upperAlpha";
|
|
7
7
|
export type QuestionStructureLineConnectLabelStyle = "chineseNumber" | "lowerAlpha" | "lowerRoman" | "none" | "number" | "upperAlpha";
|
|
@@ -22,7 +22,6 @@ export type QuestionStructureMetadata = {
|
|
|
22
22
|
};
|
|
23
23
|
export type QuestionStructureRichTextElement = {
|
|
24
24
|
readonly config: Record<string, never>;
|
|
25
|
-
readonly elementKey: string;
|
|
26
25
|
readonly enName: string;
|
|
27
26
|
readonly name: string;
|
|
28
27
|
readonly type: "richText";
|
|
@@ -32,7 +31,6 @@ export type QuestionStructureFillTextElement = {
|
|
|
32
31
|
readonly allowCandidateReuse: boolean;
|
|
33
32
|
readonly candidateMode: QuestionStructureCandidateMode;
|
|
34
33
|
};
|
|
35
|
-
readonly elementKey: string;
|
|
36
34
|
readonly enName: string;
|
|
37
35
|
readonly name: string;
|
|
38
36
|
readonly type: "inlineFill";
|
|
@@ -41,14 +39,12 @@ export type QuestionStructureWordBuilderElement = {
|
|
|
41
39
|
readonly config: {
|
|
42
40
|
readonly builderMode: QuestionStructureWordBuilderMode;
|
|
43
41
|
};
|
|
44
|
-
readonly elementKey: string;
|
|
45
42
|
readonly enName: string;
|
|
46
43
|
readonly name: string;
|
|
47
44
|
readonly type: "wordBuilder";
|
|
48
45
|
};
|
|
49
46
|
export type QuestionStructureBlankGroupElement = {
|
|
50
47
|
readonly config: Record<string, never>;
|
|
51
|
-
readonly elementKey: string;
|
|
52
48
|
readonly enName: string;
|
|
53
49
|
readonly name: string;
|
|
54
50
|
readonly type: "fill";
|
|
@@ -59,7 +55,6 @@ export type QuestionStructureOptionGroupElement = {
|
|
|
59
55
|
readonly renderer: QuestionStructureOptionRenderer;
|
|
60
56
|
readonly selectionType: QuestionStructureSelectionType;
|
|
61
57
|
};
|
|
62
|
-
readonly elementKey: string;
|
|
63
58
|
readonly enName: string;
|
|
64
59
|
readonly name: string;
|
|
65
60
|
readonly type: "choice";
|
|
@@ -68,14 +63,12 @@ export type QuestionStructureJudgementGroupElement = {
|
|
|
68
63
|
readonly config: {
|
|
69
64
|
readonly judgeAnswerMode: QuestionStructureJudgeAnswerMode;
|
|
70
65
|
};
|
|
71
|
-
readonly elementKey: string;
|
|
72
66
|
readonly enName: string;
|
|
73
67
|
readonly name: string;
|
|
74
68
|
readonly type: "judgement";
|
|
75
69
|
};
|
|
76
70
|
export type QuestionStructureClassificationElement = {
|
|
77
71
|
readonly config: Record<string, never>;
|
|
78
|
-
readonly elementKey: string;
|
|
79
72
|
readonly enName: string;
|
|
80
73
|
readonly name: string;
|
|
81
74
|
readonly type: "classification";
|
|
@@ -87,7 +80,6 @@ export type QuestionStructureLineConnectElement = {
|
|
|
87
80
|
readonly config: {
|
|
88
81
|
readonly columns: readonly QuestionStructureLineConnectColumnConfig[];
|
|
89
82
|
};
|
|
90
|
-
readonly elementKey: string;
|
|
91
83
|
readonly enName: string;
|
|
92
84
|
readonly name: string;
|
|
93
85
|
readonly type: "lineConnect";
|
|
@@ -96,21 +88,18 @@ export type QuestionStructureMatchingElement = {
|
|
|
96
88
|
readonly config: {
|
|
97
89
|
readonly columns: readonly QuestionStructureLineConnectColumnConfig[];
|
|
98
90
|
};
|
|
99
|
-
readonly elementKey: string;
|
|
100
91
|
readonly enName: string;
|
|
101
92
|
readonly name: string;
|
|
102
93
|
readonly type: "matching";
|
|
103
94
|
};
|
|
104
95
|
export type QuestionStructureTextMarkerElement = {
|
|
105
96
|
readonly config: Record<string, never>;
|
|
106
|
-
readonly elementKey: string;
|
|
107
97
|
readonly enName: string;
|
|
108
98
|
readonly name: string;
|
|
109
99
|
readonly type: "textMarker";
|
|
110
100
|
};
|
|
111
101
|
export type QuestionStructureOrderingElement = {
|
|
112
102
|
readonly config: Record<string, never>;
|
|
113
|
-
readonly elementKey: string;
|
|
114
103
|
readonly enName: string;
|
|
115
104
|
readonly name: string;
|
|
116
105
|
readonly type: "ordering";
|
|
@@ -121,9 +110,8 @@ export type QuestionStructureDraftElement = QuestionStructureElement & {
|
|
|
121
110
|
};
|
|
122
111
|
export type QuestionStructureExtra = {
|
|
123
112
|
readonly enName: string;
|
|
124
|
-
readonly extraKey: string;
|
|
125
113
|
readonly name: string;
|
|
126
|
-
readonly type:
|
|
114
|
+
readonly type: QuestionStructureExtraType;
|
|
127
115
|
};
|
|
128
116
|
export type QuestionStructureDraftExtra = QuestionStructureExtra & {
|
|
129
117
|
readonly clientId: string;
|
|
@@ -137,7 +125,7 @@ export type QuestionStructureDraft = {
|
|
|
137
125
|
readonly version: string;
|
|
138
126
|
};
|
|
139
127
|
export declare function createEmptyQuestionStructureDraft(): QuestionStructureDraft;
|
|
140
|
-
export declare function createQuestionStructureExtra(
|
|
128
|
+
export declare function createQuestionStructureExtra(type: QuestionStructureExtraType, _extra?: readonly QuestionStructureDraftExtra[]): QuestionStructureDraftExtra;
|
|
141
129
|
export declare function createQuestionStructureElement(type: QuestionStructureElementType, _elements?: readonly QuestionStructureDraftElement[]): QuestionStructureDraftElement;
|
|
142
130
|
export declare function deleteQuestionStructureExtra(draft: QuestionStructureDraft, clientId: string): QuestionStructureDraft;
|
|
143
131
|
export declare function deleteQuestionStructureElement(draft: QuestionStructureDraft, clientId: string): QuestionStructureDraft;
|
|
@@ -148,6 +136,6 @@ export declare function updateQuestionStructureGlobalConfig(draft: QuestionStruc
|
|
|
148
136
|
export declare function updateQuestionStructureMetadata(draft: QuestionStructureDraft, patch: Partial<QuestionStructureMetadata>): QuestionStructureDraft;
|
|
149
137
|
export declare function getQuestionStructureElementDefaultName(type: QuestionStructureElementType): string;
|
|
150
138
|
export declare function getQuestionStructureElementDefaultEnName(type: QuestionStructureElementType): string;
|
|
151
|
-
export declare function getQuestionStructureExtraDefaultName(
|
|
152
|
-
export declare function getQuestionStructureExtraDefaultEnName(
|
|
139
|
+
export declare function getQuestionStructureExtraDefaultName(type: QuestionStructureExtraType): string;
|
|
140
|
+
export declare function getQuestionStructureExtraDefaultEnName(type: QuestionStructureExtraType): string;
|
|
153
141
|
//# sourceMappingURL=question-structure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-structure.d.ts","sourceRoot":"","sources":["../../src/model/question-structure.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,6BAA6B,0JAYhC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"question-structure.d.ts","sourceRoot":"","sources":["../../src/model/question-structure.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,6BAA6B,0JAYhC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,2BAA2B,yJAS9B,CAAC;AAEX,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAgE/C,MAAM,MAAM,8BAA8B,GACtC,MAAM,GACN,iBAAiB,GACjB,YAAY,CAAC;AAEjB,MAAM,MAAM,iCAAiC,GACzC,YAAY,GACZ,QAAQ,GACR,YAAY,CAAC;AAEjB,MAAM,MAAM,sCAAsC,GAC9C,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,YAAY,CAAC;AAEjB,MAAM,MAAM,+BAA+B,GAAG,UAAU,GAAG,OAAO,CAAC;AAEnE,MAAM,MAAM,8BAA8B,GAAG,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Q,EAAE,MAAM,GACf,sBAAsB,CAKxB;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,GACf,sBAAsB,CAKxB;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,GAChB,sBAAsB,CA+BxB;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,2BAA2B,GACrC,sBAAsB,CAOxB;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,6BAA6B,GACzC,sBAAsB,CAOxB;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,sBAAsB,EAC7B,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAC5C,sBAAsB,CAQxB;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,sBAAsB,EAC7B,KAAK,EAAE,OAAO,CAAC,yBAAyB,CAAC,GACxC,sBAAsB,CAKxB;AAED,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,4BAA4B,UAGnC;AAED,wBAAgB,wCAAwC,CACtD,IAAI,EAAE,4BAA4B,UAGnC;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,0BAA0B,UAMjC;AAED,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,0BAA0B,UAMjC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { RichTextEditorValue } from '@yungu-fed/rich-text-editor';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RichTextContent } from './types';
|
|
3
|
+
type InlineBlank = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
};
|
|
3
7
|
export declare const emptyRichTextDocument: RichTextEditorValue;
|
|
4
8
|
export declare function createRichTextContent(text?: string): RichTextContent;
|
|
5
9
|
export declare function normalizeRichTextContent(input?: Partial<RichTextContent>): RichTextContent;
|
|
6
|
-
export declare function normalizeInlineBlankRichTextContent(input: Partial<RichTextContent> | undefined, blanks: readonly
|
|
10
|
+
export declare function normalizeInlineBlankRichTextContent(input: Partial<RichTextContent> | undefined, blanks: readonly InlineBlank[]): RichTextContent;
|
|
11
|
+
export {};
|
|
7
12
|
//# sourceMappingURL=rich-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text.d.ts","sourceRoot":"","sources":["../../src/model/rich-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,6BAA6B,CAAA;AAQpC,OAAO,KAAK,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"rich-text.d.ts","sourceRoot":"","sources":["../../src/model/rich-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,6BAA6B,CAAA;AAQpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,mBAEnC,CAAA;AAED,wBAAgB,qBAAqB,CAAC,IAAI,SAAK,GAAG,eAAe,CAEhE;AAED,wBAAgB,wBAAwB,CACtC,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAC/B,eAAe,CAQjB;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,EAC3C,MAAM,EAAE,SAAS,WAAW,EAAE,GAC7B,eAAe,CAQjB"}
|
package/dist/model/types.d.ts
CHANGED
|
@@ -1,115 +1,19 @@
|
|
|
1
1
|
import type { RichTextEditorValue } from "@yungu-fed/rich-text-editor";
|
|
2
|
-
export declare const questionTypeElementKinds: readonly ["richText", "choice", "fill", "inlineFill", "wordBuilder", "judgement", "classification", "lineConnect", "matching", "ordering", "textMarker"];
|
|
3
|
-
export type QuestionTypeElementKind = (typeof questionTypeElementKinds)[number];
|
|
4
|
-
export type QuestionTypeGlobalConfig = {
|
|
5
|
-
readonly [key: string]: unknown;
|
|
6
|
-
};
|
|
7
2
|
export type RichTextContent = {
|
|
8
3
|
readonly html: string;
|
|
9
4
|
readonly json: RichTextEditorValue;
|
|
10
5
|
readonly text: string;
|
|
11
6
|
};
|
|
12
|
-
export type QuestionTypeElementBase = {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
readonly name: string;
|
|
15
|
-
readonly type: QuestionTypeElementKind;
|
|
16
|
-
readonly version: string;
|
|
17
|
-
};
|
|
18
|
-
export type RichTextQuestionTypeElement = QuestionTypeElementBase & {
|
|
19
|
-
readonly config: Record<string, never>;
|
|
20
|
-
readonly type: "richText";
|
|
21
|
-
};
|
|
22
7
|
export type ChoiceOptionLabelStyle = "chineseNumber" | "lowerAlpha" | "lowerRoman" | "none" | "number" | "upperAlpha" | "upperRoman";
|
|
23
8
|
export type ChoiceSelectionType = "multiple" | "single";
|
|
24
9
|
export type ChoiceRenderer = "standard" | "table";
|
|
25
|
-
export type ChoiceQuestionTypeElement = QuestionTypeElementBase & {
|
|
26
|
-
readonly config: {
|
|
27
|
-
readonly optionLabelStyle: ChoiceOptionLabelStyle;
|
|
28
|
-
readonly renderer: ChoiceRenderer;
|
|
29
|
-
readonly selectionType: ChoiceSelectionType;
|
|
30
|
-
};
|
|
31
|
-
readonly type: "choice";
|
|
32
|
-
};
|
|
33
|
-
export type FillQuestionTypeElement = QuestionTypeElementBase & {
|
|
34
|
-
readonly config: Record<string, never>;
|
|
35
|
-
readonly type: "fill";
|
|
36
|
-
};
|
|
37
|
-
export type InlineFillCandidateMode = "none" | "perBlankOptions" | "sharedPool";
|
|
38
|
-
export type InlineFillQuestionTypeElement = QuestionTypeElementBase & {
|
|
39
|
-
readonly config: {
|
|
40
|
-
readonly allowCandidateReuse: boolean;
|
|
41
|
-
readonly candidateMode: InlineFillCandidateMode;
|
|
42
|
-
};
|
|
43
|
-
readonly type: "inlineFill";
|
|
44
|
-
};
|
|
45
|
-
export type WordBuilderMode = "sentence" | "spelling";
|
|
46
|
-
export type WordBuilderQuestionTypeElement = QuestionTypeElementBase & {
|
|
47
|
-
readonly config: {
|
|
48
|
-
readonly builderMode: WordBuilderMode;
|
|
49
|
-
};
|
|
50
|
-
readonly type: "wordBuilder";
|
|
51
|
-
};
|
|
52
|
-
export type JudgementMode = "checkCross" | "correctWrong" | "rightWrong" | "tf" | "validInvalid" | "yesNo";
|
|
53
|
-
export type JudgementQuestionTypeElement = QuestionTypeElementBase & {
|
|
54
|
-
readonly config: {
|
|
55
|
-
readonly judgeAnswerMode: JudgementMode;
|
|
56
|
-
};
|
|
57
|
-
readonly type: "judgement";
|
|
58
|
-
};
|
|
59
|
-
export type ClassificationQuestionTypeElement = QuestionTypeElementBase & {
|
|
60
|
-
readonly config: Record<string, never>;
|
|
61
|
-
readonly type: "classification";
|
|
62
|
-
};
|
|
63
10
|
export type LineConnectLabelStyle = "chineseNumber" | "lowerAlpha" | "lowerRoman" | "none" | "number" | "upperAlpha";
|
|
64
11
|
export type LineConnectQuestionTypeColumnConfig = {
|
|
65
12
|
readonly labelStyle: LineConnectLabelStyle;
|
|
66
13
|
};
|
|
67
|
-
export type LineConnectQuestionTypeElement = QuestionTypeElementBase & {
|
|
68
|
-
readonly config: {
|
|
69
|
-
readonly columns: readonly LineConnectQuestionTypeColumnConfig[];
|
|
70
|
-
};
|
|
71
|
-
readonly type: "lineConnect";
|
|
72
|
-
};
|
|
73
14
|
export type MatchingQuestionTypeColumnConfig = {
|
|
74
15
|
readonly labelStyle: LineConnectLabelStyle;
|
|
75
16
|
};
|
|
76
|
-
export type MatchingQuestionTypeElement = QuestionTypeElementBase & {
|
|
77
|
-
readonly config: {
|
|
78
|
-
readonly columns: readonly MatchingQuestionTypeColumnConfig[];
|
|
79
|
-
};
|
|
80
|
-
readonly type: "matching";
|
|
81
|
-
};
|
|
82
|
-
export type TextMarkerQuestionTypeElement = QuestionTypeElementBase & {
|
|
83
|
-
readonly config: Record<string, never>;
|
|
84
|
-
readonly type: "textMarker";
|
|
85
|
-
};
|
|
86
|
-
export type OrderingQuestionTypeElement = QuestionTypeElementBase & {
|
|
87
|
-
readonly config: Record<string, never>;
|
|
88
|
-
readonly type: "ordering";
|
|
89
|
-
};
|
|
90
|
-
export type QuestionTypeElement = ClassificationQuestionTypeElement | ChoiceQuestionTypeElement | FillQuestionTypeElement | InlineFillQuestionTypeElement | JudgementQuestionTypeElement | LineConnectQuestionTypeElement | MatchingQuestionTypeElement | OrderingQuestionTypeElement | RichTextQuestionTypeElement | TextMarkerQuestionTypeElement | WordBuilderQuestionTypeElement;
|
|
91
|
-
export type QuestionTypeExtra = {
|
|
92
|
-
readonly enName: string;
|
|
93
|
-
readonly name: string;
|
|
94
|
-
readonly type: string;
|
|
95
|
-
};
|
|
96
|
-
export type QuestionType = {
|
|
97
|
-
readonly elements: readonly QuestionTypeElement[];
|
|
98
|
-
readonly extras: readonly QuestionTypeExtra[];
|
|
99
|
-
readonly globalConfig: QuestionTypeGlobalConfig;
|
|
100
|
-
readonly id: number;
|
|
101
|
-
readonly name: string;
|
|
102
|
-
readonly systemQuestionType: string;
|
|
103
|
-
readonly version: string;
|
|
104
|
-
};
|
|
105
|
-
export type QuestionDataElementBase = {
|
|
106
|
-
readonly elementId: string;
|
|
107
|
-
readonly type: QuestionTypeElementKind;
|
|
108
|
-
};
|
|
109
|
-
export type RichTextQuestionDataElement = QuestionDataElementBase & {
|
|
110
|
-
readonly content: RichTextContent;
|
|
111
|
-
readonly type: "richText";
|
|
112
|
-
};
|
|
113
17
|
export type ChoiceColumn = {
|
|
114
18
|
readonly content: RichTextContent;
|
|
115
19
|
readonly id: string;
|
|
@@ -121,185 +25,5 @@ export type ChoiceOption = {
|
|
|
121
25
|
export type ChoiceAnswers = {
|
|
122
26
|
readonly optionIds: readonly string[];
|
|
123
27
|
};
|
|
124
|
-
export type ChoiceQuestionDataElement = QuestionDataElementBase & {
|
|
125
|
-
readonly answers: ChoiceAnswers;
|
|
126
|
-
readonly columns: readonly ChoiceColumn[];
|
|
127
|
-
readonly options: readonly ChoiceOption[];
|
|
128
|
-
readonly type: "choice";
|
|
129
|
-
};
|
|
130
|
-
export type FillBlank = {
|
|
131
|
-
readonly id: string;
|
|
132
|
-
readonly label: string;
|
|
133
|
-
};
|
|
134
|
-
export type BlankAnswerGroup = {
|
|
135
|
-
readonly answerPools: readonly RichTextContent[];
|
|
136
|
-
readonly blankIds: readonly string[];
|
|
137
|
-
};
|
|
138
|
-
export type FillQuestionDataElement = QuestionDataElementBase & {
|
|
139
|
-
readonly answers: readonly BlankAnswerGroup[];
|
|
140
|
-
readonly blanks: readonly FillBlank[];
|
|
141
|
-
readonly type: "fill";
|
|
142
|
-
};
|
|
143
|
-
export type InlineFillOption = {
|
|
144
|
-
readonly content: RichTextContent;
|
|
145
|
-
readonly id: string;
|
|
146
|
-
};
|
|
147
|
-
export type InlineFillAnswerValue = RichTextContent | string;
|
|
148
|
-
export type InlineFillAnswerGroup = {
|
|
149
|
-
readonly allowReuse: boolean;
|
|
150
|
-
readonly answers: Readonly<Record<string, readonly InlineFillAnswerValue[]>>;
|
|
151
|
-
readonly blankIds: readonly string[];
|
|
152
|
-
readonly options: readonly InlineFillOption[];
|
|
153
|
-
};
|
|
154
|
-
export type InlineFillQuestionDataElement = QuestionDataElementBase & {
|
|
155
|
-
readonly answers: readonly InlineFillAnswerGroup[];
|
|
156
|
-
readonly blanks: readonly FillBlank[];
|
|
157
|
-
readonly content: RichTextContent;
|
|
158
|
-
readonly type: "inlineFill";
|
|
159
|
-
};
|
|
160
|
-
export type WordBuilderQuestionDataElement = QuestionDataElementBase & {
|
|
161
|
-
readonly answers: Readonly<Record<string, string>>;
|
|
162
|
-
readonly blanks: readonly string[];
|
|
163
|
-
readonly candidateOptions: readonly string[];
|
|
164
|
-
readonly content: RichTextContent;
|
|
165
|
-
readonly type: "wordBuilder";
|
|
166
|
-
};
|
|
167
|
-
export type JudgementAnswerValue = "false" | "true";
|
|
168
|
-
export type JudgementQuestionDataElement = QuestionDataElementBase & {
|
|
169
|
-
readonly answers: readonly JudgementAnswerValue[];
|
|
170
|
-
readonly type: "judgement";
|
|
171
|
-
};
|
|
172
|
-
export type ClassificationCategory = {
|
|
173
|
-
readonly content: RichTextContent;
|
|
174
|
-
readonly id: string;
|
|
175
|
-
};
|
|
176
|
-
export type ClassificationItem = {
|
|
177
|
-
readonly content: RichTextContent;
|
|
178
|
-
readonly id: string;
|
|
179
|
-
};
|
|
180
28
|
export type ClassificationAnswer = Readonly<Record<string, string>>;
|
|
181
|
-
export type ClassificationQuestionDataElement = QuestionDataElementBase & {
|
|
182
|
-
readonly answers: ClassificationAnswer;
|
|
183
|
-
readonly categories: readonly ClassificationCategory[];
|
|
184
|
-
readonly items: readonly ClassificationItem[];
|
|
185
|
-
readonly type: "classification";
|
|
186
|
-
};
|
|
187
|
-
export type LineConnectItem = {
|
|
188
|
-
readonly content: RichTextContent;
|
|
189
|
-
readonly id: string;
|
|
190
|
-
};
|
|
191
|
-
export type LineConnectColumn = {
|
|
192
|
-
readonly columnId: string;
|
|
193
|
-
readonly items: readonly LineConnectItem[];
|
|
194
|
-
readonly labelStyle: LineConnectLabelStyle;
|
|
195
|
-
};
|
|
196
|
-
export type LineConnectAnswers = Readonly<Record<string, readonly string[]>>;
|
|
197
|
-
export type LineConnectQuestionDataElement = QuestionDataElementBase & {
|
|
198
|
-
readonly answers: LineConnectAnswers;
|
|
199
|
-
readonly columns: readonly LineConnectColumn[];
|
|
200
|
-
readonly type: "lineConnect";
|
|
201
|
-
};
|
|
202
|
-
export type MatchingItem = {
|
|
203
|
-
readonly content: RichTextContent;
|
|
204
|
-
readonly id: string;
|
|
205
|
-
};
|
|
206
|
-
export type MatchingColumn = {
|
|
207
|
-
readonly columnId: string;
|
|
208
|
-
readonly items: readonly MatchingItem[];
|
|
209
|
-
readonly labelStyle: LineConnectLabelStyle;
|
|
210
|
-
};
|
|
211
|
-
export type MatchingAnswers = Readonly<Record<string, readonly string[]>>;
|
|
212
|
-
export type MatchingQuestionDataElement = QuestionDataElementBase & {
|
|
213
|
-
readonly answers: MatchingAnswers;
|
|
214
|
-
readonly columns: readonly MatchingColumn[];
|
|
215
|
-
readonly type: "matching";
|
|
216
|
-
};
|
|
217
|
-
export type TextMarkerQuestionDataElement = QuestionDataElementBase & {
|
|
218
|
-
readonly answers: readonly string[];
|
|
219
|
-
readonly content: RichTextContent;
|
|
220
|
-
readonly markers: readonly string[];
|
|
221
|
-
readonly type: "textMarker";
|
|
222
|
-
};
|
|
223
|
-
export type OrderingOption = {
|
|
224
|
-
readonly content: RichTextContent;
|
|
225
|
-
readonly id: string;
|
|
226
|
-
};
|
|
227
|
-
export type OrderingQuestionDataElement = QuestionDataElementBase & {
|
|
228
|
-
readonly answers: readonly string[];
|
|
229
|
-
readonly sortOptions: readonly OrderingOption[];
|
|
230
|
-
readonly type: "ordering";
|
|
231
|
-
};
|
|
232
|
-
export type QuestionDataElement = ClassificationQuestionDataElement | ChoiceQuestionDataElement | FillQuestionDataElement | InlineFillQuestionDataElement | JudgementQuestionDataElement | LineConnectQuestionDataElement | MatchingQuestionDataElement | OrderingQuestionDataElement | RichTextQuestionDataElement | TextMarkerQuestionDataElement | WordBuilderQuestionDataElement;
|
|
233
|
-
export type QuestionData = {
|
|
234
|
-
readonly children: readonly QuestionData[];
|
|
235
|
-
readonly elements: readonly QuestionDataElement[];
|
|
236
|
-
readonly id: number;
|
|
237
|
-
readonly questionTypeId: number;
|
|
238
|
-
readonly version: string;
|
|
239
|
-
};
|
|
240
|
-
export type QuestionResponseItemBase = {
|
|
241
|
-
readonly elementId: string;
|
|
242
|
-
readonly type: Exclude<QuestionTypeElementKind, "richText">;
|
|
243
|
-
};
|
|
244
|
-
export type ChoiceQuestionResponseItem = QuestionResponseItemBase & {
|
|
245
|
-
readonly answers: ChoiceAnswers;
|
|
246
|
-
readonly type: "choice";
|
|
247
|
-
};
|
|
248
|
-
export type BlankResponseAnswer = {
|
|
249
|
-
readonly answers: readonly RichTextContent[];
|
|
250
|
-
readonly blankId: string;
|
|
251
|
-
};
|
|
252
|
-
export type FillQuestionResponseItem = QuestionResponseItemBase & {
|
|
253
|
-
readonly answers: readonly BlankResponseAnswer[];
|
|
254
|
-
readonly type: "fill";
|
|
255
|
-
};
|
|
256
|
-
export type InlineFillResponseAnswer = {
|
|
257
|
-
readonly blankId: string;
|
|
258
|
-
readonly values: readonly InlineFillAnswerValue[];
|
|
259
|
-
};
|
|
260
|
-
export type InlineFillQuestionResponseItem = QuestionResponseItemBase & {
|
|
261
|
-
readonly answers: readonly InlineFillResponseAnswer[];
|
|
262
|
-
readonly type: "inlineFill";
|
|
263
|
-
};
|
|
264
|
-
export type WordBuilderQuestionResponseItem = QuestionResponseItemBase & {
|
|
265
|
-
readonly answers: Readonly<Record<string, string>>;
|
|
266
|
-
readonly type: "wordBuilder";
|
|
267
|
-
};
|
|
268
|
-
export type JudgementQuestionResponseItem = QuestionResponseItemBase & {
|
|
269
|
-
readonly answers: readonly JudgementAnswerValue[];
|
|
270
|
-
readonly type: "judgement";
|
|
271
|
-
};
|
|
272
|
-
export type ClassificationQuestionResponseItem = QuestionResponseItemBase & {
|
|
273
|
-
readonly placements: ClassificationAnswer;
|
|
274
|
-
readonly type: "classification";
|
|
275
|
-
};
|
|
276
|
-
export type LineConnectQuestionResponseItem = QuestionResponseItemBase & {
|
|
277
|
-
readonly connections: LineConnectAnswers;
|
|
278
|
-
readonly type: "lineConnect";
|
|
279
|
-
};
|
|
280
|
-
export type MatchingQuestionResponseItem = QuestionResponseItemBase & {
|
|
281
|
-
readonly connections: MatchingAnswers;
|
|
282
|
-
readonly type: "matching";
|
|
283
|
-
};
|
|
284
|
-
export type TextMarkerQuestionResponseItem = QuestionResponseItemBase & {
|
|
285
|
-
readonly selectedMarkers: readonly string[];
|
|
286
|
-
readonly type: "textMarker";
|
|
287
|
-
};
|
|
288
|
-
export type OrderingQuestionResponseItem = QuestionResponseItemBase & {
|
|
289
|
-
readonly orderedOptionIds: readonly string[];
|
|
290
|
-
readonly type: "ordering";
|
|
291
|
-
};
|
|
292
|
-
export type QuestionResponseItem = ClassificationQuestionResponseItem | ChoiceQuestionResponseItem | FillQuestionResponseItem | InlineFillQuestionResponseItem | JudgementQuestionResponseItem | LineConnectQuestionResponseItem | MatchingQuestionResponseItem | OrderingQuestionResponseItem | TextMarkerQuestionResponseItem | WordBuilderQuestionResponseItem;
|
|
293
|
-
export type QuestionResponse = {
|
|
294
|
-
readonly children: readonly QuestionResponse[];
|
|
295
|
-
readonly items: readonly QuestionResponseItem[];
|
|
296
|
-
readonly questionId: number;
|
|
297
|
-
readonly questionTypeId: number;
|
|
298
|
-
readonly version: string;
|
|
299
|
-
};
|
|
300
|
-
export type QuestionModelIssue = {
|
|
301
|
-
readonly code: "elementIdMismatch" | "elementOrderMismatch" | "missingElement" | "questionTypeMismatch" | "unknownElement";
|
|
302
|
-
readonly elementId?: string;
|
|
303
|
-
readonly message: string;
|
|
304
|
-
};
|
|
305
29
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,eAAO,MAAM,wBAAwB,0JAY3B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,CAAC;AAE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CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import { type RichTextEditorRootProps } from "@yungu-fed/rich-text-editor";
|
|
3
3
|
import type { QuestionLocale } from "../i18n";
|
|
4
|
-
import type { QuestionContentDraft,
|
|
4
|
+
import type { QuestionContentDraft, QuestionContentQuestionTypeTemplate } from "./types";
|
|
5
5
|
import "./QuestionContentEditorLayout.css";
|
|
6
6
|
export type QuestionContentEditorProps = {
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
emptyText?: string;
|
|
9
9
|
locale?: QuestionLocale;
|
|
10
10
|
onChange: (draft: QuestionContentDraft) => void;
|
|
11
|
-
|
|
12
|
-
subquestionTemplates?: QuestionContentSubquestionTemplate[];
|
|
11
|
+
questionTypeTemplates: readonly QuestionContentQuestionTypeTemplate[];
|
|
13
12
|
uploadImage?: RichTextEditorRootProps["uploadImage"];
|
|
14
13
|
value: QuestionContentDraft;
|
|
15
14
|
};
|
|
16
|
-
export declare function QuestionContentEditor({ disabled, locale, onChange,
|
|
15
|
+
export declare function QuestionContentEditor({ disabled, locale, onChange, questionTypeTemplates, uploadImage, value, }: Readonly<QuestionContentEditorProps>): ReactElement;
|
|
17
16
|
//# sourceMappingURL=QuestionContentEditor.d.ts.map
|