@team-monolith/cds 1.52.1 → 1.53.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.
Files changed (22) hide show
  1. package/@types/emotion.d.ts +2 -0
  2. package/dist/CodleDesignSystemProvider.d.ts +2 -226
  3. package/dist/CodleDesignSystemProvider.js +4 -0
  4. package/dist/components/InputBase.d.ts +2 -0
  5. package/dist/components/InputBase.js +4 -1
  6. package/dist/icons/Custom.d.ts +9 -0
  7. package/dist/icons/Custom.js +10 -0
  8. package/dist/icons/custom/ebook-color.svg +5 -0
  9. package/dist/icons/custom/ebook.svg +3 -0
  10. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxEdit.d.ts +1 -2
  11. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +3 -2
  12. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.d.ts +4 -9
  13. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +36 -31
  14. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.d.ts +3 -0
  15. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +18 -29
  16. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +2 -8
  17. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxEdit.d.ts +1 -2
  18. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +3 -2
  19. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.d.ts +2 -3
  20. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +33 -42
  21. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +17 -29
  22. package/package.json +1 -1
@@ -102,6 +102,8 @@ interface CodleColors {
102
102
  videoAlt: string;
103
103
  worksheet: string;
104
104
  worksheetAlt: string;
105
+ ebook: string;
106
+ ebookAlt: string;
105
107
  };
