@tipp/ui 2.2.4 → 2.2.5
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.js +58 -58
- package/dist/app/platform/coach-question-list.js +13 -13
- package/dist/app/platform/contents-card.js +13 -13
- package/dist/app/platform/curriculum-card.js +2 -2
- package/dist/app/platform/edit-coaching-time.js +44 -44
- package/dist/app/platform/edit-service-type.js +45 -45
- package/dist/app/platform/goal-manage-card-edit.js +44 -44
- package/dist/app/platform/goal-manage-card-read.js +13 -13
- package/dist/app/platform/on-offline-radio-card.js +44 -44
- package/dist/app/platform/report-card.js +13 -13
- package/dist/app/platform/reservation-card.js +45 -45
- package/dist/app/platform/session-card.js +47 -47
- package/dist/app/platform/session-review-simple-read.js +13 -13
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +15 -15
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +12 -12
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +13 -13
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +13 -13
- package/dist/app/platform/userInfos/session-user-info-detail.js +12 -12
- package/dist/app/platform/userInfos/utils.js +12 -12
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/ellipsis-tooltip.js +1 -1
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +21 -21
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +2 -2
- package/dist/chunk-2EKJPYGD.js +174 -0
- package/dist/chunk-2EKJPYGD.js.map +1 -0
- package/dist/chunk-2KFV54AU.js +54 -0
- package/dist/chunk-2KFV54AU.js.map +1 -0
- package/dist/chunk-3JBUZARN.js +101 -0
- package/dist/chunk-3JBUZARN.js.map +1 -0
- package/dist/chunk-45X5XMXT.js +63 -0
- package/dist/chunk-45X5XMXT.js.map +1 -0
- package/dist/chunk-4MQZPFOZ.js +64 -0
- package/dist/chunk-4MQZPFOZ.js.map +1 -0
- package/dist/chunk-6JZ6TPS5.js +64 -0
- package/dist/chunk-6JZ6TPS5.js.map +1 -0
- package/dist/chunk-7ONOC43V.js +117 -0
- package/dist/chunk-7ONOC43V.js.map +1 -0
- package/dist/chunk-B3LFHDAT.js +125 -0
- package/dist/chunk-B3LFHDAT.js.map +1 -0
- package/dist/chunk-BCXYYONJ.js +89 -0
- package/dist/chunk-BCXYYONJ.js.map +1 -0
- package/dist/chunk-DITJZWCB.js +196 -0
- package/dist/chunk-DITJZWCB.js.map +1 -0
- package/dist/chunk-DIUGTP23.js +69 -0
- package/dist/chunk-DIUGTP23.js.map +1 -0
- package/dist/chunk-DO6YRVER.js +79 -0
- package/dist/chunk-DO6YRVER.js.map +1 -0
- package/dist/chunk-EK3J7G4V.js +196 -0
- package/dist/chunk-EK3J7G4V.js.map +1 -0
- package/dist/chunk-F5HWZHWW.js +53 -0
- package/dist/chunk-F5HWZHWW.js.map +1 -0
- package/dist/chunk-GQM2RAIS.js +89 -0
- package/dist/chunk-GQM2RAIS.js.map +1 -0
- package/dist/chunk-J2HASYO5.js +231 -0
- package/dist/chunk-J2HASYO5.js.map +1 -0
- package/dist/chunk-KNKAT3EG.js +74 -0
- package/dist/chunk-KNKAT3EG.js.map +1 -0
- package/dist/chunk-L3YH4VUE.js +151 -0
- package/dist/chunk-L3YH4VUE.js.map +1 -0
- package/dist/chunk-MY43WAJ3.js +363 -0
- package/dist/chunk-MY43WAJ3.js.map +1 -0
- package/dist/chunk-MZ4W247M.js +163 -0
- package/dist/chunk-MZ4W247M.js.map +1 -0
- package/dist/chunk-NXPGGAS7.js +145 -0
- package/dist/chunk-NXPGGAS7.js.map +1 -0
- package/dist/chunk-PIF5DEYP.js +70 -0
- package/dist/chunk-PIF5DEYP.js.map +1 -0
- package/dist/chunk-PT2BAFSQ.js +63 -0
- package/dist/chunk-PT2BAFSQ.js.map +1 -0
- package/dist/chunk-REFL3FLX.js +30 -0
- package/dist/chunk-REFL3FLX.js.map +1 -0
- package/dist/chunk-RI4BA76U.js +68 -0
- package/dist/chunk-RI4BA76U.js.map +1 -0
- package/dist/chunk-S6BLMT3I.js +63 -0
- package/dist/chunk-S6BLMT3I.js.map +1 -0
- package/dist/chunk-XK3S7QEH.js +192 -0
- package/dist/chunk-XK3S7QEH.js.map +1 -0
- package/dist/chunk-XKI5B4P4.js +165 -0
- package/dist/chunk-XKI5B4P4.js.map +1 -0
- package/dist/chunk-Z45NDW7D.js +228 -0
- package/dist/chunk-Z45NDW7D.js.map +1 -0
- package/dist/chunk-ZWX7AOUQ.js +144 -0
- package/dist/chunk-ZWX7AOUQ.js.map +1 -0
- package/dist/index.css +4 -0
- package/dist/index.js +79 -79
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +19 -19
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +15 -15
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +14 -14
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +14 -14
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +14 -14
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +24 -24
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +27 -27
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +14 -14
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-title.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +16 -16
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +15 -15
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +12 -12
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +13 -13
- package/dist/molecules/curriculumV2/index.js +32 -32
- package/dist/molecules/date-picker/date-picker-button.js +14 -14
- package/dist/molecules/date-picker/index.js +13 -13
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-form.js +12 -12
- package/dist/molecules/expand-table/index.js +13 -13
- package/dist/molecules/expand-table/row.js +12 -12
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +1 -1
- package/dist/molecules/index.js +49 -49
- package/dist/molecules/learning-post.js +3 -3
- package/dist/molecules/navigation.js +13 -13
- package/dist/molecules/radio-button-card.js +13 -13
- package/dist/molecules/stepper.js +2 -2
- package/dist/molecules/tag-selector.js +13 -13
- package/dist/molecules/time-select.js +12 -12
- package/package.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DatePickerButton
|
|
3
|
+
} from "./chunk-S6BLMT3I.js";
|
|
4
|
+
import {
|
|
5
|
+
TimeSelect
|
|
6
|
+
} from "./chunk-W4SJNIHN.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
|
+
Grid
|
|
19
|
+
} from "./chunk-EGEQY3KT.js";
|
|
20
|
+
import {
|
|
21
|
+
Dialog
|
|
22
|
+
} from "./chunk-OURS6IRY.js";
|
|
23
|
+
import {
|
|
24
|
+
Separator
|
|
25
|
+
} from "./chunk-HYITAA4J.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-EBBSXNIL.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-2EKJPYGD.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,IACxD,SAAS,KAAK,QAAQ,cAAc,KAAK,KAAK,IAAI;AAAA,IAClD,MAAM,KAAK,WAAW,oBAAI,KAAK;AAAA,EACjC;AACF;AAEA,IAAM,mBAAmB,CAAC,MAAY,SAAuB;AAC3D,QAAM,EAAE,MAAM,OAAO,IAAI,gBAAgB,IAAI;AAC7C,SAAO,IAAI;AAAA,IACT,KAAK,YAAY;AAAA,IACjB,KAAK,SAAS;AAAA,IACd,KAAK,QAAQ;AAAA,IACb;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,iBACd,OACiB;AACjB,QAAM,EAAE,cAAc,gBAAgB,cAAc,IAAI;AAExD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAiB,MAAM;AACjD,WAAO,yBAAyB;AAAA,MAC9B,SAAS;AAAA,MACT,OAAO;AAAA,IACT,CAAC;AAAA,EACH,CAAC;AAED,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,EAAE;AAE7C,QAAM,iBAAiB;AAAA,IACrB,CAAC,WAAmB,YAA6B;AAC/C,YAAM,QACJ,aAAa,UACT,iIACA;AACN,UAAI,OAAO;AACT,qBAAa,KAAK;AAClB,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AAEA,QAAM,oBAAoB;AAAA,IACxB,CAAC,MAAc;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
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnOfflineRadioCard
|
|
3
|
+
} from "./chunk-DBE4YSUS.js";
|
|
4
|
+
import {
|
|
5
|
+
Dialog
|
|
6
|
+
} from "./chunk-OURS6IRY.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-EBBSXNIL.js";
|
|
19
|
+
|
|
20
|
+
// src/app/platform/edit-service-type.tsx
|
|
21
|
+
import { useCallback, useState } from "react";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
function EditServiceType(props) {
|
|
24
|
+
const { defaultServiceType, onClickCancel } = props;
|
|
25
|
+
const [sessionType, setSessionType] = useState(
|
|
26
|
+
defaultServiceType
|
|
27
|
+
);
|
|
28
|
+
const onClickSave = useCallback(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = props.onClickSave) == null ? void 0 : _a.call(props, sessionType);
|
|
31
|
+
}, [props, sessionType]);
|
|
32
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Typo,
|
|
35
|
+
{
|
|
36
|
+
as: "p",
|
|
37
|
+
color: "gray",
|
|
38
|
+
mb: { initial: "5", xs: "3" },
|
|
39
|
+
variant: "caption",
|
|
40
|
+
children: "\uC138\uC158 \uC720\uD615\uC5D0 \uB530\uB77C \uCC45\uC815\uB418\uB294 \uCF54\uCE6D \uAE08\uC561\uC774 \uB2EC\uB77C\uC9C0\uBBC0\uB85C, \uC815\uD655\uD558\uAC8C \uC120\uD0DD\uD574\uC8FC\uC138\uC694"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(OnOfflineRadioCard, { onValueChange: setSessionType, value: sessionType }),
|
|
44
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", mt: { initial: "6", xs: "3" }, children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { color: "gray", onClick: onClickCancel, variant: "outline", children: "\uCDE8\uC18C\uD558\uAE30" }) }),
|
|
46
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { onClick: onClickSave, children: "\uC800\uC7A5\uD558\uAE30" }) })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
EditServiceType
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-2KFV54AU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/edit-service-type.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Box, Button, Dialog, Flex, Typo } from '@/atoms';\nimport type { ServiceType } from '@/types/biz.type';\nimport { OnOfflineRadioCard } from './on-offline-radio-card';\n\nexport interface EditServiceTypeProps {\n defaultServiceType?: ServiceType;\n onClickSave?: (serviceType: ServiceType) => void;\n onClickCancel?: () => void;\n}\n\nexport function EditServiceType(\n props: EditServiceTypeProps\n): React.ReactNode {\n const { defaultServiceType, onClickCancel } = props;\n const [sessionType, setSessionType] = useState<string | undefined>(\n defaultServiceType\n );\n\n const onClickSave = useCallback(() => {\n props.onClickSave?.(sessionType as ServiceType);\n }, [props, sessionType]);\n\n return (\n <Box>\n <Typo\n as=\"p\"\n color=\"gray\"\n mb={{ initial: '5', xs: '3' }}\n variant=\"caption\"\n >\n 세션 유형에 따라 책정되는 코칭 금액이 달라지므로, 정확하게 선택해주세요\n </Typo>\n <OnOfflineRadioCard onValueChange={setSessionType} value={sessionType} />\n <Flex gap=\"3\" justify=\"end\" mt={{ initial: '6', xs: '3' }}>\n <Dialog.Close>\n <Button color=\"gray\" onClick={onClickCancel} variant=\"outline\">\n 취소하기\n </Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button onClick={onClickSave}>저장하기</Button>\n </Dialog.Close>\n </Flex>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,gBAAgB;AAyBvC,cASA,YATA;AAdC,SAAS,gBACd,OACiB;AACjB,QAAM,EAAE,oBAAoB,cAAc,IAAI;AAC9C,QAAM,CAAC,aAAa,cAAc,IAAI;AAAA,IACpC;AAAA,EACF;AAEA,QAAM,cAAc,YAAY,MAAM;AAnBxC;AAoBI,gBAAM,gBAAN,+BAAoB;AAAA,EACtB,GAAG,CAAC,OAAO,WAAW,CAAC;AAEvB,SACE,qBAAC,OACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,OAAM;AAAA,QACN,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,QAC5B,SAAQ;AAAA,QACT;AAAA;AAAA,IAED;AAAA,IACA,oBAAC,sBAAmB,eAAe,gBAAgB,OAAO,aAAa;AAAA,IACvE,qBAAC,QAAK,KAAI,KAAI,SAAQ,OAAM,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI,GACtD;AAAA,0BAAC,OAAO,OAAP,EACC,8BAAC,UAAO,OAAM,QAAO,SAAS,eAAe,SAAQ,WAAU,sCAE/D,GACF;AAAA,MACA,oBAAC,OAAO,OAAP,EACC,8BAAC,UAAO,SAAS,aAAa,sCAAI,GACpC;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-M2JJZ3OO.js";
|
|
4
|
+
import {
|
|
5
|
+
RadioButtonCard
|
|
6
|
+
} from "./chunk-74TRRGWW.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
Card
|
|
12
|
+
} from "./chunk-RP2RGCAW.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-EBBSXNIL.js";
|
|
25
|
+
|
|
26
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx
|
|
27
|
+
import { useCallback, useMemo, useState } from "react";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
var correctAnswerStyle = {
|
|
30
|
+
backgroundColor: "var(--green-a2)"
|
|
31
|
+
};
|
|
32
|
+
function ReviewQuestionRadio(props) {
|
|
33
|
+
const { question, answer, onChange } = props;
|
|
34
|
+
const [isCheckAnswer, setIsCheckAnswer] = useState(false);
|
|
35
|
+
const checkAnswer = useCallback(() => {
|
|
36
|
+
setIsCheckAnswer(true);
|
|
37
|
+
}, []);
|
|
38
|
+
const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;
|
|
39
|
+
const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;
|
|
40
|
+
const radioColor = useMemo(() => {
|
|
41
|
+
if (isCorrect) return "green";
|
|
42
|
+
if (isWrong) return "red";
|
|
43
|
+
return void 0;
|
|
44
|
+
}, [isCorrect, isWrong]);
|
|
45
|
+
return /* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "auto 1fr", width: "100%", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Card, { mb: "4", size: "2", children: /* @__PURE__ */ jsx(
|
|
47
|
+
ReviewQuestionContentHeader,
|
|
48
|
+
{
|
|
49
|
+
icon: question.icon,
|
|
50
|
+
question: question.question,
|
|
51
|
+
title: question.title,
|
|
52
|
+
type: question.type
|
|
53
|
+
}
|
|
54
|
+
) }),
|
|
55
|
+
/* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "1fr auto", width: "100%", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Box, { position: "relative", children: /* @__PURE__ */ jsx(
|
|
57
|
+
RadioButtonCard.Root,
|
|
58
|
+
{
|
|
59
|
+
color: radioColor,
|
|
60
|
+
onValueChange: onChange,
|
|
61
|
+
style: {
|
|
62
|
+
width: "100%",
|
|
63
|
+
height: "100%",
|
|
64
|
+
overflowY: "auto",
|
|
65
|
+
position: "absolute"
|
|
66
|
+
},
|
|
67
|
+
value: answer,
|
|
68
|
+
children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", width: "100%", children: question.options.map((option, i) => {
|
|
69
|
+
const isThisOptionCorrect = isCheckAnswer && i === question.correctAnswer;
|
|
70
|
+
const isThisOptionSelected = isCheckAnswer && i === Number(answer);
|
|
71
|
+
const isThisOptionWrong = isCheckAnswer && isThisOptionSelected && i !== question.correctAnswer;
|
|
72
|
+
const style = (() => {
|
|
73
|
+
if (isThisOptionCorrect) return correctAnswerStyle;
|
|
74
|
+
return {};
|
|
75
|
+
})();
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
RadioButtonCard.Item,
|
|
78
|
+
{
|
|
79
|
+
style,
|
|
80
|
+
value: i.toString(),
|
|
81
|
+
children: /* @__PURE__ */ jsxs(Box, { children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", children: option.label }),
|
|
83
|
+
isThisOptionCorrect ? /* @__PURE__ */ jsx(Typo, { color: "green", children: "\uC815\uB2F5\uC785\uB2C8\uB2E4" }) : null,
|
|
84
|
+
isThisOptionWrong ? /* @__PURE__ */ jsx(Typo, { color: "red", children: "\uC815\uB2F5\uC774 \uC544\uB2D9\uB2C8\uB2E4" }) : null
|
|
85
|
+
] })
|
|
86
|
+
},
|
|
87
|
+
`${option.label}-${i}`
|
|
88
|
+
);
|
|
89
|
+
}) })
|
|
90
|
+
}
|
|
91
|
+
) }),
|
|
92
|
+
/* @__PURE__ */ jsx(Flex, { justify: "end", mt: "2", children: /* @__PURE__ */ jsx(Button, { onClick: checkAnswer, children: "\uC815\uB2F5 \uD655\uC778" }) })
|
|
93
|
+
] })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
var review_question_radio_default = ReviewQuestionRadio;
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
review_question_radio_default
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=chunk-3JBUZARN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Box, Button, Card, Flex, Grid, Typo } from '@/atoms';\nimport { type CurriculumReviewQuestionRadio } from '@/types/curriculumContents.type'; \nimport { RadioButtonCard } from \"../../../../radio-button-card\";\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionRadioProps {\n question: CurriculumReviewQuestionRadio;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nconst correctAnswerStyle: React.CSSProperties = {\n backgroundColor: 'var(--green-a2)',\n};\n\nfunction ReviewQuestionRadio(props: ReviewQuestionRadioProps): React.ReactNode {\n const { question, answer, onChange } = props;\n const [isCheckAnswer, setIsCheckAnswer] = useState(false);\n\n const checkAnswer = useCallback(() => {\n setIsCheckAnswer(true);\n }, []);\n\n const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;\n const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;\n const radioColor = useMemo(() => {\n if (isCorrect) return 'green';\n if (isWrong) return 'red';\n return undefined;\n }, [isCorrect, isWrong]);\n\n return (\n <Grid height=\"100%\" rows=\"auto 1fr\" width=\"100%\">\n <Card mb=\"4\" size=\"2\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={question.question}\n title={question.title}\n type={question.type}\n />\n </Card>\n\n <Grid height=\"100%\" rows=\"1fr auto\" width=\"100%\">\n <Box position=\"relative\">\n <RadioButtonCard.Root\n color={radioColor}\n onValueChange={onChange}\n style={{\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n position: 'absolute',\n }}\n value={answer}\n >\n <Flex direction=\"column\" gap=\"2\" width=\"100%\">\n {question.options.map((option, i) => {\n const isThisOptionCorrect =\n isCheckAnswer && i === question.correctAnswer;\n const isThisOptionSelected =\n isCheckAnswer && i === Number(answer);\n const isThisOptionWrong =\n isCheckAnswer &&\n isThisOptionSelected &&\n i !== question.correctAnswer;\n const style = (() => {\n if (isThisOptionCorrect) return correctAnswerStyle;\n return {};\n })();\n\n return (\n <RadioButtonCard.Item\n // eslint-disable-next-line react/no-array-index-key -- 조합 키로 중복 회피\n key={`${option.label}-${i}`}\n style={style}\n value={i.toString()}\n >\n <Box>\n <Typo as=\"p\">{option.label}</Typo>\n {isThisOptionCorrect ? (\n <Typo color=\"green\">정답입니다</Typo>\n ) : null}\n {isThisOptionWrong ? (\n <Typo color=\"red\">정답이 아닙니다</Typo>\n ) : null}\n </Box>\n </RadioButtonCard.Item>\n );\n })}\n </Flex>\n </RadioButtonCard.Root>\n </Box>\n <Flex justify=\"end\" mt=\"2\">\n <Button onClick={checkAnswer}>정답 확인</Button>\n </Flex>\n </Grid>\n </Grid>\n );\n}\n\nexport default ReviewQuestionRadio;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,SAAS,gBAAgB;AAoC9C,cA2CY,YA3CZ;AAvBR,IAAM,qBAA0C;AAAA,EAC9C,iBAAiB;AACnB;AAEA,SAAS,oBAAoB,OAAkD;AAC7E,QAAM,EAAE,UAAU,QAAQ,SAAS,IAA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BAAgB;AAAA,cAAhB;AAAA,gBAGC;AAAA,gBACA,OAAO,EAAE,SAAS;AAAA,gBAElB,+BAAC,OACC;AAAA,sCAAC,QAAK,IAAG,KAAK,iBAAO,OAAM;AAAA,kBAC1B,sBACC,oBAAC,QAAK,OAAM,SAAQ,4CAAK,IACvB;AAAA,kBACH,oBACC,oBAAC,QAAK,OAAM,OAAM,yDAAQ,IACxB;AAAA,mBACN;AAAA;AAAA,cAZK,GAAG,OAAO,KAAK,IAAI,CAAC;AAAA,YAa3B;AAAA,UAEJ,CAAC,GACH;AAAA;AAAA,MACF,GACF;AAAA,MACA,oBAAC,QAAK,SAAQ,OAAM,IAAG,KACrB,8BAAC,UAAO,SAAS,aAAa,uCAAK,GACrC;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_header_default
|
|
3
|
+
} from "./chunk-6SBDC73H.js";
|
|
4
|
+
import {
|
|
5
|
+
review_question_layout_default
|
|
6
|
+
} from "./chunk-SQBRHTZD.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_body_default
|
|
9
|
+
} from "./chunk-DIUGTP23.js";
|
|
10
|
+
import {
|
|
11
|
+
review_question_footer_default
|
|
12
|
+
} from "./chunk-SKVHLGC7.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.tsx
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestion({
|
|
17
|
+
question,
|
|
18
|
+
index,
|
|
19
|
+
total,
|
|
20
|
+
answer,
|
|
21
|
+
error,
|
|
22
|
+
onChange,
|
|
23
|
+
onNext,
|
|
24
|
+
onPrev,
|
|
25
|
+
isLast,
|
|
26
|
+
isNextDisabled,
|
|
27
|
+
onSubmit,
|
|
28
|
+
isLoading
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
review_question_layout_default,
|
|
32
|
+
{
|
|
33
|
+
Body: /* @__PURE__ */ jsx(
|
|
34
|
+
review_question_body_default,
|
|
35
|
+
{
|
|
36
|
+
answer,
|
|
37
|
+
error,
|
|
38
|
+
onChange,
|
|
39
|
+
question
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
Footer: /* @__PURE__ */ jsx(
|
|
43
|
+
review_question_footer_default,
|
|
44
|
+
{
|
|
45
|
+
index,
|
|
46
|
+
isLast,
|
|
47
|
+
isLoading,
|
|
48
|
+
isNextButtonDisabled: isNextDisabled,
|
|
49
|
+
onNext,
|
|
50
|
+
onPrev,
|
|
51
|
+
onSubmit
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
Header: /* @__PURE__ */ jsx(review_question_header_default, { index, total })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
var ReviewQuestion_default = ReviewQuestion;
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
ReviewQuestion_default
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk-45X5XMXT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport ReviewQuestionLayout from './review-question-layout';\nimport ReviewQuestionHeader from './review-question-header';\nimport ReviewQuestionFooter from './review-question-footer';\nimport ReviewQuestionBody from './review-question-body';\n\ninterface ReviewQuestionProps {\n question: ReviewQuestionElement;\n index: number;\n total: number;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n onNext: () => void;\n onPrev: () => void;\n isLast: boolean;\n isNextDisabled?: boolean;\n onSubmit: () => void;\n isLoading?: boolean;\n}\n\nfunction ReviewQuestion({\n question,\n index,\n total,\n answer,\n error,\n onChange,\n onNext,\n onPrev,\n isLast,\n isNextDisabled,\n onSubmit,\n isLoading,\n}: ReviewQuestionProps): React.ReactElement {\n \n return (\n <ReviewQuestionLayout\n Body={\n <ReviewQuestionBody\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n }\n Footer={\n <ReviewQuestionFooter\n index={index}\n isLast={isLast}\n isLoading={isLoading}\n isNextButtonDisabled={isNextDisabled}\n onNext={onNext}\n onPrev={onPrev}\n onSubmit={onSubmit}\n />\n }\n Header={<ReviewQuestionHeader index={index} total={total} />}\n />\n );\n}\n\nexport default ReviewQuestion;\n"],"mappings":";;;;;;;;;;;;;;AAwCQ;AAlBR,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4C;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF,QACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,sBAAsB;AAAA,UACtB;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF,QAAQ,oBAAC,kCAAqB,OAAc,OAAc;AAAA;AAAA,EAC5D;AAEJ;AAEA,IAAO,yBAAQ;","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_ai_traning_default
|
|
3
|
+
} from "./chunk-PIF5DEYP.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_review_default
|
|
6
|
+
} from "./chunk-DITJZWCB.js";
|
|
7
|
+
import {
|
|
8
|
+
curriculum_video_default
|
|
9
|
+
} from "./chunk-HYMGXDPL.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-V5XKNSCK.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-4MQZPFOZ.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';\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":";;;;;;;;;;;;;;;;;;;;;;;AAaa,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":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_ai_traning_default
|
|
3
|
+
} from "./chunk-IQRWOACA.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_review_default
|
|
6
|
+
} from "./chunk-EK3J7G4V.js";
|
|
7
|
+
import {
|
|
8
|
+
curriculum_video_default
|
|
9
|
+
} from "./chunk-HYMGXDPL.js";
|
|
10
|
+
import {
|
|
11
|
+
useCurriculumContext
|
|
12
|
+
} from "./chunk-IYQJIEVM.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
import {
|
|
20
|
+
InfoCircledIcon
|
|
21
|
+
} from "./chunk-V5XKNSCK.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-6JZ6TPS5.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';\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":";;;;;;;;;;;;;;;;;;;;;;;AAaa,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":[]}
|