@team-monolith/cds 1.74.2 → 1.74.3
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DecoratorNode, EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from "lexical";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ImageProps } from "../../components/InsertImageDialog";
|
|
4
|
-
export interface
|
|
4
|
+
export interface ProblemSelectionWithoutSolution {
|
|
5
5
|
show: {
|
|
6
6
|
image: ImageProps | null;
|
|
7
7
|
text: string;
|
|
8
8
|
};
|
|
9
9
|
value: string;
|
|
10
10
|
}
|
|
11
|
-
export type ProblemSelection =
|
|
11
|
+
export type ProblemSelection = ProblemSelectionWithoutSolution & {
|
|
12
12
|
isAnswer: boolean;
|
|
13
13
|
};
|
|
14
14
|
/** 정답이 공개되지 않은 객관식 문제는 다중정답 여부를 전달받기 위해서 서버에서 hasMultipleSolutions를 보내줍니다. */
|
|
@@ -18,7 +18,7 @@ export type ProblemSelectPayload = {
|
|
|
18
18
|
} & ({
|
|
19
19
|
selections: ProblemSelection[];
|
|
20
20
|
} | {
|
|
21
|
-
selections:
|
|
21
|
+
selections: ProblemSelectionWithoutSolution[];
|
|
22
22
|
hasMultipleSolutions: boolean;
|
|
23
23
|
});
|
|
24
24
|
export type SerializedProblemSelectNode = Spread<ProblemSelectPayload, SerializedLexicalNode>;
|
|
@@ -27,17 +27,17 @@ export type SerializedProblemSelectNode = Spread<ProblemSelectPayload, Serialize
|
|
|
27
27
|
* selected는 학생이 선택한 답의 value를 담고 있습니다.(학생용)
|
|
28
28
|
*/
|
|
29
29
|
export declare class ProblemSelectNode extends DecoratorNode<ReactNode> {
|
|
30
|
-
__selections: ProblemSelection[] |
|
|
30
|
+
__selections: ProblemSelection[] | ProblemSelectionWithoutSolution[];
|
|
31
31
|
__selected: string[];
|
|
32
32
|
__hasMultipleSolutions: boolean | undefined;
|
|
33
33
|
isInline(): boolean;
|
|
34
34
|
static getType(): string;
|
|
35
|
-
getSelections(): ProblemSelection[] |
|
|
35
|
+
getSelections(): ProblemSelection[] | ProblemSelectionWithoutSolution[];
|
|
36
36
|
getSelected(): string[];
|
|
37
|
-
setSelections(selections: ProblemSelection[] |
|
|
37
|
+
setSelections(selections: ProblemSelection[] | ProblemSelectionWithoutSolution[]): void;
|
|
38
38
|
setSelected(selected: string[]): void;
|
|
39
39
|
static clone(node: ProblemSelectNode): ProblemSelectNode;
|
|
40
|
-
constructor(selections: ProblemSelection[] |
|
|
40
|
+
constructor(selections: ProblemSelection[] | ProblemSelectionWithoutSolution[], selected: string[], hasMultipleSolutions?: boolean, key?: NodeKey);
|
|
41
41
|
createDOM(config: EditorConfig): HTMLElement;
|
|
42
42
|
updateDOM(): boolean;
|
|
43
43
|
static importJSON(serializedNode: SerializedProblemSelectNode): ProblemSelectNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { NodeKey } from "lexical";
|
|
3
|
-
import { ProblemSelection,
|
|
3
|
+
import { ProblemSelection, ProblemSelectionWithoutSolution } from "./ProblemSelectNode";
|
|
4
4
|
export declare function SelectComponent(props: {
|
|
5
|
-
selections: ProblemSelection[] |
|
|
5
|
+
selections: ProblemSelection[] | ProblemSelectionWithoutSolution[];
|
|
6
6
|
selected: string[];
|
|
7
7
|
hasMultipleSolutions: boolean | undefined;
|
|
8
8
|
nodeKey: NodeKey;
|