106
108
  blanket: {
107
109
  neutral: string;
@@ -1,231 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Theme } from "@emotion/react";
3
- export declare const light: {
4
- fontFamily: {
5
- ui: string;
6
- title: string;
7
- };
8
- color: {
9
- background: {
10
- neutralBase: string;
11
- neutralBaseActive: string;
12
- neutralBaseDisabled: string;
13
- neutralAlt: string;
14
- neutralAltActive: string;
15
- neutralAltDisabled: string;
16
- primary: string;
17
- primaryActive: string;
18
- primaryDisabled: string;
19
- secondary: string;
20
- secondaryActive: string;
21
- secondaryDisabled: string;
22
- danger: string;
23
- dangerActive: string;
24
- dangerDisabled: string;
25
- success: string;
26
- successActive: string;
27
- successDisabled: string;
28
- info: string;
29
- infoActive: string;
30
- infoDisabled: string;
31
- warning: string;
32
- warningActive: string;
33
- warningDisabled: string;
34
- inverse: string;
35
- inverseActive: string;
36
- inverseDisabled: string;
37
- };
38
- foreground: {
39
- neutralBase: string;
40
- neutralBaseActive: string;
41
- neutralBaseDisabled: string;
42
- neutralAlt: string;
43
- neutralAltActive: string;
44
- neutralAltDisabled: string;
45
- primary: string;
46
- primaryActive: string;
47
- primaryDisabled: string;
48
- secondary: string;
49
- secondaryActive: string;
50
- secondaryDisabled: string;
51
- danger: string;
52
- dangerActive: string;
53
- dangerDisabled: string;
54
- success: string;
55
- successActive: string;
56
- successDisabled: string;
57
- info: string;
58
- infoActive: string;
59
- infoDisabled: string;
60
- warning: string;
61
- warningActive: string;
62
- warningDisabled: string;
63
- };
64
- container: {
65
- blueContainer: string;
66
- blueOnContainer: string;
67
- orangeContainer: string;
68
- orangeOnContainer: string;
69
- redContainer: string;
70
- redOnContainer: string;
71
- greenContainer: string;
72
- greenOnContainer: string;
73
- tealContainer: string;
74
- tealOnContainer: string;
75
- yellowContainer: string;
76
- yellowOnContainer: string;
77
- obsidianContainer: string;
78
- obsidianOnContainer: string;
79
- marbleContainer: string;
80
- marbleOnContainer: string;
81
- };
82
- brand: {
83
- brandOriginal: string;
84
- brandAlt: string;
85
- brandAccent: string;
86
- brandFaded: string;
87
- pdf: string;
88
- pdfAlt: string;
89
- quiz: string;
90
- quizAlt: string;
91
- python: string;
92
- pythonAlt: string;
93
- embedded: string;
94
- embeddedAlt: string;
95
- board: string;
96
- boardAlt: string;
97
- scratch: string;
98
- scratchAlt: string;
99
- entry: string;
100
- entryAlt: string;
101
- video: string;
102
- videoAlt: string;
103
- worksheet: string;
104
- worksheetAlt: string;
105
- };
106
- blanket: {
107
- neutral: string;
108
- neutralLight: string;
109
- neutralHeavy: string;
110
- inverse: string;
111
- inverseLight: string;
112
- inverseHeavy: string;
113
- };
114
- };
115
- };
116
- export declare const dark: {
117
- fontFamily: {
118
- ui: string;
119
- title: string;
120
- };
121
- color: {
122
- background: {
123
- neutralBase: string;
124
- neutralBaseActive: string;
125
- neutralBaseDisabled: string;
126
- neutralAlt: string;
127
- neutralAltActive: string;
128
- neutralAltDisabled: string;
129
- primary: string;
130
- primaryActive: string;
131
- primaryDisabled: string;
132
- secondary: string;
133
- secondaryActive: string;
134
- secondaryDisabled: string;
135
- danger: string;
136
- dangerActive: string;
137
- dangerDisabled: string;
138
- success: string;
139
- successActive: string;
140
- successDisabled: string;
141
- info: string;
142
- infoActive: string;
143
- infoDisabled: string;
144
- warning: string;
145
- warningActive: string;
146
- warningDisabled: string;
147
- inverse: string;
148
- inverseActive: string;
149
- inverseDisabled: string;
150
- };
151
- foreground: {
152
- neutralBase: string;
153
- neutralBaseActive: string;
154
- neutralBaseDisabled: string;
155
- neutralAlt: string;
156
- neutralAltActive: string;
157
- neutralAltDisabled: string;
158
- primary: string;
159
- primaryActive: string;
160
- primaryDisabled: string;
161
- secondary: string;
162
- secondaryActive: string;
163
- secondaryDisabled: string;
164
- danger: string;
165
- dangerActive: string;
166
- dangerDisabled: string;
167
- success: string;
168
- successActive: string;
169
- successDisabled: string;
170
- info: string;
171
- infoActive: string;
172
- infoDisabled: string;
173
- warning: string;
174
- warningActive: string;
175
- warningDisabled: string;
176
- };
177
- container: {
178
- blueContainer: string;
179
- blueOnContainer: string;
180
- orangeContainer: string;
181
- orangeOnContainer: string;
182
- redContainer: string;
183
- redOnContainer: string;
184
- greenContainer: string;
185
- greenOnContainer: string;
186
- tealContainer: string;
187
- tealOnContainer: string;
188
- yellowContainer: string;
189
- yellowOnContainer: string;
190
- obsidianContainer: string;
191
- obsidianOnContainer: string;
192
- marbleContainer: string;
193
- marbleOnContainer: string;
194
- };
195
- brand: {
196
- brandOriginal: string;
197
- brandAlt: string;
198
- brandAccent: string;
199
- brandFaded: string;
200
- pdf: string;
201
- pdfAlt: string;
202
- quiz: string;
203
- quizAlt: string;
204
- python: string;
205
- pythonAlt: string;
206
- embedded: string;
207
- embeddedAlt: string;
208
- board: string;
209
- boardAlt: string;
210
- scratch: string;
211
- scratchAlt: string;
212
- entry: string;
213
- entryAlt: string;
214
- video: string;
215
- videoAlt: string;
216
- worksheet: string;
217
- worksheetAlt: string;
218
- };
219
- blanket: {
220
- neutral: string;
221
- neutralLight: string;
222
- neutralHeavy: string;
223
- inverse: string;
224
- inverseLight: string;
225
- inverseHeavy: string;
226
- };
227
- };
228
- };
3
+ export declare const light: Theme;
4
+ export declare const dark: Theme;
229
5
  interface CodleDesignSystemContext {
230
6
  theme?: Theme;
231
7
  lexical?: {
@@ -107,6 +107,8 @@ export const light = {
107
107
  videoAlt: "#CEC8DE",
108
108
  worksheet: "#874BFF",
109
109
  worksheetAlt: "#EEE5FF",
110
+ ebook: "#0094FF",
111
+ ebookAlt: "#E0F2FF",
110
112
  },
111
113
  blanket: {
112
114
  neutral: COLOR.alpha030,
@@ -220,6 +222,8 @@ export const dark = {
220
222
  videoAlt: "#2D2640",
221
223
  worksheet: "#874BFF",
222
224
  worksheetAlt: "#5F5C66",
225
+ ebook: "#0094FF",
226
+ ebookAlt: "#475966",
223
227
  },
224
228
  blanket: {
225
229
  neutral: COLOR.alphaf20,
@@ -45,6 +45,8 @@ interface InputBaseInputProps {
45
45
  }
46
46
  interface InputBaseTextAreaProps {
47
47
  multiline: true;
48
+ /** MUI TextareaAutosize 사용 여부. 전달하지 않으면 사용합니다. */
49
+ disableAutosize?: boolean;
48
50
  /** HTML input 태그에 전달될 ref */
49
51
  inputRef?: ForwardedRef<HTMLTextAreaElement>;
50
52
  /** HTML input 태그에 전달될 props */
@@ -62,7 +62,7 @@ const SIZE_TO_STYLES = (size, fullWidth) => ({
62
62
  padding-bottom: 12px;
63
63
  ${!fullWidth && "max-width: 375px"};
64
64
  `,
65
- }[size]);
65
+ })[size];
66
66
  function InputComponent(props) {
67
67
  const { placeholder, disabled = false, defaultValue, value } = props;
68
68
  const theme = useTheme();
@@ -86,6 +86,9 @@ function InputComponent(props) {
86
86
  `;
87
87
  // Type Safety 때문에 코드의 중복을 허용합니다.
88
88
  if (props.multiline) {
89
+ if (props.disableAutosize) {
90
+ return (_jsx("textarea", Object.assign({ css: style }, props.inputProps, { ref: props.inputRef, onChange: props.onChange, placeholder: placeholder, disabled: disabled, defaultValue: defaultValue, value: value })));
91
+ }
89
92
  return (_jsx(TextareaAutosize, Object.assign({ css: style }, props.inputProps, { ref: props.inputRef, onChange: props.onChange, placeholder: placeholder, disabled: disabled, defaultValue: defaultValue, value: value })));
90
93
  }
91
94
  else {
@@ -271,3 +271,12 @@ export declare const customeWorksheetColorSvg: string;
271
271
  export declare const CustomWorksheetColorIcon: React.ForwardRefExoticComponent<{
272
272
  className?: string | undefined;
273
273
  } & React.RefAttributes<any>>;
274
+ export declare const customEbookSvg: string;
275
+ export declare const CustomEbookIcon: React.ForwardRefExoticComponent<{
276
+ className?: string | undefined;
277
+ color?: string | undefined;
278
+ } & React.RefAttributes<any>>;
279
+ export declare const customEbookColorSvg: string;
280
+ export declare const CustomEbookColorIcon: React.ForwardRefExoticComponent<{
281
+ className?: string | undefined;
282
+ } & React.RefAttributes<any>>;
@@ -300,3 +300,13 @@ export const customeWorksheetColorSvg = customeWorksheetColorSvgImport;
300
300
  export const CustomWorksheetColorIcon = forwardRef((props, ref) => {
301
301
  return (_jsxs("svg", Object.assign({}, props, { ref: ref, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M19 3H5C3.9 3 3 3.9 3 5V15C3 16.1 3.9 17 5 17H19C20.1 17 21 16.1 21 15V5C21 3.9 20.1 3 19 3Z", fill: "#874BFF" }), _jsx("path", { d: "M3 19.5C3 18.6716 3.67157 18 4.5 18H19.5C20.3284 18 21 18.6716 21 19.5C21 20.3284 20.3284 21 19.5 21H4.5C3.67157 21 3 20.3284 3 19.5Z", fill: "#EEE6FF" }), _jsx("path", { d: "M8.13137 14.5L5.5 5.5H8.20107L9.42091 11.0371H9.49062L10.937 5.5H13.063L14.5094 11.0547H14.5791L15.7989 5.5H18.5L15.8686 14.5H13.5509L12.0349 9.47266H11.9651L10.4491 14.5H8.13137Z", fill: "#EEE5FF" })] })));
302
302
  });
303
+ import customEbookSvgImport from "./custom/ebook.svg";
304
+ export const customEbookSvg = customEbookSvgImport;
305
+ export const CustomEbookIcon = forwardRef((props, ref) => {
306
+ return (_jsx("svg", Object.assign({}, props, { ref: ref, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 4.36014C11.4873 3.84225 10.5729 3.5 9.41304 3.5C7.58696 3.5 6.97826 3.97368 6.36957 4.44737C5.76087 4.92105 5.15217 5.39474 3.93478 5.39474C2.71739 5.39474 1.5 6.24304 1.5 7.28947V17.7105C1.5 18.757 2.71739 19.6053 3.93478 19.6053C3.99279 19.6053 4.04941 19.6042 4.10472 19.6021C4.14925 19.6042 4.19407 19.6053 4.23913 19.6053H8.80435C8.94542 19.6053 9.08649 19.6907 9.28145 19.8088C9.71739 20.0728 10.4228 20.5 12 20.5C13.5772 20.5 14.2826 20.0728 14.7185 19.8088C14.9135 19.6907 15.0546 19.6053 15.1957 19.6053H19.7609C19.8059 19.6053 19.8507 19.6042 19.8953 19.6021C19.9506 19.6042 20.0072 19.6053 20.0652 19.6053C21.2826 19.6053 22.5 18.757 22.5 17.7105V7.28947C22.5 6.24304 21.2826 5.39474 20.0652 5.39474C18.8478 5.39474 18.2391 4.92105 17.6304 4.44737C17.0217 3.97368 16.413 3.5 14.587 3.5C13.4271 3.5 12.5127 3.84225 12 4.36014ZM11.5435 6.76316C11.5435 5.94926 10.6304 5.28947 9.26087 5.28947C7.8913 5.28947 7.43478 5.65789 6.97826 6.02632C6.52174 6.39474 6.06522 6.76316 5.15217 6.76316C4.23913 6.76316 3.32609 7.42295 3.32609 8.23684V16.3421C3.32609 17.156 4.23913 17.8158 5.15217 17.8158C6.06522 17.8158 6.52174 17.4474 6.97826 17.0789C7.43478 16.7105 7.8913 16.3421 8.80435 16.3421C9.67525 16.3421 9.90653 16.5711 10.1028 16.7653C10.2474 16.9085 10.3731 17.0329 10.7217 17.0329C11.5435 17.0329 11.5435 16.3421 11.5435 16.3421V6.76316ZM14.7391 5.28947C13.3696 5.28947 12.4565 5.94926 12.4565 6.76316V16.3421C12.4565 16.3421 12.4565 17.0329 13.2783 17.0329C13.6269 17.0329 13.7526 16.9085 13.8972 16.7653C14.0935 16.5711 14.3247 16.3421 15.1957 16.3421C16.1087 16.3421 16.5652 16.7105 17.0217 17.0789C17.4783 17.4474 17.9348 17.8158 18.8478 17.8158C19.7609 17.8158 20.6739 17.156 20.6739 16.3421V8.23684C20.6739 7.42295 19.7609 6.76316 18.8478 6.76316C17.9348 6.76316 17.4783 6.39474 17.0217 6.02632C16.5652 5.65789 16.1087 5.28947 14.7391 5.28947Z", fill: "currentColor" }) })));
307
+ });
308
+ import customEbookColorSvgImport from "./custom/ebook-color.svg";
309
+ export const customEbookColorSvg = customEbookColorSvgImport;
310
+ export const CustomEbookColorIcon = forwardRef((props, ref) => {
311
+ return (_jsxs("svg", Object.assign({}, props, { ref: ref, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M4.23913 6C2.72634 6 1.5 7.25919 1.5 8.8125V16.25C1.5 17.8033 2.72634 19.0625 4.23913 19.0625H8.80435C8.94545 19.0625 9.08655 19.152 9.28149 19.2757C9.71739 19.5524 10.4228 20 12 20C13.5772 20 14.2826 19.5524 14.7185 19.2757C14.9134 19.152 15.0545 19.0625 15.1957 19.0625H19.7609C21.2737 19.0625 22.5 17.8033 22.5 16.25V8.8125C22.5 7.25919 21.2737 6 19.7609 6H4.23913Z", fill: "#0094FF" }), _jsx("path", { d: "M12 5.86667C12 5.01767 13 4 14.5 4C16 4 16.5 4.54902 17 4.93333C17.5 5.31765 18 5.86667 19 5.86667C20 5.86667 21 6.88433 21 7.73334V16.1333C21 17.0667 20 18 19 18C18 18 17.5 17.9177 17 17.5333C16.5 17.149 16 16.4627 15 16.4627C14 16.4627 14 17.0667 13 17.0667C12 17.0667 12 16.1333 12 16.1333V5.86667Z", fill: "#C2E6FF" }), _jsx("path", { d: "M12 5.86667C12 5.01767 11 4 9.5 4C8 4 7.5 4.54902 7 4.93333C6.5 5.31765 6 5.86667 5 5.86667C4 5.86667 3 6.88433 3 7.73334V16.1333C3 17.0667 4 18 5 18C6 18 6.5 17.9177 7 17.5333C7.5 17.149 8 16.4627 9 16.4627C10 16.4627 10 17.0667 11 17.0667C12 17.0667 12 16.1333 12 16.1333V5.86667Z", fill: "#E0F2FF" })] })));
312
+ });
@@ -0,0 +1,5 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4.23913 6C2.72634 6 1.5 7.25919 1.5 8.8125V16.25C1.5 17.8033 2.72634 19.0625 4.23913 19.0625H8.80435C8.94545 19.0625 9.08655 19.152 9.28149 19.2757C9.71739 19.5524 10.4228 20 12 20C13.5772 20 14.2826 19.5524 14.7185 19.2757C14.9134 19.152 15.0545 19.0625 15.1957 19.0625H19.7609C21.2737 19.0625 22.5 17.8033 22.5 16.25V8.8125C22.5 7.25919 21.2737 6 19.7609 6H4.23913Z" fill="#0094FF"/>
3
+ <path d="M12 5.86667C12 5.01767 13 4 14.5 4C16 4 16.5 4.54902 17 4.93333C17.5 5.31765 18 5.86667 19 5.86667C20 5.86667 21 6.88433 21 7.73334V16.1333C21 17.0667 20 18 19 18C18 18 17.5 17.9177 17 17.5333C16.5 17.149 16 16.4627 15 16.4627C14 16.4627 14 17.0667 13 17.0667C12 17.0667 12 16.1333 12 16.1333V5.86667Z" fill="#C2E6FF"/>
4
+ <path d="M12 5.86667C12 5.01767 11 4 9.5 4C8 4 7.5 4.54902 7 4.93333C6.5 5.31765 6 5.86667 5 5.86667C4 5.86667 3 6.88433 3 7.73334V16.1333C3 17.0667 4 18 5 18C6 18 6.5 17.9177 7 17.5333C7.5 17.149 8 16.4627 9 16.4627C10 16.4627 10 17.0667 11 17.0667C12 17.0667 12 16.1333 12 16.1333V5.86667Z" fill="#E0F2FF"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.36014C11.4873 3.84225 10.5729 3.5 9.41304 3.5C7.58696 3.5 6.97826 3.97368 6.36957 4.44737C5.76087 4.92105 5.15217 5.39474 3.93478 5.39474C2.71739 5.39474 1.5 6.24304 1.5 7.28947V17.7105C1.5 18.757 2.71739 19.6053 3.93478 19.6053C3.99279 19.6053 4.04941 19.6042 4.10472 19.6021C4.14925 19.6042 4.19407 19.6053 4.23913 19.6053H8.80435C8.94542 19.6053 9.08649 19.6907 9.28145 19.8088C9.71739 20.0728 10.4228 20.5 12 20.5C13.5772 20.5 14.2826 20.0728 14.7185 19.8088C14.9135 19.6907 15.0546 19.6053 15.1957 19.6053H19.7609C19.8059 19.6053 19.8507 19.6042 19.8953 19.6021C19.9506 19.6042 20.0072 19.6053 20.0652 19.6053C21.2826 19.6053 22.5 18.757 22.5 17.7105V7.28947C22.5 6.24304 21.2826 5.39474 20.0652 5.39474C18.8478 5.39474 18.2391 4.92105 17.6304 4.44737C17.0217 3.97368 16.413 3.5 14.587 3.5C13.4271 3.5 12.5127 3.84225 12 4.36014ZM11.5435 6.76316C11.5435 5.94926 10.6304 5.28947 9.26087 5.28947C7.8913 5.28947 7.43478 5.65789 6.97826 6.02632C6.52174 6.39474 6.06522 6.76316 5.15217 6.76316C4.23913 6.76316 3.32609 7.42295 3.32609 8.23684V16.3421C3.32609 17.156 4.23913 17.8158 5.15217 17.8158C6.06522 17.8158 6.52174 17.4474 6.97826 17.0789C7.43478 16.7105 7.8913 16.3421 8.80435 16.3421C9.67525 16.3421 9.90653 16.5711 10.1028 16.7653C10.2474 16.9085 10.3731 17.0329 10.7217 17.0329C11.5435 17.0329 11.5435 16.3421 11.5435 16.3421V6.76316ZM14.7391 5.28947C13.3696 5.28947 12.4565 5.94926 12.4565 6.76316V16.3421C12.4565 16.3421 12.4565 17.0329 13.2783 17.0329C13.6269 17.0329 13.7526 16.9085 13.8972 16.7653C14.0935 16.5711 14.3247 16.3421 15.1957 16.3421C16.1087 16.3421 16.5652 16.7105 17.0217 17.0789C17.4783 17.4474 17.9348 17.8158 18.8478 17.8158C19.7609 17.8158 20.6739 17.156 20.6739 16.3421V8.23684C20.6739 7.42295 19.7609 6.76316 18.8478 6.76316C17.9348 6.76316 17.4783 6.39474 17.0217 6.02632C16.5652 5.65789 16.1087 5.28947 14.7391 5.28947Z" fill="#363636"/>
3
+ </svg>
@@ -1,10 +1,9 @@
1
1
  import { ImageProps } from "../../insertImageDialog";
2
- import React from "react";
3
2
  export interface SelectBoxEditProps {
4
3
  index: number;
5
4
  isAnswer: boolean;
6
5
  image?: ImageProps | null;
7
- text: React.ReactNode;
6
+ text: string;
8
7
  onClick: () => void;
9
8
  }
10
9
  export declare function SelectBoxEdit(props: SelectBoxEditProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -65,8 +65,9 @@ export function SelectComponent(props) {
65
65
  display: flex;
66
66
  flex-direction: column;
67
67
  gap: 4px;
68
- ` }, { children: selections.map((selection, index) => (_jsx(SelectBoxEdit, { index: index + 1, isAnswer: "isAnswer" in selection && selection.isAnswer, image: selection.show.image, text: selection.show.text ||
69
- (selection.show.image ? null : `${index + 1}번 선택지`), onClick: () => setSettingOpen(true) }, index))) })), _jsx(SquareButton, { size: "small", color: "icon", icon: _jsx(Settings3FillIcon, {}), onClick: () => {
68
+ ` }, { children: selections.map((selection, index) => (_jsx(SelectBoxEdit, { index: index + 1, isAnswer: "isAnswer" in selection && selection.isAnswer, image: selection.show.image, text: selection.show.text === "" && selection.show.image === null
69
+ ? `${index + 1}번 선택지`
70
+ : selection.show.text, onClick: () => setSettingOpen(true) }, index))) })), _jsx(SquareButton, { size: "small", color: "icon", icon: _jsx(Settings3FillIcon, {}), onClick: () => {
70
71
  setSettingOpen(true);
71
72
  } })] })), settingOpen && (_jsx(SettingForm, { selections: selections, nodeKey: nodeKey, onClose: () => setSettingOpen(false) }))] }));
72
73
  }
@@ -1,14 +1,9 @@
1
- import { Selection } from "../ProblemSelectNode";
2
- import { Control, UseFormWatch } from "react-hook-form";
1
+ import { Control, RegisterOptions } from "react-hook-form";
2
+ import { SettingFormData } from "./SettingForm";
3
3
  export interface FormSelectionProps {
4
4
  index: number;
5
- control: Control<{
6
- selections: Selection[];
7
- }, any>;
8
- watch: UseFormWatch<{
9
- selections: Selection[];
10
- }>;
11
- rules?: any;
5
+ control: Control<SettingFormData, any>;
6
+ rules?: Omit<RegisterOptions<SettingFormData, `selections.${number}`>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs">;
12
7
  onDelete?: () => void;
13
8
  }
14
9
  export declare function FormSelection(props: FormSelectionProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  /** @jsxImportSource @emotion/react */
3
3
  import styled from "@emotion/styled";
4
- import { Controller } from "react-hook-form";
4
+ import { useController } from "react-hook-form";
5
5
  import { css } from "@emotion/react";
6
6
  import Input from "../../../../../components/Input";
7
7
  import { DeleteBinLineIcon, ErrorWarningFillIcon, ImageAddFillIcon, ImageEditFillIcon, } from "../../../../../icons";
@@ -10,43 +10,48 @@ import Switch from "../../../../../components/Switch";
10
10
  import { useState } from "react";
11
11
  import { InsertImageDialog } from "../../insertImageDialog";
12
12
  export function FormSelection(props) {
13
- const { index, control, watch, rules, onDelete } = props;
13
+ const { index, control, rules, onDelete } = props;
14
14
  const [imageOpen, setImageOpen] = useState(false);
15
15
  const [inputFocused, setInputFocused] = useState(false);
16
- return (_jsxs(Container, { children: [_jsx(Index, { children: index + 1 }), _jsx(Controller, { name: `selections.${index}.show`, control: control, rules: rules, render: ({ field: { value, onChange }, fieldState: { invalid, error }, }) => (_jsxs("div", Object.assign({ css: css `
17
- display: flex;
18
- flex: 1;
19
- flex-direction: column;
20
- gap: 4px;
21
- ` }, { children: [_jsx(InsertImageDialog, { title: value.image ? "이미지 바꾸기" : "이미지 삽입하기", open: imageOpen, onClose: () => setImageOpen(false), updateImg: (props) => onChange(Object.assign(Object.assign({}, value), { image: props })), deleteButton: Boolean(value.image) }), value.image && (_jsx("img", { src: value.image.src, alt: value.image.altText, css: css `
22
- height: auto;
23
- // 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
24
- max-width: min(400px, 100%);
25
- width: fit-content;
26
- border-radius: 6px;
27
- `, draggable: "false" })), _jsx(Input, { size: "small", color: invalid
28
- ? "activeDanger"
29
- : inputFocused
30
- ? "activePrimary"
31
- : "default", value: value.text, onChange: (e) => onChange(Object.assign(Object.assign({}, value), { text: e.target.value })), inputProps: {
32
- onFocus: (_e) => {
33
- setInputFocused(true);
34
- },
35
- onBlur: (_e) => {
36
- setInputFocused(false);
37
- },
38
- }, placeholder: `${index + 1}번 선택지`, hintIcon: invalid ? _jsx(ErrorWarningFillIcon, {}) : undefined, hintText: error === null || error === void 0 ? void 0 : error.message, multiline: true, fullWidth: true, css: css `
39
- flex: 1;
40
- ` })] }))) }), _jsxs("div", Object.assign({ css: css `
16
+ const { field: { value, onChange }, fieldState: { invalid, error }, } = useController({
17
+ control,
18
+ name: `selections.${index}`,
19
+ rules,
20
+ });
21
+ return (_jsxs(Container, { children: [_jsx(Index, { children: index + 1 }), _jsxs("div", Object.assign({ css: css `
22
+ display: flex;
23
+ flex: 1;
24
+ flex-direction: column;
25
+ gap: 4px;
26
+ ` }, { children: [_jsx(InsertImageDialog, { title: value.show.image ? "이미지 바꾸기" : "이미지 삽입하기", open: imageOpen, onClose: () => setImageOpen(false), updateImg: (props) => onChange(Object.assign(Object.assign({}, value), { show: Object.assign(Object.assign({}, value.show), { image: props }) })), deleteButton: Boolean(value.show.image) }), value.show.image && (_jsx("img", { src: value.show.image.src, alt: value.show.image.altText, css: css `
27
+ height: auto;
28
+ // 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
29
+ max-width: min(400px, 100%);
30
+ width: fit-content;
31
+ border-radius: 6px;
32
+ `, draggable: "false" })), _jsx(Input, { size: "small", color: invalid
33
+ ? "activeDanger"
34
+ : inputFocused
35
+ ? "activePrimary"
36
+ : "default", value: value.show.text, onChange: (e) => onChange(Object.assign(Object.assign({}, value), { show: Object.assign(Object.assign({}, value.show), { text: e.target.value }) })), inputProps: {
37
+ onFocus: (_e) => {
38
+ setInputFocused(true);
39
+ },
40
+ onBlur: (_e) => {
41
+ setInputFocused(false);
42
+ },
43
+ }, placeholder: `${index + 1}번 선택지`, hintIcon: invalid ? _jsx(ErrorWarningFillIcon, {}) : undefined, hintText: error === null || error === void 0 ? void 0 : error.message, multiline: true, fullWidth: true, css: css `
44
+ flex: 1;
45
+ ` })] })), _jsxs("div", Object.assign({ css: css `
41
46
  display: flex;
42
47
  height: 36px;
43
48
  gap: 8px;
44
49
  align-items: center;
45
- ` }, { children: [_jsx(SquareButton, { color: "icon", size: "xsmall", icon: watch(`selections.${index}.show.image`) ? (_jsx(ImageEditFillIcon, {})) : (_jsx(ImageAddFillIcon, {})), onClick: () => {
50
+ ` }, { children: [_jsx(SquareButton, { color: "icon", size: "xsmall", icon: value.show.image ? _jsx(ImageEditFillIcon, {}) : _jsx(ImageAddFillIcon, {}), onClick: () => {
46
51
  setImageOpen(true);
47
- } }), _jsx(Controller, { name: `selections.${index}.isAnswer`, control: control, render: ({ field: { value, onChange } }) => (_jsxs(Answer, Object.assign({ onClick: () => {
48
- onChange(!value);
49
- } }, { children: ["\uC815\uB2F5", _jsx(Switch, { checked: Boolean(value), size: "small" })] }))) }), onDelete && (_jsx(SquareButton, { color: "white", size: "xsmall", icon: _jsx(DeleteBinLineIcon, {}), onClick: onDelete }))] }))] }));
52
+ } }), _jsxs(Answer, Object.assign({ onClick: () => {
53
+ onChange(Object.assign(Object.assign({}, value), { isAnswer: !value.isAnswer }));
54
+ } }, { children: ["\uC815\uB2F5", _jsx(Switch, { checked: Boolean(value.isAnswer), size: "small" })] })), onDelete && (_jsx(SquareButton, { color: "white", size: "xsmall", icon: _jsx(DeleteBinLineIcon, {}), onClick: onDelete }))] }))] }));
50
55
  }
