@dotss/tictoccroc 0.4.2 → 0.6.0
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/Calendar-BOLCHnjh.js +97 -0
- package/dist/TimePicker-BwACyeBR.js +120 -0
- package/dist/convertMdToHtml-Bmk0brLK.js +1431 -0
- package/dist/index.mjs +105 -200
- package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +26 -29
- package/dist/parent/b2b/components/ActionButtons/index.mjs +5 -4
- package/dist/parent/b2b/components/BottomNotes/BottomNotes.mjs +37 -35
- package/dist/parent/b2b/components/BottomNotes/index.mjs +5 -4
- package/dist/parent/b2b/components/EmployeeNumberField/EmployeeNumberField.mjs +12 -15
- package/dist/parent/b2b/components/EmployeeNumberField/index.mjs +5 -4
- package/dist/parent/b2b/components/NameField/NameField.mjs +12 -7
- package/dist/parent/b2b/components/NameField/index.mjs +5 -4
- package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.mjs +27 -30
- package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs +7 -8
- package/dist/parent/b2b/components/PhoneNumberField/index.mjs +6 -7
- package/dist/parent/b2b/components/Title/Title.mjs +22 -16
- package/dist/parent/b2b/components/Title/index.mjs +4 -3
- package/dist/parent/b2b/components/TopLogo/TopLogo.mjs +55 -93
- package/dist/parent/b2b/components/TopLogo/index.mjs +5 -4
- package/dist/parent/b2b/components/index.mjs +9 -19
- package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +2 -1143
- package/dist/parent/b2b/utils/index.mjs +2 -4
- package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -108
- package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
- package/dist/parent/notification/components/index.mjs +2 -4
- package/dist/parent/notification/utils/index.mjs +2 -4
- package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
- package/dist/purify.es-D3W4zDrg.js +549 -0
- package/dist/shared/components/Calendar/Calendar.mjs +2 -80
- package/dist/shared/components/Calendar/index.mjs +5 -4
- package/dist/shared/components/Carousel/Carousel.mjs +184 -210
- package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
- package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
- package/dist/shared/components/Carousel/index.mjs +6 -6
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
- package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
- package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
- package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
- package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
- package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
- package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
- package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
- package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
- package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
- package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
- package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
- package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
- package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
- package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
- package/dist/shared/components/ChatKit/index.mjs +13 -29
- package/dist/shared/components/Image/Image.d.ts +2 -0
- package/dist/shared/components/Image/Image.error.mjs +34 -40
- package/dist/shared/components/Image/Image.mjs +247 -289
- package/dist/shared/components/Image/index.mjs +6 -6
- package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
- package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
- package/dist/shared/components/Masonry/Masonry.mjs +240 -276
- package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
- package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
- package/dist/shared/components/Masonry/index.mjs +6 -6
- package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
- package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
- package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
- package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
- package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
- package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/index.mjs +9 -12
- package/dist/shared/components/Roller/Roller.mjs +99 -132
- package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
- package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
- package/dist/shared/components/Roller/index.mjs +6 -6
- package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
- package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
- package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
- package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
- package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
- package/dist/shared/components/Scheduler/index.mjs +8 -10
- package/dist/shared/components/Swiper/Swiper.mjs +238 -283
- package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
- package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
- package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
- package/dist/shared/components/Swiper/index.mjs +6 -6
- package/dist/shared/components/TextField/TextField.mjs +44 -55
- package/dist/shared/components/TextField/index.mjs +5 -4
- package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
- package/dist/shared/components/TimePicker/index.mjs +5 -4
- package/dist/shared/components/index.mjs +36 -75
- package/dist/shared/hooks/index.mjs +4 -8
- package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
- package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
- package/dist/shared/hooks/useInView/index.mjs +5 -4
- package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
- package/dist/shared/hooks/useInView/useInView.mjs +37 -47
- package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
- package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
- package/dist/shared/typings/common.mjs +6 -4
- package/dist/shared/typings/index.mjs +2 -4
- package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
- package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
- package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
- package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
- package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
- package/dist/shared/utils/combineRef/index.mjs +5 -4
- package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
- package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
- package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
- package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
- package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
- package/dist/shared/utils/getDateRange/index.mjs +5 -4
- package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
- package/dist/shared/utils/getImageUrl/index.mjs +5 -6
- package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
- package/dist/shared/utils/getTimeRange/index.mjs +5 -4
- package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
- package/dist/shared/utils/getVimeoId/index.mjs +5 -4
- package/dist/shared/utils/index.mjs +18 -36
- package/dist/shared/utils/isAndroid/index.mjs +5 -4
- package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
- package/dist/shared/utils/isApp/index.mjs +5 -4
- package/dist/shared/utils/isApp/isApp.mjs +4 -4
- package/dist/shared/utils/isDesktop/index.mjs +5 -4
- package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
- package/dist/shared/utils/isIos/index.mjs +5 -4
- package/dist/shared/utils/isIos/isIos.mjs +5 -5
- package/dist/shared/utils/isServer/index.mjs +4 -3
- package/dist/shared/utils/isServer/isServer.mjs +4 -4
- package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
- package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
- package/dist/shared/utils/parseQueryString/index.mjs +4 -3
- package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
- package/dist/shared/utils/share/index.mjs +5 -4
- package/dist/shared/utils/share/share.mjs +12 -14
- package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
- package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
- package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
- package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
- package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
- package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
- package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
- package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
- package/dist/teacher/home/components/index.mjs +9 -18
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
- package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
- package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
- package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
- package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
- package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
- package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
- package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
- package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
- package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
- package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
- package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
- package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
- package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
- package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
- package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.d.ts +3 -0
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +12 -12
- package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +5 -5
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +348 -433
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +7 -7
- package/dist/teacher/profile/components/ProfileSummary/index.mjs +5 -4
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +80 -105
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +5 -4
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +34 -27
- package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -6
- package/dist/teacher/profile/components/index.mjs +24 -48
- package/dist/teacher/profile/utils/index.mjs +2 -4
- package/dist/teacher/profile/utils/sortItems/index.mjs +5 -4
- package/dist/teacher/profile/utils/sortItems/sortItems.mjs +48 -48
- package/package.json +1 -1
- package/dist/purify.es-BGaRrCfO.js +0 -553
|
@@ -1,569 +1,474 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import e from "./ScheduleEvent/index.mjs";
|
|
2
|
+
import { checkIsDateInRange as t, generateWeek as n, getDayScheduleEvents as r, getMinutesFromMidnight as i, resolvePositionedScheduleEventsForDate as a } from "./Scheduler.utils.mjs";
|
|
3
|
+
import { Children as o, cloneElement as s, isValidElement as c, useEffect as l, useRef as u, useState as d } from "react";
|
|
4
|
+
import { Box as f, Flexbox as p, Typography as m } from "@dotss/ui";
|
|
5
|
+
import h from "@dotss/ui/core/useTheme";
|
|
6
|
+
import g from "dayjs";
|
|
7
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
|
+
//#region shared/components/Scheduler/Scheduler.tsx
|
|
9
|
+
var y = Array.from({ length: 33 }).map((e, t) => {
|
|
10
|
+
let n = Math.floor((t + 14) / 2) % 24, r = (t + 14) % 2 == 0 ? "00" : "30", i = g().hour(n).minute(parseInt(r)), a = g(), o = a.hour(), s = a.minute(), c = o === n && (s < 30 && r === "00" || s >= 30 && r === "30");
|
|
11
|
+
return {
|
|
12
|
+
time: i.format("HH:mm"),
|
|
13
|
+
label: i.format("A h시 m분"),
|
|
14
|
+
isCurrentTime: c
|
|
15
|
+
};
|
|
15
16
|
});
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
return we(u, {
|
|
472
|
-
key: `schedule-block-${o}-${r}-${i}-${c}`,
|
|
473
|
-
onKeyDown: me,
|
|
474
|
-
onFocus: fe(o, a),
|
|
475
|
-
role: "gridcell",
|
|
476
|
-
"data-row": r,
|
|
477
|
-
"data-col": i,
|
|
478
|
-
"data-week": s,
|
|
479
|
-
"data-time": c,
|
|
480
|
-
"aria-current": t ? "time" : void 0,
|
|
481
|
-
tabIndex: l ? 0 : -1,
|
|
482
|
-
"aria-label": `${o.format("dddd")} ${o.format("D")}일 ${a}`,
|
|
483
|
-
...u.props,
|
|
484
|
-
style: {
|
|
485
|
-
...u.props.style,
|
|
486
|
-
borderTop: r > 0 ? `1px solid ${I[20]}` : void 0,
|
|
487
|
-
height: X,
|
|
488
|
-
minHeight: E,
|
|
489
|
-
zIndex: 0
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
return /* @__PURE__ */ h(
|
|
494
|
-
ye,
|
|
495
|
-
{
|
|
496
|
-
onKeyDown: me,
|
|
497
|
-
onFocus: fe(o, a),
|
|
498
|
-
role: "gridcell",
|
|
499
|
-
"data-row": r,
|
|
500
|
-
"data-col": i,
|
|
501
|
-
"data-week": s,
|
|
502
|
-
"data-time": c,
|
|
503
|
-
"aria-current": t ? "time" : void 0,
|
|
504
|
-
tabIndex: l ? 0 : -1,
|
|
505
|
-
"aria-label": `${o.format("dddd")} ${o.format("D")}일 ${a}`,
|
|
506
|
-
style: {
|
|
507
|
-
borderTop: r > 0 ? `1px solid ${I[20]}` : void 0,
|
|
508
|
-
height: X,
|
|
509
|
-
minHeight: E,
|
|
510
|
-
zIndex: 0
|
|
511
|
-
}
|
|
512
|
-
},
|
|
513
|
-
`schedule-block-${o}-${r}-${i}-${c}`
|
|
514
|
-
);
|
|
515
|
-
}),
|
|
516
|
-
$.map(
|
|
517
|
-
({ children: c, startDate: a, endDate: t, totalColumns: r, columnIndex: l }) => {
|
|
518
|
-
const u = be(a), f = be(t), H = Math.floor((u - 420) / 30), Ae = (u - 420) / 30 * (Number(X) || E), Fe = (f - u) / 30 * (Number(X) || E), pe = 100 / r, xe = l * pe, te = c;
|
|
519
|
-
return /* @__PURE__ */ h(
|
|
520
|
-
m,
|
|
521
|
-
{
|
|
522
|
-
style: {
|
|
523
|
-
position: "absolute",
|
|
524
|
-
top: `${Ae + (H > 0 ? 1 : 0)}px`,
|
|
525
|
-
left: `${xe}%`,
|
|
526
|
-
width: `${pe}%`,
|
|
527
|
-
height: `${Fe - (H > 0 ? 1 : 0)}px`,
|
|
528
|
-
zIndex: 1
|
|
529
|
-
},
|
|
530
|
-
children: we(te, {
|
|
531
|
-
role: "button",
|
|
532
|
-
tabIndex: s === 1 ? 0 : -1,
|
|
533
|
-
onKeyDown: Re(te.props.onKeyDown),
|
|
534
|
-
"data-start-date": a,
|
|
535
|
-
"data-start-time": y(a).format("HH:mm"),
|
|
536
|
-
"data-end-date": t,
|
|
537
|
-
"data-end-time": y(t).format("HH:mm"),
|
|
538
|
-
"data-is-event": !0,
|
|
539
|
-
"aria-label": `${y(a).format("dddd")} ${y(a).format("D")}일 ${y(a).format("A h시")}부터 ${y(t).format("dddd")} ${y(t).format("D")}일 ${y(t).format("A h시")}까지의 일정`,
|
|
540
|
-
...te.props
|
|
541
|
-
})
|
|
542
|
-
},
|
|
543
|
-
`${a}-${t}-${l}-${r}`
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
)
|
|
547
|
-
]
|
|
548
|
-
}
|
|
549
|
-
)
|
|
550
|
-
},
|
|
551
|
-
o.toISOString()
|
|
552
|
-
);
|
|
553
|
-
})
|
|
554
|
-
},
|
|
555
|
-
e[0].format("YYYY-MM-DD")
|
|
556
|
-
))
|
|
557
|
-
}
|
|
558
|
-
),
|
|
559
|
-
Se
|
|
560
|
-
]
|
|
561
|
-
}
|
|
562
|
-
)
|
|
563
|
-
] }),
|
|
564
|
-
/* @__PURE__ */ h(D, { role: "status", visuallyHidden: !0, children: Ee })
|
|
565
|
-
] });
|
|
17
|
+
function b({ children: b, date: ee = g(), legend: x, minDate: S, maxDate: C, minScheduleBlockHeight: w = 20, maxScheduleBlockHeight: te, renderScheduleBlock: T, onDateChange: E, onDateChangeCanceled: D, ...ne }) {
|
|
18
|
+
let { palette: { grey: O } } = h(), [k, A] = d(ee.startOf("week")), [j, re] = d("100%"), [M, N] = d(0), [P, F] = d(0), [ie, ae] = d(""), I = u(null), L = u(null), R = u(null), z = u(null), B = u(0), V = u(0), H = u(!1), U = u(!1), W = u(!1), G = u(0), K = u(0), oe = u(0), se = u(0), q = u(!1), J = u(null), Y = u(0), X = u(0), Z = u(0), Q = u(null), $ = o.toArray(b).filter(c).map((t) => {
|
|
19
|
+
if (t.type === e) {
|
|
20
|
+
let { startDate: e, endDate: n } = t.props;
|
|
21
|
+
return {
|
|
22
|
+
startDate: e,
|
|
23
|
+
endDate: n,
|
|
24
|
+
children: t
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}).filter(Boolean), ce = o.toArray(b).filter(c).filter((t) => t.type !== e), le = [
|
|
29
|
+
n(k.subtract(1, "week"), $),
|
|
30
|
+
n(k, $),
|
|
31
|
+
n(k.add(1, "week"), $)
|
|
32
|
+
], ue = (e, t) => (n) => {
|
|
33
|
+
let r = Number(n.currentTarget.dataset.row), i = Number(n.currentTarget.dataset.col);
|
|
34
|
+
N(r), F(i), ae(`${e.format("dddd")} ${e.format("D")}일 ${t}`);
|
|
35
|
+
}, de = (e) => {
|
|
36
|
+
let n = Number(e.currentTarget.dataset.row), r = Number(e.currentTarget.dataset.col), i = n, a = r;
|
|
37
|
+
switch (e.key) {
|
|
38
|
+
case "ArrowUp":
|
|
39
|
+
e.preventDefault(), n === 0 && (r - 1 < 0 ? (A((e) => e.add(-1, "week")), N(y.length - 1), F(6), Z.current = requestAnimationFrame(() => {
|
|
40
|
+
Q.current?.querySelector(`[data-row="${y.length - 1}"][data-col="6"][data-week="1"]`)?.focus();
|
|
41
|
+
})) : (N(y.length - 1), F(r - 1), Z.current = requestAnimationFrame(() => {
|
|
42
|
+
Q.current?.querySelector(`[data-row="${y.length - 1}"][data-col="${r - 1}"][data-week="1"]`)?.focus();
|
|
43
|
+
}))), i = Math.max(n - 1, 0);
|
|
44
|
+
break;
|
|
45
|
+
case "ArrowDown":
|
|
46
|
+
if (e.preventDefault(), n === y.length - 1) {
|
|
47
|
+
r + 1 > 6 ? (A((e) => e.add(1, "week")), N(0), F(0), Z.current = requestAnimationFrame(() => {
|
|
48
|
+
Q.current?.querySelector("[data-row=\"0\"][data-col=\"0\"][data-week=\"1\"]")?.focus();
|
|
49
|
+
})) : (N(0), F(a + 1), Z.current = requestAnimationFrame(() => {
|
|
50
|
+
Q.current?.querySelector(`[data-row="0"][data-col="${a + 1}"][data-week="1"]`)?.focus();
|
|
51
|
+
}));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
i = Math.min(n + 1, y.length - 1);
|
|
55
|
+
break;
|
|
56
|
+
case "ArrowLeft":
|
|
57
|
+
if (e.preventDefault(), r === 0) {
|
|
58
|
+
if (!t(k.add(-1, "week"), {
|
|
59
|
+
minDate: S,
|
|
60
|
+
maxDate: C
|
|
61
|
+
})) {
|
|
62
|
+
D && typeof D == "function" && D(k, "prev");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
A((e) => e.add(-1, "week")), N(i), F(6), Z.current = requestAnimationFrame(() => {
|
|
66
|
+
Q.current?.querySelector(`[data-row="${i}"][data-col="6"][data-week="1"]`)?.focus();
|
|
67
|
+
});
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
a = Math.max(r - 1, 0);
|
|
71
|
+
break;
|
|
72
|
+
case "ArrowRight":
|
|
73
|
+
if (e.preventDefault(), r === 6) {
|
|
74
|
+
if (!t(k.add(1, "week"), {
|
|
75
|
+
minDate: S,
|
|
76
|
+
maxDate: C
|
|
77
|
+
})) {
|
|
78
|
+
D && typeof D == "function" && D(k, "next");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
A((e) => e.add(1, "week")), N(i), F(0), Z.current = requestAnimationFrame(() => {
|
|
82
|
+
Q.current?.querySelector(`[data-row="${i}"][data-col="0"][data-week="1"]`)?.focus();
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
a = Math.min(r + 1, 6);
|
|
87
|
+
break;
|
|
88
|
+
case " ":
|
|
89
|
+
e.preventDefault(), e.currentTarget.click();
|
|
90
|
+
break;
|
|
91
|
+
case "Enter":
|
|
92
|
+
e.preventDefault(), e.currentTarget.click();
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
N(i), F(a), Q.current?.querySelector(`[data-row="${i}"][data-col="${a}"][data-week="1"]`)?.focus();
|
|
96
|
+
}, fe = (e) => (t) => {
|
|
97
|
+
let n = t.currentTarget.dataset.startDate, r = t.currentTarget.dataset.endDate;
|
|
98
|
+
if (!(!n || !r)) {
|
|
99
|
+
switch (t.key) {
|
|
100
|
+
case " ":
|
|
101
|
+
t.preventDefault(), t.currentTarget.click();
|
|
102
|
+
break;
|
|
103
|
+
case "Enter":
|
|
104
|
+
t.preventDefault(), t.currentTarget.click();
|
|
105
|
+
break;
|
|
106
|
+
case "ArrowUp": {
|
|
107
|
+
t.preventDefault();
|
|
108
|
+
let e = t.currentTarget.previousElementSibling, r = !!e?.getAttribute("data-is-event");
|
|
109
|
+
e && r ? (e.focus(), N(M - 1)) : (t.currentTarget.parentElement?.querySelector(`[data-time="${g(n).add(-30, "minute").format("HH:mm")}"]`))?.focus();
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
case "ArrowLeft": {
|
|
113
|
+
t.preventDefault();
|
|
114
|
+
let e = t.currentTarget.previousElementSibling, n = !!e?.getAttribute("data-is-event");
|
|
115
|
+
if (e && n) e.focus();
|
|
116
|
+
else {
|
|
117
|
+
if (P === 0) {
|
|
118
|
+
A((e) => e.add(-1, "week")), N(0), F(6), Z.current = requestAnimationFrame(() => {
|
|
119
|
+
Q.current?.querySelector("[data-row=\"0\"][data-col=\"6\"][data-week=\"1\"]")?.focus();
|
|
120
|
+
});
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
Q.current?.querySelector(`[data-row="${M}"][data-col="${P - 1}"][data-week="1"]`)?.focus();
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
case "ArrowRight": {
|
|
128
|
+
t.preventDefault();
|
|
129
|
+
let e = t.currentTarget.nextElementSibling, n = !!e?.getAttribute("data-is-event");
|
|
130
|
+
if (e && n) e.focus();
|
|
131
|
+
else {
|
|
132
|
+
if (P === 6) {
|
|
133
|
+
A((e) => e.add(1, "week")), N(0), F(0), Z.current = requestAnimationFrame(() => {
|
|
134
|
+
Q.current?.querySelector("[data-row=\"0\"][data-col=\"0\"][data-week=\"1\"]")?.focus();
|
|
135
|
+
});
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
Q.current?.querySelector(`[data-row="${M}"][data-col="${P + 1}"][data-week="1"]`)?.focus();
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
case "ArrowDown":
|
|
143
|
+
{
|
|
144
|
+
t.preventDefault();
|
|
145
|
+
let e = t.currentTarget.nextElementSibling, n = !!e?.getAttribute("data-is-event");
|
|
146
|
+
e && n ? (e.focus(), N(M + 1)) : (t.currentTarget.parentElement?.querySelector(`[data-time="${g(r).format("HH:mm")}"]`))?.focus();
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
e?.(t);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
return l(() => {
|
|
154
|
+
let e = () => {
|
|
155
|
+
if (z.current) {
|
|
156
|
+
let e = I.current?.parentElement?.offsetHeight ?? 0, t = z.current.offsetHeight, n = R.current?.offsetHeight ?? 0, r = (e - t - n) / y.length;
|
|
157
|
+
r = r < w ? w : r, r = Math.min(r, te ?? r), re(r);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return e(), window.addEventListener("resize", e), () => {
|
|
161
|
+
window.removeEventListener("resize", e);
|
|
162
|
+
};
|
|
163
|
+
}, [
|
|
164
|
+
w,
|
|
165
|
+
te,
|
|
166
|
+
x
|
|
167
|
+
]), l(() => {
|
|
168
|
+
let e = L.current;
|
|
169
|
+
if (!e) return;
|
|
170
|
+
let n = () => {
|
|
171
|
+
K.current = e.offsetWidth;
|
|
172
|
+
};
|
|
173
|
+
n();
|
|
174
|
+
let r = (t, n) => {
|
|
175
|
+
W.current || (J.current &&= (e.removeEventListener("transitionend", J.current), null), B.current = t, V.current = n, q.current = !1, H.current = !0, G.current = 0);
|
|
176
|
+
}, i = (t, n, r) => {
|
|
177
|
+
if (!H.current) return;
|
|
178
|
+
let i = t - B.current, a = n - V.current;
|
|
179
|
+
if (G.current = i, !q.current && (oe.current = Math.abs(i), se.current = Math.abs(a), q.current = !0, se.current > oe.current)) {
|
|
180
|
+
H.current = !1;
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
r.cancelable && r.preventDefault(), r.stopPropagation(), e.style.transition = "none", e.style.transform = `translate3d(${G.current}px, 0, 0)`, e.style.cursor = "grabbing";
|
|
184
|
+
}, a = () => {
|
|
185
|
+
if (e.style.cursor = "grab", !H.current) return;
|
|
186
|
+
H.current = !1, U.current = !1, W.current = !0;
|
|
187
|
+
let n = G.current, r = K.current, i = r * .2;
|
|
188
|
+
if (e.style.transition = "transform 300ms cubic-bezier(0.25, 1, 0.5, 1)", n > i) {
|
|
189
|
+
if (!t(k.add(-1, "week"), {
|
|
190
|
+
minDate: S,
|
|
191
|
+
maxDate: C
|
|
192
|
+
})) {
|
|
193
|
+
e.style.transform = "translate3d(0, 0, 0)", U.current = !0, W.current = !1, D && typeof D == "function" && D(k, "prev");
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
e.style.transform = `translate3d(${r}px, 0, 0)`, J.current = (t) => {
|
|
197
|
+
t.propertyName === "transform" && (Y.current = requestAnimationFrame(() => {
|
|
198
|
+
A((e) => e.add(-1, "week")), X.current = requestAnimationFrame(() => {
|
|
199
|
+
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", U.current = !0, W.current = !1;
|
|
200
|
+
});
|
|
201
|
+
}));
|
|
202
|
+
}, e.addEventListener("transitionend", J.current);
|
|
203
|
+
} else if (n < -i) {
|
|
204
|
+
if (!t(k.add(1, "week"), {
|
|
205
|
+
minDate: S,
|
|
206
|
+
maxDate: C
|
|
207
|
+
})) {
|
|
208
|
+
e.style.transform = "translate3d(0, 0, 0)", U.current = !0, W.current = !1, D && typeof D == "function" && D(k, "next");
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
e.style.transform = `translate3d(-${r}px, 0, 0)`, J.current = (t) => {
|
|
212
|
+
t.propertyName === "transform" && (Y.current = requestAnimationFrame(() => {
|
|
213
|
+
A((e) => e.add(1, "week")), X.current = requestAnimationFrame(() => {
|
|
214
|
+
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", U.current = !0, W.current = !1;
|
|
215
|
+
});
|
|
216
|
+
}));
|
|
217
|
+
}, e.addEventListener("transitionend", J.current);
|
|
218
|
+
} else W.current = !1, U.current = !0, e.style.transform = "translate3d(0, 0, 0)";
|
|
219
|
+
}, o = (e) => r(e.touches[0].clientX, e.touches[0].clientY), s = (e) => i(e.touches[0].clientX, e.touches[0].clientY, e), c = (e) => r(e.clientX, e.clientY), l = (e) => i(e.clientX, e.clientY, e);
|
|
220
|
+
return window.addEventListener("resize", n), e.addEventListener("touchstart", o), e.addEventListener("touchmove", s), e.addEventListener("touchend", a), e.addEventListener("touchcancel", a), e.addEventListener("mousedown", c), e.addEventListener("mousemove", l), e.addEventListener("mouseup", a), e.addEventListener("mouseleave", a), () => {
|
|
221
|
+
window.removeEventListener("resize", n), e.removeEventListener("touchstart", o), e.removeEventListener("touchmove", s), e.removeEventListener("touchend", a), e.removeEventListener("touchcancel", a), e.removeEventListener("mousedown", c), e.removeEventListener("mousemove", l), e.removeEventListener("mouseup", a), e.removeEventListener("mouseleave", a), J.current && e.removeEventListener("transitionend", J.current);
|
|
222
|
+
};
|
|
223
|
+
}, [
|
|
224
|
+
k,
|
|
225
|
+
C,
|
|
226
|
+
S,
|
|
227
|
+
D
|
|
228
|
+
]), l(() => {
|
|
229
|
+
let e = Q.current, t = (e) => {
|
|
230
|
+
W.current && !U.current && e.stopPropagation();
|
|
231
|
+
};
|
|
232
|
+
return e?.addEventListener("click", t), () => {
|
|
233
|
+
e?.removeEventListener("click", t);
|
|
234
|
+
};
|
|
235
|
+
}, []), l(() => {
|
|
236
|
+
E?.(k);
|
|
237
|
+
}, [k, E]), l(() => () => {
|
|
238
|
+
Y.current && cancelAnimationFrame(Y.current), X.current && cancelAnimationFrame(X.current), Z.current && cancelAnimationFrame(Z.current);
|
|
239
|
+
}, []), /* @__PURE__ */ v(p, {
|
|
240
|
+
ref: I,
|
|
241
|
+
flex: 1,
|
|
242
|
+
flexDirection: "column",
|
|
243
|
+
"aria-label": "일정 안내",
|
|
244
|
+
...ne,
|
|
245
|
+
children: [
|
|
246
|
+
x && x?.length > 0 && /* @__PURE__ */ _(p, {
|
|
247
|
+
ref: R,
|
|
248
|
+
justifyContent: "flex-end",
|
|
249
|
+
alignItems: "center",
|
|
250
|
+
gap: 3,
|
|
251
|
+
pl: 4,
|
|
252
|
+
pr: 4,
|
|
253
|
+
role: "group",
|
|
254
|
+
"aria-label": "일정 종류 안내",
|
|
255
|
+
children: x?.map(({ text: e, color: t }) => /* @__PURE__ */ v(p, {
|
|
256
|
+
alignItems: "center",
|
|
257
|
+
gap: 1,
|
|
258
|
+
children: [/* @__PURE__ */ _(f, {
|
|
259
|
+
"aria-hidden": !0,
|
|
260
|
+
inlineCSS: {
|
|
261
|
+
width: 14,
|
|
262
|
+
height: 14,
|
|
263
|
+
border: `1px solid ${O[30]}`,
|
|
264
|
+
borderRadius: 4,
|
|
265
|
+
backgroundColor: t
|
|
266
|
+
}
|
|
267
|
+
}), /* @__PURE__ */ _(m, {
|
|
268
|
+
variant: "c3R",
|
|
269
|
+
color: "grey.70",
|
|
270
|
+
children: e
|
|
271
|
+
})]
|
|
272
|
+
}, `legend-${e}-${t}`))
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ v(p, {
|
|
275
|
+
ref: z,
|
|
276
|
+
alignItems: "center",
|
|
277
|
+
pt: 1,
|
|
278
|
+
pb: 2,
|
|
279
|
+
role: "row",
|
|
280
|
+
inlineCSS: {
|
|
281
|
+
position: "sticky",
|
|
282
|
+
top: 0,
|
|
283
|
+
zIndex: 2,
|
|
284
|
+
borderBottom: `1px solid ${O[20]}`,
|
|
285
|
+
backgroundColor: O.white
|
|
286
|
+
},
|
|
287
|
+
children: [/* @__PURE__ */ v(m, {
|
|
288
|
+
variant: "h4B",
|
|
289
|
+
textAlign: "center",
|
|
290
|
+
inlineCSS: { width: 48 },
|
|
291
|
+
children: [k.month() + 1, "월"]
|
|
292
|
+
}), /* @__PURE__ */ _(p, {
|
|
293
|
+
alignItems: "center",
|
|
294
|
+
flexGrow: 1,
|
|
295
|
+
children: le[1].days.map((e) => /* @__PURE__ */ v(p, {
|
|
296
|
+
flexDirection: "column",
|
|
297
|
+
alignItems: "center",
|
|
298
|
+
flex: 1,
|
|
299
|
+
role: "columnheader",
|
|
300
|
+
"aria-label": `${e.format("dddd")} (${e.format("D")}일)`,
|
|
301
|
+
children: [/* @__PURE__ */ _(m, {
|
|
302
|
+
variant: "c3R",
|
|
303
|
+
children: e.format("ddd")
|
|
304
|
+
}), /* @__PURE__ */ _(m, {
|
|
305
|
+
variant: "c3M",
|
|
306
|
+
children: e.format("D")
|
|
307
|
+
})]
|
|
308
|
+
}, e.day()))
|
|
309
|
+
})]
|
|
310
|
+
}),
|
|
311
|
+
/* @__PURE__ */ v(p, {
|
|
312
|
+
flex: 1,
|
|
313
|
+
children: [/* @__PURE__ */ v(p, {
|
|
314
|
+
flexDirection: "column",
|
|
315
|
+
inlineCSS: {
|
|
316
|
+
position: "sticky",
|
|
317
|
+
left: 0,
|
|
318
|
+
maxHeight: "fit-content",
|
|
319
|
+
backgroundColor: O.white,
|
|
320
|
+
zIndex: 1
|
|
321
|
+
},
|
|
322
|
+
children: [y.map(({ time: e, label: t, isCurrentTime: n }) => /* @__PURE__ */ _(p, {
|
|
323
|
+
justifyContent: "center",
|
|
324
|
+
alignItems: "flex-start",
|
|
325
|
+
role: "rowheader",
|
|
326
|
+
"aria-label": t,
|
|
327
|
+
"aria-current": n ? "time" : void 0,
|
|
328
|
+
style: {
|
|
329
|
+
width: 48,
|
|
330
|
+
height: j,
|
|
331
|
+
minHeight: w,
|
|
332
|
+
zIndex: 1
|
|
333
|
+
},
|
|
334
|
+
children: /* @__PURE__ */ _(m, {
|
|
335
|
+
variant: "c3M",
|
|
336
|
+
color: "grey.70",
|
|
337
|
+
style: { visibility: e.split(":")[1] === "30" ? "hidden" : "visible" },
|
|
338
|
+
children: e
|
|
339
|
+
})
|
|
340
|
+
}, e)), /* @__PURE__ */ _(p, {
|
|
341
|
+
"aria-hidden": !0,
|
|
342
|
+
inlineCSS: {
|
|
343
|
+
position: "absolute",
|
|
344
|
+
top: 0,
|
|
345
|
+
right: -8,
|
|
346
|
+
width: 8,
|
|
347
|
+
height: "100%",
|
|
348
|
+
background: "linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.00) 104.17%)",
|
|
349
|
+
zIndex: 1
|
|
350
|
+
}
|
|
351
|
+
})]
|
|
352
|
+
}), /* @__PURE__ */ v(p, {
|
|
353
|
+
flex: 1,
|
|
354
|
+
ref: Q,
|
|
355
|
+
role: "grid",
|
|
356
|
+
"aria-label": "주간 일정",
|
|
357
|
+
inlineCSS: {
|
|
358
|
+
position: "relative",
|
|
359
|
+
overflow: "hidden",
|
|
360
|
+
cursor: "grab"
|
|
361
|
+
},
|
|
362
|
+
children: [/* @__PURE__ */ _(p, {
|
|
363
|
+
ref: L,
|
|
364
|
+
alignItems: "flex-start",
|
|
365
|
+
justifyContent: "center",
|
|
366
|
+
flex: 1,
|
|
367
|
+
inlineCSS: { transform: "translate3d(0, 0, 0)" },
|
|
368
|
+
children: le.map(({ days: e, scheduleEvents: t }, n) => /* @__PURE__ */ _(p, {
|
|
369
|
+
role: "rowgroup",
|
|
370
|
+
"aria-hidden": n !== 1,
|
|
371
|
+
style: {
|
|
372
|
+
display: "grid",
|
|
373
|
+
gridTemplateColumns: "repeat(7, 1fr)",
|
|
374
|
+
minWidth: "100%",
|
|
375
|
+
height: "100%"
|
|
376
|
+
},
|
|
377
|
+
children: e.map((e, o) => {
|
|
378
|
+
let c = a(r(t, e), e);
|
|
379
|
+
return /* @__PURE__ */ _(p, {
|
|
380
|
+
role: "row",
|
|
381
|
+
"aria-label": `${e.format("dddd")} ${e.format("D")}일`,
|
|
382
|
+
style: { borderLeft: `1px solid ${O[20]}` },
|
|
383
|
+
children: /* @__PURE__ */ v(p, {
|
|
384
|
+
style: {
|
|
385
|
+
display: "grid",
|
|
386
|
+
position: "relative",
|
|
387
|
+
flex: 1
|
|
388
|
+
},
|
|
389
|
+
children: [y.map(({ time: t, label: r, isCurrentTime: i }, a) => {
|
|
390
|
+
let c = n === 1 && a === M && o === P;
|
|
391
|
+
if (typeof T == "function") {
|
|
392
|
+
let l = T(e.format("YYYY-MM-DD"), t);
|
|
393
|
+
return s(l, {
|
|
394
|
+
key: `schedule-block-${e}-${a}-${o}-${t}`,
|
|
395
|
+
onKeyDown: de,
|
|
396
|
+
onFocus: ue(e, r),
|
|
397
|
+
role: "gridcell",
|
|
398
|
+
"data-row": a,
|
|
399
|
+
"data-col": o,
|
|
400
|
+
"data-week": n,
|
|
401
|
+
"data-time": t,
|
|
402
|
+
"aria-current": i ? "time" : void 0,
|
|
403
|
+
tabIndex: c ? 0 : -1,
|
|
404
|
+
"aria-label": `${e.format("dddd")} ${e.format("D")}일 ${r}`,
|
|
405
|
+
...l.props,
|
|
406
|
+
style: {
|
|
407
|
+
...l.props.style,
|
|
408
|
+
borderTop: a > 0 ? `1px solid ${O[20]}` : void 0,
|
|
409
|
+
height: j,
|
|
410
|
+
minHeight: w,
|
|
411
|
+
zIndex: 0
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return /* @__PURE__ */ _(f, {
|
|
416
|
+
onKeyDown: de,
|
|
417
|
+
onFocus: ue(e, r),
|
|
418
|
+
role: "gridcell",
|
|
419
|
+
"data-row": a,
|
|
420
|
+
"data-col": o,
|
|
421
|
+
"data-week": n,
|
|
422
|
+
"data-time": t,
|
|
423
|
+
"aria-current": i ? "time" : void 0,
|
|
424
|
+
tabIndex: c ? 0 : -1,
|
|
425
|
+
"aria-label": `${e.format("dddd")} ${e.format("D")}일 ${r}`,
|
|
426
|
+
style: {
|
|
427
|
+
borderTop: a > 0 ? `1px solid ${O[20]}` : void 0,
|
|
428
|
+
height: j,
|
|
429
|
+
minHeight: w,
|
|
430
|
+
zIndex: 0
|
|
431
|
+
}
|
|
432
|
+
}, `schedule-block-${e}-${a}-${o}-${t}`);
|
|
433
|
+
}), c.map(({ children: e, startDate: t, endDate: r, totalColumns: a, columnIndex: o }) => {
|
|
434
|
+
let c = i(t), l = i(r), u = Math.floor((c - 420) / 30), d = (c - 420) / 30 * (Number(j) || w), f = (l - c) / 30 * (Number(j) || w), m = 100 / a, h = o * m, v = e;
|
|
435
|
+
return /* @__PURE__ */ _(p, {
|
|
436
|
+
style: {
|
|
437
|
+
position: "absolute",
|
|
438
|
+
top: `${d + +(u > 0)}px`,
|
|
439
|
+
left: `${h}%`,
|
|
440
|
+
width: `${m}%`,
|
|
441
|
+
height: `${f - +(u > 0)}px`,
|
|
442
|
+
zIndex: 1
|
|
443
|
+
},
|
|
444
|
+
children: s(v, {
|
|
445
|
+
role: "button",
|
|
446
|
+
tabIndex: n === 1 ? 0 : -1,
|
|
447
|
+
onKeyDown: fe(v.props.onKeyDown),
|
|
448
|
+
"data-start-date": t,
|
|
449
|
+
"data-start-time": g(t).format("HH:mm"),
|
|
450
|
+
"data-end-date": r,
|
|
451
|
+
"data-end-time": g(r).format("HH:mm"),
|
|
452
|
+
"data-is-event": !0,
|
|
453
|
+
"aria-label": `${g(t).format("dddd")} ${g(t).format("D")}일 ${g(t).format("A h시")}부터 ${g(r).format("dddd")} ${g(r).format("D")}일 ${g(r).format("A h시")}까지의 일정`,
|
|
454
|
+
...v.props
|
|
455
|
+
})
|
|
456
|
+
}, `${t}-${r}-${o}-${a}`);
|
|
457
|
+
})]
|
|
458
|
+
})
|
|
459
|
+
}, e.toISOString());
|
|
460
|
+
})
|
|
461
|
+
}, e[0].format("YYYY-MM-DD")))
|
|
462
|
+
}), ce]
|
|
463
|
+
})]
|
|
464
|
+
}),
|
|
465
|
+
/* @__PURE__ */ _(m, {
|
|
466
|
+
role: "status",
|
|
467
|
+
visuallyHidden: !0,
|
|
468
|
+
children: ie
|
|
469
|
+
})
|
|
470
|
+
]
|
|
471
|
+
});
|
|
566
472
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
};
|
|
473
|
+
//#endregion
|
|
474
|
+
export { b as default };
|