@dotss/tictoccroc 0.0.5 → 0.0.7
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/shared/components/Scheduler/Scheduler.d.ts +2 -2
- package/dist/shared/components/Scheduler/Scheduler.mjs +164 -164
- package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +13 -7
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +65 -54
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +23 -24
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +3 -3
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +3 -3
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.d.ts +5 -2
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +24 -24
- package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +42 -41
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +5 -2
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +27 -22
- package/dist/teacher/profile/components/CertificationSection/CertificationSection.mjs +41 -37
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.d.ts +6 -3
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +38 -30
- package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +35 -34
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +33 -31
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +4 -4
- package/dist/teacher/profile/utils/index.d.ts +1 -0
- package/dist/teacher/profile/utils/index.mjs +5 -0
- package/dist/teacher/profile/utils/sortItems/index.d.ts +3 -0
- package/dist/teacher/profile/utils/sortItems/index.mjs +6 -0
- package/dist/teacher/profile/utils/sortItems/sortItems.d.ts +9 -0
- package/dist/teacher/profile/utils/sortItems/sortItems.mjs +29 -0
- package/package.json +9 -1
|
@@ -8,9 +8,9 @@ export interface SchedulerProps extends FlexboxProps {
|
|
|
8
8
|
color?: string;
|
|
9
9
|
}[];
|
|
10
10
|
minScheduleBlockHeight?: number;
|
|
11
|
+
maxScheduleBlockHeight?: number;
|
|
11
12
|
renderScheduleBlock?: (date: string, time: string) => ReactNode;
|
|
12
13
|
onDateChange?: (date: Dayjs) => void;
|
|
13
|
-
adornment?: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare function Scheduler({ children, date, legend, minScheduleBlockHeight, renderScheduleBlock, onDateChange,
|
|
15
|
+
declare function Scheduler({ children, date, legend, minScheduleBlockHeight, maxScheduleBlockHeight, renderScheduleBlock, onDateChange, ...props }: SchedulerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default Scheduler;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as j, useRef as d, Children as
|
|
3
|
-
import { Flexbox as m, Box as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as A, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useRef as d, Children as fe, isValidElement as me, useEffect as W, cloneElement as he } from "react";
|
|
3
|
+
import { Flexbox as m, Box as pe, Typography as q } from "@dotss/ui";
|
|
4
|
+
import Ae from "@dotss/ui/core/useTheme";
|
|
5
5
|
import v from "dayjs";
|
|
6
|
-
import
|
|
7
|
-
import { generateWeek as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
import ve from "./ScheduleEvent/ScheduleEvent.mjs";
|
|
7
|
+
import { generateWeek as O, getDayScheduleEvents as Re, resolvePositionedScheduleEventsForDate as Fe, getMinutesFromMidnight as we } from "./Scheduler.utils.mjs";
|
|
8
|
+
const R = Array.from({ length: 34 }).map((_, U) => {
|
|
9
|
+
const $ = Math.floor((U + 14) / 2) % 24, w = (U + 14) % 2 === 0 ? "00" : "30", T = v().hour($).minute(parseInt(w)), H = v(), D = H.hour(), K = H.minute(), L = D === $ && (K < 30 && w === "00" || K >= 30 && w === "30");
|
|
10
10
|
return {
|
|
11
11
|
time: T.format("HH:mm"),
|
|
12
12
|
label: T.format("A h시 m분"),
|
|
13
|
-
isCurrentTime:
|
|
13
|
+
isCurrentTime: L
|
|
14
14
|
};
|
|
15
15
|
});
|
|
16
|
-
function
|
|
17
|
-
children:
|
|
18
|
-
date:
|
|
19
|
-
legend:
|
|
20
|
-
minScheduleBlockHeight:
|
|
21
|
-
|
|
16
|
+
function Ye({
|
|
17
|
+
children: _,
|
|
18
|
+
date: U = v(),
|
|
19
|
+
legend: $,
|
|
20
|
+
minScheduleBlockHeight: w = 20,
|
|
21
|
+
maxScheduleBlockHeight: T,
|
|
22
|
+
renderScheduleBlock: H,
|
|
22
23
|
onDateChange: D,
|
|
23
|
-
|
|
24
|
-
...U
|
|
24
|
+
...K
|
|
25
25
|
}) {
|
|
26
26
|
const {
|
|
27
|
-
palette: { grey:
|
|
28
|
-
} =
|
|
29
|
-
if (e.type ===
|
|
27
|
+
palette: { grey: L }
|
|
28
|
+
} = Ae(), [M, F] = j(U.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), P = 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
|
+
if (e.type === ve) {
|
|
30
30
|
const { startDate: n, endDate: a } = e.props;
|
|
31
31
|
return {
|
|
32
32
|
startDate: n,
|
|
@@ -35,38 +35,38 @@ function He({
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
return null;
|
|
38
|
-
}).filter(Boolean), ce = [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
],
|
|
38
|
+
}).filter(Boolean), $e = fe.toArray(_).filter(me).filter((e) => e.type !== ve), ce = [
|
|
39
|
+
O(M.subtract(1, "week"), Z),
|
|
40
|
+
O(M, Z),
|
|
41
|
+
O(M.add(1, "week"), Z)
|
|
42
|
+
], ue = (e, n) => (a) => {
|
|
43
43
|
const o = Number(a.currentTarget.dataset.row), i = Number(a.currentTarget.dataset.col);
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
var
|
|
44
|
+
g(o), k(i), ye(`${e.format("dddd")} ${e.format("D")}일 ${n}`);
|
|
45
|
+
}, le = (e) => {
|
|
46
|
+
var b, y;
|
|
47
47
|
const n = Number(e.currentTarget.dataset.row), a = Number(e.currentTarget.dataset.col);
|
|
48
48
|
let o = n, i = a;
|
|
49
49
|
switch (e.key) {
|
|
50
50
|
case "ArrowUp": {
|
|
51
|
-
e.preventDefault(), n === 0 && (a - 1 < 0 ? (F((t) => t.add(-1, "week")),
|
|
51
|
+
e.preventDefault(), n === 0 && (a - 1 < 0 ? (F((t) => t.add(-1, "week")), g(R.length - 1), k(6), E.current = requestAnimationFrame(() => {
|
|
52
52
|
var t, r;
|
|
53
53
|
(r = (t = p.current) == null ? void 0 : t.querySelector(
|
|
54
|
-
`[data-row="${
|
|
54
|
+
`[data-row="${R.length - 1}"][data-col="6"][data-week="1"]`
|
|
55
55
|
)) == null || r.focus();
|
|
56
|
-
})) : (
|
|
56
|
+
})) : (g(R.length - 1), k(a - 1), E.current = requestAnimationFrame(() => {
|
|
57
57
|
var t, r;
|
|
58
58
|
(r = (t = p.current) == null ? void 0 : t.querySelector(
|
|
59
|
-
`[data-row="${
|
|
59
|
+
`[data-row="${R.length - 1}"][data-col="${a - 1}"][data-week="1"]`
|
|
60
60
|
)) == null || r.focus();
|
|
61
61
|
}))), o = Math.max(n - 1, 0);
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
case "ArrowDown": {
|
|
65
|
-
if (e.preventDefault(), n ===
|
|
66
|
-
a + 1 > 6 ? (F((t) => t.add(1, "week")),
|
|
65
|
+
if (e.preventDefault(), n === R.length - 1) {
|
|
66
|
+
a + 1 > 6 ? (F((t) => t.add(1, "week")), g(0), k(0), E.current = requestAnimationFrame(() => {
|
|
67
67
|
var t, r;
|
|
68
68
|
(r = (t = p.current) == null ? void 0 : t.querySelector('[data-row="0"][data-col="0"][data-week="1"]')) == null || r.focus();
|
|
69
|
-
})) : (
|
|
69
|
+
})) : (g(0), k(i + 1), E.current = requestAnimationFrame(() => {
|
|
70
70
|
var t, r;
|
|
71
71
|
(r = (t = p.current) == null ? void 0 : t.querySelector(
|
|
72
72
|
`[data-row="0"][data-col="${i + 1}"][data-week="1"]`
|
|
@@ -74,12 +74,12 @@ function He({
|
|
|
74
74
|
}));
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
o = Math.min(n + 1,
|
|
77
|
+
o = Math.min(n + 1, R.length - 1);
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
80
80
|
case "ArrowLeft": {
|
|
81
81
|
if (e.preventDefault(), a === 0) {
|
|
82
|
-
F((s) => s.add(-1, "week")),
|
|
82
|
+
F((s) => s.add(-1, "week")), g(o), k(6), E.current = requestAnimationFrame(() => {
|
|
83
83
|
var s, t;
|
|
84
84
|
(t = (s = p.current) == null ? void 0 : s.querySelector(`[data-row="${o}"][data-col="6"][data-week="1"]`)) == null || t.focus();
|
|
85
85
|
});
|
|
@@ -90,7 +90,7 @@ function He({
|
|
|
90
90
|
}
|
|
91
91
|
case "ArrowRight": {
|
|
92
92
|
if (e.preventDefault(), a === 6) {
|
|
93
|
-
F((s) => s.add(1, "week")),
|
|
93
|
+
F((s) => s.add(1, "week")), g(o), k(0), E.current = requestAnimationFrame(() => {
|
|
94
94
|
var s, t;
|
|
95
95
|
(t = (s = p.current) == null ? void 0 : s.querySelector(`[data-row="${o}"][data-col="0"][data-week="1"]`)) == null || t.focus();
|
|
96
96
|
});
|
|
@@ -106,9 +106,9 @@ function He({
|
|
|
106
106
|
e.preventDefault(), e.currentTarget.click();
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
var i,
|
|
109
|
+
g(o), k(i), (y = (b = p.current) == null ? void 0 : b.querySelector(`[data-row="${o}"][data-col="${i}"][data-week="1"]`)) == null || y.focus();
|
|
110
|
+
}, ke = (e) => (n) => {
|
|
111
|
+
var i, b, y, c, s, t;
|
|
112
112
|
const a = n.currentTarget.dataset.startDate, o = n.currentTarget.dataset.endDate;
|
|
113
113
|
if (!(!a || !o)) {
|
|
114
114
|
switch (n.key) {
|
|
@@ -120,51 +120,51 @@ function He({
|
|
|
120
120
|
break;
|
|
121
121
|
case "ArrowUp": {
|
|
122
122
|
n.preventDefault();
|
|
123
|
-
const r = n.currentTarget.previousElementSibling,
|
|
124
|
-
if (r &&
|
|
125
|
-
r.focus(),
|
|
123
|
+
const r = n.currentTarget.previousElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
|
|
124
|
+
if (r && l)
|
|
125
|
+
r.focus(), g(z - 1);
|
|
126
126
|
else {
|
|
127
|
-
const
|
|
127
|
+
const u = (i = n.currentTarget.parentElement) == null ? void 0 : i.querySelector(
|
|
128
128
|
`[data-time="${v(a).add(-30, "minute").format("HH:mm")}"]`
|
|
129
129
|
);
|
|
130
|
-
|
|
130
|
+
u == null || u.focus();
|
|
131
131
|
}
|
|
132
132
|
break;
|
|
133
133
|
}
|
|
134
134
|
case "ArrowLeft": {
|
|
135
135
|
n.preventDefault();
|
|
136
|
-
const r = n.currentTarget.previousElementSibling,
|
|
137
|
-
if (r &&
|
|
136
|
+
const r = n.currentTarget.previousElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
|
|
137
|
+
if (r && l)
|
|
138
138
|
r.focus();
|
|
139
139
|
else {
|
|
140
|
-
if (
|
|
141
|
-
F((f) => f.add(-1, "week")),
|
|
140
|
+
if (I === 0) {
|
|
141
|
+
F((f) => f.add(-1, "week")), g(0), k(6), E.current = requestAnimationFrame(() => {
|
|
142
142
|
var f, x;
|
|
143
143
|
(x = (f = p.current) == null ? void 0 : f.querySelector('[data-row="0"][data-col="6"][data-week="1"]')) == null || x.focus();
|
|
144
144
|
});
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
-
(
|
|
148
|
-
`[data-row="${
|
|
149
|
-
)) == null ||
|
|
147
|
+
(y = (b = p.current) == null ? void 0 : b.querySelector(
|
|
148
|
+
`[data-row="${z}"][data-col="${I - 1}"][data-week="1"]`
|
|
149
|
+
)) == null || y.focus();
|
|
150
150
|
}
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
case "ArrowRight": {
|
|
154
154
|
n.preventDefault();
|
|
155
|
-
const r = n.currentTarget.nextElementSibling,
|
|
156
|
-
if (r &&
|
|
155
|
+
const r = n.currentTarget.nextElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
|
|
156
|
+
if (r && l)
|
|
157
157
|
r.focus();
|
|
158
158
|
else {
|
|
159
|
-
if (
|
|
160
|
-
F((f) => f.add(1, "week")),
|
|
159
|
+
if (I === 6) {
|
|
160
|
+
F((f) => f.add(1, "week")), g(0), k(0), E.current = requestAnimationFrame(() => {
|
|
161
161
|
var f, x;
|
|
162
162
|
(x = (f = p.current) == null ? void 0 : f.querySelector('[data-row="0"][data-col="0"][data-week="1"]')) == null || x.focus();
|
|
163
163
|
});
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
(s = (
|
|
167
|
-
`[data-row="${
|
|
166
|
+
(s = (c = p.current) == null ? void 0 : c.querySelector(
|
|
167
|
+
`[data-row="${z}"][data-col="${I + 1}"][data-week="1"]`
|
|
168
168
|
)) == null || s.focus();
|
|
169
169
|
}
|
|
170
170
|
break;
|
|
@@ -172,14 +172,14 @@ function He({
|
|
|
172
172
|
case "ArrowDown":
|
|
173
173
|
{
|
|
174
174
|
n.preventDefault();
|
|
175
|
-
const r = n.currentTarget.nextElementSibling,
|
|
176
|
-
if (r &&
|
|
177
|
-
r.focus(),
|
|
175
|
+
const r = n.currentTarget.nextElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
|
|
176
|
+
if (r && l)
|
|
177
|
+
r.focus(), g(z + 1);
|
|
178
178
|
else {
|
|
179
|
-
const
|
|
179
|
+
const u = (t = n.currentTarget.parentElement) == null ? void 0 : t.querySelector(
|
|
180
180
|
`[data-time="${v(o).format("HH:mm")}"]`
|
|
181
181
|
);
|
|
182
|
-
|
|
182
|
+
u == null || u.focus();
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
break;
|
|
@@ -187,20 +187,19 @@ function He({
|
|
|
187
187
|
e == null || e(n);
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
|
-
return
|
|
190
|
+
return W(() => {
|
|
191
191
|
const e = () => {
|
|
192
192
|
var n, a, o;
|
|
193
|
-
if (
|
|
194
|
-
const i = ((a = (n = ee.current) == null ? void 0 : n.parentElement) == null ? void 0 : a.offsetHeight) ?? 0,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
);
|
|
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
|
+
let c = (i - b - y) / R.length;
|
|
196
|
+
c = c < w ? w : c, c = Math.min(c, T ?? c), ge(c);
|
|
198
197
|
}
|
|
199
198
|
};
|
|
200
199
|
return e(), window.addEventListener("resize", e), () => {
|
|
201
200
|
window.removeEventListener("resize", e);
|
|
202
201
|
};
|
|
203
|
-
}, [
|
|
202
|
+
}, [w, T, $]), W(() => {
|
|
204
203
|
const e = te.current;
|
|
205
204
|
if (!e) return;
|
|
206
205
|
const n = () => {
|
|
@@ -208,49 +207,49 @@ function He({
|
|
|
208
207
|
};
|
|
209
208
|
n();
|
|
210
209
|
const a = (t, r) => {
|
|
211
|
-
|
|
212
|
-
}, o = (t, r,
|
|
213
|
-
if (!
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
|
|
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, P.current = 0);
|
|
211
|
+
}, o = (t, r, l) => {
|
|
212
|
+
if (!N.current) return;
|
|
213
|
+
const u = t - ne.current, f = r - oe.current;
|
|
214
|
+
if (P.current = u, !Q.current && (se.current = Math.abs(u), ie.current = Math.abs(f), Q.current = !0, ie.current > se.current)) {
|
|
215
|
+
N.current = !1;
|
|
217
216
|
return;
|
|
218
217
|
}
|
|
219
|
-
|
|
218
|
+
l.cancelable && l.preventDefault(), e.style.transition = "none", e.style.transform = `translate3d(${P.current}px, 0, 0)`, e.style.cursor = "grabbing";
|
|
220
219
|
}, i = () => {
|
|
221
|
-
if (e.style.cursor = "grab", !
|
|
222
|
-
|
|
223
|
-
const t =
|
|
224
|
-
e.style.transition = "transform 300ms cubic-bezier(0.25, 1, 0.5, 1)", t >
|
|
225
|
-
|
|
226
|
-
F((f) => f.add(-1, "week")),
|
|
227
|
-
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0,
|
|
220
|
+
if (e.style.cursor = "grab", !N.current) return;
|
|
221
|
+
N.current = !1, X.current = !1, C.current = !0;
|
|
222
|
+
const t = P.current, r = ae.current, l = r * 0.2;
|
|
223
|
+
e.style.transition = "transform 300ms cubic-bezier(0.25, 1, 0.5, 1)", t > l ? (e.style.transform = `translate3d(${r}px, 0, 0)`, S.current = (u) => {
|
|
224
|
+
u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
|
|
225
|
+
F((f) => f.add(-1, "week")), V.current = requestAnimationFrame(() => {
|
|
226
|
+
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
|
|
228
227
|
});
|
|
229
228
|
}));
|
|
230
|
-
}, e.addEventListener("transitionend",
|
|
231
|
-
|
|
232
|
-
F((f) => f.add(1, "week")),
|
|
233
|
-
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0,
|
|
229
|
+
}, e.addEventListener("transitionend", S.current)) : t < -l ? (e.style.transform = `translate3d(-${r}px, 0, 0)`, S.current = (u) => {
|
|
230
|
+
u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
|
|
231
|
+
F((f) => f.add(1, "week")), V.current = requestAnimationFrame(() => {
|
|
232
|
+
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
|
|
234
233
|
});
|
|
235
234
|
}));
|
|
236
|
-
}, e.addEventListener("transitionend",
|
|
237
|
-
},
|
|
238
|
-
return window.addEventListener("resize", n), e.addEventListener("touchstart",
|
|
239
|
-
window.removeEventListener("resize", n), e.removeEventListener("touchstart",
|
|
235
|
+
}, e.addEventListener("transitionend", S.current)) : (C.current = !1, X.current = !0, e.style.transform = "translate3d(0, 0, 0)");
|
|
236
|
+
}, b = (t) => a(t.touches[0].clientX, t.touches[0].clientY), y = (t) => o(t.touches[0].clientX, t.touches[0].clientY, t), c = (t) => a(t.clientX, t.clientY), s = (t) => o(t.clientX, t.clientY, t);
|
|
237
|
+
return window.addEventListener("resize", n), e.addEventListener("touchstart", b), e.addEventListener("touchmove", y), e.addEventListener("touchend", i), e.addEventListener("touchcancel", i), e.addEventListener("mousedown", c), e.addEventListener("mousemove", s), e.addEventListener("mouseup", i), e.addEventListener("mouseleave", i), () => {
|
|
238
|
+
window.removeEventListener("resize", n), e.removeEventListener("touchstart", b), e.removeEventListener("touchmove", y), e.removeEventListener("touchend", i), e.removeEventListener("touchcancel", i), e.removeEventListener("mousedown", c), e.removeEventListener("mousemove", s), e.removeEventListener("mouseup", i), e.removeEventListener("mouseleave", i), S.current && e.removeEventListener("transitionend", S.current);
|
|
240
239
|
};
|
|
241
|
-
}, []),
|
|
240
|
+
}, []), W(() => {
|
|
242
241
|
const e = p.current, n = (a) => {
|
|
243
|
-
|
|
242
|
+
C.current && !X.current && a.stopPropagation();
|
|
244
243
|
};
|
|
245
244
|
return e == null || e.addEventListener("click", n), () => {
|
|
246
245
|
e == null || e.removeEventListener("click", n);
|
|
247
246
|
};
|
|
248
|
-
}, []),
|
|
247
|
+
}, []), W(() => {
|
|
249
248
|
D == null || D(M);
|
|
250
|
-
}, [M, D]),
|
|
251
|
-
|
|
252
|
-
}, []), /* @__PURE__ */
|
|
253
|
-
|
|
249
|
+
}, [M, D]), W(() => () => {
|
|
250
|
+
G.current && cancelAnimationFrame(G.current), V.current && cancelAnimationFrame(V.current), E.current && cancelAnimationFrame(E.current);
|
|
251
|
+
}, []), /* @__PURE__ */ A(m, { ref: ee, flex: 1, flexDirection: "column", "aria-label": "일정 안내", ...K, children: [
|
|
252
|
+
$ && ($ == null ? void 0 : $.length) > 0 && /* @__PURE__ */ h(
|
|
254
253
|
m,
|
|
255
254
|
{
|
|
256
255
|
ref: re,
|
|
@@ -261,28 +260,28 @@ function He({
|
|
|
261
260
|
pr: 4,
|
|
262
261
|
role: "group",
|
|
263
262
|
"aria-label": "일정 종류 안내",
|
|
264
|
-
children:
|
|
263
|
+
children: $ == null ? void 0 : $.map(({ text: e, color: n }) => /* @__PURE__ */ A(m, { alignItems: "center", gap: 1, children: [
|
|
265
264
|
/* @__PURE__ */ h(
|
|
266
|
-
|
|
265
|
+
pe,
|
|
267
266
|
{
|
|
268
267
|
"aria-hidden": !0,
|
|
269
268
|
inlineCSS: {
|
|
270
269
|
width: 14,
|
|
271
270
|
height: 14,
|
|
272
|
-
border: `1px solid ${
|
|
271
|
+
border: `1px solid ${L[30]}`,
|
|
273
272
|
borderRadius: 4,
|
|
274
273
|
backgroundColor: n
|
|
275
274
|
}
|
|
276
275
|
}
|
|
277
276
|
),
|
|
278
|
-
/* @__PURE__ */ h(
|
|
277
|
+
/* @__PURE__ */ h(q, { variant: "c3R", color: "grey.70", children: e })
|
|
279
278
|
] }, `legend-${e}-${n}`))
|
|
280
279
|
}
|
|
281
280
|
),
|
|
282
|
-
/* @__PURE__ */
|
|
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,
|
|
@@ -291,12 +290,12 @@ function He({
|
|
|
291
290
|
position: "sticky",
|
|
292
291
|
top: 0,
|
|
293
292
|
zIndex: 2,
|
|
294
|
-
borderBottom: `1px solid ${
|
|
295
|
-
backgroundColor:
|
|
293
|
+
borderBottom: `1px solid ${L[20]}`,
|
|
294
|
+
backgroundColor: L.white
|
|
296
295
|
},
|
|
297
296
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
297
|
+
/* @__PURE__ */ A(
|
|
298
|
+
q,
|
|
300
299
|
{
|
|
301
300
|
variant: "h4B",
|
|
302
301
|
textAlign: "center",
|
|
@@ -309,7 +308,7 @@ function He({
|
|
|
309
308
|
]
|
|
310
309
|
}
|
|
311
310
|
),
|
|
312
|
-
/* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */ A(
|
|
313
312
|
m,
|
|
314
313
|
{
|
|
315
314
|
flexDirection: "column",
|
|
@@ -318,8 +317,8 @@ function He({
|
|
|
318
317
|
role: "columnheader",
|
|
319
318
|
"aria-label": `${e.format("dddd")} (${e.format("D")}일)`,
|
|
320
319
|
children: [
|
|
321
|
-
/* @__PURE__ */ h(
|
|
322
|
-
/* @__PURE__ */ h(
|
|
320
|
+
/* @__PURE__ */ h(q, { variant: "c3R", children: e.format("ddd") }),
|
|
321
|
+
/* @__PURE__ */ h(q, { variant: "c3M", children: e.format("D") })
|
|
323
322
|
]
|
|
324
323
|
},
|
|
325
324
|
e.day()
|
|
@@ -327,8 +326,8 @@ function He({
|
|
|
327
326
|
]
|
|
328
327
|
}
|
|
329
328
|
),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ A(m, { flex: 1, children: [
|
|
330
|
+
/* @__PURE__ */ A(
|
|
332
331
|
m,
|
|
333
332
|
{
|
|
334
333
|
flexDirection: "column",
|
|
@@ -336,11 +335,11 @@ function He({
|
|
|
336
335
|
position: "sticky",
|
|
337
336
|
left: 0,
|
|
338
337
|
maxHeight: "fit-content",
|
|
339
|
-
backgroundColor:
|
|
338
|
+
backgroundColor: L.white,
|
|
340
339
|
zIndex: 1
|
|
341
340
|
},
|
|
342
341
|
children: [
|
|
343
|
-
|
|
342
|
+
R.map(({ time: e, label: n, isCurrentTime: a }) => /* @__PURE__ */ h(
|
|
344
343
|
m,
|
|
345
344
|
{
|
|
346
345
|
justifyContent: "center",
|
|
@@ -350,12 +349,12 @@ function He({
|
|
|
350
349
|
"aria-current": a ? "time" : void 0,
|
|
351
350
|
style: {
|
|
352
351
|
width: 48,
|
|
353
|
-
height:
|
|
354
|
-
minHeight:
|
|
352
|
+
height: Y,
|
|
353
|
+
minHeight: w,
|
|
355
354
|
zIndex: 1
|
|
356
355
|
},
|
|
357
356
|
children: /* @__PURE__ */ h(
|
|
358
|
-
|
|
357
|
+
q,
|
|
359
358
|
{
|
|
360
359
|
variant: "c3M",
|
|
361
360
|
color: "grey.70",
|
|
@@ -386,7 +385,7 @@ function He({
|
|
|
386
385
|
]
|
|
387
386
|
}
|
|
388
387
|
),
|
|
389
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ A(
|
|
390
389
|
m,
|
|
391
390
|
{
|
|
392
391
|
flex: 1,
|
|
@@ -413,11 +412,12 @@ function He({
|
|
|
413
412
|
style: {
|
|
414
413
|
display: "grid",
|
|
415
414
|
gridTemplateColumns: "repeat(7, 1fr)",
|
|
416
|
-
minWidth: "100%"
|
|
415
|
+
minWidth: "100%",
|
|
416
|
+
height: "100%"
|
|
417
417
|
},
|
|
418
418
|
children: e.map((o, i) => {
|
|
419
|
-
const
|
|
420
|
-
|
|
419
|
+
const b = Re(n, o), y = Fe(
|
|
420
|
+
b,
|
|
421
421
|
o
|
|
422
422
|
);
|
|
423
423
|
return /* @__PURE__ */ h(
|
|
@@ -426,9 +426,9 @@ function He({
|
|
|
426
426
|
role: "row",
|
|
427
427
|
"aria-label": `${o.format("dddd")} ${o.format("D")}일`,
|
|
428
428
|
style: {
|
|
429
|
-
borderLeft: `1px solid ${
|
|
429
|
+
borderLeft: `1px solid ${L[20]}`
|
|
430
430
|
},
|
|
431
|
-
children: /* @__PURE__ */
|
|
431
|
+
children: /* @__PURE__ */ A(
|
|
432
432
|
m,
|
|
433
433
|
{
|
|
434
434
|
style: {
|
|
@@ -437,86 +437,86 @@ function He({
|
|
|
437
437
|
flex: 1
|
|
438
438
|
},
|
|
439
439
|
children: [
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
if (typeof
|
|
443
|
-
const
|
|
440
|
+
R.map(({ time: c, label: s, isCurrentTime: t }, r) => {
|
|
441
|
+
const l = a === 1 && r === z && i === I;
|
|
442
|
+
if (typeof H == "function") {
|
|
443
|
+
const u = H(
|
|
444
444
|
o.format("YYYY-MM-DD"),
|
|
445
|
-
|
|
445
|
+
c
|
|
446
446
|
);
|
|
447
|
-
return
|
|
448
|
-
key: `schedule-block-${o}-${r}-${i}-${
|
|
449
|
-
onKeyDown:
|
|
450
|
-
onFocus:
|
|
447
|
+
return he(u, {
|
|
448
|
+
key: `schedule-block-${o}-${r}-${i}-${c}`,
|
|
449
|
+
onKeyDown: le,
|
|
450
|
+
onFocus: ue(o, s),
|
|
451
451
|
role: "gridcell",
|
|
452
452
|
"data-row": r,
|
|
453
453
|
"data-col": i,
|
|
454
454
|
"data-week": a,
|
|
455
|
-
"data-time":
|
|
455
|
+
"data-time": c,
|
|
456
456
|
"aria-current": t ? "time" : void 0,
|
|
457
|
-
tabIndex:
|
|
457
|
+
tabIndex: l ? 0 : -1,
|
|
458
458
|
"aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
|
|
459
|
-
...
|
|
459
|
+
...u.props,
|
|
460
460
|
style: {
|
|
461
|
-
...
|
|
462
|
-
borderTop: r > 0 ? `1px solid ${
|
|
463
|
-
height:
|
|
464
|
-
minHeight:
|
|
461
|
+
...u.props.style,
|
|
462
|
+
borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
|
|
463
|
+
height: Y,
|
|
464
|
+
minHeight: w,
|
|
465
465
|
zIndex: 0
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
return /* @__PURE__ */ h(
|
|
470
|
-
|
|
470
|
+
pe,
|
|
471
471
|
{
|
|
472
|
-
onKeyDown:
|
|
473
|
-
onFocus:
|
|
472
|
+
onKeyDown: le,
|
|
473
|
+
onFocus: ue(o, s),
|
|
474
474
|
role: "gridcell",
|
|
475
475
|
"data-row": r,
|
|
476
476
|
"data-col": i,
|
|
477
477
|
"data-week": a,
|
|
478
|
-
"data-time":
|
|
478
|
+
"data-time": c,
|
|
479
479
|
"aria-current": t ? "time" : void 0,
|
|
480
|
-
tabIndex:
|
|
480
|
+
tabIndex: l ? 0 : -1,
|
|
481
481
|
"aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
|
|
482
482
|
style: {
|
|
483
|
-
borderTop: r > 0 ? `1px solid ${
|
|
484
|
-
height:
|
|
485
|
-
minHeight:
|
|
483
|
+
borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
|
|
484
|
+
height: Y,
|
|
485
|
+
minHeight: w,
|
|
486
486
|
zIndex: 0
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
|
-
`schedule-block-${o}-${r}-${i}-${
|
|
489
|
+
`schedule-block-${o}-${r}-${i}-${c}`
|
|
490
490
|
);
|
|
491
491
|
}),
|
|
492
|
-
|
|
493
|
-
({ children:
|
|
494
|
-
const
|
|
492
|
+
y.map(
|
|
493
|
+
({ children: c, startDate: s, endDate: t, totalColumns: r, columnIndex: l }) => {
|
|
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;
|
|
495
495
|
return /* @__PURE__ */ h(
|
|
496
496
|
m,
|
|
497
497
|
{
|
|
498
498
|
style: {
|
|
499
499
|
position: "absolute",
|
|
500
|
-
top: `${
|
|
501
|
-
left: `${
|
|
500
|
+
top: `${Ee + (x > 0 ? 1 : 0)}px`,
|
|
501
|
+
left: `${Se}%`,
|
|
502
502
|
width: `${de}%`,
|
|
503
|
-
height: `${
|
|
503
|
+
height: `${Le - (x > 0 ? 1 : 0)}px`,
|
|
504
504
|
zIndex: 1
|
|
505
505
|
},
|
|
506
|
-
children:
|
|
506
|
+
children: he(B, {
|
|
507
507
|
role: "button",
|
|
508
508
|
tabIndex: a === 1 ? 0 : -1,
|
|
509
|
-
onKeyDown:
|
|
509
|
+
onKeyDown: ke(B.props.onKeyDown),
|
|
510
510
|
"data-start-date": s,
|
|
511
511
|
"data-start-time": v(s).format("HH:mm"),
|
|
512
512
|
"data-end-date": t,
|
|
513
513
|
"data-end-time": v(t).format("HH:mm"),
|
|
514
514
|
"data-is-event": !0,
|
|
515
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시")}까지의 일정`,
|
|
516
|
-
...
|
|
516
|
+
...B.props
|
|
517
517
|
})
|
|
518
518
|
},
|
|
519
|
-
`${s}-${t}-${
|
|
519
|
+
`${s}-${t}-${l}-${r}`
|
|
520
520
|
);
|
|
521
521
|
}
|
|
522
522
|
)
|
|
@@ -532,14 +532,14 @@ function He({
|
|
|
532
532
|
))
|
|
533
533
|
}
|
|
534
534
|
),
|
|
535
|
-
|
|
535
|
+
$e
|
|
536
536
|
]
|
|
537
537
|
}
|
|
538
538
|
)
|
|
539
539
|
] }),
|
|
540
|
-
/* @__PURE__ */ h(
|
|
540
|
+
/* @__PURE__ */ h(q, { role: "status", visuallyHidden: !0, children: be })
|
|
541
541
|
] });
|
|
542
542
|
}
|
|
543
543
|
export {
|
|
544
|
-
|
|
544
|
+
Ye as default
|
|
545
545
|
};
|