@tipp/ui 2.3.15 → 2.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +56 -56
- package/dist/app/platform/coach-question-list.js +26 -26
- package/dist/app/platform/contents-card.js +26 -26
- package/dist/app/platform/curriculum-card.js +2 -2
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +44 -44
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +44 -44
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +45 -45
- package/dist/app/platform/goal-manage-card-read.js +26 -26
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +44 -44
- package/dist/app/platform/report-card.js +26 -26
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +45 -45
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +45 -45
- package/dist/app/platform/session-review-simple-read.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +25 -25
- package/dist/app/platform/userInfos/session-user-info-detail.js +25 -25
- package/dist/app/platform/userInfos/utils.js +25 -25
- package/dist/atoms/index.js +60 -60
- package/dist/chunk-2GTKMGHS.js +70 -0
- package/dist/chunk-2GTKMGHS.js.map +1 -0
- package/dist/chunk-2OVAPUSZ.js +218 -0
- package/dist/chunk-2OVAPUSZ.js.map +1 -0
- package/dist/chunk-33FHBMD2.js +89 -0
- package/dist/chunk-33FHBMD2.js.map +1 -0
- package/dist/chunk-3IDHQODC.js +99 -0
- package/dist/chunk-3IDHQODC.js.map +1 -0
- package/dist/chunk-4GDCXSDS.js +87 -0
- package/dist/chunk-4GDCXSDS.js.map +1 -0
- package/dist/chunk-52IAQ2FT.js +233 -0
- package/dist/chunk-52IAQ2FT.js.map +1 -0
- package/dist/chunk-54POQFUI.js +98 -0
- package/dist/chunk-54POQFUI.js.map +1 -0
- package/dist/chunk-5FBWB2W4.js +57 -0
- package/dist/chunk-5FBWB2W4.js.map +1 -0
- package/dist/chunk-5VPNBYFV.js +89 -0
- package/dist/chunk-5VPNBYFV.js.map +1 -0
- package/dist/chunk-6INLPCD5.js +30 -0
- package/dist/chunk-6INLPCD5.js.map +1 -0
- package/dist/chunk-6LJJRIWT.js +49 -0
- package/dist/chunk-6LJJRIWT.js.map +1 -0
- package/dist/chunk-6WT3VRAP.js +144 -0
- package/dist/chunk-6WT3VRAP.js.map +1 -0
- package/dist/chunk-7MB2G5XF.js +145 -0
- package/dist/chunk-7MB2G5XF.js.map +1 -0
- package/dist/chunk-AB5USZGJ.js +101 -0
- package/dist/chunk-AB5USZGJ.js.map +1 -0
- package/dist/chunk-AJWRR5KG.js +74 -0
- package/dist/chunk-AJWRR5KG.js.map +1 -0
- package/dist/chunk-ALFE4BOS.js +139 -0
- package/dist/chunk-ALFE4BOS.js.map +1 -0
- package/dist/chunk-BJLJNTF2.js +218 -0
- package/dist/chunk-BJLJNTF2.js.map +1 -0
- package/dist/chunk-DAZY7DRP.js +145 -0
- package/dist/chunk-DAZY7DRP.js.map +1 -0
- package/dist/chunk-DXD774YC.js +145 -0
- package/dist/chunk-DXD774YC.js.map +1 -0
- package/dist/chunk-EAMKUF7R.js +75 -0
- package/dist/chunk-EAMKUF7R.js.map +1 -0
- package/dist/chunk-EMNEV6EN.js +139 -0
- package/dist/chunk-EMNEV6EN.js.map +1 -0
- package/dist/chunk-ETKTERDA.js +51 -0
- package/dist/chunk-ETKTERDA.js.map +1 -0
- package/dist/chunk-FVNVGFTT.js +218 -0
- package/dist/chunk-FVNVGFTT.js.map +1 -0
- package/dist/chunk-FXQYWO4P.js +57 -0
- package/dist/chunk-FXQYWO4P.js.map +1 -0
- package/dist/chunk-G4DOK5DQ.js +64 -0
- package/dist/chunk-G4DOK5DQ.js.map +1 -0
- package/dist/chunk-GN7UAKYU.js +145 -0
- package/dist/chunk-GN7UAKYU.js.map +1 -0
- package/dist/chunk-GTB6HEJR.js +218 -0
- package/dist/chunk-GTB6HEJR.js.map +1 -0
- package/dist/chunk-JO5OXSQV.js +363 -0
- package/dist/chunk-JO5OXSQV.js.map +1 -0
- package/dist/chunk-JOUSZBPX.js +196 -0
- package/dist/chunk-JOUSZBPX.js.map +1 -0
- package/dist/chunk-JOXWMJKW.js +64 -0
- package/dist/chunk-JOXWMJKW.js.map +1 -0
- package/dist/chunk-JQU3CE4K.js +174 -0
- package/dist/chunk-JQU3CE4K.js.map +1 -0
- package/dist/chunk-KD3SPRXH.js +37 -0
- package/dist/chunk-KD3SPRXH.js.map +1 -0
- package/dist/chunk-KEKNMQJK.js +69 -0
- package/dist/chunk-KEKNMQJK.js.map +1 -0
- package/dist/chunk-KGPXD5VO.js +228 -0
- package/dist/chunk-KGPXD5VO.js.map +1 -0
- package/dist/chunk-KMNAZCXO.js +117 -0
- package/dist/chunk-KMNAZCXO.js.map +1 -0
- package/dist/chunk-KPE4JB42.js +218 -0
- package/dist/chunk-KPE4JB42.js.map +1 -0
- package/dist/chunk-MLOC57ZN.js +64 -0
- package/dist/chunk-MLOC57ZN.js.map +1 -0
- package/dist/chunk-MRW2RO32.js +163 -0
- package/dist/chunk-MRW2RO32.js.map +1 -0
- package/dist/chunk-MYELL2V2.js +63 -0
- package/dist/chunk-MYELL2V2.js.map +1 -0
- package/dist/chunk-NMOPWSEY.js +145 -0
- package/dist/chunk-NMOPWSEY.js.map +1 -0
- package/dist/chunk-NWCLGWD7.js +218 -0
- package/dist/chunk-NWCLGWD7.js.map +1 -0
- package/dist/chunk-ONUWABWT.js +169 -0
- package/dist/chunk-ONUWABWT.js.map +1 -0
- package/dist/chunk-PTCXWBAB.js +218 -0
- package/dist/chunk-PTCXWBAB.js.map +1 -0
- package/dist/chunk-PXSZVAKR.js +68 -0
- package/dist/chunk-PXSZVAKR.js.map +1 -0
- package/dist/chunk-R3VOZZ5O.js +63 -0
- package/dist/chunk-R3VOZZ5O.js.map +1 -0
- package/dist/chunk-S3ITGMDG.js +218 -0
- package/dist/chunk-S3ITGMDG.js.map +1 -0
- package/dist/chunk-SFYV52JB.js +151 -0
- package/dist/chunk-SFYV52JB.js.map +1 -0
- package/dist/chunk-TJQUUR4N.js +54 -0
- package/dist/chunk-TJQUUR4N.js.map +1 -0
- package/dist/chunk-TYQOHHL5.js +63 -0
- package/dist/chunk-TYQOHHL5.js.map +1 -0
- package/dist/chunk-VRY3HFX6.js +45 -0
- package/dist/chunk-VRY3HFX6.js.map +1 -0
- package/dist/chunk-X6YSDRES.js +165 -0
- package/dist/chunk-X6YSDRES.js.map +1 -0
- package/dist/chunk-XU2LW3CT.js +43 -0
- package/dist/chunk-XU2LW3CT.js.map +1 -0
- package/dist/chunk-XUTNPV7E.js +218 -0
- package/dist/chunk-XUTNPV7E.js.map +1 -0
- package/dist/chunk-YWEWWXKM.js +51 -0
- package/dist/chunk-YWEWWXKM.js.map +1 -0
- package/dist/chunk-YYWEFK4H.js +39 -0
- package/dist/chunk-YYWEFK4H.js.map +1 -0
- package/dist/chunk-Z5JV7JGZ.js +58 -0
- package/dist/chunk-Z5JV7JGZ.js.map +1 -0
- package/dist/chunk-ZMXFJ3AZ.js +196 -0
- package/dist/chunk-ZMXFJ3AZ.js.map +1 -0
- package/dist/context/index.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +107 -107
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +7 -7
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +10 -10
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +11 -11
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +1 -1
- package/dist/molecules/curriculumV2/index.js +19 -19
- package/dist/molecules/description-json-render.js +2 -2
- package/dist/molecules/dynamic-field.cjs +71 -68
- package/dist/molecules/dynamic-field.cjs.map +1 -1
- package/dist/molecules/dynamic-field.js +3 -2
- package/dist/molecules/dynamic-form.cjs +32 -29
- package/dist/molecules/dynamic-form.cjs.map +1 -1
- package/dist/molecules/dynamic-form.js +4 -3
- package/dist/molecules/expand-table/index.js +1 -1
- package/dist/molecules/index.cjs +9 -9
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +40 -40
- package/dist/molecules/learning-post.js +2 -2
- package/dist/molecules/stepper.js +2 -2
- package/dist/molecules/tag-selector.js +3 -3
- package/package.json +1 -1
- package/src/molecules/dynamic-field.tsx +11 -9
- package/src/molecules/dynamic-form.tsx +1 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Popover
|
|
3
|
+
} from "./chunk-5AVBYDPB.js";
|
|
4
|
+
import {
|
|
5
|
+
IconButton
|
|
6
|
+
} from "./chunk-XK6VEVOK.js";
|
|
7
|
+
import {
|
|
8
|
+
Box
|
|
9
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
10
|
+
import {
|
|
11
|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
import {
|
|
14
|
+
Button
|
|
15
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
16
|
+
import {
|
|
17
|
+
ChevronLeftIcon,
|
|
18
|
+
ChevronRightIcon
|
|
19
|
+
} from "./chunk-W5TPOFOO.js";
|
|
20
|
+
import {
|
|
21
|
+
Heading
|
|
22
|
+
} from "./chunk-BESTU2AY.js";
|
|
23
|
+
import {
|
|
24
|
+
Typo
|
|
25
|
+
} from "./chunk-PMJIFLDT.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, { modal: true, onOpenChange, open: isOpen, children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(Button, { className: "react-datepicker_dropdown_header", 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
|
+
className: "react-datepicker_dropdown_item",
|
|
131
|
+
color: "gray",
|
|
132
|
+
"data-year-month-dropdown-tiem": item,
|
|
133
|
+
onClick: () => {
|
|
134
|
+
onSelect(item);
|
|
135
|
+
},
|
|
136
|
+
onMouseDown: (e) => {
|
|
137
|
+
e.stopPropagation();
|
|
138
|
+
e.preventDefault();
|
|
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
|
+
className: "react-datepicker_dropdown_header",
|
|
177
|
+
disabled: prevMonthButtonDisabled,
|
|
178
|
+
onClick: decreaseMonth,
|
|
179
|
+
type: "button",
|
|
180
|
+
variant: "ghost",
|
|
181
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", children: [
|
|
185
|
+
/* @__PURE__ */ jsx(
|
|
186
|
+
DropdownSelector,
|
|
187
|
+
{
|
|
188
|
+
isOpen: isYearDropdownOpen,
|
|
189
|
+
onOpenChange: setIsYearDropdownOpen,
|
|
190
|
+
onSelect: (value) => {
|
|
191
|
+
changeYear(value);
|
|
192
|
+
setIsYearDropdownOpen(false);
|
|
193
|
+
},
|
|
194
|
+
options: years,
|
|
195
|
+
selectedValue: year,
|
|
196
|
+
suffix: "\uB144"
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ jsx(
|
|
200
|
+
DropdownSelector,
|
|
201
|
+
{
|
|
202
|
+
isOpen: isMonthDropdownOpen,
|
|
203
|
+
onOpenChange: setIsMonthDropdownOpen,
|
|
204
|
+
onSelect: (value) => {
|
|
205
|
+
changeMonth(value - 1);
|
|
206
|
+
setIsMonthDropdownOpen(false);
|
|
207
|
+
},
|
|
208
|
+
options: Array.from({ length: 12 }, (_, index) => index + 1),
|
|
209
|
+
selectedValue: month,
|
|
210
|
+
suffix: "\uC6D4"
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
] }),
|
|
214
|
+
/* @__PURE__ */ jsx(
|
|
215
|
+
IconButton,
|
|
216
|
+
{
|
|
217
|
+
className: "react-datepicker_dropdown_header",
|
|
218
|
+
disabled: nextMonthButtonDisabled,
|
|
219
|
+
onClick: increaseMonth,
|
|
220
|
+
type: "button",
|
|
221
|
+
variant: "ghost",
|
|
222
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
] });
|
|
226
|
+
};
|
|
227
|
+
return renderer;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export {
|
|
231
|
+
DatePicker
|
|
232
|
+
};
|
|
233
|
+
//# sourceMappingURL=chunk-52IAQ2FT.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 } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Popover } from '@/atoms/popover';\nimport { Typo } from '@/atoms/typo';\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 // eslint-disable-next-line react-hooks/exhaustive-deps -- 트리거 최적화\n }, [isOpen]);\n\n return (\n <Popover.Root modal onOpenChange={onOpenChange} open={isOpen}>\n <Popover.Trigger>\n <Button className=\"react-datepicker_dropdown_header\" 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 className=\"react-datepicker_dropdown_item\"\n color=\"gray\"\n data-year-month-dropdown-tiem={item}\n key={item}\n onClick={() => {\n onSelect(item);\n }}\n onMouseDown={(e) => {\n e.stopPropagation();\n e.preventDefault();\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 className=\"react-datepicker_dropdown_header\"\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 className=\"react-datepicker_dropdown_header\"\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":"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","names":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sidebar_item_default
|
|
3
|
+
} from "./chunk-SZA3RAKD.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-ZFWZAZPG.js";
|
|
7
|
+
import {
|
|
8
|
+
Tabs
|
|
9
|
+
} from "./chunk-5ZITU5L7.js";
|
|
10
|
+
import {
|
|
11
|
+
Grid
|
|
12
|
+
} from "./chunk-EGEQY3KT.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/CurriculumSidebar/index.tsx
|
|
18
|
+
import { useMemo } from "react";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var TAB_LIST = [
|
|
21
|
+
{
|
|
22
|
+
label: "\uAC15\uC758 \uBAA9\uCC28",
|
|
23
|
+
value: "curriculum"
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
var TABS_LIST_STYLE = {
|
|
27
|
+
padding: "0 var(--space-3)"
|
|
28
|
+
};
|
|
29
|
+
var TABS_CONTENT_STYLE = {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
height: "100%",
|
|
32
|
+
width: "100%"
|
|
33
|
+
};
|
|
34
|
+
function CurriculumSidebar() {
|
|
35
|
+
const {
|
|
36
|
+
curriculum,
|
|
37
|
+
selectedIndex,
|
|
38
|
+
setSelectedIndex,
|
|
39
|
+
scrollAreaRef,
|
|
40
|
+
curriculumCompleteMap,
|
|
41
|
+
customTabs
|
|
42
|
+
} = useCurriculumContext();
|
|
43
|
+
const list = curriculum.contents.list;
|
|
44
|
+
const tabList = useMemo(() => {
|
|
45
|
+
return [...TAB_LIST, ...customTabs != null ? customTabs : []];
|
|
46
|
+
}, [customTabs]);
|
|
47
|
+
return /* @__PURE__ */ jsx(Tabs.Root, { asChild: true, defaultValue: TAB_LIST[0].value, children: /* @__PURE__ */ jsxs(Grid, { height: "100%", overflowY: "auto", rows: "auto 1fr ", width: "100%", children: [
|
|
48
|
+
/* @__PURE__ */ jsx(Tabs.List, { style: TABS_LIST_STYLE, children: tabList.map((tab) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: tab.value, children: tab.label }, tab.value)) }),
|
|
49
|
+
/* @__PURE__ */ jsxs(
|
|
50
|
+
Box,
|
|
51
|
+
{
|
|
52
|
+
height: "100%",
|
|
53
|
+
overflowY: "auto",
|
|
54
|
+
position: "relative",
|
|
55
|
+
ref: scrollAreaRef,
|
|
56
|
+
width: "100%",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsxs(
|
|
59
|
+
Tabs.Content,
|
|
60
|
+
{
|
|
61
|
+
style: TABS_CONTENT_STYLE,
|
|
62
|
+
value: TAB_LIST[0].value,
|
|
63
|
+
children: [
|
|
64
|
+
list.map((item, index) => /* @__PURE__ */ jsx(
|
|
65
|
+
sidebar_item_default,
|
|
66
|
+
{
|
|
67
|
+
done: curriculumCompleteMap[item.uuid],
|
|
68
|
+
index,
|
|
69
|
+
item,
|
|
70
|
+
selectedIndex,
|
|
71
|
+
setSelectedIndex
|
|
72
|
+
},
|
|
73
|
+
item.uuid
|
|
74
|
+
)),
|
|
75
|
+
/* @__PURE__ */ jsx(Box, { height: "150px" })
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
TAB_LIST[0].value
|
|
79
|
+
),
|
|
80
|
+
customTabs == null ? void 0 : customTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
81
|
+
Tabs.Content,
|
|
82
|
+
{
|
|
83
|
+
style: TABS_CONTENT_STYLE,
|
|
84
|
+
value: tab.value,
|
|
85
|
+
children: tab.content
|
|
86
|
+
},
|
|
87
|
+
tab.value
|
|
88
|
+
))
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] }) });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
CurriculumSidebar
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=chunk-54POQFUI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/index.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Tabs } from '@/atoms/tabs';\nimport { useCurriculumContext } from '../curriculum-context';\nimport SidebarItem from './sidebar-item';\n\nconst TAB_LIST = [\n {\n label: '강의 목차',\n value: 'curriculum',\n },\n];\n\nconst TABS_LIST_STYLE: React.CSSProperties = {\n padding: '0 var(--space-3)',\n};\n\nconst TABS_CONTENT_STYLE: React.CSSProperties = {\n position: 'absolute',\n height: '100%',\n width: '100%',\n};\n\n\nexport function CurriculumSidebar(): React.ReactNode {\n const {\n curriculum,\n selectedIndex,\n setSelectedIndex,\n scrollAreaRef,\n curriculumCompleteMap,\n customTabs,\n } = useCurriculumContext();\n const list = curriculum.contents.list;\n\n const tabList = useMemo(() => {\n return [...TAB_LIST, ...(customTabs ?? [])];\n }, [customTabs]);\n\n return (\n <Tabs.Root asChild defaultValue={TAB_LIST[0].value}>\n <Grid height=\"100%\" overflowY=\"auto\" rows=\"auto 1fr \" width=\"100%\">\n <Tabs.List style={TABS_LIST_STYLE}>\n {tabList.map((tab) => (\n <Tabs.Trigger key={tab.value} value={tab.value}>\n {tab.label}\n </Tabs.Trigger>\n ))}\n </Tabs.List>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n position=\"relative\"\n ref={scrollAreaRef}\n width=\"100%\"\n >\n <Tabs.Content\n key={TAB_LIST[0].value}\n style={TABS_CONTENT_STYLE}\n value={TAB_LIST[0].value}\n >\n {list.map((item, index) => (\n <SidebarItem\n done={curriculumCompleteMap[item.uuid]}\n index={index}\n item={item}\n key={item.uuid}\n selectedIndex={selectedIndex}\n setSelectedIndex={setSelectedIndex}\n />\n ))}\n <Box height=\"150px\" />\n </Tabs.Content>\n {customTabs?.map((tab) => (\n <Tabs.Content\n key={tab.value}\n style={TABS_CONTENT_STYLE}\n value={tab.value}\n >\n {tab.content}\n </Tabs.Content>\n ))}\n </Box>\n </Grid>\n </Tabs.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe;AA6CnB,cAYF,YAZE;AAtCZ,IAAM,WAAW;AAAA,EACf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,IAAM,kBAAuC;AAAA,EAC3C,SAAS;AACX;AAEA,IAAM,qBAA0C;AAAA,EAC9C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AACT;AAGO,SAAS,oBAAqC;AACnD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB;AACzB,QAAM,OAAO,WAAW,SAAS;AAEjC,QAAM,UAAU,QAAQ,MAAM;AAC5B,WAAO,CAAC,GAAG,UAAU,GAAI,kCAAc,CAAC,CAAE;AAAA,EAC5C,GAAG,CAAC,UAAU,CAAC;AAEf,SACE,oBAAC,KAAK,MAAL,EAAU,SAAO,MAAC,cAAc,SAAS,CAAC,EAAE,OAC3C,+BAAC,QAAK,QAAO,QAAO,WAAU,QAAO,MAAK,aAAY,OAAM,QAC1D;AAAA,wBAAC,KAAK,MAAL,EAAU,OAAO,iBACf,kBAAQ,IAAI,CAAC,QACZ,oBAAC,KAAK,SAAL,EAA6B,OAAO,IAAI,OACtC,cAAI,SADY,IAAI,KAEvB,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAO;AAAA,QACP,WAAU;AAAA,QACV,UAAS;AAAA,QACT,KAAK;AAAA,QACL,OAAM;AAAA,QAEN;AAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cAEC,OAAO;AAAA,cACP,OAAO,SAAS,CAAC,EAAE;AAAA,cAElB;AAAA,qBAAK,IAAI,CAAC,MAAM,UACf;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,sBAAsB,KAAK,IAAI;AAAA,oBACrC;AAAA,oBACA;AAAA,oBAEA;AAAA,oBACA;AAAA;AAAA,kBAFK,KAAK;AAAA,gBAGZ,CACD;AAAA,gBACD,oBAAC,OAAI,QAAO,SAAQ;AAAA;AAAA;AAAA,YAdf,SAAS,CAAC,EAAE;AAAA,UAenB;AAAA,UACC,yCAAY,IAAI,CAAC,QAChB;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cAEC,OAAO;AAAA,cACP,OAAO,IAAI;AAAA,cAEV,cAAI;AAAA;AAAA,YAJA,IAAI;AAAA,UAKX;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
infoList,
|
|
3
|
+
renderDataListItem,
|
|
4
|
+
sessionList
|
|
5
|
+
} from "./chunk-JWAQUXGB.js";
|
|
6
|
+
import {
|
|
7
|
+
Separator
|
|
8
|
+
} from "./chunk-HYITAA4J.js";
|
|
9
|
+
import {
|
|
10
|
+
Grid
|
|
11
|
+
} from "./chunk-EGEQY3KT.js";
|
|
12
|
+
import {
|
|
13
|
+
DataList
|
|
14
|
+
} from "./chunk-VTJZMOSP.js";
|
|
15
|
+
import {
|
|
16
|
+
Box
|
|
17
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
18
|
+
import {
|
|
19
|
+
Flex
|
|
20
|
+
} from "./chunk-25HMMI7R.js";
|
|
21
|
+
import {
|
|
22
|
+
Heading
|
|
23
|
+
} from "./chunk-BESTU2AY.js";
|
|
24
|
+
|
|
25
|
+
// src/app/platform/userInfos/session-user-info-detail.tsx
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function SectionWrapper({
|
|
28
|
+
title,
|
|
29
|
+
children
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
32
|
+
/* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto 1fr", gap: "3", mb: "5", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading5", children: title }),
|
|
34
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" })
|
|
35
|
+
] }),
|
|
36
|
+
children
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function SessionUserInfoDetail({
|
|
40
|
+
customer,
|
|
41
|
+
session,
|
|
42
|
+
onClickCopy
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "6", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(SectionWrapper, { title: "\uC138\uC158 \uC815\uBCF4", children: /* @__PURE__ */ jsx(DataList.Root, { children: sessionList.map(
|
|
46
|
+
(info) => renderDataListItem({ info, data: session, onClickCopy })
|
|
47
|
+
) }) }),
|
|
48
|
+
/* @__PURE__ */ jsx(SectionWrapper, { title: "\uD68C\uC6D0 \uC815\uBCF4", children: /* @__PURE__ */ jsx(DataList.Root, { children: infoList.map(
|
|
49
|
+
(info) => renderDataListItem({ info, data: customer, onClickCopy })
|
|
50
|
+
) }) })
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
SessionUserInfoDetail
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=chunk-5FBWB2W4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/session-user-info-detail.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, DataList, Flex, Grid, Heading, Separator } from '../../../atoms';\nimport type { Customer, Session } from './utils';\nimport { infoList, renderDataListItem, sessionList } from './utils';\n\nexport interface SessionUserInfoDetailProps {\n customer: Customer;\n session: Session;\n onClickCopy: (value: string) => void;\n}\n\nfunction SectionWrapper({\n title,\n children,\n}: {\n title: string;\n children: React.ReactNode;\n}): React.ReactNode {\n return (\n <Box>\n <Grid align=\"center\" columns=\"auto 1fr\" gap=\"3\" mb=\"5\">\n <Heading variant=\"heading5\">{title}</Heading>\n\n <Separator size=\"4\" />\n </Grid>\n {children}\n </Box>\n );\n}\n\nexport function SessionUserInfoDetail({\n customer,\n session,\n onClickCopy,\n}: SessionUserInfoDetailProps): React.ReactNode {\n return (\n <Flex direction=\"column\" gap=\"6\">\n <SectionWrapper title=\"세션 정보\">\n <DataList.Root>\n {sessionList.map((info) =>\n renderDataListItem({ info, data: session, onClickCopy })\n )}\n </DataList.Root>\n </SectionWrapper>\n\n <SectionWrapper title=\"회원 정보\">\n <DataList.Root>\n {infoList.map((info) =>\n renderDataListItem({ info, data: customer, onClickCopy })\n )}\n </DataList.Root>\n </SectionWrapper>\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBM,SACE,KADF;AATN,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AACF,GAGoB;AAClB,SACE,qBAAC,OACC;AAAA,yBAAC,QAAK,OAAM,UAAS,SAAQ,YAAW,KAAI,KAAI,IAAG,KACjD;AAAA,0BAAC,WAAQ,SAAQ,YAAY,iBAAM;AAAA,MAEnC,oBAAC,aAAU,MAAK,KAAI;AAAA,OACtB;AAAA,IACC;AAAA,KACH;AAEJ;AAEO,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AACF,GAAgD;AAC9C,SACE,qBAAC,QAAK,WAAU,UAAS,KAAI,KAC3B;AAAA,wBAAC,kBAAe,OAAM,6BACpB,8BAAC,SAAS,MAAT,EACE,sBAAY;AAAA,MAAI,CAAC,SAChB,mBAAmB,EAAE,MAAM,MAAM,SAAS,YAAY,CAAC;AAAA,IACzD,GACF,GACF;AAAA,IAEA,oBAAC,kBAAe,OAAM,6BACpB,8BAAC,SAAS,MAAT,EACE,mBAAS;AAAA,MAAI,CAAC,SACb,mBAAmB,EAAE,MAAM,MAAM,UAAU,YAAY,CAAC;AAAA,IAC1D,GACF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestion_default
|
|
3
|
+
} from "./chunk-R3VOZZ5O.js";
|
|
4
|
+
import {
|
|
5
|
+
complete_review_default
|
|
6
|
+
} from "./chunk-W747CDDK.js";
|
|
7
|
+
import {
|
|
8
|
+
start_review_default
|
|
9
|
+
} from "./chunk-GNTZY4DG.js";
|
|
10
|
+
import {
|
|
11
|
+
CurriculumReviewProvider,
|
|
12
|
+
useCurriculumReviewContext
|
|
13
|
+
} from "./chunk-GMKRNFH5.js";
|
|
14
|
+
|
|
15
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
function CurriculumReviewStepsInner() {
|
|
18
|
+
const {
|
|
19
|
+
formik,
|
|
20
|
+
step,
|
|
21
|
+
handleStart,
|
|
22
|
+
handleNext,
|
|
23
|
+
handlePrev,
|
|
24
|
+
onClickReviewMyAnswer,
|
|
25
|
+
handleSubmit,
|
|
26
|
+
currentQuestion,
|
|
27
|
+
currentAnswer,
|
|
28
|
+
currentError,
|
|
29
|
+
reviewContents,
|
|
30
|
+
handleAnswerChange
|
|
31
|
+
} = useCurriculumReviewContext();
|
|
32
|
+
const { questions } = reviewContents;
|
|
33
|
+
if (step === 0) {
|
|
34
|
+
return /* @__PURE__ */ jsx(start_review_default, { onStart: handleStart });
|
|
35
|
+
}
|
|
36
|
+
if (step > 0 && step <= questions.length && currentQuestion) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
ReviewQuestion_default,
|
|
39
|
+
{
|
|
40
|
+
answer: currentAnswer,
|
|
41
|
+
error: currentError,
|
|
42
|
+
index: step - 1,
|
|
43
|
+
isLast: step === questions.length,
|
|
44
|
+
isLoading: formik.isSubmitting,
|
|
45
|
+
isNextDisabled: currentError !== void 0,
|
|
46
|
+
onChange: handleAnswerChange,
|
|
47
|
+
onNext: handleNext,
|
|
48
|
+
onPrev: handlePrev,
|
|
49
|
+
onSubmit: handleSubmit,
|
|
50
|
+
question: currentQuestion,
|
|
51
|
+
total: questions.length
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ jsx(complete_review_default, { onClickReviewMyAnswer });
|
|
56
|
+
}
|
|
57
|
+
function CurriculumReviewSteps({
|
|
58
|
+
contents,
|
|
59
|
+
title,
|
|
60
|
+
onClickEndReview,
|
|
61
|
+
onSubmit,
|
|
62
|
+
defaultValues,
|
|
63
|
+
curriculum,
|
|
64
|
+
onReviewValueChange,
|
|
65
|
+
mode,
|
|
66
|
+
done
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
CurriculumReviewProvider,
|
|
70
|
+
{
|
|
71
|
+
curriculum,
|
|
72
|
+
defaultValues,
|
|
73
|
+
done,
|
|
74
|
+
mode,
|
|
75
|
+
onClickEndReview,
|
|
76
|
+
onReviewValueChange,
|
|
77
|
+
onSubmit,
|
|
78
|
+
reviewContents: contents,
|
|
79
|
+
sectionTitle: title,
|
|
80
|
+
children: /* @__PURE__ */ jsx(CurriculumReviewStepsInner, {})
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
var CurriculumReviewSteps_default = CurriculumReviewSteps;
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
CurriculumReviewSteps_default
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=chunk-5VPNBYFV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx"],"sourcesContent":["import React from 'react';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport type { Curriculum } from '@/types'; \nimport {\n CurriculumReviewProvider,\n useCurriculumReviewContext,\n} from './curriculum-review-context';\nimport StartReview from './start-review';\nimport CompleteReview from './complete-review';\nimport ReviewQuestion from './ReviewQuestion';\n \nfunction CurriculumReviewStepsInner(): React.ReactNode {\n const {\n formik,\n step,\n handleStart,\n handleNext,\n handlePrev,\n onClickReviewMyAnswer,\n handleSubmit,\n currentQuestion,\n currentAnswer,\n currentError,\n reviewContents,\n handleAnswerChange,\n } = useCurriculumReviewContext();\n const { questions } = reviewContents;\n\n if (step === 0) {\n return <StartReview onStart={handleStart} />;\n }\n if (step > 0 && step <= questions.length && currentQuestion) {\n return (\n <ReviewQuestion\n answer={currentAnswer}\n error={currentError}\n index={step - 1}\n isLast={step === questions.length}\n isLoading={formik.isSubmitting}\n isNextDisabled={currentError !== undefined}\n onChange={handleAnswerChange}\n onNext={handleNext}\n onPrev={handlePrev}\n onSubmit={handleSubmit}\n question={currentQuestion}\n total={questions.length}\n />\n );\n }\n return <CompleteReview onClickReviewMyAnswer={onClickReviewMyAnswer} />;\n}\n\ninterface CurriculumReviewStepsProps {\n contents: CurriculumReviewContents;\n title: string | undefined;\n onClickEndReview: () => void;\n onSubmit: (values: Record<string, string>) => Promise<boolean>;\n defaultValues?: Record<string, string>;\n curriculum: Curriculum;\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n mode: 'edit' | 'create';\n done: boolean; \n}\n\nfunction CurriculumReviewSteps({\n contents,\n title,\n onClickEndReview,\n onSubmit,\n defaultValues,\n curriculum,\n onReviewValueChange,\n mode,\n done,\n}: CurriculumReviewStepsProps): React.ReactNode { \n\n return (\n <CurriculumReviewProvider\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onSubmit}\n reviewContents={contents}\n sectionTitle={title}\n >\n <CurriculumReviewStepsInner />\n </CurriculumReviewProvider>\n );\n}\n\nexport default CurriculumReviewSteps;\n"],"mappings":";;;;;;;;;;;;;;;AA6BW;AAlBX,SAAS,6BAA8C;AACrD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,2BAA2B;AAC/B,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,SAAS,GAAG;AACd,WAAO,oBAAC,wBAAY,SAAS,aAAa;AAAA,EAC5C;AACA,MAAI,OAAO,KAAK,QAAQ,UAAU,UAAU,iBAAiB;AAC3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,OAAO,OAAO;AAAA,QACd,QAAQ,SAAS,UAAU;AAAA,QAC3B,WAAW,OAAO;AAAA,QAClB,gBAAgB,iBAAiB;AAAA,QACjC,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,UAAU;AAAA,QACV,OAAO,UAAU;AAAA;AAAA,IACnB;AAAA,EAEJ;AACA,SAAO,oBAAC,2BAAe,uBAA8C;AACvE;AAoBA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgD;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,cAAc;AAAA,MAEd,8BAAC,8BAA2B;AAAA;AAAA,EAC9B;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CoachingCustomerInfoLarge
|
|
3
|
+
} from "./chunk-JOXWMJKW.js";
|
|
4
|
+
import {
|
|
5
|
+
CoachingCustomerInfoMedium
|
|
6
|
+
} from "./chunk-AJWRR5KG.js";
|
|
7
|
+
import {
|
|
8
|
+
CoachingCustomerInfoSmall
|
|
9
|
+
} from "./chunk-VRY3HFX6.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
__spreadValues
|
|
15
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
16
|
+
|
|
17
|
+
// src/app/platform/userInfos/coaching-customer-info/index.tsx
|
|
18
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function CoachingCustomerInfo(props) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", sm: "none", md: "none" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoSmall, __spreadValues({}, props)) }),
|
|
22
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", sm: "block", md: "none" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoMedium, __spreadValues({}, props)) }),
|
|
23
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", sm: "none", md: "block" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoLarge, __spreadValues({}, props)) })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
CoachingCustomerInfo
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-6INLPCD5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\nimport { CoachingCustomerInfoSmall } from './small';\nimport { CoachingCustomerInfoMedium } from './medium';\nimport { CoachingCustomerInfoLarge } from './large';\n\nexport {\n CoachingCustomerInfoLarge,\n CoachingCustomerInfoMedium,\n CoachingCustomerInfoSmall,\n};\n\nexport { type CoachingCustomerInfoProps };\n\nexport function CoachingCustomerInfo(\n props: CoachingCustomerInfoProps\n): React.ReactNode {\n return (\n <>\n <Box display={{ initial: 'block', sm: 'none', md: 'none' }}>\n <CoachingCustomerInfoSmall {...props} />\n </Box>\n <Box display={{ initial: 'none', sm: 'block', md: 'none' }}>\n <CoachingCustomerInfoMedium {...props} />\n </Box>\n <Box display={{ initial: 'none', sm: 'none', md: 'block' }}>\n <CoachingCustomerInfoLarge {...props} />\n </Box>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBI,mBAEI,KAFJ;AAJG,SAAS,qBACd,OACiB;AACjB,SACE,iCACE;AAAA,wBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,QAAQ,IAAI,OAAO,GACvD,8BAAC,8CAA8B,MAAO,GACxC;AAAA,IACA,oBAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,SAAS,IAAI,OAAO,GACvD,8BAAC,+CAA+B,MAAO,GACzC;AAAA,IACA,oBAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,QAAQ,IAAI,QAAQ,GACvD,8BAAC,8CAA8B,MAAO,GACxC;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-XU2LW3CT.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-6LJJRIWT.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":[]}
|