@team-monolith/cds 1.78.5 → 1.79.0
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/patterns/LexicalEditor/nodes/ProblemInputNode/ProblemInputNode.d.ts +5 -5
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/ProblemInputNode.js +16 -14
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSegmentedControl.d.ts +1 -1
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +6 -6
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +2 -2
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ export interface ProblemInputPayload {
|
|
|
11
11
|
* (ex: "코들 입니다" => "** ***") */
|
|
12
12
|
solutions: Solution[];
|
|
13
13
|
answer: string;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
caseSensitive: boolean;
|
|
15
|
+
ignoreWhitespace: boolean;
|
|
16
16
|
/** FE에서만 사용하는 값. 문제의 정오답 여부를 주입하여 스타일을 변경합니다. */
|
|
17
17
|
isCorrect?: boolean;
|
|
18
18
|
key?: NodeKey;
|
|
@@ -27,8 +27,8 @@ export declare class ProblemInputNode extends DecoratorNode<ReactNode> {
|
|
|
27
27
|
__showCharacterNumber: boolean;
|
|
28
28
|
__placeholder: string;
|
|
29
29
|
__answer: string;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
__caseSensitive: boolean;
|
|
31
|
+
__ignoreWhitespace: boolean;
|
|
32
32
|
__isCorrect?: boolean;
|
|
33
33
|
isInline(): boolean;
|
|
34
34
|
static getType(): string;
|
|
@@ -52,5 +52,5 @@ export declare class ProblemInputNode extends DecoratorNode<ReactNode> {
|
|
|
52
52
|
exportJSON(): SerializedProblemInputNode;
|
|
53
53
|
decorate(): ReactNode;
|
|
54
54
|
}
|
|
55
|
-
export declare function $createProblemInputNode({ showCharacterNumber, placeholder, solutions, answer,
|
|
55
|
+
export declare function $createProblemInputNode({ showCharacterNumber, placeholder, solutions, answer, caseSensitive, ignoreWhitespace, isCorrect, key, }: ProblemInputPayload): ProblemInputNode;
|
|
56
56
|
export declare function $isProblemInputNode(node: LexicalNode | null | undefined): node is ProblemInputNode;
|
|
@@ -26,10 +26,10 @@ export class ProblemInputNode extends DecoratorNode {
|
|
|
26
26
|
return this.__answer;
|
|
27
27
|
}
|
|
28
28
|
getCaseSensitive() {
|
|
29
|
-
return this.
|
|
29
|
+
return this.__caseSensitive;
|
|
30
30
|
}
|
|
31
31
|
getIgnoreWhitespace() {
|
|
32
|
-
return this.
|
|
32
|
+
return this.__ignoreWhitespace;
|
|
33
33
|
}
|
|
34
34
|
setSolutions(solutions) {
|
|
35
35
|
const self = this.getWritable();
|
|
@@ -49,14 +49,14 @@ export class ProblemInputNode extends DecoratorNode {
|
|
|
49
49
|
}
|
|
50
50
|
setCaseSensitive(caseSensitive) {
|
|
51
51
|
const self = this.getWritable();
|
|
52
|
-
self.
|
|
52
|
+
self.__caseSensitive = caseSensitive;
|
|
53
53
|
}
|
|
54
54
|
setIgnoreWhitespace(ignoreWhitespace) {
|
|
55
55
|
const self = this.getWritable();
|
|
56
|
-
self.
|
|
56
|
+
self.__ignoreWhitespace = ignoreWhitespace;
|
|
57
57
|
}
|
|
58
58
|
static clone(node) {
|
|
59
|
-
return new ProblemInputNode(node.__showCharacterNumber, node.__placeholder, node.__solutions, node.__answer, node.
|
|
59
|
+
return new ProblemInputNode(node.__showCharacterNumber, node.__placeholder, node.__solutions, node.__answer, node.__caseSensitive, node.__ignoreWhitespace, node.__isCorrect, node.__key);
|
|
60
60
|
}
|
|
61
61
|
constructor(showCharacterNumber, placeholder, solutions, answer, caseSensitive, ignoreWhitespace, isCorrect, key) {
|
|
62
62
|
super(key);
|
|
@@ -64,8 +64,8 @@ export class ProblemInputNode extends DecoratorNode {
|
|
|
64
64
|
this.__placeholder = placeholder;
|
|
65
65
|
this.__solutions = solutions;
|
|
66
66
|
this.__answer = answer;
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
67
|
+
this.__caseSensitive = caseSensitive;
|
|
68
|
+
this.__ignoreWhitespace = ignoreWhitespace;
|
|
69
69
|
this.__isCorrect = isCorrect;
|
|
70
70
|
}
|
|
71
71
|
createDOM(config) {
|
|
@@ -78,14 +78,16 @@ export class ProblemInputNode extends DecoratorNode {
|
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
static importJSON(serializedNode) {
|
|
81
|
+
var _a, _b;
|
|
81
82
|
const node = $createProblemInputNode({
|
|
82
83
|
key: serializedNode.key,
|
|
83
84
|
solutions: serializedNode.solutions,
|
|
84
85
|
showCharacterNumber: serializedNode.showCharacterNumber,
|
|
85
86
|
placeholder: serializedNode.placeholder,
|
|
86
87
|
answer: serializedNode.answer,
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
// 기존에 등록된 노드에 대한 defaultData 적용
|
|
89
|
+
caseSensitive: (_a = serializedNode.caseSensitive) !== null && _a !== void 0 ? _a : false,
|
|
90
|
+
ignoreWhitespace: (_b = serializedNode.ignoreWhitespace) !== null && _b !== void 0 ? _b : true,
|
|
89
91
|
isCorrect: serializedNode.isCorrect,
|
|
90
92
|
});
|
|
91
93
|
return node;
|
|
@@ -99,16 +101,16 @@ export class ProblemInputNode extends DecoratorNode {
|
|
|
99
101
|
solutions: this.__solutions,
|
|
100
102
|
isCorrect: this.__isCorrect,
|
|
101
103
|
answer: this.__answer,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
caseSensitive: this.__caseSensitive,
|
|
105
|
+
ignoreWhitespace: this.__ignoreWhitespace,
|
|
104
106
|
};
|
|
105
107
|
}
|
|
106
108
|
decorate() {
|
|
107
|
-
return (_jsx(InputComponent, { solutions: this.__solutions, showCharacterNumber: this.__showCharacterNumber, placeholder: this.__placeholder, answer: this.__answer, caseSensitive: this.
|
|
109
|
+
return (_jsx(InputComponent, { solutions: this.__solutions, showCharacterNumber: this.__showCharacterNumber, placeholder: this.__placeholder, answer: this.__answer, caseSensitive: this.__caseSensitive, ignoreWhitespace: this.__ignoreWhitespace, isCorrect: this.__isCorrect, nodeKey: this.getKey() }));
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
|
-
export function $createProblemInputNode({ showCharacterNumber, placeholder, solutions, answer,
|
|
111
|
-
return $applyNodeReplacement(new ProblemInputNode(showCharacterNumber, placeholder, solutions, answer,
|
|
112
|
+
export function $createProblemInputNode({ showCharacterNumber, placeholder, solutions, answer, caseSensitive, ignoreWhitespace, isCorrect, key, }) {
|
|
113
|
+
return $applyNodeReplacement(new ProblemInputNode(showCharacterNumber, placeholder, solutions, answer, caseSensitive, ignoreWhitespace, isCorrect, key));
|
|
112
114
|
}
|
|
113
115
|
export function $isProblemInputNode(node) {
|
|
114
116
|
return node instanceof ProblemInputNode;
|
package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSegmentedControl.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import React from "react";
|
|
|
4
4
|
export interface FormCharacterNumberProps {
|
|
5
5
|
control: Control<ProblemInputPayload>;
|
|
6
6
|
trigger: UseFormTrigger<ProblemInputPayload>;
|
|
7
|
-
valueName: FieldPath<Pick<ProblemInputPayload, "showCharacterNumber" | "
|
|
7
|
+
valueName: FieldPath<Pick<ProblemInputPayload, "showCharacterNumber" | "ignoreWhitespace" | "caseSensitive">>;
|
|
8
8
|
valueList: {
|
|
9
9
|
value: boolean;
|
|
10
10
|
label: React.ReactNode;
|
|
@@ -22,8 +22,8 @@ export function SettingForm(props) {
|
|
|
22
22
|
solutions,
|
|
23
23
|
showCharacterNumber,
|
|
24
24
|
placeholder,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
caseSensitive,
|
|
26
|
+
ignoreWhitespace,
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
const theme = useTheme();
|
|
@@ -41,8 +41,8 @@ export function SettingForm(props) {
|
|
|
41
41
|
node.setSolutions(data.solutions);
|
|
42
42
|
node.setShowCharacterNumber(data.showCharacterNumber);
|
|
43
43
|
node.setPlaceholder(data.placeholder);
|
|
44
|
-
node.setCaseSensitive(data.
|
|
45
|
-
node.setIgnoreWhitespace(data.
|
|
44
|
+
node.setCaseSensitive(data.caseSensitive);
|
|
45
|
+
node.setIgnoreWhitespace(data.ignoreWhitespace);
|
|
46
46
|
});
|
|
47
47
|
onClose();
|
|
48
48
|
};
|
|
@@ -82,10 +82,10 @@ export function SettingForm(props) {
|
|
|
82
82
|
] })] }), _jsxs(FormArea, { children: [_jsxs(Label, { children: ["\uC790\uB9AC \uD45C\uC2DC\uC790", _jsx(Tooltip, Object.assign({ text: _jsx("span", { children: "\uC785\uB825 \uCE78\uC5D0 \uAE30\uBCF8\uC73C\uB85C \uB178\uCD9C\uB418\uB294 \uD14D\uC2A4\uD2B8\uC785\uB2C8\uB2E4." }), placement: "top" }, { children: _jsx(QuestionFillIcon, { css: css `
|
|
83
83
|
width: 12px;
|
|
84
84
|
height: 12px;
|
|
85
|
-
` }) }))] }), _jsx(FormPlaceholder, { control: control })] }), _jsxs(FormArea, { children: [_jsx(Label, { children: "\uB744\uC5B4\uC4F0\uAE30" }), _jsx(FormSegmentedControl, { control: control, trigger: trigger, valueName: "
|
|
85
|
+
` }) }))] }), _jsx(FormPlaceholder, { control: control })] }), _jsxs(FormArea, { children: [_jsx(Label, { children: "\uB744\uC5B4\uC4F0\uAE30" }), _jsx(FormSegmentedControl, { control: control, trigger: trigger, valueName: "ignoreWhitespace", valueList: [
|
|
86
86
|
{ value: true, label: "무시하기" },
|
|
87
87
|
{ value: false, label: "포함하기" }
|
|
88
|
-
] })] }), _jsxs(FormArea, { children: [_jsx(Label, { children: "\uB300\uC18C\uBB38\uC790" }), _jsx(FormSegmentedControl, { control: control, trigger: trigger, valueName: "
|
|
88
|
+
] })] }), _jsxs(FormArea, { children: [_jsx(Label, { children: "\uB300\uC18C\uBB38\uC790" }), _jsx(FormSegmentedControl, { control: control, trigger: trigger, valueName: "caseSensitive", valueList: [
|
|
89
89
|
{ value: false, label: "무시하기" },
|
|
90
90
|
{ value: true, label: "포함하기" }
|
|
91
91
|
] })] })] })] }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: "\uB2EB\uAE30", onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: "\uC774\uB300\uB85C \uB123\uAE30", type: "submit" })] })] })));
|
package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js
CHANGED
|
@@ -147,8 +147,8 @@ function getQuizContextOptions(editor, theme) {
|
|
|
147
147
|
showCharacterNumber: false,
|
|
148
148
|
placeholder: "",
|
|
149
149
|
answer: "",
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
caseSensitive: false,
|
|
151
|
+
ignoreWhitespace: true,
|
|
152
152
|
}),
|
|
153
153
|
}),
|
|
154
154
|
new ComponentPickerOption("객관식 입력 칸", {
|