@dotss/tictoccroc 0.0.8 → 0.0.10
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/index.mjs +74 -70
- package/dist/shared/components/Carousel/index.d.ts +2 -2
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.d.ts +1 -1
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +59 -53
- package/dist/shared/components/Roller/Roller.mjs +5 -5
- package/dist/shared/components/Scheduler/Scheduler.mjs +15 -16
- package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +2 -1
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +17 -16
- package/dist/shared/typings/common.d.ts +9 -0
- package/dist/shared/typings/common.mjs +4 -0
- package/dist/shared/typings/index.d.ts +1 -0
- package/dist/shared/typings/index.mjs +4 -0
- package/dist/shared/utils/dayFlagToDay/dayFlagToDay.d.ts +2 -0
- package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +24 -0
- package/dist/shared/utils/dayFlagToDay/dayFlagToDay.test.d.ts +1 -0
- package/dist/shared/utils/dayFlagToDay/index.d.ts +2 -0
- package/dist/shared/utils/dayFlagToDay/index.mjs +4 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.mjs +14 -12
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +25 -25
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +12 -12
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +21 -19
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +1 -2
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.d.ts +11 -0
- package/dist/teacher/profile/components/{CertificationSection/CertificationItem/CertificationItem.mjs → CertificateSection/CertificateItem/CertificateItem.mjs} +5 -11
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.d.ts +3 -0
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -0
- package/dist/teacher/profile/components/CertificateSection/CertificateSection.d.ts +9 -0
- package/dist/teacher/profile/components/{CertificationSection/CertificationSection.mjs → CertificateSection/CertificateSection.mjs} +28 -28
- package/dist/teacher/profile/components/CertificateSection/index.d.ts +4 -0
- package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -0
- package/dist/teacher/profile/components/ClassNotesSection/ClassNote/ClassNote.d.ts +9 -0
- package/dist/teacher/profile/components/{LessonNotesSection/LessonNote/LessonNote.mjs → ClassNotesSection/ClassNote/ClassNote.mjs} +15 -15
- package/dist/teacher/profile/components/ClassNotesSection/ClassNote/index.d.ts +3 -0
- package/dist/teacher/profile/components/ClassNotesSection/ClassNote/index.mjs +4 -0
- package/dist/teacher/profile/components/ClassNotesSection/ClassNotesSection.d.ts +7 -0
- package/dist/teacher/profile/components/{LessonNotesSection/LessonNotesSection.mjs → ClassNotesSection/ClassNotesSection.mjs} +3 -3
- package/dist/teacher/profile/components/ClassNotesSection/index.d.ts +4 -0
- package/dist/teacher/profile/components/ClassNotesSection/index.mjs +6 -0
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +1 -1
- package/dist/teacher/profile/components/ParentReviewSection/index.d.ts +2 -1
- package/dist/teacher/profile/components/ParentReviewSection/index.mjs +5 -3
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +122 -109
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.d.ts +2 -0
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +8 -0
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +1 -1
- package/dist/teacher/profile/components/index.d.ts +4 -4
- package/dist/teacher/profile/components/index.mjs +20 -18
- package/package.json +10 -2
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +0 -11
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/index.d.ts +0 -3
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/index.mjs +0 -4
- package/dist/teacher/profile/components/CertificationSection/CertificationSection.d.ts +0 -9
- package/dist/teacher/profile/components/CertificationSection/index.d.ts +0 -4
- package/dist/teacher/profile/components/CertificationSection/index.mjs +0 -6
- package/dist/teacher/profile/components/LessonNotesSection/LessonNote/LessonNote.d.ts +0 -9
- package/dist/teacher/profile/components/LessonNotesSection/LessonNote/index.d.ts +0 -3
- package/dist/teacher/profile/components/LessonNotesSection/LessonNote/index.mjs +0 -4
- package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.d.ts +0 -7
- package/dist/teacher/profile/components/LessonNotesSection/index.d.ts +0 -4
- package/dist/teacher/profile/components/LessonNotesSection/index.mjs +0 -6
- /package/dist/teacher/profile/components/{LessonNotesSection/LessonNotesSection.utils.d.ts → ClassNotesSection/ClassNotesSection.utils.d.ts} +0 -0
- /package/dist/teacher/profile/components/{LessonNotesSection/LessonNotesSection.utils.mjs → ClassNotesSection/ClassNotesSection.utils.mjs} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as o } from "./shared/components/Scheduler/Scheduler.mjs";
|
|
2
2
|
import { default as a } from "./shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs";
|
|
3
3
|
import { default as l } from "./shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs";
|
|
4
4
|
import { getAvailableDateRange as s } from "./shared/components/Scheduler/Scheduler.utils.mjs";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as u } from "./shared/components/MediaDialog/MediaDialog.mjs";
|
|
6
6
|
import { default as i } from "./shared/components/MediaDialog/MediaBlock/MediaBlock.mjs";
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as c } from "./shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs";
|
|
8
8
|
import { default as g } from "./shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs";
|
|
9
9
|
import { default as y } from "./shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs";
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
10
|
+
import { default as A } from "./shared/components/Swiper/Swiper.mjs";
|
|
11
|
+
import { default as v } from "./shared/components/Swiper/SwiperBlock/SwiperBlock.mjs";
|
|
12
|
+
import { default as h } from "./shared/components/Carousel/Carousel.mjs";
|
|
13
|
+
import { default as I } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
|
|
14
14
|
import { default as M } from "./shared/components/TimePicker/TimePicker.mjs";
|
|
15
15
|
import { default as R } from "./shared/components/Roller/Roller.mjs";
|
|
16
16
|
import { default as T } from "./shared/components/Roller/RollerBlock/RollerBlock.mjs";
|
|
17
17
|
import { default as G } from "./shared/components/Image/Image.mjs";
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
18
|
+
import { default as F } from "./shared/components/Calendar/Calendar.mjs";
|
|
19
|
+
import { default as N } from "./shared/components/Masonry/Masonry.mjs";
|
|
20
|
+
import { default as j } from "./shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
|
|
21
21
|
import { default as V } from "./shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs";
|
|
22
22
|
import { default as z } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
23
23
|
import { default as J } from "./shared/utils/getImageUrl/getImageUrl.mjs";
|
|
@@ -25,90 +25,94 @@ import { default as W } from "./shared/utils/isServer/isServer.mjs";
|
|
|
25
25
|
import { default as Y } from "./shared/utils/getTimeRange/getTimeRange.mjs";
|
|
26
26
|
import { default as _ } from "./shared/utils/getDateRange/getDateRange.mjs";
|
|
27
27
|
import { default as ee } from "./shared/utils/isAndroid/isAndroid.mjs";
|
|
28
|
-
import { default as
|
|
28
|
+
import { default as oe } from "./shared/utils/isApp/isApp.mjs";
|
|
29
29
|
import { default as ae } from "./shared/utils/isDesktop/isDesktop.mjs";
|
|
30
30
|
import { default as le } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
|
|
31
31
|
import { default as se } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
|
|
32
|
-
import { default as
|
|
32
|
+
import { default as ue } from "./shared/utils/getVimeoId/getVimeoId.mjs";
|
|
33
33
|
import { default as ie } from "./shared/utils/parseQueryString/parseQueryString.mjs";
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as ge } from "./
|
|
36
|
-
import { default as ye } from "./teacher/profile/components/
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as Me } from "./teacher/profile/components/
|
|
42
|
-
import { default as Re } from "./teacher/profile/components/
|
|
43
|
-
import { default as Te } from "./teacher/profile/components/CareerSection/
|
|
44
|
-
import { default as Ge } from "./teacher/profile/components/
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import { default as Je } from "./teacher/profile/components/AbilityCollection/
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import { default as _e } from "./teacher/profile/components/
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
34
|
+
import { default as ce } from "./shared/utils/share/share.mjs";
|
|
35
|
+
import { default as ge } from "./shared/utils/dayFlagToDay/dayFlagToDay.mjs";
|
|
36
|
+
import { default as ye } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
|
|
37
|
+
import { default as Ae } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
|
|
38
|
+
import { default as ve } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
|
|
39
|
+
import { default as he } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
|
|
40
|
+
import { default as Ie } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
|
|
41
|
+
import { default as Me } from "./teacher/profile/components/CertificateSection/CertificateSection.mjs";
|
|
42
|
+
import { default as Re } from "./teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs";
|
|
43
|
+
import { default as Te } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
|
|
44
|
+
import { default as Ge } from "./teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs";
|
|
45
|
+
import { default as Fe } from "./teacher/profile/components/EducationSection/EducationSection.mjs";
|
|
46
|
+
import { default as Ne } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
|
|
47
|
+
import { default as je } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
|
|
48
|
+
import { default as Ve } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
|
|
49
|
+
import { getPreferredAgeKeywords as ze } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
|
|
50
|
+
import { default as Je } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
|
|
51
|
+
import { default as We } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
|
|
52
|
+
import { getAbilityCollection as Ye } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
|
|
53
|
+
import { default as _e } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
|
|
54
|
+
import { default as et } from "./teacher/profile/components/ClassNotesSection/ClassNotesSection.mjs";
|
|
55
|
+
import { default as ot } from "./teacher/profile/components/ClassNotesSection/ClassNote/ClassNote.mjs";
|
|
56
|
+
import { default as at } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
|
|
57
|
+
import { getChildLabel as lt } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
|
|
58
|
+
import { default as st } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
|
|
57
59
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
We as AbilityBadge,
|
|
61
|
+
Je as AbilityCollection,
|
|
62
|
+
he as ActivityGallery,
|
|
63
|
+
Ie as ActivityGalleryItem,
|
|
64
|
+
_e as AvailableScheduleSection,
|
|
65
|
+
F as Calendar,
|
|
66
|
+
Ge as CareerItem,
|
|
67
|
+
Te as CareerSection,
|
|
68
|
+
h as Carousel,
|
|
69
|
+
I as CarouselSlide,
|
|
70
|
+
Re as CertificateItem,
|
|
71
|
+
Me as CertificateSection,
|
|
72
|
+
ot as ClassNote,
|
|
73
|
+
et as ClassNotesSection,
|
|
74
|
+
Ne as EducationItem,
|
|
75
|
+
Fe as EducationSection,
|
|
72
76
|
G as Image,
|
|
73
|
-
eo as LessonNote,
|
|
74
|
-
_e as LessonNotesSection,
|
|
75
77
|
V as LoadingAnnouncer,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
N as Masonry,
|
|
79
|
+
j as MasonryBlock,
|
|
78
80
|
i as MediaBlock,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
u as MediaDialog,
|
|
82
|
+
c as MediaDialogContent,
|
|
81
83
|
g as MediaDialogFooter,
|
|
82
84
|
y as MediaDialogToolbar,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
st as ParentReviewCard,
|
|
86
|
+
at as ParentReviewSection,
|
|
87
|
+
je as PreferredActivityKeywordGroup,
|
|
88
|
+
Ve as PreferredAgeGroup,
|
|
89
|
+
ye as ProfileSummary,
|
|
88
90
|
R as Roller,
|
|
89
91
|
T as RollerBlock,
|
|
90
92
|
l as ScheduleBlock,
|
|
91
93
|
a as ScheduleEvent,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
o as Scheduler,
|
|
95
|
+
ve as StatBadge,
|
|
96
|
+
Ae as StatBadgeCollection,
|
|
97
|
+
A as Swiper,
|
|
98
|
+
v as SwiperBlock,
|
|
97
99
|
M as TimePicker,
|
|
98
100
|
le as birthDateToAge,
|
|
99
|
-
|
|
101
|
+
ge as dayFlagToDay,
|
|
102
|
+
Ye as getAbilityCollection,
|
|
100
103
|
s as getAvailableDateRange,
|
|
104
|
+
lt as getChildLabel,
|
|
101
105
|
_ as getDateRange,
|
|
102
106
|
J as getImageUrl,
|
|
103
|
-
|
|
107
|
+
ze as getPreferredAgeKeywords,
|
|
104
108
|
Y as getTimeRange,
|
|
105
|
-
|
|
109
|
+
ue as getVimeoId,
|
|
106
110
|
ee as isAndroid,
|
|
107
|
-
|
|
111
|
+
oe as isApp,
|
|
108
112
|
ae as isDesktop,
|
|
109
113
|
W as isServer,
|
|
110
114
|
se as objectToQueryString,
|
|
111
115
|
ie as parseQueryString,
|
|
112
|
-
|
|
116
|
+
ce as share,
|
|
113
117
|
z as useIsomorphicLayoutEffect
|
|
114
118
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CarouselProps, default as Carousel } from './Carousel';
|
|
1
|
+
import { CarouselPaginationProps, CarouselProps, default as Carousel } from './Carousel';
|
|
2
2
|
export { default as CarouselSlide, type CarouselSlideProps } from './CarouselSlide';
|
|
3
|
-
export type { CarouselProps };
|
|
3
|
+
export type { CarouselProps, CarouselPaginationProps };
|
|
4
4
|
export default Carousel;
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Flexbox as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { findImageInChildren as
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as C, jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useState as s, useRef as z, useImperativeHandle as L, useEffect as v, Children as D, isValidElement as V, cloneElement as $ } from "react";
|
|
3
|
+
import { Flexbox as r, Skeleton as q } from "@dotss/ui";
|
|
4
|
+
import G from "@dotss/ui/core/useTheme";
|
|
5
|
+
import J from "../../Image/Image.mjs";
|
|
6
|
+
import { findImageInChildren as K } from "../Masonry.utils.mjs";
|
|
7
|
+
const Z = W(
|
|
8
8
|
({
|
|
9
|
-
children:
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
9
|
+
children: y,
|
|
10
|
+
width: l = 0,
|
|
11
|
+
height: c = 0,
|
|
12
12
|
spacing: x = 2,
|
|
13
|
-
borderRadius:
|
|
14
|
-
direction:
|
|
15
|
-
setInnerRef:
|
|
16
|
-
sourceMetadata:
|
|
13
|
+
borderRadius: o = 0,
|
|
14
|
+
direction: a = "vertical",
|
|
15
|
+
setInnerRef: t,
|
|
16
|
+
sourceMetadata: d,
|
|
17
17
|
...e
|
|
18
18
|
}, T) => {
|
|
19
|
-
var
|
|
20
|
-
const { spacing: E } =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
var w;
|
|
20
|
+
const { spacing: E } = G(), f = K(y), p = (w = f == null ? void 0 : f.props) == null ? void 0 : w.src, n = d == null ? void 0 : d.find((i) => i.src === p), [g, j] = s((n == null ? void 0 : n.width) ?? l ?? 0), [h, I] = s((n == null ? void 0 : n.height) ?? c ?? 0), [u, k] = s(!p), [m, H] = s(!p), S = z(null), A = () => k(!0), B = (i) => (F) => {
|
|
21
|
+
H(!0), i == null || i(F);
|
|
22
|
+
};
|
|
23
|
+
return L(T, () => S.current), v(() => {
|
|
24
|
+
j((n == null ? void 0 : n.width) ?? l ?? 0), I((n == null ? void 0 : n.height) ?? c ?? 0);
|
|
25
|
+
}, [l, c, n == null ? void 0 : n.width, n == null ? void 0 : n.height]), v(() => {
|
|
26
|
+
const i = setTimeout(() => {
|
|
27
|
+
k(!0);
|
|
28
|
+
}, 500);
|
|
27
29
|
return () => {
|
|
28
|
-
clearTimeout(
|
|
30
|
+
clearTimeout(i);
|
|
29
31
|
};
|
|
30
|
-
}, []),
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
|
|
32
|
+
}, []), v(() => {
|
|
33
|
+
t == null || t(S.current);
|
|
34
|
+
}, [t]), /* @__PURE__ */ C(
|
|
35
|
+
r,
|
|
34
36
|
{
|
|
35
|
-
ref:
|
|
37
|
+
ref: S,
|
|
36
38
|
flexDirection: "column",
|
|
37
39
|
...e,
|
|
38
40
|
inlineCSS: {
|
|
@@ -40,18 +42,18 @@ const P = a(
|
|
|
40
42
|
...e == null ? void 0 : e.inlineCSS
|
|
41
43
|
},
|
|
42
44
|
children: [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
a === "vertical" && /* @__PURE__ */ b(
|
|
46
|
+
r,
|
|
45
47
|
{
|
|
46
48
|
inlineCSS: {
|
|
47
49
|
minHeight: E.content(x)
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
+
/* @__PURE__ */ C(
|
|
54
|
+
r,
|
|
53
55
|
{
|
|
54
|
-
onTransitionEnd:
|
|
56
|
+
onTransitionEnd: A,
|
|
55
57
|
inlineCSS: {
|
|
56
58
|
position: "relative",
|
|
57
59
|
overflow: "hidden",
|
|
@@ -62,19 +64,19 @@ const P = a(
|
|
|
62
64
|
},
|
|
63
65
|
...e == null ? void 0 : e.inlineCSS
|
|
64
66
|
},
|
|
65
|
-
style:
|
|
66
|
-
borderRadius:
|
|
67
|
-
paddingTop: `calc(${
|
|
67
|
+
style: a === "vertical" ? {
|
|
68
|
+
borderRadius: o,
|
|
69
|
+
paddingTop: `calc(${h / g} * 100%)`,
|
|
68
70
|
transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s"
|
|
69
71
|
} : {
|
|
70
|
-
borderRadius:
|
|
71
|
-
paddingLeft:
|
|
72
|
-
paddingTop:
|
|
72
|
+
borderRadius: o,
|
|
73
|
+
paddingLeft: g,
|
|
74
|
+
paddingTop: h,
|
|
73
75
|
transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s, padding-left 0.3s 0.1s"
|
|
74
76
|
},
|
|
75
77
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
+
/* @__PURE__ */ b(
|
|
79
|
+
r,
|
|
78
80
|
{
|
|
79
81
|
inlineCSS: {
|
|
80
82
|
position: "absolute",
|
|
@@ -83,25 +85,29 @@ const P = a(
|
|
|
83
85
|
width: "100%",
|
|
84
86
|
height: "100%",
|
|
85
87
|
overflow: "hidden",
|
|
88
|
+
borderRadius: o + (m && u ? 0 : 2),
|
|
89
|
+
transition: "border-radius 0.3s 0.1s",
|
|
86
90
|
zIndex: 1
|
|
87
91
|
},
|
|
88
|
-
children:
|
|
89
|
-
width:
|
|
90
|
-
height:
|
|
92
|
+
children: D.toArray(y).filter(V).map((i) => i.type === J || i.type === "img" ? $(i, {
|
|
93
|
+
width: g,
|
|
94
|
+
height: h,
|
|
91
95
|
draggable: !1,
|
|
92
96
|
style: {
|
|
93
97
|
overflow: "hidden",
|
|
94
98
|
objectFit: "cover",
|
|
95
|
-
...
|
|
99
|
+
...i.props.style
|
|
96
100
|
},
|
|
97
|
-
...
|
|
98
|
-
|
|
101
|
+
...i.props,
|
|
102
|
+
onLoad: B(i.props.onLoad),
|
|
103
|
+
enableFallback: !1
|
|
104
|
+
}) : i)
|
|
99
105
|
}
|
|
100
106
|
),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
107
|
+
/* @__PURE__ */ b(
|
|
108
|
+
q,
|
|
103
109
|
{
|
|
104
|
-
borderRadius:
|
|
110
|
+
borderRadius: o,
|
|
105
111
|
inlineCSS: {
|
|
106
112
|
position: "absolute",
|
|
107
113
|
top: 0,
|
|
@@ -109,9 +115,9 @@ const P = a(
|
|
|
109
115
|
width: "100%",
|
|
110
116
|
height: "100%",
|
|
111
117
|
zIndex: 2,
|
|
112
|
-
opacity:
|
|
118
|
+
opacity: m && u ? 0 : 1,
|
|
113
119
|
transition: "opacity 0.3s 0.1s",
|
|
114
|
-
pointerEvents:
|
|
120
|
+
pointerEvents: m && u ? "none" : void 0
|
|
115
121
|
}
|
|
116
122
|
}
|
|
117
123
|
)
|
|
@@ -124,5 +130,5 @@ const P = a(
|
|
|
124
130
|
}
|
|
125
131
|
);
|
|
126
132
|
export {
|
|
127
|
-
|
|
133
|
+
Z as default
|
|
128
134
|
};
|
|
@@ -2,16 +2,16 @@ import { jsx as h } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as w, useRef as a, Children as k, isValidElement as X, useEffect as g, cloneElement as N } from "react";
|
|
3
3
|
import { Flexbox as P } from "@dotss/ui";
|
|
4
4
|
import U from "./RollerBlock/RollerBlock.mjs";
|
|
5
|
-
import S from "../../../teacher/profile/components/
|
|
5
|
+
import S from "../../../teacher/profile/components/ClassNotesSection/ClassNote/ClassNote.mjs";
|
|
6
6
|
function V({
|
|
7
|
-
children:
|
|
8
|
-
spacing:
|
|
7
|
+
children: A,
|
|
8
|
+
spacing: L = 2,
|
|
9
9
|
edgeSpacing: m = 4,
|
|
10
10
|
rowCount: o = 1,
|
|
11
11
|
inlineCSS: M,
|
|
12
12
|
...R
|
|
13
13
|
}) {
|
|
14
|
-
const [y, x] = w(0), n = a(null), i = a(!1), u = a(!0), b = a(0), l = a(0), c = a(0), v = k.toArray(
|
|
14
|
+
const [y, x] = w(0), n = a(null), i = a(!1), u = a(!0), b = a(0), l = a(0), c = a(0), v = k.toArray(A).filter(X).filter((r) => r.type === U || r.type === S), f = v.length, E = (r) => {
|
|
15
15
|
var e, t;
|
|
16
16
|
i.current = !0, b.current = r.clientX - (((e = n.current) == null ? void 0 : e.offsetLeft) || 0), l.current = ((t = n.current) == null ? void 0 : t.scrollLeft) || 0;
|
|
17
17
|
}, I = (r) => {
|
|
@@ -81,7 +81,7 @@ function V({
|
|
|
81
81
|
{
|
|
82
82
|
ref: n,
|
|
83
83
|
alignItems: "baseline",
|
|
84
|
-
gap:
|
|
84
|
+
gap: L,
|
|
85
85
|
pl: m,
|
|
86
86
|
pr: m,
|
|
87
87
|
onMouseDown: E,
|
|
@@ -4,7 +4,7 @@ import { Flexbox as m, Box as pe, Typography as q } from "@dotss/ui";
|
|
|
4
4
|
import Ae from "@dotss/ui/core/useTheme";
|
|
5
5
|
import v from "dayjs";
|
|
6
6
|
import ve from "./ScheduleEvent/ScheduleEvent.mjs";
|
|
7
|
-
import { generateWeek as
|
|
7
|
+
import { generateWeek as O, getDayScheduleEvents as Re, resolvePositionedScheduleEventsForDate as Fe, getMinutesFromMidnight as we } from "./Scheduler.utils.mjs";
|
|
8
8
|
const R = Array.from({ length: 33 }).map((_, P) => {
|
|
9
9
|
const $ = Math.floor((P + 14) / 2) % 24, w = (P + 14) % 2 === 0 ? "00" : "30", T = v().hour($).minute(parseInt(w)), H = v(), D = H.hour(), U = H.minute(), L = D === $ && (U < 30 && w === "00" || U >= 30 && w === "30");
|
|
10
10
|
return {
|
|
@@ -25,7 +25,7 @@ function Ye({
|
|
|
25
25
|
}) {
|
|
26
26
|
const {
|
|
27
27
|
palette: { grey: L }
|
|
28
|
-
} = Ae(), [M, F] = j(P.startOf("week")), [Y, ge] = j("100%"), [z, g] = j(0), [I, k] = j(0), [be, ye] = j(""),
|
|
28
|
+
} = Ae(), [M, F] = j(P.startOf("week")), [Y, ge] = j("100%"), [z, g] = j(0), [I, k] = j(0), [be, ye] = j(""), ee = d(null), te = d(null), re = d(null), J = d(null), ne = d(0), oe = d(0), N = d(!1), X = d(!1), C = d(!1), K = d(0), ae = d(0), se = d(0), ie = d(0), Q = d(!1), S = d(null), G = d(0), V = d(0), E = d(0), p = d(null), Z = fe.toArray(_).filter(me).map((e) => {
|
|
29
29
|
if (e.type === ve) {
|
|
30
30
|
const { startDate: n, endDate: a } = e.props;
|
|
31
31
|
return {
|
|
@@ -36,9 +36,9 @@ function Ye({
|
|
|
36
36
|
}
|
|
37
37
|
return null;
|
|
38
38
|
}).filter(Boolean), $e = fe.toArray(_).filter(me).filter((e) => e.type !== ve), ce = [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
O(M.subtract(1, "week"), Z),
|
|
40
|
+
O(M, Z),
|
|
41
|
+
O(M.add(1, "week"), Z)
|
|
42
42
|
], ue = (e, n) => (a) => {
|
|
43
43
|
const o = Number(a.currentTarget.dataset.row), i = Number(a.currentTarget.dataset.col);
|
|
44
44
|
g(o), k(i), ye(`${e.format("dddd")} ${e.format("D")}일 ${n}`);
|
|
@@ -190,8 +190,8 @@ function Ye({
|
|
|
190
190
|
return W(() => {
|
|
191
191
|
const e = () => {
|
|
192
192
|
var n, a, o;
|
|
193
|
-
if (
|
|
194
|
-
const i = ((a = (n =
|
|
193
|
+
if (J.current) {
|
|
194
|
+
const i = ((a = (n = ee.current) == null ? void 0 : n.parentElement) == null ? void 0 : a.offsetHeight) ?? 0, b = J.current.offsetHeight, y = ((o = re.current) == null ? void 0 : o.offsetHeight) ?? 0;
|
|
195
195
|
let c = (i - b - y) / R.length;
|
|
196
196
|
c = c < w ? w : c, c = Math.min(c, T ?? c), ge(c);
|
|
197
197
|
}
|
|
@@ -200,7 +200,6 @@ function Ye({
|
|
|
200
200
|
window.removeEventListener("resize", e);
|
|
201
201
|
};
|
|
202
202
|
}, [w, T, $]), W(() => {
|
|
203
|
-
J.current;
|
|
204
203
|
const e = te.current;
|
|
205
204
|
if (!e) return;
|
|
206
205
|
const n = () => {
|
|
@@ -208,11 +207,11 @@ function Ye({
|
|
|
208
207
|
};
|
|
209
208
|
n();
|
|
210
209
|
const a = (t, r) => {
|
|
211
|
-
C.current || (S.current && (e.removeEventListener("transitionend", S.current), S.current = null), ne.current = t, oe.current = r,
|
|
210
|
+
C.current || (S.current && (e.removeEventListener("transitionend", S.current), S.current = null), ne.current = t, oe.current = r, Q.current = !1, N.current = !0, K.current = 0);
|
|
212
211
|
}, o = (t, r, l) => {
|
|
213
212
|
if (!N.current) return;
|
|
214
213
|
const u = t - ne.current, f = r - oe.current;
|
|
215
|
-
if (K.current = u, !
|
|
214
|
+
if (K.current = u, !Q.current && (se.current = Math.abs(u), ie.current = Math.abs(f), Q.current = !0, ie.current > se.current)) {
|
|
216
215
|
N.current = !1;
|
|
217
216
|
return;
|
|
218
217
|
}
|
|
@@ -249,7 +248,7 @@ function Ye({
|
|
|
249
248
|
D == null || D(M);
|
|
250
249
|
}, [M, D]), W(() => () => {
|
|
251
250
|
G.current && cancelAnimationFrame(G.current), V.current && cancelAnimationFrame(V.current), E.current && cancelAnimationFrame(E.current);
|
|
252
|
-
}, []), /* @__PURE__ */ A(m, { ref:
|
|
251
|
+
}, []), /* @__PURE__ */ A(m, { ref: ee, flex: 1, flexDirection: "column", "aria-label": "일정 안내", ...U, children: [
|
|
253
252
|
$ && ($ == null ? void 0 : $.length) > 0 && /* @__PURE__ */ h(
|
|
254
253
|
m,
|
|
255
254
|
{
|
|
@@ -282,7 +281,7 @@ function Ye({
|
|
|
282
281
|
/* @__PURE__ */ A(
|
|
283
282
|
m,
|
|
284
283
|
{
|
|
285
|
-
ref:
|
|
284
|
+
ref: J,
|
|
286
285
|
alignItems: "center",
|
|
287
286
|
pt: 1,
|
|
288
287
|
pb: 2,
|
|
@@ -492,7 +491,7 @@ function Ye({
|
|
|
492
491
|
}),
|
|
493
492
|
y.map(
|
|
494
493
|
({ children: c, startDate: s, endDate: t, totalColumns: r, columnIndex: l }) => {
|
|
495
|
-
const u = we(s), f = we(t), x = Math.floor((u - 7 * 60) / 30), Ee = (u - 7 * 60) / 30 * (Number(Y) || w), Le = (f - u) / 30 * (Number(Y) || w), de = 100 / r, Se = l * de,
|
|
494
|
+
const u = we(s), f = we(t), x = Math.floor((u - 7 * 60) / 30), Ee = (u - 7 * 60) / 30 * (Number(Y) || w), Le = (f - u) / 30 * (Number(Y) || w), de = 100 / r, Se = l * de, B = c;
|
|
496
495
|
return /* @__PURE__ */ h(
|
|
497
496
|
m,
|
|
498
497
|
{
|
|
@@ -504,17 +503,17 @@ function Ye({
|
|
|
504
503
|
height: `${Le - (x > 0 ? 1 : 0)}px`,
|
|
505
504
|
zIndex: 1
|
|
506
505
|
},
|
|
507
|
-
children: he(
|
|
506
|
+
children: he(B, {
|
|
508
507
|
role: "button",
|
|
509
508
|
tabIndex: a === 1 ? 0 : -1,
|
|
510
|
-
onKeyDown: ke(
|
|
509
|
+
onKeyDown: ke(B.props.onKeyDown),
|
|
511
510
|
"data-start-date": s,
|
|
512
511
|
"data-start-time": v(s).format("HH:mm"),
|
|
513
512
|
"data-end-date": t,
|
|
514
513
|
"data-end-time": v(t).format("HH:mm"),
|
|
515
514
|
"data-is-event": !0,
|
|
516
515
|
"aria-label": `${v(s).format("dddd")} ${v(s).format("D")}일 ${v(s).format("A h시")}부터 ${v(t).format("dddd")} ${v(t).format("D")}일 ${v(t).format("A h시")}까지의 일정`,
|
|
517
|
-
...
|
|
516
|
+
...B.props
|
|
518
517
|
})
|
|
519
518
|
},
|
|
520
519
|
`${s}-${t}-${l}-${r}`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
import { ScheduleEventProps } from './ScheduleEvent/ScheduleEvent';
|
|
3
|
+
import { DayFlag } from '../../typings/common';
|
|
3
4
|
export interface ScheduleEventWithRange extends ScheduleEventProps {
|
|
4
5
|
start: number;
|
|
5
6
|
end: number;
|
|
@@ -27,7 +28,7 @@ export declare function getAvailableDateRange(startDate: string | Date | Dayjs,
|
|
|
27
28
|
endDate: string;
|
|
28
29
|
startTime: number;
|
|
29
30
|
endTime: number;
|
|
30
|
-
|
|
31
|
+
dayFlag: DayFlag[];
|
|
31
32
|
oneDayDate: string | null;
|
|
32
33
|
}[];
|
|
33
34
|
mergedTimeBlocks: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import s from "dayjs";
|
|
2
|
-
import g from "../../utils/
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import g from "../../utils/dayFlagToDay/dayFlagToDay.mjs";
|
|
3
|
+
import v from "../../utils/getDateRange/getDateRange.mjs";
|
|
4
|
+
import E from "../../utils/getTimeRange/getTimeRange.mjs";
|
|
5
|
+
function C(u, n = []) {
|
|
5
6
|
const a = Array.from({ length: 7 }, (e, f) => u.add(f, "day")), i = u, o = u.add(6, "day").endOf("day"), m = n.map((e) => {
|
|
6
7
|
const f = s(e.startDate), t = s(e.endDate).endOf("day"), r = f.isBefore(i) ? i : f, c = t.isAfter(o) ? o : t, l = r.diff(i, "day"), p = c.diff(r, "day") + 1;
|
|
7
8
|
return {
|
|
@@ -12,12 +13,12 @@ function M(u, n = []) {
|
|
|
12
13
|
}).filter((e) => e.start <= 6 && e.end >= 0);
|
|
13
14
|
return { days: a.map((e) => e), scheduleEvents: m };
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function O(u, n) {
|
|
16
17
|
return u.filter(
|
|
17
18
|
(a) => s(a.startDate).isBefore(n.endOf("day")) && s(a.endDate).isAfter(n.startOf("day"))
|
|
18
19
|
);
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function x(u, n) {
|
|
21
22
|
const a = n.startOf("day"), i = n.endOf("day"), m = [...u.filter(
|
|
22
23
|
(t) => s(t.startDate).isBefore(i) && s(t.endDate).isAfter(a)
|
|
23
24
|
).map((t) => ({
|
|
@@ -62,20 +63,20 @@ function D(u) {
|
|
|
62
63
|
const i = n.length;
|
|
63
64
|
return a.forEach((o) => o.totalColumns = i), a;
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function A(u) {
|
|
66
67
|
const n = s(u);
|
|
67
68
|
return n.hour() * 60 + n.minute();
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function b(u, n, {
|
|
70
71
|
schedules: a,
|
|
71
72
|
mergedTimeBlocks: i = !1
|
|
72
73
|
}) {
|
|
73
|
-
return
|
|
74
|
-
const e = a.filter(({ startDate: r, endDate: c,
|
|
74
|
+
return v(u, n).flatMap(({ value: o }, m) => {
|
|
75
|
+
const e = a.filter(({ startDate: r, endDate: c, dayFlag: l }) => {
|
|
75
76
|
const p = s(r), h = s(c);
|
|
76
|
-
return p.isAfter(o) || h.isBefore(o) ? !1 :
|
|
77
|
+
return p.isAfter(o) || h.isBefore(o) ? !1 : l.some((y) => g(y) === s(o).day());
|
|
77
78
|
}).filter(({ oneDayDate: r }) => r ? s(r).isSame(o, "date") : !0).flatMap(
|
|
78
|
-
({ id: r, startTime: c, endTime: l }) =>
|
|
79
|
+
({ id: r, startTime: c, endTime: l }) => E(Number(c), Number(l), {
|
|
79
80
|
step: i ? l - c : void 0,
|
|
80
81
|
pairs: !i
|
|
81
82
|
}).map(({ value: p, label: h }) => ({
|
|
@@ -95,9 +96,9 @@ function O(u, n, {
|
|
|
95
96
|
}
|
|
96
97
|
export {
|
|
97
98
|
D as assignColumnsToGroup,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
C as generateWeek,
|
|
100
|
+
b as getAvailableDateRange,
|
|
101
|
+
O as getDayScheduleEvents,
|
|
102
|
+
A as getMinutesFromMidnight,
|
|
103
|
+
x as resolvePositionedScheduleEventsForDate
|
|
103
104
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './common';
|