@tipp/ui 2.3.10 → 2.3.12
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/app/index.cjs +46 -42
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +88 -88
- package/dist/app/platform/coach-question-list.js +31 -31
- package/dist/app/platform/contents-card.js +31 -31
- package/dist/app/platform/curriculum-card.js +5 -5
- package/dist/app/platform/edit-coaching-time.cjs +19 -15
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +70 -70
- package/dist/app/platform/edit-service-type.cjs +14 -10
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +71 -71
- package/dist/app/platform/goal-manage-card-edit.cjs +16 -12
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +70 -70
- package/dist/app/platform/goal-manage-card-read.js +31 -31
- package/dist/app/platform/on-offline-radio-card.cjs +111 -107
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +70 -70
- package/dist/app/platform/report-card.js +31 -31
- package/dist/app/platform/reservation-card.cjs +21 -17
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +71 -71
- package/dist/app/platform/session-card.cjs +25 -21
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +73 -73
- package/dist/app/platform/session-review-simple-read.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +36 -36
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +31 -31
- package/dist/app/platform/userInfos/session-user-info-detail.js +31 -31
- package/dist/app/platform/userInfos/utils.js +30 -30
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +62 -62
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2QFLNAGL.js +100 -0
- package/dist/chunk-2QFLNAGL.js.map +1 -0
- package/dist/chunk-3FKAH2RB.js +105 -0
- package/dist/chunk-3FKAH2RB.js.map +1 -0
- package/dist/chunk-3OCAVV5Z.js +151 -0
- package/dist/chunk-3OCAVV5Z.js.map +1 -0
- package/dist/chunk-3PE6OFB3.js +70 -0
- package/dist/chunk-3PE6OFB3.js.map +1 -0
- package/dist/chunk-3QNIJCKK.js +98 -0
- package/dist/chunk-3QNIJCKK.js.map +1 -0
- package/dist/chunk-4OFVNWKB.js +100 -0
- package/dist/chunk-4OFVNWKB.js.map +1 -0
- package/dist/chunk-4SSWZQPC.js +89 -0
- package/dist/chunk-4SSWZQPC.js.map +1 -0
- package/dist/chunk-5JUYOJVM.js +77 -0
- package/dist/chunk-5JUYOJVM.js.map +1 -0
- package/dist/chunk-5SECMWKA.js +196 -0
- package/dist/chunk-5SECMWKA.js.map +1 -0
- package/dist/chunk-65FJZWXV.js +49 -0
- package/dist/chunk-65FJZWXV.js.map +1 -0
- package/dist/chunk-7UUHYDMJ.js +43 -0
- package/dist/chunk-7UUHYDMJ.js.map +1 -0
- package/dist/chunk-B5W5HY62.js +196 -0
- package/dist/chunk-B5W5HY62.js.map +1 -0
- package/dist/chunk-B63TOIOA.js +29 -0
- package/dist/chunk-B63TOIOA.js.map +1 -0
- package/dist/chunk-DTUYT5S2.js +98 -0
- package/dist/chunk-DTUYT5S2.js.map +1 -0
- package/dist/chunk-EI232M7E.js +196 -0
- package/dist/chunk-EI232M7E.js.map +1 -0
- package/dist/chunk-FDJPEXOU.js +222 -0
- package/dist/chunk-FDJPEXOU.js.map +1 -0
- package/dist/chunk-FGBFER5X.js +196 -0
- package/dist/chunk-FGBFER5X.js.map +1 -0
- package/dist/chunk-FNRYQLCC.js +64 -0
- package/dist/chunk-FNRYQLCC.js.map +1 -0
- package/dist/chunk-G7EN5QQR.js +64 -0
- package/dist/chunk-G7EN5QQR.js.map +1 -0
- package/dist/chunk-GDCDEPJO.js +64 -0
- package/dist/chunk-GDCDEPJO.js.map +1 -0
- package/dist/chunk-HHZ4HLP6.js +221 -0
- package/dist/chunk-HHZ4HLP6.js.map +1 -0
- package/dist/chunk-I4OEBZDH.js +64 -0
- package/dist/chunk-I4OEBZDH.js.map +1 -0
- package/dist/chunk-I5NKMQOT.js +64 -0
- package/dist/chunk-I5NKMQOT.js.map +1 -0
- package/dist/chunk-J5IKAPJM.js +69 -0
- package/dist/chunk-J5IKAPJM.js.map +1 -0
- package/dist/chunk-JJQM3MW3.js +98 -0
- package/dist/chunk-JJQM3MW3.js.map +1 -0
- package/dist/chunk-JKJUBJ65.js +70 -0
- package/dist/chunk-JKJUBJ65.js.map +1 -0
- package/dist/chunk-KLIEFXWN.js +100 -0
- package/dist/chunk-KLIEFXWN.js.map +1 -0
- package/dist/chunk-NDC72OWR.js +37 -0
- package/dist/chunk-NDC72OWR.js.map +1 -0
- package/dist/chunk-NMGLSEZ3.js +152 -0
- package/dist/chunk-NMGLSEZ3.js.map +1 -0
- package/dist/chunk-NMKIFFKE.js +63 -0
- package/dist/chunk-NMKIFFKE.js.map +1 -0
- package/dist/chunk-NMRNR5OA.js +221 -0
- package/dist/chunk-NMRNR5OA.js.map +1 -0
- package/dist/chunk-OX4OPOPI.js +82 -0
- package/dist/chunk-OX4OPOPI.js.map +1 -0
- package/dist/chunk-POFUBAXM.js +77 -0
- package/dist/chunk-POFUBAXM.js.map +1 -0
- package/dist/chunk-QBBF5V24.js +70 -0
- package/dist/chunk-QBBF5V24.js.map +1 -0
- package/dist/chunk-QMPSKZJ2.js +221 -0
- package/dist/chunk-QMPSKZJ2.js.map +1 -0
- package/dist/chunk-QPTWBPAQ.js +87 -0
- package/dist/chunk-QPTWBPAQ.js.map +1 -0
- package/dist/chunk-R7NTFLYB.js +98 -0
- package/dist/chunk-R7NTFLYB.js.map +1 -0
- package/dist/chunk-RAK5LEBO.js +70 -0
- package/dist/chunk-RAK5LEBO.js.map +1 -0
- package/dist/chunk-RWXNQPE7.js +151 -0
- package/dist/chunk-RWXNQPE7.js.map +1 -0
- package/dist/chunk-SGJFPJMV.js +100 -0
- package/dist/chunk-SGJFPJMV.js.map +1 -0
- package/dist/chunk-SYUWHIFX.js +98 -0
- package/dist/chunk-SYUWHIFX.js.map +1 -0
- package/dist/chunk-TDBCQSTJ.js +61 -0
- package/dist/chunk-TDBCQSTJ.js.map +1 -0
- package/dist/chunk-TGCLWLPY.js +51 -0
- package/dist/chunk-TGCLWLPY.js.map +1 -0
- package/dist/chunk-UFWZAT6E.js +89 -0
- package/dist/chunk-UFWZAT6E.js.map +1 -0
- package/dist/chunk-VN7IU4XW.js +64 -0
- package/dist/chunk-VN7IU4XW.js.map +1 -0
- package/dist/chunk-W3NTNHA4.js +196 -0
- package/dist/chunk-W3NTNHA4.js.map +1 -0
- package/dist/chunk-WGQGVPGZ.js +222 -0
- package/dist/chunk-WGQGVPGZ.js.map +1 -0
- package/dist/chunk-XDPRIBTV.js +101 -0
- package/dist/chunk-XDPRIBTV.js.map +1 -0
- package/dist/chunk-XU7H43IG.js +196 -0
- package/dist/chunk-XU7H43IG.js.map +1 -0
- package/dist/chunk-YEGT662X.js +221 -0
- package/dist/chunk-YEGT662X.js.map +1 -0
- package/dist/chunk-ZBZ7IGBT.js +222 -0
- package/dist/chunk-ZBZ7IGBT.js.map +1 -0
- package/dist/chunk-ZFWZAZPG.js +153 -0
- package/dist/chunk-ZFWZAZPG.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.cjs +148 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +17 -11
- package/dist/index.js +137 -137
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +18 -18
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +11 -11
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +24 -24
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +28 -28
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs +54 -17
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-context.cjs +29 -21
- package/dist/molecules/curriculumV2/curriculum-context.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-context.d.cts +7 -1
- package/dist/molecules/curriculumV2/curriculum-context.d.ts +7 -1
- package/dist/molecules/curriculumV2/curriculum-context.js +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.cjs +85 -38
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +35 -35
- package/dist/molecules/date-picker/date-picker-button.js +6 -6
- package/dist/molecules/date-picker/index.js +5 -5
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.js +5 -5
- package/dist/molecules/dynamic-form.js +6 -6
- package/dist/molecules/expand-table/index.cjs +4 -3
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +5 -5
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +253 -205
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +65 -65
- package/dist/molecules/learning-post.js +6 -6
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.js +4 -4
- package/dist/molecules/tag-selector.js +5 -5
- package/package.json +3 -3
- package/src/molecules/curriculumV2/CurriculumSidebar/index.tsx +47 -13
- package/src/molecules/curriculumV2/curriculum-context.tsx +62 -39
- package/src/molecules/expand-table/index.tsx +13 -12
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumReviewContext
|
|
3
|
+
} from "./chunk-GMKRNFH5.js";
|
|
4
|
+
import {
|
|
5
|
+
getCurriculumIcon,
|
|
6
|
+
getCurriculumQuestionIconColor,
|
|
7
|
+
getCurriculumQuestionTypeDescription
|
|
8
|
+
} from "./chunk-3FKAH2RB.js";
|
|
9
|
+
import {
|
|
10
|
+
Separator
|
|
11
|
+
} from "./chunk-HYITAA4J.js";
|
|
12
|
+
import {
|
|
13
|
+
Grid
|
|
14
|
+
} from "./chunk-EGEQY3KT.js";
|
|
15
|
+
import {
|
|
16
|
+
Heading
|
|
17
|
+
} from "./chunk-BESTU2AY.js";
|
|
18
|
+
import {
|
|
19
|
+
Box
|
|
20
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
21
|
+
import {
|
|
22
|
+
Typo
|
|
23
|
+
} from "./chunk-PMJIFLDT.js";
|
|
24
|
+
import {
|
|
25
|
+
Flex
|
|
26
|
+
} from "./chunk-25HMMI7R.js";
|
|
27
|
+
import {
|
|
28
|
+
Button
|
|
29
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
30
|
+
import {
|
|
31
|
+
Badge
|
|
32
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
33
|
+
|
|
34
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
var renderPreviewContent = (args) => {
|
|
37
|
+
const { question } = args;
|
|
38
|
+
const Icon = getCurriculumIcon({
|
|
39
|
+
type: question.type,
|
|
40
|
+
icon: question.icon
|
|
41
|
+
});
|
|
42
|
+
const getDescription = () => {
|
|
43
|
+
return [
|
|
44
|
+
getCurriculumQuestionTypeDescription(question.type),
|
|
45
|
+
question.duration ? `${question.duration}\uBD84` : ""
|
|
46
|
+
].filter(Boolean).join(" | ");
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Grid,
|
|
50
|
+
{
|
|
51
|
+
columns: "16px 1fr",
|
|
52
|
+
gap: "2",
|
|
53
|
+
px: "4",
|
|
54
|
+
py: "2",
|
|
55
|
+
width: "100%",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Box, { mt: "1", children: /* @__PURE__ */ jsx(Icon, { color: getCurriculumQuestionIconColor(question.type) }) }),
|
|
58
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", weight: "bold", children: question.title }),
|
|
60
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", children: getDescription() })
|
|
61
|
+
] })
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
question.uuid
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
var getReviewContentValue = (question, answer) => {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
if (question.type === "question_satisfaction_option") {
|
|
70
|
+
return (_c = (_b = (_a = question.options) == null ? void 0 : _a.find((option) => option.value === Number(answer))) == null ? void 0 : _b.label) != null ? _c : "";
|
|
71
|
+
}
|
|
72
|
+
return answer;
|
|
73
|
+
};
|
|
74
|
+
var renderReviewContent = (args) => {
|
|
75
|
+
const { question, answer } = args;
|
|
76
|
+
const Icon = getCurriculumIcon({
|
|
77
|
+
type: question.type,
|
|
78
|
+
icon: question.icon
|
|
79
|
+
});
|
|
80
|
+
const color = getCurriculumQuestionIconColor(question.type);
|
|
81
|
+
const badgeColor = ["question_radio", "question_satisfaction_option"].includes(question.type) ? "accent" : "neutral";
|
|
82
|
+
const value = getReviewContentValue(question, answer);
|
|
83
|
+
return /* @__PURE__ */ jsxs(
|
|
84
|
+
Grid,
|
|
85
|
+
{
|
|
86
|
+
columns: "16px 1fr",
|
|
87
|
+
gap: "2",
|
|
88
|
+
px: "4",
|
|
89
|
+
py: "2",
|
|
90
|
+
width: "100%",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Icon, { color }) }),
|
|
93
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", mb: "2", weight: "bold", children: question.title }),
|
|
95
|
+
/* @__PURE__ */ jsx(Badge, { color: badgeColor, size: "large", style: { whiteSpace: "break-spaces", lineBreak: "anywhere" }, children: value || "(\uBBF8 \uC751\uB2F5)" })
|
|
96
|
+
] })
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
question.uuid
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
function StartReview({ onStart }) {
|
|
103
|
+
const { curriculum, reviewContents, sectionTitle, done, formik } = useCurriculumReviewContext();
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
Flex,
|
|
106
|
+
{
|
|
107
|
+
align: "center",
|
|
108
|
+
direction: "column",
|
|
109
|
+
height: "100%",
|
|
110
|
+
justify: "center",
|
|
111
|
+
width: "100%",
|
|
112
|
+
children: /* @__PURE__ */ jsxs(
|
|
113
|
+
Flex,
|
|
114
|
+
{
|
|
115
|
+
align: "center",
|
|
116
|
+
direction: "column",
|
|
117
|
+
height: "100%",
|
|
118
|
+
justify: "center",
|
|
119
|
+
maxWidth: "650px",
|
|
120
|
+
pb: { initial: "6", sm: "0" },
|
|
121
|
+
pt: { initial: "4", sm: "0" },
|
|
122
|
+
px: { initial: "4", sm: "0" },
|
|
123
|
+
width: "100%",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", mb: "1", children: curriculum.title }),
|
|
126
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading3", children: reviewContents.title }),
|
|
127
|
+
/* @__PURE__ */ jsx(Separator, { my: "4", style: { width: 100 } }),
|
|
128
|
+
/* @__PURE__ */ jsxs(Typo, { align: "left", as: "p", color: "gray", mb: "4", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Typo, { as: "span", weight: "bold", children: sectionTitle }),
|
|
130
|
+
" ",
|
|
131
|
+
/* @__PURE__ */ jsx(Typo, { children: reviewContents.description })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsx(Box, { mb: "5", overflowY: "auto", width: "100%", children: reviewContents.questions.map((question) => {
|
|
134
|
+
if (done) {
|
|
135
|
+
return renderReviewContent({ question, answer: formik.values.answers[question.uuid] });
|
|
136
|
+
}
|
|
137
|
+
return renderPreviewContent({ question });
|
|
138
|
+
}) }),
|
|
139
|
+
/* @__PURE__ */ jsx(Button, { color: "yellow", onClick: onStart, variant: done ? "outline" : "solid", children: done ? "\uB098\uC758 \uC751\uB2F5 \uC218\uC815\uD558\uAE30" : reviewContents.buttonTitle })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
var start_review_default = StartReview;
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
start_review_default
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=chunk-RWXNQPE7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx"],"sourcesContent":["import React from 'react'; \nimport type { BadgeProps } from '@/atoms/badge';\nimport { Badge } from '@/atoms/badge';\nimport { Box } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { Separator } from '@/atoms/separator';\nimport { Typo } from '@/atoms/typo';\nimport {\n getCurriculumIcon,\n getCurriculumQuestionIconColor,\n getCurriculumQuestionTypeDescription,\n} from '@/utils/curriculum.utils';\nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport { useCurriculumReviewContext } from './curriculum-review-context';\n\ninterface StartReviewProps {\n onStart: () => void;\n}\n\n\nconst renderPreviewContent = (args: {\n question: ReviewQuestionElement;\n}):React.ReactElement => {\n const { question } = args;\n const Icon = getCurriculumIcon({\n type: question.type,\n icon: question.icon,\n });\n const getDescription = (): string => {\n return [\n getCurriculumQuestionTypeDescription(question.type),\n question.duration ? `${question.duration}분` : '',\n ]\n .filter(Boolean)\n .join(' | ');\n };\n\n return (\n <Grid\n columns=\"16px 1fr\"\n gap=\"2\"\n key={question.uuid}\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n >\n <Box mt=\"1\">\n <Icon color={getCurriculumQuestionIconColor(question.type)} />\n </Box>\n <Box>\n <Typo as=\"p\" color=\"gray\" weight=\"bold\">\n {question.title}\n </Typo>\n <Typo color=\"gray\">{getDescription()}</Typo>\n </Box>\n </Grid>\n );\n};\n\n\nconst getReviewContentValue = (question: ReviewQuestionElement, answer: string): string => {\n if(question.type === 'question_satisfaction_option'){ \n return question.options?.find((option)=>option.value === Number(answer))?.label ?? '';\n }\n return answer\n}\n\n\nconst renderReviewContent = (args: {\n question: ReviewQuestionElement;\n answer: string;\n}):React.ReactElement => {\n const { question, answer } = args;\n const Icon = getCurriculumIcon({\n type: question.type,\n icon: question.icon,\n }); \n\n const color = getCurriculumQuestionIconColor(question.type);\n const badgeColor: BadgeProps['color'] = ['question_radio','question_satisfaction_option'].includes(question.type) ? 'accent' : 'neutral';\n const value = getReviewContentValue(question, answer);\n\n return (\n <Grid\n columns=\"16px 1fr\"\n gap=\"2\"\n key={question.uuid}\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n >\n <Box>\n <Icon color={color} />\n </Box>\n\n <Box>\n <Typo as=\"p\" color=\"gray\" mb=\"2\" weight=\"bold\">{question.title}</Typo>\n <Badge color={badgeColor} size=\"large\" style={{whiteSpace: 'break-spaces', lineBreak: 'anywhere'}}>\n {value || '(미 응답)'}\n </Badge>\n </Box>\n \n </Grid>\n );\n};\n\nfunction StartReview({ onStart }: StartReviewProps): React.ReactNode {\n const { curriculum, reviewContents, sectionTitle, done,formik } =\n useCurriculumReviewContext();\n\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n maxWidth=\"650px\"\n pb={{initial: '6', sm: '0'}}\n pt={{initial: '4', sm: '0'}}\n px={{initial: '4', sm: '0'}}\n width=\"100%\"\n >\n <Typo color=\"gray\" mb=\"1\">{curriculum.title}</Typo>\n <Heading variant=\"heading3\">{reviewContents.title}</Heading>\n <Separator my=\"4\" style={{ width: 100 }} />\n\n <Typo align=\"left\" as=\"p\" color=\"gray\" mb=\"4\">\n <Typo as=\"span\" weight=\"bold\">\n {sectionTitle}\n </Typo>\n {' '}\n <Typo>{reviewContents.description}</Typo>\n </Typo>\n\n <Box mb=\"5\" overflowY=\"auto\" width=\"100%\">\n {reviewContents.questions.map((question)=>{\n if(done){\n return renderReviewContent({ question, answer: formik.values.answers[question.uuid]});\n }\n return renderPreviewContent({ question });\n })}\n </Box>\n <Button color=\"yellow\" onClick={onStart} variant={done ? 'outline' : 'solid'}>\n {done ? '나의 응답 수정하기' : reviewContents.buttonTitle}\n </Button>\n </Flex>\n </Flex>\n );\n}\n\nexport default StartReview;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDQ,cAEF,YAFE;AA3BR,IAAM,uBAAuB,CAAC,SAEL;AACvB,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,OAAO,kBAAkB;AAAA,IAC7B,MAAM,SAAS;AAAA,IACf,MAAM,SAAS;AAAA,EACjB,CAAC;AACD,QAAM,iBAAiB,MAAc;AACnC,WAAO;AAAA,MACL,qCAAqC,SAAS,IAAI;AAAA,MAClD,SAAS,WAAW,GAAG,SAAS,QAAQ,WAAM;AAAA,IAChD,EACG,OAAO,OAAO,EACd,KAAK,KAAK;AAAA,EACf;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,KAAI;AAAA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,YAC1C,CAAC,GACH;AAAA,YACA,oBAAC,UAAO,OAAM,UAAS,SAAS,SAAS,SAAS,OAAQ,YAAY,SACnE,iBAAO,uDAAe,eAAe,aACxC;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,uBAAQ;","names":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumContext
|
|
3
|
+
} from "./chunk-NMGLSEZ3.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Heading
|
|
9
|
+
} from "./chunk-BESTU2AY.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-XK6VEVOK.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
import {
|
|
20
|
+
ChevronLeftIcon,
|
|
21
|
+
ChevronRightIcon
|
|
22
|
+
} from "./chunk-W5TPOFOO.js";
|
|
23
|
+
|
|
24
|
+
// src/molecules/curriculumV2/curriculum-sub-nav.tsx
|
|
25
|
+
import { useCallback } from "react";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function CurriculumSubNav() {
|
|
28
|
+
const {
|
|
29
|
+
selectedItem,
|
|
30
|
+
selectedSectionTitle,
|
|
31
|
+
hasPrev,
|
|
32
|
+
hasNext,
|
|
33
|
+
selectPrev,
|
|
34
|
+
selectNext,
|
|
35
|
+
scrollNavItem
|
|
36
|
+
} = useCurriculumContext();
|
|
37
|
+
const onClickPrev = useCallback(() => {
|
|
38
|
+
selectPrev((moveIndex) => {
|
|
39
|
+
scrollNavItem(moveIndex.toString());
|
|
40
|
+
});
|
|
41
|
+
}, [selectPrev, scrollNavItem]);
|
|
42
|
+
const onClickNext = useCallback(() => {
|
|
43
|
+
selectNext((moveIndex) => {
|
|
44
|
+
scrollNavItem(moveIndex.toString());
|
|
45
|
+
});
|
|
46
|
+
}, [selectNext, scrollNavItem]);
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
48
|
+
Grid,
|
|
49
|
+
{
|
|
50
|
+
align: "center",
|
|
51
|
+
columns: { initial: "32px 1fr 32px", md: "48px 1fr 48px" },
|
|
52
|
+
pb: { initial: "2", md: "3" },
|
|
53
|
+
px: { initial: "1", md: "2" },
|
|
54
|
+
py: "2",
|
|
55
|
+
rows: "auto",
|
|
56
|
+
children: [
|
|
57
|
+
hasPrev ? /* @__PURE__ */ jsx(
|
|
58
|
+
IconButton,
|
|
59
|
+
{
|
|
60
|
+
color: "gray",
|
|
61
|
+
onClick: onClickPrev,
|
|
62
|
+
size: { initial: "medium", md: "large" },
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { height: "16px", width: "16px" })
|
|
65
|
+
}
|
|
66
|
+
) : /* @__PURE__ */ jsx(Box, {}),
|
|
67
|
+
/* @__PURE__ */ jsxs(Box, { width: "100%", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Heading, { style: { textOverflow: "ellipsis" }, variant: "heading5", children: selectedItem.title }) }),
|
|
69
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Typo, { weight: "bold", children: selectedItem.title }) }),
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
Typo,
|
|
72
|
+
{
|
|
73
|
+
as: "p",
|
|
74
|
+
color: "gray",
|
|
75
|
+
mt: "1",
|
|
76
|
+
style: { textOverflow: "ellipsis" },
|
|
77
|
+
variant: "caption",
|
|
78
|
+
children: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
hasNext ? /* @__PURE__ */ jsx(
|
|
83
|
+
IconButton,
|
|
84
|
+
{
|
|
85
|
+
color: "gray",
|
|
86
|
+
onClick: onClickNext,
|
|
87
|
+
size: { initial: "medium", md: "large" },
|
|
88
|
+
variant: "ghost",
|
|
89
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { height: "16px", width: "16px" })
|
|
90
|
+
}
|
|
91
|
+
) : /* @__PURE__ */ jsx(Box, {})
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
CurriculumSubNav
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=chunk-SGJFPJMV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/curriculum-sub-nav.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Box, } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { IconButton } from '@/atoms/icon-button';\nimport { Typo } from '@/atoms/typo';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@/icon';\nimport { useCurriculumContext } from './curriculum-context';\n\nexport function CurriculumSubNav(): React.ReactNode {\n const {\n selectedItem,\n selectedSectionTitle,\n hasPrev,\n hasNext,\n selectPrev,\n selectNext,\n scrollNavItem,\n } = useCurriculumContext();\n\n const onClickPrev = useCallback(() => {\n selectPrev((moveIndex) => {\n scrollNavItem(moveIndex.toString());\n });\n }, [selectPrev, scrollNavItem]);\n\n const onClickNext = useCallback(() => {\n selectNext((moveIndex) => {\n scrollNavItem(moveIndex.toString());\n });\n }, [selectNext, scrollNavItem]);\n\n return (\n <Grid\n align=\"center\"\n columns={{ initial: '32px 1fr 32px', md: '48px 1fr 48px' }}\n pb={{ initial: '2', md: '3' }}\n px={{ initial: '1', md: '2' }}\n py=\"2\"\n rows=\"auto\"\n >\n {hasPrev ? (\n <IconButton\n color=\"gray\"\n onClick={onClickPrev}\n size={{ initial: 'medium', md: 'large' }}\n variant=\"ghost\"\n >\n <ChevronLeftIcon height=\"16px\" width=\"16px\" />\n </IconButton>\n ) : (\n <Box />\n )}\n <Box width=\"100%\">\n {/* 데스크탑 타이틀 */}\n <Box display={{ initial: 'none', md: 'block' }}>\n <Heading style={{ textOverflow: 'ellipsis' }} variant=\"heading5\">\n {selectedItem.title}\n </Heading>\n </Box>\n\n {/* 모바일 타이틀 */}\n <Box display={{ initial: 'block', md: 'none' }}>\n <Typo weight=\"bold\">{selectedItem.title}</Typo>\n </Box>\n\n <Typo\n as=\"p\"\n color=\"gray\"\n mt=\"1\"\n style={{ textOverflow: 'ellipsis' }}\n variant=\"caption\"\n >\n {selectedSectionTitle?.title}\n </Typo>\n </Box>\n {hasNext ? (\n <IconButton\n color=\"gray\"\n onClick={onClickNext}\n size={{ initial: 'medium', md: 'large' }}\n variant=\"ghost\"\n >\n <ChevronRightIcon height=\"16px\" width=\"16px\" />\n </IconButton>\n ) : (\n <Box />\n )}\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,mBAAmB;AAgDzB,cAKJ,YALI;AAvCH,SAAS,mBAAoC;AAClD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB;AAEzB,QAAM,cAAc,YAAY,MAAM;AACpC,eAAW,CAAC,cAAc;AACxB,oBAAc,UAAU,SAAS,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,aAAa,CAAC;AAE9B,QAAM,cAAc,YAAY,MAAM;AACpC,eAAW,CAAC,cAAc;AACxB,oBAAc,UAAU,SAAS,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,aAAa,CAAC;AAE9B,SACE;AAAA,IAAC;AAAA;AA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item_default
|
|
3
|
+
} from "./chunk-4HDV26QV.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-3OCAVV5Z.js";
|
|
7
|
+
import {
|
|
8
|
+
Tabs
|
|
9
|
+
} from "./chunk-5ZITU5L7.js";
|
|
10
|
+
import {
|
|
11
|
+
Grid
|
|
12
|
+
} from "./chunk-EGEQY3KT.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/CurriculumSidebar/index.tsx
|
|
18
|
+
import { useMemo } from "react";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var TAB_LIST = [
|
|
21
|
+
{
|
|
22
|
+
label: "\uAC15\uC758 \uBAA9\uCC28",
|
|
23
|
+
value: "curriculum"
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
var TABS_LIST_STYLE = {
|
|
27
|
+
padding: "0 var(--space-3)"
|
|
28
|
+
};
|
|
29
|
+
var TABS_CONTENT_STYLE = {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
height: "100%",
|
|
32
|
+
width: "100%"
|
|
33
|
+
};
|
|
34
|
+
function CurriculumSidebar() {
|
|
35
|
+
const {
|
|
36
|
+
curriculum,
|
|
37
|
+
selectedIndex,
|
|
38
|
+
setSelectedIndex,
|
|
39
|
+
scrollAreaRef,
|
|
40
|
+
curriculumCompleteMap,
|
|
41
|
+
customTabs
|
|
42
|
+
} = useCurriculumContext();
|
|
43
|
+
const list = curriculum.contents.list;
|
|
44
|
+
const tabList = useMemo(() => {
|
|
45
|
+
return [...TAB_LIST, ...customTabs != null ? customTabs : []];
|
|
46
|
+
}, [customTabs]);
|
|
47
|
+
return /* @__PURE__ */ jsx(Tabs.Root, { asChild: true, defaultValue: TAB_LIST[0].value, children: /* @__PURE__ */ jsxs(Grid, { height: "100%", overflowY: "auto", rows: "auto 1fr ", width: "100%", children: [
|
|
48
|
+
/* @__PURE__ */ jsx(Tabs.List, { style: TABS_LIST_STYLE, children: tabList.map((tab) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: tab.value, children: tab.label }, tab.value)) }),
|
|
49
|
+
/* @__PURE__ */ jsxs(
|
|
50
|
+
Box,
|
|
51
|
+
{
|
|
52
|
+
height: "100%",
|
|
53
|
+
overflowY: "auto",
|
|
54
|
+
position: "relative",
|
|
55
|
+
ref: scrollAreaRef,
|
|
56
|
+
width: "100%",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsxs(
|
|
59
|
+
Tabs.Content,
|
|
60
|
+
{
|
|
61
|
+
style: TABS_CONTENT_STYLE,
|
|
62
|
+
value: TAB_LIST[0].value,
|
|
63
|
+
children: [
|
|
64
|
+
list.map((item, index) => /* @__PURE__ */ jsx(
|
|
65
|
+
sidebar_item_default,
|
|
66
|
+
{
|
|
67
|
+
done: curriculumCompleteMap[item.uuid],
|
|
68
|
+
index,
|
|
69
|
+
item,
|
|
70
|
+
selectedIndex,
|
|
71
|
+
setSelectedIndex
|
|
72
|
+
},
|
|
73
|
+
item.uuid
|
|
74
|
+
)),
|
|
75
|
+
/* @__PURE__ */ jsx(Box, { height: "150px" })
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
TAB_LIST[0].value
|
|
79
|
+
),
|
|
80
|
+
customTabs == null ? void 0 : customTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
81
|
+
Tabs.Content,
|
|
82
|
+
{
|
|
83
|
+
style: TABS_CONTENT_STYLE,
|
|
84
|
+
value: tab.value,
|
|
85
|
+
children: tab.content
|
|
86
|
+
},
|
|
87
|
+
tab.value
|
|
88
|
+
))
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] }) });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
CurriculumSidebar
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=chunk-SYUWHIFX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Tabs } from '@/atoms/tabs';\nimport { useCurriculumContext } from '../curriculum-context';\nimport SidebarItem from './sidebar-item';\n\nconst TAB_LIST = [\n {\n label: '강의 목차',\n value: 'curriculum',\n },\n];\n\nconst TABS_LIST_STYLE: React.CSSProperties = {\n padding: '0 var(--space-3)',\n};\n\nconst TABS_CONTENT_STYLE: React.CSSProperties = {\n position: 'absolute',\n height: '100%',\n width: '100%',\n};\n\n\nexport function CurriculumSidebar(): React.ReactNode {\n const {\n curriculum,\n selectedIndex,\n setSelectedIndex,\n scrollAreaRef,\n curriculumCompleteMap,\n customTabs,\n } = useCurriculumContext();\n const list = curriculum.contents.list;\n\n const tabList = useMemo(() => {\n return [...TAB_LIST, ...(customTabs ?? [])];\n }, [customTabs]);\n\n return (\n <Tabs.Root asChild defaultValue={TAB_LIST[0].value}>\n <Grid height=\"100%\" overflowY=\"auto\" rows=\"auto 1fr \" width=\"100%\">\n <Tabs.List style={TABS_LIST_STYLE}>\n {tabList.map((tab) => (\n <Tabs.Trigger key={tab.value} value={tab.value}>\n {tab.label}\n </Tabs.Trigger>\n ))}\n </Tabs.List>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n position=\"relative\"\n ref={scrollAreaRef}\n width=\"100%\"\n >\n <Tabs.Content\n key={TAB_LIST[0].value}\n style={TABS_CONTENT_STYLE}\n value={TAB_LIST[0].value}\n >\n {list.map((item, index) => (\n <SidebarItem\n done={curriculumCompleteMap[item.uuid]}\n index={index}\n item={item}\n key={item.uuid}\n selectedIndex={selectedIndex}\n setSelectedIndex={setSelectedIndex}\n />\n ))}\n <Box height=\"150px\" />\n </Tabs.Content>\n {customTabs?.map((tab) => (\n <Tabs.Content\n key={t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A;AAAA,oBACC,MAAM,sBAAsB,KAAK,IAAI;AAAA,oBACrC;AAAA,oBACA;AAAA,oBAEA;AAAA,oBACA;AAAA;AAAA,kBAFK,KAAK;AAAA,gBAGZ,CACD;AAAA,gBACD,oBAAC,OAAI,QAAO,SAAQ;AAAA;AAAA;AAAA,YAdf,SAAS,CAAC,EAAE;AAAA,UAenB;AAAA,UACC,yCAAY,IAAI,CAAC,QAChB;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cAEC,OAAO;AAAA,cACP,OAAO,IAAI;AAAA,cAEV,cAAI;AAAA;AAAA,YAJA,IAAI;AAAA,UAKX;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sidebar_item_default
|
|
3
|
+
} from "./chunk-4HDV26QV.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-IYQJIEVM.js";
|
|
7
|
+
import {
|
|
8
|
+
Tabs
|
|
9
|
+
} from "./chunk-5ZITU5L7.js";
|
|
10
|
+
import {
|
|
11
|
+
Grid
|
|
12
|
+
} from "./chunk-EGEQY3KT.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/CurriculumSidebar/index.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var TAB_LIST = [
|
|
20
|
+
{
|
|
21
|
+
label: "\uAC15\uC758 \uBAA9\uCC28",
|
|
22
|
+
value: "curriculum"
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
function CurriculumSidebar() {
|
|
26
|
+
const { curriculum, selectedIndex, setSelectedIndex, scrollAreaRef, curriculumCompleteMap } = useCurriculumContext();
|
|
27
|
+
const list = curriculum.contents.list;
|
|
28
|
+
return /* @__PURE__ */ jsx(Tabs.Root, { asChild: true, defaultValue: TAB_LIST[0].value, children: /* @__PURE__ */ jsxs(Grid, { height: "100%", overflowY: "auto", rows: "auto 1fr ", width: "100%", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(Tabs.List, { style: { padding: "0 var(--space-3)" }, children: TAB_LIST.map((tab) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: tab.value, children: tab.label }, tab.value)) }),
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
Box,
|
|
32
|
+
{
|
|
33
|
+
height: "100%",
|
|
34
|
+
overflowY: "auto",
|
|
35
|
+
position: "relative",
|
|
36
|
+
ref: scrollAreaRef,
|
|
37
|
+
width: "100%",
|
|
38
|
+
children: /* @__PURE__ */ jsxs(
|
|
39
|
+
Tabs.Content,
|
|
40
|
+
{
|
|
41
|
+
style: {
|
|
42
|
+
position: "absolute",
|
|
43
|
+
height: "100%",
|
|
44
|
+
width: "100%"
|
|
45
|
+
},
|
|
46
|
+
value: TAB_LIST[0].value,
|
|
47
|
+
children: [
|
|
48
|
+
list.map((item, index) => /* @__PURE__ */ jsx(sidebar_item_default, { done: curriculumCompleteMap[item.uuid], index, item, selectedIndex, setSelectedIndex }, item.uuid)),
|
|
49
|
+
/* @__PURE__ */ jsx(Box, { height: "150px" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }) });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
CurriculumSidebar
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=chunk-TDBCQSTJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Tabs } from '@/atoms/tabs';\nimport { useCurriculumContext } from '../curriculum-context'; \nimport SidebarItem from './sidebar-item';\n\nconst TAB_LIST = [\n {\n label: '강의 목차',\n value: 'curriculum',\n },\n];\n\nexport function CurriculumSidebar(): React.ReactNode {\n const { curriculum, selectedIndex, setSelectedIndex, scrollAreaRef, curriculumCompleteMap } =\n useCurriculumContext();\n const list = curriculum.contents.list;\n \n\n return (\n <Tabs.Root asChild defaultValue={TAB_LIST[0].value}>\n <Grid height=\"100%\" overflowY=\"auto\" rows=\"auto 1fr \" width=\"100%\">\n <Tabs.List style={{ padding: '0 var(--space-3)' }}>\n {TAB_LIST.map((tab) => (\n <Tabs.Trigger key={tab.value} value={tab.value}>\n {tab.label}\n </Tabs.Trigger>\n ))}\n </Tabs.List>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n position=\"relative\"\n ref={scrollAreaRef}\n width=\"100%\"\n >\n <Tabs.Content\n style={{\n position: 'absolute',\n height: '100%',\n width: '100%',\n }}\n value={TAB_LIST[0].value}\n >\n {list.map((item, index) => (\n <SidebarItem done={curriculumCompleteMap[item.uuid]} index={index} item={item} key={item.uuid} selectedIndex={selectedIndex} setSelectedIndex={setSelectedIndex} />\n ))}\n <Box height=\"150px\" />\n </Tabs.Content>\n </Box>\n </Grid>\n </Tabs.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBY,cAYF,YAZE;AAlBZ,IAAM,WAAW;AAAA,EACf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEO,SAAS,oBAAqC;AACnD,QAAM,EAAE,YAAY,eAAe,kBAAkB,eAAe,sBAAsB,IACxF,qBAAqB;AACvB,QAAM,OAAO,WAAW,SAAS;AAGjC,SACE,oBAAC,KAAK,MAAL,EAAU,SAAO,MAAC,cAAc,SAAS,CAAC,EAAE,OAC3C,+BAAC,QAAK,QAAO,QAAO,WAAU,QAAO,MAAK,aAAY,OAAM,QAC1D;AAAA,wBAAC,KAAK,MAAL,EAAU,OAAO,EAAE,SAAS,mBAAmB,GAC7C,mBAAS,IAAI,CAAC,QACb,oBAAC,KAAK,SAAL,EAA6B,OAAO,IAAI,OACtC,cAAI,SADY,IAAI,KAEvB,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAO;AAAA,QACP,WAAU;AAAA,QACV,UAAS;AAAA,QACT,KAAK;AAAA,QACL,OAAM;AAAA,QAEN;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,QAAQ;AAAA,cACR,OAAO;AAAA,YACT;AAAA,YACA,OAAO,SAAS,CAAC,EAAE;AAAA,YAElB;AAAA,mBAAK,IAAI,CAAC,MAAM,UACf,oBAAC,wBAAY,MAAM,sBAAsB,KAAK,IAAI,GAAG,OAAc,MAA4B,eAA8B,oBAAzC,KAAK,IAAwE,CAClK;AAAA,cACD,oBAAC,OAAI,QAAO,SAAQ;AAAA;AAAA;AAAA,QACtB;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_sidebar_item_wrapper_default
|
|
3
|
+
} from "./chunk-WS7IOHVK.js";
|
|
4
|
+
import {
|
|
5
|
+
section_item_default
|
|
6
|
+
} from "./chunk-B63TOIOA.js";
|
|
7
|
+
import {
|
|
8
|
+
section_title_default
|
|
9
|
+
} from "./chunk-4TST4UK5.js";
|
|
10
|
+
import {
|
|
11
|
+
getCurriculumIconColor
|
|
12
|
+
} from "./chunk-3FKAH2RB.js";
|
|
13
|
+
import {
|
|
14
|
+
__spreadProps,
|
|
15
|
+
__spreadValues
|
|
16
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
17
|
+
|
|
18
|
+
// src/molecules/curriculumV2/CurriculumSidebar/sidebar-item.tsx
|
|
19
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
|
+
function SidebarItem({ item, selectedIndex, setSelectedIndex, index, done }) {
|
|
21
|
+
if (item.type === "sectionTitle") {
|
|
22
|
+
return /* @__PURE__ */ jsx(section_title_default, __spreadValues({}, item), item.uuid);
|
|
23
|
+
}
|
|
24
|
+
const isSelected = selectedIndex === index;
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
curriculum_sidebar_item_wrapper_default,
|
|
27
|
+
{
|
|
28
|
+
index,
|
|
29
|
+
isSelected,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
setSelectedIndex(index);
|
|
32
|
+
},
|
|
33
|
+
children: /* @__PURE__ */ jsx(
|
|
34
|
+
section_item_default,
|
|
35
|
+
__spreadProps(__spreadValues({}, item), {
|
|
36
|
+
color: getCurriculumIconColor({
|
|
37
|
+
done,
|
|
38
|
+
selected: isSelected
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
)
|
|
42
|
+
},
|
|
43
|
+
item.uuid
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
var sidebar_item_default = SidebarItem;
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
sidebar_item_default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chunk-TGCLWLPY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/sidebar-item.tsx"],"sourcesContent":["import type { CurriculumListContents } from '@/types/curriculum.type'; \nimport { getCurriculumIconColor } from '../../../utils/curriculum.utils';\nimport SectionTitle from './Items/section-title';\nimport CurriculumSidebarItemWrapper from './Items/curriculum-sidebar-item-wrapper';\nimport SectionCommonItem from './Items/section-item';\n\n\ninterface SidebarItemProps {\n item: CurriculumListContents;\n selectedIndex: number;\n setSelectedIndex: (index: number) => void;\n index: number;\n done: boolean;\n}\n\nfunction SidebarItem({item, selectedIndex, setSelectedIndex, index, done}: SidebarItemProps): React.ReactNode {\n \n \n if (item.type === 'sectionTitle') {\n return <SectionTitle key={item.uuid} {...item} />;\n }\n const isSelected = selectedIndex === index;\n\n return (\n <CurriculumSidebarItemWrapper\n index={index}\n isSelected={isSelected}\n key={item.uuid}\n onClick={() => {\n setSelectedIndex(index);\n }}\n >\n <SectionCommonItem\n {...item}\n color={getCurriculumIconColor({\n done,\n selected: isSelected,\n })}\n />\n </CurriculumSidebarItemWrapper>\n );\n }\n\nexport default SidebarItem;"],"mappings":";;;;;;;;;;;;;;;;;;AAmBe;AAJf,SAAS,YAAY,EAAC,MAAM,eAAe,kBAAkB,OAAO,KAAI,GAAsC;AAG5G,MAAI,KAAK,SAAS,gBAAgB;AAC5B,WAAO,oBAAC,0CAAiC,OAAf,KAAK,IAAgB;AAAA,EACjD;AACA,QAAM,aAAa,kBAAkB;AAErC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MAEA,SAAS,MAAM;AACb,yBAAiB,KAAK;AAAA,MACxB;AAAA,MAEA;AAAA,QAAC;AAAA,yCACK,OADL;AAAA,UAEC,OAAO,uBAAuB;AAAA,YAC5B;AAAA,YACA,UAAU;AAAA,UACZ,CAAC;AAAA;AAAA,MACH;AAAA;AAAA,IAXK,KAAK;AAAA,EAYZ;AAEJ;AAEJ,IAAO,uBAAQ;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
start_review_default
|
|
3
|
+
} from "./chunk-RWXNQPE7.js";
|
|
4
|
+
import {
|
|
5
|
+
ReviewQuestion_default
|
|
6
|
+
} from "./chunk-NMKIFFKE.js";
|
|
7
|
+
import {
|
|
8
|
+
complete_review_default
|
|
9
|
+
} from "./chunk-W747CDDK.js";
|
|
10
|
+
import {
|
|
11
|
+
CurriculumReviewProvider,
|
|
12
|
+
useCurriculumReviewContext
|
|
13
|
+
} from "./chunk-GMKRNFH5.js";
|
|
14
|
+
|
|
15
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
function CurriculumReviewStepsInner() {
|
|
18
|
+
const {
|
|
19
|
+
formik,
|
|
20
|
+
step,
|
|
21
|
+
handleStart,
|
|
22
|
+
handleNext,
|
|
23
|
+
handlePrev,
|
|
24
|
+
onClickReviewMyAnswer,
|
|
25
|
+
handleSubmit,
|
|
26
|
+
currentQuestion,
|
|
27
|
+
currentAnswer,
|
|
28
|
+
currentError,
|
|
29
|
+
reviewContents,
|
|
30
|
+
handleAnswerChange
|
|
31
|
+
} = useCurriculumReviewContext();
|
|
32
|
+
const { questions } = reviewContents;
|
|
33
|
+
if (step === 0) {
|
|
34
|
+
return /* @__PURE__ */ jsx(start_review_default, { onStart: handleStart });
|
|
35
|
+
}
|
|
36
|
+
if (step > 0 && step <= questions.length && currentQuestion) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
ReviewQuestion_default,
|
|
39
|
+
{
|
|
40
|
+
answer: currentAnswer,
|
|
41
|
+
error: currentError,
|
|
42
|
+
index: step - 1,
|
|
43
|
+
isLast: step === questions.length,
|
|
44
|
+
isLoading: formik.isSubmitting,
|
|
45
|
+
isNextDisabled: currentError !== void 0,
|
|
46
|
+
onChange: handleAnswerChange,
|
|
47
|
+
onNext: handleNext,
|
|
48
|
+
onPrev: handlePrev,
|
|
49
|
+
onSubmit: handleSubmit,
|
|
50
|
+
question: currentQuestion,
|
|
51
|
+
total: questions.length
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ jsx(complete_review_default, { onClickReviewMyAnswer });
|
|
56
|
+
}
|
|
57
|
+
function CurriculumReviewSteps({
|
|
58
|
+
contents,
|
|
59
|
+
title,
|
|
60
|
+
onClickEndReview,
|
|
61
|
+
onSubmit,
|
|
62
|
+
defaultValues,
|
|
63
|
+
curriculum,
|
|
64
|
+
onReviewValueChange,
|
|
65
|
+
mode,
|
|
66
|
+
done
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
CurriculumReviewProvider,
|
|
70
|
+
{
|
|
71
|
+
curriculum,
|
|
72
|
+
defaultValues,
|
|
73
|
+
done,
|
|
74
|
+
mode,
|
|
75
|
+
onClickEndReview,
|
|
76
|
+
onReviewValueChange,
|
|
77
|
+
onSubmit,
|
|
78
|
+
reviewContents: contents,
|
|
79
|
+
sectionTitle: title,
|
|
80
|
+
children: /* @__PURE__ */ jsx(CurriculumReviewStepsInner, {})
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
var CurriculumReviewSteps_default = CurriculumReviewSteps;
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
CurriculumReviewSteps_default
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=chunk-UFWZAT6E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx"],"sourcesContent":["import React from 'react';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport type { Curriculum } from '@/types'; \nimport {\n CurriculumReviewProvider,\n useCurriculumReviewContext,\n} from './curriculum-review-context';\nimport StartReview from './start-review';\nimport CompleteReview from './complete-review';\nimport ReviewQuestion from './ReviewQuestion';\n \nfunction CurriculumReviewStepsInner(): React.ReactNode {\n const {\n formik,\n step,\n handleStart,\n handleNext,\n handlePrev,\n onClickReviewMyAnswer,\n handleSubmit,\n currentQuestion,\n currentAnswer,\n currentError,\n reviewContents,\n handleAnswerChange,\n } = useCurriculumReviewContext();\n const { questions } = reviewContents;\n\n if (step === 0) {\n return <StartReview onStart={handleStart} />;\n }\n if (step > 0 && step <= questions.length && currentQuestion) {\n return (\n <ReviewQuestion\n answer={currentAnswer}\n error={currentError}\n index={step - 1}\n isLast={step === questions.length}\n isLoading={formik.isSubmitting}\n isNextDisabled={currentError !== undefined}\n onChange={handleAnswerChange}\n onNext={handleNext}\n onPrev={handlePrev}\n onSubmit={handleSubmit}\n question={currentQuestion}\n total={questions.length}\n />\n );\n }\n return <CompleteReview onClickReviewMyAnswer={onClickReviewMyAnswer} />;\n}\n\ninterface CurriculumReviewStepsProps {\n contents: CurriculumReviewContents;\n title: string | undefined;\n onClickEndReview: () => void;\n onSubmit: (values: Record<string, string>) => Promise<boolean>;\n defaultValues?: Record<string, string>;\n curriculum: Curriculum;\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n mode: 'edit' | 'create';\n done: boolean; \n}\n\nfunction CurriculumReviewSteps({\n contents,\n title,\n onClickEndReview,\n onSubmit,\n defaultValues,\n curriculum,\n onReviewValueChange,\n mode,\n done,\n}: CurriculumReviewStepsProps): React.ReactNode { \n\n return (\n <CurriculumReviewProvider\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onSubmit}\n reviewContents={contents}\n sectionTitle={title}\n >\n <CurriculumReviewStepsInner />\n </CurriculumReviewProvider>\n );\n}\n\nexport default CurriculumReviewSteps;\n"],"mappings":";;;;;;;;;;;;;;;AA6BW;AAlBX,SAAS,6BAA8C;AACrD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,2BAA2B;AAC/B,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,SAAS,GAAG;AACd,WAAO,oBAAC,wBAAY,SAAS,aAAa;AAAA,EAC5C;AACA,MAAI,OAAO,KAAK,QAAQ,UAAU,UAAU,iBAAiB;AAC3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,OAAO,OAAO;AAAA,QACd,QAAQ,SAAS,UAAU;AAAA,QAC3B,WAAW,OAAO;AAAA,QAClB,gBAAgB,iBAAiB;AAAA,QACjC,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,UAAU;AAAA,QACV,OAAO,UAAU;AAAA;AAAA,IACnB;AAAA,EAEJ;AACA,SAAO,oBAAC,2BAAe,uBAA8C;AACvE;AAoBA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgD;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,cAAc;AAAA,MAEd,8BAAC,8BAA2B;AAAA;AAAA,EAC9B;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|