@tipp/ui 2.3.5 → 2.3.6
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 +86 -86
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +32 -32
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +32 -32
- package/dist/app/platform/curriculum-card.js +5 -5
- 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.map +1 -1
- package/dist/app/platform/edit-service-type.js +71 -71
- 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.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +32 -32
- 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.cjs.map +1 -1
- package/dist/app/platform/report-card.js +32 -32
- 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.map +1 -1
- package/dist/app/platform/session-card.js +73 -73
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +35 -35
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +32 -32
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +32 -32
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +31 -31
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/drawer.cjs +2 -3
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.js +1 -1
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs +2 -3
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +63 -63
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2USHC4PH.js +63 -0
- package/dist/chunk-2USHC4PH.js.map +1 -0
- package/dist/chunk-3APHALEN.js +64 -0
- package/dist/chunk-3APHALEN.js.map +1 -0
- package/dist/chunk-3KH45IO4.js +89 -0
- package/dist/chunk-3KH45IO4.js.map +1 -0
- package/dist/chunk-4HDV26QV.js +51 -0
- package/dist/chunk-4HDV26QV.js.map +1 -0
- package/dist/chunk-62HSZXVT.js +74 -0
- package/dist/chunk-62HSZXVT.js.map +1 -0
- package/dist/chunk-64XYTE54.js +64 -0
- package/dist/chunk-64XYTE54.js.map +1 -0
- package/dist/chunk-7ADTM2PV.js +87 -0
- package/dist/chunk-7ADTM2PV.js.map +1 -0
- package/dist/chunk-ABUC6VII.js +144 -0
- package/dist/chunk-ABUC6VII.js.map +1 -0
- package/dist/chunk-AHXS2MBK.js +57 -0
- package/dist/chunk-AHXS2MBK.js.map +1 -0
- package/dist/chunk-C2EZQALX.js +363 -0
- package/dist/chunk-C2EZQALX.js.map +1 -0
- package/dist/chunk-C6ZC7TXX.js +30 -0
- package/dist/chunk-C6ZC7TXX.js.map +1 -0
- package/dist/chunk-CTZQFO5H.js +196 -0
- package/dist/chunk-CTZQFO5H.js.map +1 -0
- package/dist/chunk-DSWR2Z7U.js +89 -0
- package/dist/chunk-DSWR2Z7U.js.map +1 -0
- package/dist/chunk-EEAHZCIK.js +94 -0
- package/dist/chunk-EEAHZCIK.js.map +1 -0
- package/dist/chunk-EGT45N6F.js +30 -0
- package/dist/chunk-EGT45N6F.js.map +1 -0
- package/dist/chunk-FV4BQOCL.js +61 -0
- package/dist/chunk-FV4BQOCL.js.map +1 -0
- package/dist/chunk-GNTZY4DG.js +151 -0
- package/dist/chunk-GNTZY4DG.js.map +1 -0
- package/dist/chunk-GOPYUYXS.js +99 -0
- package/dist/chunk-GOPYUYXS.js.map +1 -0
- package/dist/chunk-IAIOO5Z2.js +174 -0
- package/dist/chunk-IAIOO5Z2.js.map +1 -0
- package/dist/chunk-IUUORJE5.js +68 -0
- package/dist/chunk-IUUORJE5.js.map +1 -0
- package/dist/chunk-K3Q4XLCN.js +65 -0
- package/dist/chunk-K3Q4XLCN.js.map +1 -0
- package/dist/chunk-KTUCYAG7.js +51 -0
- package/dist/chunk-KTUCYAG7.js.map +1 -0
- package/dist/chunk-L6FMK2ZK.js +64 -0
- package/dist/chunk-L6FMK2ZK.js.map +1 -0
- package/dist/chunk-LMALEQCE.js +228 -0
- package/dist/chunk-LMALEQCE.js.map +1 -0
- package/dist/chunk-M6ZYONSH.js +169 -0
- package/dist/chunk-M6ZYONSH.js.map +1 -0
- package/dist/chunk-PHGGXL3R.js +196 -0
- package/dist/chunk-PHGGXL3R.js.map +1 -0
- package/dist/chunk-TVZB6XRW.js +165 -0
- package/dist/chunk-TVZB6XRW.js.map +1 -0
- package/dist/chunk-UAXYYUVG.js +69 -0
- package/dist/chunk-UAXYYUVG.js.map +1 -0
- package/dist/chunk-UZZXVLBJ.js +145 -0
- package/dist/chunk-UZZXVLBJ.js.map +1 -0
- package/dist/chunk-VK6INFSB.js +69 -0
- package/dist/chunk-VK6INFSB.js.map +1 -0
- package/dist/chunk-Y724ZBAT.js +61 -0
- package/dist/chunk-Y724ZBAT.js.map +1 -0
- package/dist/chunk-YLSOXSUS.js +117 -0
- package/dist/chunk-YLSOXSUS.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +135 -135
- 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.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +23 -23
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +26 -26
- 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.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +6 -6
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.js +36 -36
- 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.js +5 -5
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.js +64 -64
- 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 +1 -1
- package/src/atoms/drawer.tsx +2 -3
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DatePickerButton
|
|
3
|
+
} from "./chunk-XLTMDAE3.js";
|
|
4
|
+
import {
|
|
5
|
+
TimeSelect
|
|
6
|
+
} from "./chunk-7PF6I4RN.js";
|
|
7
|
+
import {
|
|
8
|
+
getTimeOption,
|
|
9
|
+
parseTimeOption
|
|
10
|
+
} from "./chunk-NWJSLIQ3.js";
|
|
11
|
+
import {
|
|
12
|
+
Form
|
|
13
|
+
} from "./chunk-2OMSNCRH.js";
|
|
14
|
+
import {
|
|
15
|
+
toast
|
|
16
|
+
} from "./chunk-EEKOTWBE.js";
|
|
17
|
+
import {
|
|
18
|
+
Separator
|
|
19
|
+
} from "./chunk-HYITAA4J.js";
|
|
20
|
+
import {
|
|
21
|
+
Grid
|
|
22
|
+
} from "./chunk-EGEQY3KT.js";
|
|
23
|
+
import {
|
|
24
|
+
Dialog
|
|
25
|
+
} from "./chunk-AH4A53SZ.js";
|
|
26
|
+
import {
|
|
27
|
+
Box
|
|
28
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
29
|
+
import {
|
|
30
|
+
Flex
|
|
31
|
+
} from "./chunk-25HMMI7R.js";
|
|
32
|
+
import {
|
|
33
|
+
Button
|
|
34
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
35
|
+
import {
|
|
36
|
+
__spreadProps,
|
|
37
|
+
__spreadValues
|
|
38
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
39
|
+
|
|
40
|
+
// src/app/platform/edit-coaching-time.tsx
|
|
41
|
+
import { useCallback, useState } from "react";
|
|
42
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
43
|
+
var getValueFromDefaultValue = (args) => {
|
|
44
|
+
return {
|
|
45
|
+
startTime: args.startAt ? getTimeOption(args.startAt) : "00:00",
|
|
46
|
+
endTime: args.endAt ? getTimeOption(args.endAt) : "00:00",
|
|
47
|
+
date: args.startAt || /* @__PURE__ */ new Date()
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
var getDateFromValue = (date, time) => {
|
|
51
|
+
const { hour, minute } = parseTimeOption(time);
|
|
52
|
+
return new Date(
|
|
53
|
+
date.getFullYear(),
|
|
54
|
+
date.getMonth(),
|
|
55
|
+
date.getDate(),
|
|
56
|
+
hour,
|
|
57
|
+
minute
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
function EditCoachingTime(props) {
|
|
61
|
+
const { defaultEndAt, defaultStartAt, onClickCancel } = props;
|
|
62
|
+
const [values, setValues] = useState(() => {
|
|
63
|
+
return getValueFromDefaultValue({
|
|
64
|
+
startAt: defaultStartAt,
|
|
65
|
+
endAt: defaultEndAt
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
const [timeError, setTimeError] = useState("");
|
|
69
|
+
const checkTimeError = useCallback(
|
|
70
|
+
(startTime, endTime) => {
|
|
71
|
+
const error = startTime >= endTime ? "\uC2DC\uC791\uC2DC\uAC04\uC744 \uC885\uB8CC\uC2DC\uAC04\uBCF4\uB2E4 \uBE60\uB974\uAC8C \uC120\uD0DD\uD574\uC8FC\uC138\uC694." : "";
|
|
72
|
+
if (error) {
|
|
73
|
+
setTimeError(error);
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
},
|
|
78
|
+
[]
|
|
79
|
+
);
|
|
80
|
+
const onChangeStartTime = useCallback(
|
|
81
|
+
(v) => {
|
|
82
|
+
checkTimeError(v, values.endTime);
|
|
83
|
+
setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
84
|
+
startTime: v
|
|
85
|
+
}));
|
|
86
|
+
},
|
|
87
|
+
[checkTimeError, values.endTime]
|
|
88
|
+
);
|
|
89
|
+
const onChangeEndTime = useCallback(
|
|
90
|
+
(v) => {
|
|
91
|
+
checkTimeError(values.startTime, v);
|
|
92
|
+
setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
93
|
+
endTime: v
|
|
94
|
+
}));
|
|
95
|
+
},
|
|
96
|
+
[checkTimeError, values.startTime]
|
|
97
|
+
);
|
|
98
|
+
const onChangeDate = useCallback((date) => {
|
|
99
|
+
date && setValues((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
100
|
+
date
|
|
101
|
+
}));
|
|
102
|
+
}, []);
|
|
103
|
+
const onClickSave = useCallback(() => {
|
|
104
|
+
if (checkTimeError(values.startTime, values.endTime)) {
|
|
105
|
+
const startAt = getDateFromValue(values.date, values.startTime);
|
|
106
|
+
const endAt = getDateFromValue(values.date, values.endTime);
|
|
107
|
+
props.onClickSave && props.onClickSave(startAt, endAt);
|
|
108
|
+
} else {
|
|
109
|
+
toast.error("\uC785\uB825 \uAC12\uC774 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
|
|
110
|
+
}
|
|
111
|
+
}, [checkTimeError, props, values.date, values.endTime, values.startTime]);
|
|
112
|
+
return /* @__PURE__ */ jsx(Box, { width: { initial: "100%" }, children: /* @__PURE__ */ jsxs(Form.Root, { children: [
|
|
113
|
+
/* @__PURE__ */ jsxs(Form.Field, { name: "date", children: [
|
|
114
|
+
/* @__PURE__ */ jsx(Form.Label, { variant: "caption", children: "\uB0A0\uC9DC" }),
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
DatePickerButton,
|
|
117
|
+
{
|
|
118
|
+
maxDate: /* @__PURE__ */ new Date(),
|
|
119
|
+
onChange: onChangeDate,
|
|
120
|
+
selected: values.date,
|
|
121
|
+
size: { initial: "large", xs: "medium" }
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsxs(
|
|
126
|
+
Grid,
|
|
127
|
+
{
|
|
128
|
+
align: "center",
|
|
129
|
+
columns: {
|
|
130
|
+
initial: "1fr 0 1fr",
|
|
131
|
+
xs: "1fr auto 1fr"
|
|
132
|
+
},
|
|
133
|
+
gapX: "3",
|
|
134
|
+
gapY: "2",
|
|
135
|
+
justify: "center",
|
|
136
|
+
mb: { initial: "5", xs: "4" },
|
|
137
|
+
mt: "5",
|
|
138
|
+
width: "100%",
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx(Form.Field, { name: "startTime", children: /* @__PURE__ */ jsx(Form.Label, { variant: "caption", children: "\uC2DC\uC791 \uC2DC\uAC04" }) }),
|
|
141
|
+
/* @__PURE__ */ jsx("div", {}),
|
|
142
|
+
/* @__PURE__ */ jsx(Form.Field, { name: "endTime", children: /* @__PURE__ */ jsx(Form.Label, { variant: "caption", children: "\uC885\uB8CC \uC2DC\uAC04" }) }),
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
TimeSelect,
|
|
145
|
+
{
|
|
146
|
+
onValueChange: onChangeStartTime,
|
|
147
|
+
size: { initial: "3", xs: "2" },
|
|
148
|
+
value: values.startTime
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsx(Box, { overflow: "hidden", children: /* @__PURE__ */ jsx(Separator, {}) }),
|
|
152
|
+
/* @__PURE__ */ jsx(
|
|
153
|
+
TimeSelect,
|
|
154
|
+
{
|
|
155
|
+
onValueChange: onChangeEndTime,
|
|
156
|
+
size: { initial: "3", xs: "2" },
|
|
157
|
+
value: values.endTime
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ jsx(Form.Field, { name: "startEndTime", style: { gridColumn: "1/span 3" }, children: /* @__PURE__ */ jsx(Form.Message, { forceMatch: Boolean(timeError), children: timeError }) })
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { onClick: onClickCancel, type: "button", variant: "outline", children: "\uCDE8\uC18C\uD558\uAE30" }) }),
|
|
166
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { onClick: onClickSave, type: "button", children: "\uC800\uC7A5\uD558\uAE30" }) })
|
|
167
|
+
] })
|
|
168
|
+
] }) });
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export {
|
|
172
|
+
EditCoachingTime
|
|
173
|
+
};
|
|
174
|
+
//# sourceMappingURL=chunk-IAIOO5Z2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/edit-coaching-time.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport {\n Button,\n Flex,\n Form,\n Grid,\n Separator,\n Box,\n toast,\n Dialog,\n} from '../../atoms';\nimport { DatePickerButton, TimeSelect } from '../../molecules';\nimport { getTimeOption, parseTimeOption } from '../../utils';\n\nexport interface EditCoachingTimeProps {\n defaultStartAt?: Date;\n defaultEndAt?: Date;\n onClickSave?: (startAt: Date, endAt: Date) => void;\n onClickCancel?: () => void;\n sessionNumber?: number;\n}\n\ninterface Values {\n startTime: string;\n endTime: string;\n date: Date;\n}\n\nconst getValueFromDefaultValue = (args: {\n startAt?: Date;\n endAt?: Date;\n}): Values => {\n return {\n startTime: args.startAt ? getTimeOption(args.startAt) : '00:00',\n endTime: args.endAt ? getTimeOption(args.endAt) : '00:00',\n date: args.startAt || new Date(),\n };\n};\n\nconst getDateFromValue = (date: Date, time: string): Date => {\n const { hour, minute } = parseTimeOption(time);\n return new Date(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n hour,\n minute\n );\n};\n\nexport function EditCoachingTime(\n props: EditCoachingTimeProps\n): React.ReactNode {\n const { defaultEndAt, defaultStartAt, onClickCancel } = props;\n\n const [values, setValues] = useState<Values>(() => {\n return getValueFromDefaultValue({\n startAt: defaultStartAt,\n endAt: defaultEndAt,\n });\n });\n\n const [timeError, setTimeError] = useState('');\n\n const checkTimeError = useCallback(\n (startTime: string, endTime: string): boolean => {\n const error =\n startTime >= endTime\n ? '시작시간을 종료시간보다 빠르게 선택해주세요.'\n : '';\n if (error) {\n setTimeError(error);\n return false;\n }\n return true;\n },\n []\n );\n\n const onChangeStartTime = useCallback(\n (v: string) => {\n checkTimeError(v, values.endTime);\n setValues((prev) => ({\n ...prev,\n startTime: v,\n }));\n },\n [checkTimeError, values.endTime]\n );\n\n const onChangeEndTime = useCallback(\n (v: string) => {\n checkTimeError(values.startTime, v);\n setValues((prev) => ({\n ...prev,\n endTime: v,\n }));\n },\n [checkTimeError, values.startTime]\n );\n\n const onChangeDate = useCallback((date: Date | null) => {\n date &&\n setValues((prev) => ({\n ...prev,\n date,\n }));\n }, []);\n\n const onClickSave = useCallback(() => {\n if (checkTimeError(values.startTime, values.endTime)) {\n const startAt = getDateFromValue(values.date, values.startTime);\n const endAt = getDateFromValue(values.date, values.endTime);\n props.onClickSave && props.onClickSave(startAt, endAt);\n } else {\n toast.error('입력 값이 유효하지 않습니다.');\n }\n }, [checkTimeError, props, values.date, values.endTime, values.startTime]);\n\n return (\n <Box width={{ initial: '100%' }}>\n <Form.Root>\n <Form.Field name=\"date\">\n <Form.Label variant=\"caption\">날짜</Form.Label>\n <DatePickerButton\n maxDate={new Date()}\n onChange={onChangeDate}\n selected={values.date}\n size={{ initial: 'large', xs: 'medium' }}\n />\n </Form.Field>\n <Grid\n align=\"center\"\n columns={{\n initial: '1fr 0 1fr',\n xs: '1fr auto 1fr',\n }}\n gapX=\"3\"\n gapY=\"2\"\n justify=\"center\"\n mb={{ initial: '5', xs: '4' }}\n mt=\"5\"\n width=\"100%\"\n >\n <Form.Field name=\"startTime\">\n <Form.Label variant=\"caption\">시작 시간</Form.Label>\n </Form.Field>\n <div />\n <Form.Field name=\"endTime\">\n <Form.Label variant=\"caption\">종료 시간</Form.Label>\n </Form.Field>\n <TimeSelect\n onValueChange={onChangeStartTime}\n size={{ initial: '3', xs: '2' }}\n value={values.startTime}\n />\n <Box overflow=\"hidden\">\n <Separator />\n </Box>\n\n <TimeSelect\n onValueChange={onChangeEndTime}\n size={{ initial: '3', xs: '2' }}\n value={values.endTime}\n />\n <Form.Field name=\"startEndTime\" style={{ gridColumn: '1/span 3' }}>\n <Form.Message forceMatch={Boolean(timeError)}>\n {timeError}\n </Form.Message>\n </Form.Field>\n </Grid>\n <Flex gap=\"3\" justify=\"end\">\n <Dialog.Close>\n <Button onClick={onClickCancel} type=\"button\" variant=\"outline\">\n 취소하기\n </Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button onClick={onClickSave} type=\"button\">\n 저장하기\n </Button>\n </Dialog.Close>\n </Flex>\n </Form.Root>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,gBAAgB;AA0HrC,SACE,KADF;AA9FR,IAAM,2BAA2B,CAAC,SAGpB;AACZ,SAAO;AAAA,IACL,WAAW,KAAK,UAAU,cAAc,KAAK,OAAO,IAAI;AAAA,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AK,WACf,8BAAC,KAAK,OAAL,EAAW,SAAQ,WAAU,uCAAK,GACrC;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,eAAe;AAAA,cACf,MAAM,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,cAC9B,OAAO,OAAO;AAAA;AAAA,UAChB;AAAA,UACA,oBAAC,OAAI,UAAS,UACZ,8BAAC,aAAU,GACb;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,eAAe;AAAA,cACf,MAAM,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,cAC9B,OAAO,OAAO;AAAA;AAAA,UAChB;AAAA,UACA,oBAAC,KAAK,OAAL,EAAW,MAAK,gBAAe,OAAO,EAAE,YAAY,WAAW,GAC9D,8BAAC,KAAK,SAAL,EAAa,YAAY,QAAQ,SAAS,GACxC,qBACH,GACF;AAAA;AAAA;AAAA,IACF;AAAA,IACA,qBAAC,QAAK,KAAI,KAAI,SAAQ,OACpB;AAAA,0BAAC,OAAO,OAAP,EACC,8BAAC,UAAO,SAAS,eAAe,MAAK,UAAS,SAAQ,WAAU,sCAEhE,GACF;AAAA,MACA,oBAAC,OAAO,OAAP,EACC,8BAAC,UAAO,SAAS,aAAa,MAAK,UAAS,sCAE5C,GACF;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Heading
|
|
3
|
+
} from "./chunk-BESTU2AY.js";
|
|
4
|
+
import {
|
|
5
|
+
Card
|
|
6
|
+
} from "./chunk-RP2RGCAW.js";
|
|
7
|
+
import {
|
|
8
|
+
Box
|
|
9
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
10
|
+
import {
|
|
11
|
+
Typo
|
|
12
|
+
} from "./chunk-PMJIFLDT.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
Button
|
|
18
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
19
|
+
import {
|
|
20
|
+
DownloadIcon
|
|
21
|
+
} from "./chunk-R7IT4TCD.js";
|
|
22
|
+
|
|
23
|
+
// src/app/platform/report-card.tsx
|
|
24
|
+
import { useCallback } from "react";
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
function ReportCard(props) {
|
|
27
|
+
const { title, file, status, subtitle } = props;
|
|
28
|
+
const onClickDownload = useCallback(() => {
|
|
29
|
+
if (!file) return;
|
|
30
|
+
const { url, fileName } = file;
|
|
31
|
+
const link = document.createElement("a");
|
|
32
|
+
link.href = url;
|
|
33
|
+
link.download = fileName;
|
|
34
|
+
link.target = "_blank";
|
|
35
|
+
document.body.appendChild(link);
|
|
36
|
+
link.click();
|
|
37
|
+
document.body.removeChild(link);
|
|
38
|
+
}, [file]);
|
|
39
|
+
if (status) {
|
|
40
|
+
return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading4", children: title }),
|
|
42
|
+
status
|
|
43
|
+
] }) });
|
|
44
|
+
}
|
|
45
|
+
return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(
|
|
46
|
+
Flex,
|
|
47
|
+
{
|
|
48
|
+
direction: { initial: "column", xs: "row" },
|
|
49
|
+
gapY: "2",
|
|
50
|
+
justify: "between",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading4", children: title }),
|
|
54
|
+
subtitle ? /* @__PURE__ */ jsx(Typo, { color: "gray", children: subtitle }) : null
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickDownload, variant: "surface", children: /* @__PURE__ */ jsxs(Flex, { gap: "2", width: "100%", children: [
|
|
57
|
+
/* @__PURE__ */ jsx(DownloadIcon, {}),
|
|
58
|
+
file == null ? void 0 : file.buttonName
|
|
59
|
+
] }) }, file == null ? void 0 : file.url)
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
) });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export {
|
|
66
|
+
ReportCard
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=chunk-IUUORJE5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/report-card.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Box, Button, Card, Flex, Heading, Typo } from '@/atoms';\nimport type { Attachment } from '@/molecules';\nimport { DownloadIcon } from '@/icon';\n\ntype File = Attachment & { buttonName: string };\nexport interface ReportCardProps {\n title?: string;\n file?: File;\n status?: React.ReactNode;\n subtitle?: string;\n}\n\nexport function ReportCard(props: ReportCardProps): React.ReactNode {\n const { title, file, status, subtitle } = props;\n\n const onClickDownload = useCallback(() => {\n if (!file) return;\n const { url, fileName } = file;\n const link = document.createElement('a');\n link.href = url;\n link.download = fileName;\n link.target = '_blank';\n\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }, [file]);\n\n if (status) {\n return (\n <Card>\n <Flex align=\"center\" justify=\"between\">\n <Heading variant=\"heading4\">{title}</Heading>\n {status}\n </Flex>\n </Card>\n );\n }\n\n return (\n <Card>\n <Flex\n direction={{ initial: 'column', xs: 'row' }}\n gapY=\"2\"\n justify=\"between\"\n >\n <Box>\n <Heading variant=\"heading4\">{title}</Heading>\n {subtitle ? <Typo color=\"gray\">{subtitle}</Typo> : null}\n </Box>\n <Button key={file?.url} onClick={onClickDownload} variant=\"surface\">\n <Flex gap=\"2\" width=\"100%\">\n <DownloadIcon />\n {file?.buttonName}\n </Flex>\n </Button>\n </Flex>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,mBAAmB;AAgC3B,SACE,KADF;AAnBD,SAAS,WAAW,OAAyC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|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
import {
|
|
14
|
+
AspectRatio
|
|
15
|
+
} from "./chunk-EAXUQEO5.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/curriculum-v2-layout.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function CurriculumV2Layout(props) {
|
|
20
|
+
const { NavBar, Contents, SideBar, SideNav, style } = props;
|
|
21
|
+
return /* @__PURE__ */ jsxs(Grid, { align: "center", height: "100%", rows: "auto 1px 1fr", style, width: "100%", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Flex,
|
|
24
|
+
{
|
|
25
|
+
align: "center",
|
|
26
|
+
height: { initial: "40px", md: "64px" },
|
|
27
|
+
width: "100%",
|
|
28
|
+
children: NavBar
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" }),
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
Flex,
|
|
34
|
+
{
|
|
35
|
+
align: "center",
|
|
36
|
+
height: "100%",
|
|
37
|
+
justify: "center",
|
|
38
|
+
overflow: "hidden",
|
|
39
|
+
width: "100%",
|
|
40
|
+
children: /* @__PURE__ */ jsxs(
|
|
41
|
+
Grid,
|
|
42
|
+
{
|
|
43
|
+
columns: { initial: "1", md: "1fr 340px" },
|
|
44
|
+
height: "100%",
|
|
45
|
+
maxWidth: "1440px",
|
|
46
|
+
rows: { initial: "auto 1fr", md: "auto" },
|
|
47
|
+
width: "100%",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsxs(Box, { height: "100%", width: "100%", children: [
|
|
50
|
+
/* @__PURE__ */ jsx(AspectRatio, { ratio: 16 / 9, children: Contents }),
|
|
51
|
+
SideNav
|
|
52
|
+
] }),
|
|
53
|
+
SideBar
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export {
|
|
63
|
+
CurriculumV2Layout
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=chunk-K3Q4XLCN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/curriculum-v2-layout.tsx"],"sourcesContent":["import React from 'react'; \nimport { Box } from '@/atoms/box';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Separator } from '@/atoms/separator';\nimport { AspectRatio } from '@/atoms/aspect-ratio';\n\nexport function CurriculumV2Layout(props: {\n NavBar: React.ReactNode;\n SideBar: React.ReactNode;\n Contents: React.ReactNode;\n SideNav: React.ReactNode;\n style?: React.CSSProperties;\n}): React.ReactNode {\n const { NavBar, Contents, SideBar, SideNav, style } = props;\n\n return (\n <Grid align=\"center\" height=\"100%\" rows=\"auto 1px 1fr\" style={style} width=\"100%\">\n <Flex\n align=\"center\"\n height={{ initial: '40px', md: '64px' }}\n width=\"100%\"\n >\n {NavBar}\n </Flex>\n <Separator size=\"4\" />\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n overflow=\"hidden\"\n width=\"100%\"\n >\n <Grid\n columns={{ initial: '1', md: '1fr 340px' }}\n height=\"100%\"\n maxWidth=\"1440px\"\n rows={{ initial: 'auto 1fr', md: 'auto' }}\n width=\"100%\"\n >\n <Box height=\"100%\" width=\"100%\">\n <AspectRatio ratio={16 / 9}>{Contents}</AspectRatio>\n {SideNav}\n </Box>\n {SideBar}\n </Grid>\n </Flex>\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBM,cAsBI,YAtBJ;AAXC,SAAS,mBAAmB,OAMf;AAClB,QAAM,EAAE,QAAQ,UAAU,SAAS,SAAS,MAAM,IAAI;AAEtD,SACE,qBAAC,QAAK,OAAM,UAAS,QAAO,QAAO,MAAK,gBAAe,OAAc,OAAM,QACzE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAQ,EAAE,SAAS,QAAQ,IAAI,OAAO;AAAA,QACtC,OAAM;AAAA,QAEL;AAAA;AAAA,IACH;AAAA,IACA,oBAAC,aAAU,MAAK,KAAI;AAAA,IACpB;AAAA,MAAC;AAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAO;AAAA,QACP,SAAQ;AAAA,QACR,UAAS;AAAA,QACT,OAAM;AAAA,QAEN;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,EAAE,SAAS,KAAK,IAAI,YAAY;AAAA,YACzC,QAAO;AAAA,YACP,UAAS;AAAA,YACT,MAAM,EAAE,SAAS,YAAY,IAAI,OAAO;AAAA,YACxC,OAAM;AAAA,YAEN;AAAA,mCAAC,OAAI,QAAO,QAAO,OAAM,QACvB;AAAA,oCAAC,eAAY,OAAO,KAAK,GAAI,oBAAS;AAAA,gBACrC;AAAA,iBACH;AAAA,cACC;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
section_title_default
|
|
3
|
+
} from "./chunk-4TST4UK5.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_sidebar_item_wrapper_default
|
|
6
|
+
} from "./chunk-WS7IOHVK.js";
|
|
7
|
+
import {
|
|
8
|
+
section_item_default
|
|
9
|
+
} from "./chunk-6L4OTKID.js";
|
|
10
|
+
import {
|
|
11
|
+
getCurriculumIconColor
|
|
12
|
+
} from "./chunk-JF7JAMOQ.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-KTUCYAG7.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,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_review_default
|
|
3
|
+
} from "./chunk-CTZQFO5H.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_video_default
|
|
6
|
+
} from "./chunk-QGKQ3IX7.js";
|
|
7
|
+
import {
|
|
8
|
+
curriculum_ai_traning_default
|
|
9
|
+
} from "./chunk-B6A7IIYJ.js";
|
|
10
|
+
import {
|
|
11
|
+
useCurriculumContext
|
|
12
|
+
} from "./chunk-IYQJIEVM.js";
|
|
13
|
+
import {
|
|
14
|
+
Typo
|
|
15
|
+
} from "./chunk-PMJIFLDT.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
InfoCircledIcon
|
|
21
|
+
} from "./chunk-R7IT4TCD.js";
|
|
22
|
+
|
|
23
|
+
// src/molecules/curriculumV2/CurriculumContents/index.tsx
|
|
24
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
|
+
function CurriculumBody() {
|
|
26
|
+
const { selectedItem, selectedSectionTitle } = useCurriculumContext();
|
|
27
|
+
switch (selectedItem.type) {
|
|
28
|
+
case "video":
|
|
29
|
+
return /* @__PURE__ */ jsx(curriculum_video_default, { item: selectedItem });
|
|
30
|
+
case "review":
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
curriculum_review_default,
|
|
33
|
+
{
|
|
34
|
+
item: selectedItem,
|
|
35
|
+
sectionTitle: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
case "aiTraining":
|
|
39
|
+
return /* @__PURE__ */ jsx(curriculum_ai_traning_default, { item: selectedItem });
|
|
40
|
+
default:
|
|
41
|
+
return /* @__PURE__ */ jsxs(
|
|
42
|
+
Flex,
|
|
43
|
+
{
|
|
44
|
+
align: "center",
|
|
45
|
+
direction: "column",
|
|
46
|
+
gap: "2",
|
|
47
|
+
height: "100%",
|
|
48
|
+
justify: "center",
|
|
49
|
+
width: "100%",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(InfoCircledIcon, { height: 24, width: 24 }),
|
|
52
|
+
/* @__PURE__ */ jsx(Typo, { children: "\uCEE8\uD150\uCE20\uB97C \uB85C\uB529 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4" }),
|
|
53
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", color: "gray", variant: "caption", children: `[debug info]
|
|
54
|
+
${JSON.stringify(selectedItem)}` })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
CurriculumBody
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=chunk-L6FMK2ZK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex } from '@/atoms/flex';\nimport { Typo } from '@/atoms/typo';\nimport { InfoCircledIcon } from '@/icon';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumVideo from './curriculum-video';\nimport CurriculumReview from './curriculum-review';\nimport CurriculumAiTraning from './curriculum-ai-traning';\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 case 'aiTraining':\n return <CurriculumAiTraning item={selectedItem}/>\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":";;;;;;;;;;;;;;;;;;;;;;;AAca,cAYL,YAZK;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,IAEF,KAAK;AACH,aAAO,oBAAC,iCAAoB,MAAM,cAAa;AAAA,IACnD;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":[]}
|