@tipp/ui 2.3.3 → 2.3.4
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 +81 -81
- package/dist/app/platform/coach-question-list.js +28 -28
- package/dist/app/platform/contents-card.js +28 -28
- package/dist/app/platform/curriculum-card.js +6 -6
- package/dist/app/platform/edit-coaching-time.js +65 -65
- package/dist/app/platform/edit-service-type.js +66 -66
- package/dist/app/platform/goal-manage-card-edit.js +65 -65
- package/dist/app/platform/goal-manage-card-read.js +28 -28
- package/dist/app/platform/on-offline-radio-card.js +65 -65
- package/dist/app/platform/report-card.js +28 -28
- package/dist/app/platform/reservation-card.js +66 -66
- package/dist/app/platform/session-card.js +68 -68
- package/dist/app/platform/session-review-simple-read.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +28 -28
- package/dist/app/platform/userInfos/session-user-info-detail.js +28 -28
- package/dist/app/platform/userInfos/utils.js +27 -27
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +59 -59
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2ZAUZRYP.js +51 -0
- package/dist/chunk-2ZAUZRYP.js.map +1 -0
- package/dist/chunk-3UB5MADH.js +63 -0
- package/dist/chunk-3UB5MADH.js.map +1 -0
- package/dist/chunk-3XVQJ43L.js +69 -0
- package/dist/chunk-3XVQJ43L.js.map +1 -0
- package/dist/chunk-4H6OYVRA.js +64 -0
- package/dist/chunk-4H6OYVRA.js.map +1 -0
- package/dist/chunk-5773MYBI.js +89 -0
- package/dist/chunk-5773MYBI.js.map +1 -0
- package/dist/chunk-AGDS5FTY.js +30 -0
- package/dist/chunk-AGDS5FTY.js.map +1 -0
- package/dist/chunk-DGXKSYZ2.js +144 -0
- package/dist/chunk-DGXKSYZ2.js.map +1 -0
- package/dist/chunk-ECMGWPU5.js +174 -0
- package/dist/chunk-ECMGWPU5.js.map +1 -0
- package/dist/chunk-FD6QZZQY.js +69 -0
- package/dist/chunk-FD6QZZQY.js.map +1 -0
- package/dist/chunk-FT27KFX7.js +145 -0
- package/dist/chunk-FT27KFX7.js.map +1 -0
- package/dist/chunk-JQ7VQ5SB.js +137 -0
- package/dist/chunk-JQ7VQ5SB.js.map +1 -0
- package/dist/chunk-KFICWJI6.js +61 -0
- package/dist/chunk-KFICWJI6.js.map +1 -0
- package/dist/chunk-KLCL7FKY.js +196 -0
- package/dist/chunk-KLCL7FKY.js.map +1 -0
- package/dist/chunk-KO6ZM4XB.js +37 -0
- package/dist/chunk-KO6ZM4XB.js.map +1 -0
- package/dist/chunk-LNRB4XMK.js +87 -0
- package/dist/chunk-LNRB4XMK.js.map +1 -0
- package/dist/chunk-LWLKHIDE.js +51 -0
- package/dist/chunk-LWLKHIDE.js.map +1 -0
- package/dist/chunk-MBMREYHZ.js +174 -0
- package/dist/chunk-MBMREYHZ.js.map +1 -0
- package/dist/chunk-ORQ4NCWG.js +63 -0
- package/dist/chunk-ORQ4NCWG.js.map +1 -0
- package/dist/chunk-QB73IVKI.js +43 -0
- package/dist/chunk-QB73IVKI.js.map +1 -0
- package/dist/chunk-RYK2ILB2.js +105 -0
- package/dist/chunk-RYK2ILB2.js.map +1 -0
- package/dist/chunk-SYGLFURC.js +49 -0
- package/dist/chunk-SYGLFURC.js.map +1 -0
- package/dist/chunk-T4O3ONUV.js +64 -0
- package/dist/chunk-T4O3ONUV.js.map +1 -0
- package/dist/chunk-T6BKRGZ7.js +54 -0
- package/dist/chunk-T6BKRGZ7.js.map +1 -0
- package/dist/chunk-UCBF57MG.js +196 -0
- package/dist/chunk-UCBF57MG.js.map +1 -0
- package/dist/chunk-UIY4HDKD.js +144 -0
- package/dist/chunk-UIY4HDKD.js.map +1 -0
- package/dist/chunk-UWM72J67.js +151 -0
- package/dist/chunk-UWM72J67.js.map +1 -0
- package/dist/chunk-VIKHKUHF.js +89 -0
- package/dist/chunk-VIKHKUHF.js.map +1 -0
- package/dist/chunk-W6LDMZNY.js +29 -0
- package/dist/chunk-W6LDMZNY.js.map +1 -0
- package/dist/chunk-WPRRJQOM.js +61 -0
- package/dist/chunk-WPRRJQOM.js.map +1 -0
- package/dist/chunk-YZ7LP3PU.js +101 -0
- package/dist/chunk-YZ7LP3PU.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.css +12 -0
- package/dist/index.js +133 -133
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +15 -15
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +9 -9
- 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 +5 -5
- 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 +19 -19
- 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 +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +24 -24
- 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 +7 -7
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +5 -5
- 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 +31 -31
- 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 +4 -4
- package/dist/molecules/dynamic-form.js +5 -5
- package/dist/molecules/expand-table/index.js +4 -4
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.js +62 -62
- package/dist/molecules/learning-post.js +5 -5
- 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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DatePickerButton
|
|
3
|
+
} from "./chunk-ZN5L462B.js";
|
|
4
|
+
import {
|
|
5
|
+
TimeSelect
|
|
6
|
+
} from "./chunk-7PF6I4RN.js";
|
|
7
|
+
import {
|
|
8
|
+
getTimeOption,
|
|
9
|
+
parseTimeOption
|
|
10
|
+
} from "./chunk-NWJSLIQ3.js";
|
|
11
|
+
import {
|
|
12
|
+
toast
|
|
13
|
+
} from "./chunk-EEKOTWBE.js";
|
|
14
|
+
import {
|
|
15
|
+
Grid
|
|
16
|
+
} from "./chunk-EGEQY3KT.js";
|
|
17
|
+
import {
|
|
18
|
+
Dialog
|
|
19
|
+
} from "./chunk-JQ7VQ5SB.js";
|
|
20
|
+
import {
|
|
21
|
+
Separator
|
|
22
|
+
} from "./chunk-HYITAA4J.js";
|
|
23
|
+
import {
|
|
24
|
+
Flex
|
|
25
|
+
} from "./chunk-25HMMI7R.js";
|
|
26
|
+
import {
|
|
27
|
+
Button
|
|
28
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
29
|
+
import {
|
|
30
|
+
Box
|
|
31
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
32
|
+
import {
|
|
33
|
+
Form
|
|
34
|
+
} from "./chunk-2OMSNCRH.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-MBMREYHZ.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":"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","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_footer_default
|
|
3
|
+
} from "./chunk-5NA6TNVC.js";
|
|
4
|
+
import {
|
|
5
|
+
review_question_header_default
|
|
6
|
+
} from "./chunk-VREM33BW.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_layout_default
|
|
9
|
+
} from "./chunk-X2Y2UWY2.js";
|
|
10
|
+
import {
|
|
11
|
+
review_question_body_default
|
|
12
|
+
} from "./chunk-3XVQJ43L.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-ORQ4NCWG.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,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCurriculumIcon,
|
|
3
|
+
getCurriculumQuestionIconColor
|
|
4
|
+
} from "./chunk-RYK2ILB2.js";
|
|
5
|
+
import {
|
|
6
|
+
Box
|
|
7
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
8
|
+
import {
|
|
9
|
+
Typo
|
|
10
|
+
} from "./chunk-PMJIFLDT.js";
|
|
11
|
+
import {
|
|
12
|
+
Flex
|
|
13
|
+
} from "./chunk-25HMMI7R.js";
|
|
14
|
+
|
|
15
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.tsx
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function ReviewQuestionContentHeader({
|
|
18
|
+
type,
|
|
19
|
+
title,
|
|
20
|
+
question,
|
|
21
|
+
icon
|
|
22
|
+
}) {
|
|
23
|
+
const Icon = getCurriculumIcon({ type, icon });
|
|
24
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
25
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "2", mb: "3", children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
27
|
+
Icon,
|
|
28
|
+
{
|
|
29
|
+
color: getCurriculumQuestionIconColor(type),
|
|
30
|
+
height: "16",
|
|
31
|
+
width: "16"
|
|
32
|
+
}
|
|
33
|
+
) }),
|
|
34
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: title })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", children: question })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
ReviewQuestionContentHeader
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=chunk-QB73IVKI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@/atoms/box';\nimport { Flex } from '@/atoms/flex';\nimport { Typo } from '@/atoms/typo';\nimport { getCurriculumIcon , getCurriculumQuestionIconColor } from '@/utils/curriculum.utils';\n\ninterface ReviewQuestionContentHeaderProps {\n type: string;\n title: string;\n question: string;\n icon?: string;\n}\n\nexport function ReviewQuestionContentHeader({\n type,\n title,\n question,\n icon,\n}: ReviewQuestionContentHeaderProps): React.ReactNode {\n const Icon = getCurriculumIcon({ type, icon });\n\n return (\n <Box>\n <Flex gap=\"2\" mb=\"3\">\n <Box>\n <Icon\n color={getCurriculumQuestionIconColor(type)}\n height=\"16\"\n width=\"16\"\n />\n </Box>\n <Typo color=\"gray\" weight=\"bold\">\n {title}\n </Typo>\n </Flex>\n <Typo as=\"p\" color=\"gray\">\n {question}\n </Typo>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuBM,SAEI,KAFJ;AAVC,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAsD;AACpD,QAAM,OAAO,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAE7C,SACE,qBAAC,OACC;AAAA,yBAAC,QAAK,KAAI,KAAI,IAAG,KACf;AAAA,0BAAC,OACC;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,+BAA+B,IAAI;AAAA,UAC1C,QAAO;AAAA,UACP,OAAM;AAAA;AAAA,MACR,GACF;AAAA,MACA,oBAAC,QAAK,OAAM,QAAO,QAAO,QACvB,iBACH;AAAA,OACF;AAAA,IACA,oBAAC,QAAK,IAAG,KAAI,OAAM,QAChB,oBACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CircleCheckIcon
|
|
3
|
+
} from "./chunk-YVFNJE4E.js";
|
|
4
|
+
import {
|
|
5
|
+
CirclePencilIcon
|
|
6
|
+
} from "./chunk-J2I3R3OV.js";
|
|
7
|
+
import {
|
|
8
|
+
CirclePlayIcon
|
|
9
|
+
} from "./chunk-QO6KO6MN.js";
|
|
10
|
+
import {
|
|
11
|
+
CircleQuoteIcon
|
|
12
|
+
} from "./chunk-5KNRHIIF.js";
|
|
13
|
+
import {
|
|
14
|
+
CircleSatisfactionIcon
|
|
15
|
+
} from "./chunk-6JRAI4G5.js";
|
|
16
|
+
import {
|
|
17
|
+
CircleChatIcon
|
|
18
|
+
} from "./chunk-ZUYCXCPW.js";
|
|
19
|
+
|
|
20
|
+
// src/utils/curriculum.utils.ts
|
|
21
|
+
var CurriculumListIcons = {
|
|
22
|
+
pencil: CirclePencilIcon,
|
|
23
|
+
video: CirclePlayIcon,
|
|
24
|
+
quote: CircleQuoteIcon,
|
|
25
|
+
check: CircleCheckIcon,
|
|
26
|
+
star: CircleSatisfactionIcon
|
|
27
|
+
};
|
|
28
|
+
var getCurriculumIcon = ({
|
|
29
|
+
type,
|
|
30
|
+
icon
|
|
31
|
+
}) => {
|
|
32
|
+
if (icon && Object.prototype.hasOwnProperty.call(CurriculumListIcons, icon)) {
|
|
33
|
+
return CurriculumListIcons[icon];
|
|
34
|
+
}
|
|
35
|
+
switch (type) {
|
|
36
|
+
case "video":
|
|
37
|
+
return CirclePlayIcon;
|
|
38
|
+
case "question_text":
|
|
39
|
+
return CircleQuoteIcon;
|
|
40
|
+
case "question_radio":
|
|
41
|
+
return CircleCheckIcon;
|
|
42
|
+
case "question_satisfaction_option":
|
|
43
|
+
case "question_satisfaction_text":
|
|
44
|
+
return CircleSatisfactionIcon;
|
|
45
|
+
case "aiTraining":
|
|
46
|
+
return CircleChatIcon;
|
|
47
|
+
case "review":
|
|
48
|
+
default:
|
|
49
|
+
return CirclePencilIcon;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var getCurriculumIconColor = ({
|
|
53
|
+
done = false,
|
|
54
|
+
selected = false
|
|
55
|
+
}) => {
|
|
56
|
+
if (selected) {
|
|
57
|
+
return "#D5AE39";
|
|
58
|
+
}
|
|
59
|
+
if (done) {
|
|
60
|
+
return "#30A46C";
|
|
61
|
+
}
|
|
62
|
+
return "#D9D9E0";
|
|
63
|
+
};
|
|
64
|
+
var getCurriculumQuestionIconColor = (type) => {
|
|
65
|
+
switch (type) {
|
|
66
|
+
case "question_text":
|
|
67
|
+
return "#D5AE39";
|
|
68
|
+
case "question_radio":
|
|
69
|
+
return "#30A46C";
|
|
70
|
+
default:
|
|
71
|
+
return "#D9D9E0";
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var getCurriculumQuestionTypeDescription = (type) => {
|
|
75
|
+
switch (type) {
|
|
76
|
+
case "question_text":
|
|
77
|
+
return "\uC8FC\uAD00\uC2DD";
|
|
78
|
+
case "question_radio":
|
|
79
|
+
return "\uAC1D\uAD00\uC2DD";
|
|
80
|
+
default:
|
|
81
|
+
return "";
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var getCurriculumContentSubTypeText = (type) => {
|
|
85
|
+
switch (type) {
|
|
86
|
+
case "video":
|
|
87
|
+
return "\uC601\uC0C1";
|
|
88
|
+
case "review":
|
|
89
|
+
return "\uB9AC\uBDF0";
|
|
90
|
+
case "aiTraining":
|
|
91
|
+
return "AI \uD2B8\uB808\uC774\uB2DD";
|
|
92
|
+
default:
|
|
93
|
+
return "";
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
CurriculumListIcons,
|
|
99
|
+
getCurriculumIcon,
|
|
100
|
+
getCurriculumIconColor,
|
|
101
|
+
getCurriculumQuestionIconColor,
|
|
102
|
+
getCurriculumQuestionTypeDescription,
|
|
103
|
+
getCurriculumContentSubTypeText
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=chunk-RYK2ILB2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/curriculum.utils.ts"],"sourcesContent":["import { \n CircleChatIcon,\n CircleCheckIcon,\n CirclePencilIcon,\n CirclePlayIcon,\n CircleQuoteIcon,\n CircleSatisfactionIcon\n} from '@/icon';\n\nexport const CurriculumListIcons = {\n pencil: CirclePencilIcon,\n video: CirclePlayIcon,\n quote: CircleQuoteIcon,\n check: CircleCheckIcon,\n star: CircleSatisfactionIcon,\n};\n\nexport const getCurriculumIcon = ({\n type,\n icon,\n}: {\n type: string;\n icon?: string;\n}): typeof CirclePlayIcon => {\n if (icon && Object.prototype.hasOwnProperty.call(CurriculumListIcons, icon)) {\n return CurriculumListIcons[icon as keyof typeof CurriculumListIcons];\n }\n\n switch (type) {\n case 'video':\n return CirclePlayIcon;\n case 'question_text':\n return CircleQuoteIcon;\n case 'question_radio':\n return CircleCheckIcon;\n case 'question_satisfaction_option':\n case 'question_satisfaction_text':\n return CircleSatisfactionIcon;\n case 'aiTraining':\n return CircleChatIcon;\n case 'review':\n default:\n return CirclePencilIcon;\n }\n};\n\nexport const getCurriculumIconColor = ({\n done = false,\n selected = false,\n}: {\n done?: boolean;\n selected?: boolean;\n}): string => {\n if (selected) {\n return '#D5AE39';\n }\n if (done) {\n return '#30A46C';\n }\n return '#D9D9E0';\n};\n\nexport const getCurriculumQuestionIconColor = (type: string): string => {\n switch (type) {\n case 'question_text':\n return '#D5AE39';\n case 'question_radio':\n return '#30A46C';\n default:\n return '#D9D9E0';\n }\n};\n\nexport const getCurriculumQuestionTypeDescription = (type: string): string => {\n switch (type) {\n case 'question_text':\n return '주관식';\n case 'question_radio':\n return '객관식';\n default:\n return '';\n }\n};\n\nexport const getCurriculumContentSubTypeText = (type: string): string => {\n switch (type) {\n case 'video':\n return '영상';\n case 'review':\n return '리뷰';\n case 'aiTraining':\n return 'AI 트레이닝';\n default:\n return '';\n }\n};\n \n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASO,IAAM,sBAAsB;AAAA,EACjC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AACR;AAEO,IAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AACF,MAG6B;AAC3B,MAAI,QAAQ,OAAO,UAAU,eAAe,KAAK,qBAAqB,IAAI,GAAG;AAC3E,WAAO,oBAAoB,IAAwC;AAAA,EACrE;AAEA,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL;AACE,aAAO;AAAA,EACX;AACF;AAEO,IAAM,yBAAyB,CAAC;AAAA,EACrC,OAAO;AAAA,EACP,WAAW;AACb,MAGc;AACZ,MAAI,UAAU;AACZ,WAAO;AAAA,EACT;AACA,MAAI,MAAM;AACR,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,IAAM,iCAAiC,CAAC,SAAyB;AACtE,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,IAAM,uCAAuC,CAAC,SAAyB;AAC5E,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,IAAM,kCAAkC,CAAC,SAAyB;AACvE,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-QB73IVKI.js";
|
|
4
|
+
import {
|
|
5
|
+
TextArea
|
|
6
|
+
} from "./chunk-5XYPLDI5.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
Card
|
|
12
|
+
} from "./chunk-RP2RGCAW.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.tsx
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionSatisfisText(props) {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const { question, answer, onChange } = props;
|
|
19
|
+
return /* @__PURE__ */ jsx(Card, { size: "2", style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "auto 1fr", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
ReviewQuestionContentHeader,
|
|
22
|
+
{
|
|
23
|
+
icon: question.icon,
|
|
24
|
+
question: (_a = question.question) != null ? _a : "\uC774\uBC88 \uD559\uC2B5\uC5D0 \uB300\uD574 \uCD94\uAC00\uB85C \uB0A8\uAE38 \uC758\uACAC\uC774 \uC788\uB2E4\uBA74 \uACF5\uC720\uD574\uC8FC\uC138\uC694.",
|
|
25
|
+
title: (_b = question.title) != null ? _b : "\uB9CC\uC871\uB3C4 \uC870\uC0AC",
|
|
26
|
+
type: question.type
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
TextArea,
|
|
31
|
+
{
|
|
32
|
+
mt: "2",
|
|
33
|
+
onChange: (e) => {
|
|
34
|
+
onChange(e.target.value);
|
|
35
|
+
},
|
|
36
|
+
placeholder: question.placeholder,
|
|
37
|
+
style: {
|
|
38
|
+
height: "100%"
|
|
39
|
+
},
|
|
40
|
+
value: answer
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }) });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
ReviewQuestionSatisfisText
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-SYGLFURC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.tsx"],"sourcesContent":["import React from 'react';\nimport { type CurriculumReviewQuestionSatisfactionText } from '@/types/curriculumContents.type';\nimport { Card } from '@/atoms/card';\nimport { Grid } from '@/atoms/grid';\nimport { TextArea } from '@/atoms/text-area';\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionSatisfactionTextProps {\n question: CurriculumReviewQuestionSatisfactionText;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nexport default function ReviewQuestionSatisfisText(\n props: ReviewQuestionSatisfactionTextProps\n): React.ReactNode {\n const { question, answer, onChange } = props;\n\n return (\n <Card size=\"2\" style={{ height: '100%', width: '100%' }}>\n <Grid height=\"100%\" rows=\"auto 1fr\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={\n question.question ??\n '이번 학습에 대해 추가로 남길 의견이 있다면 공유해주세요.'\n }\n title={question.title ?? '만족도 조사'}\n type={question.type}\n />\n <TextArea\n mt=\"2\"\n onChange={(e) => {\n onChange(e.target.value);\n }}\n placeholder={question.placeholder}\n style={{\n height: '100%',\n }}\n value={answer}\n />\n </Grid>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAqBM,SACE,KADF;AAPS,SAAR,2BACL,OACiB;AAhBnB;AAiBE,QAAM,EAAE,UAAU,QAAQ,SAAS,IAAI;AAEvC,SACE,oBAAC,QAAK,MAAK,KAAI,OAAO,EAAE,QAAQ,QAAQ,OAAO,OAAO,GACpD,+BAAC,QAAK,QAAO,QAAO,MAAK,YACvB;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS;AAAA,QACf,WACE,cAAS,aAAT,YACA;AAAA,QAEF,QAAO,cAAS,UAAT,YAAkB;AAAA,QACzB,MAAM,SAAS;AAAA;AAAA,IACjB;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,UAAU,CAAC,MAAM;AACf,mBAAS,EAAE,OAAO,KAAK;AAAA,QACzB;AAAA,QACA,aAAa,SAAS;AAAA,QACtB,OAAO;AAAA,UACL,QAAQ;AAAA,QACV;AAAA,QACA,OAAO;AAAA;AAAA,IACT;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_ai_traning_default
|
|
3
|
+
} from "./chunk-B6A7IIYJ.js";
|
|
4
|
+
import {
|
|
5
|
+
curriculum_review_default
|
|
6
|
+
} from "./chunk-KLCL7FKY.js";
|
|
7
|
+
import {
|
|
8
|
+
curriculum_video_default
|
|
9
|
+
} from "./chunk-QGKQ3IX7.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-T4O3ONUV.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":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnOfflineRadioCard
|
|
3
|
+
} from "./chunk-3GQQQBJN.js";
|
|
4
|
+
import {
|
|
5
|
+
Dialog
|
|
6
|
+
} from "./chunk-JQ7VQ5SB.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
import {
|
|
11
|
+
Button
|
|
12
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.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-T6BKRGZ7.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":[]}
|