@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,231 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Popover
|
|
3
|
+
} from "./chunk-5AVBYDPB.js";
|
|
4
|
+
import {
|
|
5
|
+
Heading
|
|
6
|
+
} from "./chunk-BESTU2AY.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-OLOJSZ56.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
Typo
|
|
15
|
+
} from "./chunk-PMJIFLDT.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
Button
|
|
21
|
+
} from "./chunk-EBBSXNIL.js";
|
|
22
|
+
import {
|
|
23
|
+
ChevronLeftIcon,
|
|
24
|
+
ChevronRightIcon
|
|
25
|
+
} from "./chunk-V5XKNSCK.js";
|
|
26
|
+
import {
|
|
27
|
+
__objRest,
|
|
28
|
+
__spreadProps,
|
|
29
|
+
__spreadValues
|
|
30
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
31
|
+
|
|
32
|
+
// src/molecules/date-picker/index.tsx
|
|
33
|
+
import { forwardRef, useMemo, useState, useEffect, useRef } from "react";
|
|
34
|
+
import ReactDatePicker from "react-datepicker";
|
|
35
|
+
import { ko } from "date-fns/locale";
|
|
36
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
+
var DatePicker = forwardRef(
|
|
38
|
+
(props, ref) => {
|
|
39
|
+
const _a = props, { fullWidth } = _a, rest = __objRest(_a, ["fullWidth"]);
|
|
40
|
+
const fullWidthClassName = fullWidth ? "full-width" : "";
|
|
41
|
+
const [isYearDropdownOpen, setIsYearDropdownOpen] = useState(false);
|
|
42
|
+
const [isMonthDropdownOpen, setIsMonthDropdownOpen] = useState(false);
|
|
43
|
+
const renderCustomHeader = useMemo(() => {
|
|
44
|
+
const getYears = () => {
|
|
45
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
46
|
+
return Array.from(
|
|
47
|
+
{ length: currentYear + 5 - 1920 },
|
|
48
|
+
(_, index) => 1920 + index
|
|
49
|
+
).filter((year) => {
|
|
50
|
+
if (props.minDate && year < props.minDate.getFullYear()) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (props.maxDate && year > props.maxDate.getFullYear()) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
return getRenderCustomHeader(__spreadProps(__spreadValues({}, props), {
|
|
60
|
+
years: getYears(),
|
|
61
|
+
isYearDropdownOpen,
|
|
62
|
+
setIsYearDropdownOpen,
|
|
63
|
+
isMonthDropdownOpen,
|
|
64
|
+
setIsMonthDropdownOpen
|
|
65
|
+
}));
|
|
66
|
+
}, [isMonthDropdownOpen, isYearDropdownOpen, props]);
|
|
67
|
+
return /* @__PURE__ */ jsx(Flex, { p: "0", width: "100%", children: /* @__PURE__ */ jsx(
|
|
68
|
+
ReactDatePicker,
|
|
69
|
+
__spreadProps(__spreadValues({
|
|
70
|
+
dateFormat: "yyyy/MM/dd h:mm aa",
|
|
71
|
+
formatWeekDay: (nameOfDay) => {
|
|
72
|
+
return nameOfDay[0];
|
|
73
|
+
},
|
|
74
|
+
locale: ko,
|
|
75
|
+
nextMonthButtonLabel: "\uB2E4\uC74C \uB2EC",
|
|
76
|
+
placeholderText: "YYYY/MM/DD hh:mm AM/PM",
|
|
77
|
+
popperProps: { strategy: "fixed" },
|
|
78
|
+
previousMonthButtonLabel: "\uC774\uC804 \uB2EC",
|
|
79
|
+
ref,
|
|
80
|
+
renderCustomHeader,
|
|
81
|
+
showPopperArrow: false,
|
|
82
|
+
timeCaption: "\uC2DC\uAC04",
|
|
83
|
+
timeFormat: "aa h:mm",
|
|
84
|
+
timeIntervals: 10
|
|
85
|
+
}, rest), {
|
|
86
|
+
calendarClassName: `tipp_datePicker_calendar ${rest.calendarClassName || ""}`,
|
|
87
|
+
wrapperClassName: `tipp_datePicker ${fullWidthClassName} ${rest.wrapperClassName || ""}`
|
|
88
|
+
})
|
|
89
|
+
) });
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
DatePicker.displayName = "DatePicker";
|
|
93
|
+
function DropdownSelector({
|
|
94
|
+
isOpen,
|
|
95
|
+
onOpenChange,
|
|
96
|
+
onSelect,
|
|
97
|
+
options,
|
|
98
|
+
selectedValue,
|
|
99
|
+
suffix
|
|
100
|
+
}) {
|
|
101
|
+
const scrollContainerRef = useRef(null);
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
if (isOpen) {
|
|
104
|
+
queueMicrotask(() => {
|
|
105
|
+
var _a;
|
|
106
|
+
const item = (_a = scrollContainerRef.current) == null ? void 0 : _a.querySelector(
|
|
107
|
+
`[data-year-month-dropdown-tiem="${selectedValue}"]`
|
|
108
|
+
);
|
|
109
|
+
if (item) {
|
|
110
|
+
item.scrollIntoView({ behavior: "instant" });
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}, [isOpen]);
|
|
115
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { onOpenChange, open: isOpen, modal: true, children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(Button, { variant: "ghost", children: /* @__PURE__ */ jsxs(Heading, { variant: "heading4", weight: "regular", children: [
|
|
117
|
+
selectedValue,
|
|
118
|
+
suffix
|
|
119
|
+
] }) }) }),
|
|
120
|
+
/* @__PURE__ */ jsx(Popover.Content, { side: "bottom", children: /* @__PURE__ */ jsx(
|
|
121
|
+
Box,
|
|
122
|
+
{
|
|
123
|
+
maxHeight: "200px",
|
|
124
|
+
overflowY: "auto",
|
|
125
|
+
ref: scrollContainerRef,
|
|
126
|
+
style: { scrollbarWidth: "none" },
|
|
127
|
+
children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "1", children: options.map((item) => /* @__PURE__ */ jsx(
|
|
128
|
+
Button,
|
|
129
|
+
{
|
|
130
|
+
color: "gray",
|
|
131
|
+
"data-year-month-dropdown-tiem": item,
|
|
132
|
+
className: "react-datepicker_dropdown_item",
|
|
133
|
+
onMouseDown: (e) => {
|
|
134
|
+
e.stopPropagation();
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
},
|
|
137
|
+
onClick: () => {
|
|
138
|
+
onSelect(item);
|
|
139
|
+
},
|
|
140
|
+
variant: "transparent",
|
|
141
|
+
children: /* @__PURE__ */ jsxs(Typo, { weight: item === selectedValue ? "bold" : void 0, children: [
|
|
142
|
+
item,
|
|
143
|
+
suffix
|
|
144
|
+
] })
|
|
145
|
+
},
|
|
146
|
+
item
|
|
147
|
+
)) })
|
|
148
|
+
}
|
|
149
|
+
) })
|
|
150
|
+
] });
|
|
151
|
+
}
|
|
152
|
+
var getRenderCustomHeader = (props) => {
|
|
153
|
+
const renderer = (renderCustomHeaderProps) => {
|
|
154
|
+
const {
|
|
155
|
+
date,
|
|
156
|
+
decreaseMonth,
|
|
157
|
+
increaseMonth,
|
|
158
|
+
prevMonthButtonDisabled,
|
|
159
|
+
nextMonthButtonDisabled,
|
|
160
|
+
changeYear,
|
|
161
|
+
changeMonth
|
|
162
|
+
} = renderCustomHeaderProps;
|
|
163
|
+
const {
|
|
164
|
+
years,
|
|
165
|
+
isYearDropdownOpen,
|
|
166
|
+
setIsYearDropdownOpen,
|
|
167
|
+
isMonthDropdownOpen,
|
|
168
|
+
setIsMonthDropdownOpen
|
|
169
|
+
} = props;
|
|
170
|
+
const year = date ? new Date(date).getFullYear() : "-";
|
|
171
|
+
const month = date ? new Date(date).getMonth() + 1 : "-";
|
|
172
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", pl: "2", pr: "2", children: [
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
IconButton,
|
|
175
|
+
{
|
|
176
|
+
disabled: prevMonthButtonDisabled,
|
|
177
|
+
onClick: decreaseMonth,
|
|
178
|
+
type: "button",
|
|
179
|
+
variant: "ghost",
|
|
180
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", children: [
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
185
|
+
DropdownSelector,
|
|
186
|
+
{
|
|
187
|
+
isOpen: isYearDropdownOpen,
|
|
188
|
+
onOpenChange: setIsYearDropdownOpen,
|
|
189
|
+
onSelect: (value) => {
|
|
190
|
+
changeYear(value);
|
|
191
|
+
setIsYearDropdownOpen(false);
|
|
192
|
+
},
|
|
193
|
+
options: years,
|
|
194
|
+
selectedValue: year,
|
|
195
|
+
suffix: "\uB144"
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ jsx(
|
|
199
|
+
DropdownSelector,
|
|
200
|
+
{
|
|
201
|
+
isOpen: isMonthDropdownOpen,
|
|
202
|
+
onOpenChange: setIsMonthDropdownOpen,
|
|
203
|
+
onSelect: (value) => {
|
|
204
|
+
changeMonth(value - 1);
|
|
205
|
+
setIsMonthDropdownOpen(false);
|
|
206
|
+
},
|
|
207
|
+
options: Array.from({ length: 12 }, (_, index) => index + 1),
|
|
208
|
+
selectedValue: month,
|
|
209
|
+
suffix: "\uC6D4"
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
] }),
|
|
213
|
+
/* @__PURE__ */ jsx(
|
|
214
|
+
IconButton,
|
|
215
|
+
{
|
|
216
|
+
disabled: nextMonthButtonDisabled,
|
|
217
|
+
onClick: increaseMonth,
|
|
218
|
+
type: "button",
|
|
219
|
+
variant: "ghost",
|
|
220
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] });
|
|
224
|
+
};
|
|
225
|
+
return renderer;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export {
|
|
229
|
+
DatePicker
|
|
230
|
+
};
|
|
231
|
+
//# sourceMappingURL=chunk-J2HASYO5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/date-picker/index.tsx"],"sourcesContent":["import type { ElementRef } from 'react';\nimport React, { forwardRef, useMemo, useState, useEffect, useRef } from 'react';\nimport type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\nimport { ko } from 'date-fns/locale';\nimport { Box, Button, Popover, Typo } from '@/atoms';\nimport { IconButton } from '../../atoms/icon-button';\nimport { Flex } from '../../atoms/flex';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icon';\nimport { Heading } from '../../atoms/heading';\n\nexport type DatePickerProps = ReactDatePickerProps & {\n fullWidth?: boolean;\n};\ntype DatePickerRef = ElementRef<typeof ReactDatePicker>;\n\nexport const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(\n (props, ref): React.ReactNode => {\n const { fullWidth, ...rest } = props;\n const fullWidthClassName = fullWidth ? 'full-width' : '';\n const [isYearDropdownOpen, setIsYearDropdownOpen] = useState(false);\n const [isMonthDropdownOpen, setIsMonthDropdownOpen] = useState(false);\n\n const renderCustomHeader = useMemo(() => {\n const getYears = (): number[] => {\n const currentYear = new Date().getFullYear();\n return Array.from(\n { length: currentYear + 5 - 1920 },\n (_, index) => 1920 + index\n ).filter((year) => {\n if (props.minDate && year < props.minDate.getFullYear()) {\n return false;\n }\n if (props.maxDate && year > props.maxDate.getFullYear()) {\n return false;\n }\n return true;\n });\n };\n\n return getRenderCustomHeader({\n ...props,\n years: getYears(),\n isYearDropdownOpen,\n setIsYearDropdownOpen,\n isMonthDropdownOpen,\n setIsMonthDropdownOpen,\n });\n }, [isMonthDropdownOpen, isYearDropdownOpen, props]);\n\n return (\n <Flex p=\"0\" width=\"100%\">\n <ReactDatePicker\n dateFormat=\"yyyy/MM/dd h:mm aa\"\n formatWeekDay={(nameOfDay) => {\n return nameOfDay[0];\n }}\n locale={ko}\n nextMonthButtonLabel=\"다음 달\"\n placeholderText=\"YYYY/MM/DD hh:mm AM/PM\"\n popperProps={{ strategy: 'fixed' }}\n previousMonthButtonLabel=\"이전 달\"\n ref={ref}\n renderCustomHeader={renderCustomHeader}\n showPopperArrow={false}\n timeCaption=\"시간\"\n timeFormat=\"aa h:mm\"\n timeIntervals={10}\n {...rest}\n calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}\n wrapperClassName={`tipp_datePicker ${fullWidthClassName} ${rest.wrapperClassName || ''}`}\n />\n </Flex>\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\ninterface DropdownSelectorProps {\n isOpen: boolean;\n onOpenChange: (open: boolean) => void;\n onSelect: (value: number) => void;\n options: number[];\n selectedValue: number | string;\n suffix: string;\n}\n\nfunction DropdownSelector({\n isOpen,\n onOpenChange,\n onSelect,\n options,\n selectedValue,\n suffix,\n}: DropdownSelectorProps): React.JSX.Element {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (isOpen) {\n queueMicrotask(() => {\n const item = scrollContainerRef.current?.querySelector(\n `[data-year-month-dropdown-tiem=\"${selectedValue}\"]`\n );\n if (item) {\n item.scrollIntoView({ behavior: 'instant' });\n }\n });\n }\n }, [isOpen]);\n\n return (\n <Popover.Root onOpenChange={onOpenChange} open={isOpen} modal>\n <Popover.Trigger>\n <Button variant=\"ghost\">\n <Heading variant=\"heading4\" weight=\"regular\">\n {selectedValue}\n {suffix}\n </Heading>\n </Button>\n </Popover.Trigger>\n <Popover.Content side=\"bottom\">\n <Box\n maxHeight=\"200px\"\n overflowY=\"auto\"\n ref={scrollContainerRef}\n style={{ scrollbarWidth: 'none' }}\n >\n <Flex direction=\"column\" gap=\"1\">\n {options.map((item: number) => (\n <Button\n color=\"gray\"\n data-year-month-dropdown-tiem={item}\n key={item}\n className={'react-datepicker_dropdown_item'}\n onMouseDown={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n onClick={() => {\n onSelect(item);\n }}\n variant=\"transparent\"\n >\n <Typo weight={item === selectedValue ? 'bold' : undefined}>\n {item}\n {suffix}\n </Typo>\n </Button>\n ))}\n </Flex>\n </Box>\n </Popover.Content>\n </Popover.Root>\n );\n}\n\nconst getRenderCustomHeader: (\n props: ReactDatePickerProps & {\n years: number[];\n isYearDropdownOpen: boolean;\n setIsYearDropdownOpen: (show: boolean) => void;\n isMonthDropdownOpen: boolean;\n setIsMonthDropdownOpen: (show: boolean) => void;\n }\n) => ReactDatePickerProps['renderCustomHeader'] = (props) => {\n const renderer: ReactDatePickerProps['renderCustomHeader'] = (\n renderCustomHeaderProps\n ) => {\n const {\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n changeYear,\n changeMonth,\n } = renderCustomHeaderProps;\n const {\n years,\n isYearDropdownOpen,\n setIsYearDropdownOpen,\n isMonthDropdownOpen,\n setIsMonthDropdownOpen,\n } = props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- date가 undefined일 수 있음\n const year = date ? new Date(date).getFullYear() : '-';\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- date가 undefined일 수 있음\n const month = date ? new Date(date).getMonth() + 1 : '-';\n\n return (\n <Flex align=\"center\" justify=\"between\" pl=\"2\" pr=\"2\">\n <IconButton\n disabled={prevMonthButtonDisabled}\n onClick={decreaseMonth}\n type=\"button\"\n variant=\"ghost\"\n >\n <ChevronLeftIcon />\n </IconButton>\n <Flex gap=\"3\">\n <DropdownSelector\n isOpen={isYearDropdownOpen}\n onOpenChange={setIsYearDropdownOpen}\n onSelect={(value) => {\n changeYear(value);\n setIsYearDropdownOpen(false);\n }}\n options={years}\n selectedValue={year}\n suffix=\"년\"\n />\n <DropdownSelector\n isOpen={isMonthDropdownOpen}\n onOpenChange={setIsMonthDropdownOpen}\n onSelect={(value) => {\n changeMonth(value - 1);\n setIsMonthDropdownOpen(false);\n }}\n options={Array.from({ length: 12 }, (_, index) => index + 1)}\n selectedValue={month}\n suffix=\"월\"\n />\n </Flex>\n\n <IconButton\n disabled={nextMonthButtonDisabled}\n onClick={increaseMonth}\n type=\"button\"\n variant=\"ghost\"\n >\n <ChevronRightIcon />\n </IconButton>\n </Flex>\n );\n };\n return renderer;\n};\n\n// DatePicker.displayName = 'DatePicker';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAgB,YAAY,SAAS,UAAU,WAAW,cAAc;AAExE,OAAO,qBAAqB;AAC5B,SAAS,UAAU;AAgDX,cA8DE,YA9DF;AApCD,IAAM,aAAa;AAAA,EACxB,CAAC,OAAO,QAAyB;AAC/B,UAA+B,YAAvB,YAlBZ,IAkBmC,IAAT,iBAAS,IAAT,CAAd;AACR,UAAM,qBAAqB,YAAY,eAAe;AACtD,UAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAS,KAAK;AAClE,UAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAS,KAAK;AAEpE,UAAM,qBAAqB,QAAQ,MAAM;AACvC,YAAM,WAAW,MAAgB;AAC/B,cAAM,eAAc,oBAAI,KAAK,GAAE,YAAY;AAC3C,eAAO,MAAM;AAAA,UACX,EAAE,QAAQ,cAAc,IAAI,KAAK;AAAA,UACjC,CAAC,GAAG,UAAU,OAAO;AAAA,QACvB,EAAE,OAAO,CAAC,SAAS;AACjB,cAAI,MAAM,WAAW,OAAO,MAAM,QAAQ,YAAY,GAAG;AACvD,mBAAO;AAAA,UACT;AACA,cAAI,MAAM,WAAW,OAAO,MAAM,QAAQ,YAAY,GAAG;AACvD,mBAAO;AAAA,UACT;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,MACH;AAEA,aAAO,sBAAsB,iCACxB,QADwB;AAAA,QAE3B,OAAO,SAAS;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,EAAC;AAAA,IACH,GAAG,CAAC,qBAAqB,oBAAoB,KAAK,CAAC;AAEnD,WACE,oBAAC,QAAK,GAAE,KAAI,OAAM,QAChB;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACX,eAAe,CAAC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A,YACA,SAAS;AAAA,YACT,eAAe;AAAA,YACf,QAAO;AAAA;AAAA,QACT;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,cAAc;AAAA,YACd,UAAU,CAAC,UAAU;AACnB,0BAAY,QAAQ,CAAC;AACrB,qCAAuB,KAAK;AAAA,YAC9B;AAAA,YACA,SAAS,MAAM,KAAK,EAAE,QAAQ,GAAG,GAAG,CAAC,GAAG,UAAU,QAAQ,CAAC;AAAA,YAC3D,eAAe;AAAA,YACf,QAAO;AAAA;AAAA,QACT;AAAA,SACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV,SAAS;AAAA,UACT,MAAK;AAAA,UACL,SAAQ;AAAA,UAER,8BAAC,oBAAiB;AAAA;AAAA,MACpB;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
infoList,
|
|
3
|
+
renderDataListItem,
|
|
4
|
+
renderItem,
|
|
5
|
+
sessionList
|
|
6
|
+
} from "./chunk-CMCR4INM.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
DataList
|
|
12
|
+
} from "./chunk-VTJZMOSP.js";
|
|
13
|
+
import {
|
|
14
|
+
Heading
|
|
15
|
+
} from "./chunk-BESTU2AY.js";
|
|
16
|
+
import {
|
|
17
|
+
Separator
|
|
18
|
+
} from "./chunk-HYITAA4J.js";
|
|
19
|
+
import {
|
|
20
|
+
Card
|
|
21
|
+
} from "./chunk-RP2RGCAW.js";
|
|
22
|
+
import {
|
|
23
|
+
Box
|
|
24
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
25
|
+
import {
|
|
26
|
+
Typo
|
|
27
|
+
} from "./chunk-PMJIFLDT.js";
|
|
28
|
+
import {
|
|
29
|
+
Flex
|
|
30
|
+
} from "./chunk-25HMMI7R.js";
|
|
31
|
+
|
|
32
|
+
// src/app/platform/userInfos/coaching-customer-info/medium.tsx
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
function CoachingCustomerInfoMedium({
|
|
35
|
+
customer,
|
|
36
|
+
session,
|
|
37
|
+
children,
|
|
38
|
+
badge,
|
|
39
|
+
onClickCopy
|
|
40
|
+
}) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
|
|
42
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
43
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", mb: "1", width: "100%", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading2", children: (customer == null ? void 0 : customer.username) || "\uC774\uB984 \uC5C6\uC74C" }),
|
|
45
|
+
badge
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ jsx(Heading, { truncate: true, variant: "heading4", weight: "regular", children: customer == null ? void 0 : customer.company })
|
|
48
|
+
] }),
|
|
49
|
+
children,
|
|
50
|
+
/* @__PURE__ */ jsx(Card, { size: "2", children: /* @__PURE__ */ jsx(DataList.Root, { orientation: "vertical", children: sessionList.map(
|
|
51
|
+
(el) => renderDataListItem({
|
|
52
|
+
info: el,
|
|
53
|
+
data: session,
|
|
54
|
+
onClickCopy
|
|
55
|
+
})
|
|
56
|
+
) }) }),
|
|
57
|
+
/* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto 1fr", gap: "3", children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading5", children: "\uACE0\uAC1D \uC815\uBCF4" }),
|
|
59
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: infoList.map((el) => {
|
|
62
|
+
return /* @__PURE__ */ jsx(Typo, { children: renderItem({
|
|
63
|
+
info: el,
|
|
64
|
+
data: customer,
|
|
65
|
+
onClickCopy
|
|
66
|
+
}) }, el.label);
|
|
67
|
+
}) })
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
CoachingCustomerInfoMedium
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=chunk-KNKAT3EG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/medium.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Box,\n Card,\n DataList,\n Flex,\n Grid,\n Heading,\n Separator,\n Typo,\n} from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\nimport {\n infoList,\n renderDataListItem,\n renderItem,\n sessionList,\n} from '../utils';\n\nexport function CoachingCustomerInfoMedium({\n customer,\n session,\n children,\n badge,\n onClickCopy,\n}: CoachingCustomerInfoProps): React.ReactNode {\n return (\n <Flex direction=\"column\" gap=\"5\">\n {/* 이름, 사명 */}\n <Box>\n <Flex align=\"center\" justify=\"between\" mb=\"1\" width=\"100%\">\n <Heading variant=\"heading2\">\n {customer?.username || '이름 없음'}\n </Heading>\n {badge}\n </Flex>\n <Heading truncate variant=\"heading4\" weight=\"regular\">\n {customer?.company}\n </Heading>\n </Box>\n\n {children}\n\n {/* 세션 정보 */}\n <Card size=\"2\">\n <DataList.Root orientation=\"vertical\">\n {sessionList.map((el) =>\n renderDataListItem({\n info: el,\n data: session,\n onClickCopy,\n })\n )}\n </DataList.Root>\n </Card>\n\n {/* 회원 정보 */}\n <Grid align=\"center\" columns=\"auto 1fr\" gap=\"3\">\n <Heading variant=\"heading5\">고객 정보</Heading>\n <Separator size=\"4\" />\n </Grid>\n <Flex direction=\"column\" gap=\"4\">\n {infoList.map((el) => {\n return (\n <Typo key={el.label}>\n {renderItem({\n info: el,\n data: customer,\n onClickCopy,\n })}\n </Typo>\n );\n })}\n </Flex>\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BQ,SACE,KADF;AAXD,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA+C;AAC7C,SACE,qBAAC,QAAK,WAAU,UAAS,KAAI,KAE3B;AAAA,yBAAC,OACC;AAAA,2BAAC,QAAK,OAAM,UAAS,SAAQ,WAAU,IAAG,KAAI,OAAM,QAClD;AAAA,4BAAC,WAAQ,SAAQ,YACd,gDAAU,aAAY,6BACzB;AAAA,QACC;AAAA,SACH;AAAA,MACA,oBAAC,WAAQ,UAAQ,MAAC,SAAQ,YAAW,QAAO,WACzC,+CAAU,SACb;AAAA,OACF;AAAA,IAEC;AAAA,IAGD,oBAAC,QAAK,MAAK,KACT,8BAAC,SAAS,MAAT,EAAc,aAAY,YACxB,sBAAY;AAAA,MAAI,CAAC,OAChB,mBAAmB;AAAA,QACjB,MAAM;AAAA,QACN,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH,GACF,GACF;AAAA,IAGA,qBAAC,QAAK,OAAM,UAAS,SAAQ,YAAW,KAAI,KAC1C;AAAA,0BAAC,WAAQ,SAAQ,YAAW,uCAAK;AAAA,MACjC,oBAAC,aAAU,MAAK,KAAI;AAAA,OACtB;AAAA,IACA,oBAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,mBAAS,IAAI,CAAC,OAAO;AACpB,aACE,oBAAC,QACE,qBAAW;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,QACN;AAAA,MACF,CAAC,KALQ,GAAG,KAMd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumReviewContext
|
|
3
|
+
} from "./chunk-GMKRNFH5.js";
|
|
4
|
+
import {
|
|
5
|
+
getCurriculumIcon,
|
|
6
|
+
getCurriculumQuestionIconColor,
|
|
7
|
+
getCurriculumQuestionTypeDescription
|
|
8
|
+
} from "./chunk-K5DDPZ2B.js";
|
|
9
|
+
import {
|
|
10
|
+
Grid
|
|
11
|
+
} from "./chunk-EGEQY3KT.js";
|
|
12
|
+
import {
|
|
13
|
+
Heading
|
|
14
|
+
} from "./chunk-BESTU2AY.js";
|
|
15
|
+
import {
|
|
16
|
+
Separator
|
|
17
|
+
} from "./chunk-HYITAA4J.js";
|
|
18
|
+
import {
|
|
19
|
+
Badge
|
|
20
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
21
|
+
import {
|
|
22
|
+
Box
|
|
23
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
24
|
+
import {
|
|
25
|
+
Typo
|
|
26
|
+
} from "./chunk-PMJIFLDT.js";
|
|
27
|
+
import {
|
|
28
|
+
Flex
|
|
29
|
+
} from "./chunk-25HMMI7R.js";
|
|
30
|
+
import {
|
|
31
|
+
Button
|
|
32
|
+
} from "./chunk-EBBSXNIL.js";
|
|
33
|
+
|
|
34
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
var renderPreviewContent = (args) => {
|
|
37
|
+
const { question } = args;
|
|
38
|
+
const Icon = getCurriculumIcon({
|
|
39
|
+
type: question.type,
|
|
40
|
+
icon: question.icon
|
|
41
|
+
});
|
|
42
|
+
const getDescription = () => {
|
|
43
|
+
return [
|
|
44
|
+
getCurriculumQuestionTypeDescription(question.type),
|
|
45
|
+
question.duration ? `${question.duration}\uBD84` : ""
|
|
46
|
+
].filter(Boolean).join(" | ");
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Grid,
|
|
50
|
+
{
|
|
51
|
+
columns: "16px 1fr",
|
|
52
|
+
gap: "2",
|
|
53
|
+
px: "4",
|
|
54
|
+
py: "2",
|
|
55
|
+
width: "100%",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Box, { mt: "1", children: /* @__PURE__ */ jsx(Icon, { color: getCurriculumQuestionIconColor(question.type) }) }),
|
|
58
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", weight: "bold", children: question.title }),
|
|
60
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", children: getDescription() })
|
|
61
|
+
] })
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
question.uuid
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
var getReviewContentValue = (question, answer) => {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
if (question.type === "question_satisfaction_option") {
|
|
70
|
+
return (_c = (_b = (_a = question.options) == null ? void 0 : _a.find((option) => option.value === Number(answer))) == null ? void 0 : _b.label) != null ? _c : "";
|
|
71
|
+
}
|
|
72
|
+
return answer;
|
|
73
|
+
};
|
|
74
|
+
var renderReviewContent = (args) => {
|
|
75
|
+
const { question, answer } = args;
|
|
76
|
+
const Icon = getCurriculumIcon({
|
|
77
|
+
type: question.type,
|
|
78
|
+
icon: question.icon
|
|
79
|
+
});
|
|
80
|
+
const color = getCurriculumQuestionIconColor(question.type);
|
|
81
|
+
const badgeColor = ["question_radio", "question_satisfaction_option"].includes(question.type) ? "accent" : "neutral";
|
|
82
|
+
const value = getReviewContentValue(question, answer);
|
|
83
|
+
return /* @__PURE__ */ jsxs(
|
|
84
|
+
Grid,
|
|
85
|
+
{
|
|
86
|
+
columns: "16px 1fr",
|
|
87
|
+
gap: "2",
|
|
88
|
+
px: "4",
|
|
89
|
+
py: "2",
|
|
90
|
+
width: "100%",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Icon, { color }) }),
|
|
93
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", color: "gray", mb: "2", weight: "bold", children: question.title }),
|
|
95
|
+
/* @__PURE__ */ jsx(Badge, { color: badgeColor, size: "large", style: { whiteSpace: "break-spaces", lineBreak: "anywhere" }, children: value || "(\uBBF8 \uC751\uB2F5)" })
|
|
96
|
+
] })
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
question.uuid
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
function StartReview({ onStart }) {
|
|
103
|
+
const { curriculum, reviewContents, sectionTitle, done, formik } = useCurriculumReviewContext();
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
Flex,
|
|
106
|
+
{
|
|
107
|
+
align: "center",
|
|
108
|
+
direction: "column",
|
|
109
|
+
height: "100%",
|
|
110
|
+
justify: "center",
|
|
111
|
+
width: "100%",
|
|
112
|
+
children: /* @__PURE__ */ jsxs(
|
|
113
|
+
Flex,
|
|
114
|
+
{
|
|
115
|
+
align: "center",
|
|
116
|
+
direction: "column",
|
|
117
|
+
height: "100%",
|
|
118
|
+
justify: "center",
|
|
119
|
+
maxWidth: "650px",
|
|
120
|
+
pb: { initial: "6", sm: "0" },
|
|
121
|
+
pt: { initial: "4", sm: "0" },
|
|
122
|
+
px: { initial: "4", sm: "0" },
|
|
123
|
+
width: "100%",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", mb: "1", children: curriculum.title }),
|
|
126
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading3", children: reviewContents.title }),
|
|
127
|
+
/* @__PURE__ */ jsx(Separator, { my: "4", style: { width: 100 } }),
|
|
128
|
+
/* @__PURE__ */ jsxs(Typo, { align: "left", as: "p", color: "gray", mb: "4", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Typo, { as: "span", weight: "bold", children: sectionTitle }),
|
|
130
|
+
" ",
|
|
131
|
+
/* @__PURE__ */ jsx(Typo, { children: reviewContents.description })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsx(Box, { mb: "5", overflowY: "auto", width: "100%", children: reviewContents.questions.map((question) => {
|
|
134
|
+
if (done) {
|
|
135
|
+
return renderReviewContent({ question, answer: formik.values.answers[question.uuid] });
|
|
136
|
+
}
|
|
137
|
+
return renderPreviewContent({ question });
|
|
138
|
+
}) }),
|
|
139
|
+
/* @__PURE__ */ jsx(Button, { color: "yellow", onClick: onStart, variant: done ? "outline" : "solid", children: done ? "\uB098\uC758 \uC751\uB2F5 \uC218\uC815\uD558\uAE30" : reviewContents.buttonTitle })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
var start_review_default = StartReview;
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
start_review_default
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=chunk-L3YH4VUE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.tsx"],"sourcesContent":["import React from 'react';\nimport type { BadgeProps} from '@/atoms';\nimport { Badge, Box, Button, Flex, Grid, Heading, Separator, Typo } from '@/atoms'; \nimport {\n getCurriculumIcon,\n getCurriculumQuestionIconColor,\n getCurriculumQuestionTypeDescription,\n} from '@/utils/curriculum.utils';\nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport { useCurriculumReviewContext } from './curriculum-review-context';\n\ninterface StartReviewProps {\n onStart: () => void;\n}\n\n\nconst renderPreviewContent = (args: {\n question: ReviewQuestionElement;\n}):React.ReactElement => {\n const { question } = args;\n const Icon = getCurriculumIcon({\n type: question.type,\n icon: question.icon,\n });\n const getDescription = (): string => {\n return [\n getCurriculumQuestionTypeDescription(question.type),\n question.duration ? `${question.duration}분` : '',\n ]\n .filter(Boolean)\n .join(' | ');\n };\n\n return (\n <Grid\n columns=\"16px 1fr\"\n gap=\"2\"\n key={question.uuid}\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n >\n <Box mt=\"1\">\n <Icon color={getCurriculumQuestionIconColor(question.type)} />\n </Box>\n <Box>\n <Typo as=\"p\" color=\"gray\" weight=\"bold\">\n {question.title}\n </Typo>\n <Typo color=\"gray\">{getDescription()}</Typo>\n </Box>\n </Grid>\n );\n};\n\n\nconst getReviewContentValue = (question: ReviewQuestionElement, answer: string): string => {\n if(question.type === 'question_satisfaction_option'){ \n return question.options?.find((option)=>option.value === Number(answer))?.label ?? '';\n }\n return answer\n}\n\n\nconst renderReviewContent = (args: {\n question: ReviewQuestionElement;\n answer: string;\n}):React.ReactElement => {\n const { question, answer } = args;\n const Icon = getCurriculumIcon({\n type: question.type,\n icon: question.icon,\n }); \n\n const color = getCurriculumQuestionIconColor(question.type);\n const badgeColor: BadgeProps['color'] = ['question_radio','question_satisfaction_option'].includes(question.type) ? 'accent' : 'neutral';\n const value = getReviewContentValue(question, answer);\n\n return (\n <Grid\n columns=\"16px 1fr\"\n gap=\"2\"\n key={question.uuid}\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n >\n <Box>\n <Icon color={color} />\n </Box>\n\n <Box>\n <Typo as=\"p\" color=\"gray\" mb=\"2\" weight=\"bold\">{question.title}</Typo>\n <Badge color={badgeColor} size=\"large\" style={{whiteSpace: 'break-spaces', lineBreak: 'anywhere'}}>\n {value || '(미 응답)'}\n </Badge>\n </Box>\n \n </Grid>\n );\n};\n\nfunction StartReview({ onStart }: StartReviewProps): React.ReactNode {\n const { curriculum, reviewContents, sectionTitle, done,formik } =\n useCurriculumReviewContext();\n\n return (\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n maxWidth=\"650px\"\n pb={{initial: '6', sm: '0'}}\n pt={{initial: '4', sm: '0'}}\n px={{initial: '4', sm: '0'}}\n width=\"100%\"\n >\n <Typo color=\"gray\" mb=\"1\">{curriculum.title}</Typo>\n <Heading variant=\"heading3\">{reviewContents.title}</Heading>\n <Separator my=\"4\" style={{ width: 100 }} />\n\n <Typo align=\"left\" as=\"p\" color=\"gray\" mb=\"4\">\n <Typo as=\"span\" weight=\"bold\">\n {sectionTitle}\n </Typo>\n {' '}\n <Typo>{reviewContents.description}</Typo>\n </Typo>\n\n <Box mb=\"5\" overflowY=\"auto\" width=\"100%\">\n {reviewContents.questions.map((question)=>{\n if(done){\n return renderReviewContent({ question, answer: formik.values.answers[question.uuid]});\n }\n return renderPreviewContent({ question });\n })}\n </Box>\n <Button color=\"yellow\" onClick={onStart} variant={done ? 'outline' : 'solid'}>\n {done ? '나의 응답 수정하기' : reviewContents.buttonTitle}\n </Button>\n </Flex>\n </Flex>\n );\n}\n\nexport default StartReview;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CQ,cAEF,YAFE;AA3BR,IAAM,uBAAuB,CAAC,SAEL;AACvB,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,OAAO,kBAAkB;AAAA,IAC7B,MAAM,SAAS;AAAA,IACf,MAAM,SAAS;AAAA,EACjB,CAAC;AACD,QAAM,iBAAiB,MAAc;AACnC,WAAO;AAAA,MACL,qCAAqC,SAAS,IAAI;AAAA,MAClD,SAAS,WAAW,GAAG,SAAS,QAAQ,WAAM;AAAA,IAChD,EACG,OAAO,OAAO,EACd,KAAK,KAAK;AAAA,EACf;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,KAAI;AAAA,MAEJ,IAAG;AAAA,MACH,IAAG;AAAA,MACH,OAAM;AAAA,MAEN;AAAA,4BAAC,OAAI,IAAG,KACN,8BAAC,QAAK,OAAO,+BAA+B,SAAS,IAAI,GAAG,GAC9D;AAAA,QACA,qBAAC,OACC;AAAA,8BAAC,QAAK,IAAG,KAAI,OAAM,QAAO,QAAO,QAC9B,mBAAS,OACZ;AAAA,UACA,oBAAC,QAAK,OAAM,QAAQ,yBAAe,GAAE;AAAA,WACvC;AAAA;AAAA;AAAA,IAb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