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