51
56
  const Container = styled.div(({ theme }) => css `
52
57
  display: flex;
@@ -5,4 +5,7 @@ export interface SettingFormProps {
5
5
  nodeKey: NodeKey;
6
6
  onClose: () => void;
7
7
  }
8
+ export interface SettingFormData {
9
+ selections: Selection[];
10
+ }
8
11
  export default function SettingForm(props: SettingFormProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -38,33 +38,25 @@ export default function SettingForm(props) {
38
38
  });
39
39
  onClose();
40
40
  };
41
- function validateRequiredSelection(index) {
42
- const selections = watch("selections");
43
- const selection = selections[index];
44
- if (selection.show.image || selection.show.text)
41
+ function validateRequired(value) {
42
+ if (value.show.image || value.show.text)
45
43
  return true;
46
44
  return "필수 입력 항목입니다.";
47
45
  }
48
- function validateDuplicatedSelection(index) {
49
- const selections = watch("selections");
50
- if (index === 0)
51
- return true;
52
- const image = selections[index].show.image;
53
- const text = selections[index].show.text;
54
- const duplicatedIndex = selections
55
- .slice(0, index)
56
- .findIndex((selection) => {
57
- var _a;
58
- // text를 비교하고, text가 같은 경우 image도 비교합니다.
59
- if (selection.show.text !== text)
60
- return false;
61
- if (((_a = selection.show.image) === null || _a === void 0 ? void 0 : _a.src) !== (image === null || image === void 0 ? void 0 : image.src))
62
- return false;
63
- return true;
46
+ function validateDuplicated(value, formValues) {
47
+ const shows = formValues.selections.map((selection) => selection.show);
48
+ const duplicatedIndexes = shows.flatMap((show, i) => {
49
+ var _a, _b;
50
+ if (show.text === value.show.text &&
51
+ ((_a = show.image) === null || _a === void 0 ? void 0 : _a.src) === ((_b = value.show.image) === null || _b === void 0 ? void 0 : _b.src))
52
+ return [i];
53
+ return [];
64
54
  });
65
- if (duplicatedIndex < 0)
55
+ if (duplicatedIndexes.length < 2)
66
56
  return true;
67
- return `${duplicatedIndex + 1}번 선택지와 같은 내용입니다.`;
57
+ return `${duplicatedIndexes
58
+ .map((i) => i + 1)
59
+ .join(",")}번 선택지가 같은 내용입니다.`;
68
60
  }
69
61
  const answersCount = watch("selections").filter((selection) => selection.isAnswer).length;
70
62
  const hasMultipleAnswers = answersCount > 1;
@@ -72,13 +64,10 @@ export default function SettingForm(props) {
72
64
  return (_jsxs(Form, Object.assign({ onSubmit: handleSubmit(onSettingSubmit) }, { children: [_jsxs(Title, { children: [_jsx(ListRadioIcon, { css: css `
73
65
  width: 12px;
74
66
  height: 12px;
75
- ` }), "\uAC1D\uAD00\uC2DD \uC785\uB825 \uCE78"] }), _jsxs(Content, { children: [_jsxs(FormArea, { children: [_jsx(Label, { children: "\uB2F5\uC548" }), fields.map((field, index) => (_jsx(FormSelection, { index: index, control: control, watch: watch, rules: {
76
- validate: () => {
77
- const required = validateRequiredSelection(index);
78
- if (required !== true) {
79
- return required;
80
- }
81
- return validateDuplicatedSelection(index);
67
+ ` }), "\uAC1D\uAD00\uC2DD \uC785\uB825 \uCE78"] }), _jsxs(Content, { children: [_jsxs(FormArea, { children: [_jsx(Label, { children: "\uB2F5\uC548" }), fields.map((field, index) => (_jsx(FormSelection, { index: index, control: control, rules: {
68
+ validate: {
69
+ validateRequired,
70
+ validateDuplicated,
82
71
  },
83
72
  }, onDelete: index !== 0
84
73
  ? () => {
@@ -37,15 +37,9 @@ export function InputComponent(props) {
37
37
  };
38
38
  // view
39
39
  if (!isEditable) {
40
- return (_jsx(Input, { multiline: multiline, css: css `
40
+ return (_jsx(Input, { multiline: multiline, disableAutosize: true, css: css `
41
41
  textarea {
42
- // textarea의 height 고정시키기 위해 max-height와 min-height를 설정합니다.
43
- max-height: ${TEXTAREA_HEIGHT}px;
44
- min-height: ${TEXTAREA_HEIGHT}px;
45
- // https://github.com/mui/material-ui/blob/next/packages/mui-base/src/TextareaAutosize/TextareaAutosize.tsx
46
- // MUI TextareaAutoSize는 overflow를 hidden으로 설정하는 로직이 있습니다.
47
- // 그래서 부득이하게 !important를 사용합니다.
48
- overflow: auto !important;
42
+ height: ${TEXTAREA_HEIGHT}px;
49
43
  }
50
44
  `, inputProps: freezeProblemNode
51
45
  ? { readOnly: true }
@@ -1,9 +1,8 @@
1
- import React from "react";
2
1
  import { ImageProps } from "../../../insertImageDialog";
3
2
  /** SheetSelectNode의 하나의 선택지 edit모드 컴포넌트입니다. */
4
3
  export declare function SelectBoxEdit(props: {
5
4
  index: number;
6
5
  image?: ImageProps | null;
7
- text: React.ReactNode;
6
+ text: string;
8
7
  onClick: () => void;
9
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -60,8 +60,9 @@ export function SelectComponent(props) {
60
60
  display: flex;
61
61
  flex-direction: column;
62
62
  gap: 4px;
63
- ` }, { children: selections.map((selection, index) => (_jsx(SelectBoxEdit, { index: index + 1, image: selection.show.image, text: selection.show.text ||
64
- (selection.show.image ? null : `${index + 1}번 선택지`), onClick: () => setSettingOpen((open) => !open) }, index))) })), _jsx(SquareButton, { size: "small", color: "icon", icon: _jsx(Settings3FillIcon, {}), onClick: () => {
63
+ ` }, { children: selections.map((selection, index) => (_jsx(SelectBoxEdit, { index: index + 1, image: selection.show.image, text: selection.show.text === "" && selection.show.image === null
64
+ ? `${index + 1}번 선택지`
65
+ : selection.show.text, onClick: () => setSettingOpen((open) => !open) }, index))) })), _jsx(SquareButton, { size: "small", color: "icon", icon: _jsx(Settings3FillIcon, {}), onClick: () => {
65
66
  setSettingOpen((open) => !open);
66
67
  } })] })), settingOpen && (_jsx(SettingForm, { data: {
67
68
  selections,
@@ -1,11 +1,10 @@
1
1
  /** @jsxImportSource @emotion/react */
2
- import { Control, UseFormWatch } from "react-hook-form";
2
+ import { Control, RegisterOptions } from "react-hook-form";
3
3
  import { SettingFormData } from "./SettingForm";
4
4
  /** SheetSelectNode SettingForm의 단일 선택지 폼입니다. */
5
5
  export default function FormSelection(props: {
6
6
  index: number;
7
7
  control: Control<SettingFormData, any>;
8
- watch: UseFormWatch<SettingFormData>;
9
- rules?: any;
8
+ rules?: Omit<RegisterOptions<SettingFormData, `selections.${number}.show`>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs">;
10
9
  onDelete?: () => void;
11
10
  }): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  /** @jsxImportSource @emotion/react */
3
- import { Controller } from "react-hook-form";
3
+ import { useController } from "react-hook-form";
4
4
  import styled from "@emotion/styled";
5
5
  import { css } from "@emotion/react";
6
6
  import { useState } from "react";
@@ -8,40 +8,45 @@ import { InsertImageDialog } from "../../../insertImageDialog";
8
8
  import { DeleteBinLineIcon, ErrorWarningFillIcon, ImageAddFillIcon, ImageEditFillIcon, Input, SquareButton, } from "../../../../../..";
9
9
  /** SheetSelectNode SettingForm의 단일 선택지 폼입니다. */
10
10
  export default function FormSelection(props) {
11
- const { index, control, watch, rules, onDelete } = props;
11
+ const { index, control, rules, onDelete } = props;
12
12
  const [imageOpen, setImageOpen] = useState(false);
13
13
  const [inputFocused, setInputFocused] = useState(false);
14
- return (_jsxs(Container, { children: [_jsx(Index, { children: index + 1 }), _jsx(Controller, { name: `selections.${index}.show`, control: control, rules: rules, render: ({ field: { value, onChange }, fieldState: { invalid, error }, }) => (_jsxs("div", Object.assign({ css: css `
15
- display: flex;
16
- flex: 1;
17
- flex-direction: column;
18
- gap: 4px;
19
- ` }, { children: [_jsx(InsertImageDialog, { title: value.image ? "이미지 바꾸기" : "이미지 삽입하기", open: imageOpen, onClose: () => setImageOpen(false), updateImg: (props) => onChange(Object.assign(Object.assign({}, value), { image: props })), deleteButton: Boolean(value.image) }), value.image && (_jsx("img", { src: value.image.src, alt: value.image.altText, css: css `
20
- height: auto;
21
- // 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
22
- max-width: min(400px, 100%);
23
- width: fit-content;
24
- border-radius: 6px;
25
- `, draggable: "false" })), _jsx(Input, { size: "small", color: invalid
26
- ? "activeDanger"
27
- : inputFocused
28
- ? "activePrimary"
29
- : "default", value: value.text, onChange: (e) => onChange(Object.assign(Object.assign({}, value), { text: e.target.value })), inputProps: {
30
- onFocus: (_e) => {
31
- setInputFocused(true);
32
- },
33
- onBlur: (_e) => {
34
- setInputFocused(false);
35
- },
36
- }, placeholder: `${index + 1}번 선택지`, hintIcon: invalid ? _jsx(ErrorWarningFillIcon, {}) : undefined, hintText: error === null || error === void 0 ? void 0 : error.message, multiline: true, fullWidth: true, css: css `
37
- flex: 1;
38
- ` })] }))) }), _jsxs("div", Object.assign({ css: css `
14
+ const { field: { value, onChange }, fieldState: { invalid, error }, } = useController({
15
+ control,
16
+ name: `selections.${index}.show`,
17
+ rules,
18
+ });
19
+ return (_jsxs(Container, { children: [_jsx(Index, { children: index + 1 }), _jsxs("div", Object.assign({ css: css `
20
+ display: flex;
21
+ flex: 1;
22
+ flex-direction: column;
23
+ gap: 4px;
24
+ ` }, { children: [_jsx(InsertImageDialog, { title: value.image ? "이미지 바꾸기" : "이미지 삽입하기", open: imageOpen, onClose: () => setImageOpen(false), updateImg: (props) => onChange(Object.assign(Object.assign({}, value), { image: props })), deleteButton: Boolean(value.image) }), value.image && (_jsx("img", { src: value.image.src, alt: value.image.altText, css: css `
25
+ height: auto;
26
+ // 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
27
+ max-width: min(400px, 100%);
28
+ width: fit-content;
29
+ border-radius: 6px;
30
+ `, draggable: "false" })), _jsx(Input, { size: "small", color: invalid
31
+ ? "activeDanger"
32
+ : inputFocused
33
+ ? "activePrimary"
34
+ : "default", value: value.text, onChange: (e) => onChange(Object.assign(Object.assign({}, value), { text: e.target.value })), inputProps: {
35
+ onFocus: (_e) => {
36
+ setInputFocused(true);
37
+ },
38
+ onBlur: (_e) => {
39
+ setInputFocused(false);
40
+ },
41
+ }, placeholder: `${index + 1}번 선택지`, hintIcon: invalid ? _jsx(ErrorWarningFillIcon, {}) : undefined, hintText: error === null || error === void 0 ? void 0 : error.message, multiline: true, fullWidth: true, css: css `
42
+ flex: 1;
43
+ ` })] })), _jsxs("div", Object.assign({ css: css `
39
44
  display: flex;
40
45
  // 이미지가 들어가서 container height가 커져도 높이가 유지되도록 설정
41
46
  height: 36px;
42
47
  gap: 8px;
43
48
  align-items: center;
44
- ` }, { children: [_jsx(SquareButton, { color: "icon", size: "xsmall", icon: watch(`selections.${index}.show.image`) ? (_jsx(ImageEditFillIcon, {})) : (_jsx(ImageAddFillIcon, {})), onClick: () => {
49
+ ` }, { children: [_jsx(SquareButton, { color: "icon", size: "xsmall", icon: value.image ? _jsx(ImageEditFillIcon, {}) : _jsx(ImageAddFillIcon, {}), onClick: () => {
45
50
  setImageOpen(true);
46
51
  } }), onDelete && (_jsx(SquareButton, { color: "white", size: "xsmall", icon: _jsx(DeleteBinLineIcon, {}), onClick: onDelete }))] }))] }));
47
52
  }
@@ -70,17 +75,3 @@ const Index = styled.div(({ theme }) => css `
70
75
  font-weight: 800;
71
76
  line-height: 16px;
72
77
  `);
73
- const Answer = styled.div(({ theme }) => css `
74
- display: flex;
75
- align-items: center;
76
- padding-right: 4px;
77
- gap: 8px;
78
- color: ${theme.color.foreground.neutralBase};
79
- cursor: pointer;
80
- /* Default/Label/14px-Md */
81
- font-family: ${theme.fontFamily.ui};
82
- font-size: 14px;
83
- font-style: normal;
84
- font-weight: 500;
85
- line-height: 16px; /* 114.286% */
86
- `);
@@ -38,44 +38,32 @@ export function SettingForm(props) {
38
38
  });
39
39
  onClose();
40
40
  };
41
- function validateRequiredSelection(index) {
42
- const selections = watch("selections");
43
- const selection = selections[index];
44
- if (selection.show.image || selection.show.text)
41
+ function validateRequired(value) {
42
+ if (value.image || value.text)
45
43
  return true;
46
44
  return "필수 입력 항목입니다.";
47
45
  }
48
- function validateDuplicatedSelection(index) {
49
- const selections = watch("selections");
50
- if (index === 0)
51
- return true;
52
- const image = selections[index].show.image;
53
- const text = selections[index].show.text;
54
- const duplicatedIndex = selections
55
- .slice(0, index)
56
- .findIndex((selection) => {
57
- var _a;
58
- // text를 비교하고, text가 같은 경우 image도 비교합니다.
59
- if (selection.show.text !== text)
60
- return false;
61
- if (((_a = selection.show.image) === null || _a === void 0 ? void 0 : _a.src) !== (image === null || image === void 0 ? void 0 : image.src))
62
- return false;
63
- return true;
46
+ function validateDuplicated(value, formValues) {
47
+ const shows = formValues.selections.map((selection) => selection.show);
48
+ const duplicatedIndexes = shows.flatMap((show, i) => {
49
+ var _a, _b;
50
+ if (show.text === value.text && ((_a = show.image) === null || _a === void 0 ? void 0 : _a.src) === ((_b = value.image) === null || _b === void 0 ? void 0 : _b.src))
51
+ return [i];
52
+ return [];
64
53
  });
65
- if (duplicatedIndex < 0)
54
+ if (duplicatedIndexes.length < 2)
66
55
  return true;
67
- return `${duplicatedIndex + 1}번 선택지와 같은 내용입니다.`;
56
+ return `${duplicatedIndexes
57
+ .map((i) => i + 1)
58
+ .join(",")}번 선택지가 같은 내용입니다.`;
68
59
  }
69
60
  return (_jsxs(Form, Object.assign({ onSubmit: handleSubmit(onSettingSubmit) }, { children: [_jsxs(Title, { children: [_jsx(ListRadioIcon, { css: css `
70
61
  width: 12px;
71
62
  height: 12px;
72
- ` }), "\uC120\uD0DD\uD615 \uC785\uB825 \uCE78"] }), _jsxs(Content, { children: [_jsxs(Left, { children: [_jsxs(FormArea, { children: [_jsx(Label, { children: "\uC120\uD0DD\uC9C0" }), fields.map((field, index) => (_jsx(FormSelection, { index: index, control: control, watch: watch, rules: {
73
- validate: () => {
74
- const required = validateRequiredSelection(index);
75
- if (required !== true) {
76
- return required;
77
- }
78
- return validateDuplicatedSelection(index);
63
+ ` }), "\uC120\uD0DD\uD615 \uC785\uB825 \uCE78"] }), _jsxs(Content, { children: [_jsxs(Left, { children: [_jsxs(FormArea, { children: [_jsx(Label, { children: "\uC120\uD0DD\uC9C0" }), fields.map((field, index) => (_jsx(FormSelection, { index: index, control: control, rules: {
64
+ validate: {
65
+ validateRequired,
66
+ validateDuplicated,
79
67
  },
80
68
  }, onDelete: index !== 0
81
69
  ? () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.52.1",
3
+ "version": "1.53.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,