@team-monolith/cds 1.129.2-alpha.2 → 1.129.3-alpha
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/CdsProvider.js +180 -180
- package/dist/components/AlertDialog/AlertDialogTitle.js +15 -15
- package/dist/components/Banner.js +28 -28
- package/dist/components/FileTypeAlertDialog.js +16 -16
- package/dist/components/Pagination.js +22 -22
- package/dist/emotion.d.ts +185 -0
- package/dist/i18n/i18n.js +14 -14
- package/dist/index.d.ts +8 -1
- package/dist/node_modules/.pnpm/html-parse-stringify@3.0.1/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +78 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/I18nextProvider.js +12 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/Trans.js +26 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/TransWithoutContext.js +174 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/context.js +20 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/defaults.js +24 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/i18nInstance.js +6 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/initReactI18next.js +11 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/unescape.js +25 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js +69 -0
- package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/utils.js +35 -0
- package/dist/patterns/LexicalEditor/Plugins.js +64 -64
- package/dist/patterns/LexicalEditor/components/FileSelectInput.js +19 -19
- package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +6 -6
- package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +34 -34
- package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +14 -14
- package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +17 -17
- package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +62 -62
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +25 -25
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormPlaceholder.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +24 -23
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +48 -47
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +11 -11
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +15 -15
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +28 -28
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +30 -30
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +35 -35
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +21 -21
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +15 -15
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +17 -17
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +30 -30
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +20 -20
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +24 -24
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +28 -28
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +11 -11
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +26 -26
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormAllowMultipleAnswers.js +8 -8
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +27 -27
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +33 -33
- package/dist/patterns/LexicalEditor/nodes/VideoNode/VideoComponent.js +21 -21
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +99 -99
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +50 -50
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +85 -85
- package/dist/patterns/LexicalEditor/plugins/DragDropPastePlugin/index.js +13 -13
- package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +48 -48
- package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/useImageNodeTransform.js +16 -16
- package/dist/patterns/ToggleButtonGroup/ToggleButton.js +17 -17
- package/package.json +15 -18
- package/@types/emotion.d.ts +0 -197
- package/node_modules/react-i18next/.eslintrc.json +0 -74
- package/node_modules/react-i18next/.husky/pre-commit +0 -1
- package/node_modules/react-i18next/.prettierignore +0 -4
- package/node_modules/react-i18next/CHANGELOG.md +0 -1433
- package/node_modules/react-i18next/LICENSE +0 -22
- package/node_modules/react-i18next/README.md +0 -181
- package/node_modules/react-i18next/TransWithoutContext.d.mts +0 -1
- package/node_modules/react-i18next/TransWithoutContext.d.ts +0 -129
- package/node_modules/react-i18next/dist/amd/react-i18next.js +0 -867
- package/node_modules/react-i18next/dist/amd/react-i18next.min.js +0 -1
- package/node_modules/react-i18next/dist/commonjs/I18nextProvider.js +0 -21
- package/node_modules/react-i18next/dist/commonjs/Trans.js +0 -54
- package/node_modules/react-i18next/dist/commonjs/TransWithoutContext.js +0 -330
- package/node_modules/react-i18next/dist/commonjs/Translation.js +0 -19
- package/node_modules/react-i18next/dist/commonjs/context.js +0 -81
- package/node_modules/react-i18next/dist/commonjs/defaults.js +0 -26
- package/node_modules/react-i18next/dist/commonjs/i18nInstance.js +0 -13
- package/node_modules/react-i18next/dist/commonjs/index.js +0 -128
- package/node_modules/react-i18next/dist/commonjs/initReactI18next.js +0 -15
- package/node_modules/react-i18next/dist/commonjs/unescape.js +0 -32
- package/node_modules/react-i18next/dist/commonjs/useSSR.js +0 -34
- package/node_modules/react-i18next/dist/commonjs/useTranslation.js +0 -114
- package/node_modules/react-i18next/dist/commonjs/utils.js +0 -76
- package/node_modules/react-i18next/dist/commonjs/withSSR.js +0 -27
- package/node_modules/react-i18next/dist/commonjs/withTranslation.js +0 -39
- package/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -15
- package/node_modules/react-i18next/dist/es/Trans.js +0 -43
- package/node_modules/react-i18next/dist/es/TransWithoutContext.js +0 -321
- package/node_modules/react-i18next/dist/es/Translation.js +0 -12
- package/node_modules/react-i18next/dist/es/context.js +0 -42
- package/node_modules/react-i18next/dist/es/defaults.js +0 -18
- package/node_modules/react-i18next/dist/es/i18nInstance.js +0 -5
- package/node_modules/react-i18next/dist/es/index.js +0 -18
- package/node_modules/react-i18next/dist/es/initReactI18next.js +0 -9
- package/node_modules/react-i18next/dist/es/package.json +0 -1
- package/node_modules/react-i18next/dist/es/unescape.js +0 -25
- package/node_modules/react-i18next/dist/es/useSSR.js +0 -27
- package/node_modules/react-i18next/dist/es/useTranslation.js +0 -107
- package/node_modules/react-i18next/dist/es/utils.js +0 -62
- package/node_modules/react-i18next/dist/es/withSSR.js +0 -20
- package/node_modules/react-i18next/dist/es/withTranslation.js +0 -32
- package/node_modules/react-i18next/dist/umd/react-i18next.js +0 -871
- package/node_modules/react-i18next/dist/umd/react-i18next.min.js +0 -1
- package/node_modules/react-i18next/helpers.d.ts +0 -3
- package/node_modules/react-i18next/icu.macro.d.mts +0 -1
- package/node_modules/react-i18next/icu.macro.d.ts +0 -103
- package/node_modules/react-i18next/icu.macro.js +0 -729
- package/node_modules/react-i18next/index.d.mts +0 -1
- package/node_modules/react-i18next/index.d.ts +0 -209
- package/node_modules/react-i18next/initReactI18next.d.mts +0 -1
- package/node_modules/react-i18next/initReactI18next.d.ts +0 -3
- package/node_modules/react-i18next/lint-staged.config.mjs +0 -4
- package/node_modules/react-i18next/package.json +0 -167
- package/node_modules/react-i18next/react-i18next.js +0 -871
- package/node_modules/react-i18next/react-i18next.min.js +0 -1
- package/node_modules/react-i18next/src/I18nextProvider.js +0 -7
- package/node_modules/react-i18next/src/Trans.js +0 -45
- package/node_modules/react-i18next/src/TransWithoutContext.js +0 -479
- package/node_modules/react-i18next/src/Translation.js +0 -14
- package/node_modules/react-i18next/src/context.js +0 -54
- package/node_modules/react-i18next/src/defaults.js +0 -20
- package/node_modules/react-i18next/src/i18nInstance.js +0 -7
- package/node_modules/react-i18next/src/index.js +0 -22
- package/node_modules/react-i18next/src/initReactI18next.js +0 -11
- package/node_modules/react-i18next/src/unescape.js +0 -31
- package/node_modules/react-i18next/src/useSSR.js +0 -33
- package/node_modules/react-i18next/src/useTranslation.js +0 -171
- package/node_modules/react-i18next/src/utils.js +0 -93
- package/node_modules/react-i18next/src/withSSR.js +0 -21
- package/node_modules/react-i18next/src/withTranslation.js +0 -35
- package/node_modules/react-i18next/vitest.workspace.typescript.mts +0 -52
|
@@ -3,33 +3,33 @@ import { stdin_default as t } from "../../../../../node_modules/.pnpm/remixicon@
|
|
|
3
3
|
import { stdin_default as n } from "../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/Media/image-edit-fill.js";
|
|
4
4
|
import { stdin_default as r } from "../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/System/delete-bin-line.js";
|
|
5
5
|
import { stdin_default as i } from "../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/System/error-warning-fill.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import u from "
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
6
|
+
import { useTranslation as a } from "../../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
|
+
import { Input as o } from "../../../../../components/Input.js";
|
|
8
|
+
import { Switch as s } from "../../../../../components/Switch.js";
|
|
9
|
+
import { InsertImageDialog as c } from "../../../components/InsertImageDialog/InsertImageDialog.js";
|
|
10
|
+
import { css as l } from "@emotion/react";
|
|
11
|
+
import { useState as u } from "react";
|
|
12
|
+
import d from "@emotion/styled";
|
|
13
|
+
import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
14
14
|
import { useController as m } from "react-hook-form";
|
|
15
15
|
//#region src/cds/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.tsx
|
|
16
|
-
function h(
|
|
17
|
-
let { index: h, control: y, rules: b, onDelete: x } =
|
|
16
|
+
function h(d) {
|
|
17
|
+
let { index: h, control: y, rules: b, onDelete: x } = d, [S, C] = u(!1), [w, T] = u(!1), { t: E } = a(), { field: { value: D, onChange: O }, fieldState: { invalid: k, error: A } } = m({
|
|
18
18
|
control: y,
|
|
19
19
|
name: `selections.${h}`,
|
|
20
20
|
rules: b
|
|
21
21
|
});
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
css:
|
|
22
|
+
return /* @__PURE__ */ p(g, { children: [
|
|
23
|
+
/* @__PURE__ */ f(_, { children: h + 1 }),
|
|
24
|
+
/* @__PURE__ */ p("div", {
|
|
25
|
+
css: l`
|
|
26
26
|
display: flex;
|
|
27
27
|
flex: 1;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
gap: 4px;
|
|
30
30
|
`,
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ f(c, {
|
|
33
33
|
title: D.show.image ? E("이미지 바꾸기", { context: "제목, 이미지 삽입 다이얼로그" }) : E("이미지 삽입하기", { context: "제목, 이미지 삽입 다이얼로그" }),
|
|
34
34
|
open: S,
|
|
35
35
|
imageProps: D.show.image ?? void 0,
|
|
@@ -51,10 +51,10 @@ function h(u) {
|
|
|
51
51
|
});
|
|
52
52
|
} : void 0
|
|
53
53
|
}),
|
|
54
|
-
D.show.image && /* @__PURE__ */
|
|
54
|
+
D.show.image && /* @__PURE__ */ f("img", {
|
|
55
55
|
src: D.show.image.src,
|
|
56
56
|
alt: D.show.image.altText,
|
|
57
|
-
css:
|
|
57
|
+
css: l`
|
|
58
58
|
height: auto;
|
|
59
59
|
// 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
|
|
60
60
|
max-width: min(400px, 100%);
|
|
@@ -63,7 +63,7 @@ function h(u) {
|
|
|
63
63
|
`,
|
|
64
64
|
draggable: "false"
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ f(o, {
|
|
67
67
|
size: "small",
|
|
68
68
|
color: k ? "activeDanger" : w ? "activePrimary" : "default",
|
|
69
69
|
value: D.show.text,
|
|
@@ -86,34 +86,34 @@ function h(u) {
|
|
|
86
86
|
index: h + 1,
|
|
87
87
|
context: "렉시컬 선택지 도구"
|
|
88
88
|
}),
|
|
89
|
-
hintIcon: k ? /* @__PURE__ */
|
|
89
|
+
hintIcon: k ? /* @__PURE__ */ f(i, {}) : void 0,
|
|
90
90
|
hintText: A?.message,
|
|
91
91
|
multiline: !0,
|
|
92
92
|
fullWidth: !0,
|
|
93
|
-
css:
|
|
93
|
+
css: l`
|
|
94
94
|
flex: 1;
|
|
95
95
|
`
|
|
96
96
|
})
|
|
97
97
|
]
|
|
98
98
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
css:
|
|
99
|
+
/* @__PURE__ */ p("div", {
|
|
100
|
+
css: l`
|
|
101
101
|
display: flex;
|
|
102
102
|
height: 36px;
|
|
103
103
|
gap: 8px;
|
|
104
104
|
align-items: center;
|
|
105
105
|
`,
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ f(e, {
|
|
108
108
|
color: "icon",
|
|
109
109
|
size: "xsmall",
|
|
110
|
-
icon: D.show.image ? /* @__PURE__ */
|
|
110
|
+
icon: D.show.image ? /* @__PURE__ */ f(n, {}) : /* @__PURE__ */ f(t, {}),
|
|
111
111
|
onClick: () => {
|
|
112
112
|
C(!0);
|
|
113
113
|
},
|
|
114
114
|
"aria-label": D.show.image ? E("이미지 바꾸기", { context: "스퀘어버튼, 렉시컬 도구 설정창" }) : E("이미지 삽입하기", { context: "스퀘어버튼, 렉시컬 도구 설정창" })
|
|
115
115
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ p(v, { children: [E("정답", { context: "정오답 여부 선택 스위치 라벨, 렉시컬 도구 설정창" }), /* @__PURE__ */ f(s, {
|
|
117
117
|
checked: !!D.isAnswer,
|
|
118
118
|
size: "small",
|
|
119
119
|
onChange: () => {
|
|
@@ -123,10 +123,10 @@ function h(u) {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
})] }),
|
|
126
|
-
x && /* @__PURE__ */
|
|
126
|
+
x && /* @__PURE__ */ f(e, {
|
|
127
127
|
color: "white",
|
|
128
128
|
size: "xsmall",
|
|
129
|
-
icon: /* @__PURE__ */
|
|
129
|
+
icon: /* @__PURE__ */ f(r, {}),
|
|
130
130
|
onClick: x,
|
|
131
131
|
"aria-label": E("삭제", { context: "스퀘어버튼, 렉시컬 객관식 설정창" })
|
|
132
132
|
})
|
|
@@ -134,13 +134,13 @@ function h(u) {
|
|
|
134
134
|
})
|
|
135
135
|
] });
|
|
136
136
|
}
|
|
137
|
-
var g =
|
|
137
|
+
var g = d.div(({ theme: e }) => l`
|
|
138
138
|
display: flex;
|
|
139
139
|
padding: 4px 12px;
|
|
140
140
|
gap: 8px;
|
|
141
141
|
border-radius: 8px;
|
|
142
142
|
background: ${e.color.background.neutralAlt};
|
|
143
|
-
`), _ =
|
|
143
|
+
`), _ = d.div(({ theme: e }) => l`
|
|
144
144
|
display: flex;
|
|
145
145
|
box-sizing: border-box;
|
|
146
146
|
width: 20px;
|
|
@@ -157,7 +157,7 @@ var g = u.div(({ theme: e }) => c`
|
|
|
157
157
|
font-size: 14px;
|
|
158
158
|
font-weight: 800;
|
|
159
159
|
line-height: 16px;
|
|
160
|
-
`), v =
|
|
160
|
+
`), v = d.label(({ theme: e }) => l`
|
|
161
161
|
display: flex;
|
|
162
162
|
align-items: center;
|
|
163
163
|
padding-right: 4px;
|
|
@@ -2,25 +2,25 @@ import { shadows as e } from "../../../../../foundation/shadows.js";
|
|
|
2
2
|
import { stdin_default as t } from "../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/Editor/list-radio.js";
|
|
3
3
|
import { stdin_default as n } from "../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/System/add-fill.js";
|
|
4
4
|
import { stdin_default as r } from "../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/System/alarm-warning-fill.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import d from "
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
5
|
+
import { useTranslation as i } from "../../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
|
|
6
|
+
import { Button as a } from "../../../../../components/Button.js";
|
|
7
|
+
import { Tooltip as o } from "../../../../../components/Tooltip.js";
|
|
8
|
+
import { getTexts as s } from "../../../../../texts.js";
|
|
9
|
+
import { FormSelection as c } from "./FormSelection.js";
|
|
10
|
+
import { $isProblemSelectNode as l } from "../ProblemSelectNode.js";
|
|
11
|
+
import { css as u } from "@emotion/react";
|
|
12
|
+
import { useState as d } from "react";
|
|
13
|
+
import f from "@emotion/styled";
|
|
14
|
+
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
15
|
+
import { uid as h } from "uid";
|
|
16
16
|
import { $getNodeByKey as g } from "lexical";
|
|
17
17
|
import { useLexicalComposerContext as _ } from "@lexical/react/LexicalComposerContext";
|
|
18
18
|
import { useFieldArray as v, useForm as y } from "react-hook-form";
|
|
19
19
|
//#region src/cds/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.tsx
|
|
20
20
|
function b(e) {
|
|
21
|
-
let { selections:
|
|
21
|
+
let { selections: f, nodeKey: b, onClose: O } = e, [k] = _(), [A, j] = d(!1), { t: M } = i(), { control: N, handleSubmit: P, watch: F } = y({
|
|
22
22
|
mode: "all",
|
|
23
|
-
defaultValues: { selections:
|
|
23
|
+
defaultValues: { selections: f }
|
|
24
24
|
}), { fields: I, append: L, remove: R } = v({
|
|
25
25
|
control: N,
|
|
26
26
|
name: "selections",
|
|
@@ -28,26 +28,26 @@ function b(e) {
|
|
|
28
28
|
}), z = (e) => {
|
|
29
29
|
k.update(() => {
|
|
30
30
|
let t = g(b);
|
|
31
|
-
|
|
31
|
+
l(t) && t.setSelections(e.selections);
|
|
32
32
|
}), O();
|
|
33
33
|
};
|
|
34
34
|
function B(e) {
|
|
35
|
-
return e.show.image || e.show.text ? !0 :
|
|
35
|
+
return e.show.image || e.show.text ? !0 : s(M, "errorRequiredField");
|
|
36
36
|
}
|
|
37
37
|
function V(e, t) {
|
|
38
38
|
let n = t.selections.map((e) => e.show).flatMap((t, n) => t.text === e.show.text && t.image?.src === e.show.image?.src ? [n] : []);
|
|
39
|
-
return n.length < 2 ? !0 :
|
|
39
|
+
return n.length < 2 ? !0 : s(M, "errorDuplicateChoice")(n.map((e) => e + 1).join(","));
|
|
40
40
|
}
|
|
41
41
|
let H = F("selections").filter((e) => e.isAnswer).length, U = H > 1, W = H > 0;
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ m(x, {
|
|
43
43
|
onSubmit: P(z),
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(t, { css: u`
|
|
46
46
|
width: 12px;
|
|
47
47
|
height: 12px;
|
|
48
48
|
` }), M("객관식 입력 칸", { context: "렉시컬 도구 설정창" })] }),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ m(C, { children: [
|
|
50
|
+
/* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, { children: M("답안") }), I.map((e, t) => /* @__PURE__ */ p(c, {
|
|
51
51
|
index: t,
|
|
52
52
|
control: N,
|
|
53
53
|
rules: { validate: {
|
|
@@ -58,11 +58,11 @@ function b(e) {
|
|
|
58
58
|
R(t);
|
|
59
59
|
}
|
|
60
60
|
}, e.uid))] }),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ p(a, {
|
|
62
62
|
color: "grey",
|
|
63
63
|
size: "small",
|
|
64
|
-
startIcon: /* @__PURE__ */
|
|
65
|
-
label: I.length < 9 ? M("선택지 추가", { context: "버튼, 렉시컬 도구 설정창" }) :
|
|
64
|
+
startIcon: /* @__PURE__ */ p(n, {}),
|
|
65
|
+
label: I.length < 9 ? M("선택지 추가", { context: "버튼, 렉시컬 도구 설정창" }) : s(M, "errorMaxChoicesExceeded"),
|
|
66
66
|
onClick: () => {
|
|
67
67
|
I.length >= 9 || L({
|
|
68
68
|
isAnswer: !1,
|
|
@@ -70,28 +70,28 @@ function b(e) {
|
|
|
70
70
|
image: null,
|
|
71
71
|
text: ""
|
|
72
72
|
},
|
|
73
|
-
value:
|
|
73
|
+
value: h()
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
76
|
disabled: I.length >= 9
|
|
77
77
|
}),
|
|
78
|
-
U && /* @__PURE__ */
|
|
78
|
+
U && /* @__PURE__ */ m(D, { children: [/* @__PURE__ */ p(r, { css: u`
|
|
79
79
|
width: 14px;
|
|
80
80
|
height: 14px;
|
|
81
81
|
` }), M("정답이 여러 개인 문제에는 정답을 모두 선택해야 한다는 안내가 제공됩니다.")] })
|
|
82
82
|
] }),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ m(E, { children: [/* @__PURE__ */ p(a, {
|
|
84
84
|
color: "grey",
|
|
85
85
|
size: "xsmall",
|
|
86
86
|
label: M("닫기", { context: "렉시컬 도구 설정창" }),
|
|
87
87
|
onClick: O
|
|
88
|
-
}), /* @__PURE__ */
|
|
88
|
+
}), /* @__PURE__ */ p(o, {
|
|
89
89
|
open: !W && A,
|
|
90
90
|
text: M("선택지 중 정답을 표시해주세요."),
|
|
91
91
|
onOpen: () => j(!0),
|
|
92
92
|
onClose: () => j(!1),
|
|
93
93
|
placement: "top-end",
|
|
94
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ p("span", { children: /* @__PURE__ */ p(a, {
|
|
95
95
|
color: "primary",
|
|
96
96
|
size: "xsmall",
|
|
97
97
|
label: M("이대로 넣기", { context: "렉시컬 도구 설정창" }),
|
|
@@ -102,7 +102,7 @@ function b(e) {
|
|
|
102
102
|
]
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
var x =
|
|
105
|
+
var x = f.form(({ theme: t }) => u`
|
|
106
106
|
display: flex;
|
|
107
107
|
width: 620px;
|
|
108
108
|
flex-direction: column;
|
|
@@ -110,7 +110,7 @@ var x = d.form(({ theme: t }) => l`
|
|
|
110
110
|
border: 1px solid ${t.color.background.neutralAltActive};
|
|
111
111
|
background: ${t.color.background.neutralBase};
|
|
112
112
|
box-shadow: ${e.shadow08};
|
|
113
|
-
`), S =
|
|
113
|
+
`), S = f.div(({ theme: e }) => u`
|
|
114
114
|
display: flex;
|
|
115
115
|
padding: 8px 12px;
|
|
116
116
|
gap: 4px;
|
|
@@ -122,18 +122,18 @@ var x = d.form(({ theme: t }) => l`
|
|
|
122
122
|
font-style: normal;
|
|
123
123
|
font-weight: 500;
|
|
124
124
|
line-height: 16px; /* 133.333% */
|
|
125
|
-
`), C =
|
|
125
|
+
`), C = f.div(({ theme: e }) => u`
|
|
126
126
|
display: flex;
|
|
127
127
|
flex-direction: column;
|
|
128
128
|
gap: 12px;
|
|
129
129
|
padding: 12px;
|
|
130
130
|
border-top: 1px solid ${e.color.background.neutralAltActive};
|
|
131
131
|
border-bottom: 1px solid ${e.color.background.neutralAltActive};
|
|
132
|
-
`), w =
|
|
132
|
+
`), w = f.div`
|
|
133
133
|
display: flex;
|
|
134
134
|
flex-direction: column;
|
|
135
135
|
gap: 8px;
|
|
136
|
-
`, T =
|
|
136
|
+
`, T = f.div(({ theme: e }) => u`
|
|
137
137
|
color: ${e.color.foreground.neutralBaseDisabled};
|
|
138
138
|
/* Default/Label/12px-Md */
|
|
139
139
|
font-family: ${e.fontFamily.ui};
|
|
@@ -141,13 +141,13 @@ var x = d.form(({ theme: t }) => l`
|
|
|
141
141
|
font-style: normal;
|
|
142
142
|
font-weight: 500;
|
|
143
143
|
line-height: 16px; /* 133.333% */
|
|
144
|
-
`), E =
|
|
144
|
+
`), E = f.div`
|
|
145
145
|
display: flex;
|
|
146
146
|
padding: 12px;
|
|
147
147
|
justify-content: flex-end;
|
|
148
148
|
align-items: center;
|
|
149
149
|
gap: 8px;
|
|
150
|
-
`, D =
|
|
150
|
+
`, D = f.div(({ theme: e }) => u`
|
|
151
151
|
display: flex;
|
|
152
152
|
gap: 4px;
|
|
153
153
|
color: ${e.color.foreground.neutralBaseDisabled};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { stdin_default as e } from "../../../../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/Arrows/arrow-down-s-fill.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import c from "@emotion/
|
|
8
|
-
import
|
|
2
|
+
import { useTranslation as t } from "../../../../../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
|
|
3
|
+
import { Dropdown as n } from "../../../../../../../Dropdown/Dropdown.js";
|
|
4
|
+
import { DropdownItem as r } from "../../../../../../../Dropdown/DropdownItem/DropdownItem.js";
|
|
5
|
+
import { ICON_TYPES as i, getIconData as a } from "../../../../iconData.js";
|
|
6
|
+
import { FormLabel as o } from "./FormLabel.js";
|
|
7
|
+
import { css as s, useTheme as c } from "@emotion/react";
|
|
8
|
+
import l from "@emotion/styled";
|
|
9
9
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
10
|
import { Controller as p } from "react-hook-form";
|
|
11
11
|
//#region src/cds/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.tsx
|
|
12
|
-
function m(
|
|
13
|
-
let { control: m, labelsLength: _ } =
|
|
12
|
+
function m(l) {
|
|
13
|
+
let { control: m, labelsLength: _ } = l, v = c(), { t: y } = t();
|
|
14
14
|
return /* @__PURE__ */ d(p, {
|
|
15
15
|
control: m,
|
|
16
16
|
name: "iconType",
|
|
17
|
-
render: ({ field: { value:
|
|
18
|
-
let { startIcon: l, title: p, icons: b } =
|
|
19
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(
|
|
17
|
+
render: ({ field: { value: t, onChange: c } }) => {
|
|
18
|
+
let { startIcon: l, title: p, icons: b } = a(t, v, y);
|
|
19
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(n, {
|
|
20
20
|
label: y("아이콘: {{title}}", { title: p }),
|
|
21
21
|
size: "small",
|
|
22
22
|
color: "grey",
|
|
@@ -24,7 +24,7 @@ function m(c) {
|
|
|
24
24
|
startIcon: l,
|
|
25
25
|
endIcon: /* @__PURE__ */ d(e, {}),
|
|
26
26
|
menuProps: {
|
|
27
|
-
menuCss:
|
|
27
|
+
menuCss: s`
|
|
28
28
|
width: 216px;
|
|
29
29
|
`,
|
|
30
30
|
anchorOrigin: {
|
|
@@ -36,31 +36,31 @@ function m(c) {
|
|
|
36
36
|
horizontal: "center"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
children:
|
|
40
|
-
let { title:
|
|
41
|
-
return /* @__PURE__ */ d(
|
|
39
|
+
children: i.map((e, t) => {
|
|
40
|
+
let { title: n, startIcon: i } = a(e, v, y);
|
|
41
|
+
return /* @__PURE__ */ d(r, {
|
|
42
42
|
index: t,
|
|
43
|
-
label:
|
|
43
|
+
label: n,
|
|
44
44
|
preserveIconColor: !0,
|
|
45
|
-
startIcon:
|
|
45
|
+
startIcon: i,
|
|
46
46
|
onClick: () => {
|
|
47
47
|
c(e);
|
|
48
48
|
}
|
|
49
49
|
}, t);
|
|
50
50
|
})
|
|
51
|
-
}), Array.from({ length: _ }).map((e, t) => /* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(g, { children: b[t].onIcon }), /* @__PURE__ */ d(
|
|
51
|
+
}), Array.from({ length: _ }).map((e, t) => /* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(g, { children: b[t].onIcon }), /* @__PURE__ */ d(o, {
|
|
52
52
|
control: m,
|
|
53
53
|
index: t
|
|
54
54
|
})] }, t))] });
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
var h =
|
|
58
|
+
var h = l.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: flex-start;
|
|
61
61
|
gap: 4px;
|
|
62
62
|
align-self: stretch;
|
|
63
|
-
`, g =
|
|
63
|
+
`, g = l.div(({ theme: e }) => s`
|
|
64
64
|
display: flex;
|
|
65
65
|
min-width: 36px;
|
|
66
66
|
min-height: 36px;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import r from "@emotion/
|
|
5
|
-
import
|
|
1
|
+
import { useTranslation as e } from "../../../../../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
|
+
import { getTexts as t } from "../../../../../../../../texts.js";
|
|
3
|
+
import { FormInput as n } from "../../../../../Form/FormInput.js";
|
|
4
|
+
import { css as r } from "@emotion/react";
|
|
5
|
+
import i from "@emotion/styled";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
7
7
|
import { useController as o } from "react-hook-form";
|
|
8
8
|
//#region src/cds/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.tsx
|
|
9
|
-
var s = (
|
|
10
|
-
required: e
|
|
9
|
+
var s = (e) => ({
|
|
10
|
+
required: t(e, "errorRequiredField"),
|
|
11
11
|
maxLength: 12
|
|
12
12
|
});
|
|
13
|
-
function c(
|
|
14
|
-
let { control:
|
|
15
|
-
control:
|
|
16
|
-
name: `labels.${
|
|
13
|
+
function c(t) {
|
|
14
|
+
let { control: r, index: i } = t, { t: c } = e(), u = s(c), { field: { value: d }, fieldState: { error: f } } = o({
|
|
15
|
+
control: r,
|
|
16
|
+
name: `labels.${i}`,
|
|
17
17
|
rules: u
|
|
18
18
|
});
|
|
19
|
-
return /* @__PURE__ */ a(
|
|
20
|
-
control:
|
|
21
|
-
name: `labels.${
|
|
19
|
+
return /* @__PURE__ */ a(n, {
|
|
20
|
+
control: r,
|
|
21
|
+
name: `labels.${i}`,
|
|
22
22
|
rules: u,
|
|
23
23
|
size: "small",
|
|
24
24
|
endIcon: /* @__PURE__ */ a(l, {
|
|
@@ -28,7 +28,7 @@ function c(e) {
|
|
|
28
28
|
fullWidth: !0
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
var l =
|
|
31
|
+
var l = i.span(({ theme: e, error: t }) => r`
|
|
32
32
|
color: ${t ? e.color.foreground.dangerActive : e.color.foreground.neutralBase};
|
|
33
33
|
font-family: ${e.fontFamily.ui};
|
|
34
34
|
font-size: 14px;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { SquareButton as e } from "../../../../../../../components/SquareButton.js";
|
|
2
2
|
import { stdin_default as t } from "../../../../../../../node_modules/.pnpm/remixicon@4.3.0/node_modules/remixicon/icons/System/delete-bin-line.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import a from "@emotion/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
3
|
+
import { useTranslation as n } from "../../../../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
|
|
4
|
+
import { getTexts as r } from "../../../../../../../texts.js";
|
|
5
|
+
import { FormInput as i } from "../../../../Form/FormInput.js";
|
|
6
|
+
import { css as a } from "@emotion/react";
|
|
7
|
+
import o from "@emotion/styled";
|
|
8
|
+
import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
9
9
|
//#region src/cds/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.tsx
|
|
10
|
-
function l(
|
|
11
|
-
let { control:
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
control:
|
|
10
|
+
function l(a) {
|
|
11
|
+
let { control: o, index: l, onDelete: f } = a, { t: p } = n();
|
|
12
|
+
return /* @__PURE__ */ c(u, { children: [
|
|
13
|
+
/* @__PURE__ */ s(d, { children: l + 1 }),
|
|
14
|
+
/* @__PURE__ */ s(i, {
|
|
15
|
+
control: o,
|
|
16
16
|
name: `evaluations.${l}.question.text`,
|
|
17
|
-
rules: { required:
|
|
17
|
+
rules: { required: r(p, "errorRequiredField") },
|
|
18
18
|
size: "small",
|
|
19
19
|
placeholder: p("{{index}}번 평가 항목", { index: l + 1 }),
|
|
20
20
|
multiline: !0,
|
|
21
21
|
fullWidth: !0
|
|
22
22
|
}),
|
|
23
|
-
f && /* @__PURE__ */
|
|
23
|
+
f && /* @__PURE__ */ s(e, {
|
|
24
24
|
color: "white",
|
|
25
25
|
size: "xsmall",
|
|
26
|
-
icon: /* @__PURE__ */
|
|
26
|
+
icon: /* @__PURE__ */ s(t, {}),
|
|
27
27
|
onClick: f,
|
|
28
28
|
"aria-label": p("삭제", { context: "스퀘어버튼, 렉시컬 3단계 평가 입력칸 도구 설정창" })
|
|
29
29
|
})
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
|
-
var u =
|
|
32
|
+
var u = o.div(({ theme: e }) => a`
|
|
33
33
|
display: flex;
|
|
34
34
|
padding: 4px 12px;
|
|
35
35
|
align-items: center;
|
|
@@ -37,7 +37,7 @@ var u = a.div(({ theme: e }) => i`
|
|
|
37
37
|
align-self: stretch;
|
|
38
38
|
border-radius: 8px;
|
|
39
39
|
background: ${e.color.background.neutralAlt};
|
|
40
|
-
`), d =
|
|
40
|
+
`), d = o.div(({ theme: e }) => a`
|
|
41
41
|
display: flex;
|
|
42
42
|
width: 20px;
|
|
43
43
|
height: 20px;
|