@tipp/ui 2.1.7 → 2.1.9
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.map +1 -1
- package/dist/app/index.js +7 -7
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +7 -7
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +7 -7
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +7 -7
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +7 -7
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +7 -7
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +7 -7
- package/dist/chunk-637SZITH.js +79 -0
- package/dist/chunk-637SZITH.js.map +1 -0
- package/dist/chunk-EFB4UO4F.js +123 -0
- package/dist/chunk-EFB4UO4F.js.map +1 -0
- package/dist/chunk-GJQDFBAF.js +150 -0
- package/dist/chunk-GJQDFBAF.js.map +1 -0
- package/dist/chunk-POJT5P6J.js +59 -0
- package/dist/chunk-POJT5P6J.js.map +1 -0
- package/dist/chunk-QHIQCYK2.js +59 -0
- package/dist/chunk-QHIQCYK2.js.map +1 -0
- package/dist/chunk-RHQNIB5E.js +89 -0
- package/dist/chunk-RHQNIB5E.js.map +1 -0
- package/dist/chunk-TN63T2TG.js +89 -0
- package/dist/chunk-TN63T2TG.js.map +1 -0
- package/dist/chunk-ZNUVCZIN.js +123 -0
- package/dist/chunk-ZNUVCZIN.js.map +1 -0
- package/dist/index.cjs +4 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -11
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.cjs +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.cjs +4 -7
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.cjs +3 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs +4 -7
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs +4 -7
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +5 -5
- package/dist/molecules/curriculumV2/index.cjs +4 -7
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +5 -5
- package/dist/molecules/index.cjs +4 -7
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +10 -10
- package/dist/types/index.js +1 -1
- package/package.json +3 -3
- package/src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.tsx +1 -1
- package/src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx +2 -5
|
@@ -5,13 +5,11 @@ import "../../chunk-44Y6LSNA.js";
|
|
|
5
5
|
import "../../chunk-4QWYV2QX.js";
|
|
6
6
|
import "../../chunk-MDTIYQLE.js";
|
|
7
7
|
import "../../chunk-KSS4FSJI.js";
|
|
8
|
-
import "../../chunk-BE6JPXUV.js";
|
|
9
|
-
import "../../chunk-WDUSQ6HR.js";
|
|
10
8
|
import "../../chunk-AS7ID74X.js";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-POJT5P6J.js";
|
|
10
|
+
import "../../chunk-EFB4UO4F.js";
|
|
11
|
+
import "../../chunk-TN63T2TG.js";
|
|
12
|
+
import "../../chunk-GJQDFBAF.js";
|
|
15
13
|
import "../../chunk-D4WHIKQQ.js";
|
|
16
14
|
import "../../chunk-JLNQOXEV.js";
|
|
17
15
|
import "../../chunk-CHGLVZEQ.js";
|
|
@@ -22,7 +20,7 @@ import "../../chunk-VMV2AM7Z.js";
|
|
|
22
20
|
import "../../chunk-PNYMKF4M.js";
|
|
23
21
|
import "../../chunk-KCDVUSEZ.js";
|
|
24
22
|
import "../../chunk-KQG5B26J.js";
|
|
25
|
-
import "../../chunk-
|
|
23
|
+
import "../../chunk-637SZITH.js";
|
|
26
24
|
import "../../chunk-EBGKFGME.js";
|
|
27
25
|
import "../../chunk-HYMGXDPL.js";
|
|
28
26
|
import "../../chunk-OHA7BIRX.js";
|
|
@@ -36,6 +34,8 @@ import "../../chunk-YN4SHJ2O.js";
|
|
|
36
34
|
import "../../chunk-M6VXNQHU.js";
|
|
37
35
|
import "../../chunk-J5WASNFY.js";
|
|
38
36
|
import "../../chunk-I24MOOUK.js";
|
|
37
|
+
import "../../chunk-BE6JPXUV.js";
|
|
38
|
+
import "../../chunk-WDUSQ6HR.js";
|
|
39
39
|
import "../../chunk-AI7EZKUN.js";
|
|
40
40
|
import "../../chunk-WK7R5OB3.js";
|
|
41
41
|
import "../../chunk-5VWEW4M2.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumReviewContext
|
|
3
|
+
} from "./chunk-EBGKFGME.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Heading
|
|
9
|
+
} from "./chunk-3IT3NVK6.js";
|
|
10
|
+
import {
|
|
11
|
+
Typo
|
|
12
|
+
} from "./chunk-LH57PIY2.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
Button
|
|
18
|
+
} from "./chunk-AFPH32MF.js";
|
|
19
|
+
import {
|
|
20
|
+
HomeIcon,
|
|
21
|
+
ResetIcon
|
|
22
|
+
} from "./chunk-53ZVUOHV.js";
|
|
23
|
+
|
|
24
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.tsx
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
var THANKS_IMAGE_S3_URL = "https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_thanks.svg";
|
|
27
|
+
function CompleteReview(props) {
|
|
28
|
+
const { onClickReviewMyAnswer } = props;
|
|
29
|
+
const { reviewContents, sectionTitle, curriculum, onClickEndReview: onClickNextContents } = useCurriculumReviewContext();
|
|
30
|
+
const { reviewMeta } = curriculum.contents;
|
|
31
|
+
return /* @__PURE__ */ jsxs(
|
|
32
|
+
Flex,
|
|
33
|
+
{
|
|
34
|
+
align: "center",
|
|
35
|
+
direction: "column",
|
|
36
|
+
height: "100%",
|
|
37
|
+
justify: "between",
|
|
38
|
+
maxHeight: "550px",
|
|
39
|
+
maxWidth: "650px",
|
|
40
|
+
px: "4",
|
|
41
|
+
py: "6",
|
|
42
|
+
width: "100%",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", direction: "column", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Heading, { mb: "6", variant: "heading5", weight: "regular", children: (reviewMeta == null ? void 0 : reviewMeta.endReviewTopTitle) || "\uC751\uB2F5\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC81C\uCD9C\uD588\uC2B5\uB2C8\uB2E4" }),
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
"img",
|
|
48
|
+
{
|
|
49
|
+
alt: "complete-review",
|
|
50
|
+
height: 141,
|
|
51
|
+
src: THANKS_IMAGE_S3_URL,
|
|
52
|
+
width: 118
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", mt: "6", variant: "caption", children: sectionTitle }),
|
|
56
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading5", children: reviewContents.title }),
|
|
57
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", color: "gray", mt: "6", children: (reviewMeta == null ? void 0 : reviewMeta.endReviewDescription) || `\uC774\uBC88 \uD559\uC2B5\uC774 \uB9AC\uB354\uC2ED\uC5D0 \uB3C4\uC6C0\uC774 \uB418\uC5C8\uAE30\uB97C \uBC14\uB78D\uB2C8\uB2E4.
|
|
58
|
+
\uC55E\uC73C\uB85C \uC788\uC744 \uB9AC\uB354\uB2D8\uC758 \uC131\uC7A5\uC744 \uAE30\uB300\uD569\uB2C8\uB2E4.` })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsxs(Grid, { columns: { initial: "1fr", md: "2" }, gap: "3", width: "100%", children: [
|
|
61
|
+
/* @__PURE__ */ jsxs(Button, { onClick: onClickReviewMyAnswer, variant: "outline", children: [
|
|
62
|
+
(reviewMeta == null ? void 0 : reviewMeta.endReviewBackButtonTitle) || "\uB098\uC758 \uC751\uB2F5 \uB2E4\uC2DC \uBCF4\uAE30",
|
|
63
|
+
/* @__PURE__ */ jsx(ResetIcon, {})
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs(Button, { onClick: onClickNextContents, children: [
|
|
66
|
+
"\uCEE4\uB9AC\uD058\uB7FC\uC73C\uB85C \uB3CC\uC544\uAC00\uAE30",
|
|
67
|
+
/* @__PURE__ */ jsx(HomeIcon, {})
|
|
68
|
+
] })
|
|
69
|
+
] })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
var complete_review_default = CompleteReview;
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
complete_review_default
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=chunk-637SZITH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, Flex, Grid, Heading, Typo } from '@/atoms';\nimport { HomeIcon, ResetIcon } from '@/icon';\nimport { useCurriculumReviewContext } from './curriculum-review-context';\n\nconst THANKS_IMAGE_S3_URL = 'https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_thanks.svg';\n\nfunction CompleteReview(props: {\n onClickReviewMyAnswer: () => void;\n}): React.ReactNode {\n const { onClickReviewMyAnswer } = props;\n const { reviewContents, sectionTitle, curriculum, onClickEndReview: onClickNextContents } =\n useCurriculumReviewContext();\n\n const { reviewMeta } = curriculum.contents;\n\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"between\"\n maxHeight=\"550px\"\n maxWidth=\"650px\"\n px=\"4\"\n py=\"6\"\n width=\"100%\"\n >\n <Flex align=\"center\" direction=\"column\">\n <Heading mb=\"6\" variant=\"heading5\" weight=\"regular\">\n {reviewMeta?.endReviewTopTitle || '응답을 성공적으로 제출했습니다'}\n </Heading>\n <img\n alt=\"complete-review\"\n height={141}\n src={THANKS_IMAGE_S3_URL}\n width={118}\n />\n <Typo color=\"gray\" mt=\"6\" variant=\"caption\">\n {sectionTitle}\n </Typo>\n <Heading variant=\"heading5\">{reviewContents.title}</Heading>\n <Typo align=\"center\" color=\"gray\" mt=\"6\">\n {reviewMeta?.endReviewDescription ||\n `이번 학습이 리더십에 도움이 되었기를 바랍니다.\\n 앞으로 있을 리더님의 성장을 기대합니다.`}\n </Typo>\n </Flex>\n\n <Grid columns={{ initial: '1fr', md: '2' }} gap=\"3\" width=\"100%\">\n <Button onClick={onClickReviewMyAnswer} variant=\"outline\">\n {reviewMeta?.endReviewBackButtonTitle || '나의 응답 다시 보기'}\n <ResetIcon />\n </Button>\n <Button onClick={onClickNextContents}>\n 커리큘럼으로 돌아가기 \n <HomeIcon />\n </Button>\n </Grid>\n </Flex>\n );\n}\n\nexport default CompleteReview;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4BM,SACE,KADF;AAvBN,IAAM,sBAAsB;AAE5B,SAAS,eAAe,OAEJ;AAClB,QAAM,EAAE,sBAAsB,IAAI;AAClC,QAAM,EAAE,gBAAgB,cAAc,YAAY,kBAAkB,oBAAoB,IACtF,2BAA2B;AAE7B,QAAM,EAAE,WAAW,IAAI,WAAW;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,WAAU;AAAA,MACV,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,UAAS;AAAA,MACT,IAAG;AAAA,MACH,IAAG;AAAA,MACH,OAAM;AAAA,MAEN;AAAA,6BAAC,QAAK,OAAM,UAAS,WAAU,UAC7B;AAAA,8BAAC,WAAQ,IAAG,KAAI,SAAQ,YAAW,QAAO,WACvC,oDAAY,sBAAqB,0FACpC;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,KAAI;AAAA,cACJ,QAAQ;AAAA,cACR,KAAK;AAAA,cACL,OAAO;AAAA;AAAA,UACT;AAAA,UACA,oBAAC,QAAK,OAAM,QAAO,IAAG,KAAI,SAAQ,WAC/B,wBACH;AAAA,UACA,oBAAC,WAAQ,SAAQ,YAAY,yBAAe,OAAM;AAAA,UAClD,oBAAC,QAAK,OAAM,UAAS,OAAM,QAAO,IAAG,KAClC,oDAAY,yBACX;AAAA,+GACJ;AAAA,WACF;AAAA,QAEA,qBAAC,QAAK,SAAS,EAAE,SAAS,OAAO,IAAI,IAAI,GAAG,KAAI,KAAI,OAAM,QACxD;AAAA,+BAAC,UAAO,SAAS,uBAAuB,SAAQ,WAC7C;AAAA,sDAAY,6BAA4B;AAAA,YACzC,oBAAC,aAAU;AAAA,aACb;AAAA,UACA,qBAAC,UAAQ,SAAS,qBAAqB;AAAA;AAAA,YAErC,oBAAC,YAAS;AAAA,aACZ;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,0BAAQ;","names":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CurriculumReviewSteps_default
|
|
3
|
+
} from "./chunk-TN63T2TG.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-YN4SHJ2O.js";
|
|
7
|
+
import {
|
|
8
|
+
Dialog
|
|
9
|
+
} from "./chunk-45VFASWZ.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-O3DNDMV3.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-LH57PIY2.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-AFPH32MF.js";
|
|
25
|
+
import {
|
|
26
|
+
__spreadValues
|
|
27
|
+
} from "./chunk-2NMEKWO5.js";
|
|
28
|
+
|
|
29
|
+
// src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx
|
|
30
|
+
import { useCallback, useMemo, useState } from "react";
|
|
31
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
function CurriculumReview(props) {
|
|
34
|
+
const { item, sectionTitle } = props;
|
|
35
|
+
const { description, buttonTitle } = item;
|
|
36
|
+
const { curriculum, onReviewSubmit: _onReviewSubmit, onReviewValueChange, curriculumReviewAnswers, tempCurriculumReviewAnswers, curriculumCompleteMap } = useCurriculumContext();
|
|
37
|
+
const [open, setOpen] = useState(false);
|
|
38
|
+
const onReviewSubmit = useCallback((values) => {
|
|
39
|
+
return _onReviewSubmit({ reviewId: item.uuid, answer: values });
|
|
40
|
+
}, [item.uuid, _onReviewSubmit]);
|
|
41
|
+
const onClickEndReview = useCallback(() => {
|
|
42
|
+
setOpen(false);
|
|
43
|
+
}, []);
|
|
44
|
+
const mode = useMemo(() => {
|
|
45
|
+
return item.questions.every((question) => curriculumReviewAnswers[question.uuid] && curriculumReviewAnswers[question.uuid] !== "") ? "edit" : "create";
|
|
46
|
+
}, [curriculumReviewAnswers, item.questions]);
|
|
47
|
+
const defaultValues = useMemo(() => {
|
|
48
|
+
const allAnswers = __spreadValues(__spreadValues({}, tempCurriculumReviewAnswers), curriculumReviewAnswers);
|
|
49
|
+
return item.questions.reduce((acc, question) => {
|
|
50
|
+
acc[question.uuid] = allAnswers[question.uuid] || "";
|
|
51
|
+
return acc;
|
|
52
|
+
}, {});
|
|
53
|
+
}, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);
|
|
54
|
+
const done = useMemo(() => {
|
|
55
|
+
return Boolean(curriculumCompleteMap[item.uuid]);
|
|
56
|
+
}, [curriculumCompleteMap, item.uuid]);
|
|
57
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { onOpenChange: setOpen, open, children: [
|
|
58
|
+
/* @__PURE__ */ jsxs(
|
|
59
|
+
Flex,
|
|
60
|
+
{
|
|
61
|
+
align: "center",
|
|
62
|
+
direction: "column",
|
|
63
|
+
height: "100%",
|
|
64
|
+
justify: "center",
|
|
65
|
+
px: "3",
|
|
66
|
+
py: "3",
|
|
67
|
+
width: "100%",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: curriculum.title }),
|
|
70
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", as: "p", color: "gray", children: description }),
|
|
71
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsx(Button, { mt: "3", style: { width: 232 }, variant: done ? "outline" : "solid", children: /* @__PURE__ */ jsx(Typo, { truncate: true, children: done ? "\uB098\uC758 \uC751\uB2F5 \uB2E4\uC2DC\uBCF4\uAE30" : buttonTitle }) }) })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
Dialog.Content,
|
|
77
|
+
{
|
|
78
|
+
height: "100%",
|
|
79
|
+
hideCloseButton: true,
|
|
80
|
+
style: { borderRadius: 0, padding: 0 },
|
|
81
|
+
title: "",
|
|
82
|
+
width: "100%",
|
|
83
|
+
children: /* @__PURE__ */ jsxs(
|
|
84
|
+
Flex,
|
|
85
|
+
{
|
|
86
|
+
align: "center",
|
|
87
|
+
height: "100%",
|
|
88
|
+
justify: "center",
|
|
89
|
+
pb: "3",
|
|
90
|
+
position: "relative",
|
|
91
|
+
width: "100%",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
CurriculumReviewSteps_default,
|
|
95
|
+
{
|
|
96
|
+
contents: item,
|
|
97
|
+
curriculum,
|
|
98
|
+
defaultValues,
|
|
99
|
+
done,
|
|
100
|
+
mode,
|
|
101
|
+
onClickEndReview,
|
|
102
|
+
onReviewValueChange,
|
|
103
|
+
onSubmit: onReviewSubmit,
|
|
104
|
+
title: sectionTitle
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", right: "16px", top: "16px", children: /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxs(IconButton, { color: "gray", variant: "ghost", children: [
|
|
108
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 20, width: 20 }) }),
|
|
109
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 16, width: 16 }) })
|
|
110
|
+
] }) }) })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
var curriculum_review_default = CurriculumReview;
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
curriculum_review_default
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=chunk-EFB4UO4F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Box, Button, Dialog, Flex, IconButton, Typo } from '@/atoms';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumReviewSteps from './CurriculumReviewSteps';\n\ninterface CurriculumReviewProps {\n item: CurriculumReviewContents;\n sectionTitle: string | undefined;\n}\n\nfunction CurriculumReview(props: CurriculumReviewProps): React.ReactNode {\n const { item, sectionTitle } = props;\n const { description, buttonTitle } = item;\n const { curriculum, onReviewSubmit: _onReviewSubmit, onReviewValueChange, curriculumReviewAnswers, tempCurriculumReviewAnswers, curriculumCompleteMap } = useCurriculumContext();\n const [open, setOpen] = useState(false);\n\n const onReviewSubmit = useCallback((values: Record<string, string>) => {\n return _onReviewSubmit({ reviewId: item.uuid, answer: values });\n }, [item.uuid, _onReviewSubmit]); \n\n const onClickEndReview = useCallback(() => {\n setOpen(false); \n }, []);\n\n const mode = useMemo(() => {\n return item.questions.every(question => curriculumReviewAnswers[question.uuid] && curriculumReviewAnswers[question.uuid] !== '') ? 'edit' : 'create';\n }, [curriculumReviewAnswers, item.questions]);\n\n const defaultValues = useMemo(() => { \n const allAnswers = {\n ...tempCurriculumReviewAnswers,\n ...curriculumReviewAnswers\n };\n\n return item.questions.reduce<Record<string, string>>((acc, question) => {\n acc[question.uuid] = allAnswers[question.uuid] || '';\n return acc;\n }, {});\n }, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);\n\n const done = useMemo(() => {\n return Boolean(curriculumCompleteMap[item.uuid]);\n }, [curriculumCompleteMap, item.uuid]);\n\n return (\n <Dialog.Root onOpenChange={setOpen} open={open}>\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n px=\"3\"\n py=\"3\"\n width=\"100%\"\n >\n <Typo color=\"gray\" weight=\"bold\">\n {curriculum.title}\n </Typo>\n <Typo align=\"center\" as=\"p\" color=\"gray\">\n {description}\n </Typo>\n\n <Dialog.Trigger>\n <Button mt=\"3\" style={{ width: 232 }} variant={done ? 'outline' : 'solid'}>\n <Typo truncate>{done ? '나의 응답 다시보기' : buttonTitle}</Typo>\n </Button>\n </Dialog.Trigger>\n </Flex>\n <Dialog.Content\n height=\"100%\"\n hideCloseButton\n style={{ borderRadius: 0, padding: 0 }}\n title=\"\"\n width=\"100%\"\n >\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n pb=\"3\"\n position=\"relative\"\n width=\"100%\"\n >\n <CurriculumReviewSteps\n contents={item}\n curriculum={curriculum} \n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onReviewSubmit}\n title={sectionTitle}\n />\n <Box position=\"absolute\" right=\"16px\" top=\"16px\">\n <Dialog.Close asChild>\n <IconButton color=\"gray\" variant=\"ghost\">\n <Box display={{ initial: 'none', md: 'block' }}>\n <Cross1Icon height={20} width={20} />\n </Box>\n <Box display={{ initial: 'block', md: 'none' }}>\n <Cross1Icon height={16} width={16} />\n </Box>\n </IconButton>\n </Dialog.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AQ,IAAI,OAAO,IAAI,GACrC;AAAA,gBACA,oBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,OAAO,GAC3C,8BAAC,cAAW,QAAQ,IAAI,OAAO,IAAI,GACrC;AAAA,iBACF,GACF,GACF;AAAA;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,4BAAQ;","names":[]}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumReviewContext
|
|
3
|
+
} from "./chunk-EBGKFGME.js";
|
|
4
|
+
import {
|
|
5
|
+
getCurriculumIcon,
|
|
6
|
+
getCurriculumQuestionIconColor,
|
|
7
|
+
getCurriculumQuestionTypeDescription
|
|
8
|
+
} from "./chunk-AI7EZKUN.js";
|
|
9
|
+
import {
|
|
10
|
+
Grid
|
|
11
|
+
} from "./chunk-EGEQY3KT.js";
|
|
12
|
+
import {
|
|
13
|
+
Heading
|
|
14
|
+
} from "./chunk-3IT3NVK6.js";
|
|
15
|
+
import {
|
|
16
|
+
Separator
|
|
17
|
+
} from "./chunk-HYITAA4J.js";
|
|
18
|
+
import {
|
|
19
|
+
Badge
|
|
20
|
+
} from "./chunk-FCIHNIOH.js";
|
|
21
|
+
import {
|
|
22
|
+
Box
|
|
23
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
24
|
+
import {
|
|
25
|
+
Typo
|
|
26
|
+
} from "./chunk-LH57PIY2.js";
|
|
27
|
+
import {
|
|
28
|
+
Flex
|
|
29
|
+
} from "./chunk-25HMMI7R.js";
|
|
30
|
+
import {
|
|
31
|
+
Button
|
|
32
|
+
} from "./chunk-AFPH32MF.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" }, 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: "6",
|
|
121
|
+
pt: "4",
|
|
122
|
+
px: "4",
|
|
123
|
+
width: "100%",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", 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
|
+
/* @__PURE__ */ jsx(Typo, { children: reviewContents.description })
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ jsx(Box, { mb: "5", overflowY: "auto", width: "100%", children: reviewContents.questions.map((question) => {
|
|
133
|
+
if (done) {
|
|
134
|
+
return renderReviewContent({ question, answer: formik.values.answers[question.uuid] });
|
|
135
|
+
}
|
|
136
|
+
return renderPreviewContent({ question });
|
|
137
|
+
}) }),
|
|
138
|
+
/* @__PURE__ */ jsx(Button, { color: "yellow", onClick: onStart, variant: done ? "outline" : "solid", children: done ? "\uB098\uC758 \uC751\uB2F5 \uC218\uC815\uD558\uAE30" : reviewContents.buttonTitle })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
var start_review_default = StartReview;
|
|
146
|
+
|
|
147
|
+
export {
|
|
148
|
+
start_review_default
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=chunk-GJQDFBAF.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';\nimport { Badge, Box, Button, Flex, Grid, Heading, Separator, Typo } from '@/atoms'; \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'}}>\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=\"6\"\n pt=\"4\"\n px=\"4\"\n width=\"100%\"\n >\n <Typo color=\"gray\">{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 <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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CQ,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,MAEJ,IAAG;AAAA,M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;AAEJ;AAEA,IAAO,uBAAQ;","names":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_review_default
|
|
3
|
+
} from "./chunk-EFB4UO4F.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_video_default
|
|
6
|
+
} from "./chunk-HYMGXDPL.js";
|
|
7
|
+
import {
|
|
8
|
+
useCurriculumContext
|
|
9
|
+
} from "./chunk-YN4SHJ2O.js";
|
|
10
|
+
import {
|
|
11
|
+
Typo
|
|
12
|
+
} from "./chunk-LH57PIY2.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
InfoCircledIcon
|
|
18
|
+
} from "./chunk-53ZVUOHV.js";
|
|
19
|
+
|
|
20
|
+
// src/molecules/curriculumV2/CurriculumContents/index.tsx
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
function CurriculumBody() {
|
|
23
|
+
const { selectedItem, selectedSectionTitle } = useCurriculumContext();
|
|
24
|
+
switch (selectedItem.type) {
|
|
25
|
+
case "video":
|
|
26
|
+
return /* @__PURE__ */ jsx(curriculum_video_default, { item: selectedItem });
|
|
27
|
+
case "review":
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
curriculum_review_default,
|
|
30
|
+
{
|
|
31
|
+
item: selectedItem,
|
|
32
|
+
sectionTitle: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
default:
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
Flex,
|
|
38
|
+
{
|
|
39
|
+
align: "center",
|
|
40
|
+
direction: "column",
|
|
41
|
+
gap: "2",
|
|
42
|
+
height: "100%",
|
|
43
|
+
justify: "center",
|
|
44
|
+
width: "100%",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(InfoCircledIcon, { height: 24, width: 24 }),
|
|
47
|
+
/* @__PURE__ */ jsx(Typo, { children: "\uCEE8\uD150\uCE20\uB97C \uB85C\uB529 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4" }),
|
|
48
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", color: "gray", variant: "caption", children: `[debug info]
|
|
49
|
+
${JSON.stringify(selectedItem)}` })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
CurriculumBody
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-POJT5P6J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex, Typo } from '@/atoms';\nimport { InfoCircledIcon } from '@/icon';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumVideo from './curriculum-video';\nimport CurriculumReview from './curriculum-review';\n\nexport function CurriculumBody(): React.ReactNode {\n const { selectedItem, selectedSectionTitle } = useCurriculumContext();\n\n switch (selectedItem.type) {\n case 'video':\n return <CurriculumVideo item={selectedItem} />;\n case 'review':\n return (\n <CurriculumReview\n item={selectedItem}\n sectionTitle={selectedSectionTitle?.title}\n />\n );\n default:\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n gap=\"2\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <InfoCircledIcon height={24} width={24} />\n <Typo>컨텐츠를 로딩 할 수 없습니다</Typo>\n <Typo align=\"center\" color=\"gray\" variant=\"caption\">\n {`[debug info]\n ${JSON.stringify(selectedItem)}`}\n </Typo>\n </Flex>\n );\n }\n} "],"mappings":";;;;;;;;;;;;;;;;;;;;AAYa,cAUL,YAVK;AALN,SAAS,iBAAkC;AAChD,QAAM,EAAE,cAAc,qBAAqB,IAAI,qBAAqB;AAEpE,UAAQ,aAAa,MAAM;AAAA,IACzB,KAAK;AACH,aAAO,oBAAC,4BAAgB,MAAM,cAAc;AAAA,IAC9C,KAAK;AACH,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,cAAc,6DAAsB;AAAA;AAAA,MACtC;AAAA,IAEJ;AACE,aACE;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,WAAU;AAAA,UACV,KAAI;AAAA,UACJ,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,OAAM;AAAA,UAEN;AAAA,gCAAC,mBAAgB,QAAQ,IAAI,OAAO,IAAI;AAAA,YACxC,oBAAC,QAAK,0FAAgB;AAAA,YACtB,oBAAC,QAAK,OAAM,UAAS,OAAM,QAAO,SAAQ,WACvC;AAAA,cACC,KAAK,UAAU,YAAY,CAAC,IAChC;AAAA;AAAA;AAAA,MACF;AAAA,EAEN;AACF;","names":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_review_default
|
|
3
|
+
} from "./chunk-ZNUVCZIN.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_video_default
|
|
6
|
+
} from "./chunk-HYMGXDPL.js";
|
|
7
|
+
import {
|
|
8
|
+
useCurriculumContext
|
|
9
|
+
} from "./chunk-YN4SHJ2O.js";
|
|
10
|
+
import {
|
|
11
|
+
Typo
|
|
12
|
+
} from "./chunk-LH57PIY2.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
InfoCircledIcon
|
|
18
|
+
} from "./chunk-53ZVUOHV.js";
|
|
19
|
+
|
|
20
|
+
// src/molecules/curriculumV2/CurriculumContents/index.tsx
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
function CurriculumBody() {
|
|
23
|
+
const { selectedItem, selectedSectionTitle } = useCurriculumContext();
|
|
24
|
+
switch (selectedItem.type) {
|
|
25
|
+
case "video":
|
|
26
|
+
return /* @__PURE__ */ jsx(curriculum_video_default, { item: selectedItem });
|
|
27
|
+
case "review":
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
curriculum_review_default,
|
|
30
|
+
{
|
|
31
|
+
item: selectedItem,
|
|
32
|
+
sectionTitle: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
default:
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
Flex,
|
|
38
|
+
{
|
|
39
|
+
align: "center",
|
|
40
|
+
direction: "column",
|
|
41
|
+
gap: "2",
|
|
42
|
+
height: "100%",
|
|
43
|
+
justify: "center",
|
|
44
|
+
width: "100%",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(InfoCircledIcon, { height: 24, width: 24 }),
|
|
47
|
+
/* @__PURE__ */ jsx(Typo, { children: "\uCEE8\uD150\uCE20\uB97C \uB85C\uB529 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4" }),
|
|
48
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", color: "gray", variant: "caption", children: `[debug info]
|
|
49
|
+
${JSON.stringify(selectedItem)}` })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
CurriculumBody
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-QHIQCYK2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex, Typo } from '@/atoms';\nimport { InfoCircledIcon } from '@/icon';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumVideo from './curriculum-video';\nimport CurriculumReview from './curriculum-review';\n\nexport function CurriculumBody(): React.ReactNode {\n const { selectedItem, selectedSectionTitle } = useCurriculumContext();\n\n switch (selectedItem.type) {\n case 'video':\n return <CurriculumVideo item={selectedItem} />;\n case 'review':\n return (\n <CurriculumReview\n item={selectedItem}\n sectionTitle={selectedSectionTitle?.title}\n />\n );\n default:\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n gap=\"2\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <InfoCircledIcon height={24} width={24} />\n <Typo>컨텐츠를 로딩 할 수 없습니다</Typo>\n <Typo align=\"center\" color=\"gray\" variant=\"caption\">\n {`[debug info]\n ${JSON.stringify(selectedItem)}`}\n </Typo>\n </Flex>\n );\n }\n} "],"mappings":";;;;;;;;;;;;;;;;;;;;AAYa,cAUL,YAVK;AALN,SAAS,iBAAkC;AAChD,QAAM,EAAE,cAAc,qBAAqB,IAAI,qBAAqB;AAEpE,UAAQ,aAAa,MAAM;AAAA,IACzB,KAAK;AACH,aAAO,oBAAC,4BAAgB,MAAM,cAAc;AAAA,IAC9C,KAAK;AACH,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,cAAc,6DAAsB;AAAA;AAAA,MACtC;AAAA,IAEJ;AACE,aACE;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,WAAU;AAAA,UACV,KAAI;AAAA,UACJ,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,OAAM;AAAA,UAEN;AAAA,gCAAC,mBAAgB,QAAQ,IAAI,OAAO,IAAI;AAAA,YACxC,oBAAC,QAAK,0FAAgB;AAAA,YACtB,oBAAC,QAAK,OAAM,UAAS,OAAM,QAAO,SAAQ,WACvC;AAAA,cACC,KAAK,UAAU,YAAY,CAAC,IAChC;AAAA;AAAA;AAAA,MACF;AAAA,EAEN;AACF;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
start_review_default
|
|
3
|
+
} from "./chunk-LVWBXOHL.js";
|
|
4
|
+
import {
|
|
5
|
+
ReviewQuestion_default
|
|
6
|
+
} from "./chunk-IWGZKHJL.js";
|
|
7
|
+
import {
|
|
8
|
+
complete_review_default
|
|
9
|
+
} from "./chunk-637SZITH.js";
|
|
10
|
+
import {
|
|
11
|
+
CurriculumReviewProvider,
|
|
12
|
+
useCurriculumReviewContext
|
|
13
|
+
} from "./chunk-EBGKFGME.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-RHQNIB5E.js.map
|