@dotss/tictoccroc 0.0.6 → 0.0.8
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 -163
- package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +13 -7
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +65 -54
- package/dist/shared/utils/getDateRange/getDateRange.mjs +16 -15
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +2 -2
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +11 -12
- 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/components/ProfileSummary/ProfileSummary.mjs +114 -121
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +15 -15
- package/package.json +1 -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 ee, getDayScheduleEvents as Re, resolvePositionedScheduleEventsForDate as Fe, getMinutesFromMidnight as we } from "./Scheduler.utils.mjs";
|
|
8
|
+
const R = Array.from({ length: 33 }).map((_, P) => {
|
|
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 {
|
|
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: P = v(),
|
|
19
|
+
legend: $,
|
|
20
|
+
minScheduleBlockHeight: w = 20,
|
|
21
|
+
maxScheduleBlockHeight: T,
|
|
22
|
+
renderScheduleBlock: H,
|
|
22
23
|
onDateChange: D,
|
|
23
|
-
adornment: G,
|
|
24
24
|
...U
|
|
25
25
|
}) {
|
|
26
26
|
const {
|
|
27
|
-
palette: { grey:
|
|
28
|
-
} =
|
|
29
|
-
if (e.type ===
|
|
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(""), J = d(null), te = d(null), re = d(null), Q = 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), Z = d(!1), S = d(null), G = d(0), V = d(0), E = d(0), p = d(null), B = 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
|
+
ee(M.subtract(1, "week"), B),
|
|
40
|
+
ee(M, B),
|
|
41
|
+
ee(M.add(1, "week"), B)
|
|
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,20 @@ 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 =
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
);
|
|
193
|
+
if (Q.current) {
|
|
194
|
+
const i = ((a = (n = J.current) == null ? void 0 : n.parentElement) == null ? void 0 : a.offsetHeight) ?? 0, b = Q.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(() => {
|
|
203
|
+
J.current;
|
|
204
204
|
const e = te.current;
|
|
205
205
|
if (!e) return;
|
|
206
206
|
const n = () => {
|
|
@@ -208,49 +208,49 @@ function He({
|
|
|
208
208
|
};
|
|
209
209
|
n();
|
|
210
210
|
const a = (t, r) => {
|
|
211
|
-
|
|
212
|
-
}, o = (t, r,
|
|
213
|
-
if (!
|
|
214
|
-
const
|
|
215
|
-
if (K.current =
|
|
216
|
-
|
|
211
|
+
C.current || (S.current && (e.removeEventListener("transitionend", S.current), S.current = null), ne.current = t, oe.current = r, Z.current = !1, N.current = !0, K.current = 0);
|
|
212
|
+
}, o = (t, r, l) => {
|
|
213
|
+
if (!N.current) return;
|
|
214
|
+
const u = t - ne.current, f = r - oe.current;
|
|
215
|
+
if (K.current = u, !Z.current && (se.current = Math.abs(u), ie.current = Math.abs(f), Z.current = !0, ie.current > se.current)) {
|
|
216
|
+
N.current = !1;
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
|
|
219
|
+
l.cancelable && l.preventDefault(), l.stopPropagation(), e.style.transition = "none", e.style.transform = `translate3d(${K.current}px, 0, 0)`, e.style.cursor = "grabbing";
|
|
220
220
|
}, i = () => {
|
|
221
|
-
if (e.style.cursor = "grab", !
|
|
222
|
-
|
|
223
|
-
const t = K.current, r = ae.current,
|
|
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,
|
|
221
|
+
if (e.style.cursor = "grab", !N.current) return;
|
|
222
|
+
N.current = !1, X.current = !1, C.current = !0;
|
|
223
|
+
const t = K.current, r = ae.current, l = r * 0.2;
|
|
224
|
+
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) => {
|
|
225
|
+
u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
|
|
226
|
+
F((f) => f.add(-1, "week")), V.current = requestAnimationFrame(() => {
|
|
227
|
+
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
|
|
228
228
|
});
|
|
229
229
|
}));
|
|
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,
|
|
230
|
+
}, e.addEventListener("transitionend", S.current)) : t < -l ? (e.style.transform = `translate3d(-${r}px, 0, 0)`, S.current = (u) => {
|
|
231
|
+
u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
|
|
232
|
+
F((f) => f.add(1, "week")), V.current = requestAnimationFrame(() => {
|
|
233
|
+
e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
|
|
234
234
|
});
|
|
235
235
|
}));
|
|
236
|
-
}, e.addEventListener("transitionend",
|
|
237
|
-
},
|
|
238
|
-
return window.addEventListener("resize", n), e.addEventListener("touchstart",
|
|
239
|
-
window.removeEventListener("resize", n), e.removeEventListener("touchstart",
|
|
236
|
+
}, e.addEventListener("transitionend", S.current)) : (C.current = !1, X.current = !0, e.style.transform = "translate3d(0, 0, 0)");
|
|
237
|
+
}, 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);
|
|
238
|
+
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), () => {
|
|
239
|
+
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
240
|
};
|
|
241
|
-
}, []),
|
|
241
|
+
}, []), W(() => {
|
|
242
242
|
const e = p.current, n = (a) => {
|
|
243
|
-
|
|
243
|
+
C.current && !X.current && a.stopPropagation();
|
|
244
244
|
};
|
|
245
245
|
return e == null || e.addEventListener("click", n), () => {
|
|
246
246
|
e == null || e.removeEventListener("click", n);
|
|
247
247
|
};
|
|
248
|
-
}, []),
|
|
248
|
+
}, []), W(() => {
|
|
249
249
|
D == null || D(M);
|
|
250
|
-
}, [M, D]),
|
|
251
|
-
|
|
252
|
-
}, []), /* @__PURE__ */
|
|
253
|
-
|
|
250
|
+
}, [M, D]), W(() => () => {
|
|
251
|
+
G.current && cancelAnimationFrame(G.current), V.current && cancelAnimationFrame(V.current), E.current && cancelAnimationFrame(E.current);
|
|
252
|
+
}, []), /* @__PURE__ */ A(m, { ref: J, flex: 1, flexDirection: "column", "aria-label": "일정 안내", ...U, children: [
|
|
253
|
+
$ && ($ == null ? void 0 : $.length) > 0 && /* @__PURE__ */ h(
|
|
254
254
|
m,
|
|
255
255
|
{
|
|
256
256
|
ref: re,
|
|
@@ -261,28 +261,28 @@ function He({
|
|
|
261
261
|
pr: 4,
|
|
262
262
|
role: "group",
|
|
263
263
|
"aria-label": "일정 종류 안내",
|
|
264
|
-
children:
|
|
264
|
+
children: $ == null ? void 0 : $.map(({ text: e, color: n }) => /* @__PURE__ */ A(m, { alignItems: "center", gap: 1, children: [
|
|
265
265
|
/* @__PURE__ */ h(
|
|
266
|
-
|
|
266
|
+
pe,
|
|
267
267
|
{
|
|
268
268
|
"aria-hidden": !0,
|
|
269
269
|
inlineCSS: {
|
|
270
270
|
width: 14,
|
|
271
271
|
height: 14,
|
|
272
|
-
border: `1px solid ${
|
|
272
|
+
border: `1px solid ${L[30]}`,
|
|
273
273
|
borderRadius: 4,
|
|
274
274
|
backgroundColor: n
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
),
|
|
278
|
-
/* @__PURE__ */ h(
|
|
278
|
+
/* @__PURE__ */ h(q, { variant: "c3R", color: "grey.70", children: e })
|
|
279
279
|
] }, `legend-${e}-${n}`))
|
|
280
280
|
}
|
|
281
281
|
),
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ A(
|
|
283
283
|
m,
|
|
284
284
|
{
|
|
285
|
-
ref:
|
|
285
|
+
ref: Q,
|
|
286
286
|
alignItems: "center",
|
|
287
287
|
pt: 1,
|
|
288
288
|
pb: 2,
|
|
@@ -291,12 +291,12 @@ function He({
|
|
|
291
291
|
position: "sticky",
|
|
292
292
|
top: 0,
|
|
293
293
|
zIndex: 2,
|
|
294
|
-
borderBottom: `1px solid ${
|
|
295
|
-
backgroundColor:
|
|
294
|
+
borderBottom: `1px solid ${L[20]}`,
|
|
295
|
+
backgroundColor: L.white
|
|
296
296
|
},
|
|
297
297
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
298
|
+
/* @__PURE__ */ A(
|
|
299
|
+
q,
|
|
300
300
|
{
|
|
301
301
|
variant: "h4B",
|
|
302
302
|
textAlign: "center",
|
|
@@ -309,7 +309,7 @@ function He({
|
|
|
309
309
|
]
|
|
310
310
|
}
|
|
311
311
|
),
|
|
312
|
-
/* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */ A(
|
|
313
313
|
m,
|
|
314
314
|
{
|
|
315
315
|
flexDirection: "column",
|
|
@@ -318,8 +318,8 @@ function He({
|
|
|
318
318
|
role: "columnheader",
|
|
319
319
|
"aria-label": `${e.format("dddd")} (${e.format("D")}일)`,
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */ h(
|
|
322
|
-
/* @__PURE__ */ h(
|
|
321
|
+
/* @__PURE__ */ h(q, { variant: "c3R", children: e.format("ddd") }),
|
|
322
|
+
/* @__PURE__ */ h(q, { variant: "c3M", children: e.format("D") })
|
|
323
323
|
]
|
|
324
324
|
},
|
|
325
325
|
e.day()
|
|
@@ -327,8 +327,8 @@ function He({
|
|
|
327
327
|
]
|
|
328
328
|
}
|
|
329
329
|
),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ A(m, { flex: 1, children: [
|
|
331
|
+
/* @__PURE__ */ A(
|
|
332
332
|
m,
|
|
333
333
|
{
|
|
334
334
|
flexDirection: "column",
|
|
@@ -336,11 +336,11 @@ function He({
|
|
|
336
336
|
position: "sticky",
|
|
337
337
|
left: 0,
|
|
338
338
|
maxHeight: "fit-content",
|
|
339
|
-
backgroundColor:
|
|
339
|
+
backgroundColor: L.white,
|
|
340
340
|
zIndex: 1
|
|
341
341
|
},
|
|
342
342
|
children: [
|
|
343
|
-
|
|
343
|
+
R.map(({ time: e, label: n, isCurrentTime: a }) => /* @__PURE__ */ h(
|
|
344
344
|
m,
|
|
345
345
|
{
|
|
346
346
|
justifyContent: "center",
|
|
@@ -350,12 +350,12 @@ function He({
|
|
|
350
350
|
"aria-current": a ? "time" : void 0,
|
|
351
351
|
style: {
|
|
352
352
|
width: 48,
|
|
353
|
-
height:
|
|
354
|
-
minHeight:
|
|
353
|
+
height: Y,
|
|
354
|
+
minHeight: w,
|
|
355
355
|
zIndex: 1
|
|
356
356
|
},
|
|
357
357
|
children: /* @__PURE__ */ h(
|
|
358
|
-
|
|
358
|
+
q,
|
|
359
359
|
{
|
|
360
360
|
variant: "c3M",
|
|
361
361
|
color: "grey.70",
|
|
@@ -386,7 +386,7 @@ function He({
|
|
|
386
386
|
]
|
|
387
387
|
}
|
|
388
388
|
),
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ A(
|
|
390
390
|
m,
|
|
391
391
|
{
|
|
392
392
|
flex: 1,
|
|
@@ -413,11 +413,12 @@ function He({
|
|
|
413
413
|
style: {
|
|
414
414
|
display: "grid",
|
|
415
415
|
gridTemplateColumns: "repeat(7, 1fr)",
|
|
416
|
-
minWidth: "100%"
|
|
416
|
+
minWidth: "100%",
|
|
417
|
+
height: "100%"
|
|
417
418
|
},
|
|
418
419
|
children: e.map((o, i) => {
|
|
419
|
-
const
|
|
420
|
-
|
|
420
|
+
const b = Re(n, o), y = Fe(
|
|
421
|
+
b,
|
|
421
422
|
o
|
|
422
423
|
);
|
|
423
424
|
return /* @__PURE__ */ h(
|
|
@@ -426,9 +427,9 @@ function He({
|
|
|
426
427
|
role: "row",
|
|
427
428
|
"aria-label": `${o.format("dddd")} ${o.format("D")}일`,
|
|
428
429
|
style: {
|
|
429
|
-
borderLeft: `1px solid ${
|
|
430
|
+
borderLeft: `1px solid ${L[20]}`
|
|
430
431
|
},
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ A(
|
|
432
433
|
m,
|
|
433
434
|
{
|
|
434
435
|
style: {
|
|
@@ -437,86 +438,86 @@ function He({
|
|
|
437
438
|
flex: 1
|
|
438
439
|
},
|
|
439
440
|
children: [
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
if (typeof
|
|
443
|
-
const
|
|
441
|
+
R.map(({ time: c, label: s, isCurrentTime: t }, r) => {
|
|
442
|
+
const l = a === 1 && r === z && i === I;
|
|
443
|
+
if (typeof H == "function") {
|
|
444
|
+
const u = H(
|
|
444
445
|
o.format("YYYY-MM-DD"),
|
|
445
|
-
|
|
446
|
+
c
|
|
446
447
|
);
|
|
447
|
-
return
|
|
448
|
-
key: `schedule-block-${o}-${r}-${i}-${
|
|
449
|
-
onKeyDown:
|
|
450
|
-
onFocus:
|
|
448
|
+
return he(u, {
|
|
449
|
+
key: `schedule-block-${o}-${r}-${i}-${c}`,
|
|
450
|
+
onKeyDown: le,
|
|
451
|
+
onFocus: ue(o, s),
|
|
451
452
|
role: "gridcell",
|
|
452
453
|
"data-row": r,
|
|
453
454
|
"data-col": i,
|
|
454
455
|
"data-week": a,
|
|
455
|
-
"data-time":
|
|
456
|
+
"data-time": c,
|
|
456
457
|
"aria-current": t ? "time" : void 0,
|
|
457
|
-
tabIndex:
|
|
458
|
+
tabIndex: l ? 0 : -1,
|
|
458
459
|
"aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
|
|
459
|
-
...
|
|
460
|
+
...u.props,
|
|
460
461
|
style: {
|
|
461
|
-
...
|
|
462
|
-
borderTop: r > 0 ? `1px solid ${
|
|
463
|
-
height:
|
|
464
|
-
minHeight:
|
|
462
|
+
...u.props.style,
|
|
463
|
+
borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
|
|
464
|
+
height: Y,
|
|
465
|
+
minHeight: w,
|
|
465
466
|
zIndex: 0
|
|
466
467
|
}
|
|
467
468
|
});
|
|
468
469
|
}
|
|
469
470
|
return /* @__PURE__ */ h(
|
|
470
|
-
|
|
471
|
+
pe,
|
|
471
472
|
{
|
|
472
|
-
onKeyDown:
|
|
473
|
-
onFocus:
|
|
473
|
+
onKeyDown: le,
|
|
474
|
+
onFocus: ue(o, s),
|
|
474
475
|
role: "gridcell",
|
|
475
476
|
"data-row": r,
|
|
476
477
|
"data-col": i,
|
|
477
478
|
"data-week": a,
|
|
478
|
-
"data-time":
|
|
479
|
+
"data-time": c,
|
|
479
480
|
"aria-current": t ? "time" : void 0,
|
|
480
|
-
tabIndex:
|
|
481
|
+
tabIndex: l ? 0 : -1,
|
|
481
482
|
"aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
|
|
482
483
|
style: {
|
|
483
|
-
borderTop: r > 0 ? `1px solid ${
|
|
484
|
-
height:
|
|
485
|
-
minHeight:
|
|
484
|
+
borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
|
|
485
|
+
height: Y,
|
|
486
|
+
minHeight: w,
|
|
486
487
|
zIndex: 0
|
|
487
488
|
}
|
|
488
489
|
},
|
|
489
|
-
`schedule-block-${o}-${r}-${i}-${
|
|
490
|
+
`schedule-block-${o}-${r}-${i}-${c}`
|
|
490
491
|
);
|
|
491
492
|
}),
|
|
492
|
-
|
|
493
|
-
({ children:
|
|
494
|
-
const
|
|
493
|
+
y.map(
|
|
494
|
+
({ 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, O = c;
|
|
495
496
|
return /* @__PURE__ */ h(
|
|
496
497
|
m,
|
|
497
498
|
{
|
|
498
499
|
style: {
|
|
499
500
|
position: "absolute",
|
|
500
|
-
top: `${
|
|
501
|
-
left: `${
|
|
501
|
+
top: `${Ee + (x > 0 ? 1 : 0)}px`,
|
|
502
|
+
left: `${Se}%`,
|
|
502
503
|
width: `${de}%`,
|
|
503
|
-
height: `${
|
|
504
|
+
height: `${Le - (x > 0 ? 1 : 0)}px`,
|
|
504
505
|
zIndex: 1
|
|
505
506
|
},
|
|
506
|
-
children:
|
|
507
|
+
children: he(O, {
|
|
507
508
|
role: "button",
|
|
508
509
|
tabIndex: a === 1 ? 0 : -1,
|
|
509
|
-
onKeyDown:
|
|
510
|
+
onKeyDown: ke(O.props.onKeyDown),
|
|
510
511
|
"data-start-date": s,
|
|
511
512
|
"data-start-time": v(s).format("HH:mm"),
|
|
512
513
|
"data-end-date": t,
|
|
513
514
|
"data-end-time": v(t).format("HH:mm"),
|
|
514
515
|
"data-is-event": !0,
|
|
515
516
|
"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
|
-
...
|
|
517
|
+
...O.props
|
|
517
518
|
})
|
|
518
519
|
},
|
|
519
|
-
`${s}-${t}-${
|
|
520
|
+
`${s}-${t}-${l}-${r}`
|
|
520
521
|
);
|
|
521
522
|
}
|
|
522
523
|
)
|
|
@@ -532,14 +533,14 @@ function He({
|
|
|
532
533
|
))
|
|
533
534
|
}
|
|
534
535
|
),
|
|
535
|
-
|
|
536
|
+
$e
|
|
536
537
|
]
|
|
537
538
|
}
|
|
538
539
|
)
|
|
539
540
|
] }),
|
|
540
|
-
/* @__PURE__ */ h(
|
|
541
|
+
/* @__PURE__ */ h(q, { role: "status", visuallyHidden: !0, children: be })
|
|
541
542
|
] });
|
|
542
543
|
}
|
|
543
544
|
export {
|
|
544
|
-
|
|
545
|
+
Ye as default
|
|
545
546
|
};
|