@tipp/ui 2.3.10 → 2.3.12
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 +46 -42
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +88 -88
- package/dist/app/platform/coach-question-list.js +31 -31
- package/dist/app/platform/contents-card.js +31 -31
- package/dist/app/platform/curriculum-card.js +5 -5
- package/dist/app/platform/edit-coaching-time.cjs +19 -15
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +70 -70
- package/dist/app/platform/edit-service-type.cjs +14 -10
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +71 -71
- package/dist/app/platform/goal-manage-card-edit.cjs +16 -12
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +70 -70
- package/dist/app/platform/goal-manage-card-read.js +31 -31
- package/dist/app/platform/on-offline-radio-card.cjs +111 -107
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +70 -70
- package/dist/app/platform/report-card.js +31 -31
- package/dist/app/platform/reservation-card.cjs +21 -17
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +71 -71
- package/dist/app/platform/session-card.cjs +25 -21
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +73 -73
- package/dist/app/platform/session-review-simple-read.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +36 -36
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +31 -31
- package/dist/app/platform/userInfos/session-user-info-detail.js +31 -31
- package/dist/app/platform/userInfos/utils.js +30 -30
- 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 +62 -62
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2QFLNAGL.js +100 -0
- package/dist/chunk-2QFLNAGL.js.map +1 -0
- package/dist/chunk-3FKAH2RB.js +105 -0
- package/dist/chunk-3FKAH2RB.js.map +1 -0
- package/dist/chunk-3OCAVV5Z.js +151 -0
- package/dist/chunk-3OCAVV5Z.js.map +1 -0
- package/dist/chunk-3PE6OFB3.js +70 -0
- package/dist/chunk-3PE6OFB3.js.map +1 -0
- package/dist/chunk-3QNIJCKK.js +98 -0
- package/dist/chunk-3QNIJCKK.js.map +1 -0
- package/dist/chunk-4OFVNWKB.js +100 -0
- package/dist/chunk-4OFVNWKB.js.map +1 -0
- package/dist/chunk-4SSWZQPC.js +89 -0
- package/dist/chunk-4SSWZQPC.js.map +1 -0
- package/dist/chunk-5JUYOJVM.js +77 -0
- package/dist/chunk-5JUYOJVM.js.map +1 -0
- package/dist/chunk-5SECMWKA.js +196 -0
- package/dist/chunk-5SECMWKA.js.map +1 -0
- package/dist/chunk-65FJZWXV.js +49 -0
- package/dist/chunk-65FJZWXV.js.map +1 -0
- package/dist/chunk-7UUHYDMJ.js +43 -0
- package/dist/chunk-7UUHYDMJ.js.map +1 -0
- package/dist/chunk-B5W5HY62.js +196 -0
- package/dist/chunk-B5W5HY62.js.map +1 -0
- package/dist/chunk-B63TOIOA.js +29 -0
- package/dist/chunk-B63TOIOA.js.map +1 -0
- package/dist/chunk-DTUYT5S2.js +98 -0
- package/dist/chunk-DTUYT5S2.js.map +1 -0
- package/dist/chunk-EI232M7E.js +196 -0
- package/dist/chunk-EI232M7E.js.map +1 -0
- package/dist/chunk-FDJPEXOU.js +222 -0
- package/dist/chunk-FDJPEXOU.js.map +1 -0
- package/dist/chunk-FGBFER5X.js +196 -0
- package/dist/chunk-FGBFER5X.js.map +1 -0
- package/dist/chunk-FNRYQLCC.js +64 -0
- package/dist/chunk-FNRYQLCC.js.map +1 -0
- package/dist/chunk-G7EN5QQR.js +64 -0
- package/dist/chunk-G7EN5QQR.js.map +1 -0
- package/dist/chunk-GDCDEPJO.js +64 -0
- package/dist/chunk-GDCDEPJO.js.map +1 -0
- package/dist/chunk-HHZ4HLP6.js +221 -0
- package/dist/chunk-HHZ4HLP6.js.map +1 -0
- package/dist/chunk-I4OEBZDH.js +64 -0
- package/dist/chunk-I4OEBZDH.js.map +1 -0
- package/dist/chunk-I5NKMQOT.js +64 -0
- package/dist/chunk-I5NKMQOT.js.map +1 -0
- package/dist/chunk-J5IKAPJM.js +69 -0
- package/dist/chunk-J5IKAPJM.js.map +1 -0
- package/dist/chunk-JJQM3MW3.js +98 -0
- package/dist/chunk-JJQM3MW3.js.map +1 -0
- package/dist/chunk-JKJUBJ65.js +70 -0
- package/dist/chunk-JKJUBJ65.js.map +1 -0
- package/dist/chunk-KLIEFXWN.js +100 -0
- package/dist/chunk-KLIEFXWN.js.map +1 -0
- package/dist/chunk-NDC72OWR.js +37 -0
- package/dist/chunk-NDC72OWR.js.map +1 -0
- package/dist/chunk-NMGLSEZ3.js +152 -0
- package/dist/chunk-NMGLSEZ3.js.map +1 -0
- package/dist/chunk-NMKIFFKE.js +63 -0
- package/dist/chunk-NMKIFFKE.js.map +1 -0
- package/dist/chunk-NMRNR5OA.js +221 -0
- package/dist/chunk-NMRNR5OA.js.map +1 -0
- package/dist/chunk-OX4OPOPI.js +82 -0
- package/dist/chunk-OX4OPOPI.js.map +1 -0
- package/dist/chunk-POFUBAXM.js +77 -0
- package/dist/chunk-POFUBAXM.js.map +1 -0
- package/dist/chunk-QBBF5V24.js +70 -0
- package/dist/chunk-QBBF5V24.js.map +1 -0
- package/dist/chunk-QMPSKZJ2.js +221 -0
- package/dist/chunk-QMPSKZJ2.js.map +1 -0
- package/dist/chunk-QPTWBPAQ.js +87 -0
- package/dist/chunk-QPTWBPAQ.js.map +1 -0
- package/dist/chunk-R7NTFLYB.js +98 -0
- package/dist/chunk-R7NTFLYB.js.map +1 -0
- package/dist/chunk-RAK5LEBO.js +70 -0
- package/dist/chunk-RAK5LEBO.js.map +1 -0
- package/dist/chunk-RWXNQPE7.js +151 -0
- package/dist/chunk-RWXNQPE7.js.map +1 -0
- package/dist/chunk-SGJFPJMV.js +100 -0
- package/dist/chunk-SGJFPJMV.js.map +1 -0
- package/dist/chunk-SYUWHIFX.js +98 -0
- package/dist/chunk-SYUWHIFX.js.map +1 -0
- package/dist/chunk-TDBCQSTJ.js +61 -0
- package/dist/chunk-TDBCQSTJ.js.map +1 -0
- package/dist/chunk-TGCLWLPY.js +51 -0
- package/dist/chunk-TGCLWLPY.js.map +1 -0
- package/dist/chunk-UFWZAT6E.js +89 -0
- package/dist/chunk-UFWZAT6E.js.map +1 -0
- package/dist/chunk-VN7IU4XW.js +64 -0
- package/dist/chunk-VN7IU4XW.js.map +1 -0
- package/dist/chunk-W3NTNHA4.js +196 -0
- package/dist/chunk-W3NTNHA4.js.map +1 -0
- package/dist/chunk-WGQGVPGZ.js +222 -0
- package/dist/chunk-WGQGVPGZ.js.map +1 -0
- package/dist/chunk-XDPRIBTV.js +101 -0
- package/dist/chunk-XDPRIBTV.js.map +1 -0
- package/dist/chunk-XU7H43IG.js +196 -0
- package/dist/chunk-XU7H43IG.js.map +1 -0
- package/dist/chunk-YEGT662X.js +221 -0
- package/dist/chunk-YEGT662X.js.map +1 -0
- package/dist/chunk-ZBZ7IGBT.js +222 -0
- package/dist/chunk-ZBZ7IGBT.js.map +1 -0
- package/dist/chunk-ZFWZAZPG.js +153 -0
- package/dist/chunk-ZFWZAZPG.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.cjs +148 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +17 -11
- package/dist/index.js +137 -137
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +18 -18
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +11 -11
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +24 -24
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +28 -28
- 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.cjs +54 -17
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-context.cjs +29 -21
- package/dist/molecules/curriculumV2/curriculum-context.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-context.d.cts +7 -1
- package/dist/molecules/curriculumV2/curriculum-context.d.ts +7 -1
- package/dist/molecules/curriculumV2/curriculum-context.js +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.cjs +85 -38
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +35 -35
- package/dist/molecules/date-picker/date-picker-button.js +6 -6
- package/dist/molecules/date-picker/index.js +5 -5
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.js +5 -5
- package/dist/molecules/dynamic-form.js +6 -6
- package/dist/molecules/expand-table/index.cjs +4 -3
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +5 -5
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +253 -205
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +65 -65
- package/dist/molecules/learning-post.js +6 -6
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.js +4 -4
- package/dist/molecules/tag-selector.js +5 -5
- package/package.json +3 -3
- package/src/molecules/curriculumV2/CurriculumSidebar/index.tsx +47 -13
- package/src/molecules/curriculumV2/curriculum-context.tsx +62 -39
- package/src/molecules/expand-table/index.tsx +13 -12
package/dist/atoms/index.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import "../chunk-HBF6IIVZ.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "../chunk-
|
|
3
|
+
ToastContainer,
|
|
4
|
+
toast
|
|
5
|
+
} from "../chunk-EEKOTWBE.js";
|
|
6
|
+
import {
|
|
7
|
+
Skeleton
|
|
8
|
+
} from "../chunk-5H3YPCZK.js";
|
|
9
|
+
import {
|
|
10
|
+
Spinner
|
|
11
|
+
} from "../chunk-FR2GDOU2.js";
|
|
12
|
+
import {
|
|
13
|
+
Strong
|
|
14
|
+
} from "../chunk-74DX4CU7.js";
|
|
6
15
|
import {
|
|
7
16
|
Switch
|
|
8
17
|
} from "../chunk-OYM4XCHQ.js";
|
|
@@ -19,9 +28,14 @@ import {
|
|
|
19
28
|
TextField
|
|
20
29
|
} from "../chunk-6NPTJBFE.js";
|
|
21
30
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
RadioCards
|
|
32
|
+
} from "../chunk-6IVCARWS.js";
|
|
33
|
+
import {
|
|
34
|
+
RadioGroup
|
|
35
|
+
} from "../chunk-6DJOIRMF.js";
|
|
36
|
+
import {
|
|
37
|
+
Radio
|
|
38
|
+
} from "../chunk-FPD73OHW.js";
|
|
25
39
|
import {
|
|
26
40
|
ScrollArea
|
|
27
41
|
} from "../chunk-MUPK4L3U.js";
|
|
@@ -38,21 +52,21 @@ import {
|
|
|
38
52
|
Separator
|
|
39
53
|
} from "../chunk-HYITAA4J.js";
|
|
40
54
|
import {
|
|
41
|
-
|
|
42
|
-
} from "../chunk-
|
|
55
|
+
Inset
|
|
56
|
+
} from "../chunk-XQOL7UBI.js";
|
|
43
57
|
import {
|
|
44
|
-
|
|
45
|
-
} from "../chunk-
|
|
58
|
+
Kbd
|
|
59
|
+
} from "../chunk-TULWX7D6.js";
|
|
46
60
|
import {
|
|
47
|
-
|
|
48
|
-
} from "../chunk-
|
|
61
|
+
Link
|
|
62
|
+
} from "../chunk-DHZVOXFM.js";
|
|
49
63
|
import {
|
|
50
64
|
List,
|
|
51
65
|
useList
|
|
52
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-WV2HN6H4.js";
|
|
53
67
|
import {
|
|
54
68
|
Pagination
|
|
55
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-SBJOKO35.js";
|
|
56
70
|
import {
|
|
57
71
|
Popover
|
|
58
72
|
} from "../chunk-5AVBYDPB.js";
|
|
@@ -63,14 +77,11 @@ import {
|
|
|
63
77
|
Quote
|
|
64
78
|
} from "../chunk-YO3BQW6S.js";
|
|
65
79
|
import {
|
|
66
|
-
|
|
67
|
-
} from "../chunk-
|
|
68
|
-
import {
|
|
69
|
-
RadioGroup
|
|
70
|
-
} from "../chunk-6DJOIRMF.js";
|
|
80
|
+
Em
|
|
81
|
+
} from "../chunk-2DZ2Y3JI.js";
|
|
71
82
|
import {
|
|
72
|
-
|
|
73
|
-
} from "../chunk-
|
|
83
|
+
FieldErrorWrapper
|
|
84
|
+
} from "../chunk-VRJR534I.js";
|
|
74
85
|
import {
|
|
75
86
|
Grid
|
|
76
87
|
} from "../chunk-EGEQY3KT.js";
|
|
@@ -78,23 +89,20 @@ import {
|
|
|
78
89
|
HoverCard
|
|
79
90
|
} from "../chunk-O3T3TM3V.js";
|
|
80
91
|
import {
|
|
81
|
-
|
|
82
|
-
} from "../chunk-
|
|
92
|
+
Code
|
|
93
|
+
} from "../chunk-OHMOP5PV.js";
|
|
83
94
|
import {
|
|
84
|
-
|
|
85
|
-
} from "../chunk-
|
|
95
|
+
Collapse
|
|
96
|
+
} from "../chunk-NFDQJVFA.js";
|
|
86
97
|
import {
|
|
87
|
-
|
|
88
|
-
} from "../chunk-
|
|
98
|
+
Container
|
|
99
|
+
} from "../chunk-Q37G2GS6.js";
|
|
89
100
|
import {
|
|
90
101
|
DataList
|
|
91
102
|
} from "../chunk-VTJZMOSP.js";
|
|
92
103
|
import {
|
|
93
104
|
Dialog
|
|
94
|
-
} from "../chunk-
|
|
95
|
-
import {
|
|
96
|
-
Heading
|
|
97
|
-
} from "../chunk-BESTU2AY.js";
|
|
105
|
+
} from "../chunk-JQ7VQ5SB.js";
|
|
98
106
|
import {
|
|
99
107
|
Content,
|
|
100
108
|
Drawer,
|
|
@@ -116,13 +124,17 @@ import {
|
|
|
116
124
|
import {
|
|
117
125
|
Tooltip
|
|
118
126
|
} from "../chunk-3NUQAVE6.js";
|
|
119
|
-
import "../chunk-PT57HCAI.js";
|
|
120
127
|
import {
|
|
121
|
-
|
|
122
|
-
} from "../chunk-
|
|
128
|
+
BulletText
|
|
129
|
+
} from "../chunk-QRI6ARS6.js";
|
|
123
130
|
import {
|
|
124
|
-
|
|
125
|
-
} from "../chunk-
|
|
131
|
+
Flex
|
|
132
|
+
} from "../chunk-25HMMI7R.js";
|
|
133
|
+
import {
|
|
134
|
+
Button
|
|
135
|
+
} from "../chunk-ZVDAEY5Q.js";
|
|
136
|
+
import "../chunk-LQY4RKWI.js";
|
|
137
|
+
import "../chunk-ZD7MNMED.js";
|
|
126
138
|
import {
|
|
127
139
|
Callout
|
|
128
140
|
} from "../chunk-B6XJN6EC.js";
|
|
@@ -139,14 +151,11 @@ import {
|
|
|
139
151
|
Checkbox
|
|
140
152
|
} from "../chunk-VYCYVN3L.js";
|
|
141
153
|
import {
|
|
142
|
-
|
|
143
|
-
} from "../chunk-
|
|
144
|
-
import {
|
|
145
|
-
Collapse
|
|
146
|
-
} from "../chunk-NFDQJVFA.js";
|
|
154
|
+
AlertDialog
|
|
155
|
+
} from "../chunk-J242TTFH.js";
|
|
147
156
|
import {
|
|
148
|
-
|
|
149
|
-
} from "../chunk-
|
|
157
|
+
AspectRatio
|
|
158
|
+
} from "../chunk-EAXUQEO5.js";
|
|
150
159
|
import {
|
|
151
160
|
AutoSizingInput
|
|
152
161
|
} from "../chunk-6SYFG6YY.js";
|
|
@@ -162,21 +171,6 @@ import {
|
|
|
162
171
|
import {
|
|
163
172
|
Box
|
|
164
173
|
} from "../chunk-4Y5BEXVN.js";
|
|
165
|
-
import {
|
|
166
|
-
BulletText
|
|
167
|
-
} from "../chunk-Z34HR7RE.js";
|
|
168
|
-
import {
|
|
169
|
-
Typo
|
|
170
|
-
} from "../chunk-PMJIFLDT.js";
|
|
171
|
-
import "../chunk-LDBWASUA.js";
|
|
172
|
-
import {
|
|
173
|
-
Flex
|
|
174
|
-
} from "../chunk-25HMMI7R.js";
|
|
175
|
-
import {
|
|
176
|
-
Button
|
|
177
|
-
} from "../chunk-ZVDAEY5Q.js";
|
|
178
|
-
import "../chunk-LQY4RKWI.js";
|
|
179
|
-
import "../chunk-ZD7MNMED.js";
|
|
180
174
|
import "../chunk-W5TPOFOO.js";
|
|
181
175
|
import "../chunk-WJ34ZHTU.js";
|
|
182
176
|
import "../chunk-ZQE7SP6P.js";
|
|
@@ -192,12 +186,18 @@ import "../chunk-YSYJCYHY.js";
|
|
|
192
186
|
import "../chunk-5OM2H6RI.js";
|
|
193
187
|
import "../chunk-ZUYCXCPW.js";
|
|
194
188
|
import "../chunk-YVFNJE4E.js";
|
|
189
|
+
import "../chunk-PT57HCAI.js";
|
|
195
190
|
import {
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
Form,
|
|
192
|
+
FormItem
|
|
193
|
+
} from "../chunk-2OMSNCRH.js";
|
|
198
194
|
import {
|
|
199
|
-
|
|
200
|
-
} from "../chunk-
|
|
195
|
+
Heading
|
|
196
|
+
} from "../chunk-BESTU2AY.js";
|
|
197
|
+
import {
|
|
198
|
+
Typo
|
|
199
|
+
} from "../chunk-PMJIFLDT.js";
|
|
200
|
+
import "../chunk-LDBWASUA.js";
|
|
201
201
|
import "../chunk-CRTRMMJ7.js";
|
|
202
202
|
export {
|
|
203
203
|
AlertDialog,
|
package/dist/atoms/list.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
List,
|
|
3
3
|
useList
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-WV2HN6H4.js";
|
|
5
|
+
import "../chunk-25HMMI7R.js";
|
|
5
6
|
import "../chunk-PMJIFLDT.js";
|
|
6
7
|
import "../chunk-LDBWASUA.js";
|
|
7
|
-
import "../chunk-25HMMI7R.js";
|
|
8
8
|
import "../chunk-CRTRMMJ7.js";
|
|
9
9
|
export {
|
|
10
10
|
List,
|
package/dist/atoms/pagination.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Pagination
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SBJOKO35.js";
|
|
4
4
|
import "../chunk-XK6VEVOK.js";
|
|
5
5
|
import "../chunk-HF6GNDPV.js";
|
|
6
|
-
import "../chunk-PMJIFLDT.js";
|
|
7
|
-
import "../chunk-LDBWASUA.js";
|
|
8
6
|
import "../chunk-25HMMI7R.js";
|
|
9
7
|
import "../chunk-W5TPOFOO.js";
|
|
10
8
|
import "../chunk-WJ34ZHTU.js";
|
|
@@ -21,6 +19,8 @@ import "../chunk-YSYJCYHY.js";
|
|
|
21
19
|
import "../chunk-5OM2H6RI.js";
|
|
22
20
|
import "../chunk-ZUYCXCPW.js";
|
|
23
21
|
import "../chunk-YVFNJE4E.js";
|
|
22
|
+
import "../chunk-PMJIFLDT.js";
|
|
23
|
+
import "../chunk-LDBWASUA.js";
|
|
24
24
|
import "../chunk-CRTRMMJ7.js";
|
|
25
25
|
export {
|
|
26
26
|
Pagination
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumContext
|
|
3
|
+
} from "./chunk-ZFWZAZPG.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-XK6VEVOK.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
ChevronLeftIcon,
|
|
15
|
+
ChevronRightIcon
|
|
16
|
+
} from "./chunk-W5TPOFOO.js";
|
|
17
|
+
import {
|
|
18
|
+
Heading
|
|
19
|
+
} from "./chunk-BESTU2AY.js";
|
|
20
|
+
import {
|
|
21
|
+
Typo
|
|
22
|
+
} from "./chunk-PMJIFLDT.js";
|
|
23
|
+
|
|
24
|
+
// src/molecules/curriculumV2/curriculum-sub-nav.tsx
|
|
25
|
+
import { useCallback } from "react";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function CurriculumSubNav() {
|
|
28
|
+
const {
|
|
29
|
+
selectedItem,
|
|
30
|
+
selectedSectionTitle,
|
|
31
|
+
hasPrev,
|
|
32
|
+
hasNext,
|
|
33
|
+
selectPrev,
|
|
34
|
+
selectNext,
|
|
35
|
+
scrollNavItem
|
|
36
|
+
} = useCurriculumContext();
|
|
37
|
+
const onClickPrev = useCallback(() => {
|
|
38
|
+
selectPrev((moveIndex) => {
|
|
39
|
+
scrollNavItem(moveIndex.toString());
|
|
40
|
+
});
|
|
41
|
+
}, [selectPrev, scrollNavItem]);
|
|
42
|
+
const onClickNext = useCallback(() => {
|
|
43
|
+
selectNext((moveIndex) => {
|
|
44
|
+
scrollNavItem(moveIndex.toString());
|
|
45
|
+
});
|
|
46
|
+
}, [selectNext, scrollNavItem]);
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
48
|
+
Grid,
|
|
49
|
+
{
|
|
50
|
+
align: "center",
|
|
51
|
+
columns: { initial: "32px 1fr 32px", md: "48px 1fr 48px" },
|
|
52
|
+
pb: { initial: "2", md: "3" },
|
|
53
|
+
px: { initial: "1", md: "2" },
|
|
54
|
+
py: "2",
|
|
55
|
+
rows: "auto",
|
|
56
|
+
children: [
|
|
57
|
+
hasPrev ? /* @__PURE__ */ jsx(
|
|
58
|
+
IconButton,
|
|
59
|
+
{
|
|
60
|
+
color: "gray",
|
|
61
|
+
onClick: onClickPrev,
|
|
62
|
+
size: { initial: "medium", md: "large" },
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { height: "16px", width: "16px" })
|
|
65
|
+
}
|
|
66
|
+
) : /* @__PURE__ */ jsx(Box, {}),
|
|
67
|
+
/* @__PURE__ */ jsxs(Box, { width: "100%", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Heading, { style: { textOverflow: "ellipsis" }, variant: "heading5", children: selectedItem.title }) }),
|
|
69
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Typo, { weight: "bold", children: selectedItem.title }) }),
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
Typo,
|
|
72
|
+
{
|
|
73
|
+
as: "p",
|
|
74
|
+
color: "gray",
|
|
75
|
+
mt: "1",
|
|
76
|
+
style: { textOverflow: "ellipsis" },
|
|
77
|
+
variant: "caption",
|
|
78
|
+
children: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
hasNext ? /* @__PURE__ */ jsx(
|
|
83
|
+
IconButton,
|
|
84
|
+
{
|
|
85
|
+
color: "gray",
|
|
86
|
+
onClick: onClickNext,
|
|
87
|
+
size: { initial: "medium", md: "large" },
|
|
88
|
+
variant: "ghost",
|
|
89
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { height: "16px", width: "16px" })
|
|
90
|
+
}
|
|
91
|
+
) : /* @__PURE__ */ jsx(Box, {})
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
CurriculumSubNav
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=chunk-2QFLNAGL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/curriculum-sub-nav.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Box, } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { IconButton } from '@/atoms/icon-button';\nimport { Typo } from '@/atoms/typo';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@/icon';\nimport { useCurriculumContext } from './curriculum-context';\n\nexport function CurriculumSubNav(): React.ReactNode {\n const {\n selectedItem,\n selectedSectionTitle,\n hasPrev,\n hasNext,\n selectPrev,\n selectNext,\n scrollNavItem,\n } = useCurriculumContext();\n\n const onClickPrev = useCallback(() => {\n selectPrev((moveIndex) => {\n scrollNavItem(moveIndex.toString());\n });\n }, [selectPrev, scrollNavItem]);\n\n const onClickNext = useCallback(() => {\n selectNext((moveIndex) => {\n scrollNavItem(moveIndex.toString());\n });\n }, [selectNext, scrollNavItem]);\n\n return (\n <Grid\n align=\"center\"\n columns={{ initial: '32px 1fr 32px', md: '48px 1fr 48px' }}\n pb={{ initial: '2', md: '3' }}\n px={{ initial: '1', md: '2' }}\n py=\"2\"\n rows=\"auto\"\n >\n {hasPrev ? (\n <IconButton\n color=\"gray\"\n onClick={onClickPrev}\n size={{ initial: 'medium', md: 'large' }}\n variant=\"ghost\"\n >\n <ChevronLeftIcon height=\"16px\" width=\"16px\" />\n </IconButton>\n ) : (\n <Box />\n )}\n <Box width=\"100%\">\n {/* 데스크탑 타이틀 */}\n <Box display={{ initial: 'none', md: 'block' }}>\n <Heading style={{ textOverflow: 'ellipsis' }} variant=\"heading5\">\n {selectedItem.title}\n </Heading>\n </Box>\n\n {/* 모바일 타이틀 */}\n <Box display={{ initial: 'block', md: 'none' }}>\n <Typo weight=\"bold\">{selectedItem.title}</Typo>\n </Box>\n\n <Typo\n as=\"p\"\n color=\"gray\"\n mt=\"1\"\n style={{ textOverflow: 'ellipsis' }}\n variant=\"caption\"\n >\n {selectedSectionTitle?.title}\n </Typo>\n </Box>\n {hasNext ? (\n <IconButton\n color=\"gray\"\n onClick={onClickNext}\n size={{ initial: 'medium', md: 'large' }}\n variant=\"ghost\"\n >\n <ChevronRightIcon height=\"16px\" width=\"16px\" />\n </IconButton>\n ) : (\n <Box />\n )}\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,mBAAmB;AAgDzB,cAKJ,YALI;AAvCH,SAAS,mBAAoC;AAClD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB;AAEzB,QAAM,cAAc,YAAY,MAAM;AACpC,eAAW,CAAC,cAAc;AACxB,oBAAc,UAAU,SAAS,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,aAAa,CAAC;AAE9B,QAAM,cAAc,YAAY,MAAM;AACpC,eAAW,CAAC,cAAc;AACxB,oBAAc,UAAU,SAAS,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,aAAa,CAAC;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,SAAS,EAAE,SAAS,iBAAiB,IAAI,gBAAgB;AAAA,MACzD,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,MAC5B,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,MAC5B,IAAG;AAAA,MACH,MAAK;AAAA,MAEJ;AAAA,kBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,SAAS;AAAA,YACT,MAAM,EAAE,SAAS,UAAU,IAAI,QAAQ;AAAA,YACvC,SAAQ;AAAA,YAER,8BAAC,mBAAgB,QAAO,QAAO,OAAM,QAAO;AAAA;AAAA,QAC9C,IAEA,oBAAC,OAAI;AAAA,QAEP,qBAAC,OAAI,OAAM,QAET;AAAA,8BAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,QAAQ,GAC3C,8BAAC,WAAQ,OAAO,EAAE,cAAc,WAAW,GAAG,SAAQ,YACnD,uBAAa,OAChB,GACF;AAAA,UAGA,oBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,OAAO,GAC3C,8BAAC,QAAK,QAAO,QAAQ,uBAAa,OAAM,GAC1C;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cACH,OAAM;AAAA,cACN,IAAG;AAAA,cACH,OAAO,EAAE,cAAc,WAAW;AAAA,cAClC,SAAQ;AAAA,cAEP,uEAAsB;AAAA;AAAA,UACzB;AAAA,WACF;AAAA,QACC,UACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,SAAS;AAAA,YACT,MAAM,EAAE,SAAS,UAAU,IAAI,QAAQ;AAAA,YACvC,SAAQ;AAAA,YAER,8BAAC,oBAAiB,QAAO,QAAO,OAAM,QAAO;AAAA;AAAA,QAC/C,IAEA,oBAAC,OAAI;AAAA;AAAA;AAAA,EAET;AAEJ;","names":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CircleChatIcon
|
|
3
|
+
} from "./chunk-ZUYCXCPW.js";
|
|
4
|
+
import {
|
|
5
|
+
CircleCheckIcon
|
|
6
|
+
} from "./chunk-YVFNJE4E.js";
|
|
7
|
+
import {
|
|
8
|
+
CirclePencilIcon
|
|
9
|
+
} from "./chunk-J2I3R3OV.js";
|
|
10
|
+
import {
|
|
11
|
+
CirclePlayIcon
|
|
12
|
+
} from "./chunk-QO6KO6MN.js";
|
|
13
|
+
import {
|
|
14
|
+
CircleQuoteIcon
|
|
15
|
+
} from "./chunk-5KNRHIIF.js";
|
|
16
|
+
import {
|
|
17
|
+
CircleSatisfactionIcon
|
|
18
|
+
} from "./chunk-6JRAI4G5.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-3FKAH2RB.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,151 @@
|
|
|
1
|
+
// src/molecules/curriculumV2/curriculum-context.tsx
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
useContext,
|
|
5
|
+
useState,
|
|
6
|
+
useMemo,
|
|
7
|
+
useCallback,
|
|
8
|
+
useRef,
|
|
9
|
+
useEffect
|
|
10
|
+
} from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var CurriculumContext = createContext(
|
|
13
|
+
void 0
|
|
14
|
+
);
|
|
15
|
+
function CurriculumProvider(props) {
|
|
16
|
+
const {
|
|
17
|
+
children,
|
|
18
|
+
curriculum,
|
|
19
|
+
onReviewSubmit,
|
|
20
|
+
onReviewValueChange,
|
|
21
|
+
curriculumReviewAnswers,
|
|
22
|
+
tempCurriculumReviewAnswers,
|
|
23
|
+
curriculumCompleteMap,
|
|
24
|
+
onChangeSelectedContent,
|
|
25
|
+
onActionButtonClick,
|
|
26
|
+
initialSelectedIndex
|
|
27
|
+
} = props;
|
|
28
|
+
const sidebarRef = useRef(null);
|
|
29
|
+
const scrollNavItem = useCallback((index) => {
|
|
30
|
+
var _a;
|
|
31
|
+
const element = (_a = sidebarRef.current) == null ? void 0 : _a.querySelector(
|
|
32
|
+
`[data-curriculum-item-index="${index}"]`
|
|
33
|
+
);
|
|
34
|
+
if (element) {
|
|
35
|
+
element.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
36
|
+
}
|
|
37
|
+
}, []);
|
|
38
|
+
const list = curriculum.contents.list;
|
|
39
|
+
const selectableIndexes = useMemo(
|
|
40
|
+
() => list.map((item, i) => item.type !== "sectionTitle" ? i : null).filter((i) => i !== null),
|
|
41
|
+
[list]
|
|
42
|
+
);
|
|
43
|
+
const [selectedIndexState, setSelectedIndexState] = useState(
|
|
44
|
+
initialSelectedIndex != null ? initialSelectedIndex : selectableIndexes[0]
|
|
45
|
+
);
|
|
46
|
+
const setSelectedIndex = useCallback(
|
|
47
|
+
(idx) => {
|
|
48
|
+
if (selectableIndexes.includes(idx)) {
|
|
49
|
+
setSelectedIndexState(idx);
|
|
50
|
+
} else {
|
|
51
|
+
const next = selectableIndexes.find((i) => i > idx);
|
|
52
|
+
const prev = [...selectableIndexes].reverse().find((i) => i < idx);
|
|
53
|
+
if (next !== void 0) setSelectedIndexState(next);
|
|
54
|
+
else if (prev !== void 0) setSelectedIndexState(prev);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
[selectableIndexes]
|
|
58
|
+
);
|
|
59
|
+
const selectablePos = useMemo(
|
|
60
|
+
() => selectableIndexes.indexOf(selectedIndexState),
|
|
61
|
+
[selectableIndexes, selectedIndexState]
|
|
62
|
+
);
|
|
63
|
+
const hasPrev = selectablePos > 0;
|
|
64
|
+
const hasNext = selectablePos < selectableIndexes.length - 1;
|
|
65
|
+
const selectPrev = useCallback(
|
|
66
|
+
(cb) => {
|
|
67
|
+
setSelectedIndexState((cur) => {
|
|
68
|
+
let prevIndex = cur;
|
|
69
|
+
const pos = selectableIndexes.indexOf(cur);
|
|
70
|
+
if (pos > 0) {
|
|
71
|
+
prevIndex = selectableIndexes[pos - 1];
|
|
72
|
+
}
|
|
73
|
+
if (cb) cb(prevIndex);
|
|
74
|
+
return prevIndex;
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
[selectableIndexes]
|
|
78
|
+
);
|
|
79
|
+
const selectNext = useCallback(
|
|
80
|
+
(cb) => {
|
|
81
|
+
setSelectedIndexState((cur) => {
|
|
82
|
+
let nextIndex = cur;
|
|
83
|
+
const pos = selectableIndexes.indexOf(cur);
|
|
84
|
+
if (pos < selectableIndexes.length - 1) {
|
|
85
|
+
nextIndex = selectableIndexes[pos + 1];
|
|
86
|
+
}
|
|
87
|
+
if (cb) cb(nextIndex);
|
|
88
|
+
return nextIndex;
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
[selectableIndexes]
|
|
92
|
+
);
|
|
93
|
+
const selectedId = useMemo(
|
|
94
|
+
() => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
return (_b = (_a = list[selectedIndexState]) == null ? void 0 : _a.uuid) != null ? _b : "";
|
|
97
|
+
},
|
|
98
|
+
[list, selectedIndexState]
|
|
99
|
+
);
|
|
100
|
+
const selectedItem = useMemo(() => {
|
|
101
|
+
return list[selectedIndexState];
|
|
102
|
+
}, [list, selectedIndexState]);
|
|
103
|
+
const selectedSectionTitle = useMemo(() => {
|
|
104
|
+
var _a;
|
|
105
|
+
const prevItems = list.slice(0, selectedIndexState).reverse();
|
|
106
|
+
return (_a = prevItems.find((item) => item.type === "sectionTitle")) != null ? _a : null;
|
|
107
|
+
}, [list, selectedIndexState]);
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
onChangeSelectedContent == null ? void 0 : onChangeSelectedContent(selectedItem);
|
|
110
|
+
}, [selectedItem]);
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
CurriculumContext.Provider,
|
|
113
|
+
{
|
|
114
|
+
value: {
|
|
115
|
+
curriculum,
|
|
116
|
+
scrollNavItem,
|
|
117
|
+
selectedIndex: selectedIndexState,
|
|
118
|
+
setSelectedIndex,
|
|
119
|
+
selectedId,
|
|
120
|
+
hasPrev,
|
|
121
|
+
hasNext,
|
|
122
|
+
selectPrev,
|
|
123
|
+
selectNext,
|
|
124
|
+
selectedSectionTitle,
|
|
125
|
+
selectedItem,
|
|
126
|
+
scrollAreaRef: sidebarRef,
|
|
127
|
+
onReviewSubmit,
|
|
128
|
+
onReviewValueChange,
|
|
129
|
+
curriculumReviewAnswers,
|
|
130
|
+
tempCurriculumReviewAnswers,
|
|
131
|
+
curriculumCompleteMap,
|
|
132
|
+
onActionButtonClick
|
|
133
|
+
},
|
|
134
|
+
children
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function useCurriculumContext() {
|
|
139
|
+
const ctx = useContext(CurriculumContext);
|
|
140
|
+
if (!ctx)
|
|
141
|
+
throw new Error(
|
|
142
|
+
"useCurriculumContext must be used within CurriculumProvider"
|
|
143
|
+
);
|
|
144
|
+
return ctx;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export {
|
|
148
|
+
CurriculumProvider,
|
|
149
|
+
useCurriculumContext
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=chunk-3OCAVV5Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/curriculum-context.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n useState,\n useMemo,\n useCallback,\n useRef,\n useEffect,\n} from 'react';\nimport { type CurriculumSectionTitleContents } from '@/types/curriculumContents.type';\nimport type {\n Curriculum,\n CurriculumListContents,\n} from '@/types/curriculum.type';\n\nexport interface CurriculumContextValue {\n curriculum: Curriculum;\n selectedIndex: number;\n setSelectedIndex: (idx: number) => void;\n selectedId: string;\n hasPrev: boolean;\n hasNext: boolean;\n selectPrev: (cb?: (moveIndex: number) => void) => void;\n selectNext: (cb?: (moveIndex: number) => void) => void;\n selectedItem: CurriculumListContents;\n /** 선택된 아이템의 이전 아이템 중 가장 가까운 섹션 타이틀 */\n selectedSectionTitle: CurriculumSectionTitleContents | null;\n /** 컨텐츠 목록 스크롤 이동 함수 */\n scrollNavItem: (uuid: string) => void;\n /** 스크롤 영역 참조 */\n scrollAreaRef: React.RefObject<HTMLDivElement | null>;\n /** 리뷰 제출 함수 */\n onReviewSubmit: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => Promise<boolean>;\n /** 리뷰 응답 값 변경 시 호출 */\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n /** 과제 완료 후 저장된 값 */\n curriculumReviewAnswers: Record<string, string>;\n /** 과제 완료 전 임시 저장된 값 */\n tempCurriculumReviewAnswers: Record<string, string>;\n /** 항목 수강 완료 여부 */\n curriculumCompleteMap: Record<string, boolean>;\n /** action Button 클릭시 호출 */\n onActionButtonClick: (item: CurriculumListContents) => void;\n /** 초기 선택 인덱스 */\n initialSelectedIndex?: number;\n /** 커스텀 탭 주입값 */\n customTabs?: {\n content: React.ReactElement;\n label: string;\n value: string;\n }[];\n}\n\nconst CurriculumContext = createContext<CurriculumContextValue | undefined>(\n undefined\n);\n\nexport interface CurriculumProviderProps\n extends Pick<\n CurriculumContextValue,\n | 'customTabs'\n | 'curriculum'\n | 'onReviewSubmit'\n | 'onReviewValueChange'\n | 'curriculumReviewAnswers'\n | 'tempCurriculumReviewAnswers'\n | 'curriculumCompleteMap'\n | 'onActionButtonClick'\n | 'initialSelectedIndex'\n > {\n children: React.ReactNode;\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n\n /** 현재 화면에 표시 중인 컨텐츠 인덱스 변경 시 호출 */\n onChangeSelectedContent?: (item: CurriculumListContents) => void;\n}\n\nexport function CurriculumProvider(\n props: CurriculumProviderProps\n): React.ReactElement {\n const {\n children,\n curriculum,\n onReviewSubmit,\n onReviewValueChange,\n curriculumReviewAnswers,\n tempCurriculumReviewAnswers,\n curriculumCompleteMap,\n onChangeSelectedContent,\n onActionButtonClick,\n initialSelectedIndex,\n } = props;\n const sidebarRef = useRef<HTMLDivElement>(null);\n\n const scrollNavItem = useCallback((index: string) => {\n const element = sidebarRef.current?.querySelector(\n `[data-curriculum-item-index=\"${index}\"]`\n );\n if (element) {\n element.scrollIntoView({ behavior: 'smooth', block: 'start' });\n }\n }, []);\n\n const list = curriculum.contents.list;\n // 선택 가능한 인덱스만 추출\n const selectableIndexes = useMemo(\n () =>\n list\n .map((item, i) => (item.type !== 'sectionTitle' ? i : null))\n .filter((i): i is number => i !== null),\n [list]\n );\n // 최초 선택값: 첫 번째 선택 가능한 인덱스\n const [selectedIndexState, setSelectedIndexState] = useState<number>(\n initialSelectedIndex ?? selectableIndexes[0]\n );\n\n // 선택 인덱스 보정 함수\n const setSelectedIndex = useCallback(\n (idx: number) => {\n if (selectableIndexes.includes(idx)) {\n setSelectedIndexState(idx);\n } else {\n // idx가 선택 불가면, selectableIndexes에서 가장 가까운 다음 인덱스 선택\n const next = selectableIndexes.find((i) => i > idx);\n const prev = [...selectableIndexes].reverse().find((i) => i < idx);\n if (next !== undefined) setSelectedIndexState(next);\n else if (prev !== undefined) setSelectedIndexState(prev);\n }\n },\n [selectableIndexes]\n );\n\n // 현재 선택 인덱스가 selectableIndexes 내 몇 번째인지\n const selectablePos = useMemo(\n () => selectableIndexes.indexOf(selectedIndexState),\n [selectableIndexes, selectedIndexState]\n );\n const hasPrev = selectablePos > 0;\n const hasNext = selectablePos < selectableIndexes.length - 1;\n\n const selectPrev = useCallback(\n (cb?: (moveIndex: number) => void) => {\n setSelectedIndexState((cur) => {\n let prevIndex = cur;\n const pos = selectableIndexes.indexOf(cur);\n if (pos > 0) {\n prevIndex = selectableIndexes[pos - 1];\n }\n if (cb) cb(prevIndex);\n return prevIndex;\n });\n },\n [selectableIndexes]\n );\n const selectNext = useCallback(\n (cb?: (moveIndex: number) => void) => {\n setSelectedIndexState((cur) => {\n let nextIndex = cur;\n const pos = selectableIndexes.indexOf(cur);\n if (pos < selectableIndexes.length - 1) {\n nextIndex = selectableIndexes[pos + 1];\n }\n if (cb) cb(nextIndex);\n return nextIndex;\n });\n },\n [selectableIndexes]\n );\n\n const selectedId = useMemo(\n () => list[selectedIndexState]?.uuid ?? '',\n [list, selectedIndexState]\n );\n\n const selectedItem = useMemo(() => {\n return list[selectedIndexState];\n }, [list, selectedIndexState]);\n\n const selectedSectionTitle = useMemo(() => {\n // selectedIndexState 이전 인덱스 중 가장 가까운 섹션 타이틀 찾기\n const prevItems = list.slice(0, selectedIndexState).reverse();\n return prevItems.find((item) => item.type === 'sectionTitle') ?? null;\n }, [list, selectedIndexState]);\n\n useEffect(() => {\n onChangeSelectedContent?.(selectedItem);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- 트리거 최소화\n }, [selectedItem]);\n\n return (\n <CurriculumContext.Provider\n value={{\n curriculum,\n scrollNavItem,\n selectedIndex: selectedIndexState,\n setSelectedIndex,\n selectedId,\n hasPrev,\n hasNext,\n selectPrev,\n selectNext,\n selectedSectionTitle,\n selectedItem,\n scrollAreaRef: sidebarRef,\n onReviewSubmit,\n onReviewValueChange,\n curriculumReviewAnswers,\n tempCurriculumReviewAnswers,\n curriculumCompleteMap,\n onActionButtonClick,\n }}\n >\n {children}\n </CurriculumContext.Provider>\n );\n}\n\nexport function useCurriculumContext(): CurriculumContextValue {\n const ctx = useContext(CurriculumContext);\n if (!ctx)\n throw new Error(\n 'useCurriculumContext must be used within CurriculumProvider'\n );\n return ctx;\n}\n"],"mappings":"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","names":[]}
|