@dotss/tictoccroc 0.4.1 → 0.5.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.d.ts +3 -1
- package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -105
- 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.mjs +11 -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,277 +1,241 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
pt: w,
|
|
240
|
-
pb: w,
|
|
241
|
-
...l,
|
|
242
|
-
inlineCSS: {
|
|
243
|
-
width: "100%",
|
|
244
|
-
position: "relative",
|
|
245
|
-
transform: "translate3d(0, 0, 0)",
|
|
246
|
-
columnCount: x,
|
|
247
|
-
columnGap: H.content(c),
|
|
248
|
-
marginTop: -H.content(c),
|
|
249
|
-
...l == null ? void 0 : l.inlineCSS
|
|
250
|
-
},
|
|
251
|
-
children: S.map(
|
|
252
|
-
y,
|
|
253
|
-
(t, r) => Y(t, {
|
|
254
|
-
setInnerRef: it(r),
|
|
255
|
-
role: "listitem",
|
|
256
|
-
tabIndex: r === N ? 0 : -1,
|
|
257
|
-
"aria-posinset": r + 1,
|
|
258
|
-
"aria-setsize": G,
|
|
259
|
-
width: t.props.width ?? f,
|
|
260
|
-
height: t.props.height ?? f * b / 2,
|
|
261
|
-
direction: L,
|
|
262
|
-
spacing: c,
|
|
263
|
-
sourceMetadataMap: j ?? void 0,
|
|
264
|
-
onLoad: T,
|
|
265
|
-
onManualLoad: J,
|
|
266
|
-
onError: T,
|
|
267
|
-
onKeyDown: at(t.props.onKeyDown),
|
|
268
|
-
onFocus: $(t.props.onFocus),
|
|
269
|
-
...t.props
|
|
270
|
-
})
|
|
271
|
-
)
|
|
272
|
-
}
|
|
273
|
-
);
|
|
1
|
+
import e from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
2
|
+
import t from "../../utils/getImageUrl/index.mjs";
|
|
3
|
+
import { findImageInChildren as n, findNextFocusableElement as r, getHorizontalLayoutRows as i, getNextIndexHorizontalFromRows as a } from "./Masonry.utils.mjs";
|
|
4
|
+
import o from "./MasonryBlock/index.mjs";
|
|
5
|
+
import s from "../../../teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs";
|
|
6
|
+
import { Children as c, cloneElement as l, isValidElement as u, useEffect as d, useMemo as ee, useRef as f, useState as p } from "react";
|
|
7
|
+
import { Box as m, Flexbox as h } from "@dotss/ui";
|
|
8
|
+
import te from "@dotss/ui/core/useTheme";
|
|
9
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
10
|
+
//#region shared/components/Masonry/Masonry.tsx
|
|
11
|
+
function _({ children: _, columnCount: v = 2, rowCount: y = 2, spacing: b = 2, edgeSpacing: x = 0, direction: S = "vertical", defaultContainerWidth: C = 360, defaultContainerHeight: w = 0, ...T }) {
|
|
12
|
+
let { spacing: E } = te(), [ne, D] = p(C), [re, O] = p(w), [k, A] = p(0), j = 4 / 3, M = (ne - b) / v, N = S === "horizontal" ? (re - b) / y : M * j, P = f(null), F = f([]), I = f([]), L = f(!1), R = f(!0), z = f(0), B = f(0), V = f(0), H = f(/* @__PURE__ */ new Map()), [U, ie] = p(c.toArray(_).filter(u).filter((e) => e.type === o || e.type === s)), [W, G] = p(U.map((e) => {
|
|
13
|
+
let r = n(e.props.children)?.props.src || "";
|
|
14
|
+
if (!r) return null;
|
|
15
|
+
let i = e.props.width ?? M, a = e.props.height ?? N;
|
|
16
|
+
return {
|
|
17
|
+
originalSrc: r,
|
|
18
|
+
originWidth: i,
|
|
19
|
+
originHeight: a,
|
|
20
|
+
src: t({
|
|
21
|
+
src: r,
|
|
22
|
+
width: i
|
|
23
|
+
}),
|
|
24
|
+
width: i,
|
|
25
|
+
height: a,
|
|
26
|
+
loaded: !1
|
|
27
|
+
};
|
|
28
|
+
}).filter((e) => e !== null)), K = U.length, q = ee(() => W.length ? new Map(W.map((e) => [e.originalSrc, e])) : null, [W]), J = (e) => {
|
|
29
|
+
L.current = !0, z.current = e.clientX - (P.current?.offsetLeft || 0), B.current = P.current?.scrollLeft || 0;
|
|
30
|
+
}, Y = (e) => {
|
|
31
|
+
L.current && (e.currentTarget.style.cursor = "grabbing", P.current && (P.current.scrollLeft = B.current - (e.clientX - P.current.offsetLeft - z.current)));
|
|
32
|
+
}, X = (e) => {
|
|
33
|
+
L.current = !1, B.current === P.current?.scrollLeft ? R.current = !0 : (e.currentTarget.style.cursor = "grab", R.current = !1, V.current && cancelAnimationFrame(V.current), V.current = requestAnimationFrame(() => {
|
|
34
|
+
R.current = !0;
|
|
35
|
+
}));
|
|
36
|
+
}, ae = (e) => (t) => {
|
|
37
|
+
t.stopPropagation();
|
|
38
|
+
let n = null;
|
|
39
|
+
switch (t.key) {
|
|
40
|
+
case "ArrowRight":
|
|
41
|
+
t.preventDefault(), n = r(t.currentTarget, "right", F.current);
|
|
42
|
+
break;
|
|
43
|
+
case "ArrowLeft":
|
|
44
|
+
t.preventDefault(), n = r(t.currentTarget, "left", F.current);
|
|
45
|
+
break;
|
|
46
|
+
case "ArrowDown":
|
|
47
|
+
t.preventDefault(), n = r(t.currentTarget, "down", F.current);
|
|
48
|
+
break;
|
|
49
|
+
case "ArrowUp":
|
|
50
|
+
t.preventDefault(), n = r(t.currentTarget, "up", F.current);
|
|
51
|
+
break;
|
|
52
|
+
case "Enter":
|
|
53
|
+
case " ":
|
|
54
|
+
t.preventDefault(), t.currentTarget.click();
|
|
55
|
+
return;
|
|
56
|
+
default: return;
|
|
57
|
+
}
|
|
58
|
+
n?.focus(), e?.(t);
|
|
59
|
+
}, oe = (e) => (t) => {
|
|
60
|
+
if (t.stopPropagation(), t.key === "Enter" || t.key === " ") {
|
|
61
|
+
t.preventDefault(), t.currentTarget.click();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let n = Number(t.currentTarget.getAttribute("aria-posinset")) - 1, r = t.key.replace("Arrow", "").toLowerCase();
|
|
65
|
+
if (![
|
|
66
|
+
"left",
|
|
67
|
+
"right",
|
|
68
|
+
"up",
|
|
69
|
+
"down"
|
|
70
|
+
].includes(r)) {
|
|
71
|
+
e?.(t);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
t.preventDefault();
|
|
75
|
+
let i = a(I.current, n, r);
|
|
76
|
+
F.current[i ?? -1]?.focus(), e?.(t);
|
|
77
|
+
}, se = (e) => (t) => {
|
|
78
|
+
F.current[e] = t;
|
|
79
|
+
}, ce = (e, t, n) => (r) => {
|
|
80
|
+
I.current[t] || (I.current[t] = []), F.current[e] = r, I.current[t][n] = r;
|
|
81
|
+
}, Z = (e) => (t) => {
|
|
82
|
+
A(Number(t.currentTarget.getAttribute("aria-posinset")) - 1), e?.(t);
|
|
83
|
+
}, Q = (e) => {
|
|
84
|
+
let { naturalWidth: t, naturalHeight: n, src: r } = e.currentTarget;
|
|
85
|
+
H.current.set(r, {
|
|
86
|
+
naturalWidth: t,
|
|
87
|
+
naturalHeight: n
|
|
88
|
+
}), H.current.size === W.length && G((e) => e.map((e) => {
|
|
89
|
+
let t = H.current.get(e.src);
|
|
90
|
+
return t ? {
|
|
91
|
+
...e,
|
|
92
|
+
width: t.naturalWidth / t.naturalHeight * (e.height ?? N) || M,
|
|
93
|
+
height: e.height ?? N,
|
|
94
|
+
loaded: !0
|
|
95
|
+
} : e;
|
|
96
|
+
}));
|
|
97
|
+
}, $ = (e, t, n) => {
|
|
98
|
+
H.current.set(n, {
|
|
99
|
+
naturalWidth: e,
|
|
100
|
+
naturalHeight: t
|
|
101
|
+
}), H.current.size === W.length && G((e) => e.map((e) => {
|
|
102
|
+
let t = H.current.get(e.src);
|
|
103
|
+
return t ? {
|
|
104
|
+
...e,
|
|
105
|
+
width: t.naturalWidth / t.naturalHeight * (e.height ?? N) || M,
|
|
106
|
+
height: e.height ?? N,
|
|
107
|
+
loaded: !0
|
|
108
|
+
} : e;
|
|
109
|
+
}));
|
|
110
|
+
};
|
|
111
|
+
if (d(() => {
|
|
112
|
+
let e = P.current, t = (e) => {
|
|
113
|
+
R.current || e.stopPropagation();
|
|
114
|
+
};
|
|
115
|
+
return e?.addEventListener("click", t), () => {
|
|
116
|
+
e?.removeEventListener("click", t);
|
|
117
|
+
};
|
|
118
|
+
}, []), d(() => {
|
|
119
|
+
let e = P.current, t = (e) => {
|
|
120
|
+
e.stopPropagation();
|
|
121
|
+
};
|
|
122
|
+
return e?.addEventListener("touchmove", t), () => {
|
|
123
|
+
e?.removeEventListener("touchmove", t);
|
|
124
|
+
};
|
|
125
|
+
}, []), d(() => {
|
|
126
|
+
ie(c.toArray(_).filter(u).filter((e) => e.type === o || e.type === s));
|
|
127
|
+
}, [_]), e(() => {
|
|
128
|
+
D(P.current?.parentElement?.offsetWidth ?? 0), O(P.current?.offsetHeight ?? 0);
|
|
129
|
+
}, []), d(() => {
|
|
130
|
+
let e = () => {
|
|
131
|
+
D(P.current?.parentElement?.offsetWidth ?? 0), O(P.current?.offsetHeight ?? 0);
|
|
132
|
+
};
|
|
133
|
+
return e(), window.addEventListener("resize", e), () => {
|
|
134
|
+
window.removeEventListener("resize", e);
|
|
135
|
+
};
|
|
136
|
+
}, []), d(() => () => {
|
|
137
|
+
V.current && cancelAnimationFrame(V.current);
|
|
138
|
+
}, []), S === "horizontal") {
|
|
139
|
+
let e = i(W, U, y, M * j / 2), t = M * j / 2;
|
|
140
|
+
t = t <= 0 ? 120 : t;
|
|
141
|
+
let n = 0;
|
|
142
|
+
return /* @__PURE__ */ g(m, {
|
|
143
|
+
ref: P,
|
|
144
|
+
role: "list",
|
|
145
|
+
"aria-label": "콘텐츠",
|
|
146
|
+
"aria-orientation": "horizontal",
|
|
147
|
+
onMouseDown: J,
|
|
148
|
+
onMouseMove: Y,
|
|
149
|
+
onMouseUp: X,
|
|
150
|
+
onMouseLeave: X,
|
|
151
|
+
pl: x,
|
|
152
|
+
pr: x,
|
|
153
|
+
...T,
|
|
154
|
+
inlineCSS: {
|
|
155
|
+
display: "grid",
|
|
156
|
+
position: "relative",
|
|
157
|
+
width: "100%",
|
|
158
|
+
height: "100%",
|
|
159
|
+
overflowX: "auto",
|
|
160
|
+
scrollbarWidth: "none",
|
|
161
|
+
cursor: "grab",
|
|
162
|
+
transform: "translate3d(0, 0, 0)",
|
|
163
|
+
"&::-webkit-scrollbar": { display: "none" },
|
|
164
|
+
...T?.inlineCSS
|
|
165
|
+
},
|
|
166
|
+
children: e.map((r, i) => {
|
|
167
|
+
let a = i === e.length - 1;
|
|
168
|
+
return /* @__PURE__ */ g(h, {
|
|
169
|
+
gap: b,
|
|
170
|
+
children: r.map((e, r) => {
|
|
171
|
+
let o = n++;
|
|
172
|
+
return l(e, {
|
|
173
|
+
setInnerRef: ce(o, i, r),
|
|
174
|
+
tabIndex: o === k ? 0 : -1,
|
|
175
|
+
role: "listitem",
|
|
176
|
+
"aria-posinset": o + 1,
|
|
177
|
+
"aria-setsize": K,
|
|
178
|
+
width: e.props.width ?? t,
|
|
179
|
+
height: e.props.height ?? N,
|
|
180
|
+
direction: S,
|
|
181
|
+
spacing: b,
|
|
182
|
+
sourceMetadataMap: q ?? void 0,
|
|
183
|
+
onLoad: Q,
|
|
184
|
+
onManualLoad: $,
|
|
185
|
+
onError: Q,
|
|
186
|
+
onKeyDown: oe(e.props.onKeyDown),
|
|
187
|
+
onFocus: Z(e.props.onFocus),
|
|
188
|
+
style: {
|
|
189
|
+
marginBottom: a ? 0 : E.content(b),
|
|
190
|
+
...e.props.style
|
|
191
|
+
},
|
|
192
|
+
...e.props
|
|
193
|
+
});
|
|
194
|
+
})
|
|
195
|
+
}, `masonry-row-${i}`);
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return /* @__PURE__ */ g(m, {
|
|
200
|
+
ref: P,
|
|
201
|
+
role: "list",
|
|
202
|
+
"aria-label": "콘텐츠",
|
|
203
|
+
"aria-orientation": "vertical",
|
|
204
|
+
onMouseDown: J,
|
|
205
|
+
onMouseMove: Y,
|
|
206
|
+
onMouseUp: X,
|
|
207
|
+
onMouseLeave: X,
|
|
208
|
+
pt: x,
|
|
209
|
+
pb: x,
|
|
210
|
+
...T,
|
|
211
|
+
inlineCSS: {
|
|
212
|
+
width: "100%",
|
|
213
|
+
position: "relative",
|
|
214
|
+
transform: "translate3d(0, 0, 0)",
|
|
215
|
+
columnCount: v,
|
|
216
|
+
columnGap: E.content(b),
|
|
217
|
+
marginTop: -E.content(b),
|
|
218
|
+
...T?.inlineCSS
|
|
219
|
+
},
|
|
220
|
+
children: c.map(U, (e, t) => l(e, {
|
|
221
|
+
setInnerRef: se(t),
|
|
222
|
+
role: "listitem",
|
|
223
|
+
tabIndex: t === k ? 0 : -1,
|
|
224
|
+
"aria-posinset": t + 1,
|
|
225
|
+
"aria-setsize": K,
|
|
226
|
+
width: e.props.width ?? M,
|
|
227
|
+
height: e.props.height ?? M * j / 2,
|
|
228
|
+
direction: S,
|
|
229
|
+
spacing: b,
|
|
230
|
+
sourceMetadataMap: q ?? void 0,
|
|
231
|
+
onLoad: Q,
|
|
232
|
+
onManualLoad: $,
|
|
233
|
+
onError: Q,
|
|
234
|
+
onKeyDown: ae(e.props.onKeyDown),
|
|
235
|
+
onFocus: Z(e.props.onFocus),
|
|
236
|
+
...e.props
|
|
237
|
+
}))
|
|
238
|
+
});
|
|
274
239
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
};
|
|
240
|
+
//#endregion
|
|
241
|
+
export { _ as default };